private boolean initBnf(
     LECBnfSchema b,
     com.sinosoft.ec.webservices.jd.pojo.hebaoRequest.Package rp,
     Err err,
     MMap map,
     HashMap<String, Object> hmap) {
   b.setContNo(((LECContSchema) hmap.get("cont")).getContNo());
   b.setPolNo("000000");
   b.setInsuredNo(((LECInsuredSchema) hmap.get("insured")).getInsuredNo());
   b.setBnfType("1");
   b.setBnfNo("0");
   b.setBnfGrade("1");
   b.setRelationToInsured("");
   b.setBnfLot(0);
   //		b.setCustomerNo("");
   //		b.setName("");
   //		b.setSex("");
   //		b.setBirthday("");
   //		b.setBnfIDNo("");
   //		b.setBnfIDType("");
   b.setOperator(((LECContSchema) hmap.get("cont")).getOperator());
   b.setMakeDate(PubFun.getCurrentDate());
   b.setMakeTime(PubFun.getCurrentTime());
   b.setModifyDate(PubFun.getCurrentDate());
   b.setModifyTime(PubFun.getCurrentTime());
   map.put(b, "INSERT");
   return true;
 }
 public void cancelRelaCom() {
   LEDBankComRelaSchema tBankComRelaSchema = new LEDBankComRelaSchema();
   tBankComRelaSchema.setBankCode(this.getBankCode());
   tBankComRelaSchema.setComCode(this.getComCode());
   tBankComRelaSchema.setPayFlag(this.getPayFlag());
   LEDBankComRelaDB tBankComRelaDB = new LEDBankComRelaDB();
   tBankComRelaDB.setSchema(tBankComRelaSchema);
   LEDBankComRelaSet tBankComRelaSet = tBankComRelaDB.query();
   if (tBankComRelaSet.size() < 1) {
     this.setOperateCode("cancelRelaCom_Fail010");
     this.operateNotice =
         ECPubFun.getDisplayString(valiConfig.getBundle(), this.operateCode, null);
     return;
   }
   MMap map = new MMap();
   map.put(tBankComRelaSchema, "DELETE");
   mVData.clear();
   mVData.add(map);
   PubSubmit pubSubmit = new PubSubmit();
   if (!pubSubmit.submitData(mVData, "delete")) {
     this.setOperateCode("cancelRelaCom_Fail020");
     this.operateNotice =
         ECPubFun.getDisplayString(valiConfig.getBundle(), this.operateCode, null);
     return;
   } else {
     this.setOperateCode("cancelRelaCom_Succ010");
     this.operateNotice =
         ECPubFun.getDisplayString(valiConfig.getBundle(), this.operateCode, null);
     queryComInfo();
     return;
   }
 }
Exemplo n.º 3
0
  /** 修改广告来源信息 */
  public void modifyADSouce() {

    LEDAdSourceDB tLEDAdSourceDB = new LEDAdSourceDB();
    tLEDAdSourceDB.setProductCode(this.getProductCode());
    tLEDAdSourceDB.setSiteCode(this.getSiteCode());
    if (!tLEDAdSourceDB.getInfo()) {
      operateResult = "Fail|修改失败,数据库中没有此广告来源信息";
      return;
    }
    LEDAdSourceSchema tLEDAdSourceSchema = new LEDAdSourceSchema();
    tLEDAdSourceSchema.setSchema(tLEDAdSourceDB.getSchema());
    tLEDAdSourceSchema.setPayMode(this.getPayMode());
    tLEDAdSourceSchema.setContent(this.getContent());

    MMap map = new MMap();
    map.put(tLEDAdSourceSchema, "UPDATE");

    PubSubmit tPubSubmit = new PubSubmit();
    VData cVData = new VData();
    cVData.add(map);
    if (!tPubSubmit.submitData(cVData, "")) {
      operateResult = "Fail|修改操作失败";
      return;
    } else {
      operateResult = "Succ|修改成功";
      initData();
      return;
    }
  }
 private boolean initPol(
     com.sinosoft.ec.webservices.jd.pojo.hebaoRequest.Package rp,
     Err err,
     MMap map,
     HashMap<String, Object> hmap) {
   ArrayList<LECPolSchema> list = u.getPolList(rp, hmap);
   for (int i = 0; i < list.size(); i++) {
     map.put(list.get(i), "INSERT");
   }
   return true;
 }
Exemplo n.º 5
0
 /** 删除数据 */
 public void deleteById() {
   String sql =
       "delete from ledadsource where sitecode='"
           + this.getSiteCode()
           + "' and productcode='"
           + this.getProductCode()
           + "'";
   MMap map = new MMap();
   map.put(sql, "DELETE");
   VData tVData = new VData();
   tVData.add(map);
   PubSubmit tPubSubmit = new PubSubmit();
   if (tPubSubmit.submitData(tVData, "")) {
     operateResult = "succ|删除成功";
     initData();
     find();
   } else {
     operateResult = "fail|删除失败";
   }
 }
 private boolean initAppnt(
     LECAppntSchema appnt,
     com.sinosoft.ec.webservices.jd.pojo.hebaoRequest.Package rp,
     Err err,
     MMap map,
     HashMap<String, Object> hmap) {
   appnt.setContNo(u.getContNo(rp));
   appnt.setManageCom(u.getManageCom(rp));
   appnt.setAppntNo(PubFun1.CreateMaxNo("CustomerNo", "SN"));
   //		appnt.setAppntGrade("");//null
   appnt.setAppntName(rp.getRequest().getApplyinfo().getHolderinfo().getHolderName());
   appnt.setAppntSex(
       "1".equals(rp.getRequest().getApplyinfo().getHolderinfo().getHolderSex()) ? "M" : "F");
   appnt.setAppntBirthday(u.getHolderBirthdayFromIDNo(rp));
   appnt.setAppntType("1");
   appnt.setAddressNo("1");
   appnt.setAppntIDType(
       u.getiCareCardTypeWithJDCardType(
           rp.getRequest()
               .getApplyinfo()
               .getHolderinfo()
               .getHolderCardType())); // 需要确认证件类型是否由Metlife提供
   appnt.setAppntIDNo(rp.getRequest().getApplyinfo().getHolderinfo().getHolderCardNo());
   //		appnt.setNationality("");
   //		appnt.setRgtAddress("");
   //		appnt.setMarriage("");
   //		appnt.setHealth("");
   appnt.setStature(0);
   appnt.setAvoirdupois(0);
   //		appnt.setDegree("");
   //		appnt.setCreditGrade("");
   appnt.setBankCode(""); // 待确认
   LisIDEA tLisIDEA = new LisIDEA();
   appnt.setBankAccNo(tLisIDEA.encryptString(rp.getRequest().getOtherinfo().getBankCode()));
   appnt.setBankName(""); // 待确认
   appnt.setAccName(""); // 待确认
   //		appnt.setBankAccNo("");
   appnt.setOccupationType("1"); // 京东要求自默认一个职业   默认为银行、保险、信托、租赁行业的 一般内勤
   appnt.setOccupationCode("1601001"); // 京东要求自默认一个职业   默认为银行、保险、信托、租赁行业的 一般内勤
   appnt.setWorkType("106"); // 京东要求自默认一个职业   默认为银行、保险、信托、租赁行业的 一般内勤
   //		appnt.setPluralityType("");
   //		appnt.setSmokeFlag("");
   appnt.setOperator(rp.getRequest().getApplyinfo().getHolderinfo().getHolderEmail());
   appnt.setMakeDate(PubFun.getCurrentDate());
   appnt.setMakeTime(PubFun.getCurrentTime());
   appnt.setModifyDate(PubFun.getCurrentDate());
   appnt.setModifyTime(PubFun.getCurrentTime());
   map.put(appnt, "INSERT");
   return true;
 }
 private boolean initCont(
     LECContSchema cont,
     com.sinosoft.ec.webservices.jd.pojo.hebaoRequest.Package rp,
     Err err,
     MMap map,
     HashMap<String, Object> hmap) {
   cont.setOrderNo(((LECOrderInfoSchema) hmap.get("order")).getOrderNo());
   cont.setProposalContNo(((LECAppntSchema) hmap.get("appnt")).getContNo());
   cont.setContNo(cont.getProposalContNo());
   cont.setContType("1");
   cont.setPolType("0");
   cont.setCardFlag("0");
   cont.setManageCom(u.getManageCom(rp));
   cont.setExecuteCom(cont.getManageCom());
   cont.setSaleChnl("99"); // 网销99
   cont.setAppntNo(((LECAppntSchema) hmap.get("appnt")).getAppntNo());
   cont.setAppntName(((LECAppntSchema) hmap.get("appnt")).getAppntName());
   cont.setAppntSex(((LECAppntSchema) hmap.get("appnt")).getAppntSex());
   cont.setAppntBirthday(((LECAppntSchema) hmap.get("appnt")).getAppntBirthday());
   cont.setAppntIDType(((LECAppntSchema) hmap.get("appnt")).getAppntIDType());
   cont.setAppntIDNo(((LECAppntSchema) hmap.get("appnt")).getAppntIDNo());
   cont.setInsuredNo(((LECInsuredSchema) hmap.get("insured")).getInsuredNo());
   cont.setInsuredName(((LECInsuredSchema) hmap.get("insured")).getName());
   cont.setInsuredSex(((LECInsuredSchema) hmap.get("insured")).getSex());
   cont.setInsuredBirthday(((LECInsuredSchema) hmap.get("insured")).getBirthday());
   cont.setInsuredIDType(((LECInsuredSchema) hmap.get("insured")).getInsuredIDType());
   cont.setInsuredIDNo(((LECInsuredSchema) hmap.get("insured")).getInsuredIDNo());
   cont.setPrintCount("1");
   cont.setAppFlag("0");
   cont.setState("0");
   //		cont.setLang("");//null
   cont.setCurrency("JD");
   cont.setRemark(rp.getRequest().getApplyinfo().getHolderinfo().getHolderZip());
   cont.setPeoples("1");
   cont.setMult(rp.getRequest().getOrder().getInsuranceNum());
   cont.setPrem(rp.getRequest().getOrder().getTotalPrice());
   cont.setAmnt(u.getAmntFromRP(rp));
   cont.setSumPrem(cont.getPrem());
   cont.setDif(0);
   //		cont.setPaytoDate("");//null
   //		cont.setFirstPayDate("");//null
   cont.setCValiDate(u.getValidate(rp));
   cont.setOperator(rp.getRequest().getApplyinfo().getHolderinfo().getHolderEmail());
   cont.setMakeDate(PubFun.getCurrentDate());
   cont.setMakeTime(PubFun.getCurrentTime());
   cont.setModifyDate(PubFun.getCurrentDate());
   cont.setModifyTime(PubFun.getCurrentTime());
   map.put(cont, "INSERT");
   return true;
 }
 private boolean initOrder(
     LECOrderInfoSchema order,
     com.sinosoft.ec.webservices.jd.pojo.hebaoRequest.Package rp,
     Err err,
     MMap map,
     HashMap<String, Object> hmap) {
   /** 暂时未设置的值核保时不设置 */
   order.setOrderNo(PubFun1.CreateMaxNo("OrderNo", "SN"));
   order.setContPlanCode(rp.getHeader().getProductCode());
   //		order.setTradeNo("");//null
   order.setManageCom(u.getManageCom(rp));
   order.setApplyDate(PubFun.getCurrentDate());
   //		order.setAcceptDate("");//null
   order.setCValiDate(u.getValidate(rp));
   //		order.setAcceptPolDate("");//空的
   order.setCInValiDate(u.getInValidate(rp));
   order.setPolTerm(u.getPolTerm(rp));
   //		order.setPayDate("");//null
   order.setPayMode("JD"); // 京东支付
   order.setPayPeriod("0"); // 目前为趸交
   //		order.setPayIntv(u.getpayintv(rp));
   order.setPayIntv("0"); // 目前为趸交
   //		order.setGetMode("");//null
   order.setAutoPay("0");
   order.setOrderState("B");
   order.setOperator(rp.getRequest().getApplyinfo().getHolderinfo().getHolderEmail());
   order.setMakeDate(PubFun.getCurrentDate());
   order.setMakeTime(PubFun.getCurrentTime());
   order.setModifyDate(PubFun.getCurrentDate());
   order.setModifyTime(PubFun.getCurrentTime());
   //		order.setPayState("");//null
   //		order.setCancelDate("");//null
   //		order.setCancelTime("");//null
   order.setPolTermType(u.getPolTermType(rp));
   //		order.setInterfaceCode("");//null
   order.setCValiTime(u.getValidateTime(rp));
   //		order.setField1("");//null
   //		order.setField2("");//null
   //		order.setField3("");//null//付款单号,可用于对账
   //		order.setField4("");//null
   //		order.setField5("");//null
   //		order.setField6("");//null
   //		order.setField7("");//null
   order.setField8(rp.getRequest().getOrder().getOrderId()); // 京东订单号存放在这个字段
   //		order.setField9("");//null
   //		order.setField10("");//null
   order.setAFYP("0.00");
   map.put(order, "INSERT");
   return true;
 }
 private boolean initInsuredAddress(
     LECAddressSchema i,
     com.sinosoft.ec.webservices.jd.pojo.hebaoRequest.Package rp,
     Err err,
     MMap map,
     HashMap<String, Object> hmap) {
   i.setCustomerNo(((LECInsuredSchema) hmap.get("insured")).getInsuredNo());
   i.setAddressNo("1");
   i.setPostalAddress(
       rp.getRequest()
           .getApplyinfo()
           .getInsuredlist()
           .getInsuredList()
           .get(0)
           .getInsuredAddress());
   i.setZipCode(
       rp.getRequest().getApplyinfo().getInsuredlist().getInsuredList().get(0).getInsuredZip());
   //		i.setPhone("");
   //		i.setFax("");
   //		i.setHomeAddress("");
   //		i.setHomeZipCode("");
   //		i.setHomePhone("");
   //		i.setHomeFax("");
   LisIDEA tLisIDEA = new LisIDEA();
   i.setMobile(
       tLisIDEA.encryptString(
           rp.getRequest()
               .getApplyinfo()
               .getInsuredlist()
               .getInsuredList()
               .get(0)
               .getInsuredMobile()));
   tLisIDEA = null;
   //		i.setMobileChs("");
   i.setEMail(
       rp.getRequest().getApplyinfo().getInsuredlist().getInsuredList().get(0).getInsuredEmail());
   //		i.setNativePlace("");
   i.setProvince("");
   i.setCity(""); // 待确认
   i.setOperator(((LECAppntSchema) hmap.get("appnt")).getOperator());
   i.setMakeDate(PubFun.getCurrentDate());
   i.setMakeTime(PubFun.getCurrentTime());
   i.setModifyDate(PubFun.getCurrentDate());
   i.setModifyTime(PubFun.getCurrentTime());
   //		i.setAreaCode("");
   //		i.setPhoneExt("");
   map.put(i, "INSERT");
   return true;
 }
  private boolean copyAppntInfoToInsured(
      LECAppntSchema a,
      LECInsuredSchema i,
      MMap map,
      HashMap<String, Object> hmap,
      com.sinosoft.ec.webservices.jd.pojo.hebaoRequest.Package rp) {
    i.setContNo(a.getContNo());
    i.setInsuredNo(a.getAppntNo());
    i.setAppntNo(a.getAppntNo());
    i.setManageCom(a.getManageCom());
    i.setExecuteCom(a.getManageCom());
    i.setMasterContNo(a.getContNo());
    i.setMasterInsuredNo(i.getInsuredNo());
    i.setRelationToMainInsured("00");
    i.setRelationToAppnt("0");
    i.setAddressNo("1");
    i.setName(a.getAppntName());
    i.setSex(a.getAppntSex());
    i.setBirthday(a.getAppntBirthday());
    i.setInsuredIDType(a.getAppntIDType());
    i.setInsuredIDNo(a.getAppntIDNo());
    //		i.setNationality("");
    //		i.setMarriage("");
    //		i.setHealth("");
    i.setStature(0);
    //		i.setAvoirdupois("");
    //		i.setDegree("");
    //		i.setCreditGrade("");
    //		i.setBankName("");
    //		i.setAccName("");
    //		i.setBankAccNo("");
    i.setOccupationType(a.getOccupationType());
    i.setOccupationCode(a.getOccupationCode());
    i.setWorkType(a.getWorkType());
    //		i.setPluralityType("");
    //		i.setSmokeFlag("");
    //		i.setContPlanCode(rp.getHeader().getProductCode());
    i.setBMI(0);
    i.setInsuredPeoples("1");
    //		i.setInsuredState("");
    i.setOperator(a.getOperator());
    i.setMakeDate(PubFun.getCurrentDate());
    i.setMakeTime(PubFun.getCurrentTime());
    i.setModifyDate(PubFun.getCurrentDate());
    i.setModifyTime(PubFun.getCurrentTime());
    map.put(i, "INSERT");

    return true;
  }
 private boolean initInsured(
     LECInsuredSchema i,
     com.sinosoft.ec.webservices.jd.pojo.hebaoRequest.Package rp,
     Err err,
     MMap map,
     HashMap<String, Object> hmap) {
   i.setContNo(((LECAppntSchema) hmap.get("appnt")).getContNo());
   i.setInsuredNo(PubFun1.CreateMaxNo("CustomerNo", "SN"));
   i.setAppntNo(((LECAppntSchema) hmap.get("appnt")).getAppntNo());
   i.setManageCom(((LECAppntSchema) hmap.get("appnt")).getManageCom());
   i.setExecuteCom(i.getManageCom());
   i.setMasterContNo(((LECAppntSchema) hmap.get("appnt")).getContNo());
   i.setMasterInsuredNo(i.getInsuredNo());
   i.setRelationToMainInsured("00");
   i.setRelationToAppnt(
       u.dealRelation(
           rp.getRequest()
               .getApplyinfo()
               .getInsuredlist()
               .getInsuredList()
               .get(0)
               .getInsuredRelation(),
           i.getSex()));
   i.setAddressNo("1");
   i.setName(
       rp.getRequest().getApplyinfo().getInsuredlist().getInsuredList().get(0).getInsuredName());
   i.setSex(
       "1"
               .equals(
                   rp.getRequest()
                       .getApplyinfo()
                       .getInsuredlist()
                       .getInsuredList()
                       .get(0)
                       .getInsuredSex())
           ? "M"
           : "F");
   i.setBirthday(u.getInsuredBirthday(rp)); // 确认证件类型是否由metlife提供
   i.setInsuredIDType(
       rp.getRequest()
           .getApplyinfo()
           .getInsuredlist()
           .getInsuredList()
           .get(0)
           .getInsuredCardType()); //// 确认
   i.setInsuredIDNo(
       rp.getRequest()
           .getApplyinfo()
           .getInsuredlist()
           .getInsuredList()
           .get(0)
           .getInsuredCardNo()); // 确认
   //		i.setNationality("");
   //		i.setMarriage("");
   //		i.setHealth("");
   i.setStature(0);
   //		i.setAvoirdupois("");
   //		i.setDegree("");
   //		i.setCreditGrade("");
   //		i.setBankName("");
   //		i.setAccName("");
   //		i.setBankAccNo("");
   i.setOccupationType("1"); // 京东要求自默认一个职业   默认为银行、保险、信托、租赁行业的 一般内勤
   i.setOccupationCode("1601001"); // 京东要求自默认一个职业   默认为银行、保险、信托、租赁行业的 一般内勤
   i.setWorkType("106"); // 京东要求自默认一个职业   默认为银行、保险、信托、租赁行业的 一般内勤
   //		i.setPluralityType("");
   //		i.setSmokeFlag("");
   //		i.setContPlanCode("");
   i.setBMI(0);
   i.setInsuredPeoples("1");
   //		i.setInsuredState("");
   i.setOperator(((LECAppntSchema) hmap.get("appnt")).getOperator());
   i.setMakeDate(PubFun.getCurrentDate());
   i.setMakeTime(PubFun.getCurrentTime());
   i.setModifyDate(PubFun.getCurrentDate());
   i.setModifyTime(PubFun.getCurrentTime());
   map.put(i, "INSERT");
   return true;
 }
  @SuppressWarnings("unchecked")
  public void save() throws IOException {
    boolean cFlag = true;
    if (!processFile()) {
      cFlag = false;
    }
    // 选中险种的个数
    int n = risks.length;
    LEPPlanRiskSet mLEPPlanRiskSet = new LEPPlanRiskSet();
    LEPPlanSchema mLEPPlanSchema = null;
    String contPlanCode = "";
    if (cFlag) {
      if (n > 0) {
        mLEPPlanSchema = new LEPPlanSchema();
        SysMaxNoMETLIFE tSysMaxNoMETLIFE = new SysMaxNoMETLIFE();
        contPlanCode = tSysMaxNoMETLIFE.CreateMaxNo("SerialNo", 10);
        mLEPPlanSchema.setContPlanCode(contPlanCode);
        mLEPPlanSchema.setContPlanName(planName);
        mLEPPlanSchema.setPlanType("00");
        mLEPPlanSchema.setPlanRiskType("H");
        mLEPPlanSchema.setPlanRule(rule);
        // modify by fengzg 将产品介绍写入文件
        String fileName = "planIntro_" + contPlanCode + ".txt";
        mLEPPlanSchema.setPlanIntro(fileName);
        ECPubFun.writeStringToFile(ECPubFun.getFCKEditFile(fileName), introduce);
        mLEPPlanSchema.setSaleStartDate(startDate);
        mLEPPlanSchema.setSaleEndDate(endDate);
        if (timeoutDef == null || "".equals(timeoutDef)) {
          // mLEPPlanSchema.setOverTime("24");
        } else {
          mLEPPlanSchema.setOverTime(timeoutDef);
        }
        mLEPPlanSchema.setOverTimeFlag("H");
        mLEPPlanSchema.setOperator(getVisitor().getUser().getUserName());
        String currentDate = PubFun.getCurrentDate();
        String currentTime = PubFun.getCurrentTime();
        mLEPPlanSchema.setMakeDate(currentDate);
        mLEPPlanSchema.setMakeTime(currentTime);
        mLEPPlanSchema.setModifyDate(currentDate);
        mLEPPlanSchema.setModifyTime(currentTime);
        // add ---wangzhixin----2009/07/21  start
        mLEPPlanSchema.setFileName(this.myFile);
        // add ---wangzhixin----2009/07/21  end
        for (int i = 0; i < n; i++) {
          LEPPlanRiskSchema mLEPPlanRiskSchema = new LEPPlanRiskSchema();
          mLEPPlanRiskSchema.setContPlanCode(contPlanCode);
          mLEPPlanRiskSchema.setContPlanName(planName);
          mLEPPlanRiskSchema.setMainRiskCode(planMainRisk);
          mLEPPlanRiskSchema.setRiskCode(risks[i]);
          mLEPPlanRiskSchema.setPlanType("00");
          mLEPPlanRiskSchema.setOperator(getVisitor().getUser().getUserName());
          mLEPPlanRiskSchema.setMakeDate(currentDate);
          mLEPPlanRiskSchema.setMakeTime(currentTime);
          mLEPPlanRiskSchema.setModifyDate(currentDate);
          mLEPPlanRiskSchema.setModifyTime(currentTime);
          mLEPPlanRiskSet.add(mLEPPlanRiskSchema);
        }
      }
      MMap map = new MMap();
      map.put(mLEPPlanSchema, "INSERT");
      map.put(mLEPPlanRiskSet, "INSERT");
      PubSubmit tPubSubmit = new PubSubmit();
      VData cVData = new VData();
      cVData.add(map);
      FacesContext fc = getFacesContext();
      HttpServletRequest request = (HttpServletRequest) fc.getExternalContext().getRequest();

      if (tPubSubmit.submitData(cVData, "")) {
        operateResult = "succ";
        planCode = contPlanCode;
        setInit("1");
        //				FacesContext fc = getFacesContext();
        //		        HttpServletResponse response = (HttpServletResponse)
        // fc.getExternalContext().getResponse();
        //		        PrintWriter out =  response.getWriter();
        //		        out.write("javascrip:alert(保存成功,生成的产品组合编码是"+contPlanCode+")");
        request.setAttribute("result", operateResult);
        request.setAttribute("planCode", planCode);
      } else {
        operateResult = "fail";
        request.setAttribute("result", operateResult);
      }
    } else {
      operateResult = "checkfail";
    }
  }
Exemplo n.º 13
0
  /** 保存数据 */
  public void save() {
    if (this.getSiteName() == null || "".equals(this.getSiteName())) {
      operateResult = "Fail|" + "网站名称不能为空!";
      return;
    }

    if (this.getSiteCode() == null || "".equals(this.getSiteCode())) {
      operateResult = "Fail|" + "网站缩写不能为空!";
      return;
    }

    if (this.getProductCode() == null || "".equals(this.getProductCode())) {
      operateResult = "Fail|" + "产品不能为空!";
      return;
    }

    if (this.getSiteType() == null || "".equals(this.getSiteType())) {
      operateResult = "Fail|" + "网站类型不能为空!";
      return;
    }
    if (this.payModelList == null || this.payModelList.length < 1) {
      operateResult = "Fail|" + "支付方式不能为空!";
      return;
    }

    String type = "";
    String sql =
        "select siteCode,siteType from ledadsource where siteCode='" + this.getSiteCode() + "'";
    ExeSQL tExeSQL = new ExeSQL();
    SSRS tSSRS = new SSRS();
    tSSRS = tExeSQL.execSQL(sql);
    int row = tSSRS.getMaxRow();
    if (row > 0) {
      type = tSSRS.GetText(1, 2);
      if (!this.getSiteType().equals(type)) {
        operateResult = "Fail|网站编码在数据库中已存在,输入的网站类型与存在的不一致!";
        return;
      }
    }

    sql =
        "select siteCode from ledadsource where "
            + "siteCode='"
            + this.getSiteCode()
            + "' "
            + "and productcode='"
            + this.getProductCode()
            + "'";
    tExeSQL = new ExeSQL();
    tSSRS = new SSRS();
    tSSRS = tExeSQL.execSQL(sql);
    row = tSSRS.getMaxRow();
    if (row > 0) {
      operateResult = "Fail|" + "添加失败!该数据在数据库中已存在!";
      return;
    }
    if ("all".equals(this.getProductCode())) {
      this.setVisitedPage("首页面");
    } else if ("register".equals(this.getProductCode())) {
      this.setVisitedPage("注册页面");
    } else if ("actIndex".equals(this.getProductCode())) {
      this.setVisitedPage("宣传页面");
    } else if ("readIndex".equals(this.getProductCode())) {
      this.setVisitedPage("阅读投保须知页面");
    } else {
      sql =
          "select contplanname from lepplan where contplancode='"
              + this.getProductCode()
              + "' and plantype='00'";
      this.setVisitedPage(tExeSQL.getOneValue(sql));
    }

    String siteUrl = "http://icare.metlife.com.cn/visit.jsf?source=";
    LisIDEA tLisIDEA = new LisIDEA();
    siteUrl = siteUrl + tLisIDEA.encryptString(this.getSiteCode());
    siteUrl = siteUrl + "&product=" + tLisIDEA.encryptString(this.getProductCode());
    LEDAdSourceSchema tLEDAdSourceSchema = new LEDAdSourceSchema();
    tLEDAdSourceSchema.setContent(this.getContent());
    tLEDAdSourceSchema.setProductCode(this.getProductCode());
    tLEDAdSourceSchema.setSiteCode(this.getSiteCode());
    tLEDAdSourceSchema.setSiteName(this.getSiteName());
    tLEDAdSourceSchema.setSiteType(this.getSiteType());
    tLEDAdSourceSchema.setUrl(siteUrl);
    tLEDAdSourceSchema.setPayMode(this.getPayMode());
    tLEDAdSourceSchema.setVisitedPage(this.getVisitedPage());
    MMap map = new MMap();
    map.put(tLEDAdSourceSchema, "INSERT");

    PubSubmit tPubSubmit = new PubSubmit();
    VData cVData = new VData();
    cVData.add(map);
    if (!tPubSubmit.submitData(cVData, "")) {
      operateResult = "Fail|添加失败";
      return;
    } else {
      operateResult = "Succ|添加成功";
      initData();
      find();
      return;
    }
  }