diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAppealPeopleEntity.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAppealPeopleEntity.java index 87e9fb89d..e3bab4d59 100644 --- a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAppealPeopleEntity.java +++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesAppealPeopleEntity.java @@ -75,11 +75,16 @@ public class AftersalesAppealPeopleEntity extends TenantEntity { * 实际责任人ID */ @ApiModelProperty(value = "实际责任人ID") - private String actualPersonId; + private Long actualPersonId; /** * 仓库ID */ @ApiModelProperty(value = "仓库ID") private Long warehouseId; + /** + * 申述ID + */ + @ApiModelProperty(value = "申述ID") + private Long appealId; } diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesReplyingPartyEntity.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesReplyingPartyEntity.java index 3d8a87008..656b5df28 100644 --- a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesReplyingPartyEntity.java +++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesReplyingPartyEntity.java @@ -75,7 +75,7 @@ public class AftersalesReplyingPartyEntity extends TenantEntity { * 处理人名称 */ @ApiModelProperty(value = "处理人名称") - private Long processedByName; + private String processedByName; /** * 指派时间 */ diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesAppealVO.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesAppealVO.java index 71e4ed5b4..782e48b2e 100644 --- a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesAppealVO.java +++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/vo/AftersalesAppealVO.java @@ -17,10 +17,13 @@ package com.logpm.aftersales.vo; import com.logpm.aftersales.entity.AftersalesAppealEntity; +import com.logpm.aftersales.entity.AftersalesAppealPeopleEntity; import org.springblade.core.tool.node.INode; import lombok.Data; import lombok.EqualsAndHashCode; +import java.util.List; + /** * 异常工单申述表 视图实体类 * @@ -39,6 +42,10 @@ public class AftersalesAppealVO extends AftersalesAppealEntity { * 运单号 */ private String waybillNumber; + /** + * 异常工单ID + */ + private Long workOrderId; /** * 订单自编号 */ @@ -58,5 +65,9 @@ public class AftersalesAppealVO extends AftersalesAppealEntity { * 状态名称 */ private String typesOfName; + /** + * 实际责任人数据 + */ + private List peopleEntityList; } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAppealController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAppealController.java index 1779b97f9..a5d6afc3c 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAppealController.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesAppealController.java @@ -16,7 +16,10 @@ */ package com.logpm.aftersales.controller; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.logpm.aftersales.dto.AftersalesAppealDTO; +import com.logpm.aftersales.entity.AftersalesWorkOrderEntity; +import com.logpm.aftersales.service.IAftersalesWorkOrderService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -25,6 +28,8 @@ import lombok.AllArgsConstructor; import javax.validation.Valid; import lombok.extern.slf4j.Slf4j; +import org.springblade.common.constant.aftersales.WorkOrderStatusConstant; +import org.springblade.core.log.exception.ServiceException; import org.springblade.core.secure.BladeUser; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; @@ -65,6 +70,7 @@ import javax.servlet.http.HttpServletResponse; public class AftersalesAppealController extends BladeController { private final IAftersalesAppealService aftersalesAppealService; + private final IAftersalesWorkOrderService aftersalesWorkOrderService; /** * 异常工单申述表 详情 @@ -73,8 +79,11 @@ public class AftersalesAppealController extends BladeController { @ApiOperationSupport(order = 1) @ApiOperation(value = "详情", notes = "传入aftersalesAppeal") public R detail(AftersalesAppealEntity aftersalesAppeal) { - AftersalesAppealEntity detail = aftersalesAppealService.getOne(Condition.getQueryWrapper(aftersalesAppeal)); - return R.data(AftersalesAppealWrapper.build().entityVO(detail)); + if(ObjectUtils.isNull(aftersalesAppeal.getId())){ + throw new ServiceException("申述ID不能为空!!"); + } + AftersalesAppealVO detail = aftersalesAppealService.getOneOWn(Condition.getQueryWrapper(aftersalesAppeal)); + return R.data(detail); } /** * 异常工单申述表 分页 @@ -94,6 +103,7 @@ public class AftersalesAppealController extends BladeController { @ApiOperationSupport(order = 2) @ApiOperation(value = "分页查询申述数据", notes = "传入aftersalesAppeal") public R> getListAppeal(@ApiIgnore @RequestParam Map aftersalesAppeal, Query query) { + log.info("查询申述信息》》》{}",aftersalesAppeal); IPage pages = aftersalesAppealService.getListAppeal(Condition.getPage(query), aftersalesAppeal); return R.data(pages); } @@ -127,10 +137,24 @@ public class AftersalesAppealController extends BladeController { @ApiOperation(value = "修改", notes = "传入aftersalesAppeal") public R update(@Valid @RequestBody AftersalesAppealEntity aftersalesAppeal) { log.info("客服操作确定修改》》》》{}",aftersalesAppeal); + if(ObjectUtils.isNull(aftersalesAppeal.getId())){ + throw new ServiceException("申述ID不能为空!!"); + } + if(ObjectUtils.isNull(aftersalesAppeal.getWorkOrderId())){ + throw new ServiceException("异常工单ID不能为空!!"); + } BladeUser user = AuthUtil.getUser(); aftersalesAppeal.setProcessedByName(user.getUserName()); aftersalesAppeal.setProcessedById(user.getUserId()); aftersalesAppeal.setProcessedDate(new Date()); + if(ObjectUtils.isNotNull(aftersalesAppeal.getTypesOf()) && "3".equals(aftersalesAppeal.getTypesOf())){ + //取消订单申述 + AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); + workOrderEntity.setId(aftersalesAppeal.getWorkOrderId()); + workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yiwanjei.getValue()); + aftersalesWorkOrderService.updateById(workOrderEntity); + } + return R.status(aftersalesAppealService.updateById(aftersalesAppeal)); } @@ -141,6 +165,10 @@ public class AftersalesAppealController extends BladeController { @ApiOperationSupport(order = 6) @ApiOperation(value = "新增或修改", notes = "传入aftersalesAppeal") public R submit(@Valid @RequestBody AftersalesAppealDTO aftersalesAppeal) { + log.info("异常工单申述表 新增或修改参数》》》{}",aftersalesAppeal.toString()); + if(ObjectUtils.isNull(aftersalesAppeal.getWorkOrderId())){ + throw new ServiceException("异常工单ID不能为空!!"); + } return R.status(aftersalesAppealService.saveOrUpdateOwn(aftersalesAppeal)); } 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 72c247bb6..0fff38870 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 @@ -465,7 +465,7 @@ public class AftersalesWorkOrderController extends BladeController { @ApiOperationSupport(order = 6) @ApiOperation(value = "处理方 仓库查询待处理的异常工单", notes = "传入aftersalesWorkOrder") public R getPendingWorkOrder(AftersalesWorkOrderDTO aftersalesWorkOrder,Query query) { - log.info("工单创建或修改的数据{}",aftersalesWorkOrder.toString()); + log.info("处理方 仓库查询待处理的异常工单{}",aftersalesWorkOrder.toString()); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); if(ObjectUtils.isNotNull(myCurrentWarehouse)){ aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId()); diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAppealMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAppealMapper.xml index e7f1f69bd..f01ee68d8 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAppealMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAppealMapper.xml @@ -40,11 +40,24 @@ SELECT * FROM logpm_aftersales_appeal ${ew.customSqlSegment} select DISTINCT lawo.id,lawo.work_order_type,lawo.discovery_node,lawo.work_order_number,lawo.waybill_number,lawo.order_code,lawo.train_number,lawo.first, lawo.secondary,lawo.vehicle_route,lawo.deliver_goods_time,lawo.discovery_time,lawo.warehousing_time,lawo.waybill_mall,lawo.remarks,lawo.delivery_time, - lawo.delivery_driver,lawo.work_order_status,lawo.problem_description,lawo.responsible_person,lawo.processed_by,lawo.create_time + lawo.delivery_driver,lawo.work_order_status,lawo.problem_description,lawo.responsible_person,lawo.processed_by,lawo.create_time, + lawo.customer_service_name customerServiceName from logpm_aftersales_work_order lawo LEFT JOIN logpm_aftersales_processor lap on lawo.id = lap.work_order_id and lap.types_of = '2' and lap.conditions in (1,2) @@ -81,13 +82,14 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d and lawo.waybill_mall = #{param.waybillMall } and lawo.delivery_driver = #{param.deliveryDriver } and lawo.work_order_status in( #{param.workOrderStatus }) - and lawo.work_order_status = '40' and lawo.customer_service_id is null - and lawo.work_order_status in (21,30) + and lawo.work_order_status in ('30','40') + and lawo.work_order_status in (21,30) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} + or lawo.work_order_status in (80,100) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} and lawo.customer_service_id = #{param.customerServiceId } and lawo.customer_service_name = #{param.customerServiceName } and lawo.waybill_mall_id = #{param.waybillMallId } and lawo.problem_description = #{param.problemDescription} - and lawo.warehouse_id = #{param.warehouseId} + and lawo.warehouse_id = #{param.warehouseId} and lawo.person_responsible = #{param.personResponsible } and lawo.process_number = #{param.processNumber } and lawo.reviewed_by = #{param.reviewedBy } @@ -137,7 +139,7 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d from logpm_aftersales_processor lap LEFT JOIN logpm_aftersales_work_order law on lap.work_order_id = law.id - lap.conditions != '3' and lap.is_deleted = 0 and law.id is not null + lap.conditions != '3' and lap.is_deleted = 0 and law.id is not null and lap.processing_status in ('1','3') and lap.types_of = '2' and law.work_order_status = #{param.workOrderStatus} and lap.business_id = #{param.warehouseId} diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAppealService.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAppealService.java index 6a71eabf3..f6c559b8a 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAppealService.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/IAftersalesAppealService.java @@ -17,6 +17,7 @@ package com.logpm.aftersales.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.logpm.aftersales.dto.AftersalesAppealDTO; import com.logpm.aftersales.entity.AftersalesAppealEntity; import com.logpm.aftersales.vo.AftersalesAppealVO; @@ -65,4 +66,11 @@ public interface IAftersalesAppealService extends BaseService getListAppeal(IPage page, Map aftersalesAppeal); + + /** + * 查询申述详情 + * @param queryWrapper + * @return + */ + AftersalesAppealVO getOneOWn(QueryWrapper queryWrapper); } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAppealServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAppealServiceImpl.java index e5046ad6b..96d805092 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAppealServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesAppealServiceImpl.java @@ -18,17 +18,16 @@ package com.logpm.aftersales.service.impl; import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.BeanUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.logpm.aftersales.dto.AftersaleSurveyRecordDTO; import com.logpm.aftersales.dto.AftersalesAppealDTO; -import com.logpm.aftersales.entity.AftersaleSurveyRecordEntity; import com.logpm.aftersales.entity.AftersalesAppealEntity; import com.logpm.aftersales.entity.AftersalesAppealPeopleEntity; import com.logpm.aftersales.entity.AftersalesWorkOrderEntity; import com.logpm.aftersales.service.IAftersalesAppealPeopleService; import com.logpm.aftersales.service.IAftersalesWorkOrderService; -import com.logpm.aftersales.vo.AftersalesAppealPeopleVO; import com.logpm.aftersales.vo.AftersalesAppealVO; import com.logpm.aftersales.excel.AftersalesAppealExcel; import com.logpm.aftersales.mapper.AftersalesAppealMapper; @@ -40,7 +39,6 @@ import lombok.extern.slf4j.Slf4j; import org.springblade.common.constant.DictBizConstant; import org.springblade.common.constant.aftersales.WorkOrderStatusConstant; import org.springblade.core.log.exception.ServiceException; -import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.mp.support.Condition; import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.utils.AuthUtil; @@ -50,6 +48,8 @@ import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseServiceImpl; + +import java.util.Date; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -99,7 +99,8 @@ public class AftersalesAppealServiceImpl extends BaseServiceImpl collect = list.stream().map(AftersalesAppealPeopleEntity::getId).collect(Collectors.toList()); - aftersalesAppealPeopleService.deleteLogic(collect); - + if(!collect.isEmpty()){ + aftersalesAppealPeopleService.deleteLogic(collect); + } } baseMapper.updateById(aftersalesAppeal); }else{ //新增 - AftersalesAppealEntity aftersalesAppealEntity = new AftersalesAppealEntity(); - BeanUtil.copyProperties(aftersalesAppeal,aftersalesAppealEntity); + aftersalesAppealEntity.setCreateUser(user.getUserId()); + aftersalesAppealEntity.setCreateDept(Long.valueOf(user.getDeptId())); + aftersalesAppealEntity.setCreateTime(new Date()); + aftersalesAppealEntity.setStatus(1); + aftersalesAppealEntity.setIsDeleted(0); aftersalesAppealEntity.setClaimantUserId(user.getUserId()); aftersalesAppealEntity.setClaimant(user.getUserName()); aftersalesAppealEntity.setTypesOf("0"); @@ -128,13 +133,15 @@ public class AftersalesAppealServiceImpl extends BaseServiceImpl{ AftersalesAppealPeopleEntity aftersalesAppealPeople = new AftersalesAppealPeopleEntity(); BeanUtil.copyProperties(i,aftersalesAppealPeople); + if(ObjectUtils.isNotNull(aftersalesAppealEntity.getId())){ + aftersalesAppealPeople.setAppealId(aftersalesAppealEntity.getId()); + } aftersalesAppealPeople.setWorkOrderId(aftersalesAppeal.getWorkOrderId()); aftersalesAppealPeopleService.save(aftersalesAppealPeople); }); @@ -152,6 +159,10 @@ public class AftersalesAppealServiceImpl extends BaseServiceImpl getListAppeal(IPage page, Map aftersalesAppeal) { Condition.getQueryWrapper(aftersalesAppeal, AftersalesAppealEntity.class); + BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); + if(ObjectUtils.isNotNull(myCurrentWarehouse)){ + aftersalesAppeal.put("warehouse_id",myCurrentWarehouse.getId()); + } AftersalesAppealDTO aftersalesAppealDTO = JSONObject.parseObject(JSONObject.toJSONString(aftersalesAppeal), AftersalesAppealDTO.class); IPage iPage = baseMapper.getListAppeal(page,aftersalesAppealDTO); iPage.getRecords().forEach( i ->{ @@ -162,4 +173,23 @@ public class AftersalesAppealServiceImpl extends BaseServiceImpl queryWrapper) { + AftersalesAppealVO aftersalesAppealVO = new AftersalesAppealVO(); + AftersalesAppealEntity aftersalesAppealEntity = baseMapper.selectOne(queryWrapper); + BeanUtil.copyProperties(aftersalesAppealEntity,aftersalesAppealVO); + List list = aftersalesAppealPeopleService.list(Wrappers.query().lambda() + .eq(AftersalesAppealPeopleEntity::getAppealId, aftersalesAppealEntity.getId()) + ); + aftersalesAppealVO.setPeopleEntityList(list); + //查询实际责任人 + return aftersalesAppealVO; + } + } diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java index d9c9ca8e4..cd7184773 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java @@ -309,6 +309,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl i.getBusinessId().equals(myCurrentWarehouse.getId()) && i.getBusinessName().equals(myCurrentWarehouse.getName())).findFirst(); one.ifPresent(aftersalesProcessorEntity -> surveyRecordEntity.setProcessorId(aftersalesProcessorEntity.getId())); - surveyRecordEntity.setAddDepartment(myCurrentWarehouse.getName()); + surveyRecordEntity.setAddDepartment(myCurrentWarehouse.getDepartmentName()); + surveyRecordEntity.setProcessingResults(surveyRecordEntity.getContent()); }else{ log.info("客服回复!!!{}",user.getUserName()); surveyRecordEntity.setProcessorId(user.getUserId()); R deptName = sysClient.getDeptName(Long.valueOf(user.getDeptId())); surveyRecordEntity.setAddDepartment(deptName.getData()); + surveyRecordEntity.setProcessingResults(surveyRecordEntity.getContent()); } //添加回复信息 surveyRecordEntity.setDifference("1"); @@ -1250,6 +1261,9 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list1 = aftersalesReplyingPartyService.list(Wrappers.query().lambda() + .eq(AftersalesReplyingPartyEntity::getWorkOrderId, aftersalesWorkOrderDTO.getId()) + .eq(AftersalesReplyingPartyEntity::getFollowWarehouseId, myCurrentWarehouse.getId()) + .eq(AftersalesReplyingPartyEntity::getDifference, '1') + ); + list1.forEach(i ->{ + AftersalesReplyingPartyEntity replyingPartyEntity = new AftersalesReplyingPartyEntity(); + replyingPartyEntity.setId(i.getId()); + replyingPartyEntity.setDifference("2"); + replyingPartyEntity.setProcessedById(user.getUserId()); + replyingPartyEntity.setProcessedByName(user.getUserName()); + aftersalesReplyingPartyService.updateById(replyingPartyEntity); + }); } return true; @@ -1289,7 +1317,8 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list, AftersaleSurveyRecordDTO surveyRecordDTO) { + @Transactional(rollbackFor = Exception.class) + public void chuLiFang(AftersalesWorkOrderDTO aftersalesWorkOrderDTO, BasicdataWarehouseEntity myCurrentWarehouse, BladeUser user, List list, AftersaleSurveyRecordDTO surveyRecordDTO) { if(!aftersalesWorkOrderDTO.getProcessorEntityList().isEmpty()){ aftersalesWorkOrderDTO.getProcessorEntityList().forEach( i ->{ Optional first = list.stream().filter(a -> a.getBusinessId().equals(i.getBusinessId())).findFirst(); @@ -1307,7 +1336,18 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImplquery().lambda() + .eq(AftersalesProcessorEntity::getBusinessId, i.getBusinessId()) + .eq(AftersalesProcessorEntity::getWorkOrderId, i.getWorkOrderId()) + .eq(AftersalesProcessorEntity::getProcessingStatus,"1") + .eq(AftersalesProcessorEntity::getTypesOf,"2") + ); + if(ObjectUtils.isNull(one)){ + //添操作记录 + addSurveRecord(aftersalesWorkOrderDTO, user, i); + } + AftersalesReplyingPartyEntity replyingPartyEntity = getPartyEntity(aftersalesWorkOrderDTO,i,surveyRecordDTO); //添加待回复信息 aftersalesReplyingPartyService.save(replyingPartyEntity); @@ -1315,16 +1355,20 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl collect = list.stream().filter(i -> "1".equals(i.getProcessingStatus())).collect(Collectors.toList()); + List collect = list.stream().filter(i -> "2".equals(i.getTypesOf())).collect(Collectors.toList()); +// + //添加待回复信息 collect.forEach( i ->{ - //修改处理方 处理状态 - updateProcessor(ProcessorProcessingStatusStatusConstant.daichuli.getValue(),i); - //添加指定处理结果 - addSurveRecord(aftersalesWorkOrderDTO, user, i); - AftersalesReplyingPartyEntity replyingPartyEntity = getPartyEntity(aftersalesWorkOrderDTO,i,surveyRecordDTO); - //添加待回复信息 - aftersalesReplyingPartyService.save(replyingPartyEntity); + if(!i.getBusinessId().toString().equals(myCurrentWarehouse.getId().toString())) { + //修改处理方 处理状态 + updateProcessor(ProcessorProcessingStatusStatusConstant.daichuli.getValue(), i); + //添加指定处理结果 + addSurveRecord(aftersalesWorkOrderDTO, user, i); + AftersalesReplyingPartyEntity replyingPartyEntity = getPartyEntity(aftersalesWorkOrderDTO, i, surveyRecordDTO); + //添加待回复信息 + aftersalesReplyingPartyService.save(replyingPartyEntity); + } }); } @@ -1460,6 +1504,9 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImplquery().lambda(). eq(AftersalesProcessorEntity::getWorkOrderId, aftersalesWorkOrderDTO.getId()) @@ -1703,7 +1750,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl 0) { //金额大于0 - workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.lipeijineweichu.getValue()); + workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yichuli.getValue()); }else{ workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yichuli.getValue()); }