This commit is contained in:
xy
2024-06-26 17:47:33 +08:00
parent 16e90de9eb
commit ae2207bd97
4 changed files with 33 additions and 25 deletions

View File

@@ -109,7 +109,7 @@ public class BpmModelController extends BaseController {
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD) @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
@PostMapping("/add") @PostMapping("/add")
@ApiOperation("新建模型") @ApiOperation("新建模型")
@ApiImplicitParam(name = "createRetVO", value = "模型数据", required = true) @ApiImplicitParam(name = "bpmModelParam", value = "模型数据", required = true)
public HttpResult<String> createModel(@Validated @RequestBody BpmModelParam bpmModelParam) { public HttpResult<String> createModel(@Validated @RequestBody BpmModelParam bpmModelParam) {
String methodDescribe = getMethodDescribe("createModel"); String methodDescribe = getMethodDescribe("createModel");
String modelId = modelService.createModel(bpmModelParam, null); String modelId = modelService.createModel(bpmModelParam, null);

View File

@@ -49,7 +49,8 @@
supervision_warning_leaflet.create_by, supervision_warning_leaflet.create_by,
supervision_warning_leaflet.create_time, supervision_warning_leaflet.create_time,
supervision_warning_leaflet.update_by, supervision_warning_leaflet.update_by,
supervision_warning_leaflet.update_time supervision_warning_leaflet.update_time,
supervision_warning_leaflet.file_path
FROM supervision_warning_leaflet supervision_warning_leaflet FROM supervision_warning_leaflet supervision_warning_leaflet
WHERE ${ew.sqlSegment} WHERE ${ew.sqlSegment}
</select> </select>

View File

@@ -211,19 +211,21 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
public WarningLeafletVO getVOById(String id) { public WarningLeafletVO getVOById(String id) {
WarningLeaflet warningLeaflet = this.getById(id); WarningLeaflet warningLeaflet = this.getById(id);
WarningLeafletVO warningLeafletVO = new WarningLeafletVO(); WarningLeafletVO warningLeafletVO = new WarningLeafletVO();
BeanUtil.copyProperties(warningLeaflet, warningLeafletVO); if (!Objects.isNull(warningLeaflet)){
if (StrUtil.isNotBlank(warningLeaflet.getDeptId())) { BeanUtil.copyProperties(warningLeaflet, warningLeafletVO);
Dept dept = deptFeignClient.getDeptById(warningLeaflet.getDeptId()).getData(); if (StrUtil.isNotBlank(warningLeaflet.getDeptId())) {
if (Objects.nonNull(dept)) { Dept dept = deptFeignClient.getDeptById(warningLeaflet.getDeptId()).getData();
warningLeafletVO.setDeptName(dept.getName()); if (Objects.nonNull(dept)) {
warningLeafletVO.setDeptName(dept.getName());
}
}
if (warningLeaflet.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode())) {
String problemId = warningLeaflet.getProblemId();
//查询谐波普测,获取该普测计划上传的文件
//查询到现场测试超标附件地址
SurveyTest surveyTest = surveyTestService.getById(problemId);
warningLeafletVO.setProblemPath(surveyTest.getTestReport());
} }
}
if (warningLeaflet.getProblemType().equals(ProblemTypeEnum.SITE_TEST.getCode())) {
String problemId = warningLeaflet.getProblemId();
//查询谐波普测,获取该普测计划上传的文件
//查询到现场测试超标附件地址
SurveyTest surveyTest = surveyTestService.getById(problemId);
warningLeafletVO.setProblemPath(surveyTest.getTestReport());
} }
return warningLeafletVO; return warningLeafletVO;
} }
@@ -237,18 +239,20 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
public BpmInstanceInfo getInstanceInfo(String businessId) { public BpmInstanceInfo getInstanceInfo(String businessId) {
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo(); BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
WarningLeafletVO warningLeafletVO = this.getVOById(businessId); WarningLeafletVO warningLeafletVO = this.getVOById(businessId);
bpmInstanceInfo.setHistoryInstanceId(warningLeafletVO.getHistoryInstanceId()); if (Objects.nonNull(warningLeafletVO.getId())) {
String type = "告警单"; bpmInstanceInfo.setHistoryInstanceId(warningLeafletVO.getHistoryInstanceId());
if(warningLeafletVO.getLeafletType() == 1){ String type = "告警单";
type = "预警单"; if(warningLeafletVO.getLeafletType() == 1){
type = "预警单";
}
String sign = "问题来源于".concat(ProblemTypeEnum.getNameByCode(warningLeafletVO.getProblemType()))
.concat(",由单位")
.concat(StrUtil.isBlank(warningLeafletVO.getDeptName())?"":warningLeafletVO.getDeptName())
.concat("负责的")
.concat(warningLeafletVO.getLeafletName())
.concat(type);
bpmInstanceInfo.setInstanceSign(sign);
} }
String sign = "问题来源于".concat(ProblemTypeEnum.getNameByCode(warningLeafletVO.getProblemType()))
.concat(",由单位")
.concat(StrUtil.isBlank(warningLeafletVO.getDeptName())?"":warningLeafletVO.getDeptName())
.concat("负责的")
.concat(warningLeafletVO.getLeafletName())
.concat(type);
bpmInstanceInfo.setInstanceSign(sign);
return bpmInstanceInfo; return bpmInstanceInfo;
} }
@@ -291,6 +295,9 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
if (deptMap.containsKey(record.getDutyOrgId())) { if (deptMap.containsKey(record.getDutyOrgId())) {
record.setDutyOrgName(deptMap.get(record.getDutyOrgId())); record.setDutyOrgName(deptMap.get(record.getDutyOrgId()));
} }
if (!Objects.isNull(record.getFilePath())){
record.setFilePath(fileStorageUtil.getFileUrl(record.getFilePath()));
}
} }
} }
return warningLeafletVOPage; return warningLeafletVOPage;