订单管理相关
This commit is contained in:
@@ -3,11 +3,14 @@ package com.zt.plat.module.contractorder.api;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.contractorder.api.dto.ContractFormulaRespDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.PurchaseOrderWithDetailsDTO;
|
||||
import com.zt.plat.module.contractorder.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
@@ -23,4 +26,8 @@ public interface ContractApi {
|
||||
@GetMapping(PREFIX + "/updateOrderStatus")
|
||||
@Operation(summary = "更新订单状态")
|
||||
CommonResult<Boolean> updateOrderStatus(@RequestParam("orderId") Long orderId, @RequestParam("status") String status);
|
||||
|
||||
@PostMapping(PREFIX + "/order-by-order-no")
|
||||
@Operation(summary = "更新订单状态", description = "通过订单编号获取订单信息")
|
||||
CommonResult<List<PurchaseOrderWithDetailsDTO>> getOrderByOrderNo(@RequestBody List<String> orderNoS);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,246 @@
|
||||
package com.zt.plat.module.contractorder.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class PrchOrdDtlDTO {
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
|
||||
private Long id;
|
||||
/**
|
||||
* 采购订单主键
|
||||
*/
|
||||
|
||||
private Long ordId;
|
||||
/**
|
||||
* 行项目;推送ERP(必须)
|
||||
*/
|
||||
private Long lineNum;
|
||||
/**
|
||||
* 物料编码;推送ERP
|
||||
*/
|
||||
|
||||
private String mtrlNum;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
|
||||
private String mtrlName;
|
||||
/**
|
||||
* 收货工厂名称
|
||||
*/
|
||||
|
||||
private String rcvFactName;
|
||||
/**
|
||||
* 收货工厂编码;推送ERP(必须)
|
||||
*/
|
||||
|
||||
private String rcvFactNum;
|
||||
/**
|
||||
* 收货库位名称
|
||||
*/
|
||||
|
||||
private String rcvWrhName;
|
||||
/**
|
||||
* 收货库位编码;推送ERP
|
||||
*/
|
||||
|
||||
private String rcvWrhNum;
|
||||
/**
|
||||
* 暂估数量;推送ERP(必须)
|
||||
*/
|
||||
|
||||
private String qty;
|
||||
/**
|
||||
* 计量单位;推送ERP(必须)
|
||||
*/
|
||||
|
||||
private BigDecimal unt;
|
||||
/**
|
||||
* 含税单价;推送ERP(必须)
|
||||
*/
|
||||
|
||||
private BigDecimal inTaxUprc;
|
||||
/**
|
||||
* 价格单位;推送ERP
|
||||
*/
|
||||
|
||||
private BigDecimal prcUnt;
|
||||
/**
|
||||
* 税码(字典: PRCH_TAX);推送ERP
|
||||
*/
|
||||
|
||||
private BigDecimal taxNum;
|
||||
/**
|
||||
* 是否基于GR的发票校验;推送ERP
|
||||
*/
|
||||
|
||||
private String isGrInv;
|
||||
/**
|
||||
* 是否允许无限制收货;推送ERP
|
||||
*/
|
||||
|
||||
private String isUnlRcv;
|
||||
/**
|
||||
* 批次;推送ERP
|
||||
*/
|
||||
|
||||
private String bat;
|
||||
/**
|
||||
* 项目类别;推送ERP:委托加工L
|
||||
*/
|
||||
|
||||
private String prjCtgr;
|
||||
/**
|
||||
* 科目分配类别(字典: PRCH_ACTS_CTGR);推送ERP:联动订单类型,固定资产订单A,服务订单S-销售服务费K-成本中心F-订单
|
||||
*/
|
||||
|
||||
private String actsCtgr;
|
||||
/**
|
||||
* 物料组编码(字典: PRCH_MATERIAL_GROUP);推送ERP:联动订单类型,服务订单必传
|
||||
*/
|
||||
|
||||
private String mtrlCpntNum;
|
||||
/**
|
||||
* 物料组描述;推送ERP:联动订单类型,服务订单必传
|
||||
*/
|
||||
|
||||
private String mtrlCpntDsp;
|
||||
/**
|
||||
* 短文本
|
||||
*/
|
||||
|
||||
private String shrtTxt;
|
||||
/**
|
||||
* 退货标识X标识退货;推送ERP
|
||||
*/
|
||||
|
||||
private String isRlbkCgo;
|
||||
/**
|
||||
* 是否免费收货标识X;推送ERP
|
||||
*/
|
||||
|
||||
private String isFreeRcv;
|
||||
/**
|
||||
* 外部行项目号;推送ERP
|
||||
*/
|
||||
|
||||
private Long outLineNum;
|
||||
/**
|
||||
* 备注信息-需求单位;推送ERP
|
||||
*/
|
||||
|
||||
private String rmkUnt;
|
||||
/**
|
||||
* 备注信息-物料详细;推送ERP
|
||||
*/
|
||||
|
||||
private String rmkMtrl;
|
||||
/**
|
||||
* 交货起始日期;推送ERP
|
||||
*/
|
||||
|
||||
private LocalDateTime bgnDt;
|
||||
/**
|
||||
* 交货截止日期;推送ERP
|
||||
*/
|
||||
|
||||
private LocalDateTime ddlDt;
|
||||
/**
|
||||
* 已收货量
|
||||
*/
|
||||
|
||||
private BigDecimal lstQty;
|
||||
/**
|
||||
* 已移库量库;存针对该订单产生的移库量
|
||||
*/
|
||||
|
||||
private BigDecimal trfQty;
|
||||
/**
|
||||
* 小协议号
|
||||
*/
|
||||
|
||||
private String agrNum;
|
||||
/**
|
||||
* 移库工厂名称
|
||||
*/
|
||||
|
||||
private String trfFactName;
|
||||
/**
|
||||
* 移库工厂编码
|
||||
*/
|
||||
|
||||
private String trfFactNum;
|
||||
/**
|
||||
* 移库库位名称
|
||||
*/
|
||||
|
||||
private String trfWrhName;
|
||||
/**
|
||||
* 移库库位编码
|
||||
*/
|
||||
|
||||
private String trfWrhNum;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
private String rmk;
|
||||
/**
|
||||
* 原料湿重;推送ERP
|
||||
*/
|
||||
|
||||
private BigDecimal origWet;
|
||||
/**
|
||||
* 销售物料号;推送ERP:科目分配类别为S时必填
|
||||
*/
|
||||
|
||||
private String saleMtrlNum;
|
||||
/**
|
||||
* 统计型内部订单;推送ERP
|
||||
*/
|
||||
|
||||
private String inOrd;
|
||||
/**
|
||||
* 采购类别;推送ERP:0-生产性物资类1-项目投资类
|
||||
*/
|
||||
|
||||
private String prchCtgr;
|
||||
/**
|
||||
* 是否启用(字典:ERP_CTRT_YN);处理明细中多个相同物料,只能允许一种物料启用
|
||||
*/
|
||||
|
||||
private String isEnb;
|
||||
/**
|
||||
* 科目分配详情;科目分配类别为K或P时使用(JSON)
|
||||
*/
|
||||
|
||||
private String actsCtgrDtl;
|
||||
/**
|
||||
* 委托加工详情;委托加工订单使用(JSON)
|
||||
*/
|
||||
|
||||
private String enttDtl;
|
||||
/**
|
||||
* 金属元素缩写
|
||||
*/
|
||||
|
||||
private String elemAbbr;
|
||||
/**
|
||||
* 金属元素名称
|
||||
*/
|
||||
|
||||
private String elemName;
|
||||
/**
|
||||
* 金属元素编码
|
||||
*/
|
||||
|
||||
private String elemCdg;
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
package com.zt.plat.module.contractorder.api.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PurchaseOrderWithDetailsDTO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* ERP订单号
|
||||
*/
|
||||
private String orderSAPNumber;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private String systemOrderNumber;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
private String cpName;
|
||||
/**
|
||||
* 公司编码;推送ERP(必须)
|
||||
*/
|
||||
private String companyNumber;
|
||||
/**
|
||||
* 客商编码;推送ERP(必须)
|
||||
*/
|
||||
private String supplierNumber;
|
||||
/**
|
||||
* 客商名称
|
||||
*/
|
||||
private String supplierName;
|
||||
/**
|
||||
* 订单类型(字典:PRCH_ORD_TP);推送ERP(必须)
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 凭证日期;推送ERP(必须)
|
||||
*/
|
||||
private LocalDateTime voucherDate;
|
||||
/**
|
||||
* 采购组织编码;推送ERP(必须)
|
||||
*/
|
||||
private String purchaseOrganizationCustomsDeclaration;
|
||||
/**
|
||||
* 收货工厂名称
|
||||
*/
|
||||
private String receiveFactoryName;
|
||||
/**
|
||||
* 收货工厂编码;推送ERP(必须)
|
||||
*/
|
||||
private String receiveFactoryNumber;
|
||||
/**
|
||||
* 收货库位名称
|
||||
*/
|
||||
private String receiveWarehouseName;
|
||||
/**
|
||||
* 收货库位编码;推送ERP
|
||||
*/
|
||||
private String receiveWarehouseNumber;
|
||||
/**
|
||||
* 采购组编码(字典:PRCH_GRP_TP);推送ERP(必须)
|
||||
*/
|
||||
private String purchaseGroup;
|
||||
/**
|
||||
* 货币码(字典:CUR);推送ERP(必须)
|
||||
*/
|
||||
private String currencyNumber;
|
||||
/**
|
||||
* 汇率;推送ERP
|
||||
*/
|
||||
private BigDecimal exchangeRate;
|
||||
/**
|
||||
* 合同纸质合同号;推送ERP(必须)
|
||||
*/
|
||||
private String paperContractNumber;
|
||||
/**
|
||||
* 小协议号;推送ERP
|
||||
*/
|
||||
private String agreementNumber;
|
||||
/**
|
||||
* 备注;推送ERP
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 代理方编码;推送ERP
|
||||
*/
|
||||
private String agentNumber;
|
||||
/**
|
||||
* 代理方名称
|
||||
*/
|
||||
private String agentName;
|
||||
/**
|
||||
* 订单编码
|
||||
*/
|
||||
private String orderNumber;
|
||||
/**
|
||||
* 系统合同编号
|
||||
*/
|
||||
private String contractNumber;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String materialNumber;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String materialName;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
/**
|
||||
* 小户头号
|
||||
*/
|
||||
private String tenantNumber;
|
||||
/**
|
||||
* ERP公司编号
|
||||
*/
|
||||
private String erpPurchaseCompanyNumber;
|
||||
/**
|
||||
* ERP公司名称
|
||||
*/
|
||||
private String erpPurchaseCompanyName;
|
||||
/**
|
||||
* ERP客商公司编码
|
||||
*/
|
||||
private String erpSalesCompanyNumber;
|
||||
/**
|
||||
* ERP客商公司名称
|
||||
*/
|
||||
private String erpSalesCompanyName;
|
||||
/**
|
||||
* 采购组织名称
|
||||
*/
|
||||
private String purchaseOrganizationName;
|
||||
/**
|
||||
* ERP状态(字典: ERP_REQ_STS)
|
||||
*/
|
||||
private String erpStatus;
|
||||
/**
|
||||
* 请求ERP失败原因
|
||||
*/
|
||||
private String cause;
|
||||
/**
|
||||
* 订单状态(字典:PRCH_ORD_STS)
|
||||
*/
|
||||
|
||||
private String status;
|
||||
/**
|
||||
* 采购组名称
|
||||
*/
|
||||
private String purchaseGroupName;
|
||||
|
||||
/**
|
||||
* 流程实例编号
|
||||
*/
|
||||
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 流程当前任务节点id
|
||||
*/
|
||||
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
|
||||
private String reviewOpinion;
|
||||
|
||||
/**
|
||||
* 是否需要审批
|
||||
*/
|
||||
private int isPush;
|
||||
/**
|
||||
* 物料类型
|
||||
*/
|
||||
private String mtrlTp;
|
||||
|
||||
private List<PrchOrdDtlDTO> orderDetails;
|
||||
}
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.zt.plat.module.contractorder.api;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.contractorder.api.dto.ContractFormulaRespDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.PrchOrdDtlDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.PurchaseOrderWithDetailsDTO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderDetailsRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderWithDetailsVO;
|
||||
import com.zt.plat.module.contractorder.service.contract.ContractService;
|
||||
import com.zt.plat.module.contractorder.service.purchaseorder.PurchaseOrderService;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -9,6 +14,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
@@ -32,4 +38,23 @@ public class ContractApiImpl implements ContractApi {
|
||||
public CommonResult<Boolean> updateOrderStatus(Long orderId, String status) {
|
||||
return success(purchaseOrderService.updateOrderStatus(orderId, status));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<PurchaseOrderWithDetailsDTO>> getOrderByOrderNo(List<String> orderNoS) {
|
||||
List<PurchaseOrderWithDetailsDTO> purchaseOrderWithDetailsDTOS = new ArrayList<>();
|
||||
List<PurchaseOrderDetailsRespVO> purchaseOrderWithDetailsVOS = purchaseOrderService.getOrderByOrderNo(orderNoS);
|
||||
purchaseOrderWithDetailsVOS.forEach(purchaseOrderWithDetailsVO -> {
|
||||
if (purchaseOrderWithDetailsVO!= null) {
|
||||
PurchaseOrderWithDetailsDTO purchaseOrderWithDetailsDTO = BeanUtils.toBean(purchaseOrderWithDetailsVO,
|
||||
PurchaseOrderWithDetailsDTO.class);
|
||||
if (purchaseOrderWithDetailsVO.getOrderDetails().isEmpty()) {
|
||||
purchaseOrderWithDetailsDTO.setOrderDetails(new ArrayList<>());
|
||||
} else {
|
||||
purchaseOrderWithDetailsDTO.setOrderDetails(BeanUtils.toBean(purchaseOrderWithDetailsVO.getOrderDetails(), PrchOrdDtlDTO.class));
|
||||
}
|
||||
purchaseOrderWithDetailsDTOS.add(purchaseOrderWithDetailsDTO);
|
||||
}
|
||||
});
|
||||
return success(purchaseOrderWithDetailsDTOS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.purchaseorder;
|
||||
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderPageReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderSaveReqVO;
|
||||
import com.zt.plat.module.contractorder.api.ContractApiImpl;
|
||||
import com.zt.plat.module.contractorder.api.dto.PurchaseOrderWithDetailsDTO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.*;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import com.zt.plat.module.contractorder.service.purchaseorder.PurchaseOrderService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -43,6 +43,9 @@ public class PurchaseOrderController implements BusinessControllerMarker {
|
||||
|
||||
@Resource
|
||||
private PurchaseOrderService purchaseOrderService;
|
||||
@Resource
|
||||
private ContractApiImpl contractApi;
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建采购订单")
|
||||
@@ -117,10 +120,24 @@ public class PurchaseOrderController implements BusinessControllerMarker {
|
||||
}
|
||||
|
||||
//提交ERP订单
|
||||
@PostMapping("/submit-erp")
|
||||
@Operation(summary = "提交ERP订单", description = "bse:purchase-order:update')")
|
||||
public CommonResult<?> submitErp(@RequestBody List<Long> ids) {
|
||||
return success( purchaseOrderService.submitErp(ids));
|
||||
@PostMapping("/submit-erp061")
|
||||
@Operation(summary = "推送ERP订单", description = "061')")
|
||||
@PreAuthorize("@ss.hasPermission('bse:purchase-order:update')")
|
||||
public CommonResult<?> submitErp061(@RequestBody @Validated @NotNull(message = "采购订单id不能为空") List<Long> ids) {
|
||||
return success( purchaseOrderService.submitErp061(ids));
|
||||
}
|
||||
@PostMapping("/submit-erp062")
|
||||
@Operation(summary = "推送ERP订单", description = "062当每次调更新接口后都需要调此接口")
|
||||
@PreAuthorize("@ss.hasPermission('bse:purchase-order:update')")
|
||||
public CommonResult<?> submitErp062(@RequestParam @Validated @NotNull(message = "采购订单id不能为空") Long id) {
|
||||
return success( purchaseOrderService.submitErp062(id));
|
||||
}
|
||||
|
||||
//通过订单号查询订单信息
|
||||
@PostMapping("/get-order-by-order-no")
|
||||
@Operation(summary = "通过订单号查询订单信息")
|
||||
public CommonResult<List<PurchaseOrderDetailsRespVO>> getOrderByOrderNo(@RequestBody @Validated @NotEmpty(message = "采购订单不能为空") List<String> orderNos){
|
||||
return success(purchaseOrderService.getOrderByOrderNo(orderNos));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,246 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class PrchOrdDtlDetailsRespVO {
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
|
||||
private Long id;
|
||||
/**
|
||||
* 采购订单主键
|
||||
*/
|
||||
|
||||
private Long ordId;
|
||||
/**
|
||||
* 行项目;推送ERP(必须)
|
||||
*/
|
||||
private Long lineNum;
|
||||
/**
|
||||
* 物料编码;推送ERP
|
||||
*/
|
||||
|
||||
private String mtrlNum;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
|
||||
private String mtrlName;
|
||||
/**
|
||||
* 收货工厂名称
|
||||
*/
|
||||
|
||||
private String rcvFactName;
|
||||
/**
|
||||
* 收货工厂编码;推送ERP(必须)
|
||||
*/
|
||||
|
||||
private String rcvFactNum;
|
||||
/**
|
||||
* 收货库位名称
|
||||
*/
|
||||
|
||||
private String rcvWrhName;
|
||||
/**
|
||||
* 收货库位编码;推送ERP
|
||||
*/
|
||||
|
||||
private String rcvWrhNum;
|
||||
/**
|
||||
* 暂估数量;推送ERP(必须)
|
||||
*/
|
||||
|
||||
private String qty;
|
||||
/**
|
||||
* 计量单位;推送ERP(必须)
|
||||
*/
|
||||
|
||||
private BigDecimal unt;
|
||||
/**
|
||||
* 含税单价;推送ERP(必须)
|
||||
*/
|
||||
|
||||
private BigDecimal inTaxUprc;
|
||||
/**
|
||||
* 价格单位;推送ERP
|
||||
*/
|
||||
|
||||
private BigDecimal prcUnt;
|
||||
/**
|
||||
* 税码(字典: PRCH_TAX);推送ERP
|
||||
*/
|
||||
|
||||
private BigDecimal taxNum;
|
||||
/**
|
||||
* 是否基于GR的发票校验;推送ERP
|
||||
*/
|
||||
|
||||
private String isGrInv;
|
||||
/**
|
||||
* 是否允许无限制收货;推送ERP
|
||||
*/
|
||||
|
||||
private String isUnlRcv;
|
||||
/**
|
||||
* 批次;推送ERP
|
||||
*/
|
||||
|
||||
private String bat;
|
||||
/**
|
||||
* 项目类别;推送ERP:委托加工L
|
||||
*/
|
||||
|
||||
private String prjCtgr;
|
||||
/**
|
||||
* 科目分配类别(字典: PRCH_ACTS_CTGR);推送ERP:联动订单类型,固定资产订单A,服务订单S-销售服务费K-成本中心F-订单
|
||||
*/
|
||||
|
||||
private String actsCtgr;
|
||||
/**
|
||||
* 物料组编码(字典: PRCH_MATERIAL_GROUP);推送ERP:联动订单类型,服务订单必传
|
||||
*/
|
||||
|
||||
private String mtrlCpntNum;
|
||||
/**
|
||||
* 物料组描述;推送ERP:联动订单类型,服务订单必传
|
||||
*/
|
||||
|
||||
private String mtrlCpntDsp;
|
||||
/**
|
||||
* 短文本
|
||||
*/
|
||||
|
||||
private String shrtTxt;
|
||||
/**
|
||||
* 退货标识X标识退货;推送ERP
|
||||
*/
|
||||
|
||||
private String isRlbkCgo;
|
||||
/**
|
||||
* 是否免费收货标识X;推送ERP
|
||||
*/
|
||||
|
||||
private String isFreeRcv;
|
||||
/**
|
||||
* 外部行项目号;推送ERP
|
||||
*/
|
||||
|
||||
private Long outLineNum;
|
||||
/**
|
||||
* 备注信息-需求单位;推送ERP
|
||||
*/
|
||||
|
||||
private String rmkUnt;
|
||||
/**
|
||||
* 备注信息-物料详细;推送ERP
|
||||
*/
|
||||
|
||||
private String rmkMtrl;
|
||||
/**
|
||||
* 交货起始日期;推送ERP
|
||||
*/
|
||||
|
||||
private LocalDateTime bgnDt;
|
||||
/**
|
||||
* 交货截止日期;推送ERP
|
||||
*/
|
||||
|
||||
private LocalDateTime ddlDt;
|
||||
/**
|
||||
* 已收货量
|
||||
*/
|
||||
|
||||
private BigDecimal lstQty;
|
||||
/**
|
||||
* 已移库量库;存针对该订单产生的移库量
|
||||
*/
|
||||
|
||||
private BigDecimal trfQty;
|
||||
/**
|
||||
* 小协议号
|
||||
*/
|
||||
|
||||
private String agrNum;
|
||||
/**
|
||||
* 移库工厂名称
|
||||
*/
|
||||
|
||||
private String trfFactName;
|
||||
/**
|
||||
* 移库工厂编码
|
||||
*/
|
||||
|
||||
private String trfFactNum;
|
||||
/**
|
||||
* 移库库位名称
|
||||
*/
|
||||
|
||||
private String trfWrhName;
|
||||
/**
|
||||
* 移库库位编码
|
||||
*/
|
||||
|
||||
private String trfWrhNum;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
private String rmk;
|
||||
/**
|
||||
* 原料湿重;推送ERP
|
||||
*/
|
||||
|
||||
private BigDecimal origWet;
|
||||
/**
|
||||
* 销售物料号;推送ERP:科目分配类别为S时必填
|
||||
*/
|
||||
|
||||
private String saleMtrlNum;
|
||||
/**
|
||||
* 统计型内部订单;推送ERP
|
||||
*/
|
||||
|
||||
private String inOrd;
|
||||
/**
|
||||
* 采购类别;推送ERP:0-生产性物资类1-项目投资类
|
||||
*/
|
||||
|
||||
private String prchCtgr;
|
||||
/**
|
||||
* 是否启用(字典:ERP_CTRT_YN);处理明细中多个相同物料,只能允许一种物料启用
|
||||
*/
|
||||
|
||||
private String isEnb;
|
||||
/**
|
||||
* 科目分配详情;科目分配类别为K或P时使用(JSON)
|
||||
*/
|
||||
|
||||
private String actsCtgrDtl;
|
||||
/**
|
||||
* 委托加工详情;委托加工订单使用(JSON)
|
||||
*/
|
||||
|
||||
private String enttDtl;
|
||||
/**
|
||||
* 金属元素缩写
|
||||
*/
|
||||
|
||||
private String elemAbbr;
|
||||
/**
|
||||
* 金属元素名称
|
||||
*/
|
||||
|
||||
private String elemName;
|
||||
/**
|
||||
* 金属元素编码
|
||||
*/
|
||||
|
||||
private String elemCdg;
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo;
|
||||
|
||||
import com.zt.plat.module.contractorder.api.dto.PrchOrdDtlDTO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PurchaseOrderDetailsRespVO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* ERP订单号
|
||||
*/
|
||||
private String orderSAPNumber;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
private String systemOrderNumber;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
private String cpName;
|
||||
/**
|
||||
* 公司编码;推送ERP(必须)
|
||||
*/
|
||||
private String companyNumber;
|
||||
/**
|
||||
* 客商编码;推送ERP(必须)
|
||||
*/
|
||||
private String supplierNumber;
|
||||
/**
|
||||
* 客商名称
|
||||
*/
|
||||
private String supplierName;
|
||||
/**
|
||||
* 订单类型(字典:PRCH_ORD_TP);推送ERP(必须)
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 凭证日期;推送ERP(必须)
|
||||
*/
|
||||
private LocalDateTime voucherDate;
|
||||
/**
|
||||
* 采购组织编码;推送ERP(必须)
|
||||
*/
|
||||
private String purchaseOrganizationCustomsDeclaration;
|
||||
/**
|
||||
* 收货工厂名称
|
||||
*/
|
||||
private String receiveFactoryName;
|
||||
/**
|
||||
* 收货工厂编码;推送ERP(必须)
|
||||
*/
|
||||
private String receiveFactoryNumber;
|
||||
/**
|
||||
* 收货库位名称
|
||||
*/
|
||||
private String receiveWarehouseName;
|
||||
/**
|
||||
* 收货库位编码;推送ERP
|
||||
*/
|
||||
private String receiveWarehouseNumber;
|
||||
/**
|
||||
* 采购组编码(字典:PRCH_GRP_TP);推送ERP(必须)
|
||||
*/
|
||||
private String purchaseGroup;
|
||||
/**
|
||||
* 货币码(字典:CUR);推送ERP(必须)
|
||||
*/
|
||||
private String currencyNumber;
|
||||
/**
|
||||
* 汇率;推送ERP
|
||||
*/
|
||||
private BigDecimal exchangeRate;
|
||||
/**
|
||||
* 合同纸质合同号;推送ERP(必须)
|
||||
*/
|
||||
private String paperContractNumber;
|
||||
/**
|
||||
* 小协议号;推送ERP
|
||||
*/
|
||||
private String agreementNumber;
|
||||
/**
|
||||
* 备注;推送ERP
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 代理方编码;推送ERP
|
||||
*/
|
||||
private String agentNumber;
|
||||
/**
|
||||
* 代理方名称
|
||||
*/
|
||||
private String agentName;
|
||||
/**
|
||||
* 订单编码
|
||||
*/
|
||||
private String orderNumber;
|
||||
/**
|
||||
* 系统合同编号
|
||||
*/
|
||||
private String contractNumber;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
private String materialNumber;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
private String materialName;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
private String contractName;
|
||||
/**
|
||||
* 小户头号
|
||||
*/
|
||||
private String tenantNumber;
|
||||
/**
|
||||
* ERP公司编号
|
||||
*/
|
||||
private String erpPurchaseCompanyNumber;
|
||||
/**
|
||||
* ERP公司名称
|
||||
*/
|
||||
private String erpPurchaseCompanyName;
|
||||
/**
|
||||
* ERP客商公司编码
|
||||
*/
|
||||
private String erpSalesCompanyNumber;
|
||||
/**
|
||||
* ERP客商公司名称
|
||||
*/
|
||||
private String erpSalesCompanyName;
|
||||
/**
|
||||
* 采购组织名称
|
||||
*/
|
||||
private String purchaseOrganizationName;
|
||||
/**
|
||||
* ERP状态(字典: ERP_REQ_STS)
|
||||
*/
|
||||
private String erpStatus;
|
||||
/**
|
||||
* 请求ERP失败原因
|
||||
*/
|
||||
private String cause;
|
||||
/**
|
||||
* 订单状态(字典:PRCH_ORD_STS)
|
||||
*/
|
||||
|
||||
private String status;
|
||||
/**
|
||||
* 采购组名称
|
||||
*/
|
||||
private String purchaseGroupName;
|
||||
|
||||
/**
|
||||
* 流程实例编号
|
||||
*/
|
||||
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 流程当前任务节点id
|
||||
*/
|
||||
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
|
||||
private String reviewOpinion;
|
||||
|
||||
/**
|
||||
* 是否需要审批
|
||||
*/
|
||||
private int isPush;
|
||||
|
||||
/**
|
||||
* 物料类型
|
||||
*/
|
||||
private String mtrlTp;
|
||||
|
||||
/**
|
||||
* 采购订单行项目
|
||||
*/
|
||||
private List<PrchOrdDtlDetailsRespVO> orderDetails;
|
||||
|
||||
}
|
||||
@@ -124,4 +124,7 @@ public class PurchaseOrderPageReqVO extends PageParam {
|
||||
@Schema(description = "采购组名称", example = "张三")
|
||||
private String purchaseGroupName;
|
||||
|
||||
@Schema(description = "物料类型(字典:MTRL_TP)", example = "2")
|
||||
private String mtrlTp;
|
||||
|
||||
}
|
||||
|
||||
@@ -164,5 +164,7 @@ public class PurchaseOrderRespVO {
|
||||
@Schema(description = "订单明细")
|
||||
@ExcelProperty("订单明细")
|
||||
private List<PrchOrdDtlRespVO> prchOrdDtlRespVOS;
|
||||
|
||||
@Schema(description = "物料类型(字典:MTRL_TP)", example = "2")
|
||||
@ExcelProperty("物料类型(字典:MTRL_TP)")
|
||||
private String mtrlTp;
|
||||
}
|
||||
|
||||
@@ -167,4 +167,7 @@ public class PurchaseOrderSaveReqVO {
|
||||
@Schema(description = "是否提交审核,value为0或1")
|
||||
@ExcelProperty("是否提交审核")
|
||||
private int isPush;
|
||||
@Schema(description = "物料类别(字典:MTRL_TP)", example = "1")
|
||||
@ExcelProperty("物料类别")
|
||||
private String mtrlTp;
|
||||
}
|
||||
|
||||
@@ -271,4 +271,11 @@ public class PrchOrdDtlDO extends BusinessBaseDO {
|
||||
@TableField("ELEM_CDG")
|
||||
private String elemCdg;
|
||||
|
||||
/**
|
||||
* 物料字典
|
||||
*
|
||||
*/
|
||||
@TableField("MTRL_TP")
|
||||
private String mtrlTp;
|
||||
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ public interface PurchaseOrderMapper extends BaseMapperX<PurchaseOrderDO> {
|
||||
.likeIfPresent(PurchaseOrderDO::getPurchaseGroupName, reqVO.getPurchaseGroupName())
|
||||
.orderByDesc(PurchaseOrderDO::getId));
|
||||
}
|
||||
|
||||
List<PurchaseOrderWithDetailsVO> selectOrderById(@Param("ids") List<Long> id);
|
||||
List<PurchaseOrderWithDetailsVO> selectOrderByOrderNos(@Param("orderNos") List<String> orderNos);
|
||||
List<PurchaseOrderWithDetailsVO> selectOrderByIds(@Param("ids") List<Long> id);
|
||||
PurchaseOrderDO selectByOrderId(@Param("orderId") Long orderId);
|
||||
}
|
||||
|
||||
@@ -2,9 +2,7 @@ package com.zt.plat.module.contractorder.service.purchaseorder;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderPageReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderRespVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderSaveReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.*;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import jakarta.validation.*;
|
||||
|
||||
@@ -65,7 +63,9 @@ public interface PurchaseOrderService {
|
||||
|
||||
String submitOrder(Long id);
|
||||
|
||||
String submitErp(List<Long> ids);
|
||||
String submitErp061(List<Long> ids);
|
||||
|
||||
boolean submitErp062(Long id);
|
||||
|
||||
/**
|
||||
* 通过订单id更新订单状态
|
||||
@@ -74,4 +74,11 @@ public interface PurchaseOrderService {
|
||||
* @return boolean
|
||||
*/
|
||||
boolean updateOrderStatus(Long orderId, String status);
|
||||
/**
|
||||
* 通过订单编号查询订单信息
|
||||
*
|
||||
* @param orderNo 订单编号
|
||||
* @return 订单信息
|
||||
*/
|
||||
List<PurchaseOrderDetailsRespVO> getOrderByOrderNo(List<String> orderNo);
|
||||
}
|
||||
|
||||
@@ -200,9 +200,9 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String submitErp(List<Long> ids) {
|
||||
public String submitErp061(List<Long> ids) {
|
||||
//通过订单号查询订单
|
||||
List<PurchaseOrderWithDetailsVO> purchaseOrderWithDetailsVOS = purchaseOrderMapper.selectOrderById(ids);
|
||||
List<PurchaseOrderWithDetailsVO> purchaseOrderWithDetailsVOS = purchaseOrderMapper.selectOrderByIds(ids);
|
||||
if (!purchaseOrderWithDetailsVOS.isEmpty()) {
|
||||
purchaseOrderWithDetailsVOS.forEach(purchaseOrderWithDetailsVO -> {
|
||||
ErpOrderSaveReqVO erpOrderSaveReqVO = new ErpOrderSaveReqVO();
|
||||
@@ -239,6 +239,17 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean submitErp062(Long id) {
|
||||
PurchaseOrderDO purchaseOrderDO = purchaseOrderMapper.selectByOrderId(id);
|
||||
if (purchaseOrderDO== null){
|
||||
throw exception(PURCHASE_ORDER_NOT_EXISTS);
|
||||
}
|
||||
if (purchaseOrderDO.getOrderSAPNumber().isEmpty()){ return true;}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateOrderStatus(Long orderId, String status) {
|
||||
// 校验存在
|
||||
@@ -250,5 +261,17 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService {
|
||||
return purchaseOrderMapper.updateById(new PurchaseOrderDO().setId(orderId).setStatus(status))>0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PurchaseOrderDetailsRespVO> getOrderByOrderNo(List<String> orderNos) {
|
||||
List<PurchaseOrderWithDetailsVO> purchaseOrderWithDetailsVOS = purchaseOrderMapper.selectOrderByOrderNos(orderNos);
|
||||
List<PurchaseOrderDetailsRespVO> purchaseOrderDetailsRespVOS = new ArrayList<>();
|
||||
purchaseOrderWithDetailsVOS.forEach(purchaseOrderWithDetailsVO -> {
|
||||
PurchaseOrderDetailsRespVO purchaseOrderDetailsRespVO = BeanUtils.toBean(purchaseOrderWithDetailsVO.getPurchaseOrder(), PurchaseOrderDetailsRespVO.class);
|
||||
purchaseOrderDetailsRespVO.setOrderDetails(BeanUtils.toBean(purchaseOrderWithDetailsVO.getOrderDetails(), PrchOrdDtlDetailsRespVO.class));
|
||||
purchaseOrderDetailsRespVOS.add(purchaseOrderDetailsRespVO);
|
||||
});
|
||||
return purchaseOrderDetailsRespVOS;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
<select id="selectOrderById" resultMap="PurchaseOrderWithDetailsResultMap">
|
||||
<select id="selectOrderByIds" resultMap="PurchaseOrderWithDetailsResultMap">
|
||||
SELECT
|
||||
po.ID as po_id,
|
||||
po.ORD_SAP_NUM,
|
||||
@@ -47,11 +47,17 @@
|
||||
po.ERP_STS,
|
||||
po.CAUS,
|
||||
po.STS,
|
||||
po.MTRL_TP,
|
||||
po.PRCH_GRP_NAME,
|
||||
po.PRCS_INSC_ID,
|
||||
po.RVW_ONN,
|
||||
po.TSK_NDE_ID,
|
||||
po.IS_PUSH,
|
||||
po.CREATE_TIME,
|
||||
po.UPDATE_TIME,
|
||||
po.CREATOR,
|
||||
po.UPDATER,
|
||||
po.DELETED,
|
||||
pod.ID as pod_id,
|
||||
pod.ORD_ID,
|
||||
pod.LINE_NUM,
|
||||
@@ -109,6 +115,118 @@
|
||||
ORDER BY po.SYS_ORD_NUM, pod.LINE_NUM
|
||||
</select>
|
||||
|
||||
<select id="selectOrderByOrderNos" resultMap="PurchaseOrderWithDetailsResultMap">
|
||||
SELECT
|
||||
po.ID as po_id,
|
||||
po.ORD_SAP_NUM,
|
||||
po.SYS_ORD_NUM,
|
||||
po.CPN_NAME,
|
||||
po.CPN_NUM,
|
||||
po.SPLR_NUM,
|
||||
po.SPLR_NAME,
|
||||
po.TP,
|
||||
po.MTRL_TP,
|
||||
po.VCHR_DT,
|
||||
po.PRCH_ORGZ_CD,
|
||||
po.RCV_FACT_NAME,
|
||||
po.RCV_FACT_NUM,
|
||||
po.RCV_WRH_NAME,
|
||||
po.RCV_WRH_NUM,
|
||||
po.PRCH_GRP,
|
||||
po.CUR_NUM,
|
||||
po.EXCH_RTE,
|
||||
po.PPR_CTRT_NUM,
|
||||
po.AGR_NUM,
|
||||
po.RMK,
|
||||
po.AGT_NUM,
|
||||
po.AGT_NAME,
|
||||
po.ORD_NUM,
|
||||
po.CTRT_NUM,
|
||||
po.MTRL_NUM,
|
||||
po.MTRL_NAME,
|
||||
po.CTRT_NAME,
|
||||
po.TNT_NUM,
|
||||
po.ERP_PRCH_CPN_NUM,
|
||||
po.ERP_PRCH_CPN_NAME,
|
||||
po.ERP_SALE_CPN_NUM,
|
||||
po.ERP_SALE_CPN_NAME,
|
||||
po.PRCH_ORGZ_NAME,
|
||||
po.ERP_STS,
|
||||
po.CAUS,
|
||||
po.STS,
|
||||
po.PRCH_GRP_NAME,
|
||||
po.PRCS_INSC_ID,
|
||||
po.RVW_ONN,
|
||||
po.TSK_NDE_ID,
|
||||
po.IS_PUSH,
|
||||
po.CREATE_TIME,
|
||||
po.UPDATE_TIME,
|
||||
po.CREATOR,
|
||||
po.UPDATER,
|
||||
po.DELETED,
|
||||
pod.ID as pod_id,
|
||||
pod.ORD_ID,
|
||||
pod.LINE_NUM,
|
||||
pod.MTRL_NUM,
|
||||
pod.MTRL_NAME,
|
||||
pod.RCV_FACT_NAME,
|
||||
pod.RCV_FACT_NUM,
|
||||
pod.RCV_WRH_NAME,
|
||||
pod.RCV_WRH_NUM,
|
||||
pod.QTY,
|
||||
pod.UNT,
|
||||
pod.IN_TAX_UPRC,
|
||||
pod.PRC_UNT,
|
||||
pod.TAX_NUM,
|
||||
pod.IS_GR_INV,
|
||||
pod.IS_UNL_RCV,
|
||||
pod.BAT,
|
||||
pod.PRJ_CTGR,
|
||||
pod.ACTS_CTGR,
|
||||
pod.MTRL_CPNT_NUM,
|
||||
pod.MTRL_CPNT_DSP,
|
||||
pod.SHRT_TXT,
|
||||
pod.IS_RLBK_CGO,
|
||||
pod.IS_FREE_RCV,
|
||||
pod.OUT_LINE_NUM,
|
||||
pod.RMK_UNT,
|
||||
pod.RMK_MTRL,
|
||||
pod.BGN_DT,
|
||||
pod.DDL_DT,
|
||||
pod.LST_QTY,
|
||||
pod.TRF_QTY,
|
||||
pod.AGR_NUM as pod_agr_num,
|
||||
pod.TRF_FACT_NAME,
|
||||
pod.TRF_FACT_NUM,
|
||||
pod.TRF_WRH_NAME,
|
||||
pod.TRF_WRH_NUM,
|
||||
pod.RMK as pod_rmk,
|
||||
pod.ORIG_WET,
|
||||
pod.SALE_MTRL_NUM,
|
||||
pod.IN_ORD,
|
||||
pod.PRCH_CTGR,
|
||||
pod.IS_ENB,
|
||||
pod.ACTS_CTGR_DTL,
|
||||
pod.ENTT_DTL,
|
||||
pod.ELEM_ABBR,
|
||||
pod.ELEM_NAME,
|
||||
pod.ELEM_CDG
|
||||
FROM BSE_PRCH_ORD po
|
||||
LEFT JOIN BSE_PRCH_ORD_DTL pod ON po.ID = pod.ORD_ID
|
||||
WHERE po.ORD_SAP_NUM IN
|
||||
<foreach collection="orderNos" item="orderNumber" open="(" separator="," close=")">
|
||||
#{orderNumber}
|
||||
</foreach>
|
||||
AND po.deleted=0
|
||||
ORDER BY po.SYS_ORD_NUM, pod.LINE_NUM
|
||||
</select>
|
||||
|
||||
<select id="selectByOrderId"
|
||||
resultType="com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PurchaseOrderDO">
|
||||
select * from bse_prch_ord;
|
||||
</select>
|
||||
|
||||
|
||||
<resultMap id="PurchaseOrderWithDetailsResultMap" type="com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderWithDetailsVO">
|
||||
<result column="SYS_ORD_NUM" property="systemOrderNumber"/>
|
||||
<association property="purchaseOrder" resultMap="PurchaseOrderResultMap"/>
|
||||
|
||||
@@ -0,0 +1,223 @@
|
||||
package com.zt.plat.module.erp.controller.admin.erp.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* ERP采购订单保存请求VO
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "ERP采购订单保存请求VO")
|
||||
public class ErpOrderUpdateReqVO {
|
||||
|
||||
|
||||
// ====================== 1. 主结构字段 ======================
|
||||
@Schema(description = "采购订单号(EBELN)", requiredMode = Schema.RequiredMode.REQUIRED, example = "4500000001")
|
||||
@NotEmpty(message = "采购订单号不能为空")
|
||||
@ExcelProperty("采购订单号")
|
||||
private String poNumber;
|
||||
|
||||
@Schema(description = "删除标识(ELOEK)", example = " ")
|
||||
@ExcelProperty("删除标识")
|
||||
private String deleteInd;
|
||||
|
||||
@Schema(description = "货币码(WAERS)", requiredMode = Schema.RequiredMode.REQUIRED, example = "CNY")
|
||||
@NotEmpty(message = "货币码不能为空")
|
||||
@ExcelProperty("货币码")
|
||||
private String currency;
|
||||
|
||||
@Schema(description = "汇率(WKURS),保留5位小数", requiredMode = Schema.RequiredMode.REQUIRED, example = "6.90000")
|
||||
@NotNull(message = "汇率不能为空")
|
||||
@ExcelProperty("汇率")
|
||||
private BigDecimal exchRate;
|
||||
|
||||
// ====================== 2. 抬头扩展字段(结构-exte) ======================
|
||||
@Schema(description = "纸质合同号(zzhth),来源于合同台账接口,已启用财务共享单位必填", example = "HT202405001")
|
||||
@ExcelProperty("纸质合同号")
|
||||
private String zzhth;
|
||||
|
||||
@Schema(description = "小协议号(zxxyh)", example = "XY202405001")
|
||||
@ExcelProperty("小协议号")
|
||||
private String zxxyh;
|
||||
|
||||
@Schema(description = "备注(znote)", example = "月度常规采购")
|
||||
@ExcelProperty("备注")
|
||||
private String znote;
|
||||
|
||||
@Schema(description = "代理方(zlifnr),使用客商编码", example = "D0010001")
|
||||
@ExcelProperty("代理方编码")
|
||||
private String zlifnr;
|
||||
|
||||
// ====================== 3. 行项目字段(列表-item) ======================
|
||||
@Schema(description = "行号(EBELP)", requiredMode = Schema.RequiredMode.REQUIRED, example = "00010")
|
||||
@NotEmpty(message = "行号不能为空")
|
||||
@ExcelProperty("行号")
|
||||
private String poItem;
|
||||
|
||||
@Schema(description = "物料号(MATNR)", example = "M0010001")
|
||||
@ExcelProperty("物料号")
|
||||
private String material;
|
||||
|
||||
@Schema(description = "工厂(WERKS)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001")
|
||||
@NotEmpty(message = "工厂不能为空")
|
||||
@ExcelProperty("工厂")
|
||||
private String plant;
|
||||
|
||||
@Schema(description = "库存地点(LGORT)", example = "0001")
|
||||
@ExcelProperty("库存地点")
|
||||
private String stgeLoc;
|
||||
|
||||
@Schema(description = "数量(MENGE),保留3位小数", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.000")
|
||||
@NotNull(message = "数量不能为空")
|
||||
@ExcelProperty("数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Schema(description = "计量单位(MEINS),必须与该物料基本计量单位一致", requiredMode = Schema.RequiredMode.REQUIRED, example = "PC")
|
||||
@NotEmpty(message = "计量单位不能为空")
|
||||
@ExcelProperty("计量单位")
|
||||
private String poUnit;
|
||||
|
||||
@Schema(description = "含税单价(NETPR),保留2位小数", requiredMode = Schema.RequiredMode.REQUIRED, example = "199.99")
|
||||
@NotNull(message = "含税单价不能为空")
|
||||
@ExcelProperty("含税单价")
|
||||
private BigDecimal netPrice;
|
||||
|
||||
@Schema(description = "价格单位(PEINH),固定值1", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "价格单位不能为空")
|
||||
@ExcelProperty("价格单位")
|
||||
private Integer priceUnit;
|
||||
|
||||
@Schema(description = "税码(MWSKZ)", example = "J1")
|
||||
@ExcelProperty("税码")
|
||||
private String taxCode;
|
||||
|
||||
@Schema(description = "基于GR的发票校验(WEBRE)", example = "Y")
|
||||
@ExcelProperty("基于GR发票校验")
|
||||
private String grBasediv;
|
||||
|
||||
@Schema(description = "允许无限制过量交货(UEBTK)", example = "N")
|
||||
@ExcelProperty("允许过量交货")
|
||||
private String unlimitedDlv;
|
||||
|
||||
@Schema(description = "批次(CHARG)", example = "B202405001")
|
||||
@ExcelProperty("批次")
|
||||
private String batch;
|
||||
|
||||
@Schema(description = "项目类别(PSTYP),委托加工订单时填入L", example = "L")
|
||||
@ExcelProperty("项目类别")
|
||||
private String itemCat;
|
||||
|
||||
@Schema(description = "科目分配类别(KNTTP),固定资产采购:A;服务采购:S-销售服务费/K-成本中心/F-订单", example = "K")
|
||||
@ExcelProperty("科目分配类别")
|
||||
private String acctasscat;
|
||||
|
||||
@Schema(description = "物料组(MATKL),服务采购订单必填", example = "01")
|
||||
@ExcelProperty("物料组")
|
||||
private String matlGroup;
|
||||
|
||||
@Schema(description = "短文本(TXZ01),服务采购订单必填", example = "设备维修服务")
|
||||
@ExcelProperty("短文本")
|
||||
private String shortText;
|
||||
|
||||
@Schema(description = "退货项目标识(RETPO),退货行项目填X", example = "X")
|
||||
@ExcelProperty("退货标识")
|
||||
private String retItem;
|
||||
|
||||
@Schema(description = "免费项目标识(UMSON),免费行项目填X", example = "X")
|
||||
@ExcelProperty("免费标识")
|
||||
private String freeItem;
|
||||
|
||||
@Schema(description = "外部行项目号(LICHN),绿星链通必填", example = "EXT0010")
|
||||
@ExcelProperty("外部行号")
|
||||
private String vendrbatch;
|
||||
|
||||
@Schema(description = "备注信息-需求单位(TDLINE)", example = "生产一部")
|
||||
@ExcelProperty("需求单位备注")
|
||||
private String noteXq;
|
||||
|
||||
@Schema(description = "备注信息-物料详细(TDLINE)", example = "304不锈钢,厚度2mm")
|
||||
@ExcelProperty("物料详细备注")
|
||||
private String noteWl;
|
||||
|
||||
@Schema(description = "行项目删除标识(ELOEK)", example = "N")
|
||||
@ExcelProperty("行项目删除标识")
|
||||
private String itemDeleteInd;
|
||||
|
||||
// ====================== 4. 行项目扩展字段(列表-itex) ======================
|
||||
@Schema(description = "销售物料号(zmatnr),科目分配类别为S时必填", example = "S0010001")
|
||||
@ExcelProperty("销售物料号")
|
||||
private String zmatnr;
|
||||
|
||||
@Schema(description = "统计型内部订单(zaufnr)", example = "OR0010001")
|
||||
@ExcelProperty("统计内部订单")
|
||||
private String zaufnr;
|
||||
|
||||
@Schema(description = "采购类别(zpurty),0-生产性物资类;1-项目投资类", example = "0")
|
||||
@ExcelProperty("采购类别")
|
||||
private String zpurty;
|
||||
|
||||
@Schema(description = "原料湿重(zmenge)", example = "105.500")
|
||||
@ExcelProperty("原料湿重")
|
||||
private BigDecimal zmenge;
|
||||
|
||||
// ====================== 5. 科目分配字段(列表-acct,类别为K或P时使用) ======================
|
||||
@Schema(description = "科目分配的序号(DZEKKN),从1开始编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "科目分配序号不能为空")
|
||||
@ExcelProperty("科目分配序号")
|
||||
private Integer serialNo;
|
||||
|
||||
@Schema(description = "总账科目编号(SAKNR)", example = "1001010000")
|
||||
@ExcelProperty("总账科目")
|
||||
private String glAccount;
|
||||
|
||||
@Schema(description = "成本中心(KOSTL),科目分配类别为K或F时必填", example = "C0010001")
|
||||
@ExcelProperty("成本中心")
|
||||
private String costcenter;
|
||||
|
||||
@Schema(description = "订单号(AUFNR),科目分配类别为F时必填", example = "OR0010001")
|
||||
@ExcelProperty("订单号")
|
||||
private String orderid;
|
||||
|
||||
@Schema(description = "主资产号(ANLN1),科目分配类别为A时必填", example = "AS0010001")
|
||||
@ExcelProperty("主资产号")
|
||||
private String assetNo;
|
||||
|
||||
@Schema(description = "资产子编号(ANLN2),科目分配类别为A时必填,固定值‘0’", example = "0")
|
||||
@ExcelProperty("资产子编号")
|
||||
private String subNumber;
|
||||
|
||||
// ====================== 6. 委托加工物料字段(列表-comp,委托加工订单时使用) ======================
|
||||
@Schema(description = "计划行号(ETENR),从1开始编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "计划行号不能为空")
|
||||
@ExcelProperty("计划行号")
|
||||
private Integer schedLine;
|
||||
|
||||
@Schema(description = "项目编号(RSPOS),从1开始编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "项目编号不能为空")
|
||||
@ExcelProperty("项目编号")
|
||||
private Integer itemNo;
|
||||
|
||||
@Schema(description = "加工前物料号(MATNR)", requiredMode = Schema.RequiredMode.REQUIRED, example = "M0020001")
|
||||
@NotEmpty(message = "加工前物料号不能为空")
|
||||
@ExcelProperty("加工前物料号")
|
||||
private String compMaterial;
|
||||
|
||||
@Schema(description = "委托加工发货工厂(PLANT)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001")
|
||||
@NotEmpty(message = "委托加工发货工厂不能为空")
|
||||
@ExcelProperty("委托发货工厂")
|
||||
private String compPlant;
|
||||
|
||||
@Schema(description = "委托加工需求数量(MENGE),保留3位小数", requiredMode = Schema.RequiredMode.REQUIRED, example = "95.000")
|
||||
@NotNull(message = "委托加工需求数量不能为空")
|
||||
@ExcelProperty("委托需求数量")
|
||||
private BigDecimal entryQuantity;
|
||||
|
||||
@Schema(description = "组件计量单位(MEINS),为空使用基本计量单位", example = "PC")
|
||||
@ExcelProperty("组件计量单位")
|
||||
private String entryUom;
|
||||
}
|
||||
Reference in New Issue
Block a user