码迷,mamicode.com
首页 > 其他好文 > 详细

bgycoding

时间:2015-12-14 01:18:42      阅读:143      评论:0      收藏:0      [点我收藏+]

标签:

  

//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

 

bgycoding

标签:

原文地址:http://www.cnblogs.com/zzzzw/p/5043893.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!