批量下载技术监督反馈文件
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
@@ -11,6 +15,7 @@ import com.njcn.prepare.harmonic.pojo.param.SuperviseParam;
|
||||
import com.njcn.prepare.harmonic.pojo.vo.SuperviceRunLogVo;
|
||||
import com.njcn.prepare.harmonic.pojo.vo.SuperviseVo;
|
||||
import com.njcn.prepare.harmonic.pojo.vo.ThsSuperviseVo;
|
||||
import com.njcn.process.pojo.param.FileParam;
|
||||
import com.njcn.process.service.ThsOverRunLogService;
|
||||
import com.njcn.process.service.ThsSuperviseService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
@@ -19,10 +24,12 @@ import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -46,14 +53,18 @@ public class ThsSuperviseController extends BaseController {
|
||||
@Autowired
|
||||
private ThsSuperviseClient thsSuperviseClient;
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("预警/告警事务生成")
|
||||
@ApiImplicitParam(name = "superviseParam", value = "创建技术监督参数", required = true)
|
||||
@PostMapping("/initSupervise")
|
||||
public HttpResult<SuperviceRunLogVo> initSupervise(@RequestBody @Validated SuperviseParam superviseParam) {
|
||||
HttpResult<SuperviceRunLogVo> superviceRunLogVoHttpResult = thsSuperviseService.initSupervise(superviseParam);
|
||||
return superviceRunLogVoHttpResult;
|
||||
String methodDescribe = getMethodDescribe("initSupervise");
|
||||
HttpResult<String> superviceRunLogVoHttpResult = thsSuperviseClient.initSupervise(superviseParam);
|
||||
SuperviceRunLogVo superviceRunLogVo = JSON.parseObject(superviceRunLogVoHttpResult.getData(), SuperviceRunLogVo.class);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, superviceRunLogVo, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("保存技术监督监测点")
|
||||
@ApiImplicitParam(name = "superviceRunLogVo", value = "技术监督监测点参数", required = true)
|
||||
@PostMapping("/saveOverRunLog")
|
||||
@@ -63,6 +74,7 @@ public class ThsSuperviseController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE)
|
||||
@ApiOperation("更新技术监督")
|
||||
@ApiImplicitParam(name = "superviceRunLogVo", value = "更新技术监督参数", required = true)
|
||||
@PostMapping("/updateSupervice")
|
||||
@@ -70,7 +82,7 @@ public class ThsSuperviseController extends BaseController {
|
||||
return thsOverRunLogService.updateSupervise(superviceRunLogVo);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("技术监督详情")
|
||||
@ApiImplicitParam(name = "supIndex", value = "技术监督id", required = true)
|
||||
@PostMapping("/superviseDetail")
|
||||
@@ -80,6 +92,8 @@ public class ThsSuperviseController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DELETE)
|
||||
@ApiOperation("删除技术监督")
|
||||
@ApiImplicitParam(name = "superviseDto", value = "删除技术监督请求体", required = true)
|
||||
@PostMapping("/deleteSupervise")
|
||||
@@ -87,6 +101,8 @@ public class ThsSuperviseController extends BaseController {
|
||||
return thsSuperviseService.deleteSupervise(superviseDto);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("查询技术监督列表")
|
||||
@ApiImplicitParam(name = "superviseDto", value = "查询技术监督列表参数", required = true)
|
||||
@PostMapping("/querySuperviseList")
|
||||
@@ -96,6 +112,7 @@ public class ThsSuperviseController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, pageResult, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("上传技术监督单据")
|
||||
@PostMapping("/uploadSuperviseTicket")
|
||||
public HttpResult uploadSuperviseTicket(@ApiParam(value = "文件", required = true)
|
||||
@@ -110,6 +127,8 @@ public class ThsSuperviseController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("查询流程状态列表")
|
||||
@PostMapping("/queryProgressValues")
|
||||
public HttpResult queryProgressValues() {
|
||||
@@ -119,6 +138,7 @@ public class ThsSuperviseController extends BaseController {
|
||||
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPLOAD)
|
||||
@ApiOperation("上传单据模板")
|
||||
@PostMapping("/uploadAlarmFormwork")
|
||||
public HttpResult uploadAlarmFormwork(@ApiParam(value = "文件", required = true)
|
||||
@@ -131,6 +151,7 @@ public class ThsSuperviseController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD)
|
||||
@ApiOperation("下载单据模板")
|
||||
@PostMapping("/dowloadAlarmFormwork")
|
||||
public HttpResult dowloadAlarmFormwork(@ApiParam(name = "type", value = "类型(0:预警;1:告警)", required = true) @RequestParam("type") Integer type,
|
||||
@@ -142,6 +163,7 @@ public class ThsSuperviseController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, httpPath, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("技术监督首页")
|
||||
@ApiImplicitParam(name = "superviseDto", value = "查询技术监督列表参数", required = true)
|
||||
@PostMapping("/superviseIndex")
|
||||
@@ -150,5 +172,16 @@ public class ThsSuperviseController extends BaseController {
|
||||
String methodDescribe = getMethodDescribe("superviseIndex");
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, pageResult, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DOWNLOAD)
|
||||
@PostMapping(value = "/downloadFeedBackFile", produces = {MediaType.APPLICATION_OCTET_STREAM_VALUE, MediaType.APPLICATION_JSON_VALUE})
|
||||
@ApiOperation("技术监督反馈文件下载")
|
||||
@ApiImplicitParam(name = "fileParam", value = "反馈文件下载参数", required = true)
|
||||
public HttpResult downloadFeedBackFile(@RequestBody @Validated FileParam fileParam, HttpServletRequest request, HttpServletResponse response) {
|
||||
String methodDescribe = getMethodDescribe("downloadFeedBackFile");
|
||||
HttpServletResponse resp = thsSuperviseService.downloadFeedBackFile(fileParam, request, response);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resp, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user