Browse Source

Merge remote-tracking branch 'origin/pre-production'

master
zhenghaoyu 2 weeks ago
parent
commit
78ccf53939
  1. 28
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  2. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  3. 84
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  4. 72
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  5. 54
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  6. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java
  7. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  8. 106
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/QualityDispatchNumberMapper.xml
  9. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportQuallityMapper.xml
  10. 99
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportTimeMapper.xml
  11. 20
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/TrunklinePickupMapper.xml
  12. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/query/QualityDispatchNumberQuery.java
  13. 12
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/QualityDispatchNumberServiceImpl.java
  14. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportCheckWaybillTimeVO.java
  15. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOpenTimeVO.java
  16. 7
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportOrderAllTimeVO.java
  17. 3
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/ReportUpdateWaybillDetailVO.java
  18. 11
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ICarsLoadAsyncService.java
  19. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/CarsLoadAsyncServiceImpl.java
  20. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  21. 24
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

28
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<Distributi
*/
R<?> updateDeliveryListInfo(DistributionDeliveryListDTO deliveryListDTO);
NodeFanoutMsg<DistributionTaskVO> buildNodeFanoutMsgForPlan(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user, BizOperationEnums bizOperation);
NodeFanoutMsg<DistributionTaskVO> buildNodeFanoutMsgForPlan(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user, BizOperationEnums bizOperation, Date operTime);
/**
* App-配送库存品装车

3
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<DistributionSto
*/
R stockupScanByStock(StockupDTO stockupDTO);
NodeFanoutMsg<StockUpVO> buildStockUpNodeData(DistributionStockupEntity distributionStockupEntity, DistributionStockEntity entity ,DistributionParcelListEntity parcelListEntitys);
NodeFanoutMsg<StockUpVO> buildStockUpNodeData(DistributionStockupEntity distributionStockupEntity, DistributionStockEntity entity , DistributionParcelListEntity parcelListEntitys, Date operTime);
/**
* 处理配送备货扫描

84
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -1184,10 +1184,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
/**
* 装车节点按照预约进行推送
*
* @param distributionDeliveryListEntity
* @param pushNodeList
* @param operTime
*/
private void sendBuildNodeFanoutMsgByPackage(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushNodeList){
private void sendBuildNodeFanoutMsgByPackage(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushNodeList, Date operTime){
// 提供预约单
Map<Long, List<DistributionLoadscanEntity>> collect = pushNodeList.stream().collect(Collectors.groupingBy(DistributionLoadscanEntity::getReservationId));
if(collect.isEmpty()){
@ -1197,7 +1199,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
for (Long key : keys) {
List<DistributionLoadscanEntity> list = collect.get(key);
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(key);
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByPackageByReservationCode(distributionDeliveryListEntity, list, reservationEntity.getReservationCode());
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByPackageByReservationCode(distributionDeliveryListEntity, list, reservationEntity.getReservationCode(), operTime);
distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser());
}
@ -1205,14 +1207,15 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
private NodeFanoutMsg<DistributionLoadVO> buildNodeFanoutMsgByPackageByReservationCode(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushNodeList,String reservationCode) {
private NodeFanoutMsg<DistributionLoadVO> buildNodeFanoutMsgByPackageByReservationCode(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushNodeList,
String reservationCode, Date operatorTime) {
NodeFanoutMsg<DistributionLoadVO> 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<Distrib
return jsonArray;
}
private NodeFanoutMsg<DistributionLoadVO> buildNodeFanoutMsgByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscaninvnEntity> ts,String reservationCode) {
private NodeFanoutMsg<DistributionLoadVO> buildNodeFanoutMsgByStock(DistributionDeliveryListEntity distributionDeliveryListEntity,
List<DistributionLoadscaninvnEntity> ts,
String reservationCode, Date operTime) {
NodeFanoutMsg<DistributionLoadVO> 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<Distrib
// ----------------------------2023-09-06 PDA一键装车调整----------------------------------------
//1、查询该客户下是否还存在需要装车的包件和库存品
StringBuilder orderPackages = new StringBuilder();
String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
Date operTime = new Date();
String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(operTime);
//查询配送任务配车司机信息
DistributionDeliveryListEntity distributionDeliveryListEntity = this.getById(distrilbutionloadingscanDTO.getDeliveryId());
@ -1842,11 +1848,11 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
DistributionDeliveryListVO deliveryList = distributionDeliveryListService.getDeliveryList(distrilbutionloadingscanDTO.getDeliveryId());
// 发送 订制品
if(Func.isNotEmpty(dingzhis)){
sendBuildNodeFanoutMsgByPackage(deliveryList, dingzhis);
sendBuildNodeFanoutMsgByPackage(deliveryList, dingzhis, operTime);
}
// 发库存
if(Func.isNotEmpty(kucuns)){
sendBuildNodeFanoutMsgByStock(deliveryList, kucuns);
sendBuildNodeFanoutMsgByStock(deliveryList, kucuns, operTime);
}
//发零担
if(Func.isNotEmpty(lingdans)){
@ -1865,7 +1871,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
msg.setNode(WorkNodeEnums.DISTRIBUTION_LOADING);
msg.setBrand(BrandEnums.getByValue(parcelListEntity.getBrandName()));
msg.setOperator(AuthUtil.getNickName());
msg.setOperatorTime(new Date());
msg.setOperatorTime(operTime);
msg.setContent(contents);
log.info("推送工厂数据:{}", JSONUtil.toJsonStr(msg));
factoryDataMessageSender.sendNodeDataByBrand(msg);
@ -1875,7 +1881,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
private void sendBuildNodeFanoutMsgByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscaninvnEntity> ts){
private void sendBuildNodeFanoutMsgByStock(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscaninvnEntity> ts, Date operTime){
Map<Long, List<DistributionLoadscaninvnEntity>> collect = ts.stream().collect(Collectors.groupingBy(DistributionLoadscaninvnEntity::getReservationId));
@ -1887,7 +1893,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionLoadscaninvnEntity> list = collect.get(key);
DistributionReservationEntity reservationEntity = distributionReservationMapper.selectById(key);
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByStock(distributionDeliveryListEntity, list,reservationEntity.getReservationCode());
NodeFanoutMsg<DistributionLoadVO> nodeFanoutMsg = buildNodeFanoutMsgByStock(distributionDeliveryListEntity, list,reservationEntity.getReservationCode(), operTime);
distributionNodeWorkService.nodeLoading(nodeFanoutMsg, AuthUtil.getUser());
}
@ -2001,6 +2007,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
public Resp loadinginventory(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
List<DistributionLoadscaninvnEntity> 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<Distrib
}
}
sendBuildNodeFanoutMsgByStock(distributionDeliveryListEntity,ts);
sendBuildNodeFanoutMsgByStock(distributionDeliveryListEntity,ts, operTime);
String msg = getLoadingMsg(distrilbutionloadingscanDTO);
return Resp.scanSuccess("扫描成功", msg);
}
@ -2737,6 +2744,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (DeliveryStartStatusConstant.yifache.getValue().equals(deliveryListEntity.getIsStart())) {
return R.fail("当前车次已发车");
}
Date operTime = new Date();
List<JSONObject> logs = new ArrayList<>();
List<JSONObject> pushDatas = new ArrayList<>();
//查询出原来配送信息的备货任务
@ -2786,7 +2794,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
AtomicInteger clientTotal = new AtomicInteger();
//客户数量
AtomicInteger deliveryPackageTotal = new AtomicInteger();
Date reservationDate = new Date();
Date reservationDate = operTime;
List<DistributionReservationPackageEntity> allPackageList = new ArrayList<>();
List<DistributionReservationZeroPackageEntity> allZeroPackageList = new ArrayList<>();
StringBuilder saa = new StringBuilder();
@ -2833,9 +2841,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
BladeUser user = AuthUtil.getUser();
reservationEntity.setCreateUser(user.getUserId());
reservationEntity.setDeliveryWay(reservation.getDeliveryWay());
reservationEntity.setCreateTime(new Date());
reservationEntity.setCreateTime(operTime);
reservationEntity.setCreateDept(myCurrentWarehouse.getDepartment());
reservationEntity.setUpdateTime(new Date());
reservationEntity.setUpdateTime(operTime);
reservationEntity.setUpdateUser(user.getUserId());
reservationEntity.setIsDeleted(0);
reservationEntity.setStatus(1);
@ -3729,7 +3737,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// 作业节点推送
// distributionNodeWorkService.planDelivery(deliveryListEntity, AuthUtil.getUser(), BizOperationEnums.MODIFY);
NodeFanoutMsg<DistributionTaskVO> nodeFanoutMsg = buildNodeFanoutMsgForPlan(deliveryListEntity, AuthUtil.getUser(), BizOperationEnums.MODIFY);
NodeFanoutMsg<DistributionTaskVO> nodeFanoutMsg = buildNodeFanoutMsgForPlan(deliveryListEntity, AuthUtil.getUser(), BizOperationEnums.MODIFY, operTime);
DistributionTaskVO main = nodeFanoutMsg.getMain();
List<ReservationVO> reservationVOList = main.getReservationVOList();
if (CollUtil.isNotEmpty(reservationVOList)) {
@ -3760,14 +3768,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
@Override
public NodeFanoutMsg<DistributionTaskVO> buildNodeFanoutMsgForPlan(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user, BizOperationEnums bizOperation) {
public NodeFanoutMsg<DistributionTaskVO> buildNodeFanoutMsgForPlan(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user, BizOperationEnums bizOperation, Date operTime) {
NodeFanoutMsg<DistributionTaskVO> 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<PlanDriverbindCarVO> planDriverbindCarVOS = buildDeliveryCarDriverInfor(distributionDeliveryListEntity);
distributionTaskVO.setPlanDriverbindCars(planDriverbindCarVOS);
@ -4045,7 +4053,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (Func.isEmpty(myCurrentWarehouse)) {
return R.fail(403, "未授权!!!");
}
Date operTime = new Date();
DistributionDeliveryListEntity deliveryListEntity = this.getById(deliveryListDTO.getId());
//查询原来的预约信息,
List<DistributionReservationEntity> reservationDTOS = baseMapper.selectReservationByDeliveryListId(deliveryListDTO.getId());
@ -4067,13 +4075,13 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//编码生成规则 BH+仓库编码+年月日+序号00001
stockupEntity.setStockupCode(bianMa());
stockupEntity.setStockupStatus(StockupStatusConstant.weibeihuo.getValue());
stockupEntity.setStockupDate(new Date());
stockupEntity.setStockupDate(operTime);
stockupEntity.setIsDeleted(0);
stockupEntity.setStatus(1);
stockupEntity.setCreateUser(user.getUserId());
stockupEntity.setCreateDept(myCurrentWarehouse.getDepartment());
stockupEntity.setCreateTime(new Date());
stockupEntity.setCreateTime(operTime);
// stockupEntity.setOutboundDate(new Date());
stockupEntity.setWarehouseId(myCurrentWarehouse.getId());
List<Long> newstockUpIds = new ArrayList<>();
@ -4275,7 +4283,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
this.updateById(deliveryListEntity);
// 作业节点推送
NodeFanoutMsg<DistributionTaskVO> nodeFanoutMsg = buildNodeFanoutMsgForPlan(deliveryListEntity, AuthUtil.getUser(), BizOperationEnums.MODIFY);
NodeFanoutMsg<DistributionTaskVO> nodeFanoutMsg = buildNodeFanoutMsgForPlan(deliveryListEntity, AuthUtil.getUser(), BizOperationEnums.MODIFY, operTime);
distributionNodeWorkService.planDelivery(nodeFanoutMsg, AuthUtil.getUser());
//进行日志记录
@ -4834,6 +4842,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
public R loadingStart(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
StringBuilder builder = null;
Date operTime = new Date();
try {
String method = "#########################DistributionStockArticleController.loadingStart";
if (Objects.isNull(distrilbutionloadingscanDTO.getDeliveryId())) {
@ -4871,7 +4880,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (abnormalPackageLoadingNum != 0) {
return Resp.scanFail("存在异常请处理", "存在异常请处理");
}
String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(operTime);
String loadingId = distrilbutionloadingscanDTO.getLoadingId();
Boolean b = false;
Boolean isEnd = false;
@ -4961,7 +4970,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
//发车日志记录
handleLoadingStartLog(distributionDeliveryListEntity, user, myCurrentWarehouse, builder.toString());
NodeFanoutMsg<CarStartVO> nodeFanoutMsg = builderNodeFanoutMsgByCarStart(distributionDeliveryListEntity, user);
NodeFanoutMsg<CarStartVO> nodeFanoutMsg = builderNodeFanoutMsgByCarStart(distributionDeliveryListEntity, user, operTime);
distributionNodeWorkService.carStart(nodeFanoutMsg, user);
} catch (NumberFormatException e) {
log.error(">>>>>>>>>>>>>>>>>>>>>>>>>> 发车异常", e);
@ -5118,14 +5127,14 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return false;
}
private NodeFanoutMsg<CarStartVO> builderNodeFanoutMsgByCarStart(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user) {
private NodeFanoutMsg<CarStartVO> builderNodeFanoutMsgByCarStart(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user, Date operTime) {
NodeFanoutMsg<CarStartVO> 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<PlanDriverbindCarVO> planDriverbindCarVOS = buildDeliveryCarDriverInfor(distributionDeliveryListEntity);
String driverName = distributionDeliveryListEntity.getDriverName();
@ -5170,6 +5179,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (loadingNum > 0){
return R.fail("存在装车或签收数据无法进行配送取消!!!");
}
Date operTime = new Date();
List<DistributionSignforEntity> distributionSignforEntities = distributionSignforServicer.getBaseMapper().selectList(Wrappers.<DistributionSignforEntity>query().lambda().eq(DistributionSignforEntity::getDeliveryId, deliveryListEntity.getId()));
BladeUser user = AuthUtil.getUser();
List<DistributionReservationEntity> reservationList = new ArrayList<>();
@ -5220,7 +5230,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
handleCancelDistributionLog(deliveryListEntity, user, reservationList, myCurrentWarehouse);
// 增加一个取消配送计划的通知
NodeFanoutMsg<DistributionTaskVO> distributionTaskVONodeFanoutMsg = buildNodeFanoutMsgForPlan(deliveryListEntity, user, BizOperationEnums.DELETE);
NodeFanoutMsg<DistributionTaskVO> 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<Distrib
List<String> orderPackageCodes = new ArrayList<>();
List<DistributionLoadscanEntity> pushNodeList = new ArrayList<>();
List<JSONObject> 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<Distrib
if (Func.isNotEmpty(loadscanAbnormalEntityList) && loadscanAbnormalEntityList.size() > 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<Distrib
distributionLoadscanAbnormalEntity.setReservationId(reservationEntity.getId());
distributionLoadscanAbnormalEntity.setDeliveryType(deliveryListEntity.getType());
distributionLoadscanAbnormalEntity.setScanUser(user.getNickName());
distributionLoadscanAbnormalEntity.setScanTime(new Date());
distributionLoadscanAbnormalEntity.setScanTime(operTime);
distributionLoadscanAbnormalEntity.setLoadingQuantity(parcelListEntity.getQuantity());
distributionLoadscanAbnormalEntity.setPackageCode(parcelListEntity.getOrderPackageCode());
distributionLoadscanAbnormalEntity.setPackageId(parcelListEntity.getId());
@ -6152,7 +6162,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
// 发送作业节点数据
if (CollUtil.isNotEmpty(pushNodeList)) {
sendBuildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList);
sendBuildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList, operTime);
}
return Resp.scanSuccess("操作成功", "异常" + abnormalTotal + "件");
}
@ -8946,6 +8956,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (Objects.isNull(distributionDeliverySelfEntity)) {
return Resp.fail("当前操作人不合法");
}
Date operTime = new Date();
String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(operTime);
List<String> orderCodes = new ArrayList<>();
switch (type) {
case 1:
@ -9086,7 +9098,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
return Resp.fail("订单信息错误");
}
orderCodes.add(stockArticleEntity.getOrderCode());
String now = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
if (Func.isNotEmpty(distrilbutionloadingscanDTO.getReservationId())) {
//查询该订单是否属于当前配送任务
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationMapper.selectStockArticleByReservationId(distrilbutionloadingscanDTO.getReservationId());
@ -9309,7 +9321,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
inventoryJsonObject.put("remark", "装车下架");
jsonObjects.add(inventoryJsonObject);
if (CollUtil.isNotEmpty(ts)) {
sendBuildNodeFanoutMsgByStock(deliveryListEntity,ts);
sendBuildNodeFanoutMsgByStock(deliveryListEntity,ts, operTime);
}
break;
case 4:
@ -9460,7 +9472,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
msg.setNode(WorkNodeEnums.DISTRIBUTION_LOADING);
msg.setBrand(BrandEnums.getByValue(parcelListEntity.getBrandName()));
msg.setOperator(AuthUtil.getNickName());
msg.setOperatorTime(new Date());
msg.setOperatorTime(operTime);
msg.setContent(contents);
log.info("推送工厂数据:{}", JSONUtil.toJsonStr(msg));
factoryDataMessageSender.sendNodeDataByBrand(msg);
@ -9468,7 +9480,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
if (CollUtil.isNotEmpty(pushNodeList)) {
sendBuildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList);
sendBuildNodeFanoutMsgByPackage(deliveryListEntity, pushNodeList, operTime);
}
//维护订单数量
if (!orderCodes.isEmpty()) {

72
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -29,8 +29,36 @@ import com.logpm.basicdata.entity.BasicdataClientUserEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataClientClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.dto.*;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.dto.DistributionCancelReservationPackageDTO;
import com.logpm.distribution.dto.DistributionDeliveryAllocationDTO;
import com.logpm.distribution.dto.DistributionDeliverySelfDTO;
import com.logpm.distribution.dto.DistributionDeliveryTripartiteDTO;
import com.logpm.distribution.dto.DistributionParcelListDTO;
import com.logpm.distribution.dto.DistributionParcelNumberDTO;
import com.logpm.distribution.dto.DistributionReservationDTO;
import com.logpm.distribution.dto.DistributionReservationPackageDTO;
import com.logpm.distribution.dto.DistributionStockArticleDTO;
import com.logpm.distribution.dto.DistributionStockListDTO;
import com.logpm.distribution.dto.DistributionStockupDTO;
import com.logpm.distribution.entity.DisStockListDetailEntity;
import com.logpm.distribution.entity.DistributionDeliveryListEntity;
import com.logpm.distribution.entity.DistributionDeliverySelfEntity;
import com.logpm.distribution.entity.DistributionDeliveryTripartiteEntity;
import com.logpm.distribution.entity.DistributionLoadscanAbnormalEntity;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.entity.DistributionPlanLogEntity;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.entity.DistributionReservationPackageEntity;
import com.logpm.distribution.entity.DistributionReservationStockarticleEntity;
import com.logpm.distribution.entity.DistributionReservationStocklistEntity;
import com.logpm.distribution.entity.DistributionReservationZeroPackageEntity;
import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.entity.DistributionStockupEntity;
import com.logpm.distribution.entity.DistributionStockupInfoEntity;
import com.logpm.distribution.excel.DistributionReservationExcel;
import com.logpm.distribution.mapper.DisStockListDetailMapper;
import com.logpm.distribution.mapper.DistributionLoadscanMapper;
@ -45,7 +73,26 @@ import com.logpm.distribution.mapper.DistributionStockListMapper;
import com.logpm.distribution.mapper.DistributionStockMapper;
import com.logpm.distribution.mapper.DistributionStockupInfoMapper;
import com.logpm.distribution.mapper.DistributionStockupMapper;
import com.logpm.distribution.service.*;
import com.logpm.distribution.service.IDisStockListDetailService;
import com.logpm.distribution.service.IDistributionAsyncService;
import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.service.IDistributionDeliverySelfService;
import com.logpm.distribution.service.IDistributionDeliveryTripartiteService;
import com.logpm.distribution.service.IDistributionLoadscaninvnService;
import com.logpm.distribution.service.IDistributionNodeWorkService;
import com.logpm.distribution.service.IDistributionParcelListService;
import com.logpm.distribution.service.IDistributionParcelNumberService;
import com.logpm.distribution.service.IDistributionPlanLogService;
import com.logpm.distribution.service.IDistributionReservationPackageService;
import com.logpm.distribution.service.IDistributionReservationService;
import com.logpm.distribution.service.IDistributionReservationStockarticleService;
import com.logpm.distribution.service.IDistributionReservationStocklistService;
import com.logpm.distribution.service.IDistributionReservationZeroPackageService;
import com.logpm.distribution.service.IDistributionSignforService;
import com.logpm.distribution.service.IDistributionStockArticleService;
import com.logpm.distribution.service.IDistributionStockListService;
import com.logpm.distribution.service.IDistributionStockupInfoService;
import com.logpm.distribution.service.IDistributionStockupService;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.DistributionParcelNumberVO;
import com.logpm.distribution.vo.DistributionReservationOrderPackageVO;
@ -55,7 +102,6 @@ import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.DistributionStockupOrderListVO;
import com.logpm.distribution.vo.DistributionStockupStockListVO;
import com.logpm.distribution.vo.app.DistributionAppStockUpInventoryDetailVO;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.wrapper.DistributionParcelListWrapper;
import com.logpm.distribution.wrapper.DistributionReservationWrapper;
import com.logpm.distribution.wrapper.DistributionStockArticleWrapper;
@ -110,7 +156,10 @@ import org.springblade.common.constant.stockup.StockupTypeConstant;
import org.springblade.common.enums.BizOperationEnums;
import org.springblade.common.enums.PackageTypeEnums;
import org.springblade.common.exception.CustomerException;
import org.springblade.common.model.*;
import org.springblade.common.model.DistributionTaskVO;
import org.springblade.common.model.NodeFanoutMsg;
import org.springblade.common.model.PackageData;
import org.springblade.common.model.ReservationVO;
import org.springblade.common.serviceConstant.ServiceConstant;
import org.springblade.common.utils.AddressUtil;
import org.springblade.common.utils.CommonUtil;
@ -1277,7 +1326,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
return R.fail("无仓库信息!!!");
}
BladeUser user = AuthUtil.getUser();
Date operTime = new Date();
String reservationIds = allocationDTO.getReservationIds();
//创建备货任务
DistributionStockupDTO stockup = allocationDTO.getStockup();
@ -1331,7 +1380,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//编码生成规则 BH+仓库编码+年月日+序号00001
stockupEntity.setStockupCode(bianMa());
stockupEntity.setStockupStatus(StockupStatusConstant.weibeihuo.getValue());
stockupEntity.setStockupDate(new Date());
stockupEntity.setStockupDate(operTime);
stockupEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionStockupService.save(stockupEntity);
}
@ -1520,7 +1569,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//处理广播数据
// distributionNodeWorkService.planDelivery(distributionDeliveryListEntity, AuthUtil.getUser(),BizOperationEnums.ADD);
NodeFanoutMsg<DistributionTaskVO> nodeFanoutMsg = distributionDeliveryListService.buildNodeFanoutMsgForPlan(distributionDeliveryListEntity, AuthUtil.getUser(), BizOperationEnums.ADD);
NodeFanoutMsg<DistributionTaskVO> nodeFanoutMsg = distributionDeliveryListService.buildNodeFanoutMsgForPlan(distributionDeliveryListEntity, AuthUtil.getUser(), BizOperationEnums.ADD, operTime);
distributionNodeWorkService.planDelivery(nodeFanoutMsg, AuthUtil.getUser());
//日志记录
@ -2282,12 +2331,13 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.isEmpty(myCurrentWarehouse)) {
return R.fail("无仓库信息!!!");
}
Date operTime = new Date();
//1、添加配送任务
DistributionStockupDTO stockup = allocationDTO.getStockup();
DistributionStockupEntity stockupEntity = Func.copy(stockup, DistributionStockupEntity.class);
stockupEntity.setWarehouseId(myCurrentWarehouse.getId());
if (!Func.isBlank(stockup.getForkliftName())) {
stockupEntity.setAssignTime(new Date());
stockupEntity.setAssignTime(operTime);
stockupEntity.setForkliftId(stockupEntity.getForkliftId());
stockupEntity.setForkliftName(stockupEntity.getForkliftName());
stockupEntity.setAssignStatus(StockAssignStatusConstant.yizhipai.getValue());
@ -2335,7 +2385,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
AtomicInteger inventoryNub = new AtomicInteger();
//查询运单信息
//收货单位
Date date = new Date();
Date date = operTime;
List<JSONObject> aaa = new ArrayList<>();
StringBuffer saa = new StringBuffer();
mallClient.forEach((k, v) -> {
@ -2771,7 +2821,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//处理广播数据
// distributionNodeWorkService.planDelivery(distributionDeliveryListEntity, AuthUtil.getUser(),BizOperationEnums.ADD);
NodeFanoutMsg<DistributionTaskVO> nodeFanoutMsg = distributionDeliveryListService.buildNodeFanoutMsgForPlan(distributionDeliveryListEntity, AuthUtil.getUser(), BizOperationEnums.ADD);
NodeFanoutMsg<DistributionTaskVO> nodeFanoutMsg = distributionDeliveryListService.buildNodeFanoutMsgForPlan(distributionDeliveryListEntity, AuthUtil.getUser(), BizOperationEnums.ADD, operTime);
distributionNodeWorkService.planDelivery(nodeFanoutMsg, AuthUtil.getUser());

54
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -5207,7 +5207,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// BeanUtils.copyProperties(distributionDeliveryTripartiteEntity, distributionDeliverySelfEntity);
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date signforTimeDate = new Date();
String signforTime = simpleDateFormat.format(signforTimeDate);
if (Func.equals(distributionSignforEntity.getDriverSigning(), SignforDriverSigningStatusConstant.yiqianshou.getValue())) {
log.error("###############重复签收+{" + distributionSignforEntity + "}");
@ -5238,7 +5239,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscaninvnEntity.setSigningUser(user.getNickName());
loadscaninvnEntity.setSigningUserId(user.getUserId());
loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
loadscaninvnEntity.setSigningTime(signforTime);
distributionLoadscaninvnService.updateById(loadscaninvnEntity);
distributionLoadscaninvnEntityLists.add(loadscaninvnEntity);
Integer i = distributionDeliveryListMapper.updateloadingTimeById(distributionDeliveryListEntity.getId());
@ -5278,7 +5279,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
newLoadscaninvnEntity.setReservationId(distributionSignforEntity.getReservationId());
newLoadscaninvnEntity.setInventoryPackageId(detailEntity.getId());
newLoadscaninvnEntity.setScanUser(user.getNickName());
newLoadscaninvnEntity.setScanTime(simpleDateFormat.format(new Date()));
newLoadscaninvnEntity.setScanTime(signforTime);
newLoadscaninvnEntity.setPackageNub(detailEntity.getNum());
newLoadscaninvnEntity.setScanStatus(LoadingStatusConstant.yijianzhuangche.getValue());
newLoadscaninvnEntity.setIsInsert(LoadingIsInsertConstant.bulu.getValue());
@ -5291,7 +5292,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
newLoadscaninvnEntity.setOneQclick(2);
newLoadscaninvnEntity.setSigningUser(user.getNickName());
newLoadscaninvnEntity.setSigningUserId(user.getUserId());
newLoadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
newLoadscaninvnEntity.setSigningTime(signforTime);
if (distributionSignfor.getIsClerk()) {
newLoadscaninvnEntity.setMsg("文员一键签收数据补录");
} else {
@ -5405,7 +5406,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setDeliveryId(distributionSignforEntity.getDeliveryId());
loadscanEntity.setReservationId(distributionSignforEntity.getReservationId());
loadscanEntity.setScanUser(user.getNickName());
loadscanEntity.setScanTime(simpleDateFormat.format(new Date()));
loadscanEntity.setScanTime(signforTime);
loadscanEntity.setPackageNub(parcelNumberEntity.getReservationNum());
loadscanEntity.setLoadedNub(parcelNumberEntity.getReservationNum());
loadscanEntity.setSigningUser(user.getUserName());
@ -5436,7 +5437,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setReceivedQuantity(parcelNumberEntity.getReservationNum());
loadscanEntity.setOneClick(2);
loadscanEntity.setOneQclick(2);
loadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
loadscanEntity.setSigningTime(signforTime);
if (distributionSignfor.getIsClerk()) {
loadscanEntity.setMsg("文员一键签收数据补录");
} else {
@ -5468,7 +5469,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
}
}
String signingTime = simpleDateFormat.format(new Date());
String signingTime = signforTime;
List<Long> packageIds = new ArrayList<>();
List<String> orderCodes = new ArrayList<>();
if (Func.isNotEmpty(parcelListEntityList)) {
@ -5594,14 +5595,14 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
.set(StringUtils.isNotBlank(distributionSignfor.getSigningType()), DistributionSignforEntity::getSigningType, distributionSignfor.getSigningType())
.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningStatus, 2)
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getDriverSigning, 2)
.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningTime, simpleDateFormat.format(new Date()))
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningTime, simpleDateFormat.format(new Date()))
.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningTime, signforTime)
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSigningTime, signforTime)
.set(distributionSignfor.getIsClerk() && StringUtils.isNotBlank(distributionSignfor.getClerkSignRemarks()), DistributionSignforEntity::getClerkSignRemarks, distributionSignfor.getClerkSignRemarks())
.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getExamineUserId, user.getUserId())
.set(distributionSignfor.getIsClerk(), DistributionSignforEntity::getExamineUserName, user.getNickName())
.set(!distributionSignfor.getIsClerk() && StringUtils.isNotBlank(distributionSignfor.getDriverRemarks()), DistributionSignforEntity::getDriverRemarks, distributionSignfor.getDriverRemarks())
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getDriverSigning, 2)
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSjsigningTime, simpleDateFormat.format(new Date()));
.set(!distributionSignfor.getIsClerk(), DistributionSignforEntity::getSjsigningTime, signforTime);
boolean update = this.update(set);
//维护配送信息
@ -5609,7 +5610,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// 推送作业节点
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildNodeFanoutMsgByOneClick(distributionDeliveryListEntity, reservationEntity, distributionLoadscaninvnEntityLists, distributionLoadscanEntityLists);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> 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<Distribution
if (Objects.isNull(myCurrentWarehouse)) {
return R.fail(403, "仓库信息不能为空");
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date signforTimeDate = new Date();
String signforTime = simpleDateFormat.format(signforTimeDate);
Integer isStrictLoading = 0;
WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(myCurrentWarehouse.getId());
if (!Objects.isNull(warehouseConfig)) {
@ -5745,7 +5749,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (!isHaveAbnormalFlag) {
return Resp.scanFail("存在异常未处理", "存在异常未处理");
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//处理库存品
//查询出该客户下的库存品信息
List<DisStockListDetailEntity> detailEntities = distributionReservationMapper.selectInventoryListByReservation(distributionSignforEntity.getReservationId());
@ -5773,7 +5777,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscaninvnEntity.setSigningUser(user.getNickName());
loadscaninvnEntity.setSigningUserId(user.getUserId());
loadscaninvnEntity.setReceivedQuantity(detailEntity.getNum());
loadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
loadscaninvnEntity.setSigningTime(signforTime);
distributionLoadscaninvnService.updateById(loadscaninvnEntity);
// Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
// //更新签收人
@ -5806,7 +5810,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
newLoadscaninvnEntity.setReservationId(distributionSignforEntity.getReservationId());
newLoadscaninvnEntity.setInventoryPackageId(detailEntity.getId());
newLoadscaninvnEntity.setScanUser(user.getNickName());
newLoadscaninvnEntity.setScanTime(simpleDateFormat.format(new Date()));
newLoadscaninvnEntity.setScanTime(signforTime);
newLoadscaninvnEntity.setPackageNub(detailEntity.getNum());
newLoadscaninvnEntity.setScanStatus(LoadingStatusConstant.yijianzhuangche.getValue());
newLoadscaninvnEntity.setIsInsert(LoadingIsInsertConstant.bulu.getValue());
@ -5821,7 +5825,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
newLoadscaninvnEntity.setWarehouseName(myCurrentWarehouse.getName());
newLoadscaninvnEntity.setSigningUser(user.getNickName());
newLoadscaninvnEntity.setSigningUserId(user.getUserId());
newLoadscaninvnEntity.setSigningTime(simpleDateFormat.format(new Date()));
newLoadscaninvnEntity.setSigningTime(signforTime);
if (distributionSignfor.getIsClerk()) {
newLoadscaninvnEntity.setMsg("文员一键签收数据补录");
} else {
@ -5906,7 +5910,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionLoadscanEntity.setPackageNub(parcelNumberEntity.getReservationNum());
distributionLoadscanEntity.setSigningUser(user.getNickName());
distributionLoadscanEntity.setSigningUserId(user.getUserId());
distributionLoadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
distributionLoadscanEntity.setSigningTime(signforTime);
distributionLoadscanEntity.setIsZero(1);
distributionLoadscanEntity.setWarehouseId(myCurrentWarehouse.getId());
distributionLoadscanEntity.setWarehouseName(myCurrentWarehouse.getName());
@ -5932,7 +5936,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setScanUser(user.getNickName());
loadscanEntity.setWarehouseId(myCurrentWarehouse.getId());
loadscanEntity.setWarehouseName(myCurrentWarehouse.getName());
loadscanEntity.setScanTime(simpleDateFormat.format(new Date()));
loadscanEntity.setScanTime(signforTime);
loadscanEntity.setPackageNub(parcelNumberEntity.getReservationNum());
loadscanEntity.setLoadedNub(parcelNumberEntity.getReservationNum());
loadscanEntity.setSigningUser(user.getNickName());
@ -5967,7 +5971,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setOneQclick(2);
loadscanEntity.setWarehouseId(myCurrentWarehouse.getId());
loadscanEntity.setWarehouseName(myCurrentWarehouse.getName());
loadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
loadscanEntity.setSigningTime(signforTime);
if (distributionSignfor.getIsClerk()) {
loadscanEntity.setMsg("文员一键签收数据补录");
} else {
@ -6004,7 +6008,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
orderCodes.add(parcelListEntity.getOrderCode());
}
}
String signingTime = simpleDateFormat.format(new Date());
String signingTime = signforTime;
if (Func.isNotEmpty(parcelListEntityList)) {
loadingPackageNum += parcelListEntityList.stream().mapToInt(DistributionParcelListEntity::getQuantity).sum();
signingPackageNum += parcelListEntityList.stream().mapToInt(DistributionParcelListEntity::getQuantity).sum();
@ -6192,7 +6197,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
bladeRedis.setEx("warehouseId:" + myCurrentWarehouse.getId() + ":reservationId:", distributionSignfor.getReservationId(), 60L);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildNodeFanoutMsgByOneClick(distributionDeliveryListEntity, reservationEntity, distributionLoadscaninvnEntityLists, distributionLoadscanEntityLists);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> 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<Distribution
}
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildNodeFanoutMsgByOneClick(DistributionDeliveryListEntity distributionDeliveryListEntity, DistributionReservationEntity reservationEntity, List<DistributionLoadscaninvnEntity> distributionLoadscaninvnEntityLists, List<DistributionLoadscanEntity> distributionLoadscanEntityLists) {
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildNodeFanoutMsgByOneClick(DistributionDeliveryListEntity distributionDeliveryListEntity,
DistributionReservationEntity reservationEntity,
List<DistributionLoadscaninvnEntity> distributionLoadscaninvnEntityLists,
List<DistributionLoadscanEntity> distributionLoadscanEntityLists,
Date signforTimeDate) {
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = new NodeFanoutMsg();
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD);
@ -6352,7 +6361,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
nodeFanoutMsg.setWarehouse(distributionDeliveryListEntity.getWarehouseName());
nodeFanoutMsg.setWarehouseId(distributionDeliveryListEntity.getWarehouseId());
nodeFanoutMsg.setOperator(AuthUtil.getNickName());
nodeFanoutMsg.setOperatorTime(distributionDeliveryListEntity.getUpdateTime());
nodeFanoutMsg.setOperatorTime(signforTimeDate);
org.springblade.common.model.DistributionSignforVO distributionLoadVO = new org.springblade.common.model.DistributionSignforVO();
@ -6487,6 +6496,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
p.setSigningNub(0);
DistributionLoadscanEntity distributionLoadscanEntity = distributionLoadscanMapper.selectOne(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getPackageId, p.getId())
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(distributionLoadscanEntity)) {
//该包件存在扫描记录

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java

@ -222,7 +222,7 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
// DistributionStockDTO distributionStock1 = JSONObject.parseObject(JSONObject.toJSONString(distributionStocks), DistributionStockDTO.class);
List<String> ids = distributionStocks.getIds();
List<DistributionStockEntity> 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<DistributionSt
if (bei >= 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<DistributionSt
// 备货作业节点
DistributionStockupEntity distributionStockupEntity = distributionStockupMapper.selectById(distributionStocks.getStockupId());
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = distributionStockupService.buildStockUpNodeData(distributionStockupEntity, stockEntity,byId);
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = distributionStockupService.buildStockUpNodeData(distributionStockupEntity, stockEntity,byId, operTime);
if (ObjectUtils.isNotNull(nodeFanoutMsg)) {
distributionNodeWorkService.planStock(nodeFanoutMsg, AuthUtil.getUser());
}

20
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -1959,7 +1959,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if (Func.isEmpty(myCurrentWarehouse.getId())) {
return Resp.scanFail("未授权!!!", "未授权");
}
Date operTime = new Date();
DistributionStockupInfoEntity one = distributionStockupInfoService.getOne(Wrappers.<DistributionStockupInfoEntity>query().lambda()
.eq(DistributionStockupInfoEntity::getReservationId, stockupDTO.getReservationId())
.eq(DistributionStockupInfoEntity::getStockupId, stockupDTO.getStockupId())
@ -2068,7 +2068,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
// 备货作业节点
DistributionParcelListEntity distributionParcelListEntitie = distributionParcelListService.getById(i.getParcelListId());
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(distributionStockupEntity, distributionStock, distributionParcelListEntitie);
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(distributionStockupEntity, distributionStock, distributionParcelListEntitie, operTime);
if (ObjectUtils.isNotNull(nodeFanoutMsg)) {
distributionNodeWorkService.planStock(nodeFanoutMsg, AuthUtil.getUser());
}
@ -3890,6 +3890,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
// log.warn("##################stockupScan: 备货库位不存在,stockUpAllocationId:{}",stockUpAllocationId);
// return Resp.scanFail("请扫描备货库位","请扫描备货库位");
// }
Date operTime = new Date();
stockupDTO.setWarehouseId(myCurrentWarehouse.getId());
Integer integer = this.selectPackage(stockupDTO);
switch (integer) {
@ -4004,7 +4005,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
parcelListEntity = distributionParcelListService.getById(entity.getParcelListId());
// 备货作业节点
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(distributionStockupEntity, entity, parcelListEntity);
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(distributionStockupEntity, entity, parcelListEntity, operTime);
if (ObjectUtils.isNotNull(nodeFanoutMsg)) {
distributionNodeWorkService.planStock(nodeFanoutMsg, user);
}
@ -4575,7 +4576,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
@Override
public NodeFanoutMsg<StockUpVO> buildStockUpNodeData(DistributionStockupEntity distributionStockupEntity, DistributionStockEntity entity, DistributionParcelListEntity parcelListEntitys) {
public NodeFanoutMsg<StockUpVO> buildStockUpNodeData(DistributionStockupEntity distributionStockupEntity, DistributionStockEntity entity, DistributionParcelListEntity parcelListEntitys, Date operTime) {
try {
BladeUser user = AuthUtil.getUser();
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = new NodeFanoutMsg<StockUpVO>();
@ -4587,7 +4588,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
nodeFanoutMsg.setWarehouseId(distributionStockupEntity.getWarehouseId());
nodeFanoutMsg.setOperator(user.getNickName());
nodeFanoutMsg.setOperatorTime(distributionStockupEntity.getCreateTime());
nodeFanoutMsg.setOperatorTime(operTime);
StockUpVO stockUpVO = new StockUpVO();
stockUpVO.setTypeService(distributionStockupEntity.getTypeService());
stockUpVO.setStockupDate(distributionStockupEntity.getStockupDate());
@ -4740,6 +4741,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
DistributionStockupEntity stockupEntity,
List<JSONObject> logList) {
List<DistributionStockEntity> 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<Distribution
distributionStockEntity.setScanUser(user.getNickName());
distributionStockEntity.setIsTray(Integer.parseInt(IsOrNoConstant.yes.getValue()));
list.add(distributionStockEntity);
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(stockupEntity, distributionStockEntity, parcelListEntity);
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(stockupEntity, distributionStockEntity, parcelListEntity, operTime);
if (ObjectUtils.isNotNull(nodeFanoutMsg)) {
distributionNodeWorkService.planStock(nodeFanoutMsg, AuthUtil.getUser());
}
@ -6590,6 +6592,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
log.error(method+"参数stockupDTO.getPacketBarCode()缺失");
return Resp.scanFail("扫码参数缺失,请联系管理员!!!", "扫码参数缺失,请联系管理员!!!");
}
Date operTime = new Date();
//校验订制品合法性
String packetBarCode = stockupDTO.getPacketBarCode();
Long warehouseId = warehouse.getId();
@ -6671,7 +6674,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
distributionParcelListService.updateById(parcelListEntity);
trunklinePackageTrackLogClient.addPackageTrackLog(packageLogList);
// 备货作业节点
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(stockupEntity, stockEntity, parcelListEntity);
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(stockupEntity, stockEntity, parcelListEntity, operTime);
if (ObjectUtils.isNotNull(nodeFanoutMsg)) {
distributionNodeWorkService.planStock(nodeFanoutMsg, user);
}
@ -6693,6 +6696,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
log.error(method + "参数stockupDTO.getPacketBarCode()缺失");
return Resp.scanFail("扫码参数缺失,请联系管理员!!!", "扫码参数缺失,请联系管理员!!!");
}
Date operTime = new Date();
//校验订制品合法性
String packetBarCode = stockupDTO.getPacketBarCode();
Long warehouseId = warehouse.getId();
@ -6780,7 +6784,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
distributionParcelListService.updateById(update);
trunklinePackageTrackLogClient.addPackageTrackLog(packageLogList);
// 备货作业节点
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(stockupEntity, stockEntity, parcelListEntity);
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(stockupEntity, stockEntity, parcelListEntity,operTime);
if (ObjectUtils.isNotNull(nodeFanoutMsg)) {
distributionNodeWorkService.planStock(nodeFanoutMsg, user);
}

106
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/QualityDispatchNumberMapper.xml

@ -3,10 +3,16 @@
<mapper namespace="com.logpm.report.mapper.QualityDispatchNumberMapper">
<select id="number" resultType="com.logpm.report.vo.qulity.dispatch.QualityDispatchNumberVO">
select t.warehouse_name,
<if test="query.deliveryType != null and query.deliveryType != ''">
t.delivery_type,
</if>
select
<if test="query.warehouseName != null and query.warehouseName != ''">
t.warehouse_name,
</if>
<if test="query.warehouseName == null or query.warehouseName == ''">
'全部' warehouse_name,
</if>
<if test="query.deliveryType != null and query.deliveryType != ''">
t.delivery_type,
</if>
sum(ifnull(t.plan_num, 0)) plan_num,
sum(ifnull(t.stock_num, 0)) stock_num,
sum(ifnull(t.load_num, 0)) load_num,
@ -83,6 +89,12 @@
#{item}
</foreach>
</if>
<if test="query.authWarehouseName != null and query.authWarehouseName != ''">
and t.warehouse_name in
<foreach collection="query.authWarehouseName.split(',')" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="query.deliveryType != null and query.deliveryType != ''">
and t.delivery_type in
<foreach collection="query.deliveryType.split(',')" item="item" separator="," open="(" close=")">
@ -97,14 +109,26 @@
t.brand_name,
t.warehouse_name,
t.business_unit) t
group by t.warehouse_name
<if test="query.deliveryType != null and query.deliveryType != ''">
,t.delivery_type
</if>
order by t.warehouse_name
<if test="query.deliveryType != null and query.deliveryType != ''">
,t.delivery_type
</if>
<if test="(query.warehouseName != null and query.warehouseName != '') or (query.deliveryType != null and query.deliveryType != '')">
GROUP BY
<trim suffixOverrides=",">
<if test="query.warehouseName != null and query.warehouseName != ''">
t.warehouse_name,
</if>
<if test="query.deliveryType != null and query.deliveryType != ''">
t.delivery_type,
</if>
</trim>
order by
<trim suffixOverrides=",">
<if test="query.warehouseName != null and query.warehouseName != ''">
t.warehouse_name,
</if>
<if test="query.deliveryType != null and query.deliveryType != ''">
t.delivery_type,
</if>
</trim>
</if>
</select>
<select id="task" resultType="com.logpm.report.vo.qulity.dispatch.QualityDispatchTaskVO">
@ -213,7 +237,13 @@
</select>
<select id="exceptionNumber" resultType="com.logpm.report.vo.qulity.dispatch.QualityDispatchNumberVO">
select t.warehouse_name
select
<if test="query.warehouseName == null or query.warehouseName == ''">
'全部' warehouse_name
</if>
<if test="query.warehouseName != null and query.warehouseName != ''">
t.warehouse_name
</if>
<if test="query.deliveryType != null and query.deliveryType != ''">
,t.type deliveryType
</if>
@ -239,6 +269,12 @@
#{item}
</foreach>
</if>
<if test="query.authWarehouseName != null and query.authWarehouseName != ''">
and t.warehouse_name in
<foreach collection="query.authWarehouseName.split(',')" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</if>
<if test="query.deliveryType != null and query.deliveryType != ''">
and t.delivery_type in
<foreach collection="query.deliveryType.split(',')" item="item" separator="," open="(" close=")">
@ -253,14 +289,46 @@
</if>
</foreach>
</if>
group by dl.warehouse_name
<if test="query.deliveryType != null and query.deliveryType != ''">
, dl.type
<if test="(query.warehouseName != null and query.warehouseName != '') or (query.deliveryType != null and query.deliveryType != '')">
GROUP BY
<trim suffixOverrides=",">
<if test="query.warehouseName != null and query.warehouseName != ''">
dl.warehouse_name,
</if>
<if test="query.deliveryType != null and query.deliveryType != ''">
dl.type,
</if>
</trim>
order by
<trim suffixOverrides=",">
<if test="query.warehouseName != null and query.warehouseName != ''">
dl.warehouse_name,
</if>
<if test="query.deliveryType != null and query.deliveryType != ''">
dl.type,
</if>
</trim>
</if>
) t
group by t.warehouse_name
<if test="query.deliveryType != null and query.deliveryType != ''">
, t.type
<if test="(query.warehouseName != null and query.warehouseName != '') or (query.deliveryType != null and query.deliveryType != '')">
GROUP BY
<trim suffixOverrides=",">
<if test="query.warehouseName != null and query.warehouseName != ''">
t.warehouse_name,
</if>
<if test="query.deliveryType != null and query.deliveryType != ''">
t.type,
</if>
</trim>
order by
<trim suffixOverrides=",">
<if test="query.warehouseName != null and query.warehouseName != ''">
t.warehouse_name,
</if>
<if test="query.deliveryType != null and query.deliveryType != ''">
t.type,
</if>
</trim>
</if>
</select>

2
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

99
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() &lt;= 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 &lt;= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) onTimeNum,
IFNULL(round(sum(if(ltcll.start_date &lt;= 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() &lt;= 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 &lt;= DATE_ADD( lta.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) onTimeNum,
IFNULL(concat(round(sum(if(ltcll.start_date &lt;= 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() &gt; DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0 )) noOutOverNum,
sum(if(ltcll.start_date &lt; DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) outOnTimeNum,
IFNULL(round(sum(if(ltcll.start_date &lt; 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 &lt; 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() &gt; DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0 )) noOutOverNum,
sum(if(ltcll.start_date &lt;= DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) outOnTimeNum,
IFNULL(concat(round(sum(if(ltcll.start_date &lt;= 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 &lt; DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR ),1,0)) outOnTimeNum,
IFNULL(round(sum(if(ltcll.start_date &lt; 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) &lt;= #{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) &lt;= #{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 @@
<if test="param.settlementStatus != null">
and lww.settlement_status = #{param.settlementStatus}
</if>
<if test="param.overTimeStatus != null and param.overTimeStatus == 0">
and round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) &lt;= #{param.hoursTime}
<if test="param.isOverTime != null and param.isOverTime == 0">
and round(TIMESTAMPDIFF(SECOND, lww.create_time, IFNULL(lww.check_time,NOW()))/3600,1) &lt;= #{param.hoursTime}
</if>
<if test="param.overTimeStatus != null and param.overTimeStatus == 1">
and round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) > #{param.hoursTime}
<if test="param.isOverTime != null and param.isOverTime == 1">
and round(TIMESTAMPDIFF(SECOND, lww.create_time, IFNULL(lww.check_time,NOW()))/3600,1) > #{param.hoursTime}
</if>
<if test="param.checkDetailType != null and param.checkDetailType == 2 ">
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) &lt;= #{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) &lt;= #{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 @@
<if test="param.settlementStatus != null">
and lww.settlement_status = #{param.settlementStatus}
</if>
<if test="param.overTimeStatus != null and param.overTimeStatus == 0">
and round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) &lt;= #{param.hoursTime}
<if test="param.isOverTime != null and param.isOverTime == 0">
and round(TIMESTAMPDIFF(SECOND, lww.create_time, IFNULL(lww.check_time,NOW()))/3600,1) &lt;= #{param.hoursTime}
</if>
<if test="param.overTimeStatus != null and param.overTimeStatus == 1">
and round(TIMESTAMPDIFF(SECOND, lww.create_time, lww.check_time)/3600,1) > #{param.hoursTime}
<if test="param.isOverTime != null and param.isOverTime == 1">
and round(TIMESTAMPDIFF(SECOND, lww.create_time, IFNULL(lww.check_time,NOW()))/3600,1) > #{param.hoursTime}
</if>
<if test="param.checkDetailType != null and param.checkDetailType == 2 ">
and lww.check_status=1
@ -2790,6 +2803,7 @@
</if>
<if test="param.startDetailType != null and param.startDetailType ==2">
and ltcls.id is not null
AND ltcll.start_date is not null
</if>
<if test="param.startDetailType != null and param.startDetailType ==3">
and ltcls.id is null
@ -2890,6 +2904,7 @@
</if>
<if test="param.startDetailType != null and param.startDetailType ==2">
and ltcls.id is not null
AND ltcll.start_date is not null
</if>
<if test="param.startDetailType != null and param.startDetailType ==3">
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}
</if>
<if test="param.startDetailType != null and param.startDetailType ==2">
and ltcls.id is not null
and (ltcls.id is not null or ldpl.order_package_status != '20')
</if>
<if test="param.startDetailType != null and param.startDetailType ==3">
and ltcls.id is null
and ldpl.order_package_status = '20'
</if>
<if test="param.startDetailType != null and param.startDetailType ==3">
<if test="param.startDetailType != null and param.startDetailType ==4">
and ltcls.id is null
and now() &gt;= DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR )
</if>
@ -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}
</if>
<if test="param.startDetailType != null and param.startDetailType ==2">
and ltcls.id is not null
and (ltcls.id is not null or ldpl.order_package_status != '20')
</if>
<if test="param.startDetailType != null and param.startDetailType ==3">
and ltcls.id is null
and ldpl.order_package_status = '20'
</if>
<if test="param.startDetailType != null and param.startDetailType ==3">
<if test="param.startDetailType != null and param.startDetailType ==4">
and ltcls.id is null
and now() &gt;= DATE_ADD( ldpl.create_time, INTERVAL #{param.hoursTime} HOUR )
</if>

20
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) <![CDATA[ <= ]]> #{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) <![CDATA[ <= ]]> #{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
<if test="query.businessLineRange != null and query.businessLineRange != ''
or query.warehouseRange != null and query.warehouseRange != ''
or query.brandRange != null and query.brandRange != ''
or query.typeServiceRange != null and query.typeServiceRange != ''">
<if test="(query.businessLineRange != null and query.businessLineRange != '')
or (query.warehouseRange != null and query.warehouseRange != '')
or (query.brandRange != null and query.brandRange != '')
or (query.typeServiceRange != null and query.typeServiceRange != '')">
GROUP BY
<trim suffixOverrides=",">
<if test="query.businessLineRange != null and query.businessLineRange != ''">

2
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;

12
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<BasicdataWarehouseEntity> warehouseEntities = warehouseClient.getMyWarehouseList();
query.setWarehouseName(warehouseEntities.stream().map(BasicdataWarehouseEntity::getName).collect(Collectors.joining(",")));
query.setAuthWarehouseName(warehouseEntities.stream().map(BasicdataWarehouseEntity::getName).collect(Collectors.joining(",")));
}
}
List<QualityDispatchNumberVO> 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<BasicdataWarehouseEntity> warehouseEntities = warehouseClient.getMyWarehouseList();
query.setWarehouseName(warehouseEntities.stream().map(BasicdataWarehouseEntity::getName).collect(Collectors.joining(",")));
query.setAuthWarehouseName(warehouseEntities.stream().map(BasicdataWarehouseEntity::getName).collect(Collectors.joining(",")));
}
}
List<QualityDispatchNumberVO> list = numberMapper.number(page, query);
@ -171,6 +171,10 @@ public class QualityDispatchNumberServiceImpl implements QualityDispatchNumberSe
List<BasicdataWarehouseEntity> warehouseEntities = warehouseClient.getMyWarehouseList();
query.setWarehouseName(warehouseEntities.stream().map(BasicdataWarehouseEntity::getName).collect(Collectors.joining(",")));
}
} else {
if ("全部".equals(query.getWarehouseName())) {
query.setWarehouseName("");
}
}
List<QualityDispatchTaskVO> list = numberMapper.task(page, query);
// 查询异常数

2
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 = "已审单数")

2
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 = "应开单数")

7
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")

3
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;

11
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);
}

9
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<TrunklineCarsLoadLineEntity> list = trunklineCarsLoadLineService.findListByLoadId(carsLoadEntity.getId());
NodeFanoutMsg<StationArrivedEnterVO> stationArrivedEnterVONodeFanoutMsg = buildNodeFanoutMsgForStationArrivedEnter(carsLoadEntity,brands, list, user, warehouseEntity);
NodeFanoutMsg<StationArrivedEnterVO> stationArrivedEnterVONodeFanoutMsg = buildNodeFanoutMsgForStationArrivedEnter(carsLoadEntity,brands, list, user, warehouseEntity, operTime);
stationArrivedEnter(stationArrivedEnterVONodeFanoutMsg, user);
}
private NodeFanoutMsg<StationArrivedEnterVO> buildNodeFanoutMsgForStationArrivedEnter(TrunklineCarsLoadEntity carsLoadEntity,String brands, List<TrunklineCarsLoadLineEntity> lineList, BladeUser user, BasicdataWarehouseEntity warehouseEntity) {
private NodeFanoutMsg<StationArrivedEnterVO> buildNodeFanoutMsgForStationArrivedEnter(TrunklineCarsLoadEntity carsLoadEntity,String brands, List<TrunklineCarsLoadLineEntity> lineList,
BladeUser user, BasicdataWarehouseEntity warehouseEntity, Date operTime) {
NodeFanoutMsg<StationArrivedEnterVO> nodeFanoutMsg = new NodeFanoutMsg<StationArrivedEnterVO>();
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());

2
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);
}
});

24
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -3355,7 +3355,19 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return signLoadScanByIds(scanLoadIds,warehouseId);
}else if("2".equals(deliveryType)){
List<Long> scanLoadIds = trunklineCarsLoadScanService.findAllIdListByLoadIdAndScanStatus(loadId,"2");
List<String> scanStatus = new ArrayList<>();
scanStatus.add("1");
scanStatus.add("2");
QueryWrapper<TrunklineCarsLoadScanEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("load_id",loadId)
.in("scan_status",scanStatus);
List<TrunklineCarsLoadScanEntity> carsLoadScanEntityList = trunklineCarsLoadScanService.list(queryWrapper);
//把carsLoadScanEntityList中的id放入一个List
List<Long> scanLoadIds = carsLoadScanEntityList.stream()
.map(TrunklineCarsLoadScanEntity::getId)
.collect(Collectors.toList());
return signLoadScanByIds(scanLoadIds,warehouseId);
@ -5588,6 +5600,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
@Override
public void sendStationArrivedEnter(LoadCarsDTO loadCarsDTO) {
Date operTime = new Date();
Long warehouseId = loadCarsDTO.getWarehouseId();
Long loadId = loadCarsDTO.getLoadId();
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId);
@ -5596,7 +5609,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String brands = trunklineCarsLoadScanService.findBrandNameByCarLoadCode(carsLoadEntity.getCarsNo());
// 发送卸车作业事件
carsLoadAsyncService.sendStationArrivedEnter(carsLoadEntity,brands, AuthUtil.getUser(), warehouseEntity);
carsLoadAsyncService.sendStationArrivedEnter(carsLoadEntity,brands, AuthUtil.getUser(), warehouseEntity, operTime);
}
private void updateParcelListToWarehouse(TrunklineAdvanceDetailEntity advanceDetailEntity, Long warehouseId, String status) {
@ -12272,6 +12285,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionParcelListEntity.setIsTransfer(1);
isTransfer = 1;
}
distributionParcelListEntity.setOrderPackageStatus("20");
distributionParcelListEntity.setWarehouseEntryTimeEnd(new Date());
distributionParcelListEntity.setTrainNumber(loadCode);
}
distributionParcelListClient.update(distributionParcelListEntity);
}
@ -12752,8 +12768,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//需要补装车扫记录
TrunklineCarsLoadScanEntity trunklineCarsLoadScanEntity = new TrunklineCarsLoadScanEntity();
trunklineCarsLoadScanEntity.setReserve5("210");
trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
// trunklineCarsLoadScanEntity.setWarehouseId(warehouseId);
// trunklineCarsLoadScanEntity.setWarehouseName(warehouseName);
trunklineCarsLoadScanEntity.setLoadId(loadId);
trunklineCarsLoadScanEntity.setLoadCode(loadCode);
WarehouseWaybillEntity waybillEntity = warehouseWaybillClient.findByWaybillNo(waybillNumber);

Loading…
Cancel
Save