| | |
| | | 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) |