|
@@ -214,13 +214,15 @@ public class FlowController {
|
|
|
@RequestMapping(value = "strartFlow")
|
|
|
@ResponseBody
|
|
|
@Log
|
|
|
- public BaseResult strartFlow(@RequestParam String menuId,
|
|
|
+ public BaseResult strartFlow(HttpServletRequest request,
|
|
|
+ @RequestParam String menuId,
|
|
|
@RequestParam String companyId,
|
|
|
@RequestParam String businessKey,
|
|
|
@RequestParam String sessionUserId,
|
|
|
@RequestParam String name,
|
|
|
@RequestParam(value = "paras") String paras
|
|
|
){
|
|
|
+ LoginUser loginUser = tokenService.getUser(request);
|
|
|
BaseResult result = new BaseResult();
|
|
|
Map<String, Object> m = new HashMap<>();
|
|
|
m.put("menuId", menuId);
|
|
@@ -249,7 +251,7 @@ public class FlowController {
|
|
|
paras = paras.replaceAll("\\:,", "\\:null,");
|
|
|
Map<String, Object> p = JSONObject.fromObject(paras);
|
|
|
String processId = String.valueOf(conf.get("procdefId"));
|
|
|
- ProcessInstance processInstance = flowProcess.startFlow(processId, p, sessionUserId, name, businessKey);
|
|
|
+ ProcessInstance processInstance = flowProcess.startFlow(processId, p, sessionUserId, name, businessKey, loginUser.getSysUser().getCompanyId());
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -278,6 +280,30 @@ public class FlowController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 本公司历史任务
|
|
|
+ * @param pageNum 页码
|
|
|
+ * @param pageSize 每页体术
|
|
|
+ * @return BaseResult
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "myCompanyTask")
|
|
|
+ @ResponseBody
|
|
|
+ @Log
|
|
|
+ public BaseResult getMyCompanyTask(HttpServletRequest request,
|
|
|
+ @RequestParam(value = "excutionName", required = false) String excutionName,
|
|
|
+ @RequestParam(value = "processDefName", required = false) String processDefName,
|
|
|
+ @RequestParam("pageNum") int pageNum,
|
|
|
+ @RequestParam("pageSize") int pageSize) throws Exception{
|
|
|
+ LoginUser loginUser = tokenService.getUser(request);
|
|
|
+ Map<String, Object> param = new HashMap<>();
|
|
|
+ param.put("excutionName", excutionName);
|
|
|
+ param.put("processDefName", processDefName);
|
|
|
+ if (StringUtils.isEmpty(String.valueOf(loginUser.getSysUser().getStaffCode()))){
|
|
|
+ throw new Exception("暂无绑定员工");
|
|
|
+ }
|
|
|
+ return flowProcess.getMyCompanyTask(loginUser.getSysUser().getCompanyId(), param, pageNum, pageSize);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 终止流程
|
|
|
* @param processInstanceId 流程实例id
|
|
|
* @param reason 终止原因
|
|
@@ -431,6 +457,7 @@ public class FlowController {
|
|
|
HttpServletRequest request
|
|
|
)
|
|
|
throws Exception {
|
|
|
+ System.out.println(System.currentTimeMillis() + "===completeTask");
|
|
|
// 修改表数据方案待定 TODO
|
|
|
System.out.println(formData);
|
|
|
LoginUser user = tokenService.getUser(request);
|
|
@@ -529,7 +556,6 @@ public class FlowController {
|
|
|
|
|
|
// 查询意见
|
|
|
List<Comment> commentEntityList = taskService.getProcessInstanceComments(processId);
|
|
|
-
|
|
|
for (Map<String, Object> data : resList) {
|
|
|
for (Comment comment : commentEntityList) {
|
|
|
System.out.println(comment.getTaskId() + " " + data.get("id"));
|