New file |
| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.service.Ld9testdatastopService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @Api(tags = "在线监测-实时监控") |
| | | @RestController |
| | | @RequestMapping("Ld9testdatastopAction") |
| | | public class Ld9testdatastopController { |
| | | @Autowired |
| | | private Ld9testdatastopService service; |
| | | |
| | | @ApiOperation(value = "查询LD9测试组端数据",notes = "Ld9testdatastopAction_ld9action_serchByInfo") |
| | | @GetMapping("serchByInfo") |
| | | public Response serchByInfo(@RequestParam int testRecordCount, @RequestParam int battGroupId, @RequestParam int testMonNum){ |
| | | return service.serchByInfo(testRecordCount,battGroupId,testMonNum); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询LD9一次测试中所有单体的实际容量",notes = "Ld9testdatastopAction_ld9action_serchByCondition") |
| | | @GetMapping("serchByCondition") |
| | | public Response serchByCondition(@RequestParam int testRecordCount, @RequestParam int battGroupId){ |
| | | return service.serchByCondition(testRecordCount,battGroupId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.pojo.Ld9testdatastop; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface Ld9testdatastopMapper extends CustomMapper<Ld9testdatastop>{ |
| | | //查询LD9测试组端数据 |
| | | List<Ld9testdatastop> serchByInfo(int testRecordCount, int battGroupId, int testMonNum); |
| | | //查询LD9一次测试中所有单体的实际容量 |
| | | List<Ld9testdatastop> serchByCondition(int testRecordCount, int battGroupId); |
| | | } |
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.Ld9testdatastopMapper; |
| | | import com.whyc.pojo.Ld9testdatastop; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class Ld9testdatastopService { |
| | | @Resource |
| | | private Ld9testdatastopMapper mapper; |
| | | |
| | | //查询LD9测试组端数据 |
| | | public Response serchByInfo(int testRecordCount, int battGroupId, int testMonNum) { |
| | | List<Ld9testdatastop> list=mapper.serchByInfo(testRecordCount,battGroupId,testMonNum); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().set(1,pageInfo); |
| | | } |
| | | //查询LD9一次测试中所有单体的实际容量 |
| | | public Response serchByCondition(int testRecordCount, int battGroupId) { |
| | | List<Ld9testdatastop> list=mapper.serchByCondition(testRecordCount,battGroupId); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().set(1,pageInfo); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.whyc.mapper.Ld9testdatastopMapper"> |
| | | |
| | | |
| | | <select id="serchByInfo" resultType="com.whyc.pojo.Ld9testdatastop"> |
| | | select num,BattGroupId,test_record_count,test_type,test_starttime,record_time,test_timelong,group_vol,test_curr,test_cap,mon_num,mon_vol,test_monnum,max_monvol,min_monvol,test_stopreason |
| | | from db_ld9_testdata.tb_ld9testdatastop_${battGroupId} |
| | | where test_record_count=#{testRecordCount} and test_monnum=#{testMonNum} |
| | | </select> |
| | | <select id="serchByCondition" resultType="com.whyc.pojo.Ld9testdatastop"> |
| | | select num,BattGroupId,test_record_count,test_type,test_starttime,record_time,test_timelong,group_vol,test_curr,test_cap,mon_num,mon_vol,test_monnum,max_monvol,min_monvol,test_stopreason |
| | | from db_ld9_testdata.tb_ld9testdatastop_${battGroupId} |
| | | where test_record_count=#{testRecordCount} |
| | | </select> |
| | | </mapper> |