New file |
| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Batt_Maint_Dealarm; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.paramter.BattinfPar; |
| | | import com.whyc.service.BadBattMonService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 落后单体查询 |
| | | */ |
| | | @RequestMapping("BadBattMon") |
| | | @RestController |
| | | @Api(tags = "报表统计") |
| | | public class BadBattMonController { |
| | | |
| | | @Autowired |
| | | private BadBattMonService service; |
| | | |
| | | |
| | | /** |
| | | * 放电测试(查询用户管理的维护区) |
| | | * |
| | | * @param battinfPar |
| | | * @return |
| | | */ |
| | | @PostMapping("/searchByInfo") |
| | | @ApiOperation(notes = "TODO ", value = "落后单体查询/searchByInfo") |
| | | public Response<List<Batt_Maint_Dealarm>> searchByInfo(@RequestBody BattinfPar battinfPar) { |
| | | |
| | | return service.searchByInfo(battinfPar);//TODO RZG |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.UserInf; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 落后单体查询 |
| | | */ |
| | | @RequestMapping("BadBattMonFlag") |
| | | @RestController |
| | | @Api(tags = "报表统计") |
| | | public class BadBattMonFlagController { |
| | | |
| | | |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "TODO ",value = "落后单体查询/BadBattMonFlag") |
| | | public Response<List<String>> add(@RequestBody UserInf userInf) { |
| | | //TODO RZG |
| | | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.UserInf; |
| | | import com.whyc.service.BadLd9MonFlagService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * BadLd9_monAction 数据库表待查 web_site.tb_badld9_mon |
| | | * BadLd9_mon_flagAction 数据库表待查 web_site.tb_badld9_mon_flag |
| | | * BadBatt_mon_flagAction 数据库表待查 web_site.tb_badld9_mon_flag |
| | | * |
| | | */ |
| | | @RequestMapping("BadLd9MonFlag") |
| | | @RestController |
| | | @Api(tags = "报表统计") |
| | | public class BadLd9MonFlagController { |
| | | |
| | | @Autowired |
| | | private BadLd9MonFlagService service; |
| | | |
| | | |
| | | |
| | | //TODO 数据库表待查 web_site.tb_badld9_mon |
| | | |
| | | /** |
| | | * 放电测试(查询用户管理的维护区) |
| | | * @param userInf |
| | | * @return |
| | | */ |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "TODO ",value = "落后单体查询/BadLd9MonFlag") |
| | | public Response<List<String>> add(@RequestBody UserInf userInf){ |
| | | //BadLd9_mon_flagAction_ld9action_add |
| | | return null; |
| | | } |
| | | |
| | | // BadLd9_monAction_ld9action_serchByInfo // 无 |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Batt_Maint_Dealarm; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.Battinf; |
| | | import com.whyc.service.BattMaintService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 电池组单体统计分析查询 |
| | | */ |
| | | @RequestMapping("BattMaint") |
| | | @RestController |
| | | @Api(tags = "报表统计") |
| | | public class BattMaintController { |
| | | |
| | | @Resource |
| | | private BattMaintService service; |
| | | |
| | | /** |
| | | * 1.3根据电池组id查询电池的电导和充放电信息 |
| | | * |
| | | * @param bmd |
| | | * @return |
| | | */ |
| | | @PostMapping("/serchMonNum") |
| | | @ApiOperation(notes = "TODO ", value = "电池组单体统计分析查询/serchMonNum") |
| | | public Response<Object> serchMonNum(@RequestBody Batt_Maint_Dealarm bmd) { |
| | | //TODO RZG |
| | | return service.serchMonNum(bmd); |
| | | } |
| | | |
| | | /** |
| | | * 电池组单体统计分析查询 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/serchByMonNum") |
| | | @ApiOperation(notes = "在‘电池信息’下 battInf/serchByMonNum", value = "电池组单体统计分析查询/serchByMonNum") |
| | | public Response<Object> serchByMonNum() { //TODO |
| | | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | //------------------------------------------通信电源报表------------------------------------------------------- |
| | | |
| | | @GetMapping("/getProvinces") |
| | | @ApiOperation(notes = "在‘电源管理’下powerInf/getProvinces", value = "通信电源报表/getProvinces") |
| | | public Response<Object> getProvinces() { |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @GetMapping("/getCities") |
| | | @ApiOperation(notes = "在‘电源管理’下powerInf/getCities", value = "通信电源报表/getCities") |
| | | public Response<Object> getCities() { |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @GetMapping("/getDistricts") |
| | | @ApiOperation(notes = "在‘电源管理’下powerInf/getDistricts", value = "通信电源报表/getDistricts") |
| | | public Response<Object> getDistricts() { |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @GetMapping("/getStations") |
| | | @ApiOperation(notes = "在‘电源管理’下powerInf/getStations", value = "通信电源报表/getStations") |
| | | public Response<Object> getStations() { |
| | | //TODO RZG |
| | | return null; |
| | | } |
| | | |
| | | @GetMapping("/getPowerDevices") |
| | | @ApiOperation(notes = "在‘电源管理’下powerInf/getPowerDevices", value = "通信电源报表/getPowerDevices") |
| | | public Response<Object> getPowerDevices() { |
| | | //TODO RZG |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @GetMapping("/getPwrdevDataHistory") |
| | | @ApiOperation(notes = "在‘电源管理’下powerInf/getPwrdevDataHistory", value = "通信电源报表/getPwrdevDataHistory") |
| | | public Response<Object> getPwrdevDataHistory() { |
| | | //TODO RZG |
| | | |
| | | return null; |
| | | } |
| | | |
| | | //------------------------------------------事件总表------------------------------------------------------- |
| | | @GetMapping("/serchAllStationName1") |
| | | @ApiOperation(notes = "在‘电池信息’battInf/serchAllStationName1", value = "事件总表/serchAllStationName1") |
| | | public Response<Object> serchAllStationName1() { |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @GetMapping("/serchAllStationName2") |
| | | @ApiOperation(notes = "在‘电池信息’battInf/serchAllStationName2", value = "事件总表/serchAllStationName2") |
| | | public Response<Object> serchAllStationName2() { |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @GetMapping("/serchAllStationName5") |
| | | @ApiOperation(notes = "在‘电池信息’battInf/serchAllStationName5", value = "事件总表/serchAllStationName5") |
| | | public Response<Object> serchAllStationName5() { |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @GetMapping("/serchAllStationName") |
| | | @ApiOperation(notes = "在‘电池信息’battInf/serchAllStationName", value = "事件总表/serchAllStationName") |
| | | public Response<Object> serchAllStationName() { |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @GetMapping("/serchAllBattinf") |
| | | @ApiOperation(notes = "在‘电池信息’battInf/serchAllBattinf", value = "事件总表/serchAllBattinf") |
| | | public Response<Object> serchAllBattinf() { //TODO |
| | | |
| | | return null; |
| | | } |
| | | // Btsstaechange_infAction!serchByCondition |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.AllModel; |
| | | import com.whyc.dto.Batt_Maint_Dealarm; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.service.BattMaintDealarmService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 电池组统计分析查询、蓄电池组后评估 |
| | | */ |
| | | @RequestMapping("BattMaintDealarm") |
| | | @RestController |
| | | @Api(tags = "报表统计") |
| | | public class BattMaintDealarmController { |
| | | |
| | | @Resource |
| | | private BattMaintDealarmService battMaintDealarmService; |
| | | |
| | | /** |
| | | * 电池组统计分析查询 |
| | | * |
| | | * @param bmd |
| | | * @return |
| | | */ |
| | | //1.3根据电池组id查询电池的电导和充放电信息 |
| | | @PostMapping("searchLow") |
| | | @ApiOperation(notes = "TODO ", value = "电池组统计分析查询/serchLow") |
| | | public Response<List<AllModel>> searchLow(@RequestBody Batt_Maint_Dealarm bmd) { |
| | | |
| | | return battMaintDealarmService.searchLow(bmd); |
| | | // return null; |
| | | } |
| | | |
| | | /** |
| | | * 蓄电池组后评估 |
| | | */ |
| | | @PostMapping("searchByCondition") |
| | | @ApiOperation(notes = "TODO ", value = "蓄电池组后评估/searchByCondition") |
| | | public Response<List<AllModel>> searchByCondition(@RequestBody Batt_Maint_Dealarm bmd) { |
| | | |
| | | return battMaintDealarmService.searchByCondition(bmd); |
| | | // return null; |
| | | } |
| | | } |
New file |
| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.BattState; |
| | | import com.whyc.dto.Batt_Maint_Dealarm; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.service.BattTtstateService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @RequestMapping("BattRtstate") |
| | | @RestController |
| | | @Api(tags = "报表统计") |
| | | public class BattRtstateController { |
| | | |
| | | @Resource |
| | | private BattTtstateService service; |
| | | |
| | | |
| | | @PostMapping("/searchBattLife") |
| | | @ApiOperation(notes = "{\n" + |
| | | "\t\"binf\": {\n" + |
| | | "\t\t\"num\": 0,\n" + |
| | | "\t\t\"battGroupId\": 0,\n" + |
| | | "\t\t\"stationName\": \"\",\n" + |
| | | "\t\t\"stationName1\": \"\"\n" + |
| | | "\t},\n" + |
| | | "\t\"page\": {\n" + |
| | | "\t\t\"pageAll\": 0,\n" + |
| | | "\t\t\"pageCurr\": 0,\n" + |
| | | "\t\t\"pageSize\": 0\n" + |
| | | "\t},\n" + |
| | | "\t\"uinf\": {\n" + |
| | | "\t\t\"uid\": 0\n" + |
| | | "\t}\n" + |
| | | "}", value = "电池实时状态查询/searchBattLife") |
| | | public Response<List<BattState>> searchBattLife(@RequestBody Batt_Maint_Dealarm bmd) { |
| | | |
| | | return service.searchBattLife(bmd); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.BattState; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.Battinf; |
| | | import com.whyc.service.BatttestdataInfService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 电池续航能力历史查询 |
| | | */ |
| | | @RequestMapping("BatttestdataInf") |
| | | @RestController |
| | | @Api(tags = "报表统计") |
| | | public class BatttestdataInfController { |
| | | |
| | | @Resource |
| | | private BatttestdataInfService service; |
| | | |
| | | //电池组历史放电数据续航能力查询 |
| | | @PostMapping("/searchBattLife") |
| | | @ApiOperation(notes = "TODO ", value = "电池续航能力历史查询/searchBattLife") |
| | | public Response<List<BattState>> searchBattLife(@RequestBody Battinf binf) { |
| | | Response<List<BattState>> res = new Response<>(); |
| | | if(binf.getBattGroupId() == 0){ |
| | | // res = service.serchBattLifeNow(binf); //机房历史放电数据续航能力查询(实时) //TODO RZG |
| | | }else if(binf.getBattGroupId() == 1){ |
| | | // res = service.serchBattLife(binf); //电池组历史放电数据续航能力查询(历史) |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class AllModel implements Serializable{ |
| | | private static final long serialVersionUID = -7288145141087481696L; |
| | | private ServiceModel mmodel; //batt_maintenance_inf信息 电池的故障信息 |
| | | private ServiceModel pmodel; //batt_maint_process信息 |
| | | private ServiceModel tmodel; //batttest_data信息 电池测试信息 |
| | | private ServiceModel amodel; //battalarm_inf信息 电池告警信息 |
| | | private ServiceModel smodel; //batttestdatastop信息 放电测试结束时的电池信息 |
| | | private ServiceModel rmodel; //battresdata信息 内阻/电导测试结束时的电池信息 |
| | | private ServiceModel umodel; //user_inf信息 |
| | | private Object data; //返回复杂数据 |
| | | |
| | | |
| | | public AllModel() { |
| | | mmodel=new ServiceModel(); |
| | | tmodel=new ServiceModel(); |
| | | amodel=new ServiceModel(); |
| | | smodel=new ServiceModel(); |
| | | rmodel=new ServiceModel(); |
| | | umodel=new ServiceModel(); |
| | | pmodel=new ServiceModel(); |
| | | } |
| | | |
| | | public ServiceModel getMmodel() { |
| | | return mmodel; |
| | | } |
| | | public void setMmodel(ServiceModel mmodel) { |
| | | this.mmodel = mmodel; |
| | | } |
| | | public ServiceModel getTmodel() { |
| | | return tmodel; |
| | | } |
| | | public void setTmodel(ServiceModel tmodel) { |
| | | this.tmodel = tmodel; |
| | | } |
| | | public ServiceModel getAmodel() { |
| | | return amodel; |
| | | } |
| | | public void setAmodel(ServiceModel amodel) { |
| | | this.amodel = amodel; |
| | | } |
| | | |
| | | |
| | | |
| | | public ServiceModel getSmodel() { |
| | | return smodel; |
| | | } |
| | | |
| | | public void setSmodel(ServiceModel smodel) { |
| | | this.smodel = smodel; |
| | | } |
| | | |
| | | public ServiceModel getRmodel() { |
| | | return rmodel; |
| | | } |
| | | |
| | | public void setRmodel(ServiceModel rmodel) { |
| | | this.rmodel = rmodel; |
| | | } |
| | | |
| | | |
| | | public ServiceModel getPmodel() { |
| | | return pmodel; |
| | | } |
| | | |
| | | public void setPmodel(ServiceModel pmodel) { |
| | | this.pmodel = pmodel; |
| | | } |
| | | |
| | | public Object getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setData(Object data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | public ServiceModel getUmodel() { |
| | | return umodel; |
| | | } |
| | | |
| | | public void setUmodel(ServiceModel umodel) { |
| | | this.umodel = umodel; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "AllModel [mmodel=" + mmodel + ", pmodel=" + pmodel |
| | | + ", tmodel=" + tmodel + ", amodel=" + amodel + ", smodel=" |
| | | + smodel + ", rmodel=" + rmodel + ", umodel=" + umodel |
| | | + ", data=" + data + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.dto; |
| | | |
| | | import com.whyc.pojo.BattRtdata; |
| | | import com.whyc.pojo.BattRtstate; |
| | | import com.whyc.pojo.Battinf; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.*; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @ApiModel(value="BattState 对象", description="") |
| | | @ToString |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class BattState implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 648789111562556978L; |
| | | private BattRtstate bstate; |
| | | private BattRtdata bdata; |
| | | private Battinf binf; |
| | | } |
New file |
| | |
| | | package com.whyc.dto; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public class ServiceModel implements Serializable{ |
| | | private static final long serialVersionUID = 5482521736863855534L; |
| | | public Integer code=0; //用于判断请求是否成功 0:不成功 1:成功 |
| | | public String msg; //返回的简单信息 |
| | | public Integer sum=0; //用于放查询记录的条数 |
| | | public Integer newsum=0; //用于记录条数 |
| | | public Object data; //用于返回复杂数据 |
| | | public Object data2; //用于返回复杂数据 |
| | | public String msgN; //返回单体编号 |
| | | public String msgV; //返回单体电压 |
| | | public String msgO; |
| | | public String msgT; |
| | | public Float lowCA; //返回告警阈值 |
| | | public Float lowCH; //返回更换阈值 |
| | | public Float lowRA; //返回电导的告警阈值 |
| | | public Float lowRH; //返回电导的更换阈值 |
| | | |
| | | public Integer getCode() { |
| | | return code; |
| | | } |
| | | public void setCode(Integer code) { |
| | | this.code = code; |
| | | } |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | public void setMsg(String msg) { |
| | | this.msg = msg; |
| | | } |
| | | public Integer getSum() { |
| | | return sum; |
| | | } |
| | | public void setSum(Integer sum) { |
| | | this.sum = sum; |
| | | } |
| | | public Integer getNewsum() { |
| | | return newsum; |
| | | } |
| | | public void setNewsum(Integer newsum) { |
| | | this.newsum = newsum; |
| | | } |
| | | |
| | | public String getMsgN() { |
| | | return msgN; |
| | | } |
| | | public void setMsgN(String msgN) { |
| | | this.msgN = msgN; |
| | | } |
| | | public String getMsgV() { |
| | | return msgV; |
| | | } |
| | | public void setMsgV(String msgV) { |
| | | this.msgV = msgV; |
| | | } |
| | | |
| | | public String getMsgO() { |
| | | return msgO; |
| | | } |
| | | public void setMsgO(String msgO) { |
| | | this.msgO = msgO; |
| | | } |
| | | public String getMsgT() { |
| | | return msgT; |
| | | } |
| | | public void setMsgT(String msgT) { |
| | | this.msgT = msgT; |
| | | } |
| | | public Float getLowCA() { |
| | | return lowCA; |
| | | } |
| | | public void setLowCA(Float lowCA) { |
| | | this.lowCA = lowCA; |
| | | } |
| | | public Float getLowCH() { |
| | | return lowCH; |
| | | } |
| | | public void setLowCH(Float lowCH) { |
| | | this.lowCH = lowCH; |
| | | } |
| | | |
| | | public Float getLowRA() { |
| | | return lowRA; |
| | | } |
| | | public void setLowRA(Float lowRA) { |
| | | this.lowRA = lowRA; |
| | | } |
| | | public Float getLowRH() { |
| | | return lowRH; |
| | | } |
| | | public void setLowRH(Float lowRH) { |
| | | this.lowRH = lowRH; |
| | | } |
| | | public Object getData() { |
| | | return data; |
| | | } |
| | | public void setData(Object data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | public Object getData2() { |
| | | return data2; |
| | | } |
| | | |
| | | public void setData2(Object data2) { |
| | | this.data2 = data2; |
| | | } |
| | | |
| | | public ServiceModel set(Integer code,Object data){ |
| | | this.code = code; |
| | | this.data = data; |
| | | return this; |
| | | } |
| | | |
| | | public ServiceModel setMsgII(Integer code,String msg){ |
| | | this.code = code; |
| | | this.msg = msg; |
| | | return this; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ServiceModel [code=" + code + ", msg=" + msg + ", sum=" + sum |
| | | + ", newsum=" + newsum + ", data=" + data + ", msgN=" + msgN |
| | | + ", msgV=" + msgV + ", msgO=" + msgO + ", msgT=" + msgT |
| | | + ", lowCA=" + lowCA + ", lowCH=" + lowCH + ", lowRA=" + lowRA |
| | | + ", lowRH=" + lowRH + "]"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.dto.paramter; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.whyc.dto.Page; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.ToString; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | @Data |
| | | @ToString |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class BattinfPar implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 5325425413889179654L; |
| | | |
| | | private String uId; // userInf 主键 |
| | | private String stationId; |
| | | @ApiModelProperty(value = "站点地址") |
| | | private String stationName; |
| | | @ApiModelProperty(value = "省名") |
| | | private String stationName1; |
| | | private Integer battGroupId; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date battProductDate; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date battProductDate1; |
| | | private Page page;//分页 |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.dto.Batt_Maint_Dealarm; |
| | | import com.whyc.dto.paramter.BattinfPar; |
| | | import com.whyc.pojo.BadbattMon; |
| | | import com.whyc.pojo.BattRtstate; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface BadbattMonMapper extends CustomMapper<BadbattMon>{ |
| | | int deleteByPrimaryKey(Integer num); |
| | | |
| | | int insert(BadbattMon record); |
| | | |
| | | int insertSelective(BadbattMon record); |
| | | |
| | | BadbattMon selectByPrimaryKey(Integer num); |
| | | |
| | | int updateByPrimaryKeySelective(BadbattMon record); |
| | | |
| | | int updateByPrimaryKey(BadbattMon record); |
| | | |
| | | //落后单体查询:根据条件查询落后单体(用户管理的电池组) |
| | | List<Batt_Maint_Dealarm> searchByInfo(BattinfPar battinfPar); |
| | | } |
New file |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.dto.Batt_Maint_Dealarm; |
| | | import com.whyc.pojo.Battinf; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface BattMaintDealarmMapper extends CustomMapper<Batt_Maint_Dealarm>{ |
| | | |
| | | List<Battinf> serchLow(Batt_Maint_Dealarm bmd); |
| | | } |
New file |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.pojo.BattParamLow; |
| | | import com.whyc.pojo.BattalarmData; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface BattParamLowMapper extends CustomMapper<BattParamLow>{ |
| | | int deleteByPrimaryKey(Integer num); |
| | | |
| | | int insert(BattParamLow record); |
| | | |
| | | int insertSelective(BattParamLow record); |
| | | |
| | | BattParamLow selectByPrimaryKey(Integer num); |
| | | |
| | | int updateByPrimaryKeySelective(BattParamLow record); |
| | | |
| | | int updateByPrimaryKey(BattParamLow record); |
| | | |
| | | List<BattParamLow> serchByLow(BattParamLow lowCA); |
| | | } |
New file |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.pojo.BattRtdata; |
| | | import com.whyc.pojo.BattRtstate; |
| | | |
| | | public interface BattRtdataMapper extends CustomMapper<BattRtstate>{ |
| | | int deleteByPrimaryKey(Long num); |
| | | |
| | | int insert(BattRtdata record); |
| | | |
| | | int insertSelective(BattRtdata record); |
| | | |
| | | BattRtdata selectByPrimaryKey(Long num); |
| | | |
| | | int updateByPrimaryKeySelective(BattRtdata record); |
| | | |
| | | int updateByPrimaryKey(BattRtdata record); |
| | | } |
New file |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.dto.BattState; |
| | | import com.whyc.dto.Batt_Maint_Dealarm; |
| | | import com.whyc.pojo.BattRtstate; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | @Repository |
| | | public interface BattRtstateMapper extends CustomMapper<BattRtstate> { |
| | | |
| | | int deleteByPrimaryKey(Long num); |
| | | |
| | | int insert(BattRtstate record); |
| | | |
| | | int insertSelective(BattRtstate record); |
| | | |
| | | BattRtstate selectByPrimaryKey(Long num); |
| | | |
| | | int updateByPrimaryKeySelective(BattRtstate record); |
| | | |
| | | int updateByPrimaryKey(BattRtstate record); |
| | | |
| | | //电池组实时情况+实时电池续航能力查询 |
| | | List<BattState> searchBattLife(Batt_Maint_Dealarm bmd); |
| | | } |
New file |
| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.pojo.BattRtstate; |
| | | import com.whyc.pojo.BatttestdataInf; |
| | | |
| | | public interface BatttestdataInfMapper extends CustomMapper<BattRtstate>{ |
| | | int deleteByPrimaryKey(Long num); |
| | | |
| | | int insert(BatttestdataInf record); |
| | | |
| | | int insertSelective(BatttestdataInf record); |
| | | |
| | | BatttestdataInf selectByPrimaryKey(Long num); |
| | | |
| | | int updateByPrimaryKeySelective(BatttestdataInf record); |
| | | |
| | | int updateByPrimaryKey(BatttestdataInf record); |
| | | } |
New file |
| | |
| | | package com.whyc.pojo; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.ToString; |
| | | |
| | | @Data |
| | | @ApiModel(value = "tb_badld9_mon对象", description = "") |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ToString |
| | | @TableName(schema = "web_site", value = "tb_badld9_mon") |
| | | public class BadLd9MonFlag { |
| | | private Integer num; |
| | | private Integer count; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.ToString; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | |
| | | @Data |
| | | @ToString |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel(value="BadbattMon对象", description="") |
| | | @TableName(schema = "web_site",value = "tb_badbatt_mon") |
| | | public class BadbattMon implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -2485342715615562917L; |
| | | private Integer num; |
| | | |
| | | private Integer battgroupid; |
| | | |
| | | private Integer monNum; |
| | | |
| | | private Integer recordNum; |
| | | |
| | | private Date testStarttime; |
| | | |
| | | private Float groupVol; |
| | | |
| | | private Float testCurr; |
| | | |
| | | private Float monVol; |
| | | |
| | | private Float realCap; |
| | | |
| | | private Float stdcap; |
| | | |
| | | private String note; |
| | | } |
New file |
| | |
| | | package com.whyc.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.ToString; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | |
| | | @Data |
| | | @ToString |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel(value = "BattParamLow对象", description = "") |
| | | @TableName(schema = "web_site", value = "tb_batt_param_low") |
| | | public class BattParamLow implements Serializable { |
| | | private static final long serialVersionUID = 4775993351882656178L; |
| | | private Integer num; |
| | | |
| | | private Integer lowType; |
| | | |
| | | private Integer lowNametype; |
| | | |
| | | private Float lowValue; |
| | | |
| | | private Integer lowMethod; |
| | | } |
New file |
| | |
| | | package com.whyc.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.ToString; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value="BattRtdata对象", description="") |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ToString |
| | | @TableName(schema = "db_alarm",value = "tb_batt_rtdata") |
| | | public class BattRtdata implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -6611901100282789123L; |
| | | private Long num; |
| | | |
| | | @TableField("BattGroupId") |
| | | private Integer battGroupId; |
| | | |
| | | private Date recDatetime; |
| | | |
| | | private Integer monNum; |
| | | |
| | | private Float monVol; |
| | | |
| | | private Float monTmp; |
| | | |
| | | private Float monRes; |
| | | |
| | | private Float monSer; |
| | | |
| | | private Float monConnRes; |
| | | |
| | | private Float monCap; |
| | | |
| | | private Float monJhCurr; |
| | | |
| | | private Float monLyVol; |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import lombok.ToString; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | |
| | | @Data |
| | | @ApiModel(value="BattRtstate 对象", description="") |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ToString |
| | | @TableName(schema = "db_alarm",value = "tb_batt_rtstate") |
| | | public class BattRtstate implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1248623561574954436L; |
| | | private Long num; |
| | | |
| | | @TableField("BattGroupId") |
| | | private Integer battGroupId; |
| | | |
| | | private Integer battCount; |
| | | |
| | | private Date recDatetime; |
| | | |
| | | private Float onlineVol; |
| | | |
| | | private Float groupVol; |
| | | |
| | | private Float groupTmp; |
| | | |
| | | private Float groupCurr; |
| | | |
| | | private Integer battState; |
| | | |
| | | private Integer battTestType; |
| | | |
| | | private Date battTestStarttime; |
| | | |
| | | private Date battTestRecordtime; |
| | | |
| | | private Integer battTestTlong; |
| | | |
| | | private Float battTestCap; |
| | | |
| | | private Float battRealCap; |
| | | |
| | | private Float battRestCap; |
| | | |
| | | private Integer battRestPower1Time; |
| | | |
| | | private Integer battRestPower2Time; |
| | | |
| | | private Integer testLoadertype; |
| | | |
| | | private Integer testRecordnum; |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Batt_Maint_Dealarm; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.paramter.BattinfPar; |
| | | import com.whyc.mapper.BadbattMonMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class BadBattMonService { |
| | | |
| | | @Resource |
| | | BadbattMonMapper badbattMonMapper; |
| | | |
| | | public Response<List<Batt_Maint_Dealarm>> searchByInfo(BattinfPar battinfPar) { |
| | | |
| | | //分页信息 |
| | | PageHelper.startPage(battinfPar.getPage().getPageCurr(), battinfPar.getPage().getPageSize()); |
| | | List<Batt_Maint_Dealarm> list = badbattMonMapper.searchByInfo(battinfPar); |
| | | PageInfo<Batt_Maint_Dealarm> pinfo = new PageInfo<>(list); |
| | | |
| | | return new Response<List<Batt_Maint_Dealarm>>().set(1, list, String.valueOf(pinfo.getTotal())); |
| | | } |
| | | } |
New file |
| | |
| | | package com.whyc.service; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | public class BadLd9MonFlagService { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.whyc.dto.AllModel; |
| | | import com.whyc.dto.Batt_Maint_Dealarm; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.ServiceModel; |
| | | import com.whyc.mapper.BattInfMapper; |
| | | import com.whyc.mapper.BattMaintDealarmMapper; |
| | | import com.whyc.mapper.BatttestdataInfMapper; |
| | | import com.whyc.pojo.Battinf; |
| | | import com.whyc.pojo.BatttestdataInf; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class BattMaintDealarmService { |
| | | |
| | | |
| | | @Resource |
| | | private BatttestdataInfService service; |
| | | @Resource |
| | | private BattMaintDealarmMapper mapper; |
| | | @Resource |
| | | private BattInfMapper battInfMapper; |
| | | @Resource |
| | | private BatttestdataInfMapper batttestdataInfMapper; |
| | | |
| | | /** |
| | | * //1.2电池组统计分析查询 |
| | | * |
| | | * @param bmd |
| | | * @return |
| | | */ |
| | | |
| | | // SELECT DISTINCT |
| | | // ( |
| | | // db_battinf.tb_battinf.BattgroupId |
| | | // ), |
| | | // StationName1, |
| | | // StationName, |
| | | // stationip, |
| | | // BattGroupName, |
| | | // BattGroupName1, |
| | | // moncount, |
| | | // moncapstd, |
| | | // monvolstd, |
| | | // battproducer, |
| | | // battproductdate, |
| | | // battinusedate, |
| | | // db_batt_testdata.tb_batttestdata_inf.test_record_count, |
| | | // test_starttime |
| | | // FROM |
| | | // db_battinf.tb_battinf, |
| | | // db_batt_testdata.tb_batttestdata_inf |
| | | // WHERE |
| | | // db_battinf.tb_battinf.battgroupid = db_batt_testdata.tb_batttestdata_inf.battgroupid |
| | | // AND record_time >=? |
| | | // AND record_time <=? |
| | | // |
| | | // <if test="battGroupId==0"> |
| | | // and db_battinf.tb_battinf.battgroupid!=#{battGroupId} |
| | | // </if> |
| | | // <if test="battGroupId!=0"> |
| | | // and db_battinf.tb_battinf.battgroupid==#{battGroupId} |
| | | // </if> |
| | | // |
| | | // |
| | | // AND db_battinf.tb_battinf.BattgroupId IN ( |
| | | // SELECT DISTINCT |
| | | // db_battinf.tb_battinf.battgroupid |
| | | // FROM |
| | | // db_battinf.tb_battinf, |
| | | // db_user.tb_user_battgroup_baojigroup_battgroup, |
| | | // db_user.tb_user_battgroup_baojigroup_usr, |
| | | // db_user.tb_user_inf |
| | | // WHERE |
| | | // db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId = db_battinf.tb_battinf.BattGroupId |
| | | // AND db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id = db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id |
| | | // AND db_user.tb_user_inf.uid = db_user.tb_user_battgroup_baojigroup_usr.uid |
| | | // AND db_user.tb_user_inf.uid =? |
| | | // AND db_battinf.tb_battinf.stationname1 LIKE ? |
| | | // AND db_battinf.tb_battinf.stationname LIKE ? |
| | | // ) |
| | | // |
| | | // |
| | | // <if test="test_type==2"> |
| | | // and test_type=2 //充电 |
| | | // </if> |
| | | // |
| | | ////用于放电类型 |
| | | ////全部 |
| | | // <if test="test_type==3&&test_starttype=0"> |
| | | // and test_type=3 |
| | | // </if> |
| | | // <if test="test_type==3&&test_starttype=1"> |
| | | // and (test_starttype<5 and test_type not in(2,9) and test_starttype!=2 AND test_starttype!=3) |
| | | // </if> |
| | | // <if test="test_type==3&&test_starttype=2"> |
| | | // and (test_starttype=2 and test_type not in(2) ) |
| | | // </if> |
| | | // <if test="test_type==3&&test_starttype=3"> |
| | | // and (test_starttype=3 and test_type not in(2) ) |
| | | // </if> |
| | | // order by db_battinf.tb_battinf.battgroupid asc,test_starttime asc |
| | | // |
| | | |
| | | //TODO rzg battInfMapper |
| | | public Response<List<AllModel>> searchLow(Batt_Maint_Dealarm bmd) { |
| | | BatttestdataInf tdata = bmd.getBtestinf();//设定时间 |
| | | List<Battinf> list = null; |
| | | // List<Battinf> list = battInfMapper.serchByTestType(bmd); |
| | | List<AllModel> listAll = new ArrayList<AllModel>(); |
| | | if (list != null && list.size() > 0) { |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Battinf binf = list.get(i); |
| | | tdata.setBattGroupId(binf.getBattGroupId()); |
| | | tdata.setGroupVol(binf.getMonVolStd());//标存电压 |
| | | tdata.setTestCap(binf.getMonCapStd());//标存容量 |
| | | tdata.setTestRecordCount(binf.getNum());//次数 |
| | | //该电池组的放电结果 |
| | | List list1 = null;//该电池组的放电结果 |
| | | // List list1 = batttestdataInfMapper.serchDischargeTest(tdata);//该电池组的放电结果 |
| | | ServiceModel model = new ServiceModel(); |
| | | if (list1 != null && list1.size() > 0) { |
| | | model.setCode(1); |
| | | model.setData(list1);//1.2电池组统计分析查询 |
| | | model.setMsg("查询成功!"); |
| | | } else { |
| | | model.setCode(0); |
| | | model.setMsg("查询失败!"); |
| | | } |
| | | AllModel allmodel = new AllModel(); |
| | | allmodel.setData(list.get(i)); |
| | | allmodel.setTmodel(model); |
| | | listAll.add(allmodel); |
| | | } |
| | | } |
| | | return new Response<List<AllModel>>().set(1,listAll); |
| | | // return null; |
| | | } |
| | | |
| | | /** |
| | | * 电池组性能评估 |
| | | * |
| | | * @param bmd |
| | | * @return |
| | | */ |
| | | //TODO rzg battInfMapper |
| | | |
| | | // SELECT SQL_CALC_FOUND_ROWS DISTINCT |
| | | // ( |
| | | // db_battinf.tb_battinf.BattgroupId |
| | | // ), |
| | | // db_battinf.tb_battinf.stationid, |
| | | // StationName1, |
| | | // StationName, |
| | | // stationip, |
| | | // BattGroupName, |
| | | // BattGroupName1, |
| | | // moncount, |
| | | // moncapstd, |
| | | // monvolstd, |
| | | // battproducer, |
| | | // battproductdate, |
| | | // battinusedate |
| | | // FROM |
| | | // db_battinf.tb_battinf |
| | | // WHERE 1=1 |
| | | // |
| | | // <if test="battGroupId==0"> |
| | | // and db_battinf.tb_battinf.battgroupid!=#{battGroupId} |
| | | // </if> |
| | | // |
| | | // <if test="battGroupId!=0"> |
| | | // and db_battinf.tb_battinf.battgroupid==#{battGroupId} |
| | | // </if> |
| | | // |
| | | // AND db_battinf.tb_battinf.BattgroupId IN ( |
| | | // SELECT DISTINCT |
| | | // db_battinf.tb_battinf.battgroupid |
| | | // FROM |
| | | // db_battinf.tb_battinf, |
| | | // db_user.tb_user_battgroup_baojigroup_battgroup, |
| | | // db_user.tb_user_battgroup_baojigroup_usr, |
| | | // db_user.tb_user_inf |
| | | // WHERE |
| | | // db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId = db_battinf.tb_battinf.BattGroupId |
| | | // AND db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id = db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id |
| | | // AND db_user.tb_user_inf.uid = db_user.tb_user_battgroup_baojigroup_usr.uid |
| | | // AND db_user.tb_user_inf.uid =? |
| | | // AND db_battinf.tb_battinf.stationname1 LIKE ? |
| | | // AND db_battinf.tb_battinf.stationname LIKE ? |
| | | // ) |
| | | // |
| | | // order by db_battinf.tb_battinf.battgroupid asc |
| | | // |
| | | |
| | | |
| | | //TODO RZG |
| | | public Response<List<AllModel>> searchByCondition(Batt_Maint_Dealarm bmd) { |
| | | |
| | | BatttestdataInf tdata = bmd.getBtestinf();//设定时间 |
| | | List<Battinf> list = null; |
| | | // List<Battinf> list = battInfMapper.serchGroupAssess(bmd); |
| | | List<AllModel> listAll = new ArrayList<AllModel>(); |
| | | if (list != null && list.size() > 0) { |
| | | for (int i = 0; i < list.size(); i++) { |
| | | Battinf binf = list.get(i); |
| | | tdata.setBattGroupId(binf.getBattGroupId()); |
| | | tdata.setGroupVol(binf.getMonVolStd());//标存电压 |
| | | tdata.setTestCap(binf.getMonCapStd());//标存容量 |
| | | //该电池组的放电结果 |
| | | List list1 = null;//该电池组的放电结果 |
| | | // List list1 = batttestdataInfMapper.serchDischargeTest(tdata);//该电池组的放电结果 |
| | | ServiceModel model = new ServiceModel(); |
| | | if (list1 != null && list1.size() > 0) { |
| | | model.setCode(1); |
| | | model.setData(list1); |
| | | model.setMsg("查询成功!"); |
| | | } else { |
| | | model.setCode(0); |
| | | model.setMsg("查询失败!"); |
| | | } |
| | | AllModel allmodel = new AllModel(); |
| | | allmodel.setData(list.get(i)); |
| | | allmodel.setTmodel(model); |
| | | listAll.add(allmodel); |
| | | } |
| | | } |
| | | return new Response<List<AllModel>>().set(1, listAll); |
| | | } |
| | | |
| | | |
| | | |
| | | // SELECT |
| | | // battgroupid, |
| | | // test_curr, |
| | | // max_monvol, |
| | | // min_monvol, |
| | | // test_cap |
| | | // FROM |
| | | // db_batt_testdata.tb_batttestdata_inf |
| | | // WHERE |
| | | // battgroupid =? |
| | | // AND record_time >=? |
| | | // AND record_time <=? |
| | | // AND db_batt_testdata.tb_batttestdata_inf.data_available = 1 |
| | | // |
| | | ////充电放电选择 全部 test_type=0不加条件 |
| | | ////用于放电类型 |
| | | ////全部 |
| | | // <if test="test_type==3&&test_starttype=0"> |
| | | // and test_type=3 |
| | | // </if> |
| | | // <if test="test_type==3&&test_starttype=1"> |
| | | // and (test_starttype<5 and test_type not in(2,9) and test_starttype!=2 AND test_starttype!=3) |
| | | // </if> |
| | | // <if test="test_type==3&&test_starttype=2"> |
| | | // and (test_starttype=2 and test_type not in(2) ) |
| | | // </if> |
| | | // <if test="test_type==3&&test_starttype=3"> |
| | | // and (test_starttype=3 and test_type not in(2) ) |
| | | // </if> |
| | | // |
| | | // order by test_starttime desc |
| | | |
| | | } |
New file |
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.whyc.dto.Batt_Maint_Dealarm; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.ServiceModel; |
| | | import com.whyc.mapper.BattMaintDealarmMapper; |
| | | import com.whyc.mapper.BattParamLowMapper; |
| | | import com.whyc.pojo.BattParamLow; |
| | | import com.whyc.pojo.Battinf; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class BattMaintService { |
| | | |
| | | @Resource |
| | | private BattMaintDealarmMapper mapper; |
| | | |
| | | @Resource |
| | | private BattParamLowMapper battParamLowMapper; |
| | | |
| | | /** |
| | | * 1.3根据battgroupid和mon_num的值查出测试信息 |
| | | * 或者根据battgroupid和mon_num得到内阻信息(新) |
| | | * |
| | | * @param bmd |
| | | * @return |
| | | */ |
| | | public Response<Object> serchMonNum(Batt_Maint_Dealarm bmd) { |
| | | |
| | | List<Batt_Maint_Dealarm> list = null; //TODO dao.serchByCondition(bmd) 对应 实现 |
| | | // dao.serchByCondition(bmd); |
| | | // |
| | | BattParamLow lowCA=new BattParamLow(); |
| | | lowCA.setLowType(2); |
| | | lowCA.setLowNametype(2);//电容告警 |
| | | BattParamLow lowCH=new BattParamLow(); |
| | | lowCH.setLowType(2); |
| | | lowCH.setLowNametype(3);//电容更换 |
| | | List<BattParamLow> listCA = battParamLowMapper.serchByLow(lowCA); |
| | | List<BattParamLow> listCH = battParamLowMapper.serchByLow(lowCH); |
| | | Float percentCA = listCA.get(0).getLowValue(); |
| | | Float percentCH = listCH.get(0).getLowValue(); |
| | | //电导基准/维护建议/电导分析值 |
| | | BattParamLow lowRA=new BattParamLow(); |
| | | lowRA.setLowType(3); |
| | | lowRA.setLowNametype(2);//电导告警 |
| | | BattParamLow lowRH=new BattParamLow(); |
| | | lowRH.setLowType(3); |
| | | lowRH.setLowNametype(3);//电导更换 |
| | | |
| | | //电导 |
| | | List<BattParamLow> listRA = battParamLowMapper.serchByLow(lowRA); |
| | | List<BattParamLow> listRH = battParamLowMapper.serchByLow(lowRH); |
| | | Float percentRA = listRA.get(0).getLowValue(); |
| | | Float percentRH = listRH.get(0).getLowValue(); |
| | | int methodRM=listRA.get(0).getLowMethod(); //分析方式 |
| | | ServiceModel model=new ServiceModel(); |
| | | if(list!=null&&list.size()>0){ |
| | | model.setCode(1); |
| | | model.setMsg("查询成功!"); |
| | | model.setData(list); |
| | | model.setLowCA(percentCA); |
| | | model.setLowCH(percentCH); |
| | | model.setLowRA(percentRA); |
| | | model.setLowRH(percentRH); |
| | | model.setNewsum(methodRM);//分析方式1:平均值;0:标称值 |
| | | }else{ |
| | | model.setMsg("查询失败!"); |
| | | model.setCode(0); |
| | | } |
| | | |
| | | model.setCode(1); |
| | | model.setMsg("查询成功!"); |
| | | model.setLowCA(percentCA); |
| | | model.setLowCH(percentCH); |
| | | model.setLowRA(percentRA); |
| | | model.setLowRH(percentRH); |
| | | return new Response().set(1,model); |
| | | } |
| | | } |
New file |
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.BattState; |
| | | import com.whyc.dto.Batt_Maint_Dealarm; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.BattRtstateMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class BattTtstateService { |
| | | |
| | | |
| | | @Resource |
| | | private BattRtstateMapper battRtstateMapper; |
| | | |
| | | /** |
| | | * @param bmd binf.battGroupId、binf.num、binf.stationname.binf、stationname1、uinf.uId、page |
| | | * 落后单体查询:根据条件查询落后单体 |
| | | * @return |
| | | */ |
| | | public Response<List<BattState>> searchBattLife(Batt_Maint_Dealarm bmd) { |
| | | |
| | | //分页信息 |
| | | PageHelper.startPage(bmd.getPage().getPageCurr(), bmd.getPage().getPageSize()); |
| | | List<BattState> list = battRtstateMapper.searchBattLife(bmd); |
| | | PageInfo<BattState> pageInfo = new PageInfo<BattState>(list); |
| | | if (list != null && list.size() > 0) { |
| | | // System.out.println("list = " + list); |
| | | return new Response<List<BattState>>().set(1, list, String.valueOf(pageInfo.getTotal())); |
| | | } else { |
| | | return new Response<List<BattState>>().set(0, null, String.valueOf(pageInfo.getTotal())); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.whyc.service; |
| | | |
| | | import com.whyc.mapper.BattInfMapper; |
| | | import com.whyc.mapper.BattMaintDealarmMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Service |
| | | public class BatttestdataInfService { |
| | | |
| | | @Resource |
| | | private BattMaintDealarmMapper mapper; |
| | | @Resource |
| | | private BattInfMapper battInfMapper; |
| | | |
| | | } |
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.BadbattMonMapper"> |
| | | <resultMap id="BaseResultMap" type="com.whyc.pojo.BadbattMon"> |
| | | <id column="num" jdbcType="INTEGER" property="num" /> |
| | | <result column="battgroupid" jdbcType="INTEGER" property="battgroupid" /> |
| | | <result column="mon_num" jdbcType="INTEGER" property="monNum" /> |
| | | <result column="record_num" jdbcType="INTEGER" property="recordNum" /> |
| | | <result column="test_starttime" jdbcType="TIMESTAMP" property="testStarttime" /> |
| | | <result column="group_vol" jdbcType="REAL" property="groupVol" /> |
| | | <result column="test_curr" jdbcType="REAL" property="testCurr" /> |
| | | <result column="mon_vol" jdbcType="REAL" property="monVol" /> |
| | | <result column="real_cap" jdbcType="REAL" property="realCap" /> |
| | | <result column="stdcap" jdbcType="REAL" property="stdcap" /> |
| | | <result column="note" jdbcType="VARCHAR" property="note" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | num, battgroupid, mon_num, record_num, test_starttime, group_vol, test_curr, mon_vol, |
| | | real_cap, stdcap, note |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from tb_badbatt_mon |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </select> |
| | | <select id="searchByInfo" resultType="com.whyc.dto.Batt_Maint_Dealarm"> |
| | | SELECT SQL_CALC_FOUND_ROWS DISTINCT |
| | | web_site.tb_badbatt_mon.battgroupid, |
| | | web_site.tb_badbatt_mon.mon_num, |
| | | web_site.tb_badbatt_mon.real_cap, |
| | | web_site.tb_badbatt_mon.stdcap, |
| | | web_site.tb_badbatt_mon.note, |
| | | db_battinf.tb_battinf.stationname1, |
| | | db_battinf.tb_battinf.stationname, |
| | | db_battinf.tb_battinf.battproducer, |
| | | db_battinf.tb_battinf.battinusedate, |
| | | db_battinf.tb_battinf.monvolstd, |
| | | db_battinf.tb_battinf.battgroupname |
| | | FROM |
| | | web_site.tb_badbatt_mon, |
| | | db_battinf.tb_battinf |
| | | WHERE |
| | | web_site.tb_badbatt_mon.battgroupid = db_battinf.tb_battinf.BattGroupId |
| | | AND test_starttime >={battGroupId} |
| | | AND test_starttime <![CDATA[<=]]>{battGroupId} |
| | | AND db_battinf.tb_battinf.stationname1 LIKE CONCAT('%',#{stationName1},'%') |
| | | AND db_battinf.tb_battinf.stationname LIKE CONCAT('%',#{stationName},'%') |
| | | |
| | | <if test="battGroupId==0"> |
| | | and db_battinf.tb_battinf.battgroupid!=#{battGroupId} |
| | | </if> |
| | | <if test="battGroupId!=0"> |
| | | and db_battinf.tb_battinf.battgroupid!=#{battGroupId} |
| | | </if> |
| | | AND web_site.tb_badbatt_mon.battgroupid IN ( |
| | | SELECT DISTINCT |
| | | db_battinf.tb_battinf.battgroupid |
| | | FROM |
| | | db_battinf.tb_battinf, |
| | | db_user.tb_user_battgroup_baojigroup_battgroup, |
| | | db_user.tb_user_battgroup_baojigroup_usr, |
| | | db_user.tb_user_inf |
| | | WHERE |
| | | db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId = db_battinf.tb_battinf.BattGroupId |
| | | AND db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id = db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id |
| | | AND db_user.tb_user_inf.uid = db_user.tb_user_battgroup_baojigroup_usr.uid |
| | | AND db_user.tb_user_inf.uid =#{uId} |
| | | ) ORDER BY web_site.tb_badbatt_mon.battgroupid asc |
| | | |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |
| | | delete from tb_badbatt_mon |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </delete> |
| | | <insert id="insert" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.BadbattMon" useGeneratedKeys="true"> |
| | | insert into tb_badbatt_mon (battgroupid, mon_num, record_num, |
| | | test_starttime, group_vol, test_curr, |
| | | mon_vol, real_cap, stdcap, note |
| | | ) |
| | | values (#{battgroupid,jdbcType=INTEGER}, #{monNum,jdbcType=INTEGER}, #{recordNum,jdbcType=INTEGER}, |
| | | #{testStarttime,jdbcType=TIMESTAMP}, #{groupVol,jdbcType=REAL}, #{testCurr,jdbcType=REAL}, |
| | | #{monVol,jdbcType=REAL}, #{realCap,jdbcType=REAL}, #{stdcap,jdbcType=REAL}, #{note,jdbcType=VARCHAR} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.BadbattMon" useGeneratedKeys="true"> |
| | | insert into tb_badbatt_mon |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="battgroupid != null"> |
| | | battgroupid, |
| | | </if> |
| | | <if test="monNum != null"> |
| | | mon_num, |
| | | </if> |
| | | <if test="recordNum != null"> |
| | | record_num, |
| | | </if> |
| | | <if test="testStarttime != null"> |
| | | test_starttime, |
| | | </if> |
| | | <if test="groupVol != null"> |
| | | group_vol, |
| | | </if> |
| | | <if test="testCurr != null"> |
| | | test_curr, |
| | | </if> |
| | | <if test="monVol != null"> |
| | | mon_vol, |
| | | </if> |
| | | <if test="realCap != null"> |
| | | real_cap, |
| | | </if> |
| | | <if test="stdcap != null"> |
| | | stdcap, |
| | | </if> |
| | | <if test="note != null"> |
| | | note, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="battgroupid != null"> |
| | | #{battgroupid,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="monNum != null"> |
| | | #{monNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="recordNum != null"> |
| | | #{recordNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testStarttime != null"> |
| | | #{testStarttime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="groupVol != null"> |
| | | #{groupVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="testCurr != null"> |
| | | #{testCurr,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monVol != null"> |
| | | #{monVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="realCap != null"> |
| | | #{realCap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="stdcap != null"> |
| | | #{stdcap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="note != null"> |
| | | #{note,jdbcType=VARCHAR}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.whyc.pojo.BadbattMon"> |
| | | update tb_badbatt_mon |
| | | <set> |
| | | <if test="battgroupid != null"> |
| | | battgroupid = #{battgroupid,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="monNum != null"> |
| | | mon_num = #{monNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="recordNum != null"> |
| | | record_num = #{recordNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testStarttime != null"> |
| | | test_starttime = #{testStarttime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="groupVol != null"> |
| | | group_vol = #{groupVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="testCurr != null"> |
| | | test_curr = #{testCurr,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monVol != null"> |
| | | mon_vol = #{monVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="realCap != null"> |
| | | real_cap = #{realCap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="stdcap != null"> |
| | | stdcap = #{stdcap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="note != null"> |
| | | note = #{note,jdbcType=VARCHAR}, |
| | | </if> |
| | | </set> |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.whyc.pojo.BadbattMon"> |
| | | update tb_badbatt_mon |
| | | set battgroupid = #{battgroupid,jdbcType=INTEGER}, |
| | | mon_num = #{monNum,jdbcType=INTEGER}, |
| | | record_num = #{recordNum,jdbcType=INTEGER}, |
| | | test_starttime = #{testStarttime,jdbcType=TIMESTAMP}, |
| | | group_vol = #{groupVol,jdbcType=REAL}, |
| | | test_curr = #{testCurr,jdbcType=REAL}, |
| | | mon_vol = #{monVol,jdbcType=REAL}, |
| | | real_cap = #{realCap,jdbcType=REAL}, |
| | | stdcap = #{stdcap,jdbcType=REAL}, |
| | | note = #{note,jdbcType=VARCHAR} |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </update> |
| | | </mapper> |
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.BattMaintDealarmMapper" > |
| | | |
| | | <select id="serchLow" resultType="com.whyc.pojo.Battinf"> |
| | | |
| | | |
| | | </select> |
| | | </mapper> |
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.BattParamLowMapper"> |
| | | <resultMap id="BaseResultMap" type="com.whyc.pojo.BattParamLow"> |
| | | <id column="num" jdbcType="INTEGER" property="num" /> |
| | | <result column="low_type" jdbcType="INTEGER" property="lowType" /> |
| | | <result column="Low_nametype" jdbcType="INTEGER" property="lowNametype" /> |
| | | <result column="Low_value" jdbcType="REAL" property="lowValue" /> |
| | | <result column="low_method" jdbcType="INTEGER" property="lowMethod" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | num, low_type, Low_nametype, Low_value, low_method |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from tb_batt_param_low |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </select> |
| | | <select id="serchByLow" resultType="com.whyc.pojo.BattParamLow"> |
| | | select num,low_type,low_nametype,low_value,low_method from web_site.tb_batt_param_low where low_type=#{lowType} and |
| | | low_nametype=#{lowNametype} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |
| | | delete from tb_batt_param_low |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.whyc.pojo.BattParamLow"> |
| | | insert into tb_batt_param_low (num, low_type, Low_nametype, |
| | | Low_value, low_method) |
| | | values (#{num,jdbcType=INTEGER}, #{lowType,jdbcType=INTEGER}, #{lowNametype,jdbcType=INTEGER}, |
| | | #{lowValue,jdbcType=REAL}, #{lowMethod,jdbcType=INTEGER}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.whyc.pojo.BattParamLow"> |
| | | insert into tb_batt_param_low |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="num != null"> |
| | | num, |
| | | </if> |
| | | <if test="lowType != null"> |
| | | low_type, |
| | | </if> |
| | | <if test="lowNametype != null"> |
| | | Low_nametype, |
| | | </if> |
| | | <if test="lowValue != null"> |
| | | Low_value, |
| | | </if> |
| | | <if test="lowMethod != null"> |
| | | low_method, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="num != null"> |
| | | #{num,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="lowType != null"> |
| | | #{lowType,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="lowNametype != null"> |
| | | #{lowNametype,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="lowValue != null"> |
| | | #{lowValue,jdbcType=REAL}, |
| | | </if> |
| | | <if test="lowMethod != null"> |
| | | #{lowMethod,jdbcType=INTEGER}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.whyc.pojo.BattParamLow"> |
| | | update tb_batt_param_low |
| | | <set> |
| | | <if test="lowType != null"> |
| | | low_type = #{lowType,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="lowNametype != null"> |
| | | Low_nametype = #{lowNametype,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="lowValue != null"> |
| | | Low_value = #{lowValue,jdbcType=REAL}, |
| | | </if> |
| | | <if test="lowMethod != null"> |
| | | low_method = #{lowMethod,jdbcType=INTEGER}, |
| | | </if> |
| | | </set> |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.whyc.pojo.BattParamLow"> |
| | | update tb_batt_param_low |
| | | set low_type = #{lowType,jdbcType=INTEGER}, |
| | | Low_nametype = #{lowNametype,jdbcType=INTEGER}, |
| | | Low_value = #{lowValue,jdbcType=REAL}, |
| | | low_method = #{lowMethod,jdbcType=INTEGER} |
| | | where num = #{num,jdbcType=INTEGER} |
| | | </update> |
| | | </mapper> |
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.BattRtdataMapper"> |
| | | <resultMap id="BaseResultMap" type="com.whyc.pojo.BattRtdata"> |
| | | <id column="num" jdbcType="BIGINT" property="num" /> |
| | | <result column="BattGroupId" jdbcType="INTEGER" property="battGroupId" /> |
| | | <result column="rec_datetime" jdbcType="TIMESTAMP" property="recDatetime" /> |
| | | <result column="mon_num" jdbcType="INTEGER" property="monNum" /> |
| | | <result column="mon_vol" jdbcType="REAL" property="monVol" /> |
| | | <result column="mon_tmp" jdbcType="REAL" property="monTmp" /> |
| | | <result column="mon_res" jdbcType="REAL" property="monRes" /> |
| | | <result column="mon_ser" jdbcType="REAL" property="monSer" /> |
| | | <result column="mon_conn_res" jdbcType="REAL" property="monConnRes" /> |
| | | <result column="mon_cap" jdbcType="REAL" property="monCap" /> |
| | | <result column="mon_JH_curr" jdbcType="REAL" property="monJhCurr" /> |
| | | <result column="mon_LY_vol" jdbcType="REAL" property="monLyVol" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | num, BattGroupId, rec_datetime, mon_num, mon_vol, mon_tmp, mon_res, mon_ser, mon_conn_res, |
| | | mon_cap, mon_JH_curr, mon_LY_vol |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from tb_batt_rtdata |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from tb_batt_rtdata |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.whyc.pojo.BattRtdata"> |
| | | insert into tb_batt_rtdata (num, BattGroupId, rec_datetime, |
| | | mon_num, mon_vol, mon_tmp, mon_res, |
| | | mon_ser, mon_conn_res, mon_cap, |
| | | mon_JH_curr, mon_LY_vol) |
| | | values (#{num,jdbcType=BIGINT}, #{battgroupid,jdbcType=INTEGER}, #{recDatetime,jdbcType=TIMESTAMP}, |
| | | #{monNum,jdbcType=INTEGER}, #{monVol,jdbcType=REAL}, #{monTmp,jdbcType=REAL}, #{monRes,jdbcType=REAL}, |
| | | #{monSer,jdbcType=REAL}, #{monConnRes,jdbcType=REAL}, #{monCap,jdbcType=REAL}, |
| | | #{monJhCurr,jdbcType=REAL}, #{monLyVol,jdbcType=REAL}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.whyc.pojo.BattRtdata"> |
| | | insert into tb_batt_rtdata |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="num != null"> |
| | | num, |
| | | </if> |
| | | <if test="battgroupid != null"> |
| | | BattGroupId, |
| | | </if> |
| | | <if test="recDatetime != null"> |
| | | rec_datetime, |
| | | </if> |
| | | <if test="monNum != null"> |
| | | mon_num, |
| | | </if> |
| | | <if test="monVol != null"> |
| | | mon_vol, |
| | | </if> |
| | | <if test="monTmp != null"> |
| | | mon_tmp, |
| | | </if> |
| | | <if test="monRes != null"> |
| | | mon_res, |
| | | </if> |
| | | <if test="monSer != null"> |
| | | mon_ser, |
| | | </if> |
| | | <if test="monConnRes != null"> |
| | | mon_conn_res, |
| | | </if> |
| | | <if test="monCap != null"> |
| | | mon_cap, |
| | | </if> |
| | | <if test="monJhCurr != null"> |
| | | mon_JH_curr, |
| | | </if> |
| | | <if test="monLyVol != null"> |
| | | mon_LY_vol, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="num != null"> |
| | | #{num,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="battgroupid != null"> |
| | | #{battgroupid,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="recDatetime != null"> |
| | | #{recDatetime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="monNum != null"> |
| | | #{monNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="monVol != null"> |
| | | #{monVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monTmp != null"> |
| | | #{monTmp,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monRes != null"> |
| | | #{monRes,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monSer != null"> |
| | | #{monSer,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monConnRes != null"> |
| | | #{monConnRes,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monCap != null"> |
| | | #{monCap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monJhCurr != null"> |
| | | #{monJhCurr,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monLyVol != null"> |
| | | #{monLyVol,jdbcType=REAL}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.whyc.pojo.BattRtdata"> |
| | | update tb_batt_rtdata |
| | | <set> |
| | | <if test="battgroupid != null"> |
| | | BattGroupId = #{battgroupid,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="recDatetime != null"> |
| | | rec_datetime = #{recDatetime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="monNum != null"> |
| | | mon_num = #{monNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="monVol != null"> |
| | | mon_vol = #{monVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monTmp != null"> |
| | | mon_tmp = #{monTmp,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monRes != null"> |
| | | mon_res = #{monRes,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monSer != null"> |
| | | mon_ser = #{monSer,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monConnRes != null"> |
| | | mon_conn_res = #{monConnRes,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monCap != null"> |
| | | mon_cap = #{monCap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monJhCurr != null"> |
| | | mon_JH_curr = #{monJhCurr,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monLyVol != null"> |
| | | mon_LY_vol = #{monLyVol,jdbcType=REAL}, |
| | | </if> |
| | | </set> |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.whyc.pojo.BattRtdata"> |
| | | update tb_batt_rtdata |
| | | set BattGroupId = #{battgroupid,jdbcType=INTEGER}, |
| | | rec_datetime = #{recDatetime,jdbcType=TIMESTAMP}, |
| | | mon_num = #{monNum,jdbcType=INTEGER}, |
| | | mon_vol = #{monVol,jdbcType=REAL}, |
| | | mon_tmp = #{monTmp,jdbcType=REAL}, |
| | | mon_res = #{monRes,jdbcType=REAL}, |
| | | mon_ser = #{monSer,jdbcType=REAL}, |
| | | mon_conn_res = #{monConnRes,jdbcType=REAL}, |
| | | mon_cap = #{monCap,jdbcType=REAL}, |
| | | mon_JH_curr = #{monJhCurr,jdbcType=REAL}, |
| | | mon_LY_vol = #{monLyVol,jdbcType=REAL} |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
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.BattRtstateMapper"> |
| | | <resultMap id="BaseResultMap" type="com.whyc.pojo.BattRtstate"> |
| | | <id column="num" jdbcType="BIGINT" property="num" /> |
| | | <result column="BattGroupId" jdbcType="INTEGER" property="battGroupId" /> |
| | | <result column="batt_count" jdbcType="INTEGER" property="battCount" /> |
| | | <result column="BattRtstaterec_datetime" jdbcType="TIMESTAMP" property="recDatetime" /> |
| | | <result column="online_vol" jdbcType="REAL" property="onlineVol" /> |
| | | <result column="group_vol" jdbcType="REAL" property="groupVol" /> |
| | | <result column="group_tmp" jdbcType="REAL" property="groupTmp" /> |
| | | <result column="group_curr" jdbcType="REAL" property="groupCurr" /> |
| | | <result column="batt_state" jdbcType="INTEGER" property="battState" /> |
| | | <result column="batt_test_type" jdbcType="INTEGER" property="battTestType" /> |
| | | <result column="batt_test_starttime" jdbcType="TIMESTAMP" property="battTestStarttime" /> |
| | | <result column="batt_test_recordtime" jdbcType="TIMESTAMP" property="battTestRecordtime" /> |
| | | <result column="batt_test_tlong" jdbcType="INTEGER" property="battTestTlong" /> |
| | | <result column="batt_test_cap" jdbcType="REAL" property="battTestCap" /> |
| | | <result column="batt_real_cap" jdbcType="REAL" property="battRealCap" /> |
| | | <result column="batt_rest_cap" jdbcType="REAL" property="battRestCap" /> |
| | | <result column="batt_rest_power1_time" jdbcType="INTEGER" property="battRestPower1Time" /> |
| | | <result column="batt_rest_power2_time" jdbcType="INTEGER" property="battRestPower2Time" /> |
| | | <result column="test_loadertype" jdbcType="INTEGER" property="testLoadertype" /> |
| | | <result column="test_recordnum" jdbcType="INTEGER" property="testRecordnum" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="BaseResultMap1" type="com.whyc.dto.BattState"> |
| | | <association property="bstate" javaType="com.whyc.pojo.BattRtstate"> |
| | | <id column="num" jdbcType="BIGINT" property="num" /> |
| | | <result column="BattRtstate.BattGroupId" jdbcType="INTEGER" property="battGroupId" /> |
| | | <result column="batt_count" jdbcType="INTEGER" property="battCount" /> |
| | | <result column="BattRtstate.rec_datetime" jdbcType="TIMESTAMP" property="recDatetime" /> |
| | | <result column="online_vol" jdbcType="REAL" property="onlineVol" /> |
| | | <result column="group_vol" jdbcType="REAL" property="groupVol" /> |
| | | <result column="group_tmp" jdbcType="REAL" property="groupTmp" /> |
| | | <result column="group_curr" jdbcType="REAL" property="groupCurr" /> |
| | | <result column="batt_state" jdbcType="INTEGER" property="battState" /> |
| | | <result column="batt_test_type" jdbcType="INTEGER" property="battTestType" /> |
| | | <result column="batt_test_starttime" jdbcType="TIMESTAMP" property="battTestStarttime" /> |
| | | <result column="batt_test_recordtime" jdbcType="TIMESTAMP" property="battTestRecordtime" /> |
| | | <result column="batt_test_tlong" jdbcType="INTEGER" property="battTestTlong" /> |
| | | <result column="batt_test_cap" jdbcType="REAL" property="battTestCap" /> |
| | | <result column="batt_real_cap" jdbcType="REAL" property="battRealCap" /> |
| | | <result column="batt_rest_cap" jdbcType="REAL" property="battRestCap" /> |
| | | <result column="batt_rest_power1_time" jdbcType="INTEGER" property="battRestPower1Time" /> |
| | | <result column="batt_rest_power2_time" jdbcType="INTEGER" property="battRestPower2Time" /> |
| | | <result column="test_loadertype" jdbcType="INTEGER" property="testLoadertype" /> |
| | | <result column="test_recordnum" jdbcType="INTEGER" property="testRecordnum" /> |
| | | </association> |
| | | <association property="bdata" javaType="com.whyc.pojo.BattRtdata"> |
| | | <id column="num" jdbcType="BIGINT" property="num" /> |
| | | <result column="BattGroupId" jdbcType="INTEGER" property="battGroupId" /> |
| | | <result column="rec_datetime" jdbcType="TIMESTAMP" property="recDatetime" /> |
| | | <result column="mon_num" jdbcType="INTEGER" property="monNum" /> |
| | | <result column="mon_vol" jdbcType="REAL" property="monVol" /> |
| | | <result column="mon_tmp" jdbcType="REAL" property="monTmp" /> |
| | | <result column="mon_res" jdbcType="REAL" property="monRes" /> |
| | | <result column="mon_ser" jdbcType="REAL" property="monSer" /> |
| | | <result column="mon_conn_res" jdbcType="REAL" property="monConnRes" /> |
| | | <result column="mon_cap" jdbcType="REAL" property="monCap" /> |
| | | <result column="mon_JH_curr" jdbcType="REAL" property="monJhCurr" /> |
| | | <result column="mon_LY_vol" jdbcType="REAL" property="monLyVol" /> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | num, BattGroupId, batt_count, rec_datetime, online_vol, group_vol, group_tmp, group_curr, |
| | | batt_state, batt_test_type, batt_test_starttime, batt_test_recordtime, batt_test_tlong, |
| | | batt_test_cap, batt_real_cap, batt_rest_cap, batt_rest_power1_time, batt_rest_power2_time, |
| | | test_loadertype, test_recordnum |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from tb_batt_rtstate |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="searchBattLife" resultMap="BaseResultMap1"> |
| | | SELECT tb_batt_rtstate.BattGroupId as 'BattRtstate.BattGroupId', batt_count, tb_batt_rtstate.rec_datetime 'BattRtstate.rec_datetime', online_vol, group_vol, group_curr, |
| | | batt_state, batt_test_type, batt_test_starttime, batt_test_recordtime, batt_test_tlong, batt_test_cap, |
| | | batt_real_cap, batt_rest_cap, batt_rest_power1_time, batt_rest_power2_time, tb_batt_rtdata.BattGroupId, |
| | | tb_batt_rtdata.rec_datetime, |
| | | mon_num, mon_vol, mon_tmp, mon_res, mon_ser, mon_conn_res, mon_cap, |
| | | db_battinf.tb_battinf.moncapstd, db_battinf.tb_battinf.monvolstd, db_battinf.tb_battinf.stationname, |
| | | db_battinf.tb_battinf.stationname1, db_battinf.tb_battinf.BattGroupName, |
| | | db_battinf.tb_battinf.deviceName, max( BINARY tb_batt_rtdata.mon_vol ) AS maxmonvol, min( BINARY |
| | | tb_batt_rtdata.mon_vol ) AS minmonvol FROM db_ram_db.tb_batt_rtstate LEFT OUTER JOIN db_ram_db.tb_batt_rtdata ON |
| | | tb_batt_rtstate.BattGroupId = tb_batt_rtdata.BattGroupId LEFT OUTER JOIN db_battinf.tb_battinf ON |
| | | tb_batt_rtstate.BattGroupId = db_battinf.tb_battinf.BattGroupId |
| | | WHERE 1=1 |
| | | <if test="binf.battGroupId==0"> |
| | | and db_ram_db.tb_batt_rtstate.BattGroupId!=#{binf.battGroupId} |
| | | </if> |
| | | <if test="binf.battGroupId!=0"> |
| | | and db_ram_db.tb_batt_rtstate.BattGroupId=#{binf.battGroupId} |
| | | </if> |
| | | and tb_batt_rtstate.BattGroupId in(select distinct db_battinf.tb_battinf.battgroupid from |
| | | db_battinf.tb_battinf,db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr,db_user.tb_user_inf |
| | | where db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId=db_battinf.tb_battinf.BattGroupId and |
| | | db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id |
| | | and db_user.tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid and db_user.tb_user_inf.uid=#{uinf.uId} ) |
| | | AND db_battinf.tb_battinf.stationname like '%${binf.stationname}%' AND db_battinf.tb_battinf.stationname1 like |
| | | '%${binf.stationname1}%' |
| | | <if test="binf.num==100"> |
| | | AND batt_state!=#{binf.num} |
| | | </if> |
| | | <if test="binf.num!=100"> |
| | | AND batt_state=#{binf.num} |
| | | </if> |
| | | GROUP BY tb_batt_rtstate.BattGroupId |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from tb_batt_rtstate |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.whyc.pojo.BattRtstate"> |
| | | insert into tb_batt_rtstate (num, BattGroupId, batt_count, |
| | | rec_datetime, online_vol, group_vol, |
| | | group_tmp, group_curr, batt_state, |
| | | batt_test_type, batt_test_starttime, batt_test_recordtime, |
| | | batt_test_tlong, batt_test_cap, batt_real_cap, |
| | | batt_rest_cap, batt_rest_power1_time, batt_rest_power2_time, |
| | | test_loadertype, test_recordnum) |
| | | values (#{num,jdbcType=BIGINT}, #{battgroupid,jdbcType=INTEGER}, #{battCount,jdbcType=INTEGER}, |
| | | #{recDatetime,jdbcType=TIMESTAMP}, #{onlineVol,jdbcType=REAL}, #{groupVol,jdbcType=REAL}, |
| | | #{groupTmp,jdbcType=REAL}, #{groupCurr,jdbcType=REAL}, #{battState,jdbcType=INTEGER}, |
| | | #{battTestType,jdbcType=INTEGER}, #{battTestStarttime,jdbcType=TIMESTAMP}, #{battTestRecordtime,jdbcType=TIMESTAMP}, |
| | | #{battTestTlong,jdbcType=INTEGER}, #{battTestCap,jdbcType=REAL}, #{battRealCap,jdbcType=REAL}, |
| | | #{battRestCap,jdbcType=REAL}, #{battRestPower1Time,jdbcType=INTEGER}, #{battRestPower2Time,jdbcType=INTEGER}, |
| | | #{testLoadertype,jdbcType=INTEGER}, #{testRecordnum,jdbcType=INTEGER}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.whyc.pojo.BattRtstate"> |
| | | insert into tb_batt_rtstate |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="num != null"> |
| | | num, |
| | | </if> |
| | | <if test="battgroupid != null"> |
| | | BattGroupId, |
| | | </if> |
| | | <if test="battCount != null"> |
| | | batt_count, |
| | | </if> |
| | | <if test="recDatetime != null"> |
| | | rec_datetime, |
| | | </if> |
| | | <if test="onlineVol != null"> |
| | | online_vol, |
| | | </if> |
| | | <if test="groupVol != null"> |
| | | group_vol, |
| | | </if> |
| | | <if test="groupTmp != null"> |
| | | group_tmp, |
| | | </if> |
| | | <if test="groupCurr != null"> |
| | | group_curr, |
| | | </if> |
| | | <if test="battState != null"> |
| | | batt_state, |
| | | </if> |
| | | <if test="battTestType != null"> |
| | | batt_test_type, |
| | | </if> |
| | | <if test="battTestStarttime != null"> |
| | | batt_test_starttime, |
| | | </if> |
| | | <if test="battTestRecordtime != null"> |
| | | batt_test_recordtime, |
| | | </if> |
| | | <if test="battTestTlong != null"> |
| | | batt_test_tlong, |
| | | </if> |
| | | <if test="battTestCap != null"> |
| | | batt_test_cap, |
| | | </if> |
| | | <if test="battRealCap != null"> |
| | | batt_real_cap, |
| | | </if> |
| | | <if test="battRestCap != null"> |
| | | batt_rest_cap, |
| | | </if> |
| | | <if test="battRestPower1Time != null"> |
| | | batt_rest_power1_time, |
| | | </if> |
| | | <if test="battRestPower2Time != null"> |
| | | batt_rest_power2_time, |
| | | </if> |
| | | <if test="testLoadertype != null"> |
| | | test_loadertype, |
| | | </if> |
| | | <if test="testRecordnum != null"> |
| | | test_recordnum, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="num != null"> |
| | | #{num,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="battgroupid != null"> |
| | | #{battgroupid,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="battCount != null"> |
| | | #{battCount,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="recDatetime != null"> |
| | | #{recDatetime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="onlineVol != null"> |
| | | #{onlineVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="groupVol != null"> |
| | | #{groupVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="groupTmp != null"> |
| | | #{groupTmp,jdbcType=REAL}, |
| | | </if> |
| | | <if test="groupCurr != null"> |
| | | #{groupCurr,jdbcType=REAL}, |
| | | </if> |
| | | <if test="battState != null"> |
| | | #{battState,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="battTestType != null"> |
| | | #{battTestType,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="battTestStarttime != null"> |
| | | #{battTestStarttime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="battTestRecordtime != null"> |
| | | #{battTestRecordtime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="battTestTlong != null"> |
| | | #{battTestTlong,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="battTestCap != null"> |
| | | #{battTestCap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="battRealCap != null"> |
| | | #{battRealCap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="battRestCap != null"> |
| | | #{battRestCap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="battRestPower1Time != null"> |
| | | #{battRestPower1Time,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="battRestPower2Time != null"> |
| | | #{battRestPower2Time,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testLoadertype != null"> |
| | | #{testLoadertype,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testRecordnum != null"> |
| | | #{testRecordnum,jdbcType=INTEGER}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.whyc.pojo.BattRtstate"> |
| | | update tb_batt_rtstate |
| | | <set> |
| | | <if test="battgroupid != null"> |
| | | BattGroupId = #{battgroupid,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="battCount != null"> |
| | | batt_count = #{battCount,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="recDatetime != null"> |
| | | rec_datetime = #{recDatetime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="onlineVol != null"> |
| | | online_vol = #{onlineVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="groupVol != null"> |
| | | group_vol = #{groupVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="groupTmp != null"> |
| | | group_tmp = #{groupTmp,jdbcType=REAL}, |
| | | </if> |
| | | <if test="groupCurr != null"> |
| | | group_curr = #{groupCurr,jdbcType=REAL}, |
| | | </if> |
| | | <if test="battState != null"> |
| | | batt_state = #{battState,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="battTestType != null"> |
| | | batt_test_type = #{battTestType,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="battTestStarttime != null"> |
| | | batt_test_starttime = #{battTestStarttime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="battTestRecordtime != null"> |
| | | batt_test_recordtime = #{battTestRecordtime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="battTestTlong != null"> |
| | | batt_test_tlong = #{battTestTlong,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="battTestCap != null"> |
| | | batt_test_cap = #{battTestCap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="battRealCap != null"> |
| | | batt_real_cap = #{battRealCap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="battRestCap != null"> |
| | | batt_rest_cap = #{battRestCap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="battRestPower1Time != null"> |
| | | batt_rest_power1_time = #{battRestPower1Time,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="battRestPower2Time != null"> |
| | | batt_rest_power2_time = #{battRestPower2Time,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testLoadertype != null"> |
| | | test_loadertype = #{testLoadertype,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testRecordnum != null"> |
| | | test_recordnum = #{testRecordnum,jdbcType=INTEGER}, |
| | | </if> |
| | | </set> |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.whyc.pojo.BattRtstate"> |
| | | update tb_batt_rtstate |
| | | set BattGroupId = #{battgroupid,jdbcType=INTEGER}, |
| | | batt_count = #{battCount,jdbcType=INTEGER}, |
| | | rec_datetime = #{recDatetime,jdbcType=TIMESTAMP}, |
| | | online_vol = #{onlineVol,jdbcType=REAL}, |
| | | group_vol = #{groupVol,jdbcType=REAL}, |
| | | group_tmp = #{groupTmp,jdbcType=REAL}, |
| | | group_curr = #{groupCurr,jdbcType=REAL}, |
| | | batt_state = #{battState,jdbcType=INTEGER}, |
| | | batt_test_type = #{battTestType,jdbcType=INTEGER}, |
| | | batt_test_starttime = #{battTestStarttime,jdbcType=TIMESTAMP}, |
| | | batt_test_recordtime = #{battTestRecordtime,jdbcType=TIMESTAMP}, |
| | | batt_test_tlong = #{battTestTlong,jdbcType=INTEGER}, |
| | | batt_test_cap = #{battTestCap,jdbcType=REAL}, |
| | | batt_real_cap = #{battRealCap,jdbcType=REAL}, |
| | | batt_rest_cap = #{battRestCap,jdbcType=REAL}, |
| | | batt_rest_power1_time = #{battRestPower1Time,jdbcType=INTEGER}, |
| | | batt_rest_power2_time = #{battRestPower2Time,jdbcType=INTEGER}, |
| | | test_loadertype = #{testLoadertype,jdbcType=INTEGER}, |
| | | test_recordnum = #{testRecordnum,jdbcType=INTEGER} |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
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.BatttestdataInfMapper"> |
| | | <resultMap id="BaseResultMap" type="com.whyc.pojo.BatttestdataInf"> |
| | | <id column="num" jdbcType="BIGINT" property="num" /> |
| | | <result column="BattGroupId" jdbcType="INTEGER" property="battGroupId" /> |
| | | <result column="test_record_count" jdbcType="INTEGER" property="testRecordCount" /> |
| | | <result column="test_record_count_ex" jdbcType="INTEGER" property="testRecordCountEx" /> |
| | | <result column="test_type" jdbcType="INTEGER" property="testType" /> |
| | | <result column="record_time_interval" jdbcType="INTEGER" property="recordTimeInterval" /> |
| | | <result column="data_new" jdbcType="TINYINT" property="dataNew" /> |
| | | <result column="data_available" jdbcType="TINYINT" property="dataAvailable" /> |
| | | <result column="record_num" jdbcType="INTEGER" property="recordNum" /> |
| | | <result column="test_starttime" jdbcType="TIMESTAMP" property="testStarttime" /> |
| | | <result column="test_starttime_ex" jdbcType="TIMESTAMP" property="testStarttimeEx" /> |
| | | <result column="test_starttype" jdbcType="INTEGER" property="testStarttype" /> |
| | | <result column="record_time" jdbcType="TIMESTAMP" property="recordTime" /> |
| | | <result column="test_timelong" jdbcType="INTEGER" property="testTimelong" /> |
| | | <result column="test_stoptype" jdbcType="INTEGER" property="testStoptype" /> |
| | | <result column="group_vol" jdbcType="REAL" property="groupVol" /> |
| | | <result column="test_curr" jdbcType="REAL" property="testCurr" /> |
| | | <result column="test_cap" jdbcType="REAL" property="testCap" /> |
| | | <result column="max_monnum" jdbcType="INTEGER" property="maxMonnum" /> |
| | | <result column="max_monvol" jdbcType="REAL" property="maxMonvol" /> |
| | | <result column="min_monnum" jdbcType="INTEGER" property="minMonnum" /> |
| | | <result column="min_monvol" jdbcType="REAL" property="minMonvol" /> |
| | | <result column="mon_num" jdbcType="INTEGER" property="monNum" /> |
| | | <result column="mon_vol" jdbcType="REAL" property="monVol" /> |
| | | <result column="upload_usr_id" jdbcType="INTEGER" property="uploadUsrId" /> |
| | | <result column="upload_data_ext" jdbcType="INTEGER" property="uploadDataExt" /> |
| | | <result column="upload_client_type" jdbcType="INTEGER" property="uploadClientType" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | num, BattGroupId, test_record_count, test_record_count_ex, test_type, record_time_interval, |
| | | data_new, data_available, record_num, test_starttime, test_starttime_ex, test_starttype, |
| | | record_time, test_timelong, test_stoptype, group_vol, test_curr, test_cap, max_monnum, |
| | | max_monvol, min_monnum, min_monvol, mon_num, mon_vol, upload_usr_id, upload_data_ext, |
| | | upload_client_type |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from tb_batttestdata_inf |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from tb_batttestdata_inf |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.BatttestdataInf" useGeneratedKeys="true"> |
| | | insert into tb_batttestdata_inf (BattGroupId, test_record_count, test_record_count_ex, |
| | | test_type, record_time_interval, data_new, |
| | | data_available, record_num, test_starttime, |
| | | test_starttime_ex, test_starttype, record_time, |
| | | test_timelong, test_stoptype, group_vol, |
| | | test_curr, test_cap, max_monnum, |
| | | max_monvol, min_monnum, min_monvol, |
| | | mon_num, mon_vol, upload_usr_id, |
| | | upload_data_ext, upload_client_type) |
| | | values (#{battgroupid,jdbcType=INTEGER}, #{testRecordCount,jdbcType=INTEGER}, #{testRecordCountEx,jdbcType=INTEGER}, |
| | | #{testType,jdbcType=INTEGER}, #{recordTimeInterval,jdbcType=INTEGER}, #{dataNew,jdbcType=TINYINT}, |
| | | #{dataAvailable,jdbcType=TINYINT}, #{recordNum,jdbcType=INTEGER}, #{testStarttime,jdbcType=TIMESTAMP}, |
| | | #{testStarttimeEx,jdbcType=TIMESTAMP}, #{testStarttype,jdbcType=INTEGER}, #{recordTime,jdbcType=TIMESTAMP}, |
| | | #{testTimelong,jdbcType=INTEGER}, #{testStoptype,jdbcType=INTEGER}, #{groupVol,jdbcType=REAL}, |
| | | #{testCurr,jdbcType=REAL}, #{testCap,jdbcType=REAL}, #{maxMonnum,jdbcType=INTEGER}, |
| | | #{maxMonvol,jdbcType=REAL}, #{minMonnum,jdbcType=INTEGER}, #{minMonvol,jdbcType=REAL}, |
| | | #{monNum,jdbcType=INTEGER}, #{monVol,jdbcType=REAL}, #{uploadUsrId,jdbcType=INTEGER}, |
| | | #{uploadDataExt,jdbcType=INTEGER}, #{uploadClientType,jdbcType=INTEGER}) |
| | | </insert> |
| | | <insert id="insertSelective" keyColumn="num" keyProperty="num" parameterType="com.whyc.pojo.BatttestdataInf" useGeneratedKeys="true"> |
| | | insert into tb_batttestdata_inf |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="battgroupid != null"> |
| | | BattGroupId, |
| | | </if> |
| | | <if test="testRecordCount != null"> |
| | | test_record_count, |
| | | </if> |
| | | <if test="testRecordCountEx != null"> |
| | | test_record_count_ex, |
| | | </if> |
| | | <if test="testType != null"> |
| | | test_type, |
| | | </if> |
| | | <if test="recordTimeInterval != null"> |
| | | record_time_interval, |
| | | </if> |
| | | <if test="dataNew != null"> |
| | | data_new, |
| | | </if> |
| | | <if test="dataAvailable != null"> |
| | | data_available, |
| | | </if> |
| | | <if test="recordNum != null"> |
| | | record_num, |
| | | </if> |
| | | <if test="testStarttime != null"> |
| | | test_starttime, |
| | | </if> |
| | | <if test="testStarttimeEx != null"> |
| | | test_starttime_ex, |
| | | </if> |
| | | <if test="testStarttype != null"> |
| | | test_starttype, |
| | | </if> |
| | | <if test="recordTime != null"> |
| | | record_time, |
| | | </if> |
| | | <if test="testTimelong != null"> |
| | | test_timelong, |
| | | </if> |
| | | <if test="testStoptype != null"> |
| | | test_stoptype, |
| | | </if> |
| | | <if test="groupVol != null"> |
| | | group_vol, |
| | | </if> |
| | | <if test="testCurr != null"> |
| | | test_curr, |
| | | </if> |
| | | <if test="testCap != null"> |
| | | test_cap, |
| | | </if> |
| | | <if test="maxMonnum != null"> |
| | | max_monnum, |
| | | </if> |
| | | <if test="maxMonvol != null"> |
| | | max_monvol, |
| | | </if> |
| | | <if test="minMonnum != null"> |
| | | min_monnum, |
| | | </if> |
| | | <if test="minMonvol != null"> |
| | | min_monvol, |
| | | </if> |
| | | <if test="monNum != null"> |
| | | mon_num, |
| | | </if> |
| | | <if test="monVol != null"> |
| | | mon_vol, |
| | | </if> |
| | | <if test="uploadUsrId != null"> |
| | | upload_usr_id, |
| | | </if> |
| | | <if test="uploadDataExt != null"> |
| | | upload_data_ext, |
| | | </if> |
| | | <if test="uploadClientType != null"> |
| | | upload_client_type, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="battgroupid != null"> |
| | | #{battgroupid,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testRecordCount != null"> |
| | | #{testRecordCount,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testRecordCountEx != null"> |
| | | #{testRecordCountEx,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testType != null"> |
| | | #{testType,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="recordTimeInterval != null"> |
| | | #{recordTimeInterval,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="dataNew != null"> |
| | | #{dataNew,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="dataAvailable != null"> |
| | | #{dataAvailable,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="recordNum != null"> |
| | | #{recordNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testStarttime != null"> |
| | | #{testStarttime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="testStarttimeEx != null"> |
| | | #{testStarttimeEx,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="testStarttype != null"> |
| | | #{testStarttype,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="recordTime != null"> |
| | | #{recordTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="testTimelong != null"> |
| | | #{testTimelong,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testStoptype != null"> |
| | | #{testStoptype,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="groupVol != null"> |
| | | #{groupVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="testCurr != null"> |
| | | #{testCurr,jdbcType=REAL}, |
| | | </if> |
| | | <if test="testCap != null"> |
| | | #{testCap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="maxMonnum != null"> |
| | | #{maxMonnum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="maxMonvol != null"> |
| | | #{maxMonvol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="minMonnum != null"> |
| | | #{minMonnum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="minMonvol != null"> |
| | | #{minMonvol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monNum != null"> |
| | | #{monNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="monVol != null"> |
| | | #{monVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="uploadUsrId != null"> |
| | | #{uploadUsrId,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="uploadDataExt != null"> |
| | | #{uploadDataExt,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="uploadClientType != null"> |
| | | #{uploadClientType,jdbcType=INTEGER}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.whyc.pojo.BatttestdataInf"> |
| | | update tb_batttestdata_inf |
| | | <set> |
| | | <if test="battgroupid != null"> |
| | | BattGroupId = #{battgroupid,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testRecordCount != null"> |
| | | test_record_count = #{testRecordCount,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testRecordCountEx != null"> |
| | | test_record_count_ex = #{testRecordCountEx,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testType != null"> |
| | | test_type = #{testType,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="recordTimeInterval != null"> |
| | | record_time_interval = #{recordTimeInterval,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="dataNew != null"> |
| | | data_new = #{dataNew,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="dataAvailable != null"> |
| | | data_available = #{dataAvailable,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="recordNum != null"> |
| | | record_num = #{recordNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testStarttime != null"> |
| | | test_starttime = #{testStarttime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="testStarttimeEx != null"> |
| | | test_starttime_ex = #{testStarttimeEx,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="testStarttype != null"> |
| | | test_starttype = #{testStarttype,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="recordTime != null"> |
| | | record_time = #{recordTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="testTimelong != null"> |
| | | test_timelong = #{testTimelong,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="testStoptype != null"> |
| | | test_stoptype = #{testStoptype,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="groupVol != null"> |
| | | group_vol = #{groupVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="testCurr != null"> |
| | | test_curr = #{testCurr,jdbcType=REAL}, |
| | | </if> |
| | | <if test="testCap != null"> |
| | | test_cap = #{testCap,jdbcType=REAL}, |
| | | </if> |
| | | <if test="maxMonnum != null"> |
| | | max_monnum = #{maxMonnum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="maxMonvol != null"> |
| | | max_monvol = #{maxMonvol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="minMonnum != null"> |
| | | min_monnum = #{minMonnum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="minMonvol != null"> |
| | | min_monvol = #{minMonvol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="monNum != null"> |
| | | mon_num = #{monNum,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="monVol != null"> |
| | | mon_vol = #{monVol,jdbcType=REAL}, |
| | | </if> |
| | | <if test="uploadUsrId != null"> |
| | | upload_usr_id = #{uploadUsrId,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="uploadDataExt != null"> |
| | | upload_data_ext = #{uploadDataExt,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="uploadClientType != null"> |
| | | upload_client_type = #{uploadClientType,jdbcType=INTEGER}, |
| | | </if> |
| | | </set> |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.whyc.pojo.BatttestdataInf"> |
| | | update tb_batttestdata_inf |
| | | set BattGroupId = #{battgroupid,jdbcType=INTEGER}, |
| | | test_record_count = #{testRecordCount,jdbcType=INTEGER}, |
| | | test_record_count_ex = #{testRecordCountEx,jdbcType=INTEGER}, |
| | | test_type = #{testType,jdbcType=INTEGER}, |
| | | record_time_interval = #{recordTimeInterval,jdbcType=INTEGER}, |
| | | data_new = #{dataNew,jdbcType=TINYINT}, |
| | | data_available = #{dataAvailable,jdbcType=TINYINT}, |
| | | record_num = #{recordNum,jdbcType=INTEGER}, |
| | | test_starttime = #{testStarttime,jdbcType=TIMESTAMP}, |
| | | test_starttime_ex = #{testStarttimeEx,jdbcType=TIMESTAMP}, |
| | | test_starttype = #{testStarttype,jdbcType=INTEGER}, |
| | | record_time = #{recordTime,jdbcType=TIMESTAMP}, |
| | | test_timelong = #{testTimelong,jdbcType=INTEGER}, |
| | | test_stoptype = #{testStoptype,jdbcType=INTEGER}, |
| | | group_vol = #{groupVol,jdbcType=REAL}, |
| | | test_curr = #{testCurr,jdbcType=REAL}, |
| | | test_cap = #{testCap,jdbcType=REAL}, |
| | | max_monnum = #{maxMonnum,jdbcType=INTEGER}, |
| | | max_monvol = #{maxMonvol,jdbcType=REAL}, |
| | | min_monnum = #{minMonnum,jdbcType=INTEGER}, |
| | | min_monvol = #{minMonvol,jdbcType=REAL}, |
| | | mon_num = #{monNum,jdbcType=INTEGER}, |
| | | mon_vol = #{monVol,jdbcType=REAL}, |
| | | upload_usr_id = #{uploadUsrId,jdbcType=INTEGER}, |
| | | upload_data_ext = #{uploadDataExt,jdbcType=INTEGER}, |
| | | upload_client_type = #{uploadClientType,jdbcType=INTEGER} |
| | | where num = #{num,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |