package com.yuanchu.mom.controller;
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.yuanchu.mom.annotation.ValueAuth;
|
import com.yuanchu.mom.annotation.ValueClassify;
|
import com.yuanchu.mom.dto.InternalCheckDto;
|
import com.yuanchu.mom.pojo.InternalCheck;
|
import com.yuanchu.mom.service.InternalCheckService;
|
import com.yuanchu.mom.utils.JackSonUtil;
|
import com.yuanchu.mom.vo.Result;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.AllArgsConstructor;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.servlet.http.HttpServletResponse;
|
import java.util.Map;
|
|
|
/**
|
* 内审检查表
|
*
|
* @author zhuo
|
* @since 2024-11-11
|
*/
|
@Api(tags = "内审检查")
|
@AllArgsConstructor
|
@RestController
|
@RequestMapping("/internalCheck")
|
public class InternalCheckController {
|
|
private InternalCheckService internalCheckService;
|
|
/**
|
* 内审检查分页查询
|
* @param data
|
* @return
|
*/
|
@ValueAuth
|
@ApiOperation(value = "内审检查分页查询")
|
@PostMapping("/pageInternalCheck")
|
public Result<IPage<InternalCheckDto>> pageInternalCheck(@RequestBody Map<String, Object> data) throws Exception {
|
Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class);
|
InternalCheck internalCheck = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), InternalCheck.class);
|
return Result.success(internalCheckService.pageInternalCheck(page, internalCheck));
|
}
|
|
/**
|
* 内审检查新增
|
* @return
|
*/
|
@ValueAuth
|
@ApiOperation(value = "内审检查新增")
|
@PostMapping("/addInternalCheck")
|
public Result addInternalCheck(@RequestBody InternalCheckDto internalCheck){
|
return Result.success(internalCheckService.addInternalCheck(internalCheck));
|
}
|
|
/**
|
* 内审检查修改
|
* @return
|
*/
|
@ValueAuth
|
@ApiOperation(value = "内审检查修改")
|
@PostMapping("/updateInternalCheck")
|
public Result updateInternalCheck(@RequestBody InternalCheckDto internalCheck){
|
return Result.success(internalCheckService.updateInternalCheck(internalCheck));
|
}
|
|
/**
|
* 内审检查删除
|
* @return
|
*/
|
@ValueAuth
|
@ApiOperation(value = "内审检查删除")
|
@GetMapping("/delInternalCheck")
|
public Result delInternalCheck(Integer checkId){
|
return Result.success(internalCheckService.delInternalCheck(checkId));
|
}
|
|
/**
|
* 内审检查查看详情
|
* @return
|
*/
|
@ValueAuth
|
@ApiOperation(value = "内审检查查看详情")
|
@GetMapping("/getInternalCheckOne")
|
public Result<InternalCheckDto> getInternalCheckOne(Integer checkId){
|
return Result.success(internalCheckService.getInternalCheckOne(checkId));
|
}
|
|
|
/**
|
* 内审检查批准
|
* @return
|
*/
|
@ValueClassify("内审检查")
|
@ApiOperation(value = "内审检查批准")
|
@PostMapping("/ratifyInternalCheck")
|
public Result ratifyInternalCheck(@RequestBody InternalCheckDto internalCheck){
|
return Result.success(internalCheckService.ratifyInternalCheck(internalCheck));
|
}
|
|
/**
|
* 导出内审检查
|
* @return
|
*/
|
@ValueAuth
|
@ApiOperation(value = "导出内审检查")
|
@GetMapping("/exportInternalCheck")
|
public void exportInternalCheck(Integer checkId, HttpServletResponse response){
|
internalCheckService.exportInternalCheck(checkId, response);
|
}
|
|
}
|