|
@@ -1032,20 +1032,11 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
switch (businessDataType) {
|
|
|
case 1: //计划任务
|
|
|
if (taskStatus == 2) { //通过审批
|
|
|
- /*//task_approve = 1 已审批 , status = 4 已完成
|
|
|
- jdbcTemplate.execute("update c_project_cost_budget set task_approve = 1,status = 4 where id = " + dataId);
|
|
|
-
|
|
|
- //判断是否为转移任务,计划任务转移后,修改计划任务人id
|
|
|
- TaskPlanUpdateStatusInfo taskPlanUpdateStatusInfo = jdbcTemplate.query("select * from c_task_plan_update_status_info where update_type = 2 and approve_task_id = " + approveTaskId + " and plan_task_id = " + dataId, new BeanPropertyRowMapper<>(TaskPlanUpdateStatusInfo.class)).stream().findAny().orElse(null);
|
|
|
- if (taskPlanUpdateStatusInfo != null) {
|
|
|
- jdbcTemplate.execute("update c_project_cost_budget set task_approve = 0,status = 2,task_user = " + taskPlanUpdateStatusInfo.getTransferObject() + " where id = " + taskPlanUpdateStatusInfo.getPlanTaskId());
|
|
|
- */
|
|
|
//任务转移后,标记关系信息为转移任务
|
|
|
jdbcTemplate.execute("update c_expense_task_record set is_transfer = 1 where expense_info_type = 1 and task_id = " + approveTaskId + " and expense_info_id = " + dataId);
|
|
|
|
|
|
//删除当前计划任务与日志关系信息(如果任务转移,那么就不属于该用户了,就应该在新用户写日志时,与新用户绑定)
|
|
|
jdbcTemplate.execute("delete from c_log_history_task_record where task_id = " + dataId);
|
|
|
- //}
|
|
|
|
|
|
} else if (taskStatus == 3) { //驳回审批
|
|
|
TaskProcessInfo taskProcessInfo = jdbcTemplate.query("select status from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
@@ -1058,27 +1049,67 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
|
|
|
case 2: //财务
|
|
|
jdbcTemplate.execute("update c_expense_financial_reimbursement_info set status = " + taskStatus + " where id = " + dataId);
|
|
|
+ TaskProcessInfo taskProcessInfo2 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo2 != null && taskProcessInfo2.getStatus().equals(3)) { //驳回推送
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("财务报销申请", taskProcessInfo2.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo2.getStatus());
|
|
|
+ }
|
|
|
break;
|
|
|
case 3: //支付
|
|
|
jdbcTemplate.execute("update c_expense_pay_info set status = " + taskStatus + " where id = " + dataId);
|
|
|
+ TaskProcessInfo taskProcessInfo3 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo3 != null && taskProcessInfo3.getStatus().equals(3)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("支付申请", taskProcessInfo3.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo3.getStatus());
|
|
|
+ }
|
|
|
break;
|
|
|
case 4: //借款
|
|
|
jdbcTemplate.execute("update c_expense_loan_info set status = " + taskStatus + " where id = " + dataId);
|
|
|
+ TaskProcessInfo taskProcessInfo4 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo4 != null && taskProcessInfo4.getStatus().equals(3)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("借款申请", taskProcessInfo4.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo4.getStatus());
|
|
|
+ }
|
|
|
break;
|
|
|
case 5: //采购
|
|
|
jdbcTemplate.execute("update c_expense_purchase_info set status = " + taskStatus + " where id = " + dataId);
|
|
|
+ TaskProcessInfo taskProcessInfo5 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo5 != null && taskProcessInfo5.getStatus().equals(3)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("采购申请", taskProcessInfo5.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo5.getStatus());
|
|
|
+ }
|
|
|
break;
|
|
|
case 6: //用车
|
|
|
jdbcTemplate.execute("update c_expense_use_car_info set status = " + taskStatus + " where id = " + dataId);
|
|
|
+ TaskProcessInfo taskProcessInfo6 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo6 != null && taskProcessInfo6.getStatus().equals(3)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("用车申请", taskProcessInfo6.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo6.getStatus());
|
|
|
+ }
|
|
|
break;
|
|
|
case 7: //发票
|
|
|
jdbcTemplate.execute("update c_expense_invoice_info set status = " + taskStatus + " where id = " + dataId);
|
|
|
+ TaskProcessInfo taskProcessInfo7 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo7 != null && taskProcessInfo7.getStatus().equals(3)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("发票申请", taskProcessInfo7.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo7.getStatus());
|
|
|
+ }
|
|
|
break;
|
|
|
case 8: //外包
|
|
|
jdbcTemplate.execute("update c_expense_outsourcing_pay_info set status = " + taskStatus + " where id = " + dataId);
|
|
|
+ TaskProcessInfo taskProcessInfo8 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo8 != null && taskProcessInfo8.getStatus().equals(3)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("外包支付申请", taskProcessInfo8.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo8.getStatus());
|
|
|
+ }
|
|
|
break;
|
|
|
case 9: //出差
|
|
|
jdbcTemplate.execute("update c_attendance_trip_info set status = " + taskStatus + " where id = " + dataId);
|
|
|
+ TaskProcessInfo taskProcessInfo9 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo9 != null && taskProcessInfo9.getStatus().equals(3)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("出差申请", taskProcessInfo9.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo9.getStatus());
|
|
|
+ }
|
|
|
break;
|
|
|
case 10: //成本测算
|
|
|
if (taskStatus == 2) {
|
|
@@ -1092,7 +1123,11 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
} else if (taskStatus == 3) {
|
|
|
//已驳回 = approve = 0
|
|
|
jdbcTemplate.execute("update c_project_cost_budget set approve = 0 where id in(" + dataId + ")");
|
|
|
- break;
|
|
|
+ TaskProcessInfo taskProcessInfo10 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo10 != null && taskProcessInfo10.getStatus().equals(3)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("成本测算申请", taskProcessInfo10.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo10.getStatus());
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
@@ -1109,18 +1144,18 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
switch (businessDataType) {
|
|
|
case 1:
|
|
|
//计划任务
|
|
|
- TaskProcessInfo taskProcessInfo = jdbcTemplate.query("select status from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ TaskProcessInfo taskProcessInfo1 = jdbcTemplate.query("select status from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
ProjectCostBudget projectCostBudget = jdbcTemplate.query("select plan_task_desc,task_user,id from c_project_cost_budget where id = " + dataId, new BeanPropertyRowMapper<>(ProjectCostBudget.class)).stream().findAny().orElse(null);
|
|
|
- if (taskProcessInfo != null && projectCostBudget != null) {
|
|
|
+ if (taskProcessInfo1 != null && projectCostBudget != null) {
|
|
|
//获取任务完成时间
|
|
|
TaskPlanUpdateStatusInfo taskPlanUpdateStatusInfo = jdbcTemplate.query("select completion_time from c_task_plan_update_status_info where update_type = 1 and approve_task_id = " + approveTaskId + " and plan_task_id = " + dataId, new BeanPropertyRowMapper<>(TaskPlanUpdateStatusInfo.class)).stream().findAny().orElse(null);
|
|
|
- if (taskPlanUpdateStatusInfo != null && taskProcessInfo.getStatus().equals(2)) { //已完成的任务才推送
|
|
|
+ if (taskPlanUpdateStatusInfo != null && taskProcessInfo1.getStatus().equals(2)) { //已完成的任务才推送
|
|
|
//修改任务实际完成时间、金额
|
|
|
LocalDate localDate = taskPlanUpdateStatusInfo.getCompletionTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
|
|
projectCostBudgetService.taskFinishedStats(projectCostBudget.getId(), localDate);
|
|
|
}
|
|
|
- //计划日志操作信息
|
|
|
- planInformService.taskFinishedInform(projectCostBudget.getPlanTaskDesc(), projectCostBudget.getTaskUser(), SecureUtil.getUserName(), taskProcessInfo.getStatus());
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform(projectCostBudget.getPlanTaskDesc(), projectCostBudget.getTaskUser(), SecureUtil.getUserName(), taskProcessInfo1.getStatus());
|
|
|
}
|
|
|
|
|
|
break;
|
|
@@ -1157,6 +1192,69 @@ public class TaskProcessServiceImpl extends BaseServiceImpl<TaskProcessMapper, T
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ TaskProcessInfo taskProcessInfo2 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo2 != null && taskProcessInfo2.getStatus().equals(2)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("财务报销申请", taskProcessInfo2.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo2.getStatus());
|
|
|
+ }
|
|
|
+
|
|
|
+ break;
|
|
|
+
|
|
|
+ case 3:
|
|
|
+ TaskProcessInfo taskProcessInfo3 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo3 != null && taskProcessInfo3.getStatus().equals(2)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("支付申请", taskProcessInfo3.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo3.getStatus());
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ TaskProcessInfo taskProcessInfo4 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo4 != null && taskProcessInfo4.getStatus().equals(2)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("借款申请", taskProcessInfo4.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo4.getStatus());
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ TaskProcessInfo taskProcessInfo5 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo5 != null && taskProcessInfo5.getStatus().equals(2)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("采购申请", taskProcessInfo5.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo5.getStatus());
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ TaskProcessInfo taskProcessInfo6 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo6 != null && taskProcessInfo6.getStatus().equals(2)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("用车申请", taskProcessInfo6.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo6.getStatus());
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 7:
|
|
|
+ TaskProcessInfo taskProcessInfo7 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo7 != null && taskProcessInfo7.getStatus().equals(2)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("发票申请", taskProcessInfo7.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo7.getStatus());
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 8:
|
|
|
+ TaskProcessInfo taskProcessInfo8 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo8 != null && taskProcessInfo8.getStatus().equals(2)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("外包支付申请", taskProcessInfo8.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo8.getStatus());
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 9:
|
|
|
+ TaskProcessInfo taskProcessInfo9 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo9 != null && taskProcessInfo9.getStatus().equals(2)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("出差申请", taskProcessInfo9.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo9.getStatus());
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 10:
|
|
|
+ TaskProcessInfo taskProcessInfo10 = jdbcTemplate.query("select status,report_user_id from c_task_process_info where id = " + approveTaskId, new BeanPropertyRowMapper<>(TaskProcessInfo.class)).stream().findAny().orElse(null);
|
|
|
+ if (taskProcessInfo10 != null && taskProcessInfo10.getStatus().equals(2)) {
|
|
|
+ //日志操作信息
|
|
|
+ planInformService.taskFinishedInform("成本测算申请", taskProcessInfo10.getReportUserId(), SecureUtil.getUserName(), taskProcessInfo10.getStatus());
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
|