入库oms;
This commit is contained in:
+367
@@ -0,0 +1,367 @@
|
||||
package com.mhd.oms.domain.reservationInMaterialDetail.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
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 java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 物料明细对象 material_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ReservationInMaterialDetail extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("订单物料明细id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long materialDetailId;
|
||||
|
||||
@ApiModelProperty("业务唯一id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long uniqueId;
|
||||
|
||||
@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 inOrderNumber;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("收货数量")
|
||||
@Excel(name = "收货数量")
|
||||
private BigDecimal receiptQuantity;
|
||||
|
||||
@ApiModelProperty("上架数量")
|
||||
@Excel(name = "上架数量")
|
||||
private BigDecimal shelvesQuantity;
|
||||
|
||||
@ApiModelProperty("作业数量(例如:收货数量 上架数量)")
|
||||
@Excel(name = "作业数量(例如:收货数量 上架数量)")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
@Excel(name = "收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
private Integer receiptStatus;
|
||||
|
||||
@ApiModelProperty("上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
@Excel(name = "上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
private Integer shelvesStatus;
|
||||
|
||||
@ApiModelProperty("包装规格id")
|
||||
@Excel(name = "包装规格id")
|
||||
private Long packId;
|
||||
|
||||
@ApiModelProperty("包装规格编码")
|
||||
@Excel(name = "包装规格编码")
|
||||
private String packCode;
|
||||
|
||||
@ApiModelProperty("包装规格名称")
|
||||
@Excel(name = "包装规格名称")
|
||||
private String packName;
|
||||
|
||||
@ApiModelProperty("包装详情id")
|
||||
@Excel(name = "包装详情id")
|
||||
private Long packDetailId;
|
||||
|
||||
@ApiModelProperty("单位代码:EA IP CS PL OT")
|
||||
@Excel(name = "单位代码:EA IP CS PL OT")
|
||||
private String unitCode;
|
||||
|
||||
@ApiModelProperty("单位名称")
|
||||
@Excel(name = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("单位数量")
|
||||
@Excel(name = "单位数量")
|
||||
private BigDecimal unitNumber;
|
||||
|
||||
@ApiModelProperty("物料仓库控制信息id")
|
||||
@Excel(name = "物料仓库控制信息id")
|
||||
private Long materialWarehouseControlId;
|
||||
|
||||
@ApiModelProperty("是否序列号管理: 1-是 2-否")
|
||||
@Excel(name = "是否序列号管理: 1-是 2-否")
|
||||
private Integer serialNumberManage;
|
||||
|
||||
@ApiModelProperty("是否质检管理: 1-是 2-否")
|
||||
@Excel(name = "是否质检管理: 1-是 2-否")
|
||||
private Integer qualityInspectionManage;
|
||||
|
||||
@ApiModelProperty("质检阶段: 1-收货前 2-收货后上架前")
|
||||
@Excel(name = "质检阶段: 1-收货前 2-收货后上架前")
|
||||
private Integer qualityInspectionStage;
|
||||
|
||||
@ApiModelProperty("质检规则: 1-全检 2-抽检 ")
|
||||
@Excel(name = "质检规则: 1-全检 2-抽检 ")
|
||||
private Integer qualityInspectionRule;
|
||||
|
||||
@ApiModelProperty("抽检比例")
|
||||
@Excel(name = "抽检比例")
|
||||
private BigDecimal qualityInspectionRatio;
|
||||
|
||||
@ApiModelProperty("质检项: 1-包装 2-纯度")
|
||||
@Excel(name = "质检项: 1-包装 2-纯度")
|
||||
private Integer qualityInspectionTerm;
|
||||
|
||||
@ApiModelProperty("质检结果: 1-正常 2-异常")
|
||||
@Excel(name = "质检结果: 1-正常 2-异常")
|
||||
private Integer qualityInspectionResults;
|
||||
|
||||
@ApiModelProperty("是否允许超收: 1-是 2-否")
|
||||
@Excel(name = "是否允许超收: 1-是 2-否")
|
||||
private Integer allowOvercharge;
|
||||
|
||||
@ApiModelProperty("超收比例")
|
||||
@Excel(name = "超收比例")
|
||||
private BigDecimal overchargeRatio;
|
||||
|
||||
@ApiModelProperty("批次号")
|
||||
@Excel(name = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("物料状态编码")
|
||||
@Excel(name = "物料状态编码")
|
||||
private String materialStatusCode;
|
||||
|
||||
@ApiModelProperty("物料状态名称")
|
||||
@Excel(name = "物料状态名称")
|
||||
private String materialStatusName;
|
||||
|
||||
@ApiModelProperty("分配规则id")
|
||||
@Excel(name = "分配规则id")
|
||||
private Long distributeRuleId;
|
||||
|
||||
@ApiModelProperty("分配规则编码")
|
||||
@Excel(name = "分配规则编码")
|
||||
private String distributeRuleCode;
|
||||
|
||||
@ApiModelProperty("分配规则名称")
|
||||
@Excel(name = "分配规则名称")
|
||||
private String distributeRuleName;
|
||||
|
||||
@ApiModelProperty("容器id")
|
||||
@Excel(name = "容器id")
|
||||
private Long containerId;
|
||||
|
||||
@ApiModelProperty("容器编码")
|
||||
@Excel(name = "容器编码")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("容器类型 数据字典")
|
||||
@Excel(name = "容器类型 数据字典")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("容器类型名称 数据字典")
|
||||
@Excel(name = "容器类型名称 数据字典")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("上架仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("上架仓库编码")
|
||||
@Excel(name = "上架仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("上架库区id")
|
||||
@Excel(name = "上架库区id")
|
||||
private Long storageSectionId;
|
||||
|
||||
@ApiModelProperty("上架库区编码")
|
||||
@Excel(name = "上架库区编码")
|
||||
private String storageCode;
|
||||
|
||||
@ApiModelProperty("上架库区名称")
|
||||
@Excel(name = "上架库区名称")
|
||||
private String storageName;
|
||||
|
||||
@ApiModelProperty("上架库位id")
|
||||
@Excel(name = "上架库位id")
|
||||
private Long storageLocationId;
|
||||
|
||||
@ApiModelProperty("上架库位编码")
|
||||
@Excel(name = "上架库位编码")
|
||||
private String storageLocationCode;
|
||||
|
||||
@ApiModelProperty("上架库位名称")
|
||||
@Excel(name = "上架库位名称")
|
||||
private String storageLocationName;
|
||||
|
||||
@ApiModelProperty("层级深度,从一级开始递增")
|
||||
private Integer level;
|
||||
|
||||
@ApiModelProperty("父级唯一Id")
|
||||
private Long parentUniqueId;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("越库单id")
|
||||
private Long overStockId;
|
||||
|
||||
@ApiModelProperty("越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
@Excel(name = "越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
private Integer overStockStatus;
|
||||
|
||||
@ApiModelProperty("越库类型:1-直接越库 2-分拨越库")
|
||||
@Excel(name = "越库类型:1-直接越库 2-分拨越库")
|
||||
private Long overStockType;
|
||||
|
||||
// ========== 报关相关明细字段 ==========
|
||||
@ApiModelProperty("规格型号")
|
||||
@Excel(name = "规格型号/ITEM")
|
||||
private String specificationModel;
|
||||
|
||||
@ApiModelProperty("SKU码")
|
||||
@Excel(name = "SKU码")
|
||||
private String skuCode;
|
||||
|
||||
@ApiModelProperty("Invoice No.")
|
||||
@Excel(name = "Invoice No.")
|
||||
private String invoiceNo;
|
||||
|
||||
@ApiModelProperty("升")
|
||||
@Excel(name = "升")
|
||||
private BigDecimal liter;
|
||||
|
||||
@ApiModelProperty("尺寸")
|
||||
@Excel(name = "尺寸")
|
||||
private String dimensions;
|
||||
|
||||
@ApiModelProperty("申报单位")
|
||||
@Excel(name = "申报单位")
|
||||
private String declarationUnit;
|
||||
|
||||
@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 originCountry;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("币制")
|
||||
@Excel(name = "币制")
|
||||
private String currency;
|
||||
|
||||
@ApiModelProperty("单位")
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty("申报数量")
|
||||
@Excel(name = "申报数量")
|
||||
private BigDecimal declaredQuantity;
|
||||
|
||||
@ApiModelProperty("箱数")
|
||||
@Excel(name = "箱数")
|
||||
private BigDecimal boxCount;
|
||||
|
||||
@ApiModelProperty("件数")
|
||||
@Excel(name = "件数")
|
||||
private BigDecimal pieceCount;
|
||||
|
||||
@ApiModelProperty("入库数量(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "入库数量")
|
||||
private BigDecimal inboundQuantity;
|
||||
|
||||
@ApiModelProperty("总净重(KG)")
|
||||
@Excel(name = "总净重(KG)")
|
||||
private BigDecimal totalNetWeight;
|
||||
|
||||
@ApiModelProperty("总毛重(KG)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private BigDecimal totalGrossWeight;
|
||||
|
||||
@ApiModelProperty("总体积(CBM)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private BigDecimal totalVolume;
|
||||
|
||||
@ApiModelProperty("总面积(SQM)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea;
|
||||
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
@ApiModelProperty("合同收费")
|
||||
@Excel(name = "合同收费")
|
||||
private BigDecimal contractFee;
|
||||
|
||||
@ApiModelProperty("每月仓租")
|
||||
@Excel(name = "每月仓租")
|
||||
private BigDecimal monthlyWarehouseFee;
|
||||
|
||||
@ApiModelProperty("半月仓租")
|
||||
@Excel(name = "半月仓租")
|
||||
private BigDecimal halfMonthWhFee;
|
||||
|
||||
@ApiModelProperty("折扣(%)")
|
||||
@Excel(name = "折扣(%)")
|
||||
private BigDecimal discountRate;
|
||||
|
||||
@ApiModelProperty("单体积(CBM)")
|
||||
@Excel(name = "单体积(CBM)")
|
||||
private BigDecimal singleVolume;
|
||||
|
||||
@ApiModelProperty("单毛重(KG)")
|
||||
@Excel(name = "单毛重(KG)")
|
||||
private BigDecimal singleGrossWeight;
|
||||
|
||||
@ApiModelProperty("lot编号")
|
||||
@Excel(name = "lot编号")
|
||||
private String lotNo;
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.mhd.oms.domain.reservationInMaterialDetail.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.entity.ReservationInMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.QueryOrderOverStockDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface IReservationInMaterialDetailService extends IService<ReservationInMaterialDetail>
|
||||
{
|
||||
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
public List<com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO> queryList(com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
|
||||
public List<com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO> queryInOrderList(QueryOrderOverStockDO queryOrderOverStockDO);
|
||||
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
public List<com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO> queryListChildren(com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
public Boolean insert(com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean update(com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
public Boolean batchInsert(String orderNumber, List<com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO> inMaterialDetailDOList);
|
||||
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean batchUpdate(List<com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO> inMaterialDetailDOList, com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailBaseDO inMaterialDetailBaseDO);
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
public Boolean delete(Long[] materialDetailIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询物料明细
|
||||
*/
|
||||
public com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO getInfo(Long materialDetailId);
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.mhd.oms.domain.reservationInMaterialDetail.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.entity.ReservationInMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.QueryOrderOverStockDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface ReservationInMaterialDetailMapper extends BaseMapper<ReservationInMaterialDetail>
|
||||
{
|
||||
/**
|
||||
* 查询物料明细列表
|
||||
*/
|
||||
public List<com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO> queryList(com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 关联入库单查询物料明细列表
|
||||
*/
|
||||
public List<com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO> queryInOrderList(QueryOrderOverStockDO queryOrderOverStockDO);
|
||||
|
||||
}
|
||||
+276
@@ -0,0 +1,276 @@
|
||||
package com.mhd.oms.domain.reservationInMaterialDetail.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.common.core.constant.SnowFlakeConstants;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.uuid.IdGenerator;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.entity.ReservationInMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.facade.IReservationInMaterialDetailService;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.mapper.ReservationInMaterialDetailMapper;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.QueryOrderOverStockDO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailBaseDO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 物料明细Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Service
|
||||
public class ReservationInMaterialDetailImpl extends ServiceImpl<ReservationInMaterialDetailMapper, ReservationInMaterialDetail> implements IReservationInMaterialDetailService {
|
||||
@Autowired
|
||||
private ReservationInMaterialDetailMapper inMaterialDetailMapper;
|
||||
// @Autowired
|
||||
// private IMaterialBaseInfoService materialBaseInfoService;
|
||||
// @Autowired
|
||||
// private IMaterialGoodsRuleService materialGoodsRuleService;
|
||||
// @Autowired
|
||||
// private IMaterialWarehouseControlService materialWarehouseControlService;
|
||||
// @Autowired
|
||||
// private SystemServiceFeign systemServiceFeign;
|
||||
@Autowired
|
||||
private IdGenerator idGenerator;
|
||||
|
||||
|
||||
/**
|
||||
* 查询物料明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO> queryList(com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO inMaterialDetailDO) {
|
||||
return inMaterialDetailMapper.queryList(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联入库单查询物料明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO> queryInOrderList(QueryOrderOverStockDO queryOrderOverStockDO) {
|
||||
return inMaterialDetailMapper.queryInOrderList(queryOrderOverStockDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物料明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO> queryListChildren(com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO inMaterialDetailDO)
|
||||
{
|
||||
List<ReservationInMaterialDetailPO> inMaterialDetailPOList = inMaterialDetailMapper.queryList(inMaterialDetailDO);
|
||||
|
||||
// 获取查询的层级
|
||||
List<ReservationInMaterialDetailPO> inMaterialDetailPOParentList = inMaterialDetailPOList
|
||||
.stream().filter(e -> 1 == e.getLevel()).collect(Collectors.toList());
|
||||
// 递归查询子集
|
||||
inMaterialDetailPOParentList.forEach(materialDetailPO -> materialDetailPO.setChildren(getChildren(materialDetailPO.getUniqueId(), inMaterialDetailPOList, 2)));
|
||||
return inMaterialDetailPOParentList;
|
||||
}
|
||||
|
||||
private List<ReservationInMaterialDetailPO> getChildren(Long parentUniqueId, List<ReservationInMaterialDetailPO> inMaterialDetailPOList, Integer maxLevel){
|
||||
List<ReservationInMaterialDetailPO> childrenCityList = inMaterialDetailPOList.stream().filter(materialDetailPO -> parentUniqueId.equals(materialDetailPO.getParentUniqueId())).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(childrenCityList)){
|
||||
childrenCityList.forEach(childrenCity -> {
|
||||
if (childrenCity.getLevel() < maxLevel){
|
||||
childrenCity.setChildren(getChildren(childrenCity.getUniqueId(), inMaterialDetailPOList, maxLevel));
|
||||
}
|
||||
});
|
||||
}
|
||||
return childrenCityList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(ReservationInMaterialDetailDO inMaterialDetailDO) {
|
||||
ReservationInMaterialDetail inMaterialDetail = new ReservationInMaterialDetail();
|
||||
BeanUtils.copyProperties(inMaterialDetailDO, inMaterialDetail);
|
||||
return this.save(inMaterialDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(ReservationInMaterialDetailDO inMaterialDetailDO) {
|
||||
ReservationInMaterialDetail inMaterialDetail = new ReservationInMaterialDetail();
|
||||
BeanUtils.copyProperties(inMaterialDetailDO, inMaterialDetail);
|
||||
return this.updateById(inMaterialDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 批量新增物流明细
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/22 9:27
|
||||
* @param inOrderNumber
|
||||
* @param inMaterialDetailDOList
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean batchInsert(String inOrderNumber, List<ReservationInMaterialDetailDO> inMaterialDetailDOList) {
|
||||
if (CollectionUtils.isEmpty(inMaterialDetailDOList)) {
|
||||
throw new ServiceException("物料明细不能为空");
|
||||
}
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
// 获取用户姓名(优先从UserPo获取,如果为空则使用realname,最后使用username作为兜底)
|
||||
String userRealName = loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null
|
||||
? loginUser.getUserPo().getUserName()
|
||||
: (loginUser.getRealname() != null ? loginUser.getRealname() : loginUser.getUsername());
|
||||
// 批量新增或修改
|
||||
List<ReservationInMaterialDetail> inMaterialDetailList = new ArrayList<>();
|
||||
for (ReservationInMaterialDetailDO inMaterialDetailDO : inMaterialDetailDOList){
|
||||
ReservationInMaterialDetail inMaterialDetail = new ReservationInMaterialDetail();
|
||||
BeanUtils.copyProperties(inMaterialDetailDO, inMaterialDetail);
|
||||
inMaterialDetail.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
inMaterialDetail.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
inMaterialDetail.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
inMaterialDetail.setUniqueId(idGenerator.snowflakeId(SnowFlakeConstants.wmsId));
|
||||
inMaterialDetail.setInOrderNumber(inOrderNumber);
|
||||
inMaterialDetail.setLevel(1);
|
||||
inMaterialDetail.setCreateBy(loginUser.getUserid());
|
||||
inMaterialDetail.setCreateByName(userRealName);
|
||||
inMaterialDetail.setCreateTime(new Date());
|
||||
// 新增入库单明细时,如果计划数量为空,则使用入库数量作为计划数量
|
||||
if (inMaterialDetail.getQuantity() == null && inMaterialDetailDO.getInboundQuantity() != null) {
|
||||
inMaterialDetail.setQuantity(inMaterialDetailDO.getInboundQuantity());
|
||||
}
|
||||
inMaterialDetailList.add(inMaterialDetail);
|
||||
}
|
||||
return saveBatch(inMaterialDetailList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 批量修改物流明细
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/22 9:27
|
||||
* @param inMaterialDetailDOList
|
||||
* @param inMaterialDetailBaseDO
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean batchUpdate(List<ReservationInMaterialDetailDO> inMaterialDetailDOList, ReservationInMaterialDetailBaseDO inMaterialDetailBaseDO) {
|
||||
if (CollectionUtils.isEmpty(inMaterialDetailDOList)) {
|
||||
throw new ServiceException("物料明细不能为空");
|
||||
}
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
// 获取用户姓名(优先从UserPo获取,如果为空则使用realname,最后使用username作为兜底)
|
||||
String userRealName = loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null
|
||||
? loginUser.getUserPo().getUserName()
|
||||
: (loginUser.getRealname() != null ? loginUser.getRealname() : loginUser.getUsername());
|
||||
|
||||
// 查询所有记录(包括已删除的),用于判断是否需要恢复已删除的记录
|
||||
List<ReservationInMaterialDetail> inMaterialDetailDbAllList = inMaterialDetailMapper.selectList(new QueryWrapper<ReservationInMaterialDetail>().lambda()
|
||||
.eq(ReservationInMaterialDetail::getInOrderNumber, inMaterialDetailBaseDO.getInOrderNumber()));
|
||||
// 查询未删除的记录,用于正常的更新逻辑
|
||||
List<ReservationInMaterialDetail> inMaterialDetailDbList = inMaterialDetailDbAllList.stream()
|
||||
.filter(item -> item.getDelFlag() != null && item.getDelFlag() == 1)
|
||||
.collect(Collectors.toList());
|
||||
Map<Long, ReservationInMaterialDetail> materialDetailMap = inMaterialDetailDbList.stream().collect(Collectors.toMap(ReservationInMaterialDetail::getMaterialDetailId, Function.identity()));
|
||||
// 查询已删除的记录,用于恢复逻辑
|
||||
Map<Long, ReservationInMaterialDetail> materialDetailDeletedMap = inMaterialDetailDbAllList.stream()
|
||||
.filter(item -> item.getDelFlag() != null && item.getDelFlag() == 2)
|
||||
.collect(Collectors.toMap(ReservationInMaterialDetail::getMaterialDetailId, Function.identity()));
|
||||
//批量新增或修改物料信息
|
||||
List<ReservationInMaterialDetail> inMaterialDetailList = new ArrayList<>();
|
||||
//需要修改的物流明细
|
||||
List<Long> materialDetailIdsByUpdate = new ArrayList<>();
|
||||
for (ReservationInMaterialDetailDO inMaterialDetailDO : inMaterialDetailDOList){
|
||||
//判断是否需要修改
|
||||
ReservationInMaterialDetail inMaterialDetail = null;
|
||||
if (inMaterialDetailDO.getMaterialDetailId() != null) {
|
||||
// 先查找未删除的记录
|
||||
inMaterialDetail = materialDetailMap.get(inMaterialDetailDO.getMaterialDetailId());
|
||||
// 如果未删除的记录中找不到,检查是否在已删除的记录中
|
||||
if (inMaterialDetail == null) {
|
||||
ReservationInMaterialDetail deletedDetail = materialDetailDeletedMap.get(inMaterialDetailDO.getMaterialDetailId());
|
||||
if (deletedDetail != null) {
|
||||
// 恢复已删除的记录
|
||||
inMaterialDetail = deletedDetail;
|
||||
inMaterialDetail.setDelFlag(1); // 恢复记录
|
||||
}
|
||||
}
|
||||
}
|
||||
if (inMaterialDetail == null){
|
||||
// 新增明细:清空 materialDetailId,让数据库自动生成
|
||||
inMaterialDetail = new ReservationInMaterialDetail();
|
||||
BeanUtils.copyProperties(inMaterialDetailDO, inMaterialDetail);
|
||||
inMaterialDetail.setMaterialDetailId(null); // 清空ID,确保新增
|
||||
inMaterialDetail.setUniqueId(idGenerator.snowflakeId(SnowFlakeConstants.wmsId));
|
||||
inMaterialDetail.setInOrderNumber(inMaterialDetailBaseDO.getInOrderNumber());
|
||||
inMaterialDetail.setOrganizationId(inMaterialDetailBaseDO.getOrganizationId());
|
||||
inMaterialDetail.setOrganizationName(inMaterialDetailBaseDO.getOrganizationName());
|
||||
inMaterialDetail.setTopOrganizationId(inMaterialDetailBaseDO.getTopOrganizationId());
|
||||
inMaterialDetail.setDelFlag(1); // 确保新增记录的delFlag为1
|
||||
}else {
|
||||
BeanUtils.copyProperties(inMaterialDetailDO, inMaterialDetail);
|
||||
inMaterialDetail.setUpdateBy(loginUser.getUserid());
|
||||
inMaterialDetail.setUpdateByName(userRealName);
|
||||
inMaterialDetail.setUpdateTime(new Date());
|
||||
materialDetailIdsByUpdate.add(inMaterialDetailDO.getMaterialDetailId());
|
||||
}
|
||||
inMaterialDetailList.add(inMaterialDetail);
|
||||
}
|
||||
//需修改的物料明细id集合不为空
|
||||
if (!CollectionUtils.isEmpty(inMaterialDetailDbList) && !CollectionUtils.isEmpty(materialDetailIdsByUpdate)){
|
||||
List<Long> materialDetailIdsByDb = inMaterialDetailDbList.stream().map(ReservationInMaterialDetail::getMaterialDetailId).collect(Collectors.toList());
|
||||
//过滤需要修改的id集合
|
||||
materialDetailIdsByDb.removeAll(materialDetailIdsByUpdate);
|
||||
//判断是否存在需要删除的物流明细 标记删除
|
||||
if (!CollectionUtils.isEmpty(materialDetailIdsByDb)){
|
||||
update(new UpdateWrapper<ReservationInMaterialDetail>().lambda()
|
||||
.set(ReservationInMaterialDetail::getDelFlag, 2)
|
||||
.set(ReservationInMaterialDetail::getUpdateBy, loginUser.getUserid())
|
||||
.set(ReservationInMaterialDetail::getUpdateByName, userRealName)
|
||||
.set(ReservationInMaterialDetail::getUpdateTime, new Date())
|
||||
.in(ReservationInMaterialDetail::getMaterialDetailId, materialDetailIdsByDb));
|
||||
}
|
||||
}
|
||||
//保存物料明细信息
|
||||
return saveOrUpdateBatch(inMaterialDetailList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] materialDetailIds ) {
|
||||
List<ReservationInMaterialDetail> list = new ArrayList<>();
|
||||
for (Long id : materialDetailIds) {
|
||||
ReservationInMaterialDetail inMaterialDetail = new ReservationInMaterialDetail();
|
||||
inMaterialDetail.setMaterialDetailId(id);
|
||||
inMaterialDetail.setDelFlag(2);
|
||||
list.add(inMaterialDetail);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
@Override
|
||||
public ReservationInMaterialDetailPO getInfo(Long materialDetailId) {
|
||||
ReservationInMaterialDetail inMaterialDetail = this.getById(materialDetailId);
|
||||
ReservationInMaterialDetailPO inMaterialDetailPO = new ReservationInMaterialDetailPO();
|
||||
BeanUtils.copyProperties(inMaterialDetail, inMaterialDetailPO);
|
||||
return inMaterialDetailPO;
|
||||
}
|
||||
|
||||
}
|
||||
+413
@@ -0,0 +1,413 @@
|
||||
package com.mhd.oms.domain.reservationInMaterialDetail.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;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.ReservationStockInOrderBasePO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 物料明细对象 material_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "物料明细对象", description = "物料明细响应对象")
|
||||
public class ReservationInMaterialDetailPO extends ReservationStockInOrderBasePO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("订单物料明细id")
|
||||
private Long materialDetailId;
|
||||
|
||||
@ApiModelProperty("业务唯一id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long uniqueId;
|
||||
|
||||
@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 inOrderNumber;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("收货数量")
|
||||
@Excel(name = "收货数量")
|
||||
private BigDecimal receiptQuantity;
|
||||
|
||||
@ApiModelProperty("上架数量")
|
||||
@Excel(name = "上架数量")
|
||||
private BigDecimal shelvesQuantity;
|
||||
|
||||
@ApiModelProperty("作业数量(例如:收货数量 上架数量)")
|
||||
@Excel(name = "作业数量(例如:收货数量 上架数量)")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
@Excel(name = "收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
private Integer receiptStatus;
|
||||
|
||||
@ApiModelProperty("上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
@Excel(name = "上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
private Integer shelvesStatus;
|
||||
|
||||
@ApiModelProperty("包装规格id")
|
||||
@Excel(name = "包装规格id")
|
||||
private Long packId;
|
||||
|
||||
@ApiModelProperty("包装规格编码")
|
||||
@Excel(name = "包装规格编码")
|
||||
private String packCode;
|
||||
|
||||
@ApiModelProperty("包装规格名称")
|
||||
@Excel(name = "包装规格名称")
|
||||
private String packName;
|
||||
|
||||
@ApiModelProperty("包装详情id")
|
||||
@Excel(name = "包装详情id")
|
||||
private Long packDetailId;
|
||||
|
||||
@ApiModelProperty("单位代码:EA IP CS PL OT")
|
||||
@Excel(name = "单位代码:EA IP CS PL OT")
|
||||
private String unitCode;
|
||||
|
||||
@ApiModelProperty("单位名称")
|
||||
@Excel(name = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("单位数量")
|
||||
@Excel(name = "单位数量")
|
||||
private BigDecimal unitNumber;
|
||||
|
||||
@ApiModelProperty("物料仓库控制信息id")
|
||||
@Excel(name = "物料仓库控制信息id")
|
||||
private Long materialWarehouseControlId;
|
||||
|
||||
@ApiModelProperty("是否序列号管理: 1-是 2-否")
|
||||
@Excel(name = "是否序列号管理: 1-是 2-否")
|
||||
private Integer serialNumberManage;
|
||||
|
||||
@ApiModelProperty("是否质检管理: 1-是 2-否")
|
||||
@Excel(name = "是否质检管理: 1-是 2-否")
|
||||
private Integer qualityInspectionManage;
|
||||
|
||||
@ApiModelProperty("质检阶段: 1-收货前 2-收货后上架前")
|
||||
@Excel(name = "质检阶段: 1-收货前 2-收货后上架前")
|
||||
private Integer qualityInspectionStage;
|
||||
|
||||
@ApiModelProperty("质检规则: 1-全检 2-抽检 ")
|
||||
@Excel(name = "质检规则: 1-全检 2-抽检 ")
|
||||
private Integer qualityInspectionRule;
|
||||
|
||||
@ApiModelProperty("抽检比例")
|
||||
@Excel(name = "抽检比例")
|
||||
private BigDecimal qualityInspectionRatio;
|
||||
|
||||
@ApiModelProperty("质检项: 1-包装 2-纯度")
|
||||
@Excel(name = "质检项: 1-包装 2-纯度")
|
||||
private Integer qualityInspectionTerm;
|
||||
|
||||
@ApiModelProperty("质检结果: 1-正常 2-异常")
|
||||
@Excel(name = "质检结果: 1-正常 2-异常")
|
||||
private Integer qualityInspectionResults;
|
||||
|
||||
@ApiModelProperty("是否允许超收: 1-是 2-否")
|
||||
@Excel(name = "是否允许超收: 1-是 2-否")
|
||||
private Integer allowOvercharge;
|
||||
|
||||
@ApiModelProperty("超收比例")
|
||||
@Excel(name = "超收比例")
|
||||
private BigDecimal overchargeRatio;
|
||||
|
||||
@ApiModelProperty("批次号")
|
||||
@Excel(name = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("物料状态编码")
|
||||
@Excel(name = "物料状态编码")
|
||||
private String materialStatusCode;
|
||||
|
||||
@ApiModelProperty("物料状态名称")
|
||||
@Excel(name = "物料状态名称")
|
||||
private String materialStatusName;
|
||||
|
||||
@ApiModelProperty("分配规则id")
|
||||
@Excel(name = "分配规则id")
|
||||
private Long distributeRuleId;
|
||||
|
||||
@ApiModelProperty("分配规则编码")
|
||||
@Excel(name = "分配规则编码")
|
||||
private String distributeRuleCode;
|
||||
|
||||
@ApiModelProperty("分配规则名称")
|
||||
@Excel(name = "分配规则名称")
|
||||
private String distributeRuleName;
|
||||
|
||||
@ApiModelProperty("容器id")
|
||||
@Excel(name = "容器id")
|
||||
private Long containerId;
|
||||
|
||||
@ApiModelProperty("容器编码")
|
||||
@Excel(name = "容器编码")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("容器类型 数据字典")
|
||||
@Excel(name = "容器类型 数据字典")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("容器类型名称 数据字典")
|
||||
@Excel(name = "容器类型名称 数据字典")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("上架仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("上架仓库编码")
|
||||
@Excel(name = "上架仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("上架库区id")
|
||||
@Excel(name = "上架库区id")
|
||||
private Long storageSectionId;
|
||||
|
||||
@ApiModelProperty("上架库区编码")
|
||||
@Excel(name = "上架库区编码")
|
||||
private String storageCode;
|
||||
|
||||
@ApiModelProperty("上架库区名称")
|
||||
@Excel(name = "上架库区名称")
|
||||
private String storageName;
|
||||
|
||||
@ApiModelProperty("上架库位id")
|
||||
@Excel(name = "上架库位id")
|
||||
private Long storageLocationId;
|
||||
|
||||
@ApiModelProperty("上架库位编码")
|
||||
@Excel(name = "上架库位编码")
|
||||
private String storageLocationCode;
|
||||
|
||||
@ApiModelProperty("上架库位名称")
|
||||
@Excel(name = "上架库位名称")
|
||||
private String storageLocationName;
|
||||
|
||||
@ApiModelProperty("层级深度,从一级开始递增")
|
||||
private Integer level;
|
||||
|
||||
@ApiModelProperty("父级唯一Id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long parentUniqueId;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("未收货数量")
|
||||
@Excel(name = "未收货数量")
|
||||
private BigDecimal waitReceiptQuantity;
|
||||
|
||||
@ApiModelProperty("未上架数量")
|
||||
@Excel(name = "未上架数量")
|
||||
private BigDecimal waitShelvesQuantity;
|
||||
|
||||
@ApiModelProperty("物料明细")
|
||||
private List<ReservationInMaterialDetailPO> children;
|
||||
|
||||
@ApiModelProperty("越库单id")
|
||||
private Long overStockId;
|
||||
|
||||
@ApiModelProperty("越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
@Excel(name = "越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
private Integer overStockStatus;
|
||||
|
||||
@ApiModelProperty("越库类型:1-直接越库 2-分拨越库")
|
||||
@Excel(name = "越库类型:1-直接越库 2-分拨越库")
|
||||
private Long overStockType;
|
||||
|
||||
// ========== 报关相关明细字段 ==========
|
||||
@ApiModelProperty("规格型号")
|
||||
@Excel(name = "规格型号/ITEM")
|
||||
private String specificationModel;
|
||||
|
||||
@ApiModelProperty("SKU码")
|
||||
@Excel(name = "SKU码")
|
||||
private String skuCode;
|
||||
|
||||
@ApiModelProperty("Invoice No.")
|
||||
@Excel(name = "Invoice No.")
|
||||
private String invoiceNo;
|
||||
|
||||
@ApiModelProperty("升")
|
||||
@Excel(name = "升")
|
||||
private BigDecimal liter;
|
||||
|
||||
@ApiModelProperty("尺寸")
|
||||
@Excel(name = "尺寸")
|
||||
private String dimensions;
|
||||
|
||||
@ApiModelProperty("申报单位")
|
||||
@Excel(name = "申报单位")
|
||||
private String declarationUnit;
|
||||
|
||||
@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 originCountry;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("币制")
|
||||
@Excel(name = "币制")
|
||||
private String currency;
|
||||
|
||||
@ApiModelProperty("单位")
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty("申报数量")
|
||||
@Excel(name = "申报数量")
|
||||
private BigDecimal declaredQuantity;
|
||||
|
||||
@ApiModelProperty("箱数")
|
||||
@Excel(name = "箱数")
|
||||
private BigDecimal boxCount;
|
||||
|
||||
@ApiModelProperty("件数")
|
||||
@Excel(name = "件数")
|
||||
private BigDecimal pieceCount;
|
||||
|
||||
@ApiModelProperty("入库数量")
|
||||
@Excel(name = "入库数量")
|
||||
private BigDecimal inboundQuantity;
|
||||
|
||||
@ApiModelProperty("总净重(KG)")
|
||||
@Excel(name = "总净重(KG)")
|
||||
private BigDecimal totalNetWeight;
|
||||
|
||||
@ApiModelProperty("总毛重(KG)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private BigDecimal totalGrossWeight;
|
||||
|
||||
@ApiModelProperty("总体积(CBM)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private BigDecimal totalVolume;
|
||||
|
||||
@ApiModelProperty("总面积(SQM)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea;
|
||||
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("扩展属性1")
|
||||
@Excel(name = "扩展属性1")
|
||||
private String extAttr1;
|
||||
|
||||
@ApiModelProperty("扩展属性2")
|
||||
@Excel(name = "扩展属性2")
|
||||
private String extAttr2;
|
||||
|
||||
@ApiModelProperty("扩展属性3")
|
||||
@Excel(name = "扩展属性3")
|
||||
private String extAttr3;
|
||||
|
||||
@ApiModelProperty("扩展属性4")
|
||||
@Excel(name = "扩展属性4")
|
||||
private String extAttr4;
|
||||
|
||||
|
||||
@ApiModelProperty("合同收费")
|
||||
@Excel(name = "合同收费")
|
||||
private BigDecimal contractFee;
|
||||
|
||||
@ApiModelProperty("每月仓租")
|
||||
@Excel(name = "每月仓租")
|
||||
private BigDecimal monthlyWarehouseFee;
|
||||
|
||||
@ApiModelProperty("半月仓租")
|
||||
@Excel(name = "半月仓租")
|
||||
private BigDecimal halfMonthWhFee;
|
||||
|
||||
@ApiModelProperty("折扣(%)")
|
||||
@Excel(name = "折扣(%)")
|
||||
private BigDecimal discountRate;
|
||||
|
||||
@ApiModelProperty("单体积(CBM)")
|
||||
@Excel(name = "单体积(CBM)")
|
||||
private BigDecimal singleVolume;
|
||||
|
||||
@ApiModelProperty("单毛重(KG)")
|
||||
@Excel(name = "单毛重(KG)")
|
||||
private BigDecimal singleGrossWeight;
|
||||
|
||||
@ApiModelProperty("lot编号")
|
||||
@Excel(name = "lot编号")
|
||||
private String lotNo;
|
||||
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
package com.mhd.oms.domain.reservationInMaterialDetail.repository.todo;
|
||||
|
||||
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.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 越库管理对象 over_stock
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class QueryOrderOverStockDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@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 warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("入库单类型编码")
|
||||
@Excel(name = "入库单类型编码")
|
||||
private String inOrderTypeCode;
|
||||
|
||||
@ApiModelProperty("入库单类型名称")
|
||||
@Excel(name = "入库单类型名称")
|
||||
private String inOrderTypeName;
|
||||
|
||||
@ApiModelProperty("预计到货时间 开始")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间 开始", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inOrderExpectStartTime;
|
||||
|
||||
@ApiModelProperty("预计到货时间 结束")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间 结束", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inOrderExpectEndTime;
|
||||
|
||||
@ApiModelProperty("出库单号")
|
||||
@Excel(name = "出库单号")
|
||||
private String outOrderNumber;
|
||||
|
||||
@ApiModelProperty("出库单类型编码")
|
||||
@Excel(name = "出库单类型编码")
|
||||
private String outOrderTypeCode;
|
||||
|
||||
@ApiModelProperty("出库单类型名称")
|
||||
@Excel(name = "出库单类型名称")
|
||||
private String outOrderTypeName;
|
||||
|
||||
@ApiModelProperty("预计出货时间 开始")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间 开始", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date outOrderExpectStartTime;
|
||||
|
||||
@ApiModelProperty("预计出货时间 结束")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间 结束", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date outOrderExpectEndTime;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主编码")
|
||||
private List<Long> shipperIdList;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private List<Long> materialBaseInfoIdList;
|
||||
|
||||
@ApiModelProperty("入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
@Excel(name = "入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
private Integer inStatus;
|
||||
|
||||
@ApiModelProperty("出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-拣货中 6-波次中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭")
|
||||
@Excel(name = "出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-拣货中 6-波次中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭")
|
||||
private Integer outStatus;
|
||||
|
||||
@ApiModelProperty("越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
@Excel(name = "越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
private Integer overStockStatus;
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.mhd.oms.domain.reservationInMaterialDetail.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title StockBaseDO
|
||||
* @description: TODO
|
||||
* @date 2024/5/23 20:30
|
||||
**/
|
||||
@Data
|
||||
public class ReservationInMaterialDetailBaseDO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@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 inOrderNumber;
|
||||
|
||||
@ApiModelProperty("收货单号")
|
||||
@Excel(name = "收货单号")
|
||||
private String receiptOrderNumber;
|
||||
|
||||
@ApiModelProperty("上架单号")
|
||||
@Excel(name = "上架单号")
|
||||
private String shelfOrderNumber;
|
||||
}
|
||||
+373
@@ -0,0 +1,373 @@
|
||||
package com.mhd.oms.domain.reservationInMaterialDetail.repository.todo;
|
||||
|
||||
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.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderBaseDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 物料明细对象 material_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ReservationInMaterialDetailDO extends ReservationStockInOrderBaseDO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("订单物料明细id")
|
||||
private Long materialDetailId;
|
||||
|
||||
@ApiModelProperty("业务唯一id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long uniqueId;
|
||||
|
||||
@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 inOrderNumber;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("收货数量")
|
||||
@Excel(name = "收货数量")
|
||||
private BigDecimal receiptQuantity;
|
||||
|
||||
@ApiModelProperty("上架数量")
|
||||
@Excel(name = "上架数量")
|
||||
private BigDecimal shelvesQuantity;
|
||||
|
||||
@ApiModelProperty("作业数量(例如:收货数量 上架数量)")
|
||||
@Excel(name = "作业数量(例如:收货数量 上架数量)")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
@Excel(name = "收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
private Integer receiptStatus;
|
||||
|
||||
@ApiModelProperty("上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
@Excel(name = "上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
private Integer shelvesStatus;
|
||||
|
||||
@ApiModelProperty("包装规格id")
|
||||
@Excel(name = "包装规格id")
|
||||
private Long packId;
|
||||
|
||||
@ApiModelProperty("包装规格编码")
|
||||
@Excel(name = "包装规格编码")
|
||||
private String packCode;
|
||||
|
||||
@ApiModelProperty("包装规格名称")
|
||||
@Excel(name = "包装规格名称")
|
||||
private String packName;
|
||||
|
||||
@ApiModelProperty("包装详情id")
|
||||
@Excel(name = "包装详情id")
|
||||
private Long packDetailId;
|
||||
|
||||
@ApiModelProperty("单位代码:EA IP CS PL OT")
|
||||
@Excel(name = "单位代码:EA IP CS PL OT")
|
||||
private String unitCode;
|
||||
|
||||
@ApiModelProperty("单位名称")
|
||||
@Excel(name = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("单位数量")
|
||||
@Excel(name = "单位数量")
|
||||
private BigDecimal unitNumber;
|
||||
|
||||
@ApiModelProperty("物料仓库控制信息id")
|
||||
@Excel(name = "物料仓库控制信息id")
|
||||
private Long materialWarehouseControlId;
|
||||
|
||||
@ApiModelProperty("是否序列号管理: 1-是 2-否")
|
||||
@Excel(name = "是否序列号管理: 1-是 2-否")
|
||||
private Integer serialNumberManage;
|
||||
|
||||
@ApiModelProperty("是否质检管理: 1-是 2-否")
|
||||
@Excel(name = "是否质检管理: 1-是 2-否")
|
||||
private Integer qualityInspectionManage;
|
||||
|
||||
@ApiModelProperty("质检阶段: 1-收货前 2-收货后上架前")
|
||||
@Excel(name = "质检阶段: 1-收货前 2-收货后上架前")
|
||||
private Integer qualityInspectionStage;
|
||||
|
||||
@ApiModelProperty("质检规则: 1-全检 2-抽检 ")
|
||||
@Excel(name = "质检规则: 1-全检 2-抽检 ")
|
||||
private Integer qualityInspectionRule;
|
||||
|
||||
@ApiModelProperty("抽检比例")
|
||||
@Excel(name = "抽检比例")
|
||||
private BigDecimal qualityInspectionRatio;
|
||||
|
||||
@ApiModelProperty("质检项: 1-包装 2-纯度")
|
||||
@Excel(name = "质检项: 1-包装 2-纯度")
|
||||
private Integer qualityInspectionTerm;
|
||||
|
||||
@ApiModelProperty("质检结果: 1-正常 2-异常")
|
||||
@Excel(name = "质检结果: 1-正常 2-异常")
|
||||
private Integer qualityInspectionResults;
|
||||
|
||||
@ApiModelProperty("是否允许超收: 1-是 2-否")
|
||||
@Excel(name = "是否允许超收: 1-是 2-否")
|
||||
private Integer allowOvercharge;
|
||||
|
||||
@ApiModelProperty("超收比例")
|
||||
@Excel(name = "超收比例")
|
||||
private BigDecimal overchargeRatio;
|
||||
|
||||
@ApiModelProperty("批次号")
|
||||
@Excel(name = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("物料状态编码")
|
||||
@Excel(name = "物料状态编码")
|
||||
private String materialStatusCode;
|
||||
|
||||
@ApiModelProperty("物料状态名称")
|
||||
@Excel(name = "物料状态名称")
|
||||
private String materialStatusName;
|
||||
|
||||
@ApiModelProperty("分配规则id")
|
||||
@Excel(name = "分配规则id")
|
||||
private Long distributeRuleId;
|
||||
|
||||
@ApiModelProperty("分配规则编码")
|
||||
@Excel(name = "分配规则编码")
|
||||
private String distributeRuleCode;
|
||||
|
||||
@ApiModelProperty("分配规则名称")
|
||||
@Excel(name = "分配规则名称")
|
||||
private String distributeRuleName;
|
||||
|
||||
@ApiModelProperty("容器id")
|
||||
@Excel(name = "容器id")
|
||||
private Long containerId;
|
||||
|
||||
@ApiModelProperty("容器编码")
|
||||
@Excel(name = "容器编码")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("容器类型 数据字典")
|
||||
@Excel(name = "容器类型 数据字典")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("容器类型名称 数据字典")
|
||||
@Excel(name = "容器类型名称 数据字典")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("上架仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("上架仓库编码")
|
||||
@Excel(name = "上架仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("上架库区id")
|
||||
@Excel(name = "上架库区id")
|
||||
private Long storageSectionId;
|
||||
|
||||
@ApiModelProperty("上架库区编码")
|
||||
@Excel(name = "上架库区编码")
|
||||
private String storageCode;
|
||||
|
||||
@ApiModelProperty("上架库区名称")
|
||||
@Excel(name = "上架库区名称")
|
||||
private String storageName;
|
||||
|
||||
@ApiModelProperty("上架库位id")
|
||||
@Excel(name = "上架库位id")
|
||||
private Long storageLocationId;
|
||||
|
||||
@ApiModelProperty("上架库位编码")
|
||||
@Excel(name = "上架库位编码")
|
||||
private String storageLocationCode;
|
||||
|
||||
@ApiModelProperty("上架库位名称")
|
||||
@Excel(name = "上架库位名称")
|
||||
private String storageLocationName;
|
||||
|
||||
@ApiModelProperty("层级深度,从一级开始递增")
|
||||
private Integer level;
|
||||
|
||||
@ApiModelProperty("父级唯一Id")
|
||||
private Long parentUniqueId;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("物料明细子集")
|
||||
private List<ReservationInMaterialDetailDO> children;
|
||||
|
||||
// @ApiModelProperty("更多属性")
|
||||
// private List<MaterialMoreDetailDO> materialMoreDetailList;
|
||||
|
||||
// @ApiModelProperty("序列号")
|
||||
// private List<ReservationInMaterialDetailSerialNumberDO> materialDetailSerialNumberList;
|
||||
|
||||
@ApiModelProperty("入库单号集合")
|
||||
@Excel(name = "入库单号集合")
|
||||
private List<String> inOrderNumberList;
|
||||
|
||||
// ========== 报关相关明细字段 ==========
|
||||
@ApiModelProperty("规格型号(选择物料后自动带出,不可编辑)")
|
||||
@Excel(name = "规格型号/ITEM")
|
||||
private String specificationModel;
|
||||
|
||||
@ApiModelProperty("SKU码(选择物料后自动带出,不可编辑)")
|
||||
@Excel(name = "SKU码")
|
||||
private String skuCode;
|
||||
|
||||
@ApiModelProperty("Invoice No.")
|
||||
@Excel(name = "Invoice No.")
|
||||
private String invoiceNo;
|
||||
|
||||
@ApiModelProperty("升(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "升")
|
||||
private BigDecimal liter;
|
||||
|
||||
@ApiModelProperty("尺寸")
|
||||
@Excel(name = "尺寸")
|
||||
private String dimensions;
|
||||
|
||||
@ApiModelProperty("申报单位")
|
||||
@Excel(name = "申报单位")
|
||||
private String declarationUnit;
|
||||
|
||||
@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 originCountry;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("币制")
|
||||
@Excel(name = "币制")
|
||||
private String currency;
|
||||
|
||||
@ApiModelProperty("单位(数据字典下拉选择框)")
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty("申报数量(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "申报数量")
|
||||
private BigDecimal declaredQuantity;
|
||||
|
||||
@ApiModelProperty("箱数(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "箱数")
|
||||
private BigDecimal boxCount;
|
||||
|
||||
@ApiModelProperty("件数(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "件数")
|
||||
private BigDecimal pieceCount;
|
||||
|
||||
@ApiModelProperty("入库数量(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "ruku数量")
|
||||
private BigDecimal inboundQuantity;
|
||||
|
||||
@ApiModelProperty("总净重(KG)(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "总净重(KG)")
|
||||
private BigDecimal totalNetWeight;
|
||||
|
||||
@ApiModelProperty("总毛重(KG)(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private BigDecimal totalGrossWeight;
|
||||
|
||||
@ApiModelProperty("总体积(CBM)(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private BigDecimal totalVolume;
|
||||
|
||||
@ApiModelProperty("总面积(SQM)(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea;
|
||||
|
||||
@ApiModelProperty("总价(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
|
||||
@ApiModelProperty("合同收费")
|
||||
@Excel(name = "合同收费")
|
||||
private BigDecimal contractFee;
|
||||
|
||||
@ApiModelProperty("每月仓租")
|
||||
@Excel(name = "每月仓租")
|
||||
private BigDecimal monthlyWarehouseFee;
|
||||
|
||||
@ApiModelProperty("半月仓租")
|
||||
@Excel(name = "半月仓租")
|
||||
private BigDecimal halfMonthWhFee;
|
||||
|
||||
@ApiModelProperty("折扣(%)")
|
||||
@Excel(name = "折扣(%)")
|
||||
private BigDecimal discountRate;
|
||||
|
||||
@ApiModelProperty("单体积(CBM)")
|
||||
@Excel(name = "单体积(CBM)")
|
||||
private BigDecimal singleVolume;
|
||||
|
||||
@ApiModelProperty("单毛重(KG)")
|
||||
@Excel(name = "单毛重(KG)")
|
||||
private BigDecimal singleGrossWeight;
|
||||
|
||||
@ApiModelProperty("lot编号")
|
||||
@Excel(name = "lot编号")
|
||||
private String lotNo;
|
||||
}
|
||||
+381
@@ -0,0 +1,381 @@
|
||||
package com.mhd.oms.domain.reservationInMaterialDetail.repository.todo;
|
||||
|
||||
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 java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细对象 material_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ReservationInMaterialDetailDTO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("订单物料明细id")
|
||||
private Long materialDetailId;
|
||||
|
||||
@ApiModelProperty("业务唯一id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long uniqueId;
|
||||
|
||||
@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 inOrderNumber;
|
||||
|
||||
@ApiModelProperty("物料库存id")
|
||||
@Excel(name = "物料库存id")
|
||||
private Long materialInventoryId;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
@Excel(name = "物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("收货数量")
|
||||
@Excel(name = "收货数量")
|
||||
private BigDecimal receiptQuantity;
|
||||
|
||||
@ApiModelProperty("上架数量")
|
||||
@Excel(name = "上架数量")
|
||||
private BigDecimal shelvesQuantity;
|
||||
|
||||
@ApiModelProperty("作业数量(例如:收货数量 上架数量)")
|
||||
@Excel(name = "作业数量(例如:收货数量 上架数量)")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
@Excel(name = "收货状态: 1-待收货 2-收货中 3-已收货 4-已收货(少收) 5-已收货(超收)")
|
||||
private Integer receiptStatus;
|
||||
|
||||
@ApiModelProperty("上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
@Excel(name = "上架状态: 1-待上架 2-上架中 3-已上架 4-已上架(少上) 5-已上架(超上)")
|
||||
private Integer shelvesStatus;
|
||||
|
||||
@ApiModelProperty("包装规格id")
|
||||
@Excel(name = "包装规格id")
|
||||
private Long packId;
|
||||
|
||||
@ApiModelProperty("包装规格编码")
|
||||
@Excel(name = "包装规格编码")
|
||||
private String packCode;
|
||||
|
||||
@ApiModelProperty("包装规格名称")
|
||||
@Excel(name = "包装规格名称")
|
||||
private String packName;
|
||||
|
||||
@ApiModelProperty("包装详情id")
|
||||
@Excel(name = "包装详情id")
|
||||
private Long packDetailId;
|
||||
|
||||
@ApiModelProperty("单位代码:EA IP CS PL OT")
|
||||
@Excel(name = "单位代码:EA IP CS PL OT")
|
||||
private String unitCode;
|
||||
|
||||
@ApiModelProperty("单位名称")
|
||||
@Excel(name = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("单位数量")
|
||||
@Excel(name = "单位数量")
|
||||
private BigDecimal unitNumber;
|
||||
|
||||
@ApiModelProperty("物料仓库控制信息id")
|
||||
@Excel(name = "物料仓库控制信息id")
|
||||
private Long materialWarehouseControlId;
|
||||
|
||||
@ApiModelProperty("是否序列号管理: 1-是 2-否")
|
||||
@Excel(name = "是否序列号管理: 1-是 2-否")
|
||||
private Integer serialNumberManage;
|
||||
|
||||
@ApiModelProperty("是否质检管理: 1-是 2-否")
|
||||
@Excel(name = "是否质检管理: 1-是 2-否")
|
||||
private Integer qualityInspectionManage;
|
||||
|
||||
@ApiModelProperty("质检阶段: 1-收货前 2-收货后上架前")
|
||||
@Excel(name = "质检阶段: 1-收货前 2-收货后上架前")
|
||||
private Integer qualityInspectionStage;
|
||||
|
||||
@ApiModelProperty("质检规则: 1-全检 2-抽检 ")
|
||||
@Excel(name = "质检规则: 1-全检 2-抽检 ")
|
||||
private Integer qualityInspectionRule;
|
||||
|
||||
@ApiModelProperty("抽检比例")
|
||||
@Excel(name = "抽检比例")
|
||||
private BigDecimal qualityInspectionRatio;
|
||||
|
||||
@ApiModelProperty("质检项: 1-包装 2-纯度")
|
||||
@Excel(name = "质检项: 1-包装 2-纯度")
|
||||
private Integer qualityInspectionTerm;
|
||||
|
||||
@ApiModelProperty("质检结果: 1-正常 2-异常")
|
||||
@Excel(name = "质检结果: 1-正常 2-异常")
|
||||
private Integer qualityInspectionResults;
|
||||
|
||||
@ApiModelProperty("是否允许超收: 1-是 2-否")
|
||||
@Excel(name = "是否允许超收: 1-是 2-否")
|
||||
private Integer allowOvercharge;
|
||||
|
||||
@ApiModelProperty("超收比例")
|
||||
@Excel(name = "超收比例")
|
||||
private BigDecimal overchargeRatio;
|
||||
|
||||
@ApiModelProperty("批次号")
|
||||
@Excel(name = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("物料状态编码")
|
||||
@Excel(name = "物料状态编码")
|
||||
private String materialStatusCode;
|
||||
|
||||
@ApiModelProperty("物料状态名称")
|
||||
@Excel(name = "物料状态名称")
|
||||
private String materialStatusName;
|
||||
|
||||
@ApiModelProperty("分配规则id")
|
||||
@Excel(name = "分配规则id")
|
||||
private Long distributeRuleId;
|
||||
|
||||
@ApiModelProperty("分配规则编码")
|
||||
@Excel(name = "分配规则编码")
|
||||
private String distributeRuleCode;
|
||||
|
||||
@ApiModelProperty("分配规则名称")
|
||||
@Excel(name = "分配规则名称")
|
||||
private String distributeRuleName;
|
||||
|
||||
@ApiModelProperty("容器id")
|
||||
@Excel(name = "容器id")
|
||||
private Long containerId;
|
||||
|
||||
@ApiModelProperty("容器编码")
|
||||
@Excel(name = "容器编码")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("容器类型 数据字典")
|
||||
@Excel(name = "容器类型 数据字典")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("容器类型名称 数据字典")
|
||||
@Excel(name = "容器类型名称 数据字典")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("上架仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("上架仓库编码")
|
||||
@Excel(name = "上架仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("上架库区id")
|
||||
@Excel(name = "上架库区id")
|
||||
private Long storageSectionId;
|
||||
|
||||
@ApiModelProperty("上架库区编码")
|
||||
@Excel(name = "上架库区编码")
|
||||
private String storageCode;
|
||||
|
||||
@ApiModelProperty("上架库区名称")
|
||||
@Excel(name = "上架库区名称")
|
||||
private String storageName;
|
||||
|
||||
@ApiModelProperty("上架库位id")
|
||||
@Excel(name = "上架库位id")
|
||||
private Long storageLocationId;
|
||||
|
||||
@ApiModelProperty("上架库位编码")
|
||||
@Excel(name = "上架库位编码")
|
||||
private String storageLocationCode;
|
||||
|
||||
@ApiModelProperty("上架库位名称")
|
||||
@Excel(name = "上架库位名称")
|
||||
private String storageLocationName;
|
||||
|
||||
@ApiModelProperty("层级深度,从一级开始递增")
|
||||
private Integer level;
|
||||
|
||||
@ApiModelProperty("父级唯一Id")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long parentUniqueId;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
// @ApiModelProperty("更多属性")
|
||||
// private List<MaterialMoreDetailDTO> materialMoreDetailList;
|
||||
|
||||
// @ApiModelProperty("序列号")
|
||||
// private List<InMaterialDetailSerialNumberDTO> materialDetailSerialNumberList;
|
||||
|
||||
@ApiModelProperty("入库单号集合")
|
||||
@Excel(name = "入库单号集合")
|
||||
private List<String> inOrderNumberList;
|
||||
|
||||
@ApiModelProperty("是否是差异单")
|
||||
private Integer isDifferentType;
|
||||
|
||||
// ========== 报关相关明细字段 ==========
|
||||
@ApiModelProperty("规格型号(选择物料后自动带出,不可编辑)")
|
||||
@Excel(name = "规格型号/ITEM")
|
||||
private String specificationModel;
|
||||
|
||||
@ApiModelProperty("SKU码(选择物料后自动带出,不可编辑)")
|
||||
@Excel(name = "SKU码")
|
||||
private String skuCode;
|
||||
|
||||
@ApiModelProperty("Invoice No.")
|
||||
@Excel(name = "Invoice No.")
|
||||
private String invoiceNo;
|
||||
|
||||
@ApiModelProperty("升(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "升")
|
||||
private BigDecimal liter;
|
||||
|
||||
@ApiModelProperty("尺寸")
|
||||
@Excel(name = "尺寸")
|
||||
private String dimensions;
|
||||
|
||||
@ApiModelProperty("申报单位")
|
||||
@Excel(name = "申报单位")
|
||||
private String declarationUnit;
|
||||
|
||||
@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 originCountry;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("币制")
|
||||
@Excel(name = "币制")
|
||||
private String currency;
|
||||
|
||||
@ApiModelProperty("单位(数据字典下拉选择框)")
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty("申报数量(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "申报数量")
|
||||
private BigDecimal declaredQuantity;
|
||||
|
||||
@ApiModelProperty("箱数(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "箱数")
|
||||
private BigDecimal boxCount;
|
||||
|
||||
@ApiModelProperty("件数(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "件数")
|
||||
private BigDecimal pieceCount;
|
||||
|
||||
@ApiModelProperty("入库数量(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "入库数量")
|
||||
private BigDecimal inboundQuantity;
|
||||
|
||||
@ApiModelProperty("出库数量(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "出库数量")
|
||||
private BigDecimal outboundQuantity;
|
||||
|
||||
@ApiModelProperty("总净重(KG)(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "总净重(KG)")
|
||||
private BigDecimal totalNetWeight;
|
||||
|
||||
@ApiModelProperty("总毛重(KG)(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private BigDecimal totalGrossWeight;
|
||||
|
||||
@ApiModelProperty("总体积(CBM)(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private BigDecimal totalVolume;
|
||||
|
||||
@ApiModelProperty("总面积(SQM)(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea;
|
||||
|
||||
@ApiModelProperty("总价(输入大于等于0的数字,可以为小数)")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
@ApiModelProperty("合同收费")
|
||||
@Excel(name = "合同收费")
|
||||
private BigDecimal contractFee;
|
||||
|
||||
@ApiModelProperty("每月仓租")
|
||||
@Excel(name = "每月仓租")
|
||||
private BigDecimal monthlyWarehouseFee;
|
||||
|
||||
@ApiModelProperty("半月仓租")
|
||||
@Excel(name = "半月仓租")
|
||||
private BigDecimal halfMonthWhFee;
|
||||
|
||||
@ApiModelProperty("折扣(%)")
|
||||
@Excel(name = "折扣(%)")
|
||||
private BigDecimal discountRate;
|
||||
|
||||
@ApiModelProperty("单体积(CBM)")
|
||||
@Excel(name = "单体积(CBM)")
|
||||
private BigDecimal singleVolume;
|
||||
|
||||
@ApiModelProperty("单毛重(KG)")
|
||||
@Excel(name = "单毛重(KG)")
|
||||
private BigDecimal singleGrossWeight;
|
||||
|
||||
@ApiModelProperty("lot编号")
|
||||
@Excel(name = "lot编号")
|
||||
private String lotNo;
|
||||
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.mhd.oms.domain.reservationInMaterialDetail.service;
|
||||
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细ApplicationService
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ReservationInMaterialDetailApplicationService {
|
||||
@Autowired
|
||||
private ReservationInMaterialDetailDomainService inMaterialDetailDomainService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
|
||||
public List<ReservationInMaterialDetailPO> queryList(ReservationInMaterialDetailDO inMaterialDetailDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null){
|
||||
Long topOrganizationId = loginUser.getUserPo().getTopOrganizationId();
|
||||
if (topOrganizationId != null && topOrganizationId != 1){
|
||||
inMaterialDetailDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
}
|
||||
}
|
||||
return inMaterialDetailDomainService.queryList(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
public Boolean insert(ReservationInMaterialDetailDO inMaterialDetailDO) {
|
||||
|
||||
return inMaterialDetailDomainService.insert(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean update(ReservationInMaterialDetailDO inMaterialDetailDO) {
|
||||
return inMaterialDetailDomainService.update(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
public boolean delete(Long[] materialDetailIds) {
|
||||
return inMaterialDetailDomainService.delete(materialDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物料明细详细信息
|
||||
*/
|
||||
public ReservationInMaterialDetailPO getInfo(Long materialDetailId)
|
||||
{
|
||||
return inMaterialDetailDomainService.getInfo(materialDetailId);
|
||||
}
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.oms.domain.reservationInMaterialDetail.service;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 物料明细Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Component
|
||||
public class ReservationInMaterialDetailAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ReservationInMaterialDetailDO toDO(ReservationInMaterialDetailDTO inMaterialDetailDTO) {
|
||||
ReservationInMaterialDetailDO inMaterialDetailDO = new ReservationInMaterialDetailDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(inMaterialDetailDTO, inMaterialDetailDO, IgnoreNullUtil.getNullPropertyNames(inMaterialDetailDTO));
|
||||
return inMaterialDetailDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ReservationInMaterialDetailDO toDOByEdit(ReservationInMaterialDetailDTO inMaterialDetailDTO) {
|
||||
ReservationInMaterialDetailDO inMaterialDetailDO = new ReservationInMaterialDetailDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(inMaterialDetailDTO, inMaterialDetailDO, IgnoreNullUtil.getNullPropertyNames(inMaterialDetailDTO));
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
String userName = loginUser.getUsername();
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
if(inMaterialDetailDTO.getMaterialDetailId() != null){
|
||||
inMaterialDetailDO.setUpdateBy(userId);
|
||||
inMaterialDetailDO.setUpdateByName(userName);
|
||||
inMaterialDetailDO.setUpdateTime(new Date());
|
||||
}else {
|
||||
inMaterialDetailDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
inMaterialDetailDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
inMaterialDetailDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
inMaterialDetailDO.setCreateBy(userId);
|
||||
inMaterialDetailDO.setCreateByName(userName);
|
||||
inMaterialDetailDO.setCreateTime(new Date());
|
||||
inMaterialDetailDO.setDelFlag(1);
|
||||
}
|
||||
return inMaterialDetailDO;
|
||||
}
|
||||
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.mhd.oms.domain.reservationInMaterialDetail.service;
|
||||
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.facade.IReservationInMaterialDetailService;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ReservationInMaterialDetailDomainService {
|
||||
|
||||
@Autowired
|
||||
private IReservationInMaterialDetailService materialDetailService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
public List<com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO> queryList(ReservationInMaterialDetailDO inMaterialDetailDO) {
|
||||
return materialDetailService.queryList(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
public Boolean insert(ReservationInMaterialDetailDO inMaterialDetailDO) {
|
||||
|
||||
return materialDetailService.insert(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean update(ReservationInMaterialDetailDO inMaterialDetailDO) {
|
||||
return materialDetailService.update(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
public Boolean delete(Long[] materialDetailIds) {
|
||||
return materialDetailService.delete(materialDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物料明细详细信息
|
||||
*/
|
||||
public com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO getInfo(Long materialDetailId)
|
||||
{
|
||||
return materialDetailService.getInfo(materialDetailId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+355
@@ -0,0 +1,355 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
* 入库单对象 stock_in_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ReservationStockInOrder extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("入库单id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long inOrderId;
|
||||
|
||||
@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 warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("通知单号")
|
||||
@Excel(name = "通知单号")
|
||||
private String noticeNumber;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库 6-已取消 7-已关闭")
|
||||
@Excel(name = "入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库 6-已取消 7-已关闭")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
@Excel(name = "入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
private Integer auditStatus;
|
||||
|
||||
@ApiModelProperty("入库单审核备注")
|
||||
@Excel(name = "入库单审核备注")
|
||||
private String auditRemark;
|
||||
|
||||
@ApiModelProperty("入库单审核人")
|
||||
@Excel(name = "入库单审核人")
|
||||
private Long auditBy;
|
||||
|
||||
@ApiModelProperty("入库单审核人姓名")
|
||||
@Excel(name = "入库单审核人姓名")
|
||||
private String auditByName;
|
||||
|
||||
@ApiModelProperty("入库单审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "入库单审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date auditTime;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("入库单类型编码")
|
||||
@Excel(name = "入库单类型编码")
|
||||
private String orderTypeCode;
|
||||
|
||||
@ApiModelProperty("入库单类型名称")
|
||||
@Excel(name = "入库单类型名称")
|
||||
private String orderTypeName;
|
||||
|
||||
@ApiModelProperty("供应商id")
|
||||
@Excel(name = "供应商id")
|
||||
private Long supplierId;
|
||||
|
||||
@ApiModelProperty("供应商编码")
|
||||
@Excel(name = "供应商编码")
|
||||
private String supplierCode;
|
||||
|
||||
@ApiModelProperty("供应商名称")
|
||||
@Excel(name = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty("预计到货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("供应链订单号")
|
||||
@Excel(name = "供应链订单号")
|
||||
private String supplyChainNumber;
|
||||
|
||||
@ApiModelProperty("优先级别编码")
|
||||
@Excel(name = "优先级别编码")
|
||||
private String priorityLevelCode;
|
||||
|
||||
@ApiModelProperty("优先级别名称")
|
||||
@Excel(name = "优先级别名称")
|
||||
private String priorityLevelName;
|
||||
|
||||
@ApiModelProperty("是否直接入库: 1-是 2-否")
|
||||
@Excel(name = "是否直接入库: 1-是 2-否")
|
||||
private Integer directWarehouse;
|
||||
|
||||
@ApiModelProperty("附件url")
|
||||
@Excel(name = "附件url")
|
||||
private String annexUrl;
|
||||
|
||||
@ApiModelProperty("物料种数")
|
||||
@Excel(name = "物料种数")
|
||||
private Integer materialQuantity;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("净重 单位:千克")
|
||||
@Excel(name = "净重 单位:千克")
|
||||
private BigDecimal weightLimit;
|
||||
|
||||
@ApiModelProperty("体积 单位:立方米")
|
||||
@Excel(name = "体积 单位:立方米")
|
||||
private BigDecimal volumeLimit;
|
||||
|
||||
@ApiModelProperty("是否取消订单: 1-是 2-否")
|
||||
@Excel(name = "是否取消订单: 1-是 2-否")
|
||||
private Integer cancelOrder;
|
||||
|
||||
@ApiModelProperty("取消订单备注")
|
||||
@Excel(name = "取消订单备注")
|
||||
private String cancelRemark;
|
||||
|
||||
@ApiModelProperty("取消订单人")
|
||||
@Excel(name = "取消订单人")
|
||||
private Long cancelBy;
|
||||
|
||||
@ApiModelProperty("取消订单人姓名")
|
||||
@Excel(name = "取消订单人姓名")
|
||||
private String cancelByName;
|
||||
|
||||
@ApiModelProperty("取消订单时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "取消订单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date cancelTime;
|
||||
|
||||
@ApiModelProperty("是否关闭订单: 1-是 2-否")
|
||||
@Excel(name = "是否关闭订单: 1-是 2-否")
|
||||
private Integer closeOrder;
|
||||
|
||||
@ApiModelProperty("关闭订单备注")
|
||||
@Excel(name = "关闭订单备注")
|
||||
private String closeRemark;
|
||||
|
||||
@ApiModelProperty("关闭订单人")
|
||||
@Excel(name = "关闭订单人")
|
||||
private Long closeBy;
|
||||
|
||||
@ApiModelProperty("关闭订单人姓名")
|
||||
@Excel(name = "关闭订单人姓名")
|
||||
private String closeByName;
|
||||
|
||||
@ApiModelProperty("关闭订单时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "关闭订单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date closeTime;
|
||||
|
||||
@ApiModelProperty("入库单来源: 1-正常录入 2-通知单生成 3-无单收货")
|
||||
@Excel(name = "入库单来源: 1-正常录入 2-通知单生成 3-无单收货")
|
||||
private Integer orderSource;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("调度单号")
|
||||
private String mobilizeCode;
|
||||
|
||||
@ApiModelProperty("越库单id")
|
||||
private Long overStockId;
|
||||
|
||||
@ApiModelProperty("越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
@Excel(name = "越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
private Integer overStockStatus;
|
||||
|
||||
@ApiModelProperty("越库类型:1-直接越库 2-分拨越库")
|
||||
@Excel(name = "越库类型:1-直接越库 2-分拨越库")
|
||||
private Long overStockType;
|
||||
|
||||
// ========== 报关相关字段 ==========
|
||||
@ApiModelProperty("To")
|
||||
@Excel(name = "To")
|
||||
@TableField(value = "\"TO\"")
|
||||
private String to;
|
||||
|
||||
@ApiModelProperty("联系人")
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
@ApiModelProperty("车型及车牌")
|
||||
@Excel(name = "车型及车牌")
|
||||
private String vehicleInfo;
|
||||
|
||||
@ApiModelProperty("委托编号NO")
|
||||
@Excel(name = "委托编号NO")
|
||||
private String consignmentNo;
|
||||
|
||||
@ApiModelProperty("Tel")
|
||||
@Excel(name = "Tel")
|
||||
private String tel;
|
||||
|
||||
@ApiModelProperty("司机签名")
|
||||
@Excel(name = "司机签名")
|
||||
private String driverSignature;
|
||||
|
||||
@ApiModelProperty("Fax")
|
||||
@Excel(name = "Fax")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("申报地关区")
|
||||
@Excel(name = "申报地关区")
|
||||
private String declarationArea;
|
||||
|
||||
@ApiModelProperty("生产商")
|
||||
@Excel(name = "生产商")
|
||||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty("报关员姓名及联系方式")
|
||||
@Excel(name = "报关员姓名及联系方式")
|
||||
private String customsBrokerInfo;
|
||||
|
||||
@ApiModelProperty("送货地址")
|
||||
@Excel(name = "送货地址")
|
||||
private String deliveryAddress;
|
||||
|
||||
@ApiModelProperty("进出境关别")
|
||||
@Excel(name = "进出境关别")
|
||||
private String entryExitCustoms;
|
||||
|
||||
@ApiModelProperty("起运/运抵国(地区)")
|
||||
@Excel(name = "起运/运抵国(地区)")
|
||||
private String originDestinationCountry;
|
||||
|
||||
@ApiModelProperty("承运商")
|
||||
@Excel(name = "承运商")
|
||||
private String carrier;
|
||||
|
||||
@ApiModelProperty("柜号")
|
||||
@Excel(name = "柜号")
|
||||
private String containerNo;
|
||||
|
||||
@ApiModelProperty("运输方式")
|
||||
@Excel(name = "运输方式")
|
||||
private String transportMethod;
|
||||
|
||||
@ApiModelProperty("监管方式")
|
||||
@Excel(name = "监管方式")
|
||||
private String supervisionMethod;
|
||||
|
||||
@ApiModelProperty("海关是否查验货物")
|
||||
@Excel(name = "海关是否查验货物")
|
||||
private Integer customsInspection;
|
||||
|
||||
@ApiModelProperty("是否需要报关")
|
||||
@Excel(name = "是否需要报关")
|
||||
private Integer needCustomsDeclaration;
|
||||
|
||||
@ApiModelProperty("是否需要运输")
|
||||
@Excel(name = "是否需要运输")
|
||||
private Integer needTransport;
|
||||
|
||||
@ApiModelProperty("入仓日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "入仓日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date warehouseDate;
|
||||
|
||||
@ApiModelProperty("完成时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date completionTime;
|
||||
|
||||
@ApiModelProperty("下单日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下单日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderDate;
|
||||
|
||||
@ApiModelProperty("业务单号")
|
||||
@Excel(name = "业务单号")
|
||||
private String businessOrderNo;
|
||||
|
||||
@ApiModelProperty("业务类型")
|
||||
@Excel(name = "业务类型")
|
||||
private String businessType;
|
||||
|
||||
@ApiModelProperty("制单人")
|
||||
@Excel(name = "制单人")
|
||||
private String documentCreator;
|
||||
|
||||
@ApiModelProperty("制单人名称")
|
||||
@Excel(name = "制单人名称")
|
||||
private String documentCreatorName;
|
||||
|
||||
@ApiModelProperty("制单日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "制单日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date documentDate;
|
||||
|
||||
@ApiModelProperty("订单状态")
|
||||
@Excel(name = "订单状态")
|
||||
private String orderStatus;
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.entity.ReservationStockInOrder;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.ReservationStockInOrderPO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDO;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库单Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface IReservationStockInOrderService extends IService<ReservationStockInOrder>
|
||||
{
|
||||
/**
|
||||
* 分页查询入库单列表
|
||||
*/
|
||||
public List<ReservationStockInOrderPO> queryList(ReservationStockInOrderDO stockInOrderDO);
|
||||
|
||||
/**
|
||||
* 新增入库单
|
||||
*/
|
||||
public Boolean insert(ReservationStockInOrderDO stockInOrderDO);
|
||||
|
||||
/**
|
||||
* 修改入库单
|
||||
*/
|
||||
public Boolean update(ReservationStockInOrderDO stockInOrderDO);
|
||||
|
||||
/**
|
||||
* 批量删除入库单
|
||||
*/
|
||||
public Boolean delete(Long[] inOrderIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询入库单
|
||||
*/
|
||||
public ReservationStockInOrderPO getInfo(Long inOrderId);
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.entity.ReservationStockInOrder;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialGoodsRulePO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialWarehouseControlPO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.ReservationStockInOrderPO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库单Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface ReservationStockInOrderMapper extends BaseMapper<ReservationStockInOrder>
|
||||
{
|
||||
/**
|
||||
* 查询入库单列表
|
||||
*/
|
||||
public List<ReservationStockInOrderPO> queryList(ReservationStockInOrderDO stockInOrderDO);
|
||||
|
||||
public MaterialBaseInfoPO getinfo(@Param("id") Long id);
|
||||
|
||||
public MaterialWarehouseControlPO getInfoByMaterialBaseInfoIds(@Param("id") Long id);
|
||||
|
||||
public MaterialGoodsRulePO getGoodsInfoByMaterialBaseInfoIds(@Param("id") Long id);
|
||||
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.entity.ReservationStockInOrder;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.facade.IReservationStockInOrderService;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.mapper.ReservationStockInOrderMapper;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.ReservationStockInOrderPO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库单Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Service
|
||||
public class ReservationStockInOrderImpl extends ServiceImpl<ReservationStockInOrderMapper, ReservationStockInOrder> implements IReservationStockInOrderService {
|
||||
@Autowired
|
||||
private ReservationStockInOrderMapper stockInOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询入库单列表
|
||||
*/
|
||||
@Override
|
||||
public List<ReservationStockInOrderPO> queryList(ReservationStockInOrderDO stockInOrderDO)
|
||||
{
|
||||
return stockInOrderMapper.queryList(stockInOrderDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库单
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean insert(ReservationStockInOrderDO stockInOrderDO) {
|
||||
ReservationStockInOrder stockInOrder = new ReservationStockInOrder();
|
||||
BeanUtils.copyProperties(stockInOrderDO,stockInOrder);
|
||||
return this.save(stockInOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean update(ReservationStockInOrderDO stockInOrderDO) {
|
||||
ReservationStockInOrder stockInOrder = new ReservationStockInOrder();
|
||||
BeanUtils.copyProperties(stockInOrderDO,stockInOrder);
|
||||
return this.updateById(stockInOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库单
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] inOrderIds ) {
|
||||
List<ReservationStockInOrder> list = new ArrayList<>();
|
||||
for (Long id : inOrderIds) {
|
||||
ReservationStockInOrder stockInOrder = new ReservationStockInOrder();
|
||||
stockInOrder.setInOrderId(id);
|
||||
stockInOrder.setDelFlag(2);
|
||||
list.add(stockInOrder);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单
|
||||
*/
|
||||
@Override
|
||||
public ReservationStockInOrderPO getInfo(Long inOrderId) {
|
||||
ReservationStockInOrder stockInOrder = this.getById(inOrderId);
|
||||
ReservationStockInOrderPO stockInOrderPO = new ReservationStockInOrderPO();
|
||||
BeanUtils.copyProperties(stockInOrder,stockInOrderPO);
|
||||
return stockInOrderPO;
|
||||
}
|
||||
}
|
||||
+242
@@ -0,0 +1,242 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.repository.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.handler.ListTypeHandler;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 物料基础信息对象 material_base_info
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "物料基础信息对象", description = "物料基础信息响应对象")
|
||||
public class MaterialBaseInfoPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("物料基础信息id")
|
||||
private Long materialBaseInfoId;
|
||||
|
||||
@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 shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("物料编码")
|
||||
@Excel(name = "物料编码")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("物料名称")
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("物料分类编码")
|
||||
@TableField(typeHandler = ListTypeHandler.class)
|
||||
private List<String> materialClassifyCode;
|
||||
|
||||
@ApiModelProperty("物料分类名称")
|
||||
@TableField(typeHandler = ListTypeHandler.class)
|
||||
private List<String> materialClassifyName;
|
||||
|
||||
@ApiModelProperty("物料分类编码(导出用,逗号分隔)")
|
||||
@Excel(name = "物料分类编码")
|
||||
private String materialClassifyCodeStr;
|
||||
|
||||
@ApiModelProperty("物料分类名称(导出用,逗号分隔)")
|
||||
@Excel(name = "物料分类名称")
|
||||
private String materialClassifyNameStr;
|
||||
|
||||
@ApiModelProperty("物料种类编码 数据字典")
|
||||
@Excel(name = "物料种类编码 数据字典")
|
||||
private String materialType;
|
||||
|
||||
@ApiModelProperty("物料种类名称 数据字典")
|
||||
@Excel(name = "物料种类名称 数据字典")
|
||||
private String materialTypeName;
|
||||
|
||||
@ApiModelProperty("包装规格id")
|
||||
@Excel(name = "包装规格id")
|
||||
private Long packId;
|
||||
|
||||
@ApiModelProperty("包装规格编码")
|
||||
@Excel(name = "包装规格编码")
|
||||
private String packCode;
|
||||
|
||||
@ApiModelProperty("包装规格名称")
|
||||
@Excel(name = "包装规格名称")
|
||||
private String packName;
|
||||
|
||||
@ApiModelProperty("包装单位编码")
|
||||
@Excel(name = "包装单位编码")
|
||||
private String unitCode;
|
||||
|
||||
@ApiModelProperty("包装单位名称")
|
||||
@Excel(name = "包装单位名称")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty("品牌id")
|
||||
@Excel(name = "品牌id")
|
||||
private Long brandId;
|
||||
|
||||
@ApiModelProperty("品牌编码")
|
||||
@Excel(name = "品牌编码")
|
||||
private String brandCode;
|
||||
|
||||
@ApiModelProperty("品牌名称")
|
||||
@Excel(name = "品牌名称")
|
||||
private String brandName;
|
||||
|
||||
@ApiModelProperty("保质期 单位:天")
|
||||
@Excel(name = "保质期 单位:天")
|
||||
private Long shelfLife;
|
||||
|
||||
@ApiModelProperty("净重 单位:千克")
|
||||
@Excel(name = "净重 单位:千克")
|
||||
private BigDecimal weightLimit;
|
||||
|
||||
@ApiModelProperty("体积 单位:立方米")
|
||||
@Excel(name = "体积 单位:立方米")
|
||||
private BigDecimal volumeLimit;
|
||||
|
||||
@ApiModelProperty("商品形态编码 数据字典")
|
||||
@Excel(name = "商品形态编码 数据字典")
|
||||
private String materialShape;
|
||||
|
||||
@ApiModelProperty("商品形态名称 数据字典")
|
||||
@Excel(name = "商品形态名称 数据字典")
|
||||
private String materialShapeName;
|
||||
|
||||
@ApiModelProperty("物料大小 长*宽*高 单位:米")
|
||||
@Excel(name = "物料大小 长*宽*高 单位:米")
|
||||
private String materialSize;
|
||||
|
||||
@ApiModelProperty("物料大小-长 单位:米")
|
||||
@Excel(name = "物料大小-长 单位:米")
|
||||
private BigDecimal materialLength;
|
||||
|
||||
@ApiModelProperty("物料大小-宽 单位:米")
|
||||
@Excel(name = "物料大小-宽 单位:米")
|
||||
private BigDecimal materialWidth;
|
||||
|
||||
@ApiModelProperty("物料大小-高 单位:米")
|
||||
@Excel(name = "物料大小-高 单位:米")
|
||||
private BigDecimal materialHeight;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("是否作废: 1-是 2-否")
|
||||
@Excel(name = "是否作废: 1-是 2-否")
|
||||
private Integer nullify;
|
||||
|
||||
@ApiModelProperty("单位数量")
|
||||
@Excel(name = "单位数量")
|
||||
private BigDecimal unitNumber;
|
||||
|
||||
@ApiModelProperty("商品规则")
|
||||
private MaterialGoodsRulePO materialGoodsRule;
|
||||
//
|
||||
// @ApiModelProperty("公共信息")
|
||||
// private MaterialCommonPO materialCommon;
|
||||
|
||||
@ApiModelProperty("仓库控制信息")
|
||||
private MaterialWarehouseControlPO materialWarehouseControl;
|
||||
//
|
||||
// @ApiModelProperty("库存预警信息")
|
||||
// private List<MaterialInventoryWarningPO> materialInventoryWarningList;
|
||||
|
||||
// @ApiModelProperty("条码信息")
|
||||
// private List<MaterialBarCodePO> materialBarCodeList;
|
||||
//
|
||||
// @ApiModelProperty("物料批次属性")
|
||||
// private List<MaterialMoreDetailPO> materialMoreDetailList;
|
||||
|
||||
@ApiModelProperty("是否公用: 1-是 2-否")
|
||||
@Excel(name = "是否公用: 1-是 2-否")
|
||||
private Integer common;
|
||||
|
||||
|
||||
@ApiModelProperty("SKU码")
|
||||
private String skuCode;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
@ApiModelProperty("币制")
|
||||
private String currency;
|
||||
|
||||
@ApiModelProperty("原产国")
|
||||
private String originCountry;
|
||||
|
||||
@ApiModelProperty("HS码")
|
||||
private String hsCode;
|
||||
|
||||
@ApiModelProperty("申报单位")
|
||||
private String declarationUnit;
|
||||
|
||||
@ApiModelProperty("法定单位")
|
||||
private String statutoryUnit;
|
||||
|
||||
@ApiModelProperty("法定第二单位")
|
||||
private String statutorySecondUnit;
|
||||
|
||||
@ApiModelProperty("规格型号")
|
||||
private String specificationModel;
|
||||
|
||||
@ApiModelProperty("批次ID")
|
||||
@Excel(name = "批次ID")
|
||||
private Long batchId;
|
||||
|
||||
@ApiModelProperty("批次编码")
|
||||
@Excel(name = "批次编码")
|
||||
private String batchCode;
|
||||
|
||||
@ApiModelProperty("批次名称")
|
||||
@Excel(name = "批次名称")
|
||||
private String batchName;
|
||||
|
||||
@ApiModelProperty("库存预警数量")
|
||||
@Excel(name = "库存预警数量")
|
||||
private Integer inventoryWarningCount;
|
||||
|
||||
@ApiModelProperty("临期预警数量")
|
||||
@Excel(name = "临期预警数量")
|
||||
private Integer expirationWarningCount;
|
||||
//库存件数
|
||||
private BigDecimal stockQuantity;
|
||||
|
||||
}
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 物料商品规则对象 material_goods_rule
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "物料商品规则对象", description = "物料商品规则响应对象")
|
||||
public class MaterialGoodsRulePO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("商品规则id")
|
||||
private Long materialGoodsRuleId;
|
||||
|
||||
@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 materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("批次id")
|
||||
@Excel(name = "批次id")
|
||||
private Long batchId;
|
||||
|
||||
@ApiModelProperty("批次编码")
|
||||
@Excel(name = "批次编码")
|
||||
private String batchCode;
|
||||
|
||||
@ApiModelProperty("批次名称")
|
||||
@Excel(name = "批次名称")
|
||||
private String batchName;
|
||||
|
||||
@ApiModelProperty("上架库区id")
|
||||
@Excel(name = "上架库区id")
|
||||
private Long storageSectionId;
|
||||
|
||||
@ApiModelProperty("上架库区编码")
|
||||
@Excel(name = "上架库区编码")
|
||||
private String storageCode;
|
||||
|
||||
@ApiModelProperty("上架库区名称")
|
||||
@Excel(name = "上架库区名称")
|
||||
private String storageName;
|
||||
|
||||
@ApiModelProperty("上架库位id")
|
||||
@Excel(name = "上架库位id")
|
||||
private Long storageLocationId;
|
||||
|
||||
@ApiModelProperty("上架库位编码")
|
||||
@Excel(name = "上架库位编码")
|
||||
private String storageLocationCode;
|
||||
|
||||
@ApiModelProperty("上架库位名称")
|
||||
@Excel(name = "上架库位名称")
|
||||
private String storageLocationName;
|
||||
|
||||
@ApiModelProperty("上架规则id")
|
||||
@Excel(name = "上架规则id")
|
||||
private Long ruleId;
|
||||
|
||||
@ApiModelProperty("上架规则编码")
|
||||
@Excel(name = "上架规则编码")
|
||||
private String ruleCode;
|
||||
|
||||
@ApiModelProperty("上架规则名称")
|
||||
@Excel(name = "上架规则名称")
|
||||
private String ruleName;
|
||||
|
||||
@ApiModelProperty("上架库位指定规则id")
|
||||
@Excel(name = "上架库位指定规则id")
|
||||
private Long specifyRuleId;
|
||||
|
||||
@ApiModelProperty("上架库位指定规则编码")
|
||||
@Excel(name = "上架库位指定规则编码")
|
||||
private String specifyRuleCode;
|
||||
|
||||
@ApiModelProperty("上架库位指定规则名称")
|
||||
@Excel(name = "上架库位指定规则名称")
|
||||
private String specifyRuleName;
|
||||
|
||||
@ApiModelProperty("周转规则id")
|
||||
@Excel(name = "周转规则id")
|
||||
private Long turnoverRuleId;
|
||||
|
||||
@ApiModelProperty("周转规则编码")
|
||||
@Excel(name = "周转规则编码")
|
||||
private String turnoverRuleCode;
|
||||
|
||||
@ApiModelProperty("周转规则名称")
|
||||
@Excel(name = "周转规则名称")
|
||||
private String turnoverRuleName;
|
||||
|
||||
@ApiModelProperty("分配规则id")
|
||||
@Excel(name = "分配规则id")
|
||||
private Long distributeRuleId;
|
||||
|
||||
@ApiModelProperty("分配规则编码")
|
||||
@Excel(name = "分配规则编码")
|
||||
private String distributeRuleCode;
|
||||
|
||||
@ApiModelProperty("分配规则名称")
|
||||
@Excel(name = "分配规则名称")
|
||||
private String distributeRuleName;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* 仓库控制信息对象 material_warehouse_control
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "仓库控制信息对象", description = "仓库控制信息响应对象")
|
||||
public class MaterialWarehouseControlPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("商品规则id")
|
||||
private Long materialWarehouseControlId;
|
||||
|
||||
@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 materialBaseInfoId;
|
||||
|
||||
@ApiModelProperty("是否效期控制: 1-是 2-否")
|
||||
@Excel(name = "是否效期控制: 1-是 2-否")
|
||||
private Integer temperatureControl;
|
||||
|
||||
@ApiModelProperty("周期类型: 1-生产日期 2-失效日期")
|
||||
@Excel(name = "周期类型: 1-生产日期 2-失效日期")
|
||||
private Integer cycleType;
|
||||
|
||||
@ApiModelProperty("入库效期 单位:天")
|
||||
@Excel(name = "入库效期 单位:天")
|
||||
private Integer inValidityPeriod;
|
||||
|
||||
@ApiModelProperty("入库效期 单位:天")
|
||||
@Excel(name = "入库效期 单位:天")
|
||||
private Integer outValidityPeriod;
|
||||
|
||||
@ApiModelProperty("是否允许超收: 1-是 2-否")
|
||||
@Excel(name = "是否允许超收: 1-是 2-否")
|
||||
private Integer allowOvercharge;
|
||||
|
||||
@ApiModelProperty("超收比例")
|
||||
@Excel(name = "超收比例")
|
||||
private BigDecimal overchargeRatio;
|
||||
|
||||
@ApiModelProperty("ABC分类:A-A类 B-B类 C-C类")
|
||||
@Excel(name = "ABC分类:A-A类 B-B类 C-C类")
|
||||
private String classify;
|
||||
|
||||
@ApiModelProperty("是否序列号管理: 1-是 2-否")
|
||||
@Excel(name = "是否序列号管理: 1-是 2-否")
|
||||
private Integer serialNumberManage;
|
||||
|
||||
@ApiModelProperty("是否质检管理: 1-是 2-否")
|
||||
@Excel(name = "是否质检管理: 1-是 2-否")
|
||||
private Integer qualityInspectionManage;
|
||||
|
||||
@ApiModelProperty("质检阶段: 1-收货前 2-收货后上架前")
|
||||
@Excel(name = "质检阶段: 1-收货前 2-收货后上架前")
|
||||
private Integer qualityInspectionStage;
|
||||
|
||||
@ApiModelProperty("质检规则: 1-全检 2-抽检 ")
|
||||
@Excel(name = "质检规则: 1-全检 2-抽检 ")
|
||||
private Integer qualityInspectionRule;
|
||||
|
||||
@ApiModelProperty("质检项: 1-包装 2-纯度")
|
||||
@Excel(name = "质检项: 1-包装 2-纯度")
|
||||
private Integer qualityInspectionTerm;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.repository.po;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title StockInOrderBasePO
|
||||
* @description: TODO
|
||||
* @date 2024/5/22 11:50
|
||||
**/
|
||||
@Data
|
||||
public class ReservationStockInOrderBasePO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty("通知单号")
|
||||
@Excel(name = "通知单号")
|
||||
private String noticeNumber;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主code")
|
||||
@Excel(name = "货主code")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("入库单类型编码")
|
||||
@Excel(name = "入库单类型编码")
|
||||
private String orderTypeCode;
|
||||
|
||||
@ApiModelProperty("入库单类型名称")
|
||||
@Excel(name = "入库单类型名称")
|
||||
private String orderTypeName;
|
||||
|
||||
@ApiModelProperty("供应商id")
|
||||
@Excel(name = "供应商id")
|
||||
private Long supplierId;
|
||||
|
||||
@ApiModelProperty("供应商编码")
|
||||
@Excel(name = "供应商编码")
|
||||
private String supplierCode;
|
||||
|
||||
@ApiModelProperty("供应商名称")
|
||||
@Excel(name = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty("预计到货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("供应链订单号")
|
||||
@Excel(name = "供应链订单号")
|
||||
private String supplyChainNumber;
|
||||
|
||||
@ApiModelProperty("优先级别编码")
|
||||
@Excel(name = "优先级别编码")
|
||||
private String priorityLevelCode;
|
||||
|
||||
@ApiModelProperty("优先级别名称")
|
||||
@Excel(name = "优先级别名称")
|
||||
private String priorityLevelName;
|
||||
|
||||
@ApiModelProperty("是否直接入库: 1-是 2-否")
|
||||
@Excel(name = "是否直接入库: 1-是 2-否")
|
||||
private Integer directWarehouse;
|
||||
|
||||
@ApiModelProperty("附件url")
|
||||
@Excel(name = "附件url")
|
||||
private String annexUrl;
|
||||
|
||||
@ApiModelProperty("物料种数")
|
||||
@Excel(name = "物料种数")
|
||||
private Integer materialQuantity;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("净重 单位:千克")
|
||||
@Excel(name = "净重 单位:千克")
|
||||
private BigDecimal weightLimit;
|
||||
|
||||
@ApiModelProperty("体积 单位:立方米")
|
||||
@Excel(name = "体积 单位:立方米")
|
||||
private BigDecimal volumeLimit;
|
||||
|
||||
}
|
||||
+376
@@ -0,0 +1,376 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.repository.po;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO;
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
* 入库单对象 stock_in_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "入库单对象", description = "入库单响应对象")
|
||||
public class ReservationStockInOrderPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("入库单id")
|
||||
private Long inOrderId;
|
||||
|
||||
@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 warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("通知单号")
|
||||
@Excel(name = "通知单号")
|
||||
private String noticeNumber;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
@Excel(name = "入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
@Excel(name = "入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
private Integer auditStatus;
|
||||
|
||||
@ApiModelProperty("入库单审核备注")
|
||||
@Excel(name = "入库单审核备注")
|
||||
private String auditRemark;
|
||||
|
||||
@ApiModelProperty("入库单审核人")
|
||||
@Excel(name = "入库单审核人")
|
||||
private Long auditBy;
|
||||
|
||||
@ApiModelProperty("入库单审核人姓名")
|
||||
@Excel(name = "入库单审核人姓名")
|
||||
private String auditByName;
|
||||
|
||||
@ApiModelProperty("入库单审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "入库单审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date auditTime;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("入库单类型编码")
|
||||
@Excel(name = "入库单类型编码")
|
||||
private String orderTypeCode;
|
||||
|
||||
@ApiModelProperty("入库单类型名称")
|
||||
@Excel(name = "入库单类型名称")
|
||||
private String orderTypeName;
|
||||
|
||||
@ApiModelProperty("供应商id")
|
||||
@Excel(name = "供应商id")
|
||||
private Long supplierId;
|
||||
|
||||
@ApiModelProperty("供应商编码")
|
||||
@Excel(name = "供应商编码")
|
||||
private String supplierCode;
|
||||
|
||||
@ApiModelProperty("供应商名称")
|
||||
@Excel(name = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty("预计到货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("供应链订单号")
|
||||
@Excel(name = "供应链订单号")
|
||||
private String supplyChainNumber;
|
||||
|
||||
@ApiModelProperty("优先级别编码")
|
||||
@Excel(name = "优先级别编码")
|
||||
private String priorityLevelCode;
|
||||
|
||||
@ApiModelProperty("优先级别名称")
|
||||
@Excel(name = "优先级别名称")
|
||||
private String priorityLevelName;
|
||||
|
||||
@ApiModelProperty("是否直接入库: 1-是 2-否")
|
||||
@Excel(name = "是否直接入库: 1-是 2-否")
|
||||
private Integer directWarehouse;
|
||||
|
||||
@ApiModelProperty("附件url")
|
||||
@Excel(name = "附件url")
|
||||
private String annexUrl;
|
||||
|
||||
@ApiModelProperty("物料种数")
|
||||
@Excel(name = "物料种数")
|
||||
private Integer materialQuantity;
|
||||
|
||||
@ApiModelProperty("计划数量(原字段)")
|
||||
@Excel(name = "计划数量(原字段)")
|
||||
private BigDecimal quantity;
|
||||
|
||||
/**
|
||||
* 计划入库数量:取入库单明细中的入库数量汇总
|
||||
*/
|
||||
@ApiModelProperty("计划入库数量")
|
||||
@Excel(name = "计划入库数量")
|
||||
private BigDecimal planInQuantity;
|
||||
|
||||
/**
|
||||
* 收货数量:入库单对应的收货单实际收货数量汇总
|
||||
*/
|
||||
@ApiModelProperty("收货数量")
|
||||
@Excel(name = "收货数量")
|
||||
private BigDecimal receiptQuantity;
|
||||
|
||||
/**
|
||||
* 上架数量:入库单对应的上架单实际上架数量汇总
|
||||
*/
|
||||
@ApiModelProperty("上架数量")
|
||||
@Excel(name = "上架数量")
|
||||
private BigDecimal shelvesQuantity;
|
||||
|
||||
@ApiModelProperty("净重 单位:千克")
|
||||
@Excel(name = "净重 单位:千克")
|
||||
private BigDecimal weightLimit;
|
||||
|
||||
@ApiModelProperty("体积 单位:立方米")
|
||||
@Excel(name = "体积 单位:立方米")
|
||||
private BigDecimal volumeLimit;
|
||||
|
||||
@ApiModelProperty("是否取消订单: 1-是 2-否")
|
||||
@Excel(name = "是否取消订单: 1-是 2-否")
|
||||
private Integer cancelOrder;
|
||||
|
||||
@ApiModelProperty("取消订单备注")
|
||||
@Excel(name = "取消订单备注")
|
||||
private String cancelRemark;
|
||||
|
||||
@ApiModelProperty("取消订单人")
|
||||
@Excel(name = "取消订单人")
|
||||
private Long cancelBy;
|
||||
|
||||
@ApiModelProperty("取消订单人姓名")
|
||||
@Excel(name = "取消订单人姓名")
|
||||
private String cancelByName;
|
||||
|
||||
@ApiModelProperty("取消订单时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "取消订单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date cancelTime;
|
||||
|
||||
@ApiModelProperty("是否关闭订单: 1-是 2-否")
|
||||
@Excel(name = "是否关闭订单: 1-是 2-否")
|
||||
private Integer closeOrder;
|
||||
|
||||
@ApiModelProperty("关闭订单备注")
|
||||
@Excel(name = "关闭订单备注")
|
||||
private String closeRemark;
|
||||
|
||||
@ApiModelProperty("关闭订单人")
|
||||
@Excel(name = "关闭订单人")
|
||||
private Long closeBy;
|
||||
|
||||
@ApiModelProperty("关闭订单人姓名")
|
||||
@Excel(name = "关闭订单人姓名")
|
||||
private String closeByName;
|
||||
|
||||
@ApiModelProperty("关闭订单时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "关闭订单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date closeTime;
|
||||
|
||||
@ApiModelProperty("入库单来源: 1-正常录入 2-通知单生成 3-无单收货")
|
||||
@Excel(name = "入库单来源: 1-正常录入 2-通知单生成 3-无单收货")
|
||||
private Integer orderSource;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("物料明细")
|
||||
private List<ReservationInMaterialDetailPO> materialDetailList;
|
||||
|
||||
@ApiModelProperty("越库单id")
|
||||
private Long overStockId;
|
||||
|
||||
@ApiModelProperty("越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
@Excel(name = "越库单状态 0:无状态 1:处理中 2:越库完成")
|
||||
private Integer overStockStatus;
|
||||
|
||||
@ApiModelProperty("越库类型:1-直接越库 2-分拨越库")
|
||||
@Excel(name = "越库类型:1-直接越库 2-分拨越库")
|
||||
private Long overStockType;
|
||||
|
||||
// ========== 报关相关字段 ==========
|
||||
@ApiModelProperty("To")
|
||||
@Excel(name = "To")
|
||||
private String to;
|
||||
|
||||
@ApiModelProperty("联系人")
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
@ApiModelProperty("车型及车牌")
|
||||
@Excel(name = "车型及车牌")
|
||||
private String vehicleInfo;
|
||||
|
||||
@ApiModelProperty("委托编号NO")
|
||||
@Excel(name = "委托编号NO")
|
||||
private String consignmentNo;
|
||||
|
||||
@ApiModelProperty("Tel")
|
||||
@Excel(name = "Tel")
|
||||
private String tel;
|
||||
|
||||
@ApiModelProperty("司机签名")
|
||||
@Excel(name = "司机签名")
|
||||
private String driverSignature;
|
||||
|
||||
@ApiModelProperty("Fax")
|
||||
@Excel(name = "Fax")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("申报地关区")
|
||||
@Excel(name = "申报地关区")
|
||||
private String declarationArea;
|
||||
|
||||
@ApiModelProperty("生产商")
|
||||
@Excel(name = "生产商")
|
||||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty("报关员姓名及联系方式")
|
||||
@Excel(name = "报关员姓名及联系方式")
|
||||
private String customsBrokerInfo;
|
||||
|
||||
@ApiModelProperty("送货地址")
|
||||
@Excel(name = "送货地址")
|
||||
private String deliveryAddress;
|
||||
|
||||
@ApiModelProperty("进出境关别")
|
||||
@Excel(name = "进出境关别")
|
||||
private String entryExitCustoms;
|
||||
|
||||
@ApiModelProperty("起运/运抵国(地区)")
|
||||
@Excel(name = "起运/运抵国(地区)")
|
||||
private String originDestinationCountry;
|
||||
|
||||
@ApiModelProperty("承运商")
|
||||
@Excel(name = "承运商")
|
||||
private String carrier;
|
||||
|
||||
@ApiModelProperty("柜号")
|
||||
@Excel(name = "柜号")
|
||||
private String containerNo;
|
||||
|
||||
@ApiModelProperty("运输方式")
|
||||
@Excel(name = "运输方式")
|
||||
private String transportMethod;
|
||||
|
||||
@ApiModelProperty("监管方式")
|
||||
@Excel(name = "监管方式")
|
||||
private String supervisionMethod;
|
||||
|
||||
@ApiModelProperty("海关是否查验货物")
|
||||
@Excel(name = "海关是否查验货物")
|
||||
private Integer customsInspection;
|
||||
|
||||
@ApiModelProperty("是否需要报关")
|
||||
@Excel(name = "是否需要报关")
|
||||
private Integer needCustomsDeclaration;
|
||||
|
||||
@ApiModelProperty("是否需要运输")
|
||||
@Excel(name = "是否需要运输")
|
||||
private Integer needTransport;
|
||||
|
||||
@ApiModelProperty("入仓日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "入仓日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date warehouseDate;
|
||||
|
||||
@ApiModelProperty("完成时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date completionTime;
|
||||
|
||||
@ApiModelProperty("下单日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下单日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderDate;
|
||||
|
||||
|
||||
@ApiModelProperty("业务单号")
|
||||
@Excel(name = "业务单号")
|
||||
private String businessOrderNo;
|
||||
|
||||
@ApiModelProperty("业务类型")
|
||||
@Excel(name = "业务类型")
|
||||
private String businessType;
|
||||
|
||||
@ApiModelProperty("制单人")
|
||||
@Excel(name = "制单人")
|
||||
private String documentCreator;
|
||||
|
||||
@ApiModelProperty("制单人名称")
|
||||
@Excel(name = "制单人名称")
|
||||
private String documentCreatorName;
|
||||
|
||||
@ApiModelProperty("制单日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "制单日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date documentDate;
|
||||
|
||||
@ApiModelProperty("订单状态")
|
||||
@Excel(name = "订单状态")
|
||||
private String orderStatus;
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.repository.todo;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title StockInOrderBasePO
|
||||
* @description: TODO
|
||||
* @date 2024/5/22 11:50
|
||||
**/
|
||||
@Data
|
||||
public class ReservationStockInOrderBaseDO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty("通知单号")
|
||||
@Excel(name = "通知单号")
|
||||
private String noticeNumber;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("入库单类型编码")
|
||||
@Excel(name = "入库单类型编码")
|
||||
private String orderTypeCode;
|
||||
|
||||
@ApiModelProperty("入库单类型名称")
|
||||
@Excel(name = "入库单类型名称")
|
||||
private String orderTypeName;
|
||||
|
||||
@ApiModelProperty("供应商id")
|
||||
@Excel(name = "供应商id")
|
||||
private Long supplierId;
|
||||
|
||||
@ApiModelProperty("供应商编码")
|
||||
@Excel(name = "供应商编码")
|
||||
private String supplierCode;
|
||||
|
||||
@ApiModelProperty("供应商名称")
|
||||
@Excel(name = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty("预计到货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("供应链订单号")
|
||||
@Excel(name = "供应链订单号")
|
||||
private String supplyChainNumber;
|
||||
|
||||
@ApiModelProperty("优先级别编码")
|
||||
@Excel(name = "优先级别编码")
|
||||
private String priorityLevelCode;
|
||||
|
||||
@ApiModelProperty("优先级别名称")
|
||||
@Excel(name = "优先级别名称")
|
||||
private String priorityLevelName;
|
||||
|
||||
@ApiModelProperty("是否直接入库: 1-是 2-否")
|
||||
@Excel(name = "是否直接入库: 1-是 2-否")
|
||||
private Integer directWarehouse;
|
||||
|
||||
@ApiModelProperty("附件url")
|
||||
@Excel(name = "附件url")
|
||||
private String annexUrl;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("净重 单位:千克")
|
||||
@Excel(name = "净重 单位:千克")
|
||||
private BigDecimal weightLimit;
|
||||
|
||||
@ApiModelProperty("体积 单位:立方米")
|
||||
@Excel(name = "体积 单位:立方米")
|
||||
private BigDecimal volumeLimit;
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.repository.todo;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title StockInOrderBasePO
|
||||
* @description: TODO
|
||||
* @date 2024/5/22 11:50
|
||||
**/
|
||||
@Data
|
||||
public class ReservationStockInOrderBaseDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty("通知单号")
|
||||
@Excel(name = "通知单号")
|
||||
private String noticeNumber;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("仓库id")
|
||||
@Excel(name = "仓库id")
|
||||
private Long warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
/**
|
||||
* 兼容前端使用 userName 作为货主名称字段:
|
||||
* 如果请求体中只传了 userName,将在组装器中自动回填到 shipperName。
|
||||
*/
|
||||
@ApiModelProperty("货主名称(兼容字段:userName)")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("入库单类型编码")
|
||||
@Excel(name = "入库单类型编码")
|
||||
private String orderTypeCode;
|
||||
|
||||
@ApiModelProperty("入库单类型名称")
|
||||
@Excel(name = "入库单类型名称")
|
||||
private String orderTypeName;
|
||||
|
||||
@ApiModelProperty("供应商id")
|
||||
@Excel(name = "供应商id")
|
||||
private Long supplierId;
|
||||
|
||||
@ApiModelProperty("供应商编码")
|
||||
@Excel(name = "供应商编码")
|
||||
private String supplierCode;
|
||||
|
||||
@ApiModelProperty("供应商名称")
|
||||
@Excel(name = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty("预计到货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("供应链订单号")
|
||||
@Excel(name = "供应链订单号")
|
||||
private String supplyChainNumber;
|
||||
|
||||
@ApiModelProperty("优先级别编码")
|
||||
@Excel(name = "优先级别编码")
|
||||
private String priorityLevelCode;
|
||||
|
||||
@ApiModelProperty("优先级别名称")
|
||||
@Excel(name = "优先级别名称")
|
||||
private String priorityLevelName;
|
||||
|
||||
@ApiModelProperty("是否直接入库: 1-是 2-否")
|
||||
@Excel(name = "是否直接入库: 1-是 2-否")
|
||||
private Integer directWarehouse;
|
||||
|
||||
@ApiModelProperty("附件url")
|
||||
@Excel(name = "附件url")
|
||||
private String annexUrl;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
}
|
||||
+382
@@ -0,0 +1,382 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO;
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
* 入库单对象 stock_in_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ReservationStockInOrderDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("入库单id")
|
||||
private Long inOrderId;
|
||||
|
||||
@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 warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("通知单号")
|
||||
@Excel(name = "通知单号")
|
||||
private String noticeNumber;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
@Excel(name = "入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
@Excel(name = "入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
private Integer auditStatus;
|
||||
|
||||
@ApiModelProperty("入库单审核备注")
|
||||
@Excel(name = "入库单审核备注")
|
||||
private String auditRemark;
|
||||
|
||||
@ApiModelProperty("入库单审核人")
|
||||
@Excel(name = "入库单审核人")
|
||||
private Long auditBy;
|
||||
|
||||
@ApiModelProperty("入库单审核人姓名")
|
||||
@Excel(name = "入库单审核人姓名")
|
||||
private String auditByName;
|
||||
|
||||
@ApiModelProperty("入库单审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "入库单审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date auditTime;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("入库单类型编码")
|
||||
@Excel(name = "入库单类型编码")
|
||||
private String orderTypeCode;
|
||||
|
||||
@ApiModelProperty("入库单类型名称")
|
||||
@Excel(name = "入库单类型名称")
|
||||
private String orderTypeName;
|
||||
|
||||
@ApiModelProperty("供应商id")
|
||||
@Excel(name = "供应商id")
|
||||
private Long supplierId;
|
||||
|
||||
@ApiModelProperty("供应商编码")
|
||||
@Excel(name = "供应商编码")
|
||||
private String supplierCode;
|
||||
|
||||
@ApiModelProperty("供应商名称")
|
||||
@Excel(name = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty("预计到货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("供应链订单号")
|
||||
@Excel(name = "供应链订单号")
|
||||
private String supplyChainNumber;
|
||||
|
||||
@ApiModelProperty("优先级别编码")
|
||||
@Excel(name = "优先级别编码")
|
||||
private String priorityLevelCode;
|
||||
|
||||
@ApiModelProperty("优先级别名称")
|
||||
@Excel(name = "优先级别名称")
|
||||
private String priorityLevelName;
|
||||
|
||||
@ApiModelProperty("是否直接入库: 1-是 2-否")
|
||||
@Excel(name = "是否直接入库: 1-是 2-否")
|
||||
private Integer directWarehouse;
|
||||
|
||||
@ApiModelProperty("附件url")
|
||||
@Excel(name = "附件url")
|
||||
private String annexUrl;
|
||||
|
||||
@ApiModelProperty("物料种数")
|
||||
@Excel(name = "物料种数")
|
||||
private Integer materialQuantity;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("净重 单位:千克")
|
||||
@Excel(name = "净重 单位:千克")
|
||||
private BigDecimal weightLimit;
|
||||
|
||||
@ApiModelProperty("体积 单位:立方米")
|
||||
@Excel(name = "体积 单位:立方米")
|
||||
private BigDecimal volumeLimit;
|
||||
|
||||
@ApiModelProperty("是否取消订单: 1-是 2-否")
|
||||
@Excel(name = "是否取消订单: 1-是 2-否")
|
||||
private Integer cancelOrder;
|
||||
|
||||
@ApiModelProperty("取消订单备注")
|
||||
@Excel(name = "取消订单备注")
|
||||
private String cancelRemark;
|
||||
|
||||
@ApiModelProperty("取消订单人")
|
||||
@Excel(name = "取消订单人")
|
||||
private Long cancelBy;
|
||||
|
||||
@ApiModelProperty("取消订单人姓名")
|
||||
@Excel(name = "取消订单人姓名")
|
||||
private String cancelByName;
|
||||
|
||||
@ApiModelProperty("取消订单时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "取消订单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date cancelTime;
|
||||
|
||||
@ApiModelProperty("是否关闭订单: 1-是 2-否")
|
||||
@Excel(name = "是否关闭订单: 1-是 2-否")
|
||||
private Integer closeOrder;
|
||||
|
||||
@ApiModelProperty("关闭订单备注")
|
||||
@Excel(name = "关闭订单备注")
|
||||
private String closeRemark;
|
||||
|
||||
@ApiModelProperty("关闭订单人")
|
||||
@Excel(name = "关闭订单人")
|
||||
private Long closeBy;
|
||||
|
||||
@ApiModelProperty("关闭订单人姓名")
|
||||
@Excel(name = "关闭订单人姓名")
|
||||
private String closeByName;
|
||||
|
||||
@ApiModelProperty("关闭订单时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "关闭订单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date closeTime;
|
||||
|
||||
@ApiModelProperty("入库单来源: 1-正常录入 2-通知单生成 3-无单收货")
|
||||
@Excel(name = "入库单来源: 1-正常录入 2-通知单生成 3-无单收货")
|
||||
private Integer orderSource;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("入库单id集合")
|
||||
private List<Long> inOrderIds;
|
||||
|
||||
@ApiModelProperty("物料明细")
|
||||
private List<ReservationInMaterialDetailDO> materialDetailList;
|
||||
|
||||
@ApiModelProperty("小于某个入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
@Excel(name = "小于某个入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
private Integer ltStatus;
|
||||
|
||||
@ApiModelProperty("大于某个入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
@Excel(name = "大于某个入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
private Integer gtStatus;
|
||||
|
||||
@ApiModelProperty("小于入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
@Excel(name = "小于入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
private Integer ltAuditStatus;
|
||||
|
||||
@ApiModelProperty("小于入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
@Excel(name = "小于入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
private Integer gtAuditStatus;
|
||||
|
||||
@ApiModelProperty("调度单号")
|
||||
private String mobilizeCode;
|
||||
|
||||
// ========== 报关相关字段 ==========
|
||||
@ApiModelProperty("To")
|
||||
@Excel(name = "To")
|
||||
private String to;
|
||||
|
||||
@ApiModelProperty("联系人")
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
@ApiModelProperty("车型及车牌")
|
||||
@Excel(name = "车型及车牌")
|
||||
private String vehicleInfo;
|
||||
|
||||
@ApiModelProperty("委托编号NO")
|
||||
@Excel(name = "委托编号NO")
|
||||
private String consignmentNo;
|
||||
|
||||
@ApiModelProperty("Tel")
|
||||
@Excel(name = "Tel")
|
||||
private String tel;
|
||||
|
||||
@ApiModelProperty("司机签名")
|
||||
@Excel(name = "司机签名")
|
||||
private String driverSignature;
|
||||
|
||||
@ApiModelProperty("Fax")
|
||||
@Excel(name = "Fax")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("申报地关区")
|
||||
@Excel(name = "申报地关区")
|
||||
private String declarationArea;
|
||||
|
||||
@ApiModelProperty("生产商")
|
||||
@Excel(name = "生产商")
|
||||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty("报关员姓名及联系方式")
|
||||
@Excel(name = "报关员姓名及联系方式")
|
||||
private String customsBrokerInfo;
|
||||
|
||||
@ApiModelProperty("送货地址")
|
||||
@Excel(name = "送货地址")
|
||||
private String deliveryAddress;
|
||||
|
||||
@ApiModelProperty("进出境关别")
|
||||
@Excel(name = "进出境关别")
|
||||
private String entryExitCustoms;
|
||||
|
||||
@ApiModelProperty("起运/运抵国(地区)")
|
||||
@Excel(name = "起运/运抵国(地区)")
|
||||
private String originDestinationCountry;
|
||||
|
||||
@ApiModelProperty("承运商(先做成输入框,待定)")
|
||||
@Excel(name = "承运商")
|
||||
private String carrier;
|
||||
|
||||
@ApiModelProperty("柜号(数据字典:20尺/40尺)")
|
||||
@Excel(name = "柜号")
|
||||
private String containerNo;
|
||||
|
||||
@ApiModelProperty("运输方式(数据字典:公路运输/其他运输)")
|
||||
@Excel(name = "运输方式")
|
||||
private String transportMethod;
|
||||
|
||||
@ApiModelProperty("监管方式(数据字典:一般贸易)")
|
||||
@Excel(name = "监管方式")
|
||||
private String supervisionMethod;
|
||||
|
||||
@ApiModelProperty("海关是否查验货物(默认:否)")
|
||||
@Excel(name = "海关是否查验货物")
|
||||
private Integer customsInspection;
|
||||
|
||||
@ApiModelProperty("是否需要报关(默认:是)")
|
||||
@Excel(name = "是否需要报关")
|
||||
private Integer needCustomsDeclaration;
|
||||
|
||||
@ApiModelProperty("是否需要运输(默认:否)")
|
||||
@Excel(name = "是否需要运输")
|
||||
private Integer needTransport;
|
||||
|
||||
@ApiModelProperty("入仓日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "入仓日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date warehouseDate;
|
||||
|
||||
@ApiModelProperty("完成时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date completionTime;
|
||||
|
||||
@ApiModelProperty("下单日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下单日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderDate;
|
||||
|
||||
|
||||
@ApiModelProperty("业务单号")
|
||||
@Excel(name = "业务单号")
|
||||
private String businessOrderNo;
|
||||
|
||||
@ApiModelProperty("业务类型")
|
||||
@Excel(name = "业务类型")
|
||||
private String businessType;
|
||||
|
||||
@ApiModelProperty("制单人")
|
||||
@Excel(name = "制单人")
|
||||
private String documentCreator;
|
||||
|
||||
@ApiModelProperty("制单人名称")
|
||||
@Excel(name = "制单人名称")
|
||||
private String documentCreatorName;
|
||||
|
||||
@ApiModelProperty("制单日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "制单日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date documentDate;
|
||||
|
||||
@ApiModelProperty("订单状态")
|
||||
@Excel(name = "订单状态")
|
||||
private String orderStatus;
|
||||
|
||||
@ApiModelProperty(name = "创建时间查询条件开始日期")
|
||||
private String createTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "创建时间查询条件结束日期")
|
||||
private String createTimeEnd;
|
||||
|
||||
@ApiModelProperty("入库明细-物料名称(商品名称),模糊匹配")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("入库明细-物料编码,模糊匹配")
|
||||
private String materialCode;
|
||||
}
|
||||
+379
@@ -0,0 +1,379 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDTO;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 入库单对象 stock_in_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ReservationStockInOrderDTO extends ReservationStockInOrderBaseDTO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("入库单id")
|
||||
private Long inOrderId;
|
||||
|
||||
@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 warehouseId;
|
||||
|
||||
@ApiModelProperty("仓库编码")
|
||||
@Excel(name = "仓库编码")
|
||||
private String warehouseCode;
|
||||
|
||||
@ApiModelProperty("仓库名称")
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehouseName;
|
||||
|
||||
@ApiModelProperty("通知单号")
|
||||
@Excel(name = "通知单号")
|
||||
private String noticeNumber;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
@Excel(name = "入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
@Excel(name = "入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
private Integer auditStatus;
|
||||
|
||||
@ApiModelProperty("入库单审核备注")
|
||||
@Excel(name = "入库单审核备注")
|
||||
private String auditRemark;
|
||||
|
||||
@ApiModelProperty("入库单审核人")
|
||||
@Excel(name = "入库单审核人")
|
||||
private Long auditBy;
|
||||
|
||||
@ApiModelProperty("入库单审核人姓名")
|
||||
@Excel(name = "入库单审核人姓名")
|
||||
private String auditByName;
|
||||
|
||||
@ApiModelProperty("入库单审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "入库单审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date auditTime;
|
||||
|
||||
@ApiModelProperty("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主编码")
|
||||
@Excel(name = "货主编码")
|
||||
private String shipperCode;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@ApiModelProperty("入库单类型编码")
|
||||
@Excel(name = "入库单类型编码")
|
||||
private String orderTypeCode;
|
||||
|
||||
@ApiModelProperty("入库单类型名称")
|
||||
@Excel(name = "入库单类型名称")
|
||||
private String orderTypeName;
|
||||
|
||||
@ApiModelProperty("供应商id")
|
||||
@Excel(name = "供应商id")
|
||||
private Long supplierId;
|
||||
|
||||
@ApiModelProperty("供应商编码")
|
||||
@Excel(name = "供应商编码")
|
||||
private String supplierCode;
|
||||
|
||||
@ApiModelProperty("供应商名称")
|
||||
@Excel(name = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
@ApiModelProperty("预计到货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "预计到货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expectTime;
|
||||
|
||||
@ApiModelProperty("供应链订单号")
|
||||
@Excel(name = "供应链订单号")
|
||||
private String supplyChainNumber;
|
||||
|
||||
@ApiModelProperty("优先级别编码")
|
||||
@Excel(name = "优先级别编码")
|
||||
private String priorityLevelCode;
|
||||
|
||||
@ApiModelProperty("优先级别名称")
|
||||
@Excel(name = "优先级别名称")
|
||||
private String priorityLevelName;
|
||||
|
||||
@ApiModelProperty("是否直接入库: 1-是 2-否")
|
||||
@Excel(name = "是否直接入库: 1-是 2-否")
|
||||
private Integer directWarehouse;
|
||||
|
||||
@ApiModelProperty("附件url")
|
||||
@Excel(name = "附件url")
|
||||
private String annexUrl;
|
||||
|
||||
@ApiModelProperty("物料种数")
|
||||
@Excel(name = "物料种数")
|
||||
private Integer materialQuantity;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("净重 单位:千克")
|
||||
@Excel(name = "净重 单位:千克")
|
||||
private BigDecimal weightLimit;
|
||||
|
||||
@ApiModelProperty("体积 单位:立方米")
|
||||
@Excel(name = "体积 单位:立方米")
|
||||
private BigDecimal volumeLimit;
|
||||
|
||||
@ApiModelProperty("是否取消订单: 1-是 2-否")
|
||||
@Excel(name = "是否取消订单: 1-是 2-否")
|
||||
private Integer cancelOrder;
|
||||
|
||||
@ApiModelProperty("取消订单备注")
|
||||
@Excel(name = "取消订单备注")
|
||||
private String cancelRemark;
|
||||
|
||||
@ApiModelProperty("取消订单人")
|
||||
@Excel(name = "取消订单人")
|
||||
private Long cancelBy;
|
||||
|
||||
@ApiModelProperty("取消订单人姓名")
|
||||
@Excel(name = "取消订单人姓名")
|
||||
private String cancelByName;
|
||||
|
||||
@ApiModelProperty("取消订单时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "取消订单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date cancelTime;
|
||||
|
||||
@ApiModelProperty("是否关闭订单: 1-是 2-否")
|
||||
@Excel(name = "是否关闭订单: 1-是 2-否")
|
||||
private Integer closeOrder;
|
||||
|
||||
@ApiModelProperty("关闭订单备注")
|
||||
@Excel(name = "关闭订单备注")
|
||||
private String closeRemark;
|
||||
|
||||
@ApiModelProperty("关闭订单人")
|
||||
@Excel(name = "关闭订单人")
|
||||
private Long closeBy;
|
||||
|
||||
@ApiModelProperty("关闭订单人姓名")
|
||||
@Excel(name = "关闭订单人姓名")
|
||||
private String closeByName;
|
||||
|
||||
@ApiModelProperty("关闭订单时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "关闭订单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date closeTime;
|
||||
|
||||
@ApiModelProperty("入库单来源: 1-正常录入 2-通知单生成 3-无单收货")
|
||||
@Excel(name = "入库单来源: 1-正常录入 2-通知单生成 3-无单收货")
|
||||
private Integer orderSource;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("入库单id集合")
|
||||
private List<Long> inOrderIds;
|
||||
|
||||
@ApiModelProperty("物料明细")
|
||||
private List<ReservationInMaterialDetailDTO> materialDetailList;
|
||||
|
||||
@ApiModelProperty("小于某个入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
@Excel(name = "小于某个入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
private Integer ltStatus;
|
||||
|
||||
@ApiModelProperty("大于某个入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
@Excel(name = "大于某个入库状态: 1-已创建 2-已审核 3-收货中 4-上架中 5-已入库")
|
||||
private Integer gtStatus;
|
||||
|
||||
@ApiModelProperty("小于入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
@Excel(name = "小于入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
private Integer ltAuditStatus;
|
||||
|
||||
@ApiModelProperty("小于入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
@Excel(name = "小于入库单审核状态: 1-未审核 2-审核不通过 3-审核通过")
|
||||
private Integer gtAuditStatus;
|
||||
|
||||
// ========== 报关相关字段 ==========
|
||||
@ApiModelProperty("To")
|
||||
@Excel(name = "To")
|
||||
private String to;
|
||||
|
||||
@ApiModelProperty("联系人")
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
@ApiModelProperty("车型及车牌")
|
||||
@Excel(name = "车型及车牌")
|
||||
private String vehicleInfo;
|
||||
|
||||
@ApiModelProperty("委托编号NO")
|
||||
@Excel(name = "委托编号NO")
|
||||
private String consignmentNo;
|
||||
|
||||
@ApiModelProperty("Tel")
|
||||
@Excel(name = "Tel")
|
||||
private String tel;
|
||||
|
||||
@ApiModelProperty("司机签名")
|
||||
@Excel(name = "司机签名")
|
||||
private String driverSignature;
|
||||
|
||||
@ApiModelProperty("Fax")
|
||||
@Excel(name = "Fax")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("申报地关区")
|
||||
@Excel(name = "申报地关区")
|
||||
private String declarationArea;
|
||||
|
||||
|
||||
@ApiModelProperty("生产商")
|
||||
@Excel(name = "生产商")
|
||||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty("报关员姓名及联系方式")
|
||||
@Excel(name = "报关员姓名及联系方式")
|
||||
private String customsBrokerInfo;
|
||||
|
||||
@ApiModelProperty("送货地址")
|
||||
@Excel(name = "送货地址")
|
||||
private String deliveryAddress;
|
||||
|
||||
@ApiModelProperty("进出境关别")
|
||||
@Excel(name = "进出境关别")
|
||||
private String entryExitCustoms;
|
||||
|
||||
@ApiModelProperty("起运/运抵国(地区)")
|
||||
@Excel(name = "起运/运抵国(地区)")
|
||||
private String originDestinationCountry;
|
||||
|
||||
@ApiModelProperty("承运商(先做成输入框,待定)")
|
||||
@Excel(name = "承运商")
|
||||
private String carrier;
|
||||
|
||||
@ApiModelProperty("柜号(数据字典:20尺/40尺)")
|
||||
@Excel(name = "柜号")
|
||||
private String containerNo;
|
||||
|
||||
@ApiModelProperty("运输方式(数据字典:公路运输/其他运输)")
|
||||
@Excel(name = "运输方式")
|
||||
private String transportMethod;
|
||||
|
||||
@ApiModelProperty("监管方式(数据字典:一般贸易)")
|
||||
@Excel(name = "监管方式")
|
||||
private String supervisionMethod;
|
||||
|
||||
@ApiModelProperty("海关是否查验货物(默认:否)")
|
||||
@Excel(name = "海关是否查验货物")
|
||||
private Integer customsInspection;
|
||||
|
||||
@ApiModelProperty("是否需要报关(默认:是)")
|
||||
@Excel(name = "是否需要报关")
|
||||
private Integer needCustomsDeclaration;
|
||||
|
||||
@ApiModelProperty("是否需要运输(默认:否)")
|
||||
@Excel(name = "是否需要运输")
|
||||
private Integer needTransport;
|
||||
|
||||
@ApiModelProperty("入仓日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "入仓日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date warehouseDate;
|
||||
|
||||
@ApiModelProperty("完成时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date completionTime;
|
||||
|
||||
@ApiModelProperty("下单日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "下单日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date orderDate;
|
||||
|
||||
|
||||
@ApiModelProperty("业务单号")
|
||||
@Excel(name = "业务单号")
|
||||
private String businessOrderNo;
|
||||
|
||||
@ApiModelProperty("业务类型")
|
||||
@Excel(name = "业务类型")
|
||||
private String businessType;
|
||||
|
||||
@ApiModelProperty("制单人")
|
||||
@Excel(name = "制单人")
|
||||
private String documentCreator;
|
||||
|
||||
@ApiModelProperty("制单人名称")
|
||||
@Excel(name = "制单人名称")
|
||||
private String documentCreatorName;
|
||||
|
||||
@ApiModelProperty("制单日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "制单日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date documentDate;
|
||||
|
||||
@ApiModelProperty("订单状态")
|
||||
@Excel(name = "订单状态")
|
||||
private String orderStatus;
|
||||
|
||||
@ApiModelProperty(name = "创建时间查询条件开始日期")
|
||||
private String createTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "创建时间查询条件结束日期")
|
||||
private String createTimeEnd;
|
||||
|
||||
@ApiModelProperty("入库明细-物料名称(商品名称),模糊匹配,与前端参数 materialName 一致")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("入库明细-物料编码,模糊匹配,与前端参数 materialCode 一致")
|
||||
private String materialCode;
|
||||
}
|
||||
+211
@@ -0,0 +1,211 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 入库单导入行DTO(一个Excel行=一个明细行;表头字段可重复)
|
||||
*
|
||||
* 约定:以【委托编号NO】作为同一张入库单的分组键(同一个委托编号可导入多条物料明细)
|
||||
*/
|
||||
@Data
|
||||
public class ReservationStockInOrderImportRowDTO {
|
||||
|
||||
// ====== 分组/表头基础字段(建议在Excel中每行重复填写) ======
|
||||
// @Excel(name = "仓库ID")
|
||||
// private Long warehouseId;
|
||||
|
||||
// @Excel(name = "货主ID")
|
||||
// private Long shipperId;
|
||||
|
||||
@Excel(name = "货主编号")
|
||||
private String shipperCode;
|
||||
|
||||
// @Excel(name = "供应商ID")
|
||||
// private Long supplierId;
|
||||
|
||||
// @Excel(name = "入库单据类型")
|
||||
// private String orderTypeCode;
|
||||
|
||||
@Excel(name = "委托编号NO")
|
||||
private String consignmentNo;
|
||||
|
||||
// ====== 表头报关字段(与页面一致) ======
|
||||
@Excel(name = "To")
|
||||
private String to;
|
||||
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
@Excel(name = "车型及车牌")
|
||||
private String vehicleInfo;
|
||||
|
||||
@Excel(name = "Tel")
|
||||
private String tel;
|
||||
|
||||
@Excel(name = "司机签名")
|
||||
private String driverSignature;
|
||||
|
||||
@Excel(name = "Fax")
|
||||
private String fax;
|
||||
|
||||
@Excel(name = "申报地关区")
|
||||
private String declarationArea;
|
||||
|
||||
@Excel(name = "生产商")
|
||||
private String manufacturer;
|
||||
|
||||
@Excel(name = "报关员姓名及联系方式")
|
||||
private String customsBrokerInfo;
|
||||
|
||||
@Excel(name = "送货地址")
|
||||
private String deliveryAddress;
|
||||
|
||||
@Excel(name = "进出境关别")
|
||||
private String entryExitCustoms;
|
||||
|
||||
@Excel(name = "起运/运抵国(地区)")
|
||||
private String originDestinationCountry;
|
||||
|
||||
// 客户名称只在表头中,明细行不需要此字段(代码会从表头读取并应用到此字段)
|
||||
@Excel(name = "客户名称")
|
||||
private String shipperName;
|
||||
|
||||
@Excel(name = "承运商")
|
||||
private String carrier;
|
||||
|
||||
@Excel(name = "柜号")
|
||||
private String containerNo;
|
||||
|
||||
@Excel(name = "运输方式")
|
||||
private String transportMethod;
|
||||
|
||||
@Excel(name = "监管方式")
|
||||
private String supervisionMethod;
|
||||
|
||||
@Excel(name = "海关是否查验货物")
|
||||
private Integer customsInspection;
|
||||
|
||||
@Excel(name = "是否需要报关")
|
||||
private Integer needCustomsDeclaration;
|
||||
|
||||
@Excel(name = "是否需要运输")
|
||||
private Integer needTransport;
|
||||
|
||||
@Excel(name = "入仓日期")
|
||||
private String warehouseDate; // 导入先按字符串,后端可根据需要转Date(当前入库单服务未强制使用)
|
||||
|
||||
@Excel(name = "完成时间")
|
||||
private String completionTime;
|
||||
|
||||
@Excel(name = "下单日期")
|
||||
private String orderDate;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
// ====== 明细字段(一个Excel行=一个明细) ======
|
||||
@Excel(name = "序号")
|
||||
private Integer serialNumber;
|
||||
|
||||
@Excel(name = "商品名称")
|
||||
private String materialName;
|
||||
|
||||
@Excel(name = "料号")
|
||||
private String materialCode;
|
||||
|
||||
// @Excel(name = "物料基础信息ID")
|
||||
// private Long materialBaseInfoId;
|
||||
|
||||
// 模板中没有此字段,注释掉
|
||||
// @Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@Excel(name = "仓库数量")
|
||||
private BigDecimal warehouseQuantity;
|
||||
|
||||
// 支持"入库数量"列名(与"仓库数量"映射到同一个字段)
|
||||
@Excel(name = "入库数量")
|
||||
private BigDecimal inboundQuantity;
|
||||
|
||||
@Excel(name = "规格型号/ITEM")
|
||||
private String specificationModel;
|
||||
|
||||
@Excel(name = "商品SKU码")
|
||||
private String skuCode;
|
||||
|
||||
@Excel(name = "Invoice No.")
|
||||
private String invoiceNo;
|
||||
|
||||
@Excel(name = "申报数量")
|
||||
private BigDecimal declaredQuantity;
|
||||
|
||||
@Excel(name = "申报单位")
|
||||
private String declarationUnit;
|
||||
|
||||
@Excel(name = "升")
|
||||
private BigDecimal liter;
|
||||
|
||||
@Excel(name = "箱数")
|
||||
private BigDecimal boxCount;
|
||||
|
||||
@Excel(name = "件数")
|
||||
private BigDecimal pieceCount;
|
||||
|
||||
@Excel(name = "尺寸")
|
||||
private String dimensions;
|
||||
|
||||
// @Excel(name = "出库数量")
|
||||
private BigDecimal outboundQuantity;
|
||||
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
// 支持多种列名格式(处理换行符、空格、括号等)
|
||||
@Excel(name = "总净重(KG)")
|
||||
private BigDecimal totalNetWeight;
|
||||
|
||||
@Excel(name = "总净重\n(KG)")
|
||||
private BigDecimal totalNetWeight2;
|
||||
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private BigDecimal totalGrossWeight;
|
||||
|
||||
@Excel(name = "总毛重 (KG)")
|
||||
private BigDecimal totalGrossWeight2;
|
||||
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private BigDecimal totalVolume;
|
||||
|
||||
@Excel(name = "总体积\n(CBM)")
|
||||
private BigDecimal totalVolume2;
|
||||
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea;
|
||||
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea2;
|
||||
|
||||
@Excel(name = "Batch Ref NO's")
|
||||
private String batchRefNo;
|
||||
|
||||
@Excel(name = "Sheet Ref NO's")
|
||||
private String sheetRefNo;
|
||||
|
||||
@Excel(name = "原产国")
|
||||
private String originCountry;
|
||||
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
@Excel(name = "币制")
|
||||
private String currency;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String detailRemark;
|
||||
}
|
||||
+1859
File diff suppressed because it is too large
Load Diff
+134
@@ -0,0 +1,134 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.service;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.DigitalLogisticsException;
|
||||
import com.mhd.common.core.exception.digitalLogisticsException.UserError;
|
||||
import com.mhd.common.core.utils.IgnoreNullUtil;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 入库单Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Component
|
||||
public class ReservationStockInOrderAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ReservationStockInOrderDO toDO(ReservationStockInOrderDTO stockInOrderDTO) {
|
||||
ReservationStockInOrderDO stockInOrderDO = new ReservationStockInOrderDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(stockInOrderDTO, stockInOrderDO, IgnoreNullUtil.getNullPropertyNames(stockInOrderDTO));
|
||||
// 确保查询条件字段被正确传递(查询条件字段需要明确传递,避免被IgnoreNullUtil忽略)
|
||||
stockInOrderDO.setCreateTimeStart(stockInOrderDTO.getCreateTimeStart());
|
||||
stockInOrderDO.setCreateTimeEnd(stockInOrderDTO.getCreateTimeEnd());
|
||||
// 列表筛选:前端常传「名称 (编码)」展示串,库内多为纯名称,去掉末尾括号段再 LIKE
|
||||
if (stockInOrderDTO.getMaterialName() != null && !stockInOrderDTO.getMaterialName().isEmpty()) {
|
||||
String normalized = normalizeDetailMaterialNameForQuery(stockInOrderDTO.getMaterialName());
|
||||
stockInOrderDO.setMaterialName(normalized.isEmpty()
|
||||
? stockInOrderDTO.getMaterialName().trim()
|
||||
: normalized);
|
||||
}
|
||||
return stockInOrderDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ReservationStockInOrderDO toDOByEdit(ReservationStockInOrderDTO stockInOrderDTO) {
|
||||
// 兼容前端传 userName 作为货主名称字段的情况:
|
||||
// 如果 shipperName 为空但 userName 有值,则优先回填到 shipperName,
|
||||
// 以保证后续 shipperParam 能根据名称正确找到货主ID。
|
||||
if (ObjectUtil.isNull(stockInOrderDTO.getShipperId())
|
||||
&& (stockInOrderDTO.getShipperName() == null || stockInOrderDTO.getShipperName().trim().length() == 0)
|
||||
&& stockInOrderDTO.getUserName() != null && stockInOrderDTO.getUserName().trim().length() > 0) {
|
||||
stockInOrderDTO.setShipperName(stockInOrderDTO.getUserName().trim());
|
||||
}
|
||||
|
||||
ReservationStockInOrderDO stockInOrderDO = JSONUtil.toBean(JSONUtil.toJsonStr(stockInOrderDTO), ReservationStockInOrderDO.class);
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
throw new DigitalLogisticsException(UserError.TIMEOUT);
|
||||
}
|
||||
// 获取登录人id
|
||||
Long userId = loginUser.getUserid();
|
||||
// 获取用户姓名(优先从UserPo获取,如果为空则使用realname,最后使用username作为兜底)
|
||||
String userRealName = null;
|
||||
if (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null
|
||||
&& !loginUser.getUserPo().getUserName().trim().isEmpty()) {
|
||||
// 优先使用UserPo中的userName(用户真实姓名)
|
||||
userRealName = loginUser.getUserPo().getUserName();
|
||||
} else if (loginUser.getRealname() != null && !loginUser.getRealname().trim().isEmpty()) {
|
||||
// 其次使用realname
|
||||
userRealName = loginUser.getRealname();
|
||||
} else {
|
||||
// 最后使用username(账号)作为兜底
|
||||
userRealName = loginUser.getUsername();
|
||||
}
|
||||
if(stockInOrderDTO.getInOrderId() != null){
|
||||
stockInOrderDO.setUpdateBy(userId);
|
||||
stockInOrderDO.setUpdateByName(userRealName);
|
||||
stockInOrderDO.setUpdateTime(new Date());
|
||||
}else {
|
||||
stockInOrderDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
stockInOrderDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
stockInOrderDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
stockInOrderDO.setCreateBy(userId);
|
||||
// 强制设置创建人姓名为用户真实姓名,确保覆盖前端可能传递的账号
|
||||
stockInOrderDO.setCreateByName(userRealName);
|
||||
stockInOrderDO.setCreateTime(new Date());
|
||||
stockInOrderDO.setDelFlag(1);
|
||||
// 新增入库单时,如果入库单类型为空,默认设置为普通入库
|
||||
String orderTypeCode = stockInOrderDO.getOrderTypeCode();
|
||||
if (orderTypeCode == null || orderTypeCode.trim().length() == 0) {
|
||||
stockInOrderDO.setOrderTypeCode("pu_tong_ru_ku");
|
||||
}
|
||||
String orderTypeName = stockInOrderDO.getOrderTypeName();
|
||||
if (orderTypeName == null || orderTypeName.trim().length() == 0) {
|
||||
stockInOrderDO.setOrderTypeName("普通入库单");
|
||||
}
|
||||
// 新增入库单时,计划数量取所有明细行的入库数量之和
|
||||
if (!CollectionUtils.isEmpty(stockInOrderDO.getMaterialDetailList())) {
|
||||
BigDecimal totalInboundQuantity = stockInOrderDO.getMaterialDetailList().stream()
|
||||
.map(detail -> detail.getInboundQuantity() != null ? detail.getInboundQuantity() : BigDecimal.ZERO)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockInOrderDO.setQuantity(totalInboundQuantity);
|
||||
}
|
||||
}
|
||||
return stockInOrderDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 去掉物料展示名末尾的「 (xxx) / (xxx)」等,便于与库内 material_name 模糊匹配。
|
||||
*/
|
||||
private static String normalizeDetailMaterialNameForQuery(String raw) {
|
||||
if (raw == null) {
|
||||
return null;
|
||||
}
|
||||
String s = raw.trim();
|
||||
// 循环去掉末尾多组括号(兼容「名称 (编码)」或重复后缀)
|
||||
String next;
|
||||
do {
|
||||
next = s.replaceFirst("[\\s\\u3000]*[((][^))]*[))]\\s*$", "").trim();
|
||||
if (next.equals(s)) {
|
||||
break;
|
||||
}
|
||||
s = next;
|
||||
} while (!s.isEmpty());
|
||||
return s;
|
||||
}
|
||||
|
||||
}
|
||||
+789
@@ -0,0 +1,789 @@
|
||||
package com.mhd.oms.domain.reservationStockInOrder.service;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
import com.mhd.common.core.utils.OrderSequence;
|
||||
import com.mhd.common.core.utils.StringUtils;
|
||||
import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.facade.IReservationInMaterialDetailService;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailBaseDO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.entity.ReservationStockInOrder;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.facade.IReservationStockInOrderService;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.mapper.ReservationStockInOrderMapper;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialGoodsRulePO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialWarehouseControlPO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.ReservationStockInOrderPO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDO;
|
||||
import com.mhd.system.api.SystemServiceFeign;
|
||||
import com.mhd.system.api.domain.PackDetailFeignPO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 入库单
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ReservationStockInOrderDomainService {
|
||||
|
||||
@Autowired
|
||||
private IReservationStockInOrderService stockInOrderService;
|
||||
@Autowired
|
||||
private IReservationInMaterialDetailService materialDetailService;
|
||||
// @Autowired
|
||||
// private ReservationStockReceiptOrderDomainService stockReceiptOrderDomainService;
|
||||
// @Autowired
|
||||
// private ReservationStockShelfOrderDomainService stockShelfOrderDomainService;
|
||||
// @Autowired
|
||||
// private IMaterialBaseInfoService materialBaseInfoService;
|
||||
// @Autowired
|
||||
// private IMaterialGoodsRuleService materialGoodsRuleService;
|
||||
// @Autowired
|
||||
// private IMaterialWarehouseControlService materialWarehouseControlService;
|
||||
@Autowired
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
@Autowired
|
||||
private ReservationStockInOrderMapper reservationStockInOrderMapper;
|
||||
// @Autowired
|
||||
// private IReceiptMaterialDetailService receiptMaterialDetailService;
|
||||
// @Autowired
|
||||
// private IShelfMaterialDetailService shelfMaterialDetailService;
|
||||
|
||||
/**
|
||||
* 分页查询入库单列表
|
||||
*/
|
||||
public List<ReservationStockInOrderPO> queryList(ReservationStockInOrderDO stockInOrderDO) {
|
||||
return stockInOrderService.queryList(stockInOrderDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增入库单
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insert(ReservationStockInOrderDO stockInOrderDO) {
|
||||
stockInOrderDO.setInOrderNumber(OrderSequence.getOrderCode("RK"));
|
||||
// //设置默认值
|
||||
// setDefaultValues(stockInOrderDO);
|
||||
// //设置物料信息
|
||||
// setMaterialDetailInfo(stockInOrderDO);
|
||||
// //统计总物料种数
|
||||
// stockInOrderDO.setMaterialQuantity(stockInOrderDO.getMaterialDetailList().size());
|
||||
// //统计总计划数
|
||||
// BigDecimal quantity = stockInOrderDO.getMaterialDetailList().stream().map(ReservationInMaterialDetailDO::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// stockInOrderDO.setQuantity(quantity);
|
||||
// //统计总重量
|
||||
// BigDecimal weightLimit = stockInOrderDO.getMaterialDetailList().stream().map(ReservationInMaterialDetailDO::getWeightLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// stockInOrderDO.setWeightLimit(weightLimit);
|
||||
// //统计总体积
|
||||
// BigDecimal volumeLimit = stockInOrderDO.getMaterialDetailList().stream().map(ReservationInMaterialDetailDO::getVolumeLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// stockInOrderDO.setVolumeLimit(volumeLimit);
|
||||
stockInOrderService.insert(stockInOrderDO);
|
||||
return materialDetailService.batchInsert(stockInOrderDO.getInOrderNumber(), stockInOrderDO.getMaterialDetailList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增入库单
|
||||
*/
|
||||
public Boolean batchInsert(List<ReservationStockInOrderDO> stockInOrderDOList) {
|
||||
for (ReservationStockInOrderDO stockInOrderDO : stockInOrderDOList){
|
||||
if (StringUtils.isBlank(stockInOrderDO.getInOrderNumber())){
|
||||
stockInOrderDO.setInOrderNumber(OrderSequence.getOrderCode("RK"));
|
||||
}
|
||||
// //设置物料信息
|
||||
// setMaterialDetailInfo(stockInOrderDO);
|
||||
// //统计总物料种数
|
||||
// stockInOrderDO.setMaterialQuantity(stockInOrderDO.getMaterialDetailList().size());
|
||||
// //统计总计划数
|
||||
// BigDecimal quantity = stockInOrderDO.getMaterialDetailList().stream().map(ReservationInMaterialDetailDO::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// stockInOrderDO.setQuantity(quantity);
|
||||
// //统计总重量
|
||||
// BigDecimal weightLimit = stockInOrderDO.getMaterialDetailList().stream().map(ReservationInMaterialDetailDO::getWeightLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// stockInOrderDO.setWeightLimit(weightLimit);
|
||||
// //统计总体积
|
||||
// BigDecimal volumeLimit = stockInOrderDO.getMaterialDetailList().stream().map(ReservationInMaterialDetailDO::getVolumeLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// stockInOrderDO.setVolumeLimit(volumeLimit);
|
||||
stockInOrderService.insert(stockInOrderDO);
|
||||
materialDetailService.batchInsert(stockInOrderDO.getInOrderNumber(), stockInOrderDO.getMaterialDetailList());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean update(ReservationStockInOrderDO stockInOrderDO) {
|
||||
ReservationStockInOrderPO stockInOrderPO = stockInOrderService.getInfo(stockInOrderDO.getInOrderId());
|
||||
if (stockInOrderPO == null){
|
||||
throw new ServiceException("入库单信息不存在");
|
||||
}
|
||||
//设置物料信息
|
||||
setMaterialDetailInfo(stockInOrderDO);
|
||||
//统计总物料种数
|
||||
stockInOrderDO.setMaterialQuantity(stockInOrderDO.getMaterialDetailList().size());
|
||||
//统计总计划数
|
||||
BigDecimal quantity = stockInOrderDO.getMaterialDetailList().stream().map(ReservationInMaterialDetailDO::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockInOrderPO.setQuantity(quantity);
|
||||
stockInOrderDO.setQuantity(quantity);
|
||||
//统计总重量
|
||||
BigDecimal weightLimit = stockInOrderDO.getMaterialDetailList().stream().map(ReservationInMaterialDetailDO::getWeightLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockInOrderDO.setWeightLimit(weightLimit);
|
||||
//统计总体积
|
||||
BigDecimal volumeLimit = stockInOrderDO.getMaterialDetailList().stream().map(ReservationInMaterialDetailDO::getVolumeLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockInOrderDO.setVolumeLimit(volumeLimit);
|
||||
stockInOrderService.update(stockInOrderDO);
|
||||
ReservationInMaterialDetailBaseDO inMaterialDetailBaseDO = new ReservationInMaterialDetailBaseDO();
|
||||
BeanUtils.copyProperties(stockInOrderPO, inMaterialDetailBaseDO);
|
||||
inMaterialDetailBaseDO.setInOrderNumber(stockInOrderPO.getInOrderNumber());
|
||||
return materialDetailService.batchUpdate(stockInOrderDO.getMaterialDetailList(), inMaterialDetailBaseDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库单
|
||||
*/
|
||||
public Boolean delete(Long[] inOrderIds) {
|
||||
return stockInOrderService.delete(inOrderIds);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取入库单详细信息
|
||||
*/
|
||||
public ReservationStockInOrderPO getInfo(Long inOrderId)
|
||||
{
|
||||
ReservationStockInOrderPO stockInOrderPO = stockInOrderService.getInfo(inOrderId);
|
||||
ReservationInMaterialDetailDO inMaterialDetailDO = new ReservationInMaterialDetailDO();
|
||||
inMaterialDetailDO.setInOrderNumber(stockInOrderPO.getInOrderNumber());
|
||||
inMaterialDetailDO.setLevel(1);
|
||||
List<ReservationInMaterialDetailPO> inMaterialDetailPOList = materialDetailService.queryList(inMaterialDetailDO);
|
||||
|
||||
// 先通过入库单号查询收货单列表
|
||||
// StockReceiptOrderDO stockReceiptOrderDO = new StockReceiptOrderDO();
|
||||
// stockReceiptOrderDO.setInOrderNumber(stockInOrderPO.getInOrderNumber());
|
||||
// List<StockReceiptOrderPO> stockReceiptOrderPOList = stockReceiptOrderDomainService.queryList(stockReceiptOrderDO);
|
||||
//
|
||||
// // 先通过入库单号查询上架单列表
|
||||
// StockShelfOrderDO stockShelfOrderDO = new StockShelfOrderDO();
|
||||
// stockShelfOrderDO.setInOrderNumber(stockInOrderPO.getInOrderNumber());
|
||||
// List<StockShelfOrderPO> stockShelfOrderPOList = stockShelfOrderDomainService.queryList(stockShelfOrderDO);
|
||||
//
|
||||
// 查询收货单明细,用于填充收货数量和更新毛重、净重、面积、体积
|
||||
// List<ReceiptMaterialDetailPO> receiptMaterialDetailPOList = new ArrayList<>();
|
||||
// if (!CollectionUtils.isEmpty(stockReceiptOrderPOList)) {
|
||||
// List<String> receiptOrderNumberList = stockReceiptOrderPOList.stream()
|
||||
// .map(StockReceiptOrderPO::getReceiptOrderNumber)
|
||||
// .filter(StringUtils::isNotBlank)
|
||||
// .collect(Collectors.toList());
|
||||
// if (!CollectionUtils.isEmpty(receiptOrderNumberList)) {
|
||||
// ReceiptMaterialDetailDO receiptMaterialDetailDO = new ReceiptMaterialDetailDO();
|
||||
// receiptMaterialDetailDO.setReceiptOrderNumberList(receiptOrderNumberList);
|
||||
// receiptMaterialDetailPOList = receiptMaterialDetailService.queryList(receiptMaterialDetailDO);
|
||||
// }
|
||||
// }
|
||||
|
||||
// 查询上架单明细,用于填充上架数量
|
||||
// List<ShelfMaterialDetailPO> shelfMaterialDetailPOList = new ArrayList<>();
|
||||
// if (!CollectionUtils.isEmpty(stockShelfOrderPOList)) {
|
||||
// for (StockShelfOrderPO stockShelfOrderPO : stockShelfOrderPOList) {
|
||||
// if (StringUtils.isNotBlank(stockShelfOrderPO.getShelfOrderNumber())) {
|
||||
// ShelfMaterialDetailDO shelfMaterialDetailDO = new ShelfMaterialDetailDO();
|
||||
// shelfMaterialDetailDO.setShelfOrderNumber(stockShelfOrderPO.getShelfOrderNumber());
|
||||
// List<ShelfMaterialDetailPO> shelfDetails = shelfMaterialDetailService.queryList(shelfMaterialDetailDO);
|
||||
// if (!CollectionUtils.isEmpty(shelfDetails)) {
|
||||
// shelfMaterialDetailPOList.addAll(shelfDetails);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// 按 materialDetailId 分组汇总收货数量和上架数量,以及更新毛重、净重、面积、体积
|
||||
if (!CollectionUtils.isEmpty(inMaterialDetailPOList)) {
|
||||
// 按 materialDetailId 分组汇总收货数量(实际收货数量)、毛重、净重、面积、体积
|
||||
// 收货数量:入库单对应的收货单实际收货数量汇总
|
||||
// Map<Long, ReceiptMaterialDetailPO> receiptDetailMap = new HashMap<>();
|
||||
// if (!CollectionUtils.isEmpty(receiptMaterialDetailPOList)) {
|
||||
// // 递归处理所有层级的收货单明细(包括子明细)
|
||||
// for (ReceiptMaterialDetailPO receiptDetail : receiptMaterialDetailPOList) {
|
||||
// processReceiptDetail(receiptDetail, receiptDetailMap);
|
||||
// }
|
||||
// }
|
||||
|
||||
// 按 materialDetailId 分组汇总上架数量(实际上架数量)
|
||||
// 上架数量:入库单对应的上架单实际上架数量汇总
|
||||
// Map<Long, BigDecimal> shelfQuantityMap = new HashMap<>();
|
||||
// if (!CollectionUtils.isEmpty(shelfMaterialDetailPOList)) {
|
||||
// for (ShelfMaterialDetailPO shelfDetail : shelfMaterialDetailPOList) {
|
||||
// if (shelfDetail.getMaterialDetailId() != null && shelfDetail.getShelvesQuantity() != null) {
|
||||
// Long materialDetailId = shelfDetail.getMaterialDetailId();
|
||||
// BigDecimal shelvesQuantity = shelfQuantityMap.getOrDefault(materialDetailId, BigDecimal.ZERO);
|
||||
// shelfQuantityMap.put(materialDetailId, shelvesQuantity.add(shelfDetail.getShelvesQuantity()));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// 填充入库单明细的收货数量、上架数量;入库单明细 total* 保持计划值不因收货覆盖(原按收货汇总 total* 已注释保留)
|
||||
for (ReservationInMaterialDetailPO inMaterialDetail : inMaterialDetailPOList) {
|
||||
Long materialDetailId = inMaterialDetail.getMaterialDetailId();
|
||||
if (materialDetailId != null) {
|
||||
// 填充收货数量(入库单对应的收货单实际收货数量)
|
||||
//ReceiptMaterialDetailPO receiptDetail = receiptDetailMap.get(materialDetailId);
|
||||
// if (receiptDetail != null) {
|
||||
// 更新收货数量
|
||||
// if (receiptDetail.getReceiptQuantity() != null) {
|
||||
// inMaterialDetail.setReceiptQuantity(receiptDetail.getReceiptQuantity());
|
||||
// }
|
||||
|
||||
// 更新毛重、净重、面积、体积(根据收货时所填的明细行数据更新到入库单明细中)
|
||||
// 将收货单明细中填写的数据汇总后更新到入库单明细
|
||||
// if (receiptDetail.getTotalGrossWeight() != null) {
|
||||
// inMaterialDetail.setTotalGrossWeight(receiptDetail.getTotalGrossWeight());
|
||||
// }
|
||||
// if (receiptDetail.getTotalNetWeight() != null) {
|
||||
// inMaterialDetail.setTotalNetWeight(receiptDetail.getTotalNetWeight());
|
||||
// }
|
||||
// if (receiptDetail.getTotalArea() != null) {
|
||||
// inMaterialDetail.setTotalArea(receiptDetail.getTotalArea());
|
||||
// }
|
||||
// if (receiptDetail.getTotalVolume() != null) {
|
||||
// inMaterialDetail.setTotalVolume(receiptDetail.getTotalVolume());
|
||||
// }
|
||||
// }
|
||||
|
||||
// 填充上架数量(入库单对应的上架单实际上架数量)
|
||||
// BigDecimal shelvesQuantity = shelfQuantityMap.get(materialDetailId);
|
||||
// if (shelvesQuantity != null) {
|
||||
// inMaterialDetail.setShelvesQuantity(shelvesQuantity);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stockInOrderPO.setMaterialDetailList(inMaterialDetailPOList);
|
||||
return stockInOrderPO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归处理收货单明细,汇总收货数量;毛重/净重/面积/体积汇总已注释(入库单明细 total* 不因收货覆盖)
|
||||
* @param receiptDetail 收货单明细
|
||||
* @param receiptDetailMap 收货单明细汇总Map
|
||||
*/
|
||||
// private void processReceiptDetail(ReceiptMaterialDetailPO receiptDetail, Map<Long, ReceiptMaterialDetailPO> receiptDetailMap) {
|
||||
// if (receiptDetail == null || receiptDetail.getMaterialDetailId() == null) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// Long materialDetailId = receiptDetail.getMaterialDetailId();
|
||||
// ReceiptMaterialDetailPO existing = receiptDetailMap.get(materialDetailId);
|
||||
//
|
||||
// if (existing == null) {
|
||||
// // 如果不存在,直接放入Map
|
||||
// receiptDetailMap.put(materialDetailId, receiptDetail);
|
||||
// } else {
|
||||
// // 如果已存在,汇总收货数量、毛重、净重、面积、体积
|
||||
// // 汇总收货数量(实际收货数量)
|
||||
// BigDecimal receiptQuantity = existing.getReceiptQuantity() != null ? existing.getReceiptQuantity() : BigDecimal.ZERO;
|
||||
// BigDecimal newReceiptQuantity = receiptDetail.getReceiptQuantity() != null ? receiptDetail.getReceiptQuantity() : BigDecimal.ZERO;
|
||||
// existing.setReceiptQuantity(receiptQuantity.add(newReceiptQuantity));
|
||||
//
|
||||
// // 汇总毛重、净重、面积、体积(根据收货时填写的数据)— 入库单明细 total* 不因收货覆盖,已注释保留
|
||||
// // 累加所有收货单明细的毛重、净重、面积、体积
|
||||
//// BigDecimal existingGrossWeight = existing.getTotalGrossWeight() != null ? existing.getTotalGrossWeight() : BigDecimal.ZERO;
|
||||
//// BigDecimal newGrossWeight = receiptDetail.getTotalGrossWeight() != null ? receiptDetail.getTotalGrossWeight() : BigDecimal.ZERO;
|
||||
//// existing.setTotalGrossWeight(existingGrossWeight.add(newGrossWeight));
|
||||
////
|
||||
//// BigDecimal existingNetWeight = existing.getTotalNetWeight() != null ? existing.getTotalNetWeight() : BigDecimal.ZERO;
|
||||
//// BigDecimal newNetWeight = receiptDetail.getTotalNetWeight() != null ? receiptDetail.getTotalNetWeight() : BigDecimal.ZERO;
|
||||
//// existing.setTotalNetWeight(existingNetWeight.add(newNetWeight));
|
||||
////
|
||||
//// BigDecimal existingArea = existing.getTotalArea() != null ? existing.getTotalArea() : BigDecimal.ZERO;
|
||||
//// BigDecimal newArea = receiptDetail.getTotalArea() != null ? receiptDetail.getTotalArea() : BigDecimal.ZERO;
|
||||
//// existing.setTotalArea(existingArea.add(newArea));
|
||||
////
|
||||
//// BigDecimal existingVolume = existing.getTotalVolume() != null ? existing.getTotalVolume() : BigDecimal.ZERO;
|
||||
//// BigDecimal newVolume = receiptDetail.getTotalVolume() != null ? receiptDetail.getTotalVolume() : BigDecimal.ZERO;
|
||||
//// existing.setTotalVolume(existingVolume.add(newVolume));
|
||||
// }
|
||||
//
|
||||
// // 递归处理子明细
|
||||
// if (!CollectionUtils.isEmpty(receiptDetail.getChildren())) {
|
||||
// for (ReceiptMaterialDetailPO child : receiptDetail.getChildren()) {
|
||||
// processReceiptDetail(child, receiptDetailMap);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* @description 审核入库单
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/21 13:53
|
||||
* @param stockInOrderDO
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean auditState(ReservationStockInOrderDO stockInOrderDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
//统计是否已经审核
|
||||
int count = stockInOrderService.count(new QueryWrapper<ReservationStockInOrder>().lambda()
|
||||
.eq(ReservationStockInOrder::getAuditStatus, 3)
|
||||
.eq(ReservationStockInOrder::getDelFlag, 1)
|
||||
.in(ReservationStockInOrder::getInOrderId, stockInOrderDO.getInOrderIds()));
|
||||
if (count > 0){
|
||||
throw new ServiceException("入库单已审核,请重新选择!");
|
||||
}
|
||||
|
||||
//生成收货单
|
||||
// if (stockInOrderDO.getAuditStatus() == 3){
|
||||
// auditApprove(stockInOrderDO);
|
||||
// }
|
||||
// 获取用户姓名(优先从UserPo获取,如果为空则使用realname,最后使用username作为兜底)
|
||||
String userRealName = loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null
|
||||
? loginUser.getUserPo().getUserName()
|
||||
: (loginUser.getRealname() != null ? loginUser.getRealname() : loginUser.getUsername());
|
||||
return stockInOrderService.update(null, new UpdateWrapper<ReservationStockInOrder>().lambda()
|
||||
.set(3 == stockInOrderDO.getAuditStatus(), ReservationStockInOrder::getStatus, 2)
|
||||
.set(ReservationStockInOrder::getAuditStatus, stockInOrderDO.getAuditStatus())
|
||||
.set(ReservationStockInOrder::getAuditRemark, stockInOrderDO.getAuditRemark())
|
||||
.set(ReservationStockInOrder::getAuditBy, loginUser.getUserid())
|
||||
.set(ReservationStockInOrder::getAuditByName, userRealName)
|
||||
.set(ReservationStockInOrder::getAuditTime, new Date())
|
||||
.set(ReservationStockInOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(ReservationStockInOrder::getUpdateByName, userRealName)
|
||||
.set(ReservationStockInOrder::getUpdateTime, new Date())
|
||||
.in(ReservationStockInOrder::getInOrderId, stockInOrderDO.getInOrderIds()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 取消入库单
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/21 13:53
|
||||
* @param stockInOrderDO
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean cancelOrder(ReservationStockInOrderDO stockInOrderDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
return stockInOrderService.update(null, new UpdateWrapper<ReservationStockInOrder>().lambda()
|
||||
.set(ReservationStockInOrder::getCancelOrder, 2)
|
||||
.set(ReservationStockInOrder::getCancelRemark, stockInOrderDO.getCancelRemark())
|
||||
.set(ReservationStockInOrder::getCancelBy, loginUser.getUserid())
|
||||
.set(ReservationStockInOrder::getCancelByName, loginUser.getUsername())
|
||||
.set(ReservationStockInOrder::getCancelTime, new Date())
|
||||
.set(ReservationStockInOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(ReservationStockInOrder::getUpdateByName, loginUser.getUsername())
|
||||
.set(ReservationStockInOrder::getUpdateTime, new Date())
|
||||
.in(ReservationStockInOrder::getInOrderId, stockInOrderDO.getInOrderIds()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 关闭入库单
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/21 13:53
|
||||
* @param stockInOrderDO
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean closeOrder(ReservationStockInOrderDO stockInOrderDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
return stockInOrderService.update(null, new UpdateWrapper<ReservationStockInOrder>().lambda()
|
||||
.set(ReservationStockInOrder::getCloseOrder, 1)
|
||||
.set(ReservationStockInOrder::getStatus, 7)
|
||||
.set(ReservationStockInOrder::getCloseRemark, stockInOrderDO.getCloseRemark())
|
||||
.set(ReservationStockInOrder::getCloseBy, loginUser.getUserid())
|
||||
.set(ReservationStockInOrder::getCloseByName, loginUser.getUsername())
|
||||
.set(ReservationStockInOrder::getCloseTime, new Date())
|
||||
.set(ReservationStockInOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(ReservationStockInOrder::getUpdateByName, loginUser.getUsername())
|
||||
.set(ReservationStockInOrder::getUpdateTime, new Date())
|
||||
.in(ReservationStockInOrder::getInOrderId, stockInOrderDO.getInOrderIds()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 审核通过生成收货单
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/22 14:48
|
||||
* @param stockInOrderDO
|
||||
* @return Boolean
|
||||
*/
|
||||
// public Boolean auditApprove(ReservationStockInOrderDO stockInOrderDO){
|
||||
// ReservationStockInOrderDO stockInOrderDOByQuery = new ReservationStockInOrderDO();
|
||||
// stockInOrderDOByQuery.setInOrderIds(stockInOrderDO.getInOrderIds());
|
||||
// stockInOrderDOByQuery.setLtAuditStatus(3);
|
||||
// List<ReservationStockInOrderPO> stockInOrderPOList = stockInOrderService.queryList(stockInOrderDOByQuery);
|
||||
// if (CollectionUtils.isEmpty(stockInOrderPOList)){
|
||||
// throw new ServiceException("出库单不存在或已审核通过");
|
||||
// }
|
||||
// List<String> inOrderNumberList = stockInOrderPOList.stream().map(ReservationStockInOrderPO::getInOrderNumber).collect(Collectors.toList());
|
||||
// ReservationInMaterialDetailDO inMaterialDetailDO = new ReservationInMaterialDetailDO();
|
||||
// inMaterialDetailDO.setInOrderNumberList(inOrderNumberList);
|
||||
// List<ReservationInMaterialDetailPO> inMaterialDetailPOList = materialDetailService.queryListChildren(inMaterialDetailDO);
|
||||
// Map<String, List<ReservationInMaterialDetailPO>> inMaterialDetailListMap = inMaterialDetailPOList.stream().collect(Collectors.groupingBy(ReservationInMaterialDetailPO::getInOrderNumber));
|
||||
//
|
||||
// List<StockReceiptOrderDO> stockReceiptOrderDOList = new ArrayList<>();
|
||||
// stockInOrderPOList.forEach(p -> {
|
||||
// StockReceiptOrderDO stockReceiptOrderDO = new StockReceiptOrderDO();
|
||||
// BeanUtils.copyProperties(p, stockReceiptOrderDO);
|
||||
// stockReceiptOrderDO.setReceiptOrderNumber(OrderSequence.getOrderCode("SH"));
|
||||
// List<ReservationInMaterialDetailPO> inMaterialDetailPOs = inMaterialDetailListMap.get(p.getInOrderNumber());
|
||||
// if (!CollectionUtils.isEmpty(inMaterialDetailPOs)){
|
||||
// List<ReceiptMaterialDetailDO> receiptMaterialDetailDOList = new ArrayList<>();
|
||||
// inMaterialDetailPOs.forEach(inMaterialDetailPO -> {
|
||||
// ReceiptMaterialDetailDO receiptMaterialDetailDO = new ReceiptMaterialDetailDO();
|
||||
// BeanUtils.copyProperties(inMaterialDetailPO, receiptMaterialDetailDO);
|
||||
// receiptMaterialDetailDO.setInUniqueId(inMaterialDetailPO.getUniqueId());
|
||||
//
|
||||
// // 复制特定字段:生产日期、过期日期、存货日期、批次参考号、单据参考号、箱号/卡板号、扩展属性1-4
|
||||
// // 这些字段可能使用驼峰命名或下划线命名,使用反射获取和设置
|
||||
// copySpecialFields(inMaterialDetailPO, receiptMaterialDetailDO);
|
||||
// //收货计划数量赋值
|
||||
// receiptMaterialDetailDO.setQuantity(inMaterialDetailPO.getInboundQuantity());
|
||||
// receiptMaterialDetailDOList.add(receiptMaterialDetailDO);
|
||||
// });
|
||||
// stockReceiptOrderDO.setMaterialDetailList(receiptMaterialDetailDOList);
|
||||
// stockReceiptOrderDO.setMaterialQuantity(receiptMaterialDetailDOList.size());
|
||||
// // 重新计算计划数量:从物料明细中汇总quantity字段
|
||||
// BigDecimal quantity = receiptMaterialDetailDOList.stream()
|
||||
// .map(ReceiptMaterialDetailDO::getQuantity)
|
||||
// .filter(Objects::nonNull)
|
||||
// .reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// stockReceiptOrderDO.setQuantity(quantity);
|
||||
// } else {
|
||||
// // 如果没有物料明细,将数量设置为0
|
||||
// stockReceiptOrderDO.setQuantity(BigDecimal.ZERO);
|
||||
// }
|
||||
// stockReceiptOrderDOList.add(stockReceiptOrderDO);
|
||||
// });
|
||||
// //判断物流是否需要生成质检单
|
||||
// genQualityInspection(stockReceiptOrderDOList);
|
||||
// //生成收货单
|
||||
// Boolean batchInsertResult = stockReceiptOrderDomainService.batchInsert(stockReceiptOrderDOList);
|
||||
// if (!batchInsertResult) {
|
||||
// throw new ServiceException("生成收货单失败");
|
||||
// }
|
||||
// //生成收货任务:根据入库单号查询刚生成的收货单
|
||||
// List<StockReceiptOrderPO> stockReceiptOrderPOList = new ArrayList<>();
|
||||
// for (String inOrderNumber : inOrderNumberList) {
|
||||
// StockReceiptOrderDO stockReceiptOrderDOQuery = new StockReceiptOrderDO();
|
||||
// stockReceiptOrderDOQuery.setInOrderNumber(inOrderNumber);
|
||||
// List<StockReceiptOrderPO> receiptOrderList = stockReceiptOrderDomainService.queryList(stockReceiptOrderDOQuery);
|
||||
// if (!CollectionUtils.isEmpty(receiptOrderList)) {
|
||||
// stockReceiptOrderPOList.addAll(receiptOrderList);
|
||||
// }
|
||||
// }
|
||||
// if (!CollectionUtils.isEmpty(stockReceiptOrderPOList)) {
|
||||
// stockReceiptOrderDomainService.genStockReceiptTaskOrder(stockReceiptOrderPOList);
|
||||
// }
|
||||
// return batchInsertResult;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @description 设置物料信息
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/23 14:03
|
||||
* @param stockInOrderDO
|
||||
*/
|
||||
private void setMaterialDetailInfo(ReservationStockInOrderDO stockInOrderDO){
|
||||
List<ReservationInMaterialDetailDO> inMaterialDetailDOList = stockInOrderDO.getMaterialDetailList();
|
||||
inMaterialDetailDOList.forEach(inMaterialDetailDO -> {
|
||||
MaterialBaseInfoPO materialBaseInfoPO = reservationStockInOrderMapper.getinfo(inMaterialDetailDO.getMaterialBaseInfoId());
|
||||
//MaterialBaseInfoPO materialBaseInfoPO = materialBaseInfoService.getInfo(inMaterialDetailDO.getMaterialBaseInfoId());
|
||||
if (materialBaseInfoPO == null){
|
||||
throw new ServiceException("物料基础信息不存在");
|
||||
}
|
||||
inMaterialDetailDO.setMaterialCode(materialBaseInfoPO.getMaterialCode());
|
||||
inMaterialDetailDO.setMaterialName(materialBaseInfoPO.getMaterialName());
|
||||
inMaterialDetailDO.setBarCode(materialBaseInfoPO.getBarCode());
|
||||
inMaterialDetailDO.setPackId(materialBaseInfoPO.getPackId());
|
||||
inMaterialDetailDO.setPackCode(materialBaseInfoPO.getPackCode());
|
||||
inMaterialDetailDO.setPackName(materialBaseInfoPO.getPackName());
|
||||
|
||||
//获取包装详情
|
||||
AjaxResult packDetailResult = systemServiceFeign.getInfoByPackIdAndUnitCode(materialBaseInfoPO.getPackId(), "EA");
|
||||
if(!"200".equals(String.valueOf(packDetailResult.get("code")))){
|
||||
throw new ServiceException("获取物料单位EA信息失败");
|
||||
}
|
||||
PackDetailFeignPO packDetailFeignPO = JSON.parseObject(JSONObject.toJSONString(packDetailResult.get("data")), PackDetailFeignPO.class);
|
||||
inMaterialDetailDO.setPackDetailId(packDetailFeignPO.getPackDetailId());
|
||||
inMaterialDetailDO.setUnitCode(packDetailFeignPO.getUnitCode());
|
||||
inMaterialDetailDO.setUnitName(packDetailFeignPO.getName());
|
||||
inMaterialDetailDO.setUnitNumber(packDetailFeignPO.getNumber());
|
||||
inMaterialDetailDO.setWeightLimit(packDetailFeignPO.getWeight());
|
||||
inMaterialDetailDO.setVolumeLimit(packDetailFeignPO.getVolume());
|
||||
|
||||
//获取仓库控制信息
|
||||
MaterialWarehouseControlPO materialWarehouseControlPO = reservationStockInOrderMapper.getInfoByMaterialBaseInfoIds(materialBaseInfoPO.getMaterialBaseInfoId());
|
||||
//MaterialWarehouseControlPO materialWarehouseControlPO = materialWarehouseControlService.getInfoByMaterialBaseInfoIds(materialBaseInfoPO.getMaterialBaseInfoId());
|
||||
if (materialWarehouseControlPO == null){
|
||||
throw new ServiceException("物料仓库控制信息不存在");
|
||||
}
|
||||
inMaterialDetailDO.setMaterialWarehouseControlId(materialWarehouseControlPO.getMaterialWarehouseControlId());
|
||||
inMaterialDetailDO.setSerialNumberManage(materialWarehouseControlPO.getSerialNumberManage());
|
||||
inMaterialDetailDO.setQualityInspectionManage(materialWarehouseControlPO.getQualityInspectionManage());
|
||||
inMaterialDetailDO.setQualityInspectionStage(materialWarehouseControlPO.getQualityInspectionStage());
|
||||
inMaterialDetailDO.setQualityInspectionRule(materialWarehouseControlPO.getQualityInspectionRule());
|
||||
inMaterialDetailDO.setQualityInspectionTerm(materialWarehouseControlPO.getQualityInspectionTerm());
|
||||
inMaterialDetailDO.setAllowOvercharge(materialWarehouseControlPO.getAllowOvercharge());
|
||||
inMaterialDetailDO.setOverchargeRatio(materialWarehouseControlPO.getOverchargeRatio());
|
||||
|
||||
//获取商品规则信息
|
||||
MaterialGoodsRulePO materialGoodsRulePO = reservationStockInOrderMapper.getGoodsInfoByMaterialBaseInfoIds(inMaterialDetailDO.getMaterialBaseInfoId());
|
||||
//MaterialGoodsRulePO materialGoodsRulePO = materialGoodsRuleService.getInfoByMaterialBaseInfoIds(materialBaseInfoPO.getMaterialBaseInfoId());
|
||||
if (materialGoodsRulePO == null){
|
||||
throw new ServiceException("物料商品规则信息不存在");
|
||||
}
|
||||
inMaterialDetailDO.setDistributeRuleId(materialGoodsRulePO.getMaterialGoodsRuleId());
|
||||
inMaterialDetailDO.setDistributeRuleCode(materialGoodsRulePO.getRuleCode());
|
||||
inMaterialDetailDO.setDistributeRuleName(materialGoodsRulePO.getRuleName());
|
||||
|
||||
//自动填充规格型号和SKU码(如果物料基础信息中有相关字段且明细中未设置)
|
||||
//规格型号:优先使用物料种类名称,如果为空则使用物料类型名称
|
||||
if (StringUtils.isBlank(inMaterialDetailDO.getSpecificationModel())) {
|
||||
if (StringUtils.isNotBlank(materialBaseInfoPO.getMaterialTypeName())) {
|
||||
inMaterialDetailDO.setSpecificationModel(materialBaseInfoPO.getMaterialTypeName());
|
||||
}
|
||||
}
|
||||
//SKU码:使用物料条形码
|
||||
if (StringUtils.isBlank(inMaterialDetailDO.getSkuCode())) {
|
||||
if (StringUtils.isNotBlank(materialBaseInfoPO.getBarCode())) {
|
||||
inMaterialDetailDO.setSkuCode(materialBaseInfoPO.getBarCode());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置默认值
|
||||
* @author gen
|
||||
* @date 2026/1/16
|
||||
* @param stockInOrderDO
|
||||
*/
|
||||
private void setDefaultValues(ReservationStockInOrderDO stockInOrderDO) {
|
||||
//海关是否查验货物(默认:0=否)
|
||||
if (stockInOrderDO.getCustomsInspection() == null) {
|
||||
stockInOrderDO.setCustomsInspection(0);
|
||||
}
|
||||
//是否需要报关(默认:1=是)
|
||||
if (stockInOrderDO.getNeedCustomsDeclaration() == null) {
|
||||
stockInOrderDO.setNeedCustomsDeclaration(1);
|
||||
}
|
||||
//是否需要运输(默认:0=否)
|
||||
if (stockInOrderDO.getNeedTransport() == null) {
|
||||
stockInOrderDO.setNeedTransport(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 复制特定字段从入库单明细到收货明细
|
||||
* 包括:生产日期、过期日期、存货日期、批次参考号、单据参考号、箱号/卡板号、扩展属性1-4
|
||||
* @author gen
|
||||
* @date 2026/1/29
|
||||
* @param source 源对象(ReservationInMaterialDetailPO)
|
||||
* @param target 目标对象(ReceiptMaterialDetailDO)
|
||||
*/
|
||||
// private void copySpecialFields(ReservationInMaterialDetailPO source, ReceiptMaterialDetailDO target) {
|
||||
// if (source == null || target == null) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// try {
|
||||
// // 字段映射:源字段名 -> 目标字段名(支持驼峰和下划线两种命名方式)
|
||||
// Map<String, String> fieldMappings = new HashMap<>();
|
||||
// fieldMappings.put("productionDate", "productionDate");
|
||||
// fieldMappings.put("production_date", "productionDate");
|
||||
// fieldMappings.put("expiryDate", "expiryDate");
|
||||
// fieldMappings.put("expiry_date", "expiryDate");
|
||||
// fieldMappings.put("inventoryDate", "inventoryDate");
|
||||
// fieldMappings.put("inventory_date", "inventoryDate");
|
||||
// fieldMappings.put("batchRefNo", "batchRefNo");
|
||||
// fieldMappings.put("batch_ref_no", "batchRefNo");
|
||||
// fieldMappings.put("sheetRefNo", "sheetRefNo");
|
||||
// fieldMappings.put("sheet_ref_no", "sheetRefNo");
|
||||
// fieldMappings.put("boxPalletNo", "boxPalletNo");
|
||||
// fieldMappings.put("box_pallet_no", "boxPalletNo");
|
||||
// fieldMappings.put("extAttr1", "extAttr1");
|
||||
// fieldMappings.put("ext_attr_1", "extAttr1");
|
||||
// fieldMappings.put("extAttr2", "extAttr2");
|
||||
// fieldMappings.put("ext_attr_2", "extAttr2");
|
||||
// fieldMappings.put("extAttr3", "extAttr3");
|
||||
// fieldMappings.put("ext_attr_3", "extAttr3");
|
||||
// fieldMappings.put("extAttr4", "extAttr4");
|
||||
// fieldMappings.put("ext_attr_4", "extAttr4");
|
||||
//
|
||||
// // 使用反射复制字段值
|
||||
// for (Map.Entry<String, String> entry : fieldMappings.entrySet()) {
|
||||
// String sourceFieldName = entry.getKey();
|
||||
// String targetFieldName = entry.getValue();
|
||||
//
|
||||
// // 尝试从源对象获取字段值(支持驼峰和下划线命名)
|
||||
// Object value = getFieldValue(source, sourceFieldName);
|
||||
// if (value != null) {
|
||||
// // 设置到目标对象(使用驼峰命名)
|
||||
// setFieldValue(target, targetFieldName, value);
|
||||
// log.info("复制字段成功:{} -> {},值:{}", sourceFieldName, targetFieldName, value);
|
||||
// } else {
|
||||
// log.debug("源对象字段 {} 的值为 null,跳过复制", sourceFieldName);
|
||||
// }
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// log.warn("复制特定字段时发生异常,源对象:{},目标对象:{},错误:{}",
|
||||
// source.getClass().getSimpleName(), target.getClass().getSimpleName(), e.getMessage());
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* @description 使用反射获取字段值(支持驼峰和下划线命名)
|
||||
*/
|
||||
private Object getFieldValue(Object obj, String fieldName) {
|
||||
if (obj == null || StringUtils.isBlank(fieldName)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
Class<?> clazz = obj.getClass();
|
||||
Field field = null;
|
||||
|
||||
// 先尝试直接获取字段(驼峰命名)
|
||||
try {
|
||||
field = clazz.getDeclaredField(fieldName);
|
||||
} catch (NoSuchFieldException e) {
|
||||
// 如果失败,尝试转换为驼峰命名(如果是下划线命名)
|
||||
if (fieldName.contains("_")) {
|
||||
String camelCaseName = snakeToCamel(fieldName);
|
||||
try {
|
||||
field = clazz.getDeclaredField(camelCaseName);
|
||||
} catch (NoSuchFieldException ex) {
|
||||
// 继续查找父类
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 如果当前类找不到,查找父类
|
||||
if (field == null) {
|
||||
Class<?> currentClass = clazz.getSuperclass();
|
||||
while (currentClass != null && field == null) {
|
||||
try {
|
||||
field = currentClass.getDeclaredField(fieldName);
|
||||
} catch (NoSuchFieldException e) {
|
||||
if (fieldName.contains("_")) {
|
||||
String camelCaseName = snakeToCamel(fieldName);
|
||||
try {
|
||||
field = currentClass.getDeclaredField(camelCaseName);
|
||||
} catch (NoSuchFieldException ex) {
|
||||
// 继续查找父类
|
||||
}
|
||||
}
|
||||
}
|
||||
currentClass = currentClass.getSuperclass();
|
||||
}
|
||||
}
|
||||
|
||||
if (field != null) {
|
||||
field.setAccessible(true);
|
||||
return field.get(obj);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.debug("获取字段值失败,对象:{},字段名:{},错误:{}",
|
||||
obj.getClass().getSimpleName(), fieldName, e.getMessage());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 使用反射设置字段值
|
||||
*/
|
||||
private void setFieldValue(Object obj, String fieldName, Object value) {
|
||||
if (obj == null || StringUtils.isBlank(fieldName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
Class<?> clazz = obj.getClass();
|
||||
Field field = null;
|
||||
|
||||
// 先尝试直接获取字段(驼峰命名)
|
||||
try {
|
||||
field = clazz.getDeclaredField(fieldName);
|
||||
} catch (NoSuchFieldException e) {
|
||||
// 如果失败,查找父类
|
||||
Class<?> currentClass = clazz.getSuperclass();
|
||||
while (currentClass != null && field == null) {
|
||||
try {
|
||||
field = currentClass.getDeclaredField(fieldName);
|
||||
} catch (NoSuchFieldException ex) {
|
||||
// 继续查找父类
|
||||
}
|
||||
currentClass = currentClass.getSuperclass();
|
||||
}
|
||||
}
|
||||
|
||||
if (field != null) {
|
||||
field.setAccessible(true);
|
||||
// 类型转换:如果值类型不匹配,尝试转换
|
||||
Class<?> fieldType = field.getType();
|
||||
if (value != null && !fieldType.isAssignableFrom(value.getClass())) {
|
||||
// 尝试类型转换
|
||||
if (fieldType == Date.class && value instanceof String) {
|
||||
// 字符串转日期(简单处理,实际可能需要更复杂的解析)
|
||||
value = null; // 暂时不转换,避免解析错误
|
||||
} else if (fieldType == String.class) {
|
||||
value = String.valueOf(value);
|
||||
}
|
||||
}
|
||||
if (value != null && fieldType.isAssignableFrom(value.getClass())) {
|
||||
field.set(obj, value);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.debug("设置字段值失败,对象:{},字段名:{},值:{},错误:{}",
|
||||
obj.getClass().getSimpleName(), fieldName, value, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 下划线命名转驼峰命名
|
||||
*/
|
||||
private String snakeToCamel(String snakeCase) {
|
||||
if (StringUtils.isBlank(snakeCase)) {
|
||||
return snakeCase;
|
||||
}
|
||||
|
||||
String[] parts = snakeCase.split("_");
|
||||
if (parts.length == 0) {
|
||||
return snakeCase;
|
||||
}
|
||||
|
||||
StringBuilder camelCase = new StringBuilder(parts[0].toLowerCase());
|
||||
for (int i = 1; i < parts.length; i++) {
|
||||
if (parts[i].length() > 0) {
|
||||
camelCase.append(parts[i].substring(0, 1).toUpperCase())
|
||||
.append(parts[i].substring(1).toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
return camelCase.toString();
|
||||
}
|
||||
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
package com.mhd.oms.interfaces.facade.reservationInMaterialDetail;
|
||||
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDTO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.service.ReservationInMaterialDetailApplicationService;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.service.ReservationInMaterialDetailAssembler;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细Api
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/materialDetailApi")
|
||||
public class ReservationInMaterialDetailApi extends BaseController {
|
||||
@Autowired
|
||||
private ReservationInMaterialDetailApplicationService inMaterialDetailApplicationService;
|
||||
@Resource
|
||||
private ReservationInMaterialDetailAssembler inMaterialDetailAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
@ApiOperation("查询物料明细列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ReservationInMaterialDetailDTO inMaterialDetailDTO)
|
||||
{
|
||||
//转换实体
|
||||
ReservationInMaterialDetailDO inMaterialDetailDO = inMaterialDetailAssembler.toDO(inMaterialDetailDTO);
|
||||
startPage();
|
||||
List<ReservationInMaterialDetailPO> list = inMaterialDetailApplicationService.queryList(inMaterialDetailDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑物料明细
|
||||
*/
|
||||
@ApiOperation("编辑物料明细")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody ReservationInMaterialDetailDTO inMaterialDetailDTO)
|
||||
{
|
||||
//转换实体
|
||||
ReservationInMaterialDetailDO inMaterialDetailDO = inMaterialDetailAssembler.toDOByEdit(inMaterialDetailDTO);
|
||||
if(inMaterialDetailDTO.getMaterialDetailId() != null){
|
||||
return toAjax(inMaterialDetailApplicationService.update(inMaterialDetailDO));
|
||||
}else {
|
||||
return toAjax(inMaterialDetailApplicationService.insert(inMaterialDetailDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
@ApiOperation("批量删除物料明细")
|
||||
@DeleteMapping("/deleteByIds/{materialDetailIds}")
|
||||
public AjaxResult delete(@PathVariable Long[] materialDetailIds)
|
||||
{
|
||||
return toAjax(inMaterialDetailApplicationService.delete(materialDetailIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物料明细详细信息
|
||||
*/
|
||||
@ApiOperation("获取物料明细")
|
||||
@GetMapping(value = "/getInfo/{materialDetailId}")
|
||||
public AjaxResult getInfo(@PathVariable("materialDetailId") Long materialDetailId)
|
||||
{
|
||||
return AjaxResult.success(inMaterialDetailApplicationService.getInfo(materialDetailId));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
package com.mhd.oms.interfaces.facade.reservationStockInOrder;
|
||||
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.po.ReservationStockInOrderPO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDTO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.service.ReservationStockInOrderApplicationService;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.service.ReservationStockInOrderAssembler;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库单Api
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/reservationStockInOrderApi")
|
||||
public class ReservationStockInOrderApi extends BaseController {
|
||||
@Autowired
|
||||
private ReservationStockInOrderApplicationService stockInOrderApplicationService;
|
||||
|
||||
@Resource
|
||||
private ReservationStockInOrderAssembler stockInOrderAssembler;
|
||||
|
||||
/**
|
||||
* 分页查询入库单列表
|
||||
*/
|
||||
@ApiOperation("查询入库单列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ReservationStockInOrderDTO stockInOrderDTO)
|
||||
{
|
||||
//转换实体
|
||||
ReservationStockInOrderDO stockInOrderDO = stockInOrderAssembler.toDO(stockInOrderDTO);
|
||||
startPage();
|
||||
List<ReservationStockInOrderPO> list = stockInOrderApplicationService.queryList(stockInOrderDO);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑入库单
|
||||
*/
|
||||
@ApiOperation("编辑入库单")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody ReservationStockInOrderDTO stockInOrderDTO)
|
||||
{
|
||||
//转换实体
|
||||
ReservationStockInOrderDO stockInOrderDO = stockInOrderAssembler.toDOByEdit(stockInOrderDTO);
|
||||
if(stockInOrderDTO.getInOrderId() != null){
|
||||
return toAjax(stockInOrderApplicationService.update(stockInOrderDO));
|
||||
}else {
|
||||
return toAjax(stockInOrderApplicationService.insert(stockInOrderDO));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库单
|
||||
*/
|
||||
@ApiOperation("批量删除入库单")
|
||||
@DeleteMapping("/deleteByIds/{inOrderIds}")
|
||||
public AjaxResult delete(@PathVariable Long[] inOrderIds)
|
||||
{
|
||||
return toAjax(stockInOrderApplicationService.delete(inOrderIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取入库单详细信息
|
||||
*/
|
||||
@ApiOperation("获取入库单")
|
||||
@GetMapping(value = "/getInfo/{inOrderId}")
|
||||
public AjaxResult getInfo(@PathVariable("inOrderId") Long inOrderId)
|
||||
{
|
||||
return AjaxResult.success(stockInOrderApplicationService.getInfo(inOrderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入入库单
|
||||
*/
|
||||
// @ApiOperation("导入入库单")
|
||||
// @PostMapping(value = "/importData")
|
||||
// public AjaxResult importData(
|
||||
// @RequestParam("file") MultipartFile file,
|
||||
// @RequestParam("warehouseId") Long warehouseId,
|
||||
// @RequestParam("warehouseCode") String warehouseCode,
|
||||
// @RequestParam("warehouseName") String warehouseName)
|
||||
// {
|
||||
// return AjaxResult.success(stockInOrderApplicationService.importData(file, warehouseId, warehouseCode, warehouseName));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 审核入库单
|
||||
*/
|
||||
@ApiOperation("审核入库单")
|
||||
@PostMapping(value = "/auditState")
|
||||
public AjaxResult auditState(@RequestBody ReservationStockInOrderDTO stockInOrderDTO) {
|
||||
ReservationStockInOrderDO stockInOrderDO = stockInOrderAssembler.toDO(stockInOrderDTO);
|
||||
return AjaxResult.success(stockInOrderApplicationService.auditState(stockInOrderDO));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 取消入库单
|
||||
*/
|
||||
@ApiOperation("取消入库单")
|
||||
@PostMapping(value = "/cancelOrder")
|
||||
public AjaxResult cancelOrder(@RequestBody ReservationStockInOrderDTO stockInOrderDTO) {
|
||||
ReservationStockInOrderDO stockInOrderDO = stockInOrderAssembler.toDO(stockInOrderDTO);
|
||||
return AjaxResult.success(stockInOrderApplicationService.cancelOrder(stockInOrderDO));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 关闭入库单
|
||||
*/
|
||||
@ApiOperation("关闭入库单")
|
||||
@PostMapping(value = "/closeOrder")
|
||||
public AjaxResult closeOrder(@RequestBody ReservationStockInOrderDTO stockInOrderDTO) {
|
||||
ReservationStockInOrderDO stockInOrderDO = stockInOrderAssembler.toDO(stockInOrderDTO);
|
||||
return AjaxResult.success(stockInOrderApplicationService.closeOrder(stockInOrderDO));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user