package com.gk.hotwork.specialWork.controller;
|
|
|
import cn.hutool.core.util.StrUtil;
|
import com.alibaba.fastjson.JSONObject;
|
import com.gk.hotwork.Config.Oauth2.RedisKeyEnum;
|
import com.gk.hotwork.Controller.Base.BaseController;
|
import com.gk.hotwork.Domain.Enum.ResultCodes;
|
import com.gk.hotwork.Domain.UserInfo;
|
import com.gk.hotwork.Domain.Utils.CommonUtil;
|
import com.gk.hotwork.Domain.Utils.PageUtils;
|
import com.gk.hotwork.Domain.Vo.PageQuery;
|
import com.gk.hotwork.Domain.Vo.ResultVO;
|
import com.gk.hotwork.Domain.co.ContextCacheUser;
|
import com.gk.hotwork.doublePrevention.utils.CacheUserTransfer;
|
import com.gk.hotwork.specialWork.model.dto.req.WorkProcessDetectionReqDTO;
|
import com.gk.hotwork.specialWork.model.dto.resp.WorkApplyReportableRespDTO;
|
import com.gk.hotwork.specialWork.model.dto.resp.WorkProcessDetectionInfoRespDTO;
|
import com.gk.hotwork.specialWork.model.query.WorkProcessDetectionPageQuery;
|
import com.gk.hotwork.specialWork.model.query.WorkProcessWorkApplyQuery;
|
import com.gk.hotwork.specialWork.service.WorkProcessService;
|
import org.apache.tomcat.util.net.openssl.ciphers.Authentication;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
@RestController
|
@RequestMapping("work/process")
|
public class WorkProcessController extends BaseController {
|
|
@Autowired
|
private WorkProcessService workProcessService;
|
|
|
|
/**
|
* @Description: 查询可上传的作业信息
|
*/
|
@RequestMapping(value = "/workApply/list", method = RequestMethod.POST)
|
public ResultVO<List<WorkApplyReportableRespDTO>> workApplyList(Authentication authentication, @RequestBody WorkProcessWorkApplyQuery query) {
|
ContextCacheUser currentUser = CacheUserTransfer.transfer(getUser());
|
List<WorkApplyReportableRespDTO> result = workProcessService.listReportableWorkApply(currentUser, query);
|
return new ResultVO<>(ResultCodes.OK, result);
|
}
|
|
|
/**
|
* @Description: 检测上报
|
*/
|
@RequestMapping(value = "/detection/report", method = RequestMethod.POST)
|
public ResultVO detectionReport(Authentication authentication, @RequestBody WorkProcessDetectionReqDTO reqDTO) {
|
ContextCacheUser currentUser = CacheUserTransfer.transfer(getUser());
|
workProcessService.detectionReport(currentUser, reqDTO);
|
return new ResultVO(ResultCodes.OK);
|
}
|
|
|
/**
|
* @Description: 检测分页
|
*/
|
@RequestMapping(value = "/detection/page/list", method = RequestMethod.POST)
|
public ResultVO<List<WorkProcessDetectionInfoRespDTO>> detectionPageList(Authentication authentication, @RequestBody PageQuery<WorkProcessDetectionPageQuery> pageQuery) {
|
ContextCacheUser currentUser = CacheUserTransfer.transfer(getUser());
|
PageUtils.checkCheck(pageQuery);
|
return workProcessService.listDetectionByPage(currentUser, pageQuery);
|
}
|
|
|
|
}
|