最小数量修改

dev_unify
yewj 4 months ago
parent 2409d88b58
commit f1a16d24b7

@ -227,6 +227,7 @@ public class UdiContrastService {
@Resource
ThirdAliDrugService thirdAliDrugService;
// @Transactional
public void createOnlyMainId(String mainId) {
FilterThrProductsRequest filterThrProductsRequest = new FilterThrProductsRequest();
@ -403,11 +404,15 @@ public class UdiContrastService {
} catch (IndexOutOfBoundsException e) {
e.printStackTrace();
Log.error("计算包装级别出错" + thirdAliDrug.getPackLevel() + "---" + integers + "-----" + thirdAliDrug.toString());
udiProductEntity.setBhxjsl(0);
}
udiProductEntity.setNameCode(thirdAliDrug.getNameCode());
if (IntUtil.value(thirdAliDrug.getPackLevel()) == 1) {
udiProductEntity.setXjdw(ybDrug.getMinUnit());
if (DimaUtil.trMinCount(thirdAliDrug.getBzgg()) != null) {
udiProductEntity.setBhxjsl(DimaUtil.trMinCount(thirdAliDrug.getBzgg()));
} else
udiProductEntity.setBhxjsl(ybDrug.getFactor());
}
if (thirdAliDrug.getPackLevel() != null || !thirdAliDrug.getPackLevel().equals("0")) {

@ -1483,7 +1483,7 @@ public class SpsSyncDownloadService {
boolean result = redisUtil.setIfAbsent(redisKey, 1, 10);
if (!result) {
String errorMsg = String.format("syncIdcSps----process------------同步回滚[%s]重复进入", entry.getKey().getRemark());
logger.error(errorMsg);
// logger.error(errorMsg);
}
if ((boolean) entry.getValue().get("isNew")) {
basicExportTimeService.deleteById(entry.getValue().get("id").toString());

@ -2,6 +2,8 @@ package com.glxp.api.util;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author AnthonyYwj
@ -34,4 +36,16 @@ public class DimaUtil {
return reversed;
}
public static Integer trMinCount(String bzgg) {
// 定义正则表达式模式,用于匹配数字
Pattern pattern = Pattern.compile("\\d+");
Matcher matcher = pattern.matcher(bzgg);
if (matcher.find()) {
return Integer.parseInt(matcher.group());
}
return null;
}
}

Loading…
Cancel
Save