Browse Source

feat(all): 修改售后异常工单保存问题

dist.1.3.0
zhaoqiaobo 10 months ago
parent
commit
e677826434
  1. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  2. 14
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java

@ -440,8 +440,10 @@ public class AftersalesWorkOrderController extends BladeController {
try {
return R.status(aftersalesWorkOrderService.updateCompletionEnd(aftersalesWorkOrder));
} catch (ServiceException s){
s.printStackTrace();
return R.fail(s.getMessage());
} catch (Exception e){
e.printStackTrace();
log.error("修改完结处理》》》{}",e.getMessage());
return R.fail("系统异常!!!");
}

14
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java

@ -17,8 +17,10 @@
package com.logpm.aftersales.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.aftersales.dto.AftersalesProcessingResultsDTO;
import com.logpm.aftersales.entity.AftersalesCompletionRecipientEntity;
import com.logpm.aftersales.entity.AftersalesProcessingMoneyEntity;
import com.logpm.aftersales.entity.AftersalesProcessingResultsEntity;
import com.logpm.aftersales.entity.AftersalesWorkOrderEntity;
@ -106,6 +108,10 @@ public class AftersalesProcessingResultsServiceImpl extends BaseServiceImpl<Afte
}else{
//修改
baseMapper.updateById(aftersalesProcessingResults);
LambdaUpdateWrapper<AftersalesProcessingMoneyEntity> completionRecipientEntityLambdaUpdateWrapper = Wrappers.<AftersalesProcessingMoneyEntity>lambdaUpdate()
.set(AftersalesProcessingMoneyEntity::getIsDeleted, 1)
.eq(AftersalesProcessingMoneyEntity::getProcessingResultsId, aftersalesProcessingResults.getId());
aftersalesProcessingMoneyService.update(completionRecipientEntityLambdaUpdateWrapper);
if(ObjectUtil.isNotNull(aftersalesProcessingResults.getProcessingMoneyEntityList())){
aftersalesProcessingResults.getProcessingMoneyEntityList().forEach(i ->{
if(ObjectUtil.isNotNull(i.getId()) ){
@ -122,10 +128,10 @@ public class AftersalesProcessingResultsServiceImpl extends BaseServiceImpl<Afte
}
});
}
if(ObjectUtil.isNotNull(aftersalesProcessingResults.getAssignList()) && ObjectUtil.isNotNull( aftersalesProcessingResults.getAssignList().get(0)) ){
//删除
aftersalesProcessingMoneyService.deleteLogic(aftersalesProcessingResults.getAssignList());
}
// if(ObjectUtil.isNotNull(aftersalesProcessingResults.getAssignList()) && ObjectUtil.isNotNull( aftersalesProcessingResults.getAssignList().get(0)) ){
// //删除
// aftersalesProcessingMoneyService.deleteLogic(aftersalesProcessingResults.getAssignList());
// }
}
return true;

Loading…
Cancel
Save