localizer
parent
80c60840f1
commit
5bae85b9f6
|
|
@ -183,8 +183,8 @@ public class BizAuditConfigService extends ServiceImpl<BizAuditConfigMapper, Biz
|
|||
|
||||
int totalSize = dataList.size();
|
||||
log.info("总共有 {} 条数据", totalSize);
|
||||
int batchSize = 5;
|
||||
totalSize = Math.min(totalSize, 10);
|
||||
int batchSize = 100;
|
||||
// totalSize = Math.min(totalSize, 10);
|
||||
t.set(totalSize);
|
||||
|
||||
|
||||
|
|
@ -249,7 +249,15 @@ public class BizAuditConfigService extends ServiceImpl<BizAuditConfigMapper, Biz
|
|||
|
||||
for (Map<String, Object> map : list) {
|
||||
if (CollUtil.isEmpty(map)) continue;
|
||||
String p1 = (String) map.get("p1");
|
||||
strings.addAll(p(map.get("p1")));
|
||||
strings.addAll(p(map.get("p2")));
|
||||
strings.addAll(p(map.get("p3")));
|
||||
strings.addAll(p(map.get("p4")));
|
||||
strings.addAll(p(map.get("p5")));
|
||||
strings.addAll(p(map.get("p6")));
|
||||
strings.addAll(p(map.get("p7")));
|
||||
|
||||
/* String p1 = (String) map.get("p1");
|
||||
if (StrUtil.isNotBlank(p1)) strings.add(p1);
|
||||
String p2 = (String) map.get("p2");
|
||||
if (StrUtil.isNotBlank(p2)) strings.add(p2);
|
||||
|
|
@ -257,12 +265,18 @@ public class BizAuditConfigService extends ServiceImpl<BizAuditConfigMapper, Biz
|
|||
if (StrUtil.isNotBlank(p3)) strings.add(p3);
|
||||
String p4 = (String) map.get("p4");
|
||||
if (StrUtil.isNotBlank(p4)) strings.add(p4);
|
||||
JSONArray p5 = (JSONArray) map.get("p5");
|
||||
if (CollUtil.isNotEmpty(p5)) strings.addAll(p5.toJavaList(String.class));
|
||||
JSONArray p6 = (JSONArray) map.get("p6");
|
||||
if (CollUtil.isNotEmpty(p6)) strings.addAll(p6.toJavaList(String.class));
|
||||
JSONArray p7 = (JSONArray) map.get("p7");
|
||||
if (CollUtil.isNotEmpty(p7)) strings.addAll(p7.toJavaList(String.class));
|
||||
if (map.get("p5") != null) {
|
||||
JSONArray p5 = JSONArray.of(map.get("p5").toString());
|
||||
if (CollUtil.isNotEmpty(p5)) strings.addAll(p5.toJavaList(String.class));
|
||||
}
|
||||
if (map.get("p6") != null) {
|
||||
JSONArray p6 = JSONArray.of(map.get("p6").toString());
|
||||
if (CollUtil.isNotEmpty(p6)) strings.addAll(p6.toJavaList(String.class));
|
||||
}
|
||||
if (map.get("p7") != null) {
|
||||
JSONArray p7 = JSONArray.of(map.get("p7").toString());
|
||||
if (CollUtil.isNotEmpty(p7)) strings.addAll(p7.toJavaList(String.class));
|
||||
} */
|
||||
}
|
||||
return strings.stream().filter(StrUtil::isNotBlank).collect(Collectors.toList());
|
||||
} else {
|
||||
|
|
@ -270,4 +284,24 @@ public class BizAuditConfigService extends ServiceImpl<BizAuditConfigMapper, Biz
|
|||
}
|
||||
}
|
||||
|
||||
public List<String> p(Object o) {
|
||||
if (o == null) return Collections.emptyList();
|
||||
if (o instanceof String) {
|
||||
String oo = (String) o;
|
||||
if (oo.startsWith("https://cdn-zsy.oss-cn-shanghai.aliyuncs.com/")) {
|
||||
String replace = oo.replace("https://cdn-zsy.oss-cn-shanghai.aliyuncs.com/", "/cdn-zsy/");
|
||||
return Collections.singletonList(replace);
|
||||
} else if (oo.startsWith("[") && oo.endsWith("]")) {
|
||||
List<String> strings = JSONArray.parseArray(oo, String.class);
|
||||
return strings.stream().filter(StrUtil::isNotBlank).collect(Collectors.toList());
|
||||
} else {
|
||||
return Collections.singletonList(oo);
|
||||
}
|
||||
} else if (o instanceof JSONArray) {
|
||||
return JSONArray.parseArray(o.toString(), String.class);
|
||||
} else {
|
||||
return Collections.singletonList(String.valueOf(o));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ public class DeviceLocalizerService extends ServiceImpl<DeviceLocalizerMapper, D
|
|||
ThreadUtil.sleep(10000);
|
||||
reflash();
|
||||
});
|
||||
// this.configDevice(terminalId, config);
|
||||
this.configDevice(terminalId, config);
|
||||
}
|
||||
|
||||
private void configDevice(String terminalId, LocalizerConfig config) {
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
e.qualification,
|
||||
e.carrying_capacity,
|
||||
e.tare_weight history_tare_weight,
|
||||
e.truck_category,
|
||||
p.txt truck_category,
|
||||
e.picture truck_picture,
|
||||
f.driver_name,
|
||||
f.phone driver_phone,
|
||||
|
|
|
|||
Loading…
Reference in New Issue