| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.pojo.Ld9State; |
| | | import com.whyc.pojo.Ld9UpdateStatus; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface Ld9StateMapper extends CustomMapper<Ld9State>{ |
| | | List<Ld9State> getLd9(String stationName1,String stationName2,String stationName5,int uId); |
| | | List<Ld9UpdateStatus> getLd9(String stationName1, String stationName2, String stationName5, int uId); |
| | | } |
| | |
| | | |
| | | @TableField(exist = false) |
| | | private String note; |
| | | @TableField(exist = false,value = "StationName") |
| | | private String stationName; |
| | | |
| | | @TableField(exist = false,value = "FBSDeviceId") |
| | | private Integer fbsDeviceId; |
| | | |
| | | |
| | | |
| | |
| | | @TableField("starttime") |
| | | private Date startTime; |
| | | private String note; |
| | | |
| | | @TableField(exist = false,value = "StationName") |
| | | private String stationName; |
| | | |
| | | @TableField(exist = false,value = "FBSDeviceId") |
| | | private Integer fbsDeviceId; |
| | | } |
| | |
| | | public Response getPageLd9(int pageNum,int pageSize,String stationName1,String stationName2,String stationName5){ |
| | | UserInf userInf = ActionUtil.getUser(); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<Ld9State> list = mapper.getLd9(stationName1,stationName2,stationName5,userInf.getUId().intValue()); |
| | | for (Ld9State ld9:list) { |
| | | List<Ld9UpdateStatus> list = mapper.getLd9(stationName1,stationName2,stationName5,userInf.getUId().intValue()); |
| | | for (Ld9UpdateStatus ld9:list) { |
| | | if (ld9.getNum()==0){ |
| | | Ld9UpdateStatus updateStatue = new Ld9UpdateStatus(); |
| | | updateStatue.setDevId(ld9.getFbsDeviceId().longValue()); |
| | | updateStatueMapper.insert(updateStatue); |
| | | } |
| | | } |
| | | PageInfo<Ld9State> pageInfo = new PageInfo<>(list); |
| | | PageInfo<Ld9UpdateStatus> pageInfo = new PageInfo<>(list); |
| | | return new Response().set(1,pageInfo,"查询成功"); |
| | | } |
| | | |
| | |
| | | <mapper namespace="com.whyc.mapper.Ld9StateMapper"> |
| | | |
| | | |
| | | <select id="getLd9" resultType="com.whyc.pojo.Ld9State"> |
| | | <select id="getLd9" resultType="com.whyc.pojo.Ld9UpdateStatus"> |
| | | SELECT DISTINCT |
| | | b.FBSDeviceId, |
| | | b.StationName, |