解决商品导出的sql的bug(遇到多个副条码的情况,只加第一个)

This commit is contained in:
jishenghua 2025-03-20 14:05:14 +08:00
parent 057fd95817
commit cfc1ad8bf5

View File

@ -474,7 +474,8 @@ public class MaterialService {
Map<Long, MaterialExtend> otherMaterialMap = new HashMap<>();
List<MaterialExtend> otherDataList = materialMapperEx.getOtherMaterialList();
for(MaterialExtend me: otherDataList) {
otherMaterialMap.put(me.getMaterialId(), me);
//遇到多个副条码的情况只加第一个
otherMaterialMap.putIfAbsent(me.getMaterialId(), me);
}
String nameStr = "名称*,规格,型号,颜色,品牌,类别,基础重量(kg),保质期(天),基本单位*,副单位,基本条码*,副条码,比例,多属性," +
"采购价,零售价,销售价,最低售价,状态*,序列号,批号,仓位货架,制造商,自定义1,自定义2,自定义3,备注";