fei
10 小时以前 29ec9c2a3fd1c1e0b1695edb6275dad765137e69
修改了大量的代码块
11个文件已修改
86 ■■■■■ 已修改文件
archiveManager/src/main/java/com/ruoyi/domain/Archiverecordstouser.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/domain/vo/AnalysisResult.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/domain/vo/RecordToUserCount.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/mapper/ArchiveRecordsMapper.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/mapper/ArchiverecordstouserMapper.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/service/IArchiveRecordsService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/service/IArchiverecordstouserService.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/service/impl/ArchiverecordstouserServiceImpl.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiverecordstouserController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
archiveManager/src/main/java/com/ruoyi/domain/Archiverecordstouser.java
@@ -26,7 +26,7 @@
    /** 档案目录id
 */
    @Excel(name = "档案目录id ")
    private String archiveRecordsId;
    private Long archiveRecordsId;
    /** 用户id */
    @Excel(name = "用户id")
@@ -72,12 +72,12 @@
        return id;
    }
    public void setArchiveRecordsId(String archiveRecordsId)
    public void setArchiveRecordsId(Long archiveRecordsId)
    {
        this.archiveRecordsId = archiveRecordsId;
    }
    public String getArchiveRecordsId()
    public Long getArchiveRecordsId()
    {
        return archiveRecordsId;
    }
archiveManager/src/main/java/com/ruoyi/domain/vo/AnalysisResult.java
@@ -11,8 +11,14 @@
    private Long cnt ;
    @Excel(name = "未完成案卷数")
    private Long unfinished;
    @Excel(name = "未上传附件")
    private Long unwf;
    @Excel(name = "待修改")
    private Long dxg;
    @Excel(name = "完成案卷数")
    private Long finished;
