郑永安
2023-07-24 0645153dfa233b51a749db73f9bd5a8c5127c595
src/main/java/com/gk/hotwork/Controller/SafetySelfInspectionController.java
@@ -8,6 +8,7 @@
import com.gk.hotwork.Domain.SafetySelfInspectionItem;
import com.gk.hotwork.Domain.Utils.FilterObject;
import com.gk.hotwork.Domain.Utils.Msg;
import com.gk.hotwork.Domain.dto.resp.SafetySelfInspectionRespDTO;
import com.gk.hotwork.Service.SafetySelfInspectionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -19,6 +20,8 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api(tags = "安全生产标准化_自查清单")
@RestController
@@ -28,7 +31,7 @@
    @Autowired
    private SafetySelfInspectionService safetySelfInspectionService;
    @ApiOperation("分页")
    @ApiOperation("自排查分页")
    @PostMapping("/page")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
@@ -46,6 +49,24 @@
        IPage page = safetySelfInspectionService.selectPage(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
    @ApiOperation("监管排查分页")
    @PostMapping("/supervise/page")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageIndex",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "每页行数"),
            @ApiImplicitParam(name = "inspectionName",value = "自查清单名称"),
            @ApiImplicitParam(name = "inspectorName",value = "检查人名称"),
            @ApiImplicitParam(name = "checkedCompanyId",value = "被检查公司id"),
            @ApiImplicitParam(name = "inspectionStartTime",value = "开始时间"),
            @ApiImplicitParam(name = "inspectionEndTime",value = "结束时间"),
            @ApiImplicitParam(name = "status",value = "状态"),
    })
    public Msg selectSupervisePage(@RequestBody FilterObject filterObject) {
        Integer pageIndex = filterObject.getPageIndex();
        Integer pageSize = filterObject.getPageSize();
        IPage page = safetySelfInspectionService.selectSupervisePage(new Page<>(pageIndex, pageSize), filterObject.getFilter(), getUser());
        return success(page);
    }
    @ApiOperation("/自查清单详情")
    @PostMapping("/info")
@@ -56,7 +77,7 @@
    public Msg info(@RequestBody JSONObject jsonObject) {
        Long id = jsonObject.getLong("id");
        String unqualified = jsonObject.getString("unqualified");
        SafetySelfInspection safetySelfInspection= safetySelfInspectionService.infoOne(id,unqualified,getUser());
        SafetySelfInspectionRespDTO safetySelfInspection= safetySelfInspectionService.infoOne(id,unqualified,getUser());
        return success(safetySelfInspection);
    }
@@ -96,6 +117,15 @@
        safetySelfInspectionService.modItemInfo(param, getUser());
        return success();
    }
    @ApiOperation("/添加专家")
    @PostMapping("/add/item/expert")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "itemList",value = "检查项集合"),
    })
    public Msg addItemExpert(@RequestBody List<SafetySelfInspectionItem> itemList) {
        safetySelfInspectionService.addItemExpert(itemList, getUser());
        return success();
    }
    @ApiOperation("/新增")
@@ -108,11 +138,29 @@
            @ApiImplicitParam(name = "inspectionTime",value = "检查时间"),
            @ApiImplicitParam(name = "status",value = "状态"),
            @ApiImplicitParam(name = "itemList",value = "检查项集合"),
            @ApiImplicitParam(name = "elementAList",value = "一级要素id"),
    })
    public Msg add(@RequestBody SafetySelfInspection param) {
        safetySelfInspectionService.addOne(param, getUser());
        return success();
    }
    @ApiOperation("/新增监管排查")
    @PostMapping("/add/supervise")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "inspectionName",value = "排查清单名称"),
            @ApiImplicitParam(name = "checkedCompanyId",value = "被检查公司id"),
            @ApiImplicitParam(name = "checkedCompanyName",value = "被检查公司"),
            @ApiImplicitParam(name = "inspectionTime",value = "检查时间"),
            @ApiImplicitParam(name = "status",value = "状态"),
            @ApiImplicitParam(name = "itemList",value = "检查项集合"),
            @ApiImplicitParam(name = "elementAList",value = "一级要素id"),
            @ApiImplicitParam(name = "expertList",value = "专家用户id"),
    })
    public Msg addSupervise(@RequestBody SafetySelfInspection param) {
        safetySelfInspectionService.addSupervise(param, getUser());
        return success();
    }
    @ApiOperation("/修改")
    @PostMapping("/mod")