技术监督管理
用户部门添加省级,市,县层级判断
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
|
||||
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;
|
||||
import com.njcn.process.service.ISupvFileService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2023-06-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/supv/file")
|
||||
@Api(tags = "技术监督附件控制器")
|
||||
@RequiredArgsConstructor
|
||||
public class SupvFileController extends BaseController {
|
||||
|
||||
private final ISupvFileService iSupvFileService;
|
||||
|
||||
|
||||
@PostMapping("planUpload")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.UPLOAD)
|
||||
@ApiOperation("监督计划问题附件上传")
|
||||
public HttpResult<Object> planUpload(@ApiParam(value = "文件", required = true) @RequestPart("files") MultipartFile file, @RequestParam("planId") String planId, @RequestParam("type") Integer type){
|
||||
String methodDescribe = getMethodDescribe("planUpload");
|
||||
iSupvFileService.planUpload(file,planId,type);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("detail")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.DOWNLOAD)
|
||||
@ApiOperation("监督计划问题附件下载")
|
||||
public HttpResult<Object> detail(HttpServletResponse response, @RequestParam("busId") String busId, @RequestParam("type") Integer type){
|
||||
String methodDescribe = getMethodDescribe("detail");
|
||||
iSupvFileService.detail(response,busId,type);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
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;
|
||||
import com.njcn.process.pojo.param.SupvPlanParam;
|
||||
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.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 月度统计
|
||||
* @author cdf
|
||||
* @date 2023/6/26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/supv/report")
|
||||
@Api(tags = "技术监督月统计控制器")
|
||||
@RequiredArgsConstructor
|
||||
public class SupvMonthStatisController extends BaseController {
|
||||
|
||||
|
||||
@PostMapping("statisticReport")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiIgnore
|
||||
public HttpResult<Object> statisticReport(@RequestBody @Validated SupvPlanParam supvPlanParam){
|
||||
String methodDescribe = getMethodDescribe("statisticReport");
|
||||
|
||||
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
|
||||
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;
|
||||
import com.njcn.process.pojo.param.SupvPlanParam;
|
||||
import com.njcn.process.pojo.po.SupvPlan;
|
||||
import com.njcn.process.pojo.vo.SupvPlanVO;
|
||||
import com.njcn.process.service.ISupvPlanService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import liquibase.pro.packaged.S;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2023-06-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/supv/plan")
|
||||
@Api(tags = "技术监督计划控制器")
|
||||
@RequiredArgsConstructor
|
||||
public class SupvPlanController extends BaseController {
|
||||
|
||||
private final ISupvPlanService iSupvPlanService;
|
||||
|
||||
|
||||
@PostMapping("addPlan")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("新增技术监督计划")
|
||||
@ApiImplicitParam(name = "supvPlanParam",value = "请求体",required = true)
|
||||
public HttpResult<Object> addPlan(@RequestBody @Validated SupvPlanParam supvPlanParam){
|
||||
String methodDescribe = getMethodDescribe("addPlan");
|
||||
iSupvPlanService.addPlan(supvPlanParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("updatePlan")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("修改技术监督计划")
|
||||
@ApiImplicitParam(name = "supvPlanParam",value = "请求体",required = true)
|
||||
public HttpResult<Object> updatePlan(@RequestBody @Validated SupvPlanParam.UpdateSupvPlanParam supvPlanParam){
|
||||
String methodDescribe = getMethodDescribe("updatePlan");
|
||||
iSupvPlanService.updatePlan(supvPlanParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("delPlan")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("删除监督计划")
|
||||
@ApiImplicitParam(name = "planIds",value = "监督计划索引集合",required = true)
|
||||
public HttpResult<Object> delPlan(@RequestBody List<String> planIds){
|
||||
String methodDescribe = getMethodDescribe("delPlan");
|
||||
iSupvPlanService.delPlan(planIds);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("pagePlan")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("分页查询监督计划")
|
||||
@ApiImplicitParam(name = "supvPlanParam",value = "请求体",required = true)
|
||||
public HttpResult<Page<SupvPlanVO>> pagePlan(@RequestBody SupvPlanParam supvPlanParam){
|
||||
String methodDescribe = getMethodDescribe("pagePlan");
|
||||
Page<SupvPlanVO> page = iSupvPlanService.pagePlan(supvPlanParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.njcn.process.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.process.pojo.param.SupvProblemParam;
|
||||
import com.njcn.process.pojo.po.SupvProblem;
|
||||
import com.njcn.process.service.ISupvProblemService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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 com.njcn.web.controller.BaseController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author hongawen
|
||||
* @since 2023-06-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/supv/problem")
|
||||
@Api(tags = "技术监督实施问题控制器")
|
||||
@RequiredArgsConstructor
|
||||
public class SupvProblemController extends BaseController {
|
||||
|
||||
private final ISupvProblemService iSupvProblemService;
|
||||
|
||||
|
||||
@PostMapping("addProblem")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("新增技术监督问题")
|
||||
@ApiImplicitParam(name = "supvProblemParam",value = "请求体",required = true)
|
||||
public HttpResult<Object> addProblem(@RequestBody @Validated SupvProblemParam supvProblemParam){
|
||||
String methodDescribe = getMethodDescribe("addProblem");
|
||||
iSupvProblemService.addProblem(supvProblemParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("updateProblem")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("修改技术监督问题")
|
||||
@ApiImplicitParam(name = "supvProblemParam",value = "请求体",required = true)
|
||||
public HttpResult<Object> updateProblem(@RequestBody @Validated SupvProblemParam.UpdateSupvProblemParam supvProblemParam){
|
||||
String methodDescribe = getMethodDescribe("updateProblem");
|
||||
iSupvProblemService.updateProblem(supvProblemParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("delProblem")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
|
||||
@ApiOperation("删除监督问题")
|
||||
@ApiImplicitParam(name = "problemIds",value = "监督问题计划索引集合",required = true)
|
||||
public HttpResult<Object> delProblem(@RequestBody List<String> problemIds){
|
||||
String methodDescribe = getMethodDescribe("delProblem");
|
||||
iSupvProblemService.delProblem(problemIds);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("pageProblem")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("分页查询监督问题")
|
||||
@ApiImplicitParam(name = "supvProblemParam",value = "请求体",required = true)
|
||||
public HttpResult<Page<SupvProblem>> pageProblem(@RequestBody SupvProblemParam supvProblemParam){
|
||||
String methodDescribe = getMethodDescribe("pageProblem");
|
||||
if(StrUtil.isBlank(supvProblemParam.getPlanId())){
|
||||
throw new BusinessException("监督计划索引不可为空");
|
||||
}
|
||||
Page<SupvProblem> page = iSupvProblemService.pageProblem(supvProblemParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user