郑永安
2023-08-15 1445319788eb92a7c06c2409b477bbe8402ffed1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package com.gk.hotwork.Controller;
 
import java.util.Date;
 
import org.springframework.beans.factory.annotation.Autowired;
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.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gk.hotwork.Controller.Base.BaseController;
import com.gk.hotwork.Domain.SafetyFacilityInspection;
import com.gk.hotwork.Domain.SafetyInspectionItem;
import com.gk.hotwork.Domain.Utils.FilterObject;
import com.gk.hotwork.Domain.Utils.Msg;
import com.gk.hotwork.Service.SafetyFacilityInspectionService;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
 
 
@Api(tags = "安全设施审查流程")
@RestController
@RequestMapping("/safetyFacilityInspection")
public class SafetyFacilityInspectionController extends BaseController{
 
    @Autowired
    private SafetyFacilityInspectionService safetyFacilityInspectionService;
    
    
    @ApiOperation("分页")
    @PostMapping("/page")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "progress",value = "进度进度(0:待受理,1:已受理,10:待评审,11:评审中,12:评审否决,19:待企业反馈,20:待审查,21:审查中,29:待企业补正,22:审查否决,30:完成)"),
            @ApiImplicitParam(name = "expert",value = "审查专家"),
            @ApiImplicitParam(name = "submitDateStartTime",value = "开始时间"),
            @ApiImplicitParam(name = "submitDateEndTime",value = "结束时间")
    })
    public Msg selectPage(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = safetyFacilityInspectionService.selectPage(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
    
    
    @ApiOperation("/新增")
    @PostMapping("/add")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "submitDate",value = "提交日期"),
        @ApiImplicitParam(name = "type",value = "类别(1:安全设施设计审查,2:安全条件审查)"),
        @ApiImplicitParam(name = "projectName",value = "项目名称"),
        @ApiImplicitParam(name = "progress",value = "进度(0:待受理,1:已受理,10:待评审,11:评审中,12:评审否决,19:待企业反馈,20:待审查,21:审查中,29:待企业补正,22:审查否决,30:完成)"),
        @ApiImplicitParam(name = "expert",value = "审查专家"),
        @ApiImplicitParam(name = "contact",value = "联系人"),
        @ApiImplicitParam(name = "telephone",value = "联系电话")
})
    public Msg add(@RequestBody SafetyFacilityInspection param) {
        safetyFacilityInspectionService.addOne(param, this.getUser());
        return success();
    }
}