yaozhixue 1 anno fa
parent
commit
5c76c8b079

+ 6 - 0
src/main/java/com/zfire/jiasm/syncdata/service/JdmallService.java

@@ -0,0 +1,6 @@
+package com.zfire.jiasm.syncdata.service;
+
+public interface JdmallService {
+
+    void syncData();
+}

+ 7 - 0
src/main/java/com/zfire/jiasm/syncdata/service/SettlementService.java

@@ -0,0 +1,7 @@
+package com.zfire.jiasm.syncdata.service;
+
+public interface SettlementService {
+
+    void syncData();
+
+}

+ 74 - 0
src/main/java/com/zfire/jiasm/syncdata/service/impl/JdmallServiceImpl.java

@@ -0,0 +1,74 @@
+package com.zfire.jiasm.syncdata.service.impl;
+
+import com.zfire.jiasm.syncdata.service.JdmallService;
+import com.zfire.jiasm.syncdata.utils.oss.AddJdueUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+@Slf4j
+@Service
+public class JdmallServiceImpl implements JdmallService {
+    @Autowired
+    private AddJdueUtil addJdueUtil;
+
+
+
+    @Override
+    public void syncData() {
+        processAppointmentModification();
+
+        processAppointSite();
+
+        processCancelOrder();
+
+        processFinish();
+
+        processServicePersonnel();
+    }
+
+
+
+    private void processAppointmentModification() {
+        String[] cols = new String[] { "orderNo", "createBy", "createDate", "bookDate",
+                "bookDate2", "remark" };
+
+        addJdueUtil.process("addJdueBookOnDoor", "api/jdueFeedback/addJdueBookOnDoor",
+                "itf_addjduebookondoor_req", cols);
+    }
+
+    private void processAppointSite() {
+        String[] cols = new String[] { "orderNo", "siteNode", "siteName", "createBy", "createDate",
+                "contactMan", "siteMobile", "province", "city", "county", "town", "address" };
+
+        addJdueUtil.process("addJdueAppointSite", "api/jdueFeedback/addJdueAppointSite",
+                "itf_addjdueappointsite_req", cols);
+    }
+
+    private void processCancelOrder() {
+        String[] cols = new String[] { "orderNo", "createBy", "createDate", "cancelType","cancelReason"};
+
+        addJdueUtil.process("addJdueCancel", "api/jdueFeedback/addJdueCancel",
+                "itf_addjduecancel_req", cols);
+    }
+
+    private void processFinish() {
+        String[] cols = new String[] { "orderNo", "createBy", "createDate", "barcode1",
+                "barcode2", "dealRemark" };
+
+        addJdueUtil.process("addJdueFinish", "api/jdueFeedback/addJdueFinish",
+                "itf_addjduefinish_req", cols);
+    }
+
+
+    private void processServicePersonnel() {
+        String[] cols = new String[] { "orderNo", "siteNode", "siteName", "createBy", "createDate",
+                "engineerCode", "engineerName", "engineerMobile" };
+
+        addJdueUtil.process("addJdueAppointEngineer", "api/jdueFeedback/addJdueAppointEngineer",
+                "itf_addjdueappointengineer_req", cols);
+    }
+
+
+}

+ 94 - 0
src/main/java/com/zfire/jiasm/syncdata/service/impl/SettlementServiceImpl.java

@@ -0,0 +1,94 @@
+package com.zfire.jiasm.syncdata.service.impl;
+
+import com.zfire.jiasm.syncdata.constant.TaskConfigEnum;
+import com.zfire.jiasm.syncdata.service.SettlementService;
+import com.zfire.jiasm.syncdata.utils.OLDSystemUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+
+@Slf4j
+@Service
+public class SettlementServiceImpl implements SettlementService {
+    @Autowired
+    private OLDSystemUtil oldSystemTask;
+
+    @Override
+    public void syncData() {
+
+        processSettlementInstallJY();
+
+        processSettlementInstallRepair();
+
+        processSettlementInstallSH();
+
+        processSettlementInstallSY();
+
+    }
+
+
+    private void processSettlementInstallJY() {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        log.info("开始家用空调数据同步: \uF0B7{}",sdf.format(new Date()));
+
+        oldSystemTask.process("家用空调", "itf_installitem", "installItem",
+                new Object[] { "itf_tblazwgmxjykt", "tblazwgmxjykt", new String[] { "itf_tblazwgmxjyktfj" },
+                        new String[] { "tblAzWgmxJyktFj" }, "\"tblAzWgmxJyktSpecial\":[],\"tblAzWgmxOtherinfo\":[]", "",
+                        "" },
+                new Object[] { "itf_tblazwgmxjykt", "tblazwgmxjykt", new String[] { "itf_tblazwgmxjyktfj" },
+                        new String[] { "tblAzWgmxJyktFj" }, "\"tblAzWgmxJyktSpecial\":[],\"tblAzWgmxOtherinfo\":[]",
+                        "", "" },
+                true, 1, "id");
+
+        log.info("家用空调数据同步结束: \uF0B7{}",sdf.format(new Date()));
+    }
+
+    private void processSettlementInstallRepair() {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        log.info("开始维修结算数据同步: \uF0B7{}",sdf.format(new Date()));
+
+        oldSystemTask.process("维修", "itf_tblwxjsjykt", "tblWxjsJykt", new Object[] { "itf_tblwxjsjykt", "tblWxjsJykt",
+                        new String[] { "itf_tblwxjsfjjykt", "itf_tblwxjswxxmjykt", "itf_tblwxjsxxyyjykt",
+                                "itf_tblwxjspjmxjykt" },
+                        new String[] { "tblWxjsFjJykt", "tblWxjsWxxmJykt", "tblWxjsXxyyJykt", "tblWxjsPjmxJykt" }, "", "", "" },
+                new Object[] { "itf_tblwxjsjykt", "tblWxjsJykt", new String[] {}, new String[] {}, "", "", "" }, false,
+                4, "id");
+
+        log.info("维修结算数据同步结束: \uF0B7{}",sdf.format(new Date()));
+    }
+
+    private void processSettlementInstallSH() {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        log.info("开始生活电器数据同步: \uF0B7{}",sdf.format(new Date()));
+
+        oldSystemTask.process("生活电器", "itf_installitem", "installItem",
+                new Object[] { "itf_tblazwgmxqita", "tblAzWgmxQita", new String[] { "itf_tblazwgmxqitafj" },
+                        new String[] { "tblAzWgmxQitaFj" }, "", "", "" },
+                new Object[] { "itf_tblazwgmxqita", "tblAzWgmxQita", new String[] { "itf_tblazwgmxqitafj" },
+                        new String[] { "tblAzWgmxQitaFj" }, "", "", "" },
+                true, 3, "id");
+
+        log.info("生活电器数据同步结束: \uF0B7{}",sdf.format(new Date()));
+    }
+
+    private void processSettlementInstallSY() {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        log.info("开始商用空调数据同步: \uF0B7{}",sdf.format(new Date()));
+
+        oldSystemTask.process("商用空调", "itf_installitem", "installItem",
+                new Object[] { "itf_tblazwgmxsykt", "tblAzWgmxSykt",
+                        new String[] { "itf_tblazwgmxsyktfj", "itf_tblazwgmxsykttmmxls" },
+                        new String[] { "tblAzWgmxSyktFj", "tblAzWgmxSyktTmmxLs"}, "", "", "" },
+                new Object[] { "itf_tblazwgmxsykt", "tblAzWgmxSykt",
+                        new String[] { "itf_tblazwgmxsyktfj", "itf_tblazwgmxsykttmmxls" },
+                        new String[] { "tblAzWgmxSyktFj", "tblAzWgmxSyktTmmxLs" }, "", "",
+                        "" },
+                true, 2, "id");
+
+        log.info("商用空调数据同步结束: \uF0B7{}",sdf.format(new Date()));
+    }
+}

+ 3 - 3
src/main/java/com/zfire/jiasm/syncdata/upload/jdmall/AppointSite.java

@@ -11,9 +11,9 @@ import org.springframework.stereotype.Component;
  * 回传指派改派服务商数据 itf_addJdueAppointSite_req
  */
 @Slf4j
