From 40776beb224799d5dd51ca1d92ea2f5e883ff4f5 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期五, 02 八月 2024 11:30:18 +0800
Subject: [PATCH] 增加增城东部粮油中心库配置信息
---
src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1109.java | 127 +++++++++++++++++++++++------------------
1 files changed, 71 insertions(+), 56 deletions(-)
diff --git a/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1109.java b/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1109.java
index 55da4bf..2f3615f 100644
--- a/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1109.java
+++ b/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1109.java
@@ -17,9 +17,12 @@
import com.fzzy.async.fzzy40.repository.Fzzy40Sync1202Rep;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.time.DateFormatUtils;
+import org.apache.commons.lang.time.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
+import java.text.ParseException;
import java.util.*;
import java.util.stream.Collectors;
@@ -145,6 +148,7 @@
}
int num = 1;
int idsNum = 0;
+ String bizTag = null;
for (Fz40FileInfo sysData : fileList) {
apiData = new Api1109();
@@ -164,9 +168,25 @@
}
//绉伴噸
if (BIZ_TAG_WEIGHT_FULL.equals(sysData.getBizTag()) || BIZ_TAG_WEIGHT_EMPTY.equals(sysData.getBizTag())) {
- if(num > 8){
- num = 1;
- idsNum ++;
+ bizTag = sysData.getBizTag();
+ if(StringUtils.isNotEmpty(inoutData.getTransType()) && inoutData.getTransType().equals("3")){
+ if(num > 6){
+ num = 1;
+ idsNum ++;
+ }
+ }else {
+ if(num > 8){
+ num = 1;
+ idsNum ++;
+ }
+ }
+ //2024-05-23 姝ゅ鏆傛椂璁剧疆鍚嶇О闀垮害闄愬埗锛屽悗鏈熻皟鏁村悗鍙垹闄�
+ if(sysData.getCreateTime().after(DateUtils.parseDate("2024-04-18",new String[]{"yyyy-MM-dd"}))){
+ if(StringUtils.isNotEmpty(inoutData.getTransType()) && inoutData.getTransType().equals("3")){
+ bizTag = sysData.getBizTag();
+ }else {
+ bizTag = null;
+ }
}
if(idsNum == ids.size()){
break;
@@ -176,7 +196,7 @@
wjmc = kqdm + "_" + str;
//鏂囦欢鍚嶇О
- wjmc = getImgNameType(wjmc, sysData.getBizTag(), str, sysData.getFileName(), map);
+ wjmc = getImgNameType(wjmc, bizTag, str, sysData.getFileName(), map);
apiData.setWjmc(wjmc);
apiData.setWjlx(wjlx);
if (wjmc.indexOf(Constant.IMG_NAME_TYPE_IVG) >= 0 || wjmc.indexOf(Constant.IMG_NAME_TYPE_IVT) >= 0) {
@@ -226,51 +246,54 @@
* @return
*/
private String getImgNameType(String wjmc, String bizTag, String bizId, String fileName, Map<String, Integer> map) {
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_DJ) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_DJ + ".jpg";
+ if(null == bizTag){
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_DJ) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_DJ + ".jpg";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_RK) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_RK + ".jpg";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_CK) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_CK + ".jpg";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_GL) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_GL + ".jpg";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_GR) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_GR + ".jpg";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_GT) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_GT + ".jpg";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_TL) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_TL + ".jpg";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_TR) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_TR + ".jpg";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_TT) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_TT + ".jpg";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_SL) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_SL + ".jpg";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_SF) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_SF + ".jpg";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_IVG) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_IVG + ".mp4";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_IVT) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_IVT + ".mp4";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_OVG) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_OVG + ".mp4";
+ }
+ if (fileName.indexOf(Constant.IMG_NAME_TYPE_OVT) >= 0) {
+ return wjmc + "_" + Constant.IMG_NAME_TYPE_OVT + ".mp4";
+ }
}
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_RK) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_RK + ".jpg";
- }
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_CK) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_CK + ".jpg";
- }
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_GL) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_GL + ".jpg";
- }
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_GR) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_GR + ".jpg";
- }
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_GT) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_GT + ".jpg";
- }
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_TL) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_TL + ".jpg";
- }
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_TR) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_TR + ".jpg";
- }
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_TT) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_TT + ".jpg";
- }
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_SL) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_SL + ".jpg";
- }
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_SF) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_SF + ".jpg";
- }
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_IVG) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_IVG + ".mp4";
- }
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_IVT) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_IVT + ".mp4";
- }
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_OVG) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_OVG + ".mp4";
- }
- if (fileName.indexOf(Constant.IMG_NAME_TYPE_OVT) >= 0) {
- return wjmc + "_" + Constant.IMG_NAME_TYPE_OVT + ".mp4";
- }
+
Integer num = 0;
//姣涢噸
if (BIZ_TAG_WEIGHT_FULL.equals(bizTag)) {
@@ -287,10 +310,6 @@
map.put(bizId + "_" + bizTag, 3);
}
if (num == 3) {
- wjmc += "_" + Constant.IMG_NAME_TYPE_GR;
- map.put(bizId + "_" + bizTag, 4);
- }
- if (num == 4) {
wjmc += "_" + Constant.IMG_NAME_TYPE_GT;
map.remove(bizId + "_" + bizTag);
}
@@ -310,10 +329,6 @@
map.put(bizId + "_" + bizTag, 3);
}
if (num == 3) {
- wjmc += "_" + Constant.IMG_NAME_TYPE_TR;
- map.put(bizId + "_" + bizTag, 4);
- }
- if (num == 4) {
wjmc += "_" + Constant.IMG_NAME_TYPE_TT;
map.remove(bizId + "_" + bizTag);
}
--
Gitblit v1.9.3