| | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.Ld9StateMapper; |
| | | import com.whyc.mapper.Ld9UpdateStatusMapper; |
| | | import com.whyc.pojo.Fbs9100State; |
| | | import com.whyc.pojo.Ld9State; |
| | | import com.whyc.pojo.Ld9UpdateStatus; |
| | | import com.whyc.pojo.UserInf; |
| | | import com.whyc.util.ActionUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | return new Response().setII(1,ld9State==null?false:true,ld9State,""); |
| | | } |
| | | |
| | | public Response getPageLd9(int pageNum,int pageSize,String stationName1,String stationName2,String stationName5){ |
| | | UserInf userInf = ActionUtil.getUser(); |
| | | public Response getPageLd9(int pageNum,int pageSize,String stationName1,String stationName2,String stationName5,int uId){ |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<Ld9UpdateStatus> list = mapper.getLd9(stationName1,stationName2,stationName5,userInf.getUId().intValue()); |
| | | List<Ld9UpdateStatus> list = mapper.getLd9(stationName1,stationName2,stationName5,uId); |
| | | for (Ld9UpdateStatus ld9:list) { |
| | | if (ld9.getNum()==0){ |
| | | if (ld9.getNum()== null || ld9.getNum() == 0){ |
| | | Ld9UpdateStatus updateStatue = new Ld9UpdateStatus(); |
| | | updateStatue.setDevId(ld9.getFbsDeviceId().longValue()); |
| | | updateStatueMapper.insert(updateStatue); |
| | |
| | | return new Response().set(1,true,"更新成功"); |
| | | } |
| | | |
| | | //webSocket使用(FbsStateSocket) |
| | | public Response searchByCondition(int pageNum,int pageSize,int devErrcommcount,int uId){ |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<Fbs9100State> list = mapper.getLd9State(devErrcommcount,uId); |
| | | PageInfo<Fbs9100State> pageInfo = new PageInfo<>(list); |
| | | return new Response().set(1,pageInfo,"查询成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | } |