|
@@ -68,21 +68,26 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
throw new ServiceException("未获取到当前用户信息,请联系管理员");
|
|
|
}
|
|
|
QueryWrapper<TaskProcessInfo> queryWrapper = Condition.getQueryWrapper(dto);
|
|
|
- if (dto.getSelectType().equals("1")) { //待审批为待办任务
|
|
|
- queryWrapper.lambda().like(TaskProcessInfo::getAuditUserIds, SecureUtil.getUserId());
|
|
|
- queryWrapper.lambda().eq(TaskProcessInfo::getStatus, 1);
|
|
|
- } else if (dto.getSelectType().equals("2")) { //已审核、已驳回为已办任务
|
|
|
- queryWrapper.lambda().apply("(audit_user_ids_complete LIKE '%" + SecureUtil.getUserId() + "%' AND STATUS IN ( 2, 3 )) OR (audit_user_ids LIKE '%" + SecureUtil.getUserId() + "%' AND STATUS = 3)");
|
|
|
- } else if (dto.getSelectType().equals("3")) { //我发起的任务
|
|
|
- if (ObjectUtil.isNotEmpty(dto.getSelectStatus()) && !dto.getSelectStatus().equals("1")) {
|
|
|
- queryWrapper.lambda().eq(TaskProcessInfo::getStatus, dto.getSelectStatus());
|
|
|
- }
|
|
|
- queryWrapper.lambda().eq(TaskProcessInfo::getReportUserId, SecureUtil.getUserId());
|
|
|
- } else if (dto.getSelectType().equals("4")) { //抄送给我的
|
|
|
- if (ObjectUtil.isNotEmpty(dto.getSelectStatus()) && !dto.getSelectStatus().equals("1")) {
|
|
|
- queryWrapper.lambda().eq(TaskProcessInfo::getStatus, dto.getSelectStatus());
|
|
|
- }
|
|
|
- queryWrapper.lambda().like(TaskProcessInfo::getCcUserIds, SecureUtil.getUserId());
|
|
|
+ switch (dto.getSelectType()) {
|
|
|
+ case "1": //待审批为待办任务
|
|
|
+ queryWrapper.lambda().like(TaskProcessInfo::getAuditUserIds, SecureUtil.getUserId());
|
|
|
+ queryWrapper.lambda().eq(TaskProcessInfo::getStatus, 1);
|
|
|
+ break;
|
|
|
+ case "2": //已审核、已驳回为已办任务
|
|
|
+ queryWrapper.lambda().apply("(audit_user_ids_complete LIKE '%" + SecureUtil.getUserId() + "%' AND STATUS IN ( 2, 3 )) OR (audit_user_ids LIKE '%" + SecureUtil.getUserId() + "%' AND STATUS = 3)");
|
|
|
+ break;
|
|
|
+ case "3": //我发起的任务
|
|
|
+ if (ObjectUtil.isNotEmpty(dto.getSelectStatus()) && !dto.getSelectStatus().equals("1")) {
|
|
|
+ queryWrapper.lambda().eq(TaskProcessInfo::getStatus, dto.getSelectStatus());
|
|
|
+ }
|
|
|
+ queryWrapper.lambda().eq(TaskProcessInfo::getReportUserId, SecureUtil.getUserId());
|
|
|
+ break;
|
|
|
+ case "4": //抄送给我的
|
|
|
+ if (ObjectUtil.isNotEmpty(dto.getSelectStatus()) && !dto.getSelectStatus().equals("1")) {
|
|
|
+ queryWrapper.lambda().eq(TaskProcessInfo::getStatus, dto.getSelectStatus());
|
|
|
+ }
|
|
|
+ queryWrapper.lambda().like(TaskProcessInfo::getCcUserIds, SecureUtil.getUserId());
|
|
|
+ break;
|
|
|
}
|
|
|
if (StringUtils.isNotEmpty(dto.getStartTime()) && StringUtils.isNotEmpty(dto.getEndTime())) {
|
|
|
String endTime = dto.getEndTime();
|
|
@@ -93,12 +98,25 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
|
|
|
List<DictInfo> dictInfoList = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'report_type'", new BeanPropertyRowMapper<>(DictInfo.class));
|
|
|
|
|
|
- Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
|
|
|
+ Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
|
|
|
|
|
|
return pages.convert((obj -> {
|
|
|
TaskProcessInfoVO vo = new TaskProcessInfoVO();
|
|
|
BeanUtils.copyProperties(obj, vo);
|
|
|
|
|
|
+ if (dto.getSelectType().equals("3") && vo.getReportUserId().equals(SecureUtil.getUserId())) {
|
|
|
+ //如果是本身,也就是我发起的任务,那么替换任务名称
|
|
|
+ String taskName = vo.getTaskName();
|
|
|
+ String re = taskName.replace("向您发起", "我发起的");
|
|
|
+ vo.setTaskName(re);
|
|
|
+ }
|
|
|
+ if (dto.getSelectType().equals("4")) {
|
|
|
+ //抄送给我的
|
|
|
+ String taskName = vo.getTaskName();
|
|
|
+ String re = taskName.replace("向您发起", "抄送给您的");
|
|
|
+ vo.setTaskName(re);
|
|
|
+ }
|
|
|
+
|
|
|
vo.setReportUserName(userMap.get(vo.getReportUserId()));
|
|
|
|
|
|
if (StringUtils.isNotEmpty(vo.getAuditUserIds())) {
|
|
@@ -118,7 +136,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
vo.setStatusName(vo.getStatus().equals(1) ? "待审批" : (vo.getStatus().equals(2) ? "已审批" : "已驳回"));
|
|
|
|
|
|
for (DictInfo dictInfo : dictInfoList) {
|
|
|
- if ((vo.getTaskType()).equals(dictInfo.getDictValue())) {
|
|
|
+ if ((vo.getTaskType()).equals(dictInfo.getDictValue().intValue())) {
|
|
|
vo.setReportTypeName(dictInfo.getDictName());
|
|
|
break;
|
|
|
}
|
|
@@ -133,15 +151,14 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
TaskProcessInfo taskProcessInfo = baseMapper.selectById(id);
|
|
|
if (taskProcessInfo != null) {
|
|
|
//构造基础信息
|
|
|
- Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
|
|
|
- List<DictInfo> dictInfoList1 = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'report_type'", new BeanPropertyRowMapper<>(DictInfo.class));
|
|
|
- List<DictInfo> dictInfoList2 = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'expense_fr_type'", new BeanPropertyRowMapper<>(DictInfo.class));
|
|
|
+ Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
|
|
|
+ List<DictInfo> dictInfoListBasics = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'report_type'", new BeanPropertyRowMapper<>(DictInfo.class));
|
|
|
List<ControlProjectInfo> controlProjectInfos = projectInfoServiceImpl.getBaseMapper().selectList(Wrappers.<ControlProjectInfo>lambdaQuery().select(ControlProjectInfo::getId, ControlProjectInfo::getName));
|
|
|
TaskProcessDetailBasicsVO basicsVO = new TaskProcessDetailBasicsVO();
|
|
|
basicsVO.setTaskId(taskProcessInfo.getId());
|
|
|
basicsVO.setTaskName(taskProcessInfo.getTaskName());
|
|
|
- for (DictInfo dictInfo : dictInfoList1) {
|
|
|
- if ((taskProcessInfo.getTaskType()).equals(dictInfo.getDictValue())) {
|
|
|
+ for (DictInfo dictInfo : dictInfoListBasics) {
|
|
|
+ if ((taskProcessInfo.getTaskType()).equals(dictInfo.getDictValue().intValue())) {
|
|
|
basicsVO.setReportTypeName(dictInfo.getDictName());
|
|
|
break;
|
|
|
}
|
|
@@ -173,8 +190,8 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
voRW.setTransferObjectName(userMap.get(voRW.getTransferObject()));
|
|
|
data = voRW;
|
|
|
}
|
|
|
-
|
|
|
break;
|
|
|
+
|
|
|
case 2: //财务
|
|
|
data = jdbcTemplate.query("select * from c_expense_financial_reimbursement_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMFinancialReimbursementInfo.class)).stream().findAny().orElse(null);
|
|
|
EMFinancialReimbursementInfoVO voCW = BeanUtil.copyProperties(data, EMFinancialReimbursementInfoVO.class);
|
|
@@ -185,8 +202,9 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
vo.setPlanTaskInfoList(Collections.singletonList(planTaskInfoList2));
|
|
|
}
|
|
|
}
|
|
|
- for (DictInfo dictInfo : dictInfoList2) {
|
|
|
- if (dictInfo.getDictValue().equals(voCW.getFrType())) {
|
|
|
+ List<DictInfo> dictInfoListCW = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'expense_fr_type'", new BeanPropertyRowMapper<>(DictInfo.class));
|
|
|
+ for (DictInfo dictInfo : dictInfoListCW) {
|
|
|
+ if (voCW.getFrType().equals(dictInfo.getDictValue().intValue())) {
|
|
|
voCW.setFrTypeName(dictInfo.getDictName());
|
|
|
break;
|
|
|
}
|
|
@@ -209,37 +227,114 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
|
|
|
case 3: //支付
|
|
|
data = jdbcTemplate.query("select * from c_expense_pay_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMPayInfo.class)).stream().findAny().orElse(null);
|
|
|
+ EMPayInfoVO voZF = BeanUtil.copyProperties(data, EMPayInfoVO.class);
|
|
|
+ if (voZF != null) {
|
|
|
+ ControlProjectInfo projectInfo = jdbcTemplate.query("select name from c_control_project_info where id = " + voZF.getProjectId(), new BeanPropertyRowMapper<>(ControlProjectInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (projectInfo != null) {
|
|
|
+ voZF.setProjectName(projectInfo.getName());
|
|
|
+ }
|
|
|
+ voZF.setAfUserName(userMap.get(voZF.getAfUserId()));
|
|
|
+
|
|
|
+ data = voZF;
|
|
|
+ }
|
|
|
break;
|
|
|
+
|
|
|
case 4: //借款
|
|
|
data = jdbcTemplate.query("select * from c_expense_loan_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMLoanInfo.class)).stream().findAny().orElse(null);
|
|
|
break;
|
|
|
+
|
|
|
case 5: //采购
|
|
|
data = jdbcTemplate.query("select * from c_expense_purchase_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMPurchaseInfo.class)).stream().findAny().orElse(null);
|
|
|
+ EMPurchaseInfoVO voCG = BeanUtil.copyProperties(data, EMPurchaseInfoVO.class);
|
|
|
+ if (voCG != null) {
|
|
|
+ List<DictInfo> dictInfoListCG = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'purchase_type'", new BeanPropertyRowMapper<>(DictInfo.class));
|
|
|
+ for (DictInfo dictInfo : dictInfoListCG) {
|
|
|
+ if (voCG.getPurType().equals(dictInfo.getDictValue().intValue())) {
|
|
|
+ voCG.setPurTypeName(dictInfo.getDictName());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ data = voCG;
|
|
|
+ }
|
|
|
break;
|
|
|
+
|
|
|
case 6: //用车
|
|
|
data = jdbcTemplate.query("select * from c_expense_use_car_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMUseCarInfo.class)).stream().findAny().orElse(null);
|
|
|
break;
|
|
|
+
|
|
|
case 7: //发票
|
|
|
data = jdbcTemplate.query("select * from c_expense_invoice_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMInvoiceInfo.class)).stream().findAny().orElse(null);
|
|
|
+ EMInvoiceInfoVO voFP = BeanUtil.copyProperties(data, EMInvoiceInfoVO.class);
|
|
|
+ if (voFP != null) {
|
|
|
+ ControlProjectInfo projectInfo = jdbcTemplate.query("select name from c_control_project_info where id = " + voFP.getProjectId(), new BeanPropertyRowMapper<>(ControlProjectInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (projectInfo != null) {
|
|
|
+ voFP.setProjectName(projectInfo.getName());
|
|
|
+ }
|
|
|
+ List<DictInfo> dictInfoListFP = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'invoice_type'", new BeanPropertyRowMapper<>(DictInfo.class));
|
|
|
+ for (DictInfo dictInfo : dictInfoListFP) {
|
|
|
+ if (voFP.getInvoiceType().equals(dictInfo.getDictValue().intValue())) {
|
|
|
+ voFP.setInvoiceTypeName(dictInfo.getDictName());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ voFP.setInvoiceUserName(userMap.get(voFP.getInvoiceUserId()));
|
|
|
+ //TODO 发票抬头等信息
|
|
|
|
|
|
+ data = voFP;
|
|
|
+ }
|
|
|
break;
|
|
|
+
|
|
|
case 8: //外包
|
|
|
data = jdbcTemplate.query("select * from c_expense_outsourcing_pay_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(EMOutsourcingPayInfo.class)).stream().findAny().orElse(null);
|
|
|
+ EMOutsourcingPayInfoVO voWB = BeanUtil.copyProperties(data, EMOutsourcingPayInfoVO.class);
|
|
|
+ if (voWB != null) {
|
|
|
+ ControlProjectInfo projectInfo = jdbcTemplate.query("select name from c_control_project_info where id = " + voWB.getProjectId(), new BeanPropertyRowMapper<>(ControlProjectInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (projectInfo != null) {
|
|
|
+ voWB.setProjectName(projectInfo.getName());
|
|
|
+ }
|
|
|
+ List<DictInfo> dictInfoListWB = jdbcTemplate.query("select dict_name,dict_value from c_dict_info where code = 'outsourcing_type'", new BeanPropertyRowMapper<>(DictInfo.class));
|
|
|
+ for (DictInfo dictInfo : dictInfoListWB) {
|
|
|
+ if (voWB.getOutsourcingType().equals(dictInfo.getDictValue().intValue())) {
|
|
|
+ voWB.setOutsourcingTypeName(dictInfo.getDictName());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ data = voWB;
|
|
|
+ }
|
|
|
break;
|
|
|
+
|
|
|
case 9: //出差
|
|
|
data = jdbcTemplate.query("select * from c_attendance_trip_info where id = " + record.getExpenseInfoId(), new BeanPropertyRowMapper<>(AttendanceTripInfo.class)).stream().findAny().orElse(null);
|
|
|
-
|
|
|
AttendanceTripInfoVO voCC = BeanUtil.copyProperties(data, AttendanceTripInfoVO.class);
|
|
|
if (voCC != null) {
|
|
|
- if (ObjectUtil.isNotEmpty(voCC.getProjectId()) && ObjectUtil.isNotEmpty(voCC.getBudgetPlanIds())) { //如果预算ids不为空,那么证明有关联计划任务(单关联)
|
|
|
- TaskPlanInfoVO planTaskInfoList2 = this.getPlanTaskInfoList(voCC.getBudgetPlanIds(), controlProjectInfos);
|
|
|
- if (planTaskInfoList2 != null) {
|
|
|
- vo.setPlanTaskInfoList(Collections.singletonList(planTaskInfoList2));
|
|
|
+ if (ObjectUtil.isNotEmpty(voCC.getProjectId())) {
|
|
|
+ ControlProjectInfo projectInfo = jdbcTemplate.query("select name from c_control_project_info where id = " + voCC.getProjectId(), new BeanPropertyRowMapper<>(ControlProjectInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (projectInfo != null) {
|
|
|
+ voCC.setProjectName(projectInfo.getName());
|
|
|
+ }
|
|
|
+ if (ObjectUtil.isNotEmpty(voCC.getBudgetPlanIds())) { //如果预算ids不为空,那么证明有关联计划任务(单关联)
|
|
|
+ TaskPlanInfoVO planTaskInfoList2 = this.getPlanTaskInfoList(voCC.getBudgetPlanIds(), controlProjectInfos);
|
|
|
+ if (planTaskInfoList2 != null) {
|
|
|
+ vo.setPlanTaskInfoList(Collections.singletonList(planTaskInfoList2));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (ObjectUtil.isNotEmpty(voCC.getFellowTravelerUserIds())) {
|
|
|
+ List<String> userIds = Func.toStrList(voCC.getFellowTravelerUserIds());
|
|
|
+ List<String> names = new ArrayList<>();
|
|
|
+ for (String userId : userIds) {
|
|
|
+ String name = userMap.getOrDefault(Long.parseLong(userId), null);
|
|
|
+ if (name != null) {
|
|
|
+ names.add(name);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ voCC.setFellowTravelerUserNames(StringUtils.join(names, "、"));
|
|
|
+ }
|
|
|
data = voCC;
|
|
|
}
|
|
|
break;
|
|
|
+
|
|
|
case 10: //成本测算
|
|
|
List<ProjectCostBudget> query = jdbcTemplate.query("select project_id from c_project_cost_budget where id in(" + record.getExpenseInfoId() + ")", new BeanPropertyRowMapper<>(ProjectCostBudget.class));
|
|
|
if (query.size() > 0) {
|
|
@@ -252,6 +347,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -444,7 +540,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
queryWrapper.lambda().ge(ProjectCostBudget::getPlanStartTime, dto.getStartTime()).le(ProjectCostBudget::getPlanEndTime, dto.getEndTime());
|
|
|
}
|
|
|
IPage<ProjectCostBudget> pages = projectCostBudgetService.page(page, queryWrapper.lambda().orderBy(true, true, ProjectCostBudget::getCreateTime));
|
|
|
- Map<Long, String> userMap = iUserClient.selectUserAll().stream().collect(Collectors.toMap(User::getId, User::getRealName));
|
|
|
+ Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
|
|
|
List<ControlProjectInfo> controlProjectInfos = projectInfoServiceImpl.getBaseMapper().selectList(Wrappers.<ControlProjectInfo>lambdaQuery().select(ControlProjectInfo::getId, ControlProjectInfo::getName));
|
|
|
|
|
|
//封装page对象
|
|
@@ -511,6 +607,14 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
List<ProjectCostBudget> taskList = projectCostBudgetService.getBaseMapper().selectBatchIds(Func.toStrList(ids));
|
|
|
List<ControlProjectInfo> controlProjectInfos = projectInfoServiceImpl.getBaseMapper().selectList(Wrappers.<ControlProjectInfo>lambdaQuery().select(ControlProjectInfo::getId, ControlProjectInfo::getName));
|
|
|
List<TaskPlanInfoVO> vos = new ArrayList<>();
|
|
|
+
|
|
|
+ //获取所有审批任务与计划任务关系
|
|
|
+ Map<String, ExpenseTaskRecord> taskRecordMaps = new LinkedHashMap<>();
|
|
|
+ if (ObjectUtil.isNotEmpty(ids)) {
|
|
|
+ List<ExpenseTaskRecord> expenseTaskRecords = jdbcTemplate.query("select task_id,expense_info_id from c_expense_task_record where expense_info_type = 1 and expense_info_id in(" + ids + ")", new BeanPropertyRowMapper<>(ExpenseTaskRecord.class));
|
|
|
+ taskRecordMaps = expenseTaskRecords.stream().collect(Collectors.toMap(ExpenseTaskRecord::getExpenseInfoId, Function.identity()));
|
|
|
+ }
|
|
|
+
|
|
|
for (ProjectCostBudget obj : taskList) {
|
|
|
TaskPlanInfoVO vo = new TaskPlanInfoVO();
|
|
|
vo.setId(obj.getId());
|
|
@@ -521,7 +625,21 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- vo.setStatusName(""); //TODO 任务状态 多种
|
|
|
+
|
|
|
+ //判断任务状态
|
|
|
+ ExpenseTaskRecord record = taskRecordMaps.getOrDefault(String.valueOf(vo.getId()), null);
|
|
|
+ if (record != null) {
|
|
|
+ TaskProcessInfo task = jdbcTemplate.query("select status from c_task_process_info where id = " + record.getTaskId(), new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (task != null) {
|
|
|
+ vo.setStatus(task.getStatus());
|
|
|
+ vo.setStatusName(task.getStatus().equals(1) ? "待审批" : (task.getStatus().equals(2) ? "已审批" : (task.getStatus().equals(3) ? "已驳回" : "未提交审批")));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.isEmpty(vo.getStatusName())) {
|
|
|
+ vo.setStatus(0);
|
|
|
+ vo.setStatusName("未提交审批");
|
|
|
+ }
|
|
|
+
|
|
|
vos.add(vo);
|
|
|
}
|
|
|
return vos;
|
|
@@ -545,7 +663,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
taskProcessInfo.setStatus(1); //待审批
|
|
|
taskProcessInfo.setReportDate(new Date());
|
|
|
taskProcessInfo.setTaskType(1); //任务审批
|
|
|
- taskProcessInfo.setTaskName("【" + SecureUtil.getUserName() + "】向您发起【任务审批】审批");
|
|
|
+ taskProcessInfo.setTaskName("【" + SecureUtil.getUser().getNickName() + "】向您发起【计划完成】审批");
|
|
|
|
|
|
//上报人
|
|
|
taskProcessInfo.setReportUserId(SecureUtil.getUserId());
|
|
@@ -556,7 +674,8 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
|
|
|
List<String> nonEmptyAuditUserIds = new LinkedList<>();
|
|
|
for (String userId : auditUserIds) {
|
|
|
- if (StringUtils.isNotEmpty(userId)) {
|
|
|
+ //如果审批人中存在自己本身,那么移除,自己不审批自己的任务
|
|
|
+ if (StringUtils.isNotEmpty(userId) && !userId.equals(String.valueOf(SecureUtil.getUserId()))) {
|
|
|
nonEmptyAuditUserIds.add(userId);
|
|
|
}
|
|
|
}
|
|
@@ -578,7 +697,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
taskProcessInfo.setStatus(1); //待审批
|
|
|
taskProcessInfo.setReportDate(new Date());
|
|
|
taskProcessInfo.setTaskType(1); //任务审批
|
|
|
- taskProcessInfo.setTaskName("【" + SecureUtil.getUserName() + "】向您发起【任务转移】审批");
|
|
|
+ taskProcessInfo.setTaskName("【" + SecureUtil.getUser().getNickName() + "】向您发起【任务转移】审批");
|
|
|
|
|
|
//上报人
|
|
|
taskProcessInfo.setReportUserId(SecureUtil.getUserId());
|
|
@@ -589,7 +708,8 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
|
|
|
List<String> nonEmptyAuditUserIds = new LinkedList<>();
|
|
|
for (String userId : auditUserIds) {
|
|
|
- if (StringUtils.isNotEmpty(userId)) {
|
|
|
+ //如果审批人中存在自己本身,那么移除,自己不审批自己的任务
|
|
|
+ if (StringUtils.isNotEmpty(userId) && !userId.equals(String.valueOf(SecureUtil.getUserId()))) {
|
|
|
nonEmptyAuditUserIds.add(userId);
|
|
|
}
|
|
|
}
|
|
@@ -694,13 +814,14 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
taskProcessInfo.setStatus(1); //待审批
|
|
|
taskProcessInfo.setReportDate(new Date());
|
|
|
taskProcessInfo.setTaskType(10); //成本测算审批
|
|
|
- taskProcessInfo.setTaskName("【" + SecureUtil.getUserName() + "】向您发起【成本测算】审批");
|
|
|
+ taskProcessInfo.setTaskName("【" + SecureUtil.getUser().getNickName() + "】向您发起【成本测算】审批");
|
|
|
//上报人
|
|
|
taskProcessInfo.setReportUserId(SecureUtil.getUserId());
|
|
|
|
|
|
List<String> nonEmptyAuditUserIds = new LinkedList<>();
|
|
|
for (String userId : auditUserIds) {
|
|
|
- if (StringUtils.isNotEmpty(userId)) {
|
|
|
+ //如果审批人中存在自己本身,那么移除,自己不审批自己的任务
|
|
|
+ if (StringUtils.isNotEmpty(userId) && !userId.equals(String.valueOf(SecureUtil.getUserId()))) {
|
|
|
nonEmptyAuditUserIds.add(userId);
|
|
|
}
|
|
|
}
|
|
@@ -869,7 +990,7 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
taskProcessInfo.setTaskType(type);
|
|
|
String taskNameByType = this.taskNameByType(type);
|
|
|
if (StringUtils.isNotEmpty(taskNameByType)) {
|
|
|
- taskProcessInfo.setTaskName("【" + SecureUtil.getUserName() + "】" + taskNameByType);
|
|
|
+ taskProcessInfo.setTaskName("【" + SecureUtil.getUser().getNickName() + "】" + taskNameByType);
|
|
|
}
|
|
|
//上报人
|
|
|
taskProcessInfo.setReportUserId(SecureUtil.getUserId());
|
|
@@ -899,7 +1020,8 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
|
|
|
List<String> nonEmptyAuditUserIds = new LinkedList<>();
|
|
|
for (String userId : auditUserIds) {
|
|
|
- if (StringUtils.isNotEmpty(userId)) {
|
|
|
+ //如果审批人中存在自己本身,那么移除,自己不审批自己的任务
|
|
|
+ if (StringUtils.isNotEmpty(userId) && !userId.equals(String.valueOf(SecureUtil.getUserId()))) {
|
|
|
nonEmptyAuditUserIds.add(userId);
|
|
|
}
|
|
|
}
|