Merge branch 'develop' into FOTON
This commit is contained in:
+7
@@ -61,9 +61,16 @@ public class WebServiceOAController extends BaseAction {
|
||||
@Autowired
|
||||
private WebServiceOAService webServiceOAService;
|
||||
|
||||
@ApiOperation(value = "强制撤回", notes = "强制撤回")
|
||||
@GetMapping("/deleteOAByMandatory")
|
||||
public void deleteOAByMandatory(String todoId,String assignee) {
|
||||
webServiceOAService.deleteOAByMandatory(todoId,assignee);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "发送待办接口(")
|
||||
@PostMapping("/sendTodo")
|
||||
public NotifyTodoAppResult sendTodo() throws Exception{
|
||||
return webServiceOAService.sendTodo(new BusProcessNew());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -12,6 +12,8 @@ public interface WebServiceOAService {
|
||||
|
||||
void deleteOAByPid(String pId);
|
||||
|
||||
void deleteOAByMandatory(String todoId,String assignee);
|
||||
|
||||
void deleteOAByTaskIdResetTodo(BusProcessNew busProcessNew,String assignee);
|
||||
|
||||
void completeOA(Task task);
|
||||
|
||||
+45
@@ -76,6 +76,51 @@ public class WebServiceOAServiceImpl implements WebServiceOAService {
|
||||
credentials = Credentials.basic(api_key,api_secret);
|
||||
}
|
||||
|
||||
/**
|
||||
* 单个删除OA待办 业务处理
|
||||
*/
|
||||
@Override
|
||||
@Async
|
||||
public void deleteOAByMandatory(String todoId,String assignee){
|
||||
CreateMQService oaService = SpringContextUtil.getBean(CreateMQService.class);
|
||||
log.info("--------------------------ESP 发送删除待办任务 及 再次发送待办----------------------------");
|
||||
|
||||
if(StringUtils.isNotBlank(todoId) && StringUtils.isNotBlank(assignee)){
|
||||
|
||||
QueryWrapper wrapper = new QueryWrapper();
|
||||
wrapper.eq("TODO_ID",todoId);
|
||||
wrapper.eq("MSG_TYPE","0");
|
||||
List<SendTodoLog> list = sendTodoLogMapper.selectList(wrapper);
|
||||
if(!list.isEmpty()){
|
||||
net.sf.json.JSONObject fromObject = net.sf.json.JSONObject.fromObject(list.get(0).getMesg());
|
||||
net.sf.json.JSONObject jsonObjectFilter = net.sf.json.JSONObject.fromObject(list.get(0).getMesg());
|
||||
jsonObjectFilter = jsonObjectFilter.discard("PId");
|
||||
jsonObjectFilter.put("pid",fromObject.getString("PId"));
|
||||
BusProcessNew object = JSON.parseObject(jsonObjectFilter.toString(),BusProcessNew.class);
|
||||
|
||||
List<NotifyTodoSendContext> notifyTodoSendContexts = new ArrayList<>();
|
||||
NotifyTodoSendContext notifyTodoSendContext = new NotifyTodoSendContext();
|
||||
notifyTodoSendContext.setAppName("SRMS");
|
||||
notifyTodoSendContext.setModelId(todoId);
|
||||
notifyTodoSendContext.setModelName(object.getTaskInfo());
|
||||
notifyTodoSendContext.setType("1");
|
||||
notifyTodoSendContext.setOptType("2");
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
ResponseMessage<UserVO> byId = lawsUserInfoService.getById(assignee);
|
||||
map.put("LoginName",byId == null ? "" : byId.getData().getAccount());
|
||||
JSONObject jsonLoginName = new JSONObject(map);
|
||||
notifyTodoSendContext.setTargets(jsonLoginName.toJSONString());
|
||||
notifyTodoSendContext.setUserId(assignee);
|
||||
notifyTodoSendContexts.add(notifyTodoSendContext);
|
||||
Map<String,Object> objectMap = new TreeMap<>();
|
||||
objectMap.put("todoId",todoId);
|
||||
objectMap.put("list",notifyTodoSendContexts);
|
||||
net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(objectMap);
|
||||
oaService.setTodoDeleteMq(jsonObject.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 单个删除OA待办 及 重发待办
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user