上架修改库存;
This commit is contained in:
+148
-1
@@ -3,6 +3,7 @@ package com.mhd.wms.application.service.stockShelfOrder;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.mhd.common.core.constant.SnowFlakeConstants;
|
||||
import com.mhd.common.core.domain.po.UserConfigSwitchPo;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
@@ -18,6 +19,15 @@ import com.mhd.system.api.domain.StorageLocationFeignPO;
|
||||
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.domain.materialBaseInfo.entity.MaterialBaseInfo;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.mapper.MaterialBaseInfoMapper;
|
||||
import com.mhd.wms.domain.materialGoodsRule.repository.facade.IMaterialGoodsRuleService;
|
||||
import com.mhd.wms.domain.materialGoodsRule.repository.po.BatchDetailPO;
|
||||
import com.mhd.wms.domain.materialGoodsRule.repository.po.BatchPO;
|
||||
import com.mhd.wms.domain.materialGoodsRule.repository.po.MaterialGoodsRulePO;
|
||||
import com.mhd.wms.domain.materialInventory.entity.MaterialInventory;
|
||||
import com.mhd.wms.domain.materialInventory.repository.mapper.MaterialInventoryMapper;
|
||||
import com.mhd.wms.domain.materialInventory.repository.po.MaterialInventoryPO;
|
||||
import com.mhd.wms.domain.shelfMaterialDetail.repository.po.ShelfMaterialDetailPO;
|
||||
import com.mhd.wms.domain.shelfMaterialDetail.repository.todo.ShelfMaterialDetailDO;
|
||||
import com.mhd.wms.domain.shelfMaterialDetail.service.ShelfMaterialDetailDomainService;
|
||||
@@ -55,6 +65,13 @@ public class StockShelfOrderApplicationService {
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
@Autowired
|
||||
private IdGenerator idGenerator;
|
||||
@Autowired
|
||||
private MaterialBaseInfoMapper materialBaseInfoMapper;
|
||||
@Autowired
|
||||
private MaterialInventoryMapper materialInventoryMapper;
|
||||
@Autowired
|
||||
private IMaterialGoodsRuleService materialGoodsRuleService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -148,6 +165,7 @@ public class StockShelfOrderApplicationService {
|
||||
* @param stockReceiptOrderDO
|
||||
* @return Boolean
|
||||
*/
|
||||
|
||||
public Boolean upShelf(StockShelfOrderDO stockReceiptOrderDO){
|
||||
//上架装配参数
|
||||
StockShelfOrderDO assembleStockShelfOrderDO = assembleParamByShelf(stockReceiptOrderDO);
|
||||
@@ -183,6 +201,135 @@ public class StockShelfOrderApplicationService {
|
||||
return stockShelfOrderDomainService.upShelf(assembleStockShelfOrderDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 上架装配参数
|
||||
* @author
|
||||
* @date 2024/5/22 9:27
|
||||
* @param shelfMaterialDetailDOList
|
||||
* @return Boolean
|
||||
*/
|
||||
private synchronized void stockIn(List<ShelfMaterialDetailDO> shelfMaterialDetailDOList, StockShelfOrderDO stockReceiptOrderDO) {
|
||||
for (ShelfMaterialDetailDO shelfMaterialDetailDO : shelfMaterialDetailDOList) {
|
||||
Long materialBaseInfoId = shelfMaterialDetailDO.getMaterialBaseInfoId();
|
||||
MaterialGoodsRulePO materialGoodsRulePO = materialGoodsRuleService.getInfoByMaterialBaseInfoIds(materialBaseInfoId);
|
||||
Long batchId = materialGoodsRulePO.getBatchId();
|
||||
List<String> fieldNames = new ArrayList<>();
|
||||
AjaxResult batchInfo = systemServiceFeign.getBatchInfoByBatchId(batchId);
|
||||
if("200".equals(String.valueOf(batchInfo.get("code")))){
|
||||
BatchPO batch = com.alibaba.fastjson2.JSONObject.parseObject(JSONObject.toJSONString(batchInfo.get("data")), BatchPO.class);
|
||||
List<BatchDetailPO> batchDetailList = batch.getBatchDetailList();
|
||||
fieldNames = batchDetailList.stream()
|
||||
.filter(detail -> "1".equals(String.valueOf(detail.getIsDisplay())))
|
||||
.map(BatchDetailPO::getFieldName)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
if (fieldNames.size() == 0) {
|
||||
throw new ServiceException("批次信息不存在");
|
||||
}
|
||||
Long shipperId = stockReceiptOrderDO.getShipperId();
|
||||
MaterialInventory param = getParam(shelfMaterialDetailDO, fieldNames, shipperId);
|
||||
List<MaterialInventoryPO> materialInventoryPOS = materialInventoryMapper.selectListByWhere(param);
|
||||
if (materialInventoryPOS.size() == 0) {
|
||||
MaterialInventory materialInventory = new MaterialInventory();
|
||||
//仓库信息
|
||||
materialInventory.setWarehouseId(stockReceiptOrderDO.getWarehouseId());
|
||||
materialInventory.setWarehouseCode(stockReceiptOrderDO.getWarehouseCode());
|
||||
materialInventory.setWarehouseName(stockReceiptOrderDO.getWarehouseName());
|
||||
|
||||
//组织信息
|
||||
materialInventory.setOrganizationId(stockReceiptOrderDO.getOrganizationId());
|
||||
materialInventory.setTopOrganizationId(stockReceiptOrderDO.getTopOrganizationId());
|
||||
materialInventory.setOrganizationName(stockReceiptOrderDO.getOrganizationName());
|
||||
|
||||
//货主信息
|
||||
materialInventory.setShipperId(stockReceiptOrderDO.getShipperId());
|
||||
materialInventory.setShipperName(stockReceiptOrderDO.getShipperName());
|
||||
materialInventory.setShipperCode(stockReceiptOrderDO.getShipperCode());
|
||||
|
||||
//物料信息/库位库区
|
||||
materialInventory.setMaterialBaseInfoId(shelfMaterialDetailDO.getMaterialBaseInfoId());
|
||||
materialInventory.setStorageSectionId(shelfMaterialDetailDO.getStorageSectionId());
|
||||
materialInventory.setStorageCode(shelfMaterialDetailDO.getStorageCode());
|
||||
materialInventory.setStorageName(shelfMaterialDetailDO.getStorageName());
|
||||
materialInventory.setStorageLocationId(shelfMaterialDetailDO.getStorageLocationId());
|
||||
materialInventory.setStorageLocationCode(shelfMaterialDetailDO.getStorageLocationCode());
|
||||
materialInventory.setStorageLocationName(shelfMaterialDetailDO.getStorageLocationName());
|
||||
|
||||
//批次属性信息
|
||||
materialInventory.setExtAttr1(shelfMaterialDetailDO.getExtAttr1());
|
||||
materialInventory.setExtAttr2(shelfMaterialDetailDO.getExtAttr2());
|
||||
materialInventory.setExtAttr3(shelfMaterialDetailDO.getExtAttr3());
|
||||
materialInventory.setExtAttr4(shelfMaterialDetailDO.getExtAttr4());
|
||||
materialInventory.setInventoryDate(shelfMaterialDetailDO.getInventoryDate());
|
||||
materialInventory.setExpiryDate(shelfMaterialDetailDO.getExpiryDate());
|
||||
materialInventory.setProductionDate(shelfMaterialDetailDO.getProductionDate());
|
||||
materialInventory.setBoxPalletNo(shelfMaterialDetailDO.getBoxPalletNo());
|
||||
materialInventory.setSheetRefNo(shelfMaterialDetailDO.getSheetRefNo());
|
||||
materialInventory.setBatchRefNo(shelfMaterialDetailDO.getBatchRefNo());
|
||||
materialInventory.setBatchNumber(shelfMaterialDetailDO.getBatchNumber());
|
||||
|
||||
//库存数量信息
|
||||
materialInventory.setInventoryQuantity(shelfMaterialDetailDO.getShelvesQuantity());
|
||||
materialInventory.setAllocationQuantity(shelfMaterialDetailDO.getShelvesQuantity());
|
||||
materialInventory.setFreezeQuantity(BigDecimal.ZERO);
|
||||
|
||||
materialInventoryMapper.insert(materialInventory);
|
||||
} else if (materialInventoryPOS.size() == 1) {
|
||||
MaterialInventory materialInventory = new MaterialInventory();
|
||||
MaterialInventoryPO materialInventoryPO = materialInventoryPOS.get(0);
|
||||
materialInventoryPO.setInventoryQuantity(materialInventoryPO.getInventoryQuantity().add(shelfMaterialDetailDO.getShelvesQuantity()));
|
||||
materialInventoryPO.setAllocationQuantity(materialInventoryPO.getAllocationQuantity().add(shelfMaterialDetailDO.getShelvesQuantity()));
|
||||
BeanUtils.copyBeanProp(materialInventoryPO, materialInventory);
|
||||
materialInventoryMapper.updateById(materialInventory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private MaterialInventory getParam(ShelfMaterialDetailDO shelfMaterialDetailDO, List<String> fieldNames,Long shipperId){
|
||||
MaterialInventory param = new MaterialInventory();
|
||||
param.setShipperId(shipperId);
|
||||
param.setWarehouseId(shelfMaterialDetailDO.getWarehouseId());
|
||||
param.setMaterialBaseInfoId(shelfMaterialDetailDO.getMaterialBaseInfoId());
|
||||
param.setStorageSectionId(shelfMaterialDetailDO.getStorageSectionId());
|
||||
param.setStorageLocationId(shelfMaterialDetailDO.getStorageLocationId());
|
||||
param.setOrganizationId(shelfMaterialDetailDO.getOrganizationId());
|
||||
for (String fieldName : fieldNames) {
|
||||
switch (fieldName) {
|
||||
case "ext_attr_4":
|
||||
param.setExtAttr4(shelfMaterialDetailDO.getExtAttr4());
|
||||
break;
|
||||
case "ext_attr_3":
|
||||
param.setExtAttr3(shelfMaterialDetailDO.getExtAttr3());
|
||||
break;
|
||||
case "ext_attr_2":
|
||||
param.setExtAttr2(shelfMaterialDetailDO.getExtAttr2());
|
||||
break;
|
||||
case "ext_attr_1":
|
||||
param.setExtAttr1(shelfMaterialDetailDO.getExtAttr1());
|
||||
break;
|
||||
case "box_pallet_no":
|
||||
param.setBoxPalletNo(shelfMaterialDetailDO.getBoxPalletNo());
|
||||
break;
|
||||
case "sheet_ref_no":
|
||||
param.setSheetRefNo(shelfMaterialDetailDO.getSheetRefNo());
|
||||
break;
|
||||
case "batch_ref_no":
|
||||
param.setBatchRefNo(shelfMaterialDetailDO.getBatchRefNo());
|
||||
break;
|
||||
case "inventory_date":
|
||||
param.setInventoryDate(shelfMaterialDetailDO.getInventoryDate());
|
||||
break;
|
||||
case "expiry_date":
|
||||
param.setExpiryDate(shelfMaterialDetailDO.getExpiryDate());
|
||||
break;
|
||||
case "production_date":
|
||||
param.setProductionDate(shelfMaterialDetailDO.getProductionDate());
|
||||
break;
|
||||
}
|
||||
}
|
||||
return param;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 完成上架
|
||||
@@ -409,4 +556,4 @@ public class StockShelfOrderApplicationService {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.mhd.wms.domain.materialGoodsRule.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 批次管理详情对象 batch_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "批次管理详情对象", description = "批次管理详情响应对象")
|
||||
public class BatchDetailPO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("批次管理详情id")
|
||||
private Long batchDetailId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("批次id")
|
||||
@Excel(name = "批次id")
|
||||
private Long batchId;
|
||||
|
||||
@ApiModelProperty("批次标签")
|
||||
@Excel(name = "批次标签")
|
||||
private String batchLabels;
|
||||
|
||||
@ApiModelProperty("字段名称")
|
||||
@Excel(name = "字段名称")
|
||||
private String fieldName;
|
||||
|
||||
@ApiModelProperty("输入控制: 1-必填 2-可选")
|
||||
@Excel(name = "输入控制: 1-必填 2-可选")
|
||||
private String inputControl;
|
||||
|
||||
@ApiModelProperty("属性格式:1-下拉框 2-日期 3-日期时间 4-数字 5-文本")
|
||||
@Excel(name = "属性格式:1-下拉框 2-日期 3-日期时间 4-数字 5-文本")
|
||||
private String attributeFormat;
|
||||
|
||||
@ApiModelProperty("属性选项")
|
||||
@Excel(name = "属性选项")
|
||||
private String attributeOption;
|
||||
|
||||
@ApiModelProperty("是否显示: 0-不显示 1-显示")
|
||||
@Excel(name = "是否显示: 0-不显示 1-显示")
|
||||
private Integer isDisplay;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.mhd.wms.domain.materialGoodsRule.repository.po;
|
||||
|
||||
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.List;
|
||||
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 批次管理对象 batch
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "批次管理对象", description = "批次管理响应对象")
|
||||
public class BatchPO extends BaseVOEntity{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("批次id")
|
||||
private Long batchId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("批次编码")
|
||||
@Excel(name = "批次编码")
|
||||
private String batchCode;
|
||||
|
||||
@ApiModelProperty("批次名称")
|
||||
@Excel(name = "批次名称")
|
||||
private String batchName;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("启用状态: 1-启用 2-停用")
|
||||
@Excel(name = "启用状态: 1-启用 2-停用")
|
||||
private Integer openingUp;
|
||||
|
||||
@ApiModelProperty("是否作废: 1-否 2-是")
|
||||
@Excel(name = "是否作废: 1-否 2-是")
|
||||
private Integer nullify;
|
||||
|
||||
@ApiModelProperty("批次明细集合")
|
||||
private List<BatchDetailPO> batchDetailList;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+54
@@ -2,12 +2,15 @@ package com.mhd.wms.domain.materialInventory.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@@ -160,4 +163,55 @@ public class MaterialInventory extends BaseVOEntity {
|
||||
@ApiModelProperty("面积")
|
||||
@Excel(name = "面积")
|
||||
private BigDecimal area;
|
||||
|
||||
|
||||
@ApiModelProperty("Batch Ref NO's")
|
||||
@Excel(name = "Batch Ref NO's")
|
||||
private String batchRefNo;
|
||||
|
||||
@ApiModelProperty("Sheet Ref NO's")
|
||||
@Excel(name = "Sheet Ref NO's")
|
||||
private String sheetRefNo;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("扩展字段1")
|
||||
@Excel(name = "扩展字段1")
|
||||
private String extAttr1;
|
||||
|
||||
@ApiModelProperty("扩展字段2")
|
||||
@Excel(name = "扩展字段2")
|
||||
private String extAttr2;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("ExtAttr3")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("ExtAttr4")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr4;
|
||||
}
|
||||
+3
-1
@@ -86,4 +86,6 @@ public interface MaterialInventoryMapper extends BaseMapper<MaterialInventory>
|
||||
|
||||
|
||||
MaterialInventoryPO selectOneByWhere(MaterialInventoryDO materialInventoryDO);
|
||||
}
|
||||
|
||||
List<MaterialInventoryPO> selectListByWhere(MaterialInventory materialInventory);
|
||||
}
|
||||
+54
@@ -1,12 +1,15 @@
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@@ -148,4 +151,55 @@ public class MaterialInventoryPO extends MaterialBasePO {
|
||||
@ApiModelProperty("面积")
|
||||
@Excel(name = "面积")
|
||||
private BigDecimal area;
|
||||
|
||||
|
||||
@ApiModelProperty("Batch Ref NO's")
|
||||
@Excel(name = "Batch Ref NO's")
|
||||
private String batchRefNo;
|
||||
|
||||
@ApiModelProperty("Sheet Ref NO's")
|
||||
@Excel(name = "Sheet Ref NO's")
|
||||
private String sheetRefNo;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("扩展字段1")
|
||||
@Excel(name = "扩展字段1")
|
||||
private String extAttr1;
|
||||
|
||||
@ApiModelProperty("扩展字段2")
|
||||
@Excel(name = "扩展字段2")
|
||||
private String extAttr2;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("ExtAttr3")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("ExtAttr4")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr4;
|
||||
}
|
||||
+54
@@ -1,12 +1,15 @@
|
||||
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 io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@@ -168,4 +171,55 @@ public class MaterialInventoryQueryListPO extends MaterialBasePO {
|
||||
@ApiModelProperty("面积")
|
||||
@Excel(name = "面积")
|
||||
private BigDecimal area;
|
||||
|
||||
|
||||
@ApiModelProperty("Batch Ref NO's")
|
||||
@Excel(name = "Batch Ref NO's")
|
||||
private String batchRefNo;
|
||||
|
||||
@ApiModelProperty("Sheet Ref NO's")
|
||||
@Excel(name = "Sheet Ref NO's")
|
||||
private String sheetRefNo;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("扩展字段1")
|
||||
@Excel(name = "扩展字段1")
|
||||
private String extAttr1;
|
||||
|
||||
@ApiModelProperty("扩展字段2")
|
||||
@Excel(name = "扩展字段2")
|
||||
private String extAttr2;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("ExtAttr3")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("ExtAttr4")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr4;
|
||||
}
|
||||
+54
@@ -1,11 +1,14 @@
|
||||
package com.mhd.wms.domain.materialInventory.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.todo.MaterialBaseDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -168,4 +171,55 @@ public class MaterialInventoryDO extends MaterialBaseDO {
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
private Long shipperId;
|
||||
|
||||
|
||||
@ApiModelProperty("Batch Ref NO's")
|
||||
@Excel(name = "Batch Ref NO's")
|
||||
private String batchRefNo;
|
||||
|
||||
@ApiModelProperty("Sheet Ref NO's")
|
||||
@Excel(name = "Sheet Ref NO's")
|
||||
private String sheetRefNo;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("扩展字段1")
|
||||
@Excel(name = "扩展字段1")
|
||||
private String extAttr1;
|
||||
|
||||
@ApiModelProperty("扩展字段2")
|
||||
@Excel(name = "扩展字段2")
|
||||
private String extAttr2;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("ExtAttr3")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("ExtAttr4")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr4;
|
||||
}
|
||||
+54
@@ -1,11 +1,14 @@
|
||||
package com.mhd.wms.domain.materialInventory.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.todo.MaterialBaseDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -189,4 +192,55 @@ public class MaterialInventoryQueryListDO extends MaterialBaseDO {
|
||||
@ApiModelProperty("面积")
|
||||
@Excel(name = "面积")
|
||||
private BigDecimal area;
|
||||
|
||||
@ApiModelProperty("Batch Ref NO's")
|
||||
@Excel(name = "Batch Ref NO's")
|
||||
private String batchRefNo;
|
||||
|
||||
@ApiModelProperty("Sheet Ref NO's")
|
||||
@Excel(name = "Sheet Ref NO's")
|
||||
private String sheetRefNo;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("扩展字段1")
|
||||
@Excel(name = "扩展字段1")
|
||||
private String extAttr1;
|
||||
|
||||
@ApiModelProperty("扩展字段2")
|
||||
@Excel(name = "扩展字段2")
|
||||
private String extAttr2;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("ExtAttr3")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("ExtAttr4")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr4;
|
||||
|
||||
}
|
||||
+52
-1
@@ -2,14 +2,17 @@ package com.mhd.wms.domain.shelfMaterialDetail.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
@@ -249,5 +252,53 @@ public class ShelfMaterialDetail extends BaseVOEntity {
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("Batch Ref NO's")
|
||||
@Excel(name = "Batch Ref NO's")
|
||||
private String batchRefNo;
|
||||
|
||||
}
|
||||
@ApiModelProperty("Sheet Ref NO's")
|
||||
@Excel(name = "Sheet Ref NO's")
|
||||
private String sheetRefNo;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("扩展字段1")
|
||||
@Excel(name = "扩展字段1")
|
||||
private String extAttr1;
|
||||
|
||||
@ApiModelProperty("扩展字段2")
|
||||
@Excel(name = "扩展字段2")
|
||||
private String extAttr2;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("ExtAttr3")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("ExtAttr4")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr4;
|
||||
}
|
||||
+52
-1
@@ -1,5 +1,6 @@
|
||||
package com.mhd.wms.domain.shelfMaterialDetail.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
@@ -8,8 +9,10 @@ import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.po.InMaterialD
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -256,5 +259,53 @@ public class ShelfMaterialDetailPO extends BaseVOEntity {
|
||||
@ApiModelProperty("序列号")
|
||||
private List<InMaterialDetailSerialNumberPO> materialDetailSerialNumberList;
|
||||
|
||||
@ApiModelProperty("Batch Ref NO's")
|
||||
@Excel(name = "Batch Ref NO's")
|
||||
private String batchRefNo;
|
||||
|
||||
}
|
||||
@ApiModelProperty("Sheet Ref NO's")
|
||||
@Excel(name = "Sheet Ref NO's")
|
||||
private String sheetRefNo;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("扩展字段1")
|
||||
@Excel(name = "扩展字段1")
|
||||
private String extAttr1;
|
||||
|
||||
@ApiModelProperty("扩展字段2")
|
||||
@Excel(name = "扩展字段2")
|
||||
private String extAttr2;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("ExtAttr3")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("ExtAttr4")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr4;
|
||||
}
|
||||
+54
-1
@@ -1,5 +1,6 @@
|
||||
package com.mhd.wms.domain.shelfMaterialDetail.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
@@ -7,8 +8,10 @@ import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.todo.InMaterialDetailSerialNumberDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -263,4 +266,54 @@ public class ShelfMaterialDetailDO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty("序列号")
|
||||
private List<InMaterialDetailSerialNumberDO> materialDetailSerialNumberList;
|
||||
}
|
||||
|
||||
@ApiModelProperty("Batch Ref NO's")
|
||||
@Excel(name = "Batch Ref NO's")
|
||||
private String batchRefNo;
|
||||
|
||||
@ApiModelProperty("Sheet Ref NO's")
|
||||
@Excel(name = "Sheet Ref NO's")
|
||||
private String sheetRefNo;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("扩展字段1")
|
||||
@Excel(name = "扩展字段1")
|
||||
private String extAttr1;
|
||||
|
||||
@ApiModelProperty("扩展字段2")
|
||||
@Excel(name = "扩展字段2")
|
||||
private String extAttr2;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("ExtAttr3")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("ExtAttr4")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr4;
|
||||
}
|
||||
+138
-3
@@ -30,8 +30,14 @@ import com.mhd.wms.domain.inOrderAbnormal.repository.todo.InOrderAbnormalBaseDO;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.facade.IInventoryStandingDetailService;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.todo.InventoryStandingDetailDO;
|
||||
import com.mhd.wms.domain.materialBaseInfo.repository.facade.IMaterialBaseInfoService;
|
||||
import com.mhd.wms.domain.materialGoodsRule.repository.facade.IMaterialGoodsRuleService;
|
||||
import com.mhd.wms.domain.materialGoodsRule.repository.po.BatchDetailPO;
|
||||
import com.mhd.wms.domain.materialGoodsRule.repository.po.BatchPO;
|
||||
import com.mhd.wms.domain.materialGoodsRule.repository.po.MaterialGoodsRulePO;
|
||||
import com.mhd.wms.domain.materialInventory.entity.MaterialInventory;
|
||||
import com.mhd.wms.domain.materialInventory.repository.facade.IMaterialInventoryService;
|
||||
import com.mhd.wms.domain.materialInventory.repository.mapper.MaterialInventoryMapper;
|
||||
import com.mhd.wms.domain.materialInventory.repository.po.MaterialInventoryPO;
|
||||
import com.mhd.wms.domain.materialInventory.repository.todo.MaterialInventoryDO;
|
||||
import com.mhd.wms.domain.materialMoreDetail.repository.todo.MaterialMoreDetailDO;
|
||||
import com.mhd.wms.domain.serialNumber.entity.SerialNumber;
|
||||
@@ -98,6 +104,10 @@ public class StockShelfOrderDomainService {
|
||||
private ISerialNumberService iSerialNumberService;
|
||||
@Resource
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
@Autowired
|
||||
private MaterialInventoryMapper materialInventoryMapper;
|
||||
@Autowired
|
||||
private IMaterialGoodsRuleService materialGoodsRuleService;
|
||||
|
||||
/**
|
||||
* 分页查询上架单列表
|
||||
@@ -375,8 +385,11 @@ public class StockShelfOrderDomainService {
|
||||
updateStockInOrder(stockShelfOrderPO, 5);
|
||||
//上架修改物料库存
|
||||
List<ShelfMaterialDetail> shelfMaterialDetailList = shelfMaterialDetailService.list(new QueryWrapper<ShelfMaterialDetail>().lambda().eq(ShelfMaterialDetail::getShelfOrderNumber, stockShelfOrderPO.getShelfOrderNumber()));
|
||||
//组装上架修改库存参数(传入上架单信息,用于获取货主信息)
|
||||
shelfAddMaterialInventory(shelfMaterialDetailList, stockShelfOrderPO);
|
||||
//修改库存
|
||||
StockShelfOrderDO stockShelfOrderDO = new StockShelfOrderDO();
|
||||
BeanUtils.copyProperties(stockShelfOrderPO, stockShelfOrderDO);
|
||||
stockIn(shelfMaterialDetailList, stockShelfOrderDO);
|
||||
//shelfAddMaterialInventory(shelfMaterialDetailList, stockShelfOrderPO);
|
||||
//修改上架对应的序列号的库存信息
|
||||
updateSerialNumberforInventory(shelfMaterialDetailList);
|
||||
//生成上架追溯记录
|
||||
@@ -390,6 +403,128 @@ public class StockShelfOrderDomainService {
|
||||
return true;
|
||||
}
|
||||
|
||||
private synchronized void stockIn(List<ShelfMaterialDetail> shelfMaterialDetailDOList, StockShelfOrderDO stockReceiptOrderDO) {
|
||||
for (ShelfMaterialDetail shelfMaterialDetail : shelfMaterialDetailDOList) {
|
||||
Long materialBaseInfoId = shelfMaterialDetail.getMaterialBaseInfoId();
|
||||
MaterialGoodsRulePO materialGoodsRulePO = materialGoodsRuleService.getInfoByMaterialBaseInfoIds(materialBaseInfoId);
|
||||
Long batchId = materialGoodsRulePO.getBatchId();
|
||||
List<String> fieldNames = new ArrayList<>();
|
||||
AjaxResult batchInfo = systemServiceFeign.getBatchInfoByBatchId(batchId);
|
||||
if("200".equals(String.valueOf(batchInfo.get("code")))){
|
||||
BatchPO batch = com.alibaba.fastjson2.JSONObject.parseObject(JSONObject.toJSONString(batchInfo.get("data")), BatchPO.class);
|
||||
List<BatchDetailPO> batchDetailList = batch.getBatchDetailList();
|
||||
fieldNames = batchDetailList.stream()
|
||||
.filter(detail -> "1".equals(String.valueOf(detail.getIsDisplay())))
|
||||
.map(BatchDetailPO::getFieldName)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
if (fieldNames.size() == 0) {
|
||||
throw new ServiceException("批次信息不存在");
|
||||
}
|
||||
Long shipperId = stockReceiptOrderDO.getShipperId();
|
||||
MaterialInventory param = getParam(shelfMaterialDetail, fieldNames, shipperId);
|
||||
List<MaterialInventoryPO> materialInventoryPOS = materialInventoryMapper.selectListByWhere(param);
|
||||
if (materialInventoryPOS.size() == 0) {
|
||||
MaterialInventory materialInventory = new MaterialInventory();
|
||||
//仓库信息
|
||||
materialInventory.setWarehouseId(stockReceiptOrderDO.getWarehouseId());
|
||||
materialInventory.setWarehouseCode(stockReceiptOrderDO.getWarehouseCode());
|
||||
materialInventory.setWarehouseName(stockReceiptOrderDO.getWarehouseName());
|
||||
|
||||
//组织信息
|
||||
materialInventory.setOrganizationId(stockReceiptOrderDO.getOrganizationId());
|
||||
materialInventory.setTopOrganizationId(stockReceiptOrderDO.getTopOrganizationId());
|
||||
materialInventory.setOrganizationName(stockReceiptOrderDO.getOrganizationName());
|
||||
|
||||
//货主信息
|
||||
materialInventory.setShipperId(stockReceiptOrderDO.getShipperId());
|
||||
materialInventory.setShipperName(stockReceiptOrderDO.getShipperName());
|
||||
materialInventory.setShipperCode(stockReceiptOrderDO.getShipperCode());
|
||||
|
||||
//物料信息/库位库区
|
||||
materialInventory.setMaterialBaseInfoId(shelfMaterialDetail.getMaterialBaseInfoId());
|
||||
materialInventory.setStorageSectionId(shelfMaterialDetail.getStorageSectionId());
|
||||
materialInventory.setStorageCode(shelfMaterialDetail.getStorageCode());
|
||||
materialInventory.setStorageName(shelfMaterialDetail.getStorageName());
|
||||
materialInventory.setStorageLocationId(shelfMaterialDetail.getStorageLocationId());
|
||||
materialInventory.setStorageLocationCode(shelfMaterialDetail.getStorageLocationCode());
|
||||
materialInventory.setStorageLocationName(shelfMaterialDetail.getStorageLocationName());
|
||||
|
||||
//批次属性信息
|
||||
materialInventory.setExtAttr1(shelfMaterialDetail.getExtAttr1());
|
||||
materialInventory.setExtAttr2(shelfMaterialDetail.getExtAttr2());
|
||||
materialInventory.setExtAttr3(shelfMaterialDetail.getExtAttr3());
|
||||
materialInventory.setExtAttr4(shelfMaterialDetail.getExtAttr4());
|
||||
materialInventory.setInventoryDate(shelfMaterialDetail.getInventoryDate());
|
||||
materialInventory.setExpiryDate(shelfMaterialDetail.getExpiryDate());
|
||||
materialInventory.setProductionDate(shelfMaterialDetail.getProductionDate());
|
||||
materialInventory.setBoxPalletNo(shelfMaterialDetail.getBoxPalletNo());
|
||||
materialInventory.setSheetRefNo(shelfMaterialDetail.getSheetRefNo());
|
||||
materialInventory.setBatchRefNo(shelfMaterialDetail.getBatchRefNo());
|
||||
materialInventory.setBatchNumber(shelfMaterialDetail.getBatchNumber());
|
||||
|
||||
//库存数量信息
|
||||
materialInventory.setInventoryQuantity(shelfMaterialDetail.getShelvesQuantity());
|
||||
materialInventory.setAllocationQuantity(shelfMaterialDetail.getShelvesQuantity());
|
||||
materialInventory.setFreezeQuantity(BigDecimal.ZERO);
|
||||
|
||||
materialInventoryMapper.insert(materialInventory);
|
||||
} else if (materialInventoryPOS.size() == 1) {
|
||||
MaterialInventory materialInventory = new MaterialInventory();
|
||||
MaterialInventoryPO materialInventoryPO = materialInventoryPOS.get(0);
|
||||
materialInventoryPO.setInventoryQuantity(materialInventoryPO.getInventoryQuantity().add(shelfMaterialDetail.getShelvesQuantity()));
|
||||
materialInventoryPO.setAllocationQuantity(materialInventoryPO.getAllocationQuantity().add(shelfMaterialDetail.getShelvesQuantity()));
|
||||
BeanUtils.copyBeanProp(materialInventoryPO, materialInventory);
|
||||
materialInventoryMapper.updateById(materialInventory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private MaterialInventory getParam(ShelfMaterialDetail shelfMaterialDetail, List<String> fieldNames,Long shipperId){
|
||||
MaterialInventory param = new MaterialInventory();
|
||||
param.setShipperId(shipperId);
|
||||
param.setWarehouseId(shelfMaterialDetail.getWarehouseId());
|
||||
param.setMaterialBaseInfoId(shelfMaterialDetail.getMaterialBaseInfoId());
|
||||
param.setStorageSectionId(shelfMaterialDetail.getStorageSectionId());
|
||||
param.setStorageLocationId(shelfMaterialDetail.getStorageLocationId());
|
||||
param.setOrganizationId(shelfMaterialDetail.getOrganizationId());
|
||||
for (String fieldName : fieldNames) {
|
||||
switch (fieldName) {
|
||||
case "ext_attr_4":
|
||||
param.setExtAttr4(shelfMaterialDetail.getExtAttr4());
|
||||
break;
|
||||
case "ext_attr_3":
|
||||
param.setExtAttr3(shelfMaterialDetail.getExtAttr3());
|
||||
break;
|
||||
case "ext_attr_2":
|
||||
param.setExtAttr2(shelfMaterialDetail.getExtAttr2());
|
||||
break;
|
||||
case "ext_attr_1":
|
||||
param.setExtAttr1(shelfMaterialDetail.getExtAttr1());
|
||||
break;
|
||||
case "box_pallet_no":
|
||||
param.setBoxPalletNo(shelfMaterialDetail.getBoxPalletNo());
|
||||
break;
|
||||
case "sheet_ref_no":
|
||||
param.setSheetRefNo(shelfMaterialDetail.getSheetRefNo());
|
||||
break;
|
||||
case "batch_ref_no":
|
||||
param.setBatchRefNo(shelfMaterialDetail.getBatchRefNo());
|
||||
break;
|
||||
case "inventory_date":
|
||||
param.setInventoryDate(shelfMaterialDetail.getInventoryDate());
|
||||
break;
|
||||
case "expiry_date":
|
||||
param.setExpiryDate(shelfMaterialDetail.getExpiryDate());
|
||||
break;
|
||||
case "production_date":
|
||||
param.setProductionDate(shelfMaterialDetail.getProductionDate());
|
||||
break;
|
||||
}
|
||||
}
|
||||
return param;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 生成异常记录
|
||||
* @author ZhouGY
|
||||
@@ -755,4 +890,4 @@ public class StockShelfOrderDomainService {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+54
-1
@@ -1,5 +1,6 @@
|
||||
package com.mhd.wms.interfaces.dto.shelfMaterialDetail;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
@@ -8,8 +9,10 @@ import com.mhd.wms.domain.inMaterialDetailSerialNumber.repository.todo.InMateria
|
||||
import com.mhd.wms.domain.shelfMaterialDetail.repository.todo.ShelfMaterialDetailDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -260,4 +263,54 @@ public class ShelfMaterialDetailDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty("序列号")
|
||||
private List<InMaterialDetailSerialNumberDO> materialDetailSerialNumberList;
|
||||
}
|
||||
|
||||
@ApiModelProperty("Batch Ref NO's")
|
||||
@Excel(name = "Batch Ref NO's")
|
||||
private String batchRefNo;
|
||||
|
||||
@ApiModelProperty("Sheet Ref NO's")
|
||||
@Excel(name = "Sheet Ref NO's")
|
||||
private String sheetRefNo;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("扩展字段1")
|
||||
@Excel(name = "扩展字段1")
|
||||
private String extAttr1;
|
||||
|
||||
@ApiModelProperty("扩展字段2")
|
||||
@Excel(name = "扩展字段2")
|
||||
private String extAttr2;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("ExtAttr3")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("ExtAttr4")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr4;
|
||||
}
|
||||
@@ -629,4 +629,56 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectListByWhere" parameterType="com.mhd.wms.domain.materialInventory.entity.MaterialInventory"
|
||||
resultMap="MaterialInventoryResult">
|
||||
SELECT * FROM
|
||||
material_inventory a
|
||||
LEFT JOIN material_base_info b on a.material_base_info_id = b.material_base_info_id
|
||||
WHERE
|
||||
a.del_flag = 1 AND b.shipper_id = #{shipperId} AND a.top_organization_id = #{topOrganizationId}
|
||||
<if test="materialBaseInfoId != null and materialBaseInfoId != ''">
|
||||
AND a.material_base_info_id = #{materialBaseInfoId}
|
||||
</if>
|
||||
<if test="warehouseId != null and warehouseId != ''">
|
||||
AND a.warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="storageSectionId != null and storageSectionId != ''">
|
||||
AND a.storage_section_id = #{storageSectionId}
|
||||
</if>
|
||||
<if test="storageLocationId != null and storageLocationId != ''">
|
||||
AND a.storage_location_id = #{storageLocationId}
|
||||
</if>
|
||||
<if test="extAttr4 != null and extAttr4 != ''">
|
||||
AND a.storage_location_id = #{extAttr4}
|
||||
</if>
|
||||
<if test="extAttr3 != null and extAttr3 != ''">
|
||||
AND a.storage_location_id = #{extAttr3}
|
||||
</if>
|
||||
<if test="inventoryDate != null and inventoryDate != ''">
|
||||
AND a.storage_location_id = #{inventoryDate}
|
||||
</if>
|
||||
<if test="expiryDate != null and expiryDate != ''">
|
||||
AND a.storage_location_id = #{expiryDate}
|
||||
</if>
|
||||
<if test="productionDate != null and productionDate != ''">
|
||||
AND a.storage_location_id = #{productionDate}
|
||||
</if>
|
||||
<if test="extAttr2 != null and extAttr2 != ''">
|
||||
AND a.storage_location_id = #{extAttr2}
|
||||
</if>
|
||||
<if test="extAttr1 != null and extAttr1 != ''">
|
||||
AND a.storage_location_id = #{extAttr1}
|
||||
</if>
|
||||
<if test="boxPalletNo != null and boxPalletNo != ''">
|
||||
AND a.storage_location_id = #{boxPalletNo}
|
||||
</if>
|
||||
<if test="sheetRefNo != null and sheetRefNo != ''">
|
||||
AND a.storage_location_id = #{sheetRefNo}
|
||||
</if>
|
||||
<if test="batchRefNo != null and batchRefNo != ''">
|
||||
AND a.storage_location_id = #{batchRefNo}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user