lyhzzz 2 anos atrás
pai
commit
5841cf6cee

+ 4 - 4
src/main/java/com/fdkankan/sale/service/impl/RepairInvoiceServiceImpl.java

@@ -73,7 +73,7 @@ public class RepairInvoiceServiceImpl extends ServiceImpl<IRepairInvoiceMapper,
                 throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
                 throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
             }
             }
 
 
-            MailTemplate mailTemplate = this.setMailMsg(repairInvoice.getRepairId(),repairInvoice.getInvoiceEmail());
+            MailTemplate mailTemplate = this.setMailMsg(repairInvoice.getRepairId(),repairInvoice.getGetAddrName());
 
 
             String imagePath = param.getInvoiceImg().replaceAll(CacheUtil.host,"");
             String imagePath = param.getInvoiceImg().replaceAll(CacheUtil.host,"");
             String localPath = FilePath.file_path + imagePath;
             String localPath = FilePath.file_path + imagePath;
@@ -114,16 +114,16 @@ public class RepairInvoiceServiceImpl extends ServiceImpl<IRepairInvoiceMapper,
         if(mailTemplate != null){
         if(mailTemplate != null){
             String subject = mailTemplate.getSubject();
             String subject = mailTemplate.getSubject();
             if(StringUtils.isNotBlank(orderNum)){
             if(StringUtils.isNotBlank(orderNum)){
-                subject = subject.replace("${ordernum}",orderNum);
+                subject = subject.replace("{orderNum}",orderNum);
             }
             }
             mailTemplate.setSubject(subject);
             mailTemplate.setSubject(subject);
 
 
             String msg = mailTemplate.getMsg();
             String msg = mailTemplate.getMsg();
             if(StringUtils.isNotBlank(orderNum)){
             if(StringUtils.isNotBlank(orderNum)){
-                msg = msg.replace("${ordernum}",orderNum);
+                msg = msg.replace("{orderNum}",orderNum);
             }
             }
             if(StringUtils.isNotBlank(userName)){
             if(StringUtils.isNotBlank(userName)){
-                msg = msg.replace("${username}",userName);
+                msg = msg.replace("${userName}",userName);
             }
             }
             mailTemplate.setMsg(msg);
             mailTemplate.setMsg(msg);
 
 

+ 10 - 1
src/main/java/com/fdkankan/sale/service/impl/RepairTesterService.java

@@ -14,6 +14,7 @@ import com.fdkankan.sale.util.DateUtil;
 import com.fdkankan.sale.util.StatusUtil;
 import com.fdkankan.sale.util.StatusUtil;
 import com.fdkankan.sale.vo.request.RepairParam;
 import com.fdkankan.sale.vo.request.RepairParam;
 import com.fdkankan.sale.vo.request.TestParam;
 import com.fdkankan.sale.vo.request.TestParam;
+import com.fdkankan.sale.vo.response.RepairRegisterPartVo;
 import com.fdkankan.sale.vo.response.RepairerVo;
 import com.fdkankan.sale.vo.response.RepairerVo;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -37,6 +38,8 @@ public class RepairTesterService {
     ISysUserService sysUserService;
     ISysUserService sysUserService;
     @Autowired
     @Autowired
     IRepairRegisterService repairRegisterService;
     IRepairRegisterService repairRegisterService;
+    @Autowired
+    RepairSupplyService repairSupplyService;
 
 
 
 
     /**
     /**
@@ -76,8 +79,14 @@ public class RepairTesterService {
         if(testParam.getResultStatus() == 0){
         if(testParam.getResultStatus() == 0){
             entity.setPassTime(DateUtil.getDate());
             entity.setPassTime(DateUtil.getDate());
             repairTestService.save(entity);
             repairTestService.save(entity);
+
+            List<RepairRegisterPartVo> partVoList = repairSupplyService.partInfo(repair.getRepairId(), 1);
             if(repair.getWarrantyType() == 0 ){
             if(repair.getWarrantyType() == 0 ){
-                repairLogService.saveBySysUser(userId,testParam.getRepairId(), RepairStatusEnum.TO_BE_RECOVERED.status(),"测试通过",entity.getTestId());
+                if(partVoList.size() >0){
+                    repairLogService.saveBySysUser(userId,testParam.getRepairId(), RepairStatusEnum.TO_BE_RECOVERED.status(),"测试通过",entity.getTestId());
+                }else {
+                    repairLogService.saveBySysUser(userId,testParam.getRepairId(), RepairStatusEnum.TO_BE_SHIPPED.status(),"测试通过",entity.getTestId());
+                }
             }else {
             }else {
                 repairLogService.saveBySysUser(userId,testParam.getRepairId(), RepairStatusEnum.TO_BE_PAID.status(),"测试通过",entity.getTestId());
                 repairLogService.saveBySysUser(userId,testParam.getRepairId(), RepairStatusEnum.TO_BE_PAID.status(),"测试通过",entity.getTestId());
             }
             }