From 71060a7cb45508e86e9a1eff6be93f88f929adfc Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 18 五月 2023 13:54:58 +0800
Subject: [PATCH] 修改代码

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java |   29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
index b824cd3..199f62c 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java
@@ -138,7 +138,12 @@
 
         //startPage();
         List<SpFinancialExpensesFundOut> list = serviceFundService.getListBypower(loginUser.getUsername(), 2, APPLICANT, APPLICATIONBEGTIME, APPLICATIONENDTIME, loginUser.getDeptId().toString(), CHECKFLAG, APPLYTYPE);
-        //return getDataTable(list);
+        Collections.sort(list, new Comparator<SpFinancialExpensesFundOut>() {
+            @Override
+            public int compare(SpFinancialExpensesFundOut o1, SpFinancialExpensesFundOut o2) {
+                return o2.getCreateTime().compareTo(o1.getCreateTime());
+            }
+        });
         return getCustomDataTable(list, pageNum, pageSize);
     }
 
@@ -201,9 +206,9 @@
     public AjaxResult add(@RequestBody ServiceFund serviceFund) {
         boolean b = serviceFundService.save(serviceFund);
         Long id = serviceFund.getId();
-        if (b) {
-            addReiSharedDatd(serviceFund, 1);
-        }
+//        if (b) {
+//            addReiSharedDatd(serviceFund, 1);
+//        }
         return AjaxResult.success(id);
     }
 
@@ -429,9 +434,9 @@
     public AjaxResult addnew(@RequestBody ServiceFundVO serviceFundVO) {
         boolean b = serviceFundService.save(serviceFundVO);
         Long id = serviceFundVO.getId();
-        if (b) {
-            addReiSharedDatd(serviceFundVO, 1);
-        }
+//        if (b) {
+//            addReiSharedDatd(serviceFundVO, 1);
+//        }
         List<ServiceFunddetail> serviceFunddetails = serviceFundVO.getServiceFunddetails();
         serviceFunddetails.forEach(item -> item.setFundid(id));
         serviceFunddetailService.saveBatch(serviceFunddetails);
@@ -445,6 +450,7 @@
     @Log(title = "瀹℃牳璐圭敤", businessType = BusinessType.OTHER)
     @PostMapping("/checkfund")
     public AjaxResult checkFund(@RequestBody CheckFundVO checkFundVO) {
+        logger.info("serviceFundController---checkFund鐨勫叆鍙傚�糲heckFundVO :{}",checkFundVO);
         ServiceFund serviceFund = serviceFundService.getById(checkFundVO.getFundid());
         if (serviceFund != null) {
             Integer TotalLevel = 0;
@@ -453,6 +459,8 @@
             serviceFundflowrule.setFundtype(2);
             serviceFundflowrule.setApplytype(serviceFund.getApplytype());
             serviceFundflowrule.setCheckuserno(loginUser.getUsername());
+            logger.info("serviceFundController---checkFund---queryList鐨勫叆鍙傚�約erviceFundflowrule:{}",serviceFundflowrule);
+
             List<ServiceFundflowrule> serviceFundflowrules = serviceFundflowruleService.queryList(serviceFundflowrule);
 
             if (serviceFundflowrules == null || serviceFundflowrules.stream().count() == 0) {
@@ -542,6 +550,7 @@
                     columnMap.put("fundID", checkFundVO.getFundid());
                     //鑾峰彇璇︽儏鏁版嵁
                     List<ServiceFunddetail> serviceFunddetails = serviceFunddetailMapper.selectByMap(columnMap);
+                    logger.info("serviceFundController---checkFund鐨勮繑鍥炲�約erviceFunddetails :{}",serviceFunddetails);
                     List<ServiceFunddetailShared> serviceFunddetailShareds = DtoConversionUtils.sourceToTarget(serviceFunddetails, ServiceFunddetailShared.class);
                     for (int i = 0; i < serviceFunddetails.size(); i++) {
                         serviceFunddetailShareds.get(i).setFundid(serviceFundShared.getId());
@@ -581,9 +590,9 @@
     @RepeatSubmit
     public AjaxResult edit(@RequestBody ServiceFund serviceFund) {
         boolean bret = serviceFundService.updateById(serviceFund);
-        if (bret) {
-            addReiSharedDatd(serviceFund, 2);
-        }
+//        if (bret) {
+//            addReiSharedDatd(serviceFund, 2);
+//        }
         return toAjax(bret);
     }
 

--
Gitblit v1.9.3