58 lines
1.9 KiB
Java
58 lines
1.9 KiB
Java
|
|
package com.rzyc.controller;
|
||
|
|
|
||
|
|
import com.common.utils.model.Code;
|
||
|
|
import com.common.utils.model.Message;
|
||
|
|
import com.common.utils.model.SingleResult;
|
||
|
|
import com.rzyc.model.check.BookEntCheck;
|
||
|
|
import io.swagger.annotations.Api;
|
||
|
|
import io.swagger.annotations.ApiImplicitParam;
|
||
|
|
import io.swagger.annotations.ApiImplicitParams;
|
||
|
|
import io.swagger.annotations.ApiOperation;
|
||
|
|
import org.springframework.stereotype.Controller;
|
||
|
|
import org.springframework.validation.annotation.Validated;
|
||
|
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
||
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @author dong
|
||
|
|
* @date 2022-09-28 15:30
|
||
|
|
* @Version V1.0
|
||
|
|
*/
|
||
|
|
@Api(tags = "PC企业检查和隐患")
|
||
|
|
@CrossOrigin("*")
|
||
|
|
@RequestMapping("pcCheck")
|
||
|
|
@Controller
|
||
|
|
@Validated
|
||
|
|
public class PcCheckController extends BaseController{
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 检查记录详细
|
||
|
|
* */
|
||
|
|
@ApiOperation(value = "检查记录详细", notes = "检查记录详细")
|
||
|
|
@GetMapping("/getCompanyCheckDetail")
|
||
|
|
@ApiImplicitParams({
|
||
|
|
@ApiImplicitParam(name = "id", value = "检查id", required = true, dataType = "string"),
|
||
|
|
})
|
||
|
|
@ResponseBody
|
||
|
|
public SingleResult<String> getCompanyCheckDetail(String id)throws Exception {
|
||
|
|
SingleResult singleResult = new SingleResult();
|
||
|
|
BookEntCheck bookEntCheck = bookEntCheckMapper.selectCheckDetail(id);
|
||
|
|
if (null != bookEntCheck){
|
||
|
|
|
||
|
|
|
||
|
|
//处理数据,第二个参数是给小程序用的判断isSign
|
||
|
|
handleCheckDetail(bookEntCheck,"simProgram");
|
||
|
|
|
||
|
|
singleResult.setData(bookEntCheck);
|
||
|
|
singleResult.setMessage(Message.SUCCESS);
|
||
|
|
singleResult.setCode(Code.SUCCESS.getCode());
|
||
|
|
}else {
|
||
|
|
singleResult.setMessage(Message.ERROR);
|
||
|
|
singleResult.setCode(Code.ERROR.getCode());
|
||
|
|
}
|
||
|
|
return singleResult;
|
||
|
|
}
|
||
|
|
}
|