diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/LauncherConstant.java b/blade-biz-common/src/main/java/org/springblade/common/constant/LauncherConstant.java index dabc47e78..e8ecf5200 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/LauncherConstant.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/LauncherConstant.java @@ -67,7 +67,7 @@ public interface LauncherConstant { /** * sentinel prod 地址 */ - String SENTINEL_PROD_ADDR = "172.30.0.58:8858"; + String SENTINEL_PROD_ADDR = "172.16.128.145:8858"; /** * sentinel test 地址 diff --git a/blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java b/blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java index 2749bc113..7d5c44bb6 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java +++ b/blade-biz-common/src/main/java/org/springblade/common/launch/LauncherServiceImpl.java @@ -41,10 +41,10 @@ public class LauncherServiceImpl implements LauncherService { PropsUtil.setProperty(props, "spring.cloud.nacos.config.server-addr", LauncherConstant.nacosAddr(profile)); -// PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.username","nacos"); -// PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.password","Nacos123123"); -// PropsUtil.setProperty(props, "spring.cloud.nacos.config.username","nacos"); -// PropsUtil.setProperty(props, "spring.cloud.nacos.config.password","Nacos123123"); + PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.username","nacos"); + PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.password","Nacos123123"); + PropsUtil.setProperty(props, "spring.cloud.nacos.config.username","nacos"); + PropsUtil.setProperty(props, "spring.cloud.nacos.config.password","Nacos123123"); PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile)); diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java index 77b148af1..842a17eb5 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java @@ -98,8 +98,14 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNotNull(myCurrentWarehouse)){ aftersalesWorkOrder.put("warehouseId", myCurrentWarehouse.getId()); } - IPage pages = aftersalesWorkOrderService.page(Condition.getPage(query), Condition.getQueryWrapper(aftersalesWorkOrder, AftersalesWorkOrderEntity.class)); - return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages)); + try{ + IPage pages = aftersalesWorkOrderService.page(Condition.getPage(query), Condition.getQueryWrapper(aftersalesWorkOrder, AftersalesWorkOrderEntity.class)); + return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages)); + }catch (Exception e ){ + log.info("工单查询系统异常》》》{}",e.getMessage()); + return R.fail("系统异常!"); + } + } /** @@ -110,8 +116,14 @@ public class AftersalesWorkOrderController extends BladeController { @ApiOperation(value = "查询异常工单完整数据集合", notes = "传入aftersalesWorkOrder") public R> getListOwn(@ApiIgnore @RequestParam Map aftersalesWorkOrder, Query query) { log.info("异常工单查询参数》》》{}",aftersalesWorkOrder); - IPage pages = aftersalesWorkOrderService.pageListOwn(aftersalesWorkOrder, Condition.getPage(query)); - return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages)); + try{ + IPage pages = aftersalesWorkOrderService.pageListOwn(aftersalesWorkOrder, Condition.getPage(query)); + return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages)); + }catch (Exception e){ + log.info("工单查询系统异常》》》{}",e.getMessage()); + return R.fail("系统异常!"); + } + } /** @@ -127,8 +139,14 @@ public class AftersalesWorkOrderController extends BladeController { aftersalesWorkOrder.put("business_id",myCurrentWarehouse.getId()); aftersalesWorkOrder.put("business_name",myCurrentWarehouse.getName()); } - IPage pages = aftersalesWorkOrderService.getListSettlement(aftersalesWorkOrder, Condition.getPage(query)); - return R.data(pages); + try{ + IPage pages = aftersalesWorkOrderService.getListSettlement(aftersalesWorkOrder, Condition.getPage(query)); + return R.data(pages); + }catch(Exception e){ + log.info("查询异常工单理赔信息>>{}",e.getMessage()); + return R.fail("系统异常"); + } + } /** @@ -145,7 +163,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getAftersalesProcessingResultsDTO())){ throw new ServiceException("异常工单处理结果不能为空"); } - return R.status(aftersalesWorkOrderService.addProcessingResults(aftersalesWorkOrderDTO)); + try { + return R.status(aftersalesWorkOrderService.addProcessingResults(aftersalesWorkOrderDTO)); + }catch(Exception e){ + log.info("营业部提交异常工单处理结果>>>{}",e.getMessage()); + return R.fail("系统异常!!"); + } + } @@ -183,8 +207,15 @@ public class AftersalesWorkOrderController extends BladeController { @ApiOperationSupport(order = 2) @ApiOperation(value = "查询客服人员信息", notes = "传入aftersalesWorkOrder") public R> listUser() { - List list = aftersalesWorkOrderService.getCustomerServicePersonnel(); - return R.data(list); + try{ + List list = aftersalesWorkOrderService.getCustomerServicePersonnel(); + return R.data(list); + }catch(Exception e){ + log.info("查询客服人员信息>>>>{}",e.getMessage()); + return R.fail("系统异常!!"); + } + + } /** @@ -205,12 +236,14 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getSurveyRecordDTO().getContent())){ throw new ServiceException("内容不能为空!!"); } - }catch (Exception e ){ + return R.status(aftersalesWorkOrderService.savaSurveyRecord(aftersalesWorkOrderDTO)); + }catch (RuntimeException e ){ log.info("内容不能为空!!"); throw new ServiceException("内容不能为空!!"); + }catch (Exception e){ + log.info(">新增调查记录>>{}",e.getMessage()); + return R.fail("系统异常!!"); } - - return R.status(aftersalesWorkOrderService.savaSurveyRecord(aftersalesWorkOrderDTO)); } /** @@ -225,8 +258,14 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getId())){ throw new ServiceException("异常工单ID不能为空"); } - AftersalesWorkOrderVO list = aftersalesWorkOrderService.getSurveyRecord(aftersalesWorkOrderDTO); - return R.data(list); + try{ + AftersalesWorkOrderVO list = aftersalesWorkOrderService.getSurveyRecord(aftersalesWorkOrderDTO); + return R.data(list); + }catch(Exception e){ + log.info("查询调查记录>>>{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } @@ -242,8 +281,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getId())){ throw new ServiceException("异常工单ID不能为空"); } - AftersalesWorkOrderVO list = aftersalesWorkOrderService.getTrackRecord(aftersalesWorkOrderDTO); - return R.data(list); + try{ + AftersalesWorkOrderVO list = aftersalesWorkOrderService.getTrackRecord(aftersalesWorkOrderDTO); + return R.data(list); + }catch (Exception e){ + log.info("查询全部跟踪记录>>>{}",e.getMessage()); + return R.fail("系统异常!!!"); + } } @@ -254,8 +298,14 @@ public class AftersalesWorkOrderController extends BladeController { @ApiOperationSupport(order = 2) @ApiOperation(value = "查询营业部责任人人员信息", notes = "传入aftersalesWorkOrder") public R> getBusinessDepartmentUser(Long warehouseId) { - List list = aftersalesWorkOrderService.getBusinessDepartmentUser(warehouseId); - return R.data(list); + try { + List list = aftersalesWorkOrderService.getBusinessDepartmentUser(warehouseId); + return R.data(list); + }catch(Exception e){ + log.info("查询营业部责任人人员信息》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -272,8 +322,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull( aftersalesWorkOrderDTO.getCustomerServiceId() ) || ObjectUtils.isNull( aftersalesWorkOrderDTO.getCustomerServiceName() )){ return R.fail("请填写客服信息 !"); } - R r = aftersalesWorkOrderService.updateAssignCustomerService(aftersalesWorkOrderDTO); - return R.success("提交成功!"); + try{ + R r = aftersalesWorkOrderService.updateAssignCustomerService(aftersalesWorkOrderDTO); + return R.success("提交成功!"); + }catch (Exception e){ + log.info("异常工单分配处理客服信息》》》{}",e.getMessage()); + return R.fail("系统异常!!"); + } } @@ -291,8 +346,14 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull( aftersalesWorkOrderDTO.getCustomerServiceId() ) || ObjectUtils.isNull( aftersalesWorkOrderDTO.getCustomerServiceName() )){ return R.fail("请填写客服信息 !"); } - R r = aftersalesWorkOrderService.updateAssignArbitrateService(aftersalesWorkOrderDTO); - return R.success("提交成功!"); + try { + R r = aftersalesWorkOrderService.updateAssignArbitrateService(aftersalesWorkOrderDTO); + return R.success("提交成功!"); + }catch (Exception e){ + log.info("异常工单仲裁 分配处理客服信息>>{}",e.getMessage()); + return R.fail("系统异常!!"); + } + } @@ -326,8 +387,13 @@ public class AftersalesWorkOrderController extends BladeController { @ApiOperationSupport(order = 4) @ApiOperation(value = "异常工单 客服完结处理", notes = "传入aftersalesWorkOrder") public R addCompletionEnd(@Valid @RequestBody List aftersalesWorkOrder) { + try { + return R.status(aftersalesWorkOrderService.addCompletionEnd(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("客服完结处理>>>{}",e.getMessage()); + return R.fail("系统异常!!"); + } - return R.status(aftersalesWorkOrderService.addCompletionEnd(aftersalesWorkOrder)); } /** @@ -341,7 +407,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrder.getId())){ throw new ServiceException("异常工单ID不能为空!"); } - return R.status(aftersalesWorkOrderService.updateCompletionEnd(aftersalesWorkOrder)); + try { + return R.status(aftersalesWorkOrderService.updateCompletionEnd(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("修改完结处理》》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -358,7 +430,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesAppeal.getWorkOrderId())){ throw new ServiceException("异常工单ID不能为空!!"); } - return R.status(aftersalesWorkOrderService.updateByIdAppel(aftersalesAppeal)); + try { + return R.status(aftersalesWorkOrderService.updateByIdAppel(aftersalesAppeal)); + }catch (Exception e){ + log.info("客服操作确定修改》》》{}",e.getMessage()); + return R.fail("系统异常!!"); + } + } /** @@ -371,8 +449,14 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrder.getId())){ return R.fail("异常工单ID不能为空!!"); } - AftersalesWorkOrderVO workOrderVO = aftersalesWorkOrderService.getProcessingResults(aftersalesWorkOrder); - return R.data(workOrderVO); + try { + AftersalesWorkOrderVO workOrderVO = aftersalesWorkOrderService.getProcessingResults(aftersalesWorkOrder); + return R.data(workOrderVO); + }catch (Exception e){ + log.info("查询详情全部信息数据》》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -386,7 +470,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrder) || aftersalesWorkOrder.getAssignList().isEmpty()){ throw new ServiceException("数据不能为空!!"); } - return R.status(aftersalesWorkOrderService.updateArbitrate(aftersalesWorkOrder)); + try { + return R.status(aftersalesWorkOrderService.updateArbitrate(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("申请仲裁》》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -400,7 +490,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrder) || aftersalesWorkOrder.getAssignList().isEmpty()){ throw new ServiceException("数据不能为空!!"); } - return R.status(aftersalesWorkOrderService.addArbitrateEnd(aftersalesWorkOrder)); + try { + return R.status(aftersalesWorkOrderService.addArbitrateEnd(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("客服仲裁完结操作》》》{}",e.getMessage()); + return R.fail("系统异常!!"); + } + } /** @@ -411,7 +507,13 @@ public class AftersalesWorkOrderController extends BladeController { @ApiOperation(value = "修改", notes = "传入aftersalesWorkOrder") public R update(@Valid @RequestBody AftersalesWorkOrderEntity aftersalesWorkOrder) { log.info("修改参数》》》{}",aftersalesWorkOrder.toString()); - return R.status(aftersalesWorkOrderService.updateById(aftersalesWorkOrder)); + try { + return R.status(aftersalesWorkOrderService.updateById(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("工单修改异常》》》{}",e.getMessage()); + return R.fail("系统异常!!"); + } + } @@ -426,7 +528,13 @@ public class AftersalesWorkOrderController extends BladeController { if(aftersalesWorkOrder.getAssignList().isEmpty()){ throw new ServiceException("确定工单ID不能为空!!"); } - return R.status( aftersalesWorkOrderService.updateManagerConfirmed(aftersalesWorkOrder) ); + try { + return R.status( aftersalesWorkOrderService.updateManagerConfirmed(aftersalesWorkOrder) ); + }catch (Exception e){ + log.info("客服经理确定数据》》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -440,7 +548,13 @@ public class AftersalesWorkOrderController extends BladeController { if(aftersalesWorkOrder.getAssignList().isEmpty()){ throw new ServiceException("修改工单数据ID不能为空!!"); } - return R.status(aftersalesWorkOrderService.updateWorkOrderStatus(aftersalesWorkOrder)); + try { + return R.status(aftersalesWorkOrderService.updateWorkOrderStatus(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("批量修改工单状态为已处理>>{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -454,8 +568,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull( aftersalesWorkOrder.getAssignList())){ return R.fail("更新的异常工单不能为空!!"); } - R r = aftersalesWorkOrderService.getUpdateWorkList(aftersalesWorkOrder); - return r; + try{ + return aftersalesWorkOrderService.getUpdateWorkList(aftersalesWorkOrder); + }catch (Exception e){ + log.info("填写钉钉流程号异常》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -478,8 +597,14 @@ public class AftersalesWorkOrderController extends BladeController { // throw new ServiceException("二级品类未填!"); // } } - aftersalesWorkOrder.setInitiationIdentification("PC"); - return R.status(aftersalesWorkOrderService.saveOrUpdateOwn(aftersalesWorkOrder)); + try { + aftersalesWorkOrder.setInitiationIdentification("PC"); + return R.status(aftersalesWorkOrderService.saveOrUpdateOwn(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("工单提交异常》》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } @@ -496,8 +621,14 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNotNull(myCurrentWarehouse)){ aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId()); } - IPage list= aftersalesWorkOrderService.getPendingWorkOrder(aftersalesWorkOrder,Condition.getPage(query)); - return R.data(list); + try { + IPage list= aftersalesWorkOrderService.getPendingWorkOrder(aftersalesWorkOrder,Condition.getPage(query)); + return R.data(list); + }catch (Exception e){ + log.info("仓库查询待处理的异常工单》》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml index f71a1c364..910dee4b3 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml @@ -64,13 +64,13 @@ and lawo.work_order_type = #{param.workOrderType } and lawo.initiation_identification = #{param.initiationIdentification } and lawo.discovery_node = #{param.discoveryNode } - and lawo.work_order_number = #{param.workOrderNumber } - and lawo.waybill_number = #{param.waybillNumber } - and lawo.order_code = #{param.orderCode } - and lawo.train_number = #{param.trainNumber } - and lawo.first = #{param.first } - and lawo.secondary = #{param.secondary } - and lawo.vehicle_route = #{param.vehicleRoute } + and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') + and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') + and lawo.order_code like concat('%', #{param.orderCode },'%') + and lawo.train_number like concat('%', #{param.trainNumber },'%') + and lawo.first like concat('%', #{param.first },'%') + and lawo.secondary like concat('%', #{param.secondary },'%') + and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') @@ -81,13 +81,13 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d and date_format(from_unixtime(lawo.audit_time),'%Y-%m-%d') = date_format(#{param.auditTime},'%Y-%m-%d') and date_format(from_unixtime(lawo.entry_time),'%Y-%m-%d') = date_format(#{param.entryTime},'%Y-%m-%d') and date_format(from_unixtime(lawo.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') - and lawo.waybill_mall = #{param.waybillMall } + and lawo.waybill_mall like concat('%', #{param.waybillMall },'%') and lawo.delivery_driver = #{param.deliveryDriver } and lawo.work_order_status in ('30','40') and lawo.work_order_status in ('30') and lawo.work_order_status in ('80','100') and lawo.customer_service_id = #{param.customerServiceId } - and lawo.customer_service_name = #{param.customerServiceName } + and lawo.customer_service_name like concat('%', #{param.customerServiceName },'%') and lawo.waybill_mall_id = #{param.waybillMallId } and lawo.problem_description = #{param.problemDescription} and lawo.warehouse_id = #{param.warehouseId} @@ -106,7 +106,16 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d and lawo.work_order_status in (21,30) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} and lawo.work_order_status in (80,100) and lacr.warehouse_id=#{param.warehouseId} - or 1=1 + or 1=1 + and lawo.work_order_type = #{param.workOrderType } + and lawo.discovery_node = #{param.discoveryNode } + and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') + and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') + and lawo.order_code like concat('%', #{param.orderCode },'%') + and lawo.train_number like concat('%', #{param.trainNumber },'%') + and lawo.first like concat('%', #{param.first },'%') + and lawo.secondary like concat('%', #{param.secondary },'%') + and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') and lap.business_id = #{param.warehouseId} and lawo.work_order_status in ( #{param.workOrderStatus }) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java index dc09200db..ca8cca51c 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java @@ -168,7 +168,7 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl myWarehouseList = getMyWarehouseList(); - if (myWarehouseList != null) { - if (myWarehouseList.size() == 1) { - return myWarehouseList.get(0); + try { + BladeUser user = AuthUtil.getUser(); + String json = redis.get(CacheNames.tenantKeyObj(user.getTenantId(), CacheNames.USER_WAREHOUSE_KEY, user.getUserId())); + if (StringUtil.isBlank(json)) { + List myWarehouseList = getMyWarehouseList(); + if (myWarehouseList != null) { + if (myWarehouseList.size() == 1) { + return myWarehouseList.get(0); + } } } + BasicdataWarehouseEntity o = JSONObject.parseObject(json, BasicdataWarehouseEntity.class); + return o; + } catch (Exception e) { + + log.error(">>>>>> 获取仓库信息错误",e); } - BasicdataWarehouseEntity o = JSONObject.parseObject(json, BasicdataWarehouseEntity.class); - return o; + + return null; + } @Override diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java index 47ac0d799..f6a916587 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java @@ -65,6 +65,7 @@ import org.springblade.common.constant.reservation.ReservationPackageStatusConst import org.springblade.common.constant.reservation.ReservationSigningStatusConstant; import org.springblade.common.constant.stockup.StockupStatusConstant; import org.springblade.common.constant.stockup.StockupTypeStatusConstant; +import org.springblade.common.exception.CustomerException; import org.springblade.common.utils.CommonUtil; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.log.exception.ServiceException; @@ -1505,6 +1506,8 @@ public class DistributionStockupAppController extends BladeController { */ @NotNull private R stockupScanByCustom(StockupDTO stockupDTO) { + + //包件扫描 String orderCode = stockupDTO.getOrderCode();//订单自编号 String packetBarCode = stockupDTO.getPacketBarCode();//包件码 @@ -1589,9 +1592,16 @@ public class DistributionStockupAppController extends BladeController { map.put("logId", entity.getId()); map.put("messageData", entity); map.put("createTime", new Date().getTime()); + + BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); + log.info(">>>> find bug myCurrentWarehouse {}",myCurrentWarehouse); + if (Objects.isNull(myCurrentWarehouse)) { + throw new CustomerException(403, "仓库信息不能为空"); + } //将消息携带绑定键值 rabbitTemplate.convertAndSend(RabbitConstant.STOCKUP_SCAN_EXCHANGE, RabbitConstant.STOCKUP_SCAN_ROUTING, map); + //查询是否货位数据是否该下架 Map mapState = new HashMap<>(); mapState.put("messageId", CommonUtil.getUUID()); @@ -1601,6 +1611,7 @@ public class DistributionStockupAppController extends BladeController { mapState.put("reservationId", stockupDTO.getReservationId()); mapState.put("logId", entity.getId()); mapState.put("messageData", entity); + mapState.put("warehouseId",myCurrentWarehouse.getId()); mapState.put("createTime", new Date().getTime()); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml index f9ae56dcd..4672d55b8 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml @@ -465,7 +465,6 @@ INNER JOIN logpm_distribution_signfor AS lds ON lddl.id = lds.delivery_id INNER JOIN logpm_distribution_reservation AS ldr ON ldr.id = lds.reservation_id - ldr.reservation_status != '40' and lddl.id = #{id} diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java index 8378e7ca7..814b17f1c 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java @@ -301,4 +301,12 @@ public interface DistributionSignforMapper extends BaseMapper SELECT * FROM logpm_distribution_signfor WHERE reservation_id = #{reservationId} + diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/StockupStateUpdateHandler.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/StockupStateUpdateHandler.java index 9e1e0416d..ecdeb8d25 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/StockupStateUpdateHandler.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/receiver/StockupStateUpdateHandler.java @@ -40,6 +40,7 @@ public class StockupStateUpdateHandler { messageData.setStockupId((Long) map.get("stockupId")); messageData.setTypeService(String.valueOf( map.get("typeService"))); messageData.setReservationId((Long) map.get("reservationId")); + messageData.setWarehouseId((Long)map.get("warehouseId")); //查询是否货位数据是否该下架 distributionAsyncService.stockupSelfOffShelf(messageData); log.info("######STOCKUP_STATE_UPDATE_QUEUE:备货下架查询成功"); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java index bd76a2a1c..bd8587232 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java @@ -155,7 +155,7 @@ public interface IDistributionDeliveryListService extends BaseService selectDistributionAppDeliverywrapIn( DistributionAppDeliveryListDTO distributionAppDeliveryListDTO); /** - * 修改配送任务 + * 修改商配配送任务 * @param deliveryListDTO * @return */ diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java index 0af063f3f..4c073fd09 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java @@ -643,11 +643,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { */ @Override public void stockupSelfOffShelf(StockupDTO stockupDTO) throws InterruptedException { - BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); - log.info(">>>> find bug {}",myCurrentWarehouse); - if (Objects.isNull(myCurrentWarehouse)) { - throw new CustomerException(403, "仓库信息不能为空"); - } + //判断类型 List distributionStockupSelfVO = new ArrayList<>(); @@ -656,7 +652,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { distributionStockupSelfVO = distributionStockupMapper.stockupSelfOffShelf(stockupDTO); } else { //商 市 - log.info(">>>> find bug {}",stockupDTO); + log.info(">>>> find bug stockupDTO {}",stockupDTO); distributionStockupSelfVO = distributionStockupMapper.stockupOffShelf(stockupDTO); } //有 @@ -678,7 +674,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService { if (a.get() == b.get()) { //下架 list.forEach(i -> { - warehouseUpdownTypeClient.downPackage(i, myCurrentWarehouse.getId()); + warehouseUpdownTypeClient.downPackage(i, stockupDTO.getWarehouseId()); }); } 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 3ba29e112..3eb659eea 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 @@ -2964,9 +2964,20 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImplquery().lambda() + .eq(DistributionSignforEntity::getReservationId, reservationEntity.getId()) + .eq(DistributionSignforEntity::getDeliveryId, deliveryListEntity.getId()) + ); + if (Func.isNotEmpty(signforEntity) && signforEntity.getSigningStatus().equals(SignforStatusConstant.yiqianshou.getValue())){ + log.error("#############商配文员对已复核预约进行订单追加reservationId:{}",reservationEntity.getId()); + throw new RuntimeException("收货单位:"+reservationEntity.getMallName()+"客户:"+reservationEntity.getConsignee()+"完成复核签收,无法追加订单"); + } + //查询出该预约下的订单信息 List reservationStockarticleEntityList = distributionReservationStockarticleMapper.selectList(Wrappers.query().lambda().eq(DistributionReservationStockarticleEntity::getReservationId, reservationEntity.getId()).ne(DistributionReservationStockarticleEntity::getStockArticleStatus, ReservationOrderStatusConstant.quxiao.getValue())); Map> oldOrder = reservationStockarticleEntityList.stream().collect(Collectors.groupingBy(DistributionReservationStockarticleEntity::getStockArticleId)); diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java index 6701cc86b..fa44537e7 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java @@ -2317,7 +2317,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(distributionCancelReservationPackageDTO.getReservationId()); + String orderCodes = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getOrderCode).distinct().collect(Collectors.joining(",")); for (String s : split) { if (Func.isNotEmpty(distributionParcelListEntities)){ List cancelPackage = distributionParcelListEntities.stream().filter(p -> p.getId().equals(Long.parseLong(s))).collect(Collectors.toList()); @@ -3617,6 +3620,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl