From e4c1e7acaa71f60618460ee09428a218bd41d652 Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Thu, 12 Dec 2024 14:24:35 +0800 Subject: [PATCH 1/4] =?UTF-8?q?1.=E6=88=90=E6=9C=AC=E5=88=86=E6=91=8A?= =?UTF-8?q?=E5=B9=BF=E6=92=AD=E5=8F=91=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/constant/WorkNodeEnums.java | 1 + .../constant/broadcast/FanoutConstants.java | 12 +++++ .../controller/CarsLoadController.java | 3 +- .../service/ICarsLoadAsyncService.java | 2 +- .../service/ITrunklineCarsLoadService.java | 2 +- .../impl/CarsLoadAsyncServiceImpl.java | 48 ++++++++++++++++++- .../impl/TrunklineCarsLoadServiceImpl.java | 29 ++++++++--- 7 files changed, 86 insertions(+), 11 deletions(-) diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java b/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java index c550660cb..893277c0b 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/WorkNodeEnums.java @@ -45,6 +45,7 @@ public enum WorkNodeEnums implements Serializable { SIGN_DIRECT_SHIPPER(105030,"直发商家签收"), END_WAREHOUSE_UNLOADING(105040, "末端仓卸车确认"), NO_STOCK_CAR(105050, "本车次少货"), + COST_SHARE(105060, "车次成本分摊"), SORTING_TRAYS(201010, "分拣打托"), UN_SORTING_TRAYS(201020, "包件解托"), diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java b/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java index 8a761b427..808b1b2e9 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/broadcast/FanoutConstants.java @@ -39,6 +39,18 @@ public abstract class FanoutConstants { } } + interface COSTSHARE { + // 交换机 + String EXCHANGE = "fanout.trunkline.costshare" + ModuleNameConstant.DEVAUTH; + + interface QUEUE { + + // 保存基础数据 + String REPORT_COSTSHARE = "fanout.trunkline.reportdata.report.costshare" + ModuleNameConstant.DEVAUTH; + + } + } + diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java index 48b9824b6..d16f466c5 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java @@ -2446,12 +2446,13 @@ public class CarsLoadController { return R.fail(405,"多仓权限无法操作,请选择仓库"); } loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId()); + loadCarsDTO.setWarehouseName(myCurrentWarehouse.getName()); if(Objects.isNull(loadId)){ log.warn(method+"配载id为空 loadId={}",loadId); return R.fail(405,"配载id为空"); } - return carsLoadService.costShareByLoadId(loadId); + return carsLoadService.costShareByLoadId(loadId,loadCarsDTO); }catch (CustomerException e){ log.error(e.message,e); return R.fail(e.code,e.message); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java index 9e43d17ea..755bdd997 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java @@ -11,7 +11,7 @@ public interface ICarsLoadAsyncService { void saveCostShareRecord(Long loadId, TrunklineCarsLoadEntity carsLoadEntity, Long userId, String tenantId, String deptId); - void costShareByLoadId(Long loadId,TrunklineCarsLoadEntity carsLoadEntity); + void costShareByLoadId(Long loadId,TrunklineCarsLoadEntity carsLoadEntity,Long warehouseId,String warehouseName); void abnormalListStartCarByLoadIdAndWarehouseId(Long loadId, Long warehouseId,Long userId,Long deptId,String nickName,String tenantId,String warehouseName); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java index b5d92667f..7690c94e9 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java @@ -188,7 +188,7 @@ public interface ITrunklineCarsLoadService extends BaseService list, Long userId, String nickName, Long warehouseId, String warehouseName, TrunklineCarsLoadEntity carsLoadEntity) { + NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); + nodeFanoutMsg.setNode(WorkNodeEnums.COST_SHARE); + nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); + nodeFanoutMsg.setOperator(nickName); + nodeFanoutMsg.setOperatorId(userId); + nodeFanoutMsg.setWarehouse(warehouseName); + nodeFanoutMsg.setWarehouseId(warehouseId); + nodeFanoutMsg.setOperatorTime(new Date()); + + //组装包件数据 + + JSONObject json = JSONObject.parseObject(JSONObject.toJSONString(carsLoadEntity)); + +// List packageDataList = new ArrayList<>(); + +// list.forEach(costShareRecordEntity -> { +// PackageData packageData = new PackageData(); +// Integer productType = costShareRecordEntity.getProductType(); +// if(productType == 1){ +// +// }else if(productType == 2){ +// +// } +// +// +// packageData.setPackageCode(packageCode); +// packageData.setNumber(1); +// packageData.setPackageType(PackageTypeEnums.CMP); +// packageDataList.add(packageData); +// }); + + json.put("details", list); + + nodeFanoutMsg.setMain(json); + + FanoutMsg fanoutMsg = FanoutMsg.builder().exchange(FanoutConstants.trunkline.COSTSHARE.EXCHANGE).msg(JSONObject.toJSONString(nodeFanoutMsg)).build(); + + sendFanoutService.sendFanoutMsg(fanoutMsg); + } @LogpmAsync("asyncExecutor") 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 768a94ea9..531b61c9e 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 @@ -2316,6 +2316,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl linePhotoEntityList = carsLoadLinePhotoService.findListByLoadIdAndWarehouseId(loadId, null, null, null); Map> linePhotoMap = linePhotoEntityList.stream().collect(Collectors.groupingBy(TrunklineCarsLoadLinePhotoEntity::getLoadLineId)); @@ -2333,6 +2339,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl map = new HashMap<>(); map.put("carsLoadLineEntity",loadLineEntity); + map.put("nowWarehouseId",carsLoadEntity.getNowWarehouseId()); List trunklineCarsLoadLinePhotoEntities = linePhotoMap.get(loadLineId); @@ -9208,11 +9215,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl abnormalList = abnormalRecordClient.findAbnormalList(carsNo); + if(CollUtil.isNotEmpty(abnormalList)){ + log.warn("#################costShareByLoadId: 该车次还有异常列表未处理 loadId={}", loadId); + return R.fail(405, "该车次还有异常列表未处理"); + } + List noDataList = trunklineCarsLoadScanService.findListNoDataByLoadId(loadId); int size = noDataList.size(); if (size != 0) { @@ -9738,7 +9753,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl Date: Thu, 12 Dec 2024 18:51:26 +0800 Subject: [PATCH 2/4] =?UTF-8?q?1.=E5=BC=80=E5=8D=95=E5=8F=8A=E6=97=B6?= =?UTF-8?q?=E7=8E=87=202.=E5=AE=A1=E5=8D=95=E5=8F=8A=E6=97=B6=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ReportTimeController.java | 52 +++++ .../com/logpm/report/dto/ReportTimeDTO.java | 27 +++ .../logpm/report/mapper/ReportTimeMapper.java | 23 ++ .../logpm/report/mapper/ReportTimeMapper.xml | 219 ++++++++++++++++++ .../report/service/IReportTimeService.java | 18 ++ .../service/impl/ReportTimeServiceImpl.java | 90 +++++++ .../report/vo/ReportCheckWaybillTimeVO.java | 37 +++ .../com/logpm/report/vo/ReportOpenTimeVO.java | 45 ++++ .../mapper/TrunklineCarsLoadMapper.xml | 1 + ...TrunklineBillladingWaybillServiceImpl.java | 6 +- 10 files changed, 515 insertions(+), 3 deletions(-) create mode 100644 blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportTimeController.java create mode 100644 blade-service/logpm-report/src/main/java/com/logpm/report/dto/ReportTimeDTO.java create mode 100644 blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.java create mode 100644 blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml create mode 100644 blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportTimeService.java create mode 100644 blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportTimeServiceImpl.java create mode 100644 blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportCheckWaybillTimeVO.java create mode 100644 blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOpenTimeVO.java diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportTimeController.java b/blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportTimeController.java new file mode 100644 index 000000000..782600ae9 --- /dev/null +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportTimeController.java @@ -0,0 +1,52 @@ +package com.logpm.report.controller; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.logpm.report.dto.ReportTimeDTO; +import com.logpm.report.service.IReportTimeService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; + +@RestController +@AllArgsConstructor +@RequestMapping("/reportTime") +@Api(value = "时效报表", tags = "时效报表") +public class ReportTimeController extends BladeController { + + private final IReportTimeService reportTimeService; + + @PostMapping("/openTimePage") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "开单时效报表", notes = "开单时效报表") + public R openTimePage(@RequestBody ReportTimeDTO reportTimeDTO) { + return reportTimeService.openTimePage(reportTimeDTO); + } + + @PostMapping("/openTimeExport") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "开单时效报表导出", notes = "开单时效报表导出") + public void openTimeExport(@RequestBody ReportTimeDTO reportTimeDTO, HttpServletResponse response) { + reportTimeService.openTimeExport(reportTimeDTO,response); + } + + @PostMapping("/checkWaybillTimePage") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "审单时效报表", notes = "审单时效报表") + public R checkWaybillTimePage(@RequestBody ReportTimeDTO reportTimeDTO) { + return reportTimeService.checkWaybillTimePage(reportTimeDTO); + } + + @PostMapping("/checkWaybillTimeExport") + @ApiOperationSupport(order = 1) + @ApiOperation(value = "审单时效报表导出", notes = "审单时效报表导出") + public void checkWaybillTimeExport(@RequestBody ReportTimeDTO reportTimeDTO, HttpServletResponse response) { + reportTimeService.checkWaybillTimeExport(reportTimeDTO,response); + } + + +} diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/dto/ReportTimeDTO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/dto/ReportTimeDTO.java new file mode 100644 index 000000000..750f1605b --- /dev/null +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/dto/ReportTimeDTO.java @@ -0,0 +1,27 @@ +package com.logpm.report.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +@Data +public class ReportTimeDTO implements Serializable { + + private Integer pageNum; + private Integer pageSize; + + private List businessLineList; + private List brandList; + private List warehouseIds; + private List departureWarehouseIds; + private List destinationWarehouseIds; + + private String startTimeStr; + private String endTimeStr; + + private Date startTime; + private Date endTime; + +} diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.java b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.java new file mode 100644 index 000000000..6319984c0 --- /dev/null +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.java @@ -0,0 +1,23 @@ +package com.logpm.report.mapper; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.logpm.report.dto.ReportTimeDTO; +import com.logpm.report.vo.ReportCheckWaybillTimeVO; +import com.logpm.report.vo.ReportOpenTimeVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface ReportTimeMapper { + + + IPage openTimePage(IPage page,@Param("param") ReportTimeDTO reportTimeDTO); + + List openTimeExport(@Param("param") ReportTimeDTO reportTimeDTO); + + IPage checkWaybillTimePage(IPage page, @Param("param") ReportTimeDTO reportTimeDTO); + + List checkWaybillTimeExport(@Param("param") ReportTimeDTO reportTimeDTO); +} diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml new file mode 100644 index 000000000..5afd7822f --- /dev/null +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml @@ -0,0 +1,219 @@ + + + + + + + + + + + + + diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportTimeService.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportTimeService.java new file mode 100644 index 000000000..8bc490bf8 --- /dev/null +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/IReportTimeService.java @@ -0,0 +1,18 @@ +package com.logpm.report.service; + +import com.logpm.report.dto.ReportTimeDTO; +import org.springblade.core.tool.api.R; + +import javax.servlet.http.HttpServletResponse; + +public interface IReportTimeService { + + + R openTimePage(ReportTimeDTO reportTimeDTO); + + void openTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response); + + R checkWaybillTimePage(ReportTimeDTO reportTimeDTO); + + void checkWaybillTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response); +} diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportTimeServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportTimeServiceImpl.java new file mode 100644 index 000000000..3a70a81db --- /dev/null +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportTimeServiceImpl.java @@ -0,0 +1,90 @@ +package com.logpm.report.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.logpm.report.dto.ReportTimeDTO; +import com.logpm.report.mapper.ReportTimeMapper; +import com.logpm.report.service.IReportTimeService; +import com.logpm.report.vo.ReportCheckWaybillTimeVO; +import com.logpm.report.vo.ReportOpenTimeVO; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.common.utils.CommonUtil; +import org.springblade.core.excel.util.ExcelUtil; +import org.springblade.core.tool.api.R; +import org.springframework.stereotype.Service; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +@Service +@Slf4j +@AllArgsConstructor +public class ReportTimeServiceImpl implements IReportTimeService { + + private final ReportTimeMapper reportTimeMapper; + + + @Override + public R openTimePage(ReportTimeDTO reportTimeDTO) { + + IPage page = new Page<>(); + page.setCurrent(reportTimeDTO.getPageNum()); + page.setSize(reportTimeDTO.getPageSize()); + + reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr())); + reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr())); + + IPage iPage = reportTimeMapper.openTimePage(page,reportTimeDTO); + + + return R.data(iPage); + } + + @Override + public void openTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response) { + + IPage page = new Page<>(); + page.setCurrent(reportTimeDTO.getPageNum()); + page.setSize(reportTimeDTO.getPageSize()); + + reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr())); + reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr())); + + List list = reportTimeMapper.openTimeExport(reportTimeDTO); + + //导出ls + ExcelUtil.export(response, "开单及时率报表导出", "开单及时率报表导出", list, ReportOpenTimeVO.class); + + } + + @Override + public R checkWaybillTimePage(ReportTimeDTO reportTimeDTO) { + IPage page = new Page<>(); + page.setCurrent(reportTimeDTO.getPageNum()); + page.setSize(reportTimeDTO.getPageSize()); + + reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr())); + reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr())); + + IPage iPage = reportTimeMapper.checkWaybillTimePage(page,reportTimeDTO); + + + return R.data(iPage); + } + + @Override + public void checkWaybillTimeExport(ReportTimeDTO reportTimeDTO, HttpServletResponse response) { + IPage page = new Page<>(); + page.setCurrent(reportTimeDTO.getPageNum()); + page.setSize(reportTimeDTO.getPageSize()); + + reportTimeDTO.setStartTime(CommonUtil.getStartByDateStr(reportTimeDTO.getStartTimeStr())); + reportTimeDTO.setEndTime(CommonUtil.getEndByDateStr(reportTimeDTO.getEndTimeStr())); + + List list = reportTimeMapper.checkWaybillTimeExport(reportTimeDTO); + + //导出ls + ExcelUtil.export(response, "审单及时率报表导出", "审单及时率报表导出", list, ReportCheckWaybillTimeVO.class); + } +} diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportCheckWaybillTimeVO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportCheckWaybillTimeVO.java new file mode 100644 index 000000000..acd704b0a --- /dev/null +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportCheckWaybillTimeVO.java @@ -0,0 +1,37 @@ +package com.logpm.report.vo; + +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ReportCheckWaybillTimeVO implements Serializable { + + @ExcelProperty(value = "事业线") + private String businessLine; + @ExcelIgnore + private Long departureWarehouseId; + @ExcelProperty(value = "发站仓") + private String departureWarehouseName; + @ExcelIgnore + private Long destinationWarehouseId; + @ExcelProperty(value = "目的仓") + private String destinationWarehouseName; + @ExcelProperty(value = "品牌") + private String brand; + @ExcelProperty(value = "总运单数") + private Integer totalNum; + @ExcelProperty(value = "已审单数") + private Integer hasCheckNum; + @ExcelProperty(value = "审单率") + private String hasCheckRate; + @ExcelProperty(value = "准时审单数") + private Integer onTimeCheckNum; + @ExcelProperty(value = "审单准时率") + private String onTimeCheckRate; + @ExcelProperty(value = "平均审单时效") + private String avgCheckTime; + +} diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOpenTimeVO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOpenTimeVO.java new file mode 100644 index 000000000..18e51fcbd --- /dev/null +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOpenTimeVO.java @@ -0,0 +1,45 @@ +package com.logpm.report.vo; + +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ReportOpenTimeVO implements Serializable { + + @ExcelProperty(value = "事业线") + private String businessLine; + @ExcelIgnore + private Long warehouseId; + @ExcelProperty(value = "导入仓库") + private String warehouseName; + @ExcelProperty(value = "品牌") + private String brand; + @ExcelProperty(value = "总单数") + private Integer totalNum; + @ExcelProperty(value = "已开单数") + private Integer hasOpenNum; + @ExcelProperty(value = "未开单数") + private Integer noOpenNum; + @ExcelProperty(value = "未开单占比") + private String noOpenRate; + @ExcelProperty(value = "未开单已冻结数") + private Integer noOpenHasFreezeNum; + @ExcelProperty(value = "未开单已冻结占比") + private String noOpenHasFreezeRate; + @ExcelProperty(value = "未开单未处理数") + private Integer noOpenNoFreezeNum; + @ExcelProperty(value = "未处理占比") + private String noOpenNoFreezeRate; + @ExcelProperty(value = "准时开单数") + private Integer onTimeNum; + @ExcelProperty(value = "超期开单数") + private Integer overTimeNum; + @ExcelProperty(value = "开单准时率") + private String onTimeRate; + @ExcelProperty(value = "平均开单时效") + private String avgTime; + +} 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 976c7dc3a..e5e42fda0 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 @@ -470,6 +470,7 @@ left join logpm_distribution_parcel_list ldpl on ltco.order_code = ldpl.order_code and ldpl.waybill_number = ltco.waybill_no where ltco.load_id = #{param.loadId} and ltco.final_node_id = #{param.finalNodeId} + and ldpl.warehouse_id = #{param.warehouseId} and ldpl.is_deleted = 0 group by ltco.id, ltco.order_code, diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java index ad2d14ad1..35d550e7a 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingWaybillServiceImpl.java @@ -78,16 +78,16 @@ public class TrunklineBillladingWaybillServiceImpl extends BaseServiceImpl 0){ - price = totalFee.divide(new BigDecimal(realNum),2, RoundingMode.UP); + price = totalFee.divide(new BigDecimal(realNum),8, RoundingMode.HALF_UP); } }else if ("2".equals(chargeType)){ if(realWeight.compareTo(BigDecimal.ZERO) > 0){ - price = totalFee.divide(realWeight,4, RoundingMode.UP); + price = totalFee.divide(realWeight,8, RoundingMode.HALF_UP); } }else if("3".equals(chargeType)){ if(realVolume.compareTo(BigDecimal.ZERO) > 0){ - price = totalFee.divide(realVolume,4, RoundingMode.UP); + price = totalFee.divide(realVolume,8,RoundingMode.HALF_UP); } } From 347ea50e85ebd60bf1b7338568c4751626d1b8ef Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Thu, 12 Dec 2024 18:59:15 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/DistributionReservationMapper.xml | 2 +- .../report/service/impl/WarehouseIndexServiceImpl.java | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml index 79da9167b..b04df26c8 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml @@ -632,7 +632,7 @@ logpm_distribution_reservation_stocklist AS ldrs INNER JOIN logpm_distribution_stock_list AS ldsl ON ldrs.stocklist_id = ldsl.id AND ldsl.is_deleted = 0 INNER JOIN logpm_dis_stock_list_detail AS ldsld ON ldrs.reservation_id = ldsld.reservation_id AND ldsld.is_deleted = 0 AND ldsld.stock_package_status != 2 - ldrs.stocklist_id = ldsl.id + AND ldrs.stocklist_id = ldsl.id WHERE ldrs.is_deleted = 0 AND ldrs.reservation_id = #{reservationId} 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 0de77067e..b413e1153 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 @@ -199,7 +199,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService { for (Long warehouseId : indexDTO.getWarehouseIds()) { - String key = CacheNames.tenantKey(AuthUtil.getTenantId(), "openOrderIncome", "warehouseId:" + warehouseId); + String key = CacheNames.tenantKey(AuthUtil.getTenantId(), "openOrderIncome", "warehouseId:" + warehouseId); // 查询每个仓库的数据 IndexOpenOrderIncomeVO indexOpenOrderIncomeVO = bladeRedis.get(key); if (Objects.isNull(indexOpenOrderIncomeVO)) { @@ -498,13 +498,10 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService { indexTrunklineHandOrderDataVO.setHandleNum(packageHandleNum + zeroHandleNum); indexTrunklineHandOrderDataVO.setHandleWeight(packageHandleWeight.add(zeroHandleWeight)); indexTrunklineHandOrderDataVO.setHandleVolume(packageHandleVolume.add(zeroHandleVolume)); - indexTrunklineHandOrderDataVO.setWarehouseName(getCacheWarehouseName(indexTrunklineHandOrderDataVO.getWarehouseId())); - - data.add(indexTrunklineHandOrderDataVO); bladeRedis.setEx(key, indexTrunklineHandOrderDataVO, 3600L); } - + data.add(indexTrunklineHandOrderDataVO); }); return data; } @@ -935,7 +932,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService { carsStattisNumVO.setWarehouseId(warehouseId); carsStattisNumVO.setWarehouseName(getCacheWarehouseName(warehouseId)); - + bladeRedis.setEx(key, carsStattisNumVO, 3600L); } data.add(carsStattisNumVO); } From 5d664c223f61e5075ce7d0035a9f2e4e9048cf8f Mon Sep 17 00:00:00 2001 From: zhenghaoyu Date: Fri, 13 Dec 2024 12:00:07 +0800 Subject: [PATCH 4/4] =?UTF-8?q?1.bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/logpm/report/mapper/ReportIncomingMapper.xml | 2 +- .../com/logpm/trunkline/mq/waybil/StatusLogListener.java | 5 ----- .../service/impl/TrunklineCarsLoadServiceImpl.java | 8 +++++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportIncomingMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportIncomingMapper.xml index 2a406b676..efe3279a8 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportIncomingMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportIncomingMapper.xml @@ -243,7 +243,7 @@ MONTH(lww.document_making_time) - select waw.business_line businessLine, lww.departure_warehouse_name departureWarehouseName, lww.destination_warehouse_name destinationWarehouseName, diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/waybil/StatusLogListener.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/waybil/StatusLogListener.java index d77fd3a88..e4127b8f2 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/waybil/StatusLogListener.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/waybil/StatusLogListener.java @@ -5,9 +5,6 @@ import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; import com.logpm.trunkline.dto.WaybillLogDTO; -import com.logpm.trunkline.feign.ITrunklineWaybillTrackClient; -import com.logpm.trunkline.mapper.TrunklineWaybillPackageMapper; -import com.logpm.trunkline.service.ITrunklineWaybillPackageService; import com.logpm.trunkline.service.ITrunklineWaybillTrackService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -23,7 +20,6 @@ import org.springframework.amqp.rabbit.annotation.Queue; import org.springframework.amqp.rabbit.annotation.QueueBinding; import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; import java.util.*; import java.util.stream.Collectors; @@ -110,7 +106,6 @@ public class StatusLogListener { value = @Queue(name = FanoutConstants.distribution.DeliveryAndrecheck.QUEUE.waybillStatusLog, durable = "true"), exchange = @Exchange(name = FanoutConstants.distribution.DeliveryAndrecheck.EXCHANGE, type = ExchangeTypes.FANOUT) )) - @Transactional(rollbackFor = Exception.class) public void statusDekiveryLog(String msg) { log.info("商/市配送 复核处理运单日志和状态: {}", msg); 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 531b61c9e..5234b7a03 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 @@ -5527,9 +5527,11 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl