Commit 31f21084 authored by xixinzhao's avatar xixinzhao

审核更新

parent 698d098d
......@@ -115,4 +115,10 @@ public class PowerStation extends BaseEntity {
*/
@TableField("next_process_node")
private String nextProcessNode;
/**
* 当前流程节点
*/
@TableField("flow_task_id")
private String flowTaskId;
}
package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationNodeEnum;
import com.yeejoin.amos.boot.module.hygf.api.Enum.PowerStationProcessStateEnum;
......@@ -109,6 +110,13 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
if (IDX_REQUEST_STATE.equals(String.valueOf(submit.getStatus()))) {
code = submit.getResult();
log.info("流程执行成功:{}", code);
// 获取流程信息
FeignClientResult<JSONObject> record = idxFeginService.getRecord(code);
if (IDX_REQUEST_STATE.equals(String.valueOf(record.getStatus()))) {
JSONObject resultObj = record.getResult();
String flowTaskId = String.valueOf(resultObj.get("flowTaskId"));
powerStation.setFlowTaskId(flowTaskId);
}
powerStationService.savePowerStation(powerStation);
}
}catch (Exception e){
......
......@@ -188,14 +188,13 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
PowerStation powerStation = powerStationService.getObjByNhId(String.valueOf(peasantHousehold.getSequenceNbr()), PowerStationProcessStateEnum.作废.getCode());
String taskId = null;
Map<String, Object> objectMap = new HashMap<>();
Map<String, Object> objectMap = new HashMap<>(1);
objectMap.put("describe", "经销商已上传信息");
if (ObjectUtils.isNotEmpty(powerStation)) {
// 工作流执行一步
taskId = powerStation.getTaskId();
objectMap.put("approveStatus", "yes");
} else {
// 第一步启动工作流
objectMap.put("approveStatus", "yes");
powerStation = new PowerStation();
}
// 保存并审核
......@@ -218,8 +217,10 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
JSONObject resultObj = record.getResult();
String taskIdNew = String.valueOf(resultObj.get("taskId"));
String processInstanceId = String.valueOf(resultObj.get("processInstanceId"));
String flowTaskId = String.valueOf(resultObj.get("flowTaskId"));
powerStation.setTaskId(taskIdNew);
powerStation.setProcessInstanceId(processInstanceId);
powerStation.setFlowTaskId(flowTaskId);
}
powerStationService.savePowerStation(powerStation);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment