From 8c635598000e40edfb3edf5934124ad48d60f62d Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期六, 21 六月 2025 19:14:50 +0800 Subject: [PATCH] 实时页面修改 --- src/main/java/com/whyc/service/BattInfService.java | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/whyc/service/BattInfService.java b/src/main/java/com/whyc/service/BattInfService.java index 3aa72bf..5aff1a0 100644 --- a/src/main/java/com/whyc/service/BattInfService.java +++ b/src/main/java/com/whyc/service/BattInfService.java @@ -15,9 +15,7 @@ import com.whyc.mapper.BattInfMapper; import com.whyc.mapper.PowerInfMapper; import com.whyc.mapper.StationInfMapper; -import com.whyc.pojo.db_station.BattInf; -import com.whyc.pojo.db_station.PowerInf; -import com.whyc.pojo.db_station.StationInf; +import com.whyc.pojo.db_station.*; import com.whyc.pojo.db_user.User; import com.whyc.util.ActionUtil; import org.springframework.beans.factory.annotation.Autowired; @@ -42,6 +40,9 @@ @Autowired(required = false) private BaojigroupService bjService; + + @Autowired(required = false) + private InfoChangeService changeService; /*鏂板缓鐢垫睜缁勶紙鏂扮殑璁惧鏂扮殑鐢垫睜缁勶級 * @param binf @@ -310,6 +311,11 @@ } sinfMapper.update((StationInf) ActionUtil.objeNull,wrapper1); pinfMapper.update((PowerInf) ActionUtil.objeNull,wrapper2); + //瀛樺叆鍙樻洿淇℃伅璁板綍 + pinf.setStationId(sinf.getStationId()); + binf.setStationId(sinf.getStationId()); + binf.setPowerId(pinf.getPowerId()); + changeService.addInfoChange(sinf,pinf,binf,info.getUpdateReason()); return new Response().set(1,true,"淇敼淇℃伅鎴愬姛"); } /*//淇敼鐢垫睜缁� @@ -401,6 +407,8 @@ wrapper.eq("battgroup_id",battgroupId); wrapper.last("limit 1"); BattInf binf=mapper.selectOne(wrapper); + List<BattInfChange> binfChangeList=changeService.getBinfChange(battgroupId); + binf.setBinfChangeList(binfChangeList); return binf; } //褰撴病鏈夊唴鍔╂祴璇曟椂鍒濆鍐呴樆鍊间负鏍囩О鍐呴樆 @@ -495,7 +503,11 @@ return mapper.getBattgroupIdInf(battgroupId); } //鏌ヨ鐢垫簮涓嬫墍鏈夌殑鐢垫睜缁刬d - public List<Integer> getBattgroupIdList(Integer powerId) { - return mapper.getBattgroupIdList(powerId); + public List<BattInf> getBattgroupIdListByPowerId(Integer powerId) { + return mapper.getBattgroupIdListByPowerId(powerId); + } + //鏌ヨ璁惧涓嬫墍鏈夌殑鐢垫睜缁刬d + public List<BattInf> getBattgroupIdListByDevId(Integer devId) { + return mapper.getBattgroupIdListByDevId(devId); } } \ No newline at end of file -- Gitblit v1.9.1