|
|
@ -10,8 +10,11 @@ import cn.iocoder.yudao.module.farm.controller.admin.discuss.dto.DiscussPageDTO; |
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.project.dto.ProjectListDTO; |
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.project.dto.ProjectListDTO; |
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.workHour.dto.WorkUserMsgDTO; |
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.workHour.dto.WorkUserMsgDTO; |
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.workHour.vo.WorkHourBaseVO; |
|
|
|
import cn.iocoder.yudao.module.farm.controller.admin.workHour.vo.WorkHourBaseVO; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.dal.dataobject.area.AreaDO; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.dataobject.workHour.WorkHourDO; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.dataobject.workHour.WorkHourDO; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.dal.mysql.area.AreaMapper; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.mysql.workHour.WorkHourMapper; |
|
|
|
import cn.iocoder.yudao.module.farm.dal.mysql.workHour.WorkHourMapper; |
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.farm.service.area.AreaService; |
|
|
|
import cn.iocoder.yudao.module.system.dal.dataobject.CpUser.CpUserDO; |
|
|
|
import cn.iocoder.yudao.module.system.dal.dataobject.CpUser.CpUserDO; |
|
|
|
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; |
|
|
|
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO; |
|
|
|
import cn.iocoder.yudao.module.system.dal.mysql.CpUser.CpUserMapper; |
|
|
|
import cn.iocoder.yudao.module.system.dal.mysql.CpUser.CpUserMapper; |
|
|
@ -52,6 +55,10 @@ public class DiscussServiceImpl implements DiscussService { |
|
|
|
private AdminUserMapper adminUserMapper; |
|
|
|
private AdminUserMapper adminUserMapper; |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private WorkHourMapper workHourMapper; |
|
|
|
private WorkHourMapper workHourMapper; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private AreaService areaService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private AreaMapper areaMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Long createDiscuss(DiscussCreateReqVO createReqVO) { |
|
|
|
public Long createDiscuss(DiscussCreateReqVO createReqVO) { |
|
|
@ -124,10 +131,11 @@ public class DiscussServiceImpl implements DiscussService { |
|
|
|
List<String> userNameList = adminUserList.stream().map(AdminUserDO::getUsername).collect(Collectors.toList()); |
|
|
|
List<String> userNameList = adminUserList.stream().map(AdminUserDO::getUsername).collect(Collectors.toList()); |
|
|
|
//企业用户
|
|
|
|
//企业用户
|
|
|
|
List<CpUserDO> cpUserList = cpUserMapper.selectList(Wrappers.<CpUserDO>lambdaQuery()); |
|
|
|
List<CpUserDO> cpUserList = cpUserMapper.selectList(Wrappers.<CpUserDO>lambdaQuery()); |
|
|
|
|
|
|
|
|
|
|
|
//工时List
|
|
|
|
//工时List
|
|
|
|
List<Long> workIdList = discussList.stream().map(DiscussDO::getId).collect(Collectors.toList()); |
|
|
|
List<Long> workIdList = discussList.stream().map(DiscussDO::getId).collect(Collectors.toList()); |
|
|
|
List<WorkHourDO> workHourList = workHourMapper.selectList(Wrappers.<WorkHourDO>lambdaQuery().in(WorkHourDO::getProjectId, workIdList)); |
|
|
|
List<WorkHourDO> workHourList = workHourMapper.selectList(Wrappers.<WorkHourDO>lambdaQuery().in(WorkHourDO::getProjectId, workIdList)); |
|
|
|
|
|
|
|
//全部区域List
|
|
|
|
|
|
|
|
List<AreaDO> areaList = areaMapper.selectList(); |
|
|
|
|
|
|
|
|
|
|
|
// key 系统用户id value cpUser
|
|
|
|
// key 系统用户id value cpUser
|
|
|
|
Map<Long, CpUserDO> map = new HashMap<>(); |
|
|
|
Map<Long, CpUserDO> map = new HashMap<>(); |
|
|
@ -157,6 +165,9 @@ public class DiscussServiceImpl implements DiscussService { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
discussDTO.setWorkList(workUserMsgList); |
|
|
|
discussDTO.setWorkList(workUserMsgList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<String> areaNameList = areaService.findAreaName(areaList, discussDTO.getAreas()); |
|
|
|
|
|
|
|
discussDTO.setAreaNameList(areaNameList); |
|
|
|
} |
|
|
|
} |
|
|
|
PageVO<DiscussDTO> returnList = PageUtil.convertPageInfo(discussDTOList); |
|
|
|
PageVO<DiscussDTO> returnList = PageUtil.convertPageInfo(discussDTOList); |
|
|
|
return R.success(returnList); |
|
|
|
return R.success(returnList); |
|
|
|