DyEnvir_system/src/com/fgkj/actions/CsvFileDownloadAction.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DyEnvir_system/src/com/fgkj/actions/partinsystem/Propulsion_motorAction.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DyEnvir_system/src/com/fgkj/dao/BaseDAO.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DyEnvir_system/src/com/fgkj/dao/BaseDAOFactory.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DyEnvir_system/src/com/fgkj/partinsystem/dto/Propulsion_motor.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DyEnvir_system/src/com/fgkj/partinsystem/impl/Propulsion_motorImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DyEnvir_system/src/com/fgkj/partinsystem/service/Propulsion_motorService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
DyEnvir_system/src/com/fgkj/actions/CsvFileDownloadAction.java
@@ -30,6 +30,7 @@ import com.fgkj.partinsystem.dto.Dc25v_batt; import com.fgkj.partinsystem.dto.Electrical_monitor_station; import com.fgkj.partinsystem.dto.Inverter_ele; import com.fgkj.partinsystem.dto.Propulsion_motor; import com.fgkj.partinsystem.dto.Reliable_board; import com.fgkj.partinsystem.dto.Switch_board; import com.fgkj.partinsystem.impl.Ac230v_upsImpl; @@ -39,6 +40,7 @@ import com.fgkj.partinsystem.impl.Dc25v_battImpl; import com.fgkj.partinsystem.impl.Electrical_monitor_stationImpl; import com.fgkj.partinsystem.impl.Inverter_eleImpl; import com.fgkj.partinsystem.impl.Propulsion_motorImpl; import com.fgkj.partinsystem.impl.Reliable_boardImpl; import com.fgkj.partinsystem.impl.Switch_boardImpl; import com.fgkj.services.ServiceModel; @@ -327,8 +329,13 @@ }else if(cs.getExport_num()==12){ }else if(cs.getExport_num()==13){ }else if(cs.getExport_num()==13){ //推进电机 Propulsion_motor pm=new Propulsion_motor(); pm.setDev_id(cs.getDev_id()); pm.setRecord_time(cs.getRecord_time()); pm.setRecord_time1(cs.getRecord_time1()); pm.setNote(cs.getTablists()); exportData=(new Propulsion_motorImpl()).serchCSV(pm); }else if(cs.getExport_num()==14){ //蓄电池充电与监测装置 Battery_monitor bm=new Battery_monitor(); bm.setDev_id(cs.getDev_id()); DyEnvir_system/src/com/fgkj/actions/partinsystem/Propulsion_motorAction.java
New file @@ -0,0 +1,44 @@ package com.fgkj.actions.partinsystem; import com.fgkj.actions.ActionUtil; import com.fgkj.partinsystem.dto.Propulsion_motor; import com.fgkj.partinsystem.service.Propulsion_motorService; import com.fgkj.services.ServiceModel; public class Propulsion_motorAction extends ActionUtil{ private Propulsion_motorService service=new Propulsion_motorService(); private String json; private String result; //根据参试设备id查询设备的实时数据 public String serchByCondition() { Propulsion_motor ac=ActionUtil.getGson(ActionUtil.time_yyyyMMddHHmmss).fromJson(json, Propulsion_motor.class); ServiceModel model=service.serchByCondition(ac); result=tojson(model); return SUCCESS; } //设备实时数据显示(前100笔数据服务器的时间) public String serchByInfo() { Propulsion_motor ac=ActionUtil.getGson(ActionUtil.time_yyyyMMddHHmmss).fromJson(json, Propulsion_motor.class); ServiceModel model=service.serchByInfo(ac); result=tojson(model); return SUCCESS; } //设备历史数据查询 public String serchHistory() { Propulsion_motor ac=ActionUtil.getGson(ActionUtil.time_yyyyMMddHHmmss).fromJson(json, Propulsion_motor.class); ServiceModel model=service.serchHistory(ac); result=tojson(model); return SUCCESS; } public String getResult() { return result; } public void setJson(String json) { this.json = json; } } DyEnvir_system/src/com/fgkj/dao/BaseDAO.java
@@ -121,6 +121,7 @@ public static final int RELIABLE_BOARD=64; public static final int BATTERY_MONITOR=65; public static final int SWITCH_BOARD=66; public static final int PROPULSION_MOTOR=67; public boolean add(Object obj); // 添加 DyEnvir_system/src/com/fgkj/dao/BaseDAOFactory.java
@@ -61,6 +61,7 @@ import com.fgkj.partinsystem.impl.Inverter_eleImpl; import com.fgkj.partinsystem.impl.Medvoldc_converterImpl; import com.fgkj.partinsystem.impl.Partinsystem_infImpl; import com.fgkj.partinsystem.impl.Propulsion_motorImpl; import com.fgkj.partinsystem.impl.Reliable_boardImpl; import com.fgkj.partinsystem.impl.Switch_boardImpl; import com.fgkj.tmphum.impl.Tmphum_rtImpl; @@ -150,6 +151,7 @@ case 64:return new Reliable_boardImpl(); case 65:return new Battery_monitorImpl(); case 66:return new Switch_boardImpl(); case 67:return new Propulsion_motorImpl(); default :return null; } } DyEnvir_system/src/com/fgkj/partinsystem/dto/Propulsion_motor.java
New file @@ -0,0 +1,566 @@ package com.fgkj.partinsystem.dto; import java.io.Serializable; import java.util.Date; public class Propulsion_motor implements Serializable{ private int num ;// '主键', private int dev_id ;// '设备id', private Date record_time ;//'记录时间', private Date record_time1 ;//'记录时间', private float propu_rotate ;//'推进电机转速', private float propu_rotate_give ;//'机组自动工况给定转速', private float branch1_power ;//'支路1功率', private float branch2_power ;//'支路2功率', private float sum_power ;//'总功率', private float branch1_vol_in ;//'支路1输入电压', private float branch1_vol_dcbus ;//'支路1直流母线电压', private float branch1_curr_in ;//'支路1输入电流', private float branch2_vol_in ;//'支路2输入电压', private float branch2_vol_dcbus ;//'支路2直流母线电压', private float branch2_curr_in ;//'支路2输入电流', private float weaver_rotate ;// '待并机转速', private float coolwater_inletpress ;//'冷却水进口压力', private float coolwater_outletpress ;//'冷却水出口压力', private float coolwater_inlettmp ;//'冷却水进水温度', private int branch1_state ;//'支路1状态[0停机;1待机;2运行;4报警;8故障]', private int branch2_state ;//'支路2状态[0停机;1待机;2运行;4报警;8故障]', private int ac380v_state ;//'AC380V电源状态', private int dc220v_state ;//'DC220V电源状态', private int branch1_overcurr_alm ;//'支路1过流报警', private int branch1_undervol_alm ;//'支路1欠压报警', private int branch1_breakerunclosed_alm ;//'支路1主断路器未闭合报警', private int branch1_ptmalm ;//'支路1PTM位置板报警', private int branch1_overcurr_fault ;//'支路1过流故障', private int branch1_overvol_fault ;//'支路1过压故障', private int branch1_charge_fault ;//'支路1预充电故障', private int branch1_hardware_fault ;//'支路1硬件故障', private int branch1_ptmfault ;//'支路1位置板故障', private int branch1_connfault ;//'支路1通讯故障', private int branch1_downtime_fault ;//'支路1外围停机故障', private int branch1_overinvol_fault ;//'支路1输入电压过压故障', private int branch1_overincurr_fault ;// '支路1输入电流过流故障', private int branch1_overtmp_fault ;//'支路1过温故障', private int branch2_overcurr_alm ;//'支路2过流报警', private int branch2_undervol_alm ;//'支路2欠压告警', private int branch2_breakerunclosed_alm ;//'支路2主断路器未闭合报警', private int branch2_ptmalm ;//'支路2PTM位置板报警', private int branch2_overcurr_fault ;//'支路2过流故障', private int branch2_overvol_fault ;//'支路2过压故障', private int branch2_charge_fault ;//'支路2预充电故障', private int branch2_hardware_fault ;//'支路2硬件故障', private int branch2_ptmfault ;//'支路2PTM位置板故障', private int branch2_connfault ;//'支路2通讯故障', private int branch2_downtime_fault ;//'支路2外围停机故障', private int branch2_overinvol_fault ;//'支路2输入电压过压故障', private int branch2_overincurr_fault ;//'支路2输入电流过流故障', private int branch2_overtmp_fault ;//'支路2过温故障', private int winding_overtmp_alm ;//'电机绕组过温报警', private int motor_overtmp_alm ;//'电机端空气过温报警', private int bear_bush_overtmp_alm ;//'轴瓦过温报警', private int winding_overtmp_fault ;//'绕组过温故障', private int motor_overtmp_fault ;//'电机端空气过温故障', private int bear_bush_overtmp_fault ;//'轴瓦过温故障', private int motor_speed_fault ;//'电机超速故障', private int motor_water_alm ;//'电机积水报警', private int motor_inwater_press_alm ;//'进水压力报警', private int water_press_diff_alm ;//'水压差报警', private int inwater_overtmp_alm ;//, private int motor_inwater_press_fault ;//'电机进水压力故障', private int water_press_diff_fault ;//'水压差故障', private int inwater_overtmp_fault ;//'进水过温故障', private int motor_powerfall_state ;//'推进电机处于降功率状态', private int motor_default_gear_start ;//'推进电机不在默认档位启动', private int motor_powerlimit_state ;//'电机处于限功率状态', private int motor_merge_state ;//'电机处于并车状态', private String note; public int getNum() { return num; } public void setNum(int num) { this.num = num; } public int getDev_id() { return dev_id; } public void setDev_id(int dev_id) { this.dev_id = dev_id; } public Date getRecord_time() { return record_time; } public void setRecord_time(Date record_time) { this.record_time = record_time; } public float getPropu_rotate() { return propu_rotate; } public void setPropu_rotate(float propu_rotate) { this.propu_rotate = propu_rotate; } public float getPropu_rotate_give() { return propu_rotate_give; } public void setPropu_rotate_give(float propu_rotate_give) { this.propu_rotate_give = propu_rotate_give; } public float getBranch1_power() { return branch1_power; } public void setBranch1_power(float branch1_power) { this.branch1_power = branch1_power; } public float getBranch2_power() { return branch2_power; } public void setBranch2_power(float branch2_power) { this.branch2_power = branch2_power; } public float getSum_power() { return sum_power; } public void setSum_power(float sum_power) { this.sum_power = sum_power; } public float getBranch1_vol_in() { return branch1_vol_in; } public void setBranch1_vol_in(float branch1_vol_in) { this.branch1_vol_in = branch1_vol_in; } public float getBranch1_vol_dcbus() { return branch1_vol_dcbus; } public void setBranch1_vol_dcbus(float branch1_vol_dcbus) { this.branch1_vol_dcbus = branch1_vol_dcbus; } public float getBranch1_curr_in() { return branch1_curr_in; } public void setBranch1_curr_in(float branch1_curr_in) { this.branch1_curr_in = branch1_curr_in; } public float getBranch2_vol_in() { return branch2_vol_in; } public void setBranch2_vol_in(float branch2_vol_in) { this.branch2_vol_in = branch2_vol_in; } public float getBranch2_vol_dcbus() { return branch2_vol_dcbus; } public void setBranch2_vol_dcbus(float branch2_vol_dcbus) { this.branch2_vol_dcbus = branch2_vol_dcbus; } public float getBranch2_curr_in() { return branch2_curr_in; } public void setBranch2_curr_in(float branch2_curr_in) { this.branch2_curr_in = branch2_curr_in; } public float getWeaver_rotate() { return weaver_rotate; } public void setWeaver_rotate(float weaver_rotate) { this.weaver_rotate = weaver_rotate; } public float getCoolwater_inletpress() { return coolwater_inletpress; } public void setCoolwater_inletpress(float coolwater_inletpress) { this.coolwater_inletpress = coolwater_inletpress; } public float getCoolwater_outletpress() { return coolwater_outletpress; } public void setCoolwater_outletpress(float coolwater_outletpress) { this.coolwater_outletpress = coolwater_outletpress; } public float getCoolwater_inlettmp() { return coolwater_inlettmp; } public void setCoolwater_inlettmp(float coolwater_inlettmp) { this.coolwater_inlettmp = coolwater_inlettmp; } public int getBranch1_state() { return branch1_state; } public void setBranch1_state(int branch1_state) { this.branch1_state = branch1_state; } public int getBranch2_state() { return branch2_state; } public void setBranch2_state(int branch2_state) { this.branch2_state = branch2_state; } public int getAc380v_state() { return ac380v_state; } public void setAc380v_state(int ac380v_state) { this.ac380v_state = ac380v_state; } public int getDc220v_state() { return dc220v_state; } public void setDc220v_state(int dc220v_state) { this.dc220v_state = dc220v_state; } public int getBranch1_overcurr_alm() { return branch1_overcurr_alm; } public void setBranch1_overcurr_alm(int branch1_overcurr_alm) { this.branch1_overcurr_alm = branch1_overcurr_alm; } public int getBranch1_undervol_alm() { return branch1_undervol_alm; } public void setBranch1_undervol_alm(int branch1_undervol_alm) { this.branch1_undervol_alm = branch1_undervol_alm; } public int getBranch1_breakerunclosed_alm() { return branch1_breakerunclosed_alm; } public void setBranch1_breakerunclosed_alm(int branch1_breakerunclosed_alm) { this.branch1_breakerunclosed_alm = branch1_breakerunclosed_alm; } public int getBranch1_ptmalm() { return branch1_ptmalm; } public void setBranch1_ptmalm(int branch1_ptmalm) { this.branch1_ptmalm = branch1_ptmalm; } public int getBranch1_overcurr_fault() { return branch1_overcurr_fault; } public void setBranch1_overcurr_fault(int branch1_overcurr_fault) { this.branch1_overcurr_fault = branch1_overcurr_fault; } public int getBranch1_overvol_fault() { return branch1_overvol_fault; } public void setBranch1_overvol_fault(int branch1_overvol_fault) { this.branch1_overvol_fault = branch1_overvol_fault; } public int getBranch1_charge_fault() { return branch1_charge_fault; } public void setBranch1_charge_fault(int branch1_charge_fault) { this.branch1_charge_fault = branch1_charge_fault; } public int getBranch1_hardware_fault() { return branch1_hardware_fault; } public void setBranch1_hardware_fault(int branch1_hardware_fault) { this.branch1_hardware_fault = branch1_hardware_fault; } public int getBranch1_ptmfault() { return branch1_ptmfault; } public void setBranch1_ptmfault(int branch1_ptmfault) { this.branch1_ptmfault = branch1_ptmfault; } public int getBranch1_connfault() { return branch1_connfault; } public void setBranch1_connfault(int branch1_connfault) { this.branch1_connfault = branch1_connfault; } public int getBranch1_downtime_fault() { return branch1_downtime_fault; } public void setBranch1_downtime_fault(int branch1_downtime_fault) { this.branch1_downtime_fault = branch1_downtime_fault; } public int getBranch1_overinvol_fault() { return branch1_overinvol_fault; } public void setBranch1_overinvol_fault(int branch1_overinvol_fault) { this.branch1_overinvol_fault = branch1_overinvol_fault; } public int getBranch1_overincurr_fault() { return branch1_overincurr_fault; } public void setBranch1_overincurr_fault(int branch1_overincurr_fault) { this.branch1_overincurr_fault = branch1_overincurr_fault; } public int getBranch1_overtmp_fault() { return branch1_overtmp_fault; } public void setBranch1_overtmp_fault(int branch1_overtmp_fault) { this.branch1_overtmp_fault = branch1_overtmp_fault; } public int getBranch2_overcurr_alm() { return branch2_overcurr_alm; } public void setBranch2_overcurr_alm(int branch2_overcurr_alm) { this.branch2_overcurr_alm = branch2_overcurr_alm; } public int getBranch2_undervol_alm() { return branch2_undervol_alm; } public void setBranch2_undervol_alm(int branch2_undervol_alm) { this.branch2_undervol_alm = branch2_undervol_alm; } public int getBranch2_breakerunclosed_alm() { return branch2_breakerunclosed_alm; } public void setBranch2_breakerunclosed_alm(int branch2_breakerunclosed_alm) { this.branch2_breakerunclosed_alm = branch2_breakerunclosed_alm; } public int getBranch2_ptmalm() { return branch2_ptmalm; } public void setBranch2_ptmalm(int branch2_ptmalm) { this.branch2_ptmalm = branch2_ptmalm; } public int getBranch2_overcurr_fault() { return branch2_overcurr_fault; } public void setBranch2_overcurr_fault(int branch2_overcurr_fault) { this.branch2_overcurr_fault = branch2_overcurr_fault; } public int getBranch2_overvol_fault() { return branch2_overvol_fault; } public void setBranch2_overvol_fault(int branch2_overvol_fault) { this.branch2_overvol_fault = branch2_overvol_fault; } public int getBranch2_charge_fault() { return branch2_charge_fault; } public void setBranch2_charge_fault(int branch2_charge_fault) { this.branch2_charge_fault = branch2_charge_fault; } public int getBranch2_hardware_fault() { return branch2_hardware_fault; } public void setBranch2_hardware_fault(int branch2_hardware_fault) { this.branch2_hardware_fault = branch2_hardware_fault; } public int getBranch2_ptmfault() { return branch2_ptmfault; } public void setBranch2_ptmfault(int branch2_ptmfault) { this.branch2_ptmfault = branch2_ptmfault; } public int getBranch2_connfault() { return branch2_connfault; } public void setBranch2_connfault(int branch2_connfault) { this.branch2_connfault = branch2_connfault; } public int getBranch2_downtime_fault() { return branch2_downtime_fault; } public void setBranch2_downtime_fault(int branch2_downtime_fault) { this.branch2_downtime_fault = branch2_downtime_fault; } public int getBranch2_overinvol_fault() { return branch2_overinvol_fault; } public void setBranch2_overinvol_fault(int branch2_overinvol_fault) { this.branch2_overinvol_fault = branch2_overinvol_fault; } public int getBranch2_overincurr_fault() { return branch2_overincurr_fault; } public void setBranch2_overincurr_fault(int branch2_overincurr_fault) { this.branch2_overincurr_fault = branch2_overincurr_fault; } public int getBranch2_overtmp_fault() { return branch2_overtmp_fault; } public void setBranch2_overtmp_fault(int branch2_overtmp_fault) { this.branch2_overtmp_fault = branch2_overtmp_fault; } public int getWinding_overtmp_alm() { return winding_overtmp_alm; } public void setWinding_overtmp_alm(int winding_overtmp_alm) { this.winding_overtmp_alm = winding_overtmp_alm; } public int getMotor_overtmp_alm() { return motor_overtmp_alm; } public void setMotor_overtmp_alm(int motor_overtmp_alm) { this.motor_overtmp_alm = motor_overtmp_alm; } public int getBear_bush_overtmp_alm() { return bear_bush_overtmp_alm; } public void setBear_bush_overtmp_alm(int bear_bush_overtmp_alm) { this.bear_bush_overtmp_alm = bear_bush_overtmp_alm; } public int getWinding_overtmp_fault() { return winding_overtmp_fault; } public void setWinding_overtmp_fault(int winding_overtmp_fault) { this.winding_overtmp_fault = winding_overtmp_fault; } public int getMotor_overtmp_fault() { return motor_overtmp_fault; } public void setMotor_overtmp_fault(int motor_overtmp_fault) { this.motor_overtmp_fault = motor_overtmp_fault; } public int getBear_bush_overtmp_fault() { return bear_bush_overtmp_fault; } public void setBear_bush_overtmp_fault(int bear_bush_overtmp_fault) { this.bear_bush_overtmp_fault = bear_bush_overtmp_fault; } public int getMotor_speed_fault() { return motor_speed_fault; } public void setMotor_speed_fault(int motor_speed_fault) { this.motor_speed_fault = motor_speed_fault; } public int getMotor_water_alm() { return motor_water_alm; } public void setMotor_water_alm(int motor_water_alm) { this.motor_water_alm = motor_water_alm; } public int getMotor_inwater_press_alm() { return motor_inwater_press_alm; } public void setMotor_inwater_press_alm(int motor_inwater_press_alm) { this.motor_inwater_press_alm = motor_inwater_press_alm; } public int getWater_press_diff_alm() { return water_press_diff_alm; } public void setWater_press_diff_alm(int water_press_diff_alm) { this.water_press_diff_alm = water_press_diff_alm; } public int getInwater_overtmp_alm() { return inwater_overtmp_alm; } public void setInwater_overtmp_alm(int inwater_overtmp_alm) { this.inwater_overtmp_alm = inwater_overtmp_alm; } public int getMotor_inwater_press_fault() { return motor_inwater_press_fault; } public void setMotor_inwater_press_fault(int motor_inwater_press_fault) { this.motor_inwater_press_fault = motor_inwater_press_fault; } public int getWater_press_diff_fault() { return water_press_diff_fault; } public void setWater_press_diff_fault(int water_press_diff_fault) { this.water_press_diff_fault = water_press_diff_fault; } public int getInwater_overtmp_fault() { return inwater_overtmp_fault; } public void setInwater_overtmp_fault(int inwater_overtmp_fault) { this.inwater_overtmp_fault = inwater_overtmp_fault; } public int getMotor_powerfall_state() { return motor_powerfall_state; } public void setMotor_powerfall_state(int motor_powerfall_state) { this.motor_powerfall_state = motor_powerfall_state; } public int getMotor_default_gear_start() { return motor_default_gear_start; } public void setMotor_default_gear_start(int motor_default_gear_start) { this.motor_default_gear_start = motor_default_gear_start; } public int getMotor_powerlimit_state() { return motor_powerlimit_state; } public void setMotor_powerlimit_state(int motor_powerlimit_state) { this.motor_powerlimit_state = motor_powerlimit_state; } public int getMotor_merge_state() { return motor_merge_state; } public void setMotor_merge_state(int motor_merge_state) { this.motor_merge_state = motor_merge_state; } public String getNote() { return note; } public void setNote(String note) { this.note = note; } public Date getRecord_time1() { return record_time1; } public void setRecord_time1(Date record_time1) { this.record_time1 = record_time1; } @Override public String toString() { return "Propulsion_motor [num=" + num + ", dev_id=" + dev_id + ", record_time=" + record_time + ", record_time1=" + record_time1 + ", propu_rotate=" + propu_rotate + ", propu_rotate_give=" + propu_rotate_give + ", branch1_power=" + branch1_power + ", branch2_power=" + branch2_power + ", sum_power=" + sum_power + ", branch1_vol_in=" + branch1_vol_in + ", branch1_vol_dcbus=" + branch1_vol_dcbus + ", branch1_curr_in=" + branch1_curr_in + ", branch2_vol_in=" + branch2_vol_in + ", branch2_vol_dcbus=" + branch2_vol_dcbus + ", branch2_curr_in=" + branch2_curr_in + ", weaver_rotate=" + weaver_rotate + ", coolwater_inletpress=" + coolwater_inletpress + ", coolwater_outletpress=" + coolwater_outletpress + ", coolwater_inlettmp=" + coolwater_inlettmp + ", branch1_state=" + branch1_state + ", branch2_state=" + branch2_state + ", ac380v_state=" + ac380v_state + ", dc220v_state=" + dc220v_state + ", branch1_overcurr_alm=" + branch1_overcurr_alm + ", branch1_undervol_alm=" + branch1_undervol_alm + ", branch1_breakerunclosed_alm=" + branch1_breakerunclosed_alm + ", branch1_ptmalm=" + branch1_ptmalm + ", branch1_overcurr_fault=" + branch1_overcurr_fault + ", branch1_overvol_fault=" + branch1_overvol_fault + ", branch1_charge_fault=" + branch1_charge_fault + ", branch1_hardware_fault=" + branch1_hardware_fault + ", branch1_ptmfault=" + branch1_ptmfault + ", branch1_connfault=" + branch1_connfault + ", branch1_downtime_fault=" + branch1_downtime_fault + ", branch1_overinvol_fault=" + branch1_overinvol_fault + ", branch1_overincurr_fault=" + branch1_overincurr_fault + ", branch1_overtmp_fault=" + branch1_overtmp_fault + ", branch2_overcurr_alm=" + branch2_overcurr_alm + ", branch2_undervol_alm=" + branch2_undervol_alm + ", branch2_breakerunclosed_alm=" + branch2_breakerunclosed_alm + ", branch2_ptmalm=" + branch2_ptmalm + ", branch2_overcurr_fault=" + branch2_overcurr_fault + ", branch2_overvol_fault=" + branch2_overvol_fault + ", branch2_charge_fault=" + branch2_charge_fault + ", branch2_hardware_fault=" + branch2_hardware_fault + ", branch2_ptmfault=" + branch2_ptmfault + ", branch2_connfault=" + branch2_connfault + ", branch2_downtime_fault=" + branch2_downtime_fault + ", branch2_overinvol_fault=" + branch2_overinvol_fault + ", branch2_overincurr_fault=" + branch2_overincurr_fault + ", branch2_overtmp_fault=" + branch2_overtmp_fault + ", winding_overtmp_alm=" + winding_overtmp_alm + ", motor_overtmp_alm=" + motor_overtmp_alm + ", bear_bush_overtmp_alm=" + bear_bush_overtmp_alm + ", winding_overtmp_fault=" + winding_overtmp_fault + ", motor_overtmp_fault=" + motor_overtmp_fault + ", bear_bush_overtmp_fault=" + bear_bush_overtmp_fault + ", motor_speed_fault=" + motor_speed_fault + ", motor_water_alm=" + motor_water_alm + ", motor_inwater_press_alm=" + motor_inwater_press_alm + ", water_press_diff_alm=" + water_press_diff_alm + ", inwater_overtmp_alm=" + inwater_overtmp_alm + ", motor_inwater_press_fault=" + motor_inwater_press_fault + ", water_press_diff_fault=" + water_press_diff_fault + ", inwater_overtmp_fault=" + inwater_overtmp_fault + ", motor_powerfall_state=" + motor_powerfall_state + ", motor_default_gear_start=" + motor_default_gear_start + ", motor_powerlimit_state=" + motor_powerlimit_state + ", motor_merge_state=" + motor_merge_state + ", note=" + note + "]"; } } DyEnvir_system/src/com/fgkj/partinsystem/impl/Propulsion_motorImpl.java
New file @@ -0,0 +1,408 @@ package com.fgkj.partinsystem.impl; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.Date; import java.util.List; import com.fgkj.actions.ActionUtil; import com.fgkj.dao.BaseDAO; import com.fgkj.dao.CallBack; import com.fgkj.dao.DAOHelper; import com.fgkj.db.DBUtil; import com.fgkj.partinsystem.dto.Propulsion_motor; import com.fgkj.partinsystem.dto.Switch_board; public class Propulsion_motorImpl implements BaseDAO,CallBack{ @Override public List getResults(ResultSet rs) { // TODO Auto-generated method stub return null; } @Override public boolean add(Object obj) { // TODO Auto-generated method stub return false; } @Override public boolean update(Object obj) { // TODO Auto-generated method stub return false; } @Override public boolean del(Object obj) { // TODO Auto-generated method stub return false; } @Override public List searchAll() { // TODO Auto-generated method stub return null; } //根据参试设备id查询设备的实时数据 @Override public List serchByCondition(Object obj) { Propulsion_motor pm=(Propulsion_motor) obj; String sql="select * from db_partinsystem.propulsion_motor where dev_id=? "; List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{pm.getDev_id()}, new CallBack() { @Override public List getResults(ResultSet rs) { List list=new ArrayList(); try { while(rs.next()){ Propulsion_motor p=new Propulsion_motor(); p.setDev_id(rs.getInt("dev_id")); p.setRecord_time(rs.getTimestamp("record_time")); p.setPropu_rotate(rs.getFloat("propu_rotate")); p.setPropu_rotate_give(rs.getFloat("propu_rotate_give")); p.setBranch1_power(rs.getFloat("branch1_power")); p.setBranch2_power(rs.getFloat("branch2_power")); p.setSum_power(rs.getFloat("sum_power")); p.setBranch1_vol_in(rs.getFloat("branch1_vol_in")); p.setBranch1_vol_dcbus(rs.getFloat("branch1_vol_dcbus")); p.setBranch1_curr_in(rs.getFloat("branch1_curr_in")); p.setBranch2_vol_in(rs.getFloat("branch2_vol_in")); p.setBranch2_vol_dcbus(rs.getFloat("branch2_vol_dcbus")); p.setBranch2_curr_in(rs.getFloat("branch2_curr_in")); p.setWeaver_rotate(rs.getFloat("weaver_rotate")); p.setCoolwater_inletpress(rs.getFloat("coolwater_inletpress")); p.setCoolwater_outletpress(rs.getFloat("coolwater_outletpress")); p.setCoolwater_inlettmp(rs.getFloat("coolwater_inlettmp")); p.setBranch1_state(rs.getInt("branch1_state")); p.setBranch2_state(rs.getInt("branch2_state")); p.setAc380v_state(rs.getInt("ac380v_state")); p.setDc220v_state(rs.getInt("dc220v_state")); p.setBranch1_overcurr_alm(rs.getInt("branch1_overcurr_alm")); p.setBranch1_undervol_alm(rs.getInt("branch1_undervol_alm")); p.setBranch1_breakerunclosed_alm(rs.getInt("branch1_breakerunclosed_alm")); p.setBranch1_ptmalm(rs.getInt("branch1_ptmalm")); p.setBranch1_overcurr_fault(rs.getInt("branch1_overcurr_fault")); p.setBranch1_overvol_fault(rs.getInt("branch1_overvol_fault")); p.setBranch1_charge_fault(rs.getInt("branch1_charge_fault")); p.setBranch1_hardware_fault(rs.getInt("branch1_hardware_fault")); p.setBranch1_ptmfault(rs.getInt("branch1_ptmfault")); p.setBranch1_connfault(rs.getInt("branch1_connfault")); p.setBranch1_downtime_fault(rs.getInt("branch1_downtime_fault")); p.setBranch1_overinvol_fault(rs.getInt("branch1_overinvol_fault")); p.setBranch1_overincurr_fault(rs.getInt("branch1_overincurr_fault")); p.setBranch1_overtmp_fault(rs.getInt("branch1_overtmp_fault")); p.setBranch2_overcurr_alm(rs.getInt("branch2_overcurr_alm")); p.setBranch2_undervol_alm(rs.getInt("branch2_undervol_alm")); p.setBranch2_breakerunclosed_alm(rs.getInt("branch2_breakerunclosed_alm")); p.setBranch2_ptmalm(rs.getInt("branch2_ptmalm")); p.setBranch2_overcurr_fault(rs.getInt("branch2_overcurr_fault")); p.setBranch2_overvol_fault(rs.getInt("branch2_overvol_fault")); p.setBranch2_charge_fault(rs.getInt("branch2_charge_fault")); p.setBranch2_hardware_fault(rs.getInt("branch2_hardware_fault")); p.setBranch2_ptmfault(rs.getInt("branch2_ptmfault")); p.setBranch2_connfault(rs.getInt("branch2_connfault")); p.setBranch2_downtime_fault(rs.getInt("branch2_downtime_fault")); p.setBranch2_overinvol_fault(rs.getInt("branch2_overinvol_fault")); p.setBranch2_overincurr_fault(rs.getInt("branch2_overincurr_fault")); p.setBranch2_overtmp_fault(rs.getInt("branch2_overtmp_fault")); p.setWinding_overtmp_alm(rs.getInt("winding_overtmp_alm")); p.setMotor_overtmp_alm(rs.getInt("motor_overtmp_alm")); p.setBear_bush_overtmp_alm(rs.getInt("bear_bush_overtmp_alm")); p.setWinding_overtmp_fault(rs.getInt("winding_overtmp_fault")); p.setMotor_overtmp_fault(rs.getInt("motor_overtmp_fault")); p.setBear_bush_overtmp_fault(rs.getInt("bear_bush_overtmp_fault")); p.setMotor_speed_fault(rs.getInt("motor_speed_fault")); p.setMotor_water_alm(rs.getInt("motor_water_alm")); p.setMotor_inwater_press_alm(rs.getInt("motor_inwater_press_alm")); p.setWater_press_diff_alm(rs.getInt("water_press_diff_alm")); p.setInwater_overtmp_alm(rs.getInt("inwater_overtmp_alm")); p.setMotor_inwater_press_fault(rs.getInt("motor_inwater_press_fault")); p.setWater_press_diff_fault(rs.getInt("water_press_diff_fault")); p.setInwater_overtmp_fault(rs.getInt("inwater_overtmp_fault")); p.setMotor_powerfall_state(rs.getInt("motor_powerfall_state")); p.setMotor_default_gear_start(rs.getInt("motor_default_gear_start")); p.setMotor_powerlimit_state(rs.getInt("motor_powerlimit_state")); p.setMotor_merge_state(rs.getInt("motor_merge_state")); list.add(p); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); return list; } //设备实时数据显示(前100笔数据服务器的时间) @Override public List serchByInfo(Object obj) { Propulsion_motor pm=(Propulsion_motor) obj; Date date=new Date(); String table=DAOHelper.sdf_withOut.format(date); String sql="select * from db_partinsystem_history.propulsion_motor_"+pm.getDev_id()+"_"+table+" where dev_id=? limit 0,100 "; List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{pm.getDev_id()}, new CallBack() { @Override public List getResults(ResultSet rs) { List list=new ArrayList(); try { while(rs.next()){ Propulsion_motor p=new Propulsion_motor(); p.setDev_id(rs.getInt("dev_id")); p.setRecord_time(rs.getTimestamp("record_time")); p.setPropu_rotate(rs.getFloat("propu_rotate")); p.setPropu_rotate_give(rs.getFloat("propu_rotate_give")); p.setBranch1_power(rs.getFloat("branch1_power")); p.setBranch2_power(rs.getFloat("branch2_power")); p.setSum_power(rs.getFloat("sum_power")); p.setBranch1_vol_in(rs.getFloat("branch1_vol_in")); p.setBranch1_vol_dcbus(rs.getFloat("branch1_vol_dcbus")); p.setBranch1_curr_in(rs.getFloat("branch1_curr_in")); p.setBranch2_vol_in(rs.getFloat("branch2_vol_in")); p.setBranch2_vol_dcbus(rs.getFloat("branch2_vol_dcbus")); p.setBranch2_curr_in(rs.getFloat("branch2_curr_in")); p.setWeaver_rotate(rs.getFloat("weaver_rotate")); p.setCoolwater_inletpress(rs.getFloat("coolwater_inletpress")); p.setCoolwater_outletpress(rs.getFloat("coolwater_outletpress")); p.setCoolwater_inlettmp(rs.getFloat("coolwater_inlettmp")); p.setBranch1_state(rs.getInt("branch1_state")); p.setBranch2_state(rs.getInt("branch2_state")); p.setAc380v_state(rs.getInt("ac380v_state")); p.setDc220v_state(rs.getInt("dc220v_state")); p.setBranch1_overcurr_alm(rs.getInt("branch1_overcurr_alm")); p.setBranch1_undervol_alm(rs.getInt("branch1_undervol_alm")); p.setBranch1_breakerunclosed_alm(rs.getInt("branch1_breakerunclosed_alm")); p.setBranch1_ptmalm(rs.getInt("branch1_ptmalm")); p.setBranch1_overcurr_fault(rs.getInt("branch1_overcurr_fault")); p.setBranch1_overvol_fault(rs.getInt("branch1_overvol_fault")); p.setBranch1_charge_fault(rs.getInt("branch1_charge_fault")); p.setBranch1_hardware_fault(rs.getInt("branch1_hardware_fault")); p.setBranch1_ptmfault(rs.getInt("branch1_ptmfault")); p.setBranch1_connfault(rs.getInt("branch1_connfault")); p.setBranch1_downtime_fault(rs.getInt("branch1_downtime_fault")); p.setBranch1_overinvol_fault(rs.getInt("branch1_overinvol_fault")); p.setBranch1_overincurr_fault(rs.getInt("branch1_overincurr_fault")); p.setBranch1_overtmp_fault(rs.getInt("branch1_overtmp_fault")); p.setBranch2_overcurr_alm(rs.getInt("branch2_overcurr_alm")); p.setBranch2_undervol_alm(rs.getInt("branch2_undervol_alm")); p.setBranch2_breakerunclosed_alm(rs.getInt("branch2_breakerunclosed_alm")); p.setBranch2_ptmalm(rs.getInt("branch2_ptmalm")); p.setBranch2_overcurr_fault(rs.getInt("branch2_overcurr_fault")); p.setBranch2_overvol_fault(rs.getInt("branch2_overvol_fault")); p.setBranch2_charge_fault(rs.getInt("branch2_charge_fault")); p.setBranch2_hardware_fault(rs.getInt("branch2_hardware_fault")); p.setBranch2_ptmfault(rs.getInt("branch2_ptmfault")); p.setBranch2_connfault(rs.getInt("branch2_connfault")); p.setBranch2_downtime_fault(rs.getInt("branch2_downtime_fault")); p.setBranch2_overinvol_fault(rs.getInt("branch2_overinvol_fault")); p.setBranch2_overincurr_fault(rs.getInt("branch2_overincurr_fault")); p.setBranch2_overtmp_fault(rs.getInt("branch2_overtmp_fault")); p.setWinding_overtmp_alm(rs.getInt("winding_overtmp_alm")); p.setMotor_overtmp_alm(rs.getInt("motor_overtmp_alm")); p.setBear_bush_overtmp_alm(rs.getInt("bear_bush_overtmp_alm")); p.setWinding_overtmp_fault(rs.getInt("winding_overtmp_fault")); p.setMotor_overtmp_fault(rs.getInt("motor_overtmp_fault")); p.setBear_bush_overtmp_fault(rs.getInt("bear_bush_overtmp_fault")); p.setMotor_speed_fault(rs.getInt("motor_speed_fault")); p.setMotor_water_alm(rs.getInt("motor_water_alm")); p.setMotor_inwater_press_alm(rs.getInt("motor_inwater_press_alm")); p.setWater_press_diff_alm(rs.getInt("water_press_diff_alm")); p.setInwater_overtmp_alm(rs.getInt("inwater_overtmp_alm")); p.setMotor_inwater_press_fault(rs.getInt("motor_inwater_press_fault")); p.setWater_press_diff_fault(rs.getInt("water_press_diff_fault")); p.setInwater_overtmp_fault(rs.getInt("inwater_overtmp_fault")); p.setMotor_powerfall_state(rs.getInt("motor_powerfall_state")); p.setMotor_default_gear_start(rs.getInt("motor_default_gear_start")); p.setMotor_powerlimit_state(rs.getInt("motor_powerlimit_state")); p.setMotor_merge_state(rs.getInt("motor_merge_state")); list.add(p); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); return list; } //设备历史数据查询 public List serchHistory(Object obj) { Propulsion_motor pm=(Propulsion_motor) obj; String table=DAOHelper.sdf_withOut.format(pm.getRecord_time()); String sql="select * from db_partinsystem_history.propulsion_motor_"+pm.getDev_id()+"_"+table+" where dev_id=? and record_time >= ? and record_time <= ? order by record_time asc"; List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), new Object[]{pm.getDev_id(),pm.getRecord_time(),pm.getRecord_time1()}, new CallBack() { @Override public List getResults(ResultSet rs) { List list=new ArrayList(); try { while(rs.next()){ Propulsion_motor p=new Propulsion_motor(); p.setDev_id(rs.getInt("dev_id")); p.setRecord_time(rs.getTimestamp("record_time")); p.setPropu_rotate(rs.getFloat("propu_rotate")); p.setPropu_rotate_give(rs.getFloat("propu_rotate_give")); p.setBranch1_power(rs.getFloat("branch1_power")); p.setBranch2_power(rs.getFloat("branch2_power")); p.setSum_power(rs.getFloat("sum_power")); p.setBranch1_vol_in(rs.getFloat("branch1_vol_in")); p.setBranch1_vol_dcbus(rs.getFloat("branch1_vol_dcbus")); p.setBranch1_curr_in(rs.getFloat("branch1_curr_in")); p.setBranch2_vol_in(rs.getFloat("branch2_vol_in")); p.setBranch2_vol_dcbus(rs.getFloat("branch2_vol_dcbus")); p.setBranch2_curr_in(rs.getFloat("branch2_curr_in")); p.setWeaver_rotate(rs.getFloat("weaver_rotate")); p.setCoolwater_inletpress(rs.getFloat("coolwater_inletpress")); p.setCoolwater_outletpress(rs.getFloat("coolwater_outletpress")); p.setCoolwater_inlettmp(rs.getFloat("coolwater_inlettmp")); p.setBranch1_state(rs.getInt("branch1_state")); p.setBranch2_state(rs.getInt("branch2_state")); p.setAc380v_state(rs.getInt("ac380v_state")); p.setDc220v_state(rs.getInt("dc220v_state")); p.setBranch1_overcurr_alm(rs.getInt("branch1_overcurr_alm")); p.setBranch1_undervol_alm(rs.getInt("branch1_undervol_alm")); p.setBranch1_breakerunclosed_alm(rs.getInt("branch1_breakerunclosed_alm")); p.setBranch1_ptmalm(rs.getInt("branch1_ptmalm")); p.setBranch1_overcurr_fault(rs.getInt("branch1_overcurr_fault")); p.setBranch1_overvol_fault(rs.getInt("branch1_overvol_fault")); p.setBranch1_charge_fault(rs.getInt("branch1_charge_fault")); p.setBranch1_hardware_fault(rs.getInt("branch1_hardware_fault")); p.setBranch1_ptmfault(rs.getInt("branch1_ptmfault")); p.setBranch1_connfault(rs.getInt("branch1_connfault")); p.setBranch1_downtime_fault(rs.getInt("branch1_downtime_fault")); p.setBranch1_overinvol_fault(rs.getInt("branch1_overinvol_fault")); p.setBranch1_overincurr_fault(rs.getInt("branch1_overincurr_fault")); p.setBranch1_overtmp_fault(rs.getInt("branch1_overtmp_fault")); p.setBranch2_overcurr_alm(rs.getInt("branch2_overcurr_alm")); p.setBranch2_undervol_alm(rs.getInt("branch2_undervol_alm")); p.setBranch2_breakerunclosed_alm(rs.getInt("branch2_breakerunclosed_alm")); p.setBranch2_ptmalm(rs.getInt("branch2_ptmalm")); p.setBranch2_overcurr_fault(rs.getInt("branch2_overcurr_fault")); p.setBranch2_overvol_fault(rs.getInt("branch2_overvol_fault")); p.setBranch2_charge_fault(rs.getInt("branch2_charge_fault")); p.setBranch2_hardware_fault(rs.getInt("branch2_hardware_fault")); p.setBranch2_ptmfault(rs.getInt("branch2_ptmfault")); p.setBranch2_connfault(rs.getInt("branch2_connfault")); p.setBranch2_downtime_fault(rs.getInt("branch2_downtime_fault")); p.setBranch2_overinvol_fault(rs.getInt("branch2_overinvol_fault")); p.setBranch2_overincurr_fault(rs.getInt("branch2_overincurr_fault")); p.setBranch2_overtmp_fault(rs.getInt("branch2_overtmp_fault")); p.setWinding_overtmp_alm(rs.getInt("winding_overtmp_alm")); p.setMotor_overtmp_alm(rs.getInt("motor_overtmp_alm")); p.setBear_bush_overtmp_alm(rs.getInt("bear_bush_overtmp_alm")); p.setWinding_overtmp_fault(rs.getInt("winding_overtmp_fault")); p.setMotor_overtmp_fault(rs.getInt("motor_overtmp_fault")); p.setBear_bush_overtmp_fault(rs.getInt("bear_bush_overtmp_fault")); p.setMotor_speed_fault(rs.getInt("motor_speed_fault")); p.setMotor_water_alm(rs.getInt("motor_water_alm")); p.setMotor_inwater_press_alm(rs.getInt("motor_inwater_press_alm")); p.setWater_press_diff_alm(rs.getInt("water_press_diff_alm")); p.setInwater_overtmp_alm(rs.getInt("inwater_overtmp_alm")); p.setMotor_inwater_press_fault(rs.getInt("motor_inwater_press_fault")); p.setWater_press_diff_fault(rs.getInt("water_press_diff_fault")); p.setInwater_overtmp_fault(rs.getInt("inwater_overtmp_fault")); p.setMotor_powerfall_state(rs.getInt("motor_powerfall_state")); p.setMotor_default_gear_start(rs.getInt("motor_default_gear_start")); p.setMotor_powerlimit_state(rs.getInt("motor_powerlimit_state")); p.setMotor_merge_state(rs.getInt("motor_merge_state")); list.add(p); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); return list; } //文件导出时的历史查询 public List serchCSV(Object obj) { final Propulsion_motor pm=(Propulsion_motor) obj; String tablists=pm.getNote()+",record_time"; String table=DAOHelper.sdf_withOut.format(pm.getRecord_time()); String table1=DAOHelper.sdf_withOut.format(pm.getRecord_time1()); String SqlAll=""; String sql=" (select "+tablists+" from db_partinsystem_history.propulsion_motor_"+pm.getDev_id()+"_"+table+" " + " where record_time >= ? and record_time <= ? order by record_time asc )"; String sql_union=" union all "; String sql1= " (select "+tablists+" from db_partinsystem_history.propulsion_motor_"+pm.getDev_id()+"_"+table1+" " + " where record_time >= ? and record_time <= ? order by record_time asc )"; Object[] strarr=null; List list=new ArrayList(); String st=pm.getDev_id()+"_"+table; String st1=pm.getDev_id()+"_"+table1; int size=DAOHelper.serchTable(st); int size1=DAOHelper.serchTable(st1); //表都存在 if(size>0&&size1>0){ if(table.equals(table1)){ SqlAll=sql; strarr=new Object[]{DAOHelper.sdf.format(pm.getRecord_time()),DAOHelper.sdf.format(pm.getRecord_time1())}; }else{ SqlAll=sql+sql_union+sql1; strarr=new Object[]{DAOHelper.sdf.format(pm.getRecord_time()),DAOHelper.sdfwithOut.format(pm.getRecord_time())+" 23:59:59",DAOHelper.sdfwithOut.format(pm.getRecord_time())+" 00:00:00",DAOHelper.sdf.format(pm.getRecord_time1())}; } } //存在一个表 if(size>0&&size1<=0){ SqlAll=sql; strarr=new Object[]{DAOHelper.sdf.format(pm.getRecord_time()),DAOHelper.sdfwithOut.format(pm.getRecord_time())+" 23:59:59"}; } if(size<=0&&size1>0){ SqlAll=sql1; strarr=new Object[]{DAOHelper.sdfwithOut.format(pm.getRecord_time1())+" 00:00:00",DAOHelper.sdf.format(pm.getRecord_time1())}; } //表都不存在 if(size<=0&&size1<=0){ return list; } list=DAOHelper.executeQuery(SqlAll, DBUtil.getConn(), strarr, new CallBack() { @Override public List getResults(ResultSet rs) { List list=new ArrayList(); String[] state=pm.getNote().split(","); try { while(rs.next()){ List row=new ArrayList(); row.add(ActionUtil.chageDateToString(rs.getTimestamp("record_time"), ActionUtil.time_yyyyMMddHHmmss).trim()); for (int i = 0; i < state.length; i++) { row.add(rs.getFloat(state[i])); } list.add(row); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return list; } }); return list; } } DyEnvir_system/src/com/fgkj/partinsystem/service/Propulsion_motorService.java
New file @@ -0,0 +1,61 @@ package com.fgkj.partinsystem.service; import java.util.List; import com.fgkj.dao.BaseDAO; import com.fgkj.dao.BaseDAOFactory; import com.fgkj.partinsystem.impl.Propulsion_motorImpl; import com.fgkj.partinsystem.impl.Switch_boardImpl; import com.fgkj.services.ServiceModel; public class Propulsion_motorService { private BaseDAO dao; private ServiceModel model; public Propulsion_motorService() { super(); this.dao=BaseDAOFactory.getBaseDAO(BaseDAO.PROPULSION_MOTOR); this.model=new ServiceModel(); } //根据参试设备id查询设备的实时数据 public ServiceModel serchByCondition(Object obj) { List list=dao.serchByCondition(obj); if(list!=null&&list.size()>0){ model.setCode(1); model.setData(list); model.setMsg("查询成功!"); }else{ model.setCode(0); model.setMsg("查询失败!"); } return model; } //设备实时数据显示(前100笔数据服务器的时间) public ServiceModel serchByInfo(Object obj) { List list=dao.serchByInfo(obj); if(list!=null&&list.size()>0){ model.setCode(1); model.setData(list); model.setMsg("查询成功!"); }else{ model.setCode(0); model.setMsg("查询失败!"); } return model; } //设备历史数据查询 public ServiceModel serchHistory(Object obj) { List list=((Propulsion_motorImpl)dao).serchHistory(obj); if(list!=null&&list.size()>0){ model.setCode(1); model.setData(list); model.setMsg("查询成功!"); }else{ model.setCode(0); model.setMsg("查询失败!"); } return model; } }