Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
package com.zt.plat.module.erp.api;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.zt.plat.module.erp.api.dto.ErpSubmitReqDTO;
|
||||
import com.zt.plat.module.erp.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME)
|
||||
@Tag(name = "RPC 服务 - ERP")
|
||||
public interface ErpExternalApi {
|
||||
@@ -19,6 +19,6 @@ public interface ErpExternalApi {
|
||||
|
||||
@PostMapping(PREFIX + "/submit")
|
||||
@Operation(summary = "erp数据提交")
|
||||
ResponseEntity<String> submitDataToErp(@Valid @RequestBody ErpSubmitReqDTO reqDTO);
|
||||
HashMap<String, String> submitDataToErp(@Valid @RequestBody ErpSubmitReqDTO reqDTO);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.zt.plat.module.erp.api.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.erp.enums;
|
||||
import com.zt.plat.framework.common.exception.ErrorCode;// TODO 待办:请将下面的错误码复制到 zt-module-sply 模块的 ErrorCodeConstants 类中。注意,请给“TODO 补充编号”设置一个错误码编号!!!
|
||||
|
||||
import com.zt.plat.framework.common.exception.ErrorCode;
|
||||
// ========== ERP客商主数据 TODO 补充编号 ==========
|
||||
|
||||
public interface ErrorCodeConstants {
|
||||
|
||||
@@ -3,10 +3,11 @@ 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;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* ERP Api 实现类
|
||||
*
|
||||
@@ -21,7 +22,7 @@ public class ErpExternalApiImpl implements ErpExternalApi {
|
||||
private ErpConfig erpConfig;
|
||||
|
||||
@Override
|
||||
public ResponseEntity<String> submitDataToErp(ErpSubmitReqDTO reqDTO) {
|
||||
public HashMap<String, String> submitDataToErp(ErpSubmitReqDTO reqDTO) {
|
||||
return erpConfig.pushDataToErp(reqDTO);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -104,7 +104,7 @@ public class ErpAssetController {
|
||||
@PostMapping("/getErpAssetTask")
|
||||
@Operation(summary = "定时获得erp更新资产卡片")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-asset:create')")
|
||||
public CommonResult<Boolean> getErpCompanyTask() {
|
||||
public CommonResult<Boolean> getErpAssetTask() {
|
||||
erpAssetService.callErpRfcInterface();
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@@ -40,14 +40,14 @@ public class ErpFactoryController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@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) {
|
||||
return success(erpFactoryService.createErpFactory(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@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) {
|
||||
erpFactoryService.updateErpFactory(updateReqVO);
|
||||
return success(true);
|
||||
@@ -56,7 +56,7 @@ public class ErpFactoryController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除ERP工厂")
|
||||
@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) {
|
||||
erpFactoryService.deleteErpFactory(id);
|
||||
return success(true);
|
||||
@@ -65,7 +65,7 @@ public class ErpFactoryController {
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除ERP工厂")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-factory:delete')")
|
||||
@PreAuthorize("@ss.hasPermission('base:erp-factory:delete')")
|
||||
public CommonResult<Boolean> deleteErpFactoryList(@RequestBody BatchDeleteReqVO req) {
|
||||
erpFactoryService.deleteErpFactoryListByIds(req.getIds());
|
||||
return success(true);
|
||||
@@ -74,7 +74,7 @@ public class ErpFactoryController {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得ERP工厂")
|
||||
@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) {
|
||||
ErpFactoryDO erpFactory = erpFactoryService.getErpFactory(id);
|
||||
return success(BeanUtils.toBean(erpFactory, ErpFactoryRespVO.class));
|
||||
@@ -82,7 +82,7 @@ public class ErpFactoryController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@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) {
|
||||
PageResult<ErpFactoryDO> pageResult = erpFactoryService.getErpFactoryPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpFactoryRespVO.class));
|
||||
@@ -90,7 +90,7 @@ public class ErpFactoryController {
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出ERP工厂 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-factory:export')")
|
||||
@PreAuthorize("@ss.hasPermission('base:erp-factory:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportErpFactoryExcel(@Valid ErpFactoryPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
@@ -103,7 +103,7 @@ public class ErpFactoryController {
|
||||
|
||||
@PostMapping("/getErpFactoryTask")
|
||||
@Operation(summary = "定时获得erp工厂数据")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-factory:create')")
|
||||
@PreAuthorize("@ss.hasPermission('base:erp-factory:create')")
|
||||
public CommonResult<Boolean> getErpFactoryTask() {
|
||||
erpFactoryService.callErpRfcInterface();
|
||||
return success(true);
|
||||
|
||||
@@ -4,8 +4,6 @@ import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP工艺路线明细分页 Request VO")
|
||||
@Data
|
||||
public class ErpProcessDetailPageReqVO extends PageParam {
|
||||
@@ -14,7 +12,7 @@ public class ErpProcessDetailPageReqVO extends PageParam {
|
||||
private String processId;
|
||||
|
||||
@Schema(description = "工序编码")
|
||||
private BigDecimal processingNumber;
|
||||
private String processingNumber;
|
||||
|
||||
@Schema(description = "工序描述", example = "李四")
|
||||
private String processingName;
|
||||
|
||||
@@ -5,8 +5,6 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP工艺路线明细 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@@ -22,7 +20,7 @@ public class ErpProcessDetailRespVO {
|
||||
|
||||
@Schema(description = "工序编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("工序编码")
|
||||
private BigDecimal processingNumber;
|
||||
private String processingNumber;
|
||||
|
||||
@Schema(description = "工序描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@ExcelProperty("工序描述")
|
||||
|
||||
@@ -5,8 +5,6 @@ import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP工艺路线明细新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpProcessDetailSaveReqVO {
|
||||
@@ -20,7 +18,7 @@ public class ErpProcessDetailSaveReqVO {
|
||||
|
||||
@Schema(description = "工序编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "工序编码不能为空")
|
||||
private BigDecimal processingNumber;
|
||||
private String processingNumber;
|
||||
|
||||
@Schema(description = "工序描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@NotEmpty(message = "工序描述不能为空")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user