仓库管理按时间倒序排序

This commit is contained in:
秦鸿展
2026-02-09 13:16:25 +08:00
parent af540c67f9
commit bea406051f
6 changed files with 31 additions and 2 deletions
@@ -22,8 +22,11 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.List;
import java.util.stream.Collectors;
/**
* 物料基础信息ApplicationService
@@ -73,6 +76,21 @@ public class MaterialBaseInfoApplicationService {
BeanUtils.copyProperties(materialGoodsRules,materialGoodsRulePO);
materialBaseInfoPO.setMaterialGoodsRule(materialGoodsRulePO);
}
// 将物料分类的List转换为逗号分隔的字符串,用于导出
if (!CollectionUtils.isEmpty(materialBaseInfoPO.getMaterialClassifyCode())) {
materialBaseInfoPO.setMaterialClassifyCodeStr(
materialBaseInfoPO.getMaterialClassifyCode().stream()
.filter(code -> !StringUtils.isEmpty(code))
.collect(Collectors.joining(","))
);
}
if (!CollectionUtils.isEmpty(materialBaseInfoPO.getMaterialClassifyName())) {
materialBaseInfoPO.setMaterialClassifyNameStr(
materialBaseInfoPO.getMaterialClassifyName().stream()
.filter(name -> !StringUtils.isEmpty(name))
.collect(Collectors.joining(","))
);
}
}
return materialBaseInfoPOS;
}
@@ -70,15 +70,21 @@ public class MaterialBaseInfoPO extends BaseVOEntity {
private String barCode;
@ApiModelProperty("物料分类编码")
@Excel(name = "物料分类编码")
@TableField(typeHandler = ListTypeHandler.class)
private List<String> materialClassifyCode;
@ApiModelProperty("物料分类名称")
@Excel(name = "物料分类名称")
@TableField(typeHandler = ListTypeHandler.class)
private List<String> materialClassifyName;
@ApiModelProperty("物料分类编码(导出用,逗号分隔)")
@Excel(name = "物料分类编码")
private String materialClassifyCodeStr;
@ApiModelProperty("物料分类名称(导出用,逗号分隔)")
@Excel(name = "物料分类名称")
private String materialClassifyNameStr;
@ApiModelProperty("物料种类编码 数据字典")
@Excel(name = "物料种类编码 数据字典")
private String materialType;