-@Component
+// @Component
 public class AppointSite {
-    @Autowired
+    /*@Autowired
     private AddJdueUtil addJdueUtil;
 
     private String[] cols = new String[] { "orderNo", "siteNode", "siteName", "createBy", "createDate",
@@ -23,6 +23,6 @@ public class AppointSite {
     private void appointSiteProcess() {
         addJdueUtil.process("addJdueAppointSite", "api/jdueFeedback/addJdueAppointSite",
                 "itf_addjdueappointsite_req", cols);
-    }
+    }*/
 
 }

+ 3 - 3
src/main/java/com/zfire/jiasm/syncdata/upload/jdmall/AppointmentModification.java

@@ -11,9 +11,9 @@ import org.springframework.stereotype.Component;
  * 回传预约改约时间数据 itf_addJdueBookOnDoor_req
  */
 @Slf4j
-@Component
+// @Component
 public class AppointmentModification {
-    @Autowired
+   /* @Autowired
     private AddJdueUtil addJdueUtil;
 
     private String[] cols = new String[] { "orderNo", "createBy", "createDate", "bookDate",
@@ -23,6 +23,6 @@ public class AppointmentModification {
     private void process() {
         addJdueUtil.process("addJdueBookOnDoor", "api/jdueFeedback/addJdueBookOnDoor",
                 "itf_addjduebookondoor_req", cols);
-    }
+    }*/
 
 }

+ 3 - 3
src/main/java/com/zfire/jiasm/syncdata/upload/jdmall/CancelOrder.java

@@ -11,9 +11,9 @@ import org.springframework.stereotype.Component;
  * 回传作废取消订单数据 itf_addJdueCancel_req
  */
 @Slf4j
-@Component
+// @Component
 public class CancelOrder {
-    @Autowired
+    /*@Autowired
     private AddJdueUtil addJdueUtil;
     private String[] cols = new String[] { "orderNo", "createBy", "createDate", "cancelType","cancelReason"};
 
@@ -21,5 +21,5 @@ public class CancelOrder {
     private void process() {
         addJdueUtil.process("addJdueCancel", "api/jdueFeedback/addJdueCancel",
                 "itf_addjduecancel_req", cols);
-    }
+    }*/
 }

+ 3 - 3
src/main/java/com/zfire/jiasm/syncdata/upload/jdmall/Finish.java

@@ -11,9 +11,9 @@ import org.springframework.stereotype.Component;
  * 回传报完工数据 itf_addJdueFinish_req
  */
 @Slf4j
-@Component
+// @Component
 public class Finish {
-    @Autowired
+    /*@Autowired
     private AddJdueUtil addJdueUtil;
 
     private String[] cols = new String[] { "orderNo", "createBy", "createDate", "barcode1",
@@ -23,6 +23,6 @@ public class Finish {
     private void process() {
         addJdueUtil.process("addJdueFinish", "api/jdueFeedback/addJdueFinish",
                 "itf_addjduefinish_req", cols);
-    }
+    }*/
 
 }

+ 3 - 3
src/main/java/com/zfire/jiasm/syncdata/upload/jdmall/ServicePersonnel.java

@@ -11,9 +11,9 @@ import org.springframework.stereotype.Component;
  * 回传指派改派服务人员数据 itf_addJdueAppointSite_req
  */
 @Slf4j
-@Component
+// @Component
 public class ServicePersonnel {
-    @Autowired
+    /*@Autowired
     private AddJdueUtil addJdueUtil;
 
     private String[] cols = new String[] { "orderNo", "siteNode", "siteName", "createBy", "createDate",
@@ -23,6 +23,6 @@ public class ServicePersonnel {
     private void process() {
         addJdueUtil.process("addJdueAppointEngineer", "api/jdueFeedback/addJdueAppointEngineer",
                 "itf_addjdueappointengineer_req", cols);
-    }
+    }*/
 
 }

+ 21 - 0
src/main/java/com/zfire/jiasm/syncdata/upload/jdmall/jdmallSync.java

@@ -0,0 +1,21 @@
+package com.zfire.jiasm.syncdata.upload.jdmall;
+
+
+import com.zfire.jiasm.syncdata.service.JdmallService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+@Slf4j
+@Component
+public class jdmallSync {
+    @Autowired
+    JdmallService jdmallService;
+
+
+    @Scheduled(fixedDelayString = "${jdyygy}")
+    private void process() {
+        jdmallService.syncData();
+    }
+}

