Ejemplo n.º 1
0
  // 查看批量
  @RequestMapping("SubmitDtl")
  public String SubmitDtl(Model model, FTZ210205Form form) {
    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 && ftzInTxnDtls.size() > 0) {
      for (FtzInTxnDtl dtl : ftzInTxnDtls) {
        if (CommonConst.FTZ_MSG_STATUS_AUTH_FAIL.equals(dtl.getChkStatus())) {
          model.addAttribute(ResultMessages.error().add("e.ftzmis.210101.0030"));
          return "forward:/FTZ210205/AddQry";
        }
      }
    }
    int i = ftz210205Serv.updateFtzInMsgCtlForSubmit(ftzInMsgCtl);

    if (i == 0) {
      model.addAttribute(ResultMessages.error().add("e.ftzmis.210101.0001"));
      return "forward:/FTZ210205/AddQry";
    }

    model.addAttribute(ResultMessages.success().add("i.ftzmis.210301.0009"));
    return "forward:/FTZ210205/AddQry";
  }
Ejemplo n.º 2
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";
  }