websocket接口更新,service的方法添加@Transactional
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.BattGtstateMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | private BattGtstateMapper mapper; |
| | | |
| | | //根据电池组id查询储能电池组信息 |
| | | @Transactional |
| | | public Response serchByCondition(int battGroupId) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("BattGroupId",battGroupId); |
| | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.BattRsalarmMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | @Resource |
| | | private BattRsalarmMapper mapper; |
| | | //电池组组端告警 |
| | | @Transactional |
| | | public Response getInfo(int battGroupId) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("battGroupId",battGroupId); |
| | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.BattRtalarmMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | @Resource |
| | | private BattRtalarmMapper mapper; |
| | | //电池告警 |
| | | @Transactional |
| | | public Response getInfo(int battGroupId) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("battGroupId",battGroupId); |
| | |
| | | import com.whyc.pojo.BattRtdata; |
| | | import com.whyc.pojo.BattRtstate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @Transactional |
| | | public class BattRtdataService { |
| | | |
| | | @Resource |
| | |
| | | import com.whyc.pojo.UserInf; |
| | | import com.whyc.util.ActionUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @Transactional |
| | | public class BattRtstateService { |
| | | |
| | | |
| | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.Ess3100PcsStateMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | |
| | | |
| | | //查询所有的pcs状态信息 |
| | | @Transactional |
| | | public Response searchAll() { |
| | | List list=mapper.selectList(null); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | |
| | | import com.whyc.mapper.Ess3100SysstateMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | private Ess3100SysstateMapper mapper; |
| | | |
| | | //查询所有的系统状态信息 |
| | | @Transactional |
| | | public Response searchAll() { |
| | | List list=mapper.selectList(null); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.Fbs9100ChargerstateMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | @Resource |
| | | private Fbs9100ChargerstateMapper mapper; |
| | | //获取充电机的实时信息 |
| | | @Transactional |
| | | public Response getDataByDevId(int powerDeviceId) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("PowerDeviceId",powerDeviceId); |
| | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.Fbs9100InsulatstateMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | private Fbs9100InsulatstateMapper mapper; |
| | | |
| | | //获取绝缘装置的实时信息 |
| | | @Transactional |
| | | public Response getDataByDevId(int powerDeviceId) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("PowerDeviceId",powerDeviceId); |
| | |
| | | import com.whyc.util.ActionUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.xml.crypto.Data; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @Transactional |
| | | public class Fbs9100StateService { |
| | | @Resource |
| | | private Fbs9100StateMapper mapper; |
| | |
| | | import com.whyc.mapper.Fbs9100sFodStateMapper; |
| | | import com.whyc.pojo.Fbs9100sFodState; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | @Resource |
| | | private Fbs9100sFodStateMapper mapper; |
| | | //获取剩余天数,工作模式,组端电压,峰值电 |
| | | @Transactional |
| | | public Response serchByCondition(int battGroupId) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("battGroupId",battGroupId); |
| | |
| | | import com.whyc.pojo.Ld9State; |
| | | import com.whyc.util.ActionUtil; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | |
| | | private Ld9StateMapper mapper; |
| | | |
| | | //通过设备id查询LD9数据 |
| | | @Transactional |
| | | public Response searchByDevId(int devId) { |
| | | PageHelper.startPage(1,1); |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.Li9130BmsStateMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | @Resource |
| | | private Li9130BmsStateMapper mapper; |
| | | //读取模拟量 |
| | | @Transactional |
| | | public Response searchParam(int devId) { |
| | | PageHelper.startPage(1,4); |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.LithiumDataMapper; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | private LithiumDataMapper mapper; |
| | | |
| | | //根据电池id查询锂电池信息 |
| | | @Transactional |
| | | public Response getInfoByBattGroupId(int battGroupId) { |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("BattGroupId",battGroupId); |
| | |
| | | import com.whyc.pojo.PwrdevAcdcdata; |
| | | import com.whyc.pojo.PwrdevDcdata; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @Transactional |
| | | public class PwrdevAcdcdataService { |
| | | @Resource |
| | | private PwrdevAcdcdataMapper mapper; |