src/main/java/com/whyc/mapper/BattmonTestcapMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/service/BattmonTestcapService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/service/StandardFeatureCurveService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/whyc/service/SubTablePageInfoService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/BattmonTestcapMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/whyc/mapper/BattmonTestcapMapper.java
@@ -17,6 +17,6 @@ //创建未出现的标准曲线库 //void create_standard_curve(@Param("tableName") String tableName); List<BattmonTestcap> getTestCapList(BattmonStandardcurve curve); //List<BattmonTestcap> getTestCapList(BattmonStandardcurve curve); } src/main/java/com/whyc/service/BattmonTestcapService.java
@@ -52,6 +52,7 @@ } public List<BattmonTestcap> getTestCapList(BattmonStandardcurve curve) { return mapper.getTestCapList(curve); //return mapper.getTestCapList(curve); return subService.getTestCapList(curve); } } src/main/java/com/whyc/service/StandardFeatureCurveService.java
@@ -8,10 +8,7 @@ import com.whyc.mapper.CallBack; import com.whyc.mapper.CommonMapper; import com.whyc.mapper.StandardFeatureCurveMapper; import com.whyc.pojo.BattalarmDataHistory; import com.whyc.pojo.Battinf; import com.whyc.pojo.PwrdevAlarmHistory; import com.whyc.pojo.UserLog; import com.whyc.pojo.*; import com.whyc.util.ActionUtil; import net.sf.json.JSONArray; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; @@ -294,6 +291,7 @@ int count=subService.getCountForInterface(param); List list=new ArrayList(); list.add(count);*/ /*35 AlarmPar param=new AlarmPar(); param.setRecordYear("tb_battalarm_data_history_2023_03"); param.setAlmIdOne(119001); @@ -318,7 +316,14 @@ param.setUId(1002); param.setLimitStart(0); param.setLimitEnd(100); List list= subService.getList2(param); List list= subService.getList2(param);*/ BattmonStandardcurve curve=new BattmonStandardcurve(); curve.setMonVolStd("2"); curve.setMonCapStd("150"); curve.setNote("15"); curve.setBattproducer("理士"); curve.setBattmodel("TEST"); List list= subService.getTestCapList(curve); return list; } } src/main/java/com/whyc/service/SubTablePageInfoService.java
@@ -621,7 +621,7 @@ return num; } //13,14,17-SubTablePageInfoUtils.java;88行 //13,14,17,36-SubTablePageInfoUtils.java;88行 public int getCount(DevAlarmPar param){ String sql="SELECT count(distinct history.num) as number FROM db_alarm."+param.getRecordYear()+" history,db_battinf.tb_battinf " + " where history.dev_id=db_battinf.tb_battinf.FbsDeviceId "; @@ -1085,7 +1085,7 @@ return num; } //35-SubTablePageInfoUtils.java;176行 //35,38-SubTablePageInfoUtils.java;176行 public List<AlarmRes> getList2(AlarmPar param){ String sql="select history.BattGroupId,history.num,alm_signal_id,history.monnum,alm_value,alm_level,alm_is_confirmed,alm_confirmed_time,alm_start_time,alm_end_time " + " ,alm_severity,stationname,StationName1,StationName2,StationName3,StationName5,battgroupname " + @@ -1164,4 +1164,34 @@ }); return list; } //40-BattmonTestcapService.java;50行 List<BattmonTestcap> getTestCapList(BattmonStandardcurve curve){ String sql="select monvolstd,moncapstd,battproducer,battmodel,test_cap,ROUND(avg(mon_vol),3) as mon_vol from " + " `db_battinf`.`tb_battmon_testcap_"+curve.getMonVolStd()+"_"+curve.getMonCapStd()+"_"+curve.getNote()+"` " + " where monvolstd= "+curve.getMonVolStd()+" " + " and moncapstd="+curve.getMonCapStd()+" " + " and battproducer='"+curve.getBattproducer()+"' " + " and battmodel='"+curve.getBattmodel()+"' " + " group by test_cap " + " order by num"; List<BattmonTestcap> list = sqlExecuteService.executeQuery_call(sql, new CallBack() { @Override public List getResults(ResultSet rs) throws SQLException { List<BattmonTestcap> list=new ArrayList<>(); while (rs.next()){ BattmonTestcap ph=new BattmonTestcap(); ph.setMonvolstd(rs.getFloat("monvolstd")); ph.setMoncapstd(rs.getFloat("moncapstd")); ph.setBattproducer(rs.getString("battproducer")); ph.setBattmodel(rs.getString("battmodel")); ph.setTestCap(rs.getDouble("test_cap")); ph.setMonVol(rs.getDouble("mon_vol")); list.add(ph); } return list; } }); return list; } } src/main/resources/mapper/BattmonTestcapMapper.xml
@@ -29,7 +29,7 @@ where monvolstd=#{monvolstd} and moncapstd=#{moncapstd} and battproducer=#{battproducer} and battmodel=#{battmodel} and note=#{note} </delete> <select id="getTestCapList" resultType="com.whyc.pojo.BattmonTestcap"> <!-- <select id="getTestCapList" resultType="com.whyc.pojo.BattmonTestcap"> select monvolstd,moncapstd,battproducer,battmodel,test_cap,ROUND(avg(mon_vol),3) as mon_vol from @@ -41,5 +41,5 @@ and battmodel=#{battmodel} group by test_cap order by num </select> </select>--> </mapper>