Merge remote-tracking branch 'origin/dev' into test
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.api.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -185,6 +186,9 @@ public class PurchaseOrderWithDetailsDTO {
|
||||
* 物料类型
|
||||
*/
|
||||
private String mtrlTp;
|
||||
|
||||
/**
|
||||
* 订单类型
|
||||
*/
|
||||
private String splyBsnTp;
|
||||
private List<PrchOrdDtlDTO> orderDetails;
|
||||
}
|
||||
|
||||
@@ -26,4 +26,5 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode CONTRACT_ERP_RCV_DLVY_NOT_EXISTS = new ErrorCode(1_027_000_011, "不存在的收支类型或收支类型为空");
|
||||
ErrorCode CONTRACT_STATUS_NOT_ARCHIVE = new ErrorCode(1_027_000_012, "{}状态合同不允许归档");
|
||||
ErrorCode CONTRACT_STATUS_NOT_SUBMIT_ERP = new ErrorCode(1_027_000_013, "{}状态合同不允许提交ERP");
|
||||
ErrorCode CONTRACT_ORDER_EXISTS = new ErrorCode(1_027_000_014, "关联订单已存在");
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.zt.plat.module.contractorder.enums.contract;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 字典枚举
|
||||
*/
|
||||
@Getter
|
||||
public enum DictEnum {
|
||||
|
||||
/** ERP请求状态 */
|
||||
@@ -60,19 +63,7 @@ public enum DictEnum {
|
||||
*/
|
||||
private final String remark;
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public static DictEnum getByCode(String code, String dictType) {
|
||||
public static DictEnum getByCodeAndType(String code, String dictType) {
|
||||
return DictEnum.valueOf(dictType + "_" +code);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ public class ContractController implements BusinessControllerMarker {
|
||||
@PostMapping("/submit/erp")
|
||||
@Operation(summary = "提交ERP")
|
||||
@PreAuthorize("@ss.hasPermission('base:contract:erp')")
|
||||
public CommonResult<Boolean> submitErp(@RequestBody List<Long> ids) {
|
||||
public CommonResult<List<String>> submitErp(@RequestBody List<Long> ids) {
|
||||
return success(contractService.submitErp(ids));
|
||||
}
|
||||
|
||||
|
||||
@@ -38,4 +38,7 @@ public class ContractPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "本币金额;与ERP(HTBWBZJE)对应")
|
||||
private BigDecimal basicAmount;
|
||||
|
||||
@Schema(description = "合同分类(字典:SPLY_BSN_TP)")
|
||||
private String businessType;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.contract.vo.contract;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 合同关联 Response VO")
|
||||
@Data
|
||||
public class RelationRespVO {
|
||||
|
||||
@Schema(description = "上游主键")
|
||||
private Long upId;
|
||||
|
||||
@Schema(description = "下游主键")
|
||||
private Long downId;
|
||||
}
|
||||
@@ -88,6 +88,9 @@ public class PurchaseOrderController implements BusinessControllerMarker {
|
||||
public CommonResult<PurchaseOrderRespVO> getPurchaseOrder(@RequestParam("id") Long id) {
|
||||
PurchaseOrderDO purchaseOrder = purchaseOrderService.getPurchaseOrder(id);
|
||||
PurchaseOrderRespVO purchaseOrderRespVO = BeanUtils.toBean(purchaseOrder, PurchaseOrderRespVO.class);
|
||||
if (purchaseOrderRespVO == null){
|
||||
return success(null);
|
||||
}
|
||||
purchaseOrderService.setOrderDetails(purchaseOrderRespVO);
|
||||
return success(purchaseOrderRespVO);
|
||||
}
|
||||
@@ -124,6 +127,15 @@ public class PurchaseOrderController implements BusinessControllerMarker {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/submit-order-batch")
|
||||
@Operation(summary = "批量提交订单审核")
|
||||
@PreAuthorize("@ss.hasPermission('bse:purchase-order:update')")
|
||||
public CommonResult<Boolean> submitOrder(@RequestBody @Validated @NotEmpty(message = "采购订单id不能为空") List<String> ids) {
|
||||
System.out.println("ids:"+ids);
|
||||
ids.forEach(id -> purchaseOrderService.submitOrder(Long.valueOf(id)));
|
||||
return success(true);
|
||||
}
|
||||
|
||||
//提交ERP订单
|
||||
@PostMapping("/submit-erp061")
|
||||
@Operation(summary = "推送ERP订单", description = "061')")
|
||||
@@ -163,4 +175,19 @@ public class PurchaseOrderController implements BusinessControllerMarker {
|
||||
return purchaseOrderService.getMaterial(orderNo);
|
||||
}
|
||||
|
||||
//关联订单
|
||||
@PostMapping("/link-order")
|
||||
@Operation(summary = "关联订单")
|
||||
public CommonResult<Boolean> linkOrder(@RequestBody @Validated LinkOrderReqVO req){
|
||||
return success(purchaseOrderService.linkOrder(req));
|
||||
}
|
||||
|
||||
@PostMapping("/order-pass-reject")
|
||||
@Operation(summary = "订单审核")
|
||||
public CommonResult<Boolean> orderPassReject(@RequestBody PurchaseorderReqVO reqVO){
|
||||
return success(purchaseOrderService.orderPassReject(reqVO));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Schema(description = "关联订单请求参数 VO")
|
||||
public class LinkOrderReqVO {
|
||||
@Schema(description = "上游订单号")
|
||||
private Long upOrderId;
|
||||
@Schema(description = "下游订单号")
|
||||
private Long downOrderId;
|
||||
@Schema(description = "关联订单类型")
|
||||
private String linkOrderType;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public class PrchOrdDtlDetailsRespVO {
|
||||
* 计量单位;推送ERP(必须)
|
||||
*/
|
||||
|
||||
private BigDecimal unt;
|
||||
private String unt;
|
||||
/**
|
||||
* 含税单价;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@@ -67,7 +67,7 @@ public class PrchOrdDtlRespVO {
|
||||
|
||||
@Schema(description = "税码(字典: PRCH_TAX);推送ERP", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("税码(字典: PRCH_TAX);推送ERP")
|
||||
private BigDecimal taxNum;
|
||||
private String taxNum;
|
||||
|
||||
@Schema(description = "是否基于GR的发票校验;推送ERP")
|
||||
@ExcelProperty("是否基于GR的发票校验;推送ERP")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user