...
This commit is contained in:
parent
e0c38aca8e
commit
d533df53c0
|
@ -47,7 +47,8 @@ public class TDemandDataController {
|
|||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "creator", value = "创建者id", paramType = "query", dataType = "Long"),
|
||||
@ApiImplicitParam(name = "flag", value = "状态", paramType = "query", dataType = "Int")
|
||||
@ApiImplicitParam(name = "flag", value = "状态", paramType = "query", dataType = "Int"),
|
||||
@ApiImplicitParam(name = "detailsType", value = "需求类型", paramType = "query", dataType = "String")
|
||||
})
|
||||
// @RequiresPermissions("demanData:tdemanddata:page")
|
||||
public Result<PageData<TDemandDataDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
|
|
|
@ -63,7 +63,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
@Override
|
||||
public void notify(DelegateTask delegateTask) {
|
||||
logger.error("----------------------进入能力需求受理者1节点---------------------------");
|
||||
logger.info("事件类型:" + delegateTask.getEventName());
|
||||
logger.error("事件类型:" + delegateTask.getEventName());
|
||||
SysRoleDTO roleDTO = sysRoleService.getByName(roleName);
|
||||
logger.error("roleDTOId:" + roleDTO.getId());
|
||||
final String eventName = delegateTask.getEventName();
|
||||
|
@ -75,7 +75,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
complete(delegateTask);
|
||||
break;
|
||||
default:
|
||||
logger.info("未处理该事件:" + eventName);
|
||||
logger.error("未处理该事件:" + eventName);
|
||||
}
|
||||
logger.error("----------------------结束能力需求受理者1节点---------------------------");
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class);
|
||||
|
||||
if (demandDataDTO != null) {
|
||||
logger.info(JSONObject.toJSONString(demandDataDTO));
|
||||
logger.error(JSONObject.toJSONString(demandDataDTO));
|
||||
SysDeptDTO deptDTO =
|
||||
sysDeptService.get(Long.valueOf(demandDataDTO.getApplyUserDeptId()));
|
||||
SysUserDTO userDTO = null;
|
||||
|
@ -129,25 +129,24 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
taskService.setAssignee(delegateTask.getId(), "1513432847327199233");
|
||||
}
|
||||
} else { // 填入大数据审批人
|
||||
logger.info("大数据局名称:" + bigDateDeptName);
|
||||
logger.error("大数据局名称:" + bigDateDeptName);
|
||||
SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName);
|
||||
logger.info("roleDTOId:" + roleDTO.getId());
|
||||
logger.error("roleDTOId:" + roleDTO.getId());
|
||||
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId());
|
||||
|
||||
if (userDTO != null) {
|
||||
logger.info("大数据审批人id:" + userDTO.getId());
|
||||
logger.error("大数据审批人id:" + userDTO.getId());
|
||||
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
|
||||
} else {
|
||||
taskService.setAssignee(delegateTask.getId(), "1513432847327199233");
|
||||
logger.info("未查到大数据部门对应 " + roleName);
|
||||
|
||||
logger.error("未查到大数据部门对应 " + roleName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void complete(DelegateTask delegateTask) {
|
||||
logger.info("---------------------------流程节点完成---------------------------------");
|
||||
logger.error("---------------------------流程节点完成---------------------------------");
|
||||
Map<String, Object> kv = delegateTask.getVariables();
|
||||
GsonBuilder builder = new GsonBuilder();
|
||||
builder.registerTypeAdapter(Date.class, new JsonDeserializer<Date>() {
|
||||
|
@ -161,9 +160,17 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class);
|
||||
|
||||
if (demandDataDTO != null) {
|
||||
logger.info(JSONObject.toJSONString(demandDataDTO));
|
||||
tDemandDataService.updateFlag(3, demandDataDTO.getId());// 更新状态为已审批通过
|
||||
logger.info("---------------------------更新状态为已审批通过---------------------------------");
|
||||
logger.error(JSONObject.toJSONString(demandDataDTO));
|
||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(delegateTask.getAssignee()));
|
||||
taskService.getTaskComments(delegateTask.getId());
|
||||
// tDemandDataService.updateFlag(3, demandDataDTO.getId());// 更新状态为已审批通过
|
||||
demandDataDTO.setFlag(3);
|
||||
demandDataDTO.setApprovalUserDeptName(userDTO != null ? userDTO.getDeptName() : null);
|
||||
demandDataDTO.setApprovalUserName(userDTO != null ? userDTO.getRealName() : null);
|
||||
demandDataDTO.setApprovalOpinions(taskService.getTaskComments(delegateTask.getId()).stream().findFirst().get().getFullMessage());
|
||||
logger.error("---------------------------更新状态为已审批通过---------------------------------");
|
||||
logger.error("demandDataDTO:" + demandDataDTO);
|
||||
tDemandDataService.update(demandDataDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,9 @@ public class TDemandDataServiceImpl extends CrudServiceImpl<TDemandDataDao, TDem
|
|||
case "flag":
|
||||
wrapper.eq("flag", params.get("flag"));
|
||||
break;
|
||||
case "detailsType":
|
||||
wrapper.eq("detailsType", params.get("detailsType"));
|
||||
break;
|
||||
}
|
||||
});
|
||||
if (!params.containsKey("creator")) {
|
||||
|
@ -47,6 +50,6 @@ public class TDemandDataServiceImpl extends CrudServiceImpl<TDemandDataDao, TDem
|
|||
|
||||
@Override
|
||||
public void updateFlag(Integer flag, Long id) {
|
||||
|
||||
baseDao.updateFlag(flag, id);
|
||||
}
|
||||
}
|
|
@ -65,18 +65,18 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
|||
|
||||
@Override
|
||||
public void notify(DelegateExecution delegateExecution) throws Exception {
|
||||
// logger.info("事件:" + delegateExecution.getEventName());
|
||||
// delegateExecution.getVariableNames().stream().forEach(index -> logger.info("variable:" + index));
|
||||
// delegateExecution.getVariables().values().stream().filter(index -> index != null).forEach(value -> logger.info(value.toString()));
|
||||
// logger.error("事件:" + delegateExecution.getEventName());
|
||||
// delegateExecution.getVariableNames().stream().forEach(index -> logger.error("variable:" + index));
|
||||
// delegateExecution.getVariables().values().stream().filter(index -> index != null).forEach(value -> logger.error(value.toString()));
|
||||
// // taskService.setAssignee(delegateExecution.getProcessInstanceId(), "1516307964617076737");// 可以设置
|
||||
//
|
||||
// logger.info("修改审批人成功!" + delegateExecution.getCurrentActivityId() + " " + delegateExecution.getProcessInstanceId() + " " + delegateExecution.getProcessBusinessKey());
|
||||
// logger.error("修改审批人成功!" + delegateExecution.getCurrentActivityId() + " " + delegateExecution.getProcessInstanceId() + " " + delegateExecution.getProcessBusinessKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEvent(ActivitiEvent activitiEvent) { // 事件回调
|
||||
logger.info("事件类型:" + activitiEvent.getType().toString());
|
||||
logger.info("" + activitiEvent.getProcessDefinitionId());
|
||||
logger.error("事件类型:" + activitiEvent.getType().toString());
|
||||
logger.error("" + activitiEvent.getProcessDefinitionId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -86,7 +86,7 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
|||
|
||||
@Override
|
||||
public void execute(DelegateExecution delegateExecution) throws Exception {
|
||||
logger.info("异常", delegateExecution);
|
||||
logger.error("异常", delegateExecution);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue