From 65314b14210a175bae095649584614973b3619df Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 12 八月 2025 13:48:14 +0800
Subject: [PATCH] 代码提交

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceReimbursementController.java  |  189 -----
 ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonateorgan.java                    |    6 
 ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceReimbursementService.java         |    8 
 ruoyi-admin/pom.xml                                                                             |    4 
 ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceReimbursementSharedMapper.java      |    2 
 ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java                       |    8 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceFundController.java           |  235 +------
 ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java |  497 +++++++++++++++
 ruoyi-admin/src/main/resources/application.yml                                                  |   15 
 ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml                             |   22 
 ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceProcessVO.java                      |   69 ++
 ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundflowruleService.java          |    7 
 ruoyi-project/src/main/resources/mapper/project/ServiceFundSharedMapper.xml                     |    8 
 ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java              |   12 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java               |   18 
 ruoyi-project/src/main/resources/mapper/project/ServiceReimbursementSharedMapper.xml            |    9 
 ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonationwitness.java                |   25 
 ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundService.java                  |   17 
 ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java                    |    8 
 ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java          |  699 +++++++++++++++++++---
 20 files changed, 1,329 insertions(+), 529 deletions(-)

diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index d6d37cc..4ac2af2 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -8,8 +8,8 @@
         <version>3.7.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-<!--    <packaging>war</packaging>-->
-    <packaging>jar</packaging>
+    <packaging>war</packaging>
+    <!--    <packaging>jar</packaging>-->
     <artifactId>smartor-opo</artifactId>
 
     <description>
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 bd51854..94b2a5e 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
@@ -20,7 +20,6 @@
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.project.domain.*;
 import com.ruoyi.project.domain.vo.*;
-import com.ruoyi.project.mapper.ServiceFunddetailMapper;
 import com.ruoyi.project.service.*;
 import com.ruoyi.system.service.ISysPostService;
 import com.ruoyi.system.service.ISysUserService;
@@ -60,13 +59,7 @@
     @Autowired
     private IServiceFundService serviceFundService;
     @Autowired
-    private IServiceFundSharedService fundSharedService;
-    @Autowired
-    private ServiceFunddetailMapper serviceFunddetailMapper;
-    @Autowired
     private IServiceFunddetailService serviceFunddetailService;
-    @Autowired
-    private IServiceFunddetailSharedService funddetailSharedService;
     @Autowired
     private IServiceFundflowruleService serviceFundflowruleService;
     @Autowired
@@ -97,6 +90,43 @@
         configuration = new Configuration();
         configuration.setDefaultEncoding("utf-8");
     }
+
+    /**
+     * 鑷磋繙绯荤粺娴佺▼閫�鍥�
+     *
+     * @param serviceProcessDocVO
+     * @return
+     */
+    @PostMapping("/backdocument")
+    public AjaxResult backDocument(@RequestBody ServiceProcessDocVO serviceProcessDocVO) {
+        log.info("鑷磋繙绯荤粺娴佺▼閫�鍥炲叆鍙傦細{}", serviceProcessDocVO);
+        if (serviceProcessDocVO.getBackCode() == null || StringUtils.isEmpty(serviceProcessDocVO.getApplytype())) {
+            return AjaxResult.error("鍏ヨ兘涓虹┖,璇锋鏌ュ叆鍙�!!");
+        }
+
+        serviceFundService.backDocument(serviceProcessDocVO);
+        return AjaxResult.success("閫�鍥炴垚鍔�");
+    }
+
+
+    /**
+     * 鑷磋繙绯荤粺娴佺▼閫�鍥炲鎵规棩蹇�
+     *
+     * @param serviceProcessVO
+     * @return
+     */
+    @PostMapping("/processlog")
+    public AjaxResult processlog(@RequestBody ServiceProcessVO serviceProcessVO) {
+        log.info("鑷磋繙绯荤粺娴佺▼閫�鍥炲鎵规棩蹇楀叆鍙傦細{}", serviceProcessVO);
+        if (serviceProcessVO.getBackCode() == null || StringUtils.isEmpty(serviceProcessVO.getApplytype())) {
+            return AjaxResult.error("鍏ヨ兘涓虹┖,璇锋鏌ュ叆鍙�!!");
+        }
+
+        Boolean processlog = serviceFundService.processlog(serviceProcessVO);
+        if (!processlog) return AjaxResult.error("瀹℃壒璁板綍澶辫触");
+        return AjaxResult.success("瀹℃壒璁板綍鎴愬姛");
+    }
+
 
     /**
      * 鏌ヨ璐圭敤鐢宠涓诲垪琛�
@@ -292,192 +322,13 @@
     @PostMapping("/checkfund")
     public AjaxResult checkFund(@RequestBody CheckFundVO checkFundVO) {
         log.info("serviceFundController---checkFund鐨勫叆鍙傚�糲heckFundVO :{}", checkFundVO);
-        ServiceFund serviceFund = serviceFundService.getById(checkFundVO.getFundid());
-        if (serviceFund != null) {
-            Integer TotalLevel = 0;
-            LoginUser loginUser = getLoginUser();
-            ServiceFundflowrule serviceFundflowrule = new ServiceFundflowrule();
-            serviceFundflowrule.setFundtype(2);
-            serviceFundflowrule.setApplytype(serviceFund.getApplytype());
-            serviceFundflowrule.setCheckuserno(loginUser.getUsername());
-            log.info("serviceFundController---checkFund---queryList鐨勫叆鍙傚�約erviceFundflowrule:{}", serviceFundflowrule);
-            List<ServiceFundflowrule> serviceFundflowrules = serviceFundflowruleService.queryList(serviceFundflowrule);
-
-            if (serviceFundflowrules == null || serviceFundflowrules.stream().count() == 0) {
-                return AjaxResult.error(HttpStatus.ERROR, "褰撳墠浜哄憳鏃犳璁板綍瀹℃牳鏉冮檺");
-            }
-
-            if (serviceFundflowrules.get(0).getFlowlevel() - 1 != serviceFund.getFlowlevel()) {
-                return AjaxResult.error(HttpStatus.ERROR, "褰撳墠浜哄憳涓庢璁板綍鐨勫鏍哥骇鍒笉绗�");
-            }
-
-            if (serviceFundflowrules != null && serviceFundflowrules.stream().count() > 0) {
-                TotalLevel = serviceFundflowrules.get(0).getTotallevel();
-            }
-
-            Integer CheckFlag = 0;
-            Integer RecordStatus = serviceFund.getRecordstatus();
-            Integer FlowLevel = serviceFund.getFlowlevel().intValue();
-            Integer OriginalFlowLevel = FlowLevel;
-            if (checkFundVO.getFlowconclusion() == 1) {
-                CheckFlag = 1;
-                if (TotalLevel == 0) {
-                    RecordStatus = 99;
-                } else {
-                    if (TotalLevel == FlowLevel + 1) {
-                        RecordStatus = 99;
-                    } else {
-                        RecordStatus = (FlowLevel + 1) * 2;
-                    }
-                }
-                FlowLevel = FlowLevel + 1;
-
-                if (serviceFund.getFlowlevel() == Long.valueOf(serviceFundflowrules.get(0).getFlowlevel() - 1) && serviceFund.getBackflowlevel() == 100) {
-                    log.info("璐㈠姟閫�鍥炲啀鎻愪氦锛屽嚭绾冲啀娆″鎵癸紝涔嬪悗鎻愪氦鍒拌储鍔�");
-                    //璇存槑鏄储鍔¢��鍥炲啀鎻愪氦鐨�.闇�瑕佸嚭绾冲啀鐪嬩竴閬嶏紝娌¢棶棰樹箣鍚庯紝寰�鍒嗕韩琛ㄩ噷鏂板
-//                    serviceFundService.addFundSharedInfo(serviceFund.getId());
-                    serviceFund.setFlowlevel(serviceFundflowrules.get(0).getTotallevel().longValue());
-                    serviceFund.setRecordstatus(99);
-                    serviceFund.setUploadStates(1);
-                    serviceFundService.updateById(serviceFund);
-
-                    //淇濆瓨瀹℃壒娴佺▼琛�
-                    ServiceFundflow serviceFundflow = new ServiceFundflow();
-                    SysUser user = loginUser.getUser();
-                    serviceFundflow.setFundid(serviceFund.getId());
-                    serviceFundflow.setCheckuserno(user.getUserName());
-                    serviceFundflow.setCheckusername(user.getNickName());
-                    serviceFundflow.setFundtype(2);
-                    serviceFundflow.setApplytype(serviceFund.getApplytype());
-                    serviceFundflow.setFlowconclusion(CheckFlag);
-                    serviceFundflow.setFlowcontent("閫氳繃");
-                    Boolean aBoolean = serviceFundflowService.saveData(serviceFundflow);
-                    return AjaxResult.success();
-                }
-                //璁板綍涓�涓嬶紝涓嬩竴绾х殑瀹℃壒锛屼互渚夸簬涓嬩竴绾ч��鍥炲悗锛屽彂璧疯�呮彁浜ゆ椂锛岃兘鍐嶆彁鍒板綋鍓嶅鎵瑰眰绾�
-                serviceFund.setBackflowlevel(FlowLevel);
-            } else {
-                CheckFlag = 2;
-                if (CheckFlag == 2) {
-                    //搴斿尰闄㈣姹傚鏋滃嚭鐜伴��鍥烇紝鐩存帴閫�鍒板彂璧疯��
-                    FlowLevel = 0;
-                    RecordStatus = -1;
-                    logger.info("serviceFund杩涙潵浜嗗悧锛燂紵锛燂紵锛燂紵 :{},{}", RecordStatus, FlowLevel);
-                    System.out.println("serviceFund杩涙潵浜嗗悧锛燂紵锛燂紵锛燂紵");
-                } else {
-                    RecordStatus = (FlowLevel + 1) * 2 - 1;
-                    FlowLevel = (FlowLevel - 1);
-                    if (FlowLevel < 0) {
-                        FlowLevel = 0;
-                    }
-                }
-
-                SysUser sysUser = sysUserService.selectUserByUserName(serviceFund.getUserno());
-                ArrayList<ConcurrentHashMap<String, Object>> contentList = new ArrayList<>();
-                ConcurrentHashMap map = new ConcurrentHashMap();
-                map.put("瀹℃壒浜猴細", loginUser.getUser().getUserName());
-                map.put("瀹℃壒鏃堕棿锛�", new Date());
-                map.put("鎰忚锛�", "涓嶉�氳繃");
-                if (StringUtils.isNotBlank(checkFundVO.getFlowcontent())) map.put("鎰忚锛�", checkFundVO.getFlowcontent());
-                contentList.add(map);
-                DingTalkReqVo dingTalkReqVo = new DingTalkReqVo();
-                dingTalkReqVo.setTitle("璐㈠姟绯荤粺椹冲洖淇℃伅");
-                dingTalkReqVo.setNumber(sysUser.getPhonenumber());
-                dingTalkReqVo.setContents(contentList);
-                dingTalkService.sendNotification(dingTalkReqVo);
-            }
-
-            serviceFund.setRecordstatus(RecordStatus);
-            serviceFund.setFlowlevel(FlowLevel.longValue());
-            //  serviceFund.setBackflowlevel(serviceFund.getFlowlevel());
-
-            ServiceFundflow serviceFundflow = new ServiceFundflow();
-            SysUser user = loginUser.getUser();
-            serviceFundflow.setFundid(serviceFund.getId());
-            serviceFundflow.setCheckuserno(user.getUserName());
-            serviceFundflow.setCheckusername(user.getNickName());
-            serviceFundflow.setFundtype(2);
-            serviceFundflow.setApplytype(serviceFund.getApplytype());
-            serviceFundflow.setFlowconclusion(CheckFlag);
-            if (org.apache.commons.lang.StringUtils.isNotBlank(checkFundVO.getFlowcontent())) {
-                serviceFundflow.setFlowcontent(checkFundVO.getFlowcontent());
-            } else {
-                serviceFundflow.setFlowcontent(checkFundVO.getFlowconclusion() == 1 ? "閫氳繃" : "涓嶉�氳繃");
-            }
-            serviceFundflow.setFlowlevel(OriginalFlowLevel + 1);
-
-            Boolean aBoolean = serviceFundflowService.saveData(serviceFundflow);
-            log.info("sserviceFund淇濆瓨鐨勭殑鍊兼槸-------- :{}", aBoolean);
-
-            //053瀹℃壒閫氳繃涔嬪悗锛屽氨闇�瑕佹妸鈥滃姙鍏涓讳换鈥濈殑鍚嶅瓧濉笂
-            if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("053")) {
-                serviceFund.setOfficedirector(user.getNickName());
-                serviceFund.setUploadStates(1);
-            }
-            System.out.println("serviceFund鐨勫�兼槸--------:" + serviceFund);
-            log.info("寮�濮嬫洿鏂扮殑鐨勫�兼槸--------");
-//            ServiceFund updateServiceFund = new ServiceFund();
-//            updateServiceFund.setRecordstatus(serviceFund.getRecordstatus());
-//            updateServiceFund.setFlowlevel(serviceFund.getFlowlevel());
-
-            Boolean aBoolean1 = serviceFundService.updateById(serviceFund);
-            log.info("integer鏇存柊鐨勭殑鍊兼槸-------- :{}", aBoolean1);
-            ServiceSystemmessage serviceSystemmessage = new ServiceSystemmessage();
-            serviceSystemmessage.setFundtype(2);
-            serviceSystemmessage.setApplytype(serviceFund.getApplytype());
-            serviceSystemmessage.setSenduserno(user.getUserName());
-            serviceSystemmessage.setSendusername(user.getNickName());
-            serviceSystemmessage.setReceiveuserno(serviceFund.getUserno());
-            serviceSystemmessage.setReceiveusername(serviceFund.getUsername());
-            serviceSystemmessage.setUpdateTime(new Date());
-            serviceSystemmessage.setUpdateBy(user.getNickName());
-            serviceSystemmessage.setIsread(0);
-            serviceSystemmessage.setMessagetype(1);
-            serviceSystemmessage.setRelevantno(serviceFund.getId());
-
-            if (CheckFlag == 1) {
-
-                //閫氳繃
-                if (serviceFund.getApplytype().equals("1")) {
-                    serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁�氳繃");
-                    serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勪笓瀹跺姵鍔¤垂鎹愮尞妗堜緥銆�" + serviceFund.getDonorname() + "銆戠殑璐圭敤鐢宠宸查�氳繃");
-                } else if (serviceFund.getApplytype().equals("2")) {
-                    serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁�氳繃");
-                    serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勪鸡鐞嗕笓瀹跺姵鍔¤垂鎹愮尞妗堜緥銆�" + serviceFund.getDonorname() + "銆戠殑璐圭敤鐢宠宸查�氳繃");
-                } else if (serviceFund.getApplytype().equals("3")) {
-                    serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁�氳繃");
-                    serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勫尰瀛︽垚鏈崘鐚渚嬨��" + serviceFund.getDonorname() + "銆戠殑璐圭敤鐢宠宸查�氳繃");
-                } else if (serviceFund.getApplytype().equals("4")) {
-                    serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁�氳繃");
-                    serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勫姙鍏垂鐢ㄧ敵璇峰凡閫氳繃");
-                } else if (serviceFund.getApplytype().equals("5")) {
-                    serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁�氳繃");
-                    serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勭哗鏁堢敵璇峰凡閫氳繃");
-                }
-            } else {
-                //椹冲洖
-                if (serviceFund.getApplytype().equals("1")) {
-                    serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥�");
-                    serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勪笓瀹跺姵鍔¤垂鎹愮尞妗堜緥銆�" + serviceFund.getDonorname() + "銆戠殑璐圭敤鐢宠宸茶椹冲洖锛屽師鍥�: " + checkFundVO.getFlowcontent() + "");
-                } else if (serviceFund.getApplytype().equals("2")) {
-                    serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥�");
-                    serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勪鸡鐞嗕笓瀹跺姵鍔¤垂鎹愮尞妗堜緥銆�" + serviceFund.getDonorname() + "銆戠殑璐圭敤鐢宠宸茶椹冲洖锛屽師鍥�: " + checkFundVO.getFlowcontent() + "");
-                } else if (serviceFund.getApplytype().equals("3")) {
-                    serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥�");
-                    serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勫尰瀛︽垚鏈崘鐚渚嬨��" + serviceFund.getDonorname() + "銆戠殑璐圭敤鐢宠宸茶椹冲洖锛屽師鍥�: " + checkFundVO.getFlowcontent() + "");
-                } else if (serviceFund.getApplytype().equals("4")) {
-                    serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥�");
-                    serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勫姙鍏垂鐢ㄧ敵璇峰凡椹冲洖锛屽師鍥�: " + checkFundVO.getFlowcontent() + "");
-                } else if (serviceFund.getApplytype().equals("5")) {
-                    serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥�");
-                    serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勭哗鏁堢敵璇峰凡椹冲洖锛屽師鍥�: " + checkFundVO.getFlowcontent() + "");
-                }
-            }
-            iServiceSystemmessageService.save(serviceSystemmessage);
-            return AjaxResult.success();
-        } else {
-            return AjaxResult.error(HttpStatus.NO_CONTENT, "璐圭敤缂栧彿涓嶆纭�");
+        LoginUser loginUser = getLoginUser();
+        Map<String, String> map = serviceFundService.checkFund(checkFundVO,loginUser);
+        Set<String> keys = map.keySet();
+        for (String s : keys) {
+            if (!s.equals("200")) return AjaxResult.error(map.get(s));
         }
+        return AjaxResult.success();
     }
 
 
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 482865a..10fe981 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
@@ -85,9 +85,6 @@
     @Autowired
     private ISysPostService postService;
 
-    @Autowired
-    private IServiceSystemmessageService ServiceSystemmessage;
-
     private static Configuration configuration = null;
 
     public ServiceReimbursementController() {
@@ -379,188 +376,12 @@
     @PostMapping("/checkfund")
     public AjaxResult checkFund(@RequestBody CheckFundVO checkFundVO) {
         log.info("瀹℃牳璐圭敤鐨勫叆鍙� : {}", checkFundVO);
-        ServiceReimbursement serviceReimbursement = serviceReimbursementService.getById(checkFundVO.getFundid());
-        log.info("瀹℃牳璐圭敤鐨剆erviceReimbursementService.getById杩斿弬 : {}", serviceReimbursement);
-        if (serviceReimbursement != null) {
-            Integer totalLevel = 0;
-            LoginUser loginUser = getLoginUser();
-            ServiceFundflowrule serviceFundflowrule = new ServiceFundflowrule();
-            serviceFundflowrule.setFundtype(1);
-            serviceFundflowrule.setApplytype("0");
-            serviceFundflowrule.setCheckuserno(loginUser.getUsername());
-            List<ServiceFundflowrule> serviceFundflowrules = serviceFundflowruleService.queryList(serviceFundflowrule);
-            log.info("瀹℃牳璐圭敤鐨剆erviceFundflowruleService.queryList杩斿弬 : {}", serviceFundflowrules.size());
-            if (serviceFundflowrules == null || serviceFundflowrules.stream().count() == 0) {
-                return AjaxResult.error(HttpStatus.ERROR, "褰撳墠浜哄憳鏃犳璁板綍瀹℃牳鏉冮檺");
-            }
-
-            if (serviceFundflowrules.get(0).getFlowlevel() - 1 != serviceReimbursement.getFlowlevel()) {
-                return AjaxResult.error(HttpStatus.ERROR, "褰撳墠浜哄憳涓庢璁板綍鐨勫鏍哥骇鍒笉绗�");
-            }
-
-            if (serviceFundflowrules != null && serviceFundflowrules.stream().count() > 0) {
-                totalLevel = serviceFundflowrules.get(0).getTotallevel();
-
-
-            }
-            Integer CheckFlag = 0;
-            Integer RecordStatus = serviceReimbursement.getRecordstatus();
-            Integer FlowLevel = Integer.valueOf(serviceReimbursement.getFlowlevel().toString());
-            if (Objects.isNull(serviceReimbursement.getBackflowlevel()) && !Objects.isNull(serviceReimbursement.getFlowlevel())) {
-                serviceReimbursement.setBackflowlevel(Long.valueOf(FlowLevel.toString()));
-            }
-            Integer OriginalFlowLevel = FlowLevel;
-            if (checkFundVO.getFlowconclusion() == 1) {
-                CheckFlag = 1;
-                if (totalLevel == 0) {
-                    //99 鍙栨秷
-                    RecordStatus = 99;
-                } else {
-
-                    if (totalLevel == FlowLevel + 1) {
-                        RecordStatus = 99;
-                    } else {
-                        RecordStatus = (FlowLevel + 1) * 2;
-                    }
-                }
-
-                if (serviceReimbursement.getFlowlevel() == 1 && serviceReimbursement.getBackflowlevel() == 100) {
-                    log.info("鍑哄樊琛ヨ创琚� 璐㈠姟閫�鍥炲啀鎻愪氦锛屽嚭绾冲啀娆″鎵癸紝涔嬪悗鎻愪氦鍒拌储鍔�:{}", serviceReimbursement.getId());
-                    //璇存槑鏄储鍔¢��鍥炲啀鎻愪氦鐨�.闇�瑕佸嚭绾冲啀鐪嬩竴閬嶏紝娌¢棶棰樹箣鍚庯紝寰�鍒嗕韩琛ㄩ噷鏂板
-//                    serviceReimbursementService.addSharedData(serviceReimbursement.getId());
-
-                    serviceReimbursement.setFlowlevel(serviceFundflowrules.get(0).getTotallevel().longValue());
-                    serviceReimbursement.setRecordstatus(99);
-                    serviceReimbursement.setUploadStates(1);
-                    boolean b = serviceReimbursementService.updateById(serviceReimbursement);
-                    log.info("鏄惁淇敼鎴愬姛:{}", b);
-
-                    //淇濆瓨瀹℃壒娴佺▼琛�
-                    ServiceFundflow serviceFundflow = new ServiceFundflow();
-                    SysUser user = loginUser.getUser();
-                    serviceFundflow.setFundid(serviceReimbursement.getId());
-                    serviceFundflow.setCheckuserno(user.getUserName());
-                    serviceFundflow.setCheckusername(user.getNickName());
-                    serviceFundflow.setFundtype(1);
-                    serviceFundflow.setApplytype("0");
-                    serviceFundflow.setFlowconclusion(CheckFlag);
-                    serviceFundflow.setFlowcontent("閫氳繃");
-                    serviceFundflow.setFlowlevel(OriginalFlowLevel + 1);
-                    Boolean aBoolean = serviceFundflowService.save(serviceFundflow);
-                    return AjaxResult.success();
-                }
-
-                FlowLevel = FlowLevel + 1;
-                serviceReimbursement.setBackflowlevel(Long.valueOf(FlowLevel));
-            } else {
-                CheckFlag = 2;
-
-                if (CheckFlag == 2) {
-                    //搴斿尰闄㈣姹傚鏋滃嚭鐜伴��鍥烇紝鐩存帴閫�鍒板彂璧疯��
-                    FlowLevel = 0;
-                    RecordStatus = -1;
-                } else {
-                    //涓嬮潰鏄師鏉ョ殑鍐欐硶锛屼竴绾т竴绾х殑寰�涓嬮��锛屽尰闄㈢幇鍦ㄤ笉瑕佽繖鏍锋悶浜嗭紝涓嬮潰杩欐浠g爜鍏堜繚鐣欙紝绛夊尰闄㈠洖蹇冭浆鎰忥紝鍐嶇粰鏀惧紑
-                    RecordStatus = (FlowLevel + 1) * 2 - 1;
-                    FlowLevel = (FlowLevel - 1);
-                    if (FlowLevel < 0) {
-                        FlowLevel = 0;
-                    }
-                }
-                SysUser sysUser = sysUserService.selectUserByUserName(serviceReimbursement.getUserno());
-                ArrayList<ConcurrentHashMap<String, Object>> contentList = new ArrayList<>();
-                ConcurrentHashMap map = new ConcurrentHashMap();
-                map.put("瀹℃壒浜猴細", loginUser.getUser().getUserName());
-                map.put("瀹℃壒鏃堕棿锛�", new Date());
-                map.put("鎰忚锛�", "涓嶉�氳繃");
-                if (StringUtils.isNotBlank(checkFundVO.getFlowcontent())) map.put("鎰忚锛�", checkFundVO.getFlowcontent());
-                contentList.add(map);
-                DingTalkReqVo dingTalkReqVo = new DingTalkReqVo();
-                dingTalkReqVo.setTitle("璐㈠姟绯荤粺椹冲洖淇℃伅");
-                dingTalkReqVo.setNumber(sysUser.getPhonenumber());
-                dingTalkReqVo.setContents(contentList);
-                dingTalkService.sendNotification(dingTalkReqVo);
-            }
-
-            serviceReimbursement.setRecordstatus(RecordStatus);
-            serviceReimbursement.setFlowlevel(Long.valueOf(FlowLevel.toString()));
-            ServiceFundflow serviceFundflow = new ServiceFundflow();
-            SysUser user = loginUser.getUser();
-            serviceFundflow.setFundid(serviceReimbursement.getId());
-            serviceFundflow.setCheckuserno(user.getUserName());
-            serviceFundflow.setCheckusername(user.getNickName());
-            serviceFundflow.setFundtype(1);
-            serviceFundflow.setApplytype("0");
-            serviceFundflow.setFlowconclusion(CheckFlag);
-            if (StringUtils.isNotBlank(checkFundVO.getFlowcontent())) {
-                serviceFundflow.setFlowcontent(checkFundVO.getFlowcontent());
-            } else {
-                serviceFundflow.setFlowcontent(checkFundVO.getFlowconclusion() == 1 ? "閫氳繃" : "涓嶉�氳繃");
-            }
-            serviceFundflow.setFlowlevel(OriginalFlowLevel + 1);
-            serviceFundflowService.save(serviceFundflow);
-
-            List<Integer> postids = postService.selectPostListByUserId(loginUser.getUserId());
-            log.info("postService.selectPostListByUserId : {}", postids.size());
-            if (!postids.contains(2) && !postids.contains(6) && (serviceReimbursement.getBackflowlevel() == null || serviceReimbursement.getBackflowlevel() == 0)) {
-                if (CheckFlag == 2 && OriginalFlowLevel == 1) {
-                    ServiceFundflow serviceFundflowAuto = new ServiceFundflow();
-                    serviceFundflowAuto.setFundid(serviceReimbursement.getId());
-                    serviceFundflowAuto.setCheckuserno(user.getUserName());
-                    serviceFundflowAuto.setCheckusername(user.getNickName());
-                    serviceFundflowAuto.setFundtype(1);
-                    serviceFundflowAuto.setApplytype("0");
-                    serviceFundflowAuto.setFlowconclusion(CheckFlag);
-                    serviceFundflowAuto.setFlowcontent("闈炰笓鑱屼汉鍛樹簩绾у鏍告嫆缁濆悗鐩存帴閫�鍥炲埌淇敼鐘舵��");
-                    serviceFundflowAuto.setFlowlevel(1);
-                    serviceFundflowService.save(serviceFundflowAuto);
-                    serviceReimbursement.setRecordstatus(1);
-                }
-
-            }
-            //053瀹℃壒閫氳繃涔嬪悗锛屽氨闇�瑕佹妸鈥滃姙鍏涓讳换鈥濈殑鍚嶅瓧濉笂
-            if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("053")) {
-                serviceReimbursement.setOfficedirector(user.getNickName());
-                serviceReimbursement.setUploadStates(1);
-            }
-
-            serviceReimbursementService.updateById(serviceReimbursement);
-
-            ServiceSystemmessage serviceSystemmessage = new ServiceSystemmessage();
-            serviceSystemmessage.setFundtype(1);
-            serviceSystemmessage.setApplytype("0");
-            serviceSystemmessage.setSenduserno(user.getUserName());
-            serviceSystemmessage.setSendusername(user.getNickName());
-            serviceSystemmessage.setReceiveuserno(serviceReimbursement.getUserno());
-            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()) + "鎻愪氦鐨勫樊鏃呮姤閿�鍗曠敵璇峰凡閫氳繃");
-                log.info("totalLevel鐨勫�� : {},  OriginalFlowLevel鐨勫��:{}", totalLevel, OriginalFlowLevel);
-
-                //杩欎竴鍧楁斁瀹氭椂浠诲姟閲屽仛
-//                if (totalLevel == OriginalFlowLevel + 1) {
-//                    //鎵�鏈夋暟鎹柊澧炲埌澶囦唤琛�
-//                    serviceReimbursementService.addSharedData(checkFundVO.getFundid());
-//                }
-            } else {
-                //椹冲洖
-                serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥�");
-                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceReimbursement.getCreateTime()) + "鎻愪氦鐨勫樊鏃呮姤閿�鍗曠敵璇疯椹冲洖锛屽師鍥�:" + checkFundVO.getFlowcontent() + "");
-            }
-            ServiceSystemmessage.save(serviceSystemmessage);
-
-            return AjaxResult.success();
-        } else {
-            return AjaxResult.error(HttpStatus.NO_CONTENT, "璐圭敤缂栧彿涓嶆纭�");
+        Map<String, String> map = serviceReimbursementService.checkFund(getLoginUser(), checkFundVO);
+        Set<String> keys = map.keySet();
+        for (String s : keys) {
+            if (!s.equals("200")) return AjaxResult.error(map.get(s));
         }
+        return AjaxResult.success();
     }
 
 
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
index ca1994a..f09be90 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
@@ -8,6 +8,8 @@
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.domain.model.LoginBody;
 import com.ruoyi.common.core.domain.model.LoginBodyByOpenID;
+import com.ruoyi.common.core.domain.model.LoginUser;
+import com.ruoyi.common.core.domain.model.ThirdLoginBody;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
@@ -67,6 +69,20 @@
     }
 
     /**
+     * 绗笁鏂硅幏鍙杢oken   锛氳繖閲岀殑password瀵瑰簲鐨勬槸sys_user琛ㄩ噷鐨刣ing_user_id
+     *
+     * @param thirdLoginBody
+     * @return
+     */
+    @PostMapping("/getToken")
+    public AjaxResult openidLogin(@RequestBody ThirdLoginBody thirdLoginBody) {
+        AjaxResult ajax = AjaxResult.success();
+        String token = loginService.getToken(thirdLoginBody.getUsername(), thirdLoginBody.getPassword());
+        ajax.put(Constants.TOKEN, token);
+        return ajax;
+    }
+
+    /**
      * 鐧诲綍鏂规硶
      *
      * @param loginBody 鐧诲綍淇℃伅
@@ -76,7 +92,7 @@
     @Log(title = "鐧诲綍淇℃伅", businessType = BusinessType.OTHER)
     @PostMapping("/login")
     public AjaxResult login(@RequestBody LoginBody loginBody) {
-        log.info("loginBody鐨勫叆鍙傛槸:{}",loginBody);
+        log.info("loginBody鐨勫叆鍙傛槸:{}", loginBody);
         AjaxResult ajax = AjaxResult.success();
 //        dingTalkService.deptidList(1L, 1);
         Map<String, Object> userIdMap = null;
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 2ca96de..b7a69f2 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -14,9 +14,9 @@
   # 寮�鍙戠幆澧� linux
   #  profile: /home/smartor/uploadFile
   # 鍖婚櫌鐜
-  profile: E:/OPO/WEB/Upload
+  profile: D:/OPO/WEB/Upload
   # 褰掓。璺緞
-  archived: E:/OPO/WEB/archived/
+  archived: D:/OPO/WEB/archived/
   # 鑾峰彇ip鍦板潃寮�鍏�
   addressEnabled: false
   # 楠岃瘉鐮佺被鍨� math 鏁扮粍璁$畻 char 瀛楃楠岃瘉
@@ -41,7 +41,7 @@
 logging:
   file:
     # 鏃ュ織璺緞 绀轰緥锛� Windows閰嶇疆D:/ruoyi/logs锛孡inux閰嶇疆 /home/ruoyi/logs,涓嶅~鍚岀骇鐩綍logs锛�
-    path: E:/lihu/ls/logs
+    path: D:/lihu/ls/logs
   level:
     com.ruoyi: debug
     org.springframework: warn
@@ -53,7 +53,7 @@
     # 鍥介檯鍖栬祫婧愭枃浠惰矾寰�
     basename: i18n/messages
   profiles:
-    active: druid
+    active: srm
   # 鏂囦欢涓婁紶
   servlet:
     multipart:
@@ -123,6 +123,13 @@
   # 鍖归厤閾炬帴
   urlPatterns: /system/*,/monitor/*,/tool/*
 
+# 鍗忓弸娴佺▼鍙戣捣鎺ュ彛
+xyurl: http://{{ip}}:{{port}}/seeyon/rest/bpm/process/start
+rexyurl: http://{{ip}}:{{port}}/seeyon/rest/bpm/process/restart
+
+#涓庡崗鍙嬩氦浜掔殑鏂板姛鑳藉紑鍏� 1寮�   2鍏�
+newSwitch: 2
+
 
 
 
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
index 5d75c8b..523258e 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
@@ -21,7 +21,7 @@
 
 /**
  * spring security閰嶇疆
- * 
+ *
  * @author ruoyi
  */
 @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
@@ -32,7 +32,7 @@
      */
     @Autowired
     private UserDetailsService userDetailsService;
-    
+
     /**
      * 璁よ瘉澶辫触澶勭悊绫�
      */
@@ -50,7 +50,7 @@
      */
     @Autowired
     private JwtAuthenticationTokenFilter authenticationTokenFilter;
-    
+
     /**
      * 璺ㄥ煙杩囨护鍣�
      */
@@ -103,7 +103,7 @@
                 // 杩囨护璇锋眰
                 .authorizeRequests()
                 // 瀵逛簬鐧诲綍login 娉ㄥ唽register 楠岃瘉鐮乧aptchaImage 鍏佽鍖垮悕璁块棶
-                .antMatchers("/login","/openidlogin", "/register", "/captchaImage").anonymous()
+                .antMatchers("/login","/openidlogin", "/register", "/captchaImage", "/getToken").anonymous()
                 .antMatchers(
                         HttpMethod.GET,
                         "/",
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
index 8d798f6..74b4738 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
@@ -189,6 +189,18 @@
         return ajax;
     }
 
+    public String getToken(String username, String code) {
+        SysUser sysUser = sysUserMapper.selectUserByDingUserId(code);
+        //鏌ュ嚭鏉ヤ笉瀵圭殑璇濓紝灏辫繑鍥瀗ull
+        if (!sysUser.getUserName().equals(username)) return null;
+
+        LoginUser loginUser = new LoginUser();
+        loginUser.setUserId(sysUser.getUserId());
+        loginUser.setDeptId(sysUser.getDeptId());
+        loginUser.setUser(sysUser);
+        return tokenService.createToken(loginUser);
+    }
+
     /**
      * 璁板綍鐧诲綍淇℃伅
      *
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonateorgan.java b/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonateorgan.java
index 1372af0..3b36f1b 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonateorgan.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonateorgan.java
@@ -77,7 +77,7 @@
      * 鍣ㄥ畼鑾峰彇鏃堕棿
      */
     @ApiModelProperty("鍣ㄥ畼鑾峰彇鏃堕棿")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "鍣ㄥ畼鑾峰彇鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date organgettime;
 
@@ -85,7 +85,7 @@
      * 棰勮鑾峰彇鏃堕棿
      */
     @ApiModelProperty("棰勮鑾峰彇鏃堕棿")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "棰勮鑾峰彇鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date estimatedtime;
 
@@ -135,7 +135,7 @@
      * 绉绘鏃堕棿
      */
     @ApiModelProperty("绉绘鏃堕棿")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "绉绘鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date transplanttime;
 
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonationwitness.java b/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonationwitness.java
index 6a04db8..b5934f5 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonationwitness.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonationwitness.java
@@ -60,7 +60,7 @@
      * 姝讳骸鏃堕棿
      */
     @ApiModelProperty("姝讳骸鏃堕棿")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "姝讳骸鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date deathtime;
 
@@ -95,7 +95,7 @@
      * 鎵嬫湳寮�濮嬫椂闂�
      */
     @ApiModelProperty("鎵嬫湳寮�濮嬫椂闂�")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "鎵嬫湳寮�濮嬫椂闂�", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date operationbegtime;
 
@@ -103,7 +103,7 @@
      * 鎵嬫湳缁撴潫鏃堕棿
      */
     @ApiModelProperty("鎵嬫湳缁撴潫鏃堕棿")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "鎵嬫湳缁撴潫鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date operationendtime;
 
@@ -175,7 +175,7 @@
      * 鑵逛富鍔ㄨ剦鎻掔鏃堕棿
      */
     @ApiModelProperty("鑵逛富鍔ㄨ剦鎻掔鏃堕棿")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "鑵逛富鍔ㄨ剦鎻掔鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date abdominalaortacannulatime;
 
@@ -183,7 +183,7 @@
      * 鑵逛富鍔ㄨ剦鐏屾敞鏃堕棿
      */
     @ApiModelProperty("鑵逛富鍔ㄨ剦鐏屾敞鏃堕棿")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "鑵逛富鍔ㄨ剦鐏屾敞鏃堕棿", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date abdominalaortaperfusiontime;
 
@@ -191,7 +191,7 @@
      * 闂ㄩ潤鑴夋彃绠℃椂闂�
      */
     @ApiModelProperty("闂ㄩ潤鑴夋彃绠℃椂闂�")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "闂ㄩ潤鑴夋彃绠℃椂闂�", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date portalveincannulatime;
 
@@ -199,7 +199,7 @@
      * 闂ㄩ潤鑴夌亴娉ㄦ椂闂�
      */
     @ApiModelProperty("闂ㄩ潤鑴夌亴娉ㄦ椂闂�")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "闂ㄩ潤鑴夌亴娉ㄦ椂闂�", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date portalveinperfusiontime;
 
@@ -207,7 +207,7 @@
      * 鑲哄姩鑴夋彃绠℃椂闂�
      */
     @ApiModelProperty("鑲哄姩鑴夋彃绠℃椂闂�")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "鑲哄姩鑴夋彃绠℃椂闂�", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date pulmonaryarterycannulatime;
 
@@ -215,7 +215,7 @@
      * 鑲哄姩鑴夌亴娉ㄦ椂闂�
      */
     @ApiModelProperty("鑲哄姩鑴夌亴娉ㄦ椂闂�")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "鑲哄姩鑴夌亴娉ㄦ椂闂�", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date pulmonaryarteryperfusiontime;
 
@@ -223,7 +223,7 @@
      * 涓诲姩鑴夋彃绠℃椂闂�
      */
     @ApiModelProperty("涓诲姩鑴夋彃绠℃椂闂�")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "涓诲姩鑴夋彃绠℃椂闂�", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date aortacannulatime;
 
@@ -231,7 +231,7 @@
      * 涓诲姩鑴夌亴娉ㄦ椂闂�
      */
     @ApiModelProperty("涓诲姩鑴夌亴娉ㄦ椂闂�")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @Excel(name = "涓诲姩鑴夌亴娉ㄦ椂闂�", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date aortaperfusiontime;
 
@@ -262,6 +262,7 @@
      */
     @ApiModelProperty("鍗忚皟鍛樿繘鎵嬫湳瀹ゆ椂闂�")
     @Excel(name = "鍗忚皟鍛樿繘鎵嬫湳瀹ゆ椂闂�")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date coordinatorInOperating;
 
     /**
@@ -269,6 +270,7 @@
      */
     @ApiModelProperty("鍗忚皟鍛樺嚭鎵嬫湳瀹ゆ椂闂�")
     @Excel(name = "鍗忚皟鍛樺嚭鎵嬫湳瀹ゆ椂闂�")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date coordinatorOutOperating;
 
     /**
@@ -283,6 +285,7 @@
      */
     @ApiModelProperty("鍗忚皟鍛樼瀛楁椂闂�")
     @Excel(name = "鍗忚皟鍛樼瀛楁椂闂�")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date coordinatorSignTime;
 
 }
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceProcessVO.java b/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceProcessVO.java
new file mode 100644
index 0000000..3e9e186
--- /dev/null
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceProcessVO.java
@@ -0,0 +1,69 @@
+package com.ruoyi.project.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 绗笁鏂规祦绋嬮��鍥炲叆鍙傦紙鑷磋繙鍏徃閫�鍥炵殑鍏ュ弬锛�
+ *
+ * @author ruoyi
+ * @date 2022-01-24
+ */
+@Data
+@ApiModel("绗笁鏂规祦绋嬮��鍥炲叆鍙�")
+public class ServiceProcessVO extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     * 閫�鍥炵被鍨�     0锛氬樊鏃呰垂   1涓撳鍔冲姟璐�  2浼︾悊涓撳鍔冲姟璐�  3鍖诲鎴愭湰  4鍔炲叕璐圭敤  5缁╂晥瀹℃壒
+     */
+    @ApiModelProperty("閫�鍥炵被鍨�     0锛氬樊鏃呰垂   1涓撳鍔冲姟璐�  2浼︾悊涓撳鍔冲姟璐�  3鍖诲鎴愭湰  4鍔炲叕璐圭敤  5缁╂晥瀹℃壒")
+    @Excel(name = "閫�鍥炵被鍨�     0锛氬樊鏃呰垂   1涓撳鍔冲姟璐�  2浼︾悊涓撳鍔冲姟璐�  3鍖诲鎴愭湰  4鍔炲叕璐圭敤  5缁╂晥瀹℃壒   ")
+    private String applytype;
+
+    /**
+     * 閫�鍥炵紪鍙凤紙涓婚敭锛�
+     */
+    @ApiModelProperty("閫�鍥炵紪鍙�")
+    @Excel(name = "閫�鍥炵紪鍙凤紙涓婚敭锛�")
+    private Long backCode;
+
+    /**
+     * 娴佺▼鍐呭锛屾搷浣滃啓鎰忚寤鸿
+     */
+    @ApiModelProperty("娴佺▼鍐呭锛屾搷浣滃啓鎰忚寤鸿")
+    @Excel(name = "娴佺▼鍐呭锛屾搷浣滃啓鎰忚寤鸿")
+    private String flowcontent;
+
+    /**
+     * 閫�鍥炲師鍥�
+     */
+    @ApiModelProperty("閫�娴佺▼缁撹 1锛氶�氳繃锛�2锛氶┏鍥烇紱 鍥炲師鍥� 3:瀹岀粨")
+    @Excel(name = "娴佺▼缁撹 1锛氶�氳繃锛�2锛氶┏鍥烇紱")
+    private Integer flowconclusion;
+
+    /**
+     * 瀹℃牳浜虹紪鍙�
+     */
+    @ApiModelProperty("瀹℃牳浜虹紪鍙�")
+    @Excel(name = "瀹℃牳浜虹紪鍙�")
+    private String checkuserno;
+
+    /**
+     * 瀹℃牳浜哄鍚�
+     */
+    @ApiModelProperty("瀹℃牳浜哄鍚�")
+    @Excel(name = "瀹℃牳浜哄鍚�")
+    private String checkusername;
+
+    @ApiModelProperty("鏍¢獙鏃堕棿")
+    @Excel(name = "鏍¢獙鏃堕棿")
+    private Date checkTime;
+}
+
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceReimbursementSharedMapper.java b/ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceReimbursementSharedMapper.java
index 7d3d11e..c8339c4 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceReimbursementSharedMapper.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceReimbursementSharedMapper.java
@@ -26,4 +26,6 @@
     List<ServiceReimbursementShared> getRemShareInfoByRemId(Long RemId);
 
     Boolean delResharedInfoById(Long id);
+
+    Boolean delResharedInfoByReimid(Long reimid);
 }
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundService.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundService.java
index 08604ec..d8cbf61 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundService.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundService.java
@@ -4,9 +4,11 @@
 import java.util.Map;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.project.domain.*;
 import com.ruoyi.project.domain.vo.*;
-import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
 
 /**
  * 璐圭敤鐢宠涓籗ervice鎺ュ彛
@@ -15,6 +17,15 @@
  * @date 2022-01-24
  */
 public interface IServiceFundService extends IService<ServiceFund> {
+
+    /**
+     * 鑷磋繙绯荤粺娴佺▼閫�鍥�
+     * @param serviceProcessVO
+     * @return
+     */
+    public Boolean backDocument(ServiceProcessDocVO serviceProcessVO);
+
+    public Boolean processlog(ServiceProcessVO serviceProcessVO);
 
     /**
      * 鏌ヨ璐圭敤鐢宠涓诲垪琛�
@@ -27,6 +38,8 @@
     public List<ServiceFund> queryInfoById(ServiceFund serviceFund);
 
     List<ServiceFund> getInfoByInfoId(Long infoid);
+
+    public Map<String,String> checkFund(CheckFundVO checkFundVO, LoginUser loginUser);
 
 
     Long getFundId(Long infoid);
@@ -75,4 +88,4 @@
     public Boolean updateFundTaxIdById(Long id, Long fundTaxIds);
 
 
-}
\ No newline at end of file
+}
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundflowruleService.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundflowruleService.java
index 8a80100..6431bd7 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundflowruleService.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceFundflowruleService.java
@@ -2,11 +2,14 @@
 
 import java.util.List;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.project.domain.ServiceFundflowrule;
+import com.ruoyi.project.domain.vo.CheckFundVO;
+import org.springframework.web.bind.annotation.RequestBody;
 
 /**
  * 璧勯噾瀹℃壒瑙勫垯Service鎺ュ彛
- * 
+ *
  * @author ruoyi
  * @date 2022-04-27
  */
@@ -15,7 +18,7 @@
 
     /**
      * 鏌ヨ璧勯噾瀹℃壒瑙勫垯鍒楄〃
-     * 
+     *
      * @param serviceFundflowrule 璧勯噾瀹℃壒瑙勫垯
      * @return 璧勯噾瀹℃壒瑙勫垯闆嗗悎
      */
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceReimbursementService.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceReimbursementService.java
index dc612a5..9d668f4 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceReimbursementService.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceReimbursementService.java
@@ -1,10 +1,13 @@
 package com.ruoyi.project.service;
 
 import java.util.List;
+import java.util.Map;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.project.domain.*;
 import com.ruoyi.project.domain.dto.ServiceReimbursementDto;
+import com.ruoyi.project.domain.vo.CheckFundVO;
 import com.ruoyi.project.domain.vo.SpFinancialExpensesReimbursementOut;
 
 /**
@@ -35,10 +38,9 @@
      */
     Boolean addSharedData(Long id);
 
-
     List<ServiceReimbursement> selectSearchList(ServiceReimbursementDto serviceReimbursementdto);
 
-    List<SpFinancialExpensesReimbursementOut> getListBypower(String PAUSERNO, Integer PAFUNDTYPE, String PAAPPLICANT, String PAAPPLICATIONBEGTIME, String PAAPPLICATIONENDTIME, String PADEPARTMENT, Integer CHECKFLAG, Integer APPLYTYPE,Integer CHECKSTATUS,String donorname);
+    List<SpFinancialExpensesReimbursementOut> getListBypower(String PAUSERNO, Integer PAFUNDTYPE, String PAAPPLICANT, String PAAPPLICATIONBEGTIME, String PAAPPLICATIONENDTIME, String PADEPARTMENT, Integer CHECKFLAG, Integer APPLYTYPE, Integer CHECKSTATUS, String donorname);
 
     List<ServiceReimbursement> getInfoByInfoId(Long infoid);
 
@@ -46,4 +48,6 @@
 
     List<ServiceReimbursementEo> getRDInfoByItem(ServiceReimbursementEo serviceReimbursementEo);
 
+    public Map<String, String> checkFund(LoginUser loginUser, CheckFundVO checkFundVO);
+
 }
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
index 6bd0005..2e80ce8 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
@@ -7,34 +7,44 @@
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.constant.HttpStatus;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.exception.base.BaseException;
 import com.ruoyi.common.utils.HttpClientKit;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.bean.DtoConversionUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.utils.uuid.IdUtils;
 import com.ruoyi.project.domain.*;
 import com.ruoyi.project.domain.vo.*;
 import com.ruoyi.project.mapper.*;
 import com.ruoyi.project.service.*;
