yaozhixue 2 år sedan
förälder
incheckning
858822da72

+ 42 - 0
src/main/java/com/zfire/jiasm/syncdata/base/BaseService.java

@@ -6,6 +6,11 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.io.BufferedInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
 
 /**
  * 基础服务实现类
@@ -24,5 +29,42 @@ public class BaseService {
     }
 
 
+    public void saveToFile(String desUrl,String id){
+        FileOutputStream fos = null;
+        BufferedInputStream bis = null ;
+        HttpURLConnection httpUrl =null;
+        URL url =null;
+        int BUFFER_SIZE = 1024;
+        byte[] buf = new byte[BUFFER_SIZE];
+        int size = -1;
+
+        try {
+            url = new URL(desUrl);
+            httpUrl = (HttpURLConnection) url.openConnection();
+            httpUrl.connect();
+            bis = new BufferedInputStream(httpUrl.getInputStream());
+            fos = new FileOutputStream(System.getProperty("java.io.tmpdir") + id + ".jpeg");
+            while (true){
+                size = bis.read(buf);
+                if (size == -1){
+                    break;
+                }
+                fos.write(buf,0,size);
+            }
+            fos.flush();
+        } catch (IOException e){
+        } catch (ClassCastException e){
+        } finally {
+            try{
+                fos.close();
+                bis.close();
+                httpUrl.disconnect();
+            }catch (IOException e){
+            }catch (NullPointerException e){
+            }
+        }
+    }
+
+
 
 }

+ 1 - 1
src/main/java/com/zfire/jiasm/syncdata/download/AnzhuangGongDanTask.java → src/main/java/com/zfire/jiasm/syncdata/download/AnzhuangGongDan.java

@@ -38,7 +38,7 @@ import java.util.*;
 
 @Slf4j
 @Component
-public class AnzhuangGongDanTask {
+public class AnzhuangGongDan {
     @Value("${baseurl}")
     private String baseurl = "";
 

+ 1 - 1
src/main/java/com/zfire/jiasm/syncdata/download/GLPPGFWebsitTask.java → src/main/java/com/zfire/jiasm/syncdata/download/GLPPGFWebsit.java

@@ -32,7 +32,7 @@ import java.util.stream.Collectors;
  */
 @Slf4j
 @Component
-public class GLPPGFWebsitTask {
+public class GLPPGFWebsit {
     @Value("${baseurl}")
     private String baseurl = "";
 

+ 4 - 6
src/main/java/com/zfire/jiasm/syncdata/download/GLPPGFWebsitWorkTask.java → src/main/java/com/zfire/jiasm/syncdata/download/GLPPGFWebsitWorker.java

@@ -30,7 +30,7 @@ import java.util.stream.Collectors;
  */
 @Slf4j
 @Component
-public class GLPPGFWebsitWorkTask {
+public class GLPPGFWebsitWorker {
     @Value("${baseurl}")
     private String baseurl = "";
 
@@ -185,9 +185,9 @@ public class GLPPGFWebsitWorkTask {
     @Scheduled(fixedDelay = 3 * 60 * 1000)
     @Transactional(rollbackFor = Exception.class)
     public void processGZSHWDTask() throws Exception {
-        if (1==1){
+        /*if (1==1){
             return;
-        }
+        }*/
 
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Map<String, String> paramMap = new HashMap<String, String>();
@@ -215,7 +215,7 @@ public class GLPPGFWebsitWorkTask {
             extractedAddOrUpdate(addRec, updateRec, jsonArray);
 
             // 数据同步到本地表
-            extractedLocalAddOrUpdate(addRec, updateRec);
+            // extractedLocalAddOrUpdate(addRec, updateRec);
 
             log.info("广州售后网点维修工基础资料信息处理完成: {}",sdf.format(new Date()));
         }else {
@@ -223,8 +223,6 @@ public class GLPPGFWebsitWorkTask {
         }
     }
 
-
-
     private void extractedLocalAddOrUpdate(List<ItfTblWangdianWxgDownload> addRec, List<ItfTblWangdianWxgDownload> updateRec) {
         List<Worker> addWorkerRec = new ArrayList<>();
         List<Worker> updateWorkerRec = new ArrayList<>();

+ 116 - 0
src/main/java/com/zfire/jiasm/syncdata/download/GLPPWXGQuery.java

@@ -0,0 +1,116 @@
+package com.zfire.jiasm.syncdata.download;
+
+import com.alibaba.fastjson.JSONObject;
+import com.zfire.jiasm.syncdata.base.BaseService;
+import com.zfire.jiasm.syncdata.gree.GreeLogic;
+import com.zfire.jiasm.syncdata.helper.GreeResponseHelper;
+import com.zfire.jiasm.syncdata.helper.GreeWxgHelper;
+import com.zfire.jiasm.syncdata.plus.entity.ItfTblWangdianWxgDownload;
+import com.zfire.jiasm.syncdata.plus.service.ItfTblWangdianWxgDownloadService;
+import com.zfire.jiasm.syncdata.response.ResultData;
+import com.zfire.jiasm.syncdata.response.WangdianWxgVos;
+import com.zfire.jiasm.syncdata.response.WorkerUploadResponse;
+import com.zfire.jiasm.syncdata.response.WxgQueryInfo;
+import com.zfire.jiasm.syncdata.utils.oss.OSSUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 格力品牌网点维修工基础资料下载
+ */
+@Slf4j
+@Component
+public class GLPPWXGQuery {
+    String wdqyapi = "/outapp/wxg/list";
+
+    @Resource
+    BaseService baseService;
+    @Resource
+    GreeLogic greeLogic;
+    @Resource
+    OSSUtil ossUtil;
+    @Resource
+    ItfTblWangdianWxgDownloadService itfTblWangdianWxgDownloadService;
+
+
+    /**
+     * 按网点查询工程师信息
+     */
+    @Scheduled(fixedDelay = 1 * 60 * 1000)
+    public void wxgQuery() throws Exception {
+
+        if (1==1){
+            return;
+        }
+
+        String wdno = "S21A0020";
+        String wxgno = "S21A00200023";
+        // WxgQueryInfo
+
+        Map<String,Object> req = new HashMap<>();
+        req.put("wdno",wdno);
+        req.put("wxgno",wxgno);
+        req.put("page",1);
+        req.put("size",1);
+        req.put("xsgsshstat",2);
+
+        // 查询工程师
+        GreeResponseHelper responsex = greeLogic.greePost(wdqyapi, JSONObject.toJSONString(req), 1);
+        log.info("response: {}",responsex);
+        WxgQueryInfo resultDatax = JSONObject.parseObject(responsex.getData().toString(), WxgQueryInfo.class);
+        log.info("resultDatax: {}",JSONObject.toJSONString(resultDatax.getWangdianWxgVos()));
+
+
+        // 提取现有的数据信息
+        List<ItfTblWangdianWxgDownload> wxgRecs =  itfTblWangdianWxgDownloadService.lambdaQuery()
+                .select(ItfTblWangdianWxgDownload::getWxgno,
+                        ItfTblWangdianWxgDownload::getWdno)
+                .eq(ItfTblWangdianWxgDownload::getWxgno,"S21A00200023")
+                .like(ItfTblWangdianWxgDownload::getWdno,"S%").list();
+
+        // 查询工程师
+        for (ItfTblWangdianWxgDownload wxg :wxgRecs){
+            GreeResponseHelper response = getWxgInfo(wdqyapi,wxg.getWdno(),wxg.getWxgno());
+            log.info("response: {}",JSONObject.toJSONString(response));
+            if (response.getStatus() == 200){
+                ResultData resultData = JSONObject.parseObject(response.getData().toString(), ResultData.class);
+            }
+
+
+            // 提取证件信息
+        }
+
+
+
+
+
+        // 工程师查询
+         // GreeResponseHelper response = getwdqylbxx(wdqyapi,wdno,wxgno);
+         // log.info("response: {}",JSONObject.toJSONString(response));
+
+        // 工程师图片上传
+        /*String id = IdWorker.getIdStr();
+        baseService.saveToFile(greeLogic.greeFileUrl("1_p_230209_S2105410_1623559060645298177.jpeg"),id);*/
+
+    }
+
+
+
+    private GreeResponseHelper getWxgInfo(String apiPath, String wdno, String wxgno) throws Exception {
+        Map<String,Object> req = new HashMap<>();
+        req.put("wdno",wdno);
+        req.put("wxgno",wxgno);
+        req.put("page",1);
+        req.put("size",1);
+        req.put("xsgsshstat",2);
+        return greeLogic.greePost(apiPath, JSONObject.toJSONString(req), 1);
+    }
+
+
+}

+ 36 - 9
src/main/java/com/zfire/jiasm/syncdata/gree/GreeLogic.java

@@ -6,10 +6,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.aliyuncs.utils.StringUtils;
 import com.zfire.jiasm.syncdata.constant.Constant;
 import com.zfire.jiasm.syncdata.exception.RemoteServiceException;
-import com.zfire.jiasm.syncdata.helper.GreeFileResponseHelper;
-import com.zfire.jiasm.syncdata.helper.GreeFileSaveHelper;
-import com.zfire.jiasm.syncdata.helper.GreeResponseHelper;
-import com.zfire.jiasm.syncdata.helper.ResponseHelper;
+import com.zfire.jiasm.syncdata.helper.*;
 import com.zfire.jiasm.syncdata.http.HttpUtil;
 import com.zfire.jiasm.syncdata.http.HttpUtils;
 import com.zfire.jiasm.syncdata.request.FileSub;
@@ -18,12 +15,15 @@ import com.zfire.jiasm.syncdata.request.UploadImageInfo;
 import com.zfire.jiasm.syncdata.response.ExtData;
 import com.zfire.jiasm.syncdata.utils.RedisUtil;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.http.HttpStatus;
 import org.apache.http.NameValuePair;
 import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.entity.UrlEncodedFormEntity;
 import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
 import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClientBuilder;
 import org.apache.http.impl.client.HttpClients;
@@ -94,6 +94,9 @@ public class GreeLogic {
     @Value("${gree.gettoken}")
     private String tokenFileUrl;
 
+    @Value("${tdownfileurl}")
+    private String tdownfileurl = "";
+
 
     @Autowired
     RedisUtil redisUtil;
@@ -234,10 +237,8 @@ public class GreeLogic {
         OutAppDefaultReq outAppDefaultReq = commonLogic.supplyParam(commonParam);
         Map<String,String> header = new HashMap<>();
         header.put("authorization","Bearer "+this.getAccessToken());
-
         log.info("【请求总部接口】request:{}",JSONObject.toJSONString(outAppDefaultReq));
 
-        // String s = HttpUtils.post(apiUrl, JSONObject.toJSONString(outAppDefaultReq), header);
         // 设置请求头
         HttpHeaders headers = new HttpHeaders();
         headers.setContentType(MediaType.APPLICATION_JSON);
@@ -307,9 +308,35 @@ public class GreeLogic {
     }
 
     // 下载文件
-    public Map<String, Object> greeDownFile(String id) throws Exception {
-        Map<String, Object> result = HttpUtil.httpGet(String.format(downfileurl,id,this.getAccessTokenFile()));
-        return result;
+    public String greeDownFile(String id) throws Exception {
+        /*Map<String, Object> result = HttpUtil.httpGet(String.format(downfileurl,id,this.getAccessTokenFile()));
+        return result;*/
+
+        CloseableHttpClient client = HttpClients.createDefault();
+        String url = String.format(tdownfileurl,id,this.getAccessTokenFile());
+        String image ="";
+        log.info("url:{}",url);
+        HttpGet httpGet = new HttpGet(url);
+        try {
+            CloseableHttpResponse execute = client.execute(httpGet);
+            if (execute.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
+                int statusCode = execute.getStatusLine().getStatusCode();
+                log.info("statusCode:{}", statusCode);
+            }
+            image = EntityUtils.toString(execute.getEntity());
+            System.out.println(image);
+            return image;
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        return image;
+    }
+
+
+    // 下载文件
+    public String greeFileUrl(String id) throws Exception {
+        return  String.format(downfileurl,id,this.getAccessTokenFile());
     }
 
 

+ 0 - 1
src/main/java/com/zfire/jiasm/syncdata/helper/GreeFileSaveHelper.java

@@ -2,7 +2,6 @@ package com.zfire.jiasm.syncdata.helper;
 
 import com.zfire.jiasm.syncdata.response.SaveFileResultData;
 import lombok.Data;
-import org.apache.poi.ss.formula.functions.T;
 
 /**
  * @author yaozx

+ 18 - 0
src/main/java/com/zfire/jiasm/syncdata/helper/GreeWxgHelper.java

@@ -0,0 +1,18 @@
+package com.zfire.jiasm.syncdata.helper;
+
+import lombok.Data;
+
+/**
+ * @author yaozx
+ * @version 1.0
+ * @description 介绍
+ * @date 2023-02-07
+ */
+@Data
+public class GreeWxgHelper<T> {
+    private T data;
+    private Integer status;
+    private String msg;
+
+
+}

+ 57 - 0
src/main/java/com/zfire/jiasm/syncdata/http/HttpUtil.java

@@ -1,9 +1,11 @@
 package com.zfire.jiasm.syncdata.http;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
 import org.apache.http.NameValuePair;
 import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.entity.UrlEncodedFormEntity;
@@ -11,6 +13,7 @@ import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.client.methods.HttpUriRequest;
 import org.apache.http.client.methods.RequestBuilder;
+import org.apache.http.conn.HttpHostConnectException;
 import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClientBuilder;
@@ -130,6 +133,60 @@ public class HttpUtil {
         return result;
     }
 
+
+    public static String sendData(String url, String content) {
+        CloseableHttpClient httpClient;
+        HttpPost httpPost = null;
+        org.apache.http.HttpEntity entity;
+        long interval = System.currentTimeMillis();
+        String resStr="";
+        JSONObject json = new JSONObject();
+        try {
+            httpClient = HttpClients.createDefault();
+            if (httpClient == null) {
+                throw new Exception("httpClient create failed");
+            }
+
+            httpPost = new HttpPost(url);
+            RequestConfig reqconfig = RequestConfig.custom()
+                    .setConnectTimeout(60 * 1000)
+                    .setConnectionRequestTimeout(60 * 1000)
+                    .setSocketTimeout(60 * 1000).build();
+            httpPost.setConfig(reqconfig);
+            httpPost.setHeader("Content-Type", "multipart/form-data");
+            httpPost.setEntity(new StringEntity(content, "UTF-8"));
+
+            //CloseableHttpResponse res = httpClient.execute(httpPost);
+            //int status = res.getStatusLine().getStatusCode();
+            CloseableHttpResponse response =  httpClient.execute(httpPost);
+            int status = response.getStatusLine().getStatusCode();
+            entity = response.getEntity();
+            resStr = EntityUtils.toString(entity).trim();
+            EntityUtils.consume(entity);
+            response.close();
+            if (status != HttpStatus.SC_OK) {
+                json.put("respCode","faile");
+                json.put("respDesc","网络状态异常A");
+
+
+                resStr=JSON.toJSON(json.toJSONString()).toString();
+            }
+        } catch (HttpHostConnectException ex) {
+            json.put("respCode","faile");
+            json.put("respDesc","请求异常B");
+            resStr=JSON.toJSON(json.toJSONString()).toString();
+        } catch (Exception ex) {
+            json.put("respCode","faile");
+            json.put("respDesc","请求异常C");
+            resStr=JSON.toJSON(json.toJSONString()).toString();
+        } finally {
+            interval = System.currentTimeMillis() - interval;
+            if (httpPost != null)
+                httpPost.releaseConnection();
+            return resStr;
+        }
+    }
+
     /**
      * http get请求,利用http请求池
      *

+ 0 - 1
src/main/java/com/zfire/jiasm/syncdata/http/HttpUtils.java

@@ -110,7 +110,6 @@ public class HttpUtils {
                 json.put("respCode","faile");
                 json.put("respDesc","网络状态异常A");
 
-
                 resStr=JSON.toJSON(json.toJSONString()).toString();
             }
         } catch (HttpHostConnectException ex) {

+ 4 - 5
src/main/java/com/zfire/jiasm/syncdata/request/WorkUploadInfo.java

@@ -1,6 +1,5 @@
 package com.zfire.jiasm.syncdata.request;
 
-import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -112,11 +111,11 @@ public class WorkUploadInfo {
     @ApiModelProperty(value = "移动电话")
     private String yddh;
 
-    @ApiModelProperty(value = "每日允许工程机采集工单量")
-    private Integer yxcjgcjgdl;
+    @ApiModelProperty(value = "每日安装单最大数量")
+    private Integer maxaznum;
 
-    @ApiModelProperty(value = "每日允许采集工单量")
-    private Integer yxcjgdl;
+    @ApiModelProperty(value = "每日维修单最大数量")
+    private Integer maxwxnum;
 
     @ApiModelProperty(value = "证件集合:1、身份证:必填;2、高空作业证、上岗资格证、保险证:101、102、103必填;3、驾驶证:勾选家用—配送必填;4、制冷工证:勾选商用—维修必填")
     private List<ZJInfo> zjInfoList;

+ 134 - 0
src/main/java/com/zfire/jiasm/syncdata/response/WangdianWxgVos.java

@@ -0,0 +1,134 @@
+package com.zfire.jiasm.syncdata.response;
+
+import com.zfire.jiasm.syncdata.request.SignSplb;
+import com.zfire.jiasm.syncdata.request.ZJInfo;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author yaozx
+ * @version 1.0
+ * @description 介绍
+ * @date 2023-02-13
+ */
+@Data
+public class WangdianWxgVos {
+    @ApiModelProperty(value = "最近一次修改时间")
+    private String lastModifiedDate;
+
+    @ApiModelProperty(value = "服务人员编号:若有则更新,没有则新建")
+    private String wxgno;
+
+    @ApiModelProperty(value = "?")
+    private Integer xsgsshstat;
+
+    @ApiModelProperty(value = "服务人员地址信息-区县")
+    private String county;
+
+    @ApiModelProperty(value = "从事该工作年数")
+    private Integer csgzns;
+
+    @ApiModelProperty(value = "服务人员地址信息-城市")
+    private String cshi;
+
+    @ApiModelProperty(value = "服务人员地址信息-具体地址")
+    private String dizhi;
+
+    @ApiModelProperty(value = "人脸审核结果:0:未审核;1:通过;9:大数据人脸审核驳回")
+    private Integer facecheck;
+
+    @ApiModelProperty(value = "服务人员人脸存储路径")
+    private String facepath;
+
+    @ApiModelProperty(value = "状态")
+    private String flag;
+
+    @ApiModelProperty(value = "服务人员员工照片保存路径(服务人员自拍照)")
+    private String fwryzpfj;
+
+    @ApiModelProperty(value = "服务人员工资卡卡号")
+    private String gzkkh;
+
+    @ApiModelProperty(value = "服务人员工资卡所属银行")
+    private String gzkssyh;
+
+    @ApiModelProperty(value = "是否已采集人脸:1;是")
+    private Boolean hasfaceFlag;
+
+    @ApiModelProperty(value = "设置黑名单备注")
+    private String hmdbz;
+
+    @ApiModelProperty(value = "是否需要短信提醒:需要/不需要")
+    private Boolean ifmessageFlag;
+
+    @ApiModelProperty(value = "年龄")
+    private Integer nianl;
+
+    @ApiModelProperty(value = "培训合格考试时间")
+    private String pxhgkssj;
+
+    @ApiModelProperty(value = "服务人员钱包ID")
+    private String qbaoid;
+
+    @ApiModelProperty(value = "是否开通钱包(1:开通;0:未开通)")
+    private Boolean qbcheackFlag;
+
+    @ApiModelProperty(value = "是否电商工程师")
+    private Boolean sfdswxgFlag;
+
+    @ApiModelProperty(value = "服务人员地址信息-省份")
+    private String sfen;
+
+    @ApiModelProperty(value = "是否在黑名单:是;否(默认为:false)")
+    private Boolean sfhmdFlag;
+
+    @ApiModelProperty(value = "是否培训合格0:不合格;1:合格")
+    private Boolean sfpxhgFlag;
+
+    @ApiModelProperty(value = "是否开通掌上通:开通/不开通")
+    private Boolean sfzstFlag;
+
+    @ApiModelProperty(value = "服务VIP标识(1-5星,5最高,默认:暂无)")
+    private String vipflag;
+
+    @ApiModelProperty(value = "所属网点:只能填本下级,不填则默认本级")
+    private String wdno;
+
+    @ApiModelProperty(value = "五星网点分数")
+    private Integer wxfensu;
+
+    @ApiModelProperty(value = "服务人员名称")
+    private String wxgmc;
+
+    @ApiModelProperty(value = "现从事工作")
+    private String xcsgz;
+
+    @ApiModelProperty(value = "性别 :男,女")
+    private String xingb;
+
+    @ApiModelProperty(value = "学历:初中以下、中专、高中、大专、本科、研究生")
+    private String xueli;
+
+    @ApiModelProperty(value = "服务人员地址信息-乡镇")
+    private String xzhen;
+
+    @ApiModelProperty(value = "移动电话")
+    private String yddh;
+
+    @ApiModelProperty(value = "每日安装单最大数量")
+    private Integer maxaznum;
+
+    @ApiModelProperty(value = "每日维修单最大数量")
+    private Integer maxwxnum;
+
+    @ApiModelProperty(value = "证件集合:1、身份证:必填;2、高空作业证、上岗资格证、保险证:101、102、103必填;3、驾驶证:勾选家用—配送必填;4、制冷工证:勾选商用—维修必填")
+    private List<ZJInfo> zjInfoList;
+
+    @ApiModelProperty(value = "家用签约品类")
+    private List<SignSplb> jySignSplbList;
+
+    @ApiModelProperty(value = "商用签约品类")
+    private List<SignSplb> sySignSplbList;
+}

+ 33 - 0
src/main/java/com/zfire/jiasm/syncdata/response/WxgQueryInfo.java

@@ -0,0 +1,33 @@
+package com.zfire.jiasm.syncdata.response;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author yaozx
+ * @version 1.0
+ * @description 介绍
+ * @date 2023-02-13
+ */
+@Data
+public class WxgQueryInfo {
+    @ApiModelProperty(value = "当前页")
+    private Integer page;
+
+    @ApiModelProperty(value = "页码")
+    private Integer size;
+
+    @ApiModelProperty(value = "总面数")
+    private Integer total;
+
+    @ApiModelProperty(value = "状态 200成功")
+    private Integer status;
+
+    @ApiModelProperty(value = "描述信息")
+    private String msg;
+
+    @ApiModelProperty(value = "师傅信息")
+    private List<WangdianWxgVos> wangdianWxgVos;
+}

+ 2 - 2
src/main/java/com/zfire/jiasm/syncdata/upload/DownTest.java

@@ -24,8 +24,8 @@ public class DownTest {
             return;
         }
 
-        Map<String, Object>  test = greeLogic.greeDownFile("1_p_230209_S2105410_1623559064415977474.jpeg");
-        log.info("test: {}",test);
+        // Map<String, Object>  test = greeLogic.greeDownFile("1_p_230209_S2105410_1623559064415977474.jpeg");
+        // log.info("test: {}",test);
 
 
     }

+ 16 - 42
src/main/java/com/zfire/jiasm/syncdata/upload/UploadFileTOGreeBefTask.java → src/main/java/com/zfire/jiasm/syncdata/upload/UploadWorkeCertificate.java

@@ -21,6 +21,7 @@ import org.springframework.stereotype.Component;
 
 import javax.annotation.Resource;
 import java.io.BufferedInputStream;
+import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.net.HttpURLConnection;
@@ -33,7 +34,7 @@ import java.util.*;
  */
 @Slf4j
 @Component
-public class UploadFileTOGreeBefTask {
+public class UploadWorkeCertificate {
     @Resource
     WorkerService workerService;
     @Resource
@@ -103,21 +104,30 @@ public class UploadFileTOGreeBefTask {
             // 生成图片
             if (StringUtils.isNotEmpty(item.getFileUrl()) && (StringUtils.isEmpty(item.getOutFileUrl()))){
                 fid1 = IdWorker.getIdStr();
-                saveToFile(ossUtil.getUrlWw(item.getFileUrl()),fid1);
+                baseService.saveToFile(ossUtil.getUrlWw(item.getFileUrl()),fid1);
                 // 获取文件
-                fileo =fid1 + ".jpeg";
+                fileo = System.getProperty("java.io.tmpdir") + fid1 + ".jpeg";
             }
             if (StringUtils.isNotEmpty(item.getFileUrl2()) && (StringUtils.isEmpty(item.getOutFileUrl2()))){
                 fid2 = IdWorker.getIdStr();
-                saveToFile(ossUtil.getUrlWw(item.getFileUrl()),fid2);
+                baseService.saveToFile(ossUtil.getUrlWw(item.getFileUrl()),fid2);
                 // 获取文件
-                filet =fid2 + ".jpeg";
+                filet = System.getProperty("java.io.tmpdir") + fid2 + ".jpeg";
             }
 
             // 上传图片 按网点上传
             for (WorkerBrandAccount wdno: workerWdnos){
                 uploadFileexc(fileo, filet, fid1, fid2,wdno.getBrandWebsitNumber(),item);
             }
+
+            if (StringUtils.isNotEmpty(fileo)){
+                new File(fileo).delete();
+            }
+            if (StringUtils.isNotEmpty(filet)){
+                new File(filet).delete();
+            }
+
+
         }
         log.info("同步师傅证件信息结束: {}",sdf.format(new Date()));
     }
@@ -138,7 +148,6 @@ public class UploadFileTOGreeBefTask {
                 ResultData resultData = JSONObject.parseObject(response.getData().toString(), ResultData.class);
                 resultData.getExtData().setDir(resultData.getExtData().getDir()+"/"+fid1+".jpeg");
                 // 2:文件上传
-                fileo = System.getProperty("java.io.tmpdir") + fid1 + ".jpeg";
                 PostObjectSample ossPostObject = new PostObjectSample();
                 String result = ossPostObject.PostObject(fileo, resultData.getExtData());
                 // 3: 保存文件
@@ -176,7 +185,6 @@ public class UploadFileTOGreeBefTask {
                 ResultData resultData = JSONObject.parseObject(response.getData().toString(), ResultData.class);
                 resultData.getExtData().setDir(resultData.getExtData().getDir()+"/"+fid2+".jpeg");
                 // 2:文件上传
-                filet = System.getProperty("java.io.tmpdir") + fid2 + ".jpeg";
                 PostObjectSample ossPostObject = new PostObjectSample();
                 String result = ossPostObject.PostObject(filet, resultData.getExtData());
                 // 3: 保存文件
@@ -258,41 +266,7 @@ public class UploadFileTOGreeBefTask {
         req.put("name", id1 +".jpeg");
     }
 
-    private void saveToFile(String desUrl,String id){
-        FileOutputStream fos = null;
-        BufferedInputStream bis = null ;
-        HttpURLConnection httpUrl =null;
-        URL url =null;
-        int BUFFER_SIZE = 1024;
-        byte[] buf = new byte[BUFFER_SIZE];
-        int size = -1;
-
-        try {
-            url = new URL(desUrl);
-            httpUrl = (HttpURLConnection) url.openConnection();
-            httpUrl.connect();
-            bis = new BufferedInputStream(httpUrl.getInputStream());
-            fos = new FileOutputStream(System.getProperty("java.io.tmpdir") + id + ".jpeg");
-            while (true){
-                size = bis.read(buf);
-                if (size == -1){
-                    break;
-                }
-                fos.write(buf,0,size);
-            }
-            fos.flush();
-        } catch (IOException e){
-        } catch (ClassCastException e){
-        } finally {
-            try{
-                fos.close();
-                bis.close();
-                httpUrl.disconnect();
-            }catch (IOException e){
-            }catch (NullPointerException e){
-            }
-        }
-    }
+
 
     @Nullable
     private Worker getWorker(WorkerUpload item) {

+ 125 - 50
src/main/java/com/zfire/jiasm/syncdata/upload/UploadWorkerTOGreeTask.java

@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import com.zfire.jiasm.syncdata.base.BaseService;
 import com.zfire.jiasm.syncdata.base.WorkerCertificateInfo;
 import com.zfire.jiasm.syncdata.constant.DictTypeEnum;
@@ -15,10 +14,10 @@ import com.zfire.jiasm.syncdata.plus.service.*;
 import com.zfire.jiasm.syncdata.request.SignSplb;
 import com.zfire.jiasm.syncdata.request.WorkUploadInfo;
 import com.zfire.jiasm.syncdata.request.ZJInfo;
-import com.zfire.jiasm.syncdata.response.ResultData;
 import com.zfire.jiasm.syncdata.response.WebsitQXLB;
 import com.zfire.jiasm.syncdata.response.WorkerUploadResponse;
 import lombok.extern.slf4j.Slf4j;
+import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
@@ -67,9 +66,9 @@ public class UploadWorkerTOGreeTask {
      */
     @Scheduled(fixedDelay = 1 * 60 * 1000)
     public void uploadWorkProcess() throws Exception {
-        /*if (1==1) {
+        if (1==1) {
             return;
-        }*/
+        }
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         List<OutWorkerUpload> recs = new ArrayList<>();
         Worker worker = new Worker();
@@ -77,6 +76,9 @@ public class UploadWorkerTOGreeTask {
         WorkerStreet workerStreet = new WorkerStreet();
         List<SignSplb> jySignSplbList = new ArrayList<>();
         List<SignSplb> sySignSplbList = new ArrayList<>();
+        List<SignSplb> jyList = new ArrayList<>();
+        List<SignSplb> syList = new ArrayList<>();
+        WebsitQXLB  websitqypl = new WebsitQXLB();
 
         String wxgaddapi = "/outapp/wxg/add";
         String wdqyapi = "/outapp/wxg/base";
@@ -119,7 +121,7 @@ public class UploadWorkerTOGreeTask {
                 continue;
             }
 
-            // 提取师傅证件信息,未同时不处理
+            // 提取师傅证件信息,未同时不处理
             if (getCertificateInfo(workerCertificateInfo, worker.getWorkerId())){
                 continue;
             }
@@ -135,20 +137,35 @@ public class UploadWorkerTOGreeTask {
             }
             // 获取网点签约品类
 
-
             // 生成数据对象
-            getreq(workerCertificateInfo, jySignSplbList, sySignSplbList, req, worker, workerStreet);
+            getreq(workerCertificateInfo, req, worker, workerStreet);
 
             // 按网点同步
-            // 该网点未签约家用品类,工程师不能签约家用品类 todo
             for (WorkerBrandAccount dot: workerBrandAccount){
+                //网点未签约品类时该网点师傅信息不同步
+                GreeResponseHelper response = getwdqylbxx(wdqyapi,dot.getBrandWebsitNumber());
+                if (response.getStatus() == 200){
+                    // 获取网点签约的品类信息
+                    websitqypl = JSONObject.parseObject(response.getData().toString(), WebsitQXLB.class);
+                 } else {
+                    // 写入表备注信息
+                    updateWorkerUploadLag(item,"获取网点签约的品类信息失败");
+                    break;
+                }
 
+                // 从网点签约的品类信息中过滤师傅的品类信息
+                extracted(jySignSplbList, sySignSplbList, jyList, syList, websitqypl);
 
-                getwdqylbxx(wdqyapi,dot.getBrandWebsitNumber());
-                if (1==1) {
-                    return;
+                // 过滤后无品类,不能上传
+                if (jyList.size()<1 && syList.size()<1){
+                    // 写入表备注信息
+                    updateWorkerUploadLag(item,"师傅签约品类过滤后不能同时为空");
+                    continue;
                 }
 
+                // 按网点过滤师傅的类别信息
+                req.setJySignSplbList(jyList);
+                req.setSySignSplbList(syList);
 
 
                 // 服务人员编号(不填值为新增,填值为修改)
@@ -163,6 +180,9 @@ public class UploadWorkerTOGreeTask {
 
                 // 同步
                 syncData(dot.getId(), wxgaddapi, item, req);
+
+                jyList.clear();
+                syList.clear();
             }
         }
 
@@ -170,6 +190,55 @@ public class UploadWorkerTOGreeTask {
         return;
     }
 
+    private void extracted(List<SignSplb> jySignSplbList, List<SignSplb> sySignSplbList,
+                           List<SignSplb> jyList, List<SignSplb> syList, WebsitQXLB websitqypl) {
+        List<String> syfwlbList = new ArrayList<>();
+        List<String> jyfwlbList = new ArrayList<>();
+
+        // 过滤商用品类
+        if (websitqypl.getSySignSplbList().size()>0){
+            // 大类名称 取交集
+            websitqypl.getSySignSplbList().get(0).getFwlbList().retainAll(sySignSplbList.get(0).getFwlbList());
+            syfwlbList.addAll(websitqypl.getSySignSplbList().get(0).getFwlbList());
+            // 品类
+            for (SignSplb sy : sySignSplbList){
+                for (SignSplb wdsy: websitqypl.getSySignSplbList()){
+                    if (wdsy.getSpdl().equals(sy.getSpdl()) && wdsy.getSpxl().equals(sy.getSpxl())){
+                        SignSplb one = new SignSplb();
+                        one.setFwlbList(syfwlbList);
+                        one.setSpdl(wdsy.getSpdl());
+                        one.setSpdlName(wdsy.getSpdlName());
+                        one.setSpxl(wdsy.getSpxl());
+                        one.setSpxlName(wdsy.getSpxlName());
+                        syList.add(one);
+                    }
+                }
+            }
+        }
+
+        // 过滤家用品类
+        if (websitqypl.getJySignSplbList().size()>0){
+            // 大类名称 取交集
+            websitqypl.getJySignSplbList().get(0).getFwlbList().retainAll(jySignSplbList.get(0).getFwlbList());
+            jyfwlbList.addAll(websitqypl.getJySignSplbList().get(0).getFwlbList());
+            // 品类
+            for (SignSplb sy : jySignSplbList){
+                for (SignSplb wdjy: websitqypl.getJySignSplbList()){
+                    if (wdjy.getSpdl().equals(sy.getSpdl()) && wdjy.getSpxl().equals(sy.getSpxl())){
+                        SignSplb one = new SignSplb();
+                        one.setFwlbList(syfwlbList);
+                        one.setSpdl(wdjy.getSpdl());
+                        one.setSpdlName(wdjy.getSpdlName());
+                        one.setSpxl(wdjy.getSpxl());
+                        one.setSpxlName(wdjy.getSpxlName());
+                        jyList.add(one);
+                    }
+                }
+            }
+        }
+
+    }
+
     private Boolean checkNecessary(Worker worker, OutWorkerUpload item, WorkerCertificateInfo workerCertificateInfo) {
         Boolean flag = Boolean.FALSE;
         if (StringUtils.isEmpty(workerCertificateInfo.getSfzbh())){
@@ -435,22 +504,12 @@ public class UploadWorkerTOGreeTask {
     }
 
     // 获取网点签约的品类信息 并过滤师傅的品类信息
-    private void getwdqylbxx(String apiPath, String wdno) throws Exception {
+    private GreeResponseHelper getwdqylbxx(String apiPath, String wdno) throws Exception {
         Map<String,String> req = new HashMap<>();
 
         req.put("wdno",wdno);
         GreeResponseHelper response = greeLogic.greePost(apiPath, JSONObject.toJSONString(req), 1);
-        if (response.getStatus() == 200){
-            // 获取网点签约的品类信息
-            WebsitQXLB res = JSONObject.parseObject(response.getData().toString(), WebsitQXLB.class);
-
-
-
-
-        } else {
-            // 失败
-        }
-
+        return response;
     }
 
 
@@ -503,7 +562,6 @@ public class UploadWorkerTOGreeTask {
     }
 
     private void getreq(WorkerCertificateInfo workerCertificateInfo,
-                        List<SignSplb> jySignSplbList, List<SignSplb> sySignSplbList,
                         WorkUploadInfo req, Worker worker, WorkerStreet workerStreet) throws Exception {
         List<ZJInfo> zjInfoList = new ArrayList<>();
 
@@ -511,7 +569,7 @@ public class UploadWorkerTOGreeTask {
         getcert(workerCertificateInfo, zjInfoList, worker);
 
         // 生成数据对象
-        setReq(zjInfoList, jySignSplbList, sySignSplbList, req, worker);
+        setReq(zjInfoList, req, worker);
 
         // 省份-城市-区县-乡镇
         extractedPCAS(req, workerStreet);
@@ -536,11 +594,9 @@ public class UploadWorkerTOGreeTask {
         }
     }
 
-    private void setReq(List<ZJInfo> zjInfoList, List<SignSplb> jySignSplbList,
-                        List<SignSplb> sySignSplbList,WorkUploadInfo req, Worker worker) {
+    private void setReq(List<ZJInfo> zjInfoList, WorkUploadInfo req, Worker worker) {
+
 
-        req.setJySignSplbList(jySignSplbList);
-        req.setSySignSplbList(sySignSplbList);
         req.setZjInfoList(zjInfoList);
 
         req.setCsgzns(worker.getJobAge());
@@ -627,8 +683,8 @@ public class UploadWorkerTOGreeTask {
         if (StringUtils.isNotEmpty(worker.getMobile())){
             req.setYddh(worker.getMobile());
         }
-        req.setYxcjgcjgdl(worker.getCollectEnginLimitNum());
-        req.setYxcjgdl(worker.getCollectLimitNum());
+        req.setMaxwxnum(worker.getRepairDayLimit());
+        req.setMaxaznum(worker.getDayOrderNum());
     }
 
     private void getcert(WorkerCertificateInfo workerCertificateInfo,
@@ -797,26 +853,23 @@ public class UploadWorkerTOGreeTask {
      */
     private Boolean getCategory(Brand brand, List<SignSplb> jySignSplbList, List<SignSplb> sySignSplbList,
                              Worker worker, OutWorkerUpload itemi) {
-        List<String> SYDictCode = new ArrayList<>();
+        List<String> SYDictDaleiCode = new ArrayList<>();
 
-        // 提取所有的商用大类信息
+        // 提取品牌商所有的商用大类信息
         List<SysDict> sysDicts = sysDictService.lambdaQuery()
                 .eq(SysDict::getDictType, DictTypeEnum.DICT_TYPE_MAIN_TYPE.getCode())
                 .eq(SysDict::getFlag, DictTypeEnum.DICT_TYPE_FLAG_SY.getCode()).list();
         if (sysDicts !=null && sysDicts.size()>0){
-            SYDictCode = sysDicts.stream().map(SysDict::getDictCode).collect(Collectors.toList());
+            SYDictDaleiCode = sysDicts.stream().map(SysDict::getDictCode).collect(Collectors.toList());
         }
 
-        // 差网点对应的类别信息,师傅的类别信息需要网点的类别信息内 todo
-        // 差服务类目的同步数据
-
         // 提取师傅的服务大类信息
-        List<WorkerServiceCategoryDetail> categoryRecs = workerServiceCategoryDetailService.lambdaQuery()
+        List<WorkerServiceCategoryDetail> wxgCategoryRecs = workerServiceCategoryDetailService.lambdaQuery()
                 .eq(WorkerServiceCategoryDetail::getWorkerId, worker.getWorkerId()).list();
 
         // 组装类别参数
-        if (categoryRecs !=null && categoryRecs.size()>0){
-            getCategory(brand, jySignSplbList, sySignSplbList, SYDictCode, categoryRecs);
+        if (wxgCategoryRecs !=null && wxgCategoryRecs.size()>0){
+            getCategory(brand, jySignSplbList, sySignSplbList, SYDictDaleiCode, wxgCategoryRecs);
         }
 
         if (jySignSplbList.size()<1 && sySignSplbList.size()<1){
@@ -832,13 +885,14 @@ public class UploadWorkerTOGreeTask {
     // 师傅的服务类型分,安装、维修、配送等
     // 格力网点答约的服务类目也要限制师傅的品数参数
     private void getCategory(Brand brand, List<SignSplb> jySignSplbList, List<SignSplb> sySignSplbList,
-                             List<String> SYDictCode, List<WorkerServiceCategoryDetail> categoryRecs) {
+                             List<String> SYDictDaleiCode, List<WorkerServiceCategoryDetail> wxgCategoryRecs) {
         List<SysDictRef> sysDictRefs = new ArrayList<>();
 
-        // 这里需要按师傅的服务类型分,安装、维修、配送等分别组装参数 这里做 for todo
+        // 组装参数类别名称信息
+        List<String> fwlbList = getCategoryName(wxgCategoryRecs);
 
         // 获取师傅在品牌商品对应的类别信息
-        getDictRefs(brand, categoryRecs, sysDictRefs);
+        getDictRefs(brand, wxgCategoryRecs, sysDictRefs);
 
         // 组关品类参数
         for (SysDictRef item:sysDictRefs){
@@ -848,7 +902,7 @@ public class UploadWorkerTOGreeTask {
                     .eq(SysDict::getDictType, DictTypeEnum.DICT_TYPE_SMALL_TYPE.getCode())
                     .eq(SysDict::getParentDictType, DictTypeEnum.DICT_TYPE_MAIN_TYPE.getCode())
                     .eq(SysDict::getStatus, DictTypeEnum.DICT_TYPE_ON.getCode())
-                    .eq(SysDict::getDictCode, "120300")
+                    // .eq(SysDict::getDictCode, "120300") 测试用
                     .eq(SysDict::getParentDictCode, item.getRefDictCode()).list();
             if (categorys !=null && categorys.size()>0){
                 for (SysDict category :categorys){
@@ -857,10 +911,9 @@ public class UploadWorkerTOGreeTask {
                     v.setSpdlName(item.getRefDictName());
                     v.setSpxl(Integer.valueOf(category.getDictCode()));
                     v.setSpxlName(category.getDictValue());
-                    // 对应格力品牌商的服务类目需对应  todo
-                    v.getFwlbList().add("安装");
+                    v.setFwlbList(fwlbList);
                     // 查看是否为商用
-                    if (SYDictCode.contains(item.getDictCode())){
+                    if (SYDictDaleiCode.contains(item.getDictCode())){
                         sySignSplbList.add(v);
                     } else {
                         jySignSplbList.add(v);
@@ -870,14 +923,36 @@ public class UploadWorkerTOGreeTask {
         }
     }
 
-    private void getDictRefs(Brand brand, List<WorkerServiceCategoryDetail> categoryRecs, List<SysDictRef> sysDictRefs) {
-        List<String> caregoryIds = categoryRecs.stream().map(WorkerServiceCategoryDetail::getMainId).collect(Collectors.toList());
+    @NotNull
+    private List<String> getCategoryName(List<WorkerServiceCategoryDetail> wxgCategoryRecs) {
+        // 服务类型 INSTALL=安装 REPAIR=维修  DELIVERY=配送
+        Map<String,String> serviceFwlbList = new HashMap<>();
+        for (WorkerServiceCategoryDetail w: wxgCategoryRecs){
+            if (w.getType().equals("INSTALL")){
+                serviceFwlbList.put("INSTALL","安装");
+            } else if (w.getType().equals("REPAIR")){
+                serviceFwlbList.put("REPAIR\"","维修");
+            } else if (w.getType().equals("DELIVERY")){
+                serviceFwlbList.put("DELIVERY","配送");
+            }
+        }
+        List<String> fwlbList = new ArrayList<>();
+        Set<String> keySet = serviceFwlbList.keySet();
+        for (String key : keySet){
+            String val = serviceFwlbList.get(key);
+            fwlbList.add(val);
+        }
+        return fwlbList;
+    }
+
+    private void getDictRefs(Brand brand, List<WorkerServiceCategoryDetail> wxgCategoryRecs, List<SysDictRef> sysDictRefs) {
+        List<String> wxgCaregoryIds = wxgCategoryRecs.stream().map(WorkerServiceCategoryDetail::getMainId).collect(Collectors.toList());
 
         // 提取师傅所在品牌商对应的大类信息
         List<SysDictRef> sysDictRefRecs =  sysDictRefService.lambdaQuery()
                 .eq(SysDictRef::getBrandId, brand.getBrandId())
                 .eq(SysDictRef::getDictType, DictTypeEnum.DICT_TYPE_MAIN_TYPE.getCode())
-                .in(SysDictRef::getDictCode,caregoryIds).list();
+                .in(SysDictRef::getDictCode,wxgCaregoryIds).list();
 
         // sysDictRefs 内的大类信息需去除无效的大类信息
         // 提取品牌商所有无效的大类信息

+ 3 - 3
src/main/resources/bootstrap-dev.properties

@@ -56,8 +56,8 @@ mybatis-plus.global-config.db-config.id-type=id_worker_str
 
 
 #开启sql日志
-mybatis-plus.configuration.log-impl = org.apache.ibatis.logging.stdout.StdOutImpl
-map-underscore-to-camel-case = true
+#mybatis-plus.configuration.log-impl = org.apache.ibatis.logging.stdout.StdOutImpl
+#map-underscore-to-camel-case = true
 
 #jackson组件时区
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
@@ -93,7 +93,6 @@ tokenURL=https://idm.yshcs.gree.com:9635/auth/realms/fdp-shyun-test%20/protocol/
 clientId4Pgid=guangfo
 clientSecret4Pgid=378ebb2e-cb56-44bc-8153-6c9c507574b8
 baseurl=https://gateway.yshcs.gree.com:9635/api/sso/autoapp-default-server-guangzhou/
-
 ######################## 上传 ##############################
 uploadbaseurl=https://gateway.yshcs.gree.com:9635/api/sso/autoapp-default-server-guangzhou/api/outapp/default/general
 gree.V3.gettoken=https://idm.yshcs.gree.com:9635/auth/realms/fdp-shyun-test/protocol/openid-connect/token
@@ -106,6 +105,7 @@ gree.V3.client.secert=f81f5ac8-ad24-4212-9b2d-9cc78f982562
 
 ######################## 上传格力总部文件 ##############################
 downfileurl=https://gateway.yshcs.gree.com:9635/api/pub/nts-foundation-attachmentmanager/api/v2/attachment/download?id=%s&access_token=%s
+tdownfileurl=https://blog.csdn.net/lostdiver/article/details/99680901/download?id=%s&access_token=%s
 sevefileurl=https://gateway.yshcs.gree.com:9635/api/sso/nts-foundation-attachmentmanager/api/v2/attachment/saveFileInfo
 imageurl=https://gateway.yshcs.gree.com:9635/api/sso/nts-foundation-attachmentmanager/api/v2/attachment/saveFileInfo
 imagesign=https://gateway.yshcs.gree.com:9635/api/sso/nts-foundation-attachmentmanager/api/v2/attachment/getSignWithWdno?wdno=%s

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

@@ -78,7 +78,7 @@ gree.client.id=guangfoserver
 gree.V3.client.secert=3b23c33b-106d-4837-b506-7779335247d9
 
 ######################## 上传格力总部文件 ##############################
-downfileurl=https://api-sms.gree.com/api/pub/nts-foundation-attachmentmanager/api/v2/attachment/download?id=%s&access_token=%s
+downfileurl=https://api-sms.gree.com/api/pub/nts-foundation-attachmentmanager/api/v2/attachment/download?id=%s&access_token=%sdownfileurl=https://api-sms.gree.com/api/pub/nts-foundation-attachmentmanager/api/v2/attachment/download?id=%s&access_token=%s
 sevefile=https://api-sms.gree.com/api/sso/nts-foundation-attachmentmanager
 imageurl=https://api-sms.gree.com/api/sso/nts-foundation-attachmentmanager/api/v2/attachment/saveFileInfo
 imagesign=https://api-sms.gree.com/api/sso/nts-foundation-attachmentmanager/api/v2/attachment/getSignWithWdno?wdno=%s

+ 1 - 0
src/main/resources/bootstrap-test.properties

@@ -102,6 +102,7 @@ gree.V3.client.secert=f81f5ac8-ad24-4212-9b2d-9cc78f982562
 
 ######################## 上传格力总部文件 ##############################
 downfileurl=https://gateway.yshcs.gree.com:9635/api/pub/nts-foundation-attachmentmanager/api/v2/attachment/download?id=%s&access_token=%s
+tdownfileurl=https://blog.csdn.net/lostdiver/article/details/99680901/download?id=%s&access_token=%s
 sevefileurl=https://gateway.yshcs.gree.com:9635/api/sso/nts-foundation-attachmentmanager
 imageurl=https://gateway.yshcs.gree.com:9635/api/sso/nts-foundation-attachmentmanager/api/v2/attachment/saveFileInfo
 imagesign=https://gateway.yshcs.gree.com:9635/api/sso/nts-foundation-attachmentmanager/api/v2/attachment/getSignWithWdno?wdno=%s