From 25d0b36cc39f51c7b03f28f30cfc6ed5a10769d3 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期日, 12 十月 2025 17:51:46 +0800
Subject: [PATCH] 修改了大量的代码块
---
archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java | 43 +++++++++++++++++++++++++++++++++++++------
1 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java b/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java
index 7fc704d..85c14e6 100644
--- a/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java
+++ b/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java
@@ -196,11 +196,21 @@
Date date = Date.from(time.atZone(ZoneId.systemDefault()).toInstant());
archiveRecords.setCreateTime(date);
-
-
+ System.out.println(archiveRecords.getRecordId());
+ //鏍规嵁妗e彿鏌ヨ锛屾槸鍚﹀凡缁忔湁妗e彿锛屾湁鐨勮瘽锛屽氨涓嶈鎻掑叆
+ LambdaQueryWrapper<ArchiveRecords> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+ lambdaQueryWrapper.eq(!StringUtils.isEmpty(archiveRecords.getRecordId()), ArchiveRecords::getRecordId,
+ archiveRecords.getRecordId());
+ List<ArchiveRecords> lis = list(lambdaQueryWrapper);
+ if(!lis.isEmpty())
+ {
+ return 0;
+ }
archiveRecords.setRecordStatus("鏈綍鍏�");
// archiveRecords
boolean res = this.save(archiveRecords);
+
+ //0琛ㄧず澶辫触锛�1琛ㄧず鎴愬姛
if(res)
return 1;
else
@@ -272,6 +282,11 @@
for (ArchiveRecords archiveRecords : dataList) {
// physcialService.mySave(physcial);
+ archiveRecords.setRecordStatus("鏈綍鍏�");
+ LocalDateTime time = LocalDateTime.now();
+
+ Date date = Date.from(time.atZone(ZoneId.systemDefault()).toInstant());
+ archiveRecords.setCreateTime(date);
this.mySave(archiveRecords);
}
@@ -284,8 +299,15 @@
}
@Override
- public int updateArchiveById(Long id) {
- this.baseMapper.updateStatusById(id);
+ public int updateArchiveById(String status, Long id) {
+ this.baseMapper.updateStatusById(status, id);
+ return 0;
+ }
+
+ @Override
+ public int updateStatusByIds(Long[] ids) {
+ for(Long id : ids)
+ this.baseMapper.updateStatusById("褰曞叆瀹屾垚",id);
return 0;
}
@@ -309,16 +331,25 @@
if (list.size() > 0) {
// throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
//濡傛灉鏈夐噸澶嶆暟鎹紝鍒欐牴鎹畆ecordId杩涜鏁版嵁淇敼
- this.baseMapper.update(archiveRecords, lqw);
- return AjaxResult.success();
+ // if()
+
+ this.baseMapper.update(archiveRecords, lqw);
+ return AjaxResult.success();
+
+
}
else {
+ Long userid = SecurityUtils.getUserId();
+ if(userid==1) {
if (save(archiveRecords)) {
return AjaxResult.success();
} else {
return AjaxResult.error();
}
}
+ else
+ return AjaxResult.error("妗f鍙蜂笉瀛樺湪锛�");
+ }
}
}
--
Gitblit v1.9.1