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

This commit is contained in:
qianshijiang
2026-01-07 17:50:13 +08:00
21 changed files with 713 additions and 31 deletions

View File

@@ -82,7 +82,7 @@ public class ContractApiImpl implements ContractApi {
@Override @Override
public ContractRespDTO getFormulasBySysNumber(String contractSysNumber) { public ContractRespDTO getFormulasBySysNumber(String contractSysNumber) {
return contractService.getFormulasByPaperNumber(contractSysNumber); return contractService.getFormulasBySysNumber(contractSysNumber);
} }
@Override @Override

View File

@@ -1301,7 +1301,7 @@ public class ContractServiceImpl implements ContractService {
// 通过合同编号查询合同信息 // 通过合同编号查询合同信息
ContractMainDO contractMainDO = contractMainMapper ContractMainDO contractMainDO = contractMainMapper
.selectOne(ContractMainDO::getSystemContractNumber, contractPaperNumber); .selectOne(TableFieldConstants.BSE_CTRT_MAIN_CTRT_PPR_NUM, contractPaperNumber);
// 合同不存在 // 合同不存在
if (contractMainDO == null) { if (contractMainDO == null) {
@@ -1394,7 +1394,7 @@ public class ContractServiceImpl implements ContractService {
// 通过合同编号查询合同信息 // 通过合同编号查询合同信息
ContractMainDO contractMainDO = contractMainMapper ContractMainDO contractMainDO = contractMainMapper
.selectOne(TableFieldConstants.BSE_CTRT_MAIN_CTRT_PPR_NUM, contractSysNumber); .selectOne(ContractMainDO::getSystemContractNumber, contractSysNumber);
// 合同不存在 // 合同不存在
if (contractMainDO == null) { if (contractMainDO == null) {

View File

@@ -57,4 +57,6 @@ public interface ErrorCodeConstants {
ErrorCode ERP_PRODUCTIVE_ORDER_NOT_EXISTS = new ErrorCode(1_017_000_001, "ERP生产订单数据不存在"); ErrorCode ERP_PRODUCTIVE_ORDER_NOT_EXISTS = new ErrorCode(1_017_000_001, "ERP生产订单数据不存在");
ErrorCode MATERIAL_ERROR = new ErrorCode( 1_017_000_009, "主物料信息错误"); ErrorCode MATERIAL_ERROR = new ErrorCode( 1_017_000_009, "主物料信息错误");
ErrorCode WAREHOUSE_FACTORY_NOT_EXISTS=new ErrorCode(1_017_000_010,"库位与工厂信息不存在");
} }

View File

@@ -65,7 +65,7 @@ public class ErpExternalApiImpl implements ErpExternalApi {
@Override @Override
public CommonResult<ErpWarehouseDTO> getErpWarehouse(Long id) { public CommonResult<ErpWarehouseDTO> getErpWarehouse(Long id) {
ErpWarehouseDO erpWarehouse = erpWarehouseService.getErpWarehouse(id); ErpWarehouseDO erpWarehouse = erpWarehouseService.getErpWarehouse(id.toString());
return success(BeanUtils.toBean(erpWarehouse, ErpWarehouseDTO.class)); return success(BeanUtils.toBean(erpWarehouse, ErpWarehouseDTO.class));
} }
} }

View File

@@ -76,16 +76,16 @@ public class ErpWarehouseController {
@Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('sply:erp-warehouse:query')") @PreAuthorize("@ss.hasPermission('sply:erp-warehouse:query')")
public CommonResult<ErpWarehouseRespVO> getErpWarehouse(@RequestParam("id") Long id) { public CommonResult<ErpWarehouseRespVO> getErpWarehouse(@RequestParam("id") Long id) {
ErpWarehouseDO erpWarehouse = erpWarehouseService.getErpWarehouse(id); ErpWarehouseRespVO erpWarehouse = erpWarehouseService.getErpWarehouse(id);
return success(BeanUtils.toBean(erpWarehouse, ErpWarehouseRespVO.class)); return success(erpWarehouse);
} }
@GetMapping("/page") @GetMapping("/page")
@Operation(summary = "获得ERP库位分页") @Operation(summary = "获得ERP库位分页")
@PreAuthorize("@ss.hasPermission('sply:erp-warehouse:query')") @PreAuthorize("@ss.hasPermission('sply:erp-warehouse:query')")
public CommonResult<PageResult<ErpWarehouseRespVO>> getErpWarehousePage(@Valid ErpWarehousePageReqVO pageReqVO) { public CommonResult<PageResult<ErpWarehouseRespVO>> getErpWarehousePage(@Valid ErpWarehousePageReqVO pageReqVO) {
PageResult<ErpWarehouseDO> pageResult = erpWarehouseService.getErpWarehousePage(pageReqVO); PageResult<ErpWarehouseRespVO> pageResult = erpWarehouseService.getErpWarehousePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ErpWarehouseRespVO.class)); return success(pageResult);
} }
@GetMapping("/export-excel") @GetMapping("/export-excel")
@@ -95,7 +95,7 @@ public class ErpWarehouseController {
public void exportErpWarehouseExcel(@Valid ErpWarehousePageReqVO pageReqVO, public void exportErpWarehouseExcel(@Valid ErpWarehousePageReqVO pageReqVO,
HttpServletResponse response) throws IOException { HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<ErpWarehouseDO> list = erpWarehouseService.getErpWarehousePage(pageReqVO).getList(); List<ErpWarehouseDO> list = BeanUtils.toBean(erpWarehouseService.getErpWarehousePage(pageReqVO).getList(), ErpWarehouseDO.class);
// 导出 Excel // 导出 Excel
ExcelUtils.write(response, "ERP库位.xls", "数据", ErpWarehouseRespVO.class, ExcelUtils.write(response, "ERP库位.xls", "数据", ErpWarehouseRespVO.class,
BeanUtils.toBean(list, ErpWarehouseRespVO.class)); BeanUtils.toBean(list, ErpWarehouseRespVO.class));

View File

@@ -22,6 +22,9 @@ public class ErpWarehousePageReqVO extends PageParam {
@Schema(description = "类型") @Schema(description = "类型")
private String type; private String type;
@Schema(description = "公司名称")
private String companyNameCustom;
@Schema(description = "公司编号")
private String companyIdCustom;
} }

View File

@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.util.List;
@Schema(description = "管理后台 - ERP库位 Response VO") @Schema(description = "管理后台 - ERP库位 Response VO")
@Data @Data
@ExcelIgnoreUnannotated @ExcelIgnoreUnannotated
@@ -42,4 +44,12 @@ public class ErpWarehouseRespVO {
@Schema(description = "是否启用") @Schema(description = "是否启用")
private String isEnable; private String isEnable;
@Schema(description = "公司名称")
private String companyNameCustom;
@Schema(description = "公司编号")
private String companyIdCustom;
@Schema(description = "子物料列表")
private List<WarehouseFactoryRespVO> warehouseFactories;
} }

View File

@@ -33,5 +33,9 @@ public class ErpWarehouseSaveReqVO {
@Schema(description = "是否启用") @Schema(description = "是否启用")
private String isEnable; private String isEnable;
@Schema(description = "公司名称")
private String companyNameCustom;
@Schema(description = "公司编号")
private String companyIdCustom;
} }

View File

@@ -0,0 +1,59 @@
package com.zt.plat.module.erp.controller.admin.erp.vo;
import com.zt.plat.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 仓库工厂关系分页 Request VO")
@Data
public class WarehouseFactoryPageReqVO extends PageParam {
@Schema(description = "公司名称")
private String companyNameCustom;
@Schema(description = "公司编码")
private String companyIdCustom;
@Schema(description = "操作类型", example = "2")
private String operationType;
@Schema(description = "业务类型", example = "2")
private String mMSIType;
@Schema(description = "erp源工厂名称", example = "赵六")
private String erpSourceFactoryName;
@Schema(description = "erp源工厂编码")
private String erpSourceFactoryNumber;
@Schema(description = "erp源库位名称", example = "赵六")
private String erpSourceWarehouseName;
@Schema(description = "erp源库位编码")
private String erpSourceWarehouseNumber;
@Schema(description = "erp目标工厂名称", example = "赵六")
private String erpTargetFactoryName;
@Schema(description = "erp目标工厂编码")
private String erpTargetFactoryNumber;
@Schema(description = "erp目标库位名称", example = "ZT")
private String erpTargetWarehouseName;
@Schema(description = "erp目标库位编码")
private String erpTargetWarehouseNumber;
@Schema(description = "主库位ID")
private Long mainWarehouseId;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

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