Procházet zdrojové kódy

1.平台结算修改

wuhp před 2 roky
rodič
revize
d3b1dfebad

+ 5 - 3
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -47,6 +47,7 @@ import com.ydtech.utils.excel.ExcelStyleUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -64,6 +65,7 @@ import java.math.RoundingMode;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
@@ -820,14 +822,14 @@ handlingProportion,
                     if(excelItem.getSyReceivableProportion()!=null  &&  excelItem.getSyReceivableProportion().compareTo(BigDecimal.ZERO) !=0 ){
                         objectObjectHashMap.put("syReceivableProportion", excelItem.getSyReceivableProportion());   //非车保单号
                         List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(objectObjectHashMap);
-                        if(insPlyIncomes.isEmpty()){
+                        if(insPlyIncomes.isEmpty() && StringUtils.isEmpty(reason)){
                             reason="商业应收比例错误!";
                         }
                     }
                     if(excelItem.getNoReceivableProportion()!=null  &&  excelItem.getNoReceivableProportion().compareTo(BigDecimal.ZERO) !=0 ){
                         objectObjectHashMap.put("noReceivableProportion", excelItem.getNoReceivableProportion());   //非车保单号
                         List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(objectObjectHashMap);
-                        if(insPlyIncomes.isEmpty()){
+                        if(insPlyIncomes.isEmpty() && StringUtils.isEmpty(reason)){
                             reason="非车应收比例错误!";
                         }
                     }
@@ -1550,9 +1552,9 @@ handlingProportion,
     public void uodateBalance(InsPlyIncomeVo insPlyIncomeVo) {
         InsPlyIncome insPlyIncome = new InsPlyIncome();
         insPlyIncomeVo.setHandlingFeesStatus("1");
-        insPlyIncomeVo.setSettlementTime(LocalDate.now());  //结算日期
         BeanUtils.copyProperties(insPlyIncomeVo, insPlyIncome);
         insPlyIncome.setSettlementUserId(BaseController.getUser().getId());
+        insPlyIncome.setSettlementTime(LocalDateTime.now());
         baseMapper.updateById(insPlyIncome);
 
 //        生成记录