| | |
| | | @Resource |
| | | private User_logService uservice; |
| | | |
| | | |
| | | |
| | | //8.1添加新的参数 |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "",value="添加新的参数") |
| | | @ApiOperation(notes = "{ \"param_name\": \"\", \"preset_time\": 0, \"preset_cap\": 0.0, \"preset_monvol\": 0.0, \"preset_groupvol\": 0.0, \"preset_curr\": 0.0, \"preset_mon\": 0, \"dcvolhighlimit\": 0.0, \"chargecurrset\": 0.0, \"note\": \"tt\", \"plan_circle\": 0, \"plan_rate\": 0 }",value="添加新的参数") |
| | | public ServiceModel add(@RequestBody BattDischarge_param param){ |
| | | // BattDischarge_param param = getGson("yyyy-MM-dd").fromJson(json, BattDischarge_param.class); |
| | | ServiceModel model = service.add(param); |
| | |
| | | private BattDischarge_planService service; |
| | | |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "除num外所有参数",value="新增") |
| | | @ApiOperation(notes = "{ \"battgroupid\": 1000002, \"battIndexInFbs\": 0, \"discharge_starttime\": \"2020-12-30 11:04:21\", \"discharge_starttime1\": \"2020-12-30 11:04:21\", \"discharge_stoptime\": \"2020-12-30 11:04:21\", \"discharge_stoptime1\": \"2020-12-30 11:04:21\", \"discharge_state\": 0, \"discharge_reason\": 0, \"discharge_cleartype\": 0, \"preset_time\": 0, \"preset_cap\": 0.0, \"preset_monvol\": 0.0, \"preset_groupvol\": 0.0, \"preset_curr\": 0.0, \"preset_mon\": 0, \"dcvolhighlimit\": 0.0, \"chargecurrset\": 0.0, \"plan_circle\": 0, \"plan_rate\": 0, \"note\": \"\" }",value="新增") |
| | | public ServiceModel add(@RequestBody BattDischarge_plan plan){ |
| | | // BattDischarge_plan plan = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattDischarge_plan.class); |
| | | ServiceModel model =service.add(plan); |
| | | |
| | | return model; |
| | | } |
| | | |
| | | |
| | | //8.1批量添加电池计划 |
| | | @PostMapping("/batch") |
| | | @ApiOperation(notes = "",value="批量添加电池计划") |
| | | @ApiOperation(notes = "[{ \"battgroupid\": 1000002, \"battIndexInFbs\": 0, \"discharge_starttime\": \"2020-12-30 11:04:21\", \"discharge_starttime1\": \"2020-12-30 11:04:21\", \"discharge_stoptime\": \"2020-12-30 11:04:21\", \"discharge_stoptime1\": \"2020-12-30 11:04:21\", \"discharge_state\": 0, \"discharge_reason\": 0, \"discharge_cleartype\": 0, \"preset_time\": 0, \"preset_cap\": 0.0, \"preset_monvol\": 0.0, \"preset_groupvol\": 0.0, \"preset_curr\": 0.0, \"preset_mon\": 0, \"dcvolhighlimit\": 0.0, \"chargecurrset\": 0.0, \"plan_circle\": 0, \"plan_rate\": 0, \"note\": \"\" }]",value="批量添加电池计划") |
| | | public ServiceModel addPro(@RequestBody List<BattDischarge_plan> list){ |
| | | // List<BattDischarge_plan> plans = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken<List<BattDischarge_plan>>(){}.getType()); |
| | | ServiceModel model = service.addPro(list); |
| | |
| | | } |
| | | |
| | | @PutMapping("/") |
| | | @ApiOperation(notes = "",value="修改") |
| | | @ApiOperation(notes = "{ \"formattime\": \"\", \"num\": 11, \"battgroupid\": 0, \"battIndexInFbs\": 0, \"discharge_starttime\": \"2020-12-31 11:52:56\", \"discharge_starttime1\": \"2020-12-31 11:52:56\", \"discharge_stoptime\": \"2020-12-31 11:52:56\", \"discharge_stoptime1\": \"2020-12-31 11:52:56\", \"discharge_state\": 0, \"discharge_reason\": 0, \"discharge_cleartype\": 0, \"preset_time\": 0, \"preset_cap\": 0.0, \"preset_monvol\": 0.0, \"preset_groupvol\": 0.0, \"preset_curr\": 0.0, \"preset_mon\": 0, \"dcvolhighlimit\": 0.0, \"chargecurrset\": 0.0, \"plan_circle\": 0, \"plan_rate\": 0, \"note\": \"\" }",value="修改") |
| | | public ServiceModel update(@RequestBody BattDischarge_plan plan){ |
| | | // BattDischarge_plan plan = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattDischarge_plan.class); |
| | | ServiceModel model = service.update(plan);///--------- |
| | | |
| | | return model; |
| | | } |
| | | |
| | | |
| | | //8.1批量修改放电计划的开始时间 |
| | | @PutMapping("/batch") |
| | | @ApiOperation(notes = "",value="批量修改放电计划的开始时间") |
| | | @ApiOperation(notes = "[{ \"num\":1, \"battgroupid\": 1000002, \"battIndexInFbs\": 0, \"discharge_starttime\": \"2020-12-30 11:04:21\", \"discharge_starttime1\": \"2020-12-30 11:04:21\", \"discharge_stoptime\": \"2020-12-30 11:04:21\", \"discharge_stoptime1\": \"2020-12-30 11:04:21\", \"discharge_state\": 0, \"discharge_reason\": 0, \"discharge_cleartype\": 0, \"preset_time\": 0, \"preset_cap\": 0.0, \"preset_monvol\": 0.0, \"preset_groupvol\": 0.0, \"preset_curr\": 0.0, \"preset_mon\": 0, \"dcvolhighlimit\": 0.0, \"chargecurrset\": 0.0, \"plan_circle\": 0, \"plan_rate\": 0, \"note\": \"\" }]",value="批量修改放电计划的开始时间") |
| | | public ServiceModel updatePro(@RequestBody List<BattDischarge_plan> plans){ |
| | | // List<BattDischarge_plan> plans = getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken<List<BattDischarge_plan>>(){}.getType()); |
| | | ServiceModel model = service.updatePro(plans);///--------- |
| | |
| | | |
| | | @DeleteMapping("/") |
| | | @ApiOperation(notes = "",value="删除") |
| | | public ServiceModel del(@RequestBody BattDischarge_plan plan){ |
| | | // BattDischarge_plan plan = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattDischarge_plan.class); |
| | | public ServiceModel del(@RequestParam Integer num) { |
| | | BattDischarge_plan plan = new BattDischarge_plan(); |
| | | plan.setNum(num); |
| | | ServiceModel model = service.del(plan); |
| | | |
| | | return model; |
| | |
| | | |
| | | return model; |
| | | } |
| | | |
| | | |
| | | //8.1放电计划查询 |
| | | @GetMapping("byCondition") |
| | | @ApiOperation(notes = "",value="放电计划查询") |
| | | @PostMapping("byCondition") |
| | | @ApiOperation(notes = "{ \"binf\": { \"stationName\": \"\", \"stationName1\": \"\", \"battGroupId\": 0 },\"pageBean\": { \"pageSize\": 3, \"pageNum\": 0 },\"bplan\": { \"discharge_starttime\": \"2001-02-01 08:16:35\", \"discharge_starttime1\": \"2021-02-01 08:16:35\", \"discharge_state\": 0 } }",value="放电计划查询") |
| | | public ServiceModel serchByCondition(@RequestBody Batt_Maint_Dealarm bmd){ |
| | | // Batt_Maint_Dealarm bmd = ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Batt_Maint_Dealarm.class); |
| | | User_inf uinf=(User_inf) ActionUtil.getUser(); |
| | | bmd.setUinf(uinf); |
| | | ServiceModel model = service.serchByCondition(bmd); |
| | |
| | | |
| | | return model; |
| | | }*/ |
| | | |
| | | //8.1放电计划管理中进页面查询 |
| | | @GetMapping("battGroupInfo") |
| | | @ApiOperation(notes = "",value="放电计划管理中进页面查询") |
| | |
| | | |
| | | return model; |
| | | } |
| | | |
| | | |
| | | //新版添加放电计划查询<排除设置过放电计划的电池组> |
| | | @GetMapping("battPlan") |
| | | @ApiOperation(notes = "",value="新版添加放电计划查询<排除设置过放电计划的电池组>") |
| | | public ServiceModel serchBattPlan(@RequestBody BattInf binf){ |
| | | // BattInf binf= getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,BattInf.class); |
| | | User_inf uinf=(User_inf) ActionUtil.getUser(); |
| | | @PostMapping("battPlan") |
| | | @ApiOperation(notes = "stationId 等四个参数为模糊查询 结果集:{ \"code\": 1, \"msg\": \"查询成功!\", \"data\": [{ \"stationId\": \"42010007\", \"stationName\": \"山西省-太原市-迎泽区-局机房119-局机房站-1\", \"fbsDeviceId\": 910000001\"fparam\": { \"hourRate\": 0, \"disCurr\": 0, \"disCap\": 0, \"disTime\": 0, \"groupVol_Low\": 0, \"monomerVol_Low\": 0, \"monomerLowCount\": 0, \"battGroupNum\": 0, \"onlineLowAction\": 0, \"dCVolHighLimit\": 0, \"chargeCurrSet\": 0, \"offLineYH_Cycle\": 0, \"offLineYHTimes\": 0, \"offLineYHOnceCycle\": 0, \"onLineVol_Low\": 0 } }]}",value="新版添加放电计划查询<排除设置过放电计划的电池组>") |
| | | public ServiceModel serchBattPlan(@RequestParam String stationId,@RequestParam String stationName1,@RequestParam String stationName2,@RequestParam String stationName5) { |
| | | BattInf binf = new BattInf(); |
| | | User_inf uinf = (User_inf) ActionUtil.getUser(); |
| | | binf.setNum(uinf.getuId()); |
| | | binf.setStationId(stationId); |
| | | binf.setStationName1(stationName1); |
| | | binf.setStationName2(stationName2); |
| | | binf.setStationName5(stationName5); |
| | | ServiceModel model = service.serchBattPlan(binf); |
| | | |
| | | return model; |
| | |
| | | //8.1查询未开始放电的放电计划总数 |
| | | @GetMapping("nums") |
| | | @ApiOperation(notes = "",value="查询未开始放电的放电计划总数") |
| | | public ServiceModel searchNums() { |
| | | User_inf uinf=(User_inf) ActionUtil.getUser(); |
| | | ServiceModel model = service.searchNums(uinf); |
| | | public ServiceModelOnce searchNums() { |
| | | User_inf uinf = (User_inf) ActionUtil.getUser(); |
| | | ServiceModelOnce model = service.searchNums(uinf); |
| | | |
| | | return model; |
| | | } |
| | |
| | | *num: 总数*/ |
| | | @GetMapping("state") |
| | | @ApiOperation(notes = "",value="放电计划管理中饼状图(放电计划统计查询)") |
| | | public ServiceModel searchState(){ |
| | | User_inf uinf=(User_inf) ActionUtil.getUser(); |
| | | ServiceModel model = service.searchState(uinf); |
| | | public ServiceModelOnce searchState() { |
| | | User_inf uinf = (User_inf) ActionUtil.getUser(); |
| | | ServiceModelOnce model = service.searchState(uinf); |
| | | |
| | | return model; |
| | | } |
| | |
| | | /*原则: |
| | | *1.同机房(或设备)同一时间只能一组电池组放电 |
| | | *2.同机房(或设备)内电池组放电时间相隔至少3天*/ |
| | | @GetMapping("/judgePlan") |
| | | @PostMapping("/judgePlan") |
| | | @ApiOperation(notes = "原则:\n" + |
| | | "\t\t\t *1.同机房(或设备)同一时间只能一组电池组放电\n" + |
| | | "\t\t\t *2.同机房(或设备)内电池组放电时间相隔至少3天",value="批量添加作业计划/修改作业计划时时先检测计划的可行性") |
| | | public ServiceModel judgePlan(@RequestBody List<BattDischarge_plan> listAll){ |
| | | public ServiceModelOnce judgePlan(@RequestBody List<BattDischarge_plan> listAll){ |
| | | // List<BattDischarge_plan> listAll= getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken<List<BattDischarge_plan>>(){}.getType()); |
| | | ServiceModel model = service.judgePlan(listAll); |
| | | ServiceModelOnce model = service.judgePlan(listAll); |
| | | |
| | | return model; |
| | | |
| | |
| | | @Resource |
| | | private BattInfServices service; |
| | | |
| | | // private BattInf bif; |
| | | // private Batt_maintenance_inf bmaif; |
| | | // private Batttestdata_inf btdif; |
| | | // private User_inf uinf; |
| | | //private Battalarm_data bdata; |
| | | |
| | | //添加新的电池组 |
| | | @PostMapping("/") |
| | | @ApiOperation(notes = "",value="添加新的电池组") |
| | |
| | | |
| | | import com.fgkj.dto.BattDischarge_plan; |
| | | import com.fgkj.dto.BattMap_information; |
| | | import com.fgkj.dto.Batt_Maint_Dealarm; |
| | | import com.fgkj.dto.User_inf; |
| | | import com.fgkj.mapper.BattTestData; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.apache.ibatis.annotations.Insert; |
| | |
| | | public int del(BattDischarge_plan obj); |
| | | |
| | | //8.1批量添加作业计划时先检测计划的可行性 |
| | | public int judgePlan(Object obj); |
| | | @Select(" SELECT battgroupid FROM web_site.tb_battdischarge_plan " + |
| | | "WHERE discharge_starttime>=#{discharge_starttime1} and discharge_starttime<=#{discharge_stoptime1} AND discharge_cleartype=1 and discharge_state in(0,1) AND battgroupid " + |
| | | "in (select battgroupid FROM db_battinf.tb_battinf where stationname=#{note})") |
| | | public List<String> judgePlan(BattDischarge_plan obj); |
| | | |
| | | @Select("select num,battgroupid,discharge_starttime,discharge_stoptime,discharge_state,discharge_reason,discharge_cleartype,preset_time,preset_cap,preset_monvol,preset_groupvol,preset_curr,preset_mon,dcvolhighlimit,chargecurrset,note from web_site.tb_battdischarge_plan ") |
| | | public List<BattDischarge_plan> searchAll() ; |
| | |
| | | } |
| | | return list; |
| | | }*/ |
| | | public List serchByCondition(Object obj); |
| | | |
| | | |
| | | public List serchByCondition(Batt_Maint_Dealarm obj); |
| | | |
| | | //9.1查询机房放电计划中存在放电延时的总数 |
| | | //地图上所有的放电延时机房 |
| | |
| | | } |
| | | return nums; |
| | | }*/ |
| | | public int searchNums(Object obj) ; |
| | | |
| | | @Select("select count(num) as nums from web_site.tb_battdischarge_plan " + |
| | | "where discharge_state='${@com.fgkj.mapper.BattTestData@test_plan0}' and 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})") |
| | | public int searchNums(User_inf obj) ; |
| | | |
| | | //8.1放电计划管理中饼状图(放电计划统计查询) |
| | | /*public List searchState(){ |
| | |
| | | }); |
| | | return list; |
| | | }*/ |
| | | public List searchState(Object obj); |
| | | |
| | | |
| | | @Select("SELECT COUNT(num) num,discharge_state,battgroupid " + |
| | | "from web_site.tb_battdischarge_plan " + |
| | | "GROUP BY battgroupid,discharge_state " + |
| | | "having web_site.tb_battdischarge_plan.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})") |
| | | public List<BattDischarge_plan> searchState(User_inf obj); |
| | | |
| | | } |
| | |
| | | |
| | | return list; |
| | | }*/ |
| | | public List serchBattgroupinfo(Object obj); |
| | | |
| | | |
| | | @Select("select distinct db_battinf.tb_battinf.battgroupid,db_battinf.tb_battinf.stationid,StationName,StationName1,stationip,BattGroupName,BattGroupName1,battgroupnum,moncount,moncapstd,monvolstd,battproducer,battproductdate,battinusedate,groupIndexInFBSDevice " + |
| | | "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}") |
| | | public List<BattInf> serchBattgroupinfo(User_inf obj); |
| | | |
| | | //新版添加放电计划查询<排除设置过放电计划的电池组> |
| | | public List serchBattPlan(Object obj); |
| | | public List serchBattPlan(BattInf obj); |
| | | |
| | | //4.1根据维护区查询所有的电池组和对应的包机人(从模板创建) |
| | | public List serchByTemplate(Object obj); |
| | |
| | | import com.fgkj.mapper.BattTestData; |
| | | import com.fgkj.mapper.impl.BattDischarge_planMapper; |
| | | import com.fgkj.mapper.impl.BattInfMapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.jdbc.datasource.DataSourceTransactionManager; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | /*原则: |
| | | *1.同机房(或设备)同一时间只能一组电池组放电 |
| | | *2.同机房(或设备)内电池组放电时间相隔至少3天*/ |
| | | public ServiceModel judgePlan(Object obj){ |
| | | List<BattDischarge_plan> listAll=(List<BattDischarge_plan>) obj; |
| | | public ServiceModelOnce judgePlan(List<BattDischarge_plan> listAll){ |
| | | ServiceModelOnce model = new ServiceModelOnce(); |
| | | List<BattDischarge_plan> list = new ArrayList();//存放满足计划设定条件的可行计划 |
| | | if(listAll!=null&&listAll.size()>0){ |
| | | for(int i=0;i<listAll.size();i++){ |
| | | int flag=mapper.judgePlan(listAll.get(i)); |
| | | int flag=1; |
| | | List<String> strings = mapper.judgePlan(listAll.get(i)); |
| | | if (strings!=null&&strings.size()>0){ |
| | | flag=0; |
| | | }; |
| | | if(flag==1){//判断通过是否数据库存在同机房放电计划,满足条件 |
| | | if(list.size()>0){ |
| | | int judge=judgeList(listAll.get(i), list); |
| | |
| | | model.setCode(1); |
| | | model.setData(list); |
| | | //TODO perry |
| | | // model.setSum(list.size());//可以添加的总数 |
| | | model.setSum(list.size());//可以添加的总数 |
| | | }else{ |
| | | model.setCode(0); |
| | | //TODO perry |
| | | // model.setSum(0); |
| | | model.setSum(0); |
| | | } |
| | | //System.out.println(model); |
| | | return model; |
| | |
| | | } |
| | | |
| | | //8.1放电计划查询 |
| | | public ServiceModel serchByCondition(Object obj){ |
| | | List list=mapper.serchByCondition(obj); |
| | | if(list!=null&&list.size()>0){ |
| | | public ServiceModel serchByCondition(Batt_Maint_Dealarm bmd) { |
| | | ServiceModel model = new ServiceModel(); |
| | | PageBean pageBean = bmd.getPageBean(); |
| | | PageHelper.startPage(pageBean.getPageNum(),pageBean.getPageSize(),true); |
| | | List<Batt_Maint_Dealarm> list = mapper.serchByCondition(bmd); |
| | | if (list != null && list.size() > 0) { |
| | | PageInfo<Batt_Maint_Dealarm> pageInfo = new PageInfo<>(list); |
| | | model.setCode(1); |
| | | model.setMsg("查询成功!"); |
| | | model.setData(list); |
| | | }else{ |
| | | model.setData(pageInfo); |
| | | } else { |
| | | model.setCode(0); |
| | | model.setMsg("查询失败!"); |
| | | } |
| | | return model; |
| | | } |
| | | //8.1放电计划管理中查询 |
| | | public ServiceModel serchBattgroupinfo(Object obj){ |
| | | public ServiceModel serchBattgroupinfo(User_inf obj){ |
| | | ServiceModel model = new ServiceModel(); |
| | | List<BattInf> list=battInfMapper.serchBattgroupinfo(obj); |
| | | if(list!=null&&list.size()>0){ |
| | | model.setCode(1); |
| | |
| | | return model; |
| | | } |
| | | //新版添加放电计划查询<排除设置过放电计划的电池组> |
| | | public ServiceModel serchBattPlan(Object obj){ |
| | | public ServiceModel serchBattPlan(BattInf obj){ |
| | | ServiceModel model = new ServiceModel(); |
| | | List list=battInfMapper.serchBattPlan(obj); |
| | | if(list!=null&&list.size()>0){ |
| | | model.setCode(1); |
| | |
| | | return model; |
| | | } |
| | | //8.1查询未开始放电的放电计划总数 |
| | | public ServiceModel searchNums(Object obj) { |
| | | int nums= mapper.searchNums(obj); |
| | | //TODO perry |
| | | // model.setSum(nums); |
| | | public ServiceModelOnce searchNums(User_inf obj) { |
| | | ServiceModelOnce model = new ServiceModelOnce(); |
| | | int nums = mapper.searchNums(obj); |
| | | model.setSum(nums); |
| | | return model; |
| | | } |
| | | //8.1放电计划管理中饼状图(放电计划统计查询) |
| | |
| | | *Preset_monvol:放电进行中 |
| | | *Preset_groupvol:放电失败 |
| | | *num: 总数*/ |
| | | public ServiceModel searchState(Object obj){ |
| | | public ServiceModelOnce searchState(User_inf obj){ |
| | | ServiceModelOnce model = new ServiceModelOnce(); |
| | | List<BattDischarge_plan> list=mapper.searchState(obj); |
| | | BattDischarge_plan bplan=new BattDischarge_plan();//存放返回各种放电计划状态对应的值 |
| | | bplan.setBattIndexInFbs(0); |
| | |
| | | model.setData(bplan); |
| | | model.setMsg("查询成功!"); |
| | | //TODO perry |
| | | // model.setSum(sum);//总数 |
| | | model.setSum(sum);//总数 |
| | | }else{ |
| | | model.setCode(0); |
| | | model.setMsg("查询失败!"); |
| | |
| | | return model; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | /* public static void main(String[] args) { |
| | | BattDischarge_planService service = new BattDischarge_planService(); |
| | | User_inf uinf=new User_inf(); |
| | | uinf.setuId(1038); |
| | | service.serchBattgroupinfo(uinf); |
| | | } |
| | | }*/ |
| | | } |
| | |
| | | <?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.fgkj.mapper.impl.BattDischarge_planMapper" > |
| | | <resultMap id="BaseResultMap" type="Batt_Maint_Dealarm"> |
| | | <association property="binf" javaType="BattInf"> |
| | | <result column="stationName" property="stationName"></result> |
| | | <result column="stationName1" property="stationName1"></result> |
| | | <result column="battGroupName" property="battGroupName"></result> |
| | | <result column="monCapStd" property="monCapStd"></result> |
| | | <result column="load_curr" property="load_curr"></result> |
| | | </association> |
| | | <association property="bplan" javaType="BattDischarge_plan"> |
| | | <result column="num" property="num"></result> |
| | | <result column="battgroupid" property="battgroupid"></result> |
| | | <result column="battIndexInFbs" property="battIndexInFbs"></result> |
| | | <result column="discharge_starttime" property="discharge_starttime"></result> |
| | | <result column="discharge_stoptime" property="discharge_stoptime"></result> |
| | | <result column="discharge_state" property="discharge_state"></result> |
| | | <result column="discharge_reason" property="discharge_reason"></result> |
| | | <result column="discharge_cleartype" property="discharge_cleartype"></result> |
| | | <result column="battGroupName" property="note"></result> |
| | | <result column="preset_time" property="preset_time"></result> |
| | | <result column="preset_cap" property="preset_cap"></result> |
| | | <result column="preset_monvol" property="preset_monvol"></result> |
| | | <result column="preset_groupvol" property="preset_groupvol"></result> |
| | | <result column="preset_curr" property="preset_curr"></result> |
| | | <result column="preset_mon" property="preset_mon"></result> |
| | | <result column="dcvolhighlimit" property="dcvolhighlimit"></result> |
| | | <result column="chargecurrset" property="chargecurrset"></result> |
| | | <result column="plan_circle" property="plan_circle"></result> |
| | | <result column="plan_rate" property="plan_rate"></result> |
| | | </association> |
| | | |
| | | </resultMap> |
| | | <!-- |
| | | public List getResults(ResultSet rs) { |
| | | List list=new ArrayList(); |
| | |
| | | </foreach> |
| | | </update>--> |
| | | <!-- <delete id="del"></delete>--> |
| | | <select id="judgePlan" resultType="java.lang.Integer"></select> |
| | | <!-- <select id="judgePlan" resultType="java.lang.Integer"></select>--> |
| | | <!-- <select id="searchAll" resultType="java.util.List"></select>--> |
| | | <select id="serchByCondition" resultType="java.util.List"></select> |
| | | <select id="serchByCondition" resultMap="BaseResultMap"> |
| | | select distinct(tb_battdischarge_plan.battgroupid), |
| | | tb_battdischarge_plan.num, |
| | | tb_battdischarge_plan.battIndexInFbs, |
| | | tb_battdischarge_plan.discharge_starttime, |
| | | tb_battdischarge_plan.discharge_stoptime, |
| | | tb_battdischarge_plan.discharge_state, |
| | | tb_battdischarge_plan.discharge_reason, |
| | | tb_battdischarge_plan.discharge_cleartype, |
| | | tb_battdischarge_plan.note, |
| | | tb_battdischarge_plan.preset_time, |
| | | tb_battdischarge_plan.preset_cap, |
| | | tb_battdischarge_plan.preset_monvol, |
| | | tb_battdischarge_plan.preset_groupvol, |
| | | tb_battdischarge_plan.preset_curr, |
| | | tb_battdischarge_plan.preset_mon, |
| | | tb_battdischarge_plan.dcvolhighlimit, |
| | | tb_battdischarge_plan.chargecurrset, |
| | | plan_circle, |
| | | plan_rate, |
| | | db_battinf.tb_battinf.stationname1, |
| | | db_battinf.tb_battinf.stationname, |
| | | db_battinf.tb_battinf.battGroupName, |
| | | db_battinf.tb_battinf.MonCapStd, |
| | | db_battinf.tb_battinf.load_curr |
| | | from web_site.tb_battdischarge_plan |
| | | left outer join db_battinf.tb_battinf on |
| | | tb_battdischarge_plan.battgroupid = db_battinf.tb_battinf.battgroupid |
| | | where tb_battdischarge_plan.discharge_starttime >= #{bplan.discharge_starttime} |
| | | and tb_battdischarge_plan.discharge_starttime <![CDATA[<=]]> #{bplan.discharge_starttime1} |
| | | <if test="bplan.discharge_state==-1">and tb_battdischarge_plan.discharge_state!=#{bplan.discharge_state}</if> |
| | | <if test="bplan.discharge_state!=-1">and tb_battdischarge_plan.discharge_state=#{bplan.discharge_state}</if> |
| | | <if test="binf.battGroupId!=0">and db_battinf.tb_battinf.battgroupid=#{binf.battGroupId}</if> |
| | | <if test="binf.battGroupId==0">and db_battinf.tb_battinf.battgroupid!=#{binf.battGroupId}</if> |
| | | and tb_battdischarge_plan.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.stationname1 like '%${binf.stationname}%' and db_battinf.tb_battinf.stationname like |
| | | '%${binf.stationname1}%') |
| | | order by tb_battdischarge_plan.discharge_starttime desc |
| | | </select> |
| | | <!-- <select id="serchByStationId" resultType="java.lang.Integer"></select>--> |
| | | <select id="serchBystationName3" resultType="java.lang.Integer"></select> |
| | | <select id="searchNums" resultType="java.lang.Integer"></select> |
| | | <select id="searchState" resultType="java.util.List"></select> |
| | | <!-- <select id="searchNums" resultType="java.lang.Integer"></select>--> |
| | | <!-- <select id="searchState" resultType="java.util.List"></select>--> |
| | | </mapper> |
| | |
| | | <result column="fbsdeviceid" property="fbsDeviceId"></result> |
| | | |
| | | </resultMap> |
| | | |
| | | <resultMap id="BaseResultMap3" type="BattInf"> |
| | | <result column="stationName" property="stationName"></result> |
| | | <result column="stationid" property="stationId"></result> |
| | | <result column="fbsdeviceid" property="fbsDeviceId"></result> |
| | | |
| | | <association property="fparam" javaType="Fbs9100_setparam"> |
| | | <result column="HourRate" property="hourRate"></result> |
| | | <result column="DisCurr" property="disCurr"></result> |
| | | <result column="DisCap" property="disCap"></result> |
| | | <result column="DisTime" property="disTime"></result> |
| | | <result column="groupVol_Low" property="groupVol_Low"></result> |
| | | <result column="monomerVol_Low" property="monomerVol_Low"></result> |
| | | <result column="monomerLowCount" property="monomerLowCount"></result> |
| | | <result column="battGroupNum" property="battGroupNum"></result> |
| | | <result column="onlineVolLowAction" property="onlineLowAction"></result> |
| | | <result column="dCVolHighLimit" property="dCVolHighLimit"></result> |
| | | <result column="chargeCurrSet" property="chargeCurrSet"></result> |
| | | |
| | | |
| | | </association> |
| | | </resultMap> |
| | | <!-- |
| | | //添加新的电池组(多个) |
| | | public boolean add(Object obj) { |
| | |
| | | order by StationName1 asc,db_battinf.tb_battinf.BattgroupId asc,test_starttime asc |
| | | </select> |
| | | <select id="serchBattgroupinfo1" resultType="java.util.List"></select> |
| | | <select id="serchBattgroupinfo" resultType="java.util.List"></select> |
| | | <select id="serchBattPlan" resultType="java.util.List"></select> |
| | | <!-- <select id="serchBattgroupinfo" resultType="java.util.List"></select>--> |
| | | |
| | | <select id="serchBattPlan" resultMap="BaseResultMap3"> |
| | | select distinct db_battinf.tb_battinf.battgroupid, |
| | | db_battinf.tb_battinf.stationid, |
| | | FBSDeviceId, |
| | | StationName, |
| | | StationName1, |
| | | stationip, |
| | | BattGroupName, |
| | | BattGroupName1, |
| | | db_battinf.tb_battinf.battgroupnum, |
| | | moncount, |
| | | moncapstd, |
| | | monvolstd, |
| | | battproducer, |
| | | battproductdate, |
| | | battinusedate, |
| | | groupIndexInFBSDevice, |
| | | load_curr, |
| | | tb_fbs9100_setparam.HourRate, |
| | | DisCurr, |
| | | DisCap, |
| | | DisTime, |
| | | groupVol_Low, |
| | | monomerVol_Low, |
| | | monomerLowCount, |
| | | tb_fbs9100_setparam.battGroupNum as battGroupNum, |
| | | onlineVolLowAction, |
| | | dCVolHighLimit, |
| | | chargeCurrSet |
| | | from db_battinf.tb_battinf, |
| | | db_ram_db.tb_fbs9100_setparam |
| | | |
| | | |
| | | </select> |
| | | |
| | | <select id="serchByTemplate" resultType="java.util.List"></select> |
| | | <select id="serchBattNotInTask" resultType="java.util.List"></select> |
| | | <select id="serchByInfo" resultType="java.util.List"></select> |