From e4750948a3f1db512197faba674a8da8d112be11 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期五, 23 五月 2025 22:27:40 +0800
Subject: [PATCH] yxh

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java |   34 ++++++++++++++++++++--------------
 1 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
index 6aec869..c1cdcf1 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java
@@ -20,7 +20,6 @@
 import com.ruoyi.project.domain.vo.SpFinancialExpensesIn;
 import com.ruoyi.project.domain.vo.SpFinancialExpensesReimbursementOut;
 import com.ruoyi.project.service.*;
-import com.ruoyi.system.service.ISysDeptService;
 import com.ruoyi.system.service.ISysPostService;
 import com.ruoyi.system.service.ISysUserService;
 import com.ruoyi.web.controller.enums.PersonType;
@@ -104,7 +103,7 @@
      * 鏌ヨ鎶ラ攢鐢宠鍒楄〃
      */
     @ApiOperation("鏌ヨ鎶ラ攢鐢宠鍒楄〃")
-    //@PreAuthorize("@ss.hasPermi('project:reimbursement:list')")
+    //// @PreAuthorize("@ss.hasPermi('project:reimbursement:list')")
     @Log(title = "鏌ヨ鎶ラ攢鐢宠鍒楄〃", businessType = BusinessType.OTHER)
     @GetMapping("/list")
     public TableDataInfo list(ServiceReimbursement serviceReimbursement) {
@@ -165,6 +164,7 @@
         if (APPLICATIONENDTIME == null) {
             APPLICATIONENDTIME = "";
         }
+
         //startPage();
         List<SpFinancialExpensesReimbursementOut> list = serviceReimbursementService.getListBypower(loginUser.getUsername(), 1, APPLICANT, APPLICATIONBEGTIME, APPLICATIONENDTIME, loginUser.getDeptId().toString(), CHECKFLAG, APPLYTYPE, checkstatus, donorname);
         //鏍规嵁缁忓姙浜虹瓫閫�
@@ -176,11 +176,15 @@
             list = list.stream().filter(reimbursementOut -> new BigDecimal(reimbursementOut.getAmountrequested()).compareTo(new BigDecimal(spFinancialExpensesIn.getMoney())) == 0).collect(Collectors.toList());
 
         }
+        //鏍规嵁涓氬姟缁勭瓫閫�
+        if (StringUtils.isNotBlank(spFinancialExpensesIn.getDeptnos())) {
+            list = list.stream().filter(reimbursementOut -> reimbursementOut.getDeptmentno().contains(spFinancialExpensesIn.getDeptnos())).collect(Collectors.toList()); // 鎸塶ame瀛楁杩囨护
+        }
         //鏍规嵁鍒涘缓鏃堕棿鎺掑簭
         Collections.sort(list, new Comparator<SpFinancialExpensesReimbursementOut>() {
             @Override
             public int compare(SpFinancialExpensesReimbursementOut o1, SpFinancialExpensesReimbursementOut o2) {
-                return o1.getCreateTime().compareTo(o2.getCreateTime());
+                return o1.getApplyTime().compareTo(o2.getApplyTime());
             }
         });
         return getCustomDataTable(list, pageNum, pageSize);
@@ -190,7 +194,7 @@
      * 瀵煎嚭鎶ラ攢鐢宠鍒楄〃
      */
     @ApiOperation("瀵煎嚭鎶ラ攢鐢宠鍒楄〃")
-    //@PreAuthorize("@ss.hasPermi('project:reimbursement:export')")
+    //// @PreAuthorize("@ss.hasPermi('project:reimbursement:export')")
     @Log(title = "鎶ラ攢鐢宠", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(ServiceReimbursement serviceReimbursement) {
@@ -203,7 +207,7 @@
      * 鑾峰彇鎶ラ攢鐢宠璇︾粏淇℃伅
      */
     @ApiOperation("鑾峰彇鎶ラ攢鐢宠璇︾粏淇℃伅")
-    //@PreAuthorize("@ss.hasPermi('project:reimbursement:query')")
+    //// @PreAuthorize("@ss.hasPermi('project:reimbursement:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(serviceReimbursementService.getById(id));
@@ -223,7 +227,7 @@
      * 鏂板鎶ラ攢鐢宠
      */
     @ApiOperation("鏂板鎶ラ攢鐢宠")
-    //@PreAuthorize("@ss.hasPermi('project:reimbursement:add')")
+    //// @PreAuthorize("@ss.hasPermi('project:reimbursement:add')")
     @Log(title = "鎶ラ攢鐢宠", businessType = BusinessType.INSERT)
     @PostMapping("/add")
     @RepeatSubmit
@@ -489,8 +493,8 @@
                 }
 
             }
-            //001瀹℃壒閫氳繃涔嬪悗锛屽氨闇�瑕佹妸鈥滃姙鍏涓讳换鈥濈殑鍚嶅瓧濉笂
-            if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("001")) {
+            //053瀹℃壒閫氳繃涔嬪悗锛屽氨闇�瑕佹妸鈥滃姙鍏涓讳换鈥濈殑鍚嶅瓧濉笂
+            if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("053")) {
                 serviceReimbursement.setOfficedirector(user.getNickName());
                 serviceReimbursement.setUploadStates(1);
             }
@@ -506,12 +510,14 @@
             serviceSystemmessage.setReceiveusername(serviceReimbursement.getUsername());
             serviceSystemmessage.setIsread(0);
             serviceSystemmessage.setMessagetype(1);
+            serviceSystemmessage.setUpdateTime(new Date());
+            serviceSystemmessage.setUpdateBy(user.getNickName());
             serviceSystemmessage.setRelevantno(serviceReimbursement.getId());
             log.info("CheckFlag鐨勫�� : {}", CheckFlag);
             if (CheckFlag == 1) {
                 //閫氳繃
                 serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁�氳繃");
-                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceReimbursement.getCreateTime()) + "鎻愪氦鐨勫叧浜庢崘鐚渚嬨��" + serviceReimbursement.getDonorname() + "銆戠殑宸梾璐圭敵璇峰凡閫氳繃" + (OriginalFlowLevel + 1) + "绾у鏍�");
+                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceReimbursement.getCreateTime()) + "鎻愪氦鐨勫樊鏃呮姤閿�鍗曠敵璇峰凡閫氳繃");
                 log.info("totalLevel鐨勫�� : {},  OriginalFlowLevel鐨勫��:{}", totalLevel, OriginalFlowLevel);
 
                 //杩欎竴鍧楁斁瀹氭椂浠诲姟閲屽仛
@@ -522,7 +528,7 @@
             } else {
                 //椹冲洖
                 serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥�");
-                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceReimbursement.getCreateTime()) + "鎻愪氦鐨勫叧浜庢崘鐚渚嬨��" + serviceReimbursement.getDonorname() + "銆戠殑宸梾璐圭敵璇峰凡琚�" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥烇紝鍘熷洜涓�" + checkFundVO.getFlowcontent() + "");
+                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceReimbursement.getCreateTime()) + "鎻愪氦鐨勫樊鏃呮姤閿�鍗曠敵璇疯椹冲洖锛屽師鍥�:" + checkFundVO.getFlowcontent() + "");
             }
             ServiceSystemmessage.save(serviceSystemmessage);
 
@@ -537,7 +543,7 @@
      * 淇敼鎶ラ攢鐢宠
      */
     @ApiOperation("淇敼鎶ラ攢鐢宠")
-    //@PreAuthorize("@ss.hasPermi('project:reimbursement:edit')")
+    //// @PreAuthorize("@ss.hasPermi('project:reimbursement:edit')")
     @Log(title = "鎶ラ攢鐢宠", businessType = BusinessType.UPDATE)
     @PostMapping("/reimbursementEdit")
     @RepeatSubmit
@@ -553,7 +559,7 @@
      * 淇敼鎶ラ攢鐢宠
      */
     @ApiOperation("淇敼鎶ラ攢鐢宠")
-    //@PreAuthorize("@ss.hasPermi('project:reimbursement:edit')")
+    //// @PreAuthorize("@ss.hasPermi('project:reimbursement:edit')")
     @Log(title = "瀹℃牳璐圭敤", businessType = BusinessType.OTHER)
     @PostMapping("/editMoney")
     public AjaxResult editMoney(@RequestBody List<ReimbursementService> serviceReimbursement) {
@@ -568,7 +574,7 @@
      * 鍒犻櫎鎶ラ攢鐢宠
      */
     @ApiOperation("鍒犻櫎鎶ラ攢鐢宠")
-    //@PreAuthorize("@ss.hasPermi('project:reimbursement:remove')")
+    //// @PreAuthorize("@ss.hasPermi('project:reimbursement:remove')")
     @Log(title = "鎶ラ攢鐢宠")
     @GetMapping("/remove/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {
@@ -760,7 +766,7 @@
             throw new ServiceException("涓嬭浇澶辫触锛岀敤鎴蜂俊鎭嚭閿�", HttpStatus.NO_CONTENT);
         }
 
-        Date dt = rdInfoByItem.get(0).getCreateTime();
+        Date dt = rdInfoByItem.get(0).getApplyTime();
         SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         String date = formatter.format(dt);
         String time = date.substring(0, 10);

--
Gitblit v1.9.3