1.技术监督调整

This commit is contained in:
cdf
2024-03-12 16:33:17 +08:00
parent 209393ad3c
commit bef44e6d96
3 changed files with 124 additions and 114 deletions

View File

@@ -54,7 +54,7 @@ public class ThsSuperviseController extends BaseController {
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
/* @OperateInfo(info = LogEnum.BUSINESS_COMMON)
@ApiOperation("预警/告警事务生成手动")
@ApiImplicitParam(name = "superviseParam", value = "创建技术监督参数", required = true)
@PostMapping("/initSuperviseHand")
@@ -63,7 +63,7 @@ public class ThsSuperviseController extends BaseController {
SuperviceRunLogVo result = thsSuperviseService.initSuperviseHand(superviseParam);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
*/
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@ApiOperation("预警/告警事务生成自动")

View File

@@ -116,7 +116,7 @@ public interface ThsSuperviseService extends IService<ThsSupervise> {
SuperviceRunLogVo initSupervise(@RequestBody @Validated SuperviseParam superviseParam);
SuperviceRunLogVo initSuperviseHand(@RequestBody @Validated SuperviseParam superviseParam);
//SuperviceRunLogVo initSuperviseHand(@RequestBody @Validated SuperviseParam superviseParam);
Page<ThsSupervise> queryPage(ThsSuperviseParam thsSuperviseParam);

View File

@@ -26,6 +26,7 @@ import com.njcn.harmonic.pojo.vo.ThsStrategyVo;
import com.njcn.oss.constant.OssPath;
import com.njcn.oss.utils.FileStorageUtil;
import com.njcn.prepare.harmonic.pojo.dto.SuperviseDto;
import com.njcn.process.api.FlowableDefineFeignClient;
import com.njcn.process.pojo.param.SuperviseParam;
import com.njcn.process.pojo.po.ThsOverRunLog;
import com.njcn.process.pojo.po.ThsSupervise;
@@ -95,9 +96,6 @@ import static com.njcn.process.enums.SteadyIndicatorEnum.Negative_Voltage;
public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, ThsSupervise> implements ThsSuperviseService {
private final ThsWarnStrategyMapper thsWarnStrategyMapper;
private final ThsWarnStrategyAssMapper thsWarnStrategyAssMapper;
@@ -125,6 +123,8 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
private final FlowableAssMapper flowableAssMapper;
private final IFlowDefinitionService flowDefinitionService;
private final ThsDeptMonitorMapper thsDeptMonitorMapper;
private final CommTerminalGeneralClient commTerminalGeneralClient;
@@ -411,8 +411,6 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
thsAlarmFormworkMapper.insert(alarmFormwork);
}
@Override
@@ -424,8 +422,11 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
throw new BusinessException("请先上传下发单模板单据!");
}
String fileUrl = fileStorageUtil.getFileUrl(thsAlarmFormwork.getPath());
ThsSupervise thsSupervise = new ThsSupervise();
thsSupervise.setModifyTime(new Date());
thsSupervise.setModifyUser(RequestUtil.getUserIndex());
ThsOverRunLog thsOverRunLog = new ThsOverRunLog();
thsOverRunLog.setSupIndex(supIndex);
if (FormworkTypeEnum.ALARM_TICKET.getCode().equals(formworkType)) {
@@ -439,6 +440,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
thsOverRunLogService.update(thsOverRunLog, new LambdaQueryWrapper<ThsOverRunLog>().eq(ThsOverRunLog::getSupIndex, supIndex));
thsSuperviseMapper.update(thsSupervise, new LambdaQueryWrapper<ThsSupervise>().eq(ThsSupervise::getSupIndex, supIndex));
FlowableAss flowableAss = flowableAssMapper.selectById(supIndex);
Task task = iFlowTaskService.getTask(flowableAss.getExecIndex());
@@ -565,9 +567,9 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
}
/**
* 生成预警单告警单(自动)
*
* @author cdf
* @date 2024/1/29
*/
@@ -660,6 +662,18 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
if (superviseParam.getInitType().equals(InitTypeEnum.AUTO.getCode())) {
if (CollectionUtil.isNotEmpty(thsSuperviseListPO)) {
//处理flowable
for(ThsSupervise ths:thsSuperviseListPO){
Map<String, Object> mapParam = new HashMap<>();
String proInId = "";
if (ths.getType() == 0) {
proInId = "flow_yzep99kb:1:a100b48b-da75-11ed-8335-b07b253cdad9";
} else {
proInId = "flow_yzep99kb:2:6358e099-dcba-11ed-8026-b07b253cdad9";
}
flowDefinitionService.startProcessInstanceById(proInId, thsSupervise.getSupIndex(), mapParam);
}
this.saveBatch(thsSuperviseListPO);
thsOverRunLogService.saveBatch(allThsLogPO);
return null;
@@ -670,7 +684,6 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
}
}
@@ -680,7 +693,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
return superviceRunLogVo;
}
@Override
/*@Override
public SuperviceRunLogVo initSuperviseHand(SuperviseParam superviseParam) {
SuperviceRunLogVo superviceRunLogVo = new SuperviceRunLogVo();
List<ThsOverRunLog> thsOverRunLogList = new ArrayList<>();
@@ -704,7 +717,6 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
Dept dept = deptFeignClient.getDeptById(oneStrategyVo.getDeptId()).getData();
List<ThsWarnStrategyAss> oneInterferenceSourceAsses = this.queryWarnStrategyAss(oneStrategyVo.getId(), TypeEnum.SOURCE_TYPE);//干扰源列表
List<ThsWarnStrategyAss> oneSteadyIndicatorAsses = this.queryWarnStrategyAss(oneStrategyVo.getId(), TypeEnum.INTERFERENCE_TYPE);//指标类型列表
List<ThsWarnStrategyAss> oneMonitorAsses = this.queryWarnStrategyAss(oneStrategyVo.getId(), TypeEnum.MONITOR_TYPE);//监测点列表
@@ -770,7 +782,7 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
}
superviceRunLogVo.setOverRunLog(thsOverRunLogList);
return superviceRunLogVo;
}
}*/
@Override
public Page<ThsSupervise> queryPage(ThsSuperviseParam thsSuperviseParam) {
@@ -815,8 +827,6 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
}
/**
* 批量下载.zip文件
*