[新增] 批量发起完成任务
This commit is contained in:
@@ -64,6 +64,9 @@ public class TtReportManageAct {
|
|||||||
@TableField("department")
|
@TableField("department")
|
||||||
private String department;
|
private String department;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String departmentName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 年
|
* 年
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
where t.parent_id = #{parentId}
|
where t.parent_id = #{parentId}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectIdByReport" resultType="java.lang.String">
|
<select id="selectIdByReport" resultType="java.lang.String">
|
||||||
select lab.id from ts_tree_label lab
|
select rl.label_id from
|
||||||
LEFT JOIN ts_report_label rl on lab.id = rl.label_id
|
ts_report_label rl
|
||||||
where rl.report_id = #{reportId}
|
where rl.report_id = #{reportId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<result column="keycontent" property="keyContent" />
|
<result column="keycontent" property="keyContent" />
|
||||||
<result column="maincontent" property="mainContent" />
|
<result column="maincontent" property="mainContent" />
|
||||||
<result column="department" property="department" />
|
<result column="department" property="department" />
|
||||||
|
<result column="departmentName" property="departmentName" />
|
||||||
<result column="year" property="year" />
|
<result column="year" property="year" />
|
||||||
<result column="fileId" property="fileId" />
|
<result column="fileId" property="fileId" />
|
||||||
<result column="confidentialLevel" property="confidentialLevel" />
|
<result column="confidentialLevel" property="confidentialLevel" />
|
||||||
@@ -123,9 +124,12 @@
|
|||||||
<select id="selectByDataId" resultMap="BaseResultMap">
|
<select id="selectByDataId" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
a.id,
|
a.id,
|
||||||
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
task_id, prc_id, data_id, name, keycontent, maincontent, department,
|
||||||
|
org.org_name as departmentName,
|
||||||
|
year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||||
,secrecy_last,file_name
|
,secrecy_last,file_name
|
||||||
FROM <include refid="TableName"/> a
|
FROM <include refid="TableName"/> a
|
||||||
|
LEFT JOIN ts_org org on a.department = org.id
|
||||||
<where>
|
<where>
|
||||||
data_id = #{dataId}
|
data_id = #{dataId}
|
||||||
</where>
|
</where>
|
||||||
@@ -133,9 +137,12 @@
|
|||||||
<select id="selectByPrcId" resultMap="BaseResultMap">
|
<select id="selectByPrcId" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
a.id,
|
a.id,
|
||||||
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
task_id, prc_id, data_id, name, keycontent, maincontent, department,
|
||||||
|
org.org_name as departmentName,
|
||||||
|
year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||||
,secrecy_last,file_name
|
,secrecy_last,file_name
|
||||||
FROM <include refid="TableName"/> a
|
FROM <include refid="TableName"/> a
|
||||||
|
LEFT JOIN ts_org org on a.department = org.id
|
||||||
<where>
|
<where>
|
||||||
prc_id = #{prcId}
|
prc_id = #{prcId}
|
||||||
</where>
|
</where>
|
||||||
|
|||||||
Binary file not shown.
@@ -19,8 +19,8 @@
|
|||||||
where t.parent_id = #{parentId}
|
where t.parent_id = #{parentId}
|
||||||
</select>
|
</select>
|
||||||
<select id="selectIdByReport" resultType="java.lang.String">
|
<select id="selectIdByReport" resultType="java.lang.String">
|
||||||
select lab.id from ts_tree_label lab
|
select rl.label_id from
|
||||||
LEFT JOIN ts_report_label rl on lab.id = rl.label_id
|
ts_report_label rl
|
||||||
where rl.report_id = #{reportId}
|
where rl.report_id = #{reportId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<result column="keycontent" property="keyContent" />
|
<result column="keycontent" property="keyContent" />
|
||||||
<result column="maincontent" property="mainContent" />
|
<result column="maincontent" property="mainContent" />
|
||||||
<result column="department" property="department" />
|
<result column="department" property="department" />
|
||||||
|
<result column="departmentName" property="departmentName" />
|
||||||
<result column="year" property="year" />
|
<result column="year" property="year" />
|
||||||
<result column="fileId" property="fileId" />
|
<result column="fileId" property="fileId" />
|
||||||
<result column="confidentialLevel" property="confidentialLevel" />
|
<result column="confidentialLevel" property="confidentialLevel" />
|
||||||
@@ -123,9 +124,12 @@
|
|||||||
<select id="selectByDataId" resultMap="BaseResultMap">
|
<select id="selectByDataId" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
a.id,
|
a.id,
|
||||||
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
task_id, prc_id, data_id, name, keycontent, maincontent, department,
|
||||||
|
org.org_name as departmentName,
|
||||||
|
year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||||
,secrecy_last,file_name
|
,secrecy_last,file_name
|
||||||
FROM <include refid="TableName"/> a
|
FROM <include refid="TableName"/> a
|
||||||
|
LEFT JOIN ts_org org on a.department = org.id
|
||||||
<where>
|
<where>
|
||||||
data_id = #{dataId}
|
data_id = #{dataId}
|
||||||
</where>
|
</where>
|
||||||
@@ -133,9 +137,12 @@
|
|||||||
<select id="selectByPrcId" resultMap="BaseResultMap">
|
<select id="selectByPrcId" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
a.id,
|
a.id,
|
||||||
task_id, prc_id, data_id, name, keycontent, maincontent, department, year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
task_id, prc_id, data_id, name, keycontent, maincontent, department,
|
||||||
|
org.org_name as departmentName,
|
||||||
|
year, fileId, confidentialLevel, privacyLevel, createUserId, createDate, updateDate, del_flag
|
||||||
,secrecy_last,file_name
|
,secrecy_last,file_name
|
||||||
FROM <include refid="TableName"/> a
|
FROM <include refid="TableName"/> a
|
||||||
|
LEFT JOIN ts_org org on a.department = org.id
|
||||||
<where>
|
<where>
|
||||||
prc_id = #{prcId}
|
prc_id = #{prcId}
|
||||||
</where>
|
</where>
|
||||||
|
|||||||
+36
@@ -313,6 +313,42 @@ public class TodoTaskController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "批量完成任务", notes = "流程单个节点任务,直接完成任务")
|
||||||
|
@ApiImplicitParams({@ApiImplicitParam(name = "taskId", value = "任务id"),
|
||||||
|
@ApiImplicitParam(name = "userId", value = "完成任务用户Id")})
|
||||||
|
@PostMapping("/batchCompleteTask")
|
||||||
|
public Wrapper<String> batchCompleteTask(@RequestBody List<ApproveDataVO> busMesList) {
|
||||||
|
for (ApproveDataVO busMes : busMesList) {
|
||||||
|
log.info("!!!!!!!!!!!!!TaskId!!!!!!!!!!!!!!!"+busMes.getTaskId());
|
||||||
|
String dataJson = busMes.getDataJson();
|
||||||
|
String reportId = busMes.getReportId();
|
||||||
|
if (busMes.getTaskId() != null && !busMes.getTaskId().equals("")) {
|
||||||
|
Task task = taskService.createTaskQuery().taskId(busMes.getTaskId()).singleResult();
|
||||||
|
if(task!=null){
|
||||||
|
if (StrUtil.isEmpty(task.getAssignee())) {
|
||||||
|
taskService.claim(busMes.getTaskId(), busMes.getUserId());
|
||||||
|
}
|
||||||
|
BusProcessApprove busProcessApprove = new BusProcessApprove();
|
||||||
|
busProcessApprove.setTaskId(busMes.getTaskId());
|
||||||
|
busProcessApprove.setCreateUserId(UserUtils.getUserId());
|
||||||
|
busProcessApprove.setPrcId(task.getProcessInstanceId());
|
||||||
|
busProcessApprove.setCreateDate(new Date());
|
||||||
|
busProcessApprove.setFromValsJson(busMes.getSubmitJson());
|
||||||
|
ibusProcessApproveService.save(busProcessApprove);
|
||||||
|
if (StringUtils.isNotEmpty(dataJson)){
|
||||||
|
//根据业务情况 对业务数据进行saveOrupdate
|
||||||
|
activitDefineService.saveOrUpdateDate(busMes.getPrcType(),dataJson, task.getId(),
|
||||||
|
task.getProcessInstanceId(),reportId);
|
||||||
|
}
|
||||||
|
taskService.complete(busMes.getTaskId());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new AdcDaBaseException("缺少任务id,无法完成任务");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return WrapMapper.ok();
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "查询流程编号", notes = "根据流程实例ID查询流程编号")
|
@ApiOperation(value = "查询流程编号", notes = "根据流程实例ID查询流程编号")
|
||||||
@ApiImplicitParams({@ApiImplicitParam(name = "pId", value = "流程id")})
|
@ApiImplicitParams({@ApiImplicitParam(name = "pId", value = "流程id")})
|
||||||
@GetMapping("/findPrcNumByPid")
|
@GetMapping("/findPrcNumByPid")
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user