|
@@ -30,6 +30,7 @@ import org.apache.poi.ss.usermodel.*;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
+import org.springframework.core.task.AsyncTaskExecutor;
|
|
import org.springframework.http.*;
|
|
import org.springframework.http.*;
|
|
import org.springframework.http.client.ClientHttpResponse;
|
|
import org.springframework.http.client.ClientHttpResponse;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -4201,7 +4202,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
ReportAuditLog log = new ReportAuditLog();
|
|
ReportAuditLog log = new ReportAuditLog();
|
|
log.setAuditChannel(channel);//导入审核
|
|
log.setAuditChannel(channel);//导入审核
|
|
log.setCompanyId(company.getId());
|
|
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.setUserId(user.getId());
|
|
log.setUserName(user.getName());
|
|
log.setUserName(user.getName());
|
|
log.setProjectName(s);
|
|
log.setProjectName(s);
|
|
@@ -4209,6 +4211,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
s = s.substring(0, 2000);
|
|
s = s.substring(0, 2000);
|
|
}
|
|
}
|
|
reportAuditLogMapper.insert(log);
|
|
reportAuditLogMapper.insert(log);
|
|
|
|
+
|
|
List<Report> allReports = reportMapper.selectList(new QueryWrapper<Report>().in("id", ids));
|
|
List<Report> allReports = reportMapper.selectList(new QueryWrapper<Report>().in("id", ids));
|
|
saveDenyReportLog(allReports, user.getId(), user.getName(), reason);
|
|
saveDenyReportLog(allReports, user.getId(), user.getName(), reason);
|
|
List<User> allUsers = userMapper.selectList(new QueryWrapper<User>().select("id, name").eq("company_id", company.getId()));
|
|
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),
|
|
reportMapper.update(new Report().setState(2),
|
|
new QueryWrapper<Report>().in("id", ListUtil.convertIdsArrayToList(reportIds)));
|
|
new QueryWrapper<Report>().in("id", ListUtil.convertIdsArrayToList(reportIds)));
|
|
|
|
+
|
|
|
|
+ //TODO: 处理消息通知
|
|
// asyncTaskExecutor.execute(new Runnable() {
|
|
// asyncTaskExecutor.execute(new Runnable() {
|
|
// @Override
|
|
// @Override
|
|
// public void run() {
|
|
// public void run() {
|
|
-//
|
|
|
|
|
|
+// informationMapper.insert(new Information().setType(0).setContent(date).setUserId(fillUserId).setMsg(str));
|
|
// //开启线程任务进行发送驳回提醒
|
|
// //开启线程任务进行发送驳回提醒
|
|
// //发送驳回通知消息
|
|
// //发送驳回通知消息
|
|
// User reporter = userMapper.selectById(fillUserId);
|
|
// User reporter = userMapper.selectById(fillUserId);
|
|
@@ -8299,6 +8304,15 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
List<User> auditorList = new ArrayList<>();
|
|
List<User> auditorList = new ArrayList<>();
|
|
//加载这段时间内已填报过的项目
|
|
//加载这段时间内已填报过的项目
|
|
List<Project> projectList = new ArrayList<>();
|
|
List<Project> projectList = new ArrayList<>();
|
|
|
|
+ if (collect.size() > 0) {
|
|
|
|
+ //只算当前可填报的项目
|
|
|
|
+ if (!sysFunctionService.hasPriviledge(user.getRoleId(), "可填报全部项目")) {
|
|
|
|
+ //只能看本人参与的项目
|
|
|
|
+ List<Map<String, Object>> mapList = projectMapper.getOnlyJoinProjects(user.getId(), user.getCompanyId());
|
|
|
|
+ //从collect中去掉不在参与项目中的数据, mapList中的id是Integer类型
|
|
|
|
+ collect = collect.stream().filter(mapList.stream().map(m->(Integer)m.get("id")).collect(Collectors.toList())::contains).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (collect.size() > 0) {
|
|
if (collect.size() > 0) {
|
|
projectList = projectMapper.selectList(new QueryWrapper<Project>().in("id", collect));
|
|
projectList = projectMapper.selectList(new QueryWrapper<Project>().in("id", collect));
|
|
auditorList = userMapper.selectList(new QueryWrapper<User>().in("id", reportList.stream().map(Report::getProjectAuditorId).collect(Collectors.toList())));
|
|
auditorList = userMapper.selectList(new QueryWrapper<User>().in("id", reportList.stream().map(Report::getProjectAuditorId).collect(Collectors.toList())));
|