Commit 3fec433b authored by hezhuozhi's avatar hezhuozhi

修改待办

parent 5ac4e7c6
......@@ -35,6 +35,28 @@ public interface TaskV2FeignService {
* @return TaskV2Model
* @throws InnerInvokException e
*/
@RequestMapping(value = "/batch/addString", method = RequestMethod.POST)
FeignClientResult<List<TaskV2Model>> batchAddString(@RequestBody String modelList) throws InnerInvokException;
/**
* 批量新增任务
*
* @param modelList 新增待办
* @return TaskV2Model
* @throws InnerInvokException e
*/
@RequestMapping(value = "/batch/addString", method = RequestMethod.POST)
FeignClientResult<List<TaskV2Model>> batchAddStringNew(@RequestHeader(name = "appKey", required = true) String appKey,
@RequestHeader(name = "product", required = true) String product,
@RequestHeader(name = "token", required = true) String token,
@RequestBody String modelList) throws InnerInvokException;
/**
* 批量新增任务
*
* @param modelList 新增待办
* @return TaskV2Model
* @throws InnerInvokException e
*/
@RequestMapping(value = "/batch/add", method = RequestMethod.POST)
FeignClientResult<List<TaskV2Model>> batchAddNew(@RequestHeader(name = "appKey", required = true) String appKey,
@RequestHeader(name = "product", required = true) String product,
......@@ -87,4 +109,10 @@ public interface TaskV2FeignService {
*/
@RequestMapping(value = "/batch/update", method = RequestMethod.PUT)
FeignClientResult<List<TaskV2Model>> batchUpdate(@RequestBody List<TaskV2Model> modelList) throws InnerInvokException;
/**
* 批量修改任务
*/
@RequestMapping(value = "/batch/updateString", method = RequestMethod.PUT)
FeignClientResult<List<TaskV2Model>> batchUpdateString(@RequestBody String modelList) throws InnerInvokException;
}
......@@ -221,9 +221,9 @@ public class CommonServiceImpl {
}
//如果使用的是机器人则使用机器人的token、appkey、product进行调用
if (amosRequestContext.getUserId().equals(RequestContext.getExeUserId())) {
taskV2FeignService.batchAddNew(amosRequestContext.getAppKey(), amosRequestContext.getProduct(), amosRequestContext.getToken(), taskV2Models);
taskV2FeignService.batchAddStringNew(amosRequestContext.getAppKey(), amosRequestContext.getProduct(), amosRequestContext.getToken(), JSONArray.toJSONString(taskV2Models));
} else {
taskV2FeignService.batchAdd(taskV2Models);
taskV2FeignService.batchAddString(JSONArray.toJSONString(taskV2Models));
}
}catch (Exception e){
log.error(e.getMessage(),e);
......@@ -297,7 +297,7 @@ public class CommonServiceImpl {
taskV2Model.setFlowStatusLabel((FlowStatusEnum.TO_BE_FINISHED.getName()));
taskV2Model.setFlowStatus(FlowStatusEnum.TO_BE_FINISHED.getCode());
}
taskV2FeignService.batchUpdate(collect);
taskV2FeignService.batchUpdateString(JSONArray.toJSONString(collect));
} else {
collect.get(0).setRoutePath(collect.get(0).getRoutePath().replace("roleIds=", "roleIds=55555&fq="));
taskV2FeignService.update(collect.get(0), collect.get(0).getSequenceNbr());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment