| | |
| | | /** 档案目录id |
| | | */ |
| | | @Excel(name = "档案目录id ") |
| | | private String archiveRecordsId; |
| | | private Long archiveRecordsId; |
| | | |
| | | /** 用户id */ |
| | | @Excel(name = "用户id") |
| | |
| | | return id; |
| | | } |
| | | |
| | | public void setArchiveRecordsId(String archiveRecordsId) |
| | | public void setArchiveRecordsId(Long archiveRecordsId) |
| | | { |
| | | this.archiveRecordsId = archiveRecordsId; |
| | | } |
| | | |
| | | public String getArchiveRecordsId() |
| | | public Long getArchiveRecordsId() |
| | | { |
| | | return archiveRecordsId; |
| | | } |
| | |
| | | |
| | | private Long cnt ; |
| | | @Excel(name = "未完成案卷数") |
| | | |
| | | private Long unfinished; |
| | | |
| | | @Excel(name = "未上传附件") |
| | | |
| | | private Long unwf; |
| | | @Excel(name = "待修改") |
| | | |
| | | private Long dxg; |
| | | @Excel(name = "完成案卷数") |
| | | |
| | | private Long finished; |
| | |
| | | private Long cnt; |
| | | @Excel(name = "完成案卷数") |
| | | private Long swlr; |
| | | @Excel(name = "未上传附件") |
| | | private Long wlrf; |
| | | @Excel(name = "待修改") |
| | | private Long dxg; |
| | | @Excel(name = "未完成案卷数") |
| | | private Long ylr; |
| | | } |
| | |
| | | |
| | | @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>", |
| | |
| | | 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 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") |
| | | " 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}") |
| | |
| | | @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); |
| | | |
| | | |
| | |
| | | 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); |
| | |
| | | */ |
| | | 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); |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | |
| | | public boolean selectArchiveRecordUsers(String recordId); |
| | | public boolean selectArchiveRecordUsers(Long recordId); |
| | | /** |
| | | * 查询【档案分配】列表 |
| | | * |
| | |
| | | |
| | | |
| | | |
| | | 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); |
| | |
| | | } |
| | | |
| | | @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; |
| | | } |
| | | |
| | |
| | | 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<>(); |
| | |
| | | |
| | | |
| | | @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) |
| | |
| | | } |
| | | |
| | | @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(); |
| | | } |
| | |
| | | } |
| | | |
| | | @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; |
| | |
| | | } |
| | | |
| | | @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); |
| | |
| | | |
| | | @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))+""); |
| | | } |
| | | |
| | | |
| | |
| | | @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) |
| | | { |
| | |
| | | */ |
| | | @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)); |
| | | } |
| | |
| | | |
| | | @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)); |
| | | } |