app接口修改
This commit is contained in:
parent
e3cc777c08
commit
00afab0cbf
|
|
@ -11,6 +11,11 @@ import java.util.Date;
|
|||
@Data
|
||||
public class DeviceWarnEntity {
|
||||
|
||||
/**
|
||||
* 工程id
|
||||
*/
|
||||
private Long proId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,6 +11,11 @@ import java.util.Date;
|
|||
@Data
|
||||
public class ViolationInfoEntity {
|
||||
|
||||
/**
|
||||
* 工程id
|
||||
*/
|
||||
private Long proId;
|
||||
|
||||
/** 工程名称 */
|
||||
private String proName;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,20 @@
|
|||
package com.bonus.app.controller;
|
||||
|
||||
import com.bonus.app.entity.DeviceWarnEntity;
|
||||
import com.bonus.app.entity.PeopleInfoEntity;
|
||||
import com.bonus.app.entity.StayPersonEntity;
|
||||
import com.bonus.app.service.IStayPersonService;
|
||||
import com.bonus.common.core.constant.BusinessConstants;
|
||||
import com.bonus.common.core.text.Convert;
|
||||
import com.bonus.common.core.utils.ServletUtils;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.entity.bracelet.vo.ProjectVo;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -35,10 +41,12 @@ public class StayPersonController extends BaseController{
|
|||
*/
|
||||
@GetMapping("getStayPersonList")
|
||||
@SysLog(title = "现场人员管理", businessType = OperaType.QUERY, module = "基础管理->现场人员管理", details = "查询现场人员列表")
|
||||
public TableDataInfo getStayPersonList(ProjectVo vo) {
|
||||
startPage();
|
||||
List<StayPersonEntity> list = service.getStayPersonList(vo);
|
||||
return getDataTable(list);
|
||||
public AjaxResult getStayPersonList(ProjectVo vo) {
|
||||
Integer pageNum = Convert.toInt(ServletUtils.getParameter(BusinessConstants.PAGE_NUM), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter(BusinessConstants.PAGE_SIZE), 10);
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
PageInfo<StayPersonEntity> pageInfo = service.getStayPersonList(vo);
|
||||
return AjaxResult.success(pageInfo.getList());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,32 +38,32 @@ public class WarnReminderController extends BaseController{
|
|||
|
||||
/**
|
||||
* 查询预警提醒 设备预警列表
|
||||
* @param proId
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getDeviceWarnList/{proId}")
|
||||
@GetMapping("getDeviceWarnList")
|
||||
@SysLog(title = "预警提醒管理", businessType = OperaType.QUERY, module = "基础管理->预警提醒管理", details = "查询预警提醒设备预警列表")
|
||||
public AjaxResult getDeviceWarnList(@PathVariable Long proId) {
|
||||
public AjaxResult getDeviceWarnList(DeviceWarnEntity vo) {
|
||||
Integer pageNum = Convert.toInt(ServletUtils.getParameter(BusinessConstants.PAGE_NUM), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter(BusinessConstants.PAGE_SIZE), 10);
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
PageInfo<DeviceWarnEntity> pageInfo = service.getDeviceWarnList(proId);
|
||||
PageInfo<DeviceWarnEntity> pageInfo = service.getDeviceWarnList(vo.getProId());
|
||||
return AjaxResult.success(pageInfo.getList());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询预警提醒 违章识别列表
|
||||
* @param proId
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getViolationInfoList/{proId}")
|
||||
@GetMapping("getViolationInfoList")
|
||||
@SysLog(title = "预警提醒管理", businessType = OperaType.QUERY, module = "基础管理->预警提醒管理", details = "查询预警提醒违章识别列表")
|
||||
public AjaxResult getViolationInfoList(@PathVariable Long proId) {
|
||||
public AjaxResult getViolationInfoList(ViolationInfoEntity vo) {
|
||||
Integer pageNum = Convert.toInt(ServletUtils.getParameter(BusinessConstants.PAGE_NUM), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter(BusinessConstants.PAGE_SIZE), 10);
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
PageInfo<ViolationInfoEntity> pageInfo = service.getViolationInfoList(proId);
|
||||
PageInfo<ViolationInfoEntity> pageInfo = service.getViolationInfoList(vo.getProId());
|
||||
return AjaxResult.success(pageInfo.getList());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
package com.bonus.app.service;
|
||||
|
||||
import com.bonus.app.entity.DeviceWarnEntity;
|
||||
import com.bonus.app.entity.PeopleInfoEntity;
|
||||
import com.bonus.app.entity.StayPersonEntity;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.entity.bracelet.vo.ProjectVo;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -18,8 +20,7 @@ public interface IStayPersonService {
|
|||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
public List<StayPersonEntity> getStayPersonList(ProjectVo vo);
|
||||
|
||||
PageInfo<StayPersonEntity> getStayPersonList(ProjectVo vo);
|
||||
// /**
|
||||
// * 切换时获取工程列表
|
||||
// * @param proId
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.bonus.common.core.utils.*;
|
|||
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.entity.bracelet.vo.ProjectVo;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -24,7 +25,7 @@ public class StayPersonServiceImpl implements IStayPersonService{
|
|||
|
||||
|
||||
@Override
|
||||
public List<StayPersonEntity> getStayPersonList(ProjectVo vo) {
|
||||
public PageInfo<StayPersonEntity> getStayPersonList(ProjectVo vo) {
|
||||
List<StayPersonEntity> list = new ArrayList<>();
|
||||
StayPersonEntity bEntity = new StayPersonEntity();
|
||||
Map<String, Object> towerMap = new HashMap<>();
|
||||
|
|
@ -55,7 +56,8 @@ public class StayPersonServiceImpl implements IStayPersonService{
|
|||
} catch (Exception e) {
|
||||
log.error("查询现场人员列表", e);
|
||||
}
|
||||
return list;
|
||||
PageInfo<StayPersonEntity> pageInfo = new PageInfo<>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ELSE ''
|
||||
END AS idCard
|
||||
FROM tb_bracelet blt
|
||||
left join tb_sh_box sbx on blt.box_id=sbx.id and sbx.del_flag = 0
|
||||
left join tb_sh_box sbx on blt.box_ix=sbx.id and sbx.del_flag = 0
|
||||
left join t_work_team twt on sbx.team_id = twt.team_id and twt.del_flag= 0
|
||||
left join tb_project_power tpp on tpp.id=sbx.gt_id and tpp.del_flag = 0
|
||||
left join tb_people tpe on blt.bid_id=tpe.id and peopel_type=0 and tpe.name is not null and tpe.name!=''
|
||||
|
|
|
|||
Loading…
Reference in New Issue