yaozhixue 1 年之前
父節點
當前提交
27b5f71aa9

+ 0 - 1
src/main/java/com/zfire/jiasm/syncdata/download/basedata/BaseDataTask.java

@@ -8,7 +8,6 @@ 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;
-// 合到一个线程中 再次分线程
 
 @Slf4j
 @Component

+ 0 - 214
src/main/java/com/zfire/jiasm/syncdata/download/basedata/GLPPGFWebsitBak.java

@@ -1,214 +0,0 @@
-package com.zfire.jiasm.syncdata.download.basedata;
-
-import lombok.extern.slf4j.Slf4j;
-
-/** 线程太多合到到一个线程中处理
- * 格力品牌广佛网点基础资料下载(销售与售后)
- */
-@Slf4j
-// @Component
-public class GLPPGFWebsitBak {
-    /*
-    @Value("${baseurl}")
-    private String baseurl = "";
-    @Value("${netfsxc}")
-    private String netfsxc = "";
-    @Value("${netgzsc}")
-    private String netgzsc = "";
-    @Value("${netgzxc}")
-    private String netgzxc = "";
-    @Value("${netfssc}")
-    private String netfssc = "";
-
-    @Resource
-    TokenCenter tokenCenter;
-    @Resource
-    GLPPGFWebsitService glppgfWebsitService;
-    @Resource
-    BrandService brandService;
-
-
-    // X2300000 佛山销售网点基础资料下载
-    @Scheduled(fixedDelayString = "${netfsx}")
-    public void processFSXSWDTask() throws Exception {
-        if (netfsxc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        Map<String, String> paramMap = new HashMap<String, String>();
-
-        // 提取品牌信息
-        Brand record = brandService.lambdaQuery().eq(Brand::getBrand,"格力").one();
-        if (record == null){
-            log.info("格力品牌信息不存在【brand】");
-            return;
-        }
-
-        String synTaskNo = UUID.randomUUID().toString();
-
-
-        log.info("开始下载佛山销售网点基础资料信息: \uF0B7{}",sdf.format(new Date()));
-
-        Token token = tokenCenter.getCurrentToken();
-        String url = baseurl + InterFaceTypeEnum.GLXSSH_WEBSIT.getCode() + "/querylist";
-        paramMap.put("belongCompany", InterFaceTypeEnum.FSXS_WEBSIT_CODE.getCode());
-        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();
-        if (jsonArray != null) {
-            log.info("佛山销售网点下载了{}条数据",jsonArray.size());
-
-            glppgfWebsitService.extractedFSXS(jsonArray, record, synTaskNo);
-
-            log.info("佛山销售网点基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-    // X2100000 广州销售网点基础资料下载
-    @Scheduled(fixedDelayString = "${netgzx}")
-    public void processGZXSWDTask() throws Exception {
-
-
-        if (netgzxc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        Map<String, String> paramMap = new HashMap<String, String>();
-
-        // 提取品牌信息
-        Brand record = brandService.lambdaQuery().eq(Brand::getBrand,"格力").one();
-        if (record == null){
-            log.info("格力品牌信息不存在【brand】");
-            return;
-        }
-
-        String synTaskNo = UUID.randomUUID().toString();
-
-        log.info("开始下载广州销售网点基础资料信息: \uF0B7{}",sdf.format(new Date()));
-
-        Token token = tokenCenter.getCurrentToken();
-        String url = baseurl + InterFaceTypeEnum.GLXSSH_WEBSIT.getCode() + "/querylist";
-        paramMap.put("belongCompany", InterFaceTypeEnum.GZXS_WEBSIT_CODE.getCode());
-        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();
-        if (jsonArray != null) {
-            log.info("广州销售网点下载了{}条数据",jsonArray.size());
-
-            glppgfWebsitService.extractedGZXS(jsonArray, record, synTaskNo);
-
-            log.info("广州销售网点基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-    // S9219807 佛山售后网点基础资料下载
-    @Scheduled(fixedDelayString = "${netfss}")
-    public void processFSSHWDTask() throws Exception {
-
-
-        if (netfssc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        // 提取品牌信息
-        Brand record = brandService.lambdaQuery().eq(Brand::getBrand,"格力").one();
-        if (record == null){
-            log.info("格力品牌信息不存在【brand】");
-            return;
-        }
-
-        String synTaskNo = UUID.randomUUID().toString();
-
-        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.GLXSSH_WEBSIT.getCode() + "/querylist";
-        paramMap.put("belongCompany", InterFaceTypeEnum.FSSH_WEBSIT_CODE.getCode());
-        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();
-
-        if (jsonArray != null) {
-            log.info("佛山售后网点下载了{}条数据",jsonArray.size());
-
-            glppgfWebsitService.extractedFSSH(jsonArray, record, synTaskNo);
-
-            log.info("佛山售后网点基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-
-    // S9219801 广州售后网点基础资料下载
-    @Scheduled(fixedDelayString = "${netgzs}")
-    public void processGZSHWDTask() throws Exception {
-
-        if (netgzsc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        // 提取品牌信息
-        Brand record = brandService.lambdaQuery().eq(Brand::getBrand,"格力").one();
-        if (record == null){
-            log.info("格力品牌信息不存在【brand】");
-            return;
-        }
-
-        String synTaskNo = UUID.randomUUID().toString();
-
-        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.GLXSSH_WEBSIT.getCode() + "/querylist";
-        paramMap.put("belongCompany",InterFaceTypeEnum.GSSH_WEBSIT_CODE.getCode());
-        String paramJson= JSON.toJSONString(paramMap);
-
-        JSONResult jsonResult = HttpUtil.httpRequestWithToken(url, "POST", paramJson, token);
-        if (StringUtils.isEmpty(jsonResult.getStatus()) || !jsonResult.getStatus().toString().equals("200")) {
-            log.info("下载广州售后网点基础资料信息失败!: {}",jsonResult.getMessage());
-            return;
-        }
-        JSONArray jsonArray = (JSONArray) jsonResult.getData();
-
-        if (!StringUtils.isEmpty(jsonArray)) {
-            log.info("广州售后网点下载了{}条数据",jsonArray.size());
-
-            glppgfWebsitService.extractedGZSH(jsonArray, record, synTaskNo);
-
-            log.info("广州售后网点基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }*/
-
-}

+ 0 - 189
src/main/java/com/zfire/jiasm/syncdata/download/basedata/GLPPGFWebsitWorkerbak.java

@@ -1,189 +0,0 @@
-package com.zfire.jiasm.syncdata.download.basedata;
-
-import lombok.extern.slf4j.Slf4j;
-
-/** 线程太多,合并线程
- * 格力品牌广佛网点维修工基础资料下载(销售与售后网点维修工)
- * 1: 落下载表 存在修改不存在新增
- * 新增或修改生成 worker:师傅信息表,
- * 商户网点与平台网点存在对应关系时 同步师傅数据到网点表 websit_worker:网点师傅信息表, worker_brand_account:师傅网点对应品牌网点信息表
- */
-@Slf4j
-// @Component
-public class GLPPGFWebsitWorkerbak {
-    /*
-    @Value("${baseurl}")
-    private String baseurl = "";
-    @Value("${fsxwxgc}")
-    private String fsxwxgc = "";
-    @Value("${gzxwxgc}")
-    private String gzxwxgc = "";
-    @Value("${fsswxgc}")
-    private String fsswxgc = "";
-    @Value("${gzswxgc}")
-    private String gzswxgc = "";
-    @Value("${gfwwwc}")
-    private String gfwwwc = "";
-
-
-
-    @Resource
-    TokenCenter tokenCenter;
-    @Resource
-    GLPPGFWebsitWorkerService glppgfWebsitWorkerService;
-
-    // X2300000 佛山销售网点维修工基础资料下载
-    @Scheduled(fixedDelayString = "${fsxwxg}")
-    public void processFSXSWDTask() throws Exception {
-        if (fsxwxgc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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.GLXSSH_WEBSIT_WORK.getCode() + "/querylist";
-        paramMap.put("belongCompany", InterFaceTypeEnum.FSXS_WEBSIT_CODE.getCode());
-        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();
-        if (jsonArray != null) {
-            log.info("佛山销售网点维修工下载了{}条数据",jsonArray.size());
-
-            glppgfWebsitWorkerService.extractedFSXS(jsonArray);
-
-            log.info("佛山销售网点维修工基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-    // X2100000 广州销售网点维修工基础资料下载
-    @Scheduled(fixedDelayString = "${gzxwxg}")
-    public void processGZXSWDTask() throws Exception {
-        if (gzxwxgc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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.GLXSSH_WEBSIT_WORK.getCode() + "/querylist";
-        paramMap.put("belongCompany", InterFaceTypeEnum.GZXS_WEBSIT_CODE.getCode());
-        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();
-
-        if (jsonArray != null) {
-            log.info("广州销售网点维修工下载了{}条数据",jsonArray.size());
-
-            glppgfWebsitWorkerService.extractedGZXS(jsonArray);
-
-            log.info("广州销售网点维修工基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-    // S9219807 佛山售后网点维修工基础资料下载
-    @Scheduled(fixedDelayString = "${fsswxg}")
-    public void processFSSHWDTask() throws Exception {
-        if (fsswxgc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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.GLXSSH_WEBSIT_WORK.getCode() + "/querylist";
-        paramMap.put("belongCompany", InterFaceTypeEnum.FSSH_WEBSIT_CODE.getCode());
-        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();
-
-        if (jsonArray != null) {
-            log.info("佛山售后网点维修工下载了{}条数据",jsonArray.size());
-
-            glppgfWebsitWorkerService.extractedFSSH(jsonArray);
-
-            log.info("佛山售后网点维修工基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-    // S9219801 广州售后网点维修工基础资料下载
-    @Scheduled(fixedDelayString = "${gzswxg}")
-    public void processGZSHWDTask() throws Exception {
-        if (gzswxgc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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.GLXSSH_WEBSIT_WORK.getCode() + "/querylist";
-        paramMap.put("belongCompany", InterFaceTypeEnum.GSSH_WEBSIT_CODE.getCode());
-        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();
-
-        if (jsonArray != null) {
-            log.info("广州售后网点维修工下载了{}条数据",jsonArray.size());
-
-            glppgfWebsitWorkerService.extractedGZSH(jsonArray);
-
-            log.info("广州售后网点维修工基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-
-    // 数据同步到本地表(worker:师傅信息表 + worker_brand_account:师傅网点对应品牌网点信息表 + websit_worker:网点师傅信息表)
-    // 师傅信息一定新增
-    // 品牌网点与平台网点有对应关系才会同步生成相应的网点数据
-    @Scheduled(fixedDelayString = "${gfwww}")
-    private void process() {
-        if (gfwwwc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        glppgfWebsitWorkerService.inputData();
-    }*/
-
-
-}

+ 0 - 165
src/main/java/com/zfire/jiasm/syncdata/download/basedata/GLPPLeiBiebak.java

@@ -1,165 +0,0 @@
-package com.zfire.jiasm.syncdata.download.basedata;
-
-import lombok.extern.slf4j.Slf4j;
-
-/** 线程太多,合并线程
- * 格力品牌类别系列基础资料下载(大类、小类、系列、机型)
- */
-@Slf4j
-// @Component
-public class GLPPLeiBiebak {
-    /*
-    @Value("${baseurl}")
-    private String baseurl = "";
-    @Value("${lbdlc}")
-    private String lbdlc = "";
-    @Value("${lbxlc}")
-    private String lbxlc = "";
-    @Value("${lbxltc}")
-    private String lbxltc = "";
-    @Value("${lbjxc}")
-    private String lbjxc = "";
-
-    @Resource
-    TokenCenter tokenCenter;
-    @Resource
-    GLPPLeiBieService glppLeiBieService;
-
-
-    //格力品牌大类基础资料信息同步
-    @Scheduled(fixedDelayString = "${lbdl}")
-    public void processDLTask() throws Exception {
-        if (lbdlc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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.GELI_DL.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();
-        if (jsonArray != null) {
-            log.info("下载了{}条数据",jsonArray.size());
-
-            glppLeiBieService.extractedDL(jsonArray);
-
-            log.info("格力大类基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-    //格力品牌小类基础资料信息同步
-    @Scheduled(fixedDelayString = "${lbxl}")
-    public void processXLTask() throws Exception {
-        if (lbxlc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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.GELI_XL.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();
-        if (jsonArray != null) {
-            log.info("下载了{}条数据",jsonArray.size());
-
-            glppLeiBieService.extractedXL(jsonArray);
-
-            log.info("格力小类基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-    //格力品牌系列基础资料信息同步
-    @Scheduled(fixedDelayString = "${lbxlt}")
-    public void processPPXLTask() throws Exception {
-        if (lbxltc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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.GELI_PPXL.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();
-        if (jsonArray != null) {
-            log.info("下载了{}条数据",jsonArray.size());
-
-            glppLeiBieService.extractedXiLie(jsonArray);
-
-            log.info("格力品牌系列基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-    //格力品牌机型基础资料信息同步
-    @Scheduled(fixedDelayString = "${lbjx}")
-    public void processPPJXTask() throws Exception {
-        if (lbjxc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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.GELI_PPJX.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();
-
-        if (jsonArray != null) {
-            log.info("下载了{}条数据",jsonArray.size());
-
-            glppLeiBieService.extractedJX(jsonArray);
-
-            log.info("格力品牌机型基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-*/
-}

+ 0 - 63
src/main/java/com/zfire/jiasm/syncdata/download/basedata/GLPPXSLXDownload.java

@@ -1,63 +0,0 @@
-package com.zfire.jiasm.syncdata.download.basedata;
-
-import lombok.extern.slf4j.Slf4j;
-
-/**
- * 格力品牌安装销售类型基础资料下载
- */
-@Slf4j
-// @Component
-public class GLPPXSLXDownload {
-    /*@Value("${baseurl}")
-    private String baseurl = "";
-    @Value("${azxslxc}")
-    private String azxslxc = "";
-
-    @Resource
-    TokenCenter tokenCenter;
-    @Resource
-    GLPPXSLXDownloadService glppxslxDownloadService;
-
-
-
-    *//**
-     * 格力品牌安装销售类型信息同步
-     * @return
-     *//*
-    @Scheduled(fixedDelayString = "${azxslx}")
-    public void processXSLXTask() throws Exception {
-        if (azxslxc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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();
-
-        if (jsonArray != null) {
-
-            log.info("下载了{}条数据",jsonArray.size());
-
-            glppxslxDownloadService.extractedXSLX(jsonArray);
-
-            jsonArray.clear();
-            log.info("格力品牌安装销售类型信息处理完成: \uF0B7{}",sdf.format(new Date()));
-
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }*/
-
-}

+ 0 - 117
src/main/java/com/zfire/jiasm/syncdata/download/basedata/GLPPXuQiuLeiBiebak.java

@@ -1,117 +0,0 @@
-package com.zfire.jiasm.syncdata.download.basedata;
-
-import lombok.extern.slf4j.Slf4j;
-
-/** 线程太多,合并线程
- * 格力品牌 需求类别 - 需求类别基础资料下载(需求大类、需求小类)
- */
-@Slf4j
-// @Component
-public class GLPPXuQiuLeiBiebak {
-    /*
-    @Value("${baseurl}")
-    private String baseurl = "";
-    @Value("${xqdlc}")
-    private String xqdlc = "";
-    @Value("${xqxlc}")
-    private String xqxlc = "";
-
-    @Resource
-    TokenCenter tokenCenter;
-    @Resource
-    BrandService brandService;
-    @Resource
-    GLPPXuQiuLeiBieService glppXuQiuLeiBieService;
-
-
-
-    // 格力品牌需求大类基础资料信息同步
-    @Scheduled(fixedDelayString = "${xqdl}")
-    public void processXQDLTask() throws Exception {
-
-
-        if (xqdlc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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()));
-
-        // 提取品牌信息
-        Brand brandRec = brandService.lambdaQuery().eq(Brand::getBrand,"格力").one();
-        if (brandRec == null){
-            log.info("格力品牌信息不存在【brand】");
-            return;
-        }
-
-        Token token = tokenCenter.getCurrentToken();
-        String url = baseurl + InterFaceTypeEnum.GELI_XQDL.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();
-
-        if (jsonArray != null) {
-
-            log.info("下载了{}条数据",jsonArray.size());
-
-            glppXuQiuLeiBieService.extractedXQDL(brandRec,jsonArray);
-
-            log.info("格力品牌需求大类处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-    // 格力品牌需求小类基础资料信息同步
-    @Scheduled(fixedDelayString = "${xqxl}")
-    public void processXQXLTask() throws Exception {
-
-
-        if (xqxlc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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()));
-
-        // 提取品牌信息
-        Brand brandRec = brandService.lambdaQuery().eq(Brand::getBrand,"格力").one();
-        if (brandRec == null){
-            log.info("格力品牌信息不存在【brand】");
-            return;
-        }
-
-        Token token = tokenCenter.getCurrentToken();
-        String url = baseurl + InterFaceTypeEnum.GELI_XQXL.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();
-
-        if (jsonArray != null) {
-
-            log.info("下载了{}条数据",jsonArray.size());
-
-            glppXuQiuLeiBieService.extractedXQXL(brandRec,jsonArray);
-
-
-            log.info("格力品牌需求小类处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-*/
-}

+ 0 - 174
src/main/java/com/zfire/jiasm/syncdata/download/basedata/GLPPYHSXXXQDbak.java

@@ -1,174 +0,0 @@
-package com.zfire.jiasm.syncdata.download.basedata;
-
-import lombok.extern.slf4j.Slf4j;
-
-/** 线程太多,合并线程
- * 格力品牌用户属性、信息渠道 基础资料下载(用户属性、用户等级、信息渠道、信息来源)
- */
-@Slf4j
-// @Component
-public class GLPPYHSXXXQDbak {
-    /*
-    @Value("${baseurl}")
-    private String baseurl = "";
-    @Value("${yhsxc}")
-    private String yhsxc = "";
-    @Value("${yhdjc}")
-    private String yhdjc = "";
-    @Value("${xxqdc}")
-    private String xxqdc = "";
-    @Value("${xxlyc}")
-    private String xxlyc = "";
-
-
-    @Resource
-    TokenCenter tokenCenter;
-    @Resource
-    GLPPYHSXXXQDService glppyhsxxxqdService;
-
-
-    // 格力品牌用户属性信息同步
-    @Scheduled(fixedDelayString = "${yhsx}")
-    public void processYHSXTask() throws Exception {
-
-
-        if (yhsxc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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_YHSX.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();
-        if (jsonArray != null) {
-            log.info("下载了{}条数据",jsonArray.size());
-
-            glppyhsxxxqdService.extractedYHSX(jsonArray);
-
-            log.info("格力品牌用户属性信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-    // 格力品牌用户等级信息同步
-    @Scheduled(fixedDelayString = "${yhdj}")
-    public void processYHDJTask() throws Exception {
-
-
-        if (yhdjc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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_YHDJ.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();
-        if (jsonArray != null) {
-            log.info("下载了{}条数据",jsonArray.size());
-
-            glppyhsxxxqdService.extractedYHDJ(jsonArray);
-
-            log.info("格力品牌用户等级信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-    // 格力品牌信息渠道信息同步
-    @Scheduled(fixedDelayString = "${xxqd}")
-    public void processXXQDTask() throws Exception {
-
-
-        if (xxqdc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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_XXQD.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();
-        if (jsonArray != null) {
-            log.info("下载了{}条数据",jsonArray.size());
-
-            glppyhsxxxqdService.extractedXXQD(jsonArray);
-
-            log.info("格力品牌信息渠道信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-
-    // 格力品牌信息来源信息同步
-    @Scheduled(fixedDelayString = "${xxly}")
-    public void processXXLYTask() throws Exception {
-
-
-        if (xxlyc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        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_XXLY.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();
-        if (jsonArray != null) {
-            log.info("下载了{}条数据",jsonArray.size());
-
-            glppyhsxxxqdService.extractedXXLY(jsonArray);
-
-            log.info("格力品牌信息来源信息处理完成: \uF0B7{}",sdf.format(new Date()));
-        }else {
-            log.info("["+url+"]无数据");
-        }
-    }
-*/
-}

+ 0 - 115
src/main/java/com/zfire/jiasm/syncdata/download/basedata/ProvinceCityAreaTown.java

@@ -1,115 +0,0 @@
-package com.zfire.jiasm.syncdata.download.basedata;
-
-import lombok.extern.slf4j.Slf4j;
-
-
-/**
- * 省、市、区、镇、数据同步
- */
-@Slf4j
-// @Component
-public class ProvinceCityAreaTown {
- /*   @Value("${baseurl}")
-    private String baseurl = "";
-    @Value("${sxc}")
-    private String sxc = "";
-    @Value("${ssxc}")
-    private String ssxc = "";
-    @Value("${qxc}")
-    private String qxc = "";
-    @Value("${zxc}")
-    private String zxc = "";
-
-    @Resource
-    TokenCenter tokenCenter;
-    @Resource
-    ProvinceCityAreaTownService provinceCityAreaTownService;
-    @Resource
-    CityService cityService;
-    @Resource
-    ProvinceService provinceService;
-
-
-
-    *//**
-     * 省份基础资料信息同步
-     * @return
-     *//*
-    @Scheduled(fixedDelayString = "${sx}")
-    public void process() throws Exception {
-        if (sxc.equals(TaskConfigEnum.FALSE.getCode())){
-            return;
-        }
-
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        Map<String, String> paramMap = new HashMap<String, String>();
-        List<String> req = new ArrayList<>();
-
-        req.add(InterFaceTypeEnum.TBL_PROVINCE.getCode());
-        req.add(InterFaceTypeEnum.TBL_CITY.getCode());
-        req.add(InterFaceTypeEnum.TBL_COUNTY.getCode());
-        req.add(InterFaceTypeEnum.TBL_CITY_JDXZ.getCode());
-
-        log.info("开始下载地理位置基础资料信息: \uF0B7{}",sdf.format(new Date()));
-
-        Token token = tokenCenter.getCurrentToken();
-        for (String bc :req){
-            try {
-
-                if (bc.equals(InterFaceTypeEnum.TBL_CITY.getCode())){
-                    // 提取省份信息
-                    List<Province> provinceRec =  provinceService.lambdaQuery().list();
-                    // 省份信息未同步时先不同步
-                    if (CollectionUtils.isEmpty(provinceRec)){
-                        provinceRec.clear();
-                        continue;
-                    }
-                }
-
-                if (bc.equals(InterFaceTypeEnum.TBL_COUNTY.getCode()) ||
-                        bc.equals(InterFaceTypeEnum.TBL_CITY_JDXZ.getCode()) ){
-                    // 提取市信息
-                    List<City> cityRec =  cityService.lambdaQuery().list();
-                    // 市信息未同步时先不同步
-                    if (CollectionUtils.isEmpty(cityRec)){
-                        cityRec.clear();
-                        continue;
-                    }
-                }
-
-                String url = baseurl + bc + "/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());
-                    continue;
-                }
-
-                JSONArray jsonArray = (JSONArray) jsonResult.getData();
-                if (jsonArray != null) {
-                    log.info("下载了{}条数据",jsonArray.size());
-
-                    if (bc.equals(InterFaceTypeEnum.TBL_PROVINCE.getCode())){
-                        provinceCityAreaTownService.extractedProvince(jsonArray);
-                    } else if (bc.equals(InterFaceTypeEnum.TBL_CITY.getCode())){
-                        provinceCityAreaTownService.extractedCity(jsonArray);
-                    } else if (bc.equals(InterFaceTypeEnum.TBL_COUNTY.getCode())){
-                        provinceCityAreaTownService.extractedCounty(jsonArray);
-                    } else if (bc.equals(InterFaceTypeEnum.TBL_CITY_JDXZ.getCode())){
-                        provinceCityAreaTownService.extractedStreet(jsonArray);
-                    }
-                    jsonArray.clear();
-                }else {
-                    log.info("["+url+"]无数据");
-                }
-            } catch (Exception ex) {
-                log.info("地理位置基础资料信息处理失败");
-                ex.printStackTrace();
-            }
-        }
-
-        log.info("地理位置基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-    }*/
-
-}

+ 0 - 227
src/main/java/com/zfire/jiasm/syncdata/download/basedata/ProvinceCityAreaTownbak.java

@@ -1,227 +0,0 @@
-package com.zfire.jiasm.syncdata.download.basedata;
-
-import lombok.extern.slf4j.Slf4j;
-
-
-/** 线程太多,合并线程
- * 省、市、区、镇、数据同步
- */
-@Slf4j
-// @Component
-public class ProvinceCityAreaTownbak {
-    /*
-    @Value("${baseurl}")
-    private String baseurl = "";
-    @Value("${sxc}")
-    private String sxc = "";
-    @Value("${ssxc}")
-    private String ssxc = "";
-    @Value("${qxc}")
-    private String qxc = "";
-    @Value("${zxc}")
-    private String zxc = "";
-
-    @Resource
-    TokenCenter tokenCenter;
-    @Resource
-    ProvinceCityAreaTownService provinceCityAreaTownService;
-    @Resource
-    CityService cityService;
-    @Resource
-    ProvinceService provinceService;
-
-
-
-    // 省份基础资料信息同步
-    @Scheduled(fixedDelayString = "${sx}")
-    public void processProvinceTask() {
-        try{
-
-
-            if (sxc.equals(TaskConfigEnum.FALSE.getCode())){
-                return;
-            }
-
-            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
-            log.info("开始下载省份基础资料信息: \uF0B7{}",sdf.format(new Date()));
-
-            Map<String, String> paramMap = new HashMap<String, String>();
-            Token token = tokenCenter.getCurrentToken();
-            String url = baseurl + InterFaceTypeEnum.TBL_PROVINCE.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();
-
-            if (jsonArray != null) {
-                log.info("下载了{}条数据",jsonArray.size());
-
-                provinceCityAreaTownService.extractedProvince(jsonArray);
-
-                log.info("省份基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-            }else {
-                log.info("["+url+"]无数据");
-            }
-        } catch (Exception ex){
-            log.error("下载省份基础资料信息失败!", ex);
-        }
-    }
-
-    // 市基础资料信息同步
-    @Scheduled(fixedDelayString = "${ssx}")
-    public void processCityTask() {
-        try{
-
-
-            if (ssxc.equals(TaskConfigEnum.FALSE.getCode())){
-                return;
-            }
-
-            // 提取省份信息
-            List<Province> provinceRec =  provinceService.lambdaQuery().list();
-            // 省份信息未同步时先不同步
-            if (CollectionUtils.isEmpty(provinceRec)){
-                return;
-            }
-            provinceRec.clear();
-
-            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-            String dt = sdf.format(new Date());
-
-            log.info("开始下载市基础资料信息: {}",dt);
-
-            Map<String, String> paramMap = new HashMap<String, String>();
-            Token token = tokenCenter.getCurrentToken();
-            String url = baseurl + InterFaceTypeEnum.TBL_CITY.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();
-
-            if (jsonArray != null) {
-                log.info("下载了{}条数据"+jsonArray.size());
-
-                provinceCityAreaTownService.extractedCity(jsonArray);
-
-                log.info("市基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-
-            }else {
-                log.info("["+url+"]无数据");
-            }
-        } catch (Exception ex){
-            log.error("下载市基础资料信息失败!", ex);
-        }
-    }
-
-    // 区基础资料信息同步
-    @Scheduled(fixedDelayString = "${qx}")
-    public void processCountyTask() {
-        try{
-
-
-            if (qxc.equals(TaskConfigEnum.FALSE.getCode())){
-                return;
-            }
-
-
-            // 提取市信息
-            List<City> cityRec =  cityService.lambdaQuery().list();
-            // 市信息未同步时先不同步
-            if (CollectionUtils.isEmpty(cityRec)){
-                return;
-            }
-            cityRec.clear();
-
-            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-            String dt = sdf.format(new Date());
-
-            log.info("开始下载区基础资料信息: {}",dt);
-
-            Map<String, String> paramMap = new HashMap<String, String>();
-            Token token = tokenCenter.getCurrentToken();
-            String url = baseurl + InterFaceTypeEnum.TBL_COUNTY.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();
-
-            if (jsonArray != null) {
-                log.info("下载了{}条数据"+jsonArray.size());
-
-                provinceCityAreaTownService.extractedCounty(jsonArray);
-
-                log.info("区基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-
-            }else {
-                log.info("["+url+"]无数据");
-            }
-        } catch (Exception ex){
-            log.error("下载区基础资料信息失败!", ex);
-        }
-    }
-
-    // 乡镇基础资料信息同步
-    @Scheduled(fixedDelayString = "${zx}")
-    public void processCityJDTask() {
-        try{
-
-
-            if (zxc.equals(TaskConfigEnum.FALSE.getCode())){
-                return;
-            }
-
-
-            // 提取市信息
-            List<City> cityRec =  cityService.lambdaQuery().list();
-            // 市信息未同步时先不同步
-            if (CollectionUtils.isEmpty(cityRec)){
-                return;
-            }
-            cityRec.clear();
-
-            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-            String dt = sdf.format(new Date());
-
-            log.info("开始下载乡镇基础资料信息: {}",dt);
-
-            Map<String, String> paramMap = new HashMap<String, String>();
-            Token token = tokenCenter.getCurrentToken();
-            String url = baseurl + InterFaceTypeEnum.TBL_CITY_JDXZ.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();
-
-            if (jsonArray != null) {
-                log.info("下载了{}条数据"+jsonArray.size());
-
-                provinceCityAreaTownService.extractedStreet(jsonArray);
-
-                log.info("乡镇基础资料信息处理完成: \uF0B7{}",sdf.format(new Date()));
-            }else {
-                log.info("["+url+"]无数据");
-            }
-        } catch (Exception ex){
-            log.error("下载乡镇基础资料信息失败!", ex);
-        }
-    }
-    */
-
-}

+ 0 - 224
src/main/java/com/zfire/jiasm/syncdata/download/order/DetailDownloadRepairTask.java

