| | |
| | | @TableField(exist = false) |
| | | private Long [] ids; |
| | | |
| | | |
| | | public String getLiPerson() { |
| | | return liPerson; |
| | | } |
| | | |
| | | public void setLiPerson(String liPerson) { |
| | | this.liPerson = liPerson; |
| | | } |
| | | |
| | | private String liPerson; |
| | | @Override |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.NumberFormatHandler; |
| | |
| | | } |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "编任者", headerColor = IndexedColors.BLACK) |
| | | @Excel(name = "责任者", headerColor = IndexedColors.BLACK) |
| | | private String creator; |
| | | |
| | | /** $column.columnComment */ |
| | |
| | | /** $column.columnComment */ |
| | | // @Excel(name = "页号", handler = NumberFormatHandler.class, headerColor = IndexedColors.BLACK) |
| | | private Long pageNumber; |
| | | @TableField(exist = false) |
| | | @Excel(name = "页号", height = 10,width = 10,headerColor = IndexedColors.RED, headerBackgroundColor = IndexedColors.WHITE) |
| | | private String pageNumberFormatted; |
| | | /** $column.columnComment */ |
| | |
| | | |
| | | |
| | | /** $column.columnComment */ |
| | | @Excel(name = "编任者", headerColor = IndexedColors.BLACK) |
| | | private String creator; |
| | | |
| | | @Excel(name = "文件编号", headerColor = IndexedColors.BLACK) |
| | | private String documentNumber; |
| | | @Excel(name = "责任者", headerColor = IndexedColors.BLACK) |
| | | private String creator; |
| | | /** $column.columnComment */ |
| | | @Excel(name = "文件题名", headerColor = IndexedColors.BLACK) |
| | | private String title; |
| | |
| | | package com.ruoyi.domain.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import lombok.Data; |
| | |
| | | private Date date; |
| | | // 页号(原始数值,用于计算) |
| | | private Long pageNumber; |
| | | |
| | | |
| | | |
| | | // 格式化后的页号,用于显示范围,如"38-38"或"23-38" |
| | | @TableField(exist = false) |
| | | @Excel(name = "页号", height = 10,width = 10,headerColor = IndexedColors.RED, headerBackgroundColor = IndexedColors.WHITE) |
| | | private String pageNumberFormatted; |
| | | @Excel(name = "备注", height = 20,width=10,headerColor = IndexedColors.BLACK, headerBackgroundColor = IndexedColors.WHITE) |
| | |
| | | |
| | | @Mapper |
| | | public interface ArchiveRecordsMapper extends BaseMapper<ArchiveRecords> { |
| | | @Select({ |
| | | "<script>", |
| | | "select * from (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 inner join archive_records c on c.id=a.archive_records_id ${ew.customSqlSegment} ) as tmp\n" + |
| | | "where tst=true", |
| | | "<if test= \"userId !=1 \">", |
| | | "order by tst desc", |
| | | "</if>", |
| | | "</script>" |
| | | }) |
| | | Page<ArchiveRecords> selectJoinCommonUserPage(Page<ArchiveRecords> page, @Param("userId") Long userId, @Param("ew") LambdaQueryWrapper<ArchiveRecords> queryWrapper); |
| | | |
| | | |
| | | @Select({ |
| | |
| | | if(userId==1) |
| | | |
| | | lqw.orderByDesc(ArchiveRecords::getCreateTime); |
| | | // else |
| | | // lqw.eq(userId!=null, ArchiveRecords::getUserId, userId); |
| | | System.out.println("ssssssssssssddd0000000000000000"); |
| | | return lqw; |
| | | |
| | |
| | | Page<ArchiveRecords> page = new Page<>(pageNum, pageSize); |
| | | |
| | | // 使用自定义的分页查询方法,先连接再分页 |
| | | Page<ArchiveRecords> pageResult = this.baseMapper.selectJoinUserPage(page, userid, lqw); |
| | | |
| | | Page<ArchiveRecords> pageResult = new Page<>(); |
| | | if(userid==1) |
| | | pageResult = this.baseMapper.selectJoinUserPage(page, userid, lqw); |
| | | else |
| | | pageResult = this.baseMapper.selectJoinCommonUserPage(page, userid, lqw); |
| | | |
| | | //selectJoinUserPage(page, lqw); |
| | | |
| | |
| | | // log.info("从数据库中查到的为:{}", beanRecords); |
| | | // return markOwnData(familyId, fatherFaId, motherFaId, beanRecords); |
| | | |
| | | |
| | | List<ArchiveRecords> beanUserRecords = new ArrayList<>(); |
| | | beanRecords.forEach(record ->{ |
| | | if(record.isArchiveRecordsId()!=null&&record.getUserId()==userid) |
| | | { |
| | | record.setOwnData(true); |
| | | beanUserRecords.add(record); |
| | | } |
| | | else |
| | | record.setOwnData(false); |
| | |
| | | //不是管理员进行排序 |
| | | // if(userid != 1) |
| | | // Collections.sort(beanRecords, Comparator.comparing(ArchiveRecords::isOwnData)); |
| | | HashMap<String, Object> data = MapUtils.getResult(pageResult, beanRecords); |
| | | HashMap<String, Object> data = new HashMap<>(); |
| | | if(userid==1) |
| | | data = MapUtils.getResult(pageResult, beanRecords); |
| | | else |
| | | data = MapUtils.getResult(pageResult, beanUserRecords); |
| | | // System.out.println(data.get("data")); |
| | | // System.out.println(data.get("pageNum")); |
| | | // System.out.println(data.get("total")); |
| | |
| | | LambdaQueryWrapper<ArchiveRecords> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.eq(!StringUtils.isEmpty(archiveRecords.getRecordId()), ArchiveRecords::getRecordId,archiveRecords.getRecordId()); |
| | | List<ArchiveRecords> list = list(lqw); |
| | | if (list.size() > 0) { |
| | | if (!list.isEmpty()) { |
| | | // throw new RuntimeException("请勿新增重复数据"); |
| | | //如果有重复数据,则根据recordId进行数据修改 |
| | | // if() |
| | |
| | | import com.ruoyi.domain.Archiverecordstouser; |
| | | import com.ruoyi.domain.vo.RecordToUserCount; |
| | | import com.ruoyi.mapper.ArchiverecordstouserMapper; |
| | | import com.ruoyi.service.IArchiveRecordsService; |
| | | import com.ruoyi.service.IArchiverecordstouserService; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | |
| | | @Service |
| | | public class ArchiverecordstouserServiceImpl extends ServiceImpl<ArchiverecordstouserMapper, Archiverecordstouser> implements IArchiverecordstouserService |
| | | { |
| | | @Autowired |
| | | private IArchiveRecordsService archiveRecordsService; |
| | | @Autowired |
| | | private SysUserMapper userMapper; |
| | | @Autowired |
| | |
| | | |
| | | @Override |
| | | public int insertRecordToUsers(Long recordId, Long[] userIds) { |
| | | |
| | | |
| | | //授权用户的名称,这个是立案人 |
| | | String name = ""; |
| | | //根据用户名查询用户相关id |
| | | if(userIds.length>0) { |
| | | SysUser sysUser = new SysUser(); |
| | | sysUser.setUserId(userIds[0]); |
| | | |
| | | name = userMapper.selectUserById(userIds[0]).getUserName(); |
| | | } |
| | | ArchiveRecords archiveRecords = new ArchiveRecords(); |
| | | archiveRecords.setId(recordId); |
| | | archiveRecords.setLiPerson(name); |
| | | archiveRecordsService.updateArchiveRecords(archiveRecords); |
| | | // 新增用户与案卷记录 |
| | | List<Archiverecordstouser> list = new ArrayList<Archiverecordstouser>(); |
| | | for (Long userId : userIds) |
| | |
| | | String li_person = "仇翀"; |
| | | String sh_person = "曾瑞莹"; |
| | | ArchiveRecords archiveRecords = iArchiveRecordsService.selectArchiveRecordsById(id); |
| | | if(!StringUtils.isEmpty(archiveRecords.getLiPerson())) |
| | | li_person = archiveRecords.getLiPerson(); |
| | | ArchiveProjectName tmp = new ArchiveProjectName(); |
| | | tmp.setName(archiveRecords.getProjectName()); |
| | | List<ArchiveProjectName> projectName = iArchiveProjectNameService.selectArchiveProjectNameList(tmp); |
| | | if(!projectName.isEmpty()) |
| | | { |
| | | if(StringUtils.isEmpty(projectName.get(0).getCompanyName())) |
| | | System.out.println(projectName.get(0).getCompanyName()); |
| | | if(!StringUtils.isEmpty(projectName.get(0).getCompanyName())) |
| | | compName = projectName.get(0).getCompanyName(); |
| | | if(StringUtils.isEmpty(projectName.get(0).getCreatePerson())) |
| | | li_person = projectName.get(0).getCreatePerson(); |
| | | if(!StringUtils.isEmpty(projectName.get(0).getCreatePerson())) |
| | | sh_person = projectName.get(0).getCreatePerson(); |
| | | |
| | | System.out.println(compName+"--+"+sh_person); |
| | | |
| | | } |
| | | |
| | | |
| | | System.out.println(compName+"--+"+sh_person); |
| | | // pdfGenerateService.generateFileStyleInfo(pdf09Path, aIV.getRecordId(), id); |
| | | //拿到相关数据 |
| | | List<DocumentMaterialFileStyle> dmfs = documentMaterialsService.findFileStyleInfo(Math.toIntExact(id)); |
| | |
| | | hs.put("texPages", texPages); |
| | | hs.put("volumeNumber", recordId); |
| | | hs.put("company", compName); |
| | | hs.put("liPerson", li_person); |
| | | hs.put("shPerson", sh_person); |
| | | hs.put("time", cdt); |
| | | |
| | | if (!getLicense()) { |
| | |
| | | String li_person = "仇翀"; |
| | | String sh_person = "曾瑞莹"; |
| | | ArchiveRecords archiveRecords1 = iArchiveRecordsService.selectArchiveRecordsById(ids[i]); |
| | | if(!StringUtils.isEmpty(archiveRecords1.getLiPerson())) |
| | | li_person = archiveRecords1.getLiPerson(); |
| | | ArchiveProjectName tmp = new ArchiveProjectName(); |
| | | tmp.setName(archiveRecords1.getProjectName()); |
| | | List<ArchiveProjectName> projectName = iArchiveProjectNameService.selectArchiveProjectNameList(tmp); |
| | | if(!projectName.isEmpty()) |
| | | { |
| | | if(StringUtils.isEmpty(projectName.get(0).getCompanyName())) |
| | | if(!StringUtils.isEmpty(projectName.get(0).getCompanyName())) |
| | | compName = projectName.get(0).getCompanyName(); |
| | | if(StringUtils.isEmpty(projectName.get(0).getCreatePerson())) |
| | | li_person = projectName.get(0).getCreatePerson(); |
| | | if(!StringUtils.isEmpty(projectName.get(0).getCreatePerson())) |
| | | sh_person = projectName.get(0).getCreatePerson(); |
| | | } |
| | | allPages = texPages + picPages + patPages; |
| | | hs.put("pages", allPages); |
| | |
| | | hs.put("texPages", texPages); |
| | | hs.put("volumeNumber", aIV.getRecordId()); |
| | | hs.put("company", compName); |
| | | |
| | | hs.put("liPerson", li_person); |
| | | hs.put("shPerson", sh_person); |
| | | hs.put("time", cdt); |
| | | |
| | | if (!getLicense()) { |
| | |
| | | String li_person = "仇翀"; |
| | | String sh_person = "曾瑞莹"; |
| | | ArchiveRecords archiveRecords = iArchiveRecordsService.selectArchiveRecordsById(id); |
| | | if(!StringUtils.isEmpty(archiveRecords.getLiPerson())) |
| | | li_person = archiveRecords.getLiPerson(); |
| | | ArchiveProjectName tmp = new ArchiveProjectName(); |
| | | tmp.setName(archiveRecords.getProjectName()); |
| | | List<ArchiveProjectName> projectName = iArchiveProjectNameService.selectArchiveProjectNameList(tmp); |
| | | if(!projectName.isEmpty()) |
| | | { |
| | | if(StringUtils.isEmpty(projectName.get(0).getCompanyName())) |
| | | if(!StringUtils.isEmpty(projectName.get(0).getCompanyName())) |
| | | compName = projectName.get(0).getCompanyName(); |
| | | if(StringUtils.isEmpty(projectName.get(0).getCreatePerson())) |
| | | li_person = projectName.get(0).getCreatePerson(); |
| | | if(!StringUtils.isEmpty(projectName.get(0).getCreatePerson())) |
| | | sh_person = projectName.get(0).getCreatePerson(); |
| | | } |
| | | |
| | | allPages = texPages + picPages + patPages; |
| | |
| | | hs.put("texPages", texPages); |
| | | hs.put("volumeNumber", aIV.getRecordId()); |
| | | hs.put("company", compName); |
| | | |
| | | hs.put("liPerson", li_person); |
| | | hs.put("shPerson", sh_person); |
| | | hs.put("time", cdt); |
| | | |
| | | if (!getLicense()) { |