Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -30,11 +30,17 @@
|
||||
left join SPLY_ERP_CPN c on r.ERP_NUM = c.NUM
|
||||
where d.DELETED = 0
|
||||
and d.IS_COMPANY = 1
|
||||
<if test="erpNumber != null">
|
||||
and c.NUM = #{erpNumber}
|
||||
</if>
|
||||
<if test="number != null">
|
||||
and d.CODE = #{number}
|
||||
</if>
|
||||
<if test="name != null">
|
||||
and d.NAME = #{name}
|
||||
and d.NAME like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="erpName != null">
|
||||
and c.NAME = #{erpName}
|
||||
and c.NAME like concat('%', #{erpName}, '%')
|
||||
</if>
|
||||
<if test="manager != null">
|
||||
and d.LEADER_USER_ID = #{manager}
|
||||
|
||||
@@ -2,9 +2,8 @@ package com.zt.plat.module.contractorder.api;
|
||||
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.PurchaseOrderWithDetailsDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.contract.ContractRespDTO;
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.ContractSaveReqVO;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.PurchaseOrderWithDetailsDTO;
|
||||
import com.zt.plat.module.contractorder.api.vo.contract.international.ContractRequest;
|
||||
import com.zt.plat.module.contractorder.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -35,15 +34,11 @@ public interface ContractApi {
|
||||
@Operation(summary = "通过订单编号获取订单信息", description = "通过订单编号获取订单信息")
|
||||
CommonResult<List<PurchaseOrderWithDetailsDTO>> getOrderByOrderNo(@RequestBody List<String> orderNoS);
|
||||
|
||||
@PostMapping(PREFIX + "/create")
|
||||
@Operation(summary = "创建合同")
|
||||
CommonResult<Boolean> create(@Valid @RequestBody ContractSaveReqVO reqVO);
|
||||
|
||||
@PostMapping(PREFIX + "/order-by-order-id")
|
||||
@Operation(summary = "通过订单id获取订单信息", description = "通过订单编号获取订单信息")
|
||||
CommonResult<List<PurchaseOrderWithDetailsDTO>> getOrderByOrderIds(@RequestBody List<Long> ids);
|
||||
|
||||
@PostMapping(PREFIX + "/send")
|
||||
@PostMapping(PREFIX + "/push")
|
||||
@Operation(summary = "国贸2.0系统创建合同调用")
|
||||
CommonResult<Boolean> push(@Valid @RequestBody ContractRequest reqVO);
|
||||
CommonResult<Boolean> push(@Valid @RequestBody ContractRequest reqVO) throws Exception;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@@ -34,7 +33,7 @@ public class ContractPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "签署日期;与ERP(HTQDRQ)对应")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] signDate;
|
||||
private String[] signDate;
|
||||
|
||||
@Schema(description = "本币金额;与ERP(HTBWBZJE)对应")
|
||||
private BigDecimal basicAmount;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract.international;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/*
|
||||
@@ -7,12 +8,20 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class Account {
|
||||
@Schema(description = "收付款账号行号")
|
||||
private String accountSourceId; // 收付款账号行号
|
||||
@Schema(description = "收付款账号编号")
|
||||
private String accountSourceCode; // 收付款账号编号
|
||||
@Schema(description = "类别")
|
||||
private String accountType; // 类别
|
||||
@Schema(description = "名称")
|
||||
private String accountName; // 名称
|
||||
@Schema(description = "开户银行")
|
||||
private String bankAccountName; // 开户银行
|
||||
@Schema(description = "银行账号")
|
||||
private String bankAccountNo; // 银行账号
|
||||
@Schema(description = "纳税人识别号")
|
||||
private String identificationNumber; // 纳税人识别号
|
||||
@Schema(description = "地址、电话")
|
||||
private String addressPhoneTel; // 地址、电话
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract.international;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -14,78 +13,144 @@ import java.util.List;
|
||||
public class ContractRequest {
|
||||
|
||||
// 基础信息
|
||||
@Schema(description = "操作标志")
|
||||
private String operateFlag; // 操作标志
|
||||
@Schema(description = "账套代码")
|
||||
private String bookId; // 账套代码
|
||||
@Schema(description = "组织ID")
|
||||
private String orgId; // 组织ID
|
||||
@Schema(description = "合同唯一键")
|
||||
private String contractId; // 合同唯一键
|
||||
@Schema(description = "合同操作类型 (新增, 变更, 修正)")
|
||||
private String operateType; // 合同操作类型 (新增, 变更, 修正)
|
||||
@Schema(description = "合同编号")
|
||||
private String contractCode; // 合同编号
|
||||
@Schema(description = "业务合同编号")
|
||||
private String contractBusinessNo; // 业务合同编号
|
||||
@Schema(description = "对方合同号")
|
||||
private String contractExternalNo; // 对方合同号
|
||||
@Schema(description = "系统合同版本号")
|
||||
private BigDecimal contractVersion; // 系统合同版本号
|
||||
@Schema(description = "合同状态代码 (值集: 40-签约)")
|
||||
private String contractStatus; // 合同状态代码 (值集: 40-签约)
|
||||
@Schema(description = "合同名称")
|
||||
private String contractName; // 合同名称
|
||||
@Schema(description = "合同类型 (货运;货代;仓储;保险)")
|
||||
private String contractType; // 合同类型 (货运;货代;仓储;保险)
|
||||
@Schema(description = "是否非标准合同文本")
|
||||
private String textType; // 是否非标准合同文本
|
||||
@DateTimeFormat(pattern = "yyyyMMdd")
|
||||
private Date contractStartDate; // 合同有效期起 (格式: yyyyMMdd)
|
||||
@DateTimeFormat(pattern = "yyyyMMdd")
|
||||
private Date contractEndDate; // 合同有效期止 (格式: yyyyMMdd)
|
||||
@Schema(description = "合同有效期起 (格式: yyyyMMdd)")
|
||||
private String contractStartDate; // 合同有效期起 (格式: yyyyMMdd)
|
||||
@Schema(description = "合同有效期止 (格式: yyyyMMdd)")
|
||||
private String contractEndDate; // 合同有效期止 (格式: yyyyMMdd)
|
||||
@Schema(description = "是否固定单价 (0-浮动, 1-固定)")
|
||||
private String priceType; // 是否固定单价 (0-浮动, 1-固定)
|
||||
@Schema(description = "合同币种")
|
||||
private String currencyCode; // 合同币种
|
||||
@Schema(description = "结算方式")
|
||||
private String settleMethod; // 结算方式
|
||||
@Schema(description = "对方合同号")
|
||||
private String firstContractCode; // 对方合同号
|
||||
@Schema(description = "预估含税总金额")
|
||||
private BigDecimal estimateAmountTotal; // 预估含税总金额
|
||||
@Schema(description = "结算依据 (10-交货量, 20-卸车量)")
|
||||
private String settleGist; // 结算依据 (10-交货量, 20-卸车量)
|
||||
@Schema(description = "税率")
|
||||
private BigDecimal priceTaxRate; // 税率
|
||||
@Schema(description = "运输方式 (10-铁路或汽运, 20-水路运输, 30-铁路运输, 40-汽车运输, 50-航空运输)")
|
||||
private String transType; // 运输方式 (10-铁路或汽运, 20-水路运输, 30-铁路运输, 40-汽车运输, 50-航空运输)
|
||||
@Schema(description = "包装方式")
|
||||
private String packMethod; // 包装方式
|
||||
@Schema(description = "在途损耗")
|
||||
private BigDecimal intransitLoss; // 在途损耗
|
||||
@Schema(description = "提货地")
|
||||
private String pickupLocation; // 提货地
|
||||
@Schema(description = "仓库数")
|
||||
private BigDecimal warehouseNum; // 仓库数
|
||||
@Schema(description = "按码单入库磅差比")
|
||||
private BigDecimal weightDisparity; // 按码单入库磅差比
|
||||
@Schema(description = "投保标的")
|
||||
private String insuredSubjectMatter; // 投保标的
|
||||
@Schema(description = "预计年保险总额")
|
||||
private BigDecimal estimateCoverageAmount; // 预计年保险总额
|
||||
@Schema(description = "预计年保险费")
|
||||
private BigDecimal estimatePremium; // 预计年保险费
|
||||
@Schema(description = "保险费率")
|
||||
private BigDecimal premiumRate; // 保险费率
|
||||
@Schema(description = "备注信息")
|
||||
private String remark; // 备注信息
|
||||
@Schema(description = "经办人工号")
|
||||
private String createdUser; // 经办人工号
|
||||
@Schema(description = "经办人姓名")
|
||||
private String createdUserName; // 经办人姓名
|
||||
@Schema(description = "拟签递交人工号")
|
||||
private String approveSubmitCode; // 拟签递交人工号
|
||||
@Schema(description = "拟签递交人姓名")
|
||||
private String approveSubmitName; // 拟签递交人姓名
|
||||
@DateTimeFormat(pattern = "yyyyMMdd")
|
||||
private Date approveSubmitDate; // 拟签呈批日期
|
||||
@Schema(description = "拟签呈批日期")
|
||||
private String approveSubmitDate; // 拟签呈批日期
|
||||
@Schema(description = "拟签通过人工号")
|
||||
private String approvePassCode; // 拟签通过人工号
|
||||
@Schema(description = "拟签通过人姓名")
|
||||
private String approvePassName; // 拟签通过人姓名
|
||||
@DateTimeFormat(pattern = "yyyyMMdd")
|
||||
private Date approvePassDate; // 拟签通过日期
|
||||
@Schema(description = "拟签通过日期")
|
||||
private String approvePassDate; // 拟签通过日期
|
||||
@Schema(description = "签约地 (40-签约必填)")
|
||||
private String signSite; // 签约地 (40-签约必填)
|
||||
@DateTimeFormat(pattern = "yyyyMMdd")
|
||||
private Date signDate; // 签约日期 (40-签约必填, 格式: yyyyMMdd)
|
||||
@Schema(description = "签约日期 (40-签约必填, 格式: yyyyMMdd)")
|
||||
private String signDate; // 签约日期 (40-签约必填, 格式: yyyyMMdd)
|
||||
@Schema(description = "对方签约人 (40-签约必填)")
|
||||
private String signFirstPerson; // 对方签约人 (40-签约必填)
|
||||
@Schema(description = "我方签约人工号 (40-签约必填)")
|
||||
private String signSecondPersonCode; // 我方签约人工号 (40-签约必填)
|
||||
@Schema(description = "我方签约人")
|
||||
private String signSecondPersonName; // 我方签约人
|
||||
@Schema(description = "推荐签约人工号 (40-签约必填, Y/N)")
|
||||
private String onceAuthorityFlag; // 推荐签约人工号 (40-签约必填, Y/N)
|
||||
@Schema(description = "推荐签约人工号")
|
||||
private String signOnceAccredit; // 推荐签约人工号
|
||||
@Schema(description = "备用字段1")
|
||||
private String extCol1; // 备用字段1
|
||||
@Schema(description = "备用字段2")
|
||||
private String extCol2; // 备用字段2
|
||||
@Schema(description = "备用字段3")
|
||||
private String extCol3; // 备用字段3
|
||||
@Schema(description = "备用字段4")
|
||||
private String extCol4; // 备用字段4
|
||||
@Schema(description = "备用字段5")
|
||||
private String extCol5; // 备用字段5
|
||||
@Schema(description = "备用字段6")
|
||||
private String extCol6; // 备用字段6
|
||||
@Schema(description = "备用字段7")
|
||||
private String extCol7; // 备用字段7
|
||||
@Schema(description = "备用字段8")
|
||||
private String extCol8; // 备用字段8
|
||||
@Schema(description = "备用字段9")
|
||||
private String extCol9; // 备用字段9
|
||||
@Schema(description = "备用字段10")
|
||||
private String extCol10; // 备用字段10
|
||||
@Schema(description = "附件清单列表")
|
||||
private List<String> attachList; // 附件清单列表
|
||||
@Schema(description = "是否内部企业")
|
||||
private String isInternal; // 是否内部企业
|
||||
@Schema(description = "是否框架合同")
|
||||
private String isFramework; // 是否框架合同
|
||||
|
||||
// 嵌套列表
|
||||
@Schema(description = "客商信息")
|
||||
private List<Partner> partnerList; // 客商信息
|
||||
@Schema(description = "收发港/站点")
|
||||
private List<GoodsSite> goodsSiteList; // 收发港/站点
|
||||
@Schema(description = "货物装卸要求")
|
||||
private List<LoadingRequirement> loadingRequirementsList; // 货物装卸要求
|
||||
@Schema(description = "收付款账号")
|
||||
private List<Account> accountList; // 收付款账号
|
||||
@Schema(description = "费用明细")
|
||||
private List<Freight> freightList; // 费用明细
|
||||
@Schema(description = "服务费用项目")
|
||||
private List<ServiceFee> serviceFeeList; // 服务费用项目
|
||||
@Schema(description = "仓库明细")
|
||||
private List<Storge> storgeList; // 仓库明细
|
||||
@Schema(description = "接货地址")
|
||||
private List<ReceivingAddr> receivingAddrList; // 接货地址
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract.international;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@@ -8,26 +9,48 @@ import java.math.BigDecimal;
|
||||
*/
|
||||
@Data
|
||||
public class Freight {
|
||||
@Schema(description = "费用明细行号")
|
||||
private String freightSourceId; // 费用明细行号
|
||||
@Schema(description = "费用明细编号")
|
||||
private String freightSourceCode; // 费用明细编号
|
||||
@Schema(description = "发货地编号")
|
||||
private String beginSiteCode; // 发货地编号
|
||||
@Schema(description = "发货地名称")
|
||||
private String beginSiteName; // 发货地名称
|
||||
@Schema(description = "详细地址")
|
||||
private String beginSiteAddress; // 详细地址
|
||||
@Schema(description = "收货地编码")
|
||||
private String endSiteCode; // 收货地编码
|
||||
@Schema(description = "收货地名称")
|
||||
private String endSiteName; // 收货地名称
|
||||
@Schema(description = "详细地址")
|
||||
private String endSiteAddress; // 详细地址
|
||||
@Schema(description = "运输方式 (10-汽运;20-船运;30-水汽联运)")
|
||||
private String contractTypeDispatch; // 运输方式 (10-汽运;20-船运;30-水汽联运)
|
||||
@Schema(description = "费用类型 (包干费、汽运费、港口费...)")
|
||||
private String feeTypeCode; // 费用类型 (包干费、汽运费、港口费...)
|
||||
@Schema(description = "费用名称")
|
||||
private String feeTypeName; // 费用名称
|
||||
@Schema(description = "是否乙方提货")
|
||||
private String isPartybPickup; // 是否乙方提货
|
||||
@Schema(description = "乙方提货单价")
|
||||
private BigDecimal partybPickupPrice; // 乙方提货单价
|
||||
@Schema(description = "费用大类")
|
||||
private String feeCategoryL; // 费用大类
|
||||
@Schema(description = "费用小类")
|
||||
private String feeCategoryS; // 费用小类
|
||||
@Schema(description = "标的仓")
|
||||
private String goodsStorage; // 标的仓
|
||||
@Schema(description = "标的物")
|
||||
private String categoryName; // 标的物
|
||||
@Schema(description = "免堆期")
|
||||
private BigDecimal noHeapDays; // 免堆期
|
||||
@Schema(description = "计费单位 (01-元/吨; 02-元/40GP; 03-元/20GP; 04-元/车)")
|
||||
private String quantityUnitCode; // 计费单位 (01-元/吨; 02-元/40GP; 03-元/20GP; 04-元/车)
|
||||
@Schema(description = "单价")
|
||||
private BigDecimal priceWithtax; // 单价
|
||||
@Schema(description = "税率(%)")
|
||||
private BigDecimal priceTaxRate; // 税率(%)
|
||||
@Schema(description = "费用承担")
|
||||
private String costBearing; // 费用承担
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract.international;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/*
|
||||
@@ -7,18 +8,32 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class GoodsSite {
|
||||
@Schema(description = "收发港站点行号")
|
||||
private String goodsSiteSourceId; // 收发港站点行号
|
||||
@Schema(description = "收发港站点编号")
|
||||
private String goodsSiteSourceCode; // 收发港站点编号
|
||||
@Schema(description = "标的物分类")
|
||||
private String subMattercategoryLevel; // 标的物分类
|
||||
@Schema(description = "标的物编码")
|
||||
private String subMattercategoryCode; // 标的物编码
|
||||
@Schema(description = "标的物名称")
|
||||
private String subMatterCategoryName; // 标的物名称
|
||||
@Schema(description = "地点类型 (QY-区域; GK-港口; MT-码头; CK-仓库)")
|
||||
private String beginSiteType; // 地点类型 (QY-区域; GK-港口; MT-码头; CK-仓库)
|
||||
@Schema(description = "发货地编号")
|
||||
private String beginSiteCode; // 发货地编号
|
||||
@Schema(description = "发货地名称")
|
||||
private String beginSiteName; // 发货地名称
|
||||
@Schema(description = "详细地址")
|
||||
private String beginSiteAddress; // 详细地址
|
||||
@Schema(description = "地点类型")
|
||||
private String endSiteType; // 地点类型
|
||||
@Schema(description = "收货地编号")
|
||||
private String endSiteCode; // 收货地编号
|
||||
@Schema(description = "收货地名称")
|
||||
private String endSiteName; // 收货地名称
|
||||
@Schema(description = "详细地址")
|
||||
private String endSiteAddress; // 详细地址
|
||||
@Schema(description = "运输方式 (10-汽运;20-船运;30-水汽联运)")
|
||||
private String contractTypeDispatch; // 运输方式 (10-汽运;20-船运;30-水汽联运)
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract.international;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/*
|
||||
@@ -7,12 +8,20 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class LoadingRequirement {
|
||||
@Schema(description = "货物装卸行号")
|
||||
private String loadingReqSourceId; // 货物装卸行号
|
||||
@Schema(description = "货物装卸编号")
|
||||
private String loadingReqSourceCode; // 货物装卸编号
|
||||
@Schema(description = "提货地责任方")
|
||||
private String deliveredAtPlace; // 提货地责任方
|
||||
@Schema(description = "提货地费用承担方")
|
||||
private String deliveredAtFeeparty; // 提货地费用承担方
|
||||
@Schema(description = "终到地责任方")
|
||||
private String destinationResponsibleParty; // 终到地责任方
|
||||
@Schema(description = "终到地费用承担方")
|
||||
private String intermediateStationParty; // 终到地费用承担方
|
||||
@Schema(description = "中间站责任方")
|
||||
private String destinationResponsibleFeeparty; // 中间站责任方
|
||||
@Schema(description = "中间站费用承担方")
|
||||
private String intermediateResponsibleFeeparty; // 中间站费用承担方
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract.international;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/*
|
||||
@@ -7,15 +8,29 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class Partner {
|
||||
@Schema(description = "客商信息行号")
|
||||
private String partnerSourceId; // 客商信息行号
|
||||
@Schema(description = "客商信息编码")
|
||||
private String partnerSourceCode; // 客商信息编码
|
||||
@Schema(description = "供应商名称")
|
||||
private String partnerName; // 供应商名称
|
||||
@Schema(description = "供应商代码")
|
||||
private String partnerCode; // 供应商代码
|
||||
@Schema(description = "对方法定代表人")
|
||||
private String legalRepresentative; // 对方法定代表人
|
||||
@Schema(description = "币种")
|
||||
private String partnerCurrency; // 币种
|
||||
@Schema(description = "对方联系人")
|
||||
private String contactPerson; // 对方联系人
|
||||
@Schema(description = "对方联系人联系方式")
|
||||
private String contactInformation; // 对方联系人联系方式
|
||||
@Schema(description = "是否内部交易")
|
||||
private String internalTransaction; // 是否内部交易
|
||||
@Schema(description = "客商类型")
|
||||
private String partnerType; // 客商类型
|
||||
@Schema(description = "境内/外")
|
||||
private String domesticOrOverseas; // 境内/外
|
||||
|
||||
@Schema(description = "erp合同编号")
|
||||
private String erpContractPaperNumber; // erp合同编号
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract.international;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/*
|
||||
@@ -7,17 +8,30 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class ReceivingAddr {
|
||||
@Schema(description = "接货地址行号")
|
||||
private String recivingAddrSourceId; // 接货地址行号
|
||||
@Schema(description = "接货地址编号")
|
||||
private String recivingAddrSourceCode; // 接货地址编号
|
||||
@Schema(description = "标的物分类")
|
||||
private String categoryLevel; // 标的物分类
|
||||
@Schema(description = "标的物编码")
|
||||
private String ccCategoryCode; // 标的物编码
|
||||
@Schema(description = "标的物名称")
|
||||
private String categoryName; // 标的物名称
|
||||
@Schema(description = "接货编码")
|
||||
private String siteCode; // 接货编码
|
||||
@Schema(description = "接货名称")
|
||||
private String siteName; // 接货名称
|
||||
@Schema(description = "地址类型 (QY-区域; GK-港口; MT-码头; CK-仓库)")
|
||||
private String siteType; // 地址类型 (QY-区域; GK-港口; MT-码头; CK-仓库)
|
||||
@Schema(description = "详细地址")
|
||||
private String siteAddress; // 详细地址
|
||||
@Schema(description = "专用线")
|
||||
private String consigneePrivatewire; // 专用线
|
||||
@Schema(description = "收货人")
|
||||
private String consignerContact; // 收货人
|
||||
@Schema(description = "联系人")
|
||||
private String contactPerson; // 联系人
|
||||
@Schema(description = "联系电话")
|
||||
private String contactPhone; // 联系电话
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract.international;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/*
|
||||
@@ -7,8 +8,12 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class ServiceFee {
|
||||
@Schema(description = "服务费用项目行号")
|
||||
private String serviceFeeSourceId; // 服务费用项目行号
|
||||
@Schema(description = "服务费用项目编号")
|
||||
private String serviceFeeSourceCode; // 服务费用项目编号
|
||||
@Schema(description = "服务项目名称")
|
||||
private String serviceFeeName; // 服务项目名称
|
||||
@Schema(description = "计费类别")
|
||||
private String expenseType; // 计费类别
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.api.vo.contract.international;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
/*
|
||||
@@ -7,9 +8,14 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class Storge {
|
||||
@Schema(description = "合同明细行号")
|
||||
private String storgeSourceId; // 合同明细行号
|
||||
@Schema(description = "合同明细行编号")
|
||||
private String storgeSourceCode; // 合同明细行编号
|
||||
@Schema(description = "仓库编号")
|
||||
private String warehouseCode; // 仓库编号
|
||||
@Schema(description = "仓库名称")
|
||||
private String warehouseName; // 仓库名称
|
||||
@Schema(description = "详细地址")
|
||||
private String warehouseAddress; // 详细地址
|
||||
}
|
||||
@@ -28,5 +28,6 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode CONTRACT_STATUS_NOT_SUBMIT_ERP = new ErrorCode(1_027_000_013, "{}状态合同不允许提交ERP");
|
||||
ErrorCode CONTRACT_ORDER_EXISTS = new ErrorCode(1_027_000_014, "关联订单已存在");
|
||||
ErrorCode CONTRACT_SUBMIT_ERP_FAIL = new ErrorCode(1_027_000_015, "合同提交erp失败:{}");
|
||||
ErrorCode CONTRACT_UNKNOWN_OPERATE = new ErrorCode(1_027_000_015, "未知的操作");
|
||||
ErrorCode CONTRACT_UNKNOWN_OPERATE = new ErrorCode(1_027_000_016, "未知的操作");
|
||||
ErrorCode CONTRACT_PARTNER_NOT_EXISTS = new ErrorCode(1_027_000_017, "客商信息不存在");
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -207,4 +207,6 @@ public interface ContractService {
|
||||
JSONObject sendToErp(ErpContractSaveReqVO erpContractVO);
|
||||
|
||||
ErpContractSaveReqVO getErpContract(ContractMainDO contractMainDO);
|
||||
|
||||
String generateSystemContractNumber(String category);
|
||||
}
|
||||
|
||||
@@ -1635,7 +1635,7 @@ public class ContractServiceImpl implements ContractService {
|
||||
operationId = "1";
|
||||
} else {
|
||||
// 3、如果009接口返回值中“合同编号”字段不存在值,根据合同主键查询映射表中是否存在没有删除的数据,如果有,值为“1”,如果没有,值为“0”
|
||||
ErpContractDO erpContract = erpContractService.getErpContractByMainId(contractMainDO.getId());
|
||||
ErpContractDO erpContract = erpContractService.getErpContractByPaperNumber(contractMainDO.getContractPaperNumber());
|
||||
if (erpContract != null) {
|
||||
operationId = "1";
|
||||
} else {
|
||||
@@ -1971,7 +1971,8 @@ public class ContractServiceImpl implements ContractService {
|
||||
*
|
||||
* @return 系统合同编号
|
||||
*/
|
||||
private String generateSystemContractNumber(String category) {
|
||||
@Override
|
||||
public String generateSystemContractNumber(String category) {
|
||||
|
||||
// 单据名称(拼音)
|
||||
String documentName = "XTHT";
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.zt.plat.module.erp.api.dto.ErpSubmitReqDTO;
|
||||
import com.zt.plat.module.erp.service.erp.ErpProductiveVersionService;
|
||||
import com.zt.plat.module.erp.utils.ErpConfig;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -25,6 +27,7 @@ import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
*/
|
||||
@RestController
|
||||
@Validated
|
||||
@Component
|
||||
public class ErpExternalApiImpl implements ErpExternalApi {
|
||||
|
||||
@Resource
|
||||
|
||||
@@ -58,4 +58,20 @@ public class ErpMaterialPageReqVO extends PageParam {
|
||||
@Schema(description = "类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String abbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "赵六")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
private String coding;
|
||||
|
||||
@Schema(description = "品位单位")
|
||||
private String gradeUnit;
|
||||
|
||||
@Schema(description = "小数位数")
|
||||
private Long decimalValue;
|
||||
|
||||
|
||||
}
|
||||
@@ -77,6 +77,26 @@ public class ErpMaterialRespVO {
|
||||
@ExcelProperty("类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
@ExcelProperty("金属元素缩写")
|
||||
private String abbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "赵六")
|
||||
@ExcelProperty("金属元素名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
@ExcelProperty("金属元素编码")
|
||||
private String coding;
|
||||
|
||||
@Schema(description = "品位单位")
|
||||
@ExcelProperty("品位单位")
|
||||
private String gradeUnit;
|
||||
|
||||
@Schema(description = "小数位数")
|
||||
@ExcelProperty("小数位数")
|
||||
private Long decimalValue;
|
||||
|
||||
private List<MaterialOtherDTO> materialOtherDTOS;
|
||||
|
||||
}
|
||||
@@ -69,4 +69,19 @@ public class ErpMaterialSaveReqVO {
|
||||
@Schema(description = "类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String abbreviation;
|
||||
|
||||
@Schema(description = "金属元素名称", example = "赵六")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "金属元素编码")
|
||||
private String coding;
|
||||
|
||||
@Schema(description = "品位单位")
|
||||
private String gradeUnit;
|
||||
|
||||
@Schema(description = "小数位数")
|
||||
private Long decimalValue;
|
||||
|
||||
}
|
||||
@@ -100,5 +100,30 @@ public class ErpMaterialDO extends BusinessBaseDO {
|
||||
|
||||
@TableField("TP")
|
||||
private String type;
|
||||
/**
|
||||
* 金属元素缩写
|
||||
*/
|
||||
@TableField("ABBR")
|
||||
private String abbreviation;
|
||||
/**
|
||||
* 金属元素名称
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 金属元素编码
|
||||
*/
|
||||
@TableField("CDG")
|
||||
private String coding;
|
||||
/**
|
||||
* 品位单位
|
||||
*/
|
||||
@TableField("GRD_UNT")
|
||||
private String gradeUnit;
|
||||
/**
|
||||
* 小数位数
|
||||
*/
|
||||
@TableField("DEC")
|
||||
private Long decimalValue;
|
||||
|
||||
}
|
||||
@@ -55,12 +55,12 @@ public interface ErpContractService {
|
||||
ErpContractDO getErpContract(Long id);
|
||||
|
||||
/**
|
||||
* 获得ERP合同映射通过合同主信息主键
|
||||
* 获得ERP合同映射通过合同编号
|
||||
*
|
||||
* @param contractMainId 合同主信息主键
|
||||
* @param paperNumber 合同编号
|
||||
* @return ERP合同映射
|
||||
*/
|
||||
ErpContractDO getErpContractByMainId(Long contractMainId);
|
||||
ErpContractDO getErpContractByPaperNumber(String paperNumber);
|
||||
|
||||
/**
|
||||
* 获得ERP合同映射分页
|
||||
|
||||
@@ -104,8 +104,8 @@ public class ErpContractServiceImpl implements ErpContractService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ErpContractDO getErpContractByMainId(Long contractMainId) {
|
||||
return erpContractMapper.selectOne("CTRT_MAIN_ID", contractMainId);
|
||||
public ErpContractDO getErpContractByPaperNumber(String paperNumber) {
|
||||
return erpContractMapper.selectOne("CTRT_PPR_NUM", paperNumber);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -231,8 +231,8 @@ public class ErpContractServiceImpl implements ErpContractService {
|
||||
// 转换为DO
|
||||
ErpContractDO erpContract = BeanUtils.toBean(erpContractVO, ErpContractDO.class);
|
||||
|
||||
// 根据合同主信息ID查询合同映射
|
||||
ErpContractDO erpContractDO = getErpContractByMainId(erpContract.getContractMainId());
|
||||
// 根据合同编号查询合同映射
|
||||
ErpContractDO erpContractDO = getErpContractByPaperNumber(erpContract.getContractPaperNumber());
|
||||
if (erpContractDO == null) {
|
||||
// 不存在映射表则新增
|
||||
erpContract.setDeleted(false);
|
||||
|
||||
Reference in New Issue
Block a user