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