| | |
| | | //电池配组管理(重要)
|
| | | public String serchMakeGroup(){
|
| | | BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
|
| | | User_inf uinf=(User_inf) getUser();
|
| | | binf.setNum(uinf.getUId());
|
| | | ServiceModel model = service.serchMakeGroup(binf);
|
| | | result = ActionUtil.tojson(model);
|
| | | return SUCCESS;
|
| | |
| | | //电池配组管理(重要)
|
| | | public String serchGroupByInfor(){
|
| | | BattInf binf=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, BattInf.class);
|
| | | User_inf uinf=(User_inf) getUser();
|
| | | binf.setNum(uinf.getUId());
|
| | | ServiceModel model = service.serchGroupByInfor(binf);
|
| | | result = ActionUtil.tojson(model);
|
| | | return SUCCESS;
|
| | |
| | |
|
| | | import com.fgkj.dto.Batt_endurance;
|
| | | import com.fgkj.dto.ServiceModel;
|
| | | import com.fgkj.dto.User_inf;
|
| | | import com.fgkj.services.Batt_enduranceService;
|
| | |
|
| | | public class Batt_enduranceAction extends ActionUtil{
|
| | |
| | | //续航时间的查询
|
| | | public String serchByCondition() {
|
| | | Batt_endurance bendurance=getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Batt_endurance.class);
|
| | | User_inf uinf=(User_inf) getUser();
|
| | | bendurance.setNum(uinf.getUId());
|
| | | ServiceModel model=service.serchByCondition(bendurance);
|
| | | result=tojson(model);
|
| | | return SUCCESS;
|
| | |
| | | " left outer join (select * from db_battinf.tb_battinf_rebuild where tb_battinf_rebuild.rebuild_clear_type=1 ) as battinf_re " +
|
| | | " on BattGroupId=battinf_re.new_battgroupid or BattGroupId=battinf_re.old_battgroupid " +
|
| | | " where stationname2 like ? ";
|
| | | //用户管理
|
| | | String userSql=" and StationId in(" +
|
| | | " select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id and db_user.tb_user_battgroup_baojigroup_usr.uId=?" +
|
| | | " ) ";
|
| | | sql+=userSql;
|
| | | //选中品牌一致
|
| | | String producerSqlT=" order by BattProducer,MonCapStd,MonVolStd,BattGroupId ";//一致
|
| | | String producerSqlF=" order by MonCapStd,MonVolStd,BattGroupId ";//不一致
|
| | |
| | | }else{
|
| | | sql+=producerSqlF;
|
| | | }
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName2()+"%"}, new CallBack() {
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName2()+"%",binf.getNum()}, new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | | List<BattInf> list=new ArrayList();
|
| | |
| | | " left outer join (select * from db_battinf.tb_battinf_rebuild where tb_battinf_rebuild.rebuild_clear_type=1 ) as battinf_re " +
|
| | | " on BattGroupId=battinf_re.new_battgroupid or BattGroupId=battinf_re.old_battgroupid " +
|
| | | " where stationname1 like ? and stationname2 like ? and stationname3 like ? and battgroupname like ? and battgroupid=? ";
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getBattGroupName()+"%",binf.getBattGroupId()}, new CallBack() {
|
| | | //用户管理
|
| | | String userSql=" and StationId in(" +
|
| | | " select distinct db_user.tb_user_battgroup_baojigroup_battgroup.StationId from db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id and db_user.tb_user_battgroup_baojigroup_usr.uId=?" +
|
| | | " ) ";
|
| | | sql+=userSql;
|
| | | List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{"%"+binf.getStationName1()+"%","%"+binf.getStationName2()+"%","%"+binf.getStationName3()+"%","%"+binf.getBattGroupName()+"%",binf.getBattGroupId(),binf.getNum()}, new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | | List<BattInf> list=new ArrayList();
|
| | |
| | |
|
| | | BattInfImpl biml = new BattInfImpl();
|
| | | BattInf binf = new BattInf();
|
| | | binf.setNum(1002);
|
| | | binf.setBattGroupId(1000001);
|
| | | binf.setStationName("");
|
| | | binf.setStationName1("");
|
| | | binf.setStationName2("");
|
| | | binf.setStationName3("武汉源暢实验室1");
|
| | | binf.setStationName3("");
|
| | | binf.setBattGroupName("");
|
| | | binf.setBattProducer("1");
|
| | | User_inf uinf=new User_inf();
|
| | |
| | | //List<BattInf> list = biml.serchByConditionNew(bmd);
|
| | | //List<BattInf> list=biml.serchByTestType(bmd);
|
| | | //List<BattInf> list=biml.serchGroupAssess(bmd);
|
| | | //List<BattInf> list=biml.serchMakeGroup(binf);
|
| | | List<BattInf> list=biml.serchGroupByInfor(binf);
|
| | | List<BattInf> list=biml.serchMakeGroup(binf);
|
| | | //List<BattInf> list=biml.serchGroupByInfor(binf);
|
| | | for (BattInf b : list) {
|
| | | System.out.println(b);
|
| | | }
|
| | |
| | | String sql="select SQL_CALC_FOUND_ROWS distinct tb_batt_endurance.num,tb_batt_endurance.deviceid,tb_batt_endurance.stationid,real_cap,tb_batt_endurance.moncapstd,real_curr,endurance_theory_timelong,endurance_actual_timelong,is_out_stand " +
|
| | | ",db_battinf.tb_battinf.StationName,db_battinf.tb_battinf.StationName1,db_battinf.tb_battinf.StationName2 " +
|
| | | " from web_site.tb_batt_endurance,db_battinf.tb_battinf " +
|
| | | " where tb_batt_endurance.stationid=db_battinf.tb_battinf.stationid " ;
|
| | | " where tb_batt_endurance.stationid=db_battinf.tb_battinf.stationid "+
|
| | | " and tb_batt_endurance.stationid in (" +
|
| | | " select distinct db_battinf.tb_battinf.stationid " +
|
| | | " from db_battinf.tb_battinf " +
|
| | | " left outer join db_user.tb_user_battgroup_baojigroup_battgroup on db_user.tb_user_battgroup_baojigroup_battgroup.stationid=db_battinf.tb_battinf.stationid " +
|
| | | " left outer join db_user.tb_user_battgroup_baojigroup_usr on db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id=db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id " +
|
| | | " left outer join db_user.tb_user_inf on tb_user_inf.uid=db_user.tb_user_battgroup_baojigroup_usr.uid " +
|
| | | " where db_user.tb_user_inf.uid=? ) " ;
|
| | | //机房筛选
|
| | | String stationSql=" and db_battinf.tb_battinf.StationName like ? and db_battinf.tb_battinf.StationName1 like ? and db_battinf.tb_battinf.StationName2 like ?";
|
| | | sql+=stationSql;
|
| | |
| | |
|
| | |
|
| | | //System.out.println(sql);
|
| | | List<Batt_endurance> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{"%"+bendurance.getStationName()+"%","%"+bendurance.getStationName1()+"%","%"+bendurance.getStationName2()+"%",bendurance.getEndurance_actual_timelong(),bendurance.getIs_out_stand()
|
| | | List<Batt_endurance> list=DAOHelper.executeQueryLimit(sql, conn, new Object[]{bendurance.getNum(),"%"+bendurance.getStationName()+"%","%"+bendurance.getStationName1()+"%","%"+bendurance.getStationName2()+"%",bendurance.getEndurance_actual_timelong(),bendurance.getIs_out_stand()
|
| | | ,(page.getPageCurr()-1)*page.getPageSize(),page.getPageSize()}, new CallBack() {
|
| | |
|
| | | public List getResults(ResultSet rs) {
|
| | |
| | | public static void main(String[] args) {
|
| | | Batt_enduranceImpl bimpl=new Batt_enduranceImpl();
|
| | | Batt_endurance ben=new Batt_endurance();
|
| | | ben.setNum(1002);
|
| | | ben.setStationName("");
|
| | | ben.setStationName1("");
|
| | | ben.setStationName2("");
|