@@ -1,224 +0,0 @@
-package com.zfire.jiasm.syncdata.download.order;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.zfire.jiasm.syncdata.constant.TaskConfigEnum;
-import com.zfire.jiasm.syncdata.data.DetailDownloadData;
-import com.zfire.jiasm.syncdata.data.Token;
-import com.zfire.jiasm.syncdata.plus.entity.SysDict;
-import com.zfire.jiasm.syncdata.service.DetailDownloadService;
-import com.zfire.jiasm.syncdata.service.PublicService;
-import com.zfire.jiasm.syncdata.utils.DataUtil;
-import com.zfire.jiasm.syncdata.utils.HttpUtil;
-import com.zfire.jiasm.syncdata.utils.JSONResult;
-import com.zfire.jiasm.syncdata.utils.TokenCenter;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.scheduling.annotation.Scheduled;
-
-import javax.annotation.Resource;
-import java.util.*;
-
-
-/** 该定时器不再执行
- * 维修工单附加信息下载  这里在工单主表同步那里有了不需要再做
- */
-@Slf4j
-// @Component
-public class DetailDownloadRepairTask {
-	@Value("${baseurl}")
-	private String baseurl = "";
-	@Value("${detaildownc}")
-	private String detaildownc = "";
-
-	@Autowired
-	private TokenCenter tokenCenter;
-	@Autowired
-	private DetailDownloadService detailDownloadService;
-	@Resource
-	PublicService publicService;
-
-
-	// @Scheduled(fixedDelayString = "${detaildown}")
-	private void process() {
-		try {
-			if (1==1){
-				return ;
-			}
-
-			if (detaildownc.equals(TaskConfigEnum.FALSE.getCode())){
-				return;
-			}
-
-
-			Map<String, List<SysDict>> sysDictRefDLMap = new HashMap<>();
-			sysDictRefDLMap = publicService.getStringListMapXqLb();
-
-			Token token = tokenCenter.getCurrentToken();
-			// 同步规则表中提取数据 itf_gree_to_fa_download_task_type
-			// 这里只查到一个92的记录数据
-			List<Map<String, Object>> types = detailDownloadService.getTaskTypeRepair();
-			for (Map<String, Object> downloadType : types) {
-				int topDownloadTaskType = (Integer) downloadType.get("download_task_type");
-				// 关联任务表提取相应的数据 这里也只能取到92的任务
-				List<Map<String, Object>> result = detailDownloadService.getTaskDataRepair(topDownloadTaskType);
-				for (Map<String, Object> row : result) {
-					// 任务类型
-					int downloadTaskType = (Integer) row.get("download_task_type");
-					// 任务号,自生成(主表下载后平台自生成与总部无关联)
-					String downloadTaskNo = (String) row.get("download_task_no");
-					Integer downloadTimes = (Integer) row.get("download_times");
-					// 下载任务标识即工单的pgguid
-					String downloadKeyValue = ((String) row.get("download_key_value")).trim();
-					try {
-						// 数据同步规则表中提取相应的同步表字段
-						List<Map<String, Object>> tables = detailDownloadService.getTaskTables(downloadTaskType);
-						List<DetailDownloadData> detailDownloadDatas = new ArrayList<>();
-						// 获取数据
-						getDatasRepair(token, downloadTaskNo, downloadKeyValue, tables, detailDownloadDatas);
-
-						// 数据插入到相关表中
-						detailDownloadService.insertDataRepair(downloadTaskNo, detailDownloadDatas,downloadTaskType,
-								downloadKeyValue,sysDictRefDLMap);
-
-					} catch (Exception ex) {
-						log.error("执行维修明细下载任务[" + downloadTaskNo + "]发生错误", ex);
-						detailDownloadService.updateError(downloadTaskNo, downloadTimes, ex.getMessage());
-					}
-				}
-			}
-		} catch (Exception ex) {
-			log.error("ִ执行维修明细任务发生错误", ex);
-		}
-	}
-
-	private void getDatas(Token token, String downloadTaskNo, String downloadKeyValue, List<Map<String, Object>> tables, List<DetailDownloadData> detailDownloadDatas) throws Exception {
-		for (Map<String, Object> table : tables) {
-			String downloadMode = (String) table.get("download_mode");
-			String srcTabName = (String) table.get("src_tab_name");
-
-			log.info("安装明细任务开始下载[" + srcTabName + ",download_task_no=" + downloadTaskNo + "]");
-			String srcTabColList = ((String) table.get("src_tab_col_list"));
-			String destTabName = (String) table.get("dest_tab_name");
-			String destTabColList = ((String) table.get("dest_tab_col_list"));
-			String filterKeyName = ((String) table.get("filter_key_name")).trim();
-
-			String paramJson;
-			String url;
-			JSONArray jsonArray;
-
-			if ("interface".equalsIgnoreCase(downloadMode)) {
-				// 接口只用到了工单的PGGUID
-				String serviceName = srcTabName;
-				url = baseurl + serviceName;
-				paramJson = "[\"" + downloadKeyValue + "\"]";
-				JSONObject jsonResult = HttpUtil.httpRequestGetPgid(url, "POST", token, downloadKeyValue,paramJson);
-				String statusCode = jsonResult.getString("status");
-				if ("200".equals(statusCode)) {
-					jsonArray = jsonResult.getJSONArray("data");
-				} else {
-					String errorMessage = jsonResult.getString("message");
-					if (errorMessage == null || errorMessage.trim().length() == 0) {
-						errorMessage = "失败";
-					}
-					throw new Exception(errorMessage);
-				}
-
-			} else {
-				String serviceName = DataUtil.fromDbName2ServiceName(srcTabName);
-				url = baseurl + serviceName + "/querylist";
-				Map<String, String> paramMap = new HashMap<String, String>();
-				paramMap.put(filterKeyName, downloadKeyValue);
-				paramJson = JSON.toJSONString(paramMap);
-
-				log.info("url[" + url + "],send[" + paramJson + "]");
-				JSONResult jsonResult = HttpUtil.httpRequestWithToken(url, "POST", paramJson, token);
-				jsonArray = (JSONArray) jsonResult.getData();
-			}
-			String[] arySrcTabCol = srcTabColList.split("\\Q,\\E");
-			String[] arySrcTabColValue;
-			if (jsonArray != null && jsonArray.size() > 0) {
-				log.info("安装明细任务[" + srcTabName + "," + downloadTaskNo + "][" + url + "]下载了["
-						+ jsonArray.size() + "]条数据");
-				for (int i = 0; i < jsonArray.size(); i++) {
-					JSONObject aData = jsonArray.getJSONObject(i);
-					arySrcTabColValue = new String[arySrcTabCol.length];
-					for (int j = 0; j < arySrcTabCol.length; j++) {
-						arySrcTabColValue[j] = findValue(
-								DataUtil.fromDbName2ServiceName(arySrcTabCol[j].trim()), aData);
-					}
-					DetailDownloadData detailDownloadData = new DetailDownloadData();
-					detailDownloadData.setDestTabName(destTabName);
-					detailDownloadData.setDestTabColList(destTabColList);
-					detailDownloadData.setArySrcTabColValue(arySrcTabColValue);
-					detailDownloadDatas.add(detailDownloadData);
-				}
-			} else {
-				log.info("安装明细任务[" + srcTabName + "," + downloadTaskNo + "][" + url + "]无数据");
-			}
-		}
-	}
-
-	private void getDatasRepair(Token token, String downloadTaskNo, String downloadKeyValue, List<Map<String, Object>> tables, List<DetailDownloadData> detailDownloadDatas) throws Exception {
-		for (Map<String, Object> table : tables) {
-			String srcTabName = (String) table.get("src_tab_name");
-
-			log.info("安装明细任务开始下载[" + srcTabName + ",download_task_no=" + downloadTaskNo + "]");
-			String srcTabColList = ((String) table.get("src_tab_col_list"));
-			String destTabName = (String) table.get("dest_tab_name");
-			String destTabColList = ((String) table.get("dest_tab_col_list"));
-			String filterKeyName = ((String) table.get("filter_key_name")).trim();
-
-			String url;
-			JSONArray jsonArray;
-
-			String serviceName = DataUtil.fromDbName2ServiceName(srcTabName);
-			url = baseurl + serviceName + "/querylist";
-			String[] arySrcTabCol = srcTabColList.split("\\Q,\\E");
-			String[] arySrcTabColValue = new String[arySrcTabCol.length];
-
-			Map<String, String> paramMap = new HashMap<String, String>();
-			paramMap.put(filterKeyName, downloadKeyValue);
-			String paramJson = JSON.toJSONString(paramMap);
-			log.info("url[" + url + "],send[" + paramJson + "]");
-			JSONResult jsonResult = HttpUtil.httpRequestWithToken(url, "POST", paramJson, token);
-
-			jsonArray = (JSONArray) jsonResult.getData();
-			if (jsonArray != null && jsonArray.size() > 0) {
-				log.info("维修明细任务[" + srcTabName + "," + downloadTaskNo + "][" + url + "]下载了["
-						+ jsonArray.size() + "]条数据");
-				for (int i = 0; i < jsonArray.size(); i++) {
-					JSONObject aData = jsonArray.getJSONObject(i);
-					arySrcTabColValue = new String[arySrcTabCol.length];
-					for (int j = 0; j < arySrcTabCol.length; j++) {
-						arySrcTabColValue[j] = findValue(
-								DataUtil.fromDbName2ServiceName(arySrcTabCol[j].trim()), aData);
-					}
-					DetailDownloadData detailDownloadData = new DetailDownloadData();
-					detailDownloadData.setDestTabName(destTabName);
-					detailDownloadData.setDestTabColList(destTabColList);
-					detailDownloadData.setArySrcTabColValue(arySrcTabColValue);
-					detailDownloadDatas.add(detailDownloadData);
-				}
-			} else {
-				log.info("维修明细任务[" + srcTabName + "," + downloadTaskNo + "][" + url + "]无数据");
-			}
-		}
-	}
-
-	private String findValue(String srcTabCol, JSONObject aData) {
-
-		Set<String> set = aData.keySet();
-		for (String key : set) {
-			if (key.equalsIgnoreCase(srcTabCol)) {
-				return aData.getString(key);
-			}
-		}
-
-		return null;
-
-	}
-
-}

+ 0 - 16
src/main/java/com/zfire/jiasm/syncdata/service/impl/BaseDownServiceImpl.java

@@ -78,25 +78,9 @@ public class BaseDownServiceImpl implements BaseDownService {
 
     @Override
     public void downData() throws Exception {
-
-        // 格力品牌广佛网点基础资料下载(销售与售后) 单独启动
-        // processGLPPGFWebsit();
-
-        // 格力品牌广佛网点维修工基础资料下载(销售与售后网点维修工) 单独启动
-        // processGLPPGFWebsitWorker();
-
-        // 格力品牌固障代码基础资料下载  同步一次不再同步,PC端使用 单独启动
-        //  processGLPPGuZhandDaiMa();
-
-        // 格力品牌类别系列基础资料下载(大类、小类、系列、机型) 单独开任务处理了,这里不需要再执行(GLPPLeiBie) 单独启动
-        // processGLPPLeiBie();
-
         // 格力品牌安装销售类型基础资料下载 OK
         processGLPPXSLXDownload();
 
-        // 格力品牌 需求类别 - 需求类别基础资料下载(需求大类、需求小类)  单独启动
-        // processGLPPXuQiuLeiBie();
-
         // 格力品牌用户属性、信息渠道 基础资料下载(用户属性、用户等级、信息渠道、信息来源)
         processGLPPYHSXXXQD();