示例#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";
  }
示例#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";
  }
示例#3
0
  // 点击关闭按钮(明细新增等)
  @RequestMapping("DtlInitReflash")
  public String DtlInitReflash(
      Model model, FTZ210205Form form, @PageableDefaults Pageable pageable) {
    FtzInMsgCtl query_FtzInMsgCtl = new FtzInMsgCtl();
    query_FtzInMsgCtl.setMsgId(form.getSelected_msgId());
    FtzInMsgCtl ftzInMsgCtl = ftz210205Serv.queryFtzInMsgCtl(query_FtzInMsgCtl);
    if (null == ftzInMsgCtl) {
      model.addAttribute(ResultMessages.error().add("w.sm.0001"));
      return "ftzmis/FTZ210205_Input_Dtl";
    }
    ftzInMsgCtl.setSubmitDate(DateUtil.getFormatDateAddSprit(ftzInMsgCtl.getSubmitDate()));
    ftzInMsgCtl.setBalanceCode(ftzInMsgCtl.getBalanceCode().trim());
    form.setFtzInMsgCtl(ftzInMsgCtl);

    FtzInTxnDtl query_FtzInTxnDtl = new FtzInTxnDtl();
    query_FtzInTxnDtl.setMsgId(form.getSelected_msgId());
    // 查询明细数据列表
    Page<FtzInTxnDtl> page = ftz210205Serv.queryFtzInTxnDtlPage(pageable, query_FtzInTxnDtl);
    if (page.getContent().size() > 0) {
      List<FtzInTxnDtl> ftzInTxnDtls = page.getContent();
      for (FtzInTxnDtl ftzInTxnDtl : ftzInTxnDtls) {
        ftzInTxnDtl.setTranDate(DateUtil.getFormatDateAddSprit(ftzInTxnDtl.getTranDate()));
      }
      model.addAttribute("page", page);
    }

    // 清空页面列表选择Key
    form.setSelected_msgId("");
    form.setSelected_seqNo(null);
    return "ftzmis/FTZ210205_Input_Dtl";
  }
示例#4
0
  @RequestMapping("UptDtlDtlInit")
  public String UptDtlDtlInit(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());

    FtzInTxnDtl query_FtzInTxnDtl = new FtzInTxnDtl();
    query_FtzInTxnDtl.setMsgId(form.getSelected_msgId());
    query_FtzInTxnDtl.setSeqNo(form.getSelected_seqNo());
    FtzInTxnDtl result_FtzInTxnDtl = ftz210205Serv.queryFtzInTxnDtl(query_FtzInTxnDtl);
    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);
    form.setInput_Dtl_flag("upt");
    return "ftzmis/FTZ210205_Input_Dtl_Dtl";
  }
示例#5
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";
  }
示例#6
0
  // 点击修改
  @RequestMapping("UptDtlInit")
  public String UptDtlInit(Model model, FTZ210205Form form, @PageableDefaults Pageable pageable) {
    logger.info("买入返售资产录入批量录入更新初始化开始...");
    // 检查批量是否存在
    FtzInMsgCtl query_FtzInMsgCtl = new FtzInMsgCtl();
    query_FtzInMsgCtl.setMsgId(form.getSelected_msgId());
    FtzInMsgCtl ftzInMsgCtl = ftz210205Serv.queryFtzInMsgCtl(query_FtzInMsgCtl);
    if (null == ftzInMsgCtl) {
      model.addAttribute(ResultMessages.error().add("w.sm.0001"));
      logger.info("买入返售资产录入批量录入更新初始化结束...");
      return "ftzmis/FTZ210205_Input_Dtl";
    }
    ftzInMsgCtl.setSubmitDate(DateUtil.getFormatDateAddSprit(ftzInMsgCtl.getSubmitDate()));
    ftzInMsgCtl.setBalanceCode(ftzInMsgCtl.getBalanceCode().trim());
    form.setFtzInMsgCtl(ftzInMsgCtl);
    // 将查询数据放入form
    FtzInTxnDtl query_FtzInTxnDtl = new FtzInTxnDtl();
    query_FtzInTxnDtl.setMsgId(form.getSelected_msgId());
    // 查询明细数据列表
    Page<FtzInTxnDtl> page = ftz210205Serv.queryFtzInTxnDtlPage(pageable, query_FtzInTxnDtl);
    if (page.getContent().size() > 0) {
      List<FtzInTxnDtl> ftzInTxnDtls = page.getContent();
      for (FtzInTxnDtl ftzInTxnDtl : ftzInTxnDtls) {
        ftzInTxnDtl.setTranDate(DateUtil.getFormatDateAddSprit(ftzInTxnDtl.getTranDate()));
      }
      model.addAttribute("page", page);
    }

    // 清空页面列表选择Key
    form.setSelected_msgId("");
    form.setSelected_seqNo(null);
    logger.info("买入返售资产录入批量录入更新初始化结束...");
    form.setInput_flag("upt");
    model.addAttribute("pageUrl", "/FTZ210205/UptDtlInit");
    return "ftzmis/FTZ210205_Input_Dtl";
  }
示例#7
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";
  }
示例#8
0
  // 点击保存
  @RequestMapping("AddDtlSubmit")
  public String AddDtlSubmit(Model model, FTZ210205Form form, BindingResult result) {
    logger.info("买入返售资产录入批量录入开始...");

    // 获取录入信息
    FtzInMsgCtl insert_FtzInMsgCtl = form.getFtzInMsgCtl();

    // 开始校验
    ResultMessages resultMessages = ResultMessages.error();
    // 申请日期
    if (null == insert_FtzInMsgCtl.getSubmitDate()
        || "".equals(insert_FtzInMsgCtl.getSubmitDate().trim())) {
      ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210101.0012");
      resultMessages.add(resultMessage);
    }
    // 主账号
    if (null == insert_FtzInMsgCtl.getAccountNo()
        || "".equals(insert_FtzInMsgCtl.getAccountNo().trim())) {
      ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210101.0033");
      resultMessages.add(resultMessage);
    }
    // 资产负债指标代码
    if (null == insert_FtzInMsgCtl.getBalanceCode()
        || "".equals(insert_FtzInMsgCtl.getBalanceCode().trim())) {
      ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210101.0007");
      resultMessages.add(resultMessage);
    }
    // 货币
    if (null == insert_FtzInMsgCtl.getCurrency()
        || "".equals(insert_FtzInMsgCtl.getCurrency().trim())) {
      ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210101.0009");
      resultMessages.add(resultMessage);
    }
    // 日终余额
    if (null == insert_FtzInMsgCtl.getBalance()) {
      ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210101.0010");
      resultMessages.add(resultMessage);
    } else {
      if (!Validator.CheckAmount(insert_FtzInMsgCtl.getBalance())) {
        ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210303.0013");
        resultMessages.add(resultMessage);
      }
    }

    // 开户机构代码
    if (null == insert_FtzInMsgCtl.getAccOrgCode()
        || "".equals(insert_FtzInMsgCtl.getAccOrgCode().trim())) {
      ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210303.0002");
      resultMessages.add(resultMessage);
    }
    if (resultMessages.isNotEmpty()) {
      model.addAttribute(resultMessages);
      return "ftzmis/FTZ210205_Input_Dtl";
    }

    insert_FtzInMsgCtl.setMsgId(numberService.getSysIDSequence("", 8));
    insert_FtzInMsgCtl.setSubmitDate(
        DateUtil.getFormatDateRemoveSprit(insert_FtzInMsgCtl.getSubmitDate()));
    insert_FtzInMsgCtl.setWorkDate(procCommonService.queryWorkDate());

    UserInf userInfo = ContextConst.getCurrentUser();
    insert_FtzInMsgCtl.setMakUserId(userInfo.getUserid());
    insert_FtzInMsgCtl.setMakDatetime(DateUtil.getNowInputDateTime());
    insert_FtzInMsgCtl.setTotalCount(0);
    insert_FtzInMsgCtl.setMsgStatus(CommonConst.FTZ_MSG_STATUS_INPUTING);
    insert_FtzInMsgCtl.setMsgNo(CommonConst.MSG_NO_210205);
    // 插入信息
    insert_FtzInMsgCtl.setBalanceCode(insert_FtzInMsgCtl.getBalanceCode().trim());
    int i = ftz210205Serv.insertFtzInMsgCtl(insert_FtzInMsgCtl);
    if (i < 1) {
      model.addAttribute(ResultMessages.error().add("e.sysrunner.0006"));
    } else {
      model.addAttribute(ResultMessages.success().add("i.ftzmis.2101.0001"));
    }
    form.getFtzInMsgCtl()
        .setSubmitDate(DateUtil.getFormatDateAddSprit(form.getFtzInMsgCtl().getSubmitDate()));
    logger.info("买入返售资产录入批量录入结束...");
    form.setInput_flag("upt");
    model.addAttribute("pageUrl", "/FTZ210205/UptDtlInit");
    return "ftzmis/FTZ210205_Input_Dtl";
  }
示例#9
0
  @RequestMapping("QryAuthDtl")
  public String queryAuthDtl(Model model, FTZ210205Form form, @PageableDefaults Pageable pageable) {
    FtzInMsgCtl query_FtzInMsgCtl = new FtzInMsgCtl();
    query_FtzInMsgCtl.setMsgId(form.getSelected_msgId());
    FtzInMsgCtl result_FtzInMsgCtl = ftz210205Serv.queryFtzInMsgCtl(query_FtzInMsgCtl);
    if (null == result_FtzInMsgCtl) {
      model.addAttribute(ResultMessages.info().add("w.sm.0001"));
      form.setSelected_msgId("");
      form.setSelected_seqNo(null);
      return "ftzmis/FTZ210205_Auth_Qry_Dtl";
    } else {
      result_FtzInMsgCtl.setSubmitDate(
          DateUtil.getFormatDateAddSprit(result_FtzInMsgCtl.getSubmitDate()));
      result_FtzInMsgCtl.setSndDatetime(
          DateUtil.getFormatDateTimeAddSpritAndColon(result_FtzInMsgCtl.getSndDatetime()));
      result_FtzInMsgCtl.setAckDatetime(
          DateUtil.getFormatDateTimeAddSpritAndColon(result_FtzInMsgCtl.getAckDatetime()));
      result_FtzInMsgCtl.setBalanceCode(result_FtzInMsgCtl.getBalanceCode().trim());
      form.setFtzInMsgCtl(result_FtzInMsgCtl);
      FtzInTxnDtl query_FtzInTxnDtl = new FtzInTxnDtl();
      query_FtzInTxnDtl.setMsgId(form.getSelected_msgId());
      // 查询待审核数据
      if ("1".equals(form.getUnAuthFlag())) {
        query_FtzInTxnDtl.setChkStatus(CommonConst.FTZ_MSG_STATUS_INPUT_COMPLETED);
        Page<FtzInTxnDtl> page = ftz210205Serv.queryFtzInTxnDtlPage(pageable, query_FtzInTxnDtl);
        if (page.getContent().size() > 0) {
          List<FtzInTxnDtl> ftzInTxnDtls = page.getContent();
          for (FtzInTxnDtl ftzInTxnDtl : ftzInTxnDtls) {
            ftzInTxnDtl.setTranDate(DateUtil.getFormatDateAddSprit(ftzInTxnDtl.getTranDate()));
          }
          model.addAttribute("page", page);
        }
      }
      // 查询全部数据
      else {
        Page<FtzInTxnDtl> page = ftz210205Serv.queryFtzInTxnDtlPage(pageable, query_FtzInTxnDtl);
        if (page.getContent().size() > 0) {
          List<FtzInTxnDtl> ftzInTxnDtls = page.getContent();
          for (FtzInTxnDtl ftzInTxnDtl : ftzInTxnDtls) {
            ftzInTxnDtl.setTranDate(DateUtil.getFormatDateAddSprit(ftzInTxnDtl.getTranDate()));
          }
          model.addAttribute("page", page);
        }
      }

      form.setSelected_msgId("");
      form.setSelected_seqNo(null);
      return "ftzmis/FTZ210205_Auth_Qry_Dtl";
    }
  }
示例#10
0
  @RequestMapping("AddQry")
  public String queryAdd(Model model, FTZ210205Form form, @PageableDefaults Pageable pageable) {
    logger.info("买入返售资产录入查询开始...");

    // trans form to queryObject
    FtzInMsgCtl query_FtzInMsgCtl = new FtzInMsgCtl();
    query_FtzInMsgCtl.setMsgId(form.getQuery_msgId());
    query_FtzInMsgCtl.setBranchId(form.getQuery_branchId().trim());
    query_FtzInMsgCtl.setAccountName(form.getQuery_accountName());
    query_FtzInMsgCtl.setAccountNo(form.getQuery_accountNo());
    query_FtzInMsgCtl.setSubAccountNo(form.getQuery_subAccountNo());
    query_FtzInMsgCtl.setRsv1(DateUtil.getFormatDateRemoveSprit(form.getQuery_submitDate_start()));
    query_FtzInMsgCtl.setRsv2(DateUtil.getFormatDateRemoveSprit(form.getQuery_submitDate_end()));
    query_FtzInMsgCtl.setMsgStatus(form.getQuery_msgStatus());
    query_FtzInMsgCtl.setMsgStatuss(CommonConst.FTZ_MSG_STATUS_INPUT_STATUS);
    query_FtzInMsgCtl.setMsgNo(CommonConst.MSG_NO_210205);

    // query DpMppCfg page list
    Page<FtzInMsgCtl> page = ftz210205Serv.queryFtzInMsgCtlPage(pageable, query_FtzInMsgCtl);

    if (page.getContent().size() > 0) {
      List<FtzInMsgCtl> ftzInMsgCtls = page.getContent();
      for (FtzInMsgCtl ftzInMsgCtl : ftzInMsgCtls) {
        ftzInMsgCtl.setSubmitDate(DateUtil.getFormatDateAddSprit(ftzInMsgCtl.getSubmitDate()));
      }
      model.addAttribute("page", page);
      form.setSelected_msgId("");
      form.setSelected_seqNo(null);
    } else {
      model.addAttribute(ResultMessages.info().add("w.sm.0001"));
      logger.info("买入返售资产录入查询结束...");
      return "ftzmis/FTZ210205_Input_Qry";
    }
    logger.info("买入返售资产录入查询结束...");
    return "ftzmis/FTZ210205_Input_Qry";
  }
示例#11
0
 // 点击查看明细
 @RequestMapping("QryDtl")
 public String queryDtl(Model model, FTZ210205Form form, @PageableDefaults Pageable pageable) {
   logger.info("买入返售资产批量查询开始...");
   // 组装查询信息
   FtzInMsgCtl query_FtzInMsgCtl = new FtzInMsgCtl();
   query_FtzInMsgCtl.setMsgId(form.getSelected_msgId());
   // 查询数据
   FtzInMsgCtl result_FtzInMsgCtl = ftz210205Serv.queryFtzInMsgCtl(query_FtzInMsgCtl);
   if (null == result_FtzInMsgCtl) {
     // 若无数据 则返回提示信息
     model.addAttribute(ResultMessages.info().add("w.sm.0001"));
     form.setSelected_msgId("");
     form.setSelected_seqNo(null);
     logger.error("查询无记录!");
     logger.info("买入返售资产批量查询结束...");
     return "ftzmis/FTZ210205_Qry";
   } else {
     // 有数据则进行数据转换,查询明细数据
     result_FtzInMsgCtl.setBalanceCode(result_FtzInMsgCtl.getBalanceCode().trim());
     result_FtzInMsgCtl.setSubmitDate(
         DateUtil.getFormatDateAddSprit(result_FtzInMsgCtl.getSubmitDate()));
     result_FtzInMsgCtl.setSndDatetime(
         DateUtil.getFormatDateTimeAddSpritAndColon(result_FtzInMsgCtl.getSndDatetime()));
     result_FtzInMsgCtl.setAckDatetime(
         DateUtil.getFormatDateTimeAddSpritAndColon(result_FtzInMsgCtl.getAckDatetime()));
     result_FtzInMsgCtl.setBalanceCode(result_FtzInMsgCtl.getBalanceCode().trim());
     form.setFtzInMsgCtl(result_FtzInMsgCtl);
     FtzInTxnDtl query_FtzInTxnDtl = new FtzInTxnDtl();
     query_FtzInTxnDtl.setMsgId(form.getSelected_msgId());
     Page<FtzInTxnDtl> page = ftz210205Serv.queryFtzInTxnDtlPage(pageable, query_FtzInTxnDtl);
     if (page.getContent().size() > 0) {
       List<FtzInTxnDtl> ftzInTxnDtls = page.getContent();
       for (FtzInTxnDtl ftzInTxnDtl : ftzInTxnDtls) {
         ftzInTxnDtl.setTranDate(DateUtil.getFormatDateAddSprit(ftzInTxnDtl.getTranDate()));
       }
       model.addAttribute("page", page);
       form.setSelected_msgId("");
       form.setSelected_seqNo(null);
     }
     logger.info("买入返售资产批量查询结束...");
     return "ftzmis/FTZ210205_Qry_Dtl";
   }
 }
示例#12
0
  // 修改之后点击保存
  @RequestMapping("UptDtlSubmit")
  public String UptDtlSubmit(
      Model model, FTZ210205Form form, BindingResult result, @PageableDefaults Pageable pageable) {
    FtzInMsgCtl update_FtzInMsgCtl = form.getFtzInMsgCtl();

    // 开始校验
    ResultMessages resultMessages = ResultMessages.error();
    // 申请日期
    if (null == update_FtzInMsgCtl.getSubmitDate()
        || "".equals(update_FtzInMsgCtl.getSubmitDate().trim())) {
      ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210101.0012");
      resultMessages.add(resultMessage);
    }
    // 主账号
    if (null == update_FtzInMsgCtl.getAccountNo()
        || "".equals(update_FtzInMsgCtl.getAccountNo().trim())) {
      ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210101.0033");
      resultMessages.add(resultMessage);
    }

    // 资产负债指标代码
    if (null == update_FtzInMsgCtl.getBalanceCode()
        || "".equals(update_FtzInMsgCtl.getBalanceCode().trim())) {
      ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210101.0007");
      resultMessages.add(resultMessage);
    }

    // 货币
    if (null == update_FtzInMsgCtl.getCurrency()
        || "".equals(update_FtzInMsgCtl.getCurrency().trim())) {
      ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210101.0009");
      resultMessages.add(resultMessage);
    }

    // 日终余额
    if (null == update_FtzInMsgCtl.getBalance()) {
      ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210101.0010");
      resultMessages.add(resultMessage);
    } else {
      if (!Validator.CheckAmount(update_FtzInMsgCtl.getBalance())) {
        ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210303.0013");
        resultMessages.add(resultMessage);
      }
    }

    // 开户机构代码
    if (null == update_FtzInMsgCtl.getAccOrgCode()
        || "".equals(update_FtzInMsgCtl.getAccOrgCode().trim())) {
      ResultMessage resultMessage = ResultMessage.fromCode("e.ftzmis.210106.0003");
      resultMessages.add(resultMessage);
    }
    if (resultMessages.isNotEmpty()) {
      model.addAttribute(resultMessages);
      // 清空页面列表选择Key
      form.setSelected_msgId("");
      form.setSelected_seqNo(null);
      model.addAttribute("pageUrl", "/FTZ210205/UptDtlInit");
      return "ftzmis/FTZ210205_Input_Dtl";
    }
    UserInf userInfo = ContextConst.getCurrentUser();
    update_FtzInMsgCtl.setMsgStatus(CommonConst.FTZ_MSG_STATUS_INPUTING);
    update_FtzInMsgCtl.setMakUserId(userInfo.getUserid());
    update_FtzInMsgCtl.setRsv1(
        DateUtil.getFormatDateTimeRemoveSpritAndColon(update_FtzInMsgCtl.getMakDatetime()));
    update_FtzInMsgCtl.setRsv2(
        DateUtil.getFormatDateTimeRemoveSpritAndColon(update_FtzInMsgCtl.getChkDatetime()));
    update_FtzInMsgCtl.setMakDatetime(DateUtil.getNowInputDateTime());
    update_FtzInMsgCtl.setSubmitDate(
        DateUtil.getFormatDateRemoveSprit(update_FtzInMsgCtl.getSubmitDate()));
    int i = ftz210205Serv.updateFtzInMsgCtl(update_FtzInMsgCtl, null);
    if (i < 1) {
      model.addAttribute(ResultMessages.error().add("e.sysrunner.0003"));
      form.setFtzInMsgCtl(ftz210205Serv.queryFtzInMsgCtl(update_FtzInMsgCtl));
      form.getFtzInMsgCtl()
          .setSubmitDate(DateUtil.getFormatDateAddSprit(form.getFtzInMsgCtl().getSubmitDate()));
      FtzInTxnDtl query_FtzInTxnDtl = new FtzInTxnDtl();
      query_FtzInTxnDtl.setMsgId(update_FtzInMsgCtl.getMsgId());
      // 查询明细数据列表
      Page<FtzInTxnDtl> page = ftz210205Serv.queryFtzInTxnDtlPage(pageable, query_FtzInTxnDtl);
      if (page.getContent().size() > 0) {
        List<FtzInTxnDtl> ftzInTxnDtls = page.getContent();
        for (FtzInTxnDtl ftzInTxnDtl : ftzInTxnDtls) {
          ftzInTxnDtl.setTranDate(DateUtil.getFormatDateAddSprit(ftzInTxnDtl.getTranDate()));
        }
        model.addAttribute("page", page);
      }
      // 清空页面列表选择Key
      form.setSelected_msgId("");
      form.setSelected_seqNo(null);
      model.addAttribute("pageUrl", "/FTZ210205/UptDtlInit");
      return "ftzmis/FTZ210205_Input_Dtl";
    } else {
      model.addAttribute(ResultMessages.success().add("ftzmis.Update.Msg.Ctl.Success"));
    }
    form.getFtzInMsgCtl()
        .setSubmitDate(DateUtil.getFormatDateAddSprit(form.getFtzInMsgCtl().getSubmitDate()));
    form.setSelected_msgId("");
    FtzInTxnDtl query_FtzInTxnDtl = new FtzInTxnDtl();
    query_FtzInTxnDtl.setMsgId(form.getFtzInMsgCtl().getMsgId());
    // 查询明细数据列表
    Page<FtzInTxnDtl> page = ftz210205Serv.queryFtzInTxnDtlPage(pageable, query_FtzInTxnDtl);
    if (page.getContent().size() > 0) {
      List<FtzInTxnDtl> ftzInTxnDtls = page.getContent();
      for (FtzInTxnDtl ftzInTxnDtl : ftzInTxnDtls) {
        ftzInTxnDtl.setTranDate(DateUtil.getFormatDateAddSprit(ftzInTxnDtl.getTranDate()));
      }
      model.addAttribute("page", page);
    }

    // 清空页面列表选择Key
    form.setSelected_msgId("");
    form.setSelected_seqNo(null);
    model.addAttribute("pageUrl", "/FTZ210205/UptDtlInit");
    return "ftzmis/FTZ210205_Input_Dtl";
  }