|
@@ -30,6 +30,7 @@ import org.apache.poi.ss.usermodel.*;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.core.task.AsyncTaskExecutor;
|
|
|
import org.springframework.http.*;
|
|
|
import org.springframework.http.client.ClientHttpResponse;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -4201,7 +4202,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
ReportAuditLog log = new ReportAuditLog();
|
|
|
log.setAuditChannel(channel);//导入审核
|
|
|
log.setCompanyId(company.getId());
|
|
|
- log.setResult("批量驳回,原因:" + (StringUtils.isEmpty(reason)?"无":reason));
|
|
|
+ final String reasonStr = "批量驳回,原因:" + (StringUtils.isEmpty(reason)?"无":reason);
|
|
|
+ log.setResult(reasonStr);
|
|
|
log.setUserId(user.getId());
|
|
|
log.setUserName(user.getName());
|
|
|
log.setProjectName(s);
|
|
@@ -4209,6 +4211,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
s = s.substring(0, 2000);
|
|
|
}
|
|
|
reportAuditLogMapper.insert(log);
|
|
|
+
|
|
|
List<Report> allReports = reportMapper.selectList(new QueryWrapper<Report>().in("id", ids));
|
|
|
saveDenyReportLog(allReports, user.getId(), user.getName(), reason);
|
|
|
List<User> allUsers = userMapper.selectList(new QueryWrapper<User>().select("id, name").eq("company_id", company.getId()));
|
|
@@ -4238,10 +4241,12 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
|
|
|
reportMapper.update(new Report().setState(2),
|
|
|
new QueryWrapper<Report>().in("id", ListUtil.convertIdsArrayToList(reportIds)));
|
|
|
+
|
|
|
+ //TODO: 处理消息通知
|
|
|
// asyncTaskExecutor.execute(new Runnable() {
|
|
|
// @Override
|
|
|
// public void run() {
|
|
|
-//
|
|
|
+// informationMapper.insert(new Information().setType(0).setContent(date).setUserId(fillUserId).setMsg(str));
|
|
|
// //开启线程任务进行发送驳回提醒
|
|
|
// //发送驳回通知消息
|
|
|
// User reporter = userMapper.selectById(fillUserId);
|
|
@@ -8309,6 +8314,12 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
projectList = projectMapper.selectList(new QueryWrapper<Project>().in("id", oldReport.stream().map(Report::getProjectId).collect(Collectors.toList())));
|
|
|
}
|
|
|
}
|
|
|
+ if (projectList.size() > 0 && !sysFunctionService.hasPriviledge(user.getRoleId(), "可填报全部项目")) {
|
|
|
+ //只能看本人参与的项目
|
|
|
+ List<Map<String, Object>> mapList = projectMapper.getOnlyJoinProjects(user.getId(), user.getCompanyId());
|
|
|
+ //从projectList中去掉不在参与项目中的数据, mapList中的id是Integer类型
|
|
|
+ projectList = projectList.stream().filter(p->mapList.stream().anyMatch(m->m.get("id").equals(p.getId()))).collect(Collectors.toList());
|
|
|
+ }
|
|
|
List<SapProjectService> sapProjectServices = new ArrayList<>();
|
|
|
if (company.getId() == 3092) {
|
|
|
sapProjectServices = sapProjectServiceMapper.selectList(new QueryWrapper<SapProjectService>().eq("company_id",company.getId()));
|