Merge branch 'refs/heads/dev' into test
This commit is contained in:
@@ -218,6 +218,21 @@ public class ContractRespDTO {
|
||||
@Schema(description = "乙方联系地址")
|
||||
private String salesContactAddress;
|
||||
|
||||
@Schema(description = "ERP甲方公司编号")
|
||||
private String erpPurchaseCompanyNumber;
|
||||
|
||||
@Schema(description = "ERP甲方公司名称")
|
||||
private String erpPurchaseCompanyName;
|
||||
|
||||
@Schema(description = "ERP乙方公司编码")
|
||||
private String erpSalesCompanyNumber;
|
||||
|
||||
@Schema(description = "ERP乙方公司名称")
|
||||
private String erpSalesCompanyName;
|
||||
|
||||
@Schema(description = "合同分类(字典:SPLY_BSN_TP)")
|
||||
private String businessType;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailRespDTO> detail;
|
||||
|
||||
|
||||
@@ -222,6 +222,21 @@ public class ContractRespVO {
|
||||
@Schema(description = "乙方联系地址")
|
||||
private String salesContactAddress;
|
||||
|
||||
@Schema(description = "ERP甲方公司编号")
|
||||
private String erpPurchaseCompanyNumber;
|
||||
|
||||
@Schema(description = "ERP甲方公司名称")
|
||||
private String erpPurchaseCompanyName;
|
||||
|
||||
@Schema(description = "ERP乙方公司编码")
|
||||
private String erpSalesCompanyNumber;
|
||||
|
||||
@Schema(description = "ERP乙方公司名称")
|
||||
private String erpSalesCompanyName;
|
||||
|
||||
@Schema(description = "合同分类(字典:SPLY_BSN_TP)")
|
||||
private String businessType;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailRespVO> detail;
|
||||
|
||||
|
||||
@@ -30,14 +30,12 @@ public class ContractSaveReqVO {
|
||||
@Schema(description = "交货方式(字典:FRCST_ASN)")
|
||||
private String deliveryWay;
|
||||
|
||||
// 基础信息
|
||||
@Schema(description = "附件对象存储")
|
||||
private JSONArray fileObject;
|
||||
|
||||
@Schema(description = "其它附件对象存储")
|
||||
private JSONArray fileObjectOther;
|
||||
|
||||
// 合同基本信息
|
||||
@Schema(description = "甲方公司编号;如果是采购合同,查询组织机构自动带出,且与ERP(HTQDZTBH)对应,如果是销售合同,手动选择,且与ERP(WLDWBH)对应。", example = "甲方公司编号")
|
||||
private String purchaseCompanyNumber;
|
||||
|
||||
@@ -100,7 +98,6 @@ public class ContractSaveReqVO {
|
||||
@Schema(description = "合同编号;与ERP(HTBH)对应,校验唯一", example = "合同编号")
|
||||
private String contractPaperNumber;
|
||||
|
||||
// @NotBlank(message = "合同类型不能为空")
|
||||
@Schema(description = "合同类型", example = "PRCH")
|
||||
private String contractType;
|
||||
|
||||
@@ -119,7 +116,6 @@ public class ContractSaveReqVO {
|
||||
@Schema(description = "签署地", example = "签署地")
|
||||
private String signPlace;
|
||||
|
||||
// 金额信息
|
||||
@Schema(description = "币种;与ERP(BZBH)对应", example = "CNY")
|
||||
private String currency;
|
||||
|
||||
@@ -162,7 +158,6 @@ public class ContractSaveReqVO {
|
||||
@Schema(description = "备注;与ERP(BZXX)对应", example = "备注")
|
||||
private String remark;
|
||||
|
||||
// 扩展信息
|
||||
@Schema(description = "原币金额-变更后;与ERP(BGHHTYBZJE)对应,拓展信息")
|
||||
private BigDecimal changeCooAmount;
|
||||
|
||||
@@ -209,10 +204,12 @@ public class ContractSaveReqVO {
|
||||
@Schema(description = "是否内部企业(字典:ERP_CTRT_YN)")
|
||||
private String isInternal;
|
||||
|
||||
// 模板部分
|
||||
@Schema(description = "模板实例主键", example = "10196")
|
||||
private Long instanceId;
|
||||
|
||||
@Schema(description = "合同分类(字典:SPLY_BSN_TP)")
|
||||
private String businessType;
|
||||
|
||||
// 物料信息
|
||||
private List<DetailSaveReqVO> detail;
|
||||
|
||||
|
||||
@@ -294,16 +294,6 @@ public class ContractMainDO extends BusinessBaseDO {
|
||||
*/
|
||||
@TableField("TSK_NDE_ID")
|
||||
private String taskNodeId;
|
||||
/**
|
||||
* 模板附件对象存储
|
||||
*/
|
||||
@TableField("FILE_OBJ")
|
||||
private String fileObject;
|
||||
/**
|
||||
* 其它附件对象存储
|
||||
*/
|
||||
@TableField("FILE_OBJ_OTH")
|
||||
private String fileObjectOther;
|
||||
/**
|
||||
* 交货地点
|
||||
*/
|
||||
@@ -389,4 +379,19 @@ public class ContractMainDO extends BusinessBaseDO {
|
||||
*/
|
||||
@TableField("IS_INTL")
|
||||
private String isInternal;
|
||||
/**
|
||||
* 其它附件对象存储
|
||||
*/
|
||||
@TableField("FILE_OBJ_OTH")
|
||||
private String fileObjectOther;
|
||||
/**
|
||||
* 模板附件对象存储
|
||||
*/
|
||||
@TableField("FILE_OBJ")
|
||||
private String fileObject;
|
||||
/**
|
||||
* 合同分类(字典:SPLY_BSN_TP)
|
||||
*/
|
||||
@TableField("BSN_TP")
|
||||
private String businessType;
|
||||
}
|
||||
@@ -22,6 +22,9 @@ public class ErpMaterialRespVO {
|
||||
@ExcelProperty("中铜物料编码;系统使用时使用该编码")
|
||||
private String downCenterNumber;
|
||||
|
||||
@Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String materialNumber;
|
||||
|
||||
@Schema(description = "中铝物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("中铝物料编码")
|
||||
private String centerNumber;
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.zt.plat.module.erp.job;
|
||||
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import com.zt.plat.framework.tenant.core.job.TenantJob;
|
||||
import com.zt.plat.module.erp.service.erp.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class ErpJob {
|
||||
|
||||
@Resource
|
||||
private ErpAssetService erpAssetService;
|
||||
@Resource
|
||||
private ErpBomService erpBomService;
|
||||
@Resource
|
||||
private ErpCompanyService erpCompanyService;
|
||||
@Resource
|
||||
private ErpCostcenterService erpCostcenterService;
|
||||
@Resource
|
||||
private ErpCustomerService erpCustomerService;
|
||||
@Resource
|
||||
private ErpFactoryService erpFactoryService;
|
||||
@Resource
|
||||
private ErpInternalOrderService erpInternalOrderService;
|
||||
@Resource
|
||||
private ErpMaterialService erpMaterialService;
|
||||
@Resource
|
||||
private ErpProcessService erpProcessService;
|
||||
@Resource
|
||||
private ErpProductiveVersionService erpProductiveVersionService;
|
||||
@Resource
|
||||
private ErpPurchaseOrganizationService erpPurchaseOrganizationService;
|
||||
@Resource
|
||||
private ErpSalesOrganizationService erpSalesOrganizationService;
|
||||
@Resource
|
||||
private ErpWarehouseService erpWarehouseService;
|
||||
|
||||
@XxlJob("callErpRfcInterface")
|
||||
@TenantJob
|
||||
public void execute() {
|
||||
erpCompanyService.callErpRfcInterface();
|
||||
erpFactoryService.callErpRfcInterface();
|
||||
erpCustomerService.callErpRfcInterface();
|
||||
erpAssetService.callErpRfcInterface();
|
||||
erpBomService.callErpRfcInterface();
|
||||
erpCostcenterService.callErpRfcInterface();
|
||||
erpInternalOrderService.callErpRfcInterface();
|
||||
erpMaterialService.callErpRfcInterface();
|
||||
erpProcessService.callErpRfcInterface();
|
||||
erpProductiveVersionService.callErpRfcInterface();
|
||||
erpPurchaseOrganizationService.callErpRfcInterface();
|
||||
erpSalesOrganizationService.callErpRfcInterface();
|
||||
erpWarehouseService.callErpRfcInterface();
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package com.zt.plat.module.erp.job;
|
||||
|
||||
public class erpJob {
|
||||
|
||||
public void execute() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
@@ -140,7 +140,7 @@ public class ErpCustomerServiceImpl implements ErpCustomerService {
|
||||
dataArrayALL.addAll(dataArray);
|
||||
}
|
||||
if (dataArrayALL.isEmpty()) {
|
||||
throw exception(ERP_CUSTOMER_NOT_EXISTS);
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 处理数据,区分新增和更新
|
||||
|
||||
@@ -161,6 +161,7 @@ public class ErpMaterialServiceImpl implements ErpMaterialService {
|
||||
PageResult<ErpMaterialDO> pageResult = erpMaterialMapper.selectPage(pageReqVO);
|
||||
PageResult<ErpMaterialRespVO> pageResultRespVo = BeanUtils.toBean(pageResult, ErpMaterialRespVO.class);
|
||||
for (ErpMaterialRespVO respVO : pageResultRespVo.getList()) {
|
||||
respVO.setMaterialNumber(respVO.getDownCenterNumber());
|
||||
MaterialOtherDTO dto = new MaterialOtherDTO();
|
||||
dto.setMaterialNumber(respVO.getDownCenterNumber());
|
||||
List<MaterialOtherDTO> dtos = baseApi.getMaterialOtherNoPage(dto);
|
||||
@@ -200,8 +201,8 @@ public class ErpMaterialServiceImpl implements ErpMaterialService {
|
||||
// 1. 调用ERP接口获取数据
|
||||
HashMap<String, Object> dataFromERP = erpConfig.fetchDataFromERP(funcnr, req);
|
||||
JSONArray dataArray = (JSONArray) dataFromERP.get("E_RESP");
|
||||
if (CollUtil.isEmpty(dataArray)) {
|
||||
throw exception(ERP_MATERIAL_NOT_EXISTS);
|
||||
if (dataArray == null || dataArray.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 处理公司数据,区分新增和更新
|
||||
|
||||
Reference in New Issue
Block a user