Просмотр исходного кода

失败费用匹配日志添加

785834757 1 год назад
Родитель
Сommit
7c9298303b

+ 17 - 1
src/main/java/com/ydtech/modules/order/service/impl/InsAreaCompanyServiceImpl.java

@@ -574,7 +574,7 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
 
         List<PtlAgreementProductCostsNew> costsNews = ptlAgreementProductCostsNewService.getByAgreementId(agreementProductQueryVo);
 
-        if (costsNews.isEmpty()) {
+        if (costsNews.isEmpty() && !Objects.isNull(quoteVo.getNowCostsId())) {
             throw new SystemException("没有找到费用信息");
         }
         PtlAgreementProductCostsNew ptlAgreementProductCostsNew = costsNews.get(0);
@@ -1088,6 +1088,22 @@ public class InsAreaCompanyServiceImpl extends ServiceImpl<InsAreaCompanyMapper,
         return baseMapper.getAllRejectOrders(page, rejectPageQueryVo);
     }
 
+    /**
+     * 更新费用匹配失败的日志
+     * @param companyId
+     * @param feeMatchErrMsg
+     * @return
+     */
+    @Override
+    public boolean updateFeeMatchErrMsg(String companyId, String feeMatchErrMsg) {
+        InsAreaCompany insAreaCompany = baseMapper.selectOne(new LambdaQueryWrapper<InsAreaCompany>()
+                .eq(InsAreaCompany::getId, companyId));
+        if(Objects.isNull(insAreaCompany))
+            return false;
+        insAreaCompany.setFeeMatchErrMsg(feeMatchErrMsg);
+        return baseMapper.updateById(insAreaCompany) > 0;
+    }
+
 }