/** * 取得Schema中指定索引值所对应的字段值 * * @param: nFieldIndex int 指定的字段索引值 * @return: String 如果没有对应的字段,返回"" 如果字段值为空,返回"null" */ public String getV(int nFieldIndex) { String strFieldValue = ""; switch (nFieldIndex) { case 0: strFieldValue = StrTool.GBKToUnicode(riskCode); break; case 1: strFieldValue = StrTool.GBKToUnicode(riskVer); break; case 2: strFieldValue = StrTool.GBKToUnicode(dutyCode); break; case 3: strFieldValue = StrTool.GBKToUnicode(choFlag); break; case 4: strFieldValue = StrTool.GBKToUnicode(specFlag); break; default: strFieldValue = ""; } ; if (strFieldValue.equals("")) { strFieldValue = "null"; } return strFieldValue; }
/** * 取得Schema中指定索引值所对应的字段值 * * @param: nFieldIndex int 指定的字段索引值 * @return: String 如果没有对应的字段,返回"" 如果字段值为空,返回"null" */ public String getV(int nFieldIndex) { String strFieldValue = ""; switch (nFieldIndex) { case 0: strFieldValue = StrTool.GBKToUnicode(calCode); break; case 1: strFieldValue = StrTool.GBKToUnicode(riskCode); break; case 2: strFieldValue = StrTool.GBKToUnicode(type); break; case 3: strFieldValue = StrTool.GBKToUnicode(calSQL); break; case 4: strFieldValue = StrTool.GBKToUnicode(remark); break; default: strFieldValue = ""; } ; if (strFieldValue.equals("")) { strFieldValue = "null"; } return strFieldValue; }
/** * 数据解包,解包顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpLEPRiskDuty>历史记账凭证主表信息</A>表字段 * * @param: strMessage String 包含一条纪录数据的字符串 * @return: boolean */ public boolean decode(String strMessage) { try { riskCode = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 1, SysConst.PACKAGESPILTER); riskVer = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 2, SysConst.PACKAGESPILTER); dutyCode = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 3, SysConst.PACKAGESPILTER); choFlag = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 4, SysConst.PACKAGESPILTER); specFlag = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 5, SysConst.PACKAGESPILTER); } catch (NumberFormatException ex) { // @@错误处理 CError tError = new CError(); tError.moduleName = "LEPRiskDutySchema"; tError.functionName = "decode"; tError.errorMessage = ex.toString(); this.mErrors.addOneError(tError); return false; } return true; }
/** * 取得对应传入参数的String形式的字段值 * * @param: FCode String 希望取得的字段名 * @return: String 如果没有对应的字段,返回"" 如果字段值为空,返回"null" */ public String getV(String FCode) { String strReturn = ""; if (FCode.equalsIgnoreCase("riskCode")) { strReturn = StrTool.GBKToUnicode(String.valueOf(riskCode)); } if (FCode.equalsIgnoreCase("riskVer")) { strReturn = StrTool.GBKToUnicode(String.valueOf(riskVer)); } if (FCode.equalsIgnoreCase("dutyCode")) { strReturn = StrTool.GBKToUnicode(String.valueOf(dutyCode)); } if (FCode.equalsIgnoreCase("choFlag")) { strReturn = StrTool.GBKToUnicode(String.valueOf(choFlag)); } if (FCode.equalsIgnoreCase("specFlag")) { strReturn = StrTool.GBKToUnicode(String.valueOf(specFlag)); } if (strReturn.equals("")) { strReturn = "null"; } return strReturn; }
/** * 取得对应传入参数的String形式的字段值 * * @param: FCode String 希望取得的字段名 * @return: String 如果没有对应的字段,返回"" 如果字段值为空,返回"null" */ public String getV(String FCode) { String strReturn = ""; if (FCode.equalsIgnoreCase("calCode")) { strReturn = StrTool.GBKToUnicode(String.valueOf(calCode)); } if (FCode.equalsIgnoreCase("riskCode")) { strReturn = StrTool.GBKToUnicode(String.valueOf(riskCode)); } if (FCode.equalsIgnoreCase("type")) { strReturn = StrTool.GBKToUnicode(String.valueOf(type)); } if (FCode.equalsIgnoreCase("calSQL")) { strReturn = StrTool.GBKToUnicode(String.valueOf(calSQL)); } if (FCode.equalsIgnoreCase("remark")) { strReturn = StrTool.GBKToUnicode(String.valueOf(remark)); } if (strReturn.equals("")) { strReturn = "null"; } return strReturn; }
/** * 准备数据查询条件 * * @param strSQL String * @return boolean */ public boolean prepareData(String strSQL) { if (mResultSet != null) { // @@错误处理 CError tError = new CError(); tError.moduleName = "LEDEPolicyMailInfoDB"; tError.functionName = "prepareData"; tError.errorMessage = "数据集非空,程序在准备数据集之后,没有关闭!"; this.mErrors.addOneError(tError); return false; } if (!mflag) { con = DBConnPool.getConnection(); } try { mStatement = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); mResultSet = mStatement.executeQuery(StrTool.GBKToUnicode(strSQL)); } catch (Exception e) { // @@错误处理 CError tError = new CError(); tError.moduleName = "LEDEPolicyMailInfoDB"; tError.functionName = "prepareData"; tError.errorMessage = e.toString(); this.mErrors.addOneError(tError); try { mResultSet.close(); } catch (Exception ex2) { } try { mStatement.close(); } catch (Exception ex3) { } if (!mflag) { try { con.close(); } catch (Exception et) { } } return false; } if (!mflag) { try { con.close(); } catch (Exception e) { } } return true; }
/** * 取得Schema中指定索引值所对应的字段值 * * @param: nFieldIndex int 指定的字段索引值 * @return: String 如果没有对应的字段,返回"" 如果字段值为空,返回"null" */ public String getV(int nFieldIndex) { String strFieldValue = ""; switch (nFieldIndex) { case 0: strFieldValue = StrTool.GBKToUnicode(recommend); break; case 1: strFieldValue = StrTool.GBKToUnicode(recommended); break; case 2: strFieldValue = String.valueOf(sendtimes); break; case 3: strFieldValue = StrTool.GBKToUnicode(success); break; case 4: strFieldValue = StrTool.GBKToUnicode(registered); break; case 5: strFieldValue = StrTool.GBKToUnicode(field1); break; case 6: strFieldValue = StrTool.GBKToUnicode(field2); break; case 7: strFieldValue = StrTool.GBKToUnicode(field3); break; case 8: strFieldValue = StrTool.GBKToUnicode(makedate); break; case 9: strFieldValue = StrTool.GBKToUnicode(maketime); break; case 10: strFieldValue = StrTool.GBKToUnicode(modifydate); break; case 11: strFieldValue = StrTool.GBKToUnicode(modifytime); break; default: strFieldValue = ""; } ; if (strFieldValue.equals("")) { strFieldValue = "null"; } return strFieldValue; }
/** * 取得对应传入参数的String形式的字段值 * * @param: FCode String 希望取得的字段名 * @return: String 如果没有对应的字段,返回"" 如果字段值为空,返回"null" */ public String getV(String FCode) { String strReturn = ""; if (FCode.equalsIgnoreCase("recommend")) { strReturn = StrTool.GBKToUnicode(String.valueOf(recommend)); } if (FCode.equalsIgnoreCase("recommended")) { strReturn = StrTool.GBKToUnicode(String.valueOf(recommended)); } if (FCode.equalsIgnoreCase("sendtimes")) { strReturn = StrTool.GBKToUnicode(String.valueOf(sendtimes)); } if (FCode.equalsIgnoreCase("success")) { strReturn = StrTool.GBKToUnicode(String.valueOf(success)); } if (FCode.equalsIgnoreCase("registered")) { strReturn = StrTool.GBKToUnicode(String.valueOf(registered)); } if (FCode.equalsIgnoreCase("field1")) { strReturn = StrTool.GBKToUnicode(String.valueOf(field1)); } if (FCode.equalsIgnoreCase("field2")) { strReturn = StrTool.GBKToUnicode(String.valueOf(field2)); } if (FCode.equalsIgnoreCase("field3")) { strReturn = StrTool.GBKToUnicode(String.valueOf(field3)); } if (FCode.equalsIgnoreCase("makedate")) { strReturn = StrTool.GBKToUnicode(String.valueOf(makedate)); } if (FCode.equalsIgnoreCase("maketime")) { strReturn = StrTool.GBKToUnicode(String.valueOf(maketime)); } if (FCode.equalsIgnoreCase("modifydate")) { strReturn = StrTool.GBKToUnicode(String.valueOf(modifydate)); } if (FCode.equalsIgnoreCase("modifytime")) { strReturn = StrTool.GBKToUnicode(String.valueOf(modifytime)); } if (strReturn.equals("")) { strReturn = "null"; } return strReturn; }
/** * 数据解包,解包顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpLECRecommendation>历史记账凭证主表信息</A>表字段 * * @param: strMessage String 包含一条纪录数据的字符串 * @return: boolean */ public boolean decode(String strMessage) { try { recommend = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 1, SysConst.PACKAGESPILTER); recommended = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 2, SysConst.PACKAGESPILTER); sendtimes = new Integer(ChgData.chgNumericStr(StrTool.getStr(strMessage, 3, SysConst.PACKAGESPILTER))) .intValue(); success = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 4, SysConst.PACKAGESPILTER); registered = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 5, SysConst.PACKAGESPILTER); field1 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 6, SysConst.PACKAGESPILTER); field2 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 7, SysConst.PACKAGESPILTER); field3 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 8, SysConst.PACKAGESPILTER); makedate = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 9, SysConst.PACKAGESPILTER); maketime = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 10, SysConst.PACKAGESPILTER); modifydate = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 11, SysConst.PACKAGESPILTER); modifytime = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 12, SysConst.PACKAGESPILTER); } catch (NumberFormatException ex) { // @@错误处理 CError tError = new CError(); tError.moduleName = "LECRecommendationSchema"; tError.functionName = "decode"; tError.errorMessage = ex.toString(); this.mErrors.addOneError(tError); return false; } return true; }
public LEDEPolicyMailInfoSet executeQuery(String sql, int nStart, int nCount) { Statement stmt = null; ResultSet rs = null; LEDEPolicyMailInfoSet aLEDEPolicyMailInfoSet = new LEDEPolicyMailInfoSet(); if (!mflag) { con = DBConnPool.getConnection(); } try { stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); rs = stmt.executeQuery(StrTool.GBKToUnicode(sql)); int i = 0; while (rs.next()) { i++; if (i < nStart) { continue; } if (i >= nStart + nCount) { break; } LEDEPolicyMailInfoSchema s1 = new LEDEPolicyMailInfoSchema(); if (!s1.setSchema(rs, i)) { // @@错误处理 CError tError = new CError(); tError.moduleName = "LEDEPolicyMailInfoDB"; tError.functionName = "executeQuery"; tError.errorMessage = "sql语句有误,请查看表名及字段名信息!"; this.mErrors.addOneError(tError); } aLEDEPolicyMailInfoSet.add(s1); } try { rs.close(); } catch (Exception ex) { } try { stmt.close(); } catch (Exception ex1) { } } catch (Exception e) { // @@错误处理 CError tError = new CError(); tError.moduleName = "LEDEPolicyMailInfoDB"; tError.functionName = "executeQuery"; tError.errorMessage = e.toString(); this.mErrors.addOneError(tError); try { rs.close(); } catch (Exception ex2) { } try { stmt.close(); } catch (Exception ex3) { } if (!mflag) { try { con.close(); } catch (Exception et) { } } } if (!mflag) { try { con.close(); } catch (Exception e) { } } return aLEDEPolicyMailInfoSet; }
/** * 取得Schema中指定索引值所对应的字段值 * * @param: nFieldIndex int 指定的字段索引值 * @return: String 如果没有对应的字段,返回"" 如果字段值为空,返回"null" */ public String getV(int nFieldIndex) { String strFieldValue = ""; switch (nFieldIndex) { case 0: strFieldValue = StrTool.GBKToUnicode(tradeNo); break; case 1: strFieldValue = StrTool.GBKToUnicode(contNo); break; case 2: strFieldValue = StrTool.GBKToUnicode(userCode); break; case 3: strFieldValue = StrTool.GBKToUnicode(name); break; case 4: strFieldValue = StrTool.GBKToUnicode(gender); break; case 5: strFieldValue = StrTool.GBKToUnicode(String.valueOf(this.getBirthday())); break; case 6: strFieldValue = StrTool.GBKToUnicode(province); break; case 7: strFieldValue = StrTool.GBKToUnicode(city); break; case 8: strFieldValue = StrTool.GBKToUnicode(mobile); break; case 9: strFieldValue = StrTool.GBKToUnicode(userIDType); break; case 10: strFieldValue = StrTool.GBKToUnicode(userIDNo); break; case 11: strFieldValue = StrTool.GBKToUnicode(riskname); break; case 12: strFieldValue = StrTool.GBKToUnicode(riskcode); break; case 13: strFieldValue = StrTool.GBKToUnicode(userState); break; case 14: strFieldValue = StrTool.GBKToUnicode(userSource); break; case 15: strFieldValue = StrTool.GBKToUnicode(field1); break; case 16: strFieldValue = StrTool.GBKToUnicode(field2); break; case 17: strFieldValue = StrTool.GBKToUnicode(field3); break; case 18: strFieldValue = StrTool.GBKToUnicode(field4); break; case 19: strFieldValue = StrTool.GBKToUnicode(field5); break; case 20: strFieldValue = StrTool.GBKToUnicode(field6); break; case 21: strFieldValue = StrTool.GBKToUnicode(String.valueOf(this.getSearchDate())); break; case 22: strFieldValue = StrTool.GBKToUnicode(searchTime); break; case 23: strFieldValue = StrTool.GBKToUnicode(String.valueOf(this.getMakedate())); break; case 24: strFieldValue = StrTool.GBKToUnicode(maketime); break; default: strFieldValue = ""; } ; if (strFieldValue.equals("")) { strFieldValue = "null"; } return strFieldValue; }
/** * 取得对应传入参数的String形式的字段值 * * @param: FCode String 希望取得的字段名 * @return: String 如果没有对应的字段,返回"" 如果字段值为空,返回"null" */ public String getV(String FCode) { String strReturn = ""; if (FCode.equalsIgnoreCase("tradeNo")) { strReturn = StrTool.GBKToUnicode(String.valueOf(tradeNo)); } if (FCode.equalsIgnoreCase("contNo")) { strReturn = StrTool.GBKToUnicode(String.valueOf(contNo)); } if (FCode.equalsIgnoreCase("userCode")) { strReturn = StrTool.GBKToUnicode(String.valueOf(userCode)); } if (FCode.equalsIgnoreCase("name")) { strReturn = StrTool.GBKToUnicode(String.valueOf(name)); } if (FCode.equalsIgnoreCase("gender")) { strReturn = StrTool.GBKToUnicode(String.valueOf(gender)); } if (FCode.equalsIgnoreCase("birthday")) { strReturn = StrTool.GBKToUnicode(String.valueOf(this.getBirthday())); } if (FCode.equalsIgnoreCase("province")) { strReturn = StrTool.GBKToUnicode(String.valueOf(province)); } if (FCode.equalsIgnoreCase("city")) { strReturn = StrTool.GBKToUnicode(String.valueOf(city)); } if (FCode.equalsIgnoreCase("mobile")) { strReturn = StrTool.GBKToUnicode(String.valueOf(mobile)); } if (FCode.equalsIgnoreCase("userIDType")) { strReturn = StrTool.GBKToUnicode(String.valueOf(userIDType)); } if (FCode.equalsIgnoreCase("userIDNo")) { strReturn = StrTool.GBKToUnicode(String.valueOf(userIDNo)); } if (FCode.equalsIgnoreCase("riskname")) { strReturn = StrTool.GBKToUnicode(String.valueOf(riskname)); } if (FCode.equalsIgnoreCase("riskcode")) { strReturn = StrTool.GBKToUnicode(String.valueOf(riskcode)); } if (FCode.equalsIgnoreCase("userState")) { strReturn = StrTool.GBKToUnicode(String.valueOf(userState)); } if (FCode.equalsIgnoreCase("userSource")) { strReturn = StrTool.GBKToUnicode(String.valueOf(userSource)); } if (FCode.equalsIgnoreCase("field1")) { strReturn = StrTool.GBKToUnicode(String.valueOf(field1)); } if (FCode.equalsIgnoreCase("field2")) { strReturn = StrTool.GBKToUnicode(String.valueOf(field2)); } if (FCode.equalsIgnoreCase("field3")) { strReturn = StrTool.GBKToUnicode(String.valueOf(field3)); } if (FCode.equalsIgnoreCase("field4")) { strReturn = StrTool.GBKToUnicode(String.valueOf(field4)); } if (FCode.equalsIgnoreCase("field5")) { strReturn = StrTool.GBKToUnicode(String.valueOf(field5)); } if (FCode.equalsIgnoreCase("field6")) { strReturn = StrTool.GBKToUnicode(String.valueOf(field6)); } if (FCode.equalsIgnoreCase("searchDate")) { strReturn = StrTool.GBKToUnicode(String.valueOf(this.getSearchDate())); } if (FCode.equalsIgnoreCase("searchTime")) { strReturn = StrTool.GBKToUnicode(String.valueOf(searchTime)); } if (FCode.equalsIgnoreCase("makedate")) { strReturn = StrTool.GBKToUnicode(String.valueOf(this.getMakedate())); } if (FCode.equalsIgnoreCase("maketime")) { strReturn = StrTool.GBKToUnicode(String.valueOf(maketime)); } if (strReturn.equals("")) { strReturn = "null"; } return strReturn; }
/** * 数据解包,解包顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpSearchRecord>历史记账凭证主表信息</A>表字段 * * @param: strMessage String 包含一条纪录数据的字符串 * @return: boolean */ public boolean decode(String strMessage) { try { tradeNo = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 1, SysConst.PACKAGESPILTER); contNo = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 2, SysConst.PACKAGESPILTER); userCode = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 3, SysConst.PACKAGESPILTER); name = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 4, SysConst.PACKAGESPILTER); gender = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 5, SysConst.PACKAGESPILTER); birthday = fDate.getDate( StrTool.getStr(StrTool.GBKToUnicode(strMessage), 6, SysConst.PACKAGESPILTER)); province = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 7, SysConst.PACKAGESPILTER); city = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 8, SysConst.PACKAGESPILTER); mobile = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 9, SysConst.PACKAGESPILTER); userIDType = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 10, SysConst.PACKAGESPILTER); userIDNo = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 11, SysConst.PACKAGESPILTER); riskname = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 12, SysConst.PACKAGESPILTER); riskcode = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 13, SysConst.PACKAGESPILTER); userState = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 14, SysConst.PACKAGESPILTER); userSource = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 15, SysConst.PACKAGESPILTER); field1 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 16, SysConst.PACKAGESPILTER); field2 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 17, SysConst.PACKAGESPILTER); field3 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 18, SysConst.PACKAGESPILTER); field4 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 19, SysConst.PACKAGESPILTER); field5 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 20, SysConst.PACKAGESPILTER); field6 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 21, SysConst.PACKAGESPILTER); searchDate = fDate.getDate( StrTool.getStr(StrTool.GBKToUnicode(strMessage), 22, SysConst.PACKAGESPILTER)); searchTime = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 23, SysConst.PACKAGESPILTER); makedate = fDate.getDate( StrTool.getStr(StrTool.GBKToUnicode(strMessage), 24, SysConst.PACKAGESPILTER)); maketime = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 25, SysConst.PACKAGESPILTER); } catch (NumberFormatException ex) { // @@错误处理 CError tError = new CError(); tError.moduleName = "SearchRecordSchema"; tError.functionName = "decode"; tError.errorMessage = ex.toString(); this.mErrors.addOneError(tError); return false; } return true; }