ソースを参照

kettle-linux-powerjob

zoro 9 ヶ月 前
コミット
1b4ccb575b

+ 0 - 3
.gitignore

@@ -37,9 +37,6 @@ build/
 ### Mac OS ###
 .DS_Store
 
-shipLockLogFiles/
-shipLockLogFiles/*.log
-/shipLockLogFiles/
 
 .idea/*.xml
 .idea

+ 1 - 1
pom.xml

@@ -235,7 +235,7 @@
                 <artifactId>spring-boot-maven-plugin</artifactId>
                 <version>${springboot.version}</version>
                 <configuration>
-                    <mainClass>tech.powerjob.work.ShipLockApplication</mainClass>
+                    <mainClass>tech.powerjob.work.KettleApplication</mainClass>
                 </configuration>
                 <executions>
                     <execution>

+ 1 - 1
src/main/java/tech/powerjob/work/scheduleWork/MostImportant/DangerJob.java

@@ -13,7 +13,7 @@ import tech.powerjob.work.util.ReturnMsg;
 
 @Slf4j
 @Component
-@PropertySource(value = "classpath:/KettleFiles.properties", encoding = "e.getMessage()")
+@PropertySource(value = "classpath:/KettleFiles.properties", encoding = "UTF-8")
 public class DangerJob implements BasicProcessor {
     @Value("${Kettle.Oth05.DangerCargo}")
     private String dangerCargo;

+ 30 - 0
src/main/java/tech/powerjob/work/scheduleWork/ZhzxData/HsjToZhzx.java

@@ -0,0 +1,30 @@
+package tech.powerjob.work.scheduleWork.ZhzxData;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Component;
+import tech.powerjob.work.util.ReturnMsg;
+import tech.powerjob.worker.core.processor.ProcessResult;
+import tech.powerjob.worker.core.processor.TaskContext;
+import tech.powerjob.worker.core.processor.sdk.BasicProcessor;
+
+import static tech.powerjob.work.util.runTransfer.runTransfer;
+
+@Component
+@Slf4j
+@PropertySource(value = "classpath:/KettleFiles.properties", encoding = "UTF-8")
+public class HsjToZhzx implements BasicProcessor {
+    @Value("${Kettle.hsjTOzhzx}")
+    private String hsjTozhzx;
+    @Override
+    public ProcessResult process(TaskContext taskContext) throws Exception {
+        try {
+            runTransfer(hsjTozhzx);
+        }catch (Exception e){
+            log.error(hsjTozhzx+"执行失败{}",e.getMessage());
+            return ReturnMsg.returnMsg(false,hsjTozhzx);
+        }
+        return ReturnMsg.returnMsg(true);
+    }
+}

+ 30 - 0
src/main/java/tech/powerjob/work/scheduleWork/ZhzxData/ZhzxPreData.java

@@ -0,0 +1,30 @@
+package tech.powerjob.work.scheduleWork.ZhzxData;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.PropertySource;
+import org.springframework.stereotype.Component;
+import tech.powerjob.work.util.ReturnMsg;
+import tech.powerjob.worker.core.processor.ProcessResult;
+import tech.powerjob.worker.core.processor.TaskContext;
+import tech.powerjob.worker.core.processor.sdk.BasicProcessor;
+
+import static tech.powerjob.work.util.runTransfer.runTransfer;
+
+@Component
+@Slf4j
+@PropertySource(value = "classpath:/KettleFiles.properties", encoding = "UTF-8")
+public class ZhzxPreData implements BasicProcessor {
+    @Value("${Kettle.zhzxqzk}")
+    private String zhzxqzk;
+    @Override
+    public ProcessResult process(TaskContext taskContext) throws Exception {
+        try {
+            runTransfer(zhzxqzk);
+        }catch (Exception e){
+            log.error(zhzxqzk+"执行失败{}",e.getMessage());
+            return ReturnMsg.returnMsg(false,zhzxqzk);
+        }
+        return ReturnMsg.returnMsg(true);
+    }
+}

+ 5 - 1
src/main/resources/KettleFiles.properties

@@ -83,6 +83,11 @@ Kettle.LINE.HYSJZX=/home/powerjob/kettle/jobs/\u884C\u4E1A\u6570\u636E\u4E2D\u5F
 #10\u5206\u949F
 Kettle.DangerBoatInfo=/home/powerjob/kettle/jobs/\u5371\u9669\u8D27\u7269\u8425\u8FD0\u8239\u8236.ktr
 
+#\u6BCF\u5C0F\u65F6\u6267\u884C\u4E00\u6B21
+
+Kettle.hsjTOzhzx=/home/powerjob/kettle/jobs/\u4E0A\u6D77\u6D77\u4E8B\u5C40\u540C\u6B65\u5230\u6307\u6325\u4E2D\u5FC3.ktr
+Kettle.zhzxqzk=/home/powerjob/kettle/jobs/\u6307\u6325\u4E2D\u5FC3\u524D\u7F6E\u5E93\u540C\u6B65.ktr
+
 
 
 #OTH05
@@ -129,4 +134,3 @@ Kettle.Oth05.DangerDeclareOutPort=/home/powerjob/kettle/oth05/cargo_hy.ktr
 Kettle.Oth05.DeleteCancelDeclare=/home/powerjob/kettle/oth05/deleteCheDan.ktr
 Kettle.Oth05.UpdateDangerCargoCode=/home/powerjob/kettle/oth05/\u66F4\u6539\u8D27\u7269\u7F16\u53F7.ktr
 #Kettle.Oth05.UpdateChangeDeclare=/home/powerjob/kettle/oth05/\u6539\u5355.ktr
-

+ 1 - 3
src/main/resources/application.properties

@@ -8,7 +8,7 @@ powerjob.worker.allow-lazy-connect-server=false
 # Transport port, default is 27777
 powerjob.worker.port=27780
 # Application name, used for grouping applications. Recommend to set the same value as project name.
-powerjob.worker.app-name=admin
+powerjob.worker.app-name=kettle
 # Address of PowerJob-server node(s). Ip:port or domain. Multiple addresses should be separated with comma.
 powerjob.worker.server-address=127.0.0.1:7700
 # transport protocol between server and worker
@@ -22,6 +22,4 @@ powerjob.worker.max-appended-wf-context-length=4096
 #spring.datasource.druid.initial-size=5
 #spring.datasource.druid.min-idle=5
 
-mybatis.mapper-locations=classpath*:mapper/*.xml
-
 spring.config.import=classpath:/KettleFiles.properties