|
@@ -92,7 +92,7 @@ public abstract class BaseFormCheckServiceAbstract implements BaseFormCheckServi
|
|
|
*/
|
|
|
private void insertNecessaryValue(Map<String, String> maps,String dataId){
|
|
|
CustomFieldTemplateData data = getById(dataId);
|
|
|
- if(CommonConstants.SB_ALLOCATE_FORM.equals(data.getRemark())){
|
|
|
+ if(data != null && CommonConstants.SB_ALLOCATE_FORM.equals(data.getRemark())){
|
|
|
SbAllocateFormActiviti activiti = JsonUtils.jsonToModel(data.getData(),SbAllocateFormActiviti.class);
|
|
|
maps.put("targetDept",activiti.getTargetDept());
|
|
|
}
|
|
@@ -171,22 +171,17 @@ public abstract class BaseFormCheckServiceAbstract implements BaseFormCheckServi
|
|
|
UserInfo user = SecurityUtils.getUserInfo();
|
|
|
if (doAudit(actAuditRequest)) {
|
|
|
if (!doCheckLast(actAuditRequest)) {
|
|
|
- //若ProjectName含有包含‘龚文林’或者projectName==null,才分配下一个节点,否则结束审批
|
|
|
- if (actAuditRequest.getOutStoreFlag()==null||(actAuditRequest.getProjectName()!=null&&actAuditRequest.getProjectName().contains("龚文林"))) {
|
|
|
- // 分配下一个节点的审批人信息
|
|
|
- Model model = repositoryService.createModelQuery().modelKey(actAuditRequest.getAuditModelKey()).singleResult();
|
|
|
- List<ActivitiUserModel> list = activitiUserModelService.getModelByModelId(model.getId());
|
|
|
- if (CollectionUtil.isEmpty(list)) {
|
|
|
- throw new BusinessException("审批节点未设置,请先设置");
|
|
|
- }
|
|
|
- Map<String, String> maps = new HashMap<>();
|
|
|
- maps.put("userId", user.getUserId());
|
|
|
- Task nextTask = taskService.createTaskQuery().processInstanceId(actAuditRequest.getProcessInstanceId()).orderByTaskCreateTime().desc().singleResult();
|
|
|
- insertNecessaryValue(maps, actAuditRequest.getId());
|
|
|
- modifyTaskAssign(model.getId(), maps, nextTask, list);
|
|
|
- }else {
|
|
|
- doFinish(actAuditRequest);
|
|
|
+ // 分配下一个节点的审批人信息
|
|
|
+ Model model = repositoryService.createModelQuery().modelKey(actAuditRequest.getAuditModelKey()).singleResult();
|
|
|
+ List<ActivitiUserModel> list = activitiUserModelService.getModelByModelId(model.getId());
|
|
|
+ if (CollectionUtil.isEmpty(list)) {
|
|
|
+ throw new BusinessException("审批节点未设置,请先设置");
|
|
|
}
|
|
|
+ Map<String, String> maps = new HashMap<>();
|
|
|
+ maps.put("userId", user.getUserId());
|
|
|
+ Task nextTask = taskService.createTaskQuery().processInstanceId(actAuditRequest.getProcessInstanceId()).orderByTaskCreateTime().desc().singleResult();
|
|
|
+ insertNecessaryValue(maps, actAuditRequest.getId());
|
|
|
+ modifyTaskAssign(model.getId(), maps, nextTask, list);
|
|
|
} else {
|
|
|
doFinish(actAuditRequest);
|
|
|
}
|