yaozhixue il y a 1 an
Parent
commit
8501fc5d2f

+ 2 - 2
src/main/java/com/zfire/jiasm/syncdata/config/TheaderPoolConfig.java

@@ -19,9 +19,9 @@ public class TheaderPoolConfig {
      */
 
     /** 核心线程数(默认线程数) */
-    private static final int corePoolSize = 50;
+    private static final int corePoolSize = 60;
     /** 最大线程数 */
-    private static final int maxPoolSize = 60;
+    private static final int maxPoolSize = 80;
     /** 允许线程空闲时间(单位:默认为秒) */
     private static final int keepAliveTime = 5;
     /** 缓冲队列大小 */

+ 3 - 2
src/main/java/com/zfire/jiasm/syncdata/download/basedata/BaseDataTask.java

@@ -15,12 +15,13 @@ import org.springframework.stereotype.Component;
 public class BaseDataTask {
     @Value("${netfsxc}")
     private String netfsxc = "";
-
-
     @Autowired
     BaseDownService baseDownService;
 
 
+
+
+
     @Scheduled(fixedDelayString = "${netfsx}")
     public void process() throws Exception {
         if (netfsxc.equals(TaskConfigEnum.FALSE.getCode())){

+ 4 - 2
src/main/java/com/zfire/jiasm/syncdata/download/basedata/MasterDownloadTask.java

@@ -18,8 +18,10 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
-// 定时执行一次
-// 师傅端使用
+/**定时执行一次 师傅端使用 两表配合使用 只需修改其中一个表
+ * select * from itf_gree_to_fa_download_task;
+ * select * from itf_gree_to_fa_syn_task_list
+ */
 @Slf4j
 @Component
 public class MasterDownloadTask {

+ 0 - 3
src/main/java/com/zfire/jiasm/syncdata/download/order/InstallBusinessApi.java

@@ -98,9 +98,6 @@ public class InstallBusinessApi {
         // 按任务号download_task_no,按单来处理
         for (ItfTblAzAssignLcLsDownload item: lcls) {
             try{
-                // 向工单子表下载任务表插入数据
-                downInformation(item);
-
                 if (orderBaselist.contains(item.getPgguid())){
                     // 修改 TL_SynDataFrom_tbl_az_assign_lc_ls_batch
                     addInstallBusiness.updateOrderApi(sysDictRefDLMap, sysDictRefXLMap, sysDictRefXiLieMap, brand, item,Boolean.FALSE);

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

@@ -187,6 +187,9 @@ public class AddInstallBusinessImpl implements AddInstallBusiness {
         List<OrderAppeal> orderAppeal = new ArrayList<>();
         List<ItfGreeToFaDownloadTaskList> its = new ArrayList<>();
 
+        // 向工单子表下载任务表插入数据
+        downInformation(item);
+
         // 工单机型
         List<ItfTblAzAssignMxDownload> orderMx = itfTblAzAssignMxDownloadService.lambdaQuery()
                 .eq(ItfTblAzAssignMxDownload::getDownloadTaskNo, item.getDownloadTaskNo())
@@ -384,6 +387,9 @@ public class AddInstallBusinessImpl implements AddInstallBusiness {
         List<String> delOrderInstallDetail = new ArrayList<>();
         List<OrderDetailFile> odfs = new ArrayList<>();
 
+        // 向工单子表下载任务表插入数据
+        downInformation(item);
+
         // 提取本地订单
         OrderBase old = orderBaseService.lambdaQuery()
                 .eq(OrderBase::getPgguid, item.getPgguid())

+ 21 - 24
src/main/java/com/zfire/jiasm/syncdata/service/impl/BaseDownServiceImpl.java

@@ -299,39 +299,36 @@ public class BaseDownServiceImpl implements BaseDownService {
             return;
         }
 
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        Map<String, String> paramMap = new HashMap<String, String>();
+        try{
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Map<String, String> paramMap = new HashMap<String, String>();
 
-        log.info("开始下载格力品牌安装销售类型信息: \uF0B7{}",sdf.format(new Date()));
-
-        Token token = tokenCenter.getCurrentToken();
-        String url = baseurl + InterFaceTypeEnum.GLPP_XSLX.getCode() + "/querylist";
-        String paramJson= JSON.toJSONString(paramMap);
-
-        JSONResult jsonResult = HttpUtil.httpRequestWithToken(url, "POST", paramJson, token);
-        if (jsonResult.getStatus() == null || !jsonResult.getStatus().toString().equals("200")) {
-            log.info("下载格力品牌安装销售类型信息失败!: {}",jsonResult.getMessage());
-            return;
-        }
-        JSONArray jsonArray = (JSONArray) jsonResult.getData();
+            log.info("开始下载格力品牌安装销售类型信息: \uF0B7{}",sdf.format(new Date()));
 
-        if (jsonArray != null) {
-            log.info("格力品牌安装销售类型下载了{}条数据",jsonArray.size());
+            Token token = tokenCenter.getCurrentToken();
+            String url = baseurl + InterFaceTypeEnum.GLPP_XSLX.getCode() + "/querylist";
+            String paramJson= JSON.toJSONString(paramMap);
 
-            // log.info("格力品牌安装销售类型下载了{}", JSONObject.toJSONString(jsonArray));
+            JSONResult jsonResult = HttpUtil.httpRequestWithToken(url, "POST", paramJson, token);
+            if (jsonResult.getStatus() == null || !jsonResult.getStatus().toString().equals("200")) {
+                log.info("下载格力品牌安装销售类型信息失败!: {}",jsonResult.getMessage());
+                return;
+            }
+            JSONArray jsonArray = (JSONArray) jsonResult.getData();
 
-            try{
+            if (jsonArray != null) {
+                log.info("格力品牌安装销售类型下载了{}条数据",jsonArray.size());
                 glppxslxDownloadService.extractedXSLX(jsonArray);
                 jsonArray.clear();
                 log.info("格力品牌安装销售类型信息处理完成: \uF0B7{}",sdf.format(new Date()));
-            } catch (Exception ex) {
-                jsonArray.clear();
-                ex.printStackTrace();
-                log.info("格力品牌安装销售类型处理失败");
+            }else {
+                log.info("["+url+"]无数据");
             }
-        }else {
-            log.info("["+url+"]无数据");
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            log.info("格力品牌安装销售类型处理失败");
         }
+
     }
 
     public void processGLPPLeiBie() throws Exception {

+ 1 - 0
src/main/java/com/zfire/jiasm/syncdata/service/impl/DetailDownloadServiceImpl.java

@@ -239,6 +239,7 @@ public class DetailDownloadServiceImpl implements DetailDownloadService {
 			processOldForNewProduct(downloadTaskNo, pgguid);
 		} else if (downloadTaskType == 2206){
 			// 安装工单子表数据阅读信息 itf_tbl_az_assign_xzyd_download  TL_SynDataFrom_tbl_az_assign_xzyd
+			// pgguid 为安装工单下载主表的pgguid
 			processInformatino(downloadTaskNo, pgguid, sysDictRefDLMap);
 		} else if (downloadTaskType == 6601){
 			// 维修工单二子表下载	TL_SynDataFrom_tbl_wxjs_jykt

+ 5 - 5
src/main/resources/bootstrap-prd.properties

@@ -191,29 +191,29 @@ installsh=10000
 repairjs=10000
 repairone=5000
 #故障维修
-masterdownloadrate=60000
+masterdownloadrate=600000
 masterrate=10000
-guzdm=300000
+guzdm=600000
 #网点 佛山销售网点|售后网点、广州销售网点|售后网点
 netfsx=600000
 netfss=600000
 netgzx=600000
 netgzs=600000
 #网点维修工 佛山销售|售后、广州销售|售后
-fsxwxg=300000
+fsxwxg=600000
 fsswxg=10000
 gzxwxg=10000
 gzswxg=10000
 gfwww=300000
 #类别大类、小类、系列、机型
-lbdl=300000
+lbdl=600000
 lbxl=60000
 lbxlt=60000
 lbjx=60000
 #销售类型
 azxslx=60000
 #需求类别 需求大类、小类
-xqdl=60000
+xqdl=600000
 xqxl=60000
 #用户属性、用户等级、信息渠道、信息来源
 yhsx=60000