From fe12fe0325c33867a4cb8387e4f19a0178e5e1a1 Mon Sep 17 00:00:00 2001
From: renkang <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 09 十二月 2024 23:20:34 +0800
Subject: [PATCH] 客户资料 巡检任务业务

---
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
index a81b54e..485be32 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
@@ -89,7 +89,6 @@
         }else{
             model.setStatus(Constants.TWO);
         }
-        model.setStatus(Constants.ZERO);//寰呮墽琛�
         model.setRemark(getRemarlByParam(model));
         ywContractMapper.insert(model);
         dealDetailListBiz(model);//澶勭悊鏉℃淇℃伅
@@ -316,16 +315,19 @@
                 .replace("{param3}",DateUtil.getDateLongSlash(model.getBtDate()))
                 .replace("{param4}",fee.compareTo(new BigDecimal(0)) >=0?"鏀�":"浠�")
                 .replace("{param5}",(fee.compareTo(new BigDecimal(0)) >=0?
-                        Constants.formatBigdecimal2Float(model.getBtFee()).intValue()
-                        :(Constants.formatBigdecimal2Float(model.getBtFee()).intValue() * -1))+"" );
+                        Constants.formatBigdecimal2Float(model.getBtFee())
+                        :(Constants.formatBigdecimal2Float(model.getBtFee()).multiply(new BigDecimal(-1)))).toString());
         return  str;
     }
     private String getbackRentLogByParam(YwContract model) {
         BigDecimal fee = Constants.formatBigdecimal(model.getBtFee());
-        String str = "銆愰��绉熸棩{param1}锛岄��绉熷師鍥狅細{param2},閫�绉熷崗璁腑缁熻鐨勮垂鐢ㄦ�昏{param3}鍏冦�傘��";
+        String str = "銆愰��绉熸棩{param1}锛岄��绉熷師鍥狅細{param2},閫�绉熷崗璁腑缁熻鐨勮垂鐢ㄦ�昏闇�{param4}{param5}鍏冦�傘��";
         str = str.replace("{param1}",DateUtil.getDateLongSlash(model.getBtDate()))
                 .replace("{param2}",StringUtils.defaultString(model.getBtInfo(),""))
-                .replace("{param3}",Constants.formatBigdecimal2Float(model.getBtFee()).doubleValue()+"");
+                .replace("{param4}",fee.compareTo(new BigDecimal(0)) >=0?"鏀�":"浠�")
+                .replace("{param5}",(fee.compareTo(new BigDecimal(0)) >=0?
+                        Constants.formatBigdecimal2Float(model.getBtFee())
+                        :(Constants.formatBigdecimal2Float(model.getBtFee()).multiply(new BigDecimal(-1)))).toString());
         return  str;
     }
 
@@ -485,7 +487,7 @@
             for(YwContractBill addBill : param.getAddBillList()){
                 addBill.setIsdeleted(Constants.ZERO);
                 addBill.setContractId(param.getId());
-                addBill.setType(Constants.ONE);
+                addBill.setType(Constants.TWO);
                 addBill.setStatus(Constants.ZERO);
                 addBill.setTotleFee(addBill.getReceivableFee());
                 addBill.setCompanyId(param.getCompanyId());
@@ -704,7 +706,7 @@
             }
         }
         for(int i=0;i<billList2.size();i++){
-            if(Constants.equalsInteger(billList1.get(i).getCostType(),Constants.ONE)) {
+            if(Constants.equalsInteger(billList2.get(i).getCostType(),Constants.ONE)) {
                 billList2.get(i).setSortnum(num);
                 num++;
             }
@@ -1326,9 +1328,13 @@
         if(model.getBillList()!=null && model.getBillList().size()>0){
             for(YwContractBill bill: model.getBillList()){
                 //浠樻鐘舵�侊細0=寰呮敹娆撅紱1=宸茬粨娓咃紱2=閮ㄥ垎缁撴竻锛�3=寰呬粯娆撅紱4=寰呴��娆撅紱5=宸插叧闂�
+                if( Constants.formatBigdecimal(bill.getReceivableFee()).compareTo(new BigDecimal(0)) ==0){
+                    //濡傛灉杩樻病寮�濮嬶紝璐﹀崟鐩存帴鍏抽棴
+                    continue;
+                }
                 if(Constants.equalsInteger(bill.getPayStatus(),Constants.ZERO)
                         ||Constants.equalsInteger(bill.getPayStatus(),Constants.THREE)){
-                    if(bill.getStartDate().getTime()>nowEnd){
+                    if(bill.getStartDate().getTime()>nowEnd ){
                         //濡傛灉杩樻病寮�濮嬶紝璐﹀崟鐩存帴鍏抽棴
                         continue;
                     }

--
Gitblit v1.9.3