<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # 組件源碼 ``` /** * <b>方法描述:</b> 計算時間差(字符串) <br/> * <b>創建者:</b> admin <br/> * <b>創建時間:</b> 2018-04-13 16:51:53 <br/> * * @param time1 * 入參|時間1|{@link java.util.Date} * @param time2 * 入參|時間2|{@link java.util.Date} * @param unit * 入參|時間單位(seconds/minutes/hours/days)|{@link java.lang.String} * @param diff * 出參|差值|{@link int} * @return -1 異常<br/> * 1 成功<br/> */ @Component(label = "計算時間差(Date)", style = "判斷型", type = "同步組件", comment = "計算兩個Date時間的差值", version = "1.0.0", deprecated = false, author = "admin", date = "2018-04-13 04:51:53") @InParams(param = { @Param(name = "time1", comment = "時間1", type = java.util.Date.class), @Param(name = "time2", comment = "時間2", type = java.util.Date.class), @Param(name = "unit", comment = "時間單位(seconds/minutes/hours/days)", type = java.lang.String.class) }) @OutParams(param = { @Param(name = "diff", comment = "差值", type = int.class) }) @Returns(returns = { @Return(id = "-1", desp = "異常"), @Return(id = "1", desp = "成功") }) public static ResultBase P_dateDiff(Date time1, Date time2, String unit) { try { long nRet = time1.getTime() - time2.getTime(); nRet = nRet / 1000; if ("minutes".equalsIgnoreCase(unit)) { nRet = nRet / 60; } else if ("hours".equalsIgnoreCase(unit)) { nRet = (nRet / 60) / 60; } else if ("days".equalsIgnoreCase(unit)) { nRet = ((nRet / 60) / 60) / 24; } return ResultBase.newSuccessResult(Math.abs(nRet)); } catch (Exception ex) { AppLog.error(ex); } return ResultBase.newExceptionResult("TPTD1005", "P_dateDiff-輸入日期字符串格式錯誤"); } ``` # 交易中組件使用方式 ![](https://img.kancloud.cn/72/53/725396a1d70c9d6b5088f7f684e1c819_1868x891.png) # 參數說明及示例 ## 入口參數 時間1:輸入一個 date 類型的日期,示例: `__INNER__["date1"]` 時間2:輸入一個 date 類型的日期,示例: `__INNER__["date2"]` 時間單位(seconds/minutes/hours/days):計算結果以什么時間單位顯示,示例: `"days"` ## 出口參數 差值:根據輸入參數計算后的結果,示例: `__INNER__["result"]`
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看