yaozhixue 1 年之前
父节点
当前提交
47a07a76ba

二进制
1684169336970440705


二进制
1684169656849035265


二进制
1684170041009532929.jpeg


二进制
1684170044889264129.jpeg


二进制
1684170055219834882


+ 10 - 2
src/main/java/com/zfire/jiasm/syncdata/download/order/RecycleDownload.java

@@ -30,9 +30,9 @@ public class RecycleDownload {
      */
     @Scheduled(fixedDelayString = "${recycledown}")
     public void download() throws Exception {
-        /*if (1 == 1) {
+        if (1 == 1) {
             return;
-        }*/
+        }
 
         RecycleAssignParamBean recycleAssignParamBean = new RecycleAssignParamBean();
         // type说明: all--全量  active--获取未完工/未关闭/未作废的工单  getExtend--获取更新数据
@@ -53,6 +53,10 @@ public class RecycleDownload {
      */
     @Scheduled(fixedDelayString = "${recyclefkdown}")
     private void updateFkmx() throws Exception {
+        if (1 == 1) {
+            return;
+        }
+
         // 获取工单的反馈明细数据 记录表状态改为44
         // 失败时最多重复10次
         recycleAssignLogic.updateFeedback();
@@ -66,6 +70,10 @@ public class RecycleDownload {
      */
     @Scheduled(fixedDelayString = "${recyclecjdown}")
     private void updateAcquisition() {
+        if (1 == 1) {
+            return;
+        }
+
         // 下载回收工单采集表数据、附件数据、条码明细数据 记录表及三表状态为66
         // 失败时 SynStatus=99 下次也不再同步 最好加上 99 的及次数
         recycleAcquisitionLogic.updateAcquisition();

+ 1 - 33
src/main/java/com/zfire/jiasm/syncdata/gree/GreeLogic.java

@@ -96,11 +96,6 @@ public class GreeLogic {
     private String clientFileSecert;
     @Value("${gree.gettoken}")
     private String tokenFileUrl;
-
-    @Value("${tdownfileurl}")
-    private String tdownfileurl;
-
-
     @Autowired
     RedisUtil redisUtil;
     @Autowired
@@ -294,7 +289,7 @@ public class GreeLogic {
         //获取返回数据
         try {
             String body = restTemplate.postForObject(sevefileurl, httpEntity, String.class);
-            //log.info("【请求总部接口保存文件】response:{}",body);
+            log.info("【请求总部接口保存文件】request:{}",body);
             greeResponseHelper = JSONObject.parseObject(body, GreeFileSaveHelper.class);
 
             return greeResponseHelper;
@@ -313,33 +308,6 @@ public class GreeLogic {
     }
 
     // 下载文件
-    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());
     }

+ 2 - 2
src/main/java/com/zfire/jiasm/syncdata/http/PostObjectSample.java

@@ -32,11 +32,11 @@ public class PostObjectSample {
         formFields.put("policy",data.getPolicy());
         formFields.put("Signature", data.getSignature());
 
-        log.info("formFields: {}",JSONObject.toJSONString(formFields));
+        // log.info("formFields: {}",JSONObject.toJSONString(formFields));
 
         String result = formUpload(data.getHost(), formFields, fileName);
 
-        log.info("reponse: {}", result);
+        // log.info("reponse: {}", result);
         return result;
     }
 

+ 8 - 0
src/main/java/com/zfire/jiasm/syncdata/upload/order/RecycleUpload.java

@@ -25,6 +25,10 @@ public class RecycleUpload {
      */
     @Scheduled(fixedDelayString = "${hsgdzttm}")
     private void statusBatchUpload() {
+        if (1 == 1) {
+            return;
+        }
+
         recycleAssignLogic.statusUpload();
     }
 
@@ -34,6 +38,10 @@ public class RecycleUpload {
      */
     @Scheduled(fixedDelayString = "${hsgdcjtm}")
     private void acquisitionUpload() {
+        if (1 == 1) {
+            return;
+        }
+
         recycleAcquisitionLogic.acquisitionUpload();
     }
 

+ 20 - 16
src/main/java/com/zfire/jiasm/syncdata/upload/worker/UploadWorkeCertificate.java

@@ -120,17 +120,16 @@ public class UploadWorkeCertificate {
             for (WorkerBrandAccount wdno: workerWdnos){
                 uploadFileexc(fileo, filet, fid1, fid2,wdno.getBrandWebsitId(),item);
                 // 保险数据同步 保险证不在证件表中
-                uploadInsureCert(item, wdno,fid3);
+                fid3 = uploadInsureCert(wdno);
             }
-
             // 文件清除
-            delfile(fileo, filet, fid1, fid2,fid3);
+            delfile(fid1, fid2,fid3);
 
         }
         log.info("同步师傅证件信息结束: \uF0B7{}",sdf.format(new Date()));
     }
 
-    private void delfile(String fileo, String filet, String fid1, String fid2, String file3) {
+    private void delfile(String fid1, String fid2, String file3) {
         if (StringUtils.isNotEmpty(fid1)){
             new File(fid1).delete();
         }
@@ -140,12 +139,6 @@ public class UploadWorkeCertificate {
         if (StringUtils.isNotEmpty(file3)){
             new File(file3).delete();
         }
-        if (StringUtils.isNotEmpty(fileo)){
-            new File(fileo).delete();
-        }
-        if (StringUtils.isNotEmpty(filet)){
-            new File(filet).delete();
-        }
     }
 
     /**
@@ -154,7 +147,7 @@ public class UploadWorkeCertificate {
      *    insure_cert为空  初始化生成
      *               不为空正常生成
      */
-    private void uploadInsureCert(WorkerCert item, WorkerBrandAccount wdno,String file) throws Exception {
+    private String uploadInsureCert(WorkerBrandAccount wdno) throws Exception {
         String fileo ="";
         String fid1 = "";
         WebsitWorker wk = websitWorkerService.lambdaQuery()
@@ -170,13 +163,14 @@ public class UploadWorkeCertificate {
             }
             fileo = fid1;
             uploadInitFileexc(fileo, fid1, wdno.getBrandWebsitId(),wk);
-            file = fid1;
         }
+        return fid1;
     }
 
     private Boolean uploadFileexc(String fileo, String filet, String fid1, String fid2,String wdno,WorkerCert item) throws Exception {
         Boolean uploadfile = Boolean.TRUE;
         Boolean onlyone = Boolean.FALSE;
+        String msg = "";
 
         if (StringUtils.isEmpty(wdno)){
             return Boolean.TRUE;
@@ -198,7 +192,6 @@ public class UploadWorkeCertificate {
                     // 生成对象
                     getSaveFileInfo(fid1, resultData, req);
                     GreeFileSaveHelper responses = greeLogic.greePostSaveFile(req);
-
                     if (responses.getStatusCode() == 200){
                         // 保存文件ID   responses.getData().getId()
                         if (StringUtils.isEmpty(filet)){
@@ -209,7 +202,11 @@ public class UploadWorkeCertificate {
                     } else {
                         // 失败
                         uploadfile = Boolean.FALSE;
-                        updateWorkCertificateerror(item.getId(),"保存证件正面文件到格力总部失败");
+                        msg = "保存证件正面文件到格力总部失败";
+                        if (StringUtils.isNotEmpty(responses.getMsg())){
+                            msg = msg + responses.getMsg();
+                        }
+                        updateWorkCertificateerror(item.getId(),msg);
                     }
                 } else {
                     updateWorkCertificateerror(item.getId(),"上传图片到OSS失败");
@@ -241,7 +238,11 @@ public class UploadWorkeCertificate {
                         updateWorkCertificatesave(item,responses.getData().getId(),2,uploadfile,onlyone);
                     } else {
                         // 失败
-                        updateWorkCertificateerror(item.getId(),"保存证件反面文件到格力总部失败");
+                        msg = "保存证件正面文件到格力总部失败";
+                        if (StringUtils.isNotEmpty(responses.getMsg())){
+                            msg = msg + responses.getMsg();
+                        }
+                        updateWorkCertificateerror(item.getId(),msg);
                         return Boolean.TRUE;
                     }
                 } else {
@@ -312,6 +313,9 @@ public class UploadWorkeCertificate {
         v.setId(id);
         v.setOutSyncTime(new Date());
         v.setOutSyncErrorMsg(msg);
+        if (msg.length()>250){
+            v.setOutSyncErrorMsg(msg.substring(0,250));
+        }
         workerCertService.updateById(v);
     }
 
@@ -340,7 +344,7 @@ public class UploadWorkeCertificate {
         req.put("bizType","default");
         req.put("accessType","auth");
         req.put("url", resultData.getExtData().getDir());
-        req.put("name", id1 +".jpeg");
+        req.put("name", id1);
     }
 
 

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

@@ -118,7 +118,6 @@ baseurl4pgid=https://gateway.yshcs.gree.com:9635/api/sso/autoapp-default-server-
 
 ######################## 上传格力总部文件 ##############################
 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

@@ -90,7 +90,7 @@ baseurl4pgid=https://api-sms.gree.com/api/sso/autoapp-default-server-greeshservi
 
 ######################## 上传格力总部文件 ##############################
 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
+sevefileurl=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
 gree.gettoken=https://idmshyun.gree.com/auth/realms/fdp-shyun-test/protocol/openid-connect/token

+ 62 - 63
src/main/resources/bootstrap-test.properties

@@ -113,7 +113,6 @@ baseurl4pgid=https://gateway.yshcs.gree.com:9635/api/sso/autoapp-default-server-
 
 ######################## 上传格力总部文件 ##############################
 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
@@ -168,15 +167,15 @@ gdbaseurl=http://121.41.110.30:8112/
 
 ######################## 同步定时任务时间隔 ########################
 #师傅 证件、师傅、工单子表信息
-workercertificate=5000
-workercerupload=5000
-detaildown=2000
+workercertificate=60000
+workercerupload=60000
+detaildown=60000
 #安装工单下载 、入本地表
-installdown=5000
-installin=5000
+installdown=60000
+installin=60000
 #维修工单下载、入本地表
-repairdown=5000
-repairin=5000
+repairdown=60000
+repairin=60000
 #回收工单下载、获取工单的反馈明细数据、(获取对应的采集数据、附件数据、条码明细数据)、与总部进行确认下载完成、同步到业务表
 recycledown=60000
 recyclefkdown=60000
@@ -187,54 +186,54 @@ recyclein=60000
 queryejectjdd=60000
 processbusiness=60000
 #安装家用空调、商用空调、生活电器
-installjy=10000
-installsy=10000
-installsh=10000
+installjy=60000
+installsy=60000
+installsh=60000
 #维修结算、数据预生成
-repairjs=10000
-repairone=5000
+repairjs=60000
+repairone=60000
 #故障维修
-masterdownloadrate=10000
-masterrate=10000
+masterdownloadrate=60000
+masterrate=60000
 guzdm=3600000
 #网点 佛山销售网点|售后网点、广州销售网点|售后网点
-netfsx=10000
-netfss=10000
-netgzx=10000
-netgzs=10000
+netfsx=60000
+netfss=60000
+netgzx=60000
+netgzs=60000
 #网点 维修工 佛山销售|售后、广州销售|售后
 fsxwxg=60000
-fsswxg=10000
-gzxwxg=10000
-gzswxg=10000
+fsswxg=60000
+gzxwxg=60000
+gzswxg=60000
 #类别大类、小类、系列、机型
-lbdl=60000
-lbxl=60000
-lbxlt=60000
-lbjx=60000
+lbdl=600000
+lbxl=600000
+lbxlt=600000
+lbjx=600000
 #销售类型
-azxslx=60000
+azxslx=600000
 #需求类别 需求大类、小类
-xqdl=60000
-xqxl=60000
+xqdl=600000
+xqxl=600000
 #用户属性、用户等级、信息渠道、信息来源
-yhsx=60000
-yhdj=60000
-xxqd=60000
-xxly=60000
+yhsx=600000
+yhdj=600000
+xxqd=600000
+xxly=600000
 #省、市、区、镇
-sx=10000
-ssx=10000
-qx=10000
-zx=10000
+sx=600000
+ssx=600000
+qx=600000
+zx=600000
 #安装 配件查询、家用特殊安装申请新增、新增质量信息反馈、家用特殊安装查询、家用特殊安装申请更新、安装转结算、安装转结算查询最终结果
-pjcx=60000
-jytsazxz=60000
-xzzlfk=60000
-jytsazxzt=60000
-jytsazxzgx=60000
-azzjs=60000
-azzjscx=60000
+pjcx=600000
+jytsazxz=600000
+xzzlfk=600000
+jytsazxzt=600000
+jytsazxzgx=600000
+azzjs=600000
+azzjscx=600000
 #退货 总部退换货录入、据采集、过程反馈、京东订单评价、根据工单号查询总部发送短信的详细信息、总部退换货总查询、故障机采集、总部退换货更新
 thlr=60000
 thcj=60000
@@ -245,35 +244,35 @@ ththhcx=60000
 thgzjcj=60000
 ththhgx=60000
 #维修转结算、维修转结算查询最终结果
-wxzjs=60000
-wxzjscx=60000
+wxzjs=600000
+wxzjscx=600000
 #网点维修工 证件照,服务类目,位置、新增同步到本地、修改
 zjzxx=60000
 lmxx=60000
 wxgwz=60000
 wxgxg=60000
 #京东商城 预约改约、指派改派网点、作废取消、报完工、指派改派人员
-jdyygy=30000
-jdzpgpwd=30000
-jdzfqx=30000
-jdbwg=30000
-jdzpgpry=30000
+jdyygy=60000
+jdzpgpwd=60000
+jdzfqx=60000
+jdbwg=60000
+jdzpgpry=60000
 #格力商城
-glsc=2000
+glsc=60000
 #天猫商城
-tmsc=2000
+tmsc=60000
 #安装工单上传  生成需要上传的数据、生成上传任务清单列表
-azuploadysc=2000
-azuploadsc=2000
+azuploadysc=60000
+azuploadsc=60000
 #维修工单上传  生成需要上传的数据、生成上传任务清单列表
-wxuploadysc=2000
-wxuploadsc=2000
+wxuploadysc=60000
+wxuploadsc=60000
 #以旧换新 鉴定单、生成条码、条码上传
-yjhxjdd=2000
-yjhxsctm=2000
-yjhxtmsc=20000
+yjhxjdd=60000
+yjhxsctm=60000
+yjhxtmsc=60000
 #回收工单
-hsgdzttm=10000
-hsgdcjtm=10000
+hsgdzttm=60000
+hsgdcjtm=60000
 #工单数据向上同步
-dataupload=2000
+dataupload=60000