给商品导出excel的列名进行优化

This commit is contained in:
jishenghua
2025-03-27 22:23:41 +08:00
parent aecd647223
commit affb7a70b6
2 changed files with 7 additions and 3 deletions

View File

@@ -464,7 +464,7 @@ public class MaterialService {
public void exportExcel(String categoryId, String materialParam, String color, String materialOther, String weight,
String expiryNum, String enabled, String enableSerialNumber, String enableBatchNumber,
String remark, HttpServletResponse response)throws Exception {
String remark, String mpList, HttpServletResponse response)throws Exception {
List<Long> idList = new ArrayList<>();
if(StringUtil.isNotEmpty(categoryId)){
idList = getListByParentId(Long.parseLong(categoryId));
@@ -479,8 +479,12 @@ public class MaterialService {
//遇到多个副条码的情况,只加第一个
otherMaterialMap.putIfAbsent(me.getMaterialId(), me);
}
String otherField = "扩展1,扩展2,扩展3";
if(StringUtil.isNotEmpty(mpList)) {
otherField = mpList;
}
String nameStr = "名称*,规格,型号,颜色,品牌,类别,基础重量(kg),保质期(天),基本单位*,副单位,基本条码*,副条码,比例,多属性," +
"采购价,零售价,销售价,最低售价,状态*,序列号,批号,仓位货架,制造商,扩展1,扩展2,扩展3,备注";
"采购价,零售价,销售价,最低售价,状态*,序列号,批号,仓位货架,制造商," + otherField + ",备注";
List<String> nameList = StringUtil.strToStringList(nameStr);
//仓库列表
List<Depot> depotList = depotService.getAllList();