From 88cafd62aed54313a0a338348d931b9bab9d0e3c Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Tue, 21 May 2024 15:04:17 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95BUG=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WarehouseWarehousingEntryServiceImpl.java | 97 ++++++++++--------- 1 file changed, 49 insertions(+), 48 deletions(-) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java index c0d47a346..2a1937bc6 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java @@ -284,75 +284,76 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl Date: Tue, 21 May 2024 15:42:32 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95BUG=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../excel/WarehousingEntryDetailExcel.java | 2 - .../WarehouseWarehousingEntryServiceImpl.java | 98 +++++++++---------- 2 files changed, 49 insertions(+), 51 deletions(-) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehousingEntryDetailExcel.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehousingEntryDetailExcel.java index 93d5d469f..35a1e2463 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehousingEntryDetailExcel.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/excel/WarehousingEntryDetailExcel.java @@ -178,6 +178,4 @@ public class WarehousingEntryDetailExcel implements Serializable { private String remark; - - } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java index 2a1937bc6..f685e3699 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java @@ -49,6 +49,7 @@ import com.logpm.warehouse.service.IWarehouseWarehousingEntryService; import com.logpm.warehouse.vo.WarehouseWarehousingEntryVO; import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; +import org.springblade.common.exception.CustomerException; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.support.Condition; @@ -284,76 +285,75 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl a.getProductCode().equals(detail.getProductCode()) && a.getProductName().equals(detail.getProductName()) && a.getSku().equals(detail.getSku())); From c7e4cf880b84e5f74fa0c4625ca30e7083e4364c Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 21 May 2024 15:47:12 +0800 Subject: [PATCH 3/4] =?UTF-8?q?1.=E8=BF=90=E5=8D=95=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WarehouseWaybillController.java | 37 +++++ .../mapper/WarehouseWaybillMapper.java | 1 + .../mapper/WarehouseWaybillMapper.xml | 142 ++++++++++++++++++ .../service/IWarehouseWaybillService.java | 2 + .../impl/WarehouseWaybillServiceImpl.java | 36 +++++ 5 files changed, 218 insertions(+) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java index 2064068af..0fe0adc1e 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java @@ -51,6 +51,7 @@ import springfox.documentation.annotations.ApiIgnore; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; @@ -259,6 +260,42 @@ public class WarehouseWaybillController extends BladeController { } } + @ResponseBody + @PostMapping("/pageFinanceWaybillList") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "分页查询运单审核", notes = "传入waybillDTO") + public R pageFinanceWaybillList(@RequestBody WarehouseWaybillDTO waybillDTO) { + String method = "############pageFinanceWaybillList: "; + log.info(method + "请求参数{}", waybillDTO); + try{ + List destinationWarehouseIds = new ArrayList<>(); + //当前登录人选择的仓库 + BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); + if(Objects.isNull(myCurrentWarehouse)){ + List myWatchWarehouse = warehouseClient.getMyWatchWarehouse(); + if(!myWatchWarehouse.isEmpty()){ + myWatchWarehouse.forEach(warehouseEntity -> { + destinationWarehouseIds.add(warehouseEntity.getId()); + }); + } + }else{ + destinationWarehouseIds.add(myCurrentWarehouse.getId()); + } + waybillDTO.setDestinationWarehouseIds(destinationWarehouseIds); + + IPage pages = warehouseWaybillService.pageFinanceWaybillList(waybillDTO); + + return R.data(pages); + }catch (CustomerException e){ + log.error(e.message,e); + return R.fail(e.code,e.message); + }catch (Exception e){ + log.error("############sendOrders: 系统异常",e); + return R.fail(500,"############sendOrders: 系统异常"); + } + } + + @ResponseBody @PostMapping("/findWaybillInfo") @ApiOperationSupport(order = 1) diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java index 9f1c12957..a4134e549 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.java @@ -61,4 +61,5 @@ public interface WarehouseWaybillMapper extends BaseMapper pageFinanceWaybillList(IPage page, @Param("param") WarehouseWaybillDTO waybillDTO); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml index d9d593d26..dd54acab8 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml @@ -323,4 +323,146 @@ and ltad.order_package_code = #{orderPackageCode} + + + + diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java index 7776f388b..330edcc19 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseWaybillService.java @@ -71,4 +71,6 @@ public interface IWarehouseWaybillService extends BaseService findFreezeOrAbolishByWaybillNos(List waybillNos); WarehouseWaybillEntity findWaybillEntityByOrderPackageCode(String orderPackageCode); + + IPage pageFinanceWaybillList(WarehouseWaybillDTO waybillDTO); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java index de6f5fc7e..fbb8f0bf8 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java @@ -807,6 +807,42 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl pageFinanceWaybillList(WarehouseWaybillDTO waybillDTO) { + IPage page = new Page<>(); + page.setCurrent(waybillDTO.getPageNum()); + page.setSize(waybillDTO.getPageSize()); + + waybillDTO.setDocumentMakingTimeStartDate(CommonUtil.getStartByDateStr(waybillDTO.getDocumentMakingTimeStartStr())); + waybillDTO.setDocumentMakingTimeEndDate(CommonUtil.getEndByDateStr(waybillDTO.getDocumentMakingTimeEndStr())); + waybillDTO.setCreateTimeStartDate(CommonUtil.getStartByDateStr(waybillDTO.getCreateTimeStartStr())); + waybillDTO.setCreateTimeEndDate(CommonUtil.getEndByDateStr(waybillDTO.getCreateTimeEndStr())); + waybillDTO.setAbolishTimeStartDate(CommonUtil.getStartByDateStr(waybillDTO.getAbolishTimeStartStr())); + waybillDTO.setAbolishTimeEndDate(CommonUtil.getEndByDateStr(waybillDTO.getAbolishTimeEndStr())); + waybillDTO.setFreezeTimeStartDate(CommonUtil.getStartByDateStr(waybillDTO.getFreezeTimeStartStr())); + waybillDTO.setFreezeTimeEndDate(CommonUtil.getEndByDateStr(waybillDTO.getFreezeTimeEndStr())); + + IPage pageList = baseMapper.pageFinanceWaybillList(page, waybillDTO); + List records = pageList.getRecords(); + + if(!records.isEmpty()){ + //把records中的id取出作为一个集合 + List ids = records.stream().map(WarehouseWaybillVO::getId).collect(Collectors.toList()); + List wayBillDetailList = warehouseWayBillDetailService.findByWaybillIds(ids); + //把wayBillDetailList通过waibillId分组 + Map> map = wayBillDetailList.stream().collect(Collectors.groupingBy(WarehouseWayBillDetail::getWaybillId)); + + for (WarehouseWaybillVO record : records) { + Long waybillId = record.getId(); + record.setDetailList(map.get(waybillId)); + } + pageList.setRecords(records); + } + + + return pageList; + } + private PrintPreviewVO buildPrintWallet(WarehouseWaybillEntity warehouseWaybillEntity, List warehouseWayBillDetails, BasicPrintTemplateEntity template) throws Exception { PrintPreviewVO printPreviewVO = new PrintPreviewVO(); String html = TemplateUtil.getTemplateByUrl(template.getTemplateUrl()); From c8ad51d9404b92af144589fa32465a1d9515866f Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Tue, 21 May 2024 16:15:52 +0800 Subject: [PATCH 4/4] =?UTF-8?q?1.=E5=85=B3=E9=97=AD=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=BA1=E7=9A=84=E8=80=81=E7=B3=BB=E7=BB=9F=E5=85=A5?= =?UTF-8?q?=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../factory/comfac/service/impl/FactoryCommonServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java index cb7a207a7..32bd182a2 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java @@ -129,7 +129,7 @@ public class FactoryCommonServiceImpl implements IFactoryCommonService { @Override public void extracted(String status, String unitNo, String currentWarehouseId, String operationTime, Integer trayId) { log.info("#############extracted: 当前处理的数据为 status={} unitNo={} currentWarehouseId={} operationTime={} trayId={}",status,unitNo,currentWarehouseId,operationTime,trayId); - if ("4".equals(status) || "2".equals(status) || "1".equals(status)) { + if ("4".equals(status) || "2".equals(status)) { //继续判断是否到达目的仓 //查询destinationWarehouse logiBillNo plantId数据