From 2f1478688c0a41305725ae9cfda1244aa14dcfac Mon Sep 17 00:00:00 2001 From: gaoqr <13665037151@163.com> Date: Wed, 19 Mar 2025 17:54:06 +0800 Subject: [PATCH] =?UTF-8?q?manage=E6=9C=8D=E5=8A=A1=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=8A=9F=E8=83=BD=E7=A7=BB=E5=88=B0executor?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=EF=BC=9A=E5=8C=85=E8=A3=B9=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/manage/pack/PackController.java | 16 +++- .../executor/dal/mysql/plate/PlateMapper.java | 2 + .../manage/query/ProductionStatusService.java | 12 +++ .../query/ProductionStatusServiceImpl.java | 76 +++++++++++++++++++ .../resources/mapper/plate/PlateMapper.xml | 38 ++++++++++ 5 files changed, 142 insertions(+), 2 deletions(-) create mode 100644 cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/manage/query/ProductionStatusService.java create mode 100644 cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/manage/query/ProductionStatusServiceImpl.java diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/manage/pack/PackController.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/manage/pack/PackController.java index ae4fdb073..11442d52e 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/manage/pack/PackController.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/manage/pack/PackController.java @@ -10,6 +10,7 @@ import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPackResp import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPartsReqVO; import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OrderPartsRespVO; import com.cf.imes.module.executor.controller.admin.manage.pack.vo.OtherPackReqVO; +import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackDetailsReqVO; import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackPageReqVO; import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackReqVO; import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackRespVO; @@ -19,7 +20,9 @@ import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PlateDetailsR import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PrintOrderPackReqVO; import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PrintOrderPackRespVO; import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.OrderPackageVO; +import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.PackageDetailsRespVO; import com.cf.imes.module.executor.service.manage.pack.PackService; +import com.cf.imes.module.executor.service.manage.query.ProductionStatusService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; @@ -51,8 +54,8 @@ public class PackController { @Resource private PackService packService; - - + @Resource + private ProductionStatusService productionStatusService; @GetMapping("/page") @Operation(summary = "打包分页查询") @@ -95,6 +98,15 @@ public class PackController { } + @GetMapping("/queryPackageDetails") + @Operation(summary = "查询包裹的详细信息") + @PreAuthorize("@ss.hasAnyPermissions('manage:pack:pack-details','manage:pack:query')") + public CommonResult> queryPackageDetails(@Valid PackDetailsReqVO reqVO){ + + return CommonResult.success(productionStatusService.queryPackageDetails(reqVO)); + + } + @GetMapping("/getPageOrderPack") @Operation(summary = "查看生产订单对应的包裹信息-分页") diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/plate/PlateMapper.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/plate/PlateMapper.java index 2f601d747..bcb209d33 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/plate/PlateMapper.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/plate/PlateMapper.java @@ -316,4 +316,6 @@ public interface PlateMapper extends BaseMapperX { List selectOrderNoPackPlateList(@Param("orderId") Long orderId, @Param("organId") Long organId); List selectOrderPlateList(@Param("orderIds") List orderIds, @Param("organId") Long organId); + + IPage selectPackPlateList(@Param("page") IPage page, @Param("packageId") Long packageId, @Param("organId") Long organId); } \ No newline at end of file diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/manage/query/ProductionStatusService.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/manage/query/ProductionStatusService.java new file mode 100644 index 000000000..519d39122 --- /dev/null +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/manage/query/ProductionStatusService.java @@ -0,0 +1,12 @@ +package com.cf.imes.module.executor.service.manage.query; + + +import com.cf.imes.framework.common.pojo.PageResult; +import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackDetailsReqVO; +import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.PackageDetailsRespVO; + +public interface ProductionStatusService { + + // 查看包裹详情 + PageResult queryPackageDetails(PackDetailsReqVO reqVO); +} diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/manage/query/ProductionStatusServiceImpl.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/manage/query/ProductionStatusServiceImpl.java new file mode 100644 index 000000000..edab099d7 --- /dev/null +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/manage/query/ProductionStatusServiceImpl.java @@ -0,0 +1,76 @@ +package com.cf.imes.module.executor.service.manage.query; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO; +import com.cf.imes.framework.common.enums.OrderPackageTypeEnum; +import com.cf.imes.framework.common.pojo.PageResult; +import com.cf.imes.module.executor.controller.admin.manage.pack.vo.GroupNameList; +import com.cf.imes.module.executor.controller.admin.manage.pack.vo.PackDetailsReqVO; +import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.PackageDetailsRespVO; +import com.cf.imes.module.executor.dal.mysql.orderParts.OrderPartsMapper; +import com.cf.imes.module.executor.dal.mysql.plate.PlateMapper; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.annotation.Resource; + +import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId; + + +@Service +@Validated +public class ProductionStatusServiceImpl implements ProductionStatusService { + @Resource + private OrderPartsMapper orderPartsMapper; + + @Resource + private PlateMapper orderPlateMapper; + + // 查看包裹详情 + @Override + public PageResult queryPackageDetails(PackDetailsReqVO reqVO) { + + PageDTO page = new PageDTO<>(reqVO.getPageNo(), reqVO.getPageSize()); + + // 查看配件包裹 + if(reqVO.getType().equals(OrderPackageTypeEnum.PARTS.getType()) || reqVO.getType().equals(OrderPackageTypeEnum.OTHER_ACCESSORIES.getType())){ + + + // 查看配件包裹 + IPage packageDetailsRespVOS = orderPartsMapper.selectParts(page,reqVO.getPackageId(),getUserOrganId()); + if (CollUtil.isEmpty(packageDetailsRespVOS.getRecords())) { + return new PageResult<>(); + } + + return new PageResult<>(packageDetailsRespVOS.getRecords(), packageDetailsRespVOS.getTotal()); + + } + + + // 查看板材包裹 + IPage packageDetailsRespVOS = orderPlateMapper.selectPackPlateList(page,reqVO.getPackageId(),getUserOrganId()); + + if (CollUtil.isEmpty(packageDetailsRespVOS.getRecords())) { + return new PageResult<>(); + } + + for (PackageDetailsRespVO plateDetailsRespVO : packageDetailsRespVOS.getRecords()) { + String name = ""; + + if(!plateDetailsRespVO.getProcessGroupNameList().isEmpty()) { + for (GroupNameList groupNameList : plateDetailsRespVO.getProcessGroupNameList()) { + // 去除最后的逗号 + name += groupNameList.getName() + ","; + } + name = name.substring(0, name.length() - 1); + } + + plateDetailsRespVO.setProcessGroup(name); + } + + + return new PageResult<>(packageDetailsRespVOS.getRecords(), packageDetailsRespVOS.getTotal()); + + } +} diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/plate/PlateMapper.xml b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/plate/PlateMapper.xml index 0d2edb38e..097c02945 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/plate/PlateMapper.xml +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/plate/PlateMapper.xml @@ -984,6 +984,44 @@ #{orderIds} + + +