fei
17 小时以前 29ec9c2a3fd1c1e0b1695edb6275dad765137e69
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);
        }
@@ -294,15 +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);
            this.baseMapper.updateStatusById("录入完成",id);
        return 0;
    }
@@ -326,16 +331,25 @@
        if (list.size() > 0) {
          //  throw new RuntimeException("请勿新增重复数据");
            //如果有重复数据,则根据recordId进行数据修改
            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("档案号不存在!");
        }
    }
}