中-45-FBOTestDataMapper.xml;24行
| | |
| | | public interface FBOTestDataMapper { |
| | | //void delete(Integer battGroupId, Integer testRecordCount); |
| | | |
| | | List<FBOTestData> getList(int battGroupId, int testRecordCount); |
| | | //List<FBOTestData> getList(int battGroupId, int testRecordCount); |
| | | //根据放电记录编号查询这次充放电中有多少 |
| | | int getMonCuntBytestRecordCount(int battGroupId, int testRecordCount); |
| | | //int getMonCuntBytestRecordCount(int battGroupId, int testRecordCount); |
| | | } |
| | |
| | | |
| | | import com.whyc.mapper.FBOTestDataMapper; |
| | | import com.whyc.pojo.FBOTestData; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Resource |
| | | private FBOTestDataMapper mapper; |
| | | @Autowired |
| | | private SubTablePageInfoService subService; |
| | | |
| | | public List<FBOTestData> getList(int battGroupId, int testRecordCount) { |
| | | return mapper.getList(battGroupId,testRecordCount); |
| | | //List list=mapper.getList(battGroupId,testRecordCount); |
| | | List list=subService.getList_fbo(battGroupId,testRecordCount); |
| | | return list; |
| | | } |
| | | //根据放电记录编号查询这次充放电中有多少单体 |
| | | public int getMonCuntBytestRecordCount(int battGroupId, int testRecordCount){ |
| | | int monCount=mapper.getMonCuntBytestRecordCount(battGroupId,testRecordCount); |
| | | //int monCount=mapper.getMonCuntBytestRecordCount(battGroupId,testRecordCount); |
| | | int monCount=subService.getMonCuntBytestRecordCount(battGroupId,testRecordCount); |
| | | return monCount; |
| | | } |
| | | } |
| | |
| | | stop.setMonVol(1.0f); |
| | | //float cap= subService.getRealCap(stop); |
| | | List list= subService.getTestDataStop(1000028,date5);*/ |
| | | /*38*/ |
| | | /*38 |
| | | ReportBattDTO dto=new ReportBattDTO(); |
| | | dto.setBattGroupId(1000007); |
| | | dto.setTestType(5); |
| | | dto.setMonNum(0); |
| | | dto.setStationName("山西省-太原市-迎泽区-局机房119-局机房站-2"); |
| | | dto.setStationName1("山西省"); |
| | | List list= subService.searchByBattGroupId5(dto); |
| | | return new Response().setII(1,true,list,null); |
| | | List list= subService.searchByBattGroupId5(dto);*/ |
| | | /*45*/ |
| | | //List list= subService.getList_fbo(1000048,5); |
| | | int monCount=subService.getMonCuntBytestRecordCount(1000048,5); |
| | | return new Response().setII(1,true,monCount,null); |
| | | } |
| | | } |
| | |
| | | return list; |
| | | } |
| | | |
| | | //45-FBOTestDataMapper.xml;24行 |
| | | public List<FBOTestData> getList_fbo(int battGroupId, int testRecordCount){ |
| | | String sql=" select * from db_fbo_testdata.tb_fbotestdata_"+battGroupId+" where test_record_count = "+testRecordCount+" "; |
| | | List<FBOTestData> list = sqlExecuteService.executeQuery_call(sql, new CallBack() { |
| | | @Override |
| | | public List getResults(ResultSet rs) throws SQLException { |
| | | List<FBOTestData> list=new ArrayList<>(); |
| | | while (rs.next()){ |
| | | FBOTestData ph=new FBOTestData(); |
| | | ph.setNum(rs.getInt("num")); |
| | | ph.setBattGroupId(rs.getInt("BattGroupId")); |
| | | ph.setTestRecordCount(rs.getInt("test_record_count")); |
| | | ph.setTestStartTime(rs.getTimestamp("test_starttime")); |
| | | ph.setTestTimeLong(rs.getInt("test_timelong")); |
| | | ph.setRecordTime(rs.getTimestamp("record_time")); |
| | | ph.setRecordNum(rs.getInt("record_num")); |
| | | ph.setOnlineVol(rs.getFloat("online_vol")); |
| | | ph.setSumVol(rs.getFloat("sum_vol")); |
| | | ph.setTestCurr(rs.getFloat("test_curr")); |
| | | ph.setTestCap(rs.getFloat("test_cap")); |
| | | ph.setMonNum(rs.getInt("mon_num")); |
| | | ph.setMonVol(rs.getFloat("mon_vol")); |
| | | list.add(ph); |
| | | } |
| | | return list; |
| | | } |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | // |
| | | public int getMonCuntBytestRecordCount(int battGroupId, int testRecordCount){ |
| | | String sql="select if(max(mon_num) is null,0,max(mon_num)) as monCount " + |
| | | "from db_fbo_testdata.tb_fbotestdata_"+battGroupId+" where test_record_count = "+testRecordCount+" limit 1"; |
| | | List list = sqlExecuteService.executeQuery_call(sql, new CallBack() { |
| | | @Override |
| | | public List getResults(ResultSet rs) throws SQLException { |
| | | LinkedList<Object> temp = new LinkedList<>(); |
| | | try { |
| | | while (rs.next()) |
| | | temp.add(rs.getInt("monCount")); |
| | | } catch (SQLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return temp; |
| | | } |
| | | }); |
| | | int monCount =0; |
| | | if(list!=null){ |
| | | monCount= (int) list.get(0); |
| | | } |
| | | return monCount; |
| | | } |
| | | |
| | | } |
| | |
| | | <!--<delete id="delete"> |
| | | delete from db_fbo_testdata.tb_fbotestdata_${battGroupId} where test_record_count = #{testRecordCount} |
| | | </delete>--> |
| | | <select id="getList" resultMap="Map_FBOTestData"> |
| | | <!-- <select id="getList" resultMap="Map_FBOTestData"> |
| | | select * from db_fbo_testdata.tb_fbotestdata_${battGroupId} where test_record_count = #{testRecordCount} |
| | | </select> |
| | | <select id="getMonCuntBytestRecordCount" resultType="java.lang.Integer"> |
| | | </select>--> |
| | | <!--<select id="getMonCuntBytestRecordCount" resultType="java.lang.Integer"> |
| | | select if(max(mon_num) is null,0,max(mon_num)) as monCount from db_fbo_testdata.tb_fbotestdata_${battGroupId} where test_record_count = #{testRecordCount} limit 1 |
| | | </select> |
| | | </select>--> |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.whyc.mapper.WorkflowMain1Mapper" > |
| | | |
| | | <select id="getWorkFlowByPage" resultType="com.whyc.dto.WorksheetDTO"> |
| | | <!--<select id="getWorkFlowByPage" resultType="com.whyc.dto.WorksheetDTO"> |
| | | select m.id,l.id as link_id,m.title,m.task_desc,l.process_level_name,m.order_id,m.create_time,l.status as link_status |
| | | from web_site.tb_workflow_main m join web_site.tb_workflow_link l on m.id = l.main_id ${ew.customSqlSegment} |
| | | </select> |
| | | </select>--> |
| | | </mapper> |