diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java index 22351e715..4df44affe 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java @@ -19,7 +19,6 @@ package com.logpm.distribution.service; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.aftersales.vo.AftersalesAbnormalPackageVO; -import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.distribution.bean.Resp; import com.logpm.distribution.dto.DistributionDeliveryExcelDTO; import com.logpm.distribution.dto.DistributionDeliveryListDTO; @@ -30,19 +29,34 @@ import com.logpm.distribution.entity.DistributionDeliverySelfEntity; import com.logpm.distribution.entity.DistributionLoadscanEntity; import com.logpm.distribution.entity.DistributionParcelListEntity; import com.logpm.distribution.excel.DistributionDeliveryListExcel; -import com.logpm.distribution.vo.*; -import com.logpm.distribution.vo.app.*; +import com.logpm.distribution.vo.DisStockListDetailVO; +import com.logpm.distribution.vo.DistributionDeliveryInfoVO; +import com.logpm.distribution.vo.DistributionDeliveryListPrintReponseVO; +import com.logpm.distribution.vo.DistributionDeliveryListPrintRequestVO; +import com.logpm.distribution.vo.DistributionDeliveryListVO; +import com.logpm.distribution.vo.DistributionDeliverySelfVO; +import com.logpm.distribution.vo.DistributionDeliveryWordVO; +import com.logpm.distribution.vo.DistributionOrderInfoVO; +import com.logpm.distribution.vo.DistributionParcelListVO; +import com.logpm.distribution.vo.DistributionReservationStocklistVO; +import com.logpm.distribution.vo.DistributionStockArticleVO; +import com.logpm.distribution.vo.DistributionstatisticsnmbVO; +import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO; +import com.logpm.distribution.vo.app.DistributionAppDeliverySelfVO; +import com.logpm.distribution.vo.app.DistributionAppReservationVO; import com.logpm.distribution.vo.print.PrintPreviewVO; -import com.logpm.warehouse.entity.WarehouseRetentionRecordEntity; -import com.logpm.warehouse.entity.WarehouseRetentionScanEntity; import org.springblade.common.enums.BizOperationEnums; -import org.springblade.common.model.*; +import org.springblade.common.model.DistributionTaskVO; +import org.springblade.common.model.NodeFanoutMsg; +import org.springblade.common.model.PlanDriverbindCarVO; +import org.springblade.common.model.ReservationVO; import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.BladeUser; import org.springblade.core.tool.api.R; import java.text.ParseException; +import java.util.Date; import java.util.List; import java.util.Map; @@ -181,7 +195,7 @@ public interface IDistributionDeliveryListService extends BaseService updateDeliveryListInfo(DistributionDeliveryListDTO deliveryListDTO); - NodeFanoutMsg buildNodeFanoutMsgForPlan(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user, BizOperationEnums bizOperation); + NodeFanoutMsg buildNodeFanoutMsgForPlan(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user, BizOperationEnums bizOperation, Date operTime); /** * App-配送库存品装车 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java index 995989d82..b0ff7d95b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java @@ -34,6 +34,7 @@ import org.springblade.core.secure.BladeUser; import org.springblade.core.tool.api.R; import org.springblade.system.entity.User; +import java.util.Date; import java.util.List; import java.util.Map; @@ -319,7 +320,7 @@ public interface IDistributionStockupService extends BaseService buildStockUpNodeData(DistributionStockupEntity distributionStockupEntity, DistributionStockEntity entity ,DistributionParcelListEntity parcelListEntitys); + NodeFanoutMsg buildStockUpNodeData(DistributionStockupEntity distributionStockupEntity, DistributionStockEntity entity , DistributionParcelListEntity parcelListEntitys, Date operTime); /** * 处理配送备货扫描 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index ea7b62fe5..5d414a37f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -1184,10 +1184,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl pushNodeList){ + private void sendBuildNodeFanoutMsgByPackage(DistributionDeliveryListEntity distributionDeliveryListEntity, List pushNodeList, Date operTime){ // 提供预约单 Map> collect = pushNodeList.stream().collect(Collectors.groupingBy(DistributionLoadscanEntity::getReservationId)); if(collect.isEmpty()){ @@ -1197,7 +1199,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl list = collect.get(key); DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(key); - NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByPackageByReservationCode(distributionDeliveryListEntity, list, reservationEntity.getReservationCode()); + NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByPackageByReservationCode(distributionDeliveryListEntity, list, reservationEntity.getReservationCode(), operTime); distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser()); } @@ -1205,14 +1207,15 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl buildNodeFanoutMsgByPackageByReservationCode(DistributionDeliveryListEntity distributionDeliveryListEntity, List pushNodeList,String reservationCode) { + private NodeFanoutMsg buildNodeFanoutMsgByPackageByReservationCode(DistributionDeliveryListEntity distributionDeliveryListEntity, List pushNodeList, + String reservationCode, Date operatorTime) { NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_LOADING); nodeFanoutMsg.setWarehouse(distributionDeliveryListEntity.getWarehouseName()); nodeFanoutMsg.setWarehouseId(distributionDeliveryListEntity.getWarehouseId()); nodeFanoutMsg.setOperator(AuthUtil.getNickName()); - nodeFanoutMsg.setOperatorTime(distributionDeliveryListEntity.getUpdateTime()); + nodeFanoutMsg.setOperatorTime(operatorTime); // DistributionTaskVO taskVO = buildDistributionTaskVO(distributionDeliveryListEntity, AuthUtil.getUserId()); DistributionLoadVO distributionLoadVO = new DistributionLoadVO(); @@ -1324,14 +1327,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl buildNodeFanoutMsgByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, List ts,String reservationCode) { + private NodeFanoutMsg buildNodeFanoutMsgByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, + List ts, + String reservationCode, Date operTime) { NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_LOADING); nodeFanoutMsg.setWarehouse(distributionDeliveryListEntity.getWarehouseName()); nodeFanoutMsg.setWarehouseId(distributionDeliveryListEntity.getWarehouseId()); nodeFanoutMsg.setOperator(AuthUtil.getNickName()); - nodeFanoutMsg.setOperatorTime(distributionDeliveryListEntity.getCreateTime()); + nodeFanoutMsg.setOperatorTime(operTime); // DistributionTaskVO taskVO = buildDistributionTaskVO(distributionDeliveryListEntity, AuthUtil.getUserId()); // nodeFanoutMsg.setMain(taskVO); @@ -1481,7 +1486,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl ts){ + private void sendBuildNodeFanoutMsgByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, List ts, Date operTime){ Map> collect = ts.stream().collect(Collectors.groupingBy(DistributionLoadscaninvnEntity::getReservationId)); @@ -1887,7 +1893,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl list = collect.get(key); DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(key); - NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByStock(distributionDeliveryListEntity, list,reservationEntity.getReservationCode()); + NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByStock(distributionDeliveryListEntity, list,reservationEntity.getReservationCode(), operTime); distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser()); } @@ -2001,6 +2007,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl ts = new ArrayList<>(); + Date operTime = new Date(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); if (Func.isEmpty(myCurrentWarehouse)) { return Resp.scanFail("未授权", "未授权!!!"); @@ -2107,7 +2114,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl logs = new ArrayList<>(); List pushDatas = new ArrayList<>(); //查询出原来配送信息的备货任务 @@ -2786,7 +2794,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl allPackageList = new ArrayList<>(); List allZeroPackageList = new ArrayList<>(); StringBuilder saa = new StringBuilder(); @@ -2833,9 +2841,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgForPlan(deliveryListEntity, AuthUtil.getUser(), BizOperationEnums.MODIFY); + NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgForPlan(deliveryListEntity, AuthUtil.getUser(), BizOperationEnums.MODIFY, operTime); DistributionTaskVO main = nodeFanoutMsg.getMain(); List reservationVOList = main.getReservationVOList(); if (CollUtil.isNotEmpty(reservationVOList)) { @@ -3760,14 +3768,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl buildNodeFanoutMsgForPlan(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user, BizOperationEnums bizOperation) { + public NodeFanoutMsg buildNodeFanoutMsgForPlan(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user, BizOperationEnums bizOperation, Date operTime) { NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); nodeFanoutMsg.setBizOperation(bizOperation); nodeFanoutMsg.setNode(WorkNodeEnums.PLAN_DELIVERY); nodeFanoutMsg.setWarehouse(distributionDeliveryListEntity.getWarehouseName()); nodeFanoutMsg.setWarehouseId(distributionDeliveryListEntity.getWarehouseId()); nodeFanoutMsg.setOperator(user.getNickName()); - nodeFanoutMsg.setOperatorTime(distributionDeliveryListEntity.getCreateTime()); + nodeFanoutMsg.setOperatorTime(operTime); DistributionTaskVO distributionTaskVO = getDistributionTaskVO(distributionDeliveryListEntity); List planDriverbindCarVOS = buildDeliveryCarDriverInfor(distributionDeliveryListEntity); distributionTaskVO.setPlanDriverbindCars(planDriverbindCarVOS); @@ -4045,7 +4053,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl reservationDTOS = baseMapper.selectReservationByDeliveryListId(deliveryListDTO.getId()); @@ -4067,13 +4075,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl newstockUpIds = new ArrayList<>(); @@ -4275,7 +4283,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgForPlan(deliveryListEntity, AuthUtil.getUser(), BizOperationEnums.MODIFY); + NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgForPlan(deliveryListEntity, AuthUtil.getUser(), BizOperationEnums.MODIFY, operTime); distributionNodeWorkService.planDelivery(nodeFanoutMsg, AuthUtil.getUser()); //进行日志记录 @@ -4834,6 +4842,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl nodeFanoutMsg = builderNodeFanoutMsgByCarStart(distributionDeliveryListEntity, user); + NodeFanoutMsg nodeFanoutMsg = builderNodeFanoutMsgByCarStart(distributionDeliveryListEntity, user, operTime); distributionNodeWorkService.carStart(nodeFanoutMsg, user); } catch (NumberFormatException e) { log.error(">>>>>>>>>>>>>>>>>>>>>>>>>> 发车异常", e); @@ -5118,14 +5127,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl builderNodeFanoutMsgByCarStart(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user) { + private NodeFanoutMsg builderNodeFanoutMsgByCarStart(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user, Date operTime) { NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg<>(); nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); nodeFanoutMsg.setNode(WorkNodeEnums.DISTRIBUTION_CAR_START); nodeFanoutMsg.setWarehouse(distributionDeliveryListEntity.getWarehouseName()); nodeFanoutMsg.setWarehouseId(distributionDeliveryListEntity.getWarehouseId()); nodeFanoutMsg.setOperator(AuthUtil.getNickName()); - nodeFanoutMsg.setOperatorTime(distributionDeliveryListEntity.getUpdateTime()); + nodeFanoutMsg.setOperatorTime(operTime); List planDriverbindCarVOS = buildDeliveryCarDriverInfor(distributionDeliveryListEntity); String driverName = distributionDeliveryListEntity.getDriverName(); @@ -5170,6 +5179,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl 0){ return R.fail("存在装车或签收数据无法进行配送取消!!!"); } + Date operTime = new Date(); List distributionSignforEntities = distributionSignforServicer.getBaseMapper().selectList(Wrappers.query().lambda().eq(DistributionSignforEntity::getDeliveryId, deliveryListEntity.getId())); BladeUser user = AuthUtil.getUser(); List reservationList = new ArrayList<>(); @@ -5220,7 +5230,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl distributionTaskVONodeFanoutMsg = buildNodeFanoutMsgForPlan(deliveryListEntity, user, BizOperationEnums.DELETE); + NodeFanoutMsg distributionTaskVONodeFanoutMsg = buildNodeFanoutMsgForPlan(deliveryListEntity, user, BizOperationEnums.DELETE, operTime); distributionNodeWorkService.planDelivery(distributionTaskVONodeFanoutMsg, AuthUtil.getUser()); return R.status(true); } @@ -5956,6 +5966,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl orderPackageCodes = new ArrayList<>(); List pushNodeList = new ArrayList<>(); List aaa = new ArrayList<>(); + Date operTime = new Date(); + String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(operTime); if (Func.isNotEmpty(parcelListEntities) && parcelListEntities.size() == 1) { DistributionParcelListEntity parcelListEntity = parcelListEntities.get(0); if (OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(parcelListEntity.getOrderPackageLoadingStatus())) { @@ -5988,8 +6000,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl 1) { return Resp.scanFail("操作失败", "重复添加"); } - - String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()); BladeUser user = AuthUtil.getUser(); DistributionLoadscanEntity loadscanEntity = new DistributionLoadscanEntity(); DistributionReservationEntity reservationEntity = null; @@ -6033,7 +6043,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl orderCodes = new ArrayList<>(); switch (type) { case 1: @@ -9086,7 +9098,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl reservationStockarticleEntityList = distributionReservationMapper.selectStockArticleByReservationId(distrilbutionloadingscanDTO.getReservationId()); @@ -9309,7 +9321,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl nodeFanoutMsg = distributionDeliveryListService.buildNodeFanoutMsgForPlan(distributionDeliveryListEntity, AuthUtil.getUser(), BizOperationEnums.ADD); + NodeFanoutMsg nodeFanoutMsg = distributionDeliveryListService.buildNodeFanoutMsgForPlan(distributionDeliveryListEntity, AuthUtil.getUser(), BizOperationEnums.ADD, operTime); distributionNodeWorkService.planDelivery(nodeFanoutMsg, AuthUtil.getUser()); //日志记录 @@ -2282,12 +2331,13 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl aaa = new ArrayList<>(); StringBuffer saa = new StringBuffer(); mallClient.forEach((k, v) -> { @@ -2771,7 +2821,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl nodeFanoutMsg = distributionDeliveryListService.buildNodeFanoutMsgForPlan(distributionDeliveryListEntity, AuthUtil.getUser(), BizOperationEnums.ADD); + NodeFanoutMsg nodeFanoutMsg = distributionDeliveryListService.buildNodeFanoutMsgForPlan(distributionDeliveryListEntity, AuthUtil.getUser(), BizOperationEnums.ADD, operTime); distributionNodeWorkService.planDelivery(nodeFanoutMsg, AuthUtil.getUser()); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 8aefbbb30..7886fba9f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -5207,7 +5207,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl packageIds = new ArrayList<>(); List orderCodes = new ArrayList<>(); if (Func.isNotEmpty(parcelListEntityList)) { @@ -5594,14 +5595,14 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgByOneClick(distributionDeliveryListEntity, reservationEntity, distributionLoadscaninvnEntityLists, distributionLoadscanEntityLists); + NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByOneClick(distributionDeliveryListEntity, reservationEntity, distributionLoadscaninvnEntityLists, distributionLoadscanEntityLists, signforTimeDate); distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); return R.data(map); @@ -5625,6 +5626,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl detailEntities = distributionReservationMapper.selectInventoryListByReservation(distributionSignforEntity.getReservationId()); @@ -5773,7 +5777,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildNodeFanoutMsgByOneClick(distributionDeliveryListEntity, reservationEntity, distributionLoadscaninvnEntityLists, distributionLoadscanEntityLists); + NodeFanoutMsg nodeFanoutMsg = buildNodeFanoutMsgByOneClick(distributionDeliveryListEntity, reservationEntity, distributionLoadscaninvnEntityLists, distributionLoadscanEntityLists, signforTimeDate); distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser()); Integer num = baseMapper.signforNum(distributionSignforEntity.getReservationId()); return Resp.scanSuccessWithData(num + "件", num + "件", packageCodes); @@ -6344,7 +6349,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl buildNodeFanoutMsgByOneClick(DistributionDeliveryListEntity distributionDeliveryListEntity, DistributionReservationEntity reservationEntity, List distributionLoadscaninvnEntityLists, List distributionLoadscanEntityLists) { + private NodeFanoutMsg buildNodeFanoutMsgByOneClick(DistributionDeliveryListEntity distributionDeliveryListEntity, + DistributionReservationEntity reservationEntity, + List distributionLoadscaninvnEntityLists, + List distributionLoadscanEntityLists, + Date signforTimeDate) { NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); @@ -6352,7 +6361,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImplquery().lambda() .eq(DistributionLoadscanEntity::getPackageId, p.getId()) + .ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()) ); if (Func.isNotEmpty(distributionLoadscanEntity)) { //该包件存在扫描记录 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java index 3f6109734..f42e3300a 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java @@ -222,7 +222,7 @@ public class DistributionStockServiceImpl extends BaseServiceImpl ids = distributionStocks.getIds(); List list = new ArrayList<>(); - + Date operTime = new Date(); for (int ii = 0; ii < ids.size(); ii++) { String i = ids.get(ii); DistributionStockEntity stockEntity = new DistributionStockEntity(); @@ -296,12 +296,12 @@ public class DistributionStockServiceImpl extends BaseServiceImpl= yu) { reservationEntity.setStockOrderQuantity(byId2.getStockOrderQuantity() + 1); reservationEntity.setStockStatus("3"); - reservationEntity.setEndTimeStocking(new Date()); + reservationEntity.setEndTimeStocking(operTime); } else { reservationEntity.setStockOrderQuantity(byId2.getStockOrderQuantity() + 1); reservationEntity.setStockStatus("2"); if (ObjectUtils.isNull(reservationEntity.getStartTimeStocking())) { - reservationEntity.setStartTimeStocking(new Date()); + reservationEntity.setStartTimeStocking(operTime); } } distributionReservationService.updateById(reservationEntity); @@ -309,7 +309,7 @@ public class DistributionStockServiceImpl extends BaseServiceImpl nodeFanoutMsg = distributionStockupService.buildStockUpNodeData(distributionStockupEntity, stockEntity,byId); + NodeFanoutMsg nodeFanoutMsg = distributionStockupService.buildStockUpNodeData(distributionStockupEntity, stockEntity,byId, operTime); if (ObjectUtils.isNotNull(nodeFanoutMsg)) { distributionNodeWorkService.planStock(nodeFanoutMsg, AuthUtil.getUser()); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index f97b3ab73..d96de1ad7 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -1959,7 +1959,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImplquery().lambda() .eq(DistributionStockupInfoEntity::getReservationId, stockupDTO.getReservationId()) .eq(DistributionStockupInfoEntity::getStockupId, stockupDTO.getStockupId()) @@ -2068,7 +2068,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildStockUpNodeData(distributionStockupEntity, distributionStock, distributionParcelListEntitie); + NodeFanoutMsg nodeFanoutMsg = buildStockUpNodeData(distributionStockupEntity, distributionStock, distributionParcelListEntitie, operTime); if (ObjectUtils.isNotNull(nodeFanoutMsg)) { distributionNodeWorkService.planStock(nodeFanoutMsg, AuthUtil.getUser()); } @@ -3890,6 +3890,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildStockUpNodeData(distributionStockupEntity, entity, parcelListEntity); + NodeFanoutMsg nodeFanoutMsg = buildStockUpNodeData(distributionStockupEntity, entity, parcelListEntity, operTime); if (ObjectUtils.isNotNull(nodeFanoutMsg)) { distributionNodeWorkService.planStock(nodeFanoutMsg, user); } @@ -4575,7 +4576,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl buildStockUpNodeData(DistributionStockupEntity distributionStockupEntity, DistributionStockEntity entity, DistributionParcelListEntity parcelListEntitys) { + public NodeFanoutMsg buildStockUpNodeData(DistributionStockupEntity distributionStockupEntity, DistributionStockEntity entity, DistributionParcelListEntity parcelListEntitys, Date operTime) { try { BladeUser user = AuthUtil.getUser(); NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); @@ -4587,7 +4588,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl logList) { List list= new ArrayList<>(); + Date operTime = new Date(); for (DistributionParcelListEntity parcelListEntity : packageData) { DistributionStockEntity distributionStockEntity = new DistributionStockEntity(); distributionStockEntity.setWarehouseId(warehouse.getId()); @@ -4760,7 +4762,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildStockUpNodeData(stockupEntity, distributionStockEntity, parcelListEntity); + NodeFanoutMsg nodeFanoutMsg = buildStockUpNodeData(stockupEntity, distributionStockEntity, parcelListEntity, operTime); if (ObjectUtils.isNotNull(nodeFanoutMsg)) { distributionNodeWorkService.planStock(nodeFanoutMsg, AuthUtil.getUser()); } @@ -6590,6 +6592,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildStockUpNodeData(stockupEntity, stockEntity, parcelListEntity); + NodeFanoutMsg nodeFanoutMsg = buildStockUpNodeData(stockupEntity, stockEntity, parcelListEntity, operTime); if (ObjectUtils.isNotNull(nodeFanoutMsg)) { distributionNodeWorkService.planStock(nodeFanoutMsg, user); } @@ -6693,6 +6696,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl nodeFanoutMsg = buildStockUpNodeData(stockupEntity, stockEntity, parcelListEntity); + NodeFanoutMsg nodeFanoutMsg = buildStockUpNodeData(stockupEntity, stockEntity, parcelListEntity,operTime); if (ObjectUtils.isNotNull(nodeFanoutMsg)) { distributionNodeWorkService.planStock(nodeFanoutMsg, user); } diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/QualityDispatchNumberMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/QualityDispatchNumberMapper.xml index 9b24cdb7b..a1db885e3 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/QualityDispatchNumberMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/QualityDispatchNumberMapper.xml @@ -3,10 +3,16 @@ diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportQuallityMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportQuallityMapper.xml index e68c28837..c98181630 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportQuallityMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportQuallityMapper.xml @@ -143,6 +143,7 @@ lww.create_time createTime, ltwt.create_time applyTime, ltwt.warehouse_name warehouseName, + ltwt.create_user_name applyWarehouseName, ltwt.refer updateReson, ltwt.operation_remark updateContent, ltwt.check_time checkUpdateTime @@ -212,6 +213,7 @@ lww.create_time createTime, ltwt.create_time applyTime, ltwt.warehouse_name warehouseName, + ltwt.create_user_name applyWarehouseName, ltwt.refer updateReson, ltwt.operation_remark updateContent, ltwt.check_time checkUpdateTime 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 index 29b791686..176b94a02 100644 --- 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 @@ -7,6 +7,7 @@ lta.warehouse_id warehouseId, lta.warehouse_name warehouseName, lta.brand brand, + #{param.hoursTime} hoursTime, count(lta.id) totalNum, count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) needOpenNum, sum(if(lta.waybill_status='1',1,0)) hasOpenNum, @@ -62,6 +63,7 @@ lta.warehouse_id warehouseId, lta.warehouse_name warehouseName, lta.brand brand, + #{param.hoursTime} hoursTime, count(lta.id) totalNum, count(lta.id)-sum(if(lta.waybill_status='0' and lta.freeze_status = '1',1,0)) needOpenNum, sum(if(lta.waybill_status='1',1,0)) hasOpenNum, @@ -119,6 +121,7 @@ lww.destination_warehouse_id destinationWarehouseId, lww.destination_warehouse_name destinationWarehouseName, lww.brand brand, + #{param.hoursTime} hoursTime, count(lww.id) totalNum, sum(if(lww.check_status=1,1,0)) hasCheckNum, IFNULL(round(sum(if(lww.check_status=1,1,0))/count(lww.id)*100,2),'0.00') hasCheckRate, @@ -174,6 +177,7 @@ lww.destination_warehouse_id destinationWarehouseId, lww.destination_warehouse_name destinationWarehouseName, lww.brand brand, + #{param.hoursTime} hoursTime, count(lww.id) totalNum, sum(if(lww.check_status=1,1,0)) hasCheckNum, IFNULL(concat(round(sum(if(lww.check_status=1,1,0))/count(lww.id)*100,2),'%'),'0.00%') hasCheckRate, @@ -232,9 +236,9 @@ count(lta.id) totalNum, count(DISTINCT lta.waybill_id) waybillNum, count(lta.waybill_id) openNum, - count(ltcls.id) startNum, - count(lta.id)-count(ltcls.id) noOutNum, - sum(if( ltcls.id is null and now() <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) noOutOverNum, + sum( IF(ltcls.id IS NOT NULL AND ltcll.start_date is not null,1,0) ) startNum, + count(lta.id)-sum( IF(ltcls.id IS NOT NULL AND ltcll.start_date is not null,1,0) ) noOutNum, + sum(if( ltcls.id is null and now() > DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) noOutOverNum, sum(if(ltcll.start_date <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) onTimeNum, IFNULL(round(sum(if(ltcll.start_date <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0))/count(lta.id)*100,2),'0.00') onTimeRate, round(sum(TIMESTAMPDIFF(SECOND, lta.create_time, ltcll.start_date))/count(ltcls.id)/3600,1) avgTime @@ -292,9 +296,9 @@ count(lta.id) totalNum, count(DISTINCT lta.waybill_id) waybillNum, count(lta.waybill_id) openNum, - count(ltcls.id) startNum, - count(lta.id)-count(ltcls.id) noOutNum, - sum(if( ltcls.id is null and now() <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) noOutOverNum, + sum( IF(ltcls.id IS NOT NULL AND ltcll.start_date is not null,1,0) ) startNum, + count(lta.id)-sum( IF(ltcls.id IS NOT NULL AND ltcll.start_date is not null,1,0) ) noOutNum, + sum(if( ltcls.id is null and now() > DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) noOutOverNum, sum(if(ltcll.start_date <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) onTimeNum, IFNULL(concat(round(sum(if(ltcll.start_date <= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0))/count(ltcls.id)*100,2),'%'),'0.00%') onTimeRate, round(sum(TIMESTAMPDIFF(SECOND, lta.create_time, ltcll.start_date))/count(ltcls.id)/3600,1) avgTime @@ -567,12 +571,12 @@ ldpl.warehouse warehouseName, ldpl.brand_name brand, sum(ldpl.quantity) incomingNum, - count(ltcls.id) outNum, - sum(ldpl.quantity)-count(ltcls.id) noOutNum, + sum( if(ltcls.id is not null or ldpl.order_package_status != '20',1,0)) AS outNum, + sum( ldpl.quantity ) - sum( if(ltcls.id is not null or ldpl.order_package_status != '20',1,0)) AS noOutNum, sum(if(ldpl.order_package_status='20' and now() > DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0 )) noOutOverNum, sum(if(ltcll.start_date < DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) outOnTimeNum, - IFNULL(round(sum(if(ltcll.start_date < DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0))/count(ltcls.id)*100,2),'0.00') outOnTimeRate, - round(sum(TIMESTAMPDIFF(SECOND, ldpl.create_time, ltcll.start_date))/count(ltcls.id)/3600,1) avgTime + IFNULL(round(sum(if(ltcll.start_date < DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0))/sum( if(ltcls.id is not null or ldpl.order_package_status != '20',1,0))*100,2),'0.00') outOnTimeRate, + round(sum(TIMESTAMPDIFF(SECOND, ldpl.create_time, ltcll.start_date))/sum( if(ltcls.id is not null or ldpl.order_package_status != '20',1,0))/3600,1) avgTime from logpm_distribution_parcel_list ldpl left join logpm_warehouse_warehouse waw on waw.id = ldpl.warehouse_id left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ldpl.order_package_code and ltcls.warehouse_id = ldpl.warehouse_id and ltcls.type = 1 @@ -636,12 +640,12 @@ ldpl.warehouse warehouseName, ldpl.brand_name brand, sum(ldpl.quantity) incomingNum, - count(ltcls.id) outNum, - sum(ldpl.quantity)-count(ltcls.id) noOutNum, + sum( if(ltcls.id is not null or ldpl.order_package_status != '20',1,0)) AS outNum, + sum( ldpl.quantity ) - sum( if(ltcls.id is not null or ldpl.order_package_status != '20',1,0)) AS noOutNum, sum(if(ldpl.order_package_status='20' and now() > DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0 )) noOutOverNum, - sum(if(ltcll.start_date <= DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) outOnTimeNum, - IFNULL(concat(round(sum(if(ltcll.start_date <= DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0))/count(ltcls.id)*100,2),'%'),'0.00%') outOnTimeRate, - round(sum(TIMESTAMPDIFF(SECOND, ldpl.create_time, ltcll.start_date))/count(ltcls.id)/3600,1) avgTime + sum(if(ltcll.start_date < DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) outOnTimeNum, + IFNULL(round(sum(if(ltcll.start_date < DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0))/sum( if(ltcls.id is not null or ldpl.order_package_status != '20',1,0))*100,2),'0.00') outOnTimeRate, + round(sum(TIMESTAMPDIFF(SECOND, ldpl.create_time, ltcll.start_date))/sum( if(ltcls.id is not null or ldpl.order_package_status != '20',1,0))/3600,1) avgTime from logpm_distribution_parcel_list ldpl left join logpm_warehouse_warehouse waw on waw.id = ldpl.warehouse_id left join logpm_trunkline_cars_load_scan ltcls on ltcls.scan_code = ldpl.order_package_code and ltcls.warehouse_id = ldpl.warehouse_id and ltcls.type = 1 @@ -833,7 +837,7 @@ lww.destination_warehouse_id destinationWarehouseId, lww.destination_warehouse_name destinationWarehouseName, lww.brand brand, - IFNULL(lrat.hours_time,#{param.hoursTime}) hoursTime, + IFNULL(min(lrat.hours_time),#{param.hoursTime}) hoursTime, count(DISTINCT ltad.waybill_id) waybillNum, count(ltad.id) openNum, IFNULL(sum(ldpl.quantity),0) arriveNum, @@ -911,7 +915,7 @@ lww.departure_warehouse_name departureWarehouseName, lww.destination_warehouse_name destinationWarehouseName, lww.brand brand, - IFNULL(lrat.hours_time,#{param.hoursTime}) hoursTime, + IFNULL(min(lrat.hours_time),#{param.hoursTime}) hoursTime, count(DISTINCT ltad.waybill_id) waybillNum, count(ltad.id) openNum, IFNULL(sum(ldpl.quantity),0) arriveNum, @@ -1355,7 +1359,11 @@ lww.consignee consignee, lww.departure_warehouse_name departureWarehouseName, lww.destination_warehouse_name destinationWarehouseName, - min(lqd.delivery_type) serviceType, + IFNULL(CASE WHEN min( lqd.delivery_type )='商配' then '1' + when min( lqd.delivery_type )='市配' then '2' + when min( lqd.delivery_type )='自提' then '3' + when min( lqd.delivery_type )='三方中转' then '4' + end,min(lww.service_type)) serviceType, GROUP_CONCAT(DISTINCT ltad.train_number) trainNumber, GROUP_CONCAT(DISTINCT ltcls.load_code) loadingLoadCode, GROUP_CONCAT(DISTINCT ltclsm.load_code) unloadLoadCode, @@ -1481,11 +1489,10 @@ lww.consignee consignee, lww.departure_warehouse_name departureWarehouseName, lww.destination_warehouse_name destinationWarehouseName, - CASE WHEN min(lqd.delivery_type)=1 THEN '商配' - WHEN min(lqd.delivery_type)=2 THEN '市配' - WHEN min(lqd.delivery_type)=3 THEN '自提' - WHEN min(lqd.delivery_type)=4 THEN '三方中转' - ELSE '未知' END serviceType, + IFNULL(min(lqd.delivery_type),CASE WHEN min(lww.service_type) = 1 then '商配' + when min(lww.service_type) = 2 then '市配' + when min(lww.service_type) = 3 then '自提' + when min(lww.service_type) = 4 then '三方中转' else '未知' end) serviceType, GROUP_CONCAT(DISTINCT ltad.train_number) trainNumber, GROUP_CONCAT(DISTINCT ltcls.load_code) loadingLoadCode, GROUP_CONCAT(DISTINCT ltclsm.load_code) unloadLoadCode, @@ -1964,6 +1971,7 @@ lww.shipper_name shipperName, lww.shipper_mobile shipperMobile, lww.shipper_address shipperAddress, + lww.service_type serviceType, lww.destination destination, lww.complete_destination completeDestination, lww.departure departure, @@ -2035,8 +2043,8 @@ count(lwwd.id) goodsTypeCount, round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) checkHours, #{param.hoursTime} hoursTime, - case when round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) <= #{param.hoursTime} then '0' - when round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) > #{param.hoursTime} then '1' + case when round(TIMESTAMPDIFF(SECOND, lww.create_time, IFNULL(lww.check_time,NOW()))/3600,1) <= #{param.hoursTime} then '0' + when round(TIMESTAMPDIFF(SECOND, lww.create_time, IFNULL(lww.check_time,NOW()))/3600,1) > #{param.hoursTime} then '1' else '未知' end isOverTime from logpm_warehouse_waybill lww @@ -2191,11 +2199,11 @@ and lww.settlement_status = #{param.settlementStatus} - - and round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) <= #{param.hoursTime} + + and round(TIMESTAMPDIFF(SECOND, lww.create_time, IFNULL(lww.check_time,NOW()))/3600,1) <= #{param.hoursTime} - - and round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) > #{param.hoursTime} + + and round(TIMESTAMPDIFF(SECOND, lww.create_time, IFNULL(lww.check_time,NOW()))/3600,1) > #{param.hoursTime} and lww.check_status=1 @@ -2225,6 +2233,11 @@ lww.shipper_name shipperName, lww.shipper_mobile shipperMobile, lww.shipper_address shipperAddress, + case when lww.service_type='1' then '商配' + when lww.service_type='2' then '市配' + when lww.service_type='3' then '自提' + when lww.service_type='4' then '三方中转' + ELSE '未知' END serviceType, lww.destination destination, lww.complete_destination completeDestination, lww.departure departure, @@ -2344,8 +2357,8 @@ count(lwwd.id) goodsTypeCount, round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) checkHours, #{param.hoursTime} hoursTime, - case when round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) <= #{param.hoursTime} then '未超时' - when round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) > #{param.hoursTime} then '超时' + case when round(TIMESTAMPDIFF(SECOND, lww.create_time, IFNULL(lww.check_time,NOW()))/3600,1) <= #{param.hoursTime} then '未超时' + when round(TIMESTAMPDIFF(SECOND, lww.create_time, IFNULL(lww.check_time,NOW()))/3600,1) > #{param.hoursTime} then '超时' else '未知' end isOverTime from logpm_warehouse_waybill lww @@ -2500,11 +2513,11 @@ and lww.settlement_status = #{param.settlementStatus} - - and round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) <= #{param.hoursTime} + + and round(TIMESTAMPDIFF(SECOND, lww.create_time, IFNULL(lww.check_time,NOW()))/3600,1) <= #{param.hoursTime} - - and round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) > #{param.hoursTime} + + and round(TIMESTAMPDIFF(SECOND, lww.create_time, IFNULL(lww.check_time,NOW()))/3600,1) > #{param.hoursTime} and lww.check_status=1 @@ -2790,6 +2803,7 @@ and ltcls.id is not null + AND ltcll.start_date is not null and ltcls.id is null @@ -2890,6 +2904,7 @@ and ltcls.id is not null + AND ltcll.start_date is not null and ltcls.id is null @@ -2986,12 +3001,13 @@ and round(TIMESTAMPDIFF(SECOND,ldpl.create_time,IFNULL(ltcll.start_date,NOW()))/3600,1)>#{param.hoursTime} - and ltcls.id is not null + and (ltcls.id is not null or ldpl.order_package_status != '20') and ltcls.id is null + and ldpl.order_package_status = '20' - + and ltcls.id is null and now() >= DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ) @@ -3007,7 +3023,9 @@ ldpl.send_warehouse_name departureWarehouseName, ldpl.accept_warehouse_name destinationWarehouseName, ldpl.train_number trainNumber, - lta.is_gcp isGcp, + case when lta.is_gcp=0 then '否' + when lta.is_gcp=1 then '是' + else '未知' end isGcp, ldpl.firsts firstPackName, ldpl.`second` secondPackName, ldpl.third_product thirdPackName, @@ -3084,12 +3102,13 @@ and round(TIMESTAMPDIFF(SECOND,ldpl.create_time,IFNULL(ltcll.start_date,NOW()))/3600,1)>#{param.hoursTime} - and ltcls.id is not null + and (ltcls.id is not null or ldpl.order_package_status != '20') and ltcls.id is null + and ldpl.order_package_status = '20' - + and ltcls.id is null and now() >= DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ) diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/TrunklinePickupMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/TrunklinePickupMapper.xml index 8359fb954..7314bd33f 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/TrunklinePickupMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/TrunklinePickupMapper.xml @@ -36,10 +36,10 @@ ELSE ifnull(TRIM(TRAILING '.00' FROM FORMAT(ROUND(SUM(tt.num) * 100.0 / SUM(ltb.real_num), 2), 2)), '0') END,'%') AS scanRate, (ifnull(sum(ltb.real_num), 0) - ifnull(sum(tt.num), 0)) batchPickupItemCount, - case + concat(case when sum(ltb.real_num) = 0 then '0' else ifnull(TRIM(TRAILING '.00' from FORMAT(ROUND((ifnull(sum(ltb.real_num), 0) - ifnull(sum(tt.num), 0)) * 100.0 / sum(ltb.real_num), 2), 2)), - '0') end as batchPickupRate, + '0') end,'%') as batchPickupRate, ifnull(sum(com.num), 0) completedPickupCount, ifnull(sum(com.wcwcs), 0) qualifiedPickupCountWithin, ifnull(sum(nocom.wwccs), 0) overdueIncompleteCount, @@ -61,13 +61,13 @@ group by t.billlading_id) ttt on ttt.billlading_id = ltb.id left join(select t.id, 1 num, - round(TIMESTAMPDIFF(SECOND, t.create_time, t.end_time)/3600,2) zq, - case when round(TIMESTAMPDIFF(SECOND, t.create_time, t.end_time)/3600,2) > #{qualifieTime} then 1 else 0 end wccs, - case when round(TIMESTAMPDIFF(SECOND, t.create_time, t.end_time)/3600,2) #{qualifieTime} then 1 else 0 end wcwcs + round(TIMESTAMPDIFF(SECOND, t.create_time, ifnull(t.end_time,now()))/3600,2) zq, + case when round(TIMESTAMPDIFF(SECOND, t.create_time, ifnull(t.end_time,now()))/3600,2) > #{qualifieTime} then 1 else 0 end wccs, + case when round(TIMESTAMPDIFF(SECOND, t.create_time, ifnull(t.end_time,now()))/3600,2) #{qualifieTime} then 1 else 0 end wcwcs from logpm_trunkline_billlading t where t.billlading_status in ('3', '4')) com on com.id = ltb.id left join(select t.id, - case when round(TIMESTAMPDIFF(SECOND, t.create_time, t.end_time)/3600,2) > #{qualifieTime} then 1 else 0 end wwccs + case when round(TIMESTAMPDIFF(SECOND, t.create_time, ifnull(t.end_time,now()))/3600,2) > #{qualifieTime} then 1 else 0 end wwccs from logpm_trunkline_billlading t where t.billlading_status in ('1', '2')) nocom on nocom.id = ltb.id where ltb.is_deleted = 0 and ltb.billlading_status != 5 @@ -404,10 +404,10 @@ group by t.business_unit, t.warehouse_name, t.brand_name,ifnull(lbc.type_service,1)) tt on t.business_line = tt.business_unit and t.warehouse = tt.warehouse_name and t.brand_name = tt.brand_name and t.type_service = tt.type_service - + GROUP BY diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/query/QualityDispatchNumberQuery.java b/blade-service/logpm-report/src/main/java/com/logpm/report/query/QualityDispatchNumberQuery.java index 6192a8d56..a8f9d8c52 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/query/QualityDispatchNumberQuery.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/query/QualityDispatchNumberQuery.java @@ -24,6 +24,8 @@ public class QualityDispatchNumberQuery extends Query { @ApiModelProperty(value = "仓库", position = 3) private String warehouseName; + private String authWarehouseName; + @ApiModelProperty(value = "配送类型", position = 4) private String deliveryType; diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/QualityDispatchNumberServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/QualityDispatchNumberServiceImpl.java index 488909f6a..935229cc3 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/QualityDispatchNumberServiceImpl.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/QualityDispatchNumberServiceImpl.java @@ -61,10 +61,10 @@ public class QualityDispatchNumberServiceImpl implements QualityDispatchNumberSe if (StrUtil.isEmpty(query.getWarehouseName())) { BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); if (ObjectUtil.isNotEmpty(myCurrentWarehouse)) { - query.setWarehouseName(myCurrentWarehouse.getName()); + query.setAuthWarehouseName(myCurrentWarehouse.getName()); } else { List warehouseEntities = warehouseClient.getMyWarehouseList(); - query.setWarehouseName(warehouseEntities.stream().map(BasicdataWarehouseEntity::getName).collect(Collectors.joining(","))); + query.setAuthWarehouseName(warehouseEntities.stream().map(BasicdataWarehouseEntity::getName).collect(Collectors.joining(","))); } } List list = numberMapper.number(page, query); @@ -132,10 +132,10 @@ public class QualityDispatchNumberServiceImpl implements QualityDispatchNumberSe if (StrUtil.isEmpty(query.getWarehouseName())) { BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); if (ObjectUtil.isNotEmpty(myCurrentWarehouse)) { - query.setWarehouseName(myCurrentWarehouse.getName()); + query.setAuthWarehouseName(myCurrentWarehouse.getName()); } else { List warehouseEntities = warehouseClient.getMyWarehouseList(); - query.setWarehouseName(warehouseEntities.stream().map(BasicdataWarehouseEntity::getName).collect(Collectors.joining(","))); + query.setAuthWarehouseName(warehouseEntities.stream().map(BasicdataWarehouseEntity::getName).collect(Collectors.joining(","))); } } List list = numberMapper.number(page, query); @@ -171,6 +171,10 @@ public class QualityDispatchNumberServiceImpl implements QualityDispatchNumberSe List warehouseEntities = warehouseClient.getMyWarehouseList(); query.setWarehouseName(warehouseEntities.stream().map(BasicdataWarehouseEntity::getName).collect(Collectors.joining(","))); } + } else { + if ("全部".equals(query.getWarehouseName())) { + query.setWarehouseName(""); + } } List list = numberMapper.task(page, query); // 查询异常数 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 index acd704b0a..22a5a740f 100644 --- 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 @@ -21,6 +21,8 @@ public class ReportCheckWaybillTimeVO implements Serializable { private String destinationWarehouseName; @ExcelProperty(value = "品牌") private String brand; + @ExcelProperty(value = "标准时效") + private String hoursTime; @ExcelProperty(value = "总运单数") private Integer totalNum; @ExcelProperty(value = "已审单数") 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 index 70dd2f9c8..c93229bd8 100644 --- 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 @@ -17,6 +17,8 @@ public class ReportOpenTimeVO implements Serializable { private String warehouseName; @ExcelProperty(value = "品牌") private String brand; + @ExcelProperty(value = "标准时效") + private String hoursTime; @ExcelProperty(value = "总单数") private Integer totalNum; @ExcelProperty(value = "应开单数") diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOrderAllTimeVO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOrderAllTimeVO.java index d38667a43..d88c8096d 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOrderAllTimeVO.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOrderAllTimeVO.java @@ -40,8 +40,11 @@ public class ReportOrderAllTimeVO implements Serializable { @ExcelProperty(value = "客户车次号") private String trainNumber; - @ExcelProperty(value = "干线车次号") - private String loadCode; + @ExcelProperty(value = "装车车次号") + private String loadingLoadCode; + + @ExcelProperty(value = "卸车车次号") + private String unloadLoadCode; @ExcelProperty(value = "创建时间") @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportUpdateWaybillDetailVO.java b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportUpdateWaybillDetailVO.java index 8f698deeb..6c8c89885 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportUpdateWaybillDetailVO.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportUpdateWaybillDetailVO.java @@ -36,6 +36,9 @@ public class ReportUpdateWaybillDetailVO implements Serializable { @ExcelProperty(value = "申请网点") private String warehouseName; + @ExcelProperty(value = "申请人") + private String applyWarehouseName; + @ExcelProperty(value = "修改原因") private String updateReson; 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 be6c6ba2a..0d548d253 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 @@ -1,11 +1,16 @@ package com.logpm.trunkline.service; import com.logpm.basicdata.entity.BasicdataWarehouseEntity; -import com.logpm.trunkline.entity.*; +import com.logpm.trunkline.entity.TrunklineAdvanceEntity; +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.TrunklineScanZeroDetailEntity; import com.logpm.trunkline.vo.TrunklineScanZeroDetailVO; -import org.springblade.common.model.NodeFanoutMsg; import org.springblade.core.secure.BladeUser; +import java.util.Date; import java.util.List; public interface ICarsLoadAsyncService { @@ -55,5 +60,5 @@ public interface ICarsLoadAsyncService { * 站点卸车完成消息推送 * @param user */ - void sendStationArrivedEnter(TrunklineCarsLoadEntity carsLoadEntity, String brands,BladeUser user, BasicdataWarehouseEntity warehouseEntity); + void sendStationArrivedEnter(TrunklineCarsLoadEntity carsLoadEntity, String brands,BladeUser user, BasicdataWarehouseEntity warehouseEntity, Date operTime); } diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java index 587407e88..02b2cc3cd 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java @@ -1264,17 +1264,18 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { @Override - public void sendStationArrivedEnter(TrunklineCarsLoadEntity carsLoadEntity,String brands, BladeUser user, BasicdataWarehouseEntity warehouseEntity) { + public void sendStationArrivedEnter(TrunklineCarsLoadEntity carsLoadEntity,String brands, BladeUser user, BasicdataWarehouseEntity warehouseEntity, Date operTime) { List list = trunklineCarsLoadLineService.findListByLoadId(carsLoadEntity.getId()); - NodeFanoutMsg stationArrivedEnterVONodeFanoutMsg = buildNodeFanoutMsgForStationArrivedEnter(carsLoadEntity,brands, list, user, warehouseEntity); + NodeFanoutMsg stationArrivedEnterVONodeFanoutMsg = buildNodeFanoutMsgForStationArrivedEnter(carsLoadEntity,brands, list, user, warehouseEntity, operTime); stationArrivedEnter(stationArrivedEnterVONodeFanoutMsg, user); } - private NodeFanoutMsg buildNodeFanoutMsgForStationArrivedEnter(TrunklineCarsLoadEntity carsLoadEntity,String brands, List lineList, BladeUser user, BasicdataWarehouseEntity warehouseEntity) { + private NodeFanoutMsg buildNodeFanoutMsgForStationArrivedEnter(TrunklineCarsLoadEntity carsLoadEntity,String brands, List lineList, + BladeUser user, BasicdataWarehouseEntity warehouseEntity, Date operTime) { NodeFanoutMsg nodeFanoutMsg = new NodeFanoutMsg(); nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD); @@ -1282,7 +1283,7 @@ public class CarsLoadAsyncServiceImpl implements ICarsLoadAsyncService { nodeFanoutMsg.setWarehouse(warehouseEntity.getName()); nodeFanoutMsg.setWarehouseId(warehouseEntity.getId()); nodeFanoutMsg.setOperator(user.getNickName()); - nodeFanoutMsg.setOperatorTime(carsLoadEntity.getCreateTime()); + nodeFanoutMsg.setOperatorTime(operTime); StationArrivedEnterVO stationArrivedEnterVO = new StationArrivedEnterVO(); stationArrivedEnterVO.setOutDriverPerson(carsLoadEntity.getOutDriverPerson()); stationArrivedEnterVO.setOutsideStation(carsLoadEntity.getOutsideStation()); diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java index 490792a86..74170ede8 100644 --- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java +++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java @@ -3661,7 +3661,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService { advanceEntity.setLegacyStatus("1"); } advanceEntity.setHasPackage(1); - advanceEntity.setCreateUserName(AuthUtil.getUserName()); + advanceEntity.setCreateUserName(AuthUtil.getNickName()); list.add(advanceEntity); } }); 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 c3b1b681d..775dce0a2 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 @@ -3355,7 +3355,19 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl scanLoadIds = trunklineCarsLoadScanService.findAllIdListByLoadIdAndScanStatus(loadId,"2"); + List scanStatus = new ArrayList<>(); + scanStatus.add("1"); + scanStatus.add("2"); + + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("load_id",loadId) + .in("scan_status",scanStatus); + + List carsLoadScanEntityList = trunklineCarsLoadScanService.list(queryWrapper); + //把carsLoadScanEntityList中的id放入一个List + List scanLoadIds = carsLoadScanEntityList.stream() + .map(TrunklineCarsLoadScanEntity::getId) + .collect(Collectors.toList()); return signLoadScanByIds(scanLoadIds,warehouseId); @@ -5588,6 +5600,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl