From 8749db96edc44e76a9b2ecaf0332e8c0f34fbb5b Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 08 八月 2023 14:58:59 +0800
Subject: [PATCH] 优化代码

---
 service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeDetailMonthInnerServiceSMOImpl.java |   63 +++++++++++++++++++++++++++++--
 1 files changed, 58 insertions(+), 5 deletions(-)

diff --git a/service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeDetailMonthInnerServiceSMOImpl.java b/service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeDetailMonthInnerServiceSMOImpl.java
index b5b3874..c2c454a 100644
--- a/service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeDetailMonthInnerServiceSMOImpl.java
+++ b/service-fee/src/main/java/com/java110/fee/smo/impl/PayFeeDetailMonthInnerServiceSMOImpl.java
@@ -3,10 +3,11 @@
 
 import com.java110.core.base.smo.BaseServiceSMO;
 import com.java110.dto.PageDto;
-import com.java110.dto.payFeeDetailMonth.PayFeeDetailMonthDto;
+import com.java110.dto.fee.FeeDetailDto;
+import com.java110.dto.payFee.PayFeeDetailMonthDto;
 import com.java110.fee.dao.IPayFeeDetailMonthServiceDao;
 import com.java110.intf.fee.IPayFeeDetailMonthInnerServiceSMO;
-import com.java110.po.payFeeDetailMonth.PayFeeDetailMonthPo;
+import com.java110.po.payFee.PayFeeDetailMonthPo;
 import com.java110.utils.util.BeanConvertUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -41,8 +42,12 @@
     @Override
     public int savePayFeeDetailMonths(@RequestBody List<PayFeeDetailMonthPo> payFeeDetailMonthPos) {
         int saveFlag = 1;
+        if (payFeeDetailMonthPos == null || payFeeDetailMonthPos.size() < 1) {
+            return saveFlag;
+        }
+
         Map info = new HashMap();
-        info.put("payFeeDetailMonthPos",payFeeDetailMonthPos);
+        info.put("payFeeDetailMonthPos", payFeeDetailMonthPos);
         payFeeDetailMonthServiceDaoImpl.savePayFeeDetailMonthInfos(info);
         return saveFlag;
     }
@@ -57,8 +62,7 @@
     @Override
     public int deletePayFeeDetailMonth(@RequestBody PayFeeDetailMonthPo payFeeDetailMonthPo) {
         int saveFlag = 1;
-        payFeeDetailMonthPo.setStatusCd("1");
-        payFeeDetailMonthServiceDaoImpl.updatePayFeeDetailMonthInfo(BeanConvertUtil.beanCovertMap(payFeeDetailMonthPo));
+        payFeeDetailMonthServiceDaoImpl.deletePayFeeDetailMonthInfo(BeanConvertUtil.beanCovertMap(payFeeDetailMonthPo));
         return saveFlag;
     }
 
@@ -84,6 +88,55 @@
         return payFeeDetailMonthServiceDaoImpl.queryPayFeeDetailMonthsCount(BeanConvertUtil.beanCovertMap(payFeeDetailMonthDto));
     }
 
+    @Override
+    public List<PayFeeDetailMonthDto> queryPayFeeDetailMaxMonths(@RequestBody PayFeeDetailMonthDto payFeeDetailMonthDto) {
+        int page = payFeeDetailMonthDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            payFeeDetailMonthDto.setPage((page - 1) * payFeeDetailMonthDto.getRow());
+        }
+
+        List<PayFeeDetailMonthDto> payFeeDetailMonths = BeanConvertUtil.covertBeanList(payFeeDetailMonthServiceDaoImpl.queryPayFeeDetailMaxMonths(BeanConvertUtil.beanCovertMap(payFeeDetailMonthDto)), PayFeeDetailMonthDto.class);
+
+        return payFeeDetailMonths;
+    }
+
+    /**
+     * 鏌ヨ闇�瑕佺鏁g殑 缂磋垂璁板綍
+     *
+     * @param payFeeDetailMonthDto
+     * @return
+     */
+    @Override
+    public List<FeeDetailDto> getWaitDispersedFeeDetail(@RequestBody PayFeeDetailMonthDto payFeeDetailMonthDto) {
+        List<FeeDetailDto> payFeeDetailMonths = BeanConvertUtil.covertBeanList(payFeeDetailMonthServiceDaoImpl.getWaitDispersedFeeDetail(BeanConvertUtil.beanCovertMap(payFeeDetailMonthDto)), FeeDetailDto.class);
+
+        return payFeeDetailMonths;
+    }
+
+    /**
+     * 涓撻棬缁欓〉闈娇鐢� 涓昏涓轰簡鏌ヨ鍑鸿垂鐢ㄧ浉鍏崇殑涓�浜涗俊鎭�
+     * @param payFeeDetailMonthDto
+     * @return
+     */
+    @Override
+    public List<PayFeeDetailMonthDto> queryPagePayFeeDetailMonths(@RequestBody PayFeeDetailMonthDto payFeeDetailMonthDto) {
+        List<PayFeeDetailMonthDto> payFeeDetailMonths = BeanConvertUtil.covertBeanList(payFeeDetailMonthServiceDaoImpl.queryPagePayFeeDetailMonths(BeanConvertUtil.beanCovertMap(payFeeDetailMonthDto)), PayFeeDetailMonthDto.class);
+
+        return payFeeDetailMonths;
+    }
+
+    @Override
+    public int queryPagePayFeeDetailMonthsCount(@RequestBody PayFeeDetailMonthDto payFeeDetailMonthDto) {
+
+        int page = payFeeDetailMonthDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            payFeeDetailMonthDto.setPage((page - 1) * payFeeDetailMonthDto.getRow());
+        }
+        return payFeeDetailMonthServiceDaoImpl.queryPagePayFeeDetailMonthsCount(BeanConvertUtil.beanCovertMap(payFeeDetailMonthDto));
+    }
+
     public IPayFeeDetailMonthServiceDao getPayFeeDetailMonthServiceDaoImpl() {
         return payFeeDetailMonthServiceDaoImpl;
     }

--
Gitblit v1.8.0