技术监督接口修改

This commit is contained in:
Lee
2023-03-31 16:28:36 +08:00
parent a71dd44eee
commit ff0591fcf8
9 changed files with 36 additions and 18 deletions

View File

@@ -3,16 +3,19 @@ package com.njcn.prepare.harmonic.pojo.vo;
import com.njcn.prepare.harmonic.pojo.po.ThsOverRunLog;
import com.njcn.prepare.harmonic.pojo.po.ThsSupervise;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.util.List;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class SuperviceRunLogVo {
private static final long serialVersionUID = 1L;
@ApiModelProperty(name = "thsSupervise", value = "技术监督参数", required = true)
private ThsSupervise thsSupervise;
@ApiModelProperty(name = "overRunLog", value = "监测点集合", required = true)

View File

@@ -11,10 +11,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
* <p>
@@ -34,8 +31,10 @@ public class ThsSuperviseController extends BaseController {
@ApiOperation("预警/告警事务生成")
@ApiImplicitParam(name = "superviseParam", value = "创建技术监督参数", required = true)
@PostMapping("/initSupervise")
@ResponseBody
public HttpResult<SuperviceRunLogVo> initSupervise(@RequestBody @Validated SuperviseParam superviseParam) {
return thsSuperviseService.initSupervise(superviseParam);
HttpResult<SuperviceRunLogVo> superviceRunLogVoHttpResult = thsSuperviseService.initSupervise(superviseParam);
return superviceRunLogVoHttpResult;
}
}

View File

@@ -49,7 +49,10 @@ public class ThsOverRunLogServiceImpl extends ServiceImpl<ThsOverRunLogMapper, T
public SuperviceRunLogVo superviseDetail(String supIndex) {
ThsSupervise thsSupervise = thsSuperviseMapper.selectOne(new LambdaQueryWrapper<ThsSupervise>().eq(ThsSupervise::getSupIndex, supIndex));
List<ThsOverRunLog> thsOverRunLogs = thsOverRunLogMapper.selectList(new LambdaQueryWrapper<ThsOverRunLog>().eq(ThsOverRunLog::getSupIndex, supIndex));
return SuperviceRunLogVo.builder().overRunLog(thsOverRunLogs).thsSupervise(thsSupervise).build();
SuperviceRunLogVo superviceRunLogVo = new SuperviceRunLogVo();
superviceRunLogVo.setThsSupervise(thsSupervise);
superviceRunLogVo.setOverRunLog(thsOverRunLogs);
return superviceRunLogVo;
}
@Override