From 1aac0b24b4b7f0e15bb4f7001ae8d1e313336caf Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期二, 07 一月 2025 15:46:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1302.java | 50 ++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 40 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1302.java b/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1302.java
index fa039b0..c715d8c 100644
--- a/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1302.java
+++ b/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1302.java
@@ -61,13 +61,12 @@
apiLog.setId(ContextUtil.getUUID());
try {
List<Fz40Grain> list = fzzySync1302Rep.findByReceiveDate(start, end);
- log.info(DateUtils.format("yyyy-MM-dd HH:mm:ss", start));
- log.info(DateUtils.format("yyyy-MM-dd HH:mm:ss", end));
+
if (null == list || list.isEmpty()) {
log.info("1302---鍚屾鏁版嵁锛氭病鏈夋煡璇㈠埌闇�瑕佸悓姝ョ殑鏁版嵁");
return;
}
- log.info(JSONObject.toJSONString(list));
+
Date syncTime = new Date();
Api1302 api1302;
Api1105 api1105;
@@ -115,12 +114,24 @@
if (StringUtils.isEmpty(fz40Grain.getCableCir())) {
api1302.setLswdzjh(getTempPointList1(fz40Grain.getPoints(), fz40Grain.getCable()));
api1302.setLssdzjh(getHumPointList1(fz40Grain.getPoints(), fz40Grain.getCable()));
+ if(StringUtils.isEmpty(api1302.getLswdzjh())){
+ continue;
+ }
+ if(StringUtils.isEmpty(api1302.getLssdzjh())){
+ continue;
+ }
} else {
api1302.setLswdzjh(getTempPointList2(fz40Grain.getPoints(), fz40Grain.getCable(), fz40Grain.getCableCir()));
api1302.setLssdzjh(getHumPointList2(fz40Grain.getPoints(), fz40Grain.getCable(), fz40Grain.getCableCir()));
+ if(StringUtils.isEmpty(api1302.getLswdzjh())){
+ continue;
+ }
+ if(StringUtils.isEmpty(api1302.getLssdzjh())){
+ continue;
+ }
}
- api1302.setZhgxsj(fz40Grain.getReceiveDate());
+ api1302.setZhgxsj(new Date());
api1302.setBizId(fz40Grain.getBatchId());
api1302.setKqdm(api1105.getKqdm());
@@ -143,12 +154,19 @@
}
+ public static void main(String[] args) {
+ String point = "31.8,20.0,15.1,18.6,28.2,14.3,11.3,16.1,28.1,15.6,13.3,18.4,28.8,16.6,10.2,14.4,27.8,14.3,10.8,16.0,27.5,14.5,11.7,17.1,26.5,13.6,10.1,15.0,29.7,17.4,13.8,17.8,29.7,18.6,15.0,18.6,26.4,13.5,9.2,13.1,27.6,11.8,8.9,13.5,28.1,12.0,8.6,12.8,27.8,11.6,7.6,12.4,26.1,10.8,7.5,12.6,27.8,10.3,7.1,12.0,26.1,11.3,8.5,12.7,28.6,16.9,12.9,17.7,29.1,12.3,8.8,12.1,27.4,11.9,8.6,12.8,29.0,11.5,7.6,11.1,26.9,10.2,8.0,12.7,27.0,9.6,7.7,13.5,26.7,9.5,7.1,12.3,26.3,10.7,8.4,13.4,27.6,15.9,11.5,15.8,28.7,12.6,8.7,12.2,28.1,12.2,8.8,12.5,30.3,11.9,8.0,12.0,27.9,11.1,7.8,11.5,26.3,10.1,7.8,12.0,27.2,10.5,6.9,11.1,27.1,11.6,9.5,13.6,27.4,14.8,10.7,16.6,27.7,12.4,9.1,13.0,27.7,13.2,9.0,12.8,27.5,12.1,8.1,12.6,26.6,11.8,7.3,12.3,26.8,10.5,8.0,13.3,26.3,11.0,7.6,12.5,26.1,10.6,8.5,13.5,29.8,21.3,15.5,17.8,28.3,18.2,11.6,12.8,29.4,17.4,13.0,16.1,28.4,22.3,14.6,15.4,28.7,17.5,11.8,15.2,26.5,14.6,10.9,14.8,27.8,15.3,10.3,14.8,27.6,16.7,13.6,17.4";
+ String cable = "4-6-8";
+ String tempPointList1 = getTempPointList1(point, cable);
+ System.out.println(tempPointList1);
+ }
+
/**
* 鑾峰彇骞虫柟浠撶殑娓╁害鍊奸泦鍚堬紝鏍煎紡锛氭俯搴﹀��,灞傛暟,琛屾暟,鍒楁暟|娓╁害鍊�,灞傛暟,琛屾暟,鍒楁暟|娓╁害鍊�,灞傛暟,琛屾暟,鍒楁暟
*
* @return
*/
- private String getTempPointList1(String point, String cable) {
+ private static String getTempPointList1(String point, String cable) {
String[] cab = cable.split("-");
int c = Integer.valueOf(cab[0]);
int h = Integer.valueOf(cab[1]);
@@ -162,11 +180,14 @@
for (int i = 1; i <= l; i++) {
for (int j = 1; j <= h; j++) {
for (int z = 1; z <= c; z++) {
- result += ("|" + points[(i * j - 1) * c + z - 1] + "," + z + "," + j + "," + i);
+ result += ("|" + points[((i-1)*h+j-1)*c + z -1] + "," + z + "," + j + "," + i);
}
}
}
- return result.substring(1);
+ if(result.length() > 0){
+ result = result.substring(1);
+ }
+ return result;
}
/**
@@ -197,7 +218,10 @@
}
}
- return result.substring(1);
+ if(result.length() > 0){
+ result = result.substring(1);
+ }
+ return result;
}
/**
@@ -220,7 +244,10 @@
}
}
}
- return result.substring(1);
+ if(result.length() > 0){
+ result = result.substring(1);
+ }
+ return result;
}
/**
@@ -251,6 +278,9 @@
}
}
- return result.substring(1);
+ if(result.length() > 0){
+ result = result.substring(1);
+ }
+ return result;
}
}
--
Gitblit v1.9.3