| | |
| | | import com.fgkj.dao.BaseDAO;
|
| | | import com.fgkj.dao.CallBack;
|
| | | import com.fgkj.dao.DAOHelper;
|
| | | import com.fgkj.dao.UinfDaoFactory;
|
| | | import com.fgkj.db.DBUtil;
|
| | | import com.fgkj.dto.User_log;
|
| | | import com.fgkj.dto.ram.Fbs9100s_dfu_state;
|
| | | import com.fgkj.services.User_logService;
|
| | |
|
| | | public class Fbs9100s_dfu_stateImpl implements BaseDAO,CallBack{
|
| | |
|
| | |
| | | //升级确认
|
| | | public boolean update(Object obj) {
|
| | | Fbs9100s_dfu_state dfu=(Fbs9100s_dfu_state) obj;
|
| | | String sql="update db_ram_db.tb_fbs9100s_dfu_state set dfu_en=true,dfu_wr_stat=1, dfu_data_blocknum=1 where dev_id=?;";
|
| | | String sql="update db_ram_db.tb_fbs9100s_dfu_state set dfu_en=true,dfu_wr_stat=1, dfu_data_blocknum=1 where dev_id=?";
|
| | | boolean bl=DAOHelper.executeUpdate(DBUtil.getConn(), sql, new Object[]{dfu.getDev_id()});
|
| | | return bl;
|
| | | }
|
| | |
|
| | | //批量升级确认
|
| | | public boolean updatePro(Object obj) {
|
| | | List<Fbs9100s_dfu_state> list=(List<Fbs9100s_dfu_state>) obj;
|
| | | List<User_log> listU=new ArrayList<User_log>();//存放user_log
|
| | | ArrayList sql_str=new ArrayList();
|
| | | if(list!=null&&list.size()>0){
|
| | | for (int i = 0; i < list.size(); i++) {
|
| | | Fbs9100s_dfu_state dfu=list.get(i);
|
| | | String sql="update db_ram_db.tb_fbs9100s_dfu_state set dfu_en=true,dfu_wr_stat=1, dfu_data_blocknum=1 where dev_id="+dfu.getDev_id();
|
| | | sql_str.add(sql);
|
| | | {
|
| | | String msg="升级"+dfu.getDev_id()+"设备";
|
| | | User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Increase, msg);
|
| | | listU.add(ulog);
|
| | | }
|
| | | }
|
| | | }
|
| | | boolean bl=DAOHelper.makeManualCommit(DBUtil.getConn(), sql_str);
|
| | | (new User_logService()).addPro(listU);//将用户的操作记录下来
|
| | | return bl;
|
| | | }
|
| | | public boolean del(Object obj) {
|
| | | // TODO Auto-generated method stub
|
| | | return false;
|