Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
856b62fdc4
|
@ -81,6 +81,9 @@ public class AbilityCenterController {
|
|||
tAbilityApplicationDTO.setUser(abilityBatchApplicationDTO.getUser());
|
||||
tAbilityApplicationDTO.setSystem(index.get("resourceName"));
|
||||
tAbilityApplicationDTO.setEnclosure(abilityBatchApplicationDTO.getEnclosure()); // 附件
|
||||
tAbilityApplicationDTO.setUserId(abilityBatchApplicationDTO.getUserId());
|
||||
tAbilityApplicationDTO.setApproveStatus("审核中");
|
||||
tAbilityApplicationDTO.setDelFlag(0);
|
||||
// 仿照请求接口 /processForm/tabilityapplication
|
||||
ValidatorUtils.validateEntity(tAbilityApplicationDTO, AddGroup.class, DefaultGroup.class);
|
||||
tAbilityApplicationService.save(tAbilityApplicationDTO); // 写能力申请数据
|
||||
|
|
|
@ -42,6 +42,12 @@ public class TAbilityApplicationDTO implements Serializable {
|
|||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "审核状态:审核中,通过,不通过")
|
||||
private String approveStatus;
|
||||
|
||||
@ApiModelProperty(value = "删除标记:0:正常使用;1:已删除;9:其他")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty(value = "附件")
|
||||
private String enclosure;
|
||||
|
||||
|
|
|
@ -39,6 +39,12 @@ public class TAbilityBatchApplicationDTO implements Serializable {
|
|||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "审核状态:审核中,通过,不通过")
|
||||
private String approveStatus;
|
||||
|
||||
@ApiModelProperty(value = "删除标记:0:正常使用;1:已删除;9:其他")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty(value = "附件")
|
||||
private String enclosure;
|
||||
}
|
||||
|
|
|
@ -67,6 +67,15 @@ public class TAbilityApplicationEntity {
|
|||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 审核状态:审核中,通过,不通过
|
||||
*/
|
||||
private String approveStatus;
|
||||
|
||||
/**
|
||||
* 删除标记:0:正常使用;1:已删除;9:其他
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
|
|
|
@ -3,6 +3,7 @@ package io.renren.modules.processForm.listener;
|
|||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
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.service.ResourceService;
|
||||
import io.renren.modules.sys.dto.SysDeptDTO;
|
||||
|
@ -49,6 +50,8 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
|||
|
||||
@Autowired
|
||||
private ResourceService resourceService;
|
||||
@Autowired
|
||||
private TAbilityApplicationService tAbilityApplicationService;
|
||||
|
||||
@Override
|
||||
public void notify(DelegateTask delegateTask) {
|
||||
|
@ -65,12 +68,14 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
|||
|
||||
@Override
|
||||
public void notify(DelegateExecution delegateExecution) throws Exception {
|
||||
// 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.error("修改审批人成功!" + delegateExecution.getCurrentActivityId() + " " + delegateExecution.getProcessInstanceId() + " " + delegateExecution.getProcessBusinessKey());
|
||||
logger.error("----------------------进入部门审批结束节点---------------------------");
|
||||
delegateExecution.getProcessBusinessKey();
|
||||
final String eventName = delegateExecution.getEventName();
|
||||
switch (eventName) {
|
||||
case EVENTNAME_END:
|
||||
endTake(delegateExecution.getVariables());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -89,6 +94,24 @@ public class CorrectionListener implements TaskListener, ExecutionListener, Acti
|
|||
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());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 节点创建时动态分配资源部门审核人
|
||||
*
|
||||
|
|
|
@ -77,7 +77,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
// .orderByDesc("create_date")
|
||||
// .eq(StringUtils.isNotBlank(params.get("creator").toString()),"creator", params.get("creator").toString())
|
||||
// .eq("del_flag", 0);
|
||||
wrapper.orderByDesc("create_date").eq("del_flag", params.get("del_flag") == null ? 0 : Integer.valueOf(params.get("del_flag").toString()));
|
||||
wrapper.orderByDesc("create_date");
|
||||
if (!params.containsKey("creator")) {
|
||||
wrapper.eq("del_flag", params.get("del_flag") == null ? 0 : Integer.valueOf(params.get("del_flag").toString()));
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,11 +43,6 @@
|
|||
<filtered>true</filtered>
|
||||
</fileSet>
|
||||
|
||||
<!-- <fileSet>-->
|
||||
<!-- <directory>${project.basedir}/lib</directory>-->
|
||||
<!-- <outputDirectory>lib/</outputDirectory>-->
|
||||
<!-- </fileSet>-->
|
||||
|
||||
<!-- src/main/resources/config目录下配置文件打包到config目录下 -->
|
||||
<fileSet>
|
||||
<directory>src/main/resources</directory>
|
||||
|
|
Loading…
Reference in New Issue