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 | 64 +++++++++++++++++++++-----------
1 files changed, 42 insertions(+), 22 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 4098927..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
@@ -545,7 +545,7 @@
//璁板綍涓�涓嬶紝涓嬩竴绾х殑瀹℃壒锛屼互渚夸簬涓嬩竴绾ч��鍥炲悗锛屽彂璧疯�呮彁浜ゆ椂锛岃兘鍐嶆彁鍒板綋鍓嶅鎵瑰眰绾�
serviceFund.setBackflowlevel(FlowLevel);
- } //else {
+ } else {
CheckFlag = 2;
if (CheckFlag == 2) {
//搴斿尰闄㈣姹傚鏋滃嚭鐜伴��鍥烇紝鐩存帴閫�鍒板彂璧疯��
@@ -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());
--
Gitblit v1.9.3