+ 3 - 4
src/main/java/com/zfire/jiasm/syncdata/upload/settlement/SettlementInstallJY.java

@@ -12,9 +12,9 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 
 @Slf4j
-@Component
+// @Component
 public class SettlementInstallJY {
-    @Value("${installjyc}")
+    /*@Value("${installjyc}")
     private String installjyc = "";
 
     @Autowired
@@ -22,7 +22,6 @@ public class SettlementInstallJY {
 
     @Scheduled(fixedDelayString = "${installjy}")
     private void process() {
-
         if (installjyc.equals(TaskConfigEnum.FALSE.getCode())){
             return;
         }
@@ -40,6 +39,6 @@ public class SettlementInstallJY {
                 true, 1, "id");
 
         log.info("家用空调数据同步结束: \uF0B7{}",sdf.format(new Date()));
-    }
+    }*/
 
 }

+ 3 - 4
src/main/java/com/zfire/jiasm/syncdata/upload/settlement/SettlementInstallRepair.java

@@ -12,9 +12,9 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 
 @Slf4j
-@Component
+// @Component
 public class SettlementInstallRepair {
-    @Value("${repairjsc}")
+   /* @Value("${repairjsc}")
     private String repairjsc = "";
 
     @Autowired
@@ -22,7 +22,6 @@ public class SettlementInstallRepair {
 
     @Scheduled(fixedDelayString = "${repairjs}")
     private void process() {
-
         if (repairjsc.equals(TaskConfigEnum.FALSE.getCode())){
             return;
         }
@@ -38,5 +37,5 @@ public class SettlementInstallRepair {
                 4, "id");
 
         log.info("维修结算数据同步结束: \uF0B7{}",sdf.format(new Date()));
-    }
+    }*/
 }

+ 3 - 4
src/main/java/com/zfire/jiasm/syncdata/upload/settlement/SettlementInstallSH.java

@@ -12,16 +12,15 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 
 @Slf4j
-@Component
+// @Component
 public class SettlementInstallSH {
-    @Value("${installshc}")
+    /*@Value("${installshc}")
     private String installshc = "";
     @Autowired
     private OLDSystemUtil oldSystemTask;
 
     @Scheduled(fixedDelayString = "${installsh}")
     private void process() {
-
         if (installshc.equals(TaskConfigEnum.FALSE.getCode())){
             return;
         }
@@ -37,5 +36,5 @@ public class SettlementInstallSH {
                 true, 3, "id");
 
         log.info("生活电器数据同步结束: \uF0B7{}",sdf.format(new Date()));
-    }
+    }*/
 }

+ 3 - 4
src/main/java/com/zfire/jiasm/syncdata/upload/settlement/SettlementInstallSY.java

@@ -12,16 +12,15 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 
 @Slf4j
-@Component
+// @Component
 public class SettlementInstallSY {
-    @Value("${installsyc}")
+    /*@Value("${installsyc}")
     private String installsyc = "";
     @Autowired
     private OLDSystemUtil oldSystemTask;
 
     @Scheduled(fixedDelayString = "${installsy}")
     private void process() {
-
         if (installsyc.equals(TaskConfigEnum.FALSE.getCode())){
             return;
         }
@@ -40,5 +39,5 @@ public class SettlementInstallSY {
                 true, 2, "id");
 
         log.info("商用空调数据同步结束: \uF0B7{}",sdf.format(new Date()));
-    }
+    }*/
 }

+ 28 - 0
src/main/java/com/zfire/jiasm/syncdata/upload/settlement/settlementSync.java

@@ -0,0 +1,28 @@
+package com.zfire.jiasm.syncdata.upload.settlement;
+
+import com.zfire.jiasm.syncdata.constant.TaskConfigEnum;
+import com.zfire.jiasm.syncdata.service.SettlementService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+
+
+@Component
+public class settlementSync {
+    @Value("${installjyc}")
+    private String installjyc = "";
+
+    @Autowired
+    private SettlementService  settlementService;
+
+    @Scheduled(fixedDelayString = "${installjy}")
+    private void process() {
+        if (installjyc.equals(TaskConfigEnum.FALSE.getCode())) {
+            return;
+        }
+
+        settlementService.syncData();
+    }
+}