| | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.BattInfMapper; |
| | | import com.whyc.mapper.CircleInfMapper; |
| | | import com.whyc.pojo.Battinf; |
| | | import com.whyc.pojo.CircleInf; |
| | | import com.whyc.pojo.PowerInf; |
| | | import com.whyc.pojo.StationInf; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private CircleInfMapper mapper; |
| | | |
| | | @Resource |
| | | private BattInfMapper battInfMapper; |
| | | |
| | | public int add(CircleInf circleInf){ |
| | | return mapper.insert(circleInf); |
| | |
| | | List<CircleInf> list=mapper.selectList(null); |
| | | return new Response().setII(1,list!=null,list,"获取动环下拉资产信息"); |
| | | } |
| | | |
| | | /** |
| | | * 新:从站点表校验站点是否存在 |
| | | * 旧:电源添加前校验是否站点存在,从电池表+电源表查询,弃用 |
| | | * */ |
| | | public Battinf judgeBattStationName3(CircleInf cinf){ |
| | | Battinf battinf = new Battinf(); |
| | | battinf.setStationName1(cinf.getStationName1()); |
| | | battinf.setStationName2(cinf.getStationName2()); |
| | | battinf.setStationName3(cinf.getStationName3()); |
| | | battinf.setStationName5(cinf.getStationName5()); |
| | | |
| | | return battInfMapper.judgeBattStationName3(battinf); |
| | | } |
| | | } |