示例#1
0
  // 删除批量
  @RequestMapping("InputDel")
  public String delDtl(Model model, FTZ210205Form form) {
    logger.info("买入返售资产查询批量删除开始...");
    FtzInMsgCtl del_FtzInMsgCtl = new FtzInMsgCtl();
    del_FtzInMsgCtl.setMsgId(form.getSelected_msgId());
    FtzInMsgCtl ftzInMsgCtl = new FtzInMsgCtl();
    ftzInMsgCtl.setMsgId(form.getSelected_msgId());
    FtzInTxnDtl query_FtzInTxnDtl = new FtzInTxnDtl();
    query_FtzInTxnDtl.setMsgId(form.getSelected_msgId());
    List<FtzInTxnDtl> ftzInTxnDtls = ftz210205Serv.queryFtzInTxnDtlList(query_FtzInTxnDtl);

    if (null != ftzInTxnDtls) {
      for (FtzInTxnDtl ftzInTxnDtl : ftzInTxnDtls) {
        if (CommonConst.FTZ_MSG_STATUS_AUTH_SUCC.equals(ftzInTxnDtl.getChkStatus())) {
          model.addAttribute(ResultMessages.error().add("e.ftzmis.210101.0035"));
          form.setSelected_msgId("");
          logger.info("买入返售资产查询批量删除结束...");
          return "forward:/FTZ210204/AddQry";
        }
      }
    }

    FtzInMsgCtl query_FtzInMsgCtl = new FtzInMsgCtl();
    query_FtzInMsgCtl.setMsgId(form.getSelected_msgId());
    // 查询数据
    FtzInMsgCtl result_FtzInMsgCtl = ftz210205Serv.queryFtzInMsgCtl(query_FtzInMsgCtl);
    if (!CommonConst.FTZ_MSG_STATUS_INPUTING.equals(result_FtzInMsgCtl.getMsgStatus())
        && !CommonConst.FTZ_MSG_STATUS_INPUT_COMPLETED.equals(result_FtzInMsgCtl.getMsgStatus())
        && !CommonConst.FTZ_MSG_STATUS_AUTH_FAIL.equals(result_FtzInMsgCtl.getMsgStatus())) {
      model.addAttribute(ResultMessages.error().add("e.ftzmis.210101.0036"));
      form.setSelected_msgId("");
      logger.info("买入返售资产查询批量删除结束...");
      return "forward:/FTZ210205/AddQry";
    }
    int i = ftz210205Serv.deleteFtzInMsgCtl(del_FtzInMsgCtl);

    if (i < 1) {
      model.addAttribute(ResultMessages.error().add("e.sysrunner.0002"));
      form.setSelected_msgId("");
    } else {
      model.addAttribute(ResultMessages.success().add("i.ftzmis.210303.0007"));
      form.setSelected_msgId("");
      logger.info("买入返售查询批量删除结束...");
      return "forward:/FTZ210205/AddQry";
    }

    logger.info("买入返售资产查询批量删除结束...");
    return "forward:/FTZ210205/AddQry";
  }
示例#2
0
  @RequestMapping("QryAuthDtlDtl")
  public String queryAuthDtlDtl(Model model, FTZ210205Form form) {

    FtzInMsgCtl query_FtzInMsgCtl = new FtzInMsgCtl();
    query_FtzInMsgCtl.setMsgId(form.getSelected_msgId());
    FtzInMsgCtl result_FtzInMsgCtl = ftz210205Serv.queryFtzInMsgCtl(query_FtzInMsgCtl);
    form.setFather_makTime(result_FtzInMsgCtl.getMakDatetime());
    form.setFather_chkTime(result_FtzInMsgCtl.getChkDatetime());
    model.addAttribute("fatherStatus", result_FtzInMsgCtl.getMsgStatus());

    FtzInTxnDtl query_FtzInTxnDtl = new FtzInTxnDtl();
    query_FtzInTxnDtl.setMsgId(form.getSelected_msgId());
    query_FtzInTxnDtl.setSeqNo(form.getSelected_seqNo());

    FtzInTxnDtl result_FtzInTxnDtl = ftz210205Serv.queryFtzInTxnDtl(query_FtzInTxnDtl);

    if (null == result_FtzInTxnDtl) {
      model.addAttribute(ResultMessages.info().add("w.sm.0001"));
      return "ftzmis/FTZ210205_Auth_Qry_Dtl";
    }
    result_FtzInTxnDtl.setTranDate(
        DateUtil.getFormatDateAddSprit(result_FtzInTxnDtl.getTranDate()));
    result_FtzInTxnDtl.setOrgTranDate(
        DateUtil.getFormatDateAddSprit(result_FtzInTxnDtl.getOrgTranDate()));
    result_FtzInTxnDtl.setExpireDate(
        DateUtil.getFormatDateAddSprit(result_FtzInTxnDtl.getExpireDate()));
    result_FtzInTxnDtl.setMakDatetime(
        DateUtil.getFormatDateTimeAddSpritAndColon(result_FtzInTxnDtl.getMakDatetime()));
    result_FtzInTxnDtl.setChkDatetime(
        DateUtil.getFormatDateTimeAddSpritAndColon(result_FtzInTxnDtl.getChkDatetime()));
    if (null != result_FtzInTxnDtl.getOppBankCode()
        || !"".equals(result_FtzInTxnDtl.getOppBankCode())) {
      FtzBankCode query_FtzBankCode = new FtzBankCode();
      query_FtzBankCode.setBankCode(result_FtzInTxnDtl.getOppBankCode());
      FtzBankCode result_FtzBankCode = ftz210205Serv.queryFtzBankCode(query_FtzBankCode);
      if (null != result_FtzBankCode) {
        result_FtzInTxnDtl.setOppBankName(result_FtzBankCode.getBankName());
      }
    }

    form.setFtzInTxnDtl(result_FtzInTxnDtl);
    return "ftzmis/FTZ210205_Auth_Qry_Dtl_Dtl";
  }
示例#3
0
  @RequestMapping("AuthDtlSubmit")
  public String AuthDtlSubmit(Model model, FTZ210205Form form) {
    FtzInMsgCtl query_FtzInMsgCtl = new FtzInMsgCtl();
    query_FtzInMsgCtl.setMsgId(form.getSelected_msgId());
    FtzInMsgCtl result_FtzInMsgCtl = ftz210205Serv.queryFtzInMsgCtl(query_FtzInMsgCtl);
    if (CommonConst.FTZ_MSG_STATUS_INPUTING.equals(result_FtzInMsgCtl.getMsgStatus())) {
      model.addAttribute(ResultMessages.error().add("e.ftzmis.210101.0032"));
      return "forward:/FTZ210205/QryAuthDtl";
    }
    UserInf userInfo = ContextConst.getCurrentUser();
    if (userInfo.getUserid().equals(result_FtzInMsgCtl.getMakUserId())) {
      model.addAttribute(ResultMessages.error().add("e.ftzmis.210101.0025"));
      return "forward:/FTZ210205/QryAuthDtl";
    }
    FtzInTxnDtl query_FtzInTxnDtl = new FtzInTxnDtl();
    query_FtzInTxnDtl.setMsgId(form.getSelected_msgId());
    List<FtzInTxnDtl> ftzInTxnDtls = ftz210205Serv.queryFtzInTxnDtlList(query_FtzInTxnDtl);
    if (null == ftzInTxnDtls || ftzInTxnDtls.size() < 1) {
      FtzInMsgCtl update_FtzInMsgCtl = new FtzInMsgCtl();
      update_FtzInMsgCtl.setMsgId(form.getFtzInMsgCtl().getMsgId());
      update_FtzInMsgCtl.setMsgNo(CommonConst.MSG_NO_210205);
      update_FtzInMsgCtl.setMsgStatus(CommonConst.FTZ_MSG_STATUS_AUTH_SUCC);
      update_FtzInMsgCtl.setChkUserId(userInfo.getUserid());
      update_FtzInMsgCtl.setRsv1(
          DateUtil.getFormatDateTimeRemoveSpritAndColon(form.getFtzInMsgCtl().getMakDatetime()));
      update_FtzInMsgCtl.setRsv2(
          DateUtil.getFormatDateTimeRemoveSpritAndColon(form.getFtzInMsgCtl().getChkDatetime()));
      update_FtzInMsgCtl.setChkDatetime(DateUtil.getNowInputDateTime());
      int i = ftz210205Serv.updateFtzInMsgCtl(update_FtzInMsgCtl, null);
      if (i < 1) {
        model.addAttribute(ResultMessages.error().add("e.ftzmis.2103.0008"));
      } else {
        model.addAttribute(ResultMessages.success().add("i.ftzmis.210301.0005"));
        form.setAuthFinishFlag("1");
        return "forward:/FTZ210205/QryAuthDtl";
      }
    } else {
      int count_unAuth = 0;
      int count_authFail = 0;
      StringBuffer sb_unAuth = new StringBuffer();
      StringBuffer sb_authFail = new StringBuffer();
      for (FtzInTxnDtl ftzInTxnDtl : ftzInTxnDtls) {
        String chkStatus = ftzInTxnDtl.getChkStatus();
        if (chkStatus.equals(CommonConst.FTZ_MSG_STATUS_INPUT_COMPLETED)) {
          count_unAuth++;
          sb_unAuth.append(ftzInTxnDtl.getSeqNo().toString() + ",");
        }
        if (chkStatus.equals(CommonConst.FTZ_MSG_STATUS_AUTH_FAIL)) {
          count_authFail++;
          sb_authFail.append(ftzInTxnDtl.getSeqNo().toString() + ",");
        }
      }
      if (count_unAuth > 0) {
        model.addAttribute(ResultMessages.error().add("e.ftzmis.210310.0012"));
        return "forward:/FTZ210205/QryAuthDtl";
      }
      if (count_authFail > 0) {
        model.addAttribute(
            ResultMessages.error()
                .add("e.ftzmis.210101.0031", sb_unAuth.subSequence(0, sb_authFail.length() - 1)));
        return "forward:/FTZ210205/QryAuthDtl";
      }

      FtzInMsgCtl update_FtzInMsgCtl = new FtzInMsgCtl();
      update_FtzInMsgCtl.setMsgStatus(CommonConst.FTZ_MSG_STATUS_AUTH_SUCC);
      if (form.getFtzInMsgCtl().getMsgId() != null
          && !"".equals(form.getFtzInMsgCtl().getMsgId())) {

        update_FtzInMsgCtl.setMsgId(form.getFtzInMsgCtl().getMsgId());
      } else {
        update_FtzInMsgCtl.setMsgId(form.getSelected_msgId());
      }
      update_FtzInMsgCtl.setMsgNo(CommonConst.MSG_NO_210205);

      update_FtzInMsgCtl.setChkUserId(userInfo.getUserid());
      update_FtzInMsgCtl.setRsv2(update_FtzInMsgCtl.getChkDatetime());
      update_FtzInMsgCtl.setChkDatetime(DateUtil.getNowInputDateTime());
      update_FtzInMsgCtl.setChkDatetime(DateUtil.getNowInputDateTime());
      int i = ftz210205Serv.updateFtzInMsgCtl(update_FtzInMsgCtl, null);
      if (i < 1) {
        model.addAttribute(ResultMessages.error().add("e.ftzmis.210301.0008"));
      } else {
        model.addAttribute(ResultMessages.success().add("i.ftzmis.210301.0005"));
        form.setAuthFinishFlag("1");
        return "forward:/FTZ210205/QryAuthDtl";
      }
    }

    return "forward:/FTZ210205/QryAuthDtl";
  }