|
@@ -667,9 +667,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
TimeType timeType = timeTypeMapper.selectById(companyId);
|
|
TimeType timeType = timeTypeMapper.selectById(companyId);
|
|
//删除不在本次更新名单中的老记录
|
|
//删除不在本次更新名单中的老记录
|
|
|
|
+ List<Integer> idList = reportList.stream().filter(r->r.getId() != null).map(Report::getId).collect(Collectors.toList());
|
|
if (date != null && !date.contains("@")) {
|
|
if (date != null && !date.contains("@")) {
|
|
//取到已有记录的id集合
|
|
//取到已有记录的id集合
|
|
- List<Integer> idList = reportList.stream().filter(r->r.getId() != null).map(Report::getId).collect(Collectors.toList());
|
|
|
|
if (idList.size() > 0) {
|
|
if (idList.size() > 0) {
|
|
reportMapper.delete(new QueryWrapper<Report>()
|
|
reportMapper.delete(new QueryWrapper<Report>()
|
|
.eq("create_date", date)
|
|
.eq("create_date", date)
|
|
@@ -677,6 +677,14 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
.notIn("id", idList));
|
|
.notIn("id", idList));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //已通过和待审核状态的不需要处理
|
|
|
|
+ if (idList.size() > 0) {
|
|
|
|
+ List<Report> existsReportList = reportMapper.selectList(new QueryWrapper<Report>().select("id, state").in("id", idList));
|
|
|
|
+ if (existsReportList.size() > 0) {
|
|
|
|
+ List<Integer> ignoreIds = existsReportList.stream().filter(ex -> ex.getState() == 0 || ex.getState() == 1).map(Report::getId).collect(Collectors.toList());
|
|
|
|
+ reportList = reportList.stream().filter(re->re.getId() == null || !ignoreIds.contains(re.getId())).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
//存在按周填报的情况,需要处理一天一个汇总
|
|
//存在按周填报的情况,需要处理一天一个汇总
|
|
Map<LocalDate, List<Report>> groupMap = reportList.stream().collect(Collectors.groupingBy(Report::getCreateDate));
|
|
Map<LocalDate, List<Report>> groupMap = reportList.stream().collect(Collectors.groupingBy(Report::getCreateDate));
|
|
@@ -1549,7 +1557,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
.setRejectReason(reason).setRejectUserid(user.getId()).setRejectUsername(user.getName());
|
|
.setRejectReason(reason).setRejectUserid(user.getId()).setRejectUsername(user.getName());
|
|
reportMapper.update(upReport,
|
|
reportMapper.update(upReport,
|
|
new QueryWrapper<Report>().in("id", ListUtil.convertIdsArrayToList(reportIds)));
|
|
new QueryWrapper<Report>().in("id", ListUtil.convertIdsArrayToList(reportIds)));
|
|
- List<Report> rList = reportMapper.selectList(new QueryWrapper<Report>().select("id, group_id, project_id, creator_id, create_date").in("id", ListUtil.convertIdsArrayToList(reportIds)));
|
|
|
|
|
|
+ List<Report> rList = reportMapper.selectList(new QueryWrapper<Report>().select("id, group_id, project_id, creator_id, create_date, company_id").in("id", ListUtil.convertIdsArrayToList(reportIds)));
|
|
if (timeTypeMapper.selectById(company.getId()).getReportAuditType() == 2) {
|
|
if (timeTypeMapper.selectById(company.getId()).getReportAuditType() == 2) {
|
|
//退回任务分组审核状态
|
|
//退回任务分组审核状态
|
|
List<Report> newList = new ArrayList<>();
|
|
List<Report> newList = new ArrayList<>();
|
|
@@ -2240,7 +2248,6 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
public HttpRespMsg cancelReport(String userId, String reportIds, HttpServletRequest request) {
|
|
public HttpRespMsg cancelReport(String userId, String reportIds, HttpServletRequest request) {
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
User user = userMapper.selectById(userId);
|
|
User user = userMapper.selectById(userId);
|
|
-
|
|
|
|
List<Integer> ids = ListUtil.convertIntegerIdsArrayToList(reportIds);
|
|
List<Integer> ids = ListUtil.convertIntegerIdsArrayToList(reportIds);
|
|
int cnt = 0;
|
|
int cnt = 0;
|
|
List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "审核全员日报");
|
|
List<SysRichFunction> functionList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "审核全员日报");
|