• bgycoding


      

    //add by zzw@曾志伟 2015-12-9 【碧桂园项目】 begin
                if(condition.indexOf("glbdef8 = 'Y'")>0){                
                    String mySql = "SELECT HVP.PK_PSNDOC" +
                            "                            FROM HRVM_VIRTUALPSN HVP," +
                            "                            HRVM_VIRTUALORG HVO," +
                            "                            HRVM_VIRTUALTYPE HVT" +
                            "                            WHERE 1 = 1" +
                            "                            AND HVP.PK_VIRTUALORG = HVO.PK_VIRTUALORG" +
                            "                            AND HVO.PK_VIRTUALTYPE = HVT.PK_VIRTUALTYPE" +
                            "                            AND HVT.TYPENAME = '碧业生'";
                    Object obj = getQryService().queryBySql_retArray(mySql);
                    if (obj != null) {
                        ArrayList<String> mypk = (ArrayList<String>) obj;
                        for(String mypk_child:mypk){
                            AggEvaObjectVO[] obj_agg=(AggEvaObjectVO[]) ((EvaObjectAppModel) this.getModel()).getData().toArray(new AggEvaObjectVO[0]);
                            for(Object obj_a_child:obj_agg){
                                String obj1= ((EvaObjectVO) ((AggEvaObjectVO) obj_a_child).getParentVO()).getPk_psndoc();
                                /**
                                 * 查询虚拟组织的碧业生的信息(人员编码)(下图为虚拟组织),
                                 * 与绩效管理-【人员设置】选定方案中现有人员的信息(人员编码)对比,
                                 * 如果有相同人员
                                 */
                                if(mypk_child.equals(obj1)){
                                    String pk_psndoc=obj1;
                                    //Calendar a=Calendar.getInstance();
                                    //String year="bgy"+a.get(Calendar.YEAR);// HVO.CODE='bgy2015'
                                    //String mySql1="";
                                    /*condition += " and (" + EvaObjectVO.PK_EVA_GROUP + " = '"
                                            + evaGroupPK + "')";*/
                                    String mySql_re = "SELECT HVP.PK_PSNDOC" +
                                            "                            FROM HRVM_VIRTUALPSN HVP," +
                                            "                            HRVM_VIRTUALORG HVO," +
                                            "                            HRVM_VIRTUALTYPE HVT" +
                                            "                            WHERE 1 = 1" +
                                            "                            AND HVP.PK_VIRTUALORG = HVO.PK_VIRTUALORG" +
                                            "                            AND HVO.PK_VIRTUALTYPE = HVT.PK_VIRTUALTYPE" +
                                            "                            AND HVT.TYPENAME = '碧业生'" +
                                            "                            AND SUBSTR(HVO.CODE,4)='2016'";
                                    Object obj_re = getQryService().queryBySql_retArray(mySql);
                                    if (obj != null) {
                                        ArrayList<String> mypk_re = (ArrayList<String>) obj_re;
                                        StringBuffer mybuf_re = new StringBuffer();
                                        mybuf_re.append("(");
                                        for (String mystr_re : mypk_re) {
                                            if (mystr_re != null) {
                                                mystr_re = "'" + mystr_re + "',";
                                                mybuf_re.append(mystr_re);
                                            }
                                        }                                    
                                        res_re = mybuf_re.substring(0, mybuf_re.length() - 1);
                                        res_re = res_re + ")";
                                        System.out.println();
                                    }
                                    res_re = "pk_psndoc  in " + res_re;
                                    String replaceStr = "glbdef8 = 'Y'";
                                    condition = condition.replace(replaceStr, res);
                                }
                            }                        
                        }
                    }
    
                    //AggEvaObjectVO[] obj=(AggEvaObjectVO[]) ((EvaObjectAppModel) this.getModel()).getData().toArray(new AggEvaObjectVO[0]);                 
                    
                    //String obj1= ((EvaObjectVO) obj[1].getParentVO()).getPk_psndoc();
                }
                if(condition.indexOf("glbdef8 = 'N'")>0){
                    
                }            
                //add by zzw@曾志伟 2015-12-9 【碧桂园项目】 end
    ---- 动动手指关注我!或许下次你又能在我这里找到你需要的答案!ZZZZW与你一起学习,一起进步!
  • 相关阅读:
    Java Web编程的主要组件技术——JSP
    Java Web编程的主要组件技术——Servlet
    closest()一个在评论里很有用的函数
    ThinkPHP I方法
    PHPstorm 的快捷键
    ThinkPHP的缓存 F方法
    console.log的使用
    选择使用接口和抽象类的依据
    OOP三类继承的区别
    Thinkphp C方法
  • 原文地址:https://www.cnblogs.com/zzzzw/p/5043893.html
Copyright © 2020-2023  润新知