From 6dfa1d6bee9568d13414cb0457121a59a89eacce Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期一, 27 六月 2022 14:57:52 +0800
Subject: [PATCH] 优化处理

---
 service-fee/src/main/java/com/java110/fee/api/FeeApi.java |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/service-fee/src/main/java/com/java110/fee/api/FeeApi.java b/service-fee/src/main/java/com/java110/fee/api/FeeApi.java
index 953e486..799cefc 100755
--- a/service-fee/src/main/java/com/java110/fee/api/FeeApi.java
+++ b/service-fee/src/main/java/com/java110/fee/api/FeeApi.java
@@ -4,6 +4,7 @@
 import com.java110.core.base.controller.BaseController;
 import com.java110.core.context.BusinessServiceDataFlow;
 import com.java110.core.factory.DataTransactionFactory;
+import com.java110.core.log.LoggerFactory;
 import com.java110.dto.fee.FeeAttrDto;
 import com.java110.dto.fee.FeeDto;
 import com.java110.fee.bmo.*;
@@ -14,7 +15,6 @@
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.StringUtil;
 import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
@@ -172,12 +172,18 @@
      */
     @RequestMapping(value = "/listOweFees", method = RequestMethod.GET)
     public ResponseEntity<String> listOweFees(
-            @RequestParam(value = "payObjId") String payObjId,
-            @RequestParam(value = "payObjType") String payObjType,
+            @RequestParam(value = "payObjId", required = false) String payObjId,
+            @RequestParam(value = "payObjType", required = false) String payObjType,
+            @RequestParam(value = "ownerId", required = false) String ownerId,
             @RequestParam(value = "communityId") String communityId) {
+
+        if (StringUtil.isEmpty(payObjId) && StringUtil.isEmpty(ownerId)) {
+            throw new IllegalArgumentException("璐圭敤瀵硅薄鎴栬�呬笟涓讳笉鑳介兘涓虹┖");
+        }
         FeeDto feeDto = new FeeDto();
         feeDto.setPayerObjId(payObjId);
         feeDto.setPayerObjType(payObjType);
+        feeDto.setOwnerId(ownerId);
         feeDto.setCommunityId(communityId);
         return queryOweFeeImpl.query(feeDto);
     }
@@ -214,12 +220,16 @@
     public ResponseEntity<String> listFeeObj(
             @RequestParam(value = "feeId") String feeId,
             @RequestParam(value = "cycle", required = false) String cycle,
+            @RequestParam(value = "custEndTime", required = false) String custEndTime,
             @RequestParam(value = "communityId") String communityId) {
         FeeDto feeDto = new FeeDto();
         feeDto.setFeeId(feeId);
         feeDto.setCommunityId(communityId);
         if (!StringUtil.isEmpty(cycle)) {
             feeDto.setCycle(cycle);
+        }
+        if (!StringUtil.isEmpty(custEndTime)) {
+            feeDto.setCustEndTime(custEndTime);
         }
         return queryOweFeeImpl.listFeeObj(feeDto);
     }
@@ -292,6 +302,7 @@
         Assert.hasKeyAndValue(reqJson, "feeTypeCd", "鏈寘鍚垂鐢ㄧ被鍨�");
         Assert.hasKeyAndValue(reqJson, "storeId", "鏈寘鍚晢鎴蜂俊鎭�");
         Assert.hasKeyAndValue(reqJson, "userId", "鏈寘鍚敤鎴蜂俊鎭�");
+        Assert.hasKeyAndValue(reqJson, "batchId", "鏈寘鍚敤鎴蜂俊鎭�");
 
         return importRoomFeeImpl.importFee(reqJson);
     }
@@ -312,6 +323,7 @@
         Assert.hasKeyAndValue(reqJson, "feeTypeCd", "鏈寘鍚垂鐢ㄧ被鍨�");
         Assert.hasKeyAndValue(reqJson, "storeId", "鏈寘鍚晢鎴蜂俊鎭�");
         Assert.hasKeyAndValue(reqJson, "userId", "鏈寘鍚敤鎴蜂俊鎭�");
+        Assert.hasKeyAndValue(reqJson, "batchId", "鏈寘鍚壒娆′俊鎭�");
 
         return importRoomFeeImpl.importCarFee(reqJson);
     }
@@ -332,6 +344,7 @@
         Assert.hasKeyAndValue(reqJson, "feeTypeCd", "鏈寘鍚垂鐢ㄧ被鍨�");
         Assert.hasKeyAndValue(reqJson, "storeId", "鏈寘鍚晢鎴蜂俊鎭�");
         Assert.hasKeyAndValue(reqJson, "userId", "鏈寘鍚敤鎴蜂俊鎭�");
+        Assert.hasKeyAndValue(reqJson, "batchId", "鏈寘鍚壒娆′俊鎭�");
 
         return importRoomFeeImpl.importContractFees(reqJson);
     }

--
Gitblit v1.8.0