From b86ea7c09b894bc35a591198713f17e426a4141c Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Wed, 11 Dec 2024 18:04:35 +0800 Subject: [PATCH 1/5] =?UTF-8?q?1.=E6=80=8E=E5=8A=A0=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E5=8D=95=E7=9A=84=E6=89=B9=E9=87=8F=E7=BB=93=E7=AE=97=202.?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=80=E5=8D=95=E6=94=B6=E5=85=A5=E7=9A=84?= =?UTF-8?q?=E6=98=8E=E7=BB=86=203.=E5=A2=9E=E5=8A=A0=E5=B9=B2=E7=BA=BF?= =?UTF-8?q?=E5=BE=85=E5=8F=91=E8=BF=90=E5=9C=A8=E5=BA=93=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/StatisticsBalanceRecordDTO.java | 5 ++ .../controller/WarehouseIndexController.java | 4 +- .../report/mapper/WarehouseIndexMapper.java | 4 +- .../report/mapper/WarehouseIndexMapper.xml | 12 +-- .../service/IWarehouseIndexService.java | 2 +- .../impl/WarehouseIndexServiceImpl.java | 74 +++++++++---------- .../report/vo/IndexOpenOrderIncomeVO.java | 8 ++ .../controller/MerchantBalanceController.java | 5 +- ...StatisticsBalanceOrderInfoServiceImpl.java | 67 ++++++++--------- 9 files changed, 96 insertions(+), 85 deletions(-) diff --git a/blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/StatisticsBalanceRecordDTO.java b/blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/StatisticsBalanceRecordDTO.java index 332887812..c70d15070 100644 --- a/blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/StatisticsBalanceRecordDTO.java +++ b/blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/dto/StatisticsBalanceRecordDTO.java @@ -12,4 +12,9 @@ public class StatisticsBalanceRecordDTO extends StatisticsBalanceRecordEntity { private List recordPhotoEntityList = new ArrayList<>(); + /** + * 结算单ID集合 + */ + private List balanceOrderInfoIds; + } diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java b/blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java index 35654ce76..8d4526f43 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java @@ -91,8 +91,8 @@ public class WarehouseIndexController { List warehouseIds = warehouseClient.getWarehouseIds(); indexDTO.setWarehouseIds(warehouseIds); //查询订制品打托列表 - IndexOpenOrderIncomeVO indexOpenOrderIncomeVO = warehouseIndexService.openOrderIncome(indexDTO); - return R.data(indexOpenOrderIncomeVO); + List indexOpenOrderIncomeVOs = warehouseIndexService.openOrderIncome(indexDTO); + return R.data(indexOpenOrderIncomeVOs); } catch (CustomerException e) { log.warn(e.message); return R.fail(e.code, e.message); diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java index 801b66f4f..f5b4bfdf4 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java @@ -18,9 +18,9 @@ public interface WarehouseIndexMapper { IndexOpenItemDataVO findTotalNum(@Param("param") IndexDTO indexDTO); - BigDecimal findTotalFee(@Param("param") IndexDTO indexDTO); + BigDecimal findTotalFee(@Param("warehouseId") Long warehouseId); - JSONObject findFeeByDate(@Param("param") IndexDTO indexDTO); + JSONObject findFeeByDate(@Param("warehouseId") Long warehouseId); IndexHandOrderDataVO handOrderData(@Param("param") IndexDTO indexDTO); diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml index b7cea47af..682ff68fe 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml @@ -24,10 +24,8 @@ select IFNULL(sum(IFNULL(x_pay,0)+IFNULL(d_pay,0)+IFNULL(y_pay,0)+IFNULL(h_pay,0)),0) from logpm_warehouse_waybill where 1=1 - and destination_warehouse_id in - - #{item} - + and destination_warehouse_id = #{warehouseId} + diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java index 503f719be..98a81f53f 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java @@ -11,7 +11,7 @@ import java.util.Map; public interface IWarehouseIndexService { IndexOpenOrderDataVO openOrderData(IndexDTO indexDTO); - IndexOpenOrderIncomeVO openOrderIncome(IndexDTO indexDTO); + List openOrderIncome(IndexDTO indexDTO); IndexHandOrderDataVO handOrderData(IndexDTO indexDTO); diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java index 6ebbc3609..36b83ec8d 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java @@ -196,45 +196,45 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService { } @Override - public IndexOpenOrderIncomeVO openOrderIncome(IndexDTO indexDTO) { - - //增加缓存 - BladeUser user = AuthUtil.getUser(); - String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "openOrderIncome" + ":" + indexDTO.toString()); - IndexOpenOrderIncomeVO indexOpenOrderIncomeVO = bladeRedis.get(key); - if (Objects.isNull(indexOpenOrderIncomeVO)) { - List warehouseIds = indexDTO.getWarehouseIds(); - indexOpenOrderIncomeVO = new IndexOpenOrderIncomeVO(); - if (warehouseIds.isEmpty()) { - return indexOpenOrderIncomeVO; + public List openOrderIncome(IndexDTO indexDTO) { + + + List data = new ArrayList<>(); + + for (Long warehouseId : indexDTO.getWarehouseIds()) { + + String key = CacheNames.tenantKey(AuthUtil.getTenantId(), "openOrderIncome", "warehouseId:" + warehouseId); + // 查询每个仓库的数据 + IndexOpenOrderIncomeVO indexOpenOrderIncomeVO = bladeRedis.get(key); + if (Objects.isNull(indexOpenOrderIncomeVO)) { + indexOpenOrderIncomeVO = new IndexOpenOrderIncomeVO(); + BigDecimal totalFee = warehouseIndexMapper.findTotalFee(warehouseId); +//总收入 + indexOpenOrderIncomeVO.setTotalFee(totalFee); + //获取当天的开始时间 + indexDTO.setStartDate(CommonUtil.getDayStart()); + indexDTO.setEndDate(CommonUtil.getDayEnd()); + JSONObject incomeDay = warehouseIndexMapper.findFeeByDate(warehouseId); + indexOpenOrderIncomeVO.setDayFee(incomeDay.getBigDecimal("fee")); + indexOpenOrderIncomeVO.setDayBillladingFee(incomeDay.getBigDecimal("billladingFee")); + indexOpenOrderIncomeVO.setDayInstallFee(incomeDay.getBigDecimal("installFee")); + indexOpenOrderIncomeVO.setDayTrunklineFee(incomeDay.getBigDecimal("trunklineFee")); + indexOpenOrderIncomeVO.setDayWarehouseFee(incomeDay.getBigDecimal("warehouseFee")); + indexOpenOrderIncomeVO.setDayDistributionFee(incomeDay.getBigDecimal("distributionFee")); + //获取当月的开始时间 + indexDTO.setStartDate(CommonUtil.getMonthDayStart()); + indexDTO.setEndDate(CommonUtil.getMonthDayEnd()); + JSONObject incomeMonth = warehouseIndexMapper.findFeeByDate(warehouseId); + indexOpenOrderIncomeVO.setMonthFee(incomeMonth.getBigDecimal("fee")); + indexOpenOrderIncomeVO.setMonthBillladingFee(incomeMonth.getBigDecimal("billladingFee")); + indexOpenOrderIncomeVO.setMonthInstallFee(incomeMonth.getBigDecimal("installFee")); + indexOpenOrderIncomeVO.setMonthTrunklineFee(incomeMonth.getBigDecimal("trunklineFee")); + indexOpenOrderIncomeVO.setMonthWarehouseFee(incomeMonth.getBigDecimal("warehouseFee")); + indexOpenOrderIncomeVO.setMonthDistributionFee(incomeMonth.getBigDecimal("distributionFee")); } - //总收入 - indexOpenOrderIncomeVO.setTotalFee(warehouseIndexMapper.findTotalFee(indexDTO)); - //获取当天的开始时间 - indexDTO.setStartDate(CommonUtil.getDayStart()); - indexDTO.setEndDate(CommonUtil.getDayEnd()); - JSONObject incomeDay = warehouseIndexMapper.findFeeByDate(indexDTO); - indexOpenOrderIncomeVO.setDayFee(incomeDay.getBigDecimal("fee")); - indexOpenOrderIncomeVO.setDayBillladingFee(incomeDay.getBigDecimal("billladingFee")); - indexOpenOrderIncomeVO.setDayInstallFee(incomeDay.getBigDecimal("installFee")); - indexOpenOrderIncomeVO.setDayTrunklineFee(incomeDay.getBigDecimal("trunklineFee")); - indexOpenOrderIncomeVO.setDayWarehouseFee(incomeDay.getBigDecimal("warehouseFee")); - indexOpenOrderIncomeVO.setDayDistributionFee(incomeDay.getBigDecimal("distributionFee")); - //获取当月的开始时间 - indexDTO.setStartDate(CommonUtil.getMonthDayStart()); - indexDTO.setEndDate(CommonUtil.getMonthDayEnd()); - JSONObject incomeMonth = warehouseIndexMapper.findFeeByDate(indexDTO); - indexOpenOrderIncomeVO.setMonthFee(incomeMonth.getBigDecimal("fee")); - indexOpenOrderIncomeVO.setMonthBillladingFee(incomeMonth.getBigDecimal("billladingFee")); - indexOpenOrderIncomeVO.setMonthInstallFee(incomeMonth.getBigDecimal("installFee")); - indexOpenOrderIncomeVO.setMonthTrunklineFee(incomeMonth.getBigDecimal("trunklineFee")); - indexOpenOrderIncomeVO.setMonthWarehouseFee(incomeMonth.getBigDecimal("warehouseFee")); - indexOpenOrderIncomeVO.setMonthDistributionFee(incomeMonth.getBigDecimal("distributionFee")); - bladeRedis.setEx(key, indexOpenOrderIncomeVO, 3600L); + data.add(indexOpenOrderIncomeVO); } - - - return indexOpenOrderIncomeVO; + return data; } @Override diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/IndexOpenOrderIncomeVO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/IndexOpenOrderIncomeVO.java index d81dcf4c0..1edffe554 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/IndexOpenOrderIncomeVO.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/IndexOpenOrderIncomeVO.java @@ -21,6 +21,14 @@ public class IndexOpenOrderIncomeVO implements Serializable { private BigDecimal dayDistributionFee = BigDecimal.ZERO; private BigDecimal dayBillladingFee = BigDecimal.ZERO; private BigDecimal dayInstallFee = BigDecimal.ZERO; + /** + * 仓库名称 + */ + private String warehouseName; + /** + * 仓库ID + */ + private Long warehouseId; } diff --git a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/MerchantBalanceController.java b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/MerchantBalanceController.java index a61c23ada..afed76cc7 100644 --- a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/MerchantBalanceController.java +++ b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/MerchantBalanceController.java @@ -15,6 +15,7 @@ import org.springblade.common.exception.CustomerException; import org.springblade.core.tool.api.R; import org.springframework.web.bind.annotation.*; +import java.util.List; import java.util.Objects; @Slf4j @@ -190,8 +191,8 @@ public class MerchantBalanceController { log.info(method+"请求参数{}",balanceRecordDTO); try{ - Long balanceOrderInfoId = balanceRecordDTO.getBalanceOrderInfoId(); - if(Objects.isNull(balanceOrderInfoId)){ + List balanceOrderInfoId = balanceRecordDTO.getBalanceOrderInfoIds(); + if(Objects.isNull(balanceOrderInfoId) || balanceOrderInfoId.isEmpty()){ log.warn(method+"请选择正确的结算单 balanceOrderInfoId={}",balanceOrderInfoId); return R.fail(405,"请选择正确的结算单"); } diff --git a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsBalanceOrderInfoServiceImpl.java b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsBalanceOrderInfoServiceImpl.java index de0b50fa5..76304414b 100644 --- a/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsBalanceOrderInfoServiceImpl.java +++ b/blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsBalanceOrderInfoServiceImpl.java @@ -288,41 +288,42 @@ public R findBalanceDetail(Long balanceOrderId) { @Override public R enterBalance(StatisticsBalanceRecordDTO balanceRecordDTO) { - Long balanceOrderInfoId = balanceRecordDTO.getBalanceOrderInfoId(); - StatisticsBalanceOrderInfoEntity statisticsBalanceOrderInfoEntity = baseMapper.selectById(balanceOrderInfoId); - BigDecimal noBalanceFee = statisticsBalanceOrderInfoEntity.getNoBalanceFee(); - if(noBalanceFee.compareTo(BigDecimal.ZERO) != 0){ - log.warn("#############enterBalance: 结算金额不为0"); - return R.fail(405, "结算金额不为0"); - } - - statisticsBalanceOrderInfoEntity.setBalanceStatus(2); - - updateById(statisticsBalanceOrderInfoEntity); - - // 更新运单状态 - // 获取结算单对应的运单ID - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - queryWrapper.eq(StatisticsOrderInfoEntity::getBalanceOrderId, balanceOrderInfoId); - List list = statisticsOrderInfoService.list(queryWrapper); - List waybillIds = list.stream().map(StatisticsOrderInfoEntity::getWaybillId).collect(Collectors.toList()); - - // 更新运单的状态 - List data = new ArrayList<>(); - waybillIds.forEach(id ->{ - WarehouseWaybillEntity t = new WarehouseWaybillEntity(); - t.setId(id); -// t.setPayStatus("30"); - t.setSettlementStatus("30"); - data.add(t); - - - }); - warehouseWaybillClient.updateList(data); - - + List balanceOrderInfoIds = balanceRecordDTO.getBalanceOrderInfoIds(); + List statisticsBalanceOrderInfoEntitys = baseMapper.selectBatchIds(balanceOrderInfoIds); + for (StatisticsBalanceOrderInfoEntity statisticsBalanceOrderInfoEntity : statisticsBalanceOrderInfoEntitys) { + + + BigDecimal noBalanceFee = statisticsBalanceOrderInfoEntity.getNoBalanceFee(); + if(noBalanceFee.compareTo(BigDecimal.ZERO) != 0){ + log.warn("#############enterBalance: 结算金额不为0"); + return R.fail(405, "待结算金额不为0"); + } + if(statisticsBalanceOrderInfoEntity.getBalanceStatus().equals(2)){ + log.warn("#############enterBalance: 结算单信息不存在 statisticsBalanceOrderInfoEntity={}", statisticsBalanceOrderInfoEntity); + return R.fail(405, statisticsBalanceOrderInfoEntity.getBalanceOrderNo()+"已结算"); + } + + statisticsBalanceOrderInfoEntity.setBalanceStatus(2); + updateById(statisticsBalanceOrderInfoEntity); + // 更新运单状态 + // 获取结算单对应的运单ID + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(StatisticsOrderInfoEntity::getBalanceOrderId, statisticsBalanceOrderInfoEntity.getId()); + List list = statisticsOrderInfoService.list(queryWrapper); + List waybillIds = list.stream().map(StatisticsOrderInfoEntity::getWaybillId).collect(Collectors.toList()); + + // 更新运单的状态 + List data = new ArrayList<>(); + waybillIds.forEach(id ->{ + WarehouseWaybillEntity t = new WarehouseWaybillEntity(); + t.setId(id); + t.setSettlementStatus("30"); + data.add(t); + }); + warehouseWaybillClient.updateList(data); + } return R.success("结算成功"); } From c25b9e363fe3ec35069f73309d66f3b71cffb49d Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Wed, 11 Dec 2024 18:20:51 +0800 Subject: [PATCH 2/5] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BF=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=99=90=E5=88=B6=202.=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=89=98=E7=9B=98=E7=A0=81=E6=89=93=E6=89=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trunkline/vo/TrunklineCarsLoadVO.java | 7 +- .../entity/WarehouseConfigEntity.java | 18 +- .../ITrunklineCarsLoadLinePhotoService.java | 3 + ...ineCarsLoadLinePhotoEntityServiceImpl.java | 10 + .../impl/TrunklineCarsLoadServiceImpl.java | 313 ++++++++---------- .../api/WarehouseTrayTypeApiController.java | 31 ++ .../service/IWarehouseTrayTypeService.java | 3 + .../impl/WarehouseTrayTypeServiceImpl.java | 26 +- 8 files changed, 235 insertions(+), 176 deletions(-) diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadVO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadVO.java index 2249c2757..a09a2541f 100644 --- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadVO.java +++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/TrunklineCarsLoadVO.java @@ -1,9 +1,6 @@ package com.logpm.trunkline.vo; -import com.logpm.trunkline.entity.TrunklineCarsLoadEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity; -import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity; -import com.logpm.trunkline.entity.TrunklineCarsUnloadLogEntity; +import com.logpm.trunkline.entity.*; import lombok.Data; import java.math.BigDecimal; @@ -58,4 +55,6 @@ public class TrunklineCarsLoadVO extends TrunklineCarsLoadEntity { private Integer isStartPhoto; private Integer isUnloadPhoto; + private List carsLoadLinePhotoEntities = new ArrayList<>(); + } diff --git a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseConfigEntity.java b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseConfigEntity.java index 869af202d..a33e47485 100644 --- a/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseConfigEntity.java +++ b/blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseConfigEntity.java @@ -5,7 +5,6 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; -import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.tenant.mp.TenantEntity; @Data @@ -71,6 +70,23 @@ public class WarehouseConfigEntity extends TenantEntity { @ApiModelProperty(value = "预留5") private String reserve5; + /** + * 是否干线上传装车图片 + */ + @ApiModelProperty(value = "是否干线上传装车图片") + private Integer isTrunklineLoadingPhoto; + + /** + * 是否干线上传发车图片 + */ + @ApiModelProperty(value = "是否干线上传发车图片") + private Integer isTrunklineStartPhoto; + + /** + * 是否干线上传卸车图片 + */ + @ApiModelProperty(value = "是否干线上传卸车图片") + private Integer isTrunklineUnloadPhoto; } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadLinePhotoService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadLinePhotoService.java index ab3b69028..7445c299b 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadLinePhotoService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadLinePhotoService.java @@ -9,4 +9,7 @@ public interface ITrunklineCarsLoadLinePhotoService extends BaseService findListByLoadIdAndWarehouseId(Long loadId, Long warehouseId, Integer type, Integer position); + + List findListByLoadIdListAndWarehouseId(List idList, Long warehouseId); + } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLinePhotoEntityServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLinePhotoEntityServiceImpl.java index 3d4e7c64d..07fe76776 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLinePhotoEntityServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadLinePhotoEntityServiceImpl.java @@ -1,5 +1,6 @@ package com.logpm.trunkline.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.logpm.trunkline.entity.TrunklineCarsLoadLinePhotoEntity; import com.logpm.trunkline.mapper.TrunklineCarsLoadLinePhotoMapper; import com.logpm.trunkline.service.ITrunklineCarsLoadLinePhotoService; @@ -25,4 +26,13 @@ public class TrunklineCarsLoadLinePhotoEntityServiceImpl extends BaseServiceImpl public List findListByLoadIdAndWarehouseId(Long loadId, Long warehouseId, Integer type, Integer position) { return baseMapper.findListByLoadIdAndWarehouseId(loadId,warehouseId, type, position); } + + @Override + public List findListByLoadIdListAndWarehouseId(List idList, Long warehouseId) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.in("load_id",idList) + .eq("warehouse_id",warehouseId); + List trunklineCarsLoadLinePhotoEntities = baseMapper.selectList(queryWrapper); + return trunklineCarsLoadLinePhotoEntities; + } } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java index aae2a5f28..6cf5164d3 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java @@ -45,14 +45,8 @@ import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient; import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper; import com.logpm.trunkline.service.*; import com.logpm.trunkline.vo.*; -import com.logpm.warehouse.entity.WarehousePackageTrackLogEntity; -import com.logpm.warehouse.entity.WarehouseTrayTypeEntity; -import com.logpm.warehouse.entity.WarehouseWayBillDetail; -import com.logpm.warehouse.entity.WarehouseWaybillEntity; -import com.logpm.warehouse.feign.IWarehouseTrayTypeClient; -import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient; -import com.logpm.warehouse.feign.IWarehouseWaybillClient; -import com.logpm.warehouse.feign.IWarehouseWaybillDetailClient; +import com.logpm.warehouse.entity.*; +import com.logpm.warehouse.feign.*; import com.logpm.warehouse.vo.WarehouseWaybillVO; import com.logpm.warehouse.vo.WaybillOrderTotalWeightAndVolumeVO; import lombok.AllArgsConstructor; @@ -139,6 +133,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl> resultList = new ArrayList<>(); - List linePhotoEntityList = carsLoadLinePhotoService.findListByLoadIdAndWarehouseId(loadId, null, null, null); - //把linePhotoEntityList中所有元素的loadLineId放入一个Set集合 - Set loadLineIdSet = linePhotoEntityList.stream().map(TrunklineCarsLoadLinePhotoEntity::getLoadLineId).collect(Collectors.toSet()); - if(CollUtil.isNotEmpty(loadLineIdSet)){ - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.in("id",loadLineIdSet); - List carsLoadLineList = trunklineCarsLoadLineService.list(queryWrapper); - //把carsLoadLineList转化为以id为key的map - Map carsLoadLineMap = carsLoadLineList.stream().collect(Collectors.toMap(TrunklineCarsLoadLineEntity::getId, Function.identity())); - //把linePhotoEntityList中所有元素以loadLineId进行分组 - Map> linePhotoMap = linePhotoEntityList.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getLoadLineId)); + Map> linePhotoMap = linePhotoEntityList.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getLoadLineId)); + List loadLineEntityList = trunklineCarsLoadLineService.findListByLoadId(loadId); + List> resultList = new ArrayList<>(); - linePhotoMap.keySet().forEach(loadLineId -> { - Map map = new HashMap<>(); - List trunklineCarsLoadLinePhotoEntities = linePhotoMap.get(loadLineId); - TrunklineCarsLoadLineEntity trunklineCarsLoadLineEntity = carsLoadLineMap.get(loadLineId); - map.put("carsLoadLineEntity",trunklineCarsLoadLineEntity); - - - Map loadingMap = new HashMap<>(); - - //把trunklineCarsLoadLinePhotoEntities通过type=10进行过滤 - List ls = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(10)).collect(Collectors.toList()); - - //把qualityList通过position进行分组 -// List listQian = new ArrayList<>(); -// List listHou = new ArrayList<>(); -// List listZuo = new ArrayList<>(); -// List listYou = new ArrayList<>(); -// Map> listMap = ls.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getPosition)); -// listMap.keySet().forEach(key -> { -// List list = listMap.get(key); -// if(NumberUtil.equals(1,key)){//后 -// listQian.addAll(list); -// }else if(NumberUtil.equals(2,key)){//后 -// listHou.addAll(list); -// }else if(NumberUtil.equals(3,key)){ -// listZuo.addAll(list); -// }else if(NumberUtil.equals(4,key)){ -// listYou.addAll(list); -// } -// }); -// -// loadingMap.put("listQian",listQian); -// loadingMap.put("listHou",listHou); -// loadingMap.put("listZuo",listZuo); -// loadingMap.put("listYou",listYou); - -// Map loadingObject = new HashMap<>(); -// loadingObject.put("loadingList",ls); - - map.put("loadingObject",ls); - - //发车 -// Map qualityMap = new HashMap<>(); - - List qualityList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(20)).collect(Collectors.toList()); - //把qualityList通过position进行分组 -// List qualityListQian = new ArrayList<>(); -// List qualityListHou = new ArrayList<>(); -// List qualityListZuo = new ArrayList<>(); -// List qualityListYou = new ArrayList<>(); -// Map> qualityListMap = qualityList.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getPosition)); -// qualityListMap.keySet().forEach(key -> { -// List list = qualityListMap.get(key); -// if(NumberUtil.equals(1,key)){//后 -// qualityListQian.addAll(list); -// }else if(NumberUtil.equals(2,key)){//后 -// qualityListHou.addAll(list); -// }else if(NumberUtil.equals(3,key)){ -// qualityListZuo.addAll(list); -// }else if(NumberUtil.equals(4,key)){ -// qualityListYou.addAll(list); -// } -// }); -// -// qualityMap.put("qualityListQian",qualityListQian); -// qualityMap.put("qualityListHou",qualityListHou); -// qualityMap.put("qualityListZuo",qualityListZuo); -// qualityMap.put("qualityListYou",qualityListYou); - - -// Map yubuMap = new HashMap<>(); -// List yubuListQian = new ArrayList<>(); -// List yubuListHou = new ArrayList<>(); -// List yubuListZuo = new ArrayList<>(); -// List yubuListYou = new ArrayList<>(); - List yubuList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(21)).collect(Collectors.toList()); - //把qualityList通过position进行分组 -// Map> yubuListMap = yubuList.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getPosition)); -// yubuListMap.keySet().forEach(key -> { -// List list = yubuListMap.get(key); -// if(NumberUtil.equals(1,key)){//后 -// yubuListQian.addAll(list); -// }else if(NumberUtil.equals(2,key)){//后 -// yubuListHou.addAll(list); -// }else if(NumberUtil.equals(3,key)){ -// yubuListZuo.addAll(list); -// }else if(NumberUtil.equals(4,key)){ -// yubuListYou.addAll(list); -// } -// }); -// -// yubuMap.put("yubuListQian",yubuListQian); -// yubuMap.put("yubuListHou",yubuListHou); -// yubuMap.put("yubuListZuo",yubuListZuo); -// yubuMap.put("yubuListYou",yubuListYou); - - -// Map startObject = new HashMap<>(); -// startObject.put("qualityList",qualityList); -// startObject.put("yubuList",yubuList); - - map.put("startObject",qualityList.addAll(yubuList)); - - //卸车 - Map unloadQualityMap = new HashMap<>(); - - List unloadQualityList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(30)).collect(Collectors.toList()); - //把qualityList通过position进行分组 -// List unloadQualityListQian = new ArrayList<>(); -// List unloadQualityListHou = new ArrayList<>(); -// List unloadQualityListZuo = new ArrayList<>(); -// List unloadQualityListYou = new ArrayList<>(); -// Map> unloadQualityListMap = unloadQualityList.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getPosition)); -// qualityListMap.keySet().forEach(key -> { -// List list = unloadQualityListMap.get(key); -// if(NumberUtil.equals(1,key)){//后 -// unloadQualityListQian.addAll(list); -// }else if(NumberUtil.equals(2,key)){//后 -// unloadQualityListHou.addAll(list); -// }else if(NumberUtil.equals(3,key)){ -// unloadQualityListZuo.addAll(list); -// }else if(NumberUtil.equals(4,key)){ -// unloadQualityListYou.addAll(list); -// } -// }); -// -// unloadQualityMap.put("unloadQualityListQian",unloadQualityListQian); -// unloadQualityMap.put("unloadQualityListHou",unloadQualityListHou); -// unloadQualityMap.put("unloadQualityListZuo",unloadQualityListZuo); -// unloadQualityMap.put("unloadQualityListYou",unloadQualityListYou); - - -// Map protectionMap = new HashMap<>(); - - List protectionList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(31)).collect(Collectors.toList()); + if(CollUtil.isNotEmpty(loadLineEntityList)){ -// protectionMap.put("protectionList",protectionList); + loadLineEntityList.forEach(loadLineEntity -> { + Long loadLineId = loadLineEntity.getId(); -// Map unloadObject = new HashMap<>(); -// unloadObject.put("unloadQualityList",unloadQualityList); -// unloadObject.put("protectionList",protectionList); + Map map = new HashMap<>(); + map.put("carsLoadLineEntity",loadLineEntity); - map.put("unloadObject",unloadQualityList.addAll(protectionList)); + List trunklineCarsLoadLinePhotoEntities = linePhotoMap.get(loadLineId); + if(CollUtil.isNotEmpty(trunklineCarsLoadLinePhotoEntities)){ + List ls = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(10)).collect(Collectors.toList()); + map.put("loadingObject",ls); + List qualityList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(20)).collect(Collectors.toList()); + List yubuList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(21)).collect(Collectors.toList()); + qualityList.addAll(yubuList); + map.put("startObject",qualityList); + List unloadQualityList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(30)).collect(Collectors.toList()); + List protectionList = trunklineCarsLoadLinePhotoEntities.stream().filter(item -> item.getType().equals(31)).collect(Collectors.toList()); + unloadQualityList.addAll(protectionList); + map.put("unloadObject",unloadQualityList); + } resultList.add(map); + }); - } + } return R.data(resultList); } @@ -3560,6 +3439,19 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl pageList = baseMapper.carsLoadPageList(page, loadCarsDTO); List records = pageList.getRecords(); + //把records中所有元素的id放入一个List + List idList = records.stream().map(TrunklineCarsLoadVO::getId).collect(Collectors.toList()); + List carsLoadLinePhotoEntities = carsLoadLinePhotoService.findListByLoadIdListAndWarehouseId(idList,warehouseId); + Map> map = new HashMap<>(); + if(CollUtil.isNotEmpty(carsLoadLinePhotoEntities)){ + //把carsLoadLinePhotoEntities中所有元素通过loadId进行分组 + map = carsLoadLinePhotoEntities.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getLoadId)); + } + //循环records,获取字典值 for (TrunklineCarsLoadVO trunklineCarsLoadVO : records) { String loadStatus = trunklineCarsLoadVO.getLoadStatus(); @@ -4321,6 +4236,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl trunklineCarsLoadLinePhotoEntities = map.get(trunklineCarsLoadVO.getId()); + trunklineCarsLoadVO.setCarsLoadLinePhotoEntities(trunklineCarsLoadLinePhotoEntities); } pageList.setRecords(records); return R.data(pageList); @@ -7405,6 +7323,21 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl pageList = baseMapper.arriveUnloadPageList(page, loadCarsDTO); List records = pageList.getRecords(); + //把records中所有元素的id放入一个List + List idList = records.stream().map(TrunklineCarsLoadVO::getId).collect(Collectors.toList()); + List carsLoadLinePhotoEntities = carsLoadLinePhotoService.findListByLoadIdListAndWarehouseId(idList,warehouseId); + Map> map = new HashMap<>(); + if(CollUtil.isNotEmpty(carsLoadLinePhotoEntities)){ + //把carsLoadLinePhotoEntities中所有元素通过loadId进行分组 + map = carsLoadLinePhotoEntities.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getLoadId)); + } + for (TrunklineCarsLoadVO trunklineCarsLoadVO : records) { Long loadId = trunklineCarsLoadVO.getId(); TrunklineCarsLoadLineEntity carsLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId); @@ -11338,6 +11299,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl trunklineCarsLoadLinePhotoEntities = map.get(loadId); + trunklineCarsLoadVO.setCarsLoadLinePhotoEntities(trunklineCarsLoadLinePhotoEntities); } pageList.setRecords(records); return R.data(pageList); @@ -11510,6 +11474,21 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl downPackageCodeDTOS, Long warehouseId); + + BasicdataTrayEntity createTray(Long warehouseId, String warehouseCode); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java index 3bdc52dd4..ccbd04f1a 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java @@ -39,10 +39,7 @@ import com.logpm.warehouse.service.*; import com.logpm.warehouse.vo.*; import com.logpm.warehouse.wrapper.WarehouseTrayTypeWrapper; import lombok.extern.log4j.Log4j2; -import org.springblade.common.constant.DictBizConstant; -import org.springblade.common.constant.RedisKeyConstant; -import org.springblade.common.constant.TenantNum; -import org.springblade.common.constant.WorkNodeEnums; +import org.springblade.common.constant.*; import org.springblade.common.constant.apiwarehouse.PalletProductTypeConstant; import org.springblade.common.constant.broadcast.FanoutConstants; import org.springblade.common.constant.order.OrderFreezeStatusConstant; @@ -141,6 +138,8 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl Date: Wed, 11 Dec 2024 18:26:09 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/logpm/report/dto/IndexDTO.java | 2 ++ .../com/logpm/report/mapper/WarehouseIndexMapper.java | 3 +-- .../com/logpm/report/mapper/WarehouseIndexMapper.xml | 2 +- .../service/impl/WarehouseIndexServiceImpl.java | 11 ++++------- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/dto/IndexDTO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/dto/IndexDTO.java index 07c4af5f0..b3f8a173f 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/dto/IndexDTO.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/dto/IndexDTO.java @@ -10,6 +10,7 @@ import java.util.List; public class IndexDTO implements Serializable { private List warehouseIds; + private Long warehouseId; private Date startDate; private Date endDate; private String dayStr; @@ -18,6 +19,7 @@ public class IndexDTO implements Serializable { public String toString() { return "IndexDTO{" + "warehouseIds=" + warehouseIds + + ", warehouseId=" + warehouseId + ", startDate=" + startDate + ", endDate=" + endDate + ", dayStr='" + dayStr + '\'' + diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java index f5b4bfdf4..0bc720497 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java @@ -11,7 +11,6 @@ import org.apache.ibatis.annotations.Param; import java.math.BigDecimal; import java.util.List; -import java.util.Map; @Mapper public interface WarehouseIndexMapper { @@ -20,7 +19,7 @@ public interface WarehouseIndexMapper { BigDecimal findTotalFee(@Param("warehouseId") Long warehouseId); - JSONObject findFeeByDate(@Param("warehouseId") Long warehouseId); + JSONObject findFeeByDate(@Param("param") IndexDTO indexDTO); IndexHandOrderDataVO handOrderData(@Param("param") IndexDTO indexDTO); diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml index 682ff68fe..fbd050e85 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml @@ -43,7 +43,7 @@ and create_time <= #{param.endDate} - and destination_warehouse_id = #{warehouseId} + and destination_warehouse_id = #{param.warehouseId} diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java index 36b83ec8d..3bc3d45e7 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java @@ -7,7 +7,6 @@ import com.logpm.basicdata.feign.IBasicdataWarehouseClient; import com.logpm.report.dto.IndexDTO; import com.logpm.report.mapper.WarehouseIndexMapper; import com.logpm.report.service.IWarehouseIndexService; -import com.logpm.report.typepage.TimeType; import com.logpm.report.vo.*; import com.logpm.report.vo.indexCount.IndexDeliveryDataVO; import com.logpm.report.vo.indexCount.IndexOpenItemDataByWarWarehouseIdVO; @@ -15,19 +14,16 @@ import com.logpm.report.vo.indexCount.IndexOpenItemDataVO; import com.logpm.report.vo.indexCount.IndexSignforDataVO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.checkerframework.checker.units.qual.A; import org.jetbrains.annotations.NotNull; import org.springblade.common.cache.CacheNames; import org.springblade.common.utils.CommonUtil; import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.utils.AuthUtil; -import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springframework.stereotype.Service; import java.math.BigDecimal; -import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; @@ -209,12 +205,13 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService { if (Objects.isNull(indexOpenOrderIncomeVO)) { indexOpenOrderIncomeVO = new IndexOpenOrderIncomeVO(); BigDecimal totalFee = warehouseIndexMapper.findTotalFee(warehouseId); -//总收入 + //总收入 indexOpenOrderIncomeVO.setTotalFee(totalFee); //获取当天的开始时间 indexDTO.setStartDate(CommonUtil.getDayStart()); indexDTO.setEndDate(CommonUtil.getDayEnd()); - JSONObject incomeDay = warehouseIndexMapper.findFeeByDate(warehouseId); + indexDTO.setWarehouseId(warehouseId); + JSONObject incomeDay = warehouseIndexMapper.findFeeByDate(indexDTO); indexOpenOrderIncomeVO.setDayFee(incomeDay.getBigDecimal("fee")); indexOpenOrderIncomeVO.setDayBillladingFee(incomeDay.getBigDecimal("billladingFee")); indexOpenOrderIncomeVO.setDayInstallFee(incomeDay.getBigDecimal("installFee")); @@ -224,7 +221,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService { //获取当月的开始时间 indexDTO.setStartDate(CommonUtil.getMonthDayStart()); indexDTO.setEndDate(CommonUtil.getMonthDayEnd()); - JSONObject incomeMonth = warehouseIndexMapper.findFeeByDate(warehouseId); + JSONObject incomeMonth = warehouseIndexMapper.findFeeByDate(indexDTO); indexOpenOrderIncomeVO.setMonthFee(incomeMonth.getBigDecimal("fee")); indexOpenOrderIncomeVO.setMonthBillladingFee(incomeMonth.getBigDecimal("billladingFee")); indexOpenOrderIncomeVO.setMonthInstallFee(incomeMonth.getBigDecimal("installFee")); From 0b5f89e917dae1d7eff79d174704b8474d454eed Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Wed, 11 Dec 2024 18:35:02 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2=E6=8A=A5=E9=94=99?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/report/service/impl/WarehouseIndexServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java index 3bc3d45e7..d34f80db2 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java @@ -228,6 +228,8 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService { indexOpenOrderIncomeVO.setMonthTrunklineFee(incomeMonth.getBigDecimal("trunklineFee")); indexOpenOrderIncomeVO.setMonthWarehouseFee(incomeMonth.getBigDecimal("warehouseFee")); indexOpenOrderIncomeVO.setMonthDistributionFee(incomeMonth.getBigDecimal("distributionFee")); + indexOpenOrderIncomeVO.setWarehouseId(warehouseId); + indexOpenOrderIncomeVO.setWarehouseName(getCacheWarehouseName(warehouseId)); } data.add(indexOpenOrderIncomeVO); } From 33575a0ecb2345e965ea637f9d977bcb14ce8551 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Wed, 11 Dec 2024 19:45:00 +0800 Subject: [PATCH 5/5] =?UTF-8?q?1.=E5=B9=B2=E7=BA=BFbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml index b90fc6874..976c7dc3a 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml @@ -278,7 +278,9 @@ lww.waybill_type type, IFNULL( t.stock_num, 0 )-IFNULL( l.planNum,0) stockNum, IFNULL(TRUNCATE(lww.total_freight/lww.total_count,4),0) price, - IFNULL(TRUNCATE(lww.total_freight/lww.total_count,4),0)*(IFNULL( t.stock_num, 0 )-IFNULL( l.planNum,0)) freight + IFNULL(TRUNCATE(lww.total_freight/lww.total_count,4),0)*(IFNULL( t.stock_num, 0 )-IFNULL( l.planNum,0)) freight, + IF + ( NOW() > DATE_ADD( t.entry_time_start, INTERVAL 48 HOUR ), 1, 0 ) AS isTimeOut from (select ldpl.order_code, ldpl.waybill_id, ldpl.waybill_number, @@ -286,8 +288,7 @@ IF(ldsa.is_zero = 1,ldsa.hand_quantity,count(ldpl.id)) stock_num, max(ldpl.warehouse_entry_time_end) entry_time_end, min(ldpl.warehouse_entry_time_end) entry_time_start, - IF(ldsa.is_zero = 1,ldsa.trays,GROUP_CONCAT(DISTINCT ldpl.pallet)) tray_name, - if( NOW() > DATE_ADD(ldsa.warehouse_entry_time, INTERVAL 48 HOUR), 1,0) isTimeOut + IF(ldsa.is_zero = 1,ldsa.trays,GROUP_CONCAT(DISTINCT ldpl.pallet)) tray_name from logpm_distribution_stock_article ldsa left join logpm_distribution_parcel_list ldpl on ldsa.order_code = ldpl.order_code where ldpl.is_deleted = 0 @@ -387,7 +388,7 @@ and t.tray_name like concat('%',#{param.trayName},'%') - and (NOW() > DATE_ADD(ldsa.warehouse_entry_time, INTERVAL 48 HOUR))= ${param.isTimeOut} + and (NOW() > DATE_ADD(t.entry_time_start, INTERVAL 48 HOUR))= ${param.isTimeOut} order by t.entry_time_end asc