pom,工艺路线,封装post提交asp

This commit is contained in:
liss
2025-09-24 15:27:45 +08:00
parent 5937f38e83
commit b8d8660356
12 changed files with 328 additions and 81 deletions

View File

@@ -11,6 +11,8 @@ import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import java.util.HashMap;
@FeignClient(name = ApiConstants.NAME) @FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - ERP") @Tag(name = "RPC 服务 - ERP")
public interface ErpExternalApi { public interface ErpExternalApi {
@@ -19,6 +21,6 @@ public interface ErpExternalApi {
@PostMapping(PREFIX + "/submit") @PostMapping(PREFIX + "/submit")
@Operation(summary = "erp数据提交") @Operation(summary = "erp数据提交")
ResponseEntity<String> submitDataToErp(@Valid @RequestBody ErpSubmitReqDTO reqDTO); HashMap<String, String> submitDataToErp(@Valid @RequestBody ErpSubmitReqDTO reqDTO);
} }

View File

@@ -7,6 +7,8 @@ import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
/** /**
* ERP Api 实现类 * ERP Api 实现类
* *
@@ -21,7 +23,7 @@ public class ErpExternalApiImpl implements ErpExternalApi {
private ErpConfig erpConfig; private ErpConfig erpConfig;
@Override @Override
public ResponseEntity<String> submitDataToErp(ErpSubmitReqDTO reqDTO) { public HashMap<String, String> submitDataToErp(ErpSubmitReqDTO reqDTO) {
return erpConfig.pushDataToErp(reqDTO); return erpConfig.pushDataToErp(reqDTO);
} }
} }

View File

@@ -104,7 +104,7 @@ public class ErpAssetController {
@PostMapping("/getErpAssetTask") @PostMapping("/getErpAssetTask")
@Operation(summary = "定时获得erp更新资产卡片") @Operation(summary = "定时获得erp更新资产卡片")
@PreAuthorize("@ss.hasPermission('sply:erp-asset:create')") @PreAuthorize("@ss.hasPermission('sply:erp-asset:create')")
public CommonResult<Boolean> getErpCompanyTask() { public CommonResult<Boolean> getErpAssetTask() {
erpAssetService.callErpRfcInterface(); erpAssetService.callErpRfcInterface();
return success(true); return success(true);
} }

View File

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

View File

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

View File

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

View File

@@ -34,7 +34,7 @@ public class ErpProcessDO {
* 工厂编码 * 工厂编码
*/ */
@TableField("FACT_NUM") @TableField("FACT_NUM")
private BigDecimal factoryNumber; private String factoryNumber;
/** /**
* 物料编码 * 物料编码
*/ */
@@ -63,7 +63,7 @@ public class ErpProcessDO {
/** /**
* 计量单位 * 计量单位
*/ */
@TableField("UOM") @TableField("UNT")
private String uom; private String uom;
/** /**
* 用途 * 用途

View File

@@ -48,7 +48,7 @@ public class ErpProcessDetailDO {
/** /**
* 作业的计量单位 * 作业的计量单位
*/ */
@TableField("UOM") @TableField("UNT")
private String uom; private String uom;
/** /**
* 工作中心编号 * 工作中心编号

View File

@@ -312,8 +312,8 @@ public class ErpBomServiceImpl implements ErpBomService {
items.add(item); items.add(item);
req.put("item", items); req.put("item", items);
reqDTO.setReq(req); reqDTO.setReq(req);
ResponseEntity<String> response = erpExternalApi.submitDataToErp(reqDTO); HashMap<String, String> response = erpExternalApi.submitDataToErp(reqDTO);
if (response.getStatusCode() == HttpStatus.OK) { if (response.get("result").isEmpty()) {
log.info("ERP数据提交成功"); log.info("ERP数据提交成功");
} }
} }

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