From d93d58fecd9643acb441929bcacce958b0a09623 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Thu, 10 Oct 2024 14:12:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=A4=8D=E6=A0=B8=E7=AD=BE?= =?UTF-8?q?=E6=94=B6=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BasicdataWarehouseController.java | 7 + .../DistributionDeliveryListServiceImpl.java | 21 +- .../impl/DistributionSignforServiceImpl.java | 184 ++++++++++-------- .../mapper/WarehouseRetentionScanMapper.xml | 4 +- 4 files changed, 132 insertions(+), 84 deletions(-) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java index c140bee5e..58214a486 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java @@ -60,6 +60,7 @@ import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.stream.Collectors; /** @@ -225,6 +226,12 @@ public class BasicdataWarehouseController extends BladeController { if(ObjectUtil.isNotEmpty(warehouseWarehouse.getAcreage()) && ObjectUtil.isNotEmpty(warehouseWarehouse.getSeating())){ warehouseWarehouse.setSingleStorageLocationArea(NumberUtil.div(warehouseWarehouse.getAcreage(),warehouseWarehouse.getSeating())); } + if (Objects.isNull(warehouseWarehouse.getLegalPersonPhone())){ + warehouseWarehouse.setLegalPersonPhone(""); + } + if (Objects.isNull(warehouseWarehouse.getLegalPerson())){ + warehouseWarehouse.setLegalPersonPhone(""); + } return R.status(warehouseService.updateById(warehouseWarehouse)); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index b3e291f62..949551340 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -4802,8 +4802,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl nodeFanoutMsg = builderNodeFanoutMsgByCarStart(distributionDeliveryListEntity, user); distributionNodeWorkService.carStart(nodeFanoutMsg, user); - // 推送数据 + return Resp.scanSuccess("发车成功", builder.toString()); } @@ -8161,7 +8161,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl>>>> deliveryListEntity deliveryStatus :{}", deliveryListEntity.getDeliveryStatus()); + if (deliveryListEntity.getDeliveryStatus().equals(DeliveryStatusConstant.yiwancheng.getValue())){ + handleDeliveryLog(deliveryListEntity,AuthUtil.getUser()); + } + + } + + private void handleDeliveryLog(DistributionDeliveryListEntity deliveryListEntity, BladeUser user) { + String content = user.getNickName() + "在" + deliveryListEntity.getWarehouseName() + "完成配送,车次号:" + deliveryListEntity.getTrainNumber(); + DistributionPlanLogEntity distributionPlanLogEntity = new DistributionPlanLogEntity(); + distributionPlanLogEntity.setContent(content); + distributionPlanLogEntity.setRefId(deliveryListEntity.getId()); + distributionPlanLogEntity.setRefCode(deliveryListEntity.getTrainNumber()); + distributionPlanLogEntity.setWarehouseId(deliveryListEntity.getWarehouseId()); + distributionPlanLogEntity.setWarehouseName(deliveryListEntity.getWarehouseName()); + distributionPlanLogEntity.setOperator(user.getNickName()); + distributionPlanLogEntity.setType(2); + distributionPlanLogService.save(distributionPlanLogEntity); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 50c06ad59..4cd2f581f 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -281,6 +281,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl selectDistributionSignforPage(IPage page, DistributionSignforVO distributionSignfor) { @@ -752,11 +755,25 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl buildNodeFanoutMsgByReCheck(DistributionReservationEntity reservationEntity) { // 查询当前预约单下的定制品和零担签收数据 @@ -1159,50 +1176,57 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl nodeVos = null; - switch (searchType) { - case 1: - //配送单查询 - DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.selectDeliveryByTrainNumber(searchCode); - if (Func.isEmpty(deliveryListEntity)) { - return R.fail("未查询到配送单信息,请查看搜索类型是否匹配"); - } - //解析配送节点 - nodeVos = handleDeliveryNode(deliveryListEntity); - //进行数据组装 - break; - case 2: - DistributionReservationEntity reservationEntity = distributionReservationService.selectByReservationCode(searchCode); - if (Func.isEmpty(reservationEntity)) { - return R.fail("未查询到预约单信息,请查看搜索类型是否匹配"); - } - //解析配送节点 - nodeVos = handleReservationNode(reservationEntity); - //预约单查询 - break; - case 3: - //自提单号 - DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = distrilbutionBillLadingService.selectByBillLadingCode(searchCode); - if (Func.isEmpty(distrilbutionBillLadingEntity)) { - return R.fail("未查询到自提单信息,请查看搜索类型是否匹配"); - } - //解析配送节点 - nodeVos = handleBillLading(distrilbutionBillLadingEntity); - break; - case 4: - //备货任务查询 - DistributionStockupEntity distributionStockupEntity = distributionStockupService.selectStockUpByStockUpCode(searchCode); - if (Func.isEmpty(distributionStockupEntity)) { - return R.fail("未查询到备货任务信息,请查看搜索类型是否匹配"); - } - nodeVos = handleStockUp(distributionStockupEntity); - - break; - default: - log.info("未知的搜索类型 searchType={}", searchType); +// List nodeVos = null; +// switch (searchType) { +// case 1: +// //配送单查询 +// DistributionDeliveryListEntity deliveryListEntity = distributionDeliveryListService.selectDeliveryByTrainNumber(searchCode); +// if (Func.isEmpty(deliveryListEntity)) { +// return R.fail("未查询到配送单信息,请查看搜索类型是否匹配"); +// } +// //解析配送节点 +// nodeVos = handleDeliveryNode(deliveryListEntity); +// //进行数据组装 +// break; +// case 2: +// DistributionReservationEntity reservationEntity = distributionReservationService.selectByReservationCode(searchCode); +// if (Func.isEmpty(reservationEntity)) { +// return R.fail("未查询到预约单信息,请查看搜索类型是否匹配"); +// } +// //解析配送节点 +// nodeVos = handleReservationNode(reservationEntity); +// //预约单查询 +// break; +// case 3: +// //自提单号 +// DistrilbutionBillLadingEntity distrilbutionBillLadingEntity = distrilbutionBillLadingService.selectByBillLadingCode(searchCode); +// if (Func.isEmpty(distrilbutionBillLadingEntity)) { +// return R.fail("未查询到自提单信息,请查看搜索类型是否匹配"); +// } +// //解析配送节点 +// nodeVos = handleBillLading(distrilbutionBillLadingEntity); +// break; +// case 4: +// //备货任务查询 +// DistributionStockupEntity distributionStockupEntity = distributionStockupService.selectStockUpByStockUpCode(searchCode); +// if (Func.isEmpty(distributionStockupEntity)) { +// return R.fail("未查询到备货任务信息,请查看搜索类型是否匹配"); +// } +// nodeVos = handleStockUp(distributionStockupEntity); +// break; +// default: +// log.info("未知的搜索类型 searchType={}", searchType); +// +// } + List list = distributionPlanLogService.list(Wrappers.query().lambda() + .eq(DistributionPlanLogEntity::getRefCode, searchCode) + .orderByDesc(DistributionPlanLogEntity::getCreateTime) + ); + if (!list.isEmpty()) { + return R.data(list); } - return R.data(nodeVos); + return R.fail("未查询到相关信息!!!"); } /** @@ -3519,43 +3543,43 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl distributionSignPrintList = new ArrayList<>(); - distributionSignfor.getMap().forEach((k, v) -> { - v.forEach(i -> { - DistributionSignPrintEntity distributionSignPrint = new DistributionSignPrintEntity(); - BeanUtils.copyProperties(i, distributionSignPrint); - distributionSignPrint.setId(null); - distributionSignPrint.setReservationId(distributionSignfor.getReservationId()); - distributionSignPrintList.add(distributionSignPrint); - }); - }); - iDistributionSignPrintService.saveBatch(distributionSignPrintList); - } - //修改签收表司机签收数量 - boolean update = this.update(new UpdateWrapper().lambda() - .eq(DistributionSignforEntity::getReservationId, distributionSignfor.getReservationId()) - .eq(DistributionSignforEntity::getDeliveryId, distributionSignfor.getDeliveryId()) - .set(DistributionSignforEntity::getSjsigningTime, simpleDateFormat.format(new Date())) -// .set(StringUtils.isNotBlank(distributionSignfor.getDeliverySignPictures()), DistributionSignforEntity::getDeliverySignPictures, distributionSignfor.getDeliverySignPictures()) - .set(DistributionSignforEntity::getDriverSigning, "2") - .set(StringUtils.isNotBlank(distributionSignfor.getDriverRemarks()), DistributionSignforEntity::getDriverRemarks, distributionSignfor.getDriverRemarks()) - .set(StringUtils.isNotBlank(distributionSignfor.getSigneeName()), DistributionSignforEntity::getSigneeName, distributionSignfor.getSigneeName()) - ); - return R.status(update); +// DistributionSignforEntity signforEntity = distributionSignforMapper.getByReservationId(distributionSignfor.getReservationId()); +// if (Func.isEmpty(signforEntity)) { +// log.error("预约查询签收信息错误"); +// return R.fail("请联系管理员!!!"); +// } +// if ((signforEntity.getReceivedQuantity() + signforEntity.getReceivedinQuantity()) <= 0) { +// +// log.error("signforack############未进行签收上传图片"); +// return Resp.scanFail(12000, "请先进行签收扫描后上传图片", "请先进行签收扫描后上传图片", null); +// } +// +// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); +// log.info("=============签收图片数据为:{}", distributionSignfor.getMap()); +// if (ObjectUtils.isNotNull(distributionSignfor.getMap())) { +// List distributionSignPrintList = new ArrayList<>(); +// distributionSignfor.getMap().forEach((k, v) -> { +// v.forEach(i -> { +// DistributionSignPrintEntity distributionSignPrint = new DistributionSignPrintEntity(); +// BeanUtils.copyProperties(i, distributionSignPrint); +// distributionSignPrint.setId(null); +// distributionSignPrint.setReservationId(distributionSignfor.getReservationId()); +// distributionSignPrintList.add(distributionSignPrint); +// }); +// }); +// iDistributionSignPrintService.saveBatch(distributionSignPrintList); +// } +// //修改签收表司机签收数量 +// boolean update = this.update(new UpdateWrapper().lambda() +// .eq(DistributionSignforEntity::getReservationId, distributionSignfor.getReservationId()) +// .eq(DistributionSignforEntity::getDeliveryId, distributionSignfor.getDeliveryId()) +// .set(DistributionSignforEntity::getSjsigningTime, simpleDateFormat.format(new Date())) +//// .set(StringUtils.isNotBlank(distributionSignfor.getDeliverySignPictures()), DistributionSignforEntity::getDeliverySignPictures, distributionSignfor.getDeliverySignPictures()) +// .set(DistributionSignforEntity::getDriverSigning, "2") +// .set(StringUtils.isNotBlank(distributionSignfor.getDriverRemarks()), DistributionSignforEntity::getDriverRemarks, distributionSignfor.getDriverRemarks()) +// .set(StringUtils.isNotBlank(distributionSignfor.getSigneeName()), DistributionSignforEntity::getSigneeName, distributionSignfor.getSigneeName()) +// ); + return this.updatePicturePDA(distributionSignfor); } @Override diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml index 772d73cf9..8c3cf8987 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseRetentionScanMapper.xml @@ -228,8 +228,8 @@ '未知' END conditionsName, CASE confirm_status - WHEN 0 THEN '未确认' - WHEN 1 THEN '已确认' + WHEN 0 THEN '待回库' + WHEN 1 THEN '已回库' ELSE '未知' END confirmStatusName,