81041
2018-12-21 f55c99f2cb7a8c928c52fb8f8f68273c56f659cc
审核添加和修改
20个文件已修改
110 ■■■■■ 已修改文件
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/Battinf_applyAction.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BattinfGroupFactory.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Batt_rtstateDAOImpl.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$1.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$2.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$3.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$4.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$5.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$6.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$7.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$8.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/Battinf_applyService.class 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/actions/Battinf_applyAction.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/BattinfGroupFactory.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/Batt_rtstateDAOImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/dao/impl/Battinf_applyImpl.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/src/com/fgkj/services/Battinf_applyService.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/actions/Battinf_applyAction.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/BattinfGroupFactory.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/BattInfImpl.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Batt_rtstateDAOImpl.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$1.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$2.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$3.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$4.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$5.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$6.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$7.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl$8.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/dao/impl/Battinf_applyImpl.class
Binary files differ
gx_tieta/WebRoot/WEB-INF/classes/com/fgkj/services/Battinf_applyService.class
Binary files differ
gx_tieta/src/com/fgkj/actions/Battinf_applyAction.java
@@ -45,13 +45,20 @@
        result=tojson(model);
        return SUCCESS;
    }
     //添加申请
     //添加申请(新建)
    public String add(){
        List<Battinf_apply> list=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken<List<Battinf_apply>>(){}.getType() );
        ServiceModel model=service.add(list);
        result=tojson(model);
        return SUCCESS;
    }
    //添加申请(修改旧的)
    public String addPro(){
        List<Battinf_apply> list=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json,new TypeToken<List<Battinf_apply>>(){}.getType() );
        ServiceModel model=service.addPro(list);
        result=tojson(model);
        return SUCCESS;
    }
    //查询出所有需要确认的申请
    public String serchByCondition(){
        Battinf_apply bapply=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(json, Battinf_apply.class);
gx_tieta/src/com/fgkj/dao/BattinfGroupFactory.java
@@ -110,14 +110,25 @@
    //查询当前最大的电池组id
    public static int searchMaxBattgroupId(){
        int battgroupid=0;
        int BattgroupId_inf=(new Batt_rtstateDAOImpl()).searchMaxBattgroupId();//当前内存中最大的电池组id
        int BattgroupId_rtstate=(new Batt_rtstateDAOImpl()).searchMaxBattgroupId();//当前内存中最大的电池组id
        int BattgroupId_apply=(new Battinf_applyImpl()).searchMaxBattgroupId_apply();//当前内存中最大的电池组id
        int BattgroupId_inf=(new BattInfImpl()).searchMaxBattgroupId();//当前内存中最大的电池组id
        if(BattgroupId_inf>=BattgroupId_apply){
            battgroupid=BattgroupId_inf+1;
            battgroupid=BattgroupId_inf;
            if(battgroupid>=BattgroupId_rtstate) {
                battgroupid=battgroupid;
            }else {
                battgroupid=BattgroupId_rtstate;
            }
        }else{
            battgroupid=BattgroupId_apply+1;
            battgroupid=BattgroupId_apply;
            if(battgroupid>=BattgroupId_rtstate) {
                battgroupid=battgroupid;
            }else {
                battgroupid=BattgroupId_rtstate;
            }
        }
        return battgroupid;
        return battgroupid+1;
    }
    //查询当前最大的stationid
    public static int searchStationId(){
gx_tieta/src/com/fgkj/dao/impl/BattInfImpl.java
@@ -4344,7 +4344,35 @@
        });
        return list;
    }
    //查询battinf中最大的battgroupid
    //查询出当前存在内存中最大的电池组id(很重要**********)
    public int searchMaxBattgroupId(){
        String sql=" select max(battgroupId) as id from db_battinf.tb_battinf limit 1";
        List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), null, new CallBack() {
            public List getResults(ResultSet rs) {
                List list=new ArrayList();
                try {
                    while(rs.next()){
                        int battgroupid=1010000;
                        if(rs.getString("id")!=null){
                            battgroupid=rs.getInt("id");
                        }
                        list.add(battgroupid);
                    }
                } catch (SQLException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
                return list;
            }
        });
        int battgroupid=0;
        if(list!=null&&list.size()>0){
            battgroupid=(Integer) list.get(list.size()-1);
        }
        return battgroupid;
    }
    public static void main(String[] args) throws ParseException {
        //new BattInfImpl().searchAll();
        
gx_tieta/src/com/fgkj/dao/impl/Batt_rtstateDAOImpl.java
@@ -752,7 +752,7 @@
   
    //查询出当前存在内存中最大的电池组id(很重要**********)
    public int searchMaxBattgroupId(){
        String sql=" select max(battgroupId) as id from db_battinf.tb_battinf limit 1";
        String sql=" select max(battgroupId) as id from db_ram_db.tb_batt_rtstate limit 1";
        List list=DAOHelper.executeQuery(sql, DBUtil.getConn(), null, new CallBack() {
            
            public List getResults(ResultSet rs) {
gx_tieta/src/com/fgkj/dao/impl/Battinf_applyImpl.java
@@ -33,7 +33,7 @@
        // TODO Auto-generated method stub
        return null;
    }
    //添加申请
    //添加申请(新建)
    public boolean add(Object obj) {
        List<Battinf_apply> list=(List<Battinf_apply>) obj;
        List<User_log> listU=new ArrayList<User_log>();//存放user_log
@@ -83,6 +83,38 @@
        
        return bl;
    }
    //添加申请(修改旧的)
    public boolean addPro(Object obj) {
        List<Battinf_apply> list=(List<Battinf_apply>) obj;
        List<User_log> listU=new ArrayList<User_log>();//存放user_log
        ArrayList<String> sql_str=new ArrayList();
        if(list!=null && list.size()>0){
            for (int i = 0; i < list.size(); i++) {
                Battinf_apply bapply=list.get(i);
                int uid=((User_inf)ActionUtil.getUser()).getUId();
                bapply.setApply_uid(uid);
                BattInf binf=bapply.getBinf();
                String sql = "insert into db_battinf.tb_battinf_apply(" +
                        "apply_uid,apply_date,StationId,StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FBSDeviceId,FbsDeviceIp,FbsDeviceIp_YM,FbsDeviceIp_WG,"
                        + "FBSDeviceName,GroupIndexInFBSDevice,battgroupId,BattGroupNum,BattGroupName,FloatVolLevel,OfflineVolLevel,BattFloatCurrent" +
                        ",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate,Load_curr,install_user,DisCurrMax,station_phone" +
                        ") values("+bapply.getApply_uid()+",'"+DAOHelper.sdf.format(bapply.getApply_date())+"','"+binf.getStationId()+"','"+binf.getStationName()+"','"+binf.getStationName1()+"','"+binf.getStationName2()+"','"+binf.getStationName3()+"','"+binf.getStationName4()+"','"+binf.getStationName5()+
                        "','"+binf.getStationIp()+"',"+binf.getFBSDeviceId()+",'"+binf.getFbsDeviceIp()+"','"+binf.getFbsDeviceIp_YM()+"','"+binf.getFbsDeviceIp_WG()+"','"+binf.getFBSDeviceName()+"',"+binf.getGroupIndexInFBSDevice()+
                        ","+binf.getBattGroupId()+","+binf.getBattGroupNum()+",'"+binf.getBattGroupName()+"',"+binf.getFloatVolLevel()+","+binf.getOfflineVolLevel()+","+binf.getBattFloatCurrent()+
                        ","+binf.getMonCount()+","+binf.getMonCapStd()+","+binf.getMonVolStd()+","+binf.getMonResStd()+","+binf.getMonSerStd()+","+binf.getMonVolLowToAvg()+
                        ",'"+binf.getBattProducer()+"','"+binf.getBattModel()+"','"+DAOHelper.sdf.format(binf.getBattProductDate())+"','"+DAOHelper.sdf.format(binf.getBattInUseDate())+"',"+binf.getLoad_curr()+",'"+binf.getInstall_user()+"',"+binf.getDisCurrMax()+",'"+binf.getStation_phone()+"')";
                sql_str.add(sql);
                {
                    String msg=((User_inf)ActionUtil.getUser()).getUId()+"申请添加"+binf.getStationName()+"机房"+binf.getBattGroupId()+"电池组的信息";
                    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 update(Object obj) {
        List<Battinf_apply> list=(List<Battinf_apply>) obj;
@@ -96,7 +128,7 @@
                binf.setStation_install(1);
                String sql_update_apply=" update db_battinf.tb_battinf_apply set confrim_uid="+bapply.getConfrim_uid()+",apply_en=1 where battgroupid="+binf.getBattGroupId();
                sql_str.add(sql_update_apply);
                String sql_insert_binf="insert into db_battinf.tb_battinf(" +
                String sql_insert_binf="replace into db_battinf.tb_battinf(" +
                        "StationId,StationName,StationName1,StationName2,StationName3,StationName4,StationName5,StationIp,FBSDeviceId,FbsDeviceIp,FbsDeviceIp_YM,FbsDeviceIp_WG,"
                        + "FBSDeviceName,GroupIndexInFBSDevice,battgroupId,BattGroupNum,BattGroupName,FloatVolLevel,OfflineVolLevel,BattFloatCurrent" +
                        ",MonCount,MonCapStd,monVolStd,monResStd,MonSerStd,MonVolLowToAvg,BattProducer,BattModel,BattProductDate,BattInUseDate,Load_curr,install_user,DisCurrMax,station_phone,Station_install" +
gx_tieta/src/com/fgkj/services/Battinf_applyService.java
@@ -64,7 +64,7 @@
        }
        return model;
    }
     //添加申请
     //添加申请(新建)
    public ServiceModel add(Object obj){
        boolean bl=dao.add(obj);
        if(bl){
@@ -76,6 +76,18 @@
        }
        return model;
    }
     //添加申请(修改旧的)
    public ServiceModel addPro(Object obj){
        boolean bl=((Battinf_applyImpl)dao).addPro(obj);
        if(bl){
            model.setCode(1);
            model.setMsg("添加成功!");
        }else{
            model.setCode(0);
            model.setMsg("添加失败!");
        }
        return model;
    }
    //查询出审核完的申请和待审核的申请
    public ServiceModel serchByInfo(Object obj){
        List list=dao.serchByInfo(obj);