From 3558ca14beda6125346ee8e6e1e5bea83d6b8ad6 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Sun, 28 Apr 2024 21:25:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=A4=84=E7=90=86=E6=94=BE=20=E6=B2=A1=E6=9C=89=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jobhandler/AftersalesXxlJob.java | 44 +++++++++++++++---- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/jobhandler/AftersalesXxlJob.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/jobhandler/AftersalesXxlJob.java index ccd53fe71..cfd311e7e 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/jobhandler/AftersalesXxlJob.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/jobhandler/AftersalesXxlJob.java @@ -119,13 +119,15 @@ public class AftersalesXxlJob { BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(basicdataWarehouseEntity.getId()); if (ObjectUtil.isNotEmpty(warehouseEntity)) { - basicdataWarehouseEntity.setCode(warehouseEntity.getCode()); + basicdataWarehouseEntity.setWarehouseCode(warehouseEntity.getWarehouseCode()); } // 完善数据 List packageEntityList = new ArrayList<>(); AftersalesAbnormalPackageEntity aftersalesAbnormalPackageEntity = new AftersalesAbnormalPackageEntity(); + aftersalesAbnormalPackageEntity.setTenantId(bladeUser.getTenantId()); + aftersalesAbnormalPackageEntity.setCreateUser(bladeUser.getUserId()); aftersalesAbnormalPackageEntity.setPackageCode(aftersalesAbnormalRecordEntity.getOrderPackageCode()); aftersalesAbnormalPackageEntity.setWaybillNumber(aftersalesAbnormalRecordEntity.getWaybillNo()); aftersalesAbnormalPackageEntity.setOrderCode(aftersalesAbnormalRecordEntity.getOrderCode()); @@ -147,7 +149,7 @@ public class AftersalesXxlJob { aftersalesWorkOrder.setWaybillNumber(aftersalesAbnormalRecordEntity.getWaybillNo()); aftersalesWorkOrder.setOrderCode(aftersalesAbnormalRecordEntity.getOrderCode()); - WarehouseWaybillEntity byWaybillNo = wallBillOrderService.findByWaybillNo(aftersalesWorkOrder.getWorkOrderNumber()); + WarehouseWaybillEntity byWaybillNo = wallBillOrderService.findByWaybillNo(aftersalesWorkOrder.getWaybillNumber()); if (byWaybillNo != null) { aftersalesWorkOrder.setWaybillMall(byWaybillNo.getConsignee()); } @@ -158,21 +160,47 @@ public class AftersalesXxlJob { List processorEntityList = new ArrayList<>(); - AftersalesProcessorEntity aftersalesProcessorEntity = new AftersalesProcessorEntity(); - aftersalesProcessorEntity.setWarehouseId(entityByCarsNo.getStartWarehouseId()); + //责任方 - aftersalesProcessorEntity.setTypesOf("1"); + AftersalesProcessorEntity aftersalesProcessorEntity = new AftersalesProcessorEntity(); + aftersalesProcessorEntity.setWarehouseId(warehouseEntity.getId()); + aftersalesProcessorEntity.setBusinessId(entityByCarsNo.getStartWarehouseId()); + BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(entityByCarsNo.getStartWarehouseId()); + + if(entityWarehouseId!=null){ + aftersalesProcessorEntity.setBusinessName(entityWarehouseId.getName()); + } + + aftersalesProcessorEntity.setTypesOf("1"); + aftersalesProcessorEntity.setTenantId(bladeUser.getTenantId()); + aftersalesProcessorEntity.setCreateUser(bladeUser.getUserId()); + aftersalesProcessorEntity.setConditions("1"); processorEntityList.add(aftersalesProcessorEntity); + // 处理方 + AftersalesProcessorEntity aftersalesProcessorEntity1 = new AftersalesProcessorEntity(); + aftersalesProcessorEntity1.setWarehouseId(warehouseEntity.getId()); + aftersalesProcessorEntity1.setBusinessName(warehouseEntity.getName()); + aftersalesProcessorEntity1.setBusinessId(warehouseEntity.getId()); + aftersalesProcessorEntity1.setTypesOf("2"); + aftersalesProcessorEntity1.setTenantId(bladeUser.getTenantId()); + aftersalesProcessorEntity1.setCreateUser(bladeUser.getUserId()); + aftersalesProcessorEntity1.setConditions("1"); + processorEntityList.add(aftersalesProcessorEntity1); + aftersalesWorkOrder.setProcessorEntityList(processorEntityList); - //责任人 + + + + //责任人 List personResponsibleDTO = new ArrayList<>(); AftersalesPersonResponsibleDTO aftersalesPersonResponsibleDTO = new AftersalesPersonResponsibleDTO(); - + aftersalesPersonResponsibleDTO.setTenantId(bladeUser.getTenantId()); + aftersalesPersonResponsibleDTO.setCreateUser(aftersalesAbnormalRecordEntity.getCreateUser()); aftersalesPersonResponsibleDTO.setTypesOf("1"); // 需要获取到仓库的负责人 @@ -182,7 +210,7 @@ public class AftersalesXxlJob { aftersalesPersonResponsibleDTO.setPersonResponsibleId(wareManagerUser.get("userId").toString()); aftersalesPersonResponsibleDTO.setPersonResponsibleName(wareManagerUser.get("userName").toString()); } - warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(aftersalesProcessorEntity.getWarehouseId()); +// warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(aftersalesProcessorEntity.getWarehouseId()); aftersalesPersonResponsibleDTO.setResponsibilityRatio("100"); aftersalesPersonResponsibleDTO.setTypesOf("1"); aftersalesPersonResponsibleDTO.setDifference("1");