资源所有者审核通过后 资源申请审核状态变化

This commit is contained in:
wangliwen 2022-05-07 10:18:39 +08:00
parent 3fe2162412
commit 3d9e860a46
6 changed files with 53 additions and 11 deletions

View File

@ -81,6 +81,9 @@ public class AbilityCenterController {
tAbilityApplicationDTO.setUser(abilityBatchApplicationDTO.getUser()); tAbilityApplicationDTO.setUser(abilityBatchApplicationDTO.getUser());
tAbilityApplicationDTO.setSystem(index.get("resourceName")); tAbilityApplicationDTO.setSystem(index.get("resourceName"));
tAbilityApplicationDTO.setEnclosure(abilityBatchApplicationDTO.getEnclosure()); // 附件 tAbilityApplicationDTO.setEnclosure(abilityBatchApplicationDTO.getEnclosure()); // 附件
tAbilityApplicationDTO.setUserId(abilityBatchApplicationDTO.getUserId());
tAbilityApplicationDTO.setApproveStatus("审核中");
tAbilityApplicationDTO.setDelFlag(0);
// 仿照请求接口 /processForm/tabilityapplication // 仿照请求接口 /processForm/tabilityapplication
ValidatorUtils.validateEntity(tAbilityApplicationDTO, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(tAbilityApplicationDTO, AddGroup.class, DefaultGroup.class);
tAbilityApplicationService.save(tAbilityApplicationDTO); // 写能力申请数据 tAbilityApplicationService.save(tAbilityApplicationDTO); // 写能力申请数据

View File

@ -42,6 +42,12 @@ public class TAbilityApplicationDTO implements Serializable {
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
private String userId; private String userId;
@ApiModelProperty(value = "审核状态:审核中,通过,不通过")
private String approveStatus;
@ApiModelProperty(value = "删除标记0:正常使用1:已删除9:其他")
private Integer delFlag;
@ApiModelProperty(value = "附件") @ApiModelProperty(value = "附件")
private String enclosure; private String enclosure;

View File

@ -39,6 +39,12 @@ public class TAbilityBatchApplicationDTO implements Serializable {
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
private String userId; private String userId;
@ApiModelProperty(value = "审核状态:审核中,通过,不通过")
private String approveStatus;
@ApiModelProperty(value = "删除标记0:正常使用1:已删除9:其他")
private Integer delFlag;
@ApiModelProperty(value = "附件") @ApiModelProperty(value = "附件")
private String enclosure; private String enclosure;
} }

View File

@ -67,6 +67,15 @@ public class TAbilityApplicationEntity {
*/ */
private String userId; private String userId;
/**
* 审核状态审核中通过不通过
*/
private String approveStatus;
/**
* 删除标记0:正常使用1:已删除9:其他
*/
private Integer delFlag;
/** /**
* 附件 * 附件

View File

@ -3,6 +3,7 @@ package io.renren.modules.processForm.listener;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
import io.renren.modules.processForm.service.TAbilityApplicationService;
import io.renren.modules.resource.dto.ResourceDTO; import io.renren.modules.resource.dto.ResourceDTO;
import io.renren.modules.resource.service.ResourceService; import io.renren.modules.resource.service.ResourceService;
import io.renren.modules.sys.dto.SysDeptDTO; import io.renren.modules.sys.dto.SysDeptDTO;
@ -49,6 +50,8 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
@Autowired @Autowired
private ResourceService resourceService; private ResourceService resourceService;
@Autowired
private TAbilityApplicationService tAbilityApplicationService;
@Override @Override
public void notify(DelegateTask delegateTask) { public void notify(DelegateTask delegateTask) {
@ -65,12 +68,14 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
@Override @Override
public void notify(DelegateExecution delegateExecution) throws Exception { public void notify(DelegateExecution delegateExecution) throws Exception {
// logger.error("事件:" + delegateExecution.getEventName()); logger.error("----------------------进入部门审批结束节点---------------------------");
// delegateExecution.getVariableNames().stream().forEach(index -> logger.error("variable:" + index)); delegateExecution.getProcessBusinessKey();
// delegateExecution.getVariables().values().stream().filter(index -> index != null).forEach(value -> logger.error(value.toString())); final String eventName = delegateExecution.getEventName();
// // taskService.setAssignee(delegateExecution.getProcessInstanceId(), "1516307964617076737");// 可以设置 switch (eventName) {
// case EVENTNAME_END:
// logger.error("修改审批人成功!" + delegateExecution.getCurrentActivityId() + " " + delegateExecution.getProcessInstanceId() + " " + delegateExecution.getProcessBusinessKey()); endTake(delegateExecution.getVariables());
break;
}
} }
@Override @Override
@ -89,6 +94,24 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
logger.error("异常", delegateExecution); logger.error("异常", delegateExecution);
} }
/**
* 结束审批
*
* @param kv
*/
private void endTake(Map<String, Object> kv) { // 进入最后结束节点
Gson gson = new Gson();
JsonElement jsonElement = gson.toJsonTree(kv);
TAbilityApplicationDTO abilityApplicationDTO = gson.fromJson(jsonElement, TAbilityApplicationDTO.class);
if (abilityApplicationDTO != null) {
abilityApplicationDTO.setDelFlag(0);
abilityApplicationDTO.setApproveStatus("通过");
tAbilityApplicationService.update(abilityApplicationDTO);
logger.error("审批通过申请id:" + abilityApplicationDTO.getId());
}
}
/** /**
* 节点创建时动态分配资源部门审核人 * 节点创建时动态分配资源部门审核人
* *

View File

@ -43,11 +43,6 @@
<filtered>true</filtered> <filtered>true</filtered>
</fileSet> </fileSet>
<!-- <fileSet>-->
<!-- <directory>${project.basedir}/lib</directory>-->
<!-- <outputDirectory>lib/</outputDirectory>-->
<!-- </fileSet>-->
<!-- src/main/resources/config目录下配置文件打包到config目录下 --> <!-- src/main/resources/config目录下配置文件打包到config目录下 -->
<fileSet> <fileSet>
<directory>src/main/resources</directory> <directory>src/main/resources</directory>