1.过程监督-谐波普测管理代码调整
2.过程监督-干扰用户管理代码调整 3.过程监督-电能质量问题管理代码调整 4.过程监督-终端监测管理代码调整
This commit is contained in:
@@ -231,7 +231,6 @@ public class ElectricityQualityIssuesController extends BaseController {
|
||||
@ApiImplicitParam(name = "powerQualityProblemNo", value = "历史审核记录查询参数", required = true)
|
||||
public HttpResult<List<RStatElectricQualityProblemLogVO>> queryCheckTrack(@RequestParam("powerQualityProblemNo") String powerQualityProblemNo){
|
||||
String methodDescribe = getMethodDescribe("checkPowerQuality");
|
||||
|
||||
List<RStatElectricQualityProblemLogVO> rStatElectricQualityProblemLogVOS = issuesService.queryCheckTrack (powerQualityProblemNo);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rStatElectricQualityProblemLogVOS, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -98,7 +98,6 @@ public class LoadTypeUserManageController extends BaseController {
|
||||
@ApiImplicitParam(name = "loadTypeUserCheckParam", value = "入网评估报告审核参数", required = true)
|
||||
public HttpResult<Boolean> checkLoadTypeUserI(@Validated @RequestBody LoadTypeUserCheckParam loadTypeUserCheckParam){
|
||||
String methodDescribe = getMethodDescribe("checkLoadTypeUserI");
|
||||
|
||||
Boolean flag = loadTypeUserManageService.checkLoadTypeUserI (loadTypeUserCheckParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
@@ -121,7 +120,6 @@ public class LoadTypeUserManageController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.UPDATE)
|
||||
@PostMapping("/uploadLoadTypeUserI")
|
||||
@ApiOperation("上传干扰源用户入网报告(未建档干扰源用户管理)")
|
||||
// @ApiImplicitParam(name = "loadTypeUserIUploadParam", value = "实体参数", required = true)
|
||||
public HttpResult<Boolean> uploadLoadTypeUserI(@Validated LoadTypeUserIUploadParam loadTypeUserIUploadParam){
|
||||
String methodDescribe = getMethodDescribe("uploadLoadTypeUserI");
|
||||
boolean res = loadTypeUserManageService.uploadLoadTypeUserI(loadTypeUserIUploadParam);
|
||||
@@ -201,7 +199,6 @@ public class LoadTypeUserManageController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.UPDATE)
|
||||
@PostMapping("/uploadLoadTypeUserA")
|
||||
@ApiOperation("上传干扰源用户实测报告(干扰源用户常态化管理)")
|
||||
// @ApiImplicitParam(name = "loadTypeUserAUploadParam", value = "实体参数", required = true)
|
||||
public HttpResult<Boolean> uploadLoadTypeUserA(@Validated LoadTypeUserAUploadParam loadTypeUserAUploadParam){
|
||||
String methodDescribe = getMethodDescribe("uploadLoadTypeUserA");
|
||||
boolean res = loadTypeUserManageService.uploadLoadTypeUserA(loadTypeUserAUploadParam);
|
||||
|
||||
@@ -2,11 +2,13 @@ package com.njcn.process.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.minioss.bo.MinIoUploadResDTO;
|
||||
@@ -15,23 +17,21 @@ import com.njcn.process.pojo.param.*;
|
||||
import com.njcn.process.pojo.po.RGeneralSurveyPlanPO;
|
||||
import com.njcn.process.pojo.po.RSurveyPlanConfigPO;
|
||||
import com.njcn.process.pojo.vo.*;
|
||||
import com.njcn.process.service.RGeneralSurveyPlanDetailService;
|
||||
import com.njcn.process.service.RGeneralSurveyPlanPOService;
|
||||
import com.njcn.process.service.impl.RSurveyPlanConfigService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
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.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
@@ -52,26 +52,24 @@ import java.util.stream.Stream;
|
||||
@AllArgsConstructor
|
||||
public class RGeneralSurveyPlanController extends BaseController {
|
||||
|
||||
private final RGeneralSurveyPlanPOService rGeneralSurveyPlanPOService;
|
||||
private final RGeneralSurveyPlanPOService rGeneralSurveyPlanPOService;
|
||||
|
||||
private final
|
||||
RGeneralSurveyPlanDetailService rGeneralSurveyPlanDetailService;
|
||||
private final
|
||||
RSurveyPlanConfigService rSurveyPlanConfigService;
|
||||
/**
|
||||
* @Description: 新增/修改普测计划
|
||||
* @Param: [rGeneralSurveyPlanAddParm]
|
||||
* @return: com.njcn.common.pojo.response.HttpResult<java.lang.Boolean>
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/22
|
||||
*/
|
||||
|
||||
private final RSurveyPlanConfigService rSurveyPlanConfigService;
|
||||
|
||||
/**
|
||||
* @Description: 新增/修改普测计划
|
||||
* @Param: [rGeneralSurveyPlanAddParm]
|
||||
* @return: com.njcn.common.pojo.response.HttpResult<java.lang.Boolean>
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/22
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/addPlan")
|
||||
@ApiOperation("新增/修改普测计划")
|
||||
@ApiImplicitParam(name = "rGeneralSurveyPlanAddParm", value = "新增普测计划参数", required = true)
|
||||
public HttpResult<Boolean> addPlan(@RequestBody RGeneralSurveyPlanAddParm rGeneralSurveyPlanAddParm){
|
||||
public HttpResult<Boolean> addPlan(@RequestBody @Validated RGeneralSurveyPlanAddParm rGeneralSurveyPlanAddParm) {
|
||||
String methodDescribe = getMethodDescribe("addPlan");
|
||||
|
||||
Boolean addFlag = rGeneralSurveyPlanPOService.addPlan(rGeneralSurveyPlanAddParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, addFlag, methodDescribe);
|
||||
}
|
||||
@@ -80,29 +78,19 @@ public class RGeneralSurveyPlanController extends BaseController {
|
||||
@PostMapping("/addPlanCycle")
|
||||
@ApiOperation("设置普测周期")
|
||||
@ApiImplicitParam(name = "cycleNum", value = "普测周期", required = true)
|
||||
public HttpResult<RSurveyCycleVO> addPlanCycle(@RequestParam("cycleNum") Integer cycleNum ){
|
||||
public HttpResult<RSurveyCycleVO> addPlanCycle(@RequestParam("cycleNum") Integer cycleNum) {
|
||||
String methodDescribe = getMethodDescribe("addPlanCycle");
|
||||
|
||||
RSurveyCycleVO rSurveyCycleVO = rGeneralSurveyPlanPOService.addPlanCycle(cycleNum);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rSurveyCycleVO, methodDescribe);
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ApiOperation("excel批量导入电站信息")
|
||||
@PostMapping(value = "importSubStatation")
|
||||
public HttpResult<String> importSubStatation(@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file, HttpServletResponse response) {
|
||||
String methodDescribe = getMethodDescribe("importSubStatation");
|
||||
rGeneralSurveyPlanPOService.importSubStatation(file, response);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/initDetpStataionTree")
|
||||
@ApiOperation("初始化部门")
|
||||
@ApiImplicitParam(name = "orgId", value = "部门号", required = true)
|
||||
public HttpResult<List<DeptSubstationVO>> initDetpStataionTree(@RequestParam("orgId") String orgId ){
|
||||
public HttpResult<List<DeptSubstationVO>> initDetpStataionTree(@RequestParam("orgId") String orgId) {
|
||||
String methodDescribe = getMethodDescribe("initDetpStataionTree");
|
||||
|
||||
List<DeptSubstationVO> list = rGeneralSurveyPlanPOService.initDetpStataionTree ( orgId);
|
||||
List<DeptSubstationVO> list = rGeneralSurveyPlanPOService.initDetpStataionTree(orgId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -110,32 +98,32 @@ public class RGeneralSurveyPlanController extends BaseController {
|
||||
@PostMapping("/addPlanConfig")
|
||||
@ApiOperation("增加普测计划参数")
|
||||
@ApiImplicitParam(name = "rSurveyPlanConfigVOList", value = "", required = true)
|
||||
public HttpResult<Boolean> addPlanConfig(@Validated @RequestBody List<RSurveyPlanConfigVO> rSurveyPlanConfigVOList){
|
||||
public HttpResult<Boolean> addPlanConfig(@Validated @RequestBody List<RSurveyPlanConfigVO> rSurveyPlanConfigVOList) {
|
||||
String methodDescribe = getMethodDescribe("querySubStatation");
|
||||
double sum = rSurveyPlanConfigVOList.stream ( ).mapToDouble (RSurveyPlanConfigVO::getProportion).sum ( );
|
||||
if(sum>1){
|
||||
double sum = rSurveyPlanConfigVOList.stream().mapToDouble(RSurveyPlanConfigVO::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);
|
||||
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);
|
||||
}).collect(Collectors.toList());
|
||||
boolean b = rSurveyPlanConfigService.saveOrUpdateBatchByMultiId(collect, 500);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, b, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPlanConfig")
|
||||
@ApiOperation("查询普测计划参数")
|
||||
public HttpResult<List<RSurveyPlanConfigVO>> queryPlanConfig(){
|
||||
public HttpResult<List<RSurveyPlanConfigVO>> 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);
|
||||
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 ( ));
|
||||
}).collect(Collectors.toList());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, collect, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -144,10 +132,9 @@ public class RGeneralSurveyPlanController extends BaseController {
|
||||
@PostMapping("/querySubStatation")
|
||||
@ApiOperation("电站勾选接口")
|
||||
@ApiImplicitParam(name = "statetionNum", value = "电站数量", required = true)
|
||||
public HttpResult<RGeneralSurveyPlanAddParm> querySubStatation(@RequestParam("statetionNum") Integer statetionNum ){
|
||||
public HttpResult<RGeneralSurveyPlanAddParm> querySubStatation(@RequestParam("statetionNum") Integer statetionNum) {
|
||||
String methodDescribe = getMethodDescribe("querySubStatation");
|
||||
|
||||
RGeneralSurveyPlanAddParm rGeneralSurveyPlanAddParm = rGeneralSurveyPlanPOService.querySubStatation (statetionNum);
|
||||
RGeneralSurveyPlanAddParm rGeneralSurveyPlanAddParm = rGeneralSurveyPlanPOService.querySubStatation(statetionNum);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanAddParm, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -155,10 +142,9 @@ public class RGeneralSurveyPlanController extends BaseController {
|
||||
@PostMapping("/queryPlan")
|
||||
@ApiOperation("查询普测计划-新建页面")
|
||||
@ApiImplicitParam(name = "rGeneralSurveyPlanQueryParm", value = "普测计划查询参数", required = true)
|
||||
public HttpResult<IPage<RGeneralSurveyPlanVO>> queryPlan(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){
|
||||
public HttpResult<IPage<RGeneralSurveyPlanVO>> queryPlan(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm) {
|
||||
String methodDescribe = getMethodDescribe("queryPlan");
|
||||
|
||||
IPage<RGeneralSurveyPlanVO> rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("0","1","2","3").collect (Collectors.toList ()),"1");
|
||||
IPage<RGeneralSurveyPlanVO> rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query(rGeneralSurveyPlanQueryParm, Stream.of("0", "1", "2", "3").collect(Collectors.toList()), "1");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -166,10 +152,19 @@ public class RGeneralSurveyPlanController extends BaseController {
|
||||
@PostMapping("/queryPlanAudit")
|
||||
@ApiOperation("查询普测计划-审核页面")
|
||||
@ApiImplicitParam(name = "rGeneralSurveyPlanQueryParm", value = "普测计划查询参数", required = true)
|
||||
public HttpResult<IPage<RGeneralSurveyPlanVO>> queryPlanAudit(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){
|
||||
public HttpResult<IPage<RGeneralSurveyPlanVO>> queryPlanAudit(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm) {
|
||||
String methodDescribe = getMethodDescribe("queryPlanAudit");
|
||||
IPage<RGeneralSurveyPlanVO> rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query(rGeneralSurveyPlanQueryParm, Stream.of("1").collect(Collectors.toList()), "2");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe);
|
||||
}
|
||||
|
||||
IPage<RGeneralSurveyPlanVO> rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("1","2").collect (Collectors.toList ()),"2");
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPlanResult")
|
||||
@ApiOperation("查询普测计划-结果页面")
|
||||
@ApiImplicitParam(name = "rGeneralSurveyPlanQueryParm", value = "普测计划查询参数", required = true)
|
||||
public HttpResult<IPage<RGeneralSurveyPlanVO>> queryPlanResult(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm) {
|
||||
String methodDescribe = getMethodDescribe("queryPlanResult");
|
||||
IPage<RGeneralSurveyPlanVO> rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query(rGeneralSurveyPlanQueryParm, Stream.of("3", "4").collect(Collectors.toList()), "3");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -177,24 +172,12 @@ public class RGeneralSurveyPlanController extends BaseController {
|
||||
@PostMapping("/checkPlanAudit")
|
||||
@ApiOperation("普测计划-审核")
|
||||
@ApiImplicitParam(name = "rGeneralSurveyPlanChcekParm", value = "普测计划审核参数", required = true)
|
||||
public HttpResult<Boolean> checkPlanAudit(@Validated @RequestBody RGeneralSurveyPlanChcekParm rGeneralSurveyPlanChcekParm){
|
||||
public HttpResult<Boolean> checkPlanAudit(@Validated @RequestBody RGeneralSurveyPlanChcekParm rGeneralSurveyPlanChcekParm) {
|
||||
String methodDescribe = getMethodDescribe("checkPlanAudit");
|
||||
|
||||
Boolean flag = rGeneralSurveyPlanPOService.checkPlanAudit (rGeneralSurveyPlanChcekParm);
|
||||
Boolean flag = rGeneralSurveyPlanPOService.checkPlanAudit(rGeneralSurveyPlanChcekParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPlanResult")
|
||||
@ApiOperation("查询普测计划-结果页面")
|
||||
@ApiImplicitParam(name = "rGeneralSurveyPlanQueryParm", value = "普测计划查询参数", required = true)
|
||||
public HttpResult<IPage<RGeneralSurveyPlanVO>> queryPlanResult(@Validated @RequestBody RGeneralSurveyPlanQueryParm rGeneralSurveyPlanQueryParm){
|
||||
String methodDescribe = getMethodDescribe("queryPlanResult");
|
||||
|
||||
IPage<RGeneralSurveyPlanVO> rGeneralSurveyPlanVOS = rGeneralSurveyPlanPOService.query (rGeneralSurveyPlanQueryParm, Stream.of ("3","4").collect (Collectors.toList ()),"3");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, rGeneralSurveyPlanVOS, methodDescribe);
|
||||
}
|
||||
|
||||
// @OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
// @PostMapping("/queryPlandetail")
|
||||
// @ApiOperation("根据planNO查询普测计划详情")
|
||||
@@ -207,29 +190,26 @@ public class RGeneralSurveyPlanController extends BaseController {
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.UPLOAD)
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPLOAD)
|
||||
@PostMapping("/surveyResultUpload")
|
||||
@ApiOperation("上传普测结果报告")
|
||||
// @ApiImplicitParam(name = "surveyResultUploadParam", value = "实体参数", required = true)
|
||||
public HttpResult<Boolean> surveyResultUpload( @Validated SurveyResultUploadParam surveyResultUploadParam){
|
||||
public HttpResult<Boolean> surveyResultUpload(@Validated SurveyResultUploadParam surveyResultUploadParam) {
|
||||
String methodDescribe = getMethodDescribe("surveyResultUpload");
|
||||
boolean res = rGeneralSurveyPlanPOService.surveyResultUpload(surveyResultUploadParam);
|
||||
if(res){
|
||||
if (res) {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}else {
|
||||
} else {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType= OperateType.DOWNLOAD)
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD)
|
||||
@PostMapping("/surveyResultDownload")
|
||||
@ApiOperation("下载普测结果报告")
|
||||
@ApiImplicitParam(name = "planNo", value = "计划号", required = true)
|
||||
public HttpResult<List<MinIoUploadResDTO>> surveyResultDownload(@RequestParam("planNo") String planNo ){
|
||||
public HttpResult<List<MinIoUploadResDTO>> surveyResultDownload(@RequestParam("planNo") String planNo) {
|
||||
String methodDescribe = getMethodDescribe("surveyResultDownload");
|
||||
List<MinIoUploadResDTO> downloadUrls = rGeneralSurveyPlanPOService.surveyResultDownload(planNo);
|
||||
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, downloadUrls, methodDescribe);
|
||||
|
||||
}
|
||||
@@ -238,10 +218,10 @@ public class RGeneralSurveyPlanController extends BaseController {
|
||||
@ApiOperation("导出普测计划信息")
|
||||
@PostMapping(value = "exportSurveyPlan")
|
||||
@ApiImplicitParam(name = "planIdList", value = "普测计划详情查询参数", required = true)
|
||||
public HttpResult<String> exportSurveyPlan(HttpServletResponse response,@RequestBody List<String> planIdList) {
|
||||
public HttpResult<String> exportSurveyPlan(HttpServletResponse response, @RequestBody List<String> planIdList) {
|
||||
String methodDescribe = getMethodDescribe("exportSurveyPlan");
|
||||
String fileName = "普测计划信息.xls";
|
||||
List<SurveyPlanExcel> baseExcelList = null;
|
||||
List<SurveyPlanExcel> baseExcelList;
|
||||
try {
|
||||
baseExcelList = rGeneralSurveyPlanPOService.exportSurveyPlan(planIdList);
|
||||
} catch (Exception e) {
|
||||
@@ -258,11 +238,9 @@ public class RGeneralSurveyPlanController extends BaseController {
|
||||
@ApiOperation("普测计划信息问题件新增查询")
|
||||
@PostMapping(value = "querySurveyPlanOnQuestion")
|
||||
@ApiImplicitParam(name = "questionQueryParm", value = "普测计划信息问题件查询参数", required = true)
|
||||
public HttpResult<List<RGeneralSurveyPlanDetailOnQuestionVO>> querySurveyPlanOnQuestion(@Validated @RequestBody SurveyPlanQuestionQueryParm questionQueryParm) {
|
||||
public HttpResult<List<RGeneralSurveyPlanDetailOnQuestionVO>> querySurveyPlanOnQuestion(@Validated @RequestBody SurveyPlanQuestionQueryParm questionQueryParm) {
|
||||
String methodDescribe = getMethodDescribe("querySurveyPlanOnQuestion");
|
||||
|
||||
List<RGeneralSurveyPlanDetailOnQuestionVO> list= rGeneralSurveyPlanPOService.querySurveyPlanOnQuestion(questionQueryParm);
|
||||
|
||||
List<RGeneralSurveyPlanDetailOnQuestionVO> list = rGeneralSurveyPlanPOService.querySurveyPlanOnQuestion(questionQueryParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
|
||||
}
|
||||
@@ -271,15 +249,32 @@ public class RGeneralSurveyPlanController extends BaseController {
|
||||
@ApiOperation("普测计划名称查询")
|
||||
@PostMapping(value = "querySurveyPlanName")
|
||||
@ApiImplicitParam(name = "questionQueryParm", value = "普测计划名称查询参数", required = true)
|
||||
public HttpResult<List<RGeneralSurveyPlanPO>> querySurveyPlanName(@Validated @RequestBody SurveyPlanQuestionQueryParm questionQueryParm) {
|
||||
public HttpResult<List<RGeneralSurveyPlanPO>> querySurveyPlanName(@Validated @RequestBody SurveyPlanQuestionQueryParm questionQueryParm) {
|
||||
String methodDescribe = getMethodDescribe("querySurveyPlanName");
|
||||
|
||||
List<RGeneralSurveyPlanPO> list= rGeneralSurveyPlanPOService.querySurveyPlanName(questionQueryParm);
|
||||
|
||||
List<RGeneralSurveyPlanPO> list = rGeneralSurveyPlanPOService.querySurveyPlanName(questionQueryParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@ApiOperation("普测计划状态更改为待审核")
|
||||
@PostMapping(value = "planStatus")
|
||||
public HttpResult<Boolean> planStatus(@RequestBody List<String> planNo) {
|
||||
String methodDescribe = getMethodDescribe("planStatus");
|
||||
int count = rGeneralSurveyPlanPOService.count(new LambdaUpdateWrapper<RGeneralSurveyPlanPO>()
|
||||
.in(RGeneralSurveyPlanPO::getPlanNo, planNo)
|
||||
.ne(RGeneralSurveyPlanPO::getStatus, Arrays.asList(0, 2))
|
||||
);
|
||||
if (count > 0) {
|
||||
throw new BusinessException("请检查普测计划状态是否正确!");
|
||||
}
|
||||
Boolean update = rGeneralSurveyPlanPOService.update(new LambdaUpdateWrapper<RGeneralSurveyPlanPO>()
|
||||
.in(RGeneralSurveyPlanPO::getPlanNo, planNo)
|
||||
.set(RGeneralSurveyPlanPO::getStatus, 1)
|
||||
);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, update, methodDescribe);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user