Quellcode durchsuchen

优化采购提示消息不准确问题

wuxw vor 1 Jahr
Ursprung
Commit
0a090d236f

+ 10 - 4
service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeeConfirmCmd.java

@@ -39,10 +39,7 @@ import com.java110.po.parking.ParkingSpaceApplyPo;
 import com.java110.po.payFee.PayFeeDetailDiscountPo;
 import com.java110.utils.cache.CommonCache;
 import com.java110.utils.exception.CmdException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.utils.util.DateUtil;
-import com.java110.utils.util.StringUtil;
+import com.java110.utils.util.*;
 import com.java110.vo.ResultVo;
 import org.springframework.beans.factory.annotation.Autowired;
 
@@ -254,6 +251,9 @@ public class PayFeeConfirmCmd extends Cmd {
 
     private void dealAccount(JSONObject paramObj) {
         JSONArray accountDtos = paramObj.getJSONArray("selectUserAccount");
+        if(ListUtil.isNull(accountDtos)){
+            return;
+        }
         AccountDto accountDto = null;
         String accountRemark = "";
         String pointRemark = "";
@@ -345,6 +345,9 @@ public class PayFeeConfirmCmd extends Cmd {
         //FeeDto feeInfo = (FeeDto) paramObj.get("feeInfo");
         CouponUserDto couponUserDto = null;
         JSONArray couponUserDtos = paramObj.getJSONArray("couponUserDtos");
+        if(ListUtil.isNull(couponUserDtos)){
+            return ;
+        }
         CouponUserDto couponUser = null;
         for (int accountIndex = 0; accountIndex < couponUserDtos.size(); accountIndex++) {
             couponUser = BeanConvertUtil.covertBean(couponUserDtos.getJSONObject(accountIndex), CouponUserDto.class);
@@ -387,6 +390,9 @@ public class PayFeeConfirmCmd extends Cmd {
             return;
         }
         JSONArray computeDiscountDtos = paramObj.getJSONArray("computeDiscountDtos");
+        if(ListUtil.isNull(computeDiscountDtos)){
+            return;
+        }
         ComputeDiscountDto computeDiscountDto = null;
         for (int accountIndex = 0; accountIndex < computeDiscountDtos.size(); accountIndex++) {
             computeDiscountDto = BeanConvertUtil.covertBean(computeDiscountDtos.getJSONObject(accountIndex), ComputeDiscountDto.class);

+ 20 - 13
springboot/src/main/java/com/java110/boot/smo/assetExport/impl/ExportReportFeeSMOImpl.java

@@ -979,7 +979,6 @@ public class ExportReportFeeSMOImpl extends DefaultAbstractComponentSMO implemen
     }
 
 
-
     private void resourceStoreUseRecordManage(IPageData pd, ComponentValidateResult result, Workbook workbook) {
         Sheet sheet = workbook.createSheet("物品使用记录");
         Row row = sheet.createRow(0);
@@ -1616,30 +1615,38 @@ public class ExportReportFeeSMOImpl extends DefaultAbstractComponentSMO implemen
         row.createCell(0).setCellValue("费用编号");
         row.createCell(1).setCellValue("房号");
         row.createCell(2).setCellValue("业主");
-        row.createCell(3).setCellValue("面积");
-        row.createCell(4).setCellValue("费用项");
-        row.createCell(5).setCellValue("费用开始时间");
-        row.createCell(6).setCellValue("更新时间");
-        row.createCell(7).setCellValue("欠费时长(天)");
-        row.createCell(8).setCellValue("欠费金额");
+        row.createCell(3).setCellValue("业主电话");
+        row.createCell(4).setCellValue("面积");
+        row.createCell(5).setCellValue("费用项");
+        row.createCell(6).setCellValue("费用开始时间");
+        row.createCell(7).setCellValue("更新时间");
+        row.createCell(8).setCellValue("欠费时长(天)");
+        row.createCell(9).setCellValue("欠费时长(月)");
+        row.createCell(10).setCellValue("欠费金额");
+
         //查询楼栋信息
         JSONArray rooms = this.getReportOweFeeDetail(pd, result);
         if (rooms == null || rooms.size() == 0) {
             return;
         }
         JSONObject dataObj = null;
+        BigDecimal monthDec = null;
         for (int roomIndex = 0; roomIndex < rooms.size(); roomIndex++) {
             row = sheet.createRow(roomIndex + 1);
             dataObj = rooms.getJSONObject(roomIndex);
             row.createCell(0).setCellValue(roomIndex + 1);
             row.createCell(1).setCellValue(dataObj.getString("objName"));
             row.createCell(2).setCellValue(dataObj.getString("ownerName"));
-            row.createCell(3).setCellValue(dataObj.getString("builtUpArea"));
-            row.createCell(4).setCellValue(dataObj.getString("feeName"));
-            row.createCell(5).setCellValue(dataObj.getString("feeCreateTime"));
-            row.createCell(6).setCellValue(dataObj.getString("updateTime"));
-            row.createCell(7).setCellValue(dataObj.getString("oweDay"));
-            row.createCell(8).setCellValue(dataObj.getString("oweAmount"));
+            row.createCell(3).setCellValue(dataObj.getString("ownerTel"));
+            row.createCell(4).setCellValue(dataObj.getString("builtUpArea"));
+            row.createCell(5).setCellValue(dataObj.getString("feeName"));
+            row.createCell(6).setCellValue(dataObj.getString("feeCreateTime"));
+            row.createCell(7).setCellValue(dataObj.getString("updateTime"));
+            row.createCell(8).setCellValue(dataObj.getString("oweDay"));
+            monthDec = new BigDecimal(dataObj.getString("oweDay"));
+            monthDec = monthDec.divide(new BigDecimal("30"), 2, BigDecimal.ROUND_HALF_UP);
+            row.createCell(9).setCellValue(monthDec.doubleValue());
+            row.createCell(10).setCellValue(dataObj.getString("oweAmount"));
         }
     }