Commit 9eafd313 authored by xixinzhao's avatar xixinzhao

审核修改

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