Commit 9eafd313 authored by xixinzhao's avatar xixinzhao

审核修改

parent af537682
......@@ -16,9 +16,10 @@ public interface IPowerStationService {
/**
* 保存审核实例
* @param powerStation 审核对象
* @param flag 是否是最后一个节点
* @return 状态
*/
boolean savePowerStation(PowerStation powerStation);
boolean savePowerStation(PowerStation powerStation, boolean flag);
/**
......
......@@ -77,23 +77,20 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
@Override
@Transactional
public boolean savePowerStation(PowerStation powerStation) {
try{ //流程节点code
String flowTaskIdnext=this.getTaskNoAuth(powerStation.getProcessInstanceId());
public boolean savePowerStation(PowerStation powerStation, boolean flag) {
try{
//流程节点code
if (flag) {
String flowTaskIdnext = this.getTaskNoAuth(powerStation.getProcessInstanceId());
WorkDto workDto=this.getNodeInfoCode(flowTaskIdnext);
powerStation.setNextProcessNode(workDto.getNextProcessNode());
powerStation.setNodeRole(workDto.getNodeRole());
powerStation.setNodeRouting(workDto.getNodeRouting());
}
return this.saveOrUpdate(powerStation);
}catch (Exception e){
throw new BaseException("获取工作流节点失败!","400","获取工作流节点失败!");
}
}
@Override
......@@ -110,10 +107,9 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// 1. 业务相关数据落表
PowerStation powerStation = this.baseMapper.selectById(stationId);
PowerStationNodeEnum nodeByCode = PowerStationNodeEnum.getNodeByCode(nodeCode);
boolean flag = true;
if (PowerStationNodeEnum.设计上传图纸.getCode().equals(nodeCode)||PowerStationNodeEnum.经销商上传图纸.getCode().equals(nodeCode)) {
this.updateSeve(powerStation.getPeasantHouseholdId(),kv);
} else {
String result = String.valueOf(kv.get("VERIFY_RESULT"));
if (VERIFY_RESULT_NO.equals(result)) {
......@@ -132,6 +128,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
break;
case 文件审核:
if (VERIFY_RESULT_YES.equals(result)) {
flag = false;
powerStation.setProcessStatus(PowerStationProcessStateEnum.完成.getName());
}
powerStation.setDrawingReview(resultObj.getName());
......@@ -155,15 +152,8 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
JSONObject resultObj = record.getResult();
String flowTaskId = String.valueOf(resultObj.get("flowTaskId"));
powerStation.setFlowTaskId(flowTaskId);
//流程节点code
String flowTaskIdnext=this.getTaskNoAuth(planInstanceId);
WorkDto workDto=this.getNodeInfoCode(flowTaskIdnext);
powerStation.setNextProcessNode(workDto.getNextProcessNode());
powerStation.setNodeRole(workDto.getNodeRole());
powerStation.setNodeRouting(workDto.getNodeRouting());
}
powerStationService.savePowerStation(powerStation);
powerStationService.savePowerStation(powerStation, flag);
}
}catch (Exception e){
throw new BaseException("获取工作流节点失败!","400","获取工作流节点失败!");
......
......@@ -233,7 +233,7 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
powerStation.setFlowTaskId(flowTaskId);
powerStation.setNextProcessNode(PowerStationNodeEnum.设计审核.getCode());
}
powerStationService.savePowerStation(powerStation);
powerStationService.savePowerStation(powerStation, true);
}
} catch (Exception e){
throw new BaseException("获取工作流节点失败!","400","获取工作流节点失败!");
......
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