From 8c215c8be0f5076e8c95daf1b2203440ca7dfcad Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期五, 23 十月 2026 13:42:50 +0800
Subject: [PATCH] 修改了报销校验
---
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java | 62 ++++++++++++++++++++----------
1 files changed, 41 insertions(+), 21 deletions(-)
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 d4ca8c4..49f934e 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
@@ -559,27 +559,25 @@
FlowLevel = 0;
}
}
-
- SysUser sysUser = sysUserService.selectUserByUserName(serviceFund.getUserno());
- //瀹℃壒鏈�氳繃锛氬崟鎹俊鎭� + 瀹℃壒浜�/瀹℃壒鏃堕棿/鎰忚锛堟剰瑙� = "瀹℃壒鏈�氳繃銆�" + 椹冲洖鎰忚锛�
- List<ConcurrentHashMap<String, Object>> contentList = FundNotifyMessageBuilder.newRows();
- FundNotifyMessageBuilder.addBillInfo(contentList, serviceFund.getApplytype(),
- serviceFund.getUsername(), serviceFund.getPretaxcost(), serviceFund.getDonorname(),
- FundNotifyMessageBuilder.billNo(serviceFund.getBh(), serviceFund.getId()));
- FundNotifyMessageBuilder.addAuditResult(contentList, loginUser.getUser().getNickName(), new Date(),
- FundNotifyMessageBuilder.opinion(FundNotifyMessageBuilder.CONCLUSION_REJECT,
- checkFundVO.getFlowcontent()));
- try {
- DingTalkReqVo dingTalkReqVo = new DingTalkReqVo();
- dingTalkReqVo.setTitle(FundNotifyMessageBuilder.TITLE);
- dingTalkReqVo.setNumber(sysUser.getPhonenumber());
- dingTalkReqVo.setContents(contentList);
- dingTalkService.sendNotification(dingTalkReqVo);
- } catch (Exception e) {
- log.error("璐圭敤---瀹℃壒鏈�氳繃閽夐拤閫氱煡澶辫触锛宖undId={}", serviceFund.getId(), e);
- }
}
-
+ SysUser sysUser = sysUserService.selectUserByUserName(serviceFund.getUserno());
+ //瀹℃壒鏈�氳繃锛氬崟鎹俊鎭� + 瀹℃壒浜�/瀹℃壒鏃堕棿/鎰忚锛堟剰瑙� = "瀹℃壒鏈�氳繃銆�" + 椹冲洖鎰忚锛�
+ List<ConcurrentHashMap<String, Object>> contentList = FundNotifyMessageBuilder.newRows();
+ FundNotifyMessageBuilder.addBillInfo(contentList, serviceFund.getApplytype(),
+ serviceFund.getUsername(), serviceFund.getPretaxcost(), serviceFund.getDonorname(),
+ FundNotifyMessageBuilder.billNo(serviceFund.getBh(), serviceFund.getId()));
+ FundNotifyMessageBuilder.addAuditResult(contentList, loginUser.getUser().getNickName(), new Date(),
+ FundNotifyMessageBuilder.opinion(checkFundVO.getFlowconclusion()+"",
+ checkFundVO.getFlowcontent()));
+ try {
+ DingTalkReqVo dingTalkReqVo = new DingTalkReqVo();
+ dingTalkReqVo.setTitle(FundNotifyMessageBuilder.TITLE);
+ dingTalkReqVo.setNumber(sysUser.getPhonenumber());
+ dingTalkReqVo.setContents(contentList);
+ dingTalkService.sendNotification(dingTalkReqVo);
+ } catch (Exception e) {
+ log.error("璐圭敤---瀹℃壒鏈�氳繃閽夐拤閫氱煡澶辫触锛宖undId={}", serviceFund.getId(), e);
+ }
serviceFund.setRecordstatus(RecordStatus);
serviceFund.setFlowlevel(FlowLevel.longValue());
// serviceFund.setBackflowlevel(serviceFund.getFlowlevel());
@@ -1585,6 +1583,28 @@
// 淇濆瓨璇︽儏鏁版嵁
for (ServiceFunddetailVO serviceFunddetailVO : serviceFunddetails) {
+ // 2026-10-15锛氶檮浠舵枃浠跺悕瑙勮寖浜屾鏍¢獙锛堜笌鍓嶇 fileNameCheck 鍚屽彛寰勶紱鍙牎楠屾湰娆″彉鏇寸殑闄勪欢锛屽巻鍙查檮浠舵斁琛岋級
+ java.util.Set<String> existingNames = new java.util.HashSet<>();
+ if (serviceFunddetailVO.getId() != null) {
+ ServiceFunddetail oldDetail = serviceFunddetailMapper.selectById(serviceFunddetailVO.getId());
+ if (oldDetail != null) {
+ existingNames.addAll(com.ruoyi.project.common.AttachmentNameValidator
+ .collectNames(oldDetail.getInvoicefiles()));
+ existingNames.addAll(com.ruoyi.project.common.AttachmentNameValidator
+ .collectNames(oldDetail.getAnnexfiles()));
+ }
+ }
+ String invoiceJson = CollectionUtils.isEmpty(serviceFunddetailVO.getInvoicefilesList())
+ ? serviceFunddetailVO.getInvoicefiles()
+ : JSON.toJSONString(serviceFunddetailVO.getInvoicefilesList());
+ String annexJson = CollectionUtils.isEmpty(serviceFunddetailVO.getAnnexfilesList())
+ ? serviceFunddetailVO.getAnnexfiles()
+ : JSON.toJSONString(serviceFunddetailVO.getAnnexfilesList());
+ String nameError = com.ruoyi.project.common.AttachmentNameValidator
+ .checkJsonListForUpdate(existingNames, invoiceJson, annexJson);
+ if (nameError != null) {
+ throw new BaseException("闄勪欢鏂囦欢鍚嶄笉绗﹀悎瑕佹眰锛屾棤娉曚繚瀛橈細" + nameError);
+ }
//鍘绘帀韬唤璇佺殑棣栧熬绌烘牸
if (StringUtils.isNotEmpty(serviceFunddetailVO.getIdcardno())) {
serviceFunddetailVO.setIdcardno(serviceFunddetailVO.getIdcardno().trim());
@@ -1854,7 +1874,7 @@
Map<String, Object> map = new HashMap<String, Object>();
map.put("userName", "opo");
map.put("password", "4126407a-9821-4874-be41-6568abd6dbe5");
- map.put("loginName", "OPO绯荤粺瀹℃壒");
+ map.put("loginName", "OPO绯荤粺");
JSONObject jsonObj = new JSONObject(map);
--
Gitblit v1.9.3