+import com.ruoyi.system.mapper.SysUserMapper;
+import com.ruoyi.system.mapper.SysUserRoleMapper;
+import com.ruoyi.system.service.ISysUserService;
+import com.taobao.api.ApiException;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
-import org.apache.ibatis.annotations.Param;
 import org.apache.poi.ss.usermodel.*;
-import org.apache.poi.xssf.usermodel.XSSFColor;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.annotation.RequestBody;
 
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.InputStream;
 import java.math.BigDecimal;
+import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.stream.Collectors;
 
 /**
@@ -50,6 +60,21 @@
     ServiceFundMapper serviceFundMapper;
 
     @Autowired
+    private DingTalkService dingTalkService;
+
+    @Autowired
+    private IServiceFundflowruleService serviceFundflowruleService;
+
+    @Autowired
+    private IServiceFundflowService serviceFundflowService;
+
+    @Autowired
+    private SysUserRoleMapper sysUserRoleMapper;
+
+    @Autowired
+    SysUserMapper sysUserMapper;
+
+    @Autowired
     ServiceFunddetailMapper serviceFunddetailMapper;
 
     @Autowired
@@ -57,6 +82,21 @@
 
     @Autowired
     ServiceReimbursementMapper serviceReimbursementMapper;
+
+    @Autowired
+    ServiceReimbursementSharedMapper serviceReimbursementSharedMapper;
+
+    @Autowired
+    private IServiceFundflowService fundflowService;
+
+    @Autowired
+    private ISysUserService sysUserService;
+
+    @Autowired
+    private IServiceSystemmessageService iServiceSystemmessageService;
+
+    @Autowired
+    IServiceReimbursementService iServiceReimbursementService;
 
     @Autowired
     IServiceFundSharedService sharedService;
@@ -82,6 +122,146 @@
     @Autowired
     private VExpertfeeTotalMapper vExpertfeeTotalMapper;
 
+    @Value("${xyurl}")
+    private String xyurl;
+
+    @Value("${rexyurl}")
+    private String rexyurl;
+
+    @Value("${newSwitch}")
+    private Integer newSwitch;
+
+    @Value("${spring.profiles.active}")
+    private String active;
+
+    /**
+     * 鑷磋繙绯荤粺娴佺▼閫�鍥�
+     *
+     * @param serviceProcessVO
+     * @return
+     */
+    @Override
+    public Boolean backDocument(ServiceProcessDocVO serviceProcessVO) {
+        String applytype = serviceProcessVO.getApplytype();
+
+        if (applytype.equals("0")) {
+            //宸梾鎶ラ攢閫�鍥�
+            ServiceReimbursement serviceReimbursement = new ServiceReimbursement();
+            serviceReimbursement.setId(serviceProcessVO.getBackCode());
+            List<ServiceReimbursement> serviceReimbursementList = iServiceReimbursementService.queryList(serviceReimbursement);
+            ServiceReimbursement serviceReimbursement1 = serviceReimbursementList.get(0);
+            serviceReimbursement1.setFlowlevel(100L);
+            serviceReimbursement1.setDelFlag(0);
+            serviceReimbursement1.setUploadStates(0);
+            serviceReimbursement1.setBackflowlevel(199L);
+            serviceReimbursement1.setRecordstatus(-1);
+            iServiceReimbursementService.updateById(serviceReimbursement1);
+
+            //鍒犻櫎share鏁版嵁
+            serviceReimbursementSharedMapper.delResharedInfoByReimid(serviceReimbursement1.getId());
+
+        } else {
+            //璐圭敤鐢宠閫�鍥�
+            ServiceFund serviceFund = new ServiceFund();
+            serviceFund.setId(serviceProcessVO.getBackCode());
+            List<ServiceFund> serviceFunds = queryInfoById(serviceFund);
+            ServiceFund serviceFund1 = serviceFunds.get(0);
+            serviceFund1.setFlowlevel(100L);
+            serviceFund1.setDel_flag(0);
+            serviceFund1.setRecordstatus(-1);
+            serviceFund1.setBackflowlevel(199);
+            updateById(serviceFund1);
+
+            //鍒犻櫎share鏁版嵁
+            serviceFundSharedMapper.delfundsharedInfoById(null, serviceFund1.getId());
+
+            //杩欎釜娑堟伅鍙戦�侊紝灏变笉鍦ㄨ繖鍋氫簡锛屽湪瀹℃壒璁板綍鐨勬帴鍙i噷鍋氾紙鍗虫棩蹇楁帴鍙o級
+            //sendMeg(serviceFund1.getApplytype(), sysUser.getPhonenumber());
+        }
+
+        return true;
+    }
+
+    /**
+     * 娴佺▼瀹℃壒鏃ュ織
+     *
+     * @param serviceProcessVO
+     * @return
+     */
+    @Override
+    public Boolean processlog(ServiceProcessVO serviceProcessVO) {
+
+        String userNo = null;
+        String userName = null;
+        String phone = null;
+        String applytype = null;
+        Long flowlevel = null;
+        if (serviceProcessVO.getApplytype().equals("0")) {
+            ServiceReimbursement serviceReimbursement = new ServiceReimbursement();
+            serviceReimbursement.setId(serviceProcessVO.getBackCode());
+            List<ServiceReimbursement> serviceReimbursementList = iServiceReimbursementService.queryList(serviceReimbursement);
+            if (CollectionUtils.isEmpty(serviceReimbursementList)) {
+                log.error("serviceReimbursementList娌℃湁鏌ュ埌鏁版嵁锛歿}", serviceProcessVO.getBackCode());
+                return false;
+            }
+            //杩欏嚑涓�硷紝闇�瑕佺粰涓嬮潰鐢�;  applytype锛屼笉鑳界敤浼犺繘鏉ョ殑锛屽彧鑳借嚜宸辨煡
+            userNo = serviceReimbursementList.get(0).getUserno();
+            userName = serviceReimbursementList.get(0).getUsername();
+            phone = serviceReimbursementList.get(0).getPhone();
+            flowlevel = serviceReimbursementList.get(0).getFlowlevel();
+            applytype = "0";
+        } else {
+            ServiceFund serviceFund = new ServiceFund();
+            serviceFund.setId(serviceProcessVO.getBackCode());
+            List<ServiceFund> serviceFunds = queryInfoById(serviceFund);
+            if (CollectionUtils.isEmpty(serviceFunds)) {
+                log.error("serviceFunds娌℃湁鏌ュ埌鏁版嵁锛歿}", serviceProcessVO.getBackCode());
+                return false;
+            }
+            userNo = serviceFunds.get(0).getUserno();
+            userName = serviceFunds.get(0).getUsername();
+            phone = serviceFunds.get(0).getPhone();
+            flowlevel = serviceFunds.get(0).getFlowlevel();
+            applytype = serviceFunds.get(0).getApplytype();
+        }
+
+        //灏嗘搷浣滀繚瀛樺埌fundflow琛ㄤ腑
+        ServiceFundflow serviceFundflow = new ServiceFundflow();
+        serviceFundflow.setCreateBy("admin");
+        serviceFundflow.setCreateTime(new Date());
+        serviceFundflow.setUpdateBy("admin");
+        serviceFundflow.setUpdateTime(new Date());
+        serviceFundflow.setCheckusername(serviceProcessVO.getCheckusername());
+        serviceFundflow.setFlowcontent(serviceProcessVO.getFlowcontent());
+        serviceFundflow.setFlowconclusion(1);
+        serviceFundflow.setFundtype(2);
+        serviceFundflow.setFlowlevel(flowlevel.intValue());
+        if (serviceProcessVO.getFlowconclusion() == 3) serviceFundflow.setFlowlevel(999);
+        serviceFundflow.setApplytype(applytype);
+        serviceFundflow.setFundid(serviceProcessVO.getBackCode());
+        serviceFundflow.setCheckTime(serviceProcessVO.getCheckTime());
+        fundflowService.save(serviceFundflow);
+
+
+        SysUser sysUser = sysUserService.selectUserByUserName(userNo);
+        sendMeg(serviceProcessVO, phone);
+        //鍙戦�佷俊鎭繚瀛�
+        ServiceSystemmessage serviceSystemmessage = new ServiceSystemmessage();
+        serviceSystemmessage.setFundtype(1);
+        serviceSystemmessage.setSenduserno(sysUser.getUserName());
+        serviceSystemmessage.setSendusername(sysUser.getNickName());
+        serviceSystemmessage.setReceiveuserno(userNo);
+        serviceSystemmessage.setReceiveusername(userName);
+        serviceSystemmessage.setUpdateTime(new Date());
+        serviceSystemmessage.setUpdateBy(sysUser.getNickName());
+        serviceSystemmessage.setIsread(0);
+        serviceSystemmessage.setMessagetype(1);
+        serviceSystemmessage.setMessagetitle("璐㈠姟绯荤粺淇℃伅");
+        serviceSystemmessage.setMessagecontent(serviceProcessVO.getFlowcontent());
+        iServiceSystemmessageService.save(serviceSystemmessage);
+
+        return true;
+    }
 
     /**
      * 鏌ヨ璐圭敤鐢宠涓诲垪琛�(鍖呭惈鍒犻櫎鐨�)
@@ -153,6 +333,392 @@
         return serviceFundMapper.getInfoByInfoId(infoid);
     }
 
+    @Override
+    public Map<String, String> checkFund(CheckFundVO checkFundVO, LoginUser loginUser) {
+        ServiceFund serviceFund = getById(checkFundVO.getFundid());
+        Map<String, String> map = new HashMap<>();
+
+        if (serviceFund == null) {
+            map.put(HttpStatus.NO_CONTENT + "", "璐圭敤缂栧彿涓嶆纭�");
+            return map;
+        }
+
+        Integer TotalLevel = 0;
+        ServiceFundflowrule serviceFundflowrule = new ServiceFundflowrule();
+        serviceFundflowrule.setFundtype(2);
+        serviceFundflowrule.setApplytype(serviceFund.getApplytype());
+        serviceFundflowrule.setCheckuserno(loginUser.getUsername());
+        log.info("serviceFundController---checkFund---queryList鐨勫叆鍙傚�約erviceFundflowrule:{}", serviceFundflowrule);
+        List<ServiceFundflowrule> serviceFundflowrules = serviceFundflowruleService.queryList(serviceFundflowrule);
+
+        if (serviceFundflowrules == null || serviceFundflowrules.stream().count() == 0) {
+            map.put(HttpStatus.ERROR + "", "褰撳墠浜哄憳鏃犳璁板綍瀹℃牳鏉冮檺");
+            return map;
+        }
+
+        if (serviceFundflowrules.get(0).getFlowlevel() - 1 != serviceFund.getFlowlevel()) {
+            map.put(HttpStatus.ERROR + "", "褰撳墠浜哄憳涓庢璁板綍鐨勫鏍哥骇鍒笉绗�");
+            return map;
+        }
+
+        if (serviceFundflowrules != null && serviceFundflowrules.stream().count() > 0) {
+            TotalLevel = serviceFundflowrules.get(0).getTotallevel();
+        }
+
+        Integer CheckFlag = 0;
+        Integer RecordStatus = serviceFund.getRecordstatus();
+        Integer FlowLevel = serviceFund.getFlowlevel().intValue();
+        Integer OriginalFlowLevel = FlowLevel;
+        if (checkFundVO.getFlowconclusion() == 1) {
+            CheckFlag = 1;
+            if (TotalLevel == 0) {
+                RecordStatus = 99;
+            } else {
+                if (TotalLevel == FlowLevel + 1) {
+                    RecordStatus = 99;
+                } else {
+                    RecordStatus = (FlowLevel + 1) * 2;
+                }
+            }
+            FlowLevel = FlowLevel + 1;
+            SysUser user = loginUser.getUser();
+            if (serviceFund.getFlowlevel() == Long.valueOf(serviceFundflowrules.get(0).getFlowlevel() - 1) && serviceFund.getBackflowlevel() == 100) {
+                log.info("璐㈠姟閫�鍥炲啀鎻愪氦锛屽嚭绾冲啀娆″鎵癸紝涔嬪悗鎻愪氦鍒拌储鍔�");
+                serviceFund.setFinancechecher("瀹℃壒浜猴細" + user.getUserName() + " & 瀹℃壒鏃堕棿" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + " & 瀹℃壒缁撴灉锛氶�氳繃");
+
+                serviceFund.setFlowlevel(serviceFundflowrules.get(0).getTotallevel().longValue());
+                serviceFund.setRecordstatus(99);
+                serviceFund.setUploadStates(1);
+                updateById(serviceFund);
+
+                //鏁版嵁鍙戦��
+                Boolean aBoolean1 = null;
+                if (newSwitch == 1) {
+                    aBoolean1 = sendData(serviceFund);
+                    if (!aBoolean1) {
+                        map.put("500", "鍙戦�佸け璐�");
+                        return map;
+                    }
+                }
+                //淇濆瓨瀹℃壒娴佺▼琛�
+                ServiceFundflow serviceFundflow = new ServiceFundflow();
+                serviceFundflow.setFundid(serviceFund.getId());
+                serviceFundflow.setCheckuserno(user.getUserName());
+                serviceFundflow.setCheckusername(user.getNickName());
+                serviceFundflow.setFundtype(2);
+                serviceFundflow.setApplytype(serviceFund.getApplytype());
+                serviceFundflow.setFlowconclusion(CheckFlag);
+                serviceFundflow.setFlowcontent("閫氳繃");
+                Boolean aBoolean = serviceFundflowService.saveData(serviceFundflow);
+                map.put("200", "success");
+                return map;
+            }
+            //濡傛灉褰撳墠鐧婚檰鏄储鍔★紝鍒欒繘琛岃褰�
+            List<Integer> roleIds = sysUserRoleMapper.getUserRoleByUserId(user.getUserId());
+            if (roleIds != null && roleIds.contains(11)) {
+                //11涓鸿储鍔�
+                serviceFund.setFinancechecher("瀹℃壒浜猴細" + user.getUserName() + " & 瀹℃壒鏃堕棿" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + " & 瀹℃壒缁撴灉锛氶�氳繃");
+            }
+
+            //璁板綍涓�涓嬶紝涓嬩竴绾х殑瀹℃壒锛屼互渚夸簬涓嬩竴绾ч��鍥炲悗锛屽彂璧疯�呮彁浜ゆ椂锛岃兘鍐嶆彁鍒板綋鍓嶅鎵瑰眰绾�
+            serviceFund.setBackflowlevel(FlowLevel);
+        } else {
+            CheckFlag = 2;
+            if (CheckFlag == 2) {
+                //搴斿尰闄㈣姹傚鏋滃嚭鐜伴��鍥烇紝鐩存帴閫�鍒板彂璧疯��
+                FlowLevel = 0;
+                RecordStatus = -1;
+                log.info("serviceFund杩涙潵浜嗗悧锛燂紵锛燂紵锛燂紵 :{},{}", RecordStatus, FlowLevel);
+                System.out.println("serviceFund杩涙潵浜嗗悧锛燂紵锛燂紵锛燂紵");
+            } else {
+                RecordStatus = (FlowLevel + 1) * 2 - 1;
+                FlowLevel = (FlowLevel - 1);
+                if (FlowLevel < 0) {
+                    FlowLevel = 0;
+                }
+            }
+
+            SysUser sysUser = sysUserService.selectUserByUserName(serviceFund.getUserno());
+            ArrayList<ConcurrentHashMap<String, Object>> contentList = new ArrayList<>();
+            ConcurrentHashMap cmap = new ConcurrentHashMap();
+            cmap.put("瀹℃壒浜猴細", loginUser.getUser().getUserName());
+            cmap.put("瀹℃壒鏃堕棿锛�", new Date());
+            cmap.put("鎰忚锛�", "涓嶉�氳繃");
+            if (StringUtils.isNotBlank(checkFundVO.getFlowcontent())) cmap.put("鎰忚锛�", checkFundVO.getFlowcontent());
+            contentList.add(cmap);
+            DingTalkReqVo dingTalkReqVo = new DingTalkReqVo();
+            dingTalkReqVo.setTitle("璐㈠姟绯荤粺椹冲洖淇℃伅");
+            dingTalkReqVo.setNumber(sysUser.getPhonenumber());
+            dingTalkReqVo.setContents(contentList);
+            dingTalkService.sendNotification(dingTalkReqVo);
+        }
+
+        serviceFund.setRecordstatus(RecordStatus);
+        serviceFund.setFlowlevel(FlowLevel.longValue());
+        //  serviceFund.setBackflowlevel(serviceFund.getFlowlevel());
+
+        ServiceFundflow serviceFundflow = new ServiceFundflow();
+        SysUser user = loginUser.getUser();
+        serviceFundflow.setFundid(serviceFund.getId());
+        serviceFundflow.setCheckuserno(user.getUserName());
+        serviceFundflow.setCheckusername(user.getNickName());
+        serviceFundflow.setFundtype(2);
+        serviceFundflow.setApplytype(serviceFund.getApplytype());
+        serviceFundflow.setFlowconclusion(CheckFlag);
+        if (StringUtils.isNotBlank(checkFundVO.getFlowcontent())) {
+            serviceFundflow.setFlowcontent(checkFundVO.getFlowcontent());
+        } else {
+            serviceFundflow.setFlowcontent(checkFundVO.getFlowconclusion() == 1 ? "閫氳繃" : "涓嶉�氳繃");
+        }
+        serviceFundflow.setFlowlevel(OriginalFlowLevel + 1);
+
+        Boolean aBoolean = serviceFundflowService.saveData(serviceFundflow);
+        log.info("sserviceFund淇濆瓨鐨勭殑鍊兼槸-------- :{}", aBoolean);
+
+        //053瀹℃壒閫氳繃涔嬪悗锛屽氨闇�瑕佹妸鈥滃姙鍏涓讳换鈥濈殑鍚嶅瓧濉笂
+        if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("053")) {
+            serviceFund.setOfficedirector(user.getNickName());
+            serviceFund.setUploadStates(1);
+            //鏁版嵁鍙戦��
+            Boolean aBoolean1 = null;
+            if (newSwitch == 1) {
+                //鎼炰竴涓紑鍏筹紝鍒奖鍝嶈�佹祦绋�
+                aBoolean1 = sendData(serviceFund);
+                if (!aBoolean1) {
+                    map.put("500", "鍙戦�佸け璐�");
+                    return map;
+                }
+            }
+        }
+        System.out.println("serviceFund鐨勫�兼槸--------:" + serviceFund);
+        log.info("寮�濮嬫洿鏂扮殑鐨勫�兼槸--------");
+
+        Boolean aBoolean1 = updateById(serviceFund);
+        log.info("integer鏇存柊鐨勭殑鍊兼槸-------- :{}", aBoolean1);
+        ServiceSystemmessage serviceSystemmessage = new ServiceSystemmessage();
+        serviceSystemmessage.setFundtype(2);
+        serviceSystemmessage.setApplytype(serviceFund.getApplytype());
+        serviceSystemmessage.setSenduserno(user.getUserName());
+        serviceSystemmessage.setSendusername(user.getNickName());
+        serviceSystemmessage.setReceiveuserno(serviceFund.getUserno());
+        serviceSystemmessage.setReceiveusername(serviceFund.getUsername());
+        serviceSystemmessage.setUpdateTime(new Date());
+        serviceSystemmessage.setUpdateBy(user.getNickName());
+        serviceSystemmessage.setIsread(0);
+        serviceSystemmessage.setMessagetype(1);
+        serviceSystemmessage.setRelevantno(serviceFund.getId());
+
+        if (CheckFlag == 1) {
+            //閫氳繃
+            if (serviceFund.getApplytype().equals("1")) {
+                serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁�氳繃");
+                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勪笓瀹跺姵鍔¤垂鎹愮尞妗堜緥銆�" + serviceFund.getDonorname() + "銆戠殑璐圭敤鐢宠宸查�氳繃");
+            } else if (serviceFund.getApplytype().equals("2")) {
+                serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁�氳繃");
+                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勪鸡鐞嗕笓瀹跺姵鍔¤垂鎹愮尞妗堜緥銆�" + serviceFund.getDonorname() + "銆戠殑璐圭敤鐢宠宸查�氳繃");
+            } else if (serviceFund.getApplytype().equals("3")) {
+                serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁�氳繃");
+                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勫尰瀛︽垚鏈崘鐚渚嬨��" + serviceFund.getDonorname() + "銆戠殑璐圭敤鐢宠宸查�氳繃");
+            } else if (serviceFund.getApplytype().equals("4")) {
+                serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁�氳繃");
+                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勫姙鍏垂鐢ㄧ敵璇峰凡閫氳繃");
+            } else if (serviceFund.getApplytype().equals("5")) {
+                serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁�氳繃");
+                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勭哗鏁堢敵璇峰凡閫氳繃");
+            }
+        } else {
+            //椹冲洖
+            if (serviceFund.getApplytype().equals("1")) {
+                serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥�");
+                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勪笓瀹跺姵鍔¤垂鎹愮尞妗堜緥銆�" + serviceFund.getDonorname() + "銆戠殑璐圭敤鐢宠宸茶椹冲洖锛屽師鍥�: " + checkFundVO.getFlowcontent() + "");
+            } else if (serviceFund.getApplytype().equals("2")) {
+                serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥�");
+                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勪鸡鐞嗕笓瀹跺姵鍔¤垂鎹愮尞妗堜緥銆�" + serviceFund.getDonorname() + "銆戠殑璐圭敤鐢宠宸茶椹冲洖锛屽師鍥�: " + checkFundVO.getFlowcontent() + "");
+            } else if (serviceFund.getApplytype().equals("3")) {
+                serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥�");
+                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勫尰瀛︽垚鏈崘鐚渚嬨��" + serviceFund.getDonorname() + "銆戠殑璐圭敤鐢宠宸茶椹冲洖锛屽師鍥�: " + checkFundVO.getFlowcontent() + "");
+            } else if (serviceFund.getApplytype().equals("4")) {
+                serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥�");
+                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勫姙鍏垂鐢ㄧ敵璇峰凡椹冲洖锛屽師鍥�: " + checkFundVO.getFlowcontent() + "");
+            } else if (serviceFund.getApplytype().equals("5")) {
+                serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥�");
+                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceFund.getCreateTime()) + "鎻愪氦鐨勭哗鏁堢敵璇峰凡椹冲洖锛屽師鍥�: " + checkFundVO.getFlowcontent() + "");
+            }
+        }
+        iServiceSystemmessageService.save(serviceSystemmessage);
+        map.put("200", "success");
+        return map;
+
+
+    }
+
+    public Boolean sendData(ServiceFund serviceFund) {
+        // fund鍜宖unddetail鐨勬暟鎹幏鍙�
+        addFundSharedInfo(serviceFund.getId());
+        List<ServiceFundShared> fundShareInfos = serviceFundSharedMapper.getFundShareInfoById(serviceFund.getId());
+        if (CollectionUtils.isEmpty(fundShareInfos)) return false;
+
+        log.info("fundShareInfos鐨勬暟鎹噺涓猴細{}", fundShareInfos.size());
+        ServiceFunddetailShared serviceFunddetailShared = new ServiceFunddetailShared();
+        serviceFunddetailShared.setFundid(fundShareInfos.get(0).getId());
+        List<ServiceFunddetailShared> serviceFunddetailShareds = detailSharedService.queryList(serviceFunddetailShared);
+
+        // 鏁版嵁鐨勫皝瑁�
+        Map<String, Object> map = new HashMap<>();
+        Map<String, Object> data = new HashMap<>();
+        //搴旂敤绫诲瀷 鍥哄畾鍊�
+        map.put("appName", "collaboration");
+
+        // 涓昏〃瀛楁鏁版嵁
+        Map<String, Object> data2 = new HashMap<>();
+        data2.put("formmain_0831", getformmain_0831(fundShareInfos.get(0)));
+        // 鏄庣粏琛ㄥ瓧娈垫暟鎹紝涓庨檮浠剁殑澶勭悊
+        Map<String, List<Map<String, Object>>> map1 = formson_0832(serviceFunddetailShareds);
+        data2.put("formson_0832", map1.get("formson_0832"));
+        data2.put("thirdAttachments", map1.get("annexfilesList"));
+
+        data.put("data", data2);
+        //妯℃澘缂栧彿锛岀敱鑷磋繙鏂规彁渚涳紝璇ュ弬鏁板喅瀹氬彂璧峰崗鍚岀郴缁熶腑鍝釜娴佺▼
+        data.put("templateCode", "001");
+        //鏄惁涓哄緟鍙戯細0:鏂板缓-鍙戦�侊紱1:鏂板缓-淇濆瓨寰呭彂
+        data.put("draft", "0");
+        //鍗忓悓鏍囬鍖洪檮浠讹紝Long鍨婰ist锛屽�间负闄勪欢鐨処d銆侷d鏄檮浠舵帴鍙e搷搴旂粨鏋滀腑fileUrl瀛楁鐨勫��
+        data.put("attachments", null);
+        //鍗忓悓鍏枃鐨刬d
+        data.put("relateDoc", "col|123,456;doc|321,654");
+        //鏈缃彇妯℃澘璁剧疆鐨勬爣棰�
+        data.put("subject", "null");
+
+        map.put("data", data);
+        String strRes = null;
+        if (!active.equals("druid")) {
+            //濡傛灉鏄湰鍦扮幆澧冿紝灏变笉璋冭繖涓簡
+            if (serviceFund.getBackflowlevel() == 100L) {
+                //鍐嶆鍙戣捣
+                strRes = HttpClientKit.postOpr(rexyurl, map.toString());
+            } else {
+                //棣栨鍙戣捣
+                strRes = HttpClientKit.postOpr(xyurl, map.toString());
+
+            }
+        }
+        com.alibaba.fastjson2.JSONObject jsonObject = com.alibaba.fastjson2.JSONObject.parseObject(strRes);
+        String code = jsonObject.getJSONObject("code").toString();
+        if (!code.equals("0")) {
+            return false;
+        }
+
+        return true;
+    }
+
+    private Map<String, List<Map<String, Object>>> formson_0832(List<ServiceFunddetailShared> serviceFunddetailSharedList) {
+        Map<String, List<Map<String, Object>>> allMap = new HashMap<>();
+
+        List<Map<String, Object>> list = new ArrayList<>();
+        List<Map<String, Object>> annexfilesList = new ArrayList<>();
+        for (ServiceFunddetailShared serviceFunddetailShared : serviceFunddetailSharedList) {
+            Map<String, Object> map = new HashMap<>();
+            map.put("搴忓彿1", serviceFunddetailShared.getOrderno());
+            map.put("璐圭敤椤圭洰", serviceFunddetailShared.getItemname());
+            map.put("绋庡墠閲戦", serviceFunddetailShared.getAmount());
+            map.put("寮�鎴烽摱琛�", serviceFunddetailShared.getDepositbank());
+            map.put("鍗″彿", serviceFunddetailShared.getBankcardno());
+            map.put("鏀剁泭浜哄灞炴垨涓撳", serviceFunddetailShared.getBeneficiaryname());
+            map.put("绋庡悗閲戦", serviceFunddetailShared.getTaxamount());
+            map.put("浣滃簾鏈�缁堥噾棰�", null);
+            String fpuuid = IdUtils.simpleUUID();
+            map.put("鍙戠エ闄勪欢", fpuuid);
+            map.put("鍙戠エ璇嗗埆", null);
+            map.put("璇嗗埆浜�", null);
+            map.put("绋庨", null);
+            String qtuuid = IdUtils.simpleUUID();
+            map.put("鍏朵粬闄勪欢", qtuuid);
+            map.put("椤圭洰缂栫爜", serviceFunddetailShared.getItemcode());
+            map.put("棰勭畻椤圭洰", null);
+            map.put("璐锋柟绉戠洰", null);
+            map.put("鍊熸柟鎽樿", null);
+            map.put("璐锋柟鎽樿", null);
+            map.put("璇嗗埆澶囨敞", null);
+            map.put("璐圭敤璇存槑", null);
+            list.add(map);
+
+            //闄勪欢澶勭悊
+            String annexfiles = serviceFunddetailShared.getAnnexfiles();
+            String invoicefiles = serviceFunddetailShared.getInvoicefiles();
+
+            int i = 0;
+            if (StringUtils.isNotEmpty(annexfiles)) {
+                List<RbDetailFile> parseArray = JSON.parseArray(annexfiles, RbDetailFile.class);
+                for (RbDetailFile rbDetailFile : parseArray) {
+                    Map<String, Object> thirdAttachments = new HashMap<>();
+                    thirdAttachments.put("subReference", qtuuid);
+                    thirdAttachments.put("fileUrl", rbDetailFile.getFileid());
+                    thirdAttachments.put("sort", i++);
+                    annexfilesList.add(thirdAttachments);
+                }
+            }
+
+            if (StringUtils.isNotEmpty(invoicefiles)) {
+                List<RbDetailFile> parseArray = JSON.parseArray(invoicefiles, RbDetailFile.class);
+                for (RbDetailFile rbDetailFile : parseArray) {
+                    Map<String, Object> thirdAttachments = new HashMap<>();
+                    thirdAttachments.put("subReference", fpuuid);
+                    thirdAttachments.put("fileUrl", rbDetailFile.getFileid());
+                    thirdAttachments.put("sort", i++);
+                    annexfilesList.add(thirdAttachments);
+                }
+            }
+
+        }
+        allMap.put("formson_0832", list);
+        allMap.put("annexfilesList", annexfilesList);
+        return allMap;
+    }
+
+
+    private Map<String, Object> getformmain_0831(ServiceFundShared serviceFundShared) {
+        Map<String, Object> formmain_0831 = new HashMap<>();
+        formmain_0831.put("鎹愮尞鑰呭鍚�", serviceFundShared.getDonorname());
+        formmain_0831.put("鎶ラ攢浜哄憳", serviceFundShared.getUsername());
+        formmain_0831.put("涓氬姟鍖哄煙", serviceFundShared.getDeptmentname());
+        formmain_0831.put("缁忔墜浜�", serviceFundShared.getUsername());
+        formmain_0831.put("濉〃鏃堕棿", serviceFundShared.getApplyTime());
+        formmain_0831.put("鎶ラ攢閲戦鍚堣", serviceFundShared.getPretaxcost());
+        formmain_0831.put("涓婁紶闄勪欢", null);
+        formmain_0831.put("澶囨敞", null);
+        formmain_0831.put("璐㈠姟瀹℃壒", serviceFundShared.getFinancechecher());
+        formmain_0831.put("璐㈠姟閮ㄨ礋璐d汉瀹℃壒", serviceFundShared.getFinancedirector());
+        formmain_0831.put("鍔炲叕瀹や富浠诲鎵�", serviceFundShared.getOfficedirector());
+        formmain_0831.put("涓氬姟鍓櫌闀垮鎵�", serviceFundShared.getBusvicepresident());
+        formmain_0831.put("璐㈠姟鍓櫌闀垮鎵�", serviceFundShared.getFinvicepresident());
+        formmain_0831.put("涓績璐熻矗浜哄鎵�", serviceFundShared.getOpochecker());
+        formmain_0831.put("鏀粯鏂瑰紡", serviceFundShared.getZffs());
+        formmain_0831.put("缁勯暱", null);
+        formmain_0831.put("瀹℃壒浜哄憳", null);
+        formmain_0831.put("鏀粯鏃ユ湡", serviceFundShared.getRiqi());
+        formmain_0831.put("璇嗗埆浜�-浣滃簾", null);
+        formmain_0831.put("璐㈠姟瀹℃壒绛惧瓧", serviceFundShared.getFinancedirector());
+        formmain_0831.put("璐㈠姟閮ㄨ礋璐d汉绛惧瓧", serviceFundShared.getFinancedirector());
+        formmain_0831.put("琛ㄨ揪绫诲瀷", null);
+        formmain_0831.put("绋庡墠閲戦鍚堣", serviceFundShared.getPretaxcost());
+        formmain_0831.put("绋庨鍚堣", serviceFundShared.getPretaxcost() - serviceFundShared.getTaxedcost());
+        formmain_0831.put("琛ㄥ崟缂栧彿1", null);
+        formmain_0831.put("缂栫爜", null);
+        formmain_0831.put("CIF璐﹀閰嶇疆1", null);
+        formmain_0831.put(" 闄㈠尯", null);
+        formmain_0831.put("鏄惁鏀粯", serviceFundShared.getIsdistribute());
+        formmain_0831.put("鍑瘉鍙�", null);
+        formmain_0831.put("閾惰鍥炲崟", null);
+        formmain_0831.put("OFD", null);
+        formmain_0831.put("琛ㄥ崟闄勪欢", null);
+        formmain_0831.put("鐜伴噾娴侀噺鍒嗘瀽", null);
+        formmain_0831.put("鍑瘉绫诲埆", null);
+        formmain_0831.put("绋庡悗閲戦鍚堣", serviceFundShared.getTaxedcost());
+        formmain_0831.put("鍘嗗彶瀹℃壒璁板綍", null);
+        formmain_0831.put("琛ㄥ崟缂栧彿", serviceFundShared.getBh());
+        formmain_0831.put("鍘嗗彶瀹℃壒鍗曟煡璇�", null);
+        return formmain_0831;
+    }
 
     @Override
     public Long getFundId(Long infoid) {
@@ -192,7 +758,7 @@
             serviceFunddetailShareds.get(i).setId(null);
             //鏁版嵁鍙戦�佺粰璐㈠姟
             try {
-                uploadOAFileAndUpdateDb(serviceFunddetailShareds.get(i));
+                if (!active.equals("druid")) uploadOAFileAndUpdateDb(serviceFunddetailShareds.get(i));
             } catch (Exception e) {
                 e.printStackTrace();
                 log.error("Exception涓叆鍙傜殑ID涓猴細{},寮傚父淇℃伅涓� 锛� {}", id, e.getMessage());
@@ -964,9 +1530,7 @@
 
     int uploadOAFileAndUpdateDb(ServiceFunddetailShared remShare) throws Exception {
         //涓婁紶OA鏂囦欢
-        //String strUrl = "http://129.88.242.39:8899/seeyon/rest/token?userName=opo&password=127814f8-84e8-4304-84a5-a71573567efd&loginName=demo3";
         String strUrl = "http://129.88.242.39:8899/seeyon/rest/token";
-        //String strUrl = "http://slb.hospitalstar.com:8899/seeyon/rest/token";
         //涓婁紶鏂囦欢鎴愬姛鍚庯紝鍘绘洿鏂扮浉鍏崇殑鏁版嵁搴�
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("userName", "opo");
@@ -1046,98 +1610,6 @@
         return 0;
     }
 
-//    int uploadOAFileAndUpdateDb(ServiceFundShared remShare) {
-//        //涓婁紶OA鏂囦欢
-//        //String strUrl = "http://129.88.242.39:8899/seeyon/rest/token?userName=opo&password=127814f8-84e8-4304-84a5-a71573567efd&loginName=demo3";
-//        String strUrl = "http://129.88.242.39:8899/seeyon/rest/token";
-//        //String strUrl = "http://slb.hospitalstar.com:8899/seeyon/rest/token";
-//        //涓婁紶鏂囦欢鎴愬姛鍚庯紝鍘绘洿鏂扮浉鍏崇殑鏁版嵁搴�
-//
-//
-//        Map<String, Object> map = new HashMap<String, Object>();
-//        map.put("userName", "opo");
-//        map.put("password", "4126407a-9821-4874-be41-6568abd6dbe5");
-//        map.put("loginName", "demo3");
-//
-//        JSONObject jsonObj = new JSONObject(map);
-//
-//        System.out.println("uploadOAFileAndUpdateDb + jsonObject" + jsonObj.toString() + "\r\n" + jsonObj.toJSONString());
-//        String strRes = HttpClientKit.postOpr(strUrl, jsonObj.toString());//
-//        //String strRes = HttpClientKit.postMsg(strUrl,jsonObj);//寰楀埌杩斿洖鐨則oken?
-//
-//        JSONObject json1 = JSONObject.parseObject(strRes);
-//        strRes = json1.get("id").toString();
-//
-//        ///if(strRes.isEmpty() || "" == strRes) return -1;// 涓虹┖浠h〃澶辫触
-//
-//        //涓嬮潰闇�姹傝皟鐢ㄦ枃浠剁殑鎺ュ彛锛岃皟鐢ㄦ垚鍔熻繑鍥炲悗锛屽緱鍒癴ilename鍜宖ileid 鐢ㄨ繖浜屼釜鍊煎幓鏇存柊鏁版嵁
-//
-//        String filePath = RuoYiConfig.getUploadPath();
-//        String strMutfileUrl = remShare.getAnnexbankcard();//鍙兘瀛樺湪澶氫釜鍦板潃锛屼互,鍒嗗紑
-//
-//        String strFUrl = "http://129.88.242.39:8899/seeyon/rest/attachment?token=" + strRes;
-//        //String strFUrl = "http://slb.hospitalstar.com:8899/seeyon/rest/attachment?token="+strRes;
-//        //strFUrl = String.format(strFUrl, strRes);
-//
-//        /*File test = null;
-//        File file = new File("E:\\YYJQ\\OPO\\WEB\\Upload\\upload\\2023\\02\\17");
-//        if (file.exists() && file.isDirectory()) {
-//            // 鑾峰彇鎵�鏈夌洸鐩掓枃浠跺す
-//            File[] ones = file.listFiles();
-//            for (File one : ones) {
-//                test = one;
-//            }
-//        }*/
-//
-//        String filename = "";
-//        String fileid = "";
-//
-//        String[] urlArray = strMutfileUrl.split(",");
-//        for (int i = 0; i < urlArray.length; i++) {
-//            String strOneFileName = urlArray[i];
-//            String strTemp = strOneFileName.substring(15);
-//            String strFile = filePath + strTemp;
-//            //FileUploadUtils.getAbsoluteFile(filePath,strOneFileName);
-//            String struploadResult = "";
-//            File filetest = new File(strFile);
-//            try {
-//                struploadResult = HttpClientKit.sendPostWithFile(filetest, strFUrl);
-//            } catch (Exception e) {
-//                e.printStackTrace();
-//            }
-//
-//
-//            //String strFRes = HttpClientKit.postMsg(strFUrl,jsonFObj);
-//            if (struploadResult == null) return 0;
-//            if (struploadResult.isEmpty()) return 0;
-//
-//            JSONObject jsonR = JSONObject.parseObject(struploadResult);
-//
-//            JSONArray jsonArr = jsonR.getJSONArray("atts");
-//            for (int j = 0; j < jsonArr.size(); j++) {
-//                JSONObject jsonRet = jsonArr.getJSONObject(j);
-//                String name1 = jsonRet.get("filename").toString();
-//                String id1 = jsonRet.get("fileUrl").toString();
-//                filename += name1;
-//                fileid += id1;
-//                if (i != urlArray.length - 1) {
-//                    filename += ",";
-//                    fileid += ",";
-//                }
-//            }
-//
-//        }
-//
-//        long nId = remShare.getId();
-//        remShare.setId(nId);
-//        remShare.setFilename(filename);
-//        remShare.setFileid(fileid);
-//        boolean bRet = sharedService.updateById(remShare);
-//        if (!bRet) return -1;
-//
-//        return 0;
-//    }
-
     public long saveFund(ServiceFundVO serviceFundVO) {
         Long id = null;
         //灏嗘暟鎹繚瀛樺埌fund琛�
@@ -1201,4 +1673,37 @@
         boolean b = serviceFunddetailMapper.updateTaxTime(serviceFunddetail);
         return b;
     }
+
+
+    public void sendMeg(ServiceProcessVO serviceProcessVO, String phone) {
+        //璁板綍鎿嶄綔璁板綍
+        ServiceFundflow serviceFundflow = new ServiceFundflow();
+
+        serviceFundflow.setCreateBy(serviceProcessVO.getCheckusername());
+        serviceFundflow.setUpdateBy(serviceProcessVO.getCheckusername());
+        serviceFundflow.setCheckusername(serviceProcessVO.getCheckusername());
+        serviceFundflow.setCreateTime(new Date());
+        serviceFundflow.setUpdateTime(new Date());
+        serviceFundflow.setFlowcontent(serviceProcessVO.getFlowcontent());
+        serviceFundflow.setFlowconclusion(serviceProcessVO.getFlowconclusion());
+        if (serviceProcessVO.getApplytype() == "0") serviceFundflow.setFundtype(1);
+        if (serviceProcessVO.getApplytype() == "1") serviceFundflow.setFundtype(2);
+        serviceFundflow.setFlowlevel(100);
+        serviceFundflow.setApplytype(serviceProcessVO.getApplytype());
+        serviceFundflow.setFundid(serviceProcessVO.getBackCode());
+        fundflowService.save(serviceFundflow);
+
+        ArrayList<ConcurrentHashMap<String, Object>> contentList = new ArrayList<>();
+        ConcurrentHashMap map = new ConcurrentHashMap();
+        map.put("瀹℃壒浜猴細", serviceProcessVO.getCheckusername());
+        map.put("瀹℃壒鏃堕棿锛�", serviceProcessVO.getCheckTime());
+        map.put("鎰忚锛�", serviceProcessVO.getFlowcontent());
+        contentList.add(map);
+        DingTalkReqVo dingTalkReqVo = new DingTalkReqVo();
+        dingTalkReqVo.setTitle("璐㈠姟绯荤粺淇℃伅");
+        dingTalkReqVo.setNumber(phone);
+        dingTalkReqVo.setContents(contentList);
+        log.info("閽夐拤鍙戦�佹秷鎭�:{}", dingTalkReqVo);
+        dingTalkService.sendNotification(dingTalkReqVo);
+    }
 }
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java
index a033262..6ff7672 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java
@@ -1,36 +1,43 @@
 package com.ruoyi.project.service.impl;
 
 import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.constant.HttpStatus;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.utils.HttpClientKit;
 import com.ruoyi.common.utils.bean.DtoConversionUtils;
+import com.ruoyi.common.utils.uuid.IdUtils;
 import com.ruoyi.project.domain.*;
 import com.ruoyi.project.domain.dto.ServiceReimbursementDto;
+import com.ruoyi.project.domain.vo.CheckFundVO;
+import com.ruoyi.project.domain.vo.DingTalkReqVo;
 import com.ruoyi.project.domain.vo.SpFinancialExpensesReimbursementOut;
 import com.ruoyi.project.mapper.*;
-import com.ruoyi.project.service.IServiceReimbursementSharedService;
-import com.ruoyi.project.service.IServiceReimbursementdetailSharedService;
-import com.ruoyi.project.service.IServiceReimbursementpayeeSharedService;
+import com.ruoyi.project.service.*;
+import com.ruoyi.system.domain.SysUserRole;
+import com.ruoyi.system.mapper.SysUserRoleMapper;
+import com.ruoyi.system.service.ISysPostService;
+import com.ruoyi.system.service.ISysUserService;
+import com.sun.org.apache.bcel.internal.generic.NEW;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
-import java.util.Map;
-
 import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.project.service.IServiceReimbursementService;
 import org.springframework.transaction.annotation.Transactional;
 
 /**
@@ -66,6 +73,40 @@
 
     @Autowired
     IServiceReimbursementpayeeSharedService payeeSharedService;
+
+    @Autowired
+    IServiceFundflowruleService serviceFundflowruleService;
+
+    @Autowired
+    IServiceFundflowService serviceFundflowService;
+
+    @Autowired
+    ISysUserService sysUserService;
+
+    @Autowired
+    private DingTalkService dingTalkService;
+
+    @Autowired
+    private ISysPostService postService;
+
+    @Autowired
+    private SysUserRoleMapper sysUserRoleMapper;
+
+    @Autowired
+    private IServiceSystemmessageService serviceSystemmessageService;
+
+    @Value("${xyurl}")
+    private String xyurl;
+
+    @Value("${rexyurl}")
+    private String rexyurl;
+
+    @Value("${newSwitch}")
+    private Integer newSwitch;
+
+    @Value("${spring.profiles.active}")
+    private String active;
+
 
     /**
      * 鏌ヨ鎶ラ攢鐢宠鍒楄〃
@@ -188,7 +229,6 @@
         //灏嗙粍瑁呭ソ鐨勬暟鎹彃鍏ュ埌鍒嗕韩琛ㄤ腑
         sharedService.save(serviceReimbursementShared);
 //        //涓婁紶OA鏂囦欢
-//        uploadOAFileAndUpdateDb(serviceReimbursementShared);
         //灏唖erviceReimbursementdetail琛ㄩ噷鐨刬d璧嬪�肩粰Rdid; 灏唖erviceReimbursementShared閲岀殑ID璧嬪�肩粰RBID,骞跺皢serviceReimbursementdetailShared琛ㄩ噷鐨刬d缃┖锛岀敱鏁版嵁搴撻噸鏂扮敓鎴�
         for (int i = 0; i < details.size(); i++) {
             serviceReimbursementdetailShareds.get(i).setRdid(serviceReimbursementdetailShareds.get(i).getId());
@@ -197,7 +237,8 @@
             //涓婁紶OA鏂囦欢
             log.info("涓婁紶OA鏂囦欢鏂规硶鐨勫叆鍙�:{}", serviceReimbursementdetailShareds.get(i));
             try {
-                uploadOAFileAndUpdateDb(serviceReimbursementdetailShareds.get(i));
+                //濡傛灉鏄湰鍦扮幆澧冿紝灏变笉璋冭繖涓簡
+                if (!active.equals("druid")) uploadOAFileAndUpdateDb(serviceReimbursementdetailShareds.get(i));
             } catch (Exception e) {
                 log.error("Exception涓璻eimShare鐨勫叆鍙俰d涓猴細{}", serviceReimbursementShared.getId());
                 if (serviceReimbursementShared.getId() != null) {
@@ -261,6 +302,440 @@
         return serviceReimbursementMapper.getRDInfoByItem(serviceReimbursementEo);
     }
 
+    @Override
+    public Map<String, String> checkFund(LoginUser loginUser, CheckFundVO checkFundVO) {
+        Map<String, String> allMap = new HashMap<>();
+
+        ServiceReimbursement serviceReimbursement = getById(checkFundVO.getFundid());
+        log.info("瀹℃牳璐圭敤鐨剆erviceReimbursementService.getById杩斿弬 : {}", serviceReimbursement);
+        if (serviceReimbursement != null) {
+            Integer totalLevel = 0;
+            ServiceFundflowrule serviceFundflowrule = new ServiceFundflowrule();
+            serviceFundflowrule.setFundtype(1);
+            serviceFundflowrule.setApplytype("0");
+            serviceFundflowrule.setCheckuserno(loginUser.getUsername());
+            List<ServiceFundflowrule> serviceFundflowrules = serviceFundflowruleService.queryList(serviceFundflowrule);
+            log.info("瀹℃牳璐圭敤鐨剆erviceFundflowruleService.queryList杩斿弬 : {}", serviceFundflowrules.size());
+            if (serviceFundflowrules == null || serviceFundflowrules.stream().count() == 0) {
+                allMap.put(HttpStatus.ERROR + "", "褰撳墠浜哄憳鏃犳璁板綍瀹℃牳鏉冮檺");
+                return allMap;
+            }
+
+            if (serviceFundflowrules.get(0).getFlowlevel() - 1 != serviceReimbursement.getFlowlevel()) {
+                allMap.put(HttpStatus.ERROR + "", "褰撳墠浜哄憳涓庢璁板綍鐨勫鏍哥骇鍒笉绗�");
+                return allMap;
+            }
+
+            if (serviceFundflowrules != null && serviceFundflowrules.stream().count() > 0) {
+                totalLevel = serviceFundflowrules.get(0).getTotallevel();
+
+            }
+            Integer CheckFlag = 0;
+            Integer RecordStatus = serviceReimbursement.getRecordstatus();
+            Integer FlowLevel = Integer.valueOf(serviceReimbursement.getFlowlevel().toString());
+            if (Objects.isNull(serviceReimbursement.getBackflowlevel()) && !Objects.isNull(serviceReimbursement.getFlowlevel())) {
+                serviceReimbursement.setBackflowlevel(Long.valueOf(FlowLevel.toString()));
+            }
+            Integer OriginalFlowLevel = FlowLevel;
+            if (checkFundVO.getFlowconclusion() == 1) {
+                CheckFlag = 1;
+                if (totalLevel == 0) {
+                    //99 鍙栨秷
+                    RecordStatus = 99;
+                } else {
+
+                    if (totalLevel == FlowLevel + 1) {
+                        RecordStatus = 99;
+                    } else {
+                        RecordStatus = (FlowLevel + 1) * 2;
+                    }
+                }
+
+                SysUser user = loginUser.getUser();
+                if (serviceReimbursement.getFlowlevel() == 1 && serviceReimbursement.getBackflowlevel() == 100) {
+                    log.info("鍑哄樊琛ヨ创琚� 璐㈠姟閫�鍥炲啀鎻愪氦锛屽嚭绾冲啀娆″鎵癸紝涔嬪悗鎻愪氦鍒拌储鍔�:{}", serviceReimbursement.getId());
+                    //璇存槑鏄储鍔¢��鍥炲啀鎻愪氦鐨�.闇�瑕佸嚭绾冲啀鐪嬩竴閬嶏紝娌¢棶棰樹箣鍚庯紝寰�鍒嗕韩琛ㄩ噷鏂板
+//                    serviceReimbursementService.addSharedData(serviceReimbursement.getId());
+                    serviceReimbursement.setFinancechecher("瀹℃壒浜猴細" + user.getUserName() + " & 瀹℃壒鏃堕棿" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + " & 瀹℃壒缁撴灉锛氶�氳繃");
+                    serviceReimbursement.setFlowlevel(serviceFundflowrules.get(0).getTotallevel().longValue());
+                    serviceReimbursement.setRecordstatus(99);
+                    serviceReimbursement.setUploadStates(1);
+                    boolean b = updateById(serviceReimbursement);
+                    log.info("鏄惁淇敼鎴愬姛:{}", b);
+                    Boolean aBoolean1 = null;
+                    if (newSwitch == 1) {
+                        aBoolean1 = sendData(serviceReimbursement);
+                        if (!aBoolean1) {
+                            allMap.put("500", "鍙戦�佸け璐�");
+                            return allMap;
+                        }
+                    }
+                    //淇濆瓨瀹℃壒娴佺▼琛�
+                    ServiceFundflow serviceFundflow = new ServiceFundflow();
+                    serviceFundflow.setFundid(serviceReimbursement.getId());
+                    serviceFundflow.setCheckuserno(user.getUserName());
+                    serviceFundflow.setCheckusername(user.getNickName());
+                    serviceFundflow.setFundtype(1);
+                    serviceFundflow.setApplytype("0");
+                    serviceFundflow.setFlowconclusion(CheckFlag);
+                    serviceFundflow.setFlowcontent("閫氳繃");
+                    serviceFundflow.setFlowlevel(OriginalFlowLevel + 1);
+                    Boolean aBoolean = serviceFundflowService.save(serviceFundflow);
+                    allMap.put("200", "success");
+                    return allMap;
+                }
+
+                FlowLevel = FlowLevel + 1;
+                serviceReimbursement.setBackflowlevel(Long.valueOf(FlowLevel));
+                //濡傛灉褰撳墠鐧婚檰鏄储鍔★紝鍒�
+                List<Integer> roleIds = sysUserRoleMapper.getUserRoleByUserId(user.getUserId());
+                if (roleIds != null && roleIds.contains(11)) {
+                    //11涓鸿储鍔�
+                    serviceReimbursement.setFinancechecher("瀹℃壒浜猴細" + user.getUserName() + " & 瀹℃壒鏃堕棿" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + " & 瀹℃壒缁撴灉锛氶�氳繃");
+                }
+
+            } else {
+                CheckFlag = 2;
+
+                if (CheckFlag == 2) {
+                    //搴斿尰闄㈣姹傚鏋滃嚭鐜伴��鍥烇紝鐩存帴閫�鍒板彂璧疯��
+                    FlowLevel = 0;
+                    RecordStatus = -1;
+                } else {
+                    //涓嬮潰鏄師鏉ョ殑鍐欐硶锛屼竴绾т竴绾х殑寰�涓嬮��锛屽尰闄㈢幇鍦ㄤ笉瑕佽繖鏍锋悶浜嗭紝涓嬮潰杩欐浠g爜鍏堜繚鐣欙紝绛夊尰闄㈠洖蹇冭浆鎰忥紝鍐嶇粰鏀惧紑
+                    RecordStatus = (FlowLevel + 1) * 2 - 1;
+                    FlowLevel = (FlowLevel - 1);
+                    if (FlowLevel < 0) {
+                        FlowLevel = 0;
+                    }
+                }
+                SysUser sysUser = sysUserService.selectUserByUserName(serviceReimbursement.getUserno());
+                ArrayList<ConcurrentHashMap<String, Object>> contentList = new ArrayList<>();
+                ConcurrentHashMap map = new ConcurrentHashMap();
+                map.put("瀹℃壒浜猴細", loginUser.getUser().getUserName());
+                map.put("瀹℃壒鏃堕棿锛�", new Date());
+                map.put("鎰忚锛�", "涓嶉�氳繃");
+                if (StringUtils.isNotBlank(checkFundVO.getFlowcontent())) map.put("鎰忚锛�", checkFundVO.getFlowcontent());
+                contentList.add(map);
+                DingTalkReqVo dingTalkReqVo = new DingTalkReqVo();
+                dingTalkReqVo.setTitle("璐㈠姟绯荤粺椹冲洖淇℃伅");
+                dingTalkReqVo.setNumber(sysUser.getPhonenumber());
+                dingTalkReqVo.setContents(contentList);
+                dingTalkService.sendNotification(dingTalkReqVo);
+            }
+
+            serviceReimbursement.setRecordstatus(RecordStatus);
+            serviceReimbursement.setFlowlevel(Long.valueOf(FlowLevel.toString()));
+            ServiceFundflow serviceFundflow = new ServiceFundflow();
+            SysUser user = loginUser.getUser();
+            serviceFundflow.setFundid(serviceReimbursement.getId());
+            serviceFundflow.setCheckuserno(user.getUserName());
+            serviceFundflow.setCheckusername(user.getNickName());
+            serviceFundflow.setFundtype(1);
+            serviceFundflow.setApplytype("0");
+            serviceFundflow.setFlowconclusion(CheckFlag);
+            if (StringUtils.isNotBlank(checkFundVO.getFlowcontent())) {
+                serviceFundflow.setFlowcontent(checkFundVO.getFlowcontent());
+            } else {
+                serviceFundflow.setFlowcontent(checkFundVO.getFlowconclusion() == 1 ? "閫氳繃" : "涓嶉�氳繃");
+            }
+            serviceFundflow.setFlowlevel(OriginalFlowLevel + 1);
+            serviceFundflowService.save(serviceFundflow);
+
+            List<Integer> postids = postService.selectPostListByUserId(loginUser.getUserId());
+            log.info("postService.selectPostListByUserId : {}", postids.size());
+            if (!postids.contains(2) && !postids.contains(6) && (serviceReimbursement.getBackflowlevel() == null || serviceReimbursement.getBackflowlevel() == 0)) {
+                if (CheckFlag == 2 && OriginalFlowLevel == 1) {
+                    ServiceFundflow serviceFundflowAuto = new ServiceFundflow();
+                    serviceFundflowAuto.setFundid(serviceReimbursement.getId());
+                    serviceFundflowAuto.setCheckuserno(user.getUserName());
+                    serviceFundflowAuto.setCheckusername(user.getNickName());
+                    serviceFundflowAuto.setFundtype(1);
+                    serviceFundflowAuto.setApplytype("0");
+                    serviceFundflowAuto.setFlowconclusion(CheckFlag);
+                    serviceFundflowAuto.setFlowcontent("闈炰笓鑱屼汉鍛樹簩绾у鏍告嫆缁濆悗鐩存帴閫�鍥炲埌淇敼鐘舵��");
+                    serviceFundflowAuto.setFlowlevel(1);
+                    serviceFundflowService.save(serviceFundflowAuto);
+                    serviceReimbursement.setRecordstatus(1);
+                }
+
+            }
+            //053瀹℃壒閫氳繃涔嬪悗锛屽氨闇�瑕佹妸鈥滃姙鍏涓讳换鈥濈殑鍚嶅瓧濉笂
+            if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("053")) {
+                serviceReimbursement.setOfficedirector(user.getNickName());
+                serviceReimbursement.setUploadStates(1);
+
+                Boolean aBoolean1 = null;
+                if (newSwitch == 1) {
+                    aBoolean1 = sendData(serviceReimbursement);
+                    if (!aBoolean1) {
+                        allMap.put("500", "鍙戦�佸け璐�");
+                        return allMap;
+                    }
+                }
+            }
+
+            updateById(serviceReimbursement);
+
+            ServiceSystemmessage serviceSystemmessage = new ServiceSystemmessage();
+            serviceSystemmessage.setFundtype(1);
+            serviceSystemmessage.setApplytype("0");
+            serviceSystemmessage.setSenduserno(user.getUserName());
+            serviceSystemmessage.setSendusername(user.getNickName());
+            serviceSystemmessage.setReceiveuserno(serviceReimbursement.getUserno());
+            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()) + "鎻愪氦鐨勫樊鏃呮姤閿�鍗曠敵璇峰凡閫氳繃");
+                log.info("totalLevel鐨勫�� : {},  OriginalFlowLevel鐨勫��:{}", totalLevel, OriginalFlowLevel);
+
+            } else {
+                //椹冲洖
+                serviceSystemmessage.setMessagetitle("" + (OriginalFlowLevel + 1) + "绾у鏍搁┏鍥�");
+                serviceSystemmessage.setMessagecontent("鎮�" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(serviceReimbursement.getCreateTime()) + "鎻愪氦鐨勫樊鏃呮姤閿�鍗曠敵璇疯椹冲洖锛屽師鍥�:" + checkFundVO.getFlowcontent() + "");
+            }
+            serviceSystemmessageService.save(serviceSystemmessage);
+
+            allMap.put("200", "success");
+        } else {
+            allMap.put(HttpStatus.NO_CONTENT + "", "璐圭敤缂栧彿涓嶆纭�");
+        }
+
+
+        return allMap;
+    }
+
+
+    public Boolean sendData(ServiceReimbursement serviceReimbursement) {
+        // fund鍜宖unddetail鐨勬暟鎹幏鍙�
+        addSharedData(serviceReimbursement.getId());
+        List<ServiceReimbursementShared> serviceReimbursementSharedList = sharedService.getRemShareInfoByRemId(serviceReimbursement.getId());
+        if (org.springframework.util.CollectionUtils.isEmpty(serviceReimbursementSharedList)) return false;
+
+        log.info("serviceReimbursementSharedList鐨勬暟鎹噺涓猴細{}", serviceReimbursementSharedList.size());
+
+        //detail璇︽儏
+        ServiceReimbursementdetailShared serviceReimbursementdetailShared = new ServiceReimbursementdetailShared();
+        serviceReimbursementdetailShared.setRbid(serviceReimbursementSharedList.get(0).getId());
+        List<ServiceReimbursementdetailShared> serviceReimbursementdetailShareds = detailSharedService.queryList(serviceReimbursementdetailShared);
+
+        //payee璇︽儏
+        ServiceReimbursementpayeeShared serviceReimbursementpayeeShared = new ServiceReimbursementpayeeShared();
+        serviceReimbursementpayeeShared.setRbid(serviceReimbursementSharedList.get(0).getId());
+        List<ServiceReimbursementpayeeShared> serviceReimbursementpayeeShareds = payeeSharedService.queryList(serviceReimbursementpayeeShared);
+
+
+        // 鏁版嵁鐨勫皝瑁�
+        Map<String, Object> map = new HashMap<>();
+        Map<String, Object> data = new HashMap<>();
+        //搴旂敤绫诲瀷 鍥哄畾鍊�
+        map.put("appName", "collaboration");
+
+        // 涓昏〃瀛楁鏁版嵁
+        Map<String, Object> data2 = new HashMap<>();
+        data2.put("formmain_1209", formmain_1209(serviceReimbursementSharedList.get(0)));
+
+        // 鏄庣粏琛ㄥ瓧娈垫暟鎹紝涓庨檮浠剁殑澶勭悊
+        Map<String, List<Map<String, Object>>> map1 = formson_1210(serviceReimbursementdetailShareds);
+        data2.put("formson_1210", map1.get("formson_1210"));
+        data2.put("thirdAttachments", map1.get("annexfilesList"));
+        data2.put("formson_1211", formson_1211(serviceReimbursementpayeeShareds));
+
+        data.put("data", data2);
+        //妯℃澘缂栧彿锛岀敱鑷磋繙鏂规彁渚涳紝璇ュ弬鏁板喅瀹氬彂璧峰崗鍚岀郴缁熶腑鍝釜娴佺▼
+        data.put("templateCode", "001");
+        //鏄惁涓哄緟鍙戯細0:鏂板缓-鍙戦�侊紱1:鏂板缓-淇濆瓨寰呭彂
+        data.put("draft", "0");
+        //鍗忓悓鏍囬鍖洪檮浠讹紝Long鍨婰ist锛屽�间负闄勪欢鐨処d銆侷d鏄檮浠舵帴鍙e搷搴旂粨鏋滀腑fileUrl瀛楁鐨勫��
+        data.put("attachments", null);
+        //鍗忓悓鍏枃鐨刬d
+        data.put("relateDoc", "col|123,456;doc|321,654");
+        //鏈缃彇妯℃澘璁剧疆鐨勬爣棰�
+        data.put("subject", "null");
+
+        map.put("data", data);
+        String strRes = null;
+        if (!active.equals("druid")) {
+            //濡傛灉鏄湰鍦扮幆澧冿紝灏变笉璋冭繖涓簡
+            if (serviceReimbursement.getBackflowlevel() == 100L) {
+                strRes = HttpClientKit.postOpr(rexyurl, map.toString());
+            } else {
+                strRes = HttpClientKit.postOpr(xyurl, map.toString());
+            }
+        }
+        com.alibaba.fastjson2.JSONObject jsonObject = com.alibaba.fastjson2.JSONObject.parseObject(strRes);
+        String code = jsonObject.getJSONObject("code").toString();
+        if (!code.equals("0")) {
+            return false;
+        }
+
+        return true;
+    }
+
+    private Map<String, List<Map<String, Object>>> formson_1210(List<ServiceReimbursementdetailShared> serviceReimbursementdetailSharedList) {
+        Map<String, List<Map<String, Object>>> allMap = new HashMap<>();
+
+        List<Map<String, Object>> list = new ArrayList<>();
+        List<Map<String, Object>> annexfilesList = new ArrayList<>();
+        for (ServiceReimbursementdetailShared reimbursementdetailShared : serviceReimbursementdetailSharedList) {
+            Map<String, Object> map = new HashMap<>();
+            map.put("浜ら�氬伐鍏�", reimbursementdetailShared.getTraffictype());
+            map.put("浜ら�氳垂", reimbursementdetailShared.getTrafficexpense());
+            map.put("甯傚唴浜ら��", reimbursementdetailShared.getTraffictype2());
+            map.put("浣忓璐�", reimbursementdetailShared.getHotelexpense());
+            map.put("鏉傝垂", reimbursementdetailShared.getOtherexpense());
+            map.put("浼欓璐规姤閿�", reimbursementdetailShared.getFoodexpenses());
+            map.put("浼欓璐硅ˉ鍔�", reimbursementdetailShared.getFoodallowance());
+            map.put("鍏朵粬璐圭敤", reimbursementdetailShared.getOtherfeeamount());
+            map.put("鍏朵粬璐圭敤璇存槑", reimbursementdetailShared.getOtherfeedesc());
+            map.put("閲戦鍚堣", null);
+            map.put("鍑哄樊鏃堕棿璧�", reimbursementdetailShared.getStarttime());
+            map.put("鍑哄彂鍦扮偣", reimbursementdetailShared.getDeparture());
+            map.put("鍑哄樊鏃堕棿姝�", reimbursementdetailShared.getEndtime());
+            map.put("鍑哄樊鐩殑鍦�", reimbursementdetailShared.getDestination());
+            map.put("澶╂暟", reimbursementdetailShared.getDays());
+            map.put("瀹為檯鎶ラ攢閲戦", null);
+            map.put("璐㈠姟澶囨敞", reimbursementdetailShared.getRemark());
+            map.put("id", reimbursementdetailShared.getRdid());
+            map.put("鍑哄樊浜�", reimbursementdetailShared.getPersonname());
+            map.put("鍥炰氦閫氬伐鍏�", null);
+            map.put("浜哄憳绫诲埆", reimbursementdetailShared.getPersontype());
+            map.put("浣忓璐规爣鍑�", null);
+            map.put("浣忓璐规爣鍑嗗悎璁�", reimbursementdetailShared.getHotelexpense());
+            String fpuuid = IdUtils.simpleUUID();
+            map.put("鍙戠エ闄勪欢", fpuuid);
+            map.put("绁ㄦ嵁璇嗗埆", null);
+            map.put("璇嗗埆浜�", null);
+            map.put("搴忓彿1", null);
+            String qtuuid = IdUtils.simpleUUID();
+            map.put("鍏朵粬闄勪欢", qtuuid);
+            map.put("涓汉绁ㄥす鐢ㄦ埛", null);
+            map.put("璇嗗埆绁ㄦ嵁", null);
+
+            list.add(map);
+
+            //闄勪欢澶勭悊
+            String annexfiles = reimbursementdetailShared.getAnnexfiles();
+            String invoicefiles = reimbursementdetailShared.getInvoicefiles();
+
+            int i = 0;
+            if (StringUtils.isNotEmpty(annexfiles)) {
+                List<RbDetailFile> parseArray = JSON.parseArray(annexfiles, RbDetailFile.class);
+                for (RbDetailFile rbDetailFile : parseArray) {
+                    Map<String, Object> thirdAttachments = new HashMap<>();
+                    thirdAttachments.put("subReference", qtuuid);
+                    thirdAttachments.put("fileUrl", rbDetailFile.getFileid());
+                    thirdAttachments.put("sort", i++);
+                    annexfilesList.add(thirdAttachments);
+                }
+            }
+
+            if (StringUtils.isNotEmpty(invoicefiles)) {
+                List<RbDetailFile> parseArray = JSON.parseArray(invoicefiles, RbDetailFile.class);
+                for (RbDetailFile rbDetailFile : parseArray) {
+                    Map<String, Object> thirdAttachments = new HashMap<>();
+                    thirdAttachments.put("subReference", fpuuid);
+                    thirdAttachments.put("fileUrl", rbDetailFile.getFileid());
+                    thirdAttachments.put("sort", i++);
+                    annexfilesList.add(thirdAttachments);
+                }
+            }
+
+        }
+        allMap.put("formson_1210", list);
+        allMap.put("annexfilesList", annexfilesList);
+        return allMap;
+    }
+
+    private List<Map<String, Object>> formson_1211(List<ServiceReimbursementpayeeShared> serviceReimbursementpayeeShareds) {
+        Map<String, List<Map<String, Object>>> allMap = new HashMap<>();
+
+        List<Map<String, Object>> list = new ArrayList<>();
+        for (ServiceReimbursementpayeeShared serviceReimbursementpayeeShared : serviceReimbursementpayeeShareds) {
+            Map<String, Object> map = new HashMap<>();
+
+            map.put("鏀舵浜�", serviceReimbursementpayeeShared.getPersonname());
+            map.put("鍗″彿", serviceReimbursementpayeeShared.getBankcardno());
+            map.put("寮�鎴烽摱琛�", serviceReimbursementpayeeShared.getBankname());
+            map.put("鎵撴閲戦", serviceReimbursementpayeeShared.getAmount());
+            map.put("浜哄憳绫诲埆鎵撴", serviceReimbursementpayeeShared.getPersontype());
+            map.put("鏍哥畻椤圭洰", null);
+            map.put("棰勭畻椤圭洰", null);
+            map.put("鍊熸柟鎽樿", null);
+            map.put("璐锋柟鎽樿", null);
+            list.add(map);
+        }
+        return list;
+    }
+
+    private Map<String, Object> formmain_1209(ServiceReimbursementShared serviceReimbursementShared) {
+        Map<String, Object> formmain_1209 = new HashMap<>();
+
+        formmain_1209.put("鎶ラ攢鏃ユ湡", serviceReimbursementShared.getApplyTime());
+        formmain_1209.put("鍑哄樊浜�-浣滃簾", null);
+        formmain_1209.put("鎶ラ攢浜�", serviceReimbursementShared.getUsername());
+        formmain_1209.put("鍖哄煙缁勯暱", serviceReimbursementShared.getManagername());
+        formmain_1209.put("鍑哄樊浜嬬敱", serviceReimbursementShared.getReason());
+        formmain_1209.put("澶╂暟鍚堣", null);
+        formmain_1209.put("浜ら�氳垂鍚堣", serviceReimbursementShared.getTotalamount());
+        formmain_1209.put("甯傚唴浜ら�氬悎璁�", null);
+        formmain_1209.put("浣忓璐瑰悎璁�", null);
+        formmain_1209.put("鏉傝垂鍚堣", null);
+        formmain_1209.put("浼欓璐规姤閿�鍚堣", null);
+        formmain_1209.put("浼欓璐硅ˉ鍔╁悎璁�", null);
+        formmain_1209.put("鍏朵粬璐圭敤鍚堣", null);
+        formmain_1209.put("棰嗘閲戦澶у啓", serviceReimbursementShared.getBigstrmoney());
+        formmain_1209.put("棰嗘閲戦", serviceReimbursementShared.getTotalamount());
+        formmain_1209.put("璐㈠姟瀹℃壒", serviceReimbursementShared.getFinancechecher());
+        formmain_1209.put("璐㈠姟閮ㄨ礋璐d汉瀹℃壒", serviceReimbursementShared.getFinancedirector());
+        formmain_1209.put("鍔炲叕瀹や富浠诲鎵�", serviceReimbursementShared.getOfficedirector());
+        formmain_1209.put("澶囨敞", serviceReimbursementShared.getRemark());
+        formmain_1209.put("涓氬姟鍓櫌闀垮鎵�", serviceReimbursementShared.getBusvicepresident());
+        formmain_1209.put("璐㈠姟鍓櫌闀垮鎵�", serviceReimbursementShared.getFinvicepresident());
+        formmain_1209.put("涓績璐熻矗浜哄鎵�", serviceReimbursementShared.getOpochecker());
+        formmain_1209.put("寮�鎴烽摱琛�-浣滃簾", null);
+        formmain_1209.put("鍗″彿-浣滃簾", null);
+        formmain_1209.put("鏀粯鏂瑰紡", serviceReimbursementShared.getZffs());
+        formmain_1209.put("缁勯暱", null);
+        formmain_1209.put("瀹℃壒浜哄憳", null);
+        formmain_1209.put("鏀粯鏃ユ湡", serviceReimbursementShared.getRiqi());
+        formmain_1209.put("涓婁紶闄勪欢", null);
+        formmain_1209.put("鎵撴鍚堣", null);
+        formmain_1209.put("鍙戠エ璇嗗埆-浣滃簾", null);
+        formmain_1209.put("璇嗗埆浜�-浣滃簾", null);
+        formmain_1209.put("璐㈠姟瀹℃壒绛惧瓧", null);
+        formmain_1209.put("璐㈠姟閮ㄨ礋璐d汉瀹℃壒绛惧瓧", serviceReimbursementShared.getFinancedirector());
+        formmain_1209.put("琛ㄥ崟缂栧彿1", null);
+        formmain_1209.put("CIF璐﹀閰嶇疆1", null);
+        formmain_1209.put("闄㈠尯", null);
+        formmain_1209.put("涓氬姟鍖哄煙", null);
+        formmain_1209.put("璐锋柟绉戠洰", null);
+        formmain_1209.put("缂栫爜", null);
+        formmain_1209.put("鏄惁鏀粯", null);
+        formmain_1209.put("鍑瘉鍙�", null);
+        formmain_1209.put("閾惰鍥炲崟", null);
+        formmain_1209.put("OFD", null);
+        formmain_1209.put("琛ㄥ崟闄勪欢", null);
+        formmain_1209.put("10204", null);
+        formmain_1209.put("鐜伴噾娴侀噺鍒嗘瀽", null);
+        formmain_1209.put("鎹愮尞鑰�", serviceReimbursementShared.getDonorname());
+        formmain_1209.put("鍑瘉绫诲埆", null);
+        formmain_1209.put("鍚堣", null);
+        formmain_1209.put("瀹為檯鍚堣", null);
+        formmain_1209.put("浼欓琛ュ姪鍚堣", null);
+        formmain_1209.put("鍘嗗彶瀹℃壒璁板綍", null);
+        formmain_1209.put("琛ㄥ崟缂栧彿", serviceReimbursementShared.getBh());
+        formmain_1209.put("鍘嗗彶瀹℃壒宸ㄩ箍鏌ヨ", null);
+        return formmain_1209;
+    }
+
 
     public int uploadOAFileAndUpdateDb(ServiceReimbursementdetailShared remShare) throws Exception {
         log.info("uploadOAFileAndUpdate鏂规硶鐨勫叆鍙�:{}", remShare);
diff --git a/ruoyi-project/src/main/resources/mapper/project/ServiceFundSharedMapper.xml b/ruoyi-project/src/main/resources/mapper/project/ServiceFundSharedMapper.xml
index 7878069..7f49f63 100644
--- a/ruoyi-project/src/main/resources/mapper/project/ServiceFundSharedMapper.xml
+++ b/ruoyi-project/src/main/resources/mapper/project/ServiceFundSharedMapper.xml
@@ -122,7 +122,7 @@
                riqi,
                bh,
                checkstatus,
-               applytime,
+               apply_time,
                performancetype
         from service_fund_shared
     </sql>
@@ -130,7 +130,7 @@
     <select id="getFundShareInfoById" resultType="com.ruoyi.project.domain.ServiceFundShared"
             resultMap="ServiceFundSharedResult">
         <include refid="selectServiceFundSharedVo"/>
-        where serfunid = #{fundid}
+        where serfunid = #{fundid} and del_flag=0
     </select>
 
     <select id="selectServiceFundSharedList" parameterType="ServiceFundShared" resultMap="ServiceFundSharedResult">
@@ -193,8 +193,8 @@
         SET del_flag = 1
         WHERE
         del_flag != 1
-        <if test="fundId != null"> and ID = #{fundId}</if>
-        <if test="serfunid != null"> and serfunid = #{serfunid}</if>
+        <if test="fundId != null">and ID = #{fundId}</if>
+        <if test="serfunid != null">and serfunid = #{serfunid}</if>
 
 
     </update>
diff --git a/ruoyi-project/src/main/resources/mapper/project/ServiceReimbursementSharedMapper.xml b/ruoyi-project/src/main/resources/mapper/project/ServiceReimbursementSharedMapper.xml
index 81e4056..a8831e8 100644
--- a/ruoyi-project/src/main/resources/mapper/project/ServiceReimbursementSharedMapper.xml
+++ b/ruoyi-project/src/main/resources/mapper/project/ServiceReimbursementSharedMapper.xml
@@ -205,5 +205,12 @@
         WHERE id = #{id}
           and del_flag != 1
     </update>
+    <update id="delResharedInfoByReimid">
+        UPDATE service_reimbursement_shared
+        SET del_flag   = 1,
+            update_time = sysdate()
+        WHERE reimid = #{reimid}
+          and del_flag != 1
+    </update>
 
-</mapper>
\ No newline at end of file
+</mapper>
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java
index 2e15acb..bdc1ab4 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java
@@ -38,6 +38,14 @@
     public int countUserRoleByRoleId(Long roleId);
 
     /**
+     * 閫氳繃userId鑾峰彇鐢ㄦ埛瑙掕壊ID
+     *
+     * @param userId
+     * @return
+     */
+    public List<Integer> getUserRoleByUserId(Long userId);
+
+    /**
      * 鎵归噺鏂板鐢ㄦ埛瑙掕壊淇℃伅
      *
      * @param userRoleList 鐢ㄦ埛瑙掕壊鍒楄〃
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml
index dd72689..fb7b889 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml
@@ -12,33 +12,37 @@
 	<delete id="deleteUserRoleByUserId" parameterType="Long">
 		delete from sys_user_role where user_id=#{userId}
 	</delete>
-	
+
 	<select id="countUserRoleByRoleId" resultType="Integer">
-	    select count(1) from sys_user_role where role_id=#{roleId}  
+	    select count(1) from sys_user_role where role_id=#{roleId}
 	</select>
-	
+
+	<select id="getUserRoleByUserId" resultType="Integer">
+	    select role_id from sys_user_role where user_id=#{userId}
+	</select>
+
 	<delete id="deleteUserRole" parameterType="Long">
  		delete from sys_user_role where user_id in
  		<foreach collection="array" item="userId" open="(" separator="," close=")">
  			#{userId}
-        </foreach> 
+        </foreach>
  	</delete>
-	
+
 	<insert id="batchUserRole">
 		insert into sys_user_role(user_id, role_id) values
 		<foreach item="item" index="index" collection="list" separator=",">
 			(#{item.userId},#{item.roleId})
 		</foreach>
 	</insert>
-	
+
 	<delete id="deleteUserRoleInfo" parameterType="SysUserRole">
 		delete from sys_user_role where user_id=#{userId} and role_id=#{roleId}
 	</delete>
-	
+
 	<delete id="deleteUserRoleInfos">
 	    delete from sys_user_role where role_id=#{roleId} and user_id in
  	    <foreach collection="userIds" item="userId" open="(" separator="," close=")">
  	        #{userId}
-            </foreach> 
+            </foreach>
 	</delete>
-</mapper> 
\ No newline at end of file
+</mapper>

--
Gitblit v1.9.3