bgycoding
//add by zzw@曾志偉 2015-12-9 【碧桂園項目】 beginif(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 = '碧業(yè)生'";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();/*** 查詢虛擬組織的碧業(yè)生的信息(人員編碼)(下圖為虛擬組織),* 與績效管理-【人員設(shè)置】選定方案中現(xiàn)有人員的信息(人員編碼)對比,* 如果有相同人員*/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 = '碧業(yè)生'" +" 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
?
轉(zhuǎn)載于:https://www.cnblogs.com/zzzzw/p/5043893.html
總結(jié)
- 上一篇: C语言实现小时候经常做的智力测试题
- 下一篇: 产品工作速查手册