@@ -36,16 +36,16 @@ public class EarlyWarningController { | |||||
private final IEarlyWarningRecordsService earlyWarningRecordsService; | private final IEarlyWarningRecordsService earlyWarningRecordsService; | ||||
@ApiOperation(value = "预警规则获取", notes = "预警规则获取") | @ApiOperation(value = "预警规则获取", notes = "预警规则获取") | ||||
@GetMapping("/detail/{areaCode}") | |||||
public List<WflowEarlyWarningVO> detail(@PathVariable String areaCode) { | |||||
return earlyWarningService.detailByRegion(areaCode); | |||||
@GetMapping("/detail/{mhUnitId}") | |||||
public List<WflowEarlyWarningVO> detail(@PathVariable Long mhUnitId) { | |||||
return earlyWarningService.detailByMhUnitId(mhUnitId); | |||||
} | } | ||||
@ApiOperation(value = "预警规则保存", notes = "预警规则保存") | @ApiOperation(value = "预警规则保存", notes = "预警规则保存") | ||||
@PostMapping("/save") | @PostMapping("/save") | ||||
@WebLog("预警规则保存") | @WebLog("预警规则保存") | ||||
public String save(@Validated @RequestBody WflowEarlyWarningDTO dto) { | public String save(@Validated @RequestBody WflowEarlyWarningDTO dto) { | ||||
return earlyWarningService.saveByDto(dto); | |||||
return earlyWarningService.saveByMhUnit(dto); | |||||
} | } | ||||
@ApiOperation(value = "预警记录查询", notes = "预警记录查询") | @ApiOperation(value = "预警记录查询", notes = "预警记录查询") | ||||
@@ -40,6 +40,12 @@ public class WflowEarlyWarningRecords implements Serializable { | |||||
private String areaCode; | private String areaCode; | ||||
/** | /** | ||||
* 信创单位ID | |||||
*/ | |||||
@ApiModelProperty(value = "信创单位ID") | |||||
private Long mhUnitId; | |||||
/** | |||||
* 项目 | * 项目 | ||||
*/ | */ | ||||
@ApiModelProperty(value = "项目编码") | @ApiModelProperty(value = "项目编码") | ||||
@@ -41,4 +41,7 @@ public class WarningListReq extends PagePo { | |||||
@ApiModelProperty("区域Code") | @ApiModelProperty("区域Code") | ||||
private String areaCode; | private String areaCode; | ||||
@ApiModelProperty("单位ID") | |||||
private Long mhUnitId; | |||||
} | } |
@@ -42,6 +42,7 @@ public class EarlyWarningRecordsServiceImpl extends ServiceImpl<EarlyWarningReco | |||||
LambdaQueryWrapper<WflowEarlyWarningRecords> wrapper = Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) | LambdaQueryWrapper<WflowEarlyWarningRecords> wrapper = Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) | ||||
.eq(WflowEarlyWarningRecords::getRuleType, ruleType) | .eq(WflowEarlyWarningRecords::getRuleType, ruleType) | ||||
.eq(StringUtils.isNotBlank(req.getAreaCode()),WflowEarlyWarningRecords::getAreaCode,req.getAreaCode()) | .eq(StringUtils.isNotBlank(req.getAreaCode()),WflowEarlyWarningRecords::getAreaCode,req.getAreaCode()) | ||||
.eq(Objects.nonNull(req.getMhUnitId()),WflowEarlyWarningRecords::getMhUnitId,req.getMhUnitId()) | |||||
.like(StringUtils.isNotBlank(req.getProjectName()), WflowEarlyWarningRecords::getProjectName, req.getProjectName()) | .like(StringUtils.isNotBlank(req.getProjectName()), WflowEarlyWarningRecords::getProjectName, req.getProjectName()) | ||||
.like(StringUtils.isNotBlank(req.getBuildOrgName()), WflowEarlyWarningRecords::getBuildOrgName, req.getBuildOrgName()) | .like(StringUtils.isNotBlank(req.getBuildOrgName()), WflowEarlyWarningRecords::getBuildOrgName, req.getBuildOrgName()) | ||||
.eq(StringUtils.isNotBlank(req.getBuildOrgCode()), WflowEarlyWarningRecords::getBuildOrgCode, req.getBuildOrgCode()) | .eq(StringUtils.isNotBlank(req.getBuildOrgCode()), WflowEarlyWarningRecords::getBuildOrgCode, req.getBuildOrgCode()) | ||||