forked from xxhjsb/wit-park-backend
分页修改
parent
d8a715a547
commit
e1f45ac0b5
|
@ -3,13 +3,14 @@ package com.hbt.safety.supervision.controller;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hbt.common.core.domain.R;
|
||||||
import com.hbt.safety.supervision.pojo.EscalateHiddenDanger;
|
import com.hbt.safety.supervision.pojo.EscalateHiddenDanger;
|
||||||
|
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
||||||
|
import com.hbt.safety.supervision.service.IHiddenDangerService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.hbt.safety.supervision.service.IEscalateHiddenDangerService;
|
import com.hbt.safety.supervision.service.IEscalateHiddenDangerService;
|
||||||
import com.hbt.common.core.web.controller.BaseController;
|
import com.hbt.common.core.web.controller.BaseController;
|
||||||
import com.hbt.common.core.web.domain.AjaxResult;
|
import com.hbt.common.core.web.domain.AjaxResult;
|
||||||
|
@ -27,15 +28,23 @@ public class EscalateHiddenDangerController extends BaseController
|
||||||
@Autowired
|
@Autowired
|
||||||
private IEscalateHiddenDangerService escalateHiddenDangerService;
|
private IEscalateHiddenDangerService escalateHiddenDangerService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IHiddenDangerService hiddenDangerService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据巡检id查询上报隐患列表
|
* 根据巡检id查询上报隐患列表
|
||||||
*
|
*
|
||||||
* @param id 巡检执法id
|
* @param id 巡检执法id
|
||||||
|
* @param currentPage 当前页
|
||||||
|
* @param pageSize 每页大小
|
||||||
|
* @param hiddenDangerName 隐患名称
|
||||||
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public String list(String id)
|
public String list(@RequestParam(value = "id") String id, @RequestParam(value = "currentPage") int currentPage,
|
||||||
|
@RequestParam(value = "pageSize") int pageSize, @RequestParam(value = "hiddenDangerName", required = false) String hiddenDangerName)
|
||||||
{
|
{
|
||||||
List<EscalateHiddenDanger> list = escalateHiddenDangerService.selectEscalateHiddenDangerList(id);
|
PageInfo<EscalateHiddenDanger> list = escalateHiddenDangerService.selectEscalateHiddenDangerList(id, currentPage, pageSize, hiddenDangerName);
|
||||||
return JSONObject.toJSONString(list);
|
return JSONObject.toJSONString(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,13 @@ package com.hbt.safety.supervision.controller;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hbt.common.core.domain.R;
|
||||||
import com.hbt.safety.supervision.pojo.EscalateRisk;
|
import com.hbt.safety.supervision.pojo.EscalateRisk;
|
||||||
|
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.hbt.safety.supervision.service.IEscalateRiskService;
|
import com.hbt.safety.supervision.service.IEscalateRiskService;
|
||||||
import com.hbt.common.core.web.controller.BaseController;
|
import com.hbt.common.core.web.controller.BaseController;
|
||||||
import com.hbt.common.core.web.domain.AjaxResult;
|
import com.hbt.common.core.web.domain.AjaxResult;
|
||||||
|
@ -29,12 +30,17 @@ public class EscalateRiskController extends BaseController
|
||||||
* 查询上报风险列表
|
* 查询上报风险列表
|
||||||
*
|
*
|
||||||
* @param id 巡检执法id
|
* @param id 巡检执法id
|
||||||
|
* @param currentPage 当前页
|
||||||
|
* @param pageSize 每页大小
|
||||||
|
* @param riskName 风险名称
|
||||||
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public String list(String id)
|
public String list(@RequestParam(value = "id") String id, @RequestParam(value = "currentPage") int currentPage,
|
||||||
|
@RequestParam(value = "pageSize") int pageSize, @RequestParam(value = "riskName", required = false) String riskName)
|
||||||
{
|
{
|
||||||
List<EscalateRisk> list = escalateRiskService.selectEscalateRiskList(id);
|
PageInfo<EscalateRisk> pageInfo = escalateRiskService.selectEscalateRiskList(id, currentPage, pageSize, riskName);
|
||||||
return JSONObject.toJSONString(list);
|
return JSONObject.toJSONString(pageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -76,4 +82,6 @@ public class EscalateRiskController extends BaseController
|
||||||
AjaxResult ajaxResult = toAjax(escalateRiskService.deleteEscalateRiskByIds(ids));
|
AjaxResult ajaxResult = toAjax(escalateRiskService.deleteEscalateRiskByIds(ids));
|
||||||
return JSONObject.toJSONString(ajaxResult);
|
return JSONObject.toJSONString(ajaxResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import com.hbt.common.core.web.controller.BaseController;
|
import com.hbt.common.core.web.controller.BaseController;
|
||||||
import com.hbt.common.core.web.domain.AjaxResult;
|
import com.hbt.common.core.web.domain.AjaxResult;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 隐患Controller
|
* 隐患Controller
|
||||||
*
|
*
|
||||||
|
@ -28,16 +30,14 @@ public class HiddenDangerController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 查询隐患列表
|
* 查询隐患列表
|
||||||
*
|
*
|
||||||
* @param currentPage 当前页
|
|
||||||
* @param pageSize 每页条数
|
|
||||||
* @return 返回值
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
@ApiOperation("查询隐患列表")
|
@ApiOperation("查询隐患列表")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R<PageInfo<HiddenDanger>> list(@RequestParam(value = "currentPage") int currentPage, @RequestParam(value = "pageSize") int pageSize)
|
public String list()
|
||||||
{
|
{
|
||||||
PageInfo<HiddenDanger> pageInfo = hiddenDangerService.selectHiddenDangerList(currentPage, pageSize);
|
List<HiddenDanger> list = hiddenDangerService.selectHiddenDangerList();
|
||||||
return R.ok(pageInfo);
|
return JSONObject.toJSONString(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -30,14 +30,19 @@ public class LawEnforcementInspectionController extends BaseController
|
||||||
*
|
*
|
||||||
* @param currentPage 当前页
|
* @param currentPage 当前页
|
||||||
* @param pageSize 每页条数
|
* @param pageSize 每页条数
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
* @return 返回值
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
@ApiOperation("查询执法巡查列表")
|
@ApiOperation("查询执法巡查列表")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R<PageInfo<LawEnforcementInspection>> list(@RequestParam(value = "currentPage") int currentPage, @RequestParam(value = "pageSize") int pageSize)
|
public String list(@RequestParam(value = "currentPage") int currentPage,
|
||||||
|
@RequestParam(value = "pageSize") int pageSize,
|
||||||
|
@RequestParam(value = "startTime", required = false) String startTime,
|
||||||
|
@RequestParam(value = "endTime", required = false) String endTime)
|
||||||
{
|
{
|
||||||
PageInfo<LawEnforcementInspection> pageInfo = lawEnforcementInspectionService.selectLawEnforcementInspectionList(currentPage, pageSize);
|
PageInfo<LawEnforcementInspection> pageInfo = lawEnforcementInspectionService.selectLawEnforcementInspectionList(currentPage, pageSize, startTime, endTime);
|
||||||
return R.ok(pageInfo);
|
return JSONObject.toJSONString(pageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -12,6 +12,8 @@ import com.hbt.safety.supervision.service.IRiskService;
|
||||||
import com.hbt.common.core.web.controller.BaseController;
|
import com.hbt.common.core.web.controller.BaseController;
|
||||||
import com.hbt.common.core.web.domain.AjaxResult;
|
import com.hbt.common.core.web.domain.AjaxResult;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 风险Controller
|
* 风险Controller
|
||||||
*
|
*
|
||||||
|
@ -28,16 +30,14 @@ public class RiskController extends BaseController
|
||||||
/**
|
/**
|
||||||
* 查询风险列表
|
* 查询风险列表
|
||||||
*
|
*
|
||||||
* @param currentPage 当前页
|
|
||||||
* @param pageSize 每页条数
|
|
||||||
* @return 返回值
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
@ApiOperation("查询风险列表")
|
@ApiOperation("查询风险列表")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public R<PageInfo<Risk>> list(@RequestParam(value = "currentPage") int currentPage, @RequestParam(value = "pageSize") int pageSize)
|
public String list()
|
||||||
{
|
{
|
||||||
PageInfo<Risk> pageInfo = riskService.selectRiskList(currentPage, pageSize);
|
List<Risk> list = riskService.selectRiskList();
|
||||||
return R.ok(pageInfo);
|
return JSONObject.toJSONString(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
|
|
||||||
import com.hbt.safety.supervision.pojo.EscalateHiddenDanger;
|
import com.hbt.safety.supervision.pojo.EscalateHiddenDanger;
|
||||||
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上报隐患Mapper接口
|
* 上报隐患Mapper接口
|
||||||
|
@ -24,9 +25,10 @@ public interface EscalateHiddenDangerMapper
|
||||||
* 查询上报隐患列表
|
* 查询上报隐患列表
|
||||||
*
|
*
|
||||||
* @param id 巡检执法id
|
* @param id 巡检执法id
|
||||||
|
* @param hiddenDangerName 隐患名称
|
||||||
* @return 上报隐患集合
|
* @return 上报隐患集合
|
||||||
*/
|
*/
|
||||||
List<EscalateHiddenDanger> selectEscalateHiddenDangerList(String id);
|
List<EscalateHiddenDanger> selectEscalateHiddenDangerList(@Param("id") String id, @Param("hiddenDangerName") String hiddenDangerName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增上报隐患
|
* 新增上报隐患
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.hbt.safety.supervision.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.hbt.safety.supervision.pojo.EscalateRisk;
|
import com.hbt.safety.supervision.pojo.EscalateRisk;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上报风险Mapper接口
|
* 上报风险Mapper接口
|
||||||
|
@ -22,9 +23,10 @@ public interface EscalateRiskMapper
|
||||||
* 查询上报风险列表
|
* 查询上报风险列表
|
||||||
*
|
*
|
||||||
* @param id 巡检执法id
|
* @param id 巡检执法id
|
||||||
|
* @param riskName 风险名称
|
||||||
* @return 上报风险集合
|
* @return 上报风险集合
|
||||||
*/
|
*/
|
||||||
List<EscalateRisk> selectEscalateRiskList(String id);
|
List<EscalateRisk> selectEscalateRiskList(@Param("id") String id, @Param("riskName") String riskName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增上报风险
|
* 新增上报风险
|
||||||
|
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||||
|
|
||||||
import com.hbt.safety.supervision.pojo.LawEnforcementInspection;
|
import com.hbt.safety.supervision.pojo.LawEnforcementInspection;
|
||||||
import com.hbt.safety.supervision.pojo.vo.LawEnforcementInspectionVo;
|
import com.hbt.safety.supervision.pojo.vo.LawEnforcementInspectionVo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 执法巡查Mapper接口
|
* 执法巡查Mapper接口
|
||||||
|
@ -26,7 +27,14 @@ public interface LawEnforcementInspectionMapper
|
||||||
*
|
*
|
||||||
* @return 执法巡查集合
|
* @return 执法巡查集合
|
||||||
*/
|
*/
|
||||||
List<LawEnforcementInspection> selectLawEnforcementInspectionList();
|
/**
|
||||||
|
* 查询执法巡查列表
|
||||||
|
*
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
|
* @return 返回值
|
||||||
|
*/
|
||||||
|
List<LawEnforcementInspection> selectLawEnforcementInspectionList(@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增执法巡查
|
* 新增执法巡查
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class LawEnforcementInspection extends BaseEntity
|
||||||
|
|
||||||
/** 巡查日期 */
|
/** 巡查日期 */
|
||||||
@ApiModelProperty(value = "巡查日期")
|
@ApiModelProperty(value = "巡查日期")
|
||||||
private Date inspectionDate;
|
private String inspectionDate;
|
||||||
|
|
||||||
/** 巡查人员 */
|
/** 巡查人员 */
|
||||||
@ApiModelProperty(value = "巡查人员")
|
@ApiModelProperty(value = "巡查人员")
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.hbt.safety.supervision.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.hbt.safety.supervision.pojo.EscalateHiddenDanger;
|
import com.hbt.safety.supervision.pojo.EscalateHiddenDanger;
|
||||||
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
||||||
|
|
||||||
|
@ -21,12 +22,15 @@ public interface IEscalateHiddenDangerService
|
||||||
HiddenDanger selectEscalateHiddenDangerById(int id);
|
HiddenDanger selectEscalateHiddenDangerById(int id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询上报隐患列表
|
* 根据巡检id查询上报隐患列表
|
||||||
*
|
*
|
||||||
* @param id 巡检执法id
|
* @param id 巡检执法id
|
||||||
* @return 上报隐患集合
|
* @param currentPage 当前页
|
||||||
|
* @param pageSize 每页大小
|
||||||
|
* @param hiddenDangerName 隐患名称
|
||||||
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
List<EscalateHiddenDanger> selectEscalateHiddenDangerList(String id);
|
PageInfo<EscalateHiddenDanger> selectEscalateHiddenDangerList(String id, int currentPage, int pageSize, String hiddenDangerName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增上报隐患
|
* 新增上报隐患
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.hbt.safety.supervision.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.hbt.safety.supervision.pojo.EscalateRisk;
|
import com.hbt.safety.supervision.pojo.EscalateRisk;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,9 +24,12 @@ public interface IEscalateRiskService
|
||||||
* 查询上报风险列表
|
* 查询上报风险列表
|
||||||
*
|
*
|
||||||
* @param id 巡检执法id
|
* @param id 巡检执法id
|
||||||
* @return 上报风险集合
|
* @param currentPage 当前页
|
||||||
|
* @param pageSize 每页大小
|
||||||
|
* @param riskName 风险名称
|
||||||
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
List<EscalateRisk> selectEscalateRiskList(String id);
|
PageInfo<EscalateRisk> selectEscalateRiskList(String id, int currentPage, int pageSize, String riskName);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增上报风险
|
* 新增上报风险
|
||||||
|
|
|
@ -3,6 +3,8 @@ package com.hbt.safety.supervision.service;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 隐患Service接口
|
* 隐患Service接口
|
||||||
*
|
*
|
||||||
|
@ -19,13 +21,20 @@ public interface IHiddenDangerService
|
||||||
HiddenDanger selectHiddenDangerById(String id);
|
HiddenDanger selectHiddenDangerById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询隐患列表
|
* 查询隐患列表(分页)
|
||||||
*
|
*
|
||||||
* @param currentPage 当前页
|
* @param currentPage 当前页
|
||||||
* @param pageSize 每页条数
|
* @param pageSize 每页条数
|
||||||
* @return 返回值
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
PageInfo<HiddenDanger> selectHiddenDangerList(int currentPage, int pageSize);
|
PageInfo<HiddenDanger> selectHiddenDangerPageInfo(int currentPage, int pageSize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询隐患列表(不分页)
|
||||||
|
*
|
||||||
|
* @return 返回值
|
||||||
|
*/
|
||||||
|
List<HiddenDanger> selectHiddenDangerList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增隐患
|
* 新增隐患
|
||||||
|
|
|
@ -24,9 +24,11 @@ public interface ILawEnforcementInspectionService
|
||||||
*
|
*
|
||||||
* @param currentPage 当前页
|
* @param currentPage 当前页
|
||||||
* @param pageSize 每页条数
|
* @param pageSize 每页条数
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
* @return 返回值
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
PageInfo<LawEnforcementInspection> selectLawEnforcementInspectionList(int currentPage, int pageSize);
|
PageInfo<LawEnforcementInspection> selectLawEnforcementInspectionList(int currentPage, int pageSize, String startTime, String endTime);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增执法巡查
|
* 新增执法巡查
|
||||||
|
|
|
@ -3,6 +3,8 @@ package com.hbt.safety.supervision.service;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.hbt.safety.supervision.pojo.Risk;
|
import com.hbt.safety.supervision.pojo.Risk;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 风险Service接口
|
* 风险Service接口
|
||||||
*
|
*
|
||||||
|
@ -21,11 +23,9 @@ public interface IRiskService
|
||||||
/**
|
/**
|
||||||
* 查询风险列表
|
* 查询风险列表
|
||||||
*
|
*
|
||||||
* @param currentPage 当前页
|
|
||||||
* @param pageSize 每页条数
|
|
||||||
* @return 返回值
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
PageInfo<Risk> selectRiskList(int currentPage, int pageSize);
|
List<Risk> selectRiskList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增风险
|
* 新增风险
|
||||||
|
|
|
@ -2,6 +2,8 @@ package com.hbt.safety.supervision.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.hbt.safety.supervision.mapper.EscalateHiddenDangerMapper;
|
import com.hbt.safety.supervision.mapper.EscalateHiddenDangerMapper;
|
||||||
import com.hbt.safety.supervision.pojo.EscalateHiddenDanger;
|
import com.hbt.safety.supervision.pojo.EscalateHiddenDanger;
|
||||||
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
import com.hbt.safety.supervision.pojo.HiddenDanger;
|
||||||
|
@ -33,14 +35,20 @@ public class EscalateHiddenDangerServiceImpl implements IEscalateHiddenDangerSer
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询上报隐患列表
|
* 根据巡检id查询上报隐患列表
|
||||||
*
|
*
|
||||||
* @return 上报隐患
|
* @param id 巡检执法id
|
||||||
|
* @param currentPage 当前页
|
||||||
|
* @param pageSize 每页大小
|
||||||
|
* @param hiddenDangerName 隐患名称
|
||||||
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<EscalateHiddenDanger> selectEscalateHiddenDangerList(String id)
|
public PageInfo<EscalateHiddenDanger> selectEscalateHiddenDangerList(String id, int currentPage, int pageSize, String hiddenDangerName)
|
||||||
{
|
{
|
||||||
return escalateHiddenDangerMapper.selectEscalateHiddenDangerList(id);
|
PageHelper.startPage(currentPage, pageSize);
|
||||||
|
List<EscalateHiddenDanger> list = escalateHiddenDangerMapper.selectEscalateHiddenDangerList(id, hiddenDangerName);
|
||||||
|
return new PageInfo<>(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,6 +2,8 @@ package com.hbt.safety.supervision.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.hbt.safety.supervision.pojo.EscalateRisk;
|
import com.hbt.safety.supervision.pojo.EscalateRisk;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -34,12 +36,18 @@ public class EscalateRiskServiceImpl implements IEscalateRiskService
|
||||||
/**
|
/**
|
||||||
* 查询上报风险列表
|
* 查询上报风险列表
|
||||||
*
|
*
|
||||||
* @return 上报风险
|
* @param id 巡检执法id
|
||||||
|
* @param currentPage 当前页
|
||||||
|
* @param pageSize 每页大小
|
||||||
|
* @param riskName 风险名称
|
||||||
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<EscalateRisk> selectEscalateRiskList(String id)
|
public PageInfo<EscalateRisk> selectEscalateRiskList(String id, int currentPage, int pageSize, String riskName)
|
||||||
{
|
{
|
||||||
return escalateRiskMapper.selectEscalateRiskList(id);
|
PageHelper.startPage(currentPage, pageSize);
|
||||||
|
List<EscalateRisk> list = escalateRiskMapper.selectEscalateRiskList(id, riskName);
|
||||||
|
return new PageInfo<>(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -43,20 +43,34 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询隐患列表
|
* 查询隐患列表(分页)
|
||||||
*
|
*
|
||||||
* @param currentPage 当前页
|
* @param currentPage 当前页
|
||||||
* @param pageSize 每页条数
|
* @param pageSize 每页条数
|
||||||
* @return 返回值
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<HiddenDanger> selectHiddenDangerList(int currentPage, int pageSize)
|
public PageInfo<HiddenDanger> selectHiddenDangerPageInfo(int currentPage, int pageSize)
|
||||||
{
|
{
|
||||||
PageHelper.startPage(currentPage, pageSize);
|
PageHelper.startPage(currentPage, pageSize);
|
||||||
List<HiddenDanger> list = hiddenDangerMapper.selectHiddenDangerList();
|
List<HiddenDanger> list = hiddenDangerMapper.selectHiddenDangerList();
|
||||||
return new PageInfo<>(list);
|
return new PageInfo<>(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询隐患列表(分页)
|
||||||
|
*
|
||||||
|
* @return 返回值
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<HiddenDanger> selectHiddenDangerList()
|
||||||
|
{
|
||||||
|
List<HiddenDanger> list = hiddenDangerMapper.selectHiddenDangerList();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增隐患
|
* 新增隐患
|
||||||
*
|
*
|
||||||
|
|
|
@ -51,13 +51,15 @@ public class LawEnforcementInspectionServiceImpl implements ILawEnforcementInspe
|
||||||
*
|
*
|
||||||
* @param currentPage 当前页
|
* @param currentPage 当前页
|
||||||
* @param pageSize 每页条数
|
* @param pageSize 每页条数
|
||||||
|
* @param startTime 开始时间
|
||||||
|
* @param endTime 结束时间
|
||||||
* @return 返回值
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<LawEnforcementInspection> selectLawEnforcementInspectionList(int currentPage, int pageSize)
|
public PageInfo<LawEnforcementInspection> selectLawEnforcementInspectionList(int currentPage, int pageSize, String startTime, String endTime)
|
||||||
{
|
{
|
||||||
PageHelper.startPage(currentPage, pageSize);
|
PageHelper.startPage(currentPage, pageSize);
|
||||||
List<LawEnforcementInspection> list = lawEnforcementInspectionMapper.selectLawEnforcementInspectionList();
|
List<LawEnforcementInspection> list = lawEnforcementInspectionMapper.selectLawEnforcementInspectionList(startTime, endTime);
|
||||||
return new PageInfo<>(list);
|
return new PageInfo<>(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,16 +43,12 @@ public class RiskServiceImpl implements IRiskService
|
||||||
/**
|
/**
|
||||||
* 查询执法巡查列表
|
* 查询执法巡查列表
|
||||||
*
|
*
|
||||||
* @param currentPage 当前页
|
|
||||||
* @param pageSize 每页条数
|
|
||||||
* @return 返回值
|
* @return 返回值
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<Risk> selectRiskList(int currentPage, int pageSize)
|
public List<Risk> selectRiskList()
|
||||||
{
|
{
|
||||||
PageHelper.startPage(currentPage, pageSize);
|
return riskMapper.selectRiskList();
|
||||||
List<Risk> list = riskMapper.selectRiskList();
|
|
||||||
return new PageInfo<>(list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -22,6 +22,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectEscalateHiddenDangerVo"/>
|
<include refid="selectEscalateHiddenDangerVo"/>
|
||||||
<where>
|
<where>
|
||||||
a.enforcement_id = #{id}
|
a.enforcement_id = #{id}
|
||||||
|
<if test="hiddenDangerName != null and hiddenDangerName !=''" >
|
||||||
|
and b.name like "%"#{hiddenDangerName}"%"
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="selectEscalateRiskVo"/>
|
<include refid="selectEscalateRiskVo"/>
|
||||||
<where>
|
<where>
|
||||||
a.enforcement_id = #{id}
|
a.enforcement_id = #{id}
|
||||||
|
<if test="riskName != null and riskName !=''" >
|
||||||
|
and b.name like "%"#{riskName}"%"
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectLawEnforcementInspectionVo">
|
<sql id="selectLawEnforcementInspectionVo">
|
||||||
select distinct(a.id) id, a.inspection_date inspectionDate, a.person person, a.name name,
|
select distinct(a.id) id, DATE_FORMAT(a.inspection_date,'%Y-%m-%d %H:%i:%S') inspectionDate, a.person person, a.name name,
|
||||||
b.hidden_danger_id hiddenDangerId,
|
b.hidden_danger_id hiddenDangerId,
|
||||||
c.risk_id riskId
|
c.risk_id riskId
|
||||||
from law_enforcement_inspection as a
|
from law_enforcement_inspection as a
|
||||||
|
@ -23,6 +23,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="selectLawEnforcementInspectionList" parameterType="com.hbt.safety.supervision.pojo.LawEnforcementInspection" resultType="LawEnforcementInspection">
|
<select id="selectLawEnforcementInspectionList" parameterType="com.hbt.safety.supervision.pojo.LawEnforcementInspection" resultType="LawEnforcementInspection">
|
||||||
<include refid="selectLawEnforcementInspectionVo"/>
|
<include refid="selectLawEnforcementInspectionVo"/>
|
||||||
|
<where>
|
||||||
|
1=1
|
||||||
|
<if test="startTime != null and startTime !=''" >
|
||||||
|
and DATE_FORMAT(a.inspection_date,'%Y-%m-%d') >= #{startTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime !=''" >
|
||||||
|
and DATE_FORMAT(a.inspection_date,'%Y-%m-%d') <= #{endTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectLawEnforcementInspectionById" parameterType="String" resultType="LawEnforcementInspection">
|
<select id="selectLawEnforcementInspectionById" parameterType="String" resultType="LawEnforcementInspection">
|
||||||
|
|
Loading…
Reference in New Issue