From 4d6e1048c2e68778b5d6fdd743c733d4fddc17cf Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Thu, 1 Feb 2024 11:17:58 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=B7=A5=E5=8D=95=E6=A8=A1=E7=B3=8A=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=BC=98=E5=8C=96=202.=E8=B6=85=E6=97=B6=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AftersalesOvertimeFineController.java | 2 +- .../AftersalesWorkOrderController.java | 2 +- .../excel/AftersalesOvertimeFineExcel.java | 10 +- .../excel/AftersalesWorkOrderExcel.java | 13 +- .../mapper/AftersalesOvertimeFineMapper.xml | 3 +- .../mapper/AftersalesWorkOrderMapper.xml | 15 +- .../service/IAftersalesWorkOrderService.java | 2 +- .../impl/AftersalesWorkOrderServiceImpl.java | 988 +++++++++--------- 8 files changed, 545 insertions(+), 490 deletions(-) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesOvertimeFineController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesOvertimeFineController.java index c4844ee63..73b10cf87 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesOvertimeFineController.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesOvertimeFineController.java @@ -161,7 +161,7 @@ public class AftersalesOvertimeFineController extends BladeController { /** * 导出数据 - * http://localhost:8798/aftersalesOvertimeFine/export-aftersalesOvertimeFine + * http://localhost:8799/aftersalesOvertimeFine/export-aftersalesOvertimeFine */ @GetMapping("/export-aftersalesOvertimeFine") @ApiOperationSupport(order = 9) 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 c11ea6919..b8bb3f6fc 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 @@ -619,7 +619,7 @@ public class AftersalesWorkOrderController extends BladeController { } /** - * 客服异常工单 钉钉流程号、审核人、审核日期,财务理赔入账日期、操作人 + * 客服异常工单 钉钉流程号、审核人、审核日期,财务理赔入账日期、操作人 //财务理赔入账日期、操作人 拆分 */ @PostMapping("/updateWorkList") @ApiOperationSupport(order = 5) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesOvertimeFineExcel.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesOvertimeFineExcel.java index 72ef2ba91..33b8f33c7 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesOvertimeFineExcel.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesOvertimeFineExcel.java @@ -45,8 +45,8 @@ public class AftersalesOvertimeFineExcel implements Serializable { @ColumnWidth(20) - @ExcelProperty("异常工单ID") - private String workOrderId; + @ExcelProperty("异常工单号") + private String workOrderNumber; @ColumnWidth(20) @ExcelProperty("金额") @@ -56,8 +56,6 @@ public class AftersalesOvertimeFineExcel implements Serializable { @ExcelProperty("超时时间") private String timeout; - @ExcelIgnore - private String workOrderNumber; @ColumnWidth(20) @ExcelProperty("工单异常类型") private String workOrderType; @@ -80,4 +78,8 @@ public class AftersalesOvertimeFineExcel implements Serializable { @ColumnWidth(20) @ExcelProperty("超时时间") private Date createTime; + + @ColumnWidth(20) + @ExcelProperty("备注") + private String remarks; } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java index 592b6f2d2..53f62e955 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java @@ -194,6 +194,12 @@ public class AftersalesWorkOrderExcel implements Serializable { @ColumnWidth(20) @ExcelProperty("财务入账时间") private Date entryTime; + /** + * 操作人 + */ + @ColumnWidth(20) + @ExcelProperty("操作人") + private String operator; /** * 备注 */ @@ -227,11 +233,6 @@ public class AftersalesWorkOrderExcel implements Serializable { @ColumnWidth(20) @ExcelProperty("钉钉流程号") private String processNumber; - /** - * 操作人 - */ - @ColumnWidth(20) - @ExcelProperty("操作人") - private String operator; + } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesOvertimeFineMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesOvertimeFineMapper.xml index 5a7521ea1..c3ad2c1bc 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesOvertimeFineMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesOvertimeFineMapper.xml @@ -50,13 +50,14 @@ SELECT laof.id, lawo.work_order_number workOrderNumber, - lawo.work_order_type workOrderType, + lawo.work_order_type , lawo.discovery_node discoveryNode, COUNT( laof.id ) AS timeoutRecordNumber, laof.create_time createTime, laof.timeout, laof.money, laof.business_name businessName, + laof.remarks, lawo.id workOrderId FROM logpm_aftersales_overtime_fine laof 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 ec49b8df9..ea80f1c18 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 @@ -229,8 +229,15 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d AND lacr.is_deleted = '0' lawo.is_deleted = 0 - and lawo.id = #{param.id } - and lawo.work_order_type = #{param.workOrderType } + + and lawo.id IN + + + #{id} + + + + and lawo.work_order_type = #{param.workOrderType } and lawo.initiation_identification = #{param.initiationIdentification } and lawo.discovery_node = #{param.discoveryNode } and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') @@ -329,7 +336,8 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d law.reviewed_by, law.audit_time, law.entry_time, - law.operator + law.operator, + law.brand_name FROM logpm_aftersales_processor lap LEFT JOIN logpm_aftersales_work_order law ON lap.work_order_id = law.id @@ -360,6 +368,7 @@ 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 law.brand_name like concat('%',#{param.brandName},'%') diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java index b020bb170..45b097c04 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesWorkOrderService.java @@ -116,7 +116,7 @@ public interface IAftersalesWorkOrderService extends BaseService exportAftersalesWorkOrder(Map objectMap) { + public List exportAftersalesWorkOrder(Map aftersalesWorkOrder) { + Object o = aftersalesWorkOrder.get("ids"); + //查询用户角色信息 BladeUser user = AuthUtil.getUser(); String roleName = user.getRoleName(); String tenantId = user.getTenantId(); - //查询客服岗位 List warehouseType = DictBizCache.getList("after_sales_visits"); if (warehouseType.isEmpty()) { @@ -137,53 +139,64 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl aftersalesWorkOrderList = new ArrayList<>(); //导出 List aftersalesWorkOrderEntities = baseMapper.exportAftersalesWorkOrder(workOrderEntity); @@ -244,15 +261,16 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl { // aftersalesWorkOrder.setTypeName(DictCache.getValue(DictEnum.YES_NO, AftersalesWorkOrder.getType())); AftersalesWorkOrderExcel aftersalesWorkOrderExcel = new AftersalesWorkOrderExcel(); - BeanUtil.copyProperties(i,aftersalesWorkOrderExcel); + BeanUtil.copyProperties(i, aftersalesWorkOrderExcel); aftersalesWorkOrderList.add(aftersalesWorkOrderExcel); - aftersalesWorkOrderExcel.setWorkOrderTypeName(DictBizCache.getValue(DictBizConstant.PC_WORK_ORDER,i.getWorkOrderStatus())); - if("PC".equals(aftersalesWorkOrderExcel.getInitiationIdentification())){ + aftersalesWorkOrderExcel.setWorkOrderTypeName(DictBizCache.getValue(DictBizConstant.PC_WORK_ORDER, i.getWorkOrderStatus())); + aftersalesWorkOrderExcel.setWorkOrderStatus(DictBizCache.getValue(DictBizConstant.WORK_ORDER_STATUS, i.getWorkOrderStatus())); + if ("PC".equals(aftersalesWorkOrderExcel.getInitiationIdentification())) { //PC - aftersalesWorkOrderExcel.setDiscoveryNodeName(DictBizCache.getValue(DictBizConstant.PC_DISCOVERY_NODE,i.getDiscoveryNode())); - }else{ + aftersalesWorkOrderExcel.setDiscoveryNodeName(DictBizCache.getValue(DictBizConstant.PC_DISCOVERY_NODE, i.getDiscoveryNode())); + } else { //PDA - aftersalesWorkOrderExcel.setDiscoveryNodeName(DictBizCache.getValue(DictBizConstant.PDA_LINK_LNITIATION,i.getDiscoveryNode())); + aftersalesWorkOrderExcel.setDiscoveryNodeName(DictBizCache.getValue(DictBizConstant.PDA_LINK_LNITIATION, i.getDiscoveryNode())); } aftersalesWorkOrderExcel.setWorkOrderTypeName(WorkOrderTypeConstant.getNameByValue(i.getWorkOrderType())); }); @@ -262,9 +280,10 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl first = Arrays.stream(values).filter(i -> i.getValue().equals(workOrderType)).findFirst(); @@ -274,13 +293,13 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl numberRules = DictBizCache.getList("work_order_number_rules"); SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss"); - if (ObjectUtils.isNull(numberRules) || numberRules.isEmpty()) { + if (ObjectUtils.isNull(numberRules) || numberRules.isEmpty()) { log.info("注意,注意!工单号字典未配置!请配置!"); } else { Optional first2 = pcWorkOrder.stream().filter(i -> i.getDictKey().equals(workOrderType)).findFirst(); //工单号规则待完善 - if(first2.isPresent()){ + if (first2.isPresent()) { DictBiz dictBiz = first2.get(); Optional first1 = numberRules.stream().filter(i -> i.getDictValue().equals(dictBiz.getDictValue())).findFirst(); return first1.map(DictBiz -> DictBiz.getDictKey() + name + format.format(new Date())).orElseGet(() -> "YC" + name + format.format(new Date())); @@ -288,14 +307,12 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl{ - if("1".equals(k)){ - //责任人 - String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(",")); - aftersalesWorkOrder.setResponsiblePerson(collect); - }else{ - String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(",")); - aftersalesWorkOrder.setProcessedBy(collect); - } + .forEach((k, v) -> { + if ("1".equals(k)) { + //责任人 + String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(",")); + aftersalesWorkOrder.setResponsiblePerson(collect); + } else { + String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(",")); + aftersalesWorkOrder.setProcessedBy(collect); + } - }); + }); } //添加处理结果 - if(ObjectUtils.isNotNull(aftersalesWorkOrder.getAftersalesProcessingResultsDTO()) && ObjectUtils.isNotNull(aftersalesWorkOrder.getAftersalesProcessingResultsDTO().getCompensationMethod())){ + if (ObjectUtils.isNotNull(aftersalesWorkOrder.getAftersalesProcessingResultsDTO()) && ObjectUtils.isNotNull(aftersalesWorkOrder.getAftersalesProcessingResultsDTO().getCompensationMethod())) { aftersalesWorkOrder.setWorkOrderStatus(WorkOrderStatusConstant.chulijeiguoyitianxei.getValue()); } baseMapper.insert(aftersalesWorkOrder); - }else{ + } else { //修改 - if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnPpackageEntityList())){ + if (ObjectUtil.isNotNull(aftersalesWorkOrder.getUnPpackageEntityList())) { //删除修改包件 aftersalesAbnormalPackageService.deleteLogic(aftersalesWorkOrder.getUnPpackageEntityList()); } - if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnProcessorEntityList())){ + if (ObjectUtil.isNotNull(aftersalesWorkOrder.getUnProcessorEntityList())) { //责任方 处理方 // List list = new ArrayList<>(); - aftersalesWorkOrder.getUnProcessorEntityList().forEach(i ->{ + aftersalesWorkOrder.getUnProcessorEntityList().forEach(i -> { AftersalesProcessorEntity processorEntity = new AftersalesProcessorEntity(); processorEntity.setId(i); processorEntity.setConditions("3"); - if(ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())){ + if (ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())) { aftersalesWorkOrder.getProcessorEntityList().stream().collect(Collectors.groupingBy(AftersalesProcessorEntity::getTypesOf)) - .forEach((k,v) ->{ - if("1".equals(k)){ + .forEach((k, v) -> { + if ("1".equals(k)) { //责任人 String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(",")); aftersalesWorkOrder.setResponsiblePerson(collect); - }else{ + } else { String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(",")); aftersalesWorkOrder.setProcessedBy(collect); } @@ -374,24 +391,24 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list = new ArrayList<>(); - aftersalesWorkOrder.getPackageEntityList().forEach(i ->{ - if(ObjectUtils.isNotNull( i.getId()) ){ + aftersalesWorkOrder.getPackageEntityList().forEach(i -> { + if (ObjectUtils.isNotNull(i.getId())) { //修改包件信息 // AftersalesAbnormalPackageEntity abnormalPackage = new AftersalesAbnormalPackageEntity(); aftersalesAbnormalPackageService.updateById(i); - }else{ + } else { //添加 AftersalesAbnormalPackageEntity packageEntity = new AftersalesAbnormalPackageEntity(); - BeanUtil.copyProperties(i,packageEntity); + BeanUtil.copyProperties(i, packageEntity); packageEntity.setWorkOrderId(aftersalesWorkOrder.getId()); packageEntity.setWarehouseId(myCurrentWarehouse.getId()); list.add(packageEntity); } }); - if(!list.isEmpty()){ + if (!list.isEmpty()) { aftersalesAbnormalPackageService.saveBatch(list); } } AftersaleSurveyRecordEntity aftersaleSurveyRecord = new AftersaleSurveyRecordEntity(); //添加调查记录 - if(ObjectUtils.isNotNull(aftersalesWorkOrder.getSurveyRecordDTO())){ + if (ObjectUtils.isNotNull(aftersalesWorkOrder.getSurveyRecordDTO())) { AftersaleSurveyRecordDTO surveyRecordDTO = changName(aftersalesWorkOrder, user); - BeanUtil.copyProperties(surveyRecordDTO,aftersaleSurveyRecord); + BeanUtil.copyProperties(surveyRecordDTO, aftersaleSurveyRecord); aftersaleSurveyRecord.setTypesOf("1"); aftersaleSurveyRecord.setDifference("1"); aftersaleSurveyRecord.setWorkOrderId(aftersalesWorkOrder.getId()); @@ -433,23 +450,23 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list = new ArrayList<>(); - aftersalesWorkOrder.getProcessorEntityList().forEach(i ->{ + aftersalesWorkOrder.getProcessorEntityList().forEach(i -> { AftersalesProcessorEntity processor = addProcessor(aftersalesWorkOrder, myCurrentWarehouse, i); // list.add(processor); //添加指派记录 - if(ProcessorTypesOfStatusConstant.chulifang.getValue().equals(i.getTypesOf())){ + if (ProcessorTypesOfStatusConstant.chulifang.getValue().equals(i.getTypesOf())) { //处理方 addSurveRecord(aftersalesWorkOrder, user, i); processor.setAssignTime(new Date()); list.add(processor); - }else{ + } else { list.add(processor); } aftersalesProcessorService.save(processor); - if(ProcessorTypesOfStatusConstant.chulifang.getValue().equals(i.getTypesOf())){ + if (ProcessorTypesOfStatusConstant.chulifang.getValue().equals(i.getTypesOf())) { AftersalesReplyingPartyEntity replyingPartyEntity = getPartyEntity(aftersalesWorkOrder, processor, aftersaleSurveyRecord); //添加待回复信息 aftersalesReplyingPartyService.save(replyingPartyEntity); @@ -458,71 +475,72 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list = new ArrayList<>(); - aftersalesWorkOrder.getDecreaseImageEntityList().forEach(i ->{ + aftersalesWorkOrder.getDecreaseImageEntityList().forEach(i -> { AftersalesDecreaseImageEntity packageEntity = new AftersalesDecreaseImageEntity(); - BeanUtil.copyProperties(i,packageEntity); + BeanUtil.copyProperties(i, packageEntity); packageEntity.setWorkOrderId(aftersalesWorkOrder.getId()); packageEntity.setWarehouseId(myCurrentWarehouse.getId()); list.add(packageEntity); }); - if(!list.isEmpty()){ + if (!list.isEmpty()) { aftersalesDecreaseImageService.saveBatch(list); } } //添加责任人信息 - if(ObjectUtils.isNotNull(aftersalesWorkOrder.getPersonResponsibleDTO()) && !aftersalesWorkOrder.getPersonResponsibleDTO().isEmpty()){ + if (ObjectUtils.isNotNull(aftersalesWorkOrder.getPersonResponsibleDTO()) && !aftersalesWorkOrder.getPersonResponsibleDTO().isEmpty()) { List personResponsibleList = getAftersalesPersonResponsibleEntities(aftersalesWorkOrder); - if(!personResponsibleList.isEmpty()){ + if (!personResponsibleList.isEmpty()) { aftersalesPersonResponsibleService.saveBatch(personResponsibleList); } } //添加完结受款方数据 - if(ObjectUtils.isNotNull(aftersalesWorkOrder.getCompletionRecipientEntities())){ + if (ObjectUtils.isNotNull(aftersalesWorkOrder.getCompletionRecipientEntities())) { List collect = aftersalesWorkOrder.getCompletionRecipientEntities().stream().filter(i -> ObjectUtils.isNotNull(i.getId())).collect(Collectors.toList()); List collect1 = aftersalesWorkOrder.getCompletionRecipientEntities().stream().filter(i -> ObjectUtils.isNull(i.getId())).collect(Collectors.toList()); - if(!collect.isEmpty()){ + if (!collect.isEmpty()) { //修改 - collect.forEach(i ->{ + collect.forEach(i -> { completionRecipientService.updateById(i); }); } - if(!collect1.isEmpty()){ + if (!collect1.isEmpty()) { //添加 completionRecipientService.saveBatch(collect1); } } //添加完结赔款方数据 - if(ObjectUtils.isNotNull(aftersalesWorkOrder.getCompletionRecordEntities())){ + if (ObjectUtils.isNotNull(aftersalesWorkOrder.getCompletionRecordEntities())) { List collect = aftersalesWorkOrder.getCompletionRecordEntities().stream().filter(i -> ObjectUtils.isNotNull(i.getId())).collect(Collectors.toList()); List collect1 = aftersalesWorkOrder.getCompletionRecordEntities().stream().filter(i -> ObjectUtils.isNull(i.getId())).collect(Collectors.toList()); - if(!collect.isEmpty()){ + if (!collect.isEmpty()) { //修改 - collect.forEach(i ->{ + collect.forEach(i -> { completionRecordService.updateById(i); }); } - if(!collect1.isEmpty()){ + if (!collect1.isEmpty()) { //添加 completionRecordService.saveBatch(collect1); } // completionRecordService.saveBatch(aftersalesWorkOrder.getCompletionRecordEntities()); } //添加处理结果 - if(ObjectUtils.isNotNull(aftersalesWorkOrder.getAftersalesProcessingResultsDTO()) && ObjectUtils.isNotNull( aftersalesWorkOrder.getAftersalesProcessingResultsDTO().getCompensationMethod() ) ){ + if (ObjectUtils.isNotNull(aftersalesWorkOrder.getAftersalesProcessingResultsDTO()) && ObjectUtils.isNotNull(aftersalesWorkOrder.getAftersalesProcessingResultsDTO().getCompensationMethod())) { addProcessingResults(aftersalesWorkOrder); } - return true; + return true; } /** * 回复信息添加 + * * @param aftersalesWorkOrder * @param processor * @param aftersaleSurveyRecord @@ -544,19 +562,20 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl> deptNames = sysClient.getDeptNames(user.getDeptId()); - if(ObjectUtils.isNotNull(deptNames)){ + if (ObjectUtils.isNotNull(deptNames)) { String collect = deptNames.getData().stream().collect(Collectors.joining(",")); surveyRecordDTO.setAddDepartment(collect); } @@ -570,12 +589,12 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl personResponsibleDTO = aftersalesWorkOrder.getPersonResponsibleDTO(); List personResponsibleList = new ArrayList<>(); - personResponsibleDTO.forEach( i ->{ + personResponsibleDTO.forEach(i -> { AftersalesPersonResponsibleEntity personResponsibleEntity = new AftersalesPersonResponsibleEntity(); - BeanUtil.copyProperties(i , personResponsibleEntity); - if(ObjectUtils.isNotNull(personResponsibleEntity.getPersonResponsibleId()) ){ + BeanUtil.copyProperties(i, personResponsibleEntity); + if (ObjectUtils.isNotNull(personResponsibleEntity.getPersonResponsibleId())) { personResponsibleEntity.setTypesOf("1"); - }else{ + } else { personResponsibleEntity.setTypesOf("2"); } personResponsibleEntity.setDifference("1"); @@ -587,6 +606,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl getPendingWorkOrder(AftersalesWorkOrderDTO aftersalesWorkOrder, IPage page) { - IPage list = baseMapper.getPendingWorkOrder(page,aftersalesWorkOrder); + IPage list = baseMapper.getPendingWorkOrder(page, aftersalesWorkOrder); return list; } /** * 完成异常工单数据 + * * @param aftersalesWorkOrder * @return */ @Override public boolean addCompletionEnd(List aftersalesWorkOrder) { BladeUser user = AuthUtil.getUser(); - if(ObjectUtil.isNull(aftersalesWorkOrder)){ + if (ObjectUtil.isNull(aftersalesWorkOrder)) { return false; } - aftersalesWorkOrder.forEach(v ->{ - if(ObjectUtils.isNull(v.getId())){ + aftersalesWorkOrder.forEach(v -> { + if (ObjectUtils.isNull(v.getId())) { throw new ServiceException("异常工单ID不能为空!"); } - if(ObjectUtils.isNull(v.getCompletionRecordEntities()) ){ + if (ObjectUtils.isNull(v.getCompletionRecordEntities())) { throw new ServiceException("赔款方数据不能为空"); } AftersalesWorkOrderEntity workOrderEntity1 = baseMapper.selectById(v.getId()); - if(workOrderEntity1.getWorkOrderStatus().equals(WorkOrderStatusConstant.yiwanjei.getValue())){ + if (workOrderEntity1.getWorkOrderStatus().equals(WorkOrderStatusConstant.yiwanjei.getValue())) { throw new ServiceException(" 包含已完结的异常工单!"); } //添加赔付方信息 completionRecordService.saveBatch(v.getCompletionRecordEntities()); //添加受款方信息,可以为空 - if(ObjectUtils.isNotNull(v.getCompletionRecipientEntities())){ + if (ObjectUtils.isNotNull(v.getCompletionRecipientEntities())) { completionRecipientService.saveBatch(v.getCompletionRecipientEntities()); } //修改工单异常待审核状态 @@ -631,7 +652,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl iPage = baseMapper.pageListOwn(page, workOrderEntity); - iPage.getRecords().forEach( i ->{ - if(ObjectUtils.isNotNull(i.getCustomerServiceId())){ + iPage.getRecords().forEach(i -> { + if (ObjectUtils.isNotNull(i.getCustomerServiceId())) { R> listR = userSearchClient.listByUser(String.valueOf(i.getCustomerServiceId())); - if(ObjectUtils.isNotNull( listR.getData())){ - listR.getData().forEach( a ->{ - long time = new Date().getTime() / 1000; //当前时间 - if(ObjectUtils.isNotNull( a.getDownTime() )){ - long l = a.getDownTime().getTime() / 1000; //停用时间 - if(l <= time){ - // 已停用 - i.setDepartStatus(true); //已离职 - } + if (ObjectUtils.isNotNull(listR.getData())) { + listR.getData().forEach(a -> { + long time = new Date().getTime() / 1000; //当前时间 + if (ObjectUtils.isNotNull(a.getDownTime())) { + long l = a.getDownTime().getTime() / 1000; //停用时间 + if (l <= time) { + // 已停用 + i.setDepartStatus(true); //已离职 } + } - }); + }); } } @@ -850,75 +870,75 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl i1) { - i1 += DictTimeoutEnum.huifushijian.getValue(); - ci += 1; - } - //查询处理方的超时的记录 - List list = aftersalesOvertimeFineService.list(Wrappers.query().lambda() - .eq(AftersalesOvertimeFineEntity::getWorkOrderId, i.getWorkOrderId()) - .eq(AftersalesOvertimeFineEntity::getProcessorId, i.getId()) - ); - int size = list.size(); - for (int q = 0; q < ci ; q++){ - //第一次超时 - if(size == 0 ){ - //处理超时数据 - AftersalesProcessorEntity processor = new AftersalesProcessorEntity(); - processor.setProcessingStatus("3");//回复超时 - processor.setId(i.getId()); - aftersalesProcessorService.updateById(processor); - //添加超时记录 - AftersalesOvertimeFineEntity overtimeFineEntity = new AftersalesOvertimeFineEntity(); - overtimeFineEntity.setWorkOrderId(i.getWorkOrderId()); - overtimeFineEntity.setTenantId(finalTenantId); - overtimeFineEntity.setMoney(BigDecimal.valueOf(50)); - overtimeFineEntity.setTimeout(formattedTime); - overtimeFineEntity.setBusinessId(i.getBusinessId()); - overtimeFineEntity.setBusinessName(i.getBusinessName()); - overtimeFineEntity.setProcessorId(i.getId()); - aftersalesOvertimeFineService.save(overtimeFineEntity); - }else if(q > size){ - //添加新的超时记录 - AftersalesOvertimeFineEntity overtimeFineEntity = new AftersalesOvertimeFineEntity(); - overtimeFineEntity.setWorkOrderId(i.getWorkOrderId()); - overtimeFineEntity.setTenantId(finalTenantId); - overtimeFineEntity.setMoney(BigDecimal.valueOf(50)); - overtimeFineEntity.setTimeout(formattedTime); - overtimeFineEntity.setBusinessId(i.getBusinessId()); - overtimeFineEntity.setBusinessName(i.getBusinessName()); - overtimeFineEntity.setProcessorId(i.getId()); - aftersalesOvertimeFineService.save(overtimeFineEntity); - } + // 假设有两个时间戳(秒数) + long timestamp1 = new Date().getTime() / 1000; // 现在时间 + long timestamp2 = i.getAssignTime().getTime() / 1000; // 修改时间 + + // 将时间戳转换为Instant对象 + Instant instant1 = Instant.ofEpochSecond(timestamp1); + Instant instant2 = Instant.ofEpochSecond(timestamp2); + log.info("现在时间》》》{}", instant1); + log.info("修改时间》》》{}", instant2); + // 计算两个时间戳之间的小时差 + Duration duration = Duration.between(instant1, instant2); + + long seconds = duration.getSeconds(); + long hours1 = seconds / 3600; + long minutes = (seconds % 3600) / 60; + long remainingseconds = seconds % 60; + String formattedTime = String.format("%02d:%02d:%02d", Math.abs(hours1), Math.abs(minutes), Math.abs(remainingseconds)); // 差值格式化为HH:m:ss形武 + System.out.println("时间差为: " + formattedTime); // 出结 + + long hours = duration.toHours(); + Integer number = Math.abs(Integer.valueOf((int) hours)); + int i1 = DictTimeoutEnum.huifushijian.getValue(); + int ci = 0; + while (number > i1) { + i1 += DictTimeoutEnum.huifushijian.getValue(); + ci += 1; + } + //查询处理方的超时的记录 + List list = aftersalesOvertimeFineService.list(Wrappers.query().lambda() + .eq(AftersalesOvertimeFineEntity::getWorkOrderId, i.getWorkOrderId()) + .eq(AftersalesOvertimeFineEntity::getProcessorId, i.getId()) + ); + int size = list.size(); + for (int q = 0; q < ci; q++) { + //第一次超时 + if (size == 0) { + //处理超时数据 + AftersalesProcessorEntity processor = new AftersalesProcessorEntity(); + processor.setProcessingStatus("3");//回复超时 + processor.setId(i.getId()); + aftersalesProcessorService.updateById(processor); + //添加超时记录 + AftersalesOvertimeFineEntity overtimeFineEntity = new AftersalesOvertimeFineEntity(); + overtimeFineEntity.setWorkOrderId(i.getWorkOrderId()); + overtimeFineEntity.setTenantId(finalTenantId); + overtimeFineEntity.setMoney(BigDecimal.valueOf(50)); + overtimeFineEntity.setTimeout(formattedTime); + overtimeFineEntity.setBusinessId(i.getBusinessId()); + overtimeFineEntity.setBusinessName(i.getBusinessName()); + overtimeFineEntity.setProcessorId(i.getId()); + aftersalesOvertimeFineService.save(overtimeFineEntity); + } else if (q > size) { + //添加新的超时记录 + AftersalesOvertimeFineEntity overtimeFineEntity = new AftersalesOvertimeFineEntity(); + overtimeFineEntity.setWorkOrderId(i.getWorkOrderId()); + overtimeFineEntity.setTenantId(finalTenantId); + overtimeFineEntity.setMoney(BigDecimal.valueOf(50)); + overtimeFineEntity.setTimeout(formattedTime); + overtimeFineEntity.setBusinessId(i.getBusinessId()); + overtimeFineEntity.setBusinessName(i.getBusinessName()); + overtimeFineEntity.setProcessorId(i.getId()); + aftersalesOvertimeFineService.save(overtimeFineEntity); } + } } @@ -1048,7 +1068,8 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl processorVOS = new ArrayList<>(); List list = aftersalesProcessorService.list(Wrappers.query().lambda() @@ -1101,10 +1123,10 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl processorVOS = list.stream().map( i ->{ - if(i.getProcessingStatus().equals(ProcessorProcessingStatusStatusConstant.daichuli.getValue()) || i.getProcessingStatus().equals(ProcessorProcessingStatusStatusConstant.yichuli.getValue())){ + List processorVOS = list.stream().map(i -> { + if (i.getProcessingStatus().equals(ProcessorProcessingStatusStatusConstant.daichuli.getValue()) || i.getProcessingStatus().equals(ProcessorProcessingStatusStatusConstant.yichuli.getValue())) { AftersalesProcessorVO processorVO = new AftersalesProcessorVO(); - BeanUtil.copyProperties(i,processorVO); + BeanUtil.copyProperties(i, processorVO); return processorVO; } return null; @@ -1115,9 +1137,9 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list1 = aftersalesAbnormalPackageService.list(Wrappers.query().lambda() .eq(AftersalesAbnormalPackageEntity::getWorkOrderId, aftersalesWorkOrder.getId()) ); - List abnormalPackageVOS = list1.stream().map(i ->{ + List abnormalPackageVOS = list1.stream().map(i -> { AftersalesAbnormalPackageVO abnormalPackageVO = new AftersalesAbnormalPackageVO(); - BeanUtil.copyProperties(i,abnormalPackageVO); + BeanUtil.copyProperties(i, abnormalPackageVO); return abnormalPackageVO; }).collect(Collectors.toList()); aftersalesWorkOrderVO.setAbnormalPackageVOList(abnormalPackageVOS); @@ -1125,9 +1147,9 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list2 = aftersalesDecreaseImageService.list(Wrappers.query().lambda() .eq(AftersalesDecreaseImageEntity::getWorkOrderId, aftersalesWorkOrder.getId()) ); - List decreaseImageVOS = list2.stream().map( i ->{ + List decreaseImageVOS = list2.stream().map(i -> { AftersalesDecreaseImageVO decreaseImageVO = new AftersalesDecreaseImageVO(); - BeanUtil.copyProperties(i,decreaseImageVO); + BeanUtil.copyProperties(i, decreaseImageVO); return decreaseImageVO; }).collect(Collectors.toList()); aftersalesWorkOrderVO.setDecreaseImageVOList(decreaseImageVOS); @@ -1136,32 +1158,32 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list3 = aftersalesPersonResponsibleService.list(Wrappers.query().lambda() .eq(AftersalesPersonResponsibleEntity::getWordOrderId, aftersalesWorkOrder.getId()) ); - if(!list.isEmpty()){ + if (!list.isEmpty()) { List personResponsibleVOList = new ArrayList<>(); - list3.forEach( i ->{ + list3.forEach(i -> { AftersalesPersonResponsibleVO personResponsibleVO = new AftersalesPersonResponsibleVO(); - BeanUtil.copyProperties(i,personResponsibleVO); + BeanUtil.copyProperties(i, personResponsibleVO); personResponsibleVOList.add(personResponsibleVO); }); aftersalesWorkOrderVO.setPersonResponsibleVOS(personResponsibleVOList); } //todo 查询完结信息 - AftersalesCompletionRecordEntity completionRecordEntity= new AftersalesCompletionRecordEntity(); + AftersalesCompletionRecordEntity completionRecordEntity = new AftersalesCompletionRecordEntity(); AftersalesCompletionRecipientEntity completionRecipientEntity = new AftersalesCompletionRecipientEntity(); List list4 = completionRecordService.list(Wrappers.query().lambda() - .eq(AftersalesCompletionRecordEntity::getWorkOrderId,aftersalesWorkOrder.getId()) + .eq(AftersalesCompletionRecordEntity::getWorkOrderId, aftersalesWorkOrder.getId()) ); aftersalesWorkOrderVO.setCompletionRecordEntities(list4); List list5 = completionRecipientService.list(Wrappers.query().lambda() - .eq(AftersalesCompletionRecipientEntity::getWorkOrderId,aftersalesWorkOrder.getId()) + .eq(AftersalesCompletionRecipientEntity::getWorkOrderId, aftersalesWorkOrder.getId()) ); aftersalesWorkOrderVO.setCompletionRecipientEntityList(list5); @@ -1171,18 +1193,19 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl q = new LambdaUpdateWrapper<>(); - q.in(AftersalesWorkOrderEntity::getId,aftersalesWorkOrder.getAssignList()); + q.in(AftersalesWorkOrderEntity::getId, aftersalesWorkOrder.getAssignList()); - return R.data( baseMapper.update(aftersalesWorkOrderEntity,q) ); + return R.data(baseMapper.update(aftersalesWorkOrderEntity, q)); } @@ -1200,32 +1223,33 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl data, Boolean isCovered) { - if(!data.isEmpty()){ + if (!data.isEmpty()) { BladeUser user = AuthUtil.getUser(); - List list= new ArrayList<>(); - data.stream().forEach( k ->{ - //查询工单数据是否存在 + List list = new ArrayList<>(); + data.stream().forEach(k -> { + //查询工单数据是否存在 AftersalesWorkOrderEntity workOrder = baseMapper.selectOne(Wrappers.query().lambda() .eq(AftersalesWorkOrderEntity::getWorkOrderNumber, k) ); - if(ObjectUtils.isNull(workOrder)){ - throw new ServiceException(k+"不存在!!请确定!!"); - } - AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); - BeanUtil.copyProperties(k,workOrderEntity); - if(ObjectUtils.isNotNull( k.getEntryTime())){ - workOrderEntity.setOperator(user.getUserName()); - } - workOrderEntity.setId(workOrder.getId()); - list.add(workOrderEntity); + if (ObjectUtils.isNull(workOrder)) { + throw new ServiceException(k + "不存在!!请确定!!"); + } + AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); + BeanUtil.copyProperties(k, workOrderEntity); + if (ObjectUtils.isNotNull(k.getEntryTime())) { + workOrderEntity.setOperator(user.getUserName()); + } + workOrderEntity.setId(workOrder.getId()); + list.add(workOrderEntity); }); - if(!list.isEmpty()){ + if (!list.isEmpty()) { baseMapper.updateList(list); } } @@ -1233,8 +1257,8 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl aftersalesPackageScan(AftersalesPackageScanDTO aftersalesPackageScanDTO) { - List abnormalPackageVO = distributionDeliveryListClient.aftersalesPackageScan(aftersalesPackageScanDTO.getDeliveryId(),aftersalesPackageScanDTO.getScanBarCode()); - if (Func.isEmpty(abnormalPackageVO)){ + List abnormalPackageVO = distributionDeliveryListClient.aftersalesPackageScan(aftersalesPackageScanDTO.getDeliveryId(), aftersalesPackageScanDTO.getScanBarCode()); + if (Func.isEmpty(abnormalPackageVO)) { //查询此配送送任务下无此包件信息 } @@ -1246,14 +1270,14 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl packageList = aftersalesWorkOrderDTO.getPackageList(); - if (Func.isEmpty(packageList)){ - return Resp.scanFail("请扫描包件信息","请扫描包件信息"); + if (Func.isEmpty(packageList)) { + return Resp.scanFail("请扫描包件信息", "请扫描包件信息"); } List aftersalesAbnormalPackageEntities = new ArrayList<>(); for (AftersalesAbnormalPackageVO abnormalPackageVO : packageList) { @@ -1271,18 +1295,19 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl getCustomerServicePersonnel() { BladeUser user = AuthUtil.getUser(); - String tenantId = user.getTenantId(); - //查询客服岗位 + String tenantId = user.getTenantId(); + //查询客服岗位 List warehouseType = DictBizCache.getList("customer_service"); if (warehouseType.isEmpty()) { throw new ServiceException("注意,注意!客服人员字典未配置!请配置!"); @@ -1298,15 +1323,15 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl> listR = userSearchClient.listByRole(roleIds); //查询角色下的所有人员数据 List userList = new ArrayList<>(); - if(!listR.getData().isEmpty()){ - listR.getData().forEach( i ->{ + if (!listR.getData().isEmpty()) { + listR.getData().forEach(i -> { long time = new Date().getTime() / 1000; - if(ObjectUtils.isNotNull( i.getDownTime() )){ + if (ObjectUtils.isNotNull(i.getDownTime())) { long l = i.getDownTime().getTime() / 1000; - if(l> time){ + if (l > time) { userList.add(i); } - }else{ + } else { userList.add(i); } @@ -1318,6 +1343,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl arbitrationOrderList = new ArrayList<>(); BladeUser user = AuthUtil.getUser(); - aftersalesWorkOrder.getAssignList().forEach(i ->{ + aftersalesWorkOrder.getAssignList().forEach(i -> { AftersalesWorkOrderEntity aftersalesWorkOrderEntity = new AftersalesWorkOrderEntity(); aftersalesWorkOrderEntity.setId(i); aftersalesWorkOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.zhongchaizhong.getValue()); @@ -1340,14 +1366,14 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl lambdaUpdateWrapper = new UpdateWrapper<>(); - lambdaUpdateWrapper.eq("work_order_id",l); - lambdaUpdateWrapper.set("operate_type","客服完结"); - lambdaUpdateWrapper.set("types_of",WorkOrderTypesOfStatusConstant.jeishu.getValue()); + lambdaUpdateWrapper.eq("work_order_id", l); + lambdaUpdateWrapper.set("operate_type", "客服完结"); + lambdaUpdateWrapper.set("types_of", WorkOrderTypesOfStatusConstant.jeishu.getValue()); aftersalesArbitrationOrderService.update(lambdaUpdateWrapper); //添加跟踪记录 AftersaleSurveyRecordEntity surveyRecordEntity = new AftersaleSurveyRecordEntity(); AftersaleSurveyRecordDTO aftersaleSurveyRecordDTO = changName(aftersalesWorkOrder, user); - BeanUtil.copyProperties(aftersaleSurveyRecordDTO,surveyRecordEntity); + BeanUtil.copyProperties(aftersaleSurveyRecordDTO, surveyRecordEntity); surveyRecordEntity.setDifference("3"); surveyRecordEntity.setTypesOf("1"); surveyRecordEntity.setWorkOrderId(l); @@ -1411,17 +1437,18 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl getBusinessDepartmentUser(Long warehouseId) { BasicdataWarehouseEntity entityWarehouseId = warehouseClient.getEntityWarehouseId(warehouseId); - if(ObjectUtils.isNotNull(warehouseId)){ + if (ObjectUtils.isNotNull(warehouseId)) { //查询单独的责任人 R> listR = userSearchClient.listByName(entityWarehouseId.getLinkman()); return listR.getData(); - }else{ + } else { //查询全部数据 R> listR = userSearchClient.listByDept(String.valueOf(entityWarehouseId.getDepartment())); return listR.getData(); @@ -1432,6 +1459,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list = aftersalesProcessorService.list(Wrappers.query().lambda() .eq(AftersalesProcessorEntity::getWorkOrderId, aftersalesWorkOrderDTO.getId()) - .eq(AftersalesProcessorEntity::getTypesOf,ProcessorTypesOfStatusConstant.chulifang.getValue()) + .eq(AftersalesProcessorEntity::getTypesOf, ProcessorTypesOfStatusConstant.chulifang.getValue()) ); Optional one = null; //判断是不是客服 AftersaleSurveyRecordEntity surveyRecordEntity = new AftersaleSurveyRecordEntity(); AftersaleSurveyRecordDTO surveyRecordDTO = aftersalesWorkOrderDTO.getSurveyRecordDTO(); - BeanUtil.copyProperties(surveyRecordDTO,surveyRecordEntity); - if(ObjectUtils.isNotNull(myCurrentWarehouse)){ + BeanUtil.copyProperties(surveyRecordDTO, surveyRecordEntity); + if (ObjectUtils.isNotNull(myCurrentWarehouse)) { one = list.stream().filter(i -> i.getBusinessId().equals(myCurrentWarehouse.getId()) && i.getBusinessName().equals(myCurrentWarehouse.getName())).findFirst(); - one.ifPresent(aftersalesProcessorEntity -> surveyRecordEntity.setProcessorId(aftersalesProcessorEntity.getId())); + one.ifPresent(aftersalesProcessorEntity -> surveyRecordEntity.setProcessorId(aftersalesProcessorEntity.getId())); surveyRecordEntity.setAddDepartment(myCurrentWarehouse.getDepartmentName()); surveyRecordEntity.setProcessingResults(surveyRecordEntity.getContent()); - }else{ - log.info("客服回复!!!{}",user.getUserName()); + } else { + log.info("客服回复!!!{}", user.getUserName()); surveyRecordEntity.setProcessorId(user.getUserId()); R deptName = sysClient.getDeptName(Long.valueOf(user.getDeptId())); surveyRecordEntity.setAddDepartment(deptName.getData()); @@ -1469,30 +1497,30 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl collect = list.stream().filter(i -> "1".equals(i.getProcessingStatus())).collect(Collectors.toList()); //添加待回复信息 - list.forEach( i ->{ + list.forEach(i -> { //没有处理方,修改已回复的处理方为待回复 - if(ProcessorProcessingStatusStatusConstant.yichuli.getValue().equals(i.getProcessingStatus())){ + if (ProcessorProcessingStatusStatusConstant.yichuli.getValue().equals(i.getProcessingStatus())) { //已处理 AftersalesProcessorEntity processor = new AftersalesProcessorEntity(); processor.setId(i.getId()); processor.setProcessingStatus(ProcessorProcessingStatusStatusConstant.daichuli.getValue()); aftersalesProcessorService.updateById(processor); } - if(ProcessorProcessingStatusStatusConstant.daichuli.getValue().equals(i.getProcessingStatus())){ - AftersalesReplyingPartyEntity replyingPartyEntity = getPartyEntity(aftersalesWorkOrderDTO,i,surveyRecordEntity); + if (ProcessorProcessingStatusStatusConstant.daichuli.getValue().equals(i.getProcessingStatus())) { + AftersalesReplyingPartyEntity replyingPartyEntity = getPartyEntity(aftersalesWorkOrderDTO, i, surveyRecordEntity); //添加待回复信息 aftersalesReplyingPartyService.save(replyingPartyEntity); } }); - }else{ + } else { //添加或修改新的处理方 surveyRecordDTO.setId(surveyRecordEntity.getId()); surveyRecordDTO.setFollowWarehouseName(surveyRecordEntity.getFollowWarehouseName()); @@ -1500,22 +1528,22 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl updateWrapper = new UpdateWrapper<>(); - updateWrapper.eq("work_order_id",aftersalesWorkOrderDTO.getId()); - updateWrapper.eq("processor_id",processor1.getId()); - updateWrapper.eq("difference","1"); - updateWrapper.set("difference","2"); - updateWrapper.set("processed_by_id",user.getUserId()); - updateWrapper.set("processed_by_name",user.getUserName()); + updateWrapper.eq("work_order_id", aftersalesWorkOrderDTO.getId()); + updateWrapper.eq("processor_id", processor1.getId()); + updateWrapper.eq("difference", "1"); + updateWrapper.set("difference", "2"); + updateWrapper.set("processed_by_id", user.getUserId()); + updateWrapper.set("processed_by_name", user.getUserName()); aftersalesReplyingPartyService.update(updateWrapper); //修改工单状态 AftersalesWorkOrderEntity workOrderEntity1 = baseMapper.selectById(aftersalesWorkOrderDTO.getId()); - if(workOrderEntity1.getWorkOrderStatus().equals(WorkOrderStatusConstant.daichuli.getValue())){ + if (workOrderEntity1.getWorkOrderStatus().equals(WorkOrderStatusConstant.daichuli.getValue())) { AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); workOrderEntity.setId(aftersalesWorkOrderDTO.getId()); workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.chulizhong.getValue()); @@ -1529,7 +1557,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl{ + list1.forEach(i -> { AftersalesReplyingPartyEntity replyingPartyEntity = new AftersalesReplyingPartyEntity(); replyingPartyEntity.setId(i.getId()); replyingPartyEntity.setDifference("2"); @@ -1544,6 +1572,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list, AftersaleSurveyRecordDTO surveyRecordDTO) { - if(!aftersalesWorkOrderDTO.getProcessorEntityList().isEmpty()){ - aftersalesWorkOrderDTO.getProcessorEntityList().forEach( i ->{ + if (!aftersalesWorkOrderDTO.getProcessorEntityList().isEmpty()) { + aftersalesWorkOrderDTO.getProcessorEntityList().forEach(i -> { Optional first = list.stream().filter(a -> a.getBusinessId().equals(i.getBusinessId())).findFirst(); - if(first.isPresent()){ + if (first.isPresent()) { //修改处理方 处理状态 - updateProcessor(ProcessorProcessingStatusStatusConstant.daichuli.getValue(),first.get()); - }else{ + updateProcessor(ProcessorProcessingStatusStatusConstant.daichuli.getValue(), first.get()); + } else { //不存在 添加处理方信息 AftersalesProcessorEntity processor = addProcessor(aftersalesWorkOrderDTO, myCurrentWarehouse, i); processor.setConditions(ProcessorConditionsStatusConstant.xinzeng.getValue()); @@ -1573,27 +1602,27 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImplquery().lambda() .eq(AftersalesProcessorEntity::getBusinessId, i.getBusinessId()) .eq(AftersalesProcessorEntity::getWorkOrderId, i.getWorkOrderId()) - .eq(AftersalesProcessorEntity::getProcessingStatus,"1") - .eq(AftersalesProcessorEntity::getTypesOf,"2") + .eq(AftersalesProcessorEntity::getProcessingStatus, "1") + .eq(AftersalesProcessorEntity::getTypesOf, "2") ); - if(ObjectUtils.isNull(one)){ + if (ObjectUtils.isNull(one)) { //添操作记录 addSurveRecord(aftersalesWorkOrderDTO, user, i); } - AftersalesReplyingPartyEntity replyingPartyEntity = getPartyEntity(aftersalesWorkOrderDTO,i,surveyRecordDTO); + AftersalesReplyingPartyEntity replyingPartyEntity = getPartyEntity(aftersalesWorkOrderDTO, i, surveyRecordDTO); //添加待回复信息 aftersalesReplyingPartyService.save(replyingPartyEntity); }); - }else{ + } else { //没有 全部 List collect = list.stream().filter(i -> "2".equals(i.getTypesOf())).collect(Collectors.toList()); // //添加待回复信息 - collect.forEach( i ->{ - if(!i.getBusinessId().toString().equals(myCurrentWarehouse.getId().toString())) { + collect.forEach(i -> { + if (!i.getBusinessId().toString().equals(myCurrentWarehouse.getId().toString())) { //修改处理方 处理状态 updateProcessor(ProcessorProcessingStatusStatusConstant.daichuli.getValue(), i); //添加指定处理结果 @@ -1610,6 +1639,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl{ - AftersalesProcessorEntity processor = new AftersalesProcessorEntity(); + list.stream().forEach(i -> { + AftersalesProcessorEntity processor = new AftersalesProcessorEntity(); processor.setId(i.getId()); processor.setProcessingStatus(ProcessorProcessingStatusStatusConstant.qitachuli.getValue()); aftersalesProcessorService.updateById(processor); @@ -1675,26 +1705,26 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list1 = aftersalesReplyingPartyService.list(Wrappers.query().lambda() .eq(AftersalesReplyingPartyEntity::getWorkOrderId, aftersalesWorkOrderDTO.getId()) ); - list1.stream().forEach(i ->{ + list1.stream().forEach(i -> { AftersalesReplyingPartyEntity replyingPartyEntity = new AftersalesReplyingPartyEntity(); replyingPartyEntity.setId(i.getId()); replyingPartyEntity.setDifference("3"); aftersalesReplyingPartyService.updateById(replyingPartyEntity); }); - }else{ + } else { Optional first = list.stream().filter(i -> i.getBusinessId().equals(myCurrentWarehouse.getId()) && i.getBusinessName().equals(myCurrentWarehouse.getName())).findFirst(); //有包含的处理方 - if(first.isPresent()){ + if (first.isPresent()) { AftersalesProcessorEntity processor = new AftersalesProcessorEntity(); processor.setProcessingStatus(ProcessorProcessingStatusStatusConstant.tijiaofang.getValue()); processor.setId(first.get().getId()); aftersalesProcessorService.updateById(processor); - }else{ + } else { //没有 修改为回复的状态 - list.stream().forEach( i ->{ - AftersalesProcessorEntity processor = new AftersalesProcessorEntity(); + list.stream().forEach(i -> { + AftersalesProcessorEntity processor = new AftersalesProcessorEntity(); processor.setId(i.getId()); - if(i.getProcessingStatus().equals(ProcessorProcessingStatusStatusConstant.daichuli.getValue())){ + if (i.getProcessingStatus().equals(ProcessorProcessingStatusStatusConstant.daichuli.getValue())) { processor.setProcessingStatus(ProcessorProcessingStatusStatusConstant.weihuifuyichuli.getValue()); aftersalesProcessorService.updateById(processor); } @@ -1706,7 +1736,6 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl warehouseType = DictBizCache.getList("after_sales_visits"); if (warehouseType.isEmpty()) { throw new ServiceException("注意,注意!售后访问字典未配置!请配置!"); - }else{ + } else { Optional first = warehouseType.stream().filter(i -> { if (i.getDictValue().equals(roleName)) { return true; } return false; }).findFirst(); - if(first.isPresent()){ + if (first.isPresent()) { //存在 String dictValue = first.get().getDictKey(); - switch (dictValue){ + switch (dictValue) { case "2": // 营业部客服 BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); - if(ObjectUtils.isNull(myCurrentWarehouse)){ + if (ObjectUtils.isNull(myCurrentWarehouse)) { throw new ServiceException("请选择仓库!"); } //TODO 待处理!! @@ -1772,25 +1802,25 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list1 = new ArrayList<>(); - if(ObjectUtils.isNotNull(one)){ + if (ObjectUtils.isNotNull(one)) { AftersalesProcessorVO processorVO = new AftersalesProcessorVO(); - BeanUtil.copyProperties(one,processorVO); + BeanUtil.copyProperties(one, processorVO); list1.add(processorVO); } aftersalesWorkOrderVO.setProcessorVOList(list1); break; } - }else{ + } else { //不存在 BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); - if(ObjectUtils.isNull(myCurrentWarehouse)){ + if (ObjectUtils.isNull(myCurrentWarehouse)) { throw new ServiceException("请选择仓库!"); } } } //查询调查数据 List list = aftersaleSurveyRecordService.list(Wrappers.query().lambda() - .eq(AftersaleSurveyRecordEntity::getWorkOrderId, aftersalesWorkOrderDTO.getId()) + .eq(AftersaleSurveyRecordEntity::getWorkOrderId, aftersalesWorkOrderDTO.getId()) //.eq(AftersaleSurveyRecordEntity::getDifference, "1") ); aftersalesWorkOrderVO.setSurveyRecordEntities(list); @@ -1799,13 +1829,14 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list = aftersaleSurveyRecordService.list(Wrappers.query().lambda() - .eq(AftersaleSurveyRecordEntity::getWorkOrderId, aftersalesWorkOrderDTO.getId() ) + .eq(AftersaleSurveyRecordEntity::getWorkOrderId, aftersalesWorkOrderDTO.getId()) .orderByDesc(AftersaleSurveyRecordEntity::getCreateTime) ); AftersalesWorkOrderVO workOrderVO = new AftersalesWorkOrderVO(); @@ -1815,6 +1846,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl getListSettlement(Map aftersalesWorkOrder, IPage page) { AftersalesSettlementEntity aftersalesSettlementEntity = JSONObject.parseObject(JSONObject.toJSONString(aftersalesWorkOrder), AftersalesSettlementEntity.class); - IPage iPage = baseMapper.getListSettlement(page,aftersalesSettlementEntity); - iPage.getRecords().forEach(i ->{ - i.setWorkOrderTypeName( DictBizCache.getValue(DictBizConstant.PC_WORK_ORDER,i.getWorkOrderType())); - i.setDiscoveryNodeName( DictBizCache.getValue(DictBizConstant.PC_DISCOVERY_NODE,i.getDiscoveryNode())); - i.setResultTypeName( DictBizCache.getValue(DictBizConstant.RESULT_HANDLING,i.getResultType())); - i.setWorkOrderStatusName(DictBizCache.getValue(DictBizConstant.WORK_ORDER_STATUS,i.getWorkOrderStatus())); + IPage iPage = baseMapper.getListSettlement(page, aftersalesSettlementEntity); + iPage.getRecords().forEach(i -> { + i.setWorkOrderTypeName(DictBizCache.getValue(DictBizConstant.PC_WORK_ORDER, i.getWorkOrderType())); + i.setDiscoveryNodeName(DictBizCache.getValue(DictBizConstant.PC_DISCOVERY_NODE, i.getDiscoveryNode())); + i.setResultTypeName(DictBizCache.getValue(DictBizConstant.RESULT_HANDLING, i.getResultType())); + i.setWorkOrderStatusName(DictBizCache.getValue(DictBizConstant.WORK_ORDER_STATUS, i.getWorkOrderStatus())); }); return iPage; } /** * 添加工单跟踪记录 + * * @param workOrderId * @param results * @param difference @@ -1841,12 +1874,12 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl{ - if(ObjectUtils.isNotNull(r.getId())){ + if (!aftersalesWorkOrder.getCompletionRecordEntities().isEmpty()) { + aftersalesWorkOrder.getCompletionRecordEntities().forEach(r -> { + if (ObjectUtils.isNotNull(r.getId())) { completionRecordService.updateById(r); - }else{ + } else { completionRecordService.save(r); } }); - if(ObjectUtils.isNotNull( aftersalesWorkOrder.getAssignListRecord()) ){ + if (ObjectUtils.isNotNull(aftersalesWorkOrder.getAssignListRecord())) { completionRecordService.deleteLogic(aftersalesWorkOrder.getAssignListRecord()); } } //异常工单完结处理结果受款方 - if(!aftersalesWorkOrder.getCompletionRecipientEntities().isEmpty()){ - aftersalesWorkOrder.getCompletionRecipientEntities().forEach(r ->{ - if(ObjectUtils.isNotNull( r.getId()) ){ + if (!aftersalesWorkOrder.getCompletionRecipientEntities().isEmpty()) { + aftersalesWorkOrder.getCompletionRecipientEntities().forEach(r -> { + if (ObjectUtils.isNotNull(r.getId())) { //修改 completionRecipientService.updateById(r); - }else{ + } else { //新增 completionRecipientService.save(r); } }); - if(ObjectUtils.isNotNull(aftersalesWorkOrder.getAssignListRecipient())){ + if (ObjectUtils.isNotNull(aftersalesWorkOrder.getAssignListRecipient())) { //删除 completionRecipientService.deleteLogic(aftersalesWorkOrder.getAssignListRecipient()); } } AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); - if(ObjectUtils.isNotNull(aftersalesWorkOrder.getReasonArbitration())){ + if (ObjectUtils.isNotNull(aftersalesWorkOrder.getReasonArbitration())) { workOrderEntity.setId(aftersalesWorkOrder.getId()); workOrderEntity.setReasonArbitration(aftersalesWorkOrder.getReasonArbitration()); } //修改工单状态 - if(ObjectUtils.isNotNull(aftersalesWorkOrder.getTypesOf())){ + if (ObjectUtils.isNotNull(aftersalesWorkOrder.getTypesOf())) { workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue()); } @@ -1940,9 +1974,9 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list = new ArrayList<>(); - if(!settlementEntityList.isEmpty()){ + if (!settlementEntityList.isEmpty()) { for (AftersalesWorkOrderEntity i : aftersalesWorkOrderEntities) { - if(ObjectUtils.isNotNull(i.getOverTime())){ + if (ObjectUtils.isNotNull(i.getOverTime())) { // 获取当前时间 LocalDateTime now = LocalDateTime.now(); // 获取72小时前的时间 @@ -1960,30 +1994,31 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl{ - //修改数据 - AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); - workOrderEntity.setId(i.getId()); - workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yijeishu.getValue()); - baseMapper.updateById(workOrderEntity); - }); + if (!list.isEmpty()) { + list.forEach(i -> { + //修改数据 + AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); + workOrderEntity.setId(i.getId()); + workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yijeishu.getValue()); + baseMapper.updateById(workOrderEntity); + }); } } /** * 客服异常工单 异常工单仲裁 分配处理客服信息 + * * @param aftersalesWorkOrderDTO * @return */ @Override public R updateAssignArbitrateService(AftersalesWorkOrderDTO aftersalesWorkOrderDTO) { - aftersalesWorkOrderDTO.getAssignList().forEach( i ->{ + aftersalesWorkOrderDTO.getAssignList().forEach(i -> { UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.eq("work_order_id",aftersalesWorkOrderDTO.getId()); - updateWrapper.eq("types_of","1"); - updateWrapper.set("customer_service_id",aftersalesWorkOrderDTO.getCustomerServiceId()); - updateWrapper.set("customer_service_name",aftersalesWorkOrderDTO.getCustomerServiceName()); + updateWrapper.eq("work_order_id", aftersalesWorkOrderDTO.getId()); + updateWrapper.eq("types_of", "1"); + updateWrapper.set("customer_service_id", aftersalesWorkOrderDTO.getCustomerServiceId()); + updateWrapper.set("customer_service_name", aftersalesWorkOrderDTO.getCustomerServiceName()); aftersalesArbitrationOrderService.update(updateWrapper); }); return R.status(true); @@ -1999,32 +2034,32 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl aftersalesCustomerMallList = aftersalesCustomerMallMapper.getByWarehouseCode(myCurrentWarehouse.getId().toString()); - if (aftersalesCustomerMallList.isEmpty()){ + if (aftersalesCustomerMallList.isEmpty()) { log.info("没有客服信息!!!"); - return ; + return; } AftersalesCustomerMallEntity finalChoice = null; //最终 确定的AftersalesCustomerMallEntity for (AftersalesCustomerMallEntity aftersalesCustomerMallEntity : aftersalesCustomerMallList) { - if (aftersalesCustomerMallEntity.getConditions().equals("1")){ - finalChoice=aftersalesCustomerMallEntity; + if (aftersalesCustomerMallEntity.getConditions().equals("1")) { + finalChoice = aftersalesCustomerMallEntity; break; } } // 如果存在条件为1的项,则使用创建时间最早的作为选择 - if (finalChoice == null) { - AftersalesCustomerMallEntity lastCustomerMall = aftersalesCustomerMallList.get(0); - finalChoice=lastCustomerMall; - } + if (finalChoice == null) { + AftersalesCustomerMallEntity lastCustomerMall = aftersalesCustomerMallList.get(0); + finalChoice = lastCustomerMall; + } - if(finalChoice!=null){ + if (finalChoice != null) { AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); workOrderEntity.setId(aftersalesWorkOrderDTO.getId()); workOrderEntity.setCustomerServiceId(finalChoice.getCustomerServiceId()); workOrderEntity.setCustomerServiceName(finalChoice.getCustomerServiceName()); baseMapper.updateById(workOrderEntity); - log.info("异常工单》》》{}指派客服{}",aftersalesWorkOrderDTO.getId(),finalChoice.getCustomerServiceId()); + log.info("异常工单》》》{}指派客服{}", aftersalesWorkOrderDTO.getId(), finalChoice.getCustomerServiceId()); //添加记录 AftersaleSurveyRecordDTO aftersaleSurveyRecordDTO = changName(aftersalesWorkOrderDTO, user); aftersaleSurveyRecordDTO.setCreateUser(user.getUserId()); @@ -2033,7 +2068,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl"+aftersalesWorkOrderDTO.getWorkOrderNumber()+"自动指派了客服>"+finalChoice.getCustomerServiceName()); + aftersaleSurveyRecordDTO.setProcessingResults("异常工单>" + aftersalesWorkOrderDTO.getWorkOrderNumber() + "自动指派了客服>" + finalChoice.getCustomerServiceName()); aftersaleSurveyRecordDTO.setDifference("3"); aftersaleSurveyRecordDTO.setWorkOrderId(aftersalesWorkOrderDTO.getId()); // aftersaleSurveyRecordDTO.setFollowWarehouseId(myCurrentWarehouse.getId()); @@ -2045,12 +2080,13 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl{ + aftersalesWorkOrder.getAssignList().forEach(i -> { AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); workOrderEntity.setId(i); //查询处理结果是否有没有理赔金 @@ -2062,16 +2098,16 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl 0) { //金额大于0 workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yichuli.getValue()); - }else{ + } else { workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.lipeijineweichu.getValue()); } baseMapper.updateById(workOrderEntity); //修改未回复的处理方改为 6 UpdateWrapper updateWrapper = new UpdateWrapper<>(); - updateWrapper.eq("work_order_id",i); + updateWrapper.eq("work_order_id", i); updateWrapper.apply("processing_status in (1)"); updateWrapper.apply("conditions in (1,2) "); - updateWrapper.set("processing_status",ProcessorProcessingStatusStatusConstant.weihuifuyichuli.getValue()); + updateWrapper.set("processing_status", ProcessorProcessingStatusStatusConstant.weihuifuyichuli.getValue()); aftersalesProcessorService.update(updateWrapper); }); return true; @@ -2079,13 +2115,14 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl{ + aftersalesWorkOrder.getAssignList().forEach(i -> { AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); workOrderEntity.setId(i); workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue()); @@ -2097,6 +2134,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl updateWrapper = new LambdaUpdateWrapper<>(); - updateWrapper.in(AftersalesWorkOrderEntity::getId,aftersalesWorkOrder.getAssignList()); - updateWrapper.set(AftersalesWorkOrderEntity::getWorkOrderStatus,WorkOrderStatusConstant.chulizhong.getValue()); - baseMapper.update(aftersalesWorkOrder,updateWrapper); + updateWrapper.in(AftersalesWorkOrderEntity::getId, aftersalesWorkOrder.getAssignList()); + updateWrapper.set(AftersalesWorkOrderEntity::getWorkOrderStatus, WorkOrderStatusConstant.chulizhong.getValue()); + baseMapper.update(aftersalesWorkOrder, updateWrapper); return true; } /** * 添加处理处理方信息 + * * @param aftersalesWorkOrderDTO * @param myCurrentWarehouse * @param i */ private AftersalesProcessorEntity addProcessor(AftersalesWorkOrderDTO aftersalesWorkOrderDTO, BasicdataWarehouseEntity myCurrentWarehouse, AftersalesProcessorEntity i) { AftersalesProcessorEntity packageEntity = new AftersalesProcessorEntity(); - BeanUtil.copyProperties(i,packageEntity); + BeanUtil.copyProperties(i, packageEntity); packageEntity.setWorkOrderId(aftersalesWorkOrderDTO.getId()); packageEntity.setConditions("1");//正常 packageEntity.setProcessingStatus("1");//待处理 @@ -2150,6 +2190,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl "+i.getBusinessName()); + surveyRecordDTO.setProcessingResults(surveyRecordDTO.getAddDepartment() + " 指定处理方信息-> " + i.getBusinessName()); } return aftersaleSurveyRecordService.saveOrUpdateOwn(surveyRecordDTO); } /** * 修改处理方状态 + * * @param type * @return */ - private Boolean updateProcessor(String type,AftersalesProcessorEntity one) { + private Boolean updateProcessor(String type, AftersalesProcessorEntity one) { AftersalesProcessorEntity processor = new AftersalesProcessorEntity(); processor.setId(one.getId()); processor.setProcessingStatus(type); @@ -2192,11 +2234,11 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl