Merge branch 'refs/heads/dev' into test
This commit is contained in:
@@ -2,10 +2,13 @@ package com.zt.plat.module.contractorder.api;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.OrderDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.UpdateOrderLstQtyDTO;
|
||||
import com.zt.plat.module.contractorder.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@@ -22,4 +25,8 @@ public interface OrderApi {
|
||||
@PostMapping(PREFIX + "/order-by-order-nos")
|
||||
@Operation(summary = "通过订单号批量获取订单信息", description = "通过订单编号获取订单信息")
|
||||
CommonResult<List<OrderDTO>> getOrderByOrderNos(@RequestBody List<String> orderNoS);
|
||||
|
||||
@PostMapping(PREFIX + "/update-lst-qty-by-order-id")
|
||||
@Operation(summary = "根据订单明细id更新累积量", description = "根据订单明细id更新收货量")
|
||||
CommonResult<Boolean> UpdateOrderLstQty(@RequestBody @Validated List<UpdateOrderLstQtyDTO> updateOrderLstQtyDTOS);
|
||||
}
|
||||
|
||||
@@ -1,259 +1,310 @@
|
||||
package com.zt.plat.module.contractorder.api.dto.order;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Schema(description = "订单明细")
|
||||
public class OrdDtlDTO {
|
||||
|
||||
// ========================== 公共属性(两个类均存在,统一保留)==========================
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单主键(PrchOrdDtlDTO.ordId / SalesOrdDtlDTO.orderId 统一命名) Y
|
||||
*/
|
||||
@Schema(description = "订单主键")
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 行项目;推送ERP(必须)(PrchOrdDtlDTO.lineNum / SalesOrdDtlDTO.lineNumber 统一命名)Y
|
||||
*/
|
||||
@Schema(description = "行项目")
|
||||
private Long lineNum;
|
||||
|
||||
/**
|
||||
* 物料名称(PrchOrdDtlDTO.mtrlName / SalesOrdDtlDTO.materialName 统一命名)Y
|
||||
*/
|
||||
@Schema(description = "物料名称")
|
||||
private String mtrlName;
|
||||
|
||||
/**
|
||||
* 物料编码;推送ERP(必须)(PrchOrdDtlDTO.mtrlNum / SalesOrdDtlDTO.materialNumber 统一命名)Y
|
||||
*/
|
||||
@Schema(description = "物料编码")
|
||||
private String mtrlNum;
|
||||
|
||||
/**
|
||||
* 工厂名称(PrchOrdDtlDTO.rcvFactName / SalesOrdDtlDTO.factoryName 统一命名) Y
|
||||
*/
|
||||
@Schema(description = "工厂名称")
|
||||
private String factoryName;
|
||||
|
||||
/**
|
||||
* 工厂编码;推送ERP(必须)(PrchOrdDtlDTO.rcvFactNum / SalesOrdDtlDTO.factoryNumber 统一命名)Y
|
||||
*/
|
||||
@Schema(description = "工厂编码")
|
||||
private String factoryNum;
|
||||
|
||||
/**
|
||||
* 库位名称(PrchOrdDtlDTO.rcvWrhName / SalesOrdDtlDTO.warehouseName 统一命名)Y
|
||||
*/
|
||||
@Schema(description = "库位名称")
|
||||
private String warehouseName;
|
||||
|
||||
/**
|
||||
* 库位编码;推送ERP(PrchOrdDtlDTO.rcvWrhNum / SalesOrdDtlDTO.warehouseNumber 统一命名)Y
|
||||
*/
|
||||
@Schema(description = "库位编码")
|
||||
private String warehouseNum;
|
||||
|
||||
/**
|
||||
* 计量单位;推送ERP(必须)(PrchOrdDtlDTO.unt / SalesOrdDtlDTO.unit 统一命名)Y
|
||||
*/
|
||||
@Schema(description = "计量单位")
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 暂估数量;推送ERP(必须)(PrchOrdDtlDTO.qty / SalesOrdDtlDTO.quantity 统一命名,类型统一为BigDecimal)Y
|
||||
*/
|
||||
@Schema(description = "暂估数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
/**
|
||||
* 项目类别;推送ERP(PrchOrdDtlDTO.prjCtgr / SalesOrdDtlDTO.projectCategory 统一命名)
|
||||
*/
|
||||
@Schema(description = "项目类别")
|
||||
private String projectCategory;
|
||||
|
||||
/**
|
||||
* 小协议号(PrchOrdDtlDTO.agrNum / SalesOrdDtlDTO.agreementNumber 统一命名)Y
|
||||
*/
|
||||
@Schema(description = "小协议号")
|
||||
private String agreementNumber;
|
||||
|
||||
/**
|
||||
* 金属元素缩写(PrchOrdDtlDTO.elemAbbr / SalesOrdDtlDTO.elementAbbreviation 统一命名)Y
|
||||
*/
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
|
||||
/**
|
||||
* 金属元素名称(PrchOrdDtlDTO.elemName / SalesOrdDtlDTO.elementName 统一命名)Y
|
||||
*/
|
||||
@Schema(description = "金属元素名称")
|
||||
private String elementName;
|
||||
|
||||
/**
|
||||
* 金属元素编码(PrchOrdDtlDTO.elemCdg / SalesOrdDtlDTO.elementNumber 统一命名)Y
|
||||
*/
|
||||
@Schema(description = "金属元素编码")
|
||||
private String elementCode;
|
||||
|
||||
/**
|
||||
* 是否启用(字典:ERP_CTRT_YN);处理明细中多个相同物料,只能允许一种物料启用(PrchOrdDtlDTO.isEnb / SalesOrdDtlDTO.isEnable 统一命名)Y
|
||||
*/
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
|
||||
/**
|
||||
* 税码(字典: PRCH_TAX);推送ERP Y
|
||||
*/
|
||||
@Schema(description = "税码")
|
||||
private String taxNum;
|
||||
|
||||
/**
|
||||
* 税率 Y
|
||||
*/
|
||||
@Schema(description = "税率")
|
||||
private BigDecimal taxRte;
|
||||
|
||||
// ========================== 采购订单特有属性(PrchOrdDtlDTO 独有)==========================
|
||||
/**
|
||||
* 含税单价;推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "含税单价")
|
||||
private BigDecimal inTaxUprc;
|
||||
|
||||
/**
|
||||
* 价格单位;推送ERP
|
||||
*/
|
||||
@Schema(description = "价格单位")
|
||||
private BigDecimal prcUnt;
|
||||
|
||||
/**
|
||||
* 是否基于GR的发票校验;推送ERP
|
||||
*/
|
||||
@Schema(description = "是否基于GR的发票校验")
|
||||
private String isGrInv;
|
||||
|
||||
/**
|
||||
* 是否允许无限制收货;推送ERP
|
||||
*/
|
||||
@Schema(description = "是否允许无限制收货")
|
||||
private String isUnlRcv;
|
||||
|
||||
/**
|
||||
* 批次;推送ERP
|
||||
*/
|
||||
@Schema(description = "批次")
|
||||
private String bat;
|
||||
|
||||
/**
|
||||
* 科目分配类别(字典: PRCH_ACTS_CTGR);推送ERP:联动订单类型,固定资产订单A,服务订单S-销售服务费K-成本中心F-订单
|
||||
*/
|
||||
@Schema(description = "科目分配类别")
|
||||
private String actsCtgr;
|
||||
|
||||
/**
|
||||
* 物料组编码(字典: PRCH_MATERIAL_GROUP);推送ERP:联动订单类型,服务订单必传 Y
|
||||
*/
|
||||
@Schema(description = "物料组编码")
|
||||
private String mtrlCpntNum;
|
||||
|
||||
/**
|
||||
* 物料组描述;推送ERP:联动订单类型,服务订单必传 Y
|
||||
*/
|
||||
@Schema(description = "物料组描述")
|
||||
private String mtrlCpntDsp;
|
||||
|
||||
/**
|
||||
* 短文本 Y
|
||||
*/
|
||||
@Schema(description = "短文本")
|
||||
private String shrtTxt;
|
||||
|
||||
/**
|
||||
* 退货标识X标识退货;推送ERP
|
||||
*/
|
||||
@Schema(description = "退货标识")
|
||||
private String isRlbkCgo;
|
||||
|
||||
/**
|
||||
* 是否免费收货标识X;推送ERP
|
||||
*/
|
||||
@Schema(description = "是否免费收货标识")
|
||||
private String isFreeRcv;
|
||||
|
||||
/**
|
||||
* 外部行项目号;推送ERP
|
||||
*/
|
||||
@Schema(description = "外部行项目号")
|
||||
private Long outLineNum;
|
||||
|
||||
/**
|
||||
* 备注信息-需求单位;推送ERP
|
||||
*/
|
||||
@Schema(description = "备注信息-需求单位")
|
||||
private String rmkUnt;
|
||||
|
||||
/**
|
||||
* 备注信息-物料详细;推送ERP
|
||||
*/
|
||||
@Schema(description = "备注信息-物料详细")
|
||||
private String rmkMtrl;
|
||||
|
||||
/**
|
||||
* 交货起始日期;推送ERP Y
|
||||
*/
|
||||
@Schema(description = "交货起始日期")
|
||||
private LocalDateTime bgnDt;
|
||||
|
||||
/**
|
||||
* 交货截止日期;推送ERP Y
|
||||
*/
|
||||
@Schema(description = "交货截止日期")
|
||||
private LocalDateTime ddlDt;
|
||||
|
||||
/**
|
||||
* 已收货量
|
||||
*/
|
||||
@Schema(description = "已收货量")
|
||||
private BigDecimal lstQty;
|
||||
|
||||
/**
|
||||
* 已移库量库;存针对该订单产生的移库量
|
||||
*/
|
||||
@Schema(description = "已移库量")
|
||||
private BigDecimal trfQty;
|
||||
|
||||
/**
|
||||
* 移库工厂名称 Y
|
||||
*/
|
||||
@Schema(description = "移库工厂名称")
|
||||
private String trfFactName;
|
||||
|
||||
/**
|
||||
* 移库工厂编码 Y
|
||||
*/
|
||||
@Schema(description = "移库工厂编码")
|
||||
private String trfFactNum;
|
||||
|
||||
/**
|
||||
* 移库库位名称 Y
|
||||
*/
|
||||
@Schema(description = "移库库位名称")
|
||||
private String trfWrhName;
|
||||
|
||||
/**
|
||||
* 移库库位编码 Y
|
||||
*/
|
||||
@Schema(description = "移库库位编码")
|
||||
private String trfWrhNum;
|
||||
|
||||
/**
|
||||
* 备注 Y
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String rmk;
|
||||
|
||||
/**
|
||||
* 原料湿重;推送ERP
|
||||
*/
|
||||
@Schema(description = "原料湿重")
|
||||
private BigDecimal origWet;
|
||||
|
||||
/**
|
||||
* 销售物料号;推送ERP:科目分配类别为S时必填
|
||||
*/
|
||||
@Schema(description = "销售物料号")
|
||||
private String saleMtrlNum;
|
||||
|
||||
/**
|
||||
* 统计型内部订单;推送ERP
|
||||
*/
|
||||
@Schema(description = "统计型内部订单")
|
||||
private String inOrd;
|
||||
|
||||
/**
|
||||
* 采购类别;推送ERP:0-生产性物资类1-项目投资类
|
||||
*/
|
||||
@Schema(description = "采购类别")
|
||||
private String prchCtgr;
|
||||
|
||||
/**
|
||||
* 科目分配详情;科目分配类别为K或P时使用(JSON)
|
||||
*/
|
||||
@Schema(description = "科目分配详情")
|
||||
private String actsCtgrDtl;
|
||||
|
||||
/**
|
||||
* 委托加工详情;委托加工订单使用(JSON)
|
||||
*/
|
||||
@Schema(description = "委托加工详情")
|
||||
private String enttDtl;
|
||||
|
||||
// ========================== 销售订单特有属性(SalesOrdDtlDTO 独有)==========================
|
||||
/**
|
||||
* 开票类型;推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "开票类型")
|
||||
private String invoiceType;
|
||||
|
||||
// /**
|
||||
@@ -264,26 +315,31 @@ public class OrdDtlDTO {
|
||||
/**
|
||||
* 装运地点;推送ERP
|
||||
*/
|
||||
@Schema(description = "装运地点")
|
||||
private String shippingPlace;
|
||||
|
||||
/**
|
||||
* 物料科目分配组;推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "物料科目分配组")
|
||||
private String metalAcctasscatGroup;
|
||||
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
@Schema(description = "总价")
|
||||
private BigDecimal gross;
|
||||
|
||||
|
||||
/**
|
||||
* 价格条件详情;推送ERP(必须):JSON
|
||||
*/
|
||||
@Schema(description = "价格条件详情")
|
||||
private String priceConditionDetail;
|
||||
|
||||
/**
|
||||
* 来料加工原料详情;推送ERP:订单类型(JSON)
|
||||
*/
|
||||
@Schema(description = "来料加工原料详情")
|
||||
private String originDetail;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.api.dto.order;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -10,286 +8,290 @@ import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Schema(description = "管理后台 - 订单 Response VO")
|
||||
public class OrderDTO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
/**
|
||||
* ERP订单号
|
||||
*/
|
||||
|
||||
@Schema(description = "ERP订单号")
|
||||
private String orderSAPNumber;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
|
||||
@Schema(description = "订单号")
|
||||
private String systemOrderNumber;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
|
||||
@Schema(description = "公司名称")
|
||||
private String cpName;
|
||||
/**
|
||||
* 公司编码;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "公司编码;推送ERP(必须)")
|
||||
private String cpNum;
|
||||
/**
|
||||
* 客商编码;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "客商编码;推送ERP(必须)")
|
||||
private String supplierNumber;
|
||||
/**
|
||||
* 客商名称
|
||||
*/
|
||||
|
||||
@Schema(description = "客商名称")
|
||||
private String supplierName;
|
||||
/**
|
||||
* 订单类型(字典:PRCH_ORD_TP);推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "订单类型(字典:PRCH_ORD_TP);推送ERP(必须)")
|
||||
private String type;
|
||||
/**
|
||||
* 凭证日期;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "凭证日期;推送ERP(必须)")
|
||||
private LocalDateTime voucherDate;
|
||||
/**
|
||||
* 采购组织编码;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "采购组织编码;推送ERP(必须)")
|
||||
private String purchaseOrganizationCustomsDeclaration;
|
||||
/**
|
||||
* 收货工厂名称
|
||||
*/
|
||||
|
||||
@Schema(description = "收货工厂名称")
|
||||
private String receiveFactoryName;
|
||||
/**
|
||||
* 收货工厂编码;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "收货工厂编码;推送ERP(必须)")
|
||||
private String receiveFactoryNumber;
|
||||
/**
|
||||
* 收货库位名称
|
||||
*/
|
||||
|
||||
@Schema(description = "收货库位名称")
|
||||
private String receiveWarehouseName;
|
||||
/**
|
||||
* 收货库位编码;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "收货库位编码;推送ERP")
|
||||
private String receiveWarehouseNumber;
|
||||
/**
|
||||
* 采购组编码(字典:PRCH_GRP_TP);推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "采购组编码(字典:PRCH_GRP_TP);推送ERP(必须)")
|
||||
private String purchaseGroup;
|
||||
/**
|
||||
* 货币码(字典:CUR);推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "货币码(字典:CUR);推送ERP(必须)")
|
||||
private String currencyNumber;
|
||||
/**
|
||||
* 汇率;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "汇率;推送ERP")
|
||||
private BigDecimal exchangeRate;
|
||||
/**
|
||||
* 合同纸质合同号;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "合同纸质合同号;推送ERP(必须)")
|
||||
private String paperContractNumber;
|
||||
/**
|
||||
* 小协议号;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "小协议号;推送ERP")
|
||||
private String agreementNumber;
|
||||
/**
|
||||
* 备注;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "备注;推送ERP")
|
||||
private String remark;
|
||||
/**
|
||||
* 代理方编码;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "代理方编码;推送ERP")
|
||||
private String agentNumber;
|
||||
/**
|
||||
* 代理方名称
|
||||
*/
|
||||
|
||||
@Schema(description = "代理方名称")
|
||||
private String agentName;
|
||||
/**
|
||||
* 系统合同编号
|
||||
*/
|
||||
|
||||
@Schema(description = "系统合同编号")
|
||||
private String contractNumber;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
|
||||
@Schema(description = "合同名称")
|
||||
private String contractName;
|
||||
/**
|
||||
* 小户头号
|
||||
*/
|
||||
|
||||
@Schema(description = "小户头号")
|
||||
private String tenantNumber;
|
||||
/**
|
||||
* ERP公司编号
|
||||
*/
|
||||
|
||||
@Schema(description = "ERP公司编号")
|
||||
private String erpPurchaseCompanyNumber;
|
||||
/**
|
||||
* ERP公司名称
|
||||
*/
|
||||
|
||||
@Schema(description = "ERP公司名称")
|
||||
private String erpPurchaseCompanyName;
|
||||
/**
|
||||
* ERP客商公司编码
|
||||
*/
|
||||
|
||||
@Schema(description = "ERP客商公司编码")
|
||||
private String erpSalesCompanyNumber;
|
||||
/**
|
||||
* ERP客商公司名称
|
||||
*/
|
||||
|
||||
@Schema(description = "ERP客商公司名称")
|
||||
private String erpSalesCompanyName;
|
||||
/**
|
||||
* 采购组织名称
|
||||
*/
|
||||
|
||||
@Schema(description = "采购组织名称")
|
||||
private String purchaseOrganizationName;
|
||||
/**
|
||||
* ERP状态(字典: ERP_REQ_STS)
|
||||
*/
|
||||
|
||||
@Schema(description = "ERP状态(字典: ERP_REQ_STS)")
|
||||
private String erpStatus;
|
||||
/**
|
||||
* 请求ERP失败原因
|
||||
*/
|
||||
|
||||
@Schema(description = "请求ERP失败原因")
|
||||
private String cause;
|
||||
/**
|
||||
* 订单状态(字典:PRCH_ORD_STS)
|
||||
*/
|
||||
|
||||
@Schema(description = "订单状态(字典:PRCH_ORD_STS)")
|
||||
private String status;
|
||||
/**
|
||||
* 采购组名称
|
||||
*/
|
||||
|
||||
@Schema(description = "采购组名称")
|
||||
private String purchaseGroupName;
|
||||
|
||||
/**
|
||||
* 流程实例编号
|
||||
*/
|
||||
|
||||
@Schema(description = "流程实例编号")
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 流程当前任务节点id
|
||||
*/
|
||||
|
||||
@Schema(description = "流程当前任务节点id")
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
|
||||
@Schema(description = "审批意见")
|
||||
private String reviewOpinion;
|
||||
|
||||
/**
|
||||
* 是否需要审批
|
||||
*/
|
||||
|
||||
@Schema(description = "是否需要审批")
|
||||
private int isPush;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
|
||||
@Schema(description = "计量单位")
|
||||
private String unt;
|
||||
|
||||
/**
|
||||
* 物料字典
|
||||
*
|
||||
*/
|
||||
@Schema(description = "物料字典")
|
||||
private String mtrlTp;
|
||||
|
||||
/**
|
||||
* 订单分类
|
||||
*
|
||||
*/
|
||||
|
||||
@Schema(description = "订单分类")
|
||||
private String splyBsnTp;
|
||||
/**
|
||||
* 产品组编码
|
||||
*
|
||||
*/
|
||||
|
||||
@Schema(description = "产品组编码")
|
||||
private String pdtGrpCdg;
|
||||
/**
|
||||
* 产品组名
|
||||
*/
|
||||
|
||||
@Schema(description = "产品组名")
|
||||
private String pdtGrpName;
|
||||
/**
|
||||
* 分销聚道编码
|
||||
*
|
||||
*/
|
||||
|
||||
@Schema(description = "分销聚道编码")
|
||||
private String saleAcsCdg;
|
||||
/**
|
||||
* 分销聚道名称
|
||||
*
|
||||
*/
|
||||
|
||||
@Schema(description = "分销聚道名称")
|
||||
private String saleAcsName;
|
||||
/**
|
||||
* 销售组织编码
|
||||
*
|
||||
*/
|
||||
|
||||
@Schema(description = "销售组织编码")
|
||||
private String saleOrgzCd;
|
||||
/**
|
||||
* 销售组织名称
|
||||
*
|
||||
*/
|
||||
|
||||
@Schema(description = "销售组织名称")
|
||||
private String saleOrgzName;
|
||||
/**
|
||||
* 付款方名称
|
||||
*
|
||||
*/
|
||||
|
||||
@Schema(description = "付款方名称")
|
||||
private String payerName;
|
||||
/**
|
||||
* 付款方编码
|
||||
*
|
||||
*/
|
||||
|
||||
@Schema(description = "付款方编码")
|
||||
private String payerNum;
|
||||
/**
|
||||
* 货权准转移类型
|
||||
*/
|
||||
@Schema(description = "货权准转移类型")
|
||||
private String meteringType;
|
||||
|
||||
|
||||
/**
|
||||
* 订单明细
|
||||
*/
|
||||
@Schema(description = "订单明细")
|
||||
private List<OrdDtlDTO> OrdDtlDTOS;
|
||||
}
|
||||
|
||||
@@ -1,246 +1,249 @@
|
||||
package com.zt.plat.module.contractorder.api.dto.order;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@Schema(description = "采购订单明细")
|
||||
public class PrchOrdDtlDTO {
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
/**
|
||||
* 采购订单主键
|
||||
*/
|
||||
|
||||
@Schema(description = "采购订单主键")
|
||||
private Long ordId;
|
||||
/**
|
||||
* 行项目;推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "行项目;推送ERP(必须)")
|
||||
private Long lineNum;
|
||||
/**
|
||||
* 物料编码;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "物料编码;推送ERP")
|
||||
private String mtrlNum;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
|
||||
@Schema(description = "物料名称")
|
||||
private String mtrlName;
|
||||
/**
|
||||
* 收货工厂名称
|
||||
*/
|
||||
|
||||
@Schema(description = "收货工厂名称")
|
||||
private String rcvFactName;
|
||||
/**
|
||||
* 收货工厂编码;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "收货工厂编码;推送ERP(必须)")
|
||||
private String rcvFactNum;
|
||||
/**
|
||||
* 收货库位名称
|
||||
*/
|
||||
|
||||
@Schema(description = "收货库位名称")
|
||||
private String rcvWrhName;
|
||||
/**
|
||||
* 收货库位编码;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "收货库位编码;推送ERP")
|
||||
private String rcvWrhNum;
|
||||
/**
|
||||
* 暂估数量;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "暂估数量;推送ERP(必须)")
|
||||
private String qty;
|
||||
/**
|
||||
* 计量单位;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "计量单位;推送ERP(必须)")
|
||||
private String unt;
|
||||
/**
|
||||
* 含税单价;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "含税单价;推送ERP(必须)")
|
||||
private BigDecimal inTaxUprc;
|
||||
/**
|
||||
* 价格单位;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "价格单位;推送ERP")
|
||||
private BigDecimal prcUnt;
|
||||
/**
|
||||
* 税码(字典: PRCH_TAX);推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "税码(字典: PRCH_TAX);推送ERP")
|
||||
private String taxNum;
|
||||
/**
|
||||
* 是否基于GR的发票校验;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "是否基于GR的发票校验;推送ERP")
|
||||
private String isGrInv;
|
||||
/**
|
||||
* 是否允许无限制收货;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "是否允许无限制收货;推送ERP")
|
||||
private String isUnlRcv;
|
||||
/**
|
||||
* 批次;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "批次;推送ERP")
|
||||
private String bat;
|
||||
/**
|
||||
* 项目类别;推送ERP:委托加工L
|
||||
*/
|
||||
|
||||
@Schema(description = "项目类别;推送ERP:委托加工L")
|
||||
private String prjCtgr;
|
||||
/**
|
||||
* 科目分配类别(字典: PRCH_ACTS_CTGR);推送ERP:联动订单类型,固定资产订单A,服务订单S-销售服务费K-成本中心F-订单
|
||||
*/
|
||||
|
||||
@Schema(description = "科目分配类别(字典: PRCH_ACTS_CTGR);推送ERP:联动订单类型,固定资产订单A,服务订单S-销售服务费K-成本中心F-订单")
|
||||
private String actsCtgr;
|
||||
/**
|
||||
* 物料组编码(字典: PRCH_MATERIAL_GROUP);推送ERP:联动订单类型,服务订单必传
|
||||
*/
|
||||
|
||||
@Schema(description = "物料组编码(字典: PRCH_MATERIAL_GROUP);推送ERP:联动订单类型,服务订单必传")
|
||||
private String mtrlCpntNum;
|
||||
/**
|
||||
* 物料组描述;推送ERP:联动订单类型,服务订单必传
|
||||
*/
|
||||
|
||||
@Schema(description = "物料组描述;推送ERP:联动订单类型,服务订单必传")
|
||||
private String mtrlCpntDsp;
|
||||
/**
|
||||
* 短文本
|
||||
*/
|
||||
|
||||
@Schema(description = "短文本")
|
||||
private String shrtTxt;
|
||||
/**
|
||||
* 退货标识X标识退货;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "退货标识X标识退货;推送ERP")
|
||||
private String isRlbkCgo;
|
||||
/**
|
||||
* 是否免费收货标识X;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "是否免费收货标识X;推送ERP")
|
||||
private String isFreeRcv;
|
||||
/**
|
||||
* 外部行项目号;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "外部行项目号;推送ERP")
|
||||
private Long outLineNum;
|
||||
/**
|
||||
* 备注信息-需求单位;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "备注信息-需求单位;推送ERP")
|
||||
private String rmkUnt;
|
||||
/**
|
||||
* 备注信息-物料详细;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "备注信息-物料详细;推送ERP")
|
||||
private String rmkMtrl;
|
||||
/**
|
||||
* 交货起始日期;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "交货起始日期;推送ERP")
|
||||
private LocalDateTime bgnDt;
|
||||
/**
|
||||
* 交货截止日期;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "交货截止日期;推送ERP")
|
||||
private LocalDateTime ddlDt;
|
||||
/**
|
||||
* 已收货量
|
||||
*/
|
||||
|
||||
@Schema(description = "已收货量")
|
||||
private BigDecimal lstQty;
|
||||
/**
|
||||
* 已移库量库;存针对该订单产生的移库量
|
||||
*/
|
||||
|
||||
@Schema(description = "已移库量库;存针对该订单产生的移库量")
|
||||
private BigDecimal trfQty;
|
||||
/**
|
||||
* 小协议号
|
||||
*/
|
||||
|
||||
@Schema(description = "小协议号")
|
||||
private String agrNum;
|
||||
/**
|
||||
* 移库工厂名称
|
||||
*/
|
||||
|
||||
@Schema(description = "移库工厂名称")
|
||||
private String trfFactName;
|
||||
/**
|
||||
* 移库工厂编码
|
||||
*/
|
||||
|
||||
@Schema(description = "移库工厂编码")
|
||||
private String trfFactNum;
|
||||
/**
|
||||
* 移库库位名称
|
||||
*/
|
||||
|
||||
@Schema(description = "移库库位名称")
|
||||
private String trfWrhName;
|
||||
/**
|
||||
* 移库库位编码
|
||||
*/
|
||||
|
||||
@Schema(description = "移库库位编码")
|
||||
private String trfWrhNum;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String rmk;
|
||||
/**
|
||||
* 原料湿重;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "原料湿重;推送ERP")
|
||||
private BigDecimal origWet;
|
||||
/**
|
||||
* 销售物料号;推送ERP:科目分配类别为S时必填
|
||||
*/
|
||||
|
||||
@Schema(description = "销售物料号;推送ERP:科目分配类别为S时必填")
|
||||
private String saleMtrlNum;
|
||||
/**
|
||||
* 统计型内部订单;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "统计型内部订单;推送ERP")
|
||||
private String inOrd;
|
||||
/**
|
||||
* 采购类别;推送ERP:0-生产性物资类1-项目投资类
|
||||
*/
|
||||
|
||||
@Schema(description = "采购类别;推送ERP:0-生产性物资类1-项目投资类")
|
||||
private String prchCtgr;
|
||||
/**
|
||||
* 是否启用(字典:ERP_CTRT_YN);处理明细中多个相同物料,只能允许一种物料启用
|
||||
*/
|
||||
|
||||
@Schema(description = "是否启用(字典:ERP_CTRT_YN);处理明细中多个相同物料,只能允许一种物料启用")
|
||||
private String isEnb;
|
||||
/**
|
||||
* 科目分配详情;科目分配类别为K或P时使用(JSON)
|
||||
*/
|
||||
|
||||
@Schema(description = "科目分配详情;科目分配类别为K或P时使用(JSON)")
|
||||
private String actsCtgrDtl;
|
||||
/**
|
||||
* 委托加工详情;委托加工订单使用(JSON)
|
||||
*/
|
||||
|
||||
@Schema(description = "委托加工详情;委托加工订单使用(JSON)")
|
||||
private String enttDtl;
|
||||
/**
|
||||
* 金属元素缩写
|
||||
*/
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elemAbbr;
|
||||
/**
|
||||
* 金属元素名称
|
||||
*/
|
||||
|
||||
@Schema(description = "金属元素名称")
|
||||
private String elemName;
|
||||
/**
|
||||
* 金属元素编码
|
||||
*/
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
private String elemCdg;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.api.dto.order;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -7,208 +8,253 @@ import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Schema(description = "订单(老版本)")
|
||||
public class PurchaseOrderWithDetailsDTO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
/**
|
||||
* ERP订单号
|
||||
*/
|
||||
@Schema(description = "ERP订单号")
|
||||
private String orderSAPNumber;
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
@Schema(description = "订单号")
|
||||
private String systemOrderNumber;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@Schema(description = "公司名称")
|
||||
private String cpName;
|
||||
/**
|
||||
* 公司编码;推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "公司编码;推送ERP(必须)")
|
||||
private String companyNumber;
|
||||
/**
|
||||
* 客商编码;推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "客商编码;推送ERP(必须)")
|
||||
private String supplierNumber;
|
||||
/**
|
||||
* 客商名称
|
||||
*/
|
||||
@Schema(description = "客商名称")
|
||||
private String supplierName;
|
||||
/**
|
||||
* 订单类型(字典:PRCH_ORD_TP);推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "订单类型(字典:PRCH_ORD_TP);推送ERP(必须)")
|
||||
private String type;
|
||||
/**
|
||||
* 凭证日期;推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "凭证日期;推送ERP(必须)")
|
||||
private LocalDateTime voucherDate;
|
||||
/**
|
||||
* 采购组织编码;推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "采购组织编码;推送ERP(必须)")
|
||||
private String purchaseOrganizationCustomsDeclaration;
|
||||
/**
|
||||
* 收货工厂名称
|
||||
*/
|
||||
@Schema(description = "收货工厂名称")
|
||||
private String receiveFactoryName;
|
||||
/**
|
||||
* 收货工厂编码;推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "收货工厂编码;推送ERP(必须)")
|
||||
private String receiveFactoryNumber;
|
||||
/**
|
||||
* 收货库位名称
|
||||
*/
|
||||
@Schema(description = "收货库位名称")
|
||||
private String receiveWarehouseName;
|
||||
/**
|
||||
* 收货库位编码;推送ERP
|
||||
*/
|
||||
@Schema(description = "收货库位编码;推送ERP")
|
||||
private String receiveWarehouseNumber;
|
||||
/**
|
||||
* 采购组编码(字典:PRCH_GRP_TP);推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "采购组编码(字典:PRCH_GRP_TP);推送ERP(必须)")
|
||||
private String purchaseGroup;
|
||||
/**
|
||||
* 货币码(字典:CUR);推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "货币码(字典:CUR);推送ERP(必须)")
|
||||
private String currencyNumber;
|
||||
/**
|
||||
* 汇率;推送ERP
|
||||
*/
|
||||
@Schema(description = "汇率;推送ERP")
|
||||
private BigDecimal exchangeRate;
|
||||
/**
|
||||
* 合同纸质合同号;推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "合同纸质合同号;推送ERP(必须)")
|
||||
private String paperContractNumber;
|
||||
/**
|
||||
* 小协议号;推送ERP
|
||||
*/
|
||||
@Schema(description = "小协议号;推送ERP")
|
||||
private String agreementNumber;
|
||||
/**
|
||||
* 备注;推送ERP
|
||||
*/
|
||||
@Schema(description = "备注;推送ERP")
|
||||
private String remark;
|
||||
/**
|
||||
* 代理方编码;推送ERP
|
||||
*/
|
||||
@Schema(description = "代理方编码;推送ERP")
|
||||
private String agentNumber;
|
||||
/**
|
||||
* 代理方名称
|
||||
*/
|
||||
@Schema(description = "代理方名称")
|
||||
private String agentName;
|
||||
/**
|
||||
* 订单编码
|
||||
*/
|
||||
@Schema(description = "订单编码")
|
||||
private String orderNumber;
|
||||
/**
|
||||
* 系统合同编号
|
||||
*/
|
||||
@Schema(description = "系统合同编号")
|
||||
private String contractNumber;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@Schema(description = "物料编码")
|
||||
private String materialNumber;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@Schema(description = "单位")
|
||||
private String unt;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@Schema(description = "物料名称")
|
||||
private String materialName;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@Schema(description = "合同名称")
|
||||
private String contractName;
|
||||
/**
|
||||
* 小户头号
|
||||
*/
|
||||
@Schema(description = "小户头号")
|
||||
private String tenantNumber;
|
||||
/**
|
||||
* ERP公司编号
|
||||
*/
|
||||
@Schema(description = "ERP公司编号")
|
||||
private String erpPurchaseCompanyNumber;
|
||||
/**
|
||||
* ERP公司名称
|
||||
*/
|
||||
@Schema(description = "ERP公司名称")
|
||||
private String erpPurchaseCompanyName;
|
||||
/**
|
||||
* ERP客商公司编码
|
||||
*/
|
||||
@Schema(description = "ERP客商公司编码")
|
||||
private String erpSalesCompanyNumber;
|
||||
/**
|
||||
* ERP客商公司名称
|
||||
*/
|
||||
@Schema(description = "ERP客商公司名称")
|
||||
private String erpSalesCompanyName;
|
||||
/**
|
||||
* 采购组织名称
|
||||
*/
|
||||
@Schema(description = "采购组织名称")
|
||||
private String purchaseOrganizationName;
|
||||
/**
|
||||
* ERP状态(字典: ERP_REQ_STS)
|
||||
*/
|
||||
@Schema(description = "ERP状态(字典: ERP_REQ_STS)")
|
||||
private String erpStatus;
|
||||
/**
|
||||
* 请求ERP失败原因
|
||||
*/
|
||||
@Schema(description = "请求ERP失败原因")
|
||||
private String cause;
|
||||
/**
|
||||
* 订单状态(字典:PRCH_ORD_STS)
|
||||
*/
|
||||
|
||||
@Schema(description = "订单状态(字典:PRCH_ORD_STS)")
|
||||
private String status;
|
||||
/**
|
||||
* 采购组名称
|
||||
*/
|
||||
@Schema(description = "采购组名称")
|
||||
private String purchaseGroupName;
|
||||
|
||||
/**
|
||||
* 流程实例编号
|
||||
*/
|
||||
|
||||
@Schema(description = "流程实例编号")
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 流程当前任务节点id
|
||||
*/
|
||||
|
||||
@Schema(description = "流程当前任务节点id")
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
|
||||
@Schema(description = "审批意见")
|
||||
private String reviewOpinion;
|
||||
|
||||
/**
|
||||
* 是否需要审批
|
||||
*/
|
||||
@Schema(description = "是否需要审批")
|
||||
private int isPush;
|
||||
/**
|
||||
* 物料类型
|
||||
*/
|
||||
@Schema(description = "物料类型")
|
||||
private String mtrlTp;
|
||||
/**
|
||||
* 订单类型
|
||||
*/
|
||||
@Schema(description = "订单类型")
|
||||
private String splyBsnTp;
|
||||
/**
|
||||
* 税码
|
||||
*/
|
||||
@Schema(description = "税码")
|
||||
private String taxNum;
|
||||
|
||||
/**
|
||||
* 货权准转移类型
|
||||
*/
|
||||
@Schema(description = "货权准转移类型")
|
||||
private String meteringType;
|
||||
/**
|
||||
* 采购订单明细
|
||||
*/
|
||||
@Schema(description = "采购订单明细")
|
||||
private List<PrchOrdDtlDTO> prchOrdDtlDTOS;
|
||||
/**
|
||||
* 消费订单明细
|
||||
*/
|
||||
@Schema(description = "消费订单明细")
|
||||
private List<SalesOrdDtlDTO> salesOrdDtlDTOS;
|
||||
}
|
||||
|
||||
@@ -134,4 +134,8 @@ public class SalesOrdDtlDTO {
|
||||
|
||||
private BigDecimal taxRte;
|
||||
|
||||
/**
|
||||
* 已移库量库;存针对该订单产生的移库量
|
||||
*/
|
||||
private BigDecimal trfQty;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.zt.plat.module.contractorder.api.dto.order;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@Schema(description = "更新订单已收货数量")
|
||||
@Validated
|
||||
public class UpdateOrderLstQtyDTO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Schema(description = "订单明细id")
|
||||
@NotNull(message = "订单明细id不能为空")
|
||||
private Long orderDetailId;
|
||||
/**
|
||||
* 已收货数量
|
||||
*/
|
||||
@Schema(description = "已收货数量")
|
||||
@NotNull(message = "已收货数量不能为空")
|
||||
private BigDecimal lstQty;
|
||||
|
||||
|
||||
@Schema(description = "订单分类(字典:SPLY_BSN_TP)")
|
||||
@NotEmpty(message = "订单类型不能为空")
|
||||
private String splyBsnTp;
|
||||
}
|
||||
@@ -3,10 +3,7 @@ package com.zt.plat.module.contractorder.api;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
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.order.OrdDtlDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.OrderDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.PurchaseOrderWithDetailsDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.SalesOrdDtlDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.*;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PrchOrdDtlDO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.salesorder.SalesOrderDO;
|
||||
@@ -18,12 +15,15 @@ import com.zt.plat.module.contractorder.dal.mysql.salesorder.SalesOrderMapper;
|
||||
import com.zt.plat.module.contractorder.service.purchaseorder.PurchaseOrderService;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@@ -61,7 +61,7 @@ public class OrderApiImpl implements OrderApi {
|
||||
if (!salesOrderIds.isEmpty()) {
|
||||
order.addAll(getSalesOrdByIds(salesOrderIds));
|
||||
}
|
||||
return success(order);
|
||||
return success(order);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -92,6 +92,40 @@ public class OrderApiImpl implements OrderApi {
|
||||
return success(order);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public CommonResult<Boolean> UpdateOrderLstQty(List<UpdateOrderLstQtyDTO> updateOrderLstQtyDTOS) {
|
||||
if (updateOrderLstQtyDTOS == null || updateOrderLstQtyDTOS.isEmpty()) {
|
||||
throw new RuntimeException("请求数据错误");
|
||||
}
|
||||
SalesOrderDetailMapper salesOrderDetailMapper = SpringUtil.getBean(SalesOrderDetailMapper.class);
|
||||
PrchOrdDtlMapper prchOrdDtlMapper = SpringUtil.getBean(PrchOrdDtlMapper.class);
|
||||
updateOrderLstQtyDTOS.forEach(f -> {
|
||||
if ("SALE".equals(f.getSplyBsnTp())) {
|
||||
SalesOrderDetailDO salesOrderDetailDO = salesOrderDetailMapper.selectById(f.getOrderDetailId());
|
||||
// 处理 trfQty 可能为 null 的情况,默认值 0
|
||||
BigDecimal trfQty = Optional.ofNullable(salesOrderDetailDO.getTrfQty())
|
||||
.orElse(BigDecimal.ZERO);
|
||||
SalesOrderDetailDO updateDO = new SalesOrderDetailDO();
|
||||
updateDO.setId(f.getOrderDetailId()); // 给更新对象设 ID
|
||||
updateDO.setTrfQty(trfQty.add(f.getLstQty())); // 累加(trfQty )
|
||||
salesOrderDetailMapper.updateById(updateDO);
|
||||
} else if ("PUR".equals(f.getSplyBsnTp())) {
|
||||
// 采购
|
||||
PrchOrdDtlDO prchOrdDtlDO = prchOrdDtlMapper.selectById(f.getOrderDetailId());
|
||||
BigDecimal trfQty = Optional.ofNullable(prchOrdDtlDO.getTrfQty())
|
||||
.orElse(BigDecimal.ZERO);
|
||||
PrchOrdDtlDO updateDO = new PrchOrdDtlDO();
|
||||
updateDO.setId(f.getOrderDetailId());
|
||||
updateDO.setTrfQty(trfQty.add(f.getLstQty()));
|
||||
prchOrdDtlMapper.updateById(updateDO);
|
||||
} else {
|
||||
throw new RuntimeException("请求数据错误");
|
||||
}
|
||||
});
|
||||
return success(true);
|
||||
}
|
||||
|
||||
private List<SalesOrderDO> getOrderByIds(List<Long> ids) {
|
||||
return SpringUtil.getBean(SalesOrderMapper.class).selectByIds(ids); // 采购订单与销售订单的
|
||||
}
|
||||
@@ -176,7 +210,7 @@ public class OrderApiImpl implements OrderApi {
|
||||
|
||||
|
||||
} else if (
|
||||
t instanceof SalesOrdDtlDTO s
|
||||
t instanceof SalesOrderDetailDO s
|
||||
) {
|
||||
ordDtlDTO.setId(s.getId());
|
||||
ordDtlDTO.setOrderId(s.getOrderId());
|
||||
@@ -187,7 +221,7 @@ public class OrderApiImpl implements OrderApi {
|
||||
ordDtlDTO.setFactoryNum(s.getFactoryNumber());
|
||||
ordDtlDTO.setWarehouseName(s.getWarehouseName());
|
||||
ordDtlDTO.setWarehouseNum(s.getWarehouseNumber());
|
||||
ordDtlDTO.setUnit(s.getUnit());
|
||||
ordDtlDTO.setUnit(s.getUnt());
|
||||
ordDtlDTO.setQuantity(s.getQuantity());
|
||||
ordDtlDTO.setProjectCategory(s.getProjectCategory());
|
||||
ordDtlDTO.setAgreementNumber(s.getAgreementNumber());
|
||||
@@ -196,8 +230,7 @@ public class OrderApiImpl implements OrderApi {
|
||||
ordDtlDTO.setElementCode(s.getElementNumber());
|
||||
ordDtlDTO.setIsEnable(s.getIsEnable());
|
||||
ordDtlDTO.setTaxNum(s.getTaxAcctasscat());
|
||||
//==============================
|
||||
|
||||
ordDtlDTO.setTrfQty(s.getTrfQty());
|
||||
}
|
||||
return ordDtlDTO;
|
||||
}
|
||||
|
||||
@@ -155,4 +155,6 @@ public class SalesOrderDetailDO extends BusinessBaseDO {
|
||||
@TableField("TAX_RTE")
|
||||
private BigDecimal taxRte;
|
||||
|
||||
@TableField("TRF_QTY")
|
||||
private BigDecimal trfQty;
|
||||
}
|
||||
|
||||
@@ -34,4 +34,8 @@ public class ErpInternalOrderRespVO {
|
||||
@ExcelProperty("是否已完成")
|
||||
private String isFinish;
|
||||
|
||||
@Schema(description = "companyNumber")
|
||||
@ExcelProperty("companyNumber")
|
||||
private String companyNumber;
|
||||
|
||||
}
|
||||
@@ -53,4 +53,10 @@ public class ErpInternalOrderDO {
|
||||
@TableField("IS_FIN")
|
||||
private String isFinish;
|
||||
|
||||
/**
|
||||
* 公司编码
|
||||
*/
|
||||
@TableField("CPN_NUM")
|
||||
private String companyNumber;
|
||||
|
||||
}
|
||||
@@ -132,6 +132,13 @@ public class ErpInternalOrderServiceImpl implements ErpInternalOrderService {
|
||||
if (dataArray == null || dataArray.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
// 往每个子项中添加BUKRS字段
|
||||
for (int j = 0; j < dataArray.size(); j++) {
|
||||
JSONObject item = dataArray.getJSONObject(j);
|
||||
if (item != null) {
|
||||
item.put("BUKRS", number);
|
||||
}
|
||||
}
|
||||
dataArrayALL.addAll(dataArray);
|
||||
}
|
||||
if (CollUtil.isEmpty(dataArrayALL)) {
|
||||
@@ -165,6 +172,7 @@ public class ErpInternalOrderServiceImpl implements ErpInternalOrderService {
|
||||
DO.setType(dataJson.getString("AUART"));
|
||||
DO.setIsOff(dataJson.getString("PHAS3"));
|
||||
DO.setIsFinish(dataJson.getString("PHAS2"));
|
||||
DO.setCompanyNumber(dataJson.getString("BUKRS"));
|
||||
if (numbers.get(number) != null) {
|
||||
// 更新
|
||||
DO.setId(numbers.get(number));
|
||||
|
||||
Reference in New Issue
Block a user