master
Qin Dong Ming 2024-09-10 10:11:35 +08:00
parent 3932bc6e50
commit 38e18c68bc
1 changed files with 6 additions and 7 deletions

View File

@ -32,10 +32,9 @@ public class GenerateConstant {
public static String generateConstant(EngineMaintenance ruleData, EngineVersion ruleVersion) { public static String generateConstant(EngineMaintenance ruleData, EngineVersion ruleVersion) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
String format = simpleDateFormat.format(new Date()); String format = simpleDateFormat.format(new Date());
// String level = selectType(ruleData.getScope()); return "package com.muyu.domain.EngineVersion;\n" +
return "package com.muyu.etl.rule.util;\n" + "import com.muyu.abstracts.DataEngineValueActuator;\n" +
"import com.muyu.abstracts.DataEngineValueActuator;\n"+ "import com.muyu.abstracts.DataValue;\n" +
"import com.muyu.abstracts.DataValue;\n"+
"\n" + "\n" +
"/**\n" + "/**\n" +
" * @Author: " + "qdm" + "\n" + " * @Author: " + "qdm" + "\n" +
@ -43,7 +42,7 @@ public class GenerateConstant {
" * @Description: " + "\n" + " * @Description: " + "\n" +
" * @Version: 1.0\n" + " * @Version: 1.0\n" +
" */\n" + " */\n" +
"public class " + ruleVersion.getVersionCode()+" extends "+"DataEngineValueActuator"+"{ \n" + "public class " + ruleVersion.getName() + " extends " + "DataEngineValueActuator" + "{ \n" +
" @Override\n" + " @Override\n" +
" public DataValue run () {\n" + " public DataValue run () {\n" +
" DataValue dataValue = get();\n" + " DataValue dataValue = get();\n" +
@ -51,8 +50,8 @@ public class GenerateConstant {
" System.out.println(\"数据为空,需要丢弃\");\n" + " System.out.println(\"数据为空,需要丢弃\");\n" +
" }else{ \n" + " }else{ \n" +
" System.out.println(\"数据非空:\"+dataValue.getValue());\n" + " System.out.println(\"数据非空:\"+dataValue.getValue());\n" +
" }\n"+ " }\n" +
" return dataValue;\n"+ " return dataValue;\n" +
" }\n" + " }\n" +
"}"; "}";
} }