Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
潘荣晟
2025-09-24 18:12:49 +08:00
17 changed files with 352 additions and 93 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

@@ -40,14 +40,14 @@ public class ErpFactoryController {
@PostMapping("/create") @PostMapping("/create")
@Operation(summary = "创建ERP工厂") @Operation(summary = "创建ERP工厂")
@PreAuthorize("@ss.hasPermission('sply:erp-factory:create')") @PreAuthorize("@ss.hasPermission('base:erp-factory:create')")
public CommonResult<ErpFactoryRespVO> createErpFactory(@Valid @RequestBody ErpFactorySaveReqVO createReqVO) { public CommonResult<ErpFactoryRespVO> createErpFactory(@Valid @RequestBody ErpFactorySaveReqVO createReqVO) {
return success(erpFactoryService.createErpFactory(createReqVO)); return success(erpFactoryService.createErpFactory(createReqVO));
} }
@PutMapping("/update") @PutMapping("/update")
@Operation(summary = "更新ERP工厂") @Operation(summary = "更新ERP工厂")
@PreAuthorize("@ss.hasPermission('sply:erp-factory:update')") @PreAuthorize("@ss.hasPermission('base:erp-factory:update')")
public CommonResult<Boolean> updateErpFactory(@Valid @RequestBody ErpFactorySaveReqVO updateReqVO) { public CommonResult<Boolean> updateErpFactory(@Valid @RequestBody ErpFactorySaveReqVO updateReqVO) {
erpFactoryService.updateErpFactory(updateReqVO); erpFactoryService.updateErpFactory(updateReqVO);
return success(true); return success(true);
@@ -56,7 +56,7 @@ public class ErpFactoryController {
@DeleteMapping("/delete") @DeleteMapping("/delete")
@Operation(summary = "删除ERP工厂") @Operation(summary = "删除ERP工厂")
@Parameter(name = "id", description = "编号", required = true) @Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('sply:erp-factory:delete')") @PreAuthorize("@ss.hasPermission('base:erp-factory:delete')")
public CommonResult<Boolean> deleteErpFactory(@RequestParam("id") Long id) { public CommonResult<Boolean> deleteErpFactory(@RequestParam("id") Long id) {
erpFactoryService.deleteErpFactory(id); erpFactoryService.deleteErpFactory(id);
return success(true); return success(true);
@@ -65,7 +65,7 @@ public class ErpFactoryController {
@DeleteMapping("/delete-list") @DeleteMapping("/delete-list")
@Parameter(name = "ids", description = "编号", required = true) @Parameter(name = "ids", description = "编号", required = true)
@Operation(summary = "批量删除ERP工厂") @Operation(summary = "批量删除ERP工厂")
@PreAuthorize("@ss.hasPermission('sply:erp-factory:delete')") @PreAuthorize("@ss.hasPermission('base:erp-factory:delete')")
public CommonResult<Boolean> deleteErpFactoryList(@RequestBody BatchDeleteReqVO req) { public CommonResult<Boolean> deleteErpFactoryList(@RequestBody BatchDeleteReqVO req) {
erpFactoryService.deleteErpFactoryListByIds(req.getIds()); erpFactoryService.deleteErpFactoryListByIds(req.getIds());
return success(true); return success(true);
@@ -74,7 +74,7 @@ public class ErpFactoryController {
@GetMapping("/get") @GetMapping("/get")
@Operation(summary = "获得ERP工厂") @Operation(summary = "获得ERP工厂")
@Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('sply:erp-factory:query')") @PreAuthorize("@ss.hasPermission('base:erp-factory:query')")
public CommonResult<ErpFactoryRespVO> getErpFactory(@RequestParam("id") Long id) { public CommonResult<ErpFactoryRespVO> getErpFactory(@RequestParam("id") Long id) {
ErpFactoryDO erpFactory = erpFactoryService.getErpFactory(id); ErpFactoryDO erpFactory = erpFactoryService.getErpFactory(id);
return success(BeanUtils.toBean(erpFactory, ErpFactoryRespVO.class)); return success(BeanUtils.toBean(erpFactory, ErpFactoryRespVO.class));
@@ -82,7 +82,7 @@ public class ErpFactoryController {
@GetMapping("/page") @GetMapping("/page")
@Operation(summary = "获得ERP工厂分页") @Operation(summary = "获得ERP工厂分页")
@PreAuthorize("@ss.hasPermission('sply:erp-factory:query')") @PreAuthorize("@ss.hasPermission('base:erp-factory:query')")
public CommonResult<PageResult<ErpFactoryRespVO>> getErpFactoryPage(@Valid ErpFactoryPageReqVO pageReqVO) { public CommonResult<PageResult<ErpFactoryRespVO>> getErpFactoryPage(@Valid ErpFactoryPageReqVO pageReqVO) {
PageResult<ErpFactoryDO> pageResult = erpFactoryService.getErpFactoryPage(pageReqVO); PageResult<ErpFactoryDO> pageResult = erpFactoryService.getErpFactoryPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ErpFactoryRespVO.class)); return success(BeanUtils.toBean(pageResult, ErpFactoryRespVO.class));
@@ -90,7 +90,7 @@ public class ErpFactoryController {
@GetMapping("/export-excel") @GetMapping("/export-excel")
@Operation(summary = "导出ERP工厂 Excel") @Operation(summary = "导出ERP工厂 Excel")
@PreAuthorize("@ss.hasPermission('sply:erp-factory:export')") @PreAuthorize("@ss.hasPermission('base:erp-factory:export')")
@ApiAccessLog(operateType = EXPORT) @ApiAccessLog(operateType = EXPORT)
public void exportErpFactoryExcel(@Valid ErpFactoryPageReqVO pageReqVO, public void exportErpFactoryExcel(@Valid ErpFactoryPageReqVO pageReqVO,
HttpServletResponse response) throws IOException { HttpServletResponse response) throws IOException {
@@ -103,7 +103,7 @@ public class ErpFactoryController {
@PostMapping("/getErpFactoryTask") @PostMapping("/getErpFactoryTask")
@Operation(summary = "定时获得erp工厂数据") @Operation(summary = "定时获得erp工厂数据")
@PreAuthorize("@ss.hasPermission('sply:erp-factory:create')") @PreAuthorize("@ss.hasPermission('base:erp-factory:create')")
public CommonResult<Boolean> getErpFactoryTask() { public CommonResult<Boolean> getErpFactoryTask() {
erpFactoryService.callErpRfcInterface(); erpFactoryService.callErpRfcInterface();
return success(true); return success(true);

View File

@@ -14,7 +14,7 @@ public class ErpProcessDetailPageReqVO extends PageParam {
private String processId; private String processId;
@Schema(description = "工序编码") @Schema(description = "工序编码")
private BigDecimal processingNumber; private String processingNumber;
@Schema(description = "工序描述", example = "李四") @Schema(description = "工序描述", example = "李四")
private String processingName; private String processingName;

View File

@@ -22,7 +22,7 @@ public class ErpProcessDetailRespVO {
@Schema(description = "工序编码", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "工序编码", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("工序编码") @ExcelProperty("工序编码")
private BigDecimal processingNumber; private String processingNumber;
@Schema(description = "工序描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") @Schema(description = "工序描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
@ExcelProperty("工序描述") @ExcelProperty("工序描述")

View File

@@ -20,7 +20,7 @@ public class ErpProcessDetailSaveReqVO {
@Schema(description = "工序编码", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "工序编码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "工序编码不能为空") @NotNull(message = "工序编码不能为空")
private BigDecimal processingNumber; private String processingNumber;
@Schema(description = "工序描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") @Schema(description = "工序描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
@NotEmpty(message = "工序描述不能为空") @NotEmpty(message = "工序描述不能为空")

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("物料编码")

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