| | |
| | | int togetherFlag = mapper.getMaxTogetherFlag() + 1; |
| | | sinfWrapper.set("together_flag", togetherFlag); |
| | | } |
| | | int flag = mapper.update(null, sinfWrapper); |
| | | int flag = mapper.update((StationInf) ActionUtil.objeNull, sinfWrapper); |
| | | QueryWrapper queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("stationId", stationId); |
| | | List listB = binfMapper.selectList(queryWrapper); |
| | | if (listB != null && listB.size() > 0) { |
| | | binfMapper.update(null, wrapper); |
| | | binfMapper.update((Battinf) ActionUtil.objeNull, wrapper); |
| | | } |
| | | List listP = pinfMapper.selectList(queryWrapper); |
| | | if (listP != null && listP.size() > 0) { |
| | | pinfMapper.update(null, wrapper); |
| | | pinfMapper.update((PowerInf) ActionUtil.objeNull, wrapper); |
| | | } |
| | | return new Response().set(1, flag > 0, flag > 0 ? "编辑机房名成功" : "编辑机房名失败"); |
| | | } |
| | |
| | | } else { |
| | | mapInfo.setAddress(""); |
| | | } |
| | | int flag = mapper.update(null, wrapper); |
| | | int flag = mapper.update((StationInf) ActionUtil.objeNull, wrapper); |
| | | if (nofla > 0 || stlag > 0) { |
| | | QueryWrapper qwrapper = new QueryWrapper(); |
| | | qwrapper.eq("stationId", stationId); |
| | | List list = binfMapper.selectList(qwrapper); |
| | | if (list.size() > 0) { |
| | | binfMapper.update(null, infwrapper); |
| | | binfMapper.update((Battinf) ActionUtil.objeNull, infwrapper); |
| | | } |
| | | //修改相同机房 |
| | | if (sinfEx != null) { |
| | | wrapperEx.eq("stationId", sinfEx.getStationId()); |
| | | infwrapperEx.eq("stationId", sinfEx.getStationId()); |
| | | mapper.update(null, wrapperEx); |
| | | binfMapper.update(null, infwrapperEx); |
| | | mapper.update((StationInf) ActionUtil.objeNull, wrapperEx); |
| | | binfMapper.update((Battinf) ActionUtil.objeNull, infwrapperEx); |
| | | } |
| | | } |
| | | if (lofla > 0 || lafla > 0 || addfla > 0) { |
| | |
| | | mwrapper.eq("stationId", stationId); |
| | | List list = mapMapper.selectList(mwrapper); |
| | | if (list.size() > 0) { |
| | | mapMapper.update(null, mapwrapper); |
| | | mapMapper.update((BattMapInformation) ActionUtil.objeNull, mapwrapper); |
| | | } else { |
| | | QueryWrapper swrapper = new QueryWrapper(); |
| | | swrapper.eq("stationId", stationId); |
| | |
| | | mwrapperEx.eq("stationId", sinfEx.getStationId()); |
| | | List listEx = mapMapper.selectList(mwrapperEx); |
| | | if (listEx.size() > 0) { |
| | | mapMapper.update(null, mapwrapperEx); |
| | | mapMapper.update((BattMapInformation) ActionUtil.objeNull, mapwrapperEx); |
| | | } else { |
| | | //插入map |
| | | mapInfo.setStationId(sinfEx.getStationId()); |
| | |
| | | //站点地图 |
| | | List<StationInf> mapAndWorkStateList = getStationMapAndWorkState(userId); |
| | | stationInfoMap.put("stationMap", mapAndWorkStateList); |
| | | return new Response().setII(1, true, stationInfoMap, null); |
| | | return new Response().setII(1, true, stationInfoMap, ""); |
| | | } catch (Exception e) { |
| | | return new Response().set(1, false, "发生异常:" + e.getCause()); |
| | | } |
| | |
| | | UpdateWrapper sinfWrapper = new UpdateWrapper(); |
| | | sinfWrapper.set("nodeStation", inf.getNodeStation()); |
| | | sinfWrapper.eq("stationId", inf.getStationId()); |
| | | flag += mapper.update(null, sinfWrapper); |
| | | flag += mapper.update((StationInf) ActionUtil.objeNull, sinfWrapper); |
| | | //查看在电池组机房是否存在stationId |
| | | QueryWrapper wrapper = new QueryWrapper(); |
| | | wrapper.eq("stationId", inf.getStationId()); |
| | |
| | | UpdateWrapper binfWrapper = new UpdateWrapper(); |
| | | binfWrapper.set("nodeStation", inf.getNodeStation()); |
| | | binfWrapper.eq("stationId", inf.getStationId()); |
| | | flag += binfMapper.update(null, binfWrapper); |
| | | flag += binfMapper.update((Battinf) ActionUtil.objeNull, binfWrapper); |
| | | } |
| | | } |
| | | } |