|
@@ -44,9 +44,6 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
@Autowired
|
|
|
private SysUserMapper sysUserMapper;
|
|
|
|
|
|
- @Autowired
|
|
|
- private PmProjectMapper pmProjectMapper;
|
|
|
-
|
|
|
@Autowired
|
|
|
private PmProjectService pmProjectService;
|
|
|
|
|
@@ -92,6 +89,7 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
public List<PmWorkReport> workReportQuery(String startDate, String endDate, String projectName, Integer projectAscription, Integer reportId) {
|
|
|
List<PmWorkReport> reportList = new ArrayList<>();
|
|
|
List<PmWorkContent> pmWorkContentList = new ArrayList<>();
|
|
|
+ List<Long> userIds = new ArrayList<>();
|
|
|
if (reportId != null && reportId != 0) {
|
|
|
LambdaQueryWrapper<PmWorkReport> reportQuery = Wrappers.lambdaQuery();
|
|
|
reportQuery.select(PmWorkReport::getId, PmWorkReport::getCoordinateWork, PmWorkReport::getTomorrowPlan, PmWorkReport::getCcTo, PmWorkReport::getSubmitterId,
|
|
@@ -104,7 +102,10 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
pmWorkContentList = this.list(contentQuery);
|
|
|
report.setWorkContents(pmWorkContentList);
|
|
|
reportList.add(report);
|
|
|
- }else{
|
|
|
+ for (PmWorkReport c : reportList) {
|
|
|
+ userIds.add(c.getSubmitterId());
|
|
|
+ }
|
|
|
+ } else {
|
|
|
LocalDate start = LocalDate.parse(startDate);
|
|
|
LocalDate end = LocalDate.parse(endDate);
|
|
|
String subQueryReports = "SELECT id FROM pm_work_report WHERE report_date BETWEEN '" + start + "' AND '" + end + "' AND tenant_id = " + SecurityUtils.getTenantId();
|
|
@@ -136,17 +137,16 @@ public class PmWorkContentServiceImpl extends AbstractCrudService<PmWorkContentM
|
|
|
.in(PmWorkReport::getId, reportIds)
|
|
|
.orderByDesc(PmWorkReport::getCreateTime);
|
|
|
reportList = pmWorkReportMapper.selectList(reportQuery);
|
|
|
- }
|
|
|
- List<Long> userIds = new ArrayList<>();
|
|
|
- for (PmWorkReport c : reportList) {
|
|
|
- List<PmWorkContent> contents = new ArrayList<>();
|
|
|
- for (PmWorkContent b : pmWorkContentList) {
|
|
|
- if (b.getReportId() == c.getId()) {
|
|
|
- contents.add(b);
|
|
|
+ for (PmWorkReport c : reportList) {
|
|
|
+ List<PmWorkContent> contents = new ArrayList<>();
|
|
|
+ for (PmWorkContent b : pmWorkContentList) {
|
|
|
+ if (b.getReportId() == c.getId()) {
|
|
|
+ contents.add(b);
|
|
|
+ }
|
|
|
}
|
|
|
+ c.setWorkContents(contents);
|
|
|
+ userIds.add(c.getSubmitterId());
|
|
|
}
|
|
|
- c.setWorkContents(contents);
|
|
|
- userIds.add(c.getSubmitterId());
|
|
|
}
|
|
|
LambdaQueryWrapper<SysUser> usersQuery = Wrappers.lambdaQuery();
|
|
|
usersQuery.select(SysUser::getUserId, SysUser::getNickName)
|