From f7b32b8f0143ea03f81ff5a54a5fd1fd208b921b Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 28 五月 2020 15:33:50 +0800
Subject: [PATCH] 优化完成巡检计划
---
FeeService/src/main/java/com/java110/fee/listener/detail/AbstractFeeDetailBusinessServiceDataFlowListener.java | 69 ++++++++++++++++++----------------
1 files changed, 37 insertions(+), 32 deletions(-)
diff --git a/FeeService/src/main/java/com/java110/fee/listener/detail/AbstractFeeDetailBusinessServiceDataFlowListener.java b/FeeService/src/main/java/com/java110/fee/listener/detail/AbstractFeeDetailBusinessServiceDataFlowListener.java
index 7855d4c..f96419e 100644
--- a/FeeService/src/main/java/com/java110/fee/listener/detail/AbstractFeeDetailBusinessServiceDataFlowListener.java
+++ b/FeeService/src/main/java/com/java110/fee/listener/detail/AbstractFeeDetailBusinessServiceDataFlowListener.java
@@ -15,16 +15,16 @@
import java.util.Map;
/**
- *
* 璐圭敤鏄庣粏 鏈嶅姟渚﹀惉 鐖剁被
* Created by wuxw on 2018/7/4.
*/
-public abstract class AbstractFeeDetailBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener{
+public abstract class AbstractFeeDetailBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener {
private static Logger logger = LoggerFactory.getLogger(AbstractFeeDetailBusinessServiceDataFlowListener.class);
/**
* 鑾峰彇 DAO宸ュ叿绫�
+ *
* @return
*/
public abstract IFeeDetailServiceDao getFeeDetailServiceDaoImpl();
@@ -32,59 +32,64 @@
/**
* 鍒锋柊 businessFeeDetailInfo 鏁版嵁
* 涓昏灏� 鏁版嵁搴� 涓瓧娈靛拰 鎺ュ彛浼犻�掑瓧娈靛缓绔嬪叧绯�
+ *
* @param businessFeeDetailInfo
*/
- protected void flushBusinessFeeDetailInfo(Map businessFeeDetailInfo,String statusCd){
+ protected void flushBusinessFeeDetailInfo(Map businessFeeDetailInfo, String statusCd) {
businessFeeDetailInfo.put("newBId", businessFeeDetailInfo.get("b_id"));
- businessFeeDetailInfo.put("operate",businessFeeDetailInfo.get("operate"));
-businessFeeDetailInfo.put("primeRate",businessFeeDetailInfo.get("prime_rate"));
-businessFeeDetailInfo.put("detailId",businessFeeDetailInfo.get("detail_id"));
-businessFeeDetailInfo.put("receivableAmount",businessFeeDetailInfo.get("receivable_amount"));
-businessFeeDetailInfo.put("cycles",businessFeeDetailInfo.get("cycles"));
-businessFeeDetailInfo.put("remark",businessFeeDetailInfo.get("remark"));
-businessFeeDetailInfo.put("receivedAmount",businessFeeDetailInfo.get("received_amount"));
-businessFeeDetailInfo.put("communityId",businessFeeDetailInfo.get("community_id"));
-businessFeeDetailInfo.put("feeId",businessFeeDetailInfo.get("fee_id"));
-businessFeeDetailInfo.remove("bId");
+ businessFeeDetailInfo.put("operate", businessFeeDetailInfo.get("operate"));
+ businessFeeDetailInfo.put("primeRate", businessFeeDetailInfo.get("prime_rate"));
+ businessFeeDetailInfo.put("detailId", businessFeeDetailInfo.get("detail_id"));
+ businessFeeDetailInfo.put("receivableAmount", businessFeeDetailInfo.get("receivable_amount"));
+ businessFeeDetailInfo.put("cycles", businessFeeDetailInfo.get("cycles"));
+ businessFeeDetailInfo.put("remark", businessFeeDetailInfo.get("remark"));
+ businessFeeDetailInfo.put("receivedAmount", businessFeeDetailInfo.get("received_amount"));
+ businessFeeDetailInfo.put("communityId", businessFeeDetailInfo.get("community_id"));
+ businessFeeDetailInfo.put("feeId", businessFeeDetailInfo.get("fee_id"));
+ businessFeeDetailInfo.remove("bId");
businessFeeDetailInfo.put("statusCd", statusCd);
}
/**
* 褰撲慨鏀规暟鎹椂锛屾煡璇nstance琛ㄤ腑鐨勬暟鎹� 鑷姩淇濆瓨鍒犻櫎鏁版嵁鍒癰usiness涓�
+ *
* @param businessFeeDetail 璐圭敤鏄庣粏淇℃伅
*/
- protected void autoSaveDelBusinessFeeDetail(Business business, JSONObject businessFeeDetail){
+ protected void autoSaveDelBusinessFeeDetail(Business business, JSONObject businessFeeDetail) {
//鑷姩鎻掑叆DEL
Map info = new HashMap();
- info.put("detailId",businessFeeDetail.getString("detailId"));
- info.put("statusCd",StatusConstant.STATUS_CD_VALID);
+ info.put("detailId", businessFeeDetail.getString("detailId"));
+ info.put("statusCd", StatusConstant.STATUS_CD_VALID);
List<Map> currentFeeDetailInfos = getFeeDetailServiceDaoImpl().getFeeDetailInfo(info);
- if(currentFeeDetailInfos == null || currentFeeDetailInfos.size() != 1){
- throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"鏈壘鍒伴渶瑕佷慨鏀规暟鎹俊鎭紝鍏ュ弬閿欒鎴栨暟鎹湁闂锛岃妫�鏌�"+info);
+ if (currentFeeDetailInfos == null || currentFeeDetailInfos.size() != 1) {
+ throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "鏈壘鍒伴渶瑕佷慨鏀规暟鎹俊鎭紝鍏ュ弬閿欒鎴栨暟鎹湁闂锛岃妫�鏌�" + info);
}
Map currentFeeDetailInfo = currentFeeDetailInfos.get(0);
- currentFeeDetailInfo.put("bId",business.getbId());
+ currentFeeDetailInfo.put("bId", business.getbId());
- currentFeeDetailInfo.put("operate",currentFeeDetailInfo.get("operate"));
-currentFeeDetailInfo.put("primeRate",currentFeeDetailInfo.get("prime_rate"));
-currentFeeDetailInfo.put("detailId",currentFeeDetailInfo.get("detail_id"));
-currentFeeDetailInfo.put("receivableAmount",currentFeeDetailInfo.get("receivable_amount"));
-currentFeeDetailInfo.put("cycles",currentFeeDetailInfo.get("cycles"));
-currentFeeDetailInfo.put("remark",currentFeeDetailInfo.get("remark"));
-currentFeeDetailInfo.put("receivedAmount",currentFeeDetailInfo.get("received_amount"));
-currentFeeDetailInfo.put("communityId",currentFeeDetailInfo.get("community_id"));
-currentFeeDetailInfo.put("feeId",currentFeeDetailInfo.get("fee_id"));
+ currentFeeDetailInfo.put("operate", currentFeeDetailInfo.get("operate"));
+ currentFeeDetailInfo.put("primeRate", currentFeeDetailInfo.get("prime_rate"));
+ currentFeeDetailInfo.put("detailId", currentFeeDetailInfo.get("detail_id"));
+ currentFeeDetailInfo.put("receivableAmount", currentFeeDetailInfo.get("receivable_amount"));
+ currentFeeDetailInfo.put("cycles", currentFeeDetailInfo.get("cycles"));
+ currentFeeDetailInfo.put("remark", currentFeeDetailInfo.get("remark"));
+ currentFeeDetailInfo.put("receivedAmount", currentFeeDetailInfo.get("received_amount"));
+ currentFeeDetailInfo.put("communityId", currentFeeDetailInfo.get("community_id"));
+ currentFeeDetailInfo.put("feeId", currentFeeDetailInfo.get("fee_id"));
- currentFeeDetailInfo.put("operate",StatusConstant.OPERATE_DEL);
+ currentFeeDetailInfo.put("operate", StatusConstant.OPERATE_DEL);
getFeeDetailServiceDaoImpl().saveBusinessFeeDetailInfo(currentFeeDetailInfo);
+
+ for (Object key : currentFeeDetailInfo.keySet()) {
+ if (businessFeeDetail.get(key) == null) {
+ businessFeeDetail.put(key.toString(), currentFeeDetailInfo.get(key));
+ }
+ }
}
-
-
-
}
--
Gitblit v1.8.0