封装接口,erp定时任务,调用缓存map替换list

This commit is contained in:
liss
2025-09-23 15:52:48 +08:00
parent b3e65d4732
commit db4d708978
37 changed files with 893 additions and 427 deletions

View File

@@ -0,0 +1,27 @@
package com.zt.plat.module.erp.api;
import com.zt.plat.module.erp.api.dto.ErpSubmitReqDTO;
import com.zt.plat.module.erp.common.conf.ErpConfig;
import jakarta.annotation.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
/**
* ERP Api 实现类
*
* @author ZT
* @author jason
*/
@RestController
@Validated
public class ErpExternalApiImpl implements ErpExternalApi {
@Resource
private ErpConfig erpConfig;
@Override
public ResponseEntity<String> submitDataToErp(ErpSubmitReqDTO reqDTO) {
return erpConfig.pushDataToErp(reqDTO);
}
}

View File

@@ -16,7 +16,7 @@ public class OftenEnum {
公司代码("001", "BUKRS", ""),
工厂信息("002", "WERKS", ""),
客商信息("003", "PARTNER", "DATUM"),
成本中心("004", "", ""),
成本中心("004", "KOSTL", ""),
内部订单("005", "", ""),
库位信息("006", "", ""),
采购组织("007", "", ""),
@@ -33,7 +33,7 @@ public class OftenEnum {
生产订单明细("018", "", ""),
库存明细("019", "", ""),
发票状态("020", "", ""),
物料数据("021", "", "ERSDA");
物料数据("021", "MATNR", "ERSDA");
private final String funcnr;
private final String datakey;

View File

@@ -103,9 +103,8 @@ public class ErpAssetController {
@PostMapping("/getErpAssetTask")
@Operation(summary = "定时获得erp更新资产卡片")
@PreAuthorize("@ss.hasPermission('sply:erp-asset:query')")
@PreAuthorize("@ss.hasPermission('sply:erp-asset:create')")
public void getErpCompanyTask() {
erpAssetService.callErpRfcInterface();
}
}

View File

@@ -107,12 +107,4 @@ public class ErpCustomerController {
public void getErpCustomerTask() {
erpCustomerService.callErpRfcInterface();
}
@PostMapping("/initialize")
@Operation(summary = "把数据库数据number搞到redis")
@PreAuthorize("@ss.hasPermission('sply:erp-customer:create')")
public void initialize() {
erpCustomerService.initialize();
}
}

View File

@@ -102,17 +102,10 @@ public class ErpMaterialController {
}
@PostMapping("/getErpMaterialTask")
@Operation(summary = "定时获得erp更新公司")
@Operation(summary = "定时获得erp更新物料")
@PreAuthorize("@ss.hasPermission('sply:erp-material:create')")
public void getErpMaterialTask() {
erpMaterialService.callErpRfcInterface();
}
@PostMapping("/initialize")
@Operation(summary = "把数据库数据number搞到redis")
@PreAuthorize("@ss.hasPermission('sply:erp-material:create')")
public void initialize() {
erpMaterialService.initialize();
}
}

View File

@@ -11,7 +11,7 @@ import java.math.BigDecimal;
public class ErpProductiveVersionPageReqVO extends PageParam {
@Schema(description = "工厂编码")
private BigDecimal factoryNumber;
private String factoryNumber;
@Schema(description = "物料编码")
private String materialNumber;

View File

@@ -18,7 +18,7 @@ public class ErpProductiveVersionRespVO {
@Schema(description = "工厂编码", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("工厂编码")
private BigDecimal factoryNumber;
private String factoryNumber;
@Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("物料编码")

View File

@@ -16,7 +16,7 @@ public class ErpProductiveVersionSaveReqVO {
@Schema(description = "工厂编码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "工厂编码不能为空")
private BigDecimal factoryNumber;
private String factoryNumber;
@Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "物料编码不能为空")

Some files were not shown because too many files have changed in this diff Show More