1.技术监督代码调整
2.国网对象类型统计 3.国网新能源场站代码提交
This commit is contained in:
@@ -125,7 +125,7 @@ public class PmsTerminalDetectionController extends BaseController {
|
||||
|
||||
@ApiOperation("检测报告下载")
|
||||
@GetMapping(value = "/reportDownload")
|
||||
public InputStreamResource reportDownload( TerminalParam.DownloadParam param) throws IOException {
|
||||
public InputStreamResource reportDownload( TerminalParam.DownloadParam param){
|
||||
InputStreamResource minIoUploadResDTO = pmsTerminalDetectionService.reportDownload(param);
|
||||
return minIoUploadResDTO;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -98,33 +97,23 @@ public class RGeneralSurveyPlanController extends BaseController {
|
||||
@PostMapping("/addPlanConfig")
|
||||
@ApiOperation("增加普测计划参数")
|
||||
@ApiImplicitParam(name = "rSurveyPlanConfigVOList", value = "", required = true)
|
||||
public HttpResult<Boolean> addPlanConfig(@Validated @RequestBody List<RSurveyPlanConfigVO> rSurveyPlanConfigVOList) {
|
||||
String methodDescribe = getMethodDescribe("querySubStatation");
|
||||
double sum = rSurveyPlanConfigVOList.stream().mapToDouble(RSurveyPlanConfigVO::getProportion).sum();
|
||||
public HttpResult<Boolean> addPlanConfig(@Validated @RequestBody List<RSurveyPlanConfigPO> rSurveyPlanConfigVOList) {
|
||||
String methodDescribe = getMethodDescribe("addPlanConfig");
|
||||
double sum = rSurveyPlanConfigVOList.stream().mapToDouble(RSurveyPlanConfigPO::getProportion).sum();
|
||||
if (sum > 1) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.MATH_ERROR, false, methodDescribe);
|
||||
}
|
||||
List<RSurveyPlanConfigPO> collect = rSurveyPlanConfigVOList.stream().map(temp -> {
|
||||
RSurveyPlanConfigPO rs = new RSurveyPlanConfigPO();
|
||||
BeanUtils.copyProperties(temp, rs);
|
||||
return rs;
|
||||
}).collect(Collectors.toList());
|
||||
boolean b = rSurveyPlanConfigService.saveOrUpdateBatchByMultiId(collect, 500);
|
||||
boolean b = rSurveyPlanConfigService.saveOrUpdateBatchByMultiId(rSurveyPlanConfigVOList, 500);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPlanConfig")
|
||||
@ApiOperation("查询普测计划参数")
|
||||
public HttpResult<List<RSurveyPlanConfigVO>> queryPlanConfig() {
|
||||
public HttpResult<List<RSurveyPlanConfigPO>> queryPlanConfig() {
|
||||
String methodDescribe = getMethodDescribe("queryPlanConfig");
|
||||
List<RSurveyPlanConfigPO> list = rSurveyPlanConfigService.list();
|
||||
List<RSurveyPlanConfigVO> collect = list.stream().map(temp -> {
|
||||
RSurveyPlanConfigVO rs = new RSurveyPlanConfigVO();
|
||||
BeanUtils.copyProperties(temp, rs);
|
||||
return rs;
|
||||
}).collect(Collectors.toList());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, collect, methodDescribe);
|
||||
List<RSurveyPlanConfigPO> list = rSurveyPlanConfigService.getOrgIds();
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user