企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# 组件源码 /** * <b>方法描述:</b> 输出文件地址 <br/> * <b>创建者:</b> admin <br/> * <b>创建时间:</b> 2019-06-21 15:25:34 <br/> * * @param download * 入参|输出目录|{@link java.lang.String} * @param nf * 出参|新的输出文件夹|{@link java.lang.String} * @return 0 失败<br/> * 1 成功<br/> */ @Component(label = "输出文件地址", style = "判断型", type = "同步组件", comment = "数据目录", version = "1.0.0", deprecated = false, author = "admin", date = "2019-06-21 03:25:34") @InParams(param = { @Param(name = "download", comment = "输出目录", type = java.lang.String.class) }) @OutParams(param = { @Param(name = "nf", comment = "新的输出文件夹", type = java.lang.String.class) }) @Returns(returns = { @Return(id = "0", desp = "失败"), @Return(id = "1", desp = "成功") }) public static ResultBase A_downloadPath(String download) { Date date = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); String dateStr = sdf.format(date); String filepath = download + "dataConversion/after/" + dateStr; File file = new File(filepath); if (!file.exists()) file.mkdirs(); return ResultBase.newSuccessResult(file.getAbsolutePath()); } 交易中组件使用方式: ## 参数说明及示例 输出目录:输出目录路径,以/结尾,示例: `"/home/usr/local/"` 新的输出文件夹:输出文件夹路径,最终文件在输出目录下的`dataConversion/after/${当前年月日}`文件夹下,示例: `__INNER__["filepath"]`的结果等于`/home/usr/local/dataConversion/after/20210127` > 生成新的输出文件夹