archiveManager/src/main/java/com/ruoyi/domain/vo/RecordToUserCount.java
@@ -12,6 +12,10 @@
    private Long cnt;
    @Excel(name = "完成案卷数")
    private Long swlr;
    @Excel(name = "未上传附件")
    private Long wlrf;
    @Excel(name = "待修改")
    private Long dxg;
    @Excel(name = "未完成案卷数")
    private Long ylr; 
}
archiveManager/src/main/java/com/ruoyi/mapper/ArchiveRecordsMapper.java
@@ -20,7 +20,7 @@
    @Select({
            "<script>",
            "SELECT distinct c.*,a.archive_records_id, if(a.user_id=#{userId}, TRUE, FALSE) as tst,b.user_id FROM archiverecordstouser a inner join sys_user b ON a.user_id = b.user_id right join archive_records c on c.record_id=a.archive_records_id ${ew.customSqlSegment} ",
            "SELECT distinct c.*,a.archive_records_id, if(a.user_id=#{userId}, TRUE, FALSE) as tst,b.user_id FROM archiverecordstouser a inner join sys_user b ON a.user_id = b.user_id right join archive_records c on c.id=a.archive_records_id ${ew.customSqlSegment} ",
            "<if test= \"userId !=1 \">",
            "order by tst desc",
            "</if>",
@@ -38,13 +38,16 @@
    ArchiveInfoVo findByRecordId(@Param("id") Long id);
    @Select("SELECT every_project_name, count(*) as cnt, (select count(*) from archive_records as ac where ac.every_project_name=ar.every_project_name and record_status='未录入') as unfinished,\n" +
            "(select count(*) from archive_records as ac where ac.every_project_name=ar.every_project_name and record_status='录入完成') as finished \n" +
            " from archive_records as ar GROUP BY every_project_name")
            "(select count(*) from archive_records as ac where ac.every_project_name=ar.every_project_name and record_status='未上传附件') as unwf,\n" +
            "(select count(*) from archive_records as ac where ac.every_project_name=ar.every_project_name and record_status='待修改') as dxg,\n" +
            "            (select count(*) from archive_records as ac where ac.every_project_name=ar.every_project_name and record_status='录入完成') as finished\n" +
            "             from archive_records as ar GROUP BY every_project_name\n" +
            "  ")
    List<AnalysisResult> statisticAyasis();
    @Select("update archive_records set record_status='录入完成' where id=#{id}")
    public void updateStatusById(@Param("id")Long id);
    @Select("update archive_records set record_status=#{status} where id=#{id}")
    public void updateStatusById(@Param("status") String status, @Param("id")Long id);
    @Select("select ROW_NUMBER() OVER (ORDER BY record_id) AS num, filing_number, concat_ws(\" \", inquiry_number,record_id) as inqrid, case_title, public_attribute, (select count(*) as cnt from document_materials where record_id=ar.id) as cnt, remarks from archive_records as ar \n" +
            "${ew.customSqlSegment}")
archiveManager/src/main/java/com/ruoyi/mapper/ArchiverecordstouserMapper.java
@@ -21,9 +21,14 @@
@Mapper
public interface ArchiverecordstouserMapper extends BaseMapper<Archiverecordstouser> {
    @Select("select ad.user_id, user_name, count(*) as cnt, (select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.record_id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" +
            "record_status='未录入') as swlr,(select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.record_id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" +
            "record_status='录入完成') as ylr from archiverecordstouser as ad, sys_user as sy,archive_records as ard where ad.user_id=sy.user_id and ard.record_id=ad.archive_records_id  ${ew.customSqlSegment} group by user_id, user_name")
    @Select("select ad.user_id, user_name, count(*) as cnt, (select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" +
            "            record_status='未录入') as swlr,\n" +
            "            (select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" +
            "            record_status='未上传附件') as wlrf,\n" +
            "             (select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" +
            "            record_status='待修改') as dxg,\n" +
            "            (select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" +
            "            record_status='录入完成') as ylr from archiverecordstouser as ad, sys_user as sy,archive_records as ard where ad.user_id=sy.user_id and ard.id=ad.archive_records_id ${ew.customSqlSegment} group by user_id, user_name")
    Page<RecordToUserCount> selectRecordToUserPage(Page<RecordToUserCount> page,  @Param("ew") LambdaQueryWrapper<RecordToUserCount> queryWrapper);
archiveManager/src/main/java/com/ruoyi/service/IArchiveRecordsService.java
@@ -84,7 +84,7 @@
    List<AnalysisResult> statisticAya();
    public int updateArchiveById(Long id);
    public int updateArchiveById(String status, Long id);
    public int updateStatusByIds(Long [] ids);
    public List<ArchiveRecordSmall> findByIds(ArchiveRecords archiveRecords);
archiveManager/src/main/java/com/ruoyi/service/IArchiverecordstouserService.java
@@ -15,7 +15,7 @@
 */
public interface IArchiverecordstouserService
{
    public int insertRecordToUsers(String recordId, Long[] userIds);
    public int insertRecordToUsers(Long recordId, Long[] userIds);
    AjaxResult selectDataList(Archiverecordstouser archiverecordstouser, Integer pageNum, Integer pageSize);
    /**
@@ -28,7 +28,7 @@
    public boolean selectArchiveRecordUsers(String recordId);
    public boolean selectArchiveRecordUsers(Long recordId);
    /**
     * 查询【档案分配】列表
     * 
@@ -71,10 +71,10 @@
    public int deleteArchiverecordstouserByRecordId(String recordId, Long userId);
    public int deleteArchiverecordstouserByRecordId(Long recordId, Long userId);
    public int queryArchiverecordstouserByRecordId(String recordId, Long userId);
    public int queryArchiverecordstouserByRecordId(Long recordId, Long userId);
    public AjaxResult countStatistic(String username, int pageNum, int pageSize);
archiveManager/src/main/java/com/ruoyi/service/impl/ArchiveRecordsServiceImpl.java
@@ -299,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;
    }
archiveManager/src/main/java/com/ruoyi/service/impl/ArchiverecordstouserServiceImpl.java
@@ -40,7 +40,7 @@
  private ISysUserService iSysUserService;
    private LambdaQueryWrapper<Archiverecordstouser> buildCondition(Archiverecordstouser archiverecordstouser) {
        LambdaQueryWrapper<Archiverecordstouser> lqw = new LambdaQueryWrapper<>();
        lqw.eq(!StringUtils.isEmpty(archiverecordstouser.getArchiveRecordsId()),Archiverecordstouser::getArchiveRecordsId, archiverecordstouser.getArchiveRecordsId());
        lqw.eq(archiverecordstouser.getArchiveRecordsId()!=null,Archiverecordstouser::getArchiveRecordsId, archiverecordstouser.getArchiveRecordsId());
        //保存相关用户的userId
        List<Long> arr = new ArrayList<>();
@@ -62,7 +62,7 @@
    @Override
    public int insertRecordToUsers(String recordId, Long[] userIds) {
    public int insertRecordToUsers(Long recordId, Long[] userIds) {
        // 新增用户与案卷记录
        List<Archiverecordstouser> list = new ArrayList<Archiverecordstouser>();
        for (Long userId : userIds)
@@ -121,9 +121,9 @@
    }
    @Override
    public boolean selectArchiveRecordUsers(String recordId) {
    public boolean selectArchiveRecordUsers(Long recordId) {
        LambdaQueryWrapper<Archiverecordstouser> lqw = new LambdaQueryWrapper<>();
        lqw.eq(!StringUtils.isEmpty(recordId),Archiverecordstouser::getArchiveRecordsId, recordId);
        lqw.eq(recordId!=null,Archiverecordstouser::getArchiveRecordsId, recordId);
        List<Archiverecordstouser> lis = list(lqw);
        return !lis.isEmpty();
    }
@@ -190,10 +190,10 @@
    }
    @Override
    public int deleteArchiverecordstouserByRecordId(String recordId, Long userId) {
    public int deleteArchiverecordstouserByRecordId(Long recordId, Long userId) {
        LambdaQueryWrapper<Archiverecordstouser> lqw = new LambdaQueryWrapper<>();
        lqw.eq(!StringUtils.isEmpty(recordId), Archiverecordstouser::getArchiveRecordsId, recordId)
        lqw.eq(recordId!=null, Archiverecordstouser::getArchiveRecordsId, recordId)
                .eq(userId!=null, Archiverecordstouser::getUserId, userId);
        if(this.remove(lqw))
            return 1;
@@ -202,9 +202,9 @@
    }
    @Override
    public int queryArchiverecordstouserByRecordId(String recordId, Long userId) {
    public int queryArchiverecordstouserByRecordId(Long recordId, Long userId) {
        LambdaQueryWrapper<Archiverecordstouser> lqw = new LambdaQueryWrapper<>();
        lqw.eq(!StringUtils.isEmpty(recordId), Archiverecordstouser::getArchiveRecordsId, recordId)
        lqw.eq(recordId!=null, Archiverecordstouser::getArchiveRecordsId, recordId)
                .eq(userId!=null, Archiverecordstouser::getUserId, userId);
        List<Archiverecordstouser> lis = list(lqw);
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java
@@ -178,10 +178,10 @@
    @PreAuthorize("@ss.hasPermi('system:records:edit')")
    @Log(title = "修改状态", businessType = BusinessType.IMPORT)
    @GetMapping(value = "/updateStatusById/{id}")
    public AjaxResult updateStatusById(@PathVariable("id") String id)
    @GetMapping(value = "/updateStatusById/{status}/{id}")
    public AjaxResult updateStatusById(@PathVariable("status") String status,@PathVariable("id") String id)
    {
        return new AjaxResult(200, archiveRecordsService.updateArchiveById(Long.parseLong(id))+"");
        return new AjaxResult(200, archiveRecordsService.updateArchiveById(status, Long.parseLong(id))+"");
    }
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiverecordstouserController.java
@@ -50,7 +50,7 @@
    @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:edit')")
    @PutMapping("/authUserToArchive")
    public AjaxResult selectRecordToUser(String recordId, Long[] userIds)
    public AjaxResult selectRecordToUser(Long recordId, Long[] userIds)
    {
        for(Long userId:userIds)
        {
@@ -158,7 +158,7 @@
     */
    @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:remove')")
    @DeleteMapping("/deleteByRidUid")
    public AjaxResult removeByRecordIdAndUserId(String recordId, Long userId)
    public AjaxResult removeByRecordIdAndUserId(Long recordId, Long userId)
    {
        return toAjax(archiverecordstouserService.deleteArchiverecordstouserByRecordId(recordId, userId));
    }
@@ -166,7 +166,7 @@
    @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:query')")
    @GetMapping("/getByRidUid")
    public AjaxResult getByRecordIdAndUserId(String recordId, Long userId)
    public AjaxResult getByRecordIdAndUserId(Long recordId, Long userId)
    {
        return toAjax(archiverecordstouserService.queryArchiverecordstouserByRecordId(recordId, userId));
    }