fei
2025-10-10 5e1e1b7799f57508521a5cfafc2ef392a3eda87b
archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java
@@ -282,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);
        }
@@ -326,16 +331,25 @@
        if (list.size() > 0) {
          //  throw new RuntimeException("请勿新增重复数据");
            //如果有重复数据,则根据recordId进行数据修改
         //   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("档案号不存在!");
        }
    }
}