From 77294940e7100c4692a149f4cece9e2cfab2bca3 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期三, 22 五月 2024 10:15:31 +0800
Subject: [PATCH] 调整质量巡检数据同步
---
src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java b/src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java
index f146029..91622ed 100644
--- a/src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java
+++ b/src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java
@@ -1,6 +1,7 @@
package com.fzzy.push.sh2023;
import com.alibaba.fastjson.JSON;
+import com.fzzy.api.Constant;
import com.fzzy.api.data.ApiParam;
import com.fzzy.api.data.PushProtocol;
import com.fzzy.api.dto.ResponseDto;
@@ -10,7 +11,7 @@
import com.fzzy.api.service.ApiTriggerService;
import com.fzzy.api.utils.*;
import com.fzzy.api.view.repository.*;
-import com.fzzy.order.data.OrderData;
+import com.fzzy.order.common.data.OrderCommonData;
import com.fzzy.push.sh2023.dto.*;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
@@ -92,10 +93,10 @@
apiLog.setId(ContextUtil.getUUID());
//鑻ヤ负璐㈠姟1501銆�1502銆�1503鎺ュ彛锛屽垯鎺ュ彛缂栫爜濉啓1114
- if (SH2023Constant.SH_2023_API_CODE_1114_1501.equals(param.getInteId())
- || SH2023Constant.SH_2023_API_CODE_1114_1502.equals(param.getInteId())
- || SH2023Constant.SH_2023_API_CODE_1114_1503.equals(param.getInteId())) {
- inteId = SH2023Constant.SH_2023_API_CODE_1114;
+ if (Constant.API_CODE_1114_1501.equals(param.getInteId())
+ || Constant.API_CODE_1114_1502.equals(param.getInteId())
+ || Constant.API_CODE_1114_1503.equals(param.getInteId())) {
+ inteId = Constant.API_CODE_1114;
}
apiLog.setInteId(inteId);
@@ -123,8 +124,8 @@
//鑾峰彇鎸囦护id
String key = RedisConst.buildKey(RedisConst.KYE_ORDER, conf.getKqdm());
- OrderData orderData = (OrderData) redisUtil.get(key);
- if (null == orderData || StringUtils.isEmpty(orderData.getOrderid())) {
+ String orderId = (String) redisUtil.get(key);
+ if (StringUtils.isEmpty(orderId)) {
log.error("鎸囦护id澶辨晥=" + jsonData);
ResponseDto responseDto = new ResponseDto(99, "鎸囦护id澶辨晥");
apiLog.setStatus(99);
@@ -139,7 +140,7 @@
//鑾峰彇韬唤ID锛屽嵆琛屾斂鍖哄垝鐮�
reqData.setUid(conf.getUserName());
//鎸囦护id
- reqData.setOrderid(orderData.getOrderid());
+ reqData.setOrderid(orderId);
//韬唤绛惧悕锛屼娇鐢ㄨ嚜鏈塕SA绉侀挜杩涜鍔犲瘑(鍦板尯琛屾斂鍖哄垝浠g爜_褰撳ぉ鏃ユ湡)
reqData.setAccess_token(ShRSAUtils.sign(reqData.getUid() + "_" + DateFormatUtils.format(new Date(), "yyyy-MM-dd"), conf.getPassword()));
@@ -589,6 +590,12 @@
}
}
}
+ if (StringUtils.isNotEmpty(apiData.getHwdm())) {
+ List<Api1208> api1208List = api1208Rep.findDataByHwdm(apiData.getHwdm());
+ if (null != api1208List && api1208List.size() > 0) {
+ api1206.setPch(api1208List.get(0).getHwdm() + api1208List.get(0).getShnd());
+ }
+ }
//璁剧疆绌哄睘鎬т负榛樿鍊�
changeObject(api1206);
return api1206;
@@ -792,10 +799,14 @@
Api1306 apiData = (Api1306) data;
BeanUtils.copyProperties(apiData, api1306);
api1306.setBjw(ShAreaBjw.getBjw(code));
- api1306.setPch(apiData.getXzzydh().substring(0, 30) + DateFormatUtils.format(apiData.getXzkssj(), "yyyy"));
api1306.setAjdm(apiData.getHwdm().substring(0, 28));
//涓婃捣鐔忚捀浣滀笟鍗曞彿锛氳揣浣嶄唬鐮�+yyyyMMdd + 3浣嶉『搴忓彿
api1306.setXzzydh(apiData.getHwdm() + apiData.getBizId());
+ //璁剧疆鎵规鍙�
+ List<Api1208> api1208List = api1208Rep.findDataByHwdm(apiData.getHwdm());
+ if (null != api1208List && api1208List.size() > 0) {
+ api1306.setPch(apiData.getHwdm() + api1208List.get(0).getShnd());
+ }
if (StringUtils.isEmpty(api1306.getSyff())) {
api1306.setSyff("0"); //娼В娉�
}
@@ -1357,7 +1368,7 @@
}
private String getYwdh(String wjlx, String wjmc, String ywdh) {
String[] s = wjmc.split("_");
- if ("2".equals(wjlx) || "3".equals(wjlx)) {
+ if ("2".equals(wjlx) || "3".equals(wjlx) || "4".equals(wjlx) || "5".equals(wjlx)) {
ywdh = s[1];
}
return ywdh;
--
Gitblit v1.9.3