PDA容器移位修改bug

This commit is contained in:
秦鸿展
2026-03-13 19:46:06 +08:00
parent d7dd8a4567
commit 6db8a47b4c
10 changed files with 604 additions and 55 deletions
@@ -3,6 +3,7 @@ package com.mhd.wms.application.service.materialInventory;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.alibaba.nacos.common.utils.CollectionUtils;
import com.mhd.common.core.utils.bean.BeanUtils;
import com.mhd.common.core.utils.StringUtils;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.security.utils.SecurityUtils;
@@ -458,6 +459,260 @@ public class MaterialInventoryApplicationService {
materialInventoryQueryListDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
}
}
return materialInventoryDomainService.materialQueryList(materialInventoryQueryListDO);
List<MaterialInventoryQueryListPO> list = materialInventoryDomainService.materialQueryList(materialInventoryQueryListDO);
// 批次属性填充,与按单移位一致
fillMaterialMoreDetailForInventoryQueryList(list);
// 主项子项结构,与移位详情 getInfoByApp 一致,每条主项下含一条 parent_copy 子项
buildParentChildForInventoryQueryList(list);
return list;
}
/**
* 将库存查询列表转为主项子项结构,与移位详情一致,供 PDA 表单复用
*/
private void buildParentChildForInventoryQueryList(List<MaterialInventoryQueryListPO> list) {
if (CollectionUtils.isEmpty(list)) return;
for (MaterialInventoryQueryListPO parent : list) {
Long uid = parent.getMaterialInventoryId();
parent.setLevel(1);
parent.setUniqueId(uid);
parent.setParentUniqueId(null);
MaterialInventoryQueryListPO child = new MaterialInventoryQueryListPO();
BeanUtils.copyProperties(parent, child, "children");
child.setLevel(2);
child.setUniqueId(uid);
child.setParentUniqueId(uid);
child.setChildren(null);
BigDecimal qty = parent.getShiftQuantity() != null ? parent.getShiftQuantity() : parent.getAllocationQuantity();
if (qty == null) qty = BigDecimal.ONE;
if (parent.getNetWeight() != null) child.setTotalNetWeight(parent.getNetWeight().multiply(qty));
if (parent.getGrossWeight() != null) child.setTotalGrossWeight(parent.getGrossWeight().multiply(qty));
if (parent.getVolume() != null) child.setTotalVolume(parent.getVolume().multiply(qty));
if (parent.getArea() != null) child.setTotalArea(parent.getArea().multiply(qty));
parent.setTotalNetWeight(child.getTotalNetWeight());
parent.setTotalGrossWeight(child.getTotalGrossWeight());
parent.setTotalVolume(child.getTotalVolume());
parent.setTotalArea(child.getTotalArea());
List<MaterialInventoryQueryListPO> children = new ArrayList<>();
children.add(child);
parent.setChildren(children);
}
}
/**
* 根据 materialInventoryId 获取单条库存(含批次属性、shiftQuantity),供移位表单预填,内部使用
*/
public MaterialInventoryQueryListPO getInventoryForShiftForm(Long materialInventoryId) {
if (materialInventoryId == null) return null;
MaterialInventoryQueryListDO do_ = new MaterialInventoryQueryListDO();
do_.setMaterialInventoryId(materialInventoryId);
do_.setQueryType(0);
List<MaterialInventoryQueryListPO> list = materialQueryList(do_);
return CollectionUtils.isEmpty(list) ? null : list.get(0);
}
/**
* 库存查询列表批次属性填充,与按单移位 fillMaterialMoreDetailForShiftDetail 一致
*/
private void fillMaterialMoreDetailForInventoryQueryList(List<MaterialInventoryQueryListPO> list) {
if (CollectionUtils.isEmpty(list)) {
return;
}
Set<Long> materialBaseInfoIdSet = list.stream()
.map(MaterialInventoryQueryListPO::getMaterialBaseInfoId)
.filter(Objects::nonNull)
.collect(Collectors.toSet());
Map<Long, List<BatchDetailFeignPO>> batchDetailMap = new HashMap<>();
for (Long materialBaseInfoId : materialBaseInfoIdSet) {
try {
AjaxResult ajaxResult = systemServiceFeign.getBatchDetailListByMaterialBaseInfoId(materialBaseInfoId);
if (ajaxResult != null && "200".equals(String.valueOf(ajaxResult.get("code")))) {
List<BatchDetailFeignPO> batchList = JSON.parseArray(
JSONObject.toJSONString(ajaxResult.get("data")), BatchDetailFeignPO.class);
if (!CollectionUtils.isEmpty(batchList)) {
batchDetailMap.put(materialBaseInfoId, batchList);
}
}
} catch (Exception e) {
log.warn("获取物料批次属性失败,materialBaseInfoId={}, error={}", materialBaseInfoId, e.getMessage());
}
}
list.forEach(po -> {
fillMaterialMoreDetailForInventoryQueryPO(po, batchDetailMap);
// 移位数量供 PDA 底部表单区显示,库存查询时等于可用数量
po.setShiftQuantity(po.getAllocationQuantity());
});
}
private void fillMaterialMoreDetailForInventoryQueryPO(MaterialInventoryQueryListPO po,
Map<Long, List<BatchDetailFeignPO>> batchDetailMap) {
if (po == null || po.getMaterialBaseInfoId() == null) {
po.setMaterialMoreDetailList(new ArrayList<>());
return;
}
List<MaterialMoreDetailPO> materialMoreDetailList = new ArrayList<>();
List<BatchDetailFeignPO> batchList = batchDetailMap.get(po.getMaterialBaseInfoId());
if (!CollectionUtils.isEmpty(batchList)) {
materialMoreDetailList = filterAndConvertToMaterialMoreDetail(batchList);
}
// 与按单移位一致:净重、毛重、体积、面积、移位数量不放在上面 materialMoreDetailList,由 PO 顶层字段在底部表单区(移入数量、移入库位、容器旁)显示
materialMoreDetailList = excludeWeightVolumeAreaShiftFromList(materialMoreDetailList);
fillAttributeValueFromInventoryQueryPO(po, materialMoreDetailList);
List<MaterialMoreDetailPO> filtered = materialMoreDetailList.stream()
.filter(m -> m.getAttributeValue() != null && !m.getAttributeValue().trim().isEmpty())
.collect(Collectors.toList());
po.setMaterialMoreDetailList(filtered);
}
/** 净重、毛重、体积、面积、移位数量在底部表单区显示,从上面 materialMoreDetailList 中排除,与按单移位一致 */
private static final String[] WEIGHT_VOLUME_AREA_SHIFT_LABELS = {
"净重(KG)", "净重", "总净重",
"毛重(KG)", "毛重", "总毛重",
"体积(CBM)", "体积", "总体积",
"面积(SQM)", "面积", "总面积",
"移位数量", "可移位数量"
};
private List<MaterialMoreDetailPO> excludeWeightVolumeAreaShiftFromList(List<MaterialMoreDetailPO> list) {
if (CollectionUtils.isEmpty(list)) {
return list;
}
return list.stream()
.filter(m -> {
String label = m.getBatchLabels();
if (label == null) return true;
for (String exclude : WEIGHT_VOLUME_AREA_SHIFT_LABELS) {
if (exclude.equals(label.trim())) return false;
}
return true;
})
.collect(Collectors.toList());
}
private List<MaterialMoreDetailPO> filterAndConvertToMaterialMoreDetail(List<BatchDetailFeignPO> batchList) {
List<MaterialMoreDetailPO> result = new ArrayList<>();
if (CollectionUtils.isEmpty(batchList)) {
return result;
}
for (BatchDetailFeignPO po : batchList) {
if (po.getIsDisplay() == null || po.getIsDisplay() != 1) {
continue;
}
MaterialMoreDetailPO mpo = new MaterialMoreDetailPO();
mpo.setBatchId(po.getBatchId());
mpo.setBatchDetailId(po.getBatchDetailId());
mpo.setBatchLabels(po.getBatchLabels());
mpo.setInputControl(po.getInputControl());
mpo.setAttributeFormat(po.getAttributeFormat());
mpo.setAttributeOption(po.getAttributeOption());
result.add(mpo);
}
return result;
}
private void fillAttributeValueFromInventoryQueryPO(MaterialInventoryQueryListPO po,
List<MaterialMoreDetailPO> materialMoreDetailList) {
if (CollectionUtils.isEmpty(materialMoreDetailList)) {
return;
}
for (MaterialMoreDetailPO materialMoreDetail : materialMoreDetailList) {
if (materialMoreDetail.getAttributeValue() != null && !materialMoreDetail.getAttributeValue().trim().isEmpty()) {
continue;
}
String batchLabels = materialMoreDetail.getBatchLabels();
String attributeOption = materialMoreDetail.getAttributeOption();
String refVal = null;
if (StringUtils.isNotBlank(batchLabels)) {
switch (batchLabels.trim()) {
case "Invoice No.":
case "Invoice No":
case "发票号":
refVal = po.getExtAttr1();
break;
case "Batch Ref NO's":
case "Batch Ref NO":
case "批次参考号":
refVal = po.getBatchRefNo();
break;
case "Sheet Ref NO's":
case "Sheet Ref NO":
case "单据参考号":
refVal = po.getSheetRefNo();
break;
case "箱号/卡板号":
case "箱号":
case "卡板号":
refVal = po.getBoxPalletNo();
break;
case "扩展字段1":
case "扩展属性1":
refVal = po.getExtAttr1();
break;
case "扩展字段2":
case "扩展属性2":
refVal = po.getExtAttr2();
break;
case "扩展字段3":
case "扩展属性3":
refVal = po.getExtAttr3() != null ? new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(po.getExtAttr3()) : null;
break;
case "扩展字段4":
case "扩展属性4":
refVal = po.getExtAttr4() != null ? new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(po.getExtAttr4()) : null;
break;
case "生产日期":
refVal = po.getProductionDate() != null ? new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(po.getProductionDate()) : null;
break;
case "过期日期":
refVal = po.getExpiryDate() != null ? new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(po.getExpiryDate()) : null;
break;
case "存货日期":
refVal = po.getInventoryDate() != null ? new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(po.getInventoryDate()) : null;
break;
case "批次号":
refVal = po.getBatchNumber();
break;
case "总净重":
case "净重(KG)":
case "净重":
refVal = po.getNetWeight() != null ? po.getNetWeight().toString() : null;
break;
case "总毛重":
case "毛重(KG)":
case "毛重":
refVal = po.getGrossWeight() != null ? po.getGrossWeight().toString() : null;
break;
case "总体积":
case "体积(CBM)":
case "体积":
refVal = po.getVolume() != null ? po.getVolume().toString() : null;
break;
case "总面积":
case "面积(SQM)":
case "面积":
refVal = po.getArea() != null ? po.getArea().toString() : null;
break;
default:
if ("InvoiceNo".equalsIgnoreCase(attributeOption)) refVal = po.getExtAttr1();
else if ("BatchRefNo".equalsIgnoreCase(attributeOption)) refVal = po.getBatchRefNo();
else if ("SheetRefNo".equalsIgnoreCase(attributeOption)) refVal = po.getSheetRefNo();
else if ("BoxPalletNo".equalsIgnoreCase(attributeOption)) refVal = po.getBoxPalletNo();
else if ("ProductionDate".equalsIgnoreCase(attributeOption) && po.getProductionDate() != null)
refVal = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(po.getProductionDate());
else if ("ExpiryDate".equalsIgnoreCase(attributeOption) && po.getExpiryDate() != null)
refVal = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(po.getExpiryDate());
else if ("InventoryDate".equalsIgnoreCase(attributeOption) && po.getInventoryDate() != null)
refVal = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(po.getInventoryDate());
else if ("NetWeight".equalsIgnoreCase(attributeOption) && po.getNetWeight() != null) refVal = po.getNetWeight().toString();
else if ("GrossWeight".equalsIgnoreCase(attributeOption) && po.getGrossWeight() != null) refVal = po.getGrossWeight().toString();
else if ("Volume".equalsIgnoreCase(attributeOption) && po.getVolume() != null) refVal = po.getVolume().toString();
else if ("Area".equalsIgnoreCase(attributeOption) && po.getArea() != null) refVal = po.getArea().toString();
break;
}
}
if (refVal != null) {
materialMoreDetail.setAttributeValue(refVal);
}
}
}
}
@@ -19,6 +19,8 @@ import com.mhd.system.api.domain.WarehouseFeignPO;
import com.mhd.system.api.domain.cache.AssociationWarehouseCacheDO;
import com.mhd.system.api.domain.cache.SystemServiceCacheUtil;
import com.mhd.system.api.model.LoginUser;
import com.mhd.wms.application.service.materialInventory.MaterialInventoryApplicationService;
import com.mhd.wms.domain.materialInventory.repository.po.MaterialInventoryQueryListPO;
import com.mhd.wms.domain.shiftManage.repository.po.ShiftManagePO;
import com.mhd.wms.domain.shiftManage.repository.todo.ContainerShiftDO;
import com.mhd.wms.domain.shiftManage.repository.todo.ShiftManageDO;
@@ -53,6 +55,8 @@ public class ShiftManageApplicationService {
@Autowired
private ShiftMaterialDetailDomainService shiftMaterialDetailDomainService;
@Autowired
private MaterialInventoryApplicationService materialInventoryApplicationService;
@Autowired
private IdGenerator idGenerator;
@Autowired
@@ -123,14 +127,86 @@ public class ShiftManageApplicationService {
}
/**
* @description app 获取移位详情
* @author ZhouGY
* @date 2024/7/30 14:20
* @param ShiftManageId
* @return ShiftManagePO
* app 获取移位详情。支持两种入参:按单移位传 shiftManageId,从库存/容器移位传 materialInventoryId,返回结构一致
*/
public ShiftManagePO getInfoByApp(Long ShiftManageId) {
return shiftManageDomainService.getInfoByApp(ShiftManageId);
public ShiftManagePO getInfoByApp(Long shiftManageId, Long materialInventoryId) {
if (materialInventoryId != null && shiftManageId == null) {
return getInfoByInventory(materialInventoryId);
}
if (shiftManageId == null) return null;
return shiftManageDomainService.getInfoByApp(shiftManageId);
}
/** 从库存构建与 getInfoByApp 一致的 ShiftManagePO 结构,供容器移位/库存进入复用 */
private ShiftManagePO getInfoByInventory(Long materialInventoryId) {
MaterialInventoryQueryListPO inv = materialInventoryApplicationService.getInventoryForShiftForm(materialInventoryId);
if (inv == null) return null;
ShiftManagePO po = new ShiftManagePO();
po.setShiftManageId(null);
po.setShiftNumber(null);
po.setWarehouseId(inv.getWarehouseId());
po.setWarehouseCode(inv.getWarehouseCode());
po.setWarehouseName(inv.getWarehouseName());
po.setOrganizationId(inv.getOrganizationId());
po.setOrganizationName(inv.getOrganizationName());
po.setTopOrganizationId(inv.getTopOrganizationId());
ShiftMaterialDetailPO parent = buildShiftDetailFromInventory(inv, 1, null);
ShiftMaterialDetailPO child = buildShiftDetailFromInventory(inv, 2, parent.getUniqueId());
child.setMaterialDetailSerialNumberList(new ArrayList<>());
List<ShiftMaterialDetailPO> children = new ArrayList<>();
children.add(child);
parent.setChildren(children);
List<ShiftMaterialDetailPO> shiftMaterialDetailList = new ArrayList<>();
shiftMaterialDetailList.add(parent);
po.setShiftMaterialDetailList(shiftMaterialDetailList);
return po;
}
private ShiftMaterialDetailPO buildShiftDetailFromInventory(MaterialInventoryQueryListPO inv, int level, Long parentUniqueId) {
ShiftMaterialDetailPO d = new ShiftMaterialDetailPO();
d.setUniqueId(idGenerator.snowflakeId(SnowFlakeConstants.wmsId));
d.setMaterialInventoryId(inv.getMaterialInventoryId());
d.setMaterialBaseInfoId(inv.getMaterialBaseInfoId());
d.setMaterialCode(inv.getMaterialCode());
d.setMaterialName(inv.getMaterialName());
d.setBarCode(inv.getBarCode());
d.setQuantity(inv.getAllocationQuantity());
d.setShiftQuantity(inv.getShiftQuantity() != null ? inv.getShiftQuantity() : inv.getAllocationQuantity());
d.setInventoryQuantity(inv.getInventoryQuantity());
d.setOldWarehouseId(inv.getWarehouseId());
d.setOldWarehouseCode(inv.getWarehouseCode());
d.setOldWarehouseName(inv.getWarehouseName());
d.setOldStorageSectionId(inv.getStorageSectionId());
d.setOldStorageCode(inv.getStorageCode());
d.setOldStorageName(inv.getStorageName());
d.setOldStorageLocationId(inv.getStorageLocationId());
d.setOldStorageLocationCode(inv.getStorageLocationCode());
d.setOldStorageLocationName(inv.getStorageLocationName());
d.setNewStorageLocationId(inv.getNewStorageLocationId());
d.setNewStorageLocationCode(inv.getNewStorageLocationCode());
d.setNewStorageLocationName(inv.getNewStorageLocationName());
d.setContainerId(inv.getContainerId());
d.setContainerCode(inv.getContainerCode());
d.setContainerType(inv.getContainerType());
d.setContainerTypeName(inv.getContainerTypeName());
d.setBatchNumber(inv.getBatchNumber());
d.setMaterialStatusCode(inv.getMaterialStatusCode());
d.setMaterialStatusName(inv.getMaterialStatusName());
d.setUnitCode(inv.getUnit());
d.setUnitName(inv.getUnitName());
d.setNetWeight(inv.getNetWeight());
d.setGrossWeight(inv.getGrossWeight());
d.setVolume(inv.getVolume());
d.setArea(inv.getArea());
BigDecimal qty = d.getShiftQuantity() != null ? d.getShiftQuantity() : BigDecimal.ONE;
if (inv.getNetWeight() != null) d.setTotalNetWeight(inv.getNetWeight().multiply(qty));
if (inv.getGrossWeight() != null) d.setTotalGrossWeight(inv.getGrossWeight().multiply(qty));
if (inv.getVolume() != null) d.setTotalVolume(inv.getVolume().multiply(qty));
if (inv.getArea() != null) d.setTotalArea(inv.getArea().multiply(qty));
d.setLevel(level);
d.setParentUniqueId(parentUniqueId);
d.setMaterialMoreDetailList(inv.getMaterialMoreDetailList() != null ? inv.getMaterialMoreDetailList() : new ArrayList<>());
return d;
}
@@ -602,8 +678,10 @@ public class ShiftManageApplicationService {
shiftMoveMaterialQuantityPO.setNewStorageLocationCode(storageLocationFeignPO.getStorageLocationCode());
shiftMoveMaterialQuantityPO.setNewStorageLocationName(storageLocationFeignPO.getStorageLocationName());
//获取容器详情
AjaxResult ajaxResult = systemServiceFeign.getContainerInfoByContainerId(shiftMoveMaterialQuantityPO.getContainerId());
// 有容器id时获取容器详情,无容器时跳过(有容器或批次号其一即可提交)
Long containerId = shiftMoveMaterialQuantityPO.getContainerId();
if (containerId != null && containerId > 0) {
AjaxResult ajaxResult = systemServiceFeign.getContainerInfoByContainerId(containerId);
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
throw new ServiceException("获取容器信息失败");
}
@@ -611,6 +689,7 @@ public class ShiftManageApplicationService {
shiftMoveMaterialQuantityPO.setContainerCode(containerFeignPO.getContainerCode());
shiftMoveMaterialQuantityPO.setContainerType(containerFeignPO.getContainerType());
shiftMoveMaterialQuantityPO.setContainerTypeName(containerFeignPO.getContainerTypeName());
}
});
}
}
@@ -3,6 +3,7 @@ package com.mhd.wms.domain.materialInventory.repository.po;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mhd.common.core.annotation.Excel;
import com.mhd.wms.domain.materialBaseInfo.repository.po.MaterialBasePO;
import com.mhd.wms.domain.materialMoreDetail.repository.po.MaterialMoreDetailPO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -10,6 +11,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
@@ -103,6 +105,15 @@ public class MaterialInventoryQueryListPO extends MaterialBasePO {
@Excel(name = "库位名称")
private String storageLocationName;
@ApiModelProperty("移入库位id,供 PDA 底部表单区填写")
private Long newStorageLocationId;
@ApiModelProperty("移入库位编码,供 PDA 底部表单区填写")
private String newStorageLocationCode;
@ApiModelProperty("移入库位名称,供 PDA 底部表单区显示")
private String newStorageLocationName;
@ApiModelProperty("批次号")
@Excel(name = "批次号")
private String batchNumber;
@@ -139,6 +150,10 @@ public class MaterialInventoryQueryListPO extends MaterialBasePO {
@Excel(name = "可用数量")
private BigDecimal allocationQuantity;
@ApiModelProperty("移位数量,供 PDA 底部表单区显示,库存查询时等于可用数量")
@Excel(name = "移位数量")
private BigDecimal shiftQuantity;
@ApiModelProperty("冻结数量")
@Excel(name = "冻结数量")
private BigDecimal freezeQuantity;
@@ -156,6 +171,10 @@ public class MaterialInventoryQueryListPO extends MaterialBasePO {
@Excel(name = "单位")
private String unit;
@ApiModelProperty("单位名称")
@Excel(name = "单位名称")
private String unitName;
@ApiModelProperty("净重(KG)")
@Excel(name = "净重(KG)")
private BigDecimal netWeight;
@@ -222,4 +241,31 @@ public class MaterialInventoryQueryListPO extends MaterialBasePO {
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date extAttr4;
@ApiModelProperty("批次属性列表,与按单移位一致")
private List<MaterialMoreDetailPO> materialMoreDetailList;
@ApiModelProperty("层级深度,与移位详情一致:1-主项 2-子项")
private Integer level;
@ApiModelProperty("业务唯一id,与移位详情一致")
private Long uniqueId;
@ApiModelProperty("父级唯一Id,子项时使用")
private Long parentUniqueId;
@ApiModelProperty("子项列表,与移位详情一致,主项下含一条 parent_copy 子项")
private List<MaterialInventoryQueryListPO> children;
@ApiModelProperty("总净重(KG)PDA 表单区显示")
private BigDecimal totalNetWeight;
@ApiModelProperty("总毛重(KG)PDA 表单区显示")
private BigDecimal totalGrossWeight;
@ApiModelProperty("总体积(CBM)PDA 表单区显示")
private BigDecimal totalVolume;
@ApiModelProperty("总面积(SQM)PDA 表单区显示")
private BigDecimal totalArea;
}
@@ -172,6 +172,9 @@ public class MaterialInventoryQueryListDO extends MaterialBaseDO {
@Excel(name = "物料/库位信息")
private String storageInfo;
@ApiModelProperty("容器号或批次号,输入后同时按容器号、批次号模糊匹配")
@Excel(name = "容器号或批次号")
private String containerOrBatch;
@ApiModelProperty("单位")
@Excel(name = "单位")
@@ -22,6 +22,7 @@ import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.StringUtils;
import com.mhd.system.api.SystemServiceFeign;
import com.mhd.system.api.domain.BatchDetailFeignPO;
import com.mhd.system.api.domain.StorageLocationFeignPO;
import com.mhd.wms.domain.materialInventory.entity.MaterialInventory;
import com.mhd.wms.domain.materialInventory.repository.facade.IMaterialInventoryService;
import com.mhd.wms.domain.materialInventory.repository.todo.MaterialInventoryDO;
@@ -107,6 +108,8 @@ public class ShiftManageDomainService {
fillMaterialMoreDetailForShiftDetail(shiftMaterialDetailPO);
// 填充 totalNetWeight PDA 表单区移入数量移入库位容器旁显示
fillTotalWeightVolumeArea(shiftMaterialDetailPO);
// 填充移入库位名称 PDA 底部表单区显示
fillNewStorageLocationName(shiftMaterialDetailPO);
List<ShiftMaterialDetailPO> shiftMaterialDetailPOChildrenNowList = new ArrayList<>();
ShiftMaterialDetailPO shiftMaterialDetailPOChildrenNow = new ShiftMaterialDetailPO();
BeanUtils.copyProperties(shiftMaterialDetailPO, shiftMaterialDetailPOChildrenNow, "children");
@@ -119,12 +122,14 @@ public class ShiftManageDomainService {
// 子项副本同步批次属性
shiftMaterialDetailPOChildrenNow.setMaterialMoreDetailList(shiftMaterialDetailPO.getMaterialMoreDetailList());
fillTotalWeightVolumeArea(shiftMaterialDetailPOChildrenNow);
fillNewStorageLocationName(shiftMaterialDetailPOChildrenNow);
shiftMaterialDetailPOChildrenNowList.add(shiftMaterialDetailPOChildrenNow);
//子集
List<ShiftMaterialDetailPO> shiftMaterialDetailPOChildrenList = shiftMaterialDetailPO.getChildren();
shiftMaterialDetailPOChildrenList.forEach(receiptMaterialDetailPOChildren -> {
fillMaterialMoreDetailForShiftDetail(receiptMaterialDetailPOChildren);
fillTotalWeightVolumeArea(receiptMaterialDetailPOChildren);
fillNewStorageLocationName(receiptMaterialDetailPOChildren);
List<OutMaterialDetailSerialNumberPO> materialDetailSerialNumberChildrenList = inMaterialDetailSerialNumberMap.get(shiftMaterialDetailPO.getUniqueId());
if (!CollectionUtils.isEmpty(materialDetailSerialNumberChildrenList)){
receiptMaterialDetailPOChildren.setMaterialDetailSerialNumberList(materialDetailSerialNumberChildrenList);
@@ -214,6 +219,30 @@ public class ShiftManageDomainService {
}
}
/**
* 填充移入库位名称 PDA 底部表单区显示 newStorageLocationId 有值但 newStorageLocationName 为空时从系统服务获取
*/
private void fillNewStorageLocationName(ShiftMaterialDetailPO shiftMaterialDetailPO) {
if (shiftMaterialDetailPO == null || shiftMaterialDetailPO.getNewStorageLocationId() == null) {
return;
}
if (StringUtils.isNotBlank(shiftMaterialDetailPO.getNewStorageLocationName())) {
return;
}
try {
AjaxResult result = systemServiceFeign.getStorageLocationInfoByStorageLocationId(shiftMaterialDetailPO.getNewStorageLocationId());
if (result != null && "200".equals(String.valueOf(result.get("code"))) && result.get("data") != null) {
StorageLocationFeignPO po = JSON.parseObject(JSONObject.toJSONString(result.get("data")), StorageLocationFeignPO.class);
if (po != null) {
shiftMaterialDetailPO.setNewStorageLocationCode(po.getStorageLocationCode());
shiftMaterialDetailPO.setNewStorageLocationName(po.getStorageLocationName());
}
}
} catch (Exception e) {
log.warn("获取移入库位信息失败, newStorageLocationId={}", shiftMaterialDetailPO.getNewStorageLocationId(), e);
}
}
/** 净重、毛重、体积、面积在移位上面区域不展示,从 materialMoreDetailList 中排除 */
private static final String[] WEIGHT_VOLUME_AREA_LABELS = {
"净重(KG)", "净重", "总净重",
@@ -704,10 +733,20 @@ public class ShiftManageDomainService {
ShiftMaterialDetailDO shiftMaterialDetailDO = new ShiftMaterialDetailDO();
shiftMaterialDetailDO.setShiftNumber(shiftManagePO.getShiftNumber());
List<ShiftMaterialDetailPO> shiftMaterialDetailPOList = shiftMaterialDetailService.queryList(shiftMaterialDetailDO);
// 有子项时仅用子项level=2生成追溯避免主项+子项重复统计无子项时用全部
List<ShiftMaterialDetailPO> toUseList = shiftMaterialDetailPOList.stream()
.filter(p -> p.getLevel() != null && p.getLevel() == 2)
.collect(Collectors.toList());
if (toUseList.isEmpty()) {
toUseList = shiftMaterialDetailPOList;
}
//生成追溯记录
List<InventoryStandingDetailDO> inventoryStandingDetailDOList = new ArrayList<>();
LoginUser loginUser = SecurityUtils.getLoginUser();
for (ShiftMaterialDetailPO shiftMaterialDetailPO : shiftMaterialDetailPOList){
for (ShiftMaterialDetailPO shiftMaterialDetailPO : toUseList){
if (shiftMaterialDetailPO.getShiftQuantity() == null || shiftMaterialDetailPO.getShiftQuantity().compareTo(BigDecimal.ZERO) <= 0) {
continue;
}
InventoryStandingDetailDO inventoryStandingDetailDO = new InventoryStandingDetailDO();
inventoryStandingDetailDO.setOrganizationId(shiftManagePO.getOrganizationId());
inventoryStandingDetailDO.setOrganizationName(shiftManagePO.getOrganizationName());
@@ -213,11 +213,11 @@ public class ShiftMaterialDetailImpl extends ServiceImpl<ShiftMaterialDetailMapp
}
/**
* @description app 容器移位
* @description app 容器移位参考按单移位主项子项结构主项为容器库存信息子项为各移入目标明细
* @author ZhouGY
* @date 2024/7/30 14:24
* @param containerShiftDOList
* @return Boolean
* @return List<ShiftMaterialDetailDO> 主项列表每个主项含 children 子项
*/
@Override
@Transactional(rollbackFor = Exception.class)
@@ -227,38 +227,112 @@ public class ShiftMaterialDetailImpl extends ServiceImpl<ShiftMaterialDetailMapp
List<MaterialInventoryDO> materialInventoryNowList = new ArrayList<>();
List<ShiftMaterialDetailDO> shiftMaterialDetailDOList = new ArrayList<>();
for (ContainerShiftDO containerShiftDO : containerShiftDOList){
BigDecimal shiftQuantity = BigDecimal.ZERO;
List<ShiftMoveMaterialQuantityPO> shiftMoveMaterialQuantityList = containerShiftDO.getChildren();
if (CollectionUtils.isEmpty(shiftMoveMaterialQuantityList)){
//没有移位 跳过
continue;
}
//原库位
// 先累加有效移位数量及用户填写的净重毛重体积面积
BigDecimal totalShiftQuantity = BigDecimal.ZERO;
BigDecimal totalNetWeight = BigDecimal.ZERO;
BigDecimal totalGrossWeight = BigDecimal.ZERO;
BigDecimal totalVolume = BigDecimal.ZERO;
BigDecimal totalArea = BigDecimal.ZERO;
for (ShiftMoveMaterialQuantityPO c : shiftMoveMaterialQuantityList) {
if (c.getShiftQuantity() != null && c.getShiftQuantity().compareTo(BigDecimal.ZERO) > 0) {
totalShiftQuantity = totalShiftQuantity.add(c.getShiftQuantity());
if (c.getNetWeight() != null) totalNetWeight = totalNetWeight.add(c.getNetWeight());
if (c.getGrossWeight() != null) totalGrossWeight = totalGrossWeight.add(c.getGrossWeight());
if (c.getVolume() != null) totalVolume = totalVolume.add(c.getVolume());
if (c.getArea() != null) totalArea = totalArea.add(c.getArea());
}
}
if (totalShiftQuantity.compareTo(BigDecimal.ZERO) <= 0){
continue;
}
// 原库位校验
MaterialInventory materialInventoryOldDb = materialInventoryMapper.selectById(containerShiftDO.getMaterialInventoryId());
if (ObjectUtil.isNull(materialInventoryOldDb)){
throw new ServiceException("原库位【" + containerShiftDO.getContainerTypeName() + "】不存在,不能进行移位");
}
if (materialInventoryOldDb.getInventoryQuantity().compareTo(shiftQuantity) < 0){
if (materialInventoryOldDb.getInventoryQuantity().compareTo(totalShiftQuantity) < 0){
throw new ServiceException("容器【" + containerShiftDO.getContainerTypeName() + "】下的物料库存不足,不能进行移位");
}
// 主项参考按单移位主项 newStorageLocationId 取第一个子项 insert setWarehouseInfo 使用
ShiftMoveMaterialQuantityPO firstChild = shiftMoveMaterialQuantityList.stream()
.filter(c -> c.getShiftQuantity() != null && c.getShiftQuantity().compareTo(BigDecimal.ZERO) > 0)
.findFirst().orElse(null);
ShiftMaterialDetailDO parentDO = new ShiftMaterialDetailDO();
parentDO.setMaterialInventoryId(containerShiftDO.getMaterialInventoryId());
parentDO.setMaterialBaseInfoId(containerShiftDO.getMaterialBaseInfoId());
parentDO.setQuantity(totalShiftQuantity);
parentDO.setLevel(1);
if (firstChild != null) {
parentDO.setNewStorageLocationId(firstChild.getNewStorageLocationId());
parentDO.setNewStorageSectionId(firstChild.getNewStorageSectionId());
parentDO.setNewStorageCode(firstChild.getNewStorageCode());
parentDO.setNewStorageName(firstChild.getNewStorageName());
parentDO.setNewStorageLocationCode(firstChild.getNewStorageLocationCode());
parentDO.setNewStorageLocationName(firstChild.getNewStorageLocationName());
}
List<ShiftMaterialDetailDO> children = new ArrayList<>();
// 原库位减少净重毛重体积面积优先用用户填写汇总无则按原库存比例计算
MaterialInventoryDO materialInventoryDOOld = new MaterialInventoryDO();
materialInventoryDOOld.setMaterialInventoryId(containerShiftDO.getMaterialInventoryId());
materialInventoryDOOld.setInventoryQuantity(shiftQuantity);
materialInventoryDOOld.setAllocationQuantity(shiftQuantity);
materialInventoryDOOld.setInventoryQuantity(totalShiftQuantity);
materialInventoryDOOld.setAllocationQuantity(totalShiftQuantity);
if (totalNetWeight.compareTo(BigDecimal.ZERO) > 0) {
materialInventoryDOOld.setNetWeight(totalNetWeight);
}
if (totalGrossWeight.compareTo(BigDecimal.ZERO) > 0) {
materialInventoryDOOld.setGrossWeight(totalGrossWeight);
}
if (totalVolume.compareTo(BigDecimal.ZERO) > 0) {
materialInventoryDOOld.setVolume(totalVolume);
}
if (totalArea.compareTo(BigDecimal.ZERO) > 0) {
materialInventoryDOOld.setArea(totalArea);
}
if (materialInventoryDOOld.getNetWeight() == null && materialInventoryDOOld.getGrossWeight() == null
&& materialInventoryDOOld.getVolume() == null && materialInventoryDOOld.getArea() == null) {
BigDecimal oldQty = materialInventoryOldDb.getInventoryQuantity();
if (oldQty != null && oldQty.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal ratio = totalShiftQuantity.divide(oldQty, 10, java.math.RoundingMode.HALF_UP);
if (materialInventoryOldDb.getNetWeight() != null) materialInventoryDOOld.setNetWeight(materialInventoryOldDb.getNetWeight().multiply(ratio));
if (materialInventoryOldDb.getGrossWeight() != null) materialInventoryDOOld.setGrossWeight(materialInventoryOldDb.getGrossWeight().multiply(ratio));
if (materialInventoryOldDb.getVolume() != null) materialInventoryDOOld.setVolume(materialInventoryOldDb.getVolume().multiply(ratio));
if (materialInventoryOldDb.getArea() != null) materialInventoryDOOld.setArea(materialInventoryOldDb.getArea().multiply(ratio));
}
}
materialInventoryOldList.add(materialInventoryDOOld);
for (ShiftMoveMaterialQuantityPO shiftMoveMaterialQuantityPO : shiftMoveMaterialQuantityList) {
if (ObjectUtil.isNull(shiftMoveMaterialQuantityPO.getShiftQuantity()) || shiftMoveMaterialQuantityPO.getShiftQuantity().compareTo(BigDecimal.ZERO) == 0){
//没有移位 跳过
continue;
}
//新库位
// 子项参考按单移位
ShiftMaterialDetailDO childDO = new ShiftMaterialDetailDO();
childDO.setMaterialInventoryId(null);
childDO.setQuantity(shiftMoveMaterialQuantityPO.getShiftQuantity());
childDO.setShiftQuantity(shiftMoveMaterialQuantityPO.getShiftQuantity());
childDO.setNewStorageLocationId(shiftMoveMaterialQuantityPO.getNewStorageLocationId());
childDO.setNewStorageSectionId(shiftMoveMaterialQuantityPO.getNewStorageSectionId());
childDO.setNewStorageCode(shiftMoveMaterialQuantityPO.getNewStorageCode());
childDO.setNewStorageName(shiftMoveMaterialQuantityPO.getNewStorageName());
childDO.setNewStorageLocationCode(shiftMoveMaterialQuantityPO.getNewStorageLocationCode());
childDO.setNewStorageLocationName(shiftMoveMaterialQuantityPO.getNewStorageLocationName());
childDO.setContainerId(shiftMoveMaterialQuantityPO.getContainerId());
childDO.setContainerCode(shiftMoveMaterialQuantityPO.getContainerCode());
childDO.setContainerType(shiftMoveMaterialQuantityPO.getContainerType());
childDO.setContainerTypeName(shiftMoveMaterialQuantityPO.getContainerTypeName());
childDO.setLevel(2);
children.add(childDO);
// 新库位增加
LambdaQueryWrapper<MaterialInventory> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(MaterialInventory::getWarehouseId, SystemServiceCacheUtil.getAssociationWarehouseCache(SecurityUtils.getLoginUser().getUserid()).getWarehouseId()); // 仓库
queryWrapper.eq(MaterialInventory::getStorageSectionId, shiftMoveMaterialQuantityPO.getNewStorageSectionId()); // 库区
queryWrapper.eq(MaterialInventory::getStorageLocationId, shiftMoveMaterialQuantityPO.getNewStorageLocationId()); // 库位
queryWrapper.eq(MaterialInventory::getMaterialBaseInfoId, containerShiftDO.getMaterialBaseInfoId()); // 物料基础信息id
queryWrapper.eq(MaterialInventory::getBatchNumber, containerShiftDO.getBatchNumber()); // 批次号
queryWrapper.eq(MaterialInventory::getMaterialStatusCode, containerShiftDO.getMaterialStatusCode()); // 物料状态
queryWrapper.eq(MaterialInventory::getWarehouseId, SystemServiceCacheUtil.getAssociationWarehouseCache(SecurityUtils.getLoginUser().getUserid()).getWarehouseId());
queryWrapper.eq(MaterialInventory::getStorageSectionId, shiftMoveMaterialQuantityPO.getNewStorageSectionId());
queryWrapper.eq(MaterialInventory::getStorageLocationId, shiftMoveMaterialQuantityPO.getNewStorageLocationId());
queryWrapper.eq(MaterialInventory::getMaterialBaseInfoId, containerShiftDO.getMaterialBaseInfoId());
queryWrapper.eq(MaterialInventory::getBatchNumber, containerShiftDO.getBatchNumber());
queryWrapper.eq(MaterialInventory::getMaterialStatusCode, containerShiftDO.getMaterialStatusCode());
if (!ObjectUtil.isNull(shiftMoveMaterialQuantityPO.getContainerId())){
queryWrapper.eq(MaterialInventory::getContainerId, shiftMoveMaterialQuantityPO.getContainerId());
}
@@ -278,6 +352,10 @@ public class ShiftMaterialDetailImpl extends ServiceImpl<ShiftMaterialDetailMapp
materialInventoryDONow.setContainerTypeName(shiftMoveMaterialQuantityPO.getContainerTypeName());
materialInventoryDONow.setInventoryQuantity(shiftMoveMaterialQuantityPO.getShiftQuantity());
materialInventoryDONow.setAllocationQuantity(shiftMoveMaterialQuantityPO.getShiftQuantity());
if (shiftMoveMaterialQuantityPO.getNetWeight() != null) materialInventoryDONow.setNetWeight(shiftMoveMaterialQuantityPO.getNetWeight());
if (shiftMoveMaterialQuantityPO.getGrossWeight() != null) materialInventoryDONow.setGrossWeight(shiftMoveMaterialQuantityPO.getGrossWeight());
if (shiftMoveMaterialQuantityPO.getVolume() != null) materialInventoryDONow.setVolume(shiftMoveMaterialQuantityPO.getVolume());
if (shiftMoveMaterialQuantityPO.getArea() != null) materialInventoryDONow.setArea(shiftMoveMaterialQuantityPO.getArea());
materialInventoryDONow.setOrganizationId(loginUser.getUserPo().getOrganizationId());
materialInventoryDONow.setOrganizationName(loginUser.getUserPo().getOrganizationName());
materialInventoryDONow.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
@@ -290,23 +368,19 @@ public class ShiftMaterialDetailImpl extends ServiceImpl<ShiftMaterialDetailMapp
materialInventoryDONow.setMaterialInventoryId(materialInventoryDb.getMaterialInventoryId());
materialInventoryDONow.setInventoryQuantity(shiftMoveMaterialQuantityPO.getShiftQuantity());
materialInventoryDONow.setAllocationQuantity(shiftMoveMaterialQuantityPO.getShiftQuantity());
if (shiftMoveMaterialQuantityPO.getNetWeight() != null) materialInventoryDONow.setNetWeight(shiftMoveMaterialQuantityPO.getNetWeight());
if (shiftMoveMaterialQuantityPO.getGrossWeight() != null) materialInventoryDONow.setGrossWeight(shiftMoveMaterialQuantityPO.getGrossWeight());
if (shiftMoveMaterialQuantityPO.getVolume() != null) materialInventoryDONow.setVolume(shiftMoveMaterialQuantityPO.getVolume());
if (shiftMoveMaterialQuantityPO.getArea() != null) materialInventoryDONow.setArea(shiftMoveMaterialQuantityPO.getArea());
materialInventoryNowList.add(materialInventoryDONow);
}
shiftQuantity = shiftQuantity.add(shiftMoveMaterialQuantityPO.getShiftQuantity());
ShiftMaterialDetailDO shiftMaterialDetailDO = new ShiftMaterialDetailDO();
shiftMaterialDetailDO.setMaterialInventoryId(materialInventoryOldDb.getMaterialInventoryId());
shiftMaterialDetailDO.setQuantity(shiftMoveMaterialQuantityPO.getShiftQuantity());
shiftMaterialDetailDO.setShiftQuantity(shiftMoveMaterialQuantityPO.getShiftQuantity());
shiftMaterialDetailDO.setNewStorageLocationId(shiftMoveMaterialQuantityPO.getNewStorageLocationId());
shiftMaterialDetailDO.setContainerId(shiftMoveMaterialQuantityPO.getContainerId());
shiftMaterialDetailDOList.add(shiftMaterialDetailDO);
}
parentDO.setChildren(children);
shiftMaterialDetailDOList.add(parentDO);
}
//目标库位 需要增加的库存
if (!CollectionUtils.isEmpty(materialInventoryNowList)){
materialInventoryService.updateMaterialInventoryInfo(materialInventoryNowList, 1);
}
//原库位 需要减少的库存
if (!CollectionUtils.isEmpty(materialInventoryOldList)){
materialInventoryService.updateMaterialInventoryInfo(materialInventoryOldList, 2);
}
@@ -75,5 +75,16 @@ public class ShiftMoveMaterialQuantityPO {
@Excel(name = "容器类型名称 数据字典")
private String containerTypeName;
@ApiModelProperty("净重(KG)PDA 表单填写")
private BigDecimal netWeight;
@ApiModelProperty("毛重(KG)PDA 表单填写")
private BigDecimal grossWeight;
@ApiModelProperty("体积(CBM)PDA 表单填写")
private BigDecimal volume;
@ApiModelProperty("面积(SQM)PDA 表单填写")
private BigDecimal area;
}
@@ -169,6 +169,10 @@ public class MaterialInventoryQueryListDTO extends MaterialBaseDTO {
@Excel(name = "物料/库位信息")
private String storageInfo;
@ApiModelProperty("容器号或批次号,输入后同时按容器号、批次号模糊匹配")
@Excel(name = "容器号或批次号")
private String containerOrBatch;
@ApiModelProperty("Batch Ref NO's")
@Excel(name = "Batch Ref NO's")
private String batchRefNo;
@@ -50,10 +50,10 @@ public class ShiftManageAppApi extends BaseController {
/**
* 下拉分页查询移位管理列表
*/
@ApiOperation("移位详情")
@ApiOperation("移位详情。按单移位传 shiftManageId,从库存/容器移位传 materialInventoryId,返回结构一致")
@GetMapping("/getInfoByApp")
public AjaxResult getInfoByApp(Long shiftManageId) {
ShiftManagePO shiftManagePO = shiftManageApplicationService.getInfoByApp(shiftManageId);
public AjaxResult getInfoByApp(Long shiftManageId, Long materialInventoryId) {
ShiftManagePO shiftManagePO = shiftManageApplicationService.getInfoByApp(shiftManageId, materialInventoryId);
return AjaxResult.success(shiftManagePO);
}
@@ -84,6 +84,4 @@ public class ShiftManageAppApi extends BaseController {
return AjaxResult.success(shiftManageApplicationService.appMoveContainShift(containerShiftDOList));
}
}
@@ -85,6 +85,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<sql id="selectMaterialInventoryPo1">
<if test="materialInventoryId != null ">
and a.material_inventory_id = #{materialInventoryId}
</if>
<if test="organizationId != null ">
and a.organization_id = #{organizationId}
</if>
@@ -130,9 +133,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialDetailId != null ">
and a.material_detail_id, = #{materialDetailId}
</if>
<!-- 容器号或批次号:containerOrBatch 优先;若 batchNumber 与 containerCode 相同则按 OR 查(PDA 单输入框传两个相同值) -->
<choose>
<when test="containerOrBatch != null and containerOrBatch != ''">
and (a.container_code like concat('%', #{containerOrBatch}, '%') or a.batch_number like concat('%', #{containerOrBatch}, '%'))
</when>
<when test="batchNumber != null and batchNumber != '' and containerCode != null and containerCode != '' and batchNumber == containerCode">
and (a.batch_number like concat('%', #{batchNumber}, '%') or a.container_code like concat('%', #{containerCode}, '%'))
</when>
<otherwise>
<if test="batchNumber != null and batchNumber != ''">
and a.batch_number = #{batchNumber}
and a.batch_number like concat('%', #{batchNumber}, '%')
</if>
<if test="containerCode != null and containerCode != ''">
and a.container_code like concat('%', #{containerCode}, '%')
</if>
</otherwise>
</choose>
<if test="materialStatusCode != null and materialStatusCode != ''">
and a.material_status_code like concat('%', #{materialStatusCode}, '%')
</if>
@@ -142,9 +159,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="containerId != null ">
and a.container_id = #{containerId}
</if>
<if test="containerCode != null and containerCode != ''">
and a.container_code like concat('%', #{containerCode}, '%')
</if>
<if test="containerType != null and containerType != ''">
and a.container_type like concat('%', #{containerType}, '%')
</if>
@@ -256,6 +270,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="organizationName" column="organization_name" />
<result property="topOrganizationId" column="top_organization_id" />
<result property="shipperId" column="shipper_id" />
<result property="shipperCode" column="shipper_code" />
<result property="shipperName" column="shipper_name" />
<result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" />
@@ -270,8 +285,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="storageLocationCode" column="storage_location_code" />
<result property="storageLocationName" column="storage_location_name" />
<result property="materialBaseInfoId" column="material_base_info_id" />
<result property="batchNumber" column="batch_number" />
<result property="materialStatusCode" column="material_status_code" />
<result property="materialStatusName" column="material_status_name" />
<result property="containerId" column="container_id" />
<result property="containerCode" column="container_code" />
<result property="containerType" column="container_type" />
<result property="containerTypeName" column="container_type_name" />
<result property="inventoryQuantity" column="inventory_quantity" />
<result property="allocationQuantity" column="allocation_quantity" />
<result property="freezeQuantity" column="freeze_quantity" />
<result property="isAble" column="is_able" />
<result property="unit" column="unit" />
<result property="unitName" column="unit_name" />
<result property="netWeight" column="NET_WEIGHT" />
<result property="grossWeight" column="GROSS_WEIGHT" />
<result property="volume" column="VOLUME" />
<result property="area" column="area" />
<result property="batchRefNo" column="BATCH_REF_NO" />
<result property="sheetRefNo" column="SHEET_REF_NO" />
<result property="boxPalletNo" column="BOX_PALLET_NO" />
<result property="extAttr1" column="ext_attr_1" />
<result property="extAttr2" column="ext_attr_2" />
<result property="productionDate" column="production_date" />
<result property="expiryDate" column="expiry_date" />
<result property="inventoryDate" column="inventory_date" />
<result property="extAttr3" column="ext_attr_3" />
<result property="extAttr4" column="ext_attr_4" />
<result property="remark" column="remark" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />