/** * 取得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; }
/** * 数据打包,按 XML 格式打包,顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpLEPCalMode描述/A>表字段 * * @return: String 返回打包后字符串 */ public String encode() { StringBuffer strReturn = new StringBuffer(256); strReturn.append(StrTool.cTrim(calCode)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(riskCode)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(type)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(calSQL)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(remark)); return strReturn.toString(); }
/** * 数据打包,按 XML 格式打包,顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpLEPRiskDuty描述/A>表字段 * * @return: String 返回打包后字符串 */ public String encode() { StringBuffer strReturn = new StringBuffer(256); strReturn.append(StrTool.cTrim(riskCode)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(riskVer)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(dutyCode)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(choFlag)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(specFlag)); return strReturn.toString(); }
/** * 设置对应传入参数的String形式的字段值 * * @param: FCode String 需要赋值的对象 * @param: FValue String 要赋的值 * @return: boolean */ public boolean setV(String FCode, String FValue) { if (StrTool.cTrim(FCode).equals("")) return false; if (FCode.equalsIgnoreCase("calCode")) { if (FValue != null && !FValue.equals("")) { calCode = FValue.trim(); } else calCode = null; } if (FCode.equalsIgnoreCase("riskCode")) { if (FValue != null && !FValue.equals("")) { riskCode = FValue.trim(); } else riskCode = null; } if (FCode.equalsIgnoreCase("type")) { if (FValue != null && !FValue.equals("")) { type = FValue.trim(); } else type = null; } if (FCode.equalsIgnoreCase("calSQL")) { if (FValue != null && !FValue.equals("")) { calSQL = FValue.trim(); } else calSQL = null; } if (FCode.equalsIgnoreCase("remark")) { if (FValue != null && !FValue.equals("")) { remark = FValue.trim(); } else remark = null; } return true; }
/** * 设置对应传入参数的String形式的字段值 * * @param: FCode String 需要赋值的对象 * @param: FValue String 要赋的值 * @return: boolean */ public boolean setV(String FCode, String FValue) { if (StrTool.cTrim(FCode).equals("")) return false; if (FCode.equalsIgnoreCase("riskCode")) { if (FValue != null && !FValue.equals("")) { riskCode = FValue.trim(); } else riskCode = null; } if (FCode.equalsIgnoreCase("riskVer")) { if (FValue != null && !FValue.equals("")) { riskVer = FValue.trim(); } else riskVer = null; } if (FCode.equalsIgnoreCase("dutyCode")) { if (FValue != null && !FValue.equals("")) { dutyCode = FValue.trim(); } else dutyCode = null; } if (FCode.equalsIgnoreCase("choFlag")) { if (FValue != null && !FValue.equals("")) { choFlag = FValue.trim(); } else choFlag = null; } if (FCode.equalsIgnoreCase("specFlag")) { if (FValue != null && !FValue.equals("")) { specFlag = FValue.trim(); } else specFlag = null; } return true; }
/** * 数据解包,解包顺序参见<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; }
/** * 取得对应传入参数的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; }
/** * 数据打包,按 XML 格式打包,顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpLECRecommendation描述/A>表字段 * * @return: String 返回打包后字符串 */ public String encode() { StringBuffer strReturn = new StringBuffer(256); strReturn.append(StrTool.cTrim(recommend)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(recommended)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(ChgData.chgData(sendtimes)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(success)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(registered)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(field1)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(field2)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(field3)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(makedate)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(maketime)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(modifydate)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(modifytime)); return strReturn.toString(); }
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; }
/** * 取得对应传入参数的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; }
/** * 取得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; }
/** * 数据解包,解包顺序参见<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; }
/** * 取得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 需要赋值的对象 * @param: FValue String 要赋的值 * @return: boolean */ public boolean setV(String FCode, String FValue) { if (StrTool.cTrim(FCode).equals("")) return false; if (FCode.equalsIgnoreCase("tradeNo")) { if (FValue != null && !FValue.equals("")) { tradeNo = FValue.trim(); } else tradeNo = null; } if (FCode.equalsIgnoreCase("contNo")) { if (FValue != null && !FValue.equals("")) { contNo = FValue.trim(); } else contNo = null; } if (FCode.equalsIgnoreCase("userCode")) { if (FValue != null && !FValue.equals("")) { userCode = FValue.trim(); } else userCode = null; } if (FCode.equalsIgnoreCase("name")) { if (FValue != null && !FValue.equals("")) { name = FValue.trim(); } else name = null; } if (FCode.equalsIgnoreCase("gender")) { if (FValue != null && !FValue.equals("")) { gender = FValue.trim(); } else gender = null; } if (FCode.equalsIgnoreCase("birthday")) { if (FValue != null && !FValue.equals("")) { birthday = fDate.getDate(FValue); } else birthday = null; } if (FCode.equalsIgnoreCase("province")) { if (FValue != null && !FValue.equals("")) { province = FValue.trim(); } else province = null; } if (FCode.equalsIgnoreCase("city")) { if (FValue != null && !FValue.equals("")) { city = FValue.trim(); } else city = null; } if (FCode.equalsIgnoreCase("mobile")) { if (FValue != null && !FValue.equals("")) { mobile = FValue.trim(); } else mobile = null; } if (FCode.equalsIgnoreCase("userIDType")) { if (FValue != null && !FValue.equals("")) { userIDType = FValue.trim(); } else userIDType = null; } if (FCode.equalsIgnoreCase("userIDNo")) { if (FValue != null && !FValue.equals("")) { userIDNo = FValue.trim(); } else userIDNo = null; } if (FCode.equalsIgnoreCase("riskname")) { if (FValue != null && !FValue.equals("")) { riskname = FValue.trim(); } else riskname = null; } if (FCode.equalsIgnoreCase("riskcode")) { if (FValue != null && !FValue.equals("")) { riskcode = FValue.trim(); } else riskcode = null; } if (FCode.equalsIgnoreCase("userState")) { if (FValue != null && !FValue.equals("")) { userState = FValue.trim(); } else userState = null; } if (FCode.equalsIgnoreCase("userSource")) { if (FValue != null && !FValue.equals("")) { userSource = FValue.trim(); } else userSource = null; } if (FCode.equalsIgnoreCase("field1")) { if (FValue != null && !FValue.equals("")) { field1 = FValue.trim(); } else field1 = null; } if (FCode.equalsIgnoreCase("field2")) { if (FValue != null && !FValue.equals("")) { field2 = FValue.trim(); } else field2 = null; } if (FCode.equalsIgnoreCase("field3")) { if (FValue != null && !FValue.equals("")) { field3 = FValue.trim(); } else field3 = null; } if (FCode.equalsIgnoreCase("field4")) { if (FValue != null && !FValue.equals("")) { field4 = FValue.trim(); } else field4 = null; } if (FCode.equalsIgnoreCase("field5")) { if (FValue != null && !FValue.equals("")) { field5 = FValue.trim(); } else field5 = null; } if (FCode.equalsIgnoreCase("field6")) { if (FValue != null && !FValue.equals("")) { field6 = FValue.trim(); } else field6 = null; } if (FCode.equalsIgnoreCase("searchDate")) { if (FValue != null && !FValue.equals("")) { searchDate = fDate.getDate(FValue); } else searchDate = null; } if (FCode.equalsIgnoreCase("searchTime")) { if (FValue != null && !FValue.equals("")) { searchTime = FValue.trim(); } else searchTime = null; } if (FCode.equalsIgnoreCase("makedate")) { if (FValue != null && !FValue.equals("")) { makedate = fDate.getDate(FValue); } else makedate = null; } if (FCode.equalsIgnoreCase("maketime")) { if (FValue != null && !FValue.equals("")) { maketime = FValue.trim(); } else maketime = null; } return true; }
/** * 设置对应传入参数的String形式的字段值 * * @param: FCode String 需要赋值的对象 * @param: FValue String 要赋的值 * @return: boolean */ public boolean setV(String FCode, String FValue) { if (StrTool.cTrim(FCode).equals("")) return false; if (FCode.equalsIgnoreCase("recommend")) { if (FValue != null && !FValue.equals("")) { recommend = FValue.trim(); } else recommend = null; } if (FCode.equalsIgnoreCase("recommended")) { if (FValue != null && !FValue.equals("")) { recommended = FValue.trim(); } else recommended = null; } if (FCode.equalsIgnoreCase("sendtimes")) { if (FValue != null && !FValue.equals("")) { Integer tInteger = new Integer(FValue); int i = tInteger.intValue(); sendtimes = i; } } if (FCode.equalsIgnoreCase("success")) { if (FValue != null && !FValue.equals("")) { success = FValue.trim(); } else success = null; } if (FCode.equalsIgnoreCase("registered")) { if (FValue != null && !FValue.equals("")) { registered = FValue.trim(); } else registered = null; } if (FCode.equalsIgnoreCase("field1")) { if (FValue != null && !FValue.equals("")) { field1 = FValue.trim(); } else field1 = null; } if (FCode.equalsIgnoreCase("field2")) { if (FValue != null && !FValue.equals("")) { field2 = FValue.trim(); } else field2 = null; } if (FCode.equalsIgnoreCase("field3")) { if (FValue != null && !FValue.equals("")) { field3 = FValue.trim(); } else field3 = null; } if (FCode.equalsIgnoreCase("makedate")) { if (FValue != null && !FValue.equals("")) { makedate = FValue.trim(); } else makedate = null; } if (FCode.equalsIgnoreCase("maketime")) { if (FValue != null && !FValue.equals("")) { maketime = FValue.trim(); } else maketime = null; } if (FCode.equalsIgnoreCase("modifydate")) { if (FValue != null && !FValue.equals("")) { modifydate = FValue.trim(); } else modifydate = null; } if (FCode.equalsIgnoreCase("modifytime")) { if (FValue != null && !FValue.equals("")) { modifytime = FValue.trim(); } else modifytime = null; } return true; }
/** * 数据打包,按 XML 格式打包,顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpSearchRecord描述/A>表字段 * * @return: String 返回打包后字符串 */ public String encode() { StringBuffer strReturn = new StringBuffer(256); strReturn.append(StrTool.cTrim(tradeNo)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(contNo)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(userCode)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(name)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(gender)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(fDate.getString(birthday))); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(province)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(city)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(mobile)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(userIDType)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(userIDNo)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(riskname)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(riskcode)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(userState)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(userSource)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(field1)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(field2)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(field3)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(field4)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(field5)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(field6)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(fDate.getString(searchDate))); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(searchTime)); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(fDate.getString(makedate))); strReturn.append(SysConst.PACKAGESPILTER); strReturn.append(StrTool.cTrim(maketime)); return strReturn.toString(); }