|
@@ -56,6 +56,47 @@ public class IHangUpController extends BaseController {
|
|
|
@Value("${serviceUrl.z_workflow}")
|
|
|
String workflowUrl;
|
|
|
|
|
|
+ @RequestMapping
|
|
|
+ @ResponseBody
|
|
|
+ public String getExample(String activityInstanceId, Integer isRecover, Integer isMobile, String participantId, Integer extranet) {
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ AdminUserRespDTO user;
|
|
|
+ Integer status = isRecover == 1 ? HangUpTypeEnum.IS_HANGUP.getStatus() : HangUpTypeEnum.NO_HANGUP.getStatus();
|
|
|
+ IHangUp iHangUp = iHangUpService.findByHangUpActivityInstanceId(activityInstanceId, status); //未作废
|
|
|
+ if (StringUtils.isBlank(iHangUp.getId())) {
|
|
|
+ user = callInterfaceService.getUserByUserId(Constant.getUserId());
|
|
|
+ iHangUp.setHangUpActivityInstanceId(activityInstanceId);
|
|
|
+ iHangUp.setFlowInstanceId(UUID.hex32());
|
|
|
+ iHangUp.setHangupApplyUserId(Constant.getUserId());
|
|
|
+ iHangUp.setHangupApplyTime(new Date());
|
|
|
+ iHangUp.setParticipantId(participantId);
|
|
|
+ } else {
|
|
|
+ user = callInterfaceService.getUserByUserId(iHangUp.getHangupApplyUserId());
|
|
|
+ }
|
|
|
+ map.put("userName", user.getNickname());
|
|
|
+ map.put("hangUpEntity", iHangUp);
|
|
|
+ map.put("isRecover", isRecover); //是否解挂页
|
|
|
+ map.put("isDirect", 0); //是否直接挂起
|
|
|
+ map.put("btnName", "保存");
|
|
|
+ map.put("tmpId", "");
|
|
|
+ map.put("tempName", "");
|
|
|
+ if (isRecover == 0) {
|
|
|
+ Boolean isFirstNode = iActivityInstanceService.isFirstNode(activityInstanceId);
|
|
|
+ Boolean isSystem = iFlowInstanceService.isSystemByAcitivityInstanceId(activityInstanceId);
|
|
|
+ TFlowTemplate template = iHangUpService.getHangUpFlowTemplate();
|
|
|
+ if (isSystem || isFirstNode) {
|
|
|
+ map.replace("isDirect", 1);
|
|
|
+ map.replace("btnName", "直接挂起");
|
|
|
+ } else {
|
|
|
+ map.replace("btnName", "启动挂起流程");
|
|
|
+ }
|
|
|
+ if (template != null) {
|
|
|
+ map.replace("tmpId", template.getId());
|
|
|
+ map.replace("tempName", template.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return ok(map);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 编辑申请信息页面
|