From 4023de1e3863c1c23a739a4bad551256771b442a Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 10 十二月 2020 10:51:38 +0800
Subject: [PATCH] 优化 时间代码

---
 service-fee/src/main/java/com/java110/fee/api/FeeApi.java |   64 ++++++++++++++++++++++++++------
 1 files changed, 52 insertions(+), 12 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 d86d911..de4d8d6 100644
--- a/service-fee/src/main/java/com/java110/fee/api/FeeApi.java
+++ b/service-fee/src/main/java/com/java110/fee/api/FeeApi.java
@@ -6,11 +6,7 @@
 import com.java110.core.factory.DataTransactionFactory;
 import com.java110.dto.fee.FeeAttrDto;
 import com.java110.dto.fee.FeeDto;
-import com.java110.fee.bmo.IImportRoomFee;
-import com.java110.fee.bmo.IPayOweFee;
-import com.java110.fee.bmo.IQueryFeeByAttr;
-import com.java110.fee.bmo.IQueryOweFee;
-import com.java110.fee.bmo.IQueryParkspaceFee;
+import com.java110.fee.bmo.*;
 import com.java110.fee.smo.IFeeServiceSMO;
 import com.java110.utils.constant.ResponseConstant;
 import com.java110.utils.exception.InitConfigDataException;
@@ -20,11 +16,7 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.HashMap;
@@ -190,6 +182,52 @@
     }
 
     /**
+     * 鏌ヨ娆犺垂璐圭敤
+     *
+     * @param feeId       璐圭敤ID
+     * @param communityId 灏忓尯ID
+     * @return
+     * @path /app/feeApi/listFeeObj
+     */
+    @RequestMapping(value = "/listFeeObj", method = RequestMethod.GET)
+    public ResponseEntity<String> listFeeObj(
+            @RequestParam(value = "feeId") String feeId,
+            @RequestParam(value = "communityId") String communityId) {
+        FeeDto feeDto = new FeeDto();
+        feeDto.setFeeId(feeId);
+        feeDto.setCommunityId(communityId);
+        return queryOweFeeImpl.listFeeObj(feeDto);
+    }
+
+
+    /**
+     * 鏌ヨ娆犺垂璐圭敤(鎵归噺鏌ヨ)
+     *
+     * @param num         鍋滆溅浣嶆垨鎴垮眿缂栧彿
+     * @param communityId 灏忓尯ID
+     * @return
+     * @path /app/feeApi/getOweFees
+     */
+    @RequestMapping(value = "/getOweFees", method = RequestMethod.GET)
+    public ResponseEntity<String> getOweFees(
+            @RequestParam(value = "payObjType") String payObjType,
+            @RequestParam(value = "communityId") String communityId,
+            @RequestParam(value = "billType") String billType,
+            @RequestParam(value = "row") int row,
+            @RequestParam(value = "page") int page,
+            @RequestParam(value = "num", required = false) String num
+    ) {
+        FeeDto feeDto = new FeeDto();
+        feeDto.setPayerObjId(num);
+        feeDto.setPayerObjType(payObjType);
+        feeDto.setCommunityId(communityId);
+        feeDto.setBillType(billType);
+        feeDto.setRow(row);
+        feeDto.setPage(page);
+        return queryOweFeeImpl.queryAllOwneFee(feeDto);
+    }
+
+    /**
      * 娆犺垂鎵归噺缂磋垂
      *
      * @param reqJson {
@@ -218,11 +256,13 @@
     /**
      * 璐圭敤瀵煎叆
      *
-     * @param reqJson
+     * @param reqString
      * @return
      */
     @RequestMapping(value = "/importRoomFees", method = RequestMethod.POST)
-    public ResponseEntity<String> importRoomFees(@RequestBody JSONObject reqJson) {
+    public ResponseEntity<String> importRoomFees(@RequestBody String reqString) {
+
+        JSONObject reqJson = JSONObject.parseObject(reqString);
         Assert.hasKeyAndValue(reqJson, "communityId", "鏈寘鍚皬鍖轰俊鎭�");
         Assert.hasKeyAndValue(reqJson, "feeTypeCd", "鏈寘鍚垂鐢ㄧ被鍨�");
         Assert.hasKeyAndValue(reqJson, "storeId", "鏈寘鍚晢鎴蜂俊鎭�");

--
Gitblit v1.8.0