From 2d079ac843ebcb335f2ef7d6952f9700a16fddde Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期三, 05 五月 2021 14:11:00 +0800
Subject: [PATCH] 游湖阿底阿妈
---
service-fee/src/main/java/com/java110/fee/api/FeeApi.java | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 156 insertions(+), 4 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
old mode 100644
new mode 100755
index c7eca56..9911ce1
--- 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,9 +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.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;
@@ -44,6 +42,12 @@
@Autowired
private IQueryOweFee queryOweFeeImpl;
+
+ @Autowired
+ private IPayOweFee payOweFeeImpl;
+
+ @Autowired
+ private IImportRoomFee importRoomFeeImpl;
@RequestMapping(path = "/service", method = RequestMethod.GET)
public String serviceGet(HttpServletRequest request) {
@@ -159,10 +163,11 @@
/**
* 鏌ヨ娆犺垂璐圭敤
- * @path /app/feeApi/listOweFees
+ *
* @param payObjId 浠樿垂鏂笽D
* @param communityId 灏忓尯ID
* @return
+ * @path /app/feeApi/listOweFees
*/
@RequestMapping(value = "/listOweFees", method = RequestMethod.GET)
public ResponseEntity<String> listOweFees(
@@ -175,4 +180,151 @@
feeDto.setCommunityId(communityId);
return queryOweFeeImpl.query(feeDto);
}
+ /**
+ * 鏌ヨ娆犺垂璐圭敤
+ *
+ * @param roomId 鎴垮眿ID
+ * @param communityId 灏忓尯ID
+ * @return
+ * @path /app/feeApi/listAllRoomOweFees
+ */
+ @RequestMapping(value = "/listAllRoomOweFees", method = RequestMethod.GET)
+ public ResponseEntity<String> listAllRoomOweFees(
+ @RequestParam(value = "roomId",required = false) String roomId,
+ @RequestParam(value = "communityId") String communityId) {
+ FeeDto feeDto = new FeeDto();
+ feeDto.setPayerObjId(roomId);
+ feeDto.setPayerObjType(FeeDto.PAYER_OBJ_TYPE_ROOM);
+ feeDto.setCommunityId(communityId);
+ return queryOweFeeImpl.querys(feeDto);
+ }
+
+ /**
+ * 鏌ヨ娆犺垂璐圭敤
+ *
+ * @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 {
+ * "communityId":"",
+ * "fees":[
+ * {
+ * "feeId":"123123",
+ * "feePrice":10.00,
+ * <p>
+ * }
+ * <p>
+ * ]
+ * }
+ * @return
+ * @path /app/feeApi/payOweFee
+ */
+ @RequestMapping(value = "/payOweFee", method = RequestMethod.POST)
+ public ResponseEntity<String> payOweFee(@RequestBody JSONObject reqJson) {
+ Assert.hasKeyAndValue(reqJson, "communityId", "鏈寘鍚皬鍖轰俊鎭�");
+
+ Assert.hasKey(reqJson, "fees", "鏈寘鍚即璐归」鐩�");
+
+ return payOweFeeImpl.pay(reqJson);
+ }
+
+ /**
+ * 璐圭敤瀵煎叆
+ *
+ * @param reqString
+ * @return
+ */
+ @RequestMapping(value = "/importRoomFees", method = RequestMethod.POST)
+ public ResponseEntity<String> importRoomFees(@RequestBody String reqString) {
+
+ JSONObject reqJson = JSONObject.parseObject(reqString);
+ Assert.hasKeyAndValue(reqJson, "communityId", "鏈寘鍚皬鍖轰俊鎭�");
+ Assert.hasKeyAndValue(reqJson, "feeTypeCd", "鏈寘鍚垂鐢ㄧ被鍨�");
+ Assert.hasKeyAndValue(reqJson, "storeId", "鏈寘鍚晢鎴蜂俊鎭�");
+ Assert.hasKeyAndValue(reqJson, "userId", "鏈寘鍚敤鎴蜂俊鎭�");
+
+ return importRoomFeeImpl.importFee(reqJson);
+ }
+
+ /**
+ * 杞﹁締璐圭敤瀵煎叆
+ * /feeApi/importCarFees
+ * path /app/feeApi/importCarFees
+ * @param reqString
+ * @return
+ */
+ @RequestMapping(value = "/importCarFees", method = RequestMethod.POST)
+ public ResponseEntity<String> importCarFees(@RequestBody String reqString) {
+
+ JSONObject reqJson = JSONObject.parseObject(reqString);
+ Assert.hasKeyAndValue(reqJson, "communityId", "鏈寘鍚皬鍖轰俊鎭�");
+ Assert.hasKeyAndValue(reqJson, "feeTypeCd", "鏈寘鍚垂鐢ㄧ被鍨�");
+ Assert.hasKeyAndValue(reqJson, "storeId", "鏈寘鍚晢鎴蜂俊鎭�");
+ Assert.hasKeyAndValue(reqJson, "userId", "鏈寘鍚敤鎴蜂俊鎭�");
+
+ return importRoomFeeImpl.importCarFee(reqJson);
+ }
+
+ /**
+ * 鍚堝悓璐圭敤瀵煎叆
+ * /feeApi/importContractFees
+ * path /app/feeApi/importContractFees
+ * @param reqString
+ * @return
+ */
+ @RequestMapping(value = "/importContractFees", method = RequestMethod.POST)
+ public ResponseEntity<String> importContractFees(@RequestBody String reqString) {
+
+ JSONObject reqJson = JSONObject.parseObject(reqString);
+ Assert.hasKeyAndValue(reqJson, "communityId", "鏈寘鍚皬鍖轰俊鎭�");
+ Assert.hasKeyAndValue(reqJson, "feeTypeCd", "鏈寘鍚垂鐢ㄧ被鍨�");
+ Assert.hasKeyAndValue(reqJson, "storeId", "鏈寘鍚晢鎴蜂俊鎭�");
+ Assert.hasKeyAndValue(reqJson, "userId", "鏈寘鍚敤鎴蜂俊鎭�");
+
+ return importRoomFeeImpl.importContractFees(reqJson);
+ }
+
}
--
Gitblit v1.8.0