Browse Source

售后BUG修复

visual
汤建军 3 months ago
parent
commit
132d6c9df7
  1. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAppealMapper.xml
  2. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  3. 42
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesAppealMapper.xml

@ -71,7 +71,7 @@
<if test="param.identifying != null and param.identifying == 1 "> and laa.types_of in ('0','1','2','3') </if> <if test="param.identifying != null and param.identifying == 1 "> and laa.types_of in ('0','1','2','3') </if>
<if test="param.identifying != null and param.identifying == 2 "> and laa.types_of in ('0','1','2') </if> <if test="param.identifying != null and param.identifying == 2 "> and laa.types_of in ('0','1','2') </if>
</where> </where>
Order by laa.create_time desc Order by lawo.create_time,laa.create_time desc
</select> </select>
</mapper> </mapper>

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -500,6 +500,8 @@
</where> </where>
GROUP BY GROUP BY
lawo.id lawo.id
ORDER BY
lawo.create_time DESC
</select> </select>
<select id="selectAllAftersalesWorkOrderList" <select id="selectAllAftersalesWorkOrderList"

42
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -108,6 +108,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
private final AftersalesCustomerMallMapper aftersalesCustomerMallMapper; private final AftersalesCustomerMallMapper aftersalesCustomerMallMapper;
private final IUserSearchClient userSearchClient; private final IUserSearchClient userSearchClient;
private final IBasicdataStoreBusinessClient basicdataStoreBusinessClient; private final IBasicdataStoreBusinessClient basicdataStoreBusinessClient;
private final IAftersalesProcessingMoneyService aftersalesProcessingMoneyService;
// private final IAftersalesWorkOrderService aftersalesWorkOrderService; // private final IAftersalesWorkOrderService aftersalesWorkOrderService;
@Override @Override
@ -354,17 +355,13 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
}); });
} }
//添加处理结果
if (ObjectUtils.isNotNull(aftersalesWorkOrder.getAftersalesProcessingResultsDTO()) && ObjectUtils.isNotNull(aftersalesWorkOrder.getAftersalesProcessingResultsDTO().getCompensationMethod())) {
aftersalesWorkOrder.setWorkOrderStatus(WorkOrderStatusConstant.chulijeiguoyitianxei.getValue());
}
if (!Func.isEmpty(aftersalesWorkOrder.getVehicleRoute())) { if (!Func.isEmpty(aftersalesWorkOrder.getVehicleRoute())) {
if (aftersalesWorkOrder.getVehicleRoute().indexOf("&gt;") > 0) { if (aftersalesWorkOrder.getVehicleRoute().indexOf("&gt;") > 0) {
String string = aftersalesWorkOrder.getVehicleRoute().replaceAll("&gt;", ">"); String string = aftersalesWorkOrder.getVehicleRoute().replaceAll("&gt;", ">");
aftersalesWorkOrder.setVehicleRoute(string); aftersalesWorkOrder.setVehicleRoute(string);
} }
} }
baseMapper.insert(aftersalesWorkOrder); baseMapper.insert(aftersalesWorkOrder);
} else { } else {
//修改 //修改
@ -570,9 +567,10 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
// completionRecordService.saveBatch(aftersalesWorkOrder.getCompletionRecordEntities()); // completionRecordService.saveBatch(aftersalesWorkOrder.getCompletionRecordEntities());
} }
//添加处理结果 //添加处理结果
if (ObjectUtils.isNotNull(aftersalesWorkOrder.getAftersalesProcessingResultsDTO()) && ObjectUtils.isNotNull(aftersalesWorkOrder.getAftersalesProcessingResultsDTO().getCompensationMethod())) { if (ObjectUtils.isNotNull(aftersalesWorkOrder.getAftersalesProcessingResultsDTO())) {
addProcessingResults(aftersalesWorkOrder); addProcessingResults(aftersalesWorkOrder);
} }
return true; return true;
} }
@ -965,7 +963,6 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
data.getRecords().forEach(i -> updateDepartStatus(i, user, myCurrentWarehouse, collect, collect1)); data.getRecords().forEach(i -> updateDepartStatus(i, user, myCurrentWarehouse, collect, collect1));
return data; return data;
} }
@ -1304,18 +1301,11 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
Iterator<AftersalesProcessorEntity> iterator = list.iterator(); Iterator<AftersalesProcessorEntity> iterator = list.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
AftersalesProcessorEntity next = iterator.next(); AftersalesProcessorEntity next = iterator.next();
if (ProcessorProcessingStatusStatusConstant.daichuli.getValue().equals(next.getProcessingStatus())
|| ProcessorProcessingStatusStatusConstant.yichuli.getValue().equals(next.getProcessingStatus())) {
AftersalesProcessorVO processorVO = new AftersalesProcessorVO(); AftersalesProcessorVO processorVO = new AftersalesProcessorVO();
BeanUtil.copyProperties(next, processorVO); BeanUtil.copyProperties(next, processorVO);
processorVOS.add(processorVO); processorVOS.add(processorVO);
} else {
iterator.remove();
}
} }
} }
aftersalesWorkOrderVO.setProcessorVOList(processorVOS); aftersalesWorkOrderVO.setProcessorVOList(processorVOS);
//查询包件 //查询包件
@ -1389,7 +1379,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
List<AftersalesPersonResponsibleEntity> list3 = aftersalesPersonResponsibleService.list(Wrappers.<AftersalesPersonResponsibleEntity>query().lambda() List<AftersalesPersonResponsibleEntity> list3 = aftersalesPersonResponsibleService.list(Wrappers.<AftersalesPersonResponsibleEntity>query().lambda()
.eq(AftersalesPersonResponsibleEntity::getWordOrderId, aftersalesWorkOrder.getId()) .eq(AftersalesPersonResponsibleEntity::getWordOrderId, aftersalesWorkOrder.getId())
); );
if (!list.isEmpty()) { if (!list3.isEmpty()) {
List<AftersalesPersonResponsibleVO> personResponsibleVOList = new ArrayList<>(); List<AftersalesPersonResponsibleVO> personResponsibleVOList = new ArrayList<>();
list3.forEach(i -> { list3.forEach(i -> {
AftersalesPersonResponsibleVO personResponsibleVO = new AftersalesPersonResponsibleVO(); AftersalesPersonResponsibleVO personResponsibleVO = new AftersalesPersonResponsibleVO();
@ -1884,27 +1874,41 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
if (byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.yichuli.getValue())) { if (byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.yichuli.getValue())) {
throw new ServiceException("当前异常工单已处理!"); throw new ServiceException("当前异常工单已处理!");
} }
//添加处理结果 //添加处理结果
AftersalesProcessingResultsDTO aftersalesProcessingResultsDTO = aftersalesWorkOrderDTO.getAftersalesProcessingResultsDTO(); AftersalesProcessingResultsDTO aftersalesProcessingResultsDTO = aftersalesWorkOrderDTO.getAftersalesProcessingResultsDTO();
aftersalesProcessingResultsDTO.setWorkOrderId(aftersalesWorkOrderDTO.getId()); aftersalesProcessingResultsDTO.setWorkOrderId(aftersalesWorkOrderDTO.getId());
if (ObjectUtils.isNotNull(aftersalesProcessingResultsDTO.getCompensationMethod())) {
//处理赔付方式
aftersalesProcessingResultsDTO.setCompensationMethod(aftersalesProcessingResultsDTO.getCompensationMethod());
}
aftersalesProcessingResultsDTO.setWarehouseId(aftersalesWorkOrderDTO.getWarehouseId());
aftersalesProcessingResultsService.ownSaveOrUpdate(aftersalesProcessingResultsDTO); aftersalesProcessingResultsService.ownSaveOrUpdate(aftersalesProcessingResultsDTO);
//修改异常工单处理信息! //修改异常工单处理信息!
AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity(); AftersalesWorkOrderEntity workOrderEntity = new AftersalesWorkOrderEntity();
workOrderEntity.setId(aftersalesWorkOrderDTO.getId()); workOrderEntity.setId(aftersalesWorkOrderDTO.getId());
// if(!byId.getWorkOrderStatus().equals(WorkOrderStatusConstant.lipeijineweichu.getValue())){
// workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.chulijeiguoyitianxei.getValue());
// }
//是否为已提交 //是否为已提交
if ("1".equals(aftersalesWorkOrderDTO.getResultIdentification())) { if ("1".equals(aftersalesWorkOrderDTO.getResultIdentification())) {
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yichuli.getValue()); workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.yichuli.getValue());
} else { } else {
if (!Objects.isNull(aftersalesProcessingResultsDTO.getResultType())) {
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.lipeijineweichu.getValue());
}
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.chulijeiguoyitianxei.getValue()); workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.chulijeiguoyitianxei.getValue());
} }
//是否为已提交 //是否为已提交
if ("1".equals(aftersalesWorkOrderDTO.getClaimIdentification())) { // if ("1".equals(aftersalesWorkOrderDTO.getClaimIdentification())) {
// workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.lipeijineweichu.getValue());
// }
if (!Objects.isNull(aftersalesWorkOrderDTO.getResultIdentification())) {
if ("2".equals(aftersalesWorkOrderDTO.getResultIdentification())) {
workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.lipeijineweichu.getValue()); workOrderEntity.setWorkOrderStatus(WorkOrderStatusConstant.lipeijineweichu.getValue());
} }
}
workOrderEntity.setCompletionName(myCurrentWarehouse.getName()); workOrderEntity.setCompletionName(myCurrentWarehouse.getName());
workOrderEntity.setCompletionId(myCurrentWarehouse.getId()); workOrderEntity.setCompletionId(myCurrentWarehouse.getId());
baseMapper.updateById(workOrderEntity); baseMapper.updateById(workOrderEntity);

Loading…
Cancel
Save