仓储执行单;
This commit is contained in:
+396
@@ -0,0 +1,396 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.entity;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 物料明细对象 material_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ExecutionInMaterialDetail 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 unitPrice;
|
||||
|
||||
@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;
|
||||
@ApiModelProperty(value = "饮用时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date drinkDate;
|
||||
@ApiModelProperty("火险保费")
|
||||
private BigDecimal fireInsureFee;
|
||||
|
||||
|
||||
//订单行号
|
||||
private String lineNumGw;
|
||||
//物料规格
|
||||
private String specGw;
|
||||
//计量单位
|
||||
private String unitGw;
|
||||
//数量
|
||||
private BigDecimal qtyGw;
|
||||
//企业币制
|
||||
private String erpCurrGw;
|
||||
//企业单价
|
||||
private BigDecimal erpPriceGw;
|
||||
//申报总价
|
||||
private BigDecimal amountGw;
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.entity.ExecutionInMaterialDetail;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.QueryOrderOverStockDO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailBaseDO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface IExecutionInMaterialDetailService extends IService<ExecutionInMaterialDetail>
|
||||
{
|
||||
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
public List<ExecutionInMaterialDetailPO> queryList(ExecutionInMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
|
||||
public List<ExecutionInMaterialDetailPO> queryInOrderList(QueryOrderOverStockDO queryOrderOverStockDO);
|
||||
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
public List<ExecutionInMaterialDetailPO> queryListChildren(ExecutionInMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
public Boolean insert(ExecutionInMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean update(ExecutionInMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
public Boolean batchInsert(String orderNumber, List<ExecutionInMaterialDetailDO> inMaterialDetailDOList);
|
||||
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean batchUpdate(List<ExecutionInMaterialDetailDO> inMaterialDetailDOList, ExecutionInMaterialDetailBaseDO inMaterialDetailBaseDO);
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
public Boolean delete(Long[] materialDetailIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询物料明细
|
||||
*/
|
||||
public ExecutionInMaterialDetailPO getInfo(Long materialDetailId);
|
||||
|
||||
public List<InventoryAdjustmentRecordPO> getkctzjl(Long materialBaseInfoId, String orderNumber, String adjustType);
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.entity.ExecutionInMaterialDetail;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.QueryOrderOverStockDO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface ExecutionInMaterialDetailMapper extends BaseMapper<ExecutionInMaterialDetail>
|
||||
{
|
||||
/**
|
||||
* 查询物料明细列表
|
||||
*/
|
||||
public List<ExecutionInMaterialDetailPO> queryList(ExecutionInMaterialDetailDO inMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 关联入库单查询物料明细列表
|
||||
*/
|
||||
public List<ExecutionInMaterialDetailPO> queryInOrderList(QueryOrderOverStockDO queryOrderOverStockDO);
|
||||
|
||||
public List<InventoryAdjustmentRecordPO> getkctzjl(@Param("materialBaseInfoId") Long materialBaseInfoId, @Param("orderNumber") String orderNumber, @Param("adjustType") String adjustType);
|
||||
|
||||
}
|
||||
+312
@@ -0,0 +1,312 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.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.executionInMaterialDetail.entity.ExecutionInMaterialDetail;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.facade.IExecutionInMaterialDetailService;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.mapper.ExecutionInMaterialDetailMapper;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.QueryOrderOverStockDO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailBaseDO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailDO;
|
||||
import com.mhd.oms.domain.reservationMaterialInventory.entity.ReservationMaterialInventory;
|
||||
import com.mhd.oms.domain.reservationMaterialInventory.repository.facade.IReservationMaterialInventoryService;
|
||||
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 ExecutionInMaterialDetailImpl extends ServiceImpl<ExecutionInMaterialDetailMapper, ExecutionInMaterialDetail> implements IExecutionInMaterialDetailService {
|
||||
@Autowired
|
||||
private ExecutionInMaterialDetailMapper inMaterialDetailMapper;
|
||||
// @Autowired
|
||||
// private IMaterialBaseInfoService materialBaseInfoService;
|
||||
// @Autowired
|
||||
// private IMaterialGoodsRuleService materialGoodsRuleService;
|
||||
// @Autowired
|
||||
// private IMaterialWarehouseControlService materialWarehouseControlService;
|
||||
// @Autowired
|
||||
// private SystemServiceFeign systemServiceFeign;
|
||||
@Autowired
|
||||
private IdGenerator idGenerator;
|
||||
|
||||
@Autowired
|
||||
private IReservationMaterialInventoryService reservationMaterialInventoryService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询物料明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExecutionInMaterialDetailPO> queryList(ExecutionInMaterialDetailDO inMaterialDetailDO) {
|
||||
return inMaterialDetailMapper.queryList(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联入库单查询物料明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExecutionInMaterialDetailPO> queryInOrderList(QueryOrderOverStockDO queryOrderOverStockDO) {
|
||||
return inMaterialDetailMapper.queryInOrderList(queryOrderOverStockDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物料明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExecutionInMaterialDetailPO> queryListChildren(ExecutionInMaterialDetailDO inMaterialDetailDO)
|
||||
{
|
||||
List<ExecutionInMaterialDetailPO> inMaterialDetailPOList = inMaterialDetailMapper.queryList(inMaterialDetailDO);
|
||||
|
||||
// 获取查询的层级
|
||||
List<ExecutionInMaterialDetailPO> 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<ExecutionInMaterialDetailPO> getChildren(Long parentUniqueId, List<ExecutionInMaterialDetailPO> inMaterialDetailPOList, Integer maxLevel){
|
||||
List<ExecutionInMaterialDetailPO> 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(ExecutionInMaterialDetailDO inMaterialDetailDO) {
|
||||
ExecutionInMaterialDetail inMaterialDetail = new ExecutionInMaterialDetail();
|
||||
BeanUtils.copyProperties(inMaterialDetailDO, inMaterialDetail);
|
||||
return this.save(inMaterialDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(ExecutionInMaterialDetailDO inMaterialDetailDO) {
|
||||
ExecutionInMaterialDetail inMaterialDetail = new ExecutionInMaterialDetail();
|
||||
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<ExecutionInMaterialDetailDO> 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<ExecutionInMaterialDetail> inMaterialDetailList = new ArrayList<>();
|
||||
for (ExecutionInMaterialDetailDO inMaterialDetailDO : inMaterialDetailDOList){
|
||||
ExecutionInMaterialDetail inMaterialDetail = new ExecutionInMaterialDetail();
|
||||
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());
|
||||
}
|
||||
|
||||
if (inMaterialDetail.getInboundQuantity() == null && inMaterialDetailDO.getQuantity() != null) {
|
||||
inMaterialDetail.setInboundQuantity(inMaterialDetailDO.getQuantity());
|
||||
}
|
||||
inMaterialDetailList.add(inMaterialDetail);
|
||||
}
|
||||
//插入库存表
|
||||
putIntoInventory(inMaterialDetailList);
|
||||
return saveBatch(inMaterialDetailList);
|
||||
}
|
||||
|
||||
|
||||
private void putIntoInventory(List<ExecutionInMaterialDetail> inMaterialDetailList) {
|
||||
for (ExecutionInMaterialDetail reservationInMaterialDetail : inMaterialDetailList) {
|
||||
ReservationMaterialInventory reservationMaterialInventory = new ReservationMaterialInventory();
|
||||
BeanUtils.copyProperties(reservationInMaterialDetail, reservationMaterialInventory);
|
||||
reservationMaterialInventory.setLotNumber(reservationInMaterialDetail.getLotNo());
|
||||
UpdateWrapper<ReservationMaterialInventory> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.lambda()
|
||||
.eq(reservationMaterialInventory.getShipperId() != null,ReservationMaterialInventory::getShipperId, reservationMaterialInventory.getShipperId())
|
||||
.eq(reservationMaterialInventory.getWarehouseId() != null,ReservationMaterialInventory::getWarehouseId, reservationMaterialInventory.getWarehouseId())
|
||||
.eq(reservationMaterialInventory.getMaterialBaseInfoId() != null,ReservationMaterialInventory::getMaterialBaseInfoId, reservationMaterialInventory.getMaterialBaseInfoId())
|
||||
.eq(reservationMaterialInventory.getInOrderNumber() != null,ReservationMaterialInventory::getInOrderNumber, reservationMaterialInventory.getInOrderNumber())
|
||||
.eq(reservationMaterialInventory.getLotNumber() != null,ReservationMaterialInventory::getLotNumber, reservationMaterialInventory.getLotNumber())
|
||||
.eq(reservationMaterialInventory.getBatchNumber() != null,ReservationMaterialInventory::getBatchNumber, reservationMaterialInventory.getBatchNumber())
|
||||
;
|
||||
//reservationMaterialInventoryService.saveOrUpdate(reservationMaterialInventory,updateWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 批量修改物流明细
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/22 9:27
|
||||
* @param inMaterialDetailDOList
|
||||
* @param inMaterialDetailBaseDO
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean batchUpdate(List<ExecutionInMaterialDetailDO> inMaterialDetailDOList, ExecutionInMaterialDetailBaseDO 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<ExecutionInMaterialDetail> inMaterialDetailDbAllList = inMaterialDetailMapper.selectList(new QueryWrapper<ExecutionInMaterialDetail>().lambda()
|
||||
.eq(ExecutionInMaterialDetail::getInOrderNumber, inMaterialDetailBaseDO.getInOrderNumber()));
|
||||
// 查询未删除的记录,用于正常的更新逻辑
|
||||
List<ExecutionInMaterialDetail> inMaterialDetailDbList = inMaterialDetailDbAllList.stream()
|
||||
.filter(item -> item.getDelFlag() != null && item.getDelFlag() == 1)
|
||||
.collect(Collectors.toList());
|
||||
Map<Long, ExecutionInMaterialDetail> materialDetailMap = inMaterialDetailDbList.stream().collect(Collectors.toMap(ExecutionInMaterialDetail::getMaterialDetailId, Function.identity()));
|
||||
// 查询已删除的记录,用于恢复逻辑
|
||||
Map<Long, ExecutionInMaterialDetail> materialDetailDeletedMap = inMaterialDetailDbAllList.stream()
|
||||
.filter(item -> item.getDelFlag() != null && item.getDelFlag() == 2)
|
||||
.collect(Collectors.toMap(ExecutionInMaterialDetail::getMaterialDetailId, Function.identity()));
|
||||
//批量新增或修改物料信息
|
||||
List<ExecutionInMaterialDetail> inMaterialDetailList = new ArrayList<>();
|
||||
//需要修改的物流明细
|
||||
List<Long> materialDetailIdsByUpdate = new ArrayList<>();
|
||||
for (ExecutionInMaterialDetailDO inMaterialDetailDO : inMaterialDetailDOList){
|
||||
//判断是否需要修改
|
||||
ExecutionInMaterialDetail inMaterialDetail = null;
|
||||
if (inMaterialDetailDO.getMaterialDetailId() != null) {
|
||||
// 先查找未删除的记录
|
||||
inMaterialDetail = materialDetailMap.get(inMaterialDetailDO.getMaterialDetailId());
|
||||
// 如果未删除的记录中找不到,检查是否在已删除的记录中
|
||||
if (inMaterialDetail == null) {
|
||||
ExecutionInMaterialDetail deletedDetail = materialDetailDeletedMap.get(inMaterialDetailDO.getMaterialDetailId());
|
||||
if (deletedDetail != null) {
|
||||
// 恢复已删除的记录
|
||||
inMaterialDetail = deletedDetail;
|
||||
inMaterialDetail.setDelFlag(1); // 恢复记录
|
||||
}
|
||||
}
|
||||
}
|
||||
if (inMaterialDetail == null){
|
||||
// 新增明细:清空 materialDetailId,让数据库自动生成
|
||||
inMaterialDetail = new ExecutionInMaterialDetail();
|
||||
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(ExecutionInMaterialDetail::getMaterialDetailId).collect(Collectors.toList());
|
||||
//过滤需要修改的id集合
|
||||
materialDetailIdsByDb.removeAll(materialDetailIdsByUpdate);
|
||||
//判断是否存在需要删除的物流明细 标记删除
|
||||
if (!CollectionUtils.isEmpty(materialDetailIdsByDb)){
|
||||
update(new UpdateWrapper<ExecutionInMaterialDetail>().lambda()
|
||||
.set(ExecutionInMaterialDetail::getDelFlag, 2)
|
||||
.set(ExecutionInMaterialDetail::getUpdateBy, loginUser.getUserid())
|
||||
.set(ExecutionInMaterialDetail::getUpdateByName, userRealName)
|
||||
.set(ExecutionInMaterialDetail::getUpdateTime, new Date())
|
||||
.in(ExecutionInMaterialDetail::getMaterialDetailId, materialDetailIdsByDb));
|
||||
}
|
||||
}
|
||||
//保存物料明细信息
|
||||
return saveOrUpdateBatch(inMaterialDetailList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] materialDetailIds ) {
|
||||
List<ExecutionInMaterialDetail> list = new ArrayList<>();
|
||||
for (Long id : materialDetailIds) {
|
||||
ExecutionInMaterialDetail inMaterialDetail = new ExecutionInMaterialDetail();
|
||||
inMaterialDetail.setMaterialDetailId(id);
|
||||
inMaterialDetail.setDelFlag(2);
|
||||
list.add(inMaterialDetail);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
@Override
|
||||
public ExecutionInMaterialDetailPO getInfo(Long materialDetailId) {
|
||||
ExecutionInMaterialDetail inMaterialDetail = this.getById(materialDetailId);
|
||||
ExecutionInMaterialDetailPO inMaterialDetailPO = new ExecutionInMaterialDetailPO();
|
||||
BeanUtils.copyProperties(inMaterialDetail, inMaterialDetailPO);
|
||||
return inMaterialDetailPO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InventoryAdjustmentRecordPO> getkctzjl(Long materialBaseInfoId, String orderNumber, String adjustType) {
|
||||
return inMaterialDetailMapper.getkctzjl(materialBaseInfoId, orderNumber, adjustType);
|
||||
}
|
||||
|
||||
}
|
||||
+498
@@ -0,0 +1,498 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.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.executionStockInOrder.repository.po.ExecutionStockInOrderBasePO;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 物料明细对象 material_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "物料明细对象", description = "物料明细响应对象")
|
||||
public class ExecutionInMaterialDetailPO extends ExecutionStockInOrderBasePO {
|
||||
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<ExecutionInMaterialDetailPO> 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", timezone = "GMT+8")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
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;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
|
||||
@ApiModelProperty("调整前库存数量")
|
||||
@Excel(name = "调整前库存数量")
|
||||
private BigDecimal inventoryBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前可用数量")
|
||||
@Excel(name = "调整前可用数量")
|
||||
private BigDecimal allocationBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前冻结数量")
|
||||
@Excel(name = "调整前冻结数量")
|
||||
private BigDecimal freezeBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整后库存数量")
|
||||
@Excel(name = "调整后库存数量")
|
||||
private BigDecimal inventoryAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后可用数量")
|
||||
@Excel(name = "调整后可用数量")
|
||||
private BigDecimal allocationAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后冻结数量")
|
||||
@Excel(name = "调整后冻结数量")
|
||||
private BigDecimal freezeAfterQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("调整前净重(KG)")
|
||||
@Excel(name = "调整前净重(KG)")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
@ApiModelProperty("调整前毛重(KG)")
|
||||
@Excel(name = "调整前毛重(KG)")
|
||||
private BigDecimal grossWeight;
|
||||
|
||||
@ApiModelProperty("调整前体积")
|
||||
@Excel(name = "调整前体积")
|
||||
private BigDecimal volume;
|
||||
|
||||
@ApiModelProperty("调整前面积")
|
||||
@Excel(name = "调整前面积")
|
||||
private BigDecimal area;
|
||||
|
||||
@ApiModelProperty("调整后净重(KG)")
|
||||
@Excel(name = "调整后净重(KG)")
|
||||
private BigDecimal adjustedNetWeight;
|
||||
|
||||
@ApiModelProperty("调整后毛重(KG)")
|
||||
@Excel(name = "调整后毛重(KG)")
|
||||
private BigDecimal adjustedGrossWeight;
|
||||
|
||||
@ApiModelProperty("调整后体积")
|
||||
@Excel(name = "调整后体积")
|
||||
private BigDecimal adjustedVolume;
|
||||
|
||||
@ApiModelProperty("调整后面积")
|
||||
@Excel(name = "调整后面积")
|
||||
private BigDecimal adjustedArea;
|
||||
@ApiModelProperty(value = "饮用时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date drinkDate;
|
||||
private String lotNumber;
|
||||
@ApiModelProperty("火险保费")
|
||||
private BigDecimal fireInsureFee;
|
||||
|
||||
//订单行号
|
||||
private String lineNumGw;
|
||||
//物料规格
|
||||
private String specGw;
|
||||
//计量单位
|
||||
private String unitGw;
|
||||
//数量
|
||||
private BigDecimal qtyGw;
|
||||
//企业币制
|
||||
private String erpCurrGw;
|
||||
//企业单价
|
||||
private BigDecimal erpPriceGw;
|
||||
//申报总价
|
||||
private BigDecimal amountGw;
|
||||
private String khdm;
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.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 ExecutionInMaterialDetailBaseDO 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;
|
||||
}
|
||||
+463
@@ -0,0 +1,463 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
//import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ExecutionStockInOrderBaseDO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.todo.ExecutionStockInOrderBaseDO;
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
* 物料明细对象 material_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ExecutionInMaterialDetailDO extends ExecutionStockInOrderBaseDO {
|
||||
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<ExecutionInMaterialDetailDO> children;
|
||||
|
||||
// @ApiModelProperty("更多属性")
|
||||
// private List<MaterialMoreDetailDO> materialMoreDetailList;
|
||||
|
||||
// @ApiModelProperty("序列号")
|
||||
// private List<ExecutionInMaterialDetailSerialNumberDO> 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;
|
||||
|
||||
|
||||
@ApiModelProperty("调整前库存数量")
|
||||
@Excel(name = "调整前库存数量")
|
||||
private BigDecimal inventoryBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前可用数量")
|
||||
@Excel(name = "调整前可用数量")
|
||||
private BigDecimal allocationBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前冻结数量")
|
||||
@Excel(name = "调整前冻结数量")
|
||||
private BigDecimal freezeBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整后库存数量")
|
||||
@Excel(name = "调整后库存数量")
|
||||
private BigDecimal inventoryAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后可用数量")
|
||||
@Excel(name = "调整后可用数量")
|
||||
private BigDecimal allocationAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后冻结数量")
|
||||
@Excel(name = "调整后冻结数量")
|
||||
private BigDecimal freezeAfterQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("调整前净重(KG)")
|
||||
@Excel(name = "调整前净重(KG)")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
@ApiModelProperty("调整前毛重(KG)")
|
||||
@Excel(name = "调整前毛重(KG)")
|
||||
private BigDecimal grossWeight;
|
||||
|
||||
@ApiModelProperty("调整前体积")
|
||||
@Excel(name = "调整前体积")
|
||||
private BigDecimal volume;
|
||||
|
||||
@ApiModelProperty("调整前面积")
|
||||
@Excel(name = "调整前面积")
|
||||
private BigDecimal area;
|
||||
|
||||
@ApiModelProperty("调整后净重(KG)")
|
||||
@Excel(name = "调整后净重(KG)")
|
||||
private BigDecimal adjustedNetWeight;
|
||||
|
||||
@ApiModelProperty("调整后毛重(KG)")
|
||||
@Excel(name = "调整后毛重(KG)")
|
||||
private BigDecimal adjustedGrossWeight;
|
||||
|
||||
@ApiModelProperty("调整后体积")
|
||||
@Excel(name = "调整后体积")
|
||||
private BigDecimal adjustedVolume;
|
||||
|
||||
@ApiModelProperty("调整后面积")
|
||||
@Excel(name = "调整后面积")
|
||||
private BigDecimal adjustedArea;
|
||||
|
||||
@ApiModelProperty(value = "饮用时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date drinkDate;
|
||||
private String expiryDate;
|
||||
private String productionDate;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
@ApiModelProperty("火险保费")
|
||||
private BigDecimal fireInsureFee;
|
||||
|
||||
//订单行号
|
||||
private String lineNumGw;
|
||||
//物料规格
|
||||
private String specGw;
|
||||
//计量单位
|
||||
private String unitGw;
|
||||
//数量
|
||||
private BigDecimal qtyGw;
|
||||
//企业币制
|
||||
private String erpCurrGw;
|
||||
//企业单价
|
||||
private BigDecimal erpPriceGw;
|
||||
//申报总价
|
||||
private BigDecimal amountGw;
|
||||
}
|
||||
+469
@@ -0,0 +1,469 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
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;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细对象 material_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ExecutionInMaterialDetailDTO 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 BigDecimal unitPrice;
|
||||
|
||||
@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;
|
||||
|
||||
|
||||
@ApiModelProperty("调整前库存数量")
|
||||
@Excel(name = "调整前库存数量")
|
||||
private BigDecimal inventoryBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前可用数量")
|
||||
@Excel(name = "调整前可用数量")
|
||||
private BigDecimal allocationBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前冻结数量")
|
||||
@Excel(name = "调整前冻结数量")
|
||||
private BigDecimal freezeBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整后库存数量")
|
||||
@Excel(name = "调整后库存数量")
|
||||
private BigDecimal inventoryAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后可用数量")
|
||||
@Excel(name = "调整后可用数量")
|
||||
private BigDecimal allocationAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后冻结数量")
|
||||
@Excel(name = "调整后冻结数量")
|
||||
private BigDecimal freezeAfterQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("调整前净重(KG)")
|
||||
@Excel(name = "调整前净重(KG)")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
@ApiModelProperty("调整前毛重(KG)")
|
||||
@Excel(name = "调整前毛重(KG)")
|
||||
private BigDecimal grossWeight;
|
||||
|
||||
@ApiModelProperty("调整前体积")
|
||||
@Excel(name = "调整前体积")
|
||||
private BigDecimal volume;
|
||||
|
||||
@ApiModelProperty("调整前面积")
|
||||
@Excel(name = "调整前面积")
|
||||
private BigDecimal area;
|
||||
|
||||
@ApiModelProperty("调整后净重(KG)")
|
||||
@Excel(name = "调整后净重(KG)")
|
||||
private BigDecimal adjustedNetWeight;
|
||||
|
||||
@ApiModelProperty("调整后毛重(KG)")
|
||||
@Excel(name = "调整后毛重(KG)")
|
||||
private BigDecimal adjustedGrossWeight;
|
||||
|
||||
@ApiModelProperty("调整后体积")
|
||||
@Excel(name = "调整后体积")
|
||||
private BigDecimal adjustedVolume;
|
||||
|
||||
@ApiModelProperty("调整后面积")
|
||||
@Excel(name = "调整后面积")
|
||||
private BigDecimal adjustedArea;
|
||||
|
||||
@ApiModelProperty(value = "饮用时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
private Date drinkDate;
|
||||
private String expiryDate;
|
||||
private String productionDate;
|
||||
@ApiModelProperty("火险保费")
|
||||
private BigDecimal fireInsureFee;
|
||||
|
||||
//订单行号
|
||||
private String lineNumGw;
|
||||
//物料规格
|
||||
private String specGw;
|
||||
//计量单位
|
||||
private String unitGw;
|
||||
//数量
|
||||
private BigDecimal qtyGw;
|
||||
//企业币制
|
||||
private String erpCurrGw;
|
||||
//企业单价
|
||||
private BigDecimal erpPriceGw;
|
||||
//申报总价
|
||||
private BigDecimal amountGw;
|
||||
}
|
||||
+254
@@ -0,0 +1,254 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.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.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 库存调整记录对象 inventory_adjustment_record
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-07-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "库存调整记录对象", description = "库存调整记录响应对象")
|
||||
public class InventoryAdjustmentRecordPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("库存调整记录id")
|
||||
private Long inventoryAdjustmentId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("物料库存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("货主id")
|
||||
@Excel(name = "货主id")
|
||||
private Long shipperId;
|
||||
|
||||
@ApiModelProperty("货主名称")
|
||||
@Excel(name = "货主名称")
|
||||
private String shipperName;
|
||||
|
||||
@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 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("调整类型:0:无状态 1:数量调整 :2:状态调整 3:库存冻结")
|
||||
@Excel(name = "调整类型:0:无状态 1:数量调整 :2:状态调整 3:库存冻结")
|
||||
private Long adjustType;
|
||||
|
||||
@ApiModelProperty("调整方向:0:无状态 1:增库存 2:减库存")
|
||||
@Excel(name = "调整方向:0:无状态 1:增库存 2:减库存")
|
||||
private Long adjustDirection;
|
||||
|
||||
@ApiModelProperty("调整前状态编码")
|
||||
@Excel(name = "调整前状态编码")
|
||||
private String adjustBeforeStatusCode;
|
||||
|
||||
@ApiModelProperty("调整前状态名称")
|
||||
@Excel(name = "调整前状态名称")
|
||||
private String adjustBeforeStatusName;
|
||||
|
||||
@ApiModelProperty("调整后状态编码")
|
||||
@Excel(name = "调整后状态编码")
|
||||
private String adjustAfterStatusCode;
|
||||
|
||||
@ApiModelProperty("调整后状态名称")
|
||||
@Excel(name = "调整后状态名称")
|
||||
private String adjustAfterStatusName;
|
||||
|
||||
@ApiModelProperty("调整前库存数量")
|
||||
@Excel(name = "调整前库存数量")
|
||||
private BigDecimal inventoryBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前可用数量")
|
||||
@Excel(name = "调整前可用数量")
|
||||
private BigDecimal allocationBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前冻结数量")
|
||||
@Excel(name = "调整前冻结数量")
|
||||
private BigDecimal freezeBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整后库存数量")
|
||||
@Excel(name = "调整后库存数量")
|
||||
private BigDecimal inventoryAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后可用数量")
|
||||
@Excel(name = "调整后可用数量")
|
||||
private BigDecimal allocationAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后冻结数量")
|
||||
@Excel(name = "调整后冻结数量")
|
||||
private BigDecimal freezeAfterQuantity;
|
||||
|
||||
@ApiModelProperty("Batch Ref NO's")
|
||||
@Excel(name = "Batch Ref NO's")
|
||||
private String batchRefNo;
|
||||
|
||||
@ApiModelProperty("Sheet Ref NO's")
|
||||
@Excel(name = "Sheet Ref NO's")
|
||||
private String sheetRefNo;
|
||||
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
@ApiModelProperty("扩展字段1")
|
||||
@Excel(name = "扩展字段1")
|
||||
private String extAttr1;
|
||||
|
||||
@ApiModelProperty("扩展字段2")
|
||||
@Excel(name = "扩展字段2")
|
||||
private String extAttr2;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("ExtAttr3")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("ExtAttr4")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr4;
|
||||
//
|
||||
// @ApiModelProperty("物料更多属性列表(批次属性)")
|
||||
// private List<MaterialMoreDetailPO> materialMoreDetailList;
|
||||
|
||||
@ApiModelProperty("调整动作")
|
||||
@Excel(name = "调整动作")
|
||||
private String adjustAction;
|
||||
|
||||
@ApiModelProperty("关联单号")
|
||||
@Excel(name = "关联单号")
|
||||
private String relateNo;
|
||||
|
||||
@ApiModelProperty("调整前净重(KG)")
|
||||
@Excel(name = "调整前净重(KG)")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
@ApiModelProperty("调整前毛重(KG)")
|
||||
@Excel(name = "调整前毛重(KG)")
|
||||
private BigDecimal grossWeight;
|
||||
|
||||
@ApiModelProperty("调整前体积")
|
||||
@Excel(name = "调整前体积")
|
||||
private BigDecimal volume;
|
||||
|
||||
@ApiModelProperty("调整前面积")
|
||||
@Excel(name = "调整前面积")
|
||||
private BigDecimal area;
|
||||
|
||||
@ApiModelProperty("调整后净重(KG)")
|
||||
@Excel(name = "调整后净重(KG)")
|
||||
private BigDecimal adjustedNetWeight;
|
||||
|
||||
@ApiModelProperty("调整后毛重(KG)")
|
||||
@Excel(name = "调整后毛重(KG)")
|
||||
private BigDecimal adjustedGrossWeight;
|
||||
|
||||
@ApiModelProperty("调整后体积")
|
||||
@Excel(name = "调整后体积")
|
||||
private BigDecimal adjustedVolume;
|
||||
|
||||
@ApiModelProperty("调整后面积")
|
||||
@Excel(name = "调整后面积")
|
||||
private BigDecimal adjustedArea;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("LOT编号")
|
||||
@Excel(name = "LOT编号")
|
||||
// private String LotNumber;
|
||||
private String lotNumber;
|
||||
}
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.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;
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.service;
|
||||
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailDO;
|
||||
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 ExecutionInMaterialDetailApplicationService {
|
||||
@Autowired
|
||||
private ExecutionInMaterialDetailDomainService inMaterialDetailDomainService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
|
||||
public List<ExecutionInMaterialDetailPO> queryList(ExecutionInMaterialDetailDO 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(ExecutionInMaterialDetailDO inMaterialDetailDO) {
|
||||
|
||||
return inMaterialDetailDomainService.insert(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean update(ExecutionInMaterialDetailDO inMaterialDetailDO) {
|
||||
return inMaterialDetailDomainService.update(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
public boolean delete(Long[] materialDetailIds) {
|
||||
return inMaterialDetailDomainService.delete(materialDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物料明细详细信息
|
||||
*/
|
||||
public ExecutionInMaterialDetailPO getInfo(Long materialDetailId)
|
||||
{
|
||||
return inMaterialDetailDomainService.getInfo(materialDetailId);
|
||||
}
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.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.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailDO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailDTO;
|
||||
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 ExecutionInMaterialDetailAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ExecutionInMaterialDetailDO toDO(ExecutionInMaterialDetailDTO inMaterialDetailDTO) {
|
||||
ExecutionInMaterialDetailDO inMaterialDetailDO = new ExecutionInMaterialDetailDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(inMaterialDetailDTO, inMaterialDetailDO, IgnoreNullUtil.getNullPropertyNames(inMaterialDetailDTO));
|
||||
return inMaterialDetailDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ExecutionInMaterialDetailDO toDOByEdit(ExecutionInMaterialDetailDTO inMaterialDetailDTO) {
|
||||
ExecutionInMaterialDetailDO inMaterialDetailDO = new ExecutionInMaterialDetailDO();
|
||||
// 拷贝
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.oms.domain.executionInMaterialDetail.service;
|
||||
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.facade.IExecutionInMaterialDetailService;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailDO;
|
||||
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 ExecutionInMaterialDetailDomainService {
|
||||
|
||||
@Autowired
|
||||
private IExecutionInMaterialDetailService materialDetailService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
public List<ExecutionInMaterialDetailPO> queryList(ExecutionInMaterialDetailDO inMaterialDetailDO) {
|
||||
return materialDetailService.queryList(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
public Boolean insert(ExecutionInMaterialDetailDO inMaterialDetailDO) {
|
||||
|
||||
return materialDetailService.insert(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean update(ExecutionInMaterialDetailDO inMaterialDetailDO) {
|
||||
return materialDetailService.update(inMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
public Boolean delete(Long[] materialDetailIds) {
|
||||
return materialDetailService.delete(materialDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物料明细详细信息
|
||||
*/
|
||||
public ExecutionInMaterialDetailPO getInfo(Long materialDetailId)
|
||||
{
|
||||
return materialDetailService.getInfo(materialDetailId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+521
@@ -0,0 +1,521 @@
|
||||
package com.mhd.oms.domain.executionOutMaterialDetail.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 物料明细对象 material_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ExecutionOutMaterialDetail 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 outOrderNumber;
|
||||
|
||||
@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 alreadyAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("本次分配数量")
|
||||
@Excel(name = "本次分配数量")
|
||||
@TableField(exist = false)
|
||||
private BigDecimal nowAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("分配数量")
|
||||
@Excel(name = "分配数量")
|
||||
private BigDecimal allocationQuantity;
|
||||
|
||||
@ApiModelProperty("拣货数量")
|
||||
@Excel(name = "拣货数量")
|
||||
private BigDecimal pickingQuantity;
|
||||
|
||||
@ApiModelProperty("复核数量")
|
||||
@Excel(name = "复核数量")
|
||||
private BigDecimal checkQuantity;
|
||||
|
||||
@ApiModelProperty("净重 单位:千克")
|
||||
@Excel(name = "净重 单位:千克")
|
||||
private BigDecimal weightLimit;
|
||||
|
||||
@ApiModelProperty("体积 单位:立方米")
|
||||
@Excel(name = "体积 单位:立方米")
|
||||
private BigDecimal volumeLimit;
|
||||
|
||||
@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("物料库存id")
|
||||
@Excel(name = "物料库存id")
|
||||
private Long materialInventoryId;
|
||||
|
||||
@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 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("是否允许修改: 1-是 2-否 分配后 不再支持修改")
|
||||
@Excel(name = "是否允许修改: 1-是 2-否")
|
||||
private Integer allowModify;
|
||||
|
||||
@ApiModelProperty("是否生成拣货单: 1-是 2-否")
|
||||
@Excel(name = "是否生成拣货单: 1-是 2-否")
|
||||
private Integer genPickingOrder;
|
||||
|
||||
@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 = "商品名称")
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品编码
|
||||
*/
|
||||
@ApiModelProperty("商品编码")
|
||||
@Excel(name = "商品编码")
|
||||
private String commodityNo;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@ApiModelProperty("料号")
|
||||
@Excel(name = "料号")
|
||||
private String materialNo;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty("规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String specificationModel;
|
||||
/**
|
||||
* 商品SKU码
|
||||
*/
|
||||
@ApiModelProperty("商品SKU码")
|
||||
@Excel(name = "商品SKU码")
|
||||
private String skucode;
|
||||
/**
|
||||
* Invoice No
|
||||
*/
|
||||
@ApiModelProperty("Invoice No")
|
||||
@Excel(name = "Invoice No")
|
||||
private String invoiceNo;
|
||||
/**
|
||||
* 升
|
||||
*/
|
||||
@ApiModelProperty("升")
|
||||
@Excel(name = "升")
|
||||
private String liter;
|
||||
|
||||
/**
|
||||
* 尺寸
|
||||
*/
|
||||
@ApiModelProperty("尺寸")
|
||||
@Excel(name = "尺寸")
|
||||
private String size;
|
||||
|
||||
/**
|
||||
* 申报单位
|
||||
*/
|
||||
@ApiModelProperty("申报单位")
|
||||
@Excel(name = "申报单位")
|
||||
private String declareUnit;
|
||||
|
||||
/**
|
||||
* Batch Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Batch Ref NO’s")
|
||||
@Excel(name = "Batch Ref NO’s")
|
||||
private String batchRefNo;
|
||||
|
||||
/**
|
||||
* Sheet Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Sheet Ref NO’s")
|
||||
@Excel(name = "Sheet Ref NO’s")
|
||||
private String sheetRefNo;
|
||||
|
||||
/**
|
||||
* 原产国
|
||||
*/
|
||||
@ApiModelProperty("原产国")
|
||||
@Excel(name = "原产国")
|
||||
private String countryOfOrigin;
|
||||
|
||||
/**
|
||||
* 箱号/卡板号
|
||||
*/
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
/**
|
||||
* 币制
|
||||
*/
|
||||
@ApiModelProperty("币制")
|
||||
@Excel(name = "币制")
|
||||
private String currency;
|
||||
|
||||
/**
|
||||
* 申报数量
|
||||
*/
|
||||
@ApiModelProperty("申报数量")
|
||||
@Excel(name = "申报数量")
|
||||
private BigDecimal declareQuantity;
|
||||
|
||||
/**
|
||||
* 箱数
|
||||
*/
|
||||
@ApiModelProperty("箱数")
|
||||
@Excel(name = "箱数")
|
||||
private BigDecimal caseCount;
|
||||
|
||||
/**
|
||||
* 件数
|
||||
*/
|
||||
@ApiModelProperty("件数")
|
||||
@Excel(name = "件数")
|
||||
private BigDecimal pieceCount;
|
||||
|
||||
/**
|
||||
* 出库数量
|
||||
*/
|
||||
@ApiModelProperty("出库数量")
|
||||
@Excel(name = "出库数量")
|
||||
private BigDecimal outboundQuantity;
|
||||
|
||||
/**
|
||||
* 总净重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总净重(KG)")
|
||||
@Excel(name = "总净重(KG)")
|
||||
private BigDecimal totalNetWeight;
|
||||
|
||||
/**
|
||||
* 总毛重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总毛重(KG)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private BigDecimal totalGrossWeight;
|
||||
|
||||
/**
|
||||
* 总体积(CBM)
|
||||
*/
|
||||
@ApiModelProperty("总体积(CBM)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private BigDecimal totalVolume;
|
||||
|
||||
/**
|
||||
* 总面积(SQM)
|
||||
*/
|
||||
@ApiModelProperty("总面积(SQM)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea;
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@ApiModelProperty("单位")
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty("扩展属性1")
|
||||
@Excel(name = "扩展属性1")
|
||||
@TableField("ext_attr_1")
|
||||
private String extAttr1;
|
||||
|
||||
@ApiModelProperty("扩展属性2")
|
||||
@Excel(name = "扩展属性2")
|
||||
@TableField("ext_attr_2")
|
||||
private String extAttr2;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("扩展属性3")
|
||||
@Excel(name = "扩展属性3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField("ext_attr_3")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("扩展属性4")
|
||||
@Excel(name = "扩展属性4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField("ext_attr_4")
|
||||
private Date extAttr4;
|
||||
|
||||
/**
|
||||
* 库存数量(仅用于前端展示,从material_inventory表中带出)
|
||||
*/
|
||||
@ApiModelProperty("分配时库存数量")
|
||||
private BigDecimal inventoryQuantity;
|
||||
|
||||
@TableField(exist = false)
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("复核总净重(KG)")
|
||||
@Excel(name = "复核总净重(KG)")
|
||||
private BigDecimal checkNetWeight;
|
||||
|
||||
@ApiModelProperty("复核总毛重(KG)")
|
||||
@Excel(name = "复核总毛重(KG)")
|
||||
private BigDecimal checkGrossWeight;
|
||||
|
||||
@ApiModelProperty("复核总体积(CBM)")
|
||||
@Excel(name = "复核总体积(CBM)")
|
||||
private BigDecimal checkVolume;
|
||||
|
||||
@ApiModelProperty("复核总面积(SQM)")
|
||||
@Excel(name = "复核总面积(SQM)")
|
||||
private BigDecimal checkArea;
|
||||
|
||||
@ApiModelProperty("是否已分配")
|
||||
@Excel(name = "是否已分配")
|
||||
private String isAllocated;
|
||||
|
||||
|
||||
@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;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("库存单位")
|
||||
@Excel(name = "库存单位")
|
||||
private String stockUnit;
|
||||
|
||||
@ApiModelProperty("库存数量")
|
||||
@Excel(name = "库存数量")
|
||||
private BigDecimal stockQuantity;
|
||||
|
||||
|
||||
//订单行号
|
||||
private String lineNumGw;
|
||||
//物料规格
|
||||
private String specGw;
|
||||
//计量单位
|
||||
private String unitGw;
|
||||
//数量
|
||||
private BigDecimal qtyGw;
|
||||
//企业币制
|
||||
private String erpCurrGw;
|
||||
//企业单价
|
||||
private BigDecimal erpPriceGw;
|
||||
//申报总价
|
||||
private BigDecimal amountGw;
|
||||
private String inOrderNumberGw;
|
||||
private String inLineNumGw;
|
||||
private String opWhLocGw;
|
||||
private String warehouseGw;
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package com.mhd.oms.domain.executionOutMaterialDetail.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.entity.ExecutionOutMaterialDetail;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.po.ExecutionOutMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailBaseDO;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailDO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.QueryOrderOverStockDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface IExecutionOutMaterialDetailService extends IService<ExecutionOutMaterialDetail>
|
||||
{
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
public List<ExecutionOutMaterialDetailPO> queryList(ExecutionOutMaterialDetailDO outMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 关联出库单 查询物料明细列表
|
||||
*/
|
||||
public List<ExecutionOutMaterialDetailPO> queryOutOrderList(QueryOrderOverStockDO queryOrderOverStockDO);
|
||||
|
||||
|
||||
|
||||
public List<ExecutionOutMaterialDetailPO> queryListChildren(ExecutionOutMaterialDetailDO outMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
public Boolean insert(ExecutionOutMaterialDetailDO outMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean update(ExecutionOutMaterialDetailDO outMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
public Boolean batchInsert(String orderNumber, List<ExecutionOutMaterialDetailDO> outMaterialDetailDOList);
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean batchUpdate(List<ExecutionOutMaterialDetailDO> outMaterialDetailDOList, ExecutionOutMaterialDetailBaseDO outMaterialDetailBaseDO);
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
public Boolean delete(Long[] materialDetailIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询物料明细
|
||||
*/
|
||||
public ExecutionOutMaterialDetailPO getInfo(Long materialDetailId);
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
package com.mhd.oms.domain.executionOutMaterialDetail.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.entity.ExecutionOutMaterialDetail;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.po.ExecutionOutMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailDO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.QueryOrderOverStockDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 物料明细Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface ExecutionOutMaterialDetailMapper extends BaseMapper<ExecutionOutMaterialDetail>
|
||||
{
|
||||
/**
|
||||
* 查询物料明细列表
|
||||
*/
|
||||
public List<ExecutionOutMaterialDetailPO> queryList(ExecutionOutMaterialDetailDO outMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* 关联出库单 查询物料明细列表
|
||||
*/
|
||||
public List<ExecutionOutMaterialDetailPO> queryOutOrderList(QueryOrderOverStockDO queryOrderOverStockDO);
|
||||
|
||||
|
||||
/**
|
||||
* @description 批量修改指定物料明细分配数量
|
||||
* @author ZhouGY
|
||||
* @date 2024/6/7 14:29
|
||||
* @param outMaterialDetailDO
|
||||
* @return int
|
||||
*/
|
||||
public int batchAddAllocationQuantityByIds(ExecutionOutMaterialDetailDO outMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* @description 批量修改指定物料明细拣货数量
|
||||
* @author ZhouGY
|
||||
* @date 2024/6/7 14:29
|
||||
* @param outMaterialDetailDO
|
||||
* @return int
|
||||
*/
|
||||
public int batchAddPickingQuantityByIds(ExecutionOutMaterialDetailDO outMaterialDetailDO);
|
||||
|
||||
/**
|
||||
* @description 批量修改指定物料明细拣货数量
|
||||
* @author ZhouGY
|
||||
* @date 2024/6/7 14:29
|
||||
* @param outMaterialDetailDO
|
||||
* @return int
|
||||
*/
|
||||
public int batchAddPickingQuantityByUniqueIds(ExecutionOutMaterialDetailDO outMaterialDetailDO);
|
||||
|
||||
public Long getKcId(@Param("lotNo") String lotNo);
|
||||
|
||||
public String getLot(@Param("uniqueId") Long uniqueId);
|
||||
|
||||
public Long getkcIdByUniqueId(@Param("uniqueId") Long uniqueId);
|
||||
|
||||
public String getInOrderNumber(@Param("id") Long id);
|
||||
public String getWarehouse(@Param("id") Long id);
|
||||
public String getOpWhLoc(@Param("id") Long id);
|
||||
public String getLotByKcId(@Param("id") Long id);
|
||||
|
||||
public String getInLotNo(@Param("inOrderNumber") String inOrderNumber, @Param("baseId") Long baseId);
|
||||
}
|
||||
+264
@@ -0,0 +1,264 @@
|
||||
package com.mhd.oms.domain.executionOutMaterialDetail.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.executionOutMaterialDetail.entity.ExecutionOutMaterialDetail;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.facade.IExecutionOutMaterialDetailService;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.mapper.ExecutionOutMaterialDetailMapper;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.po.ExecutionOutMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailBaseDO;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailDO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.mapper.ExecutionStockInOrderMapper;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.QueryOrderOverStockDO;
|
||||
//import com.mhd.oms.domain.reservationStockInOrder.repository.mapper.ExecutionStockInOrderMapper;
|
||||
//import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO;
|
||||
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 ExecutionOutMaterialDetailImpl extends ServiceImpl<ExecutionOutMaterialDetailMapper, ExecutionOutMaterialDetail> implements IExecutionOutMaterialDetailService {
|
||||
@Autowired
|
||||
private ExecutionOutMaterialDetailMapper outMaterialDetailMapper;
|
||||
// @Autowired
|
||||
// private IExecutionOutMaterialDetailSerialNumberService outMaterialDetailSerialNumberService;
|
||||
@Autowired
|
||||
private IdGenerator idGenerator;
|
||||
@Autowired
|
||||
private ExecutionStockInOrderMapper reservationStockInOrderMapper;
|
||||
// @Autowired
|
||||
// private MaterialBaseInfoMapper materialBaseInfoMapper;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询物料明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExecutionOutMaterialDetailPO> queryList(ExecutionOutMaterialDetailDO outMaterialDetailDO)
|
||||
{
|
||||
return outMaterialDetailMapper.queryList(outMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联出库单 查询物料明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExecutionOutMaterialDetailPO> queryOutOrderList(QueryOrderOverStockDO queryOrderOverStockDO) {
|
||||
return outMaterialDetailMapper.queryOutOrderList(queryOrderOverStockDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询物料明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExecutionOutMaterialDetailPO> queryListChildren(ExecutionOutMaterialDetailDO outMaterialDetailDO)
|
||||
{
|
||||
List<ExecutionOutMaterialDetailPO> outMaterialDetailPOList = outMaterialDetailMapper.queryList(outMaterialDetailDO);
|
||||
// 获取查询的层级
|
||||
List<ExecutionOutMaterialDetailPO> outMaterialDetailParentList = outMaterialDetailPOList
|
||||
.stream().filter(e -> 1 == e.getLevel()).collect(Collectors.toList());
|
||||
// 递归查询子集
|
||||
outMaterialDetailParentList.forEach(materialDetailPO -> materialDetailPO.setChildren(getChildren(materialDetailPO.getUniqueId(), outMaterialDetailPOList, 2)));
|
||||
return outMaterialDetailParentList;
|
||||
}
|
||||
|
||||
private List<ExecutionOutMaterialDetailPO> getChildren(Long parentUniqueId, List<ExecutionOutMaterialDetailPO> materialDetailPOList, Integer maxLevel){
|
||||
List<ExecutionOutMaterialDetailPO> childrenCityList = materialDetailPOList.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(), materialDetailPOList, maxLevel));
|
||||
}
|
||||
});
|
||||
}
|
||||
return childrenCityList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(ExecutionOutMaterialDetailDO outMaterialDetailDO) {
|
||||
ExecutionOutMaterialDetail outMaterialDetail = new ExecutionOutMaterialDetail();
|
||||
BeanUtils.copyProperties(outMaterialDetailDO, outMaterialDetail);
|
||||
return this.save(outMaterialDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(ExecutionOutMaterialDetailDO outMaterialDetailDO) {
|
||||
ExecutionOutMaterialDetail outMaterialDetail = new ExecutionOutMaterialDetail();
|
||||
BeanUtils.copyProperties(outMaterialDetailDO, outMaterialDetail);
|
||||
return this.updateById(outMaterialDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 批量新增物流明细
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/22 9:27
|
||||
* @param outOrderNumber
|
||||
* @param outMaterialDetailDOList
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean batchInsert(String outOrderNumber, List<ExecutionOutMaterialDetailDO> outMaterialDetailDOList) {
|
||||
if (CollectionUtils.isEmpty(outMaterialDetailDOList)) {
|
||||
throw new ServiceException("物料明细不能为空");
|
||||
}
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
// 批量新增或修改
|
||||
// 获取用户姓名(优先从UserPo获取,如果为空则使用realname,最后使用username作为兜底)
|
||||
final String userRealName = (loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null
|
||||
&& !loginUser.getUserPo().getUserName().trim().isEmpty())
|
||||
? loginUser.getUserPo().getUserName()
|
||||
: (loginUser.getRealname() != null && !loginUser.getRealname().trim().isEmpty())
|
||||
? loginUser.getRealname()
|
||||
: loginUser.getUsername();
|
||||
List<ExecutionOutMaterialDetail> outMaterialDetailList = new ArrayList<>();
|
||||
for (ExecutionOutMaterialDetailDO outMaterialDetailDO : outMaterialDetailDOList){
|
||||
ExecutionOutMaterialDetail outMaterialDetail = new ExecutionOutMaterialDetail();
|
||||
BeanUtils.copyProperties(outMaterialDetailDO, outMaterialDetail);
|
||||
outMaterialDetail.setUniqueId(idGenerator.snowflakeId(SnowFlakeConstants.wmsId));
|
||||
outMaterialDetail.setOutOrderNumber(outOrderNumber);
|
||||
outMaterialDetail.setTopOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
outMaterialDetail.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
outMaterialDetail.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
outMaterialDetail.setCreateBy(loginUser.getUserid());
|
||||
outMaterialDetail.setCreateByName(userRealName);
|
||||
outMaterialDetail.setCreateTime(new Date());
|
||||
// 计划数量:接口常传 quantity;有 outboundQuantity 时与 quantity 对齐,否则用 quantity 回填 outbound
|
||||
if (outMaterialDetail.getOutboundQuantity() != null) {
|
||||
outMaterialDetail.setQuantity(outMaterialDetail.getOutboundQuantity());
|
||||
} else if (outMaterialDetail.getQuantity() != null) {
|
||||
outMaterialDetail.setOutboundQuantity(outMaterialDetail.getQuantity());
|
||||
}
|
||||
String materialNo = outMaterialDetail.getMaterialNo();
|
||||
List<MaterialBaseInfoPO> materialBaseInfos = reservationStockInOrderMapper.getMaterialBaseInfoList(materialNo);
|
||||
//List<MaterialBaseInfoPO> materialBaseInfos = materialBaseInfoMapper.selectList(new QueryWrapper<MaterialBaseInfo>().lambda().eq(MaterialBaseInfo::getMaterialCode, materialNo));
|
||||
if (!CollectionUtils.isEmpty(materialBaseInfos) && materialBaseInfos.size() > 0) {
|
||||
outMaterialDetail.setCommodityName(materialBaseInfos.get(0).getMaterialName());
|
||||
outMaterialDetail.setBarCode(materialBaseInfos.get(0).getBarCode());
|
||||
outMaterialDetail.setPackName(materialBaseInfos.get(0).getPackName());
|
||||
outMaterialDetail.setPackCode(materialBaseInfos.get(0).getPackCode());
|
||||
outMaterialDetail.setUnitCode(materialBaseInfos.get(0).getUnitCode());
|
||||
outMaterialDetail.setUnitName(materialBaseInfos.get(0).getUnitName());
|
||||
}
|
||||
outMaterialDetailList.add(outMaterialDetail);
|
||||
}
|
||||
return saveBatch(outMaterialDetailList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 批量修改物流明细
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/22 9:27
|
||||
* @param outMaterialDetailDOList
|
||||
* @param outMaterialDetailBaseDO
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean batchUpdate(List<ExecutionOutMaterialDetailDO> outMaterialDetailDOList, ExecutionOutMaterialDetailBaseDO outMaterialDetailBaseDO) {
|
||||
if (CollectionUtils.isEmpty(outMaterialDetailDOList)) {
|
||||
throw new ServiceException("物料明细不能为空");
|
||||
}
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
|
||||
List<ExecutionOutMaterialDetail> outMaterialDetailDbList = outMaterialDetailMapper.selectList(new QueryWrapper<ExecutionOutMaterialDetail>().lambda().eq(ExecutionOutMaterialDetail::getOutOrderNumber, outMaterialDetailBaseDO.getOutOrderNumber()));
|
||||
Map<Long, ExecutionOutMaterialDetail> materialDetailMap = outMaterialDetailDbList.stream().collect(Collectors.toMap(ExecutionOutMaterialDetail::getMaterialDetailId, Function.identity()));
|
||||
//批量新增或修改物料信息
|
||||
List<ExecutionOutMaterialDetail> outMaterialDetailList = new ArrayList<>();
|
||||
//需要修改的物流明细
|
||||
List<Long> materialDetailIdsByUpdate = new ArrayList<>();
|
||||
for (ExecutionOutMaterialDetailDO outMaterialDetailDO : outMaterialDetailDOList){
|
||||
//判断是否需要修改
|
||||
ExecutionOutMaterialDetail outMaterialDetail = materialDetailMap.get(outMaterialDetailDO.getMaterialDetailId());
|
||||
if (outMaterialDetail == null){
|
||||
outMaterialDetail = new ExecutionOutMaterialDetail();
|
||||
BeanUtils.copyProperties(outMaterialDetailDO, outMaterialDetail);
|
||||
outMaterialDetail.setUniqueId(idGenerator.snowflakeId(SnowFlakeConstants.wmsId));
|
||||
outMaterialDetail.setOutOrderNumber(outMaterialDetailBaseDO.getOutOrderNumber());
|
||||
outMaterialDetail.setOrganizationId(outMaterialDetailBaseDO.getOrganizationId());
|
||||
outMaterialDetail.setOrganizationName(outMaterialDetailBaseDO.getOrganizationName());
|
||||
outMaterialDetail.setTopOrganizationId(outMaterialDetailBaseDO.getTopOrganizationId());
|
||||
}else {
|
||||
BeanUtils.copyProperties(outMaterialDetailDO, outMaterialDetail);
|
||||
outMaterialDetail.setUpdateBy(loginUser.getUserid());
|
||||
outMaterialDetail.setUpdateByName(loginUser.getUsername());
|
||||
outMaterialDetail.setUpdateTime(new Date());
|
||||
materialDetailIdsByUpdate.add(outMaterialDetailDO.getMaterialDetailId());
|
||||
}
|
||||
outMaterialDetailList.add(outMaterialDetail);
|
||||
}
|
||||
//需修改的物料明细id集合不为空
|
||||
if (!CollectionUtils.isEmpty(materialDetailIdsByUpdate)){
|
||||
List<Long> materialDetailIdsByDb = outMaterialDetailDbList.stream().map(ExecutionOutMaterialDetail::getMaterialDetailId).collect(Collectors.toList());
|
||||
//过滤需要修改的id集合
|
||||
materialDetailIdsByDb.removeAll(materialDetailIdsByUpdate);
|
||||
//判断是否存在需要删除的物流明细 标记删除
|
||||
if (!CollectionUtils.isEmpty(materialDetailIdsByDb)){
|
||||
update(new UpdateWrapper<ExecutionOutMaterialDetail>().lambda()
|
||||
.set(ExecutionOutMaterialDetail::getDelFlag, 2)
|
||||
.set(ExecutionOutMaterialDetail::getUpdateBy, loginUser.getUserid())
|
||||
.set(ExecutionOutMaterialDetail::getUpdateByName, loginUser.getUsername())
|
||||
.set(ExecutionOutMaterialDetail::getUpdateTime, new Date())
|
||||
.in(ExecutionOutMaterialDetail::getMaterialDetailId, materialDetailIdsByDb));
|
||||
}
|
||||
}
|
||||
//保存物料明细信息
|
||||
return saveOrUpdateBatch(outMaterialDetailList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] materialDetailIds ) {
|
||||
List<ExecutionOutMaterialDetail> list = new ArrayList<>();
|
||||
for (Long id : materialDetailIds) {
|
||||
ExecutionOutMaterialDetail outMaterialDetail = new ExecutionOutMaterialDetail();
|
||||
outMaterialDetail.setMaterialDetailId(id);
|
||||
outMaterialDetail.setDelFlag(2);
|
||||
list.add(outMaterialDetail);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
@Override
|
||||
public ExecutionOutMaterialDetailPO getInfo(Long materialDetailId) {
|
||||
ExecutionOutMaterialDetail outMaterialDetail = this.getById(materialDetailId);
|
||||
ExecutionOutMaterialDetailPO outMaterialDetailPO = new ExecutionOutMaterialDetailPO();
|
||||
BeanUtils.copyProperties(outMaterialDetail, outMaterialDetailPO);
|
||||
return outMaterialDetailPO;
|
||||
}
|
||||
}
|
||||
+607
@@ -0,0 +1,607 @@
|
||||
package com.mhd.oms.domain.executionOutMaterialDetail.repository.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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.reservationStockOutOrder.repository.todo.ExecutionStockOutOrderBaseDO;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.todo.ExecutionStockOutOrderBaseDO;
|
||||
import com.mhd.system.api.domain.MaterialMoreDetailPO;
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
* 物料明细对象 material_detail
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "物料明细对象", description = "物料明细响应对象")
|
||||
public class ExecutionOutMaterialDetailPO extends ExecutionStockOutOrderBaseDO {
|
||||
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 outOrderNumber;
|
||||
|
||||
@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 alreadyAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("分配数量")
|
||||
@Excel(name = "分配数量")
|
||||
private BigDecimal allocationQuantity;
|
||||
|
||||
@ApiModelProperty("本次分配数量")
|
||||
@Excel(name = "本次分配数量")
|
||||
@TableField(exist = false)
|
||||
private BigDecimal nowAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("拣货数量")
|
||||
@Excel(name = "拣货数量")
|
||||
private BigDecimal pickingQuantity;
|
||||
|
||||
@ApiModelProperty("复核数量")
|
||||
@Excel(name = "复核数量")
|
||||
private BigDecimal checkQuantity;
|
||||
|
||||
@ApiModelProperty("待复核数量")
|
||||
@Excel(name = "待复核数量")
|
||||
private BigDecimal waitCheckQuantity;
|
||||
|
||||
@ApiModelProperty("复核数量输入框字段,默认等于待复核数量")
|
||||
@TableField(exist = false)
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("净重 单位:千克")
|
||||
@Excel(name = "净重 单位:千克")
|
||||
private BigDecimal weightLimit;
|
||||
|
||||
@ApiModelProperty("体积 单位:立方米")
|
||||
@Excel(name = "体积 单位:立方米")
|
||||
private BigDecimal volumeLimit;
|
||||
|
||||
@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("物料库存id")
|
||||
@Excel(name = "物料库存id")
|
||||
private Long materialInventoryId;
|
||||
|
||||
@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 containerId;
|
||||
|
||||
@ApiModelProperty("容器编码")
|
||||
@Excel(name = "容器编码")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("容器类型 数据字典")
|
||||
@Excel(name = "容器类型 数据字典")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("容器类型名称 数据字典")
|
||||
@Excel(name = "容器类型名称 数据字典")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("库存数量(仅展示)")
|
||||
private BigDecimal inventoryQuantity;
|
||||
|
||||
@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("是否允许修改: 1-是 2-否 分配后 不再支持修改")
|
||||
@Excel(name = "是否允许修改: 1-是 2-否")
|
||||
private Integer allowModify;
|
||||
|
||||
@ApiModelProperty("是否生成拣货单: 1-是 2-否")
|
||||
@Excel(name = "是否生成拣货单: 1-是 2-否")
|
||||
private Integer genPickingOrder;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("物料明细")
|
||||
private List<ExecutionOutMaterialDetailPO> 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 = "商品名称")
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品编码
|
||||
*/
|
||||
@ApiModelProperty("商品编码")
|
||||
@Excel(name = "商品编码")
|
||||
private String commodityNo;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@ApiModelProperty("料号")
|
||||
@Excel(name = "料号")
|
||||
private String materialNo;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty("规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String specificationModel;
|
||||
/**
|
||||
* 商品SKU码
|
||||
*/
|
||||
@ApiModelProperty("商品SKU码")
|
||||
@Excel(name = "商品SKU码")
|
||||
private String skucode;
|
||||
/**
|
||||
* Invoice No
|
||||
*/
|
||||
@ApiModelProperty("Invoice No")
|
||||
@Excel(name = "Invoice No")
|
||||
private String invoiceNo;
|
||||
/**
|
||||
* 升
|
||||
*/
|
||||
@ApiModelProperty("升")
|
||||
@Excel(name = "升")
|
||||
private String liter;
|
||||
|
||||
/**
|
||||
* 尺寸
|
||||
*/
|
||||
@ApiModelProperty("尺寸")
|
||||
@Excel(name = "尺寸")
|
||||
private String size;
|
||||
|
||||
/**
|
||||
* 申报单位
|
||||
*/
|
||||
@ApiModelProperty("申报单位")
|
||||
@Excel(name = "申报单位")
|
||||
private String declareUnit;
|
||||
|
||||
/**
|
||||
* Batch Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Batch Ref NO’s")
|
||||
@Excel(name = "Batch Ref NO’s")
|
||||
private String batchRefNo;
|
||||
|
||||
/**
|
||||
* Sheet Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Sheet Ref NO’s")
|
||||
@Excel(name = "Sheet Ref NO’s")
|
||||
private String sheetRefNo;
|
||||
|
||||
/**
|
||||
* 原产国
|
||||
*/
|
||||
@ApiModelProperty("原产国")
|
||||
@Excel(name = "原产国")
|
||||
private String countryOfOrigin;
|
||||
|
||||
/**
|
||||
* 箱号/卡板号
|
||||
*/
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
/**
|
||||
* 币制
|
||||
*/
|
||||
@ApiModelProperty("币制")
|
||||
@Excel(name = "币制")
|
||||
private String currency;
|
||||
|
||||
/**
|
||||
* 申报数量
|
||||
*/
|
||||
@ApiModelProperty("申报数量")
|
||||
@Excel(name = "申报数量")
|
||||
private BigDecimal declareQuantity;
|
||||
|
||||
/**
|
||||
* 箱数
|
||||
*/
|
||||
@ApiModelProperty("箱数")
|
||||
@Excel(name = "箱数")
|
||||
private BigDecimal caseCount;
|
||||
|
||||
/**
|
||||
* 件数
|
||||
*/
|
||||
@ApiModelProperty("件数")
|
||||
@Excel(name = "件数")
|
||||
private BigDecimal pieceCount;
|
||||
|
||||
/**
|
||||
* 出库数量
|
||||
*/
|
||||
@ApiModelProperty("出库数量")
|
||||
@Excel(name = "出库数量")
|
||||
private BigDecimal outboundQuantity;
|
||||
|
||||
/**
|
||||
* 总净重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总净重(KG)")
|
||||
@Excel(name = "总净重(KG)")
|
||||
private BigDecimal totalNetWeight;
|
||||
|
||||
/**
|
||||
* 总毛重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总毛重(KG)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private BigDecimal totalGrossWeight;
|
||||
|
||||
/**
|
||||
* 总体积(CBM)
|
||||
*/
|
||||
@ApiModelProperty("总体积(CBM)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private BigDecimal totalVolume;
|
||||
|
||||
/**
|
||||
* 总面积(SQM)
|
||||
*/
|
||||
@ApiModelProperty("总面积(SQM)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea;
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@ApiModelProperty("单位")
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty("扩展字段1")
|
||||
@Excel(name = "扩展字段1")
|
||||
private String extAttr1;
|
||||
|
||||
@ApiModelProperty("扩展字段2")
|
||||
@Excel(name = "扩展字段2")
|
||||
private String extAttr2;
|
||||
|
||||
@ApiModelProperty("生产日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("ExtAttr3")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("ExtAttr4")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr4;
|
||||
|
||||
@ApiModelProperty("更多属性明细列表")
|
||||
@TableField(exist = false)
|
||||
private List<MaterialMoreDetailPO> materialMoreDetailList;
|
||||
|
||||
@ApiModelProperty("分配按钮显示类型:1-显示库存分配,2-显示取消分配")
|
||||
@TableField(exist = false)
|
||||
private Integer allocationButtonType;
|
||||
|
||||
@ApiModelProperty("复核总净重(KG)")
|
||||
@Excel(name = "复核总净重(KG)")
|
||||
private BigDecimal checkNetWeight;
|
||||
|
||||
@ApiModelProperty("复核总毛重(KG)")
|
||||
@Excel(name = "复核总毛重(KG)")
|
||||
private BigDecimal checkGrossWeight;
|
||||
|
||||
@ApiModelProperty("复核总体积(CBM)")
|
||||
@Excel(name = "复核总体积(CBM)")
|
||||
private BigDecimal checkVolume;
|
||||
|
||||
@ApiModelProperty("复核总面积(SQM)")
|
||||
@Excel(name = "复核总面积(SQM)")
|
||||
private BigDecimal checkArea;
|
||||
|
||||
@ApiModelProperty("是否已分配")
|
||||
@Excel(name = "是否已分配")
|
||||
private String isAllocated;
|
||||
|
||||
|
||||
|
||||
@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;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("库存单位")
|
||||
@Excel(name = "库存单位")
|
||||
private String stockUnit;
|
||||
|
||||
@ApiModelProperty("库存数量")
|
||||
@Excel(name = "库存数量")
|
||||
private BigDecimal stockQuantity;
|
||||
|
||||
@ApiModelProperty("出库异常明细:计划数量(复核异常场景=拣货数量)")
|
||||
@TableField(exist = false)
|
||||
private BigDecimal abnormalPlanQuantity;
|
||||
|
||||
@ApiModelProperty("出库异常明细:作业数量(复核异常场景=实际复核数量)")
|
||||
@TableField(exist = false)
|
||||
private BigDecimal abnormalWorkQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("调整前库存数量")
|
||||
@Excel(name = "调整前库存数量")
|
||||
private BigDecimal inventoryBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前可用数量")
|
||||
@Excel(name = "调整前可用数量")
|
||||
private BigDecimal allocationBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前冻结数量")
|
||||
@Excel(name = "调整前冻结数量")
|
||||
private BigDecimal freezeBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整后库存数量")
|
||||
@Excel(name = "调整后库存数量")
|
||||
private BigDecimal inventoryAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后可用数量")
|
||||
@Excel(name = "调整后可用数量")
|
||||
private BigDecimal allocationAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后冻结数量")
|
||||
@Excel(name = "调整后冻结数量")
|
||||
private BigDecimal freezeAfterQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("调整前净重(KG)")
|
||||
@Excel(name = "调整前净重(KG)")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
@ApiModelProperty("调整前毛重(KG)")
|
||||
@Excel(name = "调整前毛重(KG)")
|
||||
private BigDecimal grossWeight;
|
||||
|
||||
@ApiModelProperty("调整前体积")
|
||||
@Excel(name = "调整前体积")
|
||||
private BigDecimal volume;
|
||||
|
||||
@ApiModelProperty("调整前面积")
|
||||
@Excel(name = "调整前面积")
|
||||
private BigDecimal area;
|
||||
|
||||
@ApiModelProperty("调整后净重(KG)")
|
||||
@Excel(name = "调整后净重(KG)")
|
||||
private BigDecimal adjustedNetWeight;
|
||||
|
||||
@ApiModelProperty("调整后毛重(KG)")
|
||||
@Excel(name = "调整后毛重(KG)")
|
||||
private BigDecimal adjustedGrossWeight;
|
||||
|
||||
@ApiModelProperty("调整后体积")
|
||||
@Excel(name = "调整后体积")
|
||||
private BigDecimal adjustedVolume;
|
||||
|
||||
@ApiModelProperty("调整后面积")
|
||||
@Excel(name = "调整后面积")
|
||||
private BigDecimal adjustedArea;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
//订单行号
|
||||
private String lineNumGw;
|
||||
//物料规格
|
||||
private String specGw;
|
||||
//计量单位
|
||||
private String unitGw;
|
||||
//数量
|
||||
private BigDecimal qtyGw;
|
||||
//企业币制
|
||||
private String erpCurrGw;
|
||||
//企业单价
|
||||
private BigDecimal erpPriceGw;
|
||||
//申报总价
|
||||
private BigDecimal amountGw;
|
||||
private String inOrderNumberGw;
|
||||
private String inLineNumGw;
|
||||
private String khdm;
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.mhd.oms.domain.executionOutMaterialDetail.repository.po;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title OutMaterialCheckPO
|
||||
* @description: 出库复审信息统计
|
||||
* @date 2024/5/31 10:33
|
||||
**/
|
||||
@Data
|
||||
public class OutMaterialCheckPO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("物料数")
|
||||
private Integer count;
|
||||
|
||||
@ApiModelProperty("总重量")
|
||||
@Excel(name = "总重量")
|
||||
private BigDecimal weightLimit;
|
||||
|
||||
@ApiModelProperty("总体积")
|
||||
@Excel(name = "总体积")
|
||||
private BigDecimal volumeLimit;
|
||||
|
||||
@ApiModelProperty("数量EA")
|
||||
private BigDecimal number;
|
||||
|
||||
@ApiModelProperty("需扫描数")
|
||||
private BigDecimal wantNumber;
|
||||
|
||||
@ApiModelProperty("已扫描数")
|
||||
private BigDecimal alreadyNumber;
|
||||
|
||||
@ApiModelProperty("未扫描数")
|
||||
private BigDecimal notHaveNumber;
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.mhd.oms.domain.executionOutMaterialDetail.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 ExecutionOutMaterialDetailBaseDO 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 outOrderNumber;
|
||||
}
|
||||
+550
@@ -0,0 +1,550 @@
|
||||
package com.mhd.oms.domain.executionOutMaterialDetail.repository.todo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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 ExecutionOutMaterialDetailDO 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 BigDecimal unitPrice;
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("出库单号")
|
||||
@Excel(name = "出库单号")
|
||||
private String outOrderNumber;
|
||||
|
||||
@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 alreadyAllocationQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("本次分配数量")
|
||||
@Excel(name = "本次分配数量")
|
||||
@TableField(exist = false)
|
||||
private BigDecimal nowAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("分配数量")
|
||||
@Excel(name = "分配数量")
|
||||
private BigDecimal allocationQuantity;
|
||||
|
||||
@ApiModelProperty("拣货数量")
|
||||
@Excel(name = "拣货数量")
|
||||
private BigDecimal pickingQuantity;
|
||||
|
||||
@ApiModelProperty("复核数量")
|
||||
@Excel(name = "复核数量")
|
||||
private BigDecimal checkQuantity;
|
||||
|
||||
@ApiModelProperty("净重 单位:千克")
|
||||
@Excel(name = "净重 单位:千克")
|
||||
private BigDecimal weightLimit;
|
||||
|
||||
@ApiModelProperty("体积 单位:立方米")
|
||||
@Excel(name = "体积 单位:立方米")
|
||||
private BigDecimal volumeLimit;
|
||||
|
||||
@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("物料库存id")
|
||||
@Excel(name = "物料库存id")
|
||||
private Long materialInventoryId;
|
||||
|
||||
@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 containerId;
|
||||
|
||||
@ApiModelProperty("容器编码")
|
||||
@Excel(name = "容器编码")
|
||||
private String containerCode;
|
||||
|
||||
@ApiModelProperty("容器类型 数据字典")
|
||||
@Excel(name = "容器类型 数据字典")
|
||||
private String containerType;
|
||||
|
||||
@ApiModelProperty("容器类型名称 数据字典")
|
||||
@Excel(name = "容器类型名称 数据字典")
|
||||
private String containerTypeName;
|
||||
|
||||
@ApiModelProperty("分配时库存数量(仅展示)")
|
||||
private BigDecimal inventoryQuantity;
|
||||
|
||||
@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("是否允许修改: 1-是 2-否 分配后 不再支持修改")
|
||||
@Excel(name = "是否允许修改: 1-是 2-否")
|
||||
private Integer allowModify;
|
||||
|
||||
@ApiModelProperty("是否生成拣货单: 1-是 2-否")
|
||||
@Excel(name = "是否生成拣货单: 1-是 2-否")
|
||||
private Integer genPickingOrder;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("物料明细子集")
|
||||
private List<ExecutionOutMaterialDetailDO> children;
|
||||
|
||||
// @ApiModelProperty("序列号")
|
||||
// private List<ExecutionOutMaterialDetailSerialNumberDO> materialDetailSerialNumberList;
|
||||
|
||||
@ApiModelProperty("出单号集合")
|
||||
@Excel(name = "出单号集合")
|
||||
private List<String> outOrderNumberList;
|
||||
|
||||
@ApiModelProperty("取消分配数量")
|
||||
@Excel(name = "取消分配数量")
|
||||
private BigDecimal cancelAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("订单物料明细id")
|
||||
private List<Long> materialDetailIds;
|
||||
|
||||
@ApiModelProperty("作业数量(例如:分配数量 拣货数量 复核数量)")
|
||||
@Excel(name = "作业数量(例如:分配数量 拣货数量 复核数量)")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@ApiModelProperty("商品名称")
|
||||
@Excel(name = "商品名称")
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品编码
|
||||
*/
|
||||
@ApiModelProperty("商品编码")
|
||||
@Excel(name = "商品编码")
|
||||
private String commodityNo;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@ApiModelProperty("料号")
|
||||
@Excel(name = "料号")
|
||||
private String materialNo;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty("规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String specificationModel;
|
||||
/**
|
||||
* 商品SKU码
|
||||
*/
|
||||
@ApiModelProperty("商品SKU码")
|
||||
@Excel(name = "商品SKU码")
|
||||
private String skucode;
|
||||
/**
|
||||
* Invoice No
|
||||
*/
|
||||
@ApiModelProperty("Invoice No")
|
||||
@Excel(name = "Invoice No")
|
||||
private String invoiceNo;
|
||||
/**
|
||||
* 升
|
||||
*/
|
||||
@ApiModelProperty("升")
|
||||
@Excel(name = "升")
|
||||
private String liter;
|
||||
|
||||
/**
|
||||
* 尺寸
|
||||
*/
|
||||
@ApiModelProperty("尺寸")
|
||||
@Excel(name = "尺寸")
|
||||
private String size;
|
||||
|
||||
/**
|
||||
* 申报单位
|
||||
*/
|
||||
@ApiModelProperty("申报单位")
|
||||
@Excel(name = "申报单位")
|
||||
private String declareUnit;
|
||||
|
||||
/**
|
||||
* Batch Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Batch Ref NO’s")
|
||||
@Excel(name = "Batch Ref NO’s")
|
||||
private String batchRefNo;
|
||||
|
||||
/**
|
||||
* Sheet Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Sheet Ref NO’s")
|
||||
@Excel(name = "Sheet Ref NO’s")
|
||||
private String sheetRefNo;
|
||||
|
||||
/**
|
||||
* 原产国
|
||||
*/
|
||||
@ApiModelProperty("原产国")
|
||||
@Excel(name = "原产国")
|
||||
private String countryOfOrigin;
|
||||
|
||||
/**
|
||||
* 箱号/卡板号
|
||||
*/
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
/**
|
||||
* 币制
|
||||
*/
|
||||
@ApiModelProperty("币制")
|
||||
@Excel(name = "币制")
|
||||
private String currency;
|
||||
|
||||
/**
|
||||
* 申报数量
|
||||
*/
|
||||
@ApiModelProperty("申报数量")
|
||||
@Excel(name = "申报数量")
|
||||
private BigDecimal declareQuantity;
|
||||
|
||||
/**
|
||||
* 箱数
|
||||
*/
|
||||
@ApiModelProperty("箱数")
|
||||
@Excel(name = "箱数")
|
||||
private BigDecimal caseCount;
|
||||
|
||||
/**
|
||||
* 件数
|
||||
*/
|
||||
@ApiModelProperty("件数")
|
||||
@Excel(name = "件数")
|
||||
private BigDecimal pieceCount;
|
||||
|
||||
/**
|
||||
* 出库数量
|
||||
*/
|
||||
@ApiModelProperty("出库数量")
|
||||
@Excel(name = "出库数量")
|
||||
private BigDecimal outboundQuantity;
|
||||
|
||||
/**
|
||||
* 总净重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总净重(KG)")
|
||||
@Excel(name = "总净重(KG)")
|
||||
private BigDecimal totalNetWeight;
|
||||
|
||||
/**
|
||||
* 总毛重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总毛重(KG)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private BigDecimal totalGrossWeight;
|
||||
|
||||
/**
|
||||
* 总体积(CBM)
|
||||
*/
|
||||
@ApiModelProperty("总体积(CBM)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private BigDecimal totalVolume;
|
||||
|
||||
/**
|
||||
* 总面积(SQM)
|
||||
*/
|
||||
@ApiModelProperty("总面积(SQM)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea;
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@ApiModelProperty("单位")
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty("复核总净重(KG)")
|
||||
@Excel(name = "复核总净重(KG)")
|
||||
private BigDecimal checkNetWeight;
|
||||
|
||||
@ApiModelProperty("复核总毛重(KG)")
|
||||
@Excel(name = "复核总毛重(KG)")
|
||||
private BigDecimal checkGrossWeight;
|
||||
|
||||
@ApiModelProperty("复核总体积(CBM)")
|
||||
@Excel(name = "复核总体积(CBM)")
|
||||
private BigDecimal checkVolume;
|
||||
|
||||
@ApiModelProperty("复核总面积(SQM)")
|
||||
@Excel(name = "复核总面积(SQM)")
|
||||
private BigDecimal checkArea;
|
||||
|
||||
@ApiModelProperty("是否已分配")
|
||||
@Excel(name = "是否已分配")
|
||||
private String isAllocated;
|
||||
|
||||
|
||||
|
||||
@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;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("库存单位")
|
||||
@Excel(name = "库存单位")
|
||||
private String stockUnit;
|
||||
|
||||
@ApiModelProperty("库存数量")
|
||||
@Excel(name = "库存数量")
|
||||
private BigDecimal stockQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("调整前库存数量")
|
||||
@Excel(name = "调整前库存数量")
|
||||
private BigDecimal inventoryBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前可用数量")
|
||||
@Excel(name = "调整前可用数量")
|
||||
private BigDecimal allocationBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前冻结数量")
|
||||
@Excel(name = "调整前冻结数量")
|
||||
private BigDecimal freezeBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整后库存数量")
|
||||
@Excel(name = "调整后库存数量")
|
||||
private BigDecimal inventoryAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后可用数量")
|
||||
@Excel(name = "调整后可用数量")
|
||||
private BigDecimal allocationAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后冻结数量")
|
||||
@Excel(name = "调整后冻结数量")
|
||||
private BigDecimal freezeAfterQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("调整前净重(KG)")
|
||||
@Excel(name = "调整前净重(KG)")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
@ApiModelProperty("调整前毛重(KG)")
|
||||
@Excel(name = "调整前毛重(KG)")
|
||||
private BigDecimal grossWeight;
|
||||
|
||||
@ApiModelProperty("调整前体积")
|
||||
@Excel(name = "调整前体积")
|
||||
private BigDecimal volume;
|
||||
|
||||
@ApiModelProperty("调整前面积")
|
||||
@Excel(name = "调整前面积")
|
||||
private BigDecimal area;
|
||||
|
||||
@ApiModelProperty("调整后净重(KG)")
|
||||
@Excel(name = "调整后净重(KG)")
|
||||
private BigDecimal adjustedNetWeight;
|
||||
|
||||
@ApiModelProperty("调整后毛重(KG)")
|
||||
@Excel(name = "调整后毛重(KG)")
|
||||
private BigDecimal adjustedGrossWeight;
|
||||
|
||||
@ApiModelProperty("调整后体积")
|
||||
@Excel(name = "调整后体积")
|
||||
private BigDecimal adjustedVolume;
|
||||
|
||||
@ApiModelProperty("调整后面积")
|
||||
@Excel(name = "调整后面积")
|
||||
private BigDecimal adjustedArea;
|
||||
//订单行号
|
||||
private String lineNumGw;
|
||||
//物料规格
|
||||
private String specGw;
|
||||
//计量单位
|
||||
private String unitGw;
|
||||
//数量
|
||||
private BigDecimal qtyGw;
|
||||
//企业币制
|
||||
private String erpCurrGw;
|
||||
//企业单价
|
||||
private BigDecimal erpPriceGw;
|
||||
//申报总价
|
||||
private BigDecimal amountGw;
|
||||
private String inOrderNumberGw;
|
||||
private String inLineNumGw;
|
||||
}
|
||||
+541
@@ -0,0 +1,541 @@
|
||||
package com.mhd.oms.domain.executionOutMaterialDetail.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 ExecutionOutMaterialDetailDTO 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 outOrderNumber;
|
||||
|
||||
@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 alreadyAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("分配数量")
|
||||
@Excel(name = "分配数量")
|
||||
private BigDecimal allocationQuantity;
|
||||
|
||||
@ApiModelProperty("拣货数量")
|
||||
@Excel(name = "拣货数量")
|
||||
private BigDecimal pickingQuantity;
|
||||
|
||||
@ApiModelProperty("复核数量")
|
||||
@Excel(name = "复核数量")
|
||||
private BigDecimal checkQuantity;
|
||||
|
||||
@ApiModelProperty("作业数量(例如:分配数量 拣货数量 复核数量 取消数量)")
|
||||
@Excel(name = "作业数量(例如:分配数量 拣货数量 复核数量 取消数量)")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("净重 单位:千克")
|
||||
@Excel(name = "净重 单位:千克")
|
||||
private BigDecimal weightLimit;
|
||||
|
||||
@ApiModelProperty("体积 单位:立方米")
|
||||
@Excel(name = "体积 单位:立方米")
|
||||
private BigDecimal volumeLimit;
|
||||
|
||||
@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("物料库存id")
|
||||
@Excel(name = "物料库存id")
|
||||
private Long materialInventoryId;
|
||||
|
||||
@ApiModelProperty("批次号")
|
||||
@Excel(name = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("物料状态编码")
|
||||
@Excel(name = "物料状态编码")
|
||||
private String materialStatusCode;
|
||||
|
||||
@ApiModelProperty("物料状态名称")
|
||||
@Excel(name = "物料状态名称")
|
||||
private String materialStatusName;
|
||||
|
||||
@ApiModelProperty("物料明细子集")
|
||||
private List<ExecutionOutMaterialDetailDO> children;
|
||||
|
||||
@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("库存数量(仅展示)")
|
||||
private BigDecimal inventoryQuantity;
|
||||
|
||||
@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("是否允许修改: 1-是 2-否 分配后 不再支持修改")
|
||||
@Excel(name = "是否允许修改: 1-是 2-否")
|
||||
private Integer allowModify;
|
||||
|
||||
@ApiModelProperty("是否生成拣货单: 1-是 2-否")
|
||||
@Excel(name = "是否生成拣货单: 1-是 2-否")
|
||||
private Integer genPickingOrder;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("物料明细子集")
|
||||
private List<ExecutionOutMaterialDetailDTO> materialDetailList;
|
||||
|
||||
// @ApiModelProperty("序列号")
|
||||
// private List<OutMaterialDetailSerialNumberDTO> materialDetailSerialNumberList;
|
||||
|
||||
@ApiModelProperty("出单号集合")
|
||||
@Excel(name = "出单号集合")
|
||||
private List<String> outOrderNumberList;
|
||||
|
||||
@ApiModelProperty("取消分配数量")
|
||||
@Excel(name = "取消分配数量")
|
||||
private BigDecimal cancelAllocationQuantity;
|
||||
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@ApiModelProperty("商品名称")
|
||||
@Excel(name = "商品名称")
|
||||
private String commodityName;
|
||||
/**
|
||||
* 商品编码
|
||||
*/
|
||||
@ApiModelProperty("商品编码")
|
||||
@Excel(name = "商品编码")
|
||||
private String commodityNo;
|
||||
/**
|
||||
* 料号
|
||||
*/
|
||||
@ApiModelProperty("料号")
|
||||
@Excel(name = "料号")
|
||||
private String materialNo;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty("规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String specificationModel;
|
||||
/**
|
||||
* 商品SKU码
|
||||
*/
|
||||
@ApiModelProperty("商品SKU码")
|
||||
@Excel(name = "商品SKU码")
|
||||
private String skucode;
|
||||
/**
|
||||
* Invoice No
|
||||
*/
|
||||
@ApiModelProperty("Invoice No")
|
||||
@Excel(name = "Invoice No")
|
||||
private String invoiceNo;
|
||||
/**
|
||||
* 升
|
||||
*/
|
||||
@ApiModelProperty("升")
|
||||
@Excel(name = "升")
|
||||
private String liter;
|
||||
|
||||
@ApiModelProperty("单价")
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
/**
|
||||
* 尺寸
|
||||
*/
|
||||
@ApiModelProperty("尺寸")
|
||||
@Excel(name = "尺寸")
|
||||
private String size;
|
||||
|
||||
/**
|
||||
* 申报单位
|
||||
*/
|
||||
@ApiModelProperty("申报单位")
|
||||
@Excel(name = "申报单位")
|
||||
private String declareUnit;
|
||||
|
||||
/**
|
||||
* Batch Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Batch Ref NO’s")
|
||||
@Excel(name = "Batch Ref NO’s")
|
||||
private String batchRefNo;
|
||||
|
||||
/**
|
||||
* Sheet Ref NO’s
|
||||
*/
|
||||
@ApiModelProperty("Sheet Ref NO’s")
|
||||
@Excel(name = "Sheet Ref NO’s")
|
||||
private String sheetRefNo;
|
||||
|
||||
/**
|
||||
* 原产国
|
||||
*/
|
||||
@ApiModelProperty("原产国")
|
||||
@Excel(name = "原产国")
|
||||
private String countryOfOrigin;
|
||||
|
||||
/**
|
||||
* 箱号/卡板号
|
||||
*/
|
||||
@ApiModelProperty("箱号/卡板号")
|
||||
@Excel(name = "箱号/卡板号")
|
||||
private String boxPalletNo;
|
||||
|
||||
/**
|
||||
* 币制
|
||||
*/
|
||||
@ApiModelProperty("币制")
|
||||
@Excel(name = "币制")
|
||||
private String currency;
|
||||
|
||||
/**
|
||||
* 申报数量
|
||||
*/
|
||||
@ApiModelProperty("申报数量")
|
||||
@Excel(name = "申报数量")
|
||||
private BigDecimal declareQuantity;
|
||||
|
||||
/**
|
||||
* 箱数
|
||||
*/
|
||||
@ApiModelProperty("箱数")
|
||||
@Excel(name = "箱数")
|
||||
private BigDecimal caseCount;
|
||||
|
||||
/**
|
||||
* 件数
|
||||
*/
|
||||
@ApiModelProperty("件数")
|
||||
@Excel(name = "件数")
|
||||
private BigDecimal pieceCount;
|
||||
|
||||
/**
|
||||
* 出库数量
|
||||
*/
|
||||
@ApiModelProperty("出库数量")
|
||||
@Excel(name = "出库数量")
|
||||
private BigDecimal outboundQuantity;
|
||||
|
||||
/**
|
||||
* 总净重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总净重(KG)")
|
||||
@Excel(name = "总净重(KG)")
|
||||
private BigDecimal totalNetWeight;
|
||||
|
||||
/**
|
||||
* 总毛重(KG)
|
||||
*/
|
||||
@ApiModelProperty("总毛重(KG)")
|
||||
@Excel(name = "总毛重(KG)")
|
||||
private BigDecimal totalGrossWeight;
|
||||
|
||||
/**
|
||||
* 总体积(CBM)
|
||||
*/
|
||||
@ApiModelProperty("总体积(CBM)")
|
||||
@Excel(name = "总体积(CBM)")
|
||||
private BigDecimal totalVolume;
|
||||
|
||||
/**
|
||||
* 总面积(SQM)
|
||||
*/
|
||||
@ApiModelProperty("总面积(SQM)")
|
||||
@Excel(name = "总面积(SQM)")
|
||||
private BigDecimal totalArea;
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@ApiModelProperty("单位")
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
|
||||
@ApiModelProperty("复核总净重(KG)")
|
||||
@Excel(name = "复核总净重(KG)")
|
||||
private BigDecimal checkNetWeight;
|
||||
|
||||
@ApiModelProperty("复核总毛重(KG)")
|
||||
@Excel(name = "复核总毛重(KG)")
|
||||
private BigDecimal checkGrossWeight;
|
||||
|
||||
@ApiModelProperty("复核总体积(CBM)")
|
||||
@Excel(name = "复核总体积(CBM)")
|
||||
private BigDecimal checkVolume;
|
||||
|
||||
@ApiModelProperty("复核总面积(SQM)")
|
||||
@Excel(name = "复核总面积(SQM)")
|
||||
private BigDecimal checkArea;
|
||||
|
||||
@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;
|
||||
|
||||
@ApiModelProperty("入库单号")
|
||||
@Excel(name = "入库单号")
|
||||
private String inOrderNumber;
|
||||
|
||||
@ApiModelProperty("库存单位")
|
||||
@Excel(name = "库存单位")
|
||||
private String stockUnit;
|
||||
|
||||
@ApiModelProperty("库存数量")
|
||||
@Excel(name = "库存数量")
|
||||
private BigDecimal stockQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("调整前库存数量")
|
||||
@Excel(name = "调整前库存数量")
|
||||
private BigDecimal inventoryBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前可用数量")
|
||||
@Excel(name = "调整前可用数量")
|
||||
private BigDecimal allocationBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整前冻结数量")
|
||||
@Excel(name = "调整前冻结数量")
|
||||
private BigDecimal freezeBeforeQuantity;
|
||||
|
||||
@ApiModelProperty("调整后库存数量")
|
||||
@Excel(name = "调整后库存数量")
|
||||
private BigDecimal inventoryAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后可用数量")
|
||||
@Excel(name = "调整后可用数量")
|
||||
private BigDecimal allocationAfterQuantity;
|
||||
|
||||
@ApiModelProperty("调整后冻结数量")
|
||||
@Excel(name = "调整后冻结数量")
|
||||
private BigDecimal freezeAfterQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("调整前净重(KG)")
|
||||
@Excel(name = "调整前净重(KG)")
|
||||
private BigDecimal netWeight;
|
||||
|
||||
@ApiModelProperty("调整前毛重(KG)")
|
||||
@Excel(name = "调整前毛重(KG)")
|
||||
private BigDecimal grossWeight;
|
||||
|
||||
@ApiModelProperty("调整前体积")
|
||||
@Excel(name = "调整前体积")
|
||||
private BigDecimal volume;
|
||||
|
||||
@ApiModelProperty("调整前面积")
|
||||
@Excel(name = "调整前面积")
|
||||
private BigDecimal area;
|
||||
|
||||
@ApiModelProperty("调整后净重(KG)")
|
||||
@Excel(name = "调整后净重(KG)")
|
||||
private BigDecimal adjustedNetWeight;
|
||||
|
||||
@ApiModelProperty("调整后毛重(KG)")
|
||||
@Excel(name = "调整后毛重(KG)")
|
||||
private BigDecimal adjustedGrossWeight;
|
||||
|
||||
@ApiModelProperty("调整后体积")
|
||||
@Excel(name = "调整后体积")
|
||||
private BigDecimal adjustedVolume;
|
||||
|
||||
@ApiModelProperty("调整后面积")
|
||||
@Excel(name = "调整后面积")
|
||||
private BigDecimal adjustedArea;
|
||||
//订单行号
|
||||
private String lineNumGw;
|
||||
//物料规格
|
||||
private String specGw;
|
||||
//计量单位
|
||||
private String unitGw;
|
||||
//数量
|
||||
private BigDecimal qtyGw;
|
||||
//企业币制
|
||||
private String erpCurrGw;
|
||||
//企业单价
|
||||
private BigDecimal erpPriceGw;
|
||||
//申报总价
|
||||
private BigDecimal amountGw;
|
||||
private String inOrderNumberGw;
|
||||
private String inLineNumGw;
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.mhd.oms.domain.executionOutMaterialDetail.service;
|
||||
|
||||
//import com.mhd.wms.domain.outMaterialDetail.repository.facade.IExecutionOutMaterialDetailService;
|
||||
//import com.mhd.wms.domain.outMaterialDetail.repository.po.ExecutionOutMaterialDetailPO;
|
||||
//import com.mhd.wms.domain.outMaterialDetail.repository.todo.ExecutionOutMaterialDetailDO;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.facade.IExecutionOutMaterialDetailService;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.po.ExecutionOutMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailDO;
|
||||
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 ExecutionOutMaterialDetailDomainService {
|
||||
|
||||
@Autowired
|
||||
private IExecutionOutMaterialDetailService outMaterialDetailService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询物料明细列表
|
||||
*/
|
||||
public List<ExecutionOutMaterialDetailPO> queryList(ExecutionOutMaterialDetailDO outMaterialDetailDO) {
|
||||
return outMaterialDetailService.queryList(outMaterialDetailDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增物料明细
|
||||
*/
|
||||
public Boolean insert(ExecutionOutMaterialDetailDO outMaterialDetailDO) {
|
||||
|
||||
return outMaterialDetailService.insert(outMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料明细
|
||||
*/
|
||||
public Boolean update(ExecutionOutMaterialDetailDO outMaterialDetailDO) {
|
||||
return outMaterialDetailService.update(outMaterialDetailDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除物料明细
|
||||
*/
|
||||
public Boolean delete(Long[] materialDetailIds) {
|
||||
return outMaterialDetailService.delete(materialDetailIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物料明细详细信息
|
||||
*/
|
||||
public ExecutionOutMaterialDetailPO getInfo(Long materialDetailId)
|
||||
{
|
||||
return outMaterialDetailService.getInfo(materialDetailId);
|
||||
}
|
||||
|
||||
}
|
||||
+455
@@ -0,0 +1,455 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.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 ExecutionStockInOrder 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("附件url")
|
||||
@Excel(name = "附件url")
|
||||
private String pictureUrl;
|
||||
|
||||
@ApiModelProperty("物料种数")
|
||||
@Excel(name = "物料种数")
|
||||
private Integer materialQuantity;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@ApiModelProperty("入库数量")
|
||||
@Excel(name = "入库数量")
|
||||
private BigDecimal inQuantity;
|
||||
|
||||
@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;
|
||||
|
||||
|
||||
@ApiModelProperty( "下发状态 0-无状态 1-未下发 2-已下发 ")
|
||||
private Integer issueStatus;
|
||||
|
||||
@ApiModelProperty("下发时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date issueTime;
|
||||
|
||||
@ApiModelProperty("下发人id")
|
||||
private Long issueId;
|
||||
|
||||
@ApiModelProperty("下发人")
|
||||
private String issueName;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private Long reservationAuditId;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private String reservationAuditName;
|
||||
|
||||
@ApiModelProperty("预约审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date reservationAuditTime;
|
||||
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
|
||||
@ApiModelProperty("tms订单号")
|
||||
private String tmsOrderNumber;
|
||||
|
||||
@ApiModelProperty("订单来源")
|
||||
private String reservationOrderSource;
|
||||
|
||||
@ApiModelProperty("仓库负责人")
|
||||
private String directorName;
|
||||
|
||||
@ApiModelProperty("仓库负责人电话")
|
||||
private String directorPhone;
|
||||
|
||||
@ApiModelProperty("仓库负责人id")
|
||||
private Long directorId;
|
||||
@ApiModelProperty("入库时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date storageTime;
|
||||
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal amount;
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
|
||||
@ApiModelProperty("运输业务单号")
|
||||
private String businessNumber;
|
||||
|
||||
@ApiModelProperty("是否免费夫力费费")
|
||||
private String isFreeManpowerFee;
|
||||
|
||||
@ApiModelProperty("折扣")
|
||||
private BigDecimal discount;
|
||||
|
||||
@ApiModelProperty("火险保费")
|
||||
private BigDecimal fireInsureFee;
|
||||
|
||||
@ApiModelProperty("夫力费")
|
||||
private BigDecimal manpowerFee;
|
||||
|
||||
@ApiModelProperty("总仓租")
|
||||
private BigDecimal totalWarehouseRent;
|
||||
|
||||
@ApiModelProperty("业务计价类型")
|
||||
private String businessChargeType;
|
||||
|
||||
@ApiModelProperty("业务计价方式")
|
||||
private String businessPriceWay;
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.entity.ExecutionStockInOrder;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.po.ExecutionStockInOrderPO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.todo.ExecutionStockInOrderDO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.vo.DeliveryDataDTO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.vo.StockInDataDTO;
|
||||
//import com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库单Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface IExecutionStockInOrderService extends IService<ExecutionStockInOrder>
|
||||
{
|
||||
/**
|
||||
* 分页查询入库单列表
|
||||
*/
|
||||
public List<ExecutionStockInOrderPO> queryList(ExecutionStockInOrderDO stockInOrderDO);
|
||||
|
||||
/**
|
||||
* 新增入库单
|
||||
*/
|
||||
public Boolean insert(ExecutionStockInOrderDO stockInOrderDO);
|
||||
|
||||
/**
|
||||
* 修改入库单
|
||||
*/
|
||||
public Boolean update(ExecutionStockInOrderDO stockInOrderDO);
|
||||
|
||||
/**
|
||||
* 批量删除入库单
|
||||
*/
|
||||
public Boolean delete(Long[] inOrderIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询入库单
|
||||
*/
|
||||
public ExecutionStockInOrderPO getInfo(Long inOrderId);
|
||||
|
||||
List<ExecutionStockInOrderPO> queryNoticePrint(ExecutionStockInOrderDO stockInOrderDO);
|
||||
List<ExecutionInMaterialDetailPO> queryNoticePrintDetail(ExecutionStockInOrderDO stockInOrderDTO);
|
||||
|
||||
/**
|
||||
* 解析Excel文件并获取出库数据
|
||||
* @param file Excel文件
|
||||
* @param sheetName 工作表名称(出库导入/参考数据)
|
||||
* @return 出库数据DTO
|
||||
* @throws Exception 解析异常
|
||||
*/
|
||||
DeliveryDataDTO parseExcelFile(MultipartFile file, String sheetName) throws Exception;
|
||||
|
||||
/**
|
||||
* 解析入库单Excel文件
|
||||
* @param file Excel文件
|
||||
* @param sheetName 工作表名称(默认:入库模版)
|
||||
* @return 入库单完整数据(表头+明细)
|
||||
* @throws Exception 解析异常
|
||||
*/
|
||||
StockInDataDTO parseStockInExcel(MultipartFile file, String sheetName) throws Exception;
|
||||
}
|
||||
+513
@@ -0,0 +1,513 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.listener;
|
||||
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import com.alibaba.excel.exception.ExcelDataConvertException;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.vo.CustomerDeliveryDetail;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.vo.DeliveryHeader;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.vo.ProductDetail;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 维他奶出库Excel解析监听器(最终完整版)
|
||||
* 核心功能:
|
||||
* 1. 正确解析多单元格数据(解决发票张数/纪录合共读取错误)
|
||||
* 2. 支持动态行数的货品明细/客户配送明细解析
|
||||
* 3. 自动处理文本型数字转换(String→Integer/BigDecimal)
|
||||
* 4. 完整的异常处理和日志记录
|
||||
*/
|
||||
public class DynamicDeliveryExcelListener extends AnalysisEventListener<Map<String, Object>> {
|
||||
// 日志实例
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DynamicDeliveryExcelListener.class);
|
||||
|
||||
// ---------------------- 常量定义(便于维护) ----------------------
|
||||
// 正则表达式:匹配整数(支持正负数)
|
||||
private static final Pattern INTEGER_PATTERN = Pattern.compile("-?\\d+");
|
||||
// 正则表达式:匹配小数(支持正负数和整数形式)
|
||||
private static final Pattern DECIMAL_PATTERN = Pattern.compile("-?\\d+(\\.\\d+)?");
|
||||
// 关键字定义(Excel标签匹配)
|
||||
private static final String KEYWORD_DELIVERY_DATE = "送貨日期";
|
||||
private static final String KEYWORD_PRODUCT_DETAIL = "货品明细";
|
||||
private static final String KEYWORD_TOTAL_RECORD = "紀錄合共";
|
||||
private static final String KEYWORD_CUSTOMER_DETAIL = "客户配送明细";
|
||||
private static final String KEYWORD_INVOICE_COUNT = "發票張數";
|
||||
private static final String KEYWORD_TOTAL_COUNT = "總計";
|
||||
private static final String KEYWORD_SUBTOTAL = "小計";
|
||||
// 支持的日期格式(String转Date)
|
||||
private static final String[] SUPPORTED_DATE_FORMATS = {"yyyy-MM-dd", "yyyy/MM/dd", "yyyyMMdd", "yyyy-MM-dd HH:mm:ss"};
|
||||
|
||||
// ---------------------- 数据存储(解析结果) ----------------------
|
||||
private DeliveryHeader deliveryHeader = new DeliveryHeader();
|
||||
private List<ProductDetail> productDetailList = new ArrayList<>();
|
||||
private List<CustomerDeliveryDetail> customerDeliveryDetailList = new ArrayList<>();
|
||||
|
||||
// ---------------------- 解析状态管理(动态切换) ----------------------
|
||||
public enum ParseStatus {
|
||||
IDLE, // 空闲状态(未进入任何表格)
|
||||
PRODUCT_DETAIL,// 货品明细解析状态
|
||||
CUSTOMER_DETAIL// 客户配送明细解析状态
|
||||
}
|
||||
private ParseStatus currentStatus = ParseStatus.IDLE;
|
||||
|
||||
// ---------------------- 核心解析方法(EasyExcel回调) ----------------------
|
||||
@Override
|
||||
public void invoke(Map<String, Object> data, AnalysisContext context) {
|
||||
try {
|
||||
int rowNum = context.readRowHolder().getRowIndex() + 1;
|
||||
LOGGER.debug("第{}行:开始解析,所有单元格数据:{}", rowNum, data);
|
||||
|
||||
// 1. 获取第一列数据(用于状态判断,标签通常在第一列)
|
||||
String firstCellValue = getFirstCellValue(data);
|
||||
LOGGER.debug("第{}行:第一列数据(状态判断依据):{}", rowNum, firstCellValue);
|
||||
|
||||
// 2. 状态切换判断(传递完整data,支持多单元格解析)
|
||||
if (isStatusSwitchTrigger(firstCellValue)) {
|
||||
switchStatus(firstCellValue, rowNum, data);
|
||||
return;
|
||||
}
|
||||
|
||||
// 3. 根据当前状态解析对应表格数据
|
||||
switch (currentStatus) {
|
||||
case PRODUCT_DETAIL:
|
||||
if (isValidProductDetailRow(data, firstCellValue)) {
|
||||
parseProductDetail(data, rowNum);
|
||||
}
|
||||
break;
|
||||
case CUSTOMER_DETAIL:
|
||||
if (isValidCustomerDetailRow(data, firstCellValue)) {
|
||||
parseCustomerDeliveryDetail(data, rowNum);
|
||||
}
|
||||
break;
|
||||
case IDLE:
|
||||
// 空闲状态:解析表头信息(送货日期行,多单元格数据)
|
||||
if (firstCellValue.contains(KEYWORD_DELIVERY_DATE)) {
|
||||
parseHeaderInfo(data, rowNum);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
} catch (ExcelDataConvertException e) {
|
||||
// Excel内置转换异常(如日期格式错误)
|
||||
int rowNum = context.readRowHolder().getRowIndex() + 1;
|
||||
LOGGER.error("第{}行:Excel数据转换异常,列号:{},列名:{}",
|
||||
rowNum, e.getColumnIndex() + 1, getColumnNameByIndex(data, e.getColumnIndex()), e);
|
||||
throw new RuntimeException("Excel数据转换异常(行:" + rowNum + ",列:" + (e.getColumnIndex() + 1) + ")", e);
|
||||
} catch (Exception e) {
|
||||
// 其他解析异常
|
||||
int rowNum = context.readRowHolder().getRowIndex() + 1;
|
||||
LOGGER.error("第{}行:Excel解析异常,所有单元格数据:{}", rowNum, data, e);
|
||||
throw new RuntimeException("Excel解析异常(行:" + rowNum + ")", e);
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------- 解析完成回调 ----------------------
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext context) {
|
||||
LOGGER.info("Excel解析全部完成!最终统计结果:");
|
||||
LOGGER.info("1. 表头信息:送货日期={},发票张数={},总记录数={},小计金额={}",
|
||||
deliveryHeader.getDeliveryDate(),
|
||||
deliveryHeader.getInvoiceCount(),
|
||||
deliveryHeader.getTotalRecordCount(),
|
||||
deliveryHeader.getSubtotalAmount());
|
||||
LOGGER.info("2. 货品明细:共{}条记录", productDetailList.size());
|
||||
LOGGER.info("3. 客户配送明细:共{}条记录", customerDeliveryDetailList.size());
|
||||
}
|
||||
|
||||
// ---------------------- 状态管理方法(传递完整data) ----------------------
|
||||
/**
|
||||
* 判断是否触发状态切换(根据第一列标签关键字)
|
||||
*/
|
||||
private boolean isStatusSwitchTrigger(String firstCellValue) {
|
||||
return firstCellValue.contains(KEYWORD_PRODUCT_DETAIL)
|
||||
|| firstCellValue.contains(KEYWORD_TOTAL_RECORD)
|
||||
|| firstCellValue.contains(KEYWORD_CUSTOMER_DETAIL)
|
||||
|| firstCellValue.contains(KEYWORD_INVOICE_COUNT);
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换解析状态(核心:传递完整data,支持多单元格解析)
|
||||
*/
|
||||
private void switchStatus(String firstCellValue, int rowNum, Map<String, Object> data) {
|
||||
if (firstCellValue.contains(KEYWORD_PRODUCT_DETAIL)) {
|
||||
currentStatus = ParseStatus.PRODUCT_DETAIL;
|
||||
LOGGER.info("第{}行:检测到【{}】标签,切换到【货品明细】解析状态", rowNum, KEYWORD_PRODUCT_DETAIL);
|
||||
} else if (firstCellValue.contains(KEYWORD_TOTAL_RECORD)) {
|
||||
currentStatus = ParseStatus.IDLE;
|
||||
parseTotalRecord(data, rowNum); // 解析纪录合共(多单元格)
|
||||
LOGGER.info("第{}行:检测到【{}】标签,切换到【空闲】状态,已解析货品明细{}条",
|
||||
rowNum, KEYWORD_TOTAL_RECORD, productDetailList.size());
|
||||
} else if (firstCellValue.contains(KEYWORD_CUSTOMER_DETAIL)) {
|
||||
currentStatus = ParseStatus.CUSTOMER_DETAIL;
|
||||
LOGGER.info("第{}行:检测到【{}】标签,切换到【客户配送明细】解析状态", rowNum, KEYWORD_CUSTOMER_DETAIL);
|
||||
} else if (firstCellValue.contains(KEYWORD_INVOICE_COUNT)) {
|
||||
currentStatus = ParseStatus.IDLE;
|
||||
parseInvoiceCount(data, rowNum); // 解析发票张数(多单元格,核心修复)
|
||||
LOGGER.info("第{}行:检测到【{}】标签,切换到【空闲】状态,已解析客户配送明细{}条",
|
||||
rowNum, KEYWORD_INVOICE_COUNT, customerDeliveryDetailList.size());
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------- 数据有效性校验方法 ----------------------
|
||||
/**
|
||||
* 校验货品明细行是否有效(排除表头和空行)
|
||||
*/
|
||||
private boolean isValidProductDetailRow(Map<String, Object> data, String firstCellValue) {
|
||||
// 有效条件:1.货品编号(第一列)不为空 2.不是表头行(表头第一列是"貨品編號")
|
||||
Object productCode = getValueSafely(data, 0);
|
||||
return productCode != null
|
||||
&& !"貨品編號".equals(productCode.toString().trim())
|
||||
&& !productCode.toString().trim().isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验客户配送明细行是否有效(排除表头和空行)
|
||||
*/
|
||||
private boolean isValidCustomerDetailRow(Map<String, Object> data, String firstCellValue) {
|
||||
// 有效条件:1.类别(第一列)不为空 2.不是表头行(表头第一列是"類别")
|
||||
Object category = getValueSafely(data, 0);
|
||||
return category != null
|
||||
&& !"類别".equals(category.toString().trim())
|
||||
&& !category.toString().trim().isEmpty();
|
||||
}
|
||||
|
||||
// ---------------------- 具体数据解析方法(全部支持多单元格) ----------------------
|
||||
/**
|
||||
* 解析表头信息(送货日期、送货线号、车次)
|
||||
* 列对应关系:0=送貨日期标签,1=送貨日期值,2=送貨線號标签,3=送貨線號值,4=車次标签,5=車次值
|
||||
*/
|
||||
private void parseHeaderInfo(Map<String, Object> data, int rowNum) {
|
||||
try {
|
||||
// 读取多单元格数据(标签在左,数值在右)
|
||||
Date deliveryDate = getValueSafely(data, 1, Date.class); // 第2列:送货日期值
|
||||
String deliveryLineNo = getValueSafely(data, 3, String.class); // 第4列:送货线号值
|
||||
Integer trainNumber = getValueSafely(data, 5, Integer.class); // 第6列:车次值
|
||||
|
||||
// 赋值(空值处理)
|
||||
if (deliveryDate != null) {
|
||||
deliveryHeader.setDeliveryDate(deliveryDate);
|
||||
}
|
||||
deliveryHeader.setDeliveryLineNo(deliveryLineNo);
|
||||
deliveryHeader.setTrainNumber(getDefaultValue(trainNumber, 0));
|
||||
|
||||
LOGGER.debug("第{}行:解析表头信息完成,送货日期={},送货线号={},车次={}",
|
||||
rowNum, deliveryHeader.getDeliveryDate(),
|
||||
deliveryHeader.getDeliveryLineNo(), deliveryHeader.getTrainNumber());
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("第{}行:解析表头信息失败,所有单元格数据:{}", rowNum, data, e);
|
||||
throw new RuntimeException("解析表头信息失败(行:" + rowNum + ")", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析纪录合共(多单元格版)
|
||||
* 列对应关系:0=紀錄合共标签,1=总记录数值,4=總計标签,5=总箱数值,6=总支数值
|
||||
*/
|
||||
private void parseTotalRecord(Map<String, Object> data, int rowNum) {
|
||||
try {
|
||||
// 1. 验证是否为纪录合共行(第一列包含标签)
|
||||
Object totalRecordLabel = getValueSafely(data, 0, String.class);
|
||||
if (totalRecordLabel == null || !totalRecordLabel.toString().trim().contains(KEYWORD_TOTAL_RECORD)) {
|
||||
LOGGER.warn("第{}行:不是纪录合共行,跳过解析,第一列内容:{}", rowNum, totalRecordLabel);
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 读取多单元格数值(标签右侧对应列)
|
||||
Integer totalRecordCount = getValueSafely(data, 1, Integer.class); // 第2列:总记录数
|
||||
Integer totalBoxCount = getValueSafely(data, 5, Integer.class); // 第6列:总箱数
|
||||
Integer totalPieceCount = getValueSafely(data, 6, Integer.class); // 第7列:总支数
|
||||
|
||||
// 3. 赋值与日志
|
||||
deliveryHeader.setTotalRecordCount(getDefaultValue(totalRecordCount, 0));
|
||||
deliveryHeader.setTotalBoxCount(getDefaultValue(totalBoxCount, 0));
|
||||
deliveryHeader.setTotalPieceCount(getDefaultValue(totalPieceCount, 0));
|
||||
|
||||
LOGGER.debug("第{}行:解析纪录合共完成,总记录数={},总箱数={},总支数={}",
|
||||
rowNum, deliveryHeader.getTotalRecordCount(),
|
||||
deliveryHeader.getTotalBoxCount(), deliveryHeader.getTotalPieceCount());
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("第{}行:解析纪录合共失败,所有单元格数据:{}", rowNum, data, e);
|
||||
throw new RuntimeException("解析纪录合共失败(行:" + rowNum + ")", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 核心修复:解析发票张数(多单元格版,正确读取右侧单元格)
|
||||
* 列对应关系:
|
||||
* - 0=發票張數标签列(A列),1=发票张数数值列(B列)
|
||||
* - 4=小計标签列(E列),5=小计箱数列(F列),6=小计支数列(G列),7=小计金额列(H列)
|
||||
*/
|
||||
private void parseInvoiceCount(Map<String, Object> data, int rowNum) {
|
||||
try {
|
||||
// 1. 验证是否为发票张数行(第一列包含标签)
|
||||
Object invoiceLabel = getValueSafely(data, 0, String.class);
|
||||
if (invoiceLabel == null || !invoiceLabel.toString().trim().contains(KEYWORD_INVOICE_COUNT)) {
|
||||
LOGGER.warn("第{}行:不是发票张数行,跳过解析,第一列内容:{}", rowNum, invoiceLabel);
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 解析发票张数(标签右侧第1列:B列,索引1)
|
||||
Integer invoiceCount = getValueSafely(data, 1, Integer.class);
|
||||
deliveryHeader.setInvoiceCount(getDefaultValue(invoiceCount, 0));
|
||||
LOGGER.debug("第{}行:解析发票张数,标签列(A列):{},数值列(B列):{}",
|
||||
rowNum, invoiceLabel, deliveryHeader.getInvoiceCount());
|
||||
|
||||
// 3. 解析小计信息(标签在E列,数值在F/G/H列)
|
||||
Object subtotalLabel = getValueSafely(data, 3, String.class); // E列:小計标签
|
||||
if (subtotalLabel != null && subtotalLabel.toString().trim().contains(KEYWORD_SUBTOTAL)) {
|
||||
Integer subtotalBoxCount = getValueSafely(data, 4, Integer.class); // F列:小计箱数
|
||||
Integer subtotalPieceCount = getValueSafely(data, 5, Integer.class); // G列:小计支数
|
||||
BigDecimal subtotalAmount = getValueSafely(data, 6, BigDecimal.class); // H列:小计金额
|
||||
|
||||
// 赋值(空值处理)
|
||||
deliveryHeader.setSubtotalBoxCount(getDefaultValue(subtotalBoxCount, 0));
|
||||
deliveryHeader.setSubtotalPieceCount(getDefaultValue(subtotalPieceCount, 0));
|
||||
deliveryHeader.setSubtotalAmount(getDefaultValue(subtotalAmount, BigDecimal.ZERO));
|
||||
|
||||
LOGGER.debug("第{}行:解析小计信息,标签列(E列):{},箱数列(F列):{},支数列(G列):{},金额列(H列):{}",
|
||||
rowNum, subtotalLabel,
|
||||
deliveryHeader.getSubtotalBoxCount(),
|
||||
deliveryHeader.getSubtotalPieceCount(),
|
||||
deliveryHeader.getSubtotalAmount());
|
||||
} else {
|
||||
LOGGER.warn("第{}行:未找到小计标签(E列),或标签内容不匹配,跳过小计解析", rowNum);
|
||||
deliveryHeader.setSubtotalBoxCount(0);
|
||||
deliveryHeader.setSubtotalPieceCount(0);
|
||||
deliveryHeader.setSubtotalAmount(BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
// 4. 解析完成日志
|
||||
LOGGER.debug("第{}行:解析发票张数行完成,最终结果:发票张数={},小计金额={}",
|
||||
rowNum, deliveryHeader.getInvoiceCount(), deliveryHeader.getSubtotalAmount());
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("第{}行:解析发票张数失败,所有单元格数据:{}", rowNum, data, e);
|
||||
throw new RuntimeException("解析发票张数失败(行:" + rowNum + "),请检查Excel列对应关系", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析货品明细(多单元格,动态行数适配)
|
||||
* 列对应关系:0=貨品編號,1=簡稱,4=箱,5=支
|
||||
*/
|
||||
private void parseProductDetail(Map<String, Object> data, int rowNum) {
|
||||
try {
|
||||
ProductDetail productDetail = new ProductDetail();
|
||||
// 读取对应列的多单元格数据
|
||||
String productCode = getValueSafely(data, 0, String.class); // 第1列:货品编号
|
||||
String productName = getValueSafely(data, 1, String.class); // 第2列:货品简称
|
||||
Integer boxCount = getValueSafely(data, 4, Integer.class); // 第5列:箱数
|
||||
Integer pieceCount = getValueSafely(data, 5, Integer.class); // 第6列:支数
|
||||
|
||||
// 赋值(空值处理+去空格)
|
||||
productDetail.setProductCode(getDefaultValue(productCode, "").trim());
|
||||
productDetail.setProductName(getDefaultValue(productName, "").trim());
|
||||
productDetail.setBoxCount(getDefaultValue(boxCount, 0));
|
||||
productDetail.setPieceCount(getDefaultValue(pieceCount, 0));
|
||||
|
||||
// 添加到列表
|
||||
productDetailList.add(productDetail);
|
||||
LOGGER.debug("第{}行:解析货品明细完成,货品编号={},名称={},箱数={},支数={}",
|
||||
rowNum, productDetail.getProductCode(), productDetail.getProductName(),
|
||||
productDetail.getBoxCount(), productDetail.getPieceCount());
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("第{}行:解析货品明细失败,所有单元格数据:{}", rowNum, data, e);
|
||||
throw new RuntimeException("解析货品明细失败(行:" + rowNum + ")", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析客户配送明细(多单元格,动态行数适配)
|
||||
* 列对应关系:0=類别,1=發票編號,2=客户編號,3=名稱,4=箱,5=包,6=金額
|
||||
*/
|
||||
private void parseCustomerDeliveryDetail(Map<String, Object> data, int rowNum) {
|
||||
try {
|
||||
CustomerDeliveryDetail customerDetail = new CustomerDeliveryDetail();
|
||||
// 读取对应列的多单元格数据
|
||||
String category = getValueSafely(data, 0, String.class); // 第1列:类别
|
||||
String invoiceNo = getValueSafely(data, 1, String.class); // 第2列:发票编号
|
||||
String customerCode = getValueSafely(data, 2, String.class); // 第3列:客户编号
|
||||
String customerName = getValueSafely(data, 3, String.class); // 第4列:客户名称
|
||||
Integer boxCount = getValueSafely(data, 4, Integer.class); // 第5列:箱数
|
||||
Integer packageCount = getValueSafely(data, 5, Integer.class); // 第6列:包数
|
||||
BigDecimal amount = getValueSafely(data, 6, BigDecimal.class); // 第7列:金额
|
||||
|
||||
// 赋值(空值处理+去空格)
|
||||
customerDetail.setCategory(getDefaultValue(category, "").trim());
|
||||
customerDetail.setInvoiceNo(getDefaultValue(invoiceNo, "").trim());
|
||||
customerDetail.setCustomerCode(getDefaultValue(customerCode, "").trim());
|
||||
customerDetail.setCustomerName(getDefaultValue(customerName, "").trim());
|
||||
customerDetail.setBoxCount(getDefaultValue(boxCount, 0));
|
||||
customerDetail.setPackageCount(getDefaultValue(packageCount, 0));
|
||||
customerDetail.setAmount(getDefaultValue(amount, BigDecimal.ZERO));
|
||||
|
||||
// 添加到列表
|
||||
customerDeliveryDetailList.add(customerDetail);
|
||||
LOGGER.debug("第{}行:解析客户配送明细完成,客户编号={},名称={},金额={}",
|
||||
rowNum, customerDetail.getCustomerCode(), customerDetail.getCustomerName(),
|
||||
customerDetail.getAmount());
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("第{}行:解析客户配送明细失败,所有单元格数据:{}", rowNum, data, e);
|
||||
throw new RuntimeException("解析客户配送明细失败(行:" + rowNum + ")", e);
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------- 核心工具方法(支持多单元格+类型转换) ----------------------
|
||||
/**
|
||||
* 获取第一列数据(用于状态判断)
|
||||
*/
|
||||
private String getFirstCellValue(Map<String, Object> data) {
|
||||
if (data == null || data.isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
Object firstValue = data.values().iterator().next();
|
||||
return firstValue != null ? firstValue.toString().trim() : "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据列索引获取列名(用于异常定位)
|
||||
*/
|
||||
private String getColumnNameByIndex(Map<String, Object> data, int columnIndex) {
|
||||
if (data == null || data.isEmpty()) {
|
||||
return "未知列";
|
||||
}
|
||||
int index = 0;
|
||||
for (String key : data.keySet()) {
|
||||
if (index == columnIndex) {
|
||||
return key;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
return "第" + (columnIndex + 1) + "列";
|
||||
}
|
||||
|
||||
/**
|
||||
* 按列索引安全获取原始值(不做类型转换)
|
||||
*/
|
||||
private Object getValueSafely(Map<String, Object> data, int columnIndex) {
|
||||
if (data == null || data.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
int index = 0;
|
||||
for (Object value : data.values()) {
|
||||
if (index == columnIndex) {
|
||||
return value;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
LOGGER.warn("列索引{}超出当前行单元格数量({}列),返回null", columnIndex, data.size());
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按列索引安全获取值(支持多类型转换,核心工具)
|
||||
* 功能:1. 直接类型匹配 2. String转数字/日期 3. 数字类型间转换
|
||||
*/
|
||||
private <T> T getValueSafely(Map<String, Object> data, int columnIndex, Class<T> expectedType) {
|
||||
Object value = getValueSafely(data, columnIndex);
|
||||
if (value == null) {
|
||||
LOGGER.debug("列索引{}:单元格值为null,返回null", columnIndex);
|
||||
return null;
|
||||
}
|
||||
|
||||
// 1. 直接类型匹配
|
||||
if (expectedType.isInstance(value)) {
|
||||
return expectedType.cast(value);
|
||||
}
|
||||
|
||||
// 2. String类型转目标类型(核心:处理文本型数字)
|
||||
if (value instanceof String) {
|
||||
String strValue = ((String) value).trim();
|
||||
if (strValue.isEmpty()) {
|
||||
LOGGER.debug("列索引{}:单元格值为空字符串,返回null", columnIndex);
|
||||
return null;
|
||||
}
|
||||
|
||||
// String → Integer
|
||||
if (expectedType == Integer.class) {
|
||||
try {
|
||||
return expectedType.cast(Integer.parseInt(strValue));
|
||||
} catch (NumberFormatException e) {
|
||||
LOGGER.warn("列索引{}:String转Integer失败,原始值:{}", columnIndex, strValue, e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// String → Long
|
||||
if (expectedType == Long.class) {
|
||||
try {
|
||||
return expectedType.cast(Long.parseLong(strValue));
|
||||
} catch (NumberFormatException e) {
|
||||
LOGGER.warn("列索引{}:String转Long失败,原始值:{}", columnIndex, strValue, e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// String → BigDecimal(支持千分位符号,如"1,234.56")
|
||||
if (expectedType == BigDecimal.class) {
|
||||
try {
|
||||
String cleanValue = strValue.replace(",", ""); // 去除千分位逗号
|
||||
return expectedType.cast(new BigDecimal(cleanValue));
|
||||
} catch (NumberFormatException e) {
|
||||
LOGGER.warn("列索引{}:String转BigDecimal失败,原始值:{}", columnIndex, strValue, e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// String → Date(支持多种日期格式)
|
||||
if (expectedType == Date.class) {
|
||||
try {
|
||||
return expectedType.cast(DateUtils.parseDate(strValue, SUPPORTED_DATE_FORMATS));
|
||||
} catch (ParseException e) {
|
||||
LOGGER.warn("列索引{}:String转Date失败,原始值:{},支持格式:{}",
|
||||
columnIndex, strValue, Arrays.toString(SUPPORTED_DATE_FORMATS), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 3. 数字类型间转换(如Double→Integer,Long→BigDecimal)
|
||||
if (value instanceof Number) {
|
||||
Number numValue = (Number) value;
|
||||
if (expectedType == Integer.class) {
|
||||
return expectedType.cast(numValue.intValue());
|
||||
}
|
||||
if (expectedType == Long.class) {
|
||||
return expectedType.cast(numValue.longValue());
|
||||
}
|
||||
if (expectedType == BigDecimal.class) {
|
||||
return expectedType.cast(new BigDecimal(numValue.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
// 4. 不支持的转换
|
||||
LOGGER.warn("列索引{}:不支持的类型转换,期望类型:{},实际类型:{},原始值:{}",
|
||||
columnIndex, expectedType.getSimpleName(), value.getClass().getSimpleName(), value);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 空值处理:返回默认值
|
||||
*/
|
||||
private <T> T getDefaultValue(T value, T defaultValue) {
|
||||
return value != null ? value : defaultValue;
|
||||
}
|
||||
|
||||
// ---------------------- Getter方法(供Service层获取解析结果) ----------------------
|
||||
public DeliveryHeader getDeliveryHeader() {
|
||||
return deliveryHeader;
|
||||
}
|
||||
|
||||
public List<ProductDetail> getProductDetailList() {
|
||||
return productDetailList;
|
||||
}
|
||||
|
||||
public List<CustomerDeliveryDetail> getCustomerDeliveryDetailList() {
|
||||
return customerDeliveryDetailList;
|
||||
}
|
||||
}
|
||||
+259
@@ -0,0 +1,259 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.listener;
|
||||
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import com.alibaba.excel.exception.ExcelDataConvertException;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.vo.StockInHeader;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.vo.StockInProductDetail;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 入库单Excel解析监听器
|
||||
* 功能:1. 解析第一行表头数据 2. 解析第二行开始的产品明细 3. 支持文本型数字转换
|
||||
*/
|
||||
public class StockInExcelListener extends AnalysisEventListener<Map<String, Object>> {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(StockInExcelListener.class);
|
||||
|
||||
// 存储解析结果
|
||||
private final StockInHeader stockInHeader = new StockInHeader();
|
||||
private final List<StockInProductDetail> productDetailList = new ArrayList<>();
|
||||
|
||||
// 支持的日期格式(用于String转Date)
|
||||
private static final String[] SUPPORTED_DATE_FORMATS = {
|
||||
"yyyy-MM-dd", "yyyy/MM/dd", "yyyyMMdd", "yyyy-MM-dd HH:mm:ss"
|
||||
};
|
||||
|
||||
// 行号标记(用于区分第一行和表格行)
|
||||
private int currentRowNum = 0;
|
||||
|
||||
@Override
|
||||
public void invoke(Map<String, Object> data, AnalysisContext context) {
|
||||
currentRowNum = context.readRowHolder().getRowIndex() + 1; // 行号从1开始
|
||||
try {
|
||||
LOGGER.debug("第{}行解析开始,数据:{}", currentRowNum, data);
|
||||
|
||||
// 1. 解析第一行:表头数据(入库日期、OrderNO)
|
||||
if (currentRowNum == 1) {
|
||||
parseHeaderData(data);
|
||||
}
|
||||
// 2. 解析第二行及以后:产品明细(跳过表头行:第2行是表格列名)
|
||||
else if (currentRowNum >= 3) {
|
||||
if (isValidProductRow(data)) {
|
||||
StockInProductDetail detail = parseProductDetail(data);
|
||||
productDetailList.add(detail);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (ExcelDataConvertException e) {
|
||||
// Excel内置转换异常(如日期格式错误)
|
||||
LOGGER.error("第{}行数据转换异常,列号:{},列名:{}",
|
||||
currentRowNum, e.getColumnIndex() + 1, getColumnNameByIndex(data, e.getColumnIndex()), e);
|
||||
throw new RuntimeException("第" + currentRowNum + "行列" + (e.getColumnIndex() + 1) + "数据格式错误", e);
|
||||
} catch (Exception e) {
|
||||
// 其他解析异常
|
||||
LOGGER.error("第{}行解析异常,数据:{}", currentRowNum, data, e);
|
||||
throw new RuntimeException("第" + currentRowNum + "行数据解析失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析第一行表头数据
|
||||
* 列对应关系:0=入库日期标签,1=入库日期值,2=OrderNO标签,3=OrderNO值
|
||||
*/
|
||||
private void parseHeaderData(Map<String, Object> data) {
|
||||
// 入库日期(第2列,索引1)
|
||||
Object stockInDateObj = getValueSafely(data, 1);
|
||||
if (stockInDateObj != null) {
|
||||
Date stockInDate = convertToDate(stockInDateObj);
|
||||
stockInHeader.setStockInDate(stockInDate);
|
||||
LOGGER.debug("第1行:入库日期解析完成,值:{}", stockInDate);
|
||||
}
|
||||
|
||||
// OrderNO(第4列,索引3)
|
||||
Object orderNoObj = getValueSafely(data, 3);
|
||||
if (orderNoObj != null) {
|
||||
String orderNo = orderNoObj.toString().trim();
|
||||
stockInHeader.setOrderNo(orderNo);
|
||||
LOGGER.debug("第1行:OrderNO解析完成,值:{}", orderNo);
|
||||
}
|
||||
|
||||
// 校验表头数据完整性
|
||||
if (stockInHeader.getStockInDate() == null || stockInHeader.getOrderNo().isEmpty()) {
|
||||
LOGGER.warn("第1行表头数据不完整,入库日期:{},OrderNO:{}",
|
||||
stockInHeader.getStockInDate(), stockInHeader.getOrderNo());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析产品明细数据(一行对应一个产品)
|
||||
*/
|
||||
private StockInProductDetail parseProductDetail(Map<String, Object> data) {
|
||||
StockInProductDetail detail = new StockInProductDetail();
|
||||
|
||||
// 产品编号(第1列,索引0)- 支持文本型数字转换
|
||||
detail.setProductCode(convertToString(getValueSafely(data, 0)).toString());
|
||||
// 产品名称(第2列,索引1)
|
||||
detail.setProductName(convertToString(getValueSafely(data, 1)));
|
||||
// 箱含量(第5列,索引4)
|
||||
detail.setBoxCapacity(convertToInteger(getValueSafely(data, 4)));
|
||||
// 件数(第6列,索引5)
|
||||
detail.setPieceCount(convertToInteger(getValueSafely(data, 5)));
|
||||
// 箱数(第7列,索引6)
|
||||
detail.setBoxCount(convertToInteger(getValueSafely(data, 6)));
|
||||
// 饮用日期(第8列,索引7)
|
||||
detail.setDrinkDate(convertToDate(getValueSafely(data, 7)));
|
||||
|
||||
LOGGER.debug("第{}行产品明细解析完成,产品编号:{},产品名称:{}",
|
||||
currentRowNum, detail.getProductCode(), detail.getProductName());
|
||||
return detail;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验产品行是否有效(排除空行和合计行)
|
||||
*/
|
||||
private boolean isValidProductRow(Map<String, Object> data) {
|
||||
// 有效条件:产品编号不为空 + 不是合计行(合计行产品编号为null,且包含"Total")
|
||||
Object productCodeObj = getValueSafely(data, 0);
|
||||
Object productNameObj = getValueSafely(data, 1);
|
||||
|
||||
// 排除合计行(如第7行:Total:68)
|
||||
if (productNameObj != null && productNameObj.toString().contains("Total")) {
|
||||
LOGGER.debug("第{}行是合计行,跳过解析", currentRowNum);
|
||||
return false;
|
||||
}
|
||||
|
||||
// 排除空行(产品编号为空)
|
||||
return productCodeObj != null && !productCodeObj.toString().trim().isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析完成回调
|
||||
*/
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext context) {
|
||||
LOGGER.info("Excel解析全部完成!解析结果:");
|
||||
LOGGER.info("1. 表头信息:入库日期={},OrderNO={}",
|
||||
stockInHeader.getStockInDate(), stockInHeader.getOrderNo());
|
||||
LOGGER.info("2. 产品明细:共{}条记录", productDetailList.size());
|
||||
}
|
||||
|
||||
// ---------------------- 工具方法(类型转换+安全取值) ----------------------
|
||||
/**
|
||||
* 按列索引安全获取值(支持列索引越界处理)
|
||||
*/
|
||||
private Object getValueSafely(Map<String, Object> data, int columnIndex) {
|
||||
if (data == null || data.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
for (Object value : data.values()) {
|
||||
if (index == columnIndex) {
|
||||
return value;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
LOGGER.warn("第{}行列索引{}超出范围(当前行共{}列),返回null",
|
||||
currentRowNum, columnIndex, data.size());
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据列索引获取列名(用于异常定位)
|
||||
*/
|
||||
private String getColumnNameByIndex(Map<String, Object> data, int columnIndex) {
|
||||
if (data == null || data.isEmpty()) {
|
||||
return "未知列";
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
for (String key : data.keySet()) {
|
||||
if (index == columnIndex) {
|
||||
return key;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
return "第" + (columnIndex + 1) + "列";
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用转换:Object转String
|
||||
*/
|
||||
private String convertToString(Object value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
return value.toString().trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用转换:Object转Integer(支持文本型数字、Number类型)
|
||||
*/
|
||||
private Integer convertToInteger(Object value) {
|
||||
if (value == null) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
try {
|
||||
// 文本型数字(如String"1741")
|
||||
if (value instanceof String) {
|
||||
String strValue = ((String) value).trim();
|
||||
return strValue.isEmpty() ? 0 : Integer.parseInt(strValue);
|
||||
}
|
||||
// Number类型(如Double、Long)
|
||||
if (value instanceof Number) {
|
||||
return ((Number) value).intValue();
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
LOGGER.warn("值转换为Integer失败,值:{},返回0", value, e);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用转换:Object转Date(支持Date类型、String类型)
|
||||
*/
|
||||
private Date convertToDate(Object value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 直接是Date类型
|
||||
if (value instanceof Date) {
|
||||
return (Date) value;
|
||||
}
|
||||
|
||||
// String类型转Date(支持多种格式)
|
||||
if (value instanceof String) {
|
||||
String strValue = ((String) value).trim();
|
||||
try {
|
||||
return DateUtils.parseDate(strValue, SUPPORTED_DATE_FORMATS);
|
||||
} catch (ParseException e) {
|
||||
LOGGER.warn("值转换为Date失败,值:{},支持格式:{}",
|
||||
strValue, String.join(",", SUPPORTED_DATE_FORMATS), e);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// ---------------------- Getter方法(供Service层获取解析结果) ----------------------
|
||||
public StockInHeader getStockInHeader() {
|
||||
return stockInHeader;
|
||||
}
|
||||
|
||||
public List<StockInProductDetail> getProductDetailList() {
|
||||
return productDetailList;
|
||||
}
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.entity.ExecutionStockInOrder;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.po.MaterialGoodsRulePO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.po.MaterialWarehouseControlPO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.po.ExecutionStockInOrderPO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.todo.ExecutionStockInOrderDO;
|
||||
//import com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库单Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
public interface ExecutionStockInOrderMapper extends BaseMapper<ExecutionStockInOrder>
|
||||
{
|
||||
/**
|
||||
* 查询入库单列表
|
||||
*/
|
||||
public List<ExecutionStockInOrderPO> queryList(ExecutionStockInOrderDO stockInOrderDO);
|
||||
|
||||
public MaterialBaseInfoPO getinfo(@Param("id") Long id);
|
||||
|
||||
public MaterialBaseInfoPO getByName(@Param("name") String name);
|
||||
|
||||
public MaterialBaseInfoPO getByCode(@Param("code") String code);
|
||||
|
||||
public List<MaterialBaseInfoPO> getMaterialBaseInfoList(@Param("id") String id);
|
||||
|
||||
public MaterialWarehouseControlPO getInfoByMaterialBaseInfoIds(@Param("id") Long id);
|
||||
|
||||
public MaterialGoodsRulePO getGoodsInfoByMaterialBaseInfoIds(@Param("id") Long id);
|
||||
|
||||
public String getUserNcCode(@Param("id") Long id);
|
||||
|
||||
|
||||
List<ExecutionStockInOrderPO> queryNoticePrint(ExecutionStockInOrderDO stockInOrderDO);
|
||||
List<ExecutionInMaterialDetailPO> queryNoticePrintDetail(ExecutionStockInOrderDO stockInOrderDO);
|
||||
public void updateByTransportationNumber(@Param("transportationNumber") String transportationNumber);
|
||||
|
||||
public void updateByOrderId(@Param("orderId") String orderId);
|
||||
|
||||
public void updateWmsOut(@Param("orderNumber") String orderNumber, @Param("quantity") BigDecimal quantity);
|
||||
|
||||
public String getIsCheckCredit(@Param("id") Long id);
|
||||
|
||||
public BigDecimal getCreditAmount(@Param("id") Long id);
|
||||
|
||||
public String getCustomerNcCode(@Param("id") Long id);
|
||||
|
||||
String getNcUrl(@Param("interfaceType") String interfaceType,@Param("organizationName") String organizationName,@Param("organizationId") Long organizationId);
|
||||
|
||||
}
|
||||
+583
@@ -0,0 +1,583 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.persistence;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
import com.mhd.common.core.enums.DictCode;
|
||||
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.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.facade.IExecutionInMaterialDetailService;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailDO;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailDO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.entity.ExecutionStockInOrder;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.facade.IExecutionStockInOrderService;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.listener.DynamicDeliveryExcelListener;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.listener.StockInExcelListener;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.mapper.ExecutionStockInOrderMapper;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.po.ExecutionStockInOrderPO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.todo.ExecutionStockInOrderDO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.vo.*;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.entity.ExecutionStockOutOrder;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.facade.IExecutionStockOutOrderService;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.mapper.ExecutionStockOutOrderMapper;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.todo.ExecutionStockOutOrderDO;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.service.ExecutionStockOutOrderApplicationService;
|
||||
import com.mhd.oms.domain.reservationDeliveryDetailsLink.entity.ReservationDeliveryDetailsLink;
|
||||
import com.mhd.oms.domain.reservationDeliveryDetailsLink.repository.facade.IReservationDeliveryDetailsLinkService;
|
||||
import com.mhd.system.api.SystemServiceFeign;
|
||||
import com.mhd.system.api.UserServiceFeign;
|
||||
import com.mhd.system.api.domain.SysDictData;
|
||||
import com.mhd.system.api.domain.WarehouseFeignPO;
|
||||
import com.mhd.system.api.domain.cache.AssociationWarehouseCacheDO;
|
||||
import com.mhd.system.api.domain.cache.SystemServiceCacheUtil;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 入库单Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Service
|
||||
public class ExecutionStockInOrderImpl extends ServiceImpl<ExecutionStockInOrderMapper, ExecutionStockInOrder> implements IExecutionStockInOrderService {
|
||||
@Autowired
|
||||
private ExecutionStockInOrderMapper stockInOrderMapper;
|
||||
@Autowired
|
||||
private ExecutionStockOutOrderMapper stockOutOrderMapper;
|
||||
@Autowired
|
||||
private IReservationDeliveryDetailsLinkService reservationDeliveryDetailsLinkService;
|
||||
@Autowired
|
||||
private ExecutionStockOutOrderApplicationService reservationStockOutOrderApplicationService;
|
||||
@Autowired
|
||||
private UserServiceFeign userServiceFeign;
|
||||
@Autowired
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
@Autowired
|
||||
private IExecutionInMaterialDetailService materialDetailService;
|
||||
|
||||
/**
|
||||
* 查询入库单列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExecutionStockInOrderPO> queryList(ExecutionStockInOrderDO stockInOrderDO)
|
||||
{
|
||||
return stockInOrderMapper.queryList(stockInOrderDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增入库单
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean insert(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
ExecutionStockInOrder stockInOrder = new ExecutionStockInOrder();
|
||||
BeanUtils.copyProperties(stockInOrderDO,stockInOrder);
|
||||
return this.save(stockInOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Boolean update(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
ExecutionStockInOrder stockInOrder = new ExecutionStockInOrder();
|
||||
BeanUtils.copyProperties(stockInOrderDO,stockInOrder);
|
||||
return this.updateById(stockInOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库单
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] inOrderIds ) {
|
||||
List<ExecutionStockInOrder> list = new ArrayList<>();
|
||||
for (Long id : inOrderIds) {
|
||||
ExecutionStockInOrder stockInOrder = new ExecutionStockInOrder();
|
||||
stockInOrder.setInOrderId(id);
|
||||
stockInOrder.setDelFlag(2);
|
||||
list.add(stockInOrder);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改入库单
|
||||
*/
|
||||
@Override
|
||||
public ExecutionStockInOrderPO getInfo(Long inOrderId) {
|
||||
ExecutionStockInOrder stockInOrder = this.getById(inOrderId);
|
||||
ExecutionStockInOrderPO stockInOrderPO = new ExecutionStockInOrderPO();
|
||||
BeanUtils.copyProperties(stockInOrder,stockInOrderPO);
|
||||
return stockInOrderPO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExecutionStockInOrderPO> queryNoticePrint(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
return stockInOrderMapper.queryNoticePrint(stockInOrderDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExecutionInMaterialDetailPO> queryNoticePrintDetail(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
return stockInOrderMapper.queryNoticePrintDetail(stockInOrderDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeliveryDataDTO parseExcelFile(MultipartFile file, String sheetName) throws Exception {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
// 校验文件和工作表名称(逻辑不变)
|
||||
if (file.isEmpty()) {
|
||||
throw new IllegalArgumentException("上传的Excel文件不能为空");
|
||||
}
|
||||
if (!"出库导入".equals(sheetName) && !"参考数据".equals(sheetName)) {
|
||||
sheetName = "出库导入";
|
||||
}
|
||||
|
||||
// 关键变更:使用动态行数监听器
|
||||
DynamicDeliveryExcelListener listener = new DynamicDeliveryExcelListener();
|
||||
try (InputStream inputStream = file.getInputStream()) {
|
||||
EasyExcel.read(inputStream, listener)
|
||||
.sheet(sheetName)
|
||||
.headRowNumber(0) // 无固定表头,全部行交由监听器处理
|
||||
.doRead();
|
||||
}
|
||||
|
||||
// 封装DTO(逻辑不变)
|
||||
DeliveryDataDTO deliveryDataDTO = new DeliveryDataDTO();
|
||||
deliveryDataDTO.setDeliveryHeader(listener.getDeliveryHeader());
|
||||
deliveryDataDTO.setProductDetailList(listener.getProductDetailList());
|
||||
deliveryDataDTO.setCustomerDeliveryDetailList(listener.getCustomerDeliveryDetailList());
|
||||
List<ProductDetail> productDetailList = deliveryDataDTO.getProductDetailList();
|
||||
List<Map<String,Object>> shipperIds = new ArrayList<>();
|
||||
Set<Long> processedShipperIds = new HashSet<>();
|
||||
for (ProductDetail productDetail : productDetailList) {
|
||||
MaterialBaseInfoPO materialBaseInfoPO = stockInOrderMapper.getByCode(productDetail.getProductCode());
|
||||
if (materialBaseInfoPO != null && materialBaseInfoPO.getShipperId() != null) {
|
||||
Long shipperId = materialBaseInfoPO.getShipperId();
|
||||
if (processedShipperIds.add(shipperId)) {
|
||||
Map<String, Object> shipper = new HashMap<>();
|
||||
shipper.put("shipperId", shipperId);
|
||||
shipper.put("shipperName", materialBaseInfoPO.getShipperName());
|
||||
shipper.put("shipperCode", materialBaseInfoPO.getShipperCode());
|
||||
shipperIds.add(shipper);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (shipperIds.isEmpty()) {
|
||||
throw new Exception("出库物料货主不存在!");
|
||||
}
|
||||
if (shipperIds.size() > 1) {
|
||||
throw new Exception("出库物料不是同一个货主!");
|
||||
}
|
||||
|
||||
ExecutionStockOutOrderDO reservationStockOutOrderDO = new ExecutionStockOutOrderDO();
|
||||
reservationStockOutOrderDO.setOutOrderNumber(OrderSequence.getOrderCode("CK"));
|
||||
reservationStockOutOrderDO.setShipperId((Long) shipperIds.get(0).get("shipperId"));
|
||||
reservationStockOutOrderDO.setShipperName((String) shipperIds.get(0).get("shipperName"));
|
||||
reservationStockOutOrderDO.setShipperCode((String) shipperIds.get(0).get("shipperCode"));
|
||||
reservationStockOutOrderDO.setNeedTransportFlag("1");
|
||||
reservationStockOutOrderDO.setNeedDeclareFlag("1");
|
||||
reservationStockOutOrderDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
reservationStockOutOrderDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
reservationStockOutOrderDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
reservationStockOutOrderDO.setIssueStatus(0);
|
||||
reservationStockOutOrderDO.setSalesmanId(loginUser.getUserPo().getUserId().toString());
|
||||
reservationStockOutOrderDO.setSalesmanName(loginUser.getUserPo().getUserName());
|
||||
reservationStockOutOrderDO.setCreateTime(new Date());
|
||||
reservationStockOutOrderDO.setDocumentDate(new Date());
|
||||
reservationStockOutOrderDO.setCreateBy(loginUser.getUserPo().getUserId());
|
||||
reservationStockOutOrderDO.setCreateByName(loginUser.getUserPo().getUserName());
|
||||
reservationStockOutOrderDO.setDelFlag(1);
|
||||
reservationStockOutOrderDO.setDocumentCreator(loginUser.getUserPo().getUserId().toString());
|
||||
reservationStockOutOrderDO.setDocumentCreatorName(loginUser.getUserPo().getUserName());
|
||||
reservationStockOutOrderDO.setOrderTypeCode("pu_tong_chu_ku");
|
||||
reservationStockOutOrderDO.setBusinessType("pu_tong_chu_ku");
|
||||
reservationStockOutOrderDO.setOrderTypeName("普通出库");
|
||||
DeliveryHeader deliveryHeader = deliveryDataDTO.getDeliveryHeader();
|
||||
reservationStockOutOrderDO.setTotalAmount(deliveryHeader.getSubtotalAmount());
|
||||
reservationStockOutOrderDO.setRoute(deliveryHeader.getDeliveryLineNo());
|
||||
reservationStockOutOrderDO.setReservationOrderSource("数据导入");
|
||||
reservationStockOutOrderDO.setOutboundDate(deliveryHeader.getDeliveryDate());
|
||||
reservationStockOutOrderDO.setTrainNo(deliveryHeader.getTrainNumber());
|
||||
int index = 1;
|
||||
List<ExecutionOutMaterialDetailDO> reservationOutMaterialDetailDOList = new ArrayList<>();
|
||||
for (ProductDetail productDetail : productDetailList) {
|
||||
ExecutionOutMaterialDetailDO reservationOutMaterialDetailDO = new ExecutionOutMaterialDetailDO();
|
||||
reservationOutMaterialDetailDO.setOutOrderNumber(reservationStockOutOrderDO.getOutOrderNumber());
|
||||
MaterialBaseInfoPO materialBaseInfoPO = stockInOrderMapper.getByCode(productDetail.getProductCode());
|
||||
reservationOutMaterialDetailDO.setQuantity(new BigDecimal(productDetail.getPieceCount()).setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
if (materialBaseInfoPO != null) {
|
||||
reservationOutMaterialDetailDO.setMaterialBaseInfoId(materialBaseInfoPO.getMaterialBaseInfoId());
|
||||
reservationOutMaterialDetailDO.setMaterialCode(materialBaseInfoPO.getMaterialCode());
|
||||
reservationOutMaterialDetailDO.setMaterialName(materialBaseInfoPO.getMaterialName());
|
||||
reservationOutMaterialDetailDO.setBarCode(materialBaseInfoPO.getBarCode());
|
||||
BigDecimal unitPrice = materialBaseInfoPO.getUnitPrice();
|
||||
if (unitPrice != null) {
|
||||
reservationOutMaterialDetailDO.setUnitPrice(unitPrice);
|
||||
BigDecimal amount = unitPrice.multiply(reservationOutMaterialDetailDO.getQuantity());
|
||||
reservationOutMaterialDetailDO.setTotalAmount(amount);
|
||||
} else {
|
||||
reservationOutMaterialDetailDO.setUnitPrice(BigDecimal.ZERO);
|
||||
reservationOutMaterialDetailDO.setTotalAmount(BigDecimal.ZERO);
|
||||
}
|
||||
}
|
||||
|
||||
reservationOutMaterialDetailDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
reservationOutMaterialDetailDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
reservationOutMaterialDetailDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
reservationOutMaterialDetailDO.setCreateBy(loginUser.getUserPo().getUserId());
|
||||
reservationOutMaterialDetailDO.setCreateByName(loginUser.getUserPo().getUserName());
|
||||
String lot = generateDateSerialNumber();
|
||||
lot = lot+"-"+index;
|
||||
index++;
|
||||
reservationOutMaterialDetailDO.setLotNo(lot);
|
||||
reservationOutMaterialDetailDOList.add(reservationOutMaterialDetailDO);
|
||||
}
|
||||
reservationStockOutOrderDO.setMaterialDetailList(reservationOutMaterialDetailDOList);
|
||||
reservationStockOutOrderApplicationService.insert(reservationStockOutOrderDO);
|
||||
|
||||
List<CustomerDeliveryDetail> customerDeliveryDetailList = deliveryDataDTO.getCustomerDeliveryDetailList();
|
||||
for (CustomerDeliveryDetail customerDeliveryDetail : customerDeliveryDetailList) {
|
||||
ReservationDeliveryDetailsLink reservationDeliveryDetailsLink = new ReservationDeliveryDetailsLink();
|
||||
reservationDeliveryDetailsLink.setInvoiceNumber(customerDeliveryDetail.getInvoiceNo());
|
||||
reservationDeliveryDetailsLink.setAmount(customerDeliveryDetail.getAmount());
|
||||
reservationDeliveryDetailsLink.setCustomerNumber(customerDeliveryDetail.getCustomerCode());
|
||||
reservationDeliveryDetailsLink.setDeliveryName(customerDeliveryDetail.getCustomerName());
|
||||
reservationDeliveryDetailsLink.setBox(customerDeliveryDetail.getBoxCount());
|
||||
reservationDeliveryDetailsLink.setBag(customerDeliveryDetail.getPackageCount());
|
||||
reservationDeliveryDetailsLink.setCategory(customerDeliveryDetail.getCategory());
|
||||
reservationDeliveryDetailsLink.setOrderNumber(reservationStockOutOrderDO.getOutOrderNumber());
|
||||
List<ExecutionStockOutOrder> reservationStockOutOrderDOList = stockOutOrderMapper.selectList(new LambdaQueryWrapper<ExecutionStockOutOrder>().eq(ExecutionStockOutOrder::getOutOrderNumber, reservationStockOutOrderDO.getOutOrderNumber()));
|
||||
if (reservationStockOutOrderDOList != null && !reservationStockOutOrderDOList.isEmpty() && reservationStockOutOrderDOList.get(0) != null) {
|
||||
reservationDeliveryDetailsLink.setOrderId(reservationStockOutOrderDOList.get(0).getOutOrderId());
|
||||
}
|
||||
reservationDeliveryDetailsLinkService.save(reservationDeliveryDetailsLink);
|
||||
}
|
||||
return deliveryDataDTO;
|
||||
}
|
||||
|
||||
public String generateDateSerialNumber() {
|
||||
// 1. 获取当前时间,格式化为:yyMMdd (2位年+2位月+2位日)
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyMMdd");
|
||||
String datePart = sdf.format(new Date());
|
||||
|
||||
// 2. 生成 000~999 的 3 位随机数(不足补零)
|
||||
Random random = new Random();
|
||||
int randomNum = random.nextInt(1000); // 0~999
|
||||
String randomPart = String.format("%03d", randomNum); // 自动补前导零
|
||||
|
||||
// 3. 拼接结果
|
||||
return datePart + randomPart;
|
||||
}
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ExecutionStockInOrderImpl.class);
|
||||
// 默认工作表名称(与Excel一致)
|
||||
private static final String DEFAULT_SHEET_NAME = "入库模版";
|
||||
|
||||
@Override
|
||||
public StockInDataDTO parseStockInExcel(MultipartFile file, String sheetName) throws Exception {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
// 1. 校验文件
|
||||
if (file.isEmpty()) {
|
||||
LOGGER.error("上传的Excel文件为空");
|
||||
throw new IllegalArgumentException("Excel文件不能为空");
|
||||
}
|
||||
|
||||
// 2. 校验工作表名称(默认使用"入库模版")
|
||||
String targetSheetName = (sheetName == null || sheetName.trim().isEmpty())
|
||||
? DEFAULT_SHEET_NAME : sheetName.trim();
|
||||
|
||||
// 3. 使用EasyExcel解析(指定监听器)
|
||||
StockInExcelListener listener = new StockInExcelListener();
|
||||
try (InputStream inputStream = file.getInputStream()) {
|
||||
EasyExcel.read(inputStream, listener)
|
||||
.sheet(targetSheetName) // 指定工作表
|
||||
.headRowNumber(0) // 从第1行开始解析(不跳过任何行)
|
||||
.doRead();
|
||||
}
|
||||
|
||||
// 4. 封装DTO返回
|
||||
StockInDataDTO resultDTO = new StockInDataDTO();
|
||||
resultDTO.setStockInHeader(listener.getStockInHeader());
|
||||
resultDTO.setProductDetailList(listener.getProductDetailList());
|
||||
|
||||
LOGGER.info("Excel解析成功,工作表:{},产品明细数:{}",
|
||||
targetSheetName, resultDTO.getProductDetailList().size());
|
||||
List<StockInProductDetail> productDetailList = resultDTO.getProductDetailList();
|
||||
List<Map<String,Object>> shipperIds = new ArrayList<>();
|
||||
Set<Long> processedShipperIds = new HashSet<>();
|
||||
for (StockInProductDetail productDetail : productDetailList) {
|
||||
MaterialBaseInfoPO materialBaseInfoPO = stockInOrderMapper.getByCode(productDetail.getProductCode());
|
||||
if (materialBaseInfoPO != null && materialBaseInfoPO.getShipperId() != null) {
|
||||
Long shipperId = materialBaseInfoPO.getShipperId();
|
||||
if (processedShipperIds.add(shipperId)) {
|
||||
Map<String, Object> shipper = new HashMap<>();
|
||||
shipper.put("shipperId", shipperId);
|
||||
shipper.put("shipperName", materialBaseInfoPO.getShipperName());
|
||||
shipper.put("shipperCode", materialBaseInfoPO.getShipperCode());
|
||||
shipperIds.add(shipper);
|
||||
}
|
||||
}
|
||||
}
|
||||
ExecutionStockInOrderDO reservationStockInOrderDO = new ExecutionStockInOrderDO();
|
||||
reservationStockInOrderDO.setInOrderNumber(OrderSequence.getOrderCode("RK"));
|
||||
reservationStockInOrderDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
reservationStockInOrderDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
reservationStockInOrderDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
reservationStockInOrderDO.setCreateBy(loginUser.getUserPo().getUserId());
|
||||
reservationStockInOrderDO.setCreateByName(loginUser.getUserPo().getUserName());
|
||||
reservationStockInOrderDO.setCreateTime(new Date());
|
||||
reservationStockInOrderDO.setDelFlag(1);
|
||||
reservationStockInOrderDO.setDocumentCreator(loginUser.getUserPo().getUserId().toString());
|
||||
reservationStockInOrderDO.setDocumentCreatorName(loginUser.getUserPo().getUserName());
|
||||
reservationStockInOrderDO.setDocumentDate(new Date());
|
||||
reservationStockInOrderDO.setOrderTypeCode("pu_tong_ru_ku");
|
||||
reservationStockInOrderDO.setOrderTypeName("普通入库");
|
||||
reservationStockInOrderDO.setIssueStatus(0);
|
||||
reservationStockInOrderDO.setSalesmanId(loginUser.getUserPo().getUserId().toString());
|
||||
reservationStockInOrderDO.setSalesmanName(loginUser.getUserPo().getUserName());
|
||||
reservationStockInOrderDO.setShipperId((Long) shipperIds.get(0).get("shipperId"));
|
||||
reservationStockInOrderDO.setShipperName((String) shipperIds.get(0).get("shipperName"));
|
||||
reservationStockInOrderDO.setShipperCode((String) shipperIds.get(0).get("shipperCode"));
|
||||
StockInHeader stockInHeader = resultDTO.getStockInHeader();
|
||||
reservationStockInOrderDO.setWarehouseDate(stockInHeader.getStockInDate());
|
||||
reservationStockInOrderDO.setStorageTime(stockInHeader.getStockInDate());
|
||||
reservationStockInOrderDO.setExpectTime(stockInHeader.getStockInDate());
|
||||
reservationStockInOrderDO.setBusinessOrderNo(stockInHeader.getOrderNo());
|
||||
reservationStockInOrderDO.setReservationOrderSource("数据导入");
|
||||
List<ExecutionInMaterialDetailDO> reservationInMaterialDetailDOList = new ArrayList<>();
|
||||
int index = 1;
|
||||
for (StockInProductDetail stockInProductDetail : productDetailList) {
|
||||
ExecutionInMaterialDetailDO reservationInMaterialDetailDO = new ExecutionInMaterialDetailDO();
|
||||
reservationInMaterialDetailDO.setInOrderNumber(reservationStockInOrderDO.getInOrderNumber());
|
||||
reservationInMaterialDetailDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
reservationInMaterialDetailDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
reservationInMaterialDetailDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
reservationInMaterialDetailDO.setCreateBy(loginUser.getUserPo().getUserId());
|
||||
reservationInMaterialDetailDO.setCreateByName(loginUser.getUserPo().getUserName());
|
||||
reservationInMaterialDetailDO.setCreateTime(new Date());
|
||||
MaterialBaseInfoPO materialBaseInfoPO = stockInOrderMapper.getByCode(stockInProductDetail.getProductCode());
|
||||
reservationInMaterialDetailDO.setQuantity(new BigDecimal(stockInProductDetail.getPieceCount()).setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
if (materialBaseInfoPO != null) {
|
||||
reservationInMaterialDetailDO.setMaterialBaseInfoId(materialBaseInfoPO.getMaterialBaseInfoId());
|
||||
reservationInMaterialDetailDO.setMaterialName(materialBaseInfoPO.getMaterialName());
|
||||
reservationInMaterialDetailDO.setMaterialCode(materialBaseInfoPO.getMaterialCode());
|
||||
// reservationInMaterialDetailDO.setQuantity(new BigDecimal(stockInProductDetail.getPieceCount()).setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
BigDecimal unitPrice = materialBaseInfoPO.getUnitPrice();
|
||||
if (unitPrice != null) {
|
||||
reservationInMaterialDetailDO.setUnitPrice(unitPrice);
|
||||
BigDecimal amount = unitPrice.multiply(reservationInMaterialDetailDO.getQuantity());
|
||||
reservationInMaterialDetailDO.setTotalPrice(amount);
|
||||
} else {
|
||||
reservationInMaterialDetailDO.setUnitPrice(BigDecimal.ZERO);
|
||||
reservationInMaterialDetailDO.setTotalPrice(BigDecimal.ZERO);
|
||||
}
|
||||
}
|
||||
|
||||
String lot = generateDateSerialNumber();
|
||||
lot = lot+"-"+index;
|
||||
index++;
|
||||
reservationInMaterialDetailDO.setLotNo(lot);
|
||||
reservationInMaterialDetailDO.setDrinkDate(stockInProductDetail.getDrinkDate());
|
||||
reservationInMaterialDetailDOList.add(reservationInMaterialDetailDO);
|
||||
}
|
||||
reservationStockInOrderDO.setMaterialDetailList(reservationInMaterialDetailDOList);
|
||||
insertApplication(reservationStockInOrderDO);
|
||||
return resultDTO;
|
||||
}
|
||||
|
||||
public Boolean insertApplication(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
// 如果仓库ID为空,从当前登录用户的关联仓库中获取
|
||||
if (stockInOrderDO.getWarehouseId() == null) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser == null) {
|
||||
throw new ServiceException("登录已失效,请重新登录");
|
||||
}
|
||||
AssociationWarehouseCacheDO associationWarehouseCacheDO = SystemServiceCacheUtil.getAssociationWarehouseCache(loginUser.getUserid());
|
||||
if (associationWarehouseCacheDO == null || associationWarehouseCacheDO.getWarehouseId() == null) {
|
||||
throw new ServiceException("当前用户未配置关联仓库,请先配置仓库");
|
||||
}
|
||||
stockInOrderDO.setWarehouseId(associationWarehouseCacheDO.getWarehouseId());
|
||||
}
|
||||
//设置仓库
|
||||
setWarehouseInfo(stockInOrderDO);
|
||||
// 设置货主信息
|
||||
shipperParam(stockInOrderDO);
|
||||
// 设置供应商信息
|
||||
supplierParam(stockInOrderDO);
|
||||
// 设置数据字典键值
|
||||
setDataDict(stockInOrderDO);
|
||||
return insertDomain(stockInOrderDO);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertDomain(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
if (stockInOrderDO.getInOrderNumber() == null) {
|
||||
stockInOrderDO.setInOrderNumber(OrderSequence.getOrderCode("RK"));
|
||||
}
|
||||
// //统计总计划数
|
||||
BigDecimal quantity = stockInOrderDO.getMaterialDetailList().stream().map(ExecutionInMaterialDetailDO::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockInOrderDO.setQuantity(quantity);
|
||||
BigDecimal amount = stockInOrderDO.getMaterialDetailList().stream().map(ExecutionInMaterialDetailDO::getTotalPrice).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockInOrderDO.setAmount(amount);
|
||||
this.insert(stockInOrderDO);
|
||||
return materialDetailService.batchInsert(stockInOrderDO.getInOrderNumber(), stockInOrderDO.getMaterialDetailList());
|
||||
}
|
||||
|
||||
private void setWarehouseInfo(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
if (stockInOrderDO.getWarehouseId() == null) {
|
||||
throw new ServiceException("仓库ID不能为空");
|
||||
}
|
||||
AjaxResult ajaxResult = systemServiceFeign.getWarehouseInfoByWarehouseId(stockInOrderDO.getWarehouseId());
|
||||
if (ajaxResult == null) {
|
||||
throw new ServiceException("获取仓库信息失败:返回结果为空,仓库ID:" + stockInOrderDO.getWarehouseId());
|
||||
}
|
||||
Object codeObj = ajaxResult.get("code");
|
||||
if (codeObj == null || !"200".equals(String.valueOf(codeObj))) {
|
||||
String errorMsg = ajaxResult.get("msg") != null ? String.valueOf(ajaxResult.get("msg")) : "未知错误";
|
||||
throw new ServiceException("获取仓库信息失败,仓库ID:" + stockInOrderDO.getWarehouseId() + ",错误信息:" + errorMsg);
|
||||
}
|
||||
Object dataObj = ajaxResult.get("data");
|
||||
if (dataObj == null) {
|
||||
throw new ServiceException("获取仓库信息失败:返回数据为空,仓库ID:" + stockInOrderDO.getWarehouseId());
|
||||
}
|
||||
WarehouseFeignPO warehouseFeignPO = JSON.parseObject(JSONObject.toJSONString(dataObj), WarehouseFeignPO.class);
|
||||
if (warehouseFeignPO == null) {
|
||||
throw new ServiceException("获取仓库信息失败:数据解析失败,仓库ID:" + stockInOrderDO.getWarehouseId());
|
||||
}
|
||||
stockInOrderDO.setWarehouseCode(warehouseFeignPO.getWarehouseCode());
|
||||
stockInOrderDO.setWarehouseName(warehouseFeignPO.getWarehouseName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 封装货主信息(改为与出库单相同的简洁逻辑,使用入库单的字段shipperName)
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/9 20:43
|
||||
* @param stockInOrderDO
|
||||
*/
|
||||
private void shipperParam(ExecutionStockInOrderDO stockInOrderDO){
|
||||
// 新增/编辑时前端可能只传 shipperId(下拉选中值),shipperName 为空。
|
||||
// 这里优先按 shipperId 回填货主编码/名称;其次再按 shipperName(名称或数字ID字符串)回填。
|
||||
|
||||
// 1) 优先按 shipperId 查询
|
||||
if (ObjectUtil.isNotNull(stockInOrderDO.getShipperId())) {
|
||||
AjaxResult ajaxResult = userServiceFeign.getInfo(stockInOrderDO.getShipperId());
|
||||
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
throw new ServiceException("获取货主信息失败");
|
||||
}
|
||||
UserPo userPo = JSON.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), UserPo.class);
|
||||
stockInOrderDO.setShipperId(userPo.getUserId());
|
||||
stockInOrderDO.setShipperCode(userPo.getUserMemberCode());
|
||||
stockInOrderDO.setShipperName(userPo.getUserName());
|
||||
return;
|
||||
}
|
||||
|
||||
// 2) shipperId 为空时,按 shipperName 兜底
|
||||
String shipperName = stockInOrderDO.getShipperName();
|
||||
if (StringUtils.isEmpty(shipperName)) {
|
||||
return;
|
||||
}
|
||||
if (!shipperName.matches("\\d+")) {
|
||||
// 按名称查询
|
||||
AjaxResult ajaxResult = userServiceFeign.getInfoByName(shipperName);
|
||||
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
throw new ServiceException("获取货主信息失败");
|
||||
}
|
||||
UserPo userPo = JSON.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), UserPo.class);
|
||||
stockInOrderDO.setShipperId(userPo.getUserId());
|
||||
stockInOrderDO.setShipperCode(userPo.getUserMemberCode());
|
||||
stockInOrderDO.setShipperName(userPo.getUserName());
|
||||
} else {
|
||||
// shipperName 是数字:按ID查询
|
||||
AjaxResult ajaxResult = userServiceFeign.getInfo(Long.valueOf(shipperName));
|
||||
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
throw new ServiceException("获取货主信息失败");
|
||||
}
|
||||
UserPo userPo = JSON.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), UserPo.class);
|
||||
stockInOrderDO.setShipperId(userPo.getUserId());
|
||||
stockInOrderDO.setShipperCode(userPo.getUserMemberCode());
|
||||
stockInOrderDO.setShipperName(userPo.getUserName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 封装供应商信息
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/9 20:43
|
||||
* @param stockInOrderDO
|
||||
*/
|
||||
private void supplierParam(ExecutionStockInOrderDO stockInOrderDO){
|
||||
if (ObjectUtil.isNotNull(stockInOrderDO.getSupplierId())){
|
||||
AjaxResult ajaxResult = userServiceFeign.getInfo(stockInOrderDO.getSupplierId());
|
||||
if(!"200".equals(String.valueOf(ajaxResult.get("code")))){
|
||||
throw new ServiceException("获取供应商信息失败");
|
||||
}
|
||||
UserPo userPo = JSON.parseObject(JSONObject.toJSONString(ajaxResult.get("data")), UserPo.class);
|
||||
stockInOrderDO.setSupplierName(userPo.getUserName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置数据字典键值
|
||||
* @author ZhouGY
|
||||
* @date 2024/4/7 14:33
|
||||
* @param stockInOrderDO
|
||||
*/
|
||||
private void setDataDict(ExecutionStockInOrderDO stockInOrderDO){
|
||||
//翻译单据类型
|
||||
if (StringUtils.isNotBlank(stockInOrderDO.getOrderTypeCode())){
|
||||
AjaxResult documentTypeResult = systemServiceFeign.selectListByDictType(DictCode.DOCUMENT_TYPE.getCode());
|
||||
if (!"200".equals(String.valueOf(documentTypeResult.get("code")))) {
|
||||
throw new ServiceException("单据类型数据字典不存在");
|
||||
}
|
||||
List<SysDictData> documentTypeDataList = JSON.parseArray(JSONUtil.toJsonStr(documentTypeResult.get("data")), SysDictData.class);
|
||||
|
||||
SysDictData documentTypeData = documentTypeDataList.stream().filter(info -> ObjectUtil.equal(info.getDictValue(), stockInOrderDO.getOrderTypeCode())).findAny().orElse(null);
|
||||
if (null == documentTypeData) {
|
||||
throw new ServiceException("单据类型【" + stockInOrderDO.getOrderTypeCode() + "】数据字典不存在 请联系管理员");
|
||||
}
|
||||
stockInOrderDO.setOrderTypeName(documentTypeData.getDictLabel());
|
||||
}
|
||||
|
||||
//翻译优先级别类型
|
||||
if (StringUtils.isNotBlank(stockInOrderDO.getPriorityLevelCode())){
|
||||
AjaxResult priorityLevelResult = systemServiceFeign.selectListByDictType(DictCode.PRIORITY_LEVEL.getCode());
|
||||
if (!"200".equals(String.valueOf(priorityLevelResult.get("code")))) {
|
||||
throw new ServiceException("优先级别类型数据字典不存在");
|
||||
}
|
||||
List<SysDictData> priorityLevelDataList = JSON.parseArray(JSONUtil.toJsonStr(priorityLevelResult.get("data")), SysDictData.class);
|
||||
|
||||
SysDictData priorityLevelData = priorityLevelDataList.stream().filter(info -> ObjectUtil.equal(info.getDictValue(), stockInOrderDO.getPriorityLevelCode())).findAny().orElse(null);
|
||||
if (null == priorityLevelData) {
|
||||
throw new ServiceException("优先级别类型【" + stockInOrderDO.getPriorityLevelCode() + "】数据字典不存在 请联系管理员");
|
||||
}
|
||||
stockInOrderDO.setPriorityLevelName(priorityLevelData.getDictLabel());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.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 ExecutionStockInOrderBasePO 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;
|
||||
|
||||
}
|
||||
+481
@@ -0,0 +1,481 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.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.businessDocumentOrder.entity.BusinessDocumentOrder;
|
||||
//import com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
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 ExecutionStockInOrderPO 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 inQuantity;
|
||||
|
||||
/**
|
||||
* 计划入库数量:取入库单明细中的入库数量汇总
|
||||
*/
|
||||
@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<ExecutionInMaterialDetailPO> 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;
|
||||
|
||||
@ApiModelProperty( "下发状态 0-无状态 1-未下发 2-已下发 ")
|
||||
private Integer issueStatus;
|
||||
|
||||
@ApiModelProperty("下发时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date issueTime;
|
||||
|
||||
@ApiModelProperty("下发人id")
|
||||
private Long issueId;
|
||||
|
||||
@ApiModelProperty("下发人")
|
||||
private String issueName;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private Long reservationAuditId;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private String reservationAuditName;
|
||||
|
||||
@ApiModelProperty("预约审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date reservationAuditTime;
|
||||
|
||||
@ApiModelProperty("业务单对象")
|
||||
private List<BusinessDocumentOrder> businessDocumentOrderDOList;
|
||||
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
|
||||
@ApiModelProperty("tms订单号")
|
||||
private String tmsOrderNumber;
|
||||
|
||||
@ApiModelProperty("订单来源")
|
||||
private String reservationOrderSource;
|
||||
@ApiModelProperty("仓库负责人")
|
||||
private String directorName;
|
||||
|
||||
@ApiModelProperty("仓库负责人电话")
|
||||
private String directorPhone;
|
||||
|
||||
@ApiModelProperty("仓库负责人id")
|
||||
private Long directorId;
|
||||
@ApiModelProperty("入库时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date storageTime;
|
||||
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal amount;
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
@ApiModelProperty("附件url")
|
||||
@Excel(name = "附件url")
|
||||
private String pictureUrl;
|
||||
|
||||
@ApiModelProperty("NC客户编码")
|
||||
private String customerNcCode;
|
||||
@ApiModelProperty("运输业务单号")
|
||||
private String businessNumber;
|
||||
|
||||
@ApiModelProperty("是否免费夫力费费")
|
||||
private String isFreeManpowerFee;
|
||||
|
||||
@ApiModelProperty("折扣")
|
||||
private BigDecimal discount;
|
||||
|
||||
@ApiModelProperty("火险保费")
|
||||
private BigDecimal fireInsureFee;
|
||||
|
||||
@ApiModelProperty("夫力费")
|
||||
private BigDecimal manpowerFee;
|
||||
|
||||
@ApiModelProperty("总仓租")
|
||||
private BigDecimal totalWarehouseRent;
|
||||
|
||||
@ApiModelProperty("业务计价类型")
|
||||
private String businessChargeType;
|
||||
|
||||
@ApiModelProperty("业务计价方式")
|
||||
private String businessPriceWay;
|
||||
private String khdm;
|
||||
}
|
||||
+250
@@ -0,0 +1,250 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.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 grossWeight;
|
||||
|
||||
@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("货物类型:0-物料 1-半成品 2-成品")
|
||||
@Excel(name = "货物类型:0-物料 1-半成品 2-成品")
|
||||
private Integer goodsType;
|
||||
|
||||
@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.executionStockInOrder.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.executionStockInOrder.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;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.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 ExecutionStockInOrderBaseDO 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.executionStockInOrder.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 ExecutionStockInOrderBaseDTO 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;
|
||||
}
|
||||
+512
@@ -0,0 +1,512 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.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.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailDO;
|
||||
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 ExecutionStockInOrderDO 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 inQuantity;
|
||||
|
||||
@ApiModelProperty("净重 单位:千克")
|
||||
@Excel(name = "净重 单位:千克")
|
||||
private BigDecimal weightLimit;
|
||||
|
||||
@ApiModelProperty("体积 单位:立方米")
|
||||
@Excel(name = "体积 单位:立方米")
|
||||
private BigDecimal volumeLimit;
|
||||
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal amount;
|
||||
|
||||
@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-无单收货4-数据导入")
|
||||
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<ExecutionInMaterialDetailDO> 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(name = "入库时间查询条件开始日期")
|
||||
private String storageTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "入库时间查询条件结束日期")
|
||||
private String storageTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "入库时间查询条件开始日期")
|
||||
private String expectTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "入库时间查询条件结束日期")
|
||||
private String expectTimeEnd;
|
||||
|
||||
@ApiModelProperty("入库明细-物料名称(商品名称),模糊匹配")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("入库明细-物料编码,模糊匹配")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty( "下发状态 0-无状态 1-未下发 2-已下发 ")
|
||||
private Integer issueStatus;
|
||||
|
||||
@ApiModelProperty("下发时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date issueTime;
|
||||
|
||||
@ApiModelProperty("下发人id")
|
||||
private Long issueId;
|
||||
|
||||
@ApiModelProperty("下发人")
|
||||
private String issueName;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private Long reservationAuditId;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private String reservationAuditName;
|
||||
|
||||
@ApiModelProperty("预约审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date reservationAuditTime;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
@ApiModelProperty("订单来源")
|
||||
private String reservationOrderSource;
|
||||
@ApiModelProperty("tms订单号")
|
||||
private String tmsOrderNumber;
|
||||
@ApiModelProperty("仓库负责人")
|
||||
private String directorName;
|
||||
|
||||
@ApiModelProperty("仓库负责人电话")
|
||||
private String directorPhone;
|
||||
|
||||
@ApiModelProperty("仓库负责人id")
|
||||
private Long directorId;
|
||||
@ApiModelProperty("入库时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date storageTime;
|
||||
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
@ApiModelProperty("附件url")
|
||||
@Excel(name = "附件url")
|
||||
private String pictureUrl;
|
||||
|
||||
@ApiModelProperty("NC客户编码")
|
||||
private String customerNcCode;
|
||||
|
||||
@ApiModelProperty(value = "推送时间起")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date pushTimeFrom;
|
||||
|
||||
@ApiModelProperty(value = "推送时间止")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date pushTimeTo;
|
||||
@ApiModelProperty(value = "推送时间起")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeFrom;
|
||||
|
||||
@ApiModelProperty(value = "推送时间止")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeTo;
|
||||
|
||||
private String xfStatus;
|
||||
@ApiModelProperty("运输业务单号")
|
||||
private String businessNumber;
|
||||
@ApiModelProperty("是否免费夫力费费")
|
||||
private String isFreeManpowerFee;
|
||||
|
||||
@ApiModelProperty("折扣")
|
||||
private BigDecimal discount;
|
||||
|
||||
@ApiModelProperty("火险保费")
|
||||
private BigDecimal fireInsureFee;
|
||||
|
||||
@ApiModelProperty("夫力费")
|
||||
private BigDecimal manpowerFee;
|
||||
|
||||
@ApiModelProperty("总仓租")
|
||||
private BigDecimal totalWarehouseRent;
|
||||
|
||||
@ApiModelProperty("业务计价类型")
|
||||
private String businessChargeType;
|
||||
|
||||
@ApiModelProperty("业务计价方式")
|
||||
private String businessPriceWay;
|
||||
}
|
||||
+509
@@ -0,0 +1,509 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.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 com.mhd.oms.domain.reservationStockInOrder.repository.todo.ExecutionStockInOrderBaseDTO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailDTO;
|
||||
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 ExecutionStockInOrderDTO extends ExecutionStockInOrderBaseDTO {
|
||||
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 BigDecimal amount;
|
||||
@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 inQuantity;
|
||||
|
||||
@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<ExecutionInMaterialDetailDTO> 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;
|
||||
|
||||
@ApiModelProperty( "下发状态 0-无状态 1-未下发 2-已下发 ")
|
||||
private Integer issueStatus;
|
||||
|
||||
@ApiModelProperty("下发时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date issueTime;
|
||||
|
||||
@ApiModelProperty("下发人id")
|
||||
private Long issueId;
|
||||
|
||||
@ApiModelProperty("下发人")
|
||||
private String issueName;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private Long reservationAuditId;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private String reservationAuditName;
|
||||
|
||||
@ApiModelProperty("预约审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date reservationAuditTime;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
|
||||
@ApiModelProperty("订单来源")
|
||||
private String reservationOrderSource;
|
||||
@ApiModelProperty("tms订单号")
|
||||
private String tmsOrderNumber;
|
||||
@ApiModelProperty("仓库负责人")
|
||||
private String directorName;
|
||||
|
||||
@ApiModelProperty("仓库负责人电话")
|
||||
private String directorPhone;
|
||||
|
||||
@ApiModelProperty("仓库负责人id")
|
||||
private Long directorId;
|
||||
@ApiModelProperty("入库时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date storageTime;
|
||||
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
@ApiModelProperty("附件url")
|
||||
@Excel(name = "附件url")
|
||||
private String pictureUrl;
|
||||
|
||||
@ApiModelProperty("NC客户编码")
|
||||
private String customerNcCode;
|
||||
|
||||
@ApiModelProperty(value = "推送时间起")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date pushTimeFrom;
|
||||
|
||||
@ApiModelProperty(value = "推送时间止")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date pushTimeTo;
|
||||
@ApiModelProperty(value = "推送时间起")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeFrom;
|
||||
|
||||
@ApiModelProperty(value = "推送时间止")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeTo;
|
||||
private String xfStatus;
|
||||
@ApiModelProperty(name = "入库时间查询条件开始日期")
|
||||
private String storageTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "入库时间查询条件结束日期")
|
||||
private String storageTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "入库时间查询条件开始日期")
|
||||
private String expectTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "入库时间查询条件结束日期")
|
||||
private String expectTimeEnd;
|
||||
@ApiModelProperty("运输业务单号")
|
||||
private String businessNumber;
|
||||
@ApiModelProperty("是否免费夫力费费")
|
||||
private String isFreeManpowerFee;
|
||||
|
||||
@ApiModelProperty("折扣")
|
||||
private BigDecimal discount;
|
||||
|
||||
@ApiModelProperty("火险保费")
|
||||
private BigDecimal fireInsureFee;
|
||||
|
||||
@ApiModelProperty("夫力费")
|
||||
private BigDecimal manpowerFee;
|
||||
|
||||
@ApiModelProperty("总仓租")
|
||||
private BigDecimal totalWarehouseRent;
|
||||
|
||||
@ApiModelProperty("业务计价类型")
|
||||
private String businessChargeType;
|
||||
|
||||
@ApiModelProperty("业务计价方式")
|
||||
private String businessPriceWay;
|
||||
}
|
||||
+211
@@ -0,0 +1,211 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 入库单导入行DTO(一个Excel行=一个明细行;表头字段可重复)
|
||||
*
|
||||
* 约定:以【委托编号NO】作为同一张入库单的分组键(同一个委托编号可导入多条物料明细)
|
||||
*/
|
||||
@Data
|
||||
public class ExecutionStockInOrderImportRowDTO {
|
||||
|
||||
// ====== 分组/表头基础字段(建议在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;
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.vo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 客户配送明细实体类
|
||||
*/
|
||||
@Data
|
||||
public class CustomerDeliveryDetail {
|
||||
// 类别
|
||||
private String category;
|
||||
// 发票编号
|
||||
private String invoiceNo;
|
||||
// 客户编号
|
||||
private String customerCode;
|
||||
// 客户名称
|
||||
private String customerName;
|
||||
// 箱数
|
||||
private Integer boxCount;
|
||||
// 包数
|
||||
private Integer packageCount;
|
||||
// 金额
|
||||
private BigDecimal amount;
|
||||
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.vo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出库数据DTO(包含表头、货品明细、客户配送明细)
|
||||
*/
|
||||
@Data
|
||||
public class DeliveryDataDTO {
|
||||
// 表头信息
|
||||
private DeliveryHeader deliveryHeader;
|
||||
// 货品明细列表
|
||||
private List<ProductDetail> productDetailList;
|
||||
// 客户配送明细列表
|
||||
private List<CustomerDeliveryDetail> customerDeliveryDetailList;
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.vo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 出库表头信息(包含送货日期、纪录合共、发票张数等)
|
||||
*/
|
||||
@Data
|
||||
public class DeliveryHeader {
|
||||
// 送货日期
|
||||
private Date deliveryDate;
|
||||
// 送货线号
|
||||
private String deliveryLineNo;
|
||||
// 车次
|
||||
private Integer trainNumber;
|
||||
// 纪录合共-货品总数量
|
||||
private Integer totalRecordCount;
|
||||
// 纪录合共-总箱数
|
||||
private Integer totalBoxCount;
|
||||
// 纪录合共-总支数
|
||||
private Integer totalPieceCount;
|
||||
// 发票张数
|
||||
private Integer invoiceCount;
|
||||
// 小计-总箱数
|
||||
private Integer subtotalBoxCount;
|
||||
// 小计-总支数
|
||||
private Integer subtotalPieceCount;
|
||||
// 小计-总金额
|
||||
private BigDecimal subtotalAmount;
|
||||
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class GwInDetail {
|
||||
//订单号
|
||||
private String billNo;
|
||||
//订单行号
|
||||
private String lineNum;
|
||||
//物料号
|
||||
private String itemNo;
|
||||
//物料名称
|
||||
private String itemName;
|
||||
//物料规格
|
||||
private String spec;
|
||||
//计量单位
|
||||
private String unit;
|
||||
//数量
|
||||
private BigDecimal qty;
|
||||
//企业币制
|
||||
private String erpCurr;
|
||||
//企业单价
|
||||
private BigDecimal erpPrice;
|
||||
//申报总价
|
||||
private BigDecimal amount;
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class GwStockInOrder {
|
||||
//订单号
|
||||
private String billNo;
|
||||
//进出标记
|
||||
private String ieFlag;
|
||||
//下单日期
|
||||
private Date billDate;
|
||||
//客户代码
|
||||
private String corpCode;
|
||||
|
||||
private List<GwInDetail> orderList;
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 货品明细实体类
|
||||
*/
|
||||
@Data
|
||||
public class ProductDetail {
|
||||
// 货品编号
|
||||
private String productCode;
|
||||
// 货品简称
|
||||
private String productName;
|
||||
// 箱数
|
||||
private Integer boxCount;
|
||||
// 支数
|
||||
private Integer pieceCount;
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库单数据DTO(封装表头信息和产品明细列表,用于Controller层传输)
|
||||
*/
|
||||
@Data
|
||||
public class StockInDataDTO {
|
||||
// 入库表头信息
|
||||
private StockInHeader stockInHeader;
|
||||
// 入库产品明细列表
|
||||
private List<StockInProductDetail> productDetailList;
|
||||
|
||||
// Getter和Setter方法
|
||||
public StockInHeader getStockInHeader() {
|
||||
return stockInHeader;
|
||||
}
|
||||
|
||||
public void setStockInHeader(StockInHeader stockInHeader) {
|
||||
this.stockInHeader = stockInHeader;
|
||||
}
|
||||
|
||||
public List<StockInProductDetail> getProductDetailList() {
|
||||
return productDetailList;
|
||||
}
|
||||
|
||||
public void setProductDetailList(List<StockInProductDetail> productDetailList) {
|
||||
this.productDetailList = productDetailList;
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 入库单表头实体类(对应Excel第一行数据)
|
||||
* 存储:入库日期、OrderNO
|
||||
*/
|
||||
@Data
|
||||
public class StockInHeader {
|
||||
// 入库日期(Excel第一行第2列)
|
||||
private Date stockInDate;
|
||||
// 订单编号(Excel第一行第4列)
|
||||
private String orderNo;
|
||||
|
||||
// Getter和Setter方法
|
||||
public Date getStockInDate() {
|
||||
return stockInDate;
|
||||
}
|
||||
|
||||
public void setStockInDate(Date stockInDate) {
|
||||
this.stockInDate = stockInDate;
|
||||
}
|
||||
|
||||
public String getOrderNo() {
|
||||
return orderNo;
|
||||
}
|
||||
|
||||
public void setOrderNo(String orderNo) {
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.repository.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 入库产品明细实体类(对应Excel第二行开始的表格数据)
|
||||
*/
|
||||
@Data
|
||||
public class StockInProductDetail {
|
||||
// 产品编号(Excel第1列)
|
||||
private String productCode;
|
||||
// 产品名称(Excel第2列)
|
||||
private String productName;
|
||||
// 箱含量(Excel第5列)
|
||||
private Integer boxCapacity;
|
||||
// 件数(Excel第6列)
|
||||
private Integer pieceCount;
|
||||
// 箱数(Excel第7列:Qty(cases))
|
||||
private Integer boxCount;
|
||||
// 饮用日期(Excel第8列)
|
||||
private Date drinkDate;
|
||||
|
||||
// Getter和Setter方法
|
||||
public String getProductCode() {
|
||||
return productCode;
|
||||
}
|
||||
|
||||
public void setProductCode(String productCode) {
|
||||
this.productCode = productCode;
|
||||
}
|
||||
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public Integer getBoxCapacity() {
|
||||
return boxCapacity;
|
||||
}
|
||||
|
||||
public void setBoxCapacity(Integer boxCapacity) {
|
||||
this.boxCapacity = boxCapacity;
|
||||
}
|
||||
|
||||
public Integer getPieceCount() {
|
||||
return pieceCount;
|
||||
}
|
||||
|
||||
public void setPieceCount(Integer pieceCount) {
|
||||
this.pieceCount = pieceCount;
|
||||
}
|
||||
|
||||
public Integer getBoxCount() {
|
||||
return boxCount;
|
||||
}
|
||||
|
||||
public void setBoxCount(Integer boxCount) {
|
||||
this.boxCount = boxCount;
|
||||
}
|
||||
|
||||
public Date getDrinkDate() {
|
||||
return drinkDate;
|
||||
}
|
||||
|
||||
public void setDrinkDate(Date drinkDate) {
|
||||
this.drinkDate = drinkDate;
|
||||
}
|
||||
}
|
||||
+2281
File diff suppressed because it is too large
Load Diff
+134
@@ -0,0 +1,134 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.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.executionStockInOrder.repository.todo.ExecutionStockInOrderDO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.todo.ExecutionStockInOrderDTO;
|
||||
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 ExecutionStockInOrderAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ExecutionStockInOrderDO toDO(ExecutionStockInOrderDTO stockInOrderDTO) {
|
||||
ExecutionStockInOrderDO stockInOrderDO = new ExecutionStockInOrderDO();
|
||||
// 拷贝
|
||||
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 ExecutionStockInOrderDO toDOByEdit(ExecutionStockInOrderDTO 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());
|
||||
}
|
||||
|
||||
ExecutionStockInOrderDO stockInOrderDO = JSONUtil.toBean(JSONUtil.toJsonStr(stockInOrderDTO), ExecutionStockInOrderDO.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;
|
||||
}
|
||||
|
||||
}
|
||||
+945
@@ -0,0 +1,945 @@
|
||||
package com.mhd.oms.domain.executionStockInOrder.service;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.businessDocumentOrder.entity.BusinessDocumentOrder;
|
||||
import com.mhd.oms.domain.businessDocumentOrder.repository.mapper.BusinessDocumentOrderMapper;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.entity.ExecutionInMaterialDetail;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.facade.IExecutionInMaterialDetailService;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.po.ExecutionInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailBaseDO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.ExecutionInMaterialDetailDO;
|
||||
import com.mhd.oms.domain.executionInMaterialDetail.repository.todo.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.entity.ExecutionStockInOrder;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.facade.IExecutionStockInOrderService;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.mapper.ExecutionStockInOrderMapper;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.po.MaterialGoodsRulePO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.po.MaterialWarehouseControlPO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.po.ExecutionStockInOrderPO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.todo.ExecutionStockInOrderDO;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.entity.ExecutionStockOutOrder;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.facade.IExecutionStockOutOrderService;
|
||||
import com.mhd.system.api.SystemServiceFeign;
|
||||
import com.mhd.system.api.WmsServiceFeign;
|
||||
import com.mhd.system.api.domain.*;
|
||||
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.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 入库单
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-21
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ExecutionStockInOrderDomainService {
|
||||
|
||||
@Autowired
|
||||
private IExecutionStockInOrderService stockInOrderService;
|
||||
@Autowired
|
||||
private IExecutionInMaterialDetailService materialDetailService;
|
||||
@Autowired
|
||||
private IExecutionStockOutOrderService stockOutOrderService;
|
||||
// @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 WmsServiceFeign wmsServiceFeign;
|
||||
@Autowired
|
||||
private ExecutionStockInOrderMapper reservationStockInOrderMapper;
|
||||
|
||||
@Autowired
|
||||
private BusinessDocumentOrderMapper businessDocumentOrderMapper;
|
||||
// @Autowired
|
||||
// private IReceiptMaterialDetailService receiptMaterialDetailService;
|
||||
// @Autowired
|
||||
// private IShelfMaterialDetailService shelfMaterialDetailService;
|
||||
|
||||
/**
|
||||
* 分页查询入库单列表
|
||||
*/
|
||||
public List<ExecutionStockInOrderPO> queryList(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
return stockInOrderService.queryList(stockInOrderDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增入库单
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insert(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
if (stockInOrderDO.getInOrderNumber() == null) {
|
||||
stockInOrderDO.setInOrderNumber(OrderSequence.getOrderCode("RK"));
|
||||
}
|
||||
// //设置默认值
|
||||
// setDefaultValues(stockInOrderDO);
|
||||
// //设置物料信息
|
||||
// setMaterialDetailInfo(stockInOrderDO);
|
||||
// //统计总物料种数
|
||||
// stockInOrderDO.setMaterialQuantity(stockInOrderDO.getMaterialDetailList().size());
|
||||
// //统计总计划数
|
||||
BigDecimal quantity = stockInOrderDO.getMaterialDetailList().stream().map(ExecutionInMaterialDetailDO::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockInOrderDO.setQuantity(quantity);
|
||||
|
||||
BigDecimal amount = stockInOrderDO.getMaterialDetailList().stream().map(ExecutionInMaterialDetailDO::getTotalPrice).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockInOrderDO.setAmount(amount);
|
||||
// //统计总重量
|
||||
// BigDecimal weightLimit = stockInOrderDO.getMaterialDetailList().stream().map(ExecutionInMaterialDetailDO::getWeightLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// stockInOrderDO.setWeightLimit(weightLimit);
|
||||
// //统计总体积
|
||||
// BigDecimal volumeLimit = stockInOrderDO.getMaterialDetailList().stream().map(ExecutionInMaterialDetailDO::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<ExecutionStockInOrderDO> stockInOrderDOList) {
|
||||
for (ExecutionStockInOrderDO 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(ExecutionInMaterialDetailDO::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// stockInOrderDO.setQuantity(quantity);
|
||||
// //统计总重量
|
||||
// BigDecimal weightLimit = stockInOrderDO.getMaterialDetailList().stream().map(ExecutionInMaterialDetailDO::getWeightLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// stockInOrderDO.setWeightLimit(weightLimit);
|
||||
// //统计总体积
|
||||
// BigDecimal volumeLimit = stockInOrderDO.getMaterialDetailList().stream().map(ExecutionInMaterialDetailDO::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(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
ExecutionStockInOrderPO stockInOrderPO = stockInOrderService.getInfo(stockInOrderDO.getInOrderId());
|
||||
if (stockInOrderPO == null){
|
||||
throw new ServiceException("入库单信息不存在");
|
||||
}
|
||||
//设置物料信息
|
||||
setMaterialDetailInfo(stockInOrderDO);
|
||||
//统计总物料种数
|
||||
stockInOrderDO.setMaterialQuantity(stockInOrderDO.getMaterialDetailList().size());
|
||||
//统计总计划数
|
||||
BigDecimal quantity = stockInOrderDO.getMaterialDetailList().stream().map(ExecutionInMaterialDetailDO::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockInOrderPO.setQuantity(quantity);
|
||||
stockInOrderDO.setQuantity(quantity);
|
||||
BigDecimal amount = stockInOrderDO.getMaterialDetailList().stream().map(ExecutionInMaterialDetailDO::getTotalPrice).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockInOrderDO.setAmount(amount);
|
||||
//统计总重量
|
||||
BigDecimal weightLimit = stockInOrderDO.getMaterialDetailList().stream().map(ExecutionInMaterialDetailDO::getWeightLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockInOrderDO.setWeightLimit(weightLimit);
|
||||
//统计总体积
|
||||
BigDecimal volumeLimit = stockInOrderDO.getMaterialDetailList().stream().map(ExecutionInMaterialDetailDO::getVolumeLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockInOrderDO.setVolumeLimit(volumeLimit);
|
||||
stockInOrderService.update(stockInOrderDO);
|
||||
ExecutionInMaterialDetailBaseDO inMaterialDetailBaseDO = new ExecutionInMaterialDetailBaseDO();
|
||||
BeanUtils.copyProperties(stockInOrderPO, inMaterialDetailBaseDO);
|
||||
inMaterialDetailBaseDO.setInOrderNumber(stockInOrderPO.getInOrderNumber());
|
||||
// if (stockInOrderDO.getNeedTransport() ==0) {
|
||||
// List<BusinessDocumentOrder> businessDocumentOrders = businessDocumentOrderMapper.selectList(new LambdaQueryWrapper<BusinessDocumentOrder>().eq(BusinessDocumentOrder::getInOrderNumber, stockInOrderDO.getInOrderNumber()).notIn(BusinessDocumentOrder::getOrderStatus, 4, 5));
|
||||
// if (businessDocumentOrders != null && businessDocumentOrders.size() > 0) {
|
||||
// for (BusinessDocumentOrder businessDocumentOrder : businessDocumentOrders) {
|
||||
// businessDocumentOrder.setOrderStatus(4L);
|
||||
// String executeOrderNumber = businessDocumentOrder.getExecuteOrderNumber();
|
||||
//
|
||||
// if (executeOrderNumber !=null){
|
||||
// throw new ServiceException("该业务单已生成执行单,取消失败");
|
||||
// }
|
||||
// businessDocumentOrderMapper.updateById(businessDocumentOrder);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
|
||||
return materialDetailService.batchUpdate(stockInOrderDO.getMaterialDetailList(), inMaterialDetailBaseDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除入库单
|
||||
*/
|
||||
public Boolean delete(Long[] inOrderIds) {
|
||||
return stockInOrderService.delete(inOrderIds);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取入库单详细信息
|
||||
*/
|
||||
public ExecutionStockInOrderPO getInfo(Long inOrderId)
|
||||
{
|
||||
ExecutionStockInOrderPO stockInOrderPO = stockInOrderService.getInfo(inOrderId);
|
||||
ExecutionInMaterialDetailDO inMaterialDetailDO = new ExecutionInMaterialDetailDO();
|
||||
String inOrderNumber = stockInOrderPO.getInOrderNumber();
|
||||
List<BusinessDocumentOrder> businessDocumentOrders = businessDocumentOrderMapper.selectList(new LambdaQueryWrapper<BusinessDocumentOrder>().eq(BusinessDocumentOrder::getInOrderNumber, inOrderNumber).notIn(BusinessDocumentOrder::getOrderStatus,4,5));
|
||||
stockInOrderPO.setBusinessDocumentOrderDOList(businessDocumentOrders);
|
||||
inMaterialDetailDO.setInOrderNumber(inOrderNumber);
|
||||
inMaterialDetailDO.setLevel(1);
|
||||
List<ExecutionInMaterialDetailPO> 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 (ExecutionInMaterialDetailPO inMaterialDetail : inMaterialDetailPOList) {
|
||||
Long materialDetailId = inMaterialDetail.getMaterialDetailId();
|
||||
if (materialDetailId != null) {
|
||||
Long materialBaseInfoId = inMaterialDetail.getMaterialBaseInfoId();
|
||||
List<InventoryAdjustmentRecordPO> inventoryAdjustmentRecordPOS = materialDetailService.getkctzjl(materialBaseInfoId, inOrderNumber, "入库");
|
||||
if (inventoryAdjustmentRecordPOS != null && inventoryAdjustmentRecordPOS.size()>0) {
|
||||
InventoryAdjustmentRecordPO inventoryAdjustmentRecordPO = inventoryAdjustmentRecordPOS.get(0);
|
||||
inMaterialDetail.setAllocationBeforeQuantity(inventoryAdjustmentRecordPO.getAllocationBeforeQuantity());
|
||||
inMaterialDetail.setAllocationAfterQuantity(inventoryAdjustmentRecordPO.getAllocationAfterQuantity());
|
||||
inMaterialDetail.setFreezeAfterQuantity(inventoryAdjustmentRecordPO.getFreezeAfterQuantity());
|
||||
inMaterialDetail.setFreezeBeforeQuantity(inventoryAdjustmentRecordPO.getFreezeBeforeQuantity());
|
||||
inMaterialDetail.setInventoryAfterQuantity(inventoryAdjustmentRecordPO.getInventoryAfterQuantity());
|
||||
inMaterialDetail.setInventoryBeforeQuantity(inventoryAdjustmentRecordPO.getInventoryBeforeQuantity());
|
||||
inMaterialDetail.setNetWeight(inventoryAdjustmentRecordPO.getNetWeight());
|
||||
inMaterialDetail.setGrossWeight(inventoryAdjustmentRecordPO.getGrossWeight());
|
||||
inMaterialDetail.setVolume(inventoryAdjustmentRecordPO.getVolume());
|
||||
inMaterialDetail.setArea(inventoryAdjustmentRecordPO.getArea());
|
||||
inMaterialDetail.setAdjustedNetWeight(inventoryAdjustmentRecordPO.getAdjustedNetWeight());
|
||||
inMaterialDetail.setAdjustedGrossWeight(inventoryAdjustmentRecordPO.getAdjustedGrossWeight());
|
||||
inMaterialDetail.setAdjustedVolume(inventoryAdjustmentRecordPO.getAdjustedVolume());
|
||||
inMaterialDetail.setAdjustedArea(inventoryAdjustmentRecordPO.getAdjustedArea());
|
||||
}
|
||||
if(materialBaseInfoId != null){
|
||||
MaterialBaseInfoPO materialBaseInfoPO = reservationStockInOrderMapper.getinfo(materialBaseInfoId);
|
||||
if (materialBaseInfoPO != null &&materialBaseInfoPO.getUnitPrice() != null){
|
||||
inMaterialDetail.setUnitPrice(materialBaseInfoPO.getUnitPrice());
|
||||
}
|
||||
}
|
||||
// 填充收货数量(入库单对应的收货单实际收货数量)
|
||||
//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(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Integer auditStatus = stockInOrderDO.getIssueStatus();
|
||||
Integer issueStatus = 0;
|
||||
issueStatus = auditStatus == 2 ? 2 : 3;
|
||||
// 获取用户姓名(优先从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<ExecutionStockInOrder>().lambda()
|
||||
.set(ExecutionStockInOrder::getReservationAuditId, loginUser.getUserid())
|
||||
.set(ExecutionStockInOrder::getReservationAuditName, userRealName)
|
||||
.set(ExecutionStockInOrder::getReservationAuditTime, new Date())
|
||||
.set(ExecutionStockInOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(ExecutionStockInOrder::getUpdateByName, userRealName)
|
||||
.set(ExecutionStockInOrder::getUpdateTime, new Date())
|
||||
.set(ExecutionStockInOrder::getIssueStatus, issueStatus)
|
||||
.in(ExecutionStockInOrder::getInOrderId, stockInOrderDO.getInOrderIds()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 审核入库单
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/21 13:53
|
||||
* @param stockInOrderDO
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean issueOrder(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
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());
|
||||
boolean update = stockInOrderService.update(null, new UpdateWrapper<ExecutionStockInOrder>().lambda()
|
||||
.set(ExecutionStockInOrder::getIssueId, loginUser.getUserid())
|
||||
.set(ExecutionStockInOrder::getIssueName, userRealName)
|
||||
.set(ExecutionStockInOrder::getIssueTime, new Date())
|
||||
//.set(ExecutionStockInOrder::getIssueStatus, 1)
|
||||
.set(ExecutionStockInOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(ExecutionStockInOrder::getUpdateByName, userRealName)
|
||||
.set(ExecutionStockInOrder::getUpdateTime, new Date())
|
||||
.in(ExecutionStockInOrder::getInOrderId, stockInOrderDO.getInOrderIds()));
|
||||
|
||||
//todo下发推送到wms
|
||||
List<Long> inOrderIds = stockInOrderDO.getInOrderIds();
|
||||
for (Long inOrderId : inOrderIds) {
|
||||
ExecutionStockInOrder byId = stockInOrderService.getById(inOrderId);
|
||||
StockInOrder stockInOrder = new StockInOrder();
|
||||
BeanUtils.copyProperties(byId, stockInOrder,"inOrderId");
|
||||
stockInOrder.setOmsStockInOrderId(String.valueOf(byId.getInOrderId()));
|
||||
wmsServiceFeign.omsInOrderAdd(stockInOrder);
|
||||
String inOrderNumber = stockInOrder.getInOrderNumber();
|
||||
List<ExecutionInMaterialDetail> materialDetailList = materialDetailService.list(new QueryWrapper<ExecutionInMaterialDetail>().lambda().eq(ExecutionInMaterialDetail::getInOrderNumber, inOrderNumber));
|
||||
List<InMaterialDetail> inMaterialDetailList = new ArrayList<>();
|
||||
for (ExecutionInMaterialDetail reservationInMaterialDetail : materialDetailList) {
|
||||
InMaterialDetail inMaterialDetail = new InMaterialDetail();
|
||||
BeanUtils.copyProperties(reservationInMaterialDetail, inMaterialDetail,"materialDetailId");
|
||||
inMaterialDetail.setOmsInMaterialDetail(String.valueOf(reservationInMaterialDetail.getMaterialDetailId()));
|
||||
inMaterialDetailList.add(inMaterialDetail);
|
||||
}
|
||||
wmsServiceFeign.omsInOrderAddDetail(inMaterialDetailList);
|
||||
}
|
||||
return update;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 入库单返回结果
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/21 13:53
|
||||
* @param orderId
|
||||
* @param status
|
||||
* @param type
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean returnResult(String orderNumber, Long status, String type) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
String userRealName = loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null
|
||||
? loginUser.getUserPo().getUserName()
|
||||
: (loginUser.getRealname() != null ? loginUser.getRealname() : loginUser.getUsername());
|
||||
if (type != null && type.equals("1")) {
|
||||
return stockOutOrderService.update(null, new UpdateWrapper<ExecutionStockOutOrder>().lambda()
|
||||
.set(ExecutionStockOutOrder::getStatus, status)
|
||||
.set(ExecutionStockOutOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(ExecutionStockOutOrder::getUpdateByName, userRealName)
|
||||
.set(ExecutionStockOutOrder::getUpdateTime, new Date())
|
||||
.in(ExecutionStockOutOrder::getOutOrderNumber, orderNumber));
|
||||
} else {
|
||||
return stockInOrderService.update(null, new UpdateWrapper<ExecutionStockInOrder>().lambda()
|
||||
.set(ExecutionStockInOrder::getStatus, status)
|
||||
.set(ExecutionStockInOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(ExecutionStockInOrder::getUpdateByName, userRealName)
|
||||
.set(ExecutionStockInOrder::getUpdateTime, new Date())
|
||||
.in(ExecutionStockInOrder::getInOrderNumber, orderNumber));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 取消入库单
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/21 13:53
|
||||
* @param stockInOrderDO
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean cancelOrder(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
return stockInOrderService.update(null, new UpdateWrapper<ExecutionStockInOrder>().lambda()
|
||||
.set(ExecutionStockInOrder::getCancelOrder, 2)
|
||||
.set(ExecutionStockInOrder::getCancelRemark, stockInOrderDO.getCancelRemark())
|
||||
.set(ExecutionStockInOrder::getCancelBy, loginUser.getUserid())
|
||||
.set(ExecutionStockInOrder::getCancelByName, loginUser.getUsername())
|
||||
.set(ExecutionStockInOrder::getCancelTime, new Date())
|
||||
.set(ExecutionStockInOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(ExecutionStockInOrder::getUpdateByName, loginUser.getUsername())
|
||||
.set(ExecutionStockInOrder::getUpdateTime, new Date())
|
||||
.in(ExecutionStockInOrder::getInOrderId, stockInOrderDO.getInOrderIds()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 关闭入库单
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/21 13:53
|
||||
* @param stockInOrderDO
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean closeOrder(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
return stockInOrderService.update(null, new UpdateWrapper<ExecutionStockInOrder>().lambda()
|
||||
.set(ExecutionStockInOrder::getCloseOrder, 1)
|
||||
.set(ExecutionStockInOrder::getStatus, 7)
|
||||
.set(ExecutionStockInOrder::getCloseRemark, stockInOrderDO.getCloseRemark())
|
||||
.set(ExecutionStockInOrder::getCloseBy, loginUser.getUserid())
|
||||
.set(ExecutionStockInOrder::getCloseByName, loginUser.getUsername())
|
||||
.set(ExecutionStockInOrder::getCloseTime, new Date())
|
||||
.set(ExecutionStockInOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(ExecutionStockInOrder::getUpdateByName, loginUser.getUsername())
|
||||
.set(ExecutionStockInOrder::getUpdateTime, new Date())
|
||||
.in(ExecutionStockInOrder::getInOrderId, stockInOrderDO.getInOrderIds()));
|
||||
}
|
||||
|
||||
public Boolean pushInOrder(StockInOrderTZPD stockInOrder) {
|
||||
ExecutionStockInOrder reservationStockInOrder = new ExecutionStockInOrder();
|
||||
BeanUtils.copyProperties(stockInOrder, reservationStockInOrder);
|
||||
reservationStockInOrder.setIssueStatus(4);
|
||||
return stockInOrderService.save(reservationStockInOrder);
|
||||
}
|
||||
|
||||
public Boolean pushInOrderDetail(InMaterialDetailTZPD inMaterialDetail) {
|
||||
ExecutionInMaterialDetail reservationInMaterialDetail = new ExecutionInMaterialDetail();
|
||||
BeanUtils.copyProperties(inMaterialDetail, reservationInMaterialDetail);
|
||||
return materialDetailService.save(reservationInMaterialDetail);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 审核通过生成收货单
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/22 14:48
|
||||
* @param stockInOrderDO
|
||||
* @return Boolean
|
||||
*/
|
||||
// public Boolean auditApprove(ExecutionStockInOrderDO stockInOrderDO){
|
||||
// ExecutionStockInOrderDO stockInOrderDOByQuery = new ExecutionStockInOrderDO();
|
||||
// stockInOrderDOByQuery.setInOrderIds(stockInOrderDO.getInOrderIds());
|
||||
// stockInOrderDOByQuery.setLtAuditStatus(3);
|
||||
// List<ExecutionStockInOrderPO> stockInOrderPOList = stockInOrderService.queryList(stockInOrderDOByQuery);
|
||||
// if (CollectionUtils.isEmpty(stockInOrderPOList)){
|
||||
// throw new ServiceException("出库单不存在或已审核通过");
|
||||
// }
|
||||
// List<String> inOrderNumberList = stockInOrderPOList.stream().map(ExecutionStockInOrderPO::getInOrderNumber).collect(Collectors.toList());
|
||||
// ExecutionInMaterialDetailDO inMaterialDetailDO = new ExecutionInMaterialDetailDO();
|
||||
// inMaterialDetailDO.setInOrderNumberList(inOrderNumberList);
|
||||
// List<ExecutionInMaterialDetailPO> inMaterialDetailPOList = materialDetailService.queryListChildren(inMaterialDetailDO);
|
||||
// Map<String, List<ExecutionInMaterialDetailPO>> inMaterialDetailListMap = inMaterialDetailPOList.stream().collect(Collectors.groupingBy(ExecutionInMaterialDetailPO::getInOrderNumber));
|
||||
//
|
||||
// List<StockReceiptOrderDO> stockReceiptOrderDOList = new ArrayList<>();
|
||||
// stockInOrderPOList.forEach(p -> {
|
||||
// StockReceiptOrderDO stockReceiptOrderDO = new StockReceiptOrderDO();
|
||||
// BeanUtils.copyProperties(p, stockReceiptOrderDO);
|
||||
// stockReceiptOrderDO.setReceiptOrderNumber(OrderSequence.getOrderCode("SH"));
|
||||
// List<ExecutionInMaterialDetailPO> 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(ExecutionStockInOrderDO stockInOrderDO){
|
||||
List<ExecutionInMaterialDetailDO> 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("物料仓库控制信息不存在");
|
||||
materialWarehouseControlPO = new MaterialWarehouseControlPO();
|
||||
}
|
||||
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("物料商品规则信息不存在");
|
||||
materialGoodsRulePO =new MaterialGoodsRulePO();
|
||||
}
|
||||
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(ExecutionStockInOrderDO 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 源对象(ExecutionInMaterialDetailPO)
|
||||
* @param target 目标对象(ReceiptMaterialDetailDO)
|
||||
*/
|
||||
// private void copySpecialFields(ExecutionInMaterialDetailPO 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();
|
||||
}
|
||||
|
||||
public List<ExecutionStockInOrderPO> queryNoticePrint(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
return stockInOrderService.queryNoticePrint(stockInOrderDO);
|
||||
}
|
||||
|
||||
public List<ExecutionInMaterialDetailPO> queryNoticePrintDetail(ExecutionStockInOrderDO stockInOrderDO) {
|
||||
return stockInOrderService.queryNoticePrintDetail(stockInOrderDO);
|
||||
}
|
||||
|
||||
}
|
||||
+491
@@ -0,0 +1,491 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.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;
|
||||
|
||||
|
||||
/**
|
||||
* 出库单对象 reservation_stock_out_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ExecutionStockOutOrder extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("出库单id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long outOrderId;
|
||||
|
||||
@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 noticeNumber;
|
||||
|
||||
@ApiModelProperty("出库单号")
|
||||
@Excel(name = "出库单号")
|
||||
private String outOrderNumber;
|
||||
|
||||
@ApiModelProperty("出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-波次中 6-拣货中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭 12-已复核")
|
||||
@Excel(name = "出库状态: 1-已创建 2-已审核 3-部分分配 4-已分配 5-波次中 6-拣货中 7-拣货完成 8-复核中 9-已出库 10-已取消 11-已关闭 12-已复核")
|
||||
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", timezone = "GMT+8")
|
||||
@Excel(name = "出库单审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date auditTime;
|
||||
|
||||
@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 customerId;
|
||||
|
||||
@ApiModelProperty("客户编码")
|
||||
@Excel(name = "客户编码")
|
||||
private String customerCode;
|
||||
|
||||
@ApiModelProperty("客户名称")
|
||||
@Excel(name = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
@ApiModelProperty("预计出货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@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("是否复核: 1-是 2-否")
|
||||
@Excel(name = "是否复核: 1-是 2-否")
|
||||
private Integer review;
|
||||
|
||||
@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("分配数量")
|
||||
@Excel(name = "分配数量")
|
||||
private BigDecimal allocationQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("已生成拣货单数量")
|
||||
@Excel(name = "已生成拣货单分配数量")
|
||||
private BigDecimal alreadyAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("拣货数量")
|
||||
@Excel(name = "拣货数量")
|
||||
private BigDecimal pickingQuantity;
|
||||
|
||||
@ApiModelProperty("复核数量")
|
||||
@Excel(name = "复核数量")
|
||||
private BigDecimal checkQuantity;
|
||||
|
||||
@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", timezone = "GMT+8")
|
||||
@Excel(name = "取消订单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
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", timezone = "GMT+8")
|
||||
@Excel(name = "关闭订单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date closeTime;
|
||||
|
||||
@ApiModelProperty("复核状态: 1-未复核 2-复核中 3-已复核")
|
||||
@Excel(name = "复核状态: 1-未复核 2-复核中 3-已复核")
|
||||
private Integer checkStatus;
|
||||
|
||||
@ApiModelProperty("复核任务是否下发: 1-是 2-否")
|
||||
@Excel(name = "复核任务是否下发: 1-是 2-否")
|
||||
private Integer checkTaskDistribution;
|
||||
|
||||
@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 checkTaskDistributionTime;
|
||||
|
||||
@ApiModelProperty("复核作业人用户ID")
|
||||
@Excel(name = "复核作业人用户ID")
|
||||
private Long checkOperatorsBy;
|
||||
|
||||
@ApiModelProperty("复核作业人姓名")
|
||||
@Excel(name = "复核作业人姓名")
|
||||
private String checkOperatorsName;
|
||||
|
||||
@ApiModelProperty("调度单号")
|
||||
@Excel(name = "调度单号")
|
||||
private String mobilizeCode;
|
||||
|
||||
@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("to")
|
||||
@Excel(name = "to")
|
||||
@TableField(value = "\"TO\"")
|
||||
private String to;
|
||||
|
||||
@ApiModelProperty("联系人")
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
@ApiModelProperty("车型及车牌")
|
||||
@Excel(name = "车型及车牌")
|
||||
private String vehicleModelPlate;
|
||||
|
||||
@ApiModelProperty("委托编号")
|
||||
@Excel(name = "委托编号")
|
||||
private String entrustNo;
|
||||
|
||||
@ApiModelProperty("Tel")
|
||||
@Excel(name = "Tel")
|
||||
private String tel;
|
||||
|
||||
@ApiModelProperty("司机签名")
|
||||
@Excel(name = "司机签名")
|
||||
private String driverSign;
|
||||
|
||||
@ApiModelProperty("Fax")
|
||||
@Excel(name = "Fax")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("申报地关区")
|
||||
@Excel(name = "申报地关区")
|
||||
private String declareCustoms;
|
||||
|
||||
@ApiModelProperty("生产商")
|
||||
@Excel(name = "生产商")
|
||||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty("报关员姓名及联系方式")
|
||||
@Excel(name = "报关员姓名及联系方式")
|
||||
private String customsDeclarerInfo;
|
||||
|
||||
@ApiModelProperty("送货地址")
|
||||
@Excel(name = "送货地址")
|
||||
private String deliveryAddr;
|
||||
|
||||
@ApiModelProperty("进出境关别")
|
||||
@Excel(name = "进出境关别")
|
||||
private String entryExitCustoms;
|
||||
|
||||
@ApiModelProperty("起运/运抵国(地区)")
|
||||
@Excel(name = "起运/运抵国(地区)")
|
||||
private String departureArrivalCountry;
|
||||
|
||||
@ApiModelProperty("承运商")
|
||||
@Excel(name = "承运商")
|
||||
private String carrier;
|
||||
|
||||
@ApiModelProperty("承运商名称")
|
||||
@Excel(name = "承运商名称")
|
||||
private String carrierName;
|
||||
|
||||
@ApiModelProperty("柜号")
|
||||
@Excel(name = "柜号")
|
||||
private String containerNo;
|
||||
|
||||
@ApiModelProperty("柜")
|
||||
@Excel(name = "柜")
|
||||
private String containerNoName;
|
||||
|
||||
@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")
|
||||
private Date outboundDate;
|
||||
@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 completeTime;
|
||||
@ApiModelProperty("orderDate")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "orderDate", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date orderDate;
|
||||
|
||||
@ApiModelProperty("运输方式")
|
||||
@Excel(name = "运输方式")
|
||||
private String transportModeCode;
|
||||
@ApiModelProperty("运输方式")
|
||||
@Excel(name = "运输方式")
|
||||
private String transportModeName;
|
||||
@ApiModelProperty("监管方式")
|
||||
@Excel(name = "监管方式")
|
||||
private String supervisionModeCode;
|
||||
@ApiModelProperty("监管方式")
|
||||
@Excel(name = "监管方式")
|
||||
private String supervisionModeName;
|
||||
@ApiModelProperty("海关是否查验货物")
|
||||
@Excel(name = "海关是否查验货物")
|
||||
private String customsInspectionFlag;
|
||||
@ApiModelProperty("是否需要报关")
|
||||
@Excel(name = "是否需要报关")
|
||||
private String needDeclareFlag;
|
||||
@ApiModelProperty("是否需要运输")
|
||||
@Excel(name = "是否需要运输")
|
||||
private String needTransportFlag;
|
||||
@ApiModelProperty("app上传的图片")
|
||||
private String pictureApp;
|
||||
|
||||
@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( "下发状态 0-无状态 1-未下发 2-已下发 ")
|
||||
private Integer issueStatus;
|
||||
|
||||
@ApiModelProperty("下发时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date issueTime;
|
||||
|
||||
@ApiModelProperty("下发人id")
|
||||
private Long issueId;
|
||||
|
||||
@ApiModelProperty("下发人")
|
||||
private String issueName;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private Long reservationAuditId;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private String reservationAuditName;
|
||||
|
||||
@ApiModelProperty("预约审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date reservationAuditTime;
|
||||
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
|
||||
@ApiModelProperty("tms订单号")
|
||||
private String tmsOrderNumber;
|
||||
@ApiModelProperty("仓库负责人")
|
||||
private String directorName;
|
||||
|
||||
@ApiModelProperty("仓库负责人电话")
|
||||
private String directorPhone;
|
||||
|
||||
@ApiModelProperty("仓库负责人id")
|
||||
private Long directorId;
|
||||
@ApiModelProperty("订单来源")
|
||||
private String reservationOrderSource;
|
||||
@ApiModelProperty("出库时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date outboundTime;
|
||||
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
@ApiModelProperty("总金额")
|
||||
@Excel(name = "总金额")
|
||||
private BigDecimal totalAmount;
|
||||
@ApiModelProperty("路线")
|
||||
private String route;
|
||||
|
||||
@ApiModelProperty(value = "发票编号")
|
||||
private String invoiceNumber;
|
||||
|
||||
@ApiModelProperty(value = "客户编号")
|
||||
private String customerNumber;
|
||||
|
||||
@ApiModelProperty(value = "配送名称")
|
||||
private String deliveryName;
|
||||
|
||||
@ApiModelProperty(value = "退货入库单号")
|
||||
private String returnOrderNumber;
|
||||
@ApiModelProperty("退货数量")
|
||||
@Excel(name = "退货数量")
|
||||
private BigDecimal returnQuantity;
|
||||
|
||||
@ApiModelProperty("运输业务单号")
|
||||
@Excel(name = "运输业务单号")
|
||||
private String businessNumber;
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal amount;
|
||||
@ApiModelProperty("车次")
|
||||
@Excel(name = "车次")
|
||||
private Integer trainNo;
|
||||
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.po.ExecutionOutMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.entity.ExecutionStockOutOrder;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.po.ExecutionStockOutOrderPO;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.todo.ExecutionStockOutOrderDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出库单Service接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
public interface IExecutionStockOutOrderService extends IService<ExecutionStockOutOrder>
|
||||
{
|
||||
/**
|
||||
* 分页查询出库单列表
|
||||
*/
|
||||
public List<ExecutionStockOutOrderPO> queryList(ExecutionStockOutOrderDO stockOutOrderDO);
|
||||
|
||||
/**
|
||||
* 新增出库单
|
||||
*/
|
||||
public Boolean insert(ExecutionStockOutOrderDO stockOutOrderDO);
|
||||
|
||||
/**
|
||||
* 修改出库单
|
||||
*/
|
||||
public Boolean update(ExecutionStockOutOrderDO stockOutOrderDO);
|
||||
|
||||
/**
|
||||
* 批量删除出库单
|
||||
*/
|
||||
public Boolean delete(Long[] outOrderIds);
|
||||
|
||||
|
||||
/**
|
||||
* 查询出库单
|
||||
*/
|
||||
public ExecutionStockOutOrderPO getInfo(Long outOrderId);
|
||||
|
||||
/**
|
||||
* 出库单提货单打印-表头
|
||||
*/
|
||||
List<ExecutionStockOutOrderPO> queryOutStockNoticePrint(ExecutionStockOutOrderDO stockOutOrderDO);
|
||||
|
||||
/**
|
||||
* 出库单提货单打印-明细
|
||||
*/
|
||||
List<ExecutionOutMaterialDetailPO> queryOutStockNoticePrintDetail(ExecutionStockOutOrderDO stockOutOrderDO);
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.po.ExecutionOutMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.entity.ExecutionStockOutOrder;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.po.ExecutionStockOutOrderPO;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.todo.ExecutionStockOutOrderDO;
|
||||
//import com.mhd.oms.domain.reservationOutMaterialDetail.repository.po.ExecutionOutMaterialDetailPO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出库单Mapper接口
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
public interface ExecutionStockOutOrderMapper extends BaseMapper<ExecutionStockOutOrder>
|
||||
{
|
||||
/**
|
||||
* 查询出库单列表
|
||||
*/
|
||||
public List<ExecutionStockOutOrderPO> queryList(ExecutionStockOutOrderDO stockOutOrderDO);
|
||||
|
||||
/**
|
||||
* 出库单提货单打印-表头
|
||||
*/
|
||||
List<ExecutionStockOutOrderPO> queryOutStockNoticePrint(ExecutionStockOutOrderDO stockOutOrderDO);
|
||||
|
||||
/**
|
||||
* 出库单提货单打印-明细
|
||||
*/
|
||||
List<ExecutionOutMaterialDetailPO> queryOutStockNoticePrintDetail(ExecutionStockOutOrderDO stockOutOrderDO);
|
||||
}
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.repository.persistence;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.po.ExecutionOutMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.entity.ExecutionStockOutOrder;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.facade.IExecutionStockOutOrderService;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.mapper.ExecutionStockOutOrderMapper;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.po.ExecutionStockOutOrderPO;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.todo.ExecutionStockOutOrderDO;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出库单Service业务层处理
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
@Service
|
||||
public class ExecutionStockOutOrderImpl extends ServiceImpl<ExecutionStockOutOrderMapper, ExecutionStockOutOrder> implements IExecutionStockOutOrderService {
|
||||
@Autowired
|
||||
private ExecutionStockOutOrderMapper reservationStockOutOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询出库单列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExecutionStockOutOrderPO> queryList(ExecutionStockOutOrderDO stockOutOrderDO)
|
||||
{
|
||||
return reservationStockOutOrderMapper.queryList(stockOutOrderDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增出库单
|
||||
*/
|
||||
@Override
|
||||
public Boolean insert(ExecutionStockOutOrderDO stockOutOrderDO) {
|
||||
ExecutionStockOutOrder stockOutOrder = new ExecutionStockOutOrder();
|
||||
BeanUtils.copyProperties(stockOutOrderDO,stockOutOrder);
|
||||
return this.save(stockOutOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库单
|
||||
*/
|
||||
@Override
|
||||
public Boolean update(ExecutionStockOutOrderDO stockOutOrderDO) {
|
||||
ExecutionStockOutOrder stockOutOrder = new ExecutionStockOutOrder();
|
||||
BeanUtils.copyProperties(stockOutOrderDO,stockOutOrder);
|
||||
return this.updateById(stockOutOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除出库单
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Long[] outOrderIds ) {
|
||||
List<ExecutionStockOutOrder> list = new ArrayList<>();
|
||||
for (Long id : outOrderIds) {
|
||||
ExecutionStockOutOrder stockOutOrder = new ExecutionStockOutOrder();
|
||||
stockOutOrder.setOutOrderId(id);
|
||||
stockOutOrder.setDelFlag(2);
|
||||
list.add(stockOutOrder);
|
||||
}
|
||||
return this.updateBatchById(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库单
|
||||
*/
|
||||
@Override
|
||||
public ExecutionStockOutOrderPO getInfo(Long outOrderId) {
|
||||
ExecutionStockOutOrder stockOutOrder = this.getById(outOrderId);
|
||||
ExecutionStockOutOrderPO stockOutOrderPO = new ExecutionStockOutOrderPO();
|
||||
BeanUtils.copyProperties(stockOutOrder,stockOutOrderPO);
|
||||
return stockOutOrderPO;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 更新订单任务下发状态
|
||||
* @author ZhouGY
|
||||
* @date 2024/8/1 13:56
|
||||
* @param deliveTaskDO
|
||||
* @return Boolean
|
||||
*/
|
||||
// @Override
|
||||
// public Boolean handleDeliveTask(DeliveTaskDO deliveTaskDO) {
|
||||
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
// //标记收货单任务已下发
|
||||
// return update(null, new UpdateWrapper<ExecutionStockOutOrder>().lambda()
|
||||
// .set(ExecutionStockOutOrder::getCheckOperatorsBy, deliveTaskDO.getOperatorsBy())
|
||||
// .set(ExecutionStockOutOrder::getCheckOperatorsName, deliveTaskDO.getOperatorsName())
|
||||
// .set(ExecutionStockOutOrder::getUpdateBy, loginUser.getUserid())
|
||||
// .set(ExecutionStockOutOrder::getUpdateByName, loginUser.getUsername())
|
||||
// .set(ExecutionStockOutOrder::getUpdateTime, new Date())
|
||||
// .eq(ExecutionStockOutOrder::getOutOrderNumber, deliveTaskDO.getTrackingNumber()));
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 出库单提货单打印-表头
|
||||
*/
|
||||
@Override
|
||||
public List<ExecutionStockOutOrderPO> queryOutStockNoticePrint(ExecutionStockOutOrderDO stockOutOrderDO) {
|
||||
return reservationStockOutOrderMapper.queryOutStockNoticePrint(stockOutOrderDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库单提货单打印-明细
|
||||
*/
|
||||
@Override
|
||||
public List<ExecutionOutMaterialDetailPO> queryOutStockNoticePrintDetail(ExecutionStockOutOrderDO stockOutOrderDO) {
|
||||
return reservationStockOutOrderMapper.queryOutStockNoticePrintDetail(stockOutOrderDO);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.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 ExecutionStockOutOrderBasePO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty("通知单号")
|
||||
@Excel(name = "通知单号")
|
||||
private String noticeNumber;
|
||||
|
||||
@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 customerId;
|
||||
|
||||
@ApiModelProperty("客户编码")
|
||||
@Excel(name = "客户编码")
|
||||
private String customerCode;
|
||||
|
||||
@ApiModelProperty("客户名称")
|
||||
@Excel(name = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
@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("是否复核: 1-是 2-否")
|
||||
@Excel(name = "是否复核: 1-是 2-否")
|
||||
private Integer review;
|
||||
|
||||
@ApiModelProperty("附件url")
|
||||
@Excel(name = "附件url")
|
||||
private String annexUrl;
|
||||
|
||||
@ApiModelProperty("计划数量")
|
||||
@Excel(name = "计划数量")
|
||||
private BigDecimal quantity;
|
||||
}
|
||||
+505
@@ -0,0 +1,505 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.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.executionOutMaterialDetail.repository.po.ExecutionOutMaterialDetailPO;
|
||||
import com.mhd.oms.domain.reservationDeliveryDetailsLink.entity.ReservationDeliveryDetailsLink;
|
||||
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_out_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "出库单对象", description = "出库单响应对象")
|
||||
public class ExecutionStockOutOrderPO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("出库单id")
|
||||
private Long outOrderId;
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal amount;
|
||||
@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 noticeNumber;
|
||||
|
||||
@ApiModelProperty("出库单号")
|
||||
@Excel(name = "出库单号")
|
||||
private String outOrderNumber;
|
||||
|
||||
@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 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", timezone = "GMT+8")
|
||||
@Excel(name = "出库单审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date auditTime;
|
||||
|
||||
@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 customerId;
|
||||
|
||||
@ApiModelProperty("客户编码")
|
||||
@Excel(name = "客户编码")
|
||||
private String customerCode;
|
||||
|
||||
@ApiModelProperty("客户名称")
|
||||
@Excel(name = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
@ApiModelProperty("预计出货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@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("是否复核: 1-是 2-否")
|
||||
@Excel(name = "是否复核: 1-是 2-否")
|
||||
private Integer review;
|
||||
|
||||
@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("分配数量")
|
||||
@Excel(name = "分配数量")
|
||||
private BigDecimal allocationQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("已生成拣货单数量")
|
||||
@Excel(name = "已生成拣货单分配数量")
|
||||
private BigDecimal alreadyAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("拣货数量")
|
||||
@Excel(name = "拣货数量")
|
||||
private BigDecimal pickingQuantity;
|
||||
|
||||
@ApiModelProperty("复核数量")
|
||||
@Excel(name = "复核数量")
|
||||
private BigDecimal checkQuantity;
|
||||
|
||||
@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", timezone = "GMT+8")
|
||||
@Excel(name = "取消订单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
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", timezone = "GMT+8")
|
||||
@Excel(name = "关闭订单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date closeTime;
|
||||
|
||||
@ApiModelProperty("复核状态: 1-未复核 2-复核中 3-已复核")
|
||||
@Excel(name = "复核状态: 1-未复核 2-复核中 3-已复核")
|
||||
private Integer checkStatus;
|
||||
|
||||
@ApiModelProperty("复核任务是否下发: 1-是 2-否")
|
||||
@Excel(name = "复核任务是否下发: 1-是 2-否")
|
||||
private Integer checkTaskDistribution;
|
||||
|
||||
@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 checkTaskDistributionTime;
|
||||
|
||||
@ApiModelProperty("复核作业人用户ID")
|
||||
@Excel(name = "复核作业人用户ID")
|
||||
private Long checkOperatorsBy;
|
||||
|
||||
@ApiModelProperty("复核作业人姓名")
|
||||
@Excel(name = "复核作业人姓名")
|
||||
private String checkOperatorsName;
|
||||
|
||||
@ApiModelProperty("调度单号")
|
||||
@Excel(name = "调度单号")
|
||||
private String mobilizeCode;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("物料明细")
|
||||
private List<ExecutionOutMaterialDetailPO> materialDetailList;
|
||||
//
|
||||
// @ApiModelProperty("出库单复核统计")
|
||||
// private ReservationOutMaterialCheckPO outMaterialCheckPO;
|
||||
|
||||
@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 vehicleModelPlate;
|
||||
|
||||
@ApiModelProperty("委托编号")
|
||||
@Excel(name = "委托编号")
|
||||
private String entrustNo;
|
||||
|
||||
@ApiModelProperty("Tel")
|
||||
@Excel(name = "Tel")
|
||||
private String tel;
|
||||
|
||||
@ApiModelProperty("司机签名")
|
||||
@Excel(name = "司机签名")
|
||||
private String driverSign;
|
||||
|
||||
@ApiModelProperty("Fax")
|
||||
@Excel(name = "Fax")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("申报地关区")
|
||||
@Excel(name = "申报地关区")
|
||||
private String declareCustoms;
|
||||
|
||||
@ApiModelProperty("生产商")
|
||||
@Excel(name = "生产商")
|
||||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty("报关员姓名及联系方式")
|
||||
@Excel(name = "报关员姓名及联系方式")
|
||||
private String customsDeclarerInfo;
|
||||
|
||||
@ApiModelProperty("送货地址")
|
||||
@Excel(name = "送货地址")
|
||||
private String deliveryAddr;
|
||||
|
||||
@ApiModelProperty("进出境关别")
|
||||
@Excel(name = "进出境关别")
|
||||
private String entryExitCustoms;
|
||||
|
||||
@ApiModelProperty("起运/运抵国(地区)")
|
||||
@Excel(name = "起运/运抵国(地区)")
|
||||
private String departureArrivalCountry;
|
||||
|
||||
@ApiModelProperty("承运商")
|
||||
@Excel(name = "承运商")
|
||||
private String carrier;
|
||||
|
||||
@ApiModelProperty("柜号")
|
||||
@Excel(name = "柜号")
|
||||
private String containerNo;
|
||||
|
||||
@ApiModelProperty("柜")
|
||||
@Excel(name = "柜")
|
||||
private String containerNoName;
|
||||
|
||||
@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")
|
||||
private Date outboundDate;
|
||||
@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 completeTime;
|
||||
@ApiModelProperty("orderDate")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "orderDate", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date orderDate;
|
||||
|
||||
@ApiModelProperty("运输方式")
|
||||
@Excel(name = "运输方式")
|
||||
private String transportModeCode;
|
||||
@ApiModelProperty("运输方式")
|
||||
@Excel(name = "运输方式")
|
||||
private String transportModeName;
|
||||
@ApiModelProperty("监管方式")
|
||||
@Excel(name = "监管方式")
|
||||
private String supervisionModeCode;
|
||||
@ApiModelProperty("监管方式")
|
||||
@Excel(name = "监管方式")
|
||||
private String supervisionModeName;
|
||||
@ApiModelProperty("海关是否查验货物")
|
||||
@Excel(name = "海关是否查验货物")
|
||||
private String customsInspectionFlag;
|
||||
@ApiModelProperty("是否需要报关")
|
||||
@Excel(name = "是否需要报关")
|
||||
private String needDeclareFlag;
|
||||
@ApiModelProperty("是否需要运输")
|
||||
@Excel(name = "是否需要运输")
|
||||
private String needTransportFlag;
|
||||
|
||||
@ApiModelProperty("出库交接图片,PDA出库交接时上传的照片,多张图片以逗号隔开")
|
||||
private String pictureApp;
|
||||
|
||||
@ApiModelProperty("出库总数量")
|
||||
private BigDecimal totalOutboundQuantity;
|
||||
|
||||
|
||||
@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 carrierName;
|
||||
|
||||
@ApiModelProperty( "下发状态 0-无状态 1-未下发 2-已下发 ")
|
||||
private Integer issueStatus;
|
||||
|
||||
@ApiModelProperty("下发时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date issueTime;
|
||||
|
||||
@ApiModelProperty("下发人id")
|
||||
private Long issueId;
|
||||
|
||||
@ApiModelProperty("下发人")
|
||||
private String issueName;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private Long reservationAuditId;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private String reservationAuditName;
|
||||
|
||||
@ApiModelProperty("预约审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date reservationAuditTime;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
|
||||
@ApiModelProperty("tms订单号")
|
||||
private String tmsOrderNumber;
|
||||
@ApiModelProperty("仓库负责人")
|
||||
private String directorName;
|
||||
|
||||
@ApiModelProperty("仓库负责人电话")
|
||||
private String directorPhone;
|
||||
|
||||
@ApiModelProperty("仓库负责人id")
|
||||
private Long directorId;
|
||||
@ApiModelProperty("订单来源")
|
||||
private String reservationOrderSource;
|
||||
@ApiModelProperty("出库时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date outboundTime;
|
||||
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
@ApiModelProperty("总金额")
|
||||
@Excel(name = "总金额")
|
||||
private BigDecimal totalAmount;
|
||||
@ApiModelProperty("路线")
|
||||
private String route;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "发票编号")
|
||||
private String invoiceNumber;
|
||||
|
||||
@ApiModelProperty(value = "客户编号")
|
||||
private String customerNumber;
|
||||
|
||||
@ApiModelProperty(value = "配送名称")
|
||||
private String deliveryName;
|
||||
|
||||
@ApiModelProperty(value = "退货入库单号")
|
||||
private String returnOrderNumber;
|
||||
@ApiModelProperty("退货数量")
|
||||
@Excel(name = "退货数量")
|
||||
private BigDecimal returnQuantity;
|
||||
private List<ReservationDeliveryDetailsLink> reservationDeliveryDetailsLinkList;
|
||||
|
||||
@ApiModelProperty("运输业务单号")
|
||||
@Excel(name = "运输业务单号")
|
||||
private String businessNumber;
|
||||
|
||||
@ApiModelProperty("NC客户编码")
|
||||
private String customerNcCode;
|
||||
@ApiModelProperty("车次")
|
||||
@Excel(name = "车次")
|
||||
private Integer trainNo;
|
||||
private String khdm;
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.repository.todo;
|
||||
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title AllocationSowingWallDO
|
||||
* @description: 播种分货
|
||||
* @date 2024/6/5 14:29
|
||||
**/
|
||||
@Data
|
||||
public class AllocationByOrderDO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("出库单号")
|
||||
@Excel(name = "出库单号")
|
||||
private String outOrderNumber;
|
||||
|
||||
@ApiModelProperty("物料编码/物料条码/序列号")
|
||||
@Excel(name = "物料编码/物料条码/序列号")
|
||||
private String materialNumber;
|
||||
|
||||
@ApiModelProperty("是否单件扫描:1-是 2-否")
|
||||
@Excel(name = "是否单件扫描:1-是 2-否")
|
||||
private Integer singleScan;
|
||||
|
||||
@ApiModelProperty("数量EA")
|
||||
@Excel(name = "数量EA")
|
||||
private BigDecimal quantity;
|
||||
|
||||
@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 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;
|
||||
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.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.reservationOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailDO;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailDO;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author ZhouGY
|
||||
* @title StockInOrderBasePO
|
||||
* @description: TODO
|
||||
* @date 2024/5/22 11:50
|
||||
**/
|
||||
@Data
|
||||
public class ExecutionStockOutOrderBaseDO 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("物料明细")
|
||||
private List<ExecutionOutMaterialDetailDO> materialDetailList;
|
||||
}
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.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 ExecutionStockOutOrderBaseDTO 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;
|
||||
}
|
||||
+568
@@ -0,0 +1,568 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.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.executionOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailDO;
|
||||
import com.mhd.oms.domain.reservationDeliveryDetailsLink.entity.ReservationDeliveryDetailsLink;
|
||||
//import com.mhd.oms.domain.reservationOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailDO;
|
||||
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_out_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ExecutionStockOutOrderDO extends BaseVOEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("出库单id")
|
||||
private Long outOrderId;
|
||||
|
||||
@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 BigDecimal amount;
|
||||
|
||||
@ApiModelProperty("通知单号")
|
||||
@Excel(name = "通知单号")
|
||||
private String noticeNumber;
|
||||
|
||||
@ApiModelProperty("出库单号")
|
||||
@Excel(name = "出库单号")
|
||||
private String outOrderNumber;
|
||||
|
||||
@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 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", timezone = "GMT+8")
|
||||
@Excel(name = "出库单审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date auditTime;
|
||||
|
||||
@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 customerId;
|
||||
|
||||
@ApiModelProperty("客户编码")
|
||||
@Excel(name = "客户编码")
|
||||
private String customerCode;
|
||||
|
||||
@ApiModelProperty("客户名称")
|
||||
@Excel(name = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
@ApiModelProperty("预计出货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@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("是否复核: 1-是 2-否")
|
||||
@Excel(name = "是否复核: 1-是 2-否")
|
||||
private Integer review;
|
||||
|
||||
@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("分配数量")
|
||||
@Excel(name = "分配数量")
|
||||
private BigDecimal allocationQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("已生成拣货单数量")
|
||||
@Excel(name = "已生成拣货单分配数量")
|
||||
private BigDecimal alreadyAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("拣货数量")
|
||||
@Excel(name = "拣货数量")
|
||||
private BigDecimal pickingQuantity;
|
||||
|
||||
@ApiModelProperty("复核数量")
|
||||
@Excel(name = "复核数量")
|
||||
private BigDecimal checkQuantity;
|
||||
|
||||
@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", timezone = "GMT+8")
|
||||
@Excel(name = "取消订单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
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", timezone = "GMT+8")
|
||||
@Excel(name = "关闭订单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date closeTime;
|
||||
|
||||
@ApiModelProperty("复核状态: 1-未复核 2-复核中 3-已复核")
|
||||
@Excel(name = "复核状态: 1-未复核 2-复核中 3-已复核")
|
||||
private Integer checkStatus;
|
||||
|
||||
@ApiModelProperty("复核任务是否下发: 1-是 2-否")
|
||||
@Excel(name = "复核任务是否下发: 1-是 2-否")
|
||||
private Integer checkTaskDistribution;
|
||||
|
||||
@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 checkTaskDistributionTime;
|
||||
|
||||
@ApiModelProperty("复核作业人用户ID")
|
||||
@Excel(name = "复核作业人用户ID")
|
||||
private Long checkOperatorsBy;
|
||||
|
||||
@ApiModelProperty("复核作业人姓名")
|
||||
@Excel(name = "复核作业人姓名")
|
||||
private String checkOperatorsName;
|
||||
|
||||
@ApiModelProperty("调度单号")
|
||||
@Excel(name = "调度单号")
|
||||
private String mobilizeCode;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("出库单id集合")
|
||||
private List<Long> outOrderIds;
|
||||
|
||||
@ApiModelProperty("物料明细")
|
||||
private List<ExecutionOutMaterialDetailDO> materialDetailList;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("序列号")
|
||||
@Excel(name = "序列号")
|
||||
private String serialNumber;
|
||||
|
||||
@ApiModelProperty("物料审核数量")
|
||||
@Excel(name = "物料审核数量")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("波次类型编码")
|
||||
private String waveOrderTypeCode;
|
||||
|
||||
@ApiModelProperty("出库状态大于某个状态")
|
||||
private Integer gtStatus;
|
||||
|
||||
@ApiModelProperty("出库状态小于某个状态")
|
||||
private Integer ltStatus;
|
||||
|
||||
@ApiModelProperty("大于复核状态: 1-未复核 2-复核中 3-已复核")
|
||||
private Integer gtCheckStatus;
|
||||
|
||||
@ApiModelProperty("小于复核状态: 1-未复核 2-复核中 3-已复核")
|
||||
private Integer ltCheckStatus;
|
||||
|
||||
@ApiModelProperty("PDA复核查询tab: 1-列表(待复核) 2-历史记录(已复核)")
|
||||
private Integer tabType;
|
||||
|
||||
@ApiModelProperty("to")
|
||||
@Excel(name = "to")
|
||||
private String to;
|
||||
|
||||
@ApiModelProperty("联系人")
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
@ApiModelProperty("车型及车牌")
|
||||
@Excel(name = "车型及车牌")
|
||||
private String vehicleModelPlate;
|
||||
|
||||
@ApiModelProperty("委托编号")
|
||||
@Excel(name = "委托编号")
|
||||
private String entrustNo;
|
||||
|
||||
@ApiModelProperty("Tel")
|
||||
@Excel(name = "Tel")
|
||||
private String tel;
|
||||
|
||||
@ApiModelProperty("司机签名")
|
||||
@Excel(name = "司机签名")
|
||||
private String driverSign;
|
||||
|
||||
@ApiModelProperty("Fax")
|
||||
@Excel(name = "Fax")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("申报地关区")
|
||||
@Excel(name = "申报地关区")
|
||||
private String declareCustoms;
|
||||
|
||||
@ApiModelProperty("生产商")
|
||||
@Excel(name = "生产商")
|
||||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty("报关员姓名及联系方式")
|
||||
@Excel(name = "报关员姓名及联系方式")
|
||||
private String customsDeclarerInfo;
|
||||
|
||||
@ApiModelProperty("送货地址")
|
||||
@Excel(name = "送货地址")
|
||||
private String deliveryAddr;
|
||||
|
||||
@ApiModelProperty("进出境关别")
|
||||
@Excel(name = "进出境关别")
|
||||
private String entryExitCustoms;
|
||||
|
||||
@ApiModelProperty("起运/运抵国(地区)")
|
||||
@Excel(name = "起运/运抵国(地区)")
|
||||
private String departureArrivalCountry;
|
||||
|
||||
@ApiModelProperty("承运商")
|
||||
@Excel(name = "承运商")
|
||||
private String carrier;
|
||||
|
||||
@ApiModelProperty("柜号")
|
||||
@Excel(name = "柜号")
|
||||
private String containerNo;
|
||||
|
||||
@ApiModelProperty("柜")
|
||||
@Excel(name = "柜")
|
||||
private String containerNoName;
|
||||
|
||||
@ApiModelProperty("出仓日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date outboundDate;
|
||||
|
||||
@ApiModelProperty(name = "出库时间查询条件开始日期")
|
||||
private String outboundDateStart;
|
||||
|
||||
@ApiModelProperty(name = "出库时间查询条件结束日期")
|
||||
private String outboundDateEnd;
|
||||
@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 completeTime;
|
||||
@ApiModelProperty("orderDate")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "orderDate", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date orderDate;
|
||||
|
||||
@ApiModelProperty("运输方式")
|
||||
@Excel(name = "运输方式")
|
||||
private String transportModeCode;
|
||||
@ApiModelProperty("运输方式")
|
||||
@Excel(name = "运输方式")
|
||||
private String transportModeName;
|
||||
@ApiModelProperty("监管方式")
|
||||
@Excel(name = "监管方式")
|
||||
private String supervisionModeCode;
|
||||
@ApiModelProperty("监管方式")
|
||||
@Excel(name = "监管方式")
|
||||
private String supervisionModeName;
|
||||
@ApiModelProperty("海关是否查验货物")
|
||||
@Excel(name = "海关是否查验货物")
|
||||
private String customsInspectionFlag;
|
||||
@ApiModelProperty("是否需要报关")
|
||||
@Excel(name = "是否需要报关")
|
||||
private String needDeclareFlag;
|
||||
@ApiModelProperty("是否需要运输")
|
||||
@Excel(name = "是否需要运输")
|
||||
private String needTransportFlag;
|
||||
|
||||
@ApiModelProperty(name = "创建时间查询条件开始日期")
|
||||
private String createTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "创建时间查询条件结束日期")
|
||||
private String createTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "审核时间查询条件开始日期")
|
||||
private String auditTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "审核时间查询条件结束日期")
|
||||
private String auditTimeEnd;
|
||||
|
||||
@ApiModelProperty("出库明细-物料名称(商品名称),模糊匹配")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("出库明细-物料编码,模糊匹配")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty(name = "已分配数量总数量")
|
||||
private BigDecimal alreadyAllocationQuantityAll;
|
||||
|
||||
|
||||
@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 carrierName;
|
||||
|
||||
@ApiModelProperty( "下发状态 0-无状态 1-未下发 2-已下发 ")
|
||||
private Integer issueStatus;
|
||||
|
||||
@ApiModelProperty("下发时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date issueTime;
|
||||
|
||||
@ApiModelProperty("下发人id")
|
||||
private Long issueId;
|
||||
|
||||
@ApiModelProperty("下发人")
|
||||
private String issueName;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private Long reservationAuditId;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private String reservationAuditName;
|
||||
|
||||
@ApiModelProperty("预约审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date reservationAuditTime;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
|
||||
@ApiModelProperty("tms订单号")
|
||||
private String tmsOrderNumber;
|
||||
@ApiModelProperty("仓库负责人")
|
||||
private String directorName;
|
||||
|
||||
@ApiModelProperty("仓库负责人电话")
|
||||
private String directorPhone;
|
||||
|
||||
@ApiModelProperty("仓库负责人id")
|
||||
private Long directorId;
|
||||
@ApiModelProperty("订单来源")
|
||||
private String reservationOrderSource;
|
||||
@ApiModelProperty("出库时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date outboundTime;
|
||||
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
|
||||
@ApiModelProperty("总金额")
|
||||
@Excel(name = "总金额")
|
||||
private BigDecimal totalAmount;
|
||||
@ApiModelProperty("路线")
|
||||
private String route;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "发票编号")
|
||||
private String invoiceNumber;
|
||||
|
||||
@ApiModelProperty(value = "客户编号")
|
||||
private String customerNumber;
|
||||
|
||||
@ApiModelProperty(value = "配送名称")
|
||||
private String deliveryName;
|
||||
|
||||
@ApiModelProperty(value = "退货入库单号")
|
||||
private String returnOrderNumber;
|
||||
@ApiModelProperty("退货数量")
|
||||
@Excel(name = "退货数量")
|
||||
private BigDecimal returnQuantity;
|
||||
private List<ReservationDeliveryDetailsLink> reservationDeliveryDetailsLinkList;
|
||||
|
||||
@ApiModelProperty("运输业务单号")
|
||||
@Excel(name = "运输业务单号")
|
||||
private String businessNumber;
|
||||
|
||||
@ApiModelProperty("NC客户编码")
|
||||
private String customerNcCode;
|
||||
@ApiModelProperty("车次")
|
||||
@Excel(name = "车次")
|
||||
private Integer trainNo;
|
||||
|
||||
@ApiModelProperty(value = "推送时间起")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date pushTimeFrom;
|
||||
|
||||
@ApiModelProperty(value = "推送时间止")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date pushTimeTo;
|
||||
@ApiModelProperty(value = "推送时间起")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeFrom;
|
||||
|
||||
@ApiModelProperty(value = "推送时间止")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeTo;
|
||||
private String xfStatus;
|
||||
}
|
||||
+556
@@ -0,0 +1,556 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAlias;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailDTO;
|
||||
import com.mhd.oms.domain.reservationDeliveryDetailsLink.entity.ReservationDeliveryDetailsLink;
|
||||
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_out_order
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class ExecutionStockOutOrderDTO extends ExecutionStockOutOrderBaseDTO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("出库单id")
|
||||
private Long outOrderId;
|
||||
|
||||
@ApiModelProperty("组织表ID")
|
||||
@Excel(name = "组织表ID")
|
||||
private Long organizationId;
|
||||
@ApiModelProperty("总价")
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal amount;
|
||||
@ApiModelProperty("组织名称")
|
||||
@Excel(name = "组织名称")
|
||||
private String organizationName;
|
||||
|
||||
@ApiModelProperty("一级组织表ID")
|
||||
@Excel(name = "一级组织表ID")
|
||||
private Long topOrganizationId;
|
||||
|
||||
@ApiModelProperty("通知单号")
|
||||
@Excel(name = "通知单号")
|
||||
private String noticeNumber;
|
||||
|
||||
@ApiModelProperty("出库单号")
|
||||
@Excel(name = "出库单号")
|
||||
private String outOrderNumber;
|
||||
|
||||
@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 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", timezone = "GMT+8")
|
||||
@Excel(name = "出库单审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date auditTime;
|
||||
|
||||
@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 customerId;
|
||||
|
||||
@ApiModelProperty("客户编码")
|
||||
@Excel(name = "客户编码")
|
||||
private String customerCode;
|
||||
|
||||
@ApiModelProperty("客户名称")
|
||||
@Excel(name = "客户名称")
|
||||
private String customerName;
|
||||
|
||||
@ApiModelProperty("预计出货时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@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("是否复核: 1-是 2-否")
|
||||
@Excel(name = "是否复核: 1-是 2-否")
|
||||
private Integer review;
|
||||
|
||||
@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("分配数量")
|
||||
@Excel(name = "分配数量")
|
||||
private BigDecimal allocationQuantity;
|
||||
|
||||
|
||||
@ApiModelProperty("已生成拣货单数量")
|
||||
@Excel(name = "已生成拣货单分配数量")
|
||||
private BigDecimal alreadyAllocationQuantity;
|
||||
|
||||
@ApiModelProperty("拣货数量")
|
||||
@Excel(name = "拣货数量")
|
||||
private BigDecimal pickingQuantity;
|
||||
|
||||
@ApiModelProperty("复核数量")
|
||||
@Excel(name = "复核数量")
|
||||
private BigDecimal checkQuantity;
|
||||
|
||||
@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", timezone = "GMT+8")
|
||||
@Excel(name = "取消订单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
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", timezone = "GMT+8")
|
||||
@Excel(name = "关闭订单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date closeTime;
|
||||
|
||||
@ApiModelProperty("复核状态: 1-未复核 2-复核中 3-已复核")
|
||||
@Excel(name = "复核状态: 1-未复核 2-复核中 3-已复核")
|
||||
private Integer checkStatus;
|
||||
|
||||
@ApiModelProperty("复核任务是否下发: 1-是 2-否")
|
||||
@Excel(name = "复核任务是否下发: 1-是 2-否")
|
||||
private Integer checkTaskDistribution;
|
||||
|
||||
@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 checkTaskDistributionTime;
|
||||
|
||||
@ApiModelProperty("复核作业人用户ID")
|
||||
@Excel(name = "复核作业人用户ID")
|
||||
@JsonAlias({"checkOperatorId", "operatorId"})
|
||||
private Long checkOperatorsBy;
|
||||
|
||||
@ApiModelProperty("复核作业人姓名")
|
||||
@Excel(name = "复核作业人姓名")
|
||||
private String checkOperatorsName;
|
||||
|
||||
@ApiModelProperty("调度单号")
|
||||
@Excel(name = "调度单号")
|
||||
private String mobilizeCode;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
@ApiModelProperty(name = "组织ID集合")
|
||||
private List<Long> organizationIdList;
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
|
||||
@ApiModelProperty("出库单id集合")
|
||||
private List<Long> outOrderIds;
|
||||
|
||||
@ApiModelProperty("物料明细")
|
||||
private List<ExecutionOutMaterialDetailDTO> materialDetailList;
|
||||
|
||||
@ApiModelProperty("物料条形码")
|
||||
@Excel(name = "物料条形码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty("物料审核数量")
|
||||
@Excel(name = "物料审核数量")
|
||||
private BigDecimal actualQuantity;
|
||||
|
||||
@ApiModelProperty("波次类型编码")
|
||||
private String waveOrderTypeCode;
|
||||
|
||||
@ApiModelProperty("大于复核状态: 1-未复核 2-复核中 3-已复核")
|
||||
private Integer gtCheckStatus;
|
||||
|
||||
@ApiModelProperty("小于复核状态: 1-未复核 2-复核中 3-已复核")
|
||||
private Integer ltCheckStatus;
|
||||
|
||||
@ApiModelProperty("PDA复核查询tab: 1-列表(待复核) 2-历史记录(已复核)")
|
||||
private Integer tabType;
|
||||
|
||||
@ApiModelProperty("to")
|
||||
@Excel(name = "to")
|
||||
private String to;
|
||||
|
||||
@ApiModelProperty("联系人")
|
||||
@Excel(name = "联系人")
|
||||
private String contactPerson;
|
||||
|
||||
@ApiModelProperty("车型及车牌")
|
||||
@Excel(name = "车型及车牌")
|
||||
private String vehicleModelPlate;
|
||||
|
||||
@ApiModelProperty("委托编号")
|
||||
@Excel(name = "委托编号")
|
||||
private String entrustNo;
|
||||
|
||||
@ApiModelProperty("Tel")
|
||||
@Excel(name = "Tel")
|
||||
private String tel;
|
||||
|
||||
@ApiModelProperty("司机签名")
|
||||
@Excel(name = "司机签名")
|
||||
private String driverSign;
|
||||
|
||||
@ApiModelProperty("Fax")
|
||||
@Excel(name = "Fax")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("申报地关区")
|
||||
@Excel(name = "申报地关区")
|
||||
private String declareCustoms;
|
||||
|
||||
@ApiModelProperty("生产商")
|
||||
@Excel(name = "生产商")
|
||||
private String manufacturer;
|
||||
|
||||
@ApiModelProperty("报关员姓名及联系方式")
|
||||
@Excel(name = "报关员姓名及联系方式")
|
||||
private String customsDeclarerInfo;
|
||||
|
||||
@ApiModelProperty("送货地址")
|
||||
@Excel(name = "送货地址")
|
||||
private String deliveryAddr;
|
||||
|
||||
@ApiModelProperty("进出境关别")
|
||||
@Excel(name = "进出境关别")
|
||||
private String entryExitCustoms;
|
||||
|
||||
@ApiModelProperty("起运/运抵国(地区)")
|
||||
@Excel(name = "起运/运抵国(地区)")
|
||||
private String departureArrivalCountry;
|
||||
|
||||
@ApiModelProperty("承运商")
|
||||
@Excel(name = "承运商")
|
||||
private String carrier;
|
||||
|
||||
@ApiModelProperty("柜号")
|
||||
@Excel(name = "柜号")
|
||||
private String containerNo;
|
||||
|
||||
@ApiModelProperty("柜")
|
||||
@Excel(name = "柜")
|
||||
private String containerNoName;
|
||||
|
||||
@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")
|
||||
private Date outboundDate;
|
||||
@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 completeTime;
|
||||
@ApiModelProperty("orderDate")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "orderDate", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date orderDate;
|
||||
|
||||
@ApiModelProperty("运输方式")
|
||||
@Excel(name = "运输方式")
|
||||
private String transportModeCode;
|
||||
@ApiModelProperty("运输方式")
|
||||
@Excel(name = "运输方式")
|
||||
private String transportModeName;
|
||||
@ApiModelProperty("监管方式")
|
||||
@Excel(name = "监管方式")
|
||||
private String supervisionModeCode;
|
||||
@ApiModelProperty("监管方式")
|
||||
@Excel(name = "监管方式")
|
||||
private String supervisionModeName;
|
||||
@ApiModelProperty("海关是否查验货物")
|
||||
@Excel(name = "海关是否查验货物")
|
||||
private String customsInspectionFlag;
|
||||
@ApiModelProperty("是否需要报关")
|
||||
@Excel(name = "是否需要报关")
|
||||
private String needDeclareFlag;
|
||||
@ApiModelProperty("是否需要运输")
|
||||
@Excel(name = "是否需要运输")
|
||||
private String needTransportFlag;
|
||||
|
||||
@ApiModelProperty(name = "创建时间查询条件开始日期")
|
||||
private String createTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "创建时间查询条件结束日期")
|
||||
private String createTimeEnd;
|
||||
|
||||
@ApiModelProperty(name = "审核时间查询条件开始日期")
|
||||
private String auditTimeStart;
|
||||
|
||||
@ApiModelProperty(name = "审核时间查询条件结束日期")
|
||||
private String auditTimeEnd;
|
||||
|
||||
@ApiModelProperty("出库明细-物料名称(商品名称),模糊匹配,与前端参数 materialName 一致")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("出库明细-物料编码,模糊匹配,与前端参数 materialCode 一致")
|
||||
private String materialCode;
|
||||
|
||||
@ApiModelProperty("出库交接图片,PDA出库交接时上传的照片,多张图片以逗号隔开")
|
||||
private String pictureApp;
|
||||
|
||||
@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 carrierName;
|
||||
|
||||
@ApiModelProperty( "下发状态 0-无状态 1-未下发 2-已下发 ")
|
||||
private Integer issueStatus;
|
||||
|
||||
@ApiModelProperty("下发时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date issueTime;
|
||||
|
||||
@ApiModelProperty("下发人id")
|
||||
private Long issueId;
|
||||
|
||||
@ApiModelProperty("下发人")
|
||||
private String issueName;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private Long reservationAuditId;
|
||||
|
||||
@ApiModelProperty("预约审核人id")
|
||||
private String reservationAuditName;
|
||||
|
||||
@ApiModelProperty("预约审核时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date reservationAuditTime;
|
||||
@ApiModelProperty("结算币种")
|
||||
private String settlementCurrency;
|
||||
@ApiModelProperty("业务员ID")
|
||||
private String salesmanId;
|
||||
@ApiModelProperty("业务员名称")
|
||||
private String salesmanName;
|
||||
|
||||
@ApiModelProperty("tms订单号")
|
||||
private String tmsOrderNumber;
|
||||
@ApiModelProperty("仓库负责人")
|
||||
private String directorName;
|
||||
|
||||
@ApiModelProperty("仓库负责人电话")
|
||||
private String directorPhone;
|
||||
|
||||
@ApiModelProperty("仓库负责人id")
|
||||
private Long directorId;
|
||||
@ApiModelProperty("订单来源")
|
||||
private String reservationOrderSource;
|
||||
@ApiModelProperty("出库时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date outboundTime;
|
||||
|
||||
@ApiModelProperty("推送状态:1-未推送,2-推送中,3-推送成功,4-推送失败")
|
||||
private Integer pushStatus;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("推送时间")
|
||||
private Date pushTime;
|
||||
|
||||
@ApiModelProperty("推送人")
|
||||
private Long pushBy;
|
||||
|
||||
@ApiModelProperty("推送人姓名")
|
||||
private String pushByName;
|
||||
@ApiModelProperty("总金额")
|
||||
@Excel(name = "总金额")
|
||||
private BigDecimal totalAmount;
|
||||
@ApiModelProperty("路线")
|
||||
private String route;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "发票编号")
|
||||
private String invoiceNumber;
|
||||
|
||||
@ApiModelProperty(value = "客户编号")
|
||||
private String customerNumber;
|
||||
|
||||
@ApiModelProperty(value = "配送名称")
|
||||
private String deliveryName;
|
||||
|
||||
@ApiModelProperty(value = "退货入库单号")
|
||||
private String returnOrderNumber;
|
||||
@ApiModelProperty("退货数量")
|
||||
@Excel(name = "退货数量")
|
||||
private BigDecimal returnQuantity;
|
||||
private List<ReservationDeliveryDetailsLink> reservationDeliveryDetailsLinkList;
|
||||
|
||||
@ApiModelProperty("运输业务单号")
|
||||
@Excel(name = "运输业务单号")
|
||||
private String businessNumber;
|
||||
|
||||
@ApiModelProperty("NC客户编码")
|
||||
private String customerNcCode;
|
||||
@ApiModelProperty("车次")
|
||||
@Excel(name = "车次")
|
||||
private Integer trainNo;
|
||||
|
||||
@ApiModelProperty(value = "推送时间起")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date pushTimeFrom;
|
||||
|
||||
@ApiModelProperty(value = "推送时间止")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date pushTimeTo;
|
||||
@ApiModelProperty(value = "推送时间起")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeFrom;
|
||||
|
||||
@ApiModelProperty(value = "推送时间止")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTimeTo;
|
||||
@ApiModelProperty(name = "出库时间查询条件开始日期")
|
||||
private String outboundDateStart;
|
||||
|
||||
@ApiModelProperty(name = "出库时间查询条件结束日期")
|
||||
private String outboundDateEnd;
|
||||
|
||||
private String xfStatus;
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.repository.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class GwOutDetail {
|
||||
//订单号
|
||||
private String bill_no;
|
||||
//订单行号
|
||||
private Integer line_num;
|
||||
//物料号
|
||||
private String item_no;
|
||||
//物料名称
|
||||
private String item_name;
|
||||
//物料规格
|
||||
private String spec;
|
||||
//计量单位
|
||||
private String unit;
|
||||
//数量
|
||||
private BigDecimal qty;
|
||||
//企业币制
|
||||
private String erp_curr;
|
||||
//企业单价
|
||||
private BigDecimal erp_price;
|
||||
//申报总价
|
||||
private BigDecimal amount;
|
||||
//入仓订单号
|
||||
private String order_i_no;
|
||||
//入仓订单行号
|
||||
private Integer order_i_row;
|
||||
//仓库
|
||||
private String warehouse;
|
||||
//库位
|
||||
private String op_wh_loc;
|
||||
//入库单编号
|
||||
private String bill_i;
|
||||
//入库单行号
|
||||
private Integer bill_i_row;
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.repository.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class GwStockOutOrder {
|
||||
//订单号
|
||||
private String bill_no;
|
||||
//进出标记
|
||||
private String ie_flag;
|
||||
//下单日期
|
||||
private Date bill_date;
|
||||
//客户代码
|
||||
private String corp_code;
|
||||
|
||||
private List<GwOutDetail> orderList;
|
||||
|
||||
}
|
||||
+1709
File diff suppressed because it is too large
Load Diff
+113
@@ -0,0 +1,113 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.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.executionStockOutOrder.repository.todo.ExecutionStockOutOrderDO;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.todo.ExecutionStockOutOrderDTO;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 出库单Assembler
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
@Component
|
||||
public class ExecutionStockOutOrderAssembler {
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ExecutionStockOutOrderDO toDO(ExecutionStockOutOrderDTO stockOutOrderDTO) {
|
||||
ExecutionStockOutOrderDO stockOutOrderDO = new ExecutionStockOutOrderDO();
|
||||
// 拷贝
|
||||
BeanUtils.copyProperties(stockOutOrderDTO, stockOutOrderDO, IgnoreNullUtil.getNullPropertyNames(stockOutOrderDTO));
|
||||
// 确保查询条件字段被正确传递(查询条件字段需要明确传递,避免被IgnoreNullUtil忽略)
|
||||
stockOutOrderDO.setCreateTimeStart(stockOutOrderDTO.getCreateTimeStart());
|
||||
stockOutOrderDO.setCreateTimeEnd(stockOutOrderDTO.getCreateTimeEnd());
|
||||
stockOutOrderDO.setAuditTimeStart(stockOutOrderDTO.getAuditTimeStart());
|
||||
stockOutOrderDO.setAuditTimeEnd(stockOutOrderDTO.getAuditTimeEnd());
|
||||
stockOutOrderDO.setTabType(stockOutOrderDTO.getTabType());
|
||||
// 列表筛选:前端常传「名称 (编码)」展示串,库内多为纯名称,去掉末尾括号段再 LIKE
|
||||
if (stockOutOrderDTO.getMaterialName() != null && !stockOutOrderDTO.getMaterialName().isEmpty()) {
|
||||
String normalized = normalizeDetailMaterialNameForQuery(stockOutOrderDTO.getMaterialName());
|
||||
stockOutOrderDO.setMaterialName(normalized.isEmpty()
|
||||
? stockOutOrderDTO.getMaterialName().trim()
|
||||
: normalized);
|
||||
}
|
||||
return stockOutOrderDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换实体
|
||||
*/
|
||||
public ExecutionStockOutOrderDO toDOByEdit(ExecutionStockOutOrderDTO stockOutOrderDTO) {
|
||||
ExecutionStockOutOrderDO stockOutOrderDO = JSONUtil.toBean(JSONUtil.toJsonStr(stockOutOrderDTO), ExecutionStockOutOrderDO.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(stockOutOrderDTO.getOutOrderId() != null){
|
||||
stockOutOrderDO.setUpdateBy(userId);
|
||||
stockOutOrderDO.setUpdateByName(userRealName);
|
||||
stockOutOrderDO.setUpdateTime(new Date());
|
||||
}else {
|
||||
stockOutOrderDO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
stockOutOrderDO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
stockOutOrderDO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
stockOutOrderDO.setCreateBy(userId);
|
||||
stockOutOrderDO.setCreateByName(userRealName);
|
||||
stockOutOrderDO.setCreateTime(new Date());
|
||||
stockOutOrderDO.setUpdateBy(userId);
|
||||
stockOutOrderDO.setUpdateByName(userRealName);
|
||||
stockOutOrderDO.setUpdateTime(new Date());
|
||||
stockOutOrderDO.setDelFlag(1);
|
||||
}
|
||||
return stockOutOrderDO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 去掉物料展示名末尾的「 (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;
|
||||
}
|
||||
|
||||
}
|
||||
+857
@@ -0,0 +1,857 @@
|
||||
package com.mhd.oms.domain.executionStockOutOrder.service;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
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.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.businessDeliveryDetailsLink.entity.BusinessDeliveryDetailsLink;
|
||||
import com.mhd.oms.domain.businessDeliveryDetailsLink.repository.facade.IBusinessDeliveryDetailsLinkService;
|
||||
import com.mhd.oms.domain.businessDeliveryDetailsLink.repository.mapper.BusinessDeliveryDetailsLinkMapper;
|
||||
import com.mhd.oms.domain.businessDocumentOrder.entity.BusinessDocumentOrder;
|
||||
import com.mhd.oms.domain.businessDocumentOrder.repository.mapper.BusinessDocumentOrderMapper;
|
||||
import com.mhd.oms.domain.executeOrder.entity.ExecuteOrder;
|
||||
import com.mhd.oms.domain.executeOrder.repository.mapper.ExecuteOrderMapper;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.entity.ExecutionOutMaterialDetail;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.facade.IExecutionOutMaterialDetailService;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.po.ExecutionOutMaterialDetailPO;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailBaseDO;
|
||||
import com.mhd.oms.domain.executionOutMaterialDetail.repository.todo.ExecutionOutMaterialDetailDO;
|
||||
import com.mhd.oms.domain.executionStockInOrder.entity.ExecutionStockInOrder;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.facade.IExecutionStockInOrderService;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.mapper.ExecutionStockInOrderMapper;
|
||||
import com.mhd.oms.domain.executionStockInOrder.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.entity.ExecutionStockOutOrder;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.facade.IExecutionStockOutOrderService;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.po.ExecutionStockOutOrderPO;
|
||||
import com.mhd.oms.domain.executionStockOutOrder.repository.todo.ExecutionStockOutOrderDO;
|
||||
import com.mhd.oms.domain.reservationDeliveryDetailsLink.entity.ReservationDeliveryDetailsLink;
|
||||
import com.mhd.oms.domain.reservationDeliveryDetailsLink.repository.facade.IReservationDeliveryDetailsLinkService;
|
||||
//import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.system.api.SystemServiceFeign;
|
||||
import com.mhd.system.api.WmsServiceFeign;
|
||||
import com.mhd.system.api.domain.*;
|
||||
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 javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 出库单
|
||||
*
|
||||
* @author gen
|
||||
* @date 2024-05-28
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ExecutionStockOutOrderDomainService {
|
||||
|
||||
@Autowired
|
||||
private IExecutionStockOutOrderService stockOutOrderService;
|
||||
@Autowired
|
||||
private IExecutionOutMaterialDetailService outMaterialDetailService;
|
||||
@Autowired
|
||||
private IReservationDeliveryDetailsLinkService deliveryDetailsLinkService;
|
||||
@Autowired
|
||||
private IExecutionStockInOrderService reservationStockInOrderService;
|
||||
@Autowired
|
||||
private ExecutionStockInOrderMapper reservationStockInOrderMapper;
|
||||
@Autowired
|
||||
private BusinessDocumentOrderMapper businessDocumentOrderMapper;
|
||||
@Autowired
|
||||
private ExecuteOrderMapper executeOrderMapper;
|
||||
|
||||
@Resource
|
||||
private SystemServiceFeign systemServiceFeign;
|
||||
@Resource
|
||||
private WmsServiceFeign wmsServiceFeign;
|
||||
@Autowired
|
||||
private IReservationDeliveryDetailsLinkService reservationDeliveryDetailsLinkService;
|
||||
@Autowired
|
||||
private IBusinessDeliveryDetailsLinkService businessDeliveryDetailsLinkService;
|
||||
@Autowired
|
||||
private BusinessDeliveryDetailsLinkMapper businessDeliveryDetailsLinkMapper;
|
||||
|
||||
/**
|
||||
* 分页查询出库单列表
|
||||
*/
|
||||
public List<ExecutionStockOutOrderPO> queryList(ExecutionStockOutOrderDO stockOutOrderDO) {
|
||||
return stockOutOrderService.queryList(stockOutOrderDO);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增出库单
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insert(ExecutionStockOutOrderDO stockOutOrderDO) {
|
||||
if (stockOutOrderDO.getOutOrderNumber() == null) {
|
||||
stockOutOrderDO.setOutOrderNumber(OrderSequence.getOrderCode("CK"));
|
||||
}
|
||||
// 与 update / batchInsert 一致:前端传计划数量为 quantity,非 outboundQuantity
|
||||
setMaterialDetailInfo(stockOutOrderDO);
|
||||
stockOutOrderDO.setMaterialQuantity(stockOutOrderDO.getMaterialDetailList().size());
|
||||
BigDecimal quantity = stockOutOrderDO.getMaterialDetailList().stream().map(ExecutionOutMaterialDetailDO::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockOutOrderDO.setQuantity(quantity);
|
||||
BigDecimal totalAmount = stockOutOrderDO.getMaterialDetailList().stream().map(ExecutionOutMaterialDetailDO::getTotalAmount).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockOutOrderDO.setAmount(totalAmount);
|
||||
BigDecimal weightLimit = stockOutOrderDO.getMaterialDetailList().stream().map(ExecutionOutMaterialDetailDO::getWeightLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockOutOrderDO.setWeightLimit(weightLimit);
|
||||
BigDecimal volumeLimit = stockOutOrderDO.getMaterialDetailList().stream().map(ExecutionOutMaterialDetailDO::getVolumeLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockOutOrderDO.setVolumeLimit(volumeLimit);
|
||||
// 复核下发状态默认为否(2)
|
||||
if (stockOutOrderDO.getCheckTaskDistribution() == null) {
|
||||
stockOutOrderDO.setCheckTaskDistribution(2);
|
||||
}
|
||||
stockOutOrderService.insert(stockOutOrderDO);
|
||||
List<ReservationDeliveryDetailsLink> reservationDeliveryDetailsLinkList = stockOutOrderDO.getReservationDeliveryDetailsLinkList();
|
||||
if (reservationDeliveryDetailsLinkList != null && !reservationDeliveryDetailsLinkList.isEmpty()){
|
||||
reservationDeliveryDetailsLinkList.forEach(reservationDeliveryDetailsLink -> {
|
||||
reservationDeliveryDetailsLink.setOrderNumber(stockOutOrderDO.getOutOrderNumber());
|
||||
reservationDeliveryDetailsLink.setOrderId(stockOutOrderDO.getOutOrderId());
|
||||
});
|
||||
if (!CollectionUtils.isEmpty(reservationDeliveryDetailsLinkList)) {
|
||||
reservationDeliveryDetailsLinkService.saveBatch(reservationDeliveryDetailsLinkList);
|
||||
}
|
||||
}
|
||||
return outMaterialDetailService.batchInsert(stockOutOrderDO.getOutOrderNumber(), stockOutOrderDO.getMaterialDetailList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量新增出库单
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean batchInsert(List<ExecutionStockOutOrderDO> stockOutOrderDOList) {
|
||||
for (ExecutionStockOutOrderDO stockOutOrderDO : stockOutOrderDOList){
|
||||
if (StringUtils.isBlank(stockOutOrderDO.getOutOrderNumber())){
|
||||
stockOutOrderDO.setOutOrderNumber(OrderSequence.getOrderCode("CK"));
|
||||
}
|
||||
//设置物料信息
|
||||
setMaterialDetailInfo(stockOutOrderDO);
|
||||
//统计种类
|
||||
stockOutOrderDO.setMaterialQuantity(stockOutOrderDO.getMaterialDetailList().size());
|
||||
//统计总数量
|
||||
BigDecimal quantity = stockOutOrderDO.getMaterialDetailList().stream().map(ExecutionOutMaterialDetailDO::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockOutOrderDO.setQuantity(quantity);
|
||||
//统计总重量
|
||||
BigDecimal weightLimit = stockOutOrderDO.getMaterialDetailList().stream().map(ExecutionOutMaterialDetailDO::getWeightLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockOutOrderDO.setWeightLimit(weightLimit);
|
||||
//统计总体积
|
||||
BigDecimal volumeLimit = stockOutOrderDO.getMaterialDetailList().stream().map(ExecutionOutMaterialDetailDO::getVolumeLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockOutOrderDO.setVolumeLimit(volumeLimit);
|
||||
// 复核下发状态默认为否(2)
|
||||
if (stockOutOrderDO.getCheckTaskDistribution() == null) {
|
||||
stockOutOrderDO.setCheckTaskDistribution(2);
|
||||
}
|
||||
stockOutOrderService.insert(stockOutOrderDO);
|
||||
outMaterialDetailService.batchInsert(stockOutOrderDO.getOutOrderNumber(), stockOutOrderDO.getMaterialDetailList());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改出库单
|
||||
*/
|
||||
public Boolean update(ExecutionStockOutOrderDO stockOutOrderDO) {
|
||||
ExecutionStockOutOrderPO stockInOrderPO = stockOutOrderService.getInfo(stockOutOrderDO.getOutOrderId());
|
||||
if (stockInOrderPO == null){
|
||||
throw new ServiceException("出库单信息不存在");
|
||||
}
|
||||
//设置物料信息
|
||||
setMaterialDetailInfo(stockOutOrderDO);
|
||||
//统计种类
|
||||
stockOutOrderDO.setMaterialQuantity(stockOutOrderDO.getMaterialDetailList().size());
|
||||
//统计总数量
|
||||
BigDecimal quantity = stockOutOrderDO.getMaterialDetailList().stream().map(ExecutionOutMaterialDetailDO::getQuantity).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockOutOrderDO.setQuantity(quantity);
|
||||
BigDecimal totalAmount = stockOutOrderDO.getMaterialDetailList().stream().map(ExecutionOutMaterialDetailDO::getTotalAmount).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockOutOrderDO.setAmount(totalAmount);
|
||||
//统计总重量
|
||||
BigDecimal weightLimit = stockOutOrderDO.getMaterialDetailList().stream().map(ExecutionOutMaterialDetailDO::getWeightLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockOutOrderDO.setWeightLimit(weightLimit);
|
||||
//统计总体积
|
||||
BigDecimal volumeLimit = stockOutOrderDO.getMaterialDetailList().stream().map(ExecutionOutMaterialDetailDO::getVolumeLimit).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
stockOutOrderDO.setVolumeLimit(volumeLimit);
|
||||
stockOutOrderService.update(stockOutOrderDO);
|
||||
ExecutionOutMaterialDetailBaseDO outMaterialDetailBaseDO = new ExecutionOutMaterialDetailBaseDO();
|
||||
BeanUtils.copyProperties(stockOutOrderDO, outMaterialDetailBaseDO);
|
||||
outMaterialDetailBaseDO.setOutOrderNumber(stockInOrderPO.getOutOrderNumber());
|
||||
// if (stockOutOrderDO.getNeedTransportFlag() .equals("0")) {
|
||||
// List<BusinessDocumentOrder> businessDocumentOrders = businessDocumentOrderMapper.selectList(new LambdaQueryWrapper<BusinessDocumentOrder>().eq(BusinessDocumentOrder::getInOrderNumber, stockOutOrderDO.getOutOrderNumber()).notIn(BusinessDocumentOrder::getOrderStatus, 4, 5));
|
||||
// if (businessDocumentOrders != null && businessDocumentOrders.size() > 0) {
|
||||
// for (BusinessDocumentOrder businessDocumentOrder : businessDocumentOrders) {
|
||||
// businessDocumentOrder.setOrderStatus(4L);
|
||||
// String executeOrderNumber = businessDocumentOrder.getExecuteOrderNumber();
|
||||
//
|
||||
// if (executeOrderNumber !=null){
|
||||
// throw new ServiceException("该业务单已生成执行单,取消失败");
|
||||
// }
|
||||
// businessDocumentOrderMapper.updateById(businessDocumentOrder);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
List<ReservationDeliveryDetailsLink> reservationDeliveryDetailsLinkList = stockOutOrderDO.getReservationDeliveryDetailsLinkList();
|
||||
List<ReservationDeliveryDetailsLink> oldList = reservationDeliveryDetailsLinkService.list(new LambdaQueryWrapper<ReservationDeliveryDetailsLink>().eq(ReservationDeliveryDetailsLink::getOrderId, stockOutOrderDO.getOutOrderId()));
|
||||
// ====================== 核心:取差值 ======================
|
||||
// 第一步:把新列表的所有id存入Set(O(1)查找,效率最高)
|
||||
if (reservationDeliveryDetailsLinkList != null && !reservationDeliveryDetailsLinkList.isEmpty()
|
||||
&& oldList != null && !oldList.isEmpty()) {
|
||||
Set<Long> newIdSet = reservationDeliveryDetailsLinkList.stream()
|
||||
.map(ReservationDeliveryDetailsLink::getId)
|
||||
.filter(Objects::nonNull) // 过滤null id,避免空指针
|
||||
.collect(Collectors.toSet());
|
||||
// 第二步:筛选出旧列表中 不在新列表里的元素(就是要删除的差值)
|
||||
List<ReservationDeliveryDetailsLink> deleteList = oldList.stream()
|
||||
.filter(oldItem -> !newIdSet.contains(oldItem.getId()))
|
||||
.collect(Collectors.toList());
|
||||
// 第三步:执行删除(如果需要)
|
||||
if (CollUtil.isNotEmpty(deleteList)) {
|
||||
for (ReservationDeliveryDetailsLink reservationDeliveryDetailsLink : deleteList) {
|
||||
reservationDeliveryDetailsLinkService.removeById(reservationDeliveryDetailsLink.getId());
|
||||
}
|
||||
// reservationDeliveryDetailsLinkService.removeByIds(deleteList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!CollectionUtils.isEmpty(reservationDeliveryDetailsLinkList)) {
|
||||
for (ReservationDeliveryDetailsLink reservationDeliveryDetailsLink : reservationDeliveryDetailsLinkList) {
|
||||
reservationDeliveryDetailsLink.setOrderNumber(stockOutOrderDO.getOutOrderNumber());
|
||||
reservationDeliveryDetailsLink.setOrderId(stockOutOrderDO.getOutOrderId());
|
||||
reservationDeliveryDetailsLinkService.saveOrUpdate(reservationDeliveryDetailsLink);
|
||||
}
|
||||
// reservationDeliveryDetailsLinkService.updateBatchById(reservationDeliveryDetailsLinkList);
|
||||
}
|
||||
return outMaterialDetailService.batchUpdate(stockOutOrderDO.getMaterialDetailList(), outMaterialDetailBaseDO);
|
||||
}
|
||||
|
||||
public Boolean close(ExecutionStockOutOrderDO stockOutOrderDO) {
|
||||
ExecutionStockOutOrderPO stockInOrderPO = stockOutOrderService.getInfo(stockOutOrderDO.getOutOrderId());
|
||||
if (stockInOrderPO == null){
|
||||
throw new ServiceException("出库单信息不存在");
|
||||
}
|
||||
|
||||
if (stockInOrderPO.getStatus() != 1){
|
||||
throw new ServiceException("只有已创建状态下能允许关闭出库单");
|
||||
}
|
||||
stockOutOrderDO.setStatus(11);
|
||||
return stockOutOrderService.update(stockOutOrderDO);
|
||||
}
|
||||
|
||||
|
||||
public Boolean pushOutOrder(StockOutOrderTZPD stockOutOrder) {
|
||||
ExecutionStockOutOrder reservationStockOutOrder = new ExecutionStockOutOrder();
|
||||
BeanUtils.copyProperties(stockOutOrder, reservationStockOutOrder);
|
||||
reservationStockOutOrder.setIssueStatus(4);
|
||||
return stockOutOrderService.save(reservationStockOutOrder);
|
||||
}
|
||||
|
||||
public Boolean pushOutOrderDetail(OutMaterialDetailTZPD outMaterialDetail) {
|
||||
ExecutionOutMaterialDetail reservationOutMaterialDetail = new ExecutionOutMaterialDetail();
|
||||
BeanUtils.copyProperties(outMaterialDetail, reservationOutMaterialDetail);
|
||||
return outMaterialDetailService.save(reservationOutMaterialDetail);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 审核出库单
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/21 13:53
|
||||
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean auditState(ExecutionStockOutOrderDO stockOutOrderDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
Integer auditStatus = stockOutOrderDO.getIssueStatus();
|
||||
Integer issueStatus = 0;
|
||||
issueStatus = auditStatus == 2 ? 2 : 3;
|
||||
// 获取用户姓名(优先从UserPo获取,如果为空则使用realname,最后使用username作为兜底)
|
||||
String userRealName = loginUser.getUserPo() != null && loginUser.getUserPo().getUserName() != null
|
||||
? loginUser.getUserPo().getUserName()
|
||||
: (loginUser.getRealname() != null ? loginUser.getRealname() : loginUser.getUsername());
|
||||
return stockOutOrderService.update(null, new UpdateWrapper<ExecutionStockOutOrder>().lambda()
|
||||
.set(ExecutionStockOutOrder::getReservationAuditId, loginUser.getUserid())
|
||||
.set(ExecutionStockOutOrder::getReservationAuditName, userRealName)
|
||||
.set(ExecutionStockOutOrder::getReservationAuditTime, new Date())
|
||||
.set(ExecutionStockOutOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(ExecutionStockOutOrder::getUpdateByName, userRealName)
|
||||
.set(ExecutionStockOutOrder::getUpdateTime, new Date())
|
||||
.set(ExecutionStockOutOrder::getIssueStatus, issueStatus)
|
||||
.in(ExecutionStockOutOrder::getOutOrderId, stockOutOrderDO.getOutOrderIds()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 审核出库单
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/21 13:53
|
||||
* @param stockOutOrderDO
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean issueOrder(ExecutionStockOutOrderDO stockOutOrderDO) {
|
||||
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());
|
||||
boolean update = stockOutOrderService.update(null, new UpdateWrapper<ExecutionStockOutOrder>().lambda()
|
||||
.set(ExecutionStockOutOrder::getIssueId, loginUser.getUserid())
|
||||
.set(ExecutionStockOutOrder::getIssueName, userRealName)
|
||||
.set(ExecutionStockOutOrder::getIssueTime, new Date())
|
||||
//.set(ExecutionStockOutOrder::getIssueStatus, 1)
|
||||
.set(ExecutionStockOutOrder::getUpdateBy, loginUser.getUserid())
|
||||
.set(ExecutionStockOutOrder::getUpdateByName, userRealName)
|
||||
.set(ExecutionStockOutOrder::getUpdateTime, new Date())
|
||||
.in(ExecutionStockOutOrder::getOutOrderId, stockOutOrderDO.getOutOrderIds()));
|
||||
|
||||
//todo下发推送到wms
|
||||
List<Long> inOrderIds = stockOutOrderDO.getOutOrderIds();
|
||||
for (Long inOrderId : inOrderIds) {
|
||||
ExecutionStockOutOrder byId = stockOutOrderService.getById(inOrderId);
|
||||
StockOutOrder stockOutOrder = new StockOutOrder();
|
||||
BeanUtils.copyProperties(byId, stockOutOrder,"outOrderId");
|
||||
wmsServiceFeign.omsOutOrderAdd(stockOutOrder);
|
||||
|
||||
List<ReservationDeliveryDetailsLink> list = deliveryDetailsLinkService.list(new QueryWrapper<ReservationDeliveryDetailsLink>().lambda().eq(ReservationDeliveryDetailsLink::getOrderNumber, byId.getOutOrderNumber()));
|
||||
List<DeliveryDetailsLink> deliveryDetailsLinkList = new ArrayList<>();
|
||||
for (ReservationDeliveryDetailsLink reservationDeliveryDetailsLink : list) {
|
||||
DeliveryDetailsLink deliveryDetailsLink = new DeliveryDetailsLink();
|
||||
BeanUtils.copyProperties(reservationDeliveryDetailsLink, deliveryDetailsLink,"id");
|
||||
deliveryDetailsLink.setOmsId(reservationDeliveryDetailsLink.getId());
|
||||
deliveryDetailsLinkList.add(deliveryDetailsLink);
|
||||
}
|
||||
wmsServiceFeign.omsOutOrderAddDeliveryDetailsLink(deliveryDetailsLinkList);
|
||||
|
||||
|
||||
String inOrderNumber = stockOutOrder.getOutOrderNumber();
|
||||
List<ExecutionOutMaterialDetail> materialDetailList = outMaterialDetailService.list(new QueryWrapper<ExecutionOutMaterialDetail>().lambda().eq(ExecutionOutMaterialDetail::getOutOrderNumber, inOrderNumber));
|
||||
List<OutMaterialDetail> outMaterialDetailList = new ArrayList<>();
|
||||
for (ExecutionOutMaterialDetail reservationOutMaterialDetail : materialDetailList) {
|
||||
OutMaterialDetail outMaterialDetail = new OutMaterialDetail();
|
||||
BeanUtils.copyProperties(reservationOutMaterialDetail, outMaterialDetail,"materialDetailId");
|
||||
outMaterialDetailList.add(outMaterialDetail);
|
||||
}
|
||||
wmsServiceFeign.omsOutOrderAddDetail(outMaterialDetailList);
|
||||
}
|
||||
return update;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 修改出库单
|
||||
* @author ZhouGY
|
||||
* @date 2024/8/8 16:18
|
||||
* @param stockOutOrderDb
|
||||
* @param stockOutOrderPO
|
||||
* @return Boolean
|
||||
*/
|
||||
// public Boolean updateExecutionStockOutOrderByAllocation(ExecutionStockOutOrder stockOutOrderDb, ExecutionStockOutOrderPO stockOutOrderPO, Integer type) {
|
||||
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
// int status = judgeAllocationQuantityByManualAssign(stockOutOrderPO.getAllocationQuantity(), stockOutOrderDb.getQuantity(),type);
|
||||
// BigDecimal allocationQuantity = stockOutOrderDb.getAllocationQuantity();
|
||||
// BigDecimal alreadyAllocationQuantity = stockOutOrderDb.getAlreadyAllocationQuantity() != null
|
||||
// ? stockOutOrderDb.getAlreadyAllocationQuantity()
|
||||
// : BigDecimal.ZERO;
|
||||
// if (type == 2){
|
||||
// //取消分配:stockOutOrderPO.getAllocationQuantity() 和 stockOutOrderPO.getAlreadyAllocationQuantity() 都是要取消的数量
|
||||
// //物料明细层面的验证已经在 batchCancelAssignUpdate 中完成,这里直接使用即可
|
||||
// BigDecimal cancelQuantity = stockOutOrderPO.getAllocationQuantity();
|
||||
// stockOutOrderService.update(null,new UpdateWrapper<ExecutionStockOutOrder>().lambda()
|
||||
// .setSql("allocation_quantity = allocation_quantity - " + cancelQuantity)//取消分配减数量
|
||||
// .eq(ExecutionStockOutOrder::getOutOrderId, stockOutOrderDb.getOutOrderId())
|
||||
// );
|
||||
// BigDecimal cancelAlreadyAllocationQuantity = stockOutOrderPO.getAlreadyAllocationQuantity() != null
|
||||
// ? stockOutOrderPO.getAlreadyAllocationQuantity()
|
||||
// : BigDecimal.ZERO;
|
||||
//
|
||||
// // 取消分配:减少已分配数量
|
||||
// // 注意:如果出库单的 alreadyAllocationQuantity 数据不一致(可能为0),使用 cancelAlreadyAllocationQuantity 作为参考
|
||||
// // 但为了数据一致性,我们仍然从当前值中减去取消的数量
|
||||
// if (alreadyAllocationQuantity.compareTo(cancelAlreadyAllocationQuantity) < 0) {
|
||||
// // 如果出库单的已分配数量小于要取消的数量,说明数据不一致,使用要取消的数量作为基准
|
||||
// alreadyAllocationQuantity = cancelAlreadyAllocationQuantity;
|
||||
// }
|
||||
// alreadyAllocationQuantity = alreadyAllocationQuantity.subtract(cancelQuantity);
|
||||
// // 确保不会变成负数
|
||||
// if (alreadyAllocationQuantity.compareTo(BigDecimal.ZERO) < 0) {
|
||||
// alreadyAllocationQuantity = BigDecimal.ZERO;
|
||||
// }
|
||||
// BigDecimal subtract = stockOutOrderPO.getAlreadyAllocationQuantity().subtract(alreadyAllocationQuantity);
|
||||
// if (subtract.compareTo(BigDecimal.ZERO) == 0) {
|
||||
// status = 2;
|
||||
// } else {
|
||||
// status = 3;
|
||||
// }
|
||||
//// status = judgeAllocationQuantityByManualAssign(stockOutOrderPO.getAllocationQuantity(), stockOutOrderPO.getAlreadyAllocationQuantity(),type);
|
||||
//
|
||||
// }else {
|
||||
// allocationQuantity = stockOutOrderPO.getAllocationQuantity();//直接使用返回的分配数量
|
||||
// alreadyAllocationQuantity = alreadyAllocationQuantity.add(stockOutOrderPO.getAlreadyAllocationQuantity() != null
|
||||
// ? stockOutOrderPO.getAlreadyAllocationQuantity()
|
||||
// : BigDecimal.ZERO);
|
||||
// }
|
||||
// LambdaUpdateWrapper<ExecutionStockOutOrder> wrapper = new UpdateWrapper<ExecutionStockOutOrder>().lambda()
|
||||
// .set(ExecutionStockOutOrder::getStatus, status)
|
||||
// .set(ExecutionStockOutOrder::getAlreadyAllocationQuantity, alreadyAllocationQuantity)
|
||||
// .set(ExecutionStockOutOrder::getUpdateBy, loginUser.getUserid())
|
||||
// .set(ExecutionStockOutOrder::getUpdateByName, loginUser.getUsername())
|
||||
// .set(ExecutionStockOutOrder::getUpdateTime, new Date())
|
||||
// .eq(ExecutionStockOutOrder::getOutOrderId, stockOutOrderDb.getOutOrderId());
|
||||
// if (type != 2){
|
||||
// wrapper.set(ExecutionStockOutOrder::getAllocationQuantity, allocationQuantity);
|
||||
// }
|
||||
// return stockOutOrderService.update(null, wrapper);
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除出库单
|
||||
*/
|
||||
public Boolean delete(Long[] outOrderIds) {
|
||||
return stockOutOrderService.delete(outOrderIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库单详细信息
|
||||
*/
|
||||
public ExecutionStockOutOrderPO getInfo(Long outOrderId) {
|
||||
return stockOutOrderService.getInfo(outOrderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库单详细信息
|
||||
*/
|
||||
public ExecutionStockOutOrderPO getInfoChildren(Long outOrderId) {
|
||||
ExecutionStockOutOrderPO stockOutOrderPO = stockOutOrderService.getInfo(outOrderId);
|
||||
ExecutionOutMaterialDetailDO outMaterialDetailDO = new ExecutionOutMaterialDetailDO();
|
||||
outMaterialDetailDO.setOutOrderNumber(stockOutOrderPO.getOutOrderNumber());
|
||||
List<ExecutionOutMaterialDetailPO> materialDetailPOList = outMaterialDetailService.queryListChildren(outMaterialDetailDO);
|
||||
// for (ExecutionOutMaterialDetailPO outMaterialDetailPO : materialDetailPOList) {
|
||||
// String materialNo = outMaterialDetailPO.getMaterialNo();
|
||||
// List<MaterialBaseInfoPO> materialBaseInfos = materialBaseInfoMapper.selectList(new QueryWrapper<MaterialBaseInfoPO>().lambda().eq(MaterialBaseInfoPO::getMaterialCode, materialNo));
|
||||
// if (!CollectionUtils.isEmpty(materialBaseInfos) && materialBaseInfos.size() > 0) {
|
||||
// outMaterialDetailPO.setCommodityName(materialBaseInfos.get(0).getMaterialNamePO());
|
||||
// outMaterialDetailPO.setMaterialCode(materialBaseInfos.get(0).getMaterialCodePO());
|
||||
// outMaterialDetailPO.setMaterialName(materialBaseInfos.get(0).getMaterialNamePO());
|
||||
// }
|
||||
// }
|
||||
stockOutOrderPO.setMaterialDetailList(materialDetailPOList);
|
||||
return stockOutOrderPO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取出库单详细信息(PDA复核管理查询详情)
|
||||
* 复核场景下与PC端getCheckInfo保持一致,返回拣货下发时的完整数据(树形结构、拣货汇总、批次属性等)
|
||||
*/
|
||||
// public ExecutionStockOutOrderPO getInfoByApp(Long outOrderId) {
|
||||
// ExecutionStockOutOrder stockOutOrder = stockOutOrderService.getById(outOrderId);
|
||||
// if (stockOutOrder == null) {
|
||||
// throw new ServiceException("出库单不存在");
|
||||
// }
|
||||
// // 复核场景:与PC端getCheckInfo保持一致,返回拣货下发的完整数据(含历史记录 status=9 已出库,与列表详情一致)
|
||||
// if (stockOutOrder.getReview() != null && stockOutOrder.getReview() == 1
|
||||
// && stockOutOrder.getStatus() != null && (stockOutOrder.getStatus() == 7 || stockOutOrder.getStatus() == 8 || stockOutOrder.getStatus() == 9)) {
|
||||
// ExecutionStockOutOrderDO stockOutOrderDO = new ExecutionStockOutOrderDO();
|
||||
// stockOutOrderDO.setOutOrderNumber(stockOutOrder.getOutOrderNumber());
|
||||
// ExecutionStockOutOrderPO stockOutOrderPO = getCheckInfo(stockOutOrderDO);
|
||||
// // PDA端需扁平化树形结构,与PC端展开后的展示条数一致(父项+子项全部展开为独立行)
|
||||
// List<ExecutionOutMaterialDetailPO> flattenedList = flattenMaterialDetailTree(stockOutOrderPO.getMaterialDetailList());
|
||||
// stockOutOrderPO.setMaterialDetailList(flattenedList);
|
||||
// if (stockOutOrderPO.getOutMaterialCheckPO() != null) {
|
||||
// stockOutOrderPO.getOutMaterialCheckPO().setCount(flattenedList.size());
|
||||
// }
|
||||
// return stockOutOrderPO;
|
||||
// }
|
||||
// // 非复核场景:保持原有逻辑
|
||||
// ExecutionStockOutOrderPO stockOutOrderPO = stockOutOrderService.getInfo(outOrderId);
|
||||
// ExecutionOutMaterialDetailDO outMaterialDetailDO = new ExecutionOutMaterialDetailDO();
|
||||
// outMaterialDetailDO.setOutOrderNumber(stockOutOrderPO.getOutOrderNumber());
|
||||
// List<ExecutionOutMaterialDetailPO> materialDetailPOList = outMaterialDetailService.queryList(outMaterialDetailDO);
|
||||
// materialDetailPOList.forEach(d -> {
|
||||
// if (d.getWaitCheckQuantity() != null) d.setActualQuantity(d.getWaitCheckQuantity());
|
||||
// });
|
||||
// stockOutOrderPO.setMaterialDetailList(materialDetailPOList);
|
||||
// return stockOutOrderPO;
|
||||
// }
|
||||
|
||||
// @Autowired
|
||||
// private IMaterialBarCodeService materialBarCodeService;
|
||||
|
||||
/**
|
||||
* 获取出库单复核详细信息
|
||||
*/
|
||||
// public ExecutionStockOutOrderPO getCheckInfo(ExecutionStockOutOrderDO stockOutOrderDO) {
|
||||
// String outOrderNumber = stockOutOrderDO.getOutOrderNumber();
|
||||
// ExecutionStockOutOrder stockOutOrder = stockOutOrderService.getOne(new QueryWrapper<ExecutionStockOutOrder>().lambda()
|
||||
// .eq(ExecutionStockOutOrder::getDelFlag, 1)
|
||||
// .eq(ExecutionStockOutOrder::getOutOrderNumber, stockOutOrderDO.getOutOrderNumber()));
|
||||
// if (stockOutOrder == null){
|
||||
// throw new ServiceException("出库单【" + stockOutOrderDO.getOutOrderNumber() + "】不存在");
|
||||
// }
|
||||
// if (stockOutOrder.getReview() != 1){
|
||||
// throw new ServiceException("出库单【" + stockOutOrderDO.getOutOrderNumber() + "】不需要复核");
|
||||
// }
|
||||
// if (stockOutOrder.getStatus() != 7 && stockOutOrder.getStatus() != 8){
|
||||
// throw new ServiceException("出库单【" + stockOutOrderDO.getOutOrderNumber() + "】状态不是拣货完成或复核中");
|
||||
// }
|
||||
// ExecutionStockOutOrderPO stockOutOrderPO = new ExecutionStockOutOrderPO();
|
||||
// BeanUtils.copyProperties(stockOutOrder, stockOutOrderPO);
|
||||
// ExecutionOutMaterialDetailDO outMaterialDetailDO = new ExecutionOutMaterialDetailDO();
|
||||
// outMaterialDetailDO.setOutOrderNumber(stockOutOrderPO.getOutOrderNumber());
|
||||
// List<ExecutionOutMaterialDetailPO> outMaterialDetailPOList = outMaterialDetailService.queryListChildren(outMaterialDetailDO);
|
||||
// for (ExecutionOutMaterialDetailPO outMaterialDetailPO : outMaterialDetailPOList) {//获取物料条形码
|
||||
// List<MaterialBarCodePO> materialBarCodePOList = materialBarCodeService.getInfoByMaterialBaseInfoIds(outMaterialDetailPO.getMaterialBaseInfoId());
|
||||
// if (materialBarCodePOList != null && !materialBarCodePOList.isEmpty()) {
|
||||
// Map<Long, MaterialBarCodePO> collect = materialBarCodePOList.stream()
|
||||
// .collect(Collectors.toMap(
|
||||
// MaterialBarCodePO::getMaterialBaseInfoId,
|
||||
// po -> po,
|
||||
// (existing, replacement) -> existing
|
||||
// ));
|
||||
// MaterialBarCodePO materialBarCodePO = collect.get(outMaterialDetailPO.getMaterialBaseInfoId());
|
||||
// if (materialBarCodePO != null && materialBarCodePO.getBarCode() != null) {
|
||||
// outMaterialDetailPO.setBarCode(materialBarCodePO.getBarCode());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// for (ExecutionOutMaterialDetailPO outMaterialDetailPO : outMaterialDetailPOList) {
|
||||
// outMaterialDetailPO.setMaterialCode(outMaterialDetailPO.getMaterialNo());
|
||||
// outMaterialDetailPO.setMaterialName(outMaterialDetailPO.getCommodityName());
|
||||
// Long uniqueId = outMaterialDetailPO.getUniqueId();
|
||||
// PickingMaterialDetailPO pickingMaterialDetailPO = pickingMaterialDetailService.queryTotalsByOutNumberAndBaseId(uniqueId);
|
||||
// if (ObjectUtils.isNotEmpty(pickingMaterialDetailPO)) {
|
||||
// outMaterialDetailPO.setTotalArea(pickingMaterialDetailPO.getTotalArea());
|
||||
// outMaterialDetailPO.setTotalVolume(pickingMaterialDetailPO.getTotalVolume());
|
||||
// outMaterialDetailPO.setTotalNetWeight(pickingMaterialDetailPO.getTotalNetWeight());
|
||||
// outMaterialDetailPO.setTotalGrossWeight(pickingMaterialDetailPO.getTotalGrossWeight());
|
||||
// outMaterialDetailPO.setCheckArea(pickingMaterialDetailPO.getTotalArea());
|
||||
// outMaterialDetailPO.setCheckVolume(pickingMaterialDetailPO.getTotalVolume());
|
||||
// outMaterialDetailPO.setCheckNetWeight(pickingMaterialDetailPO.getTotalNetWeight());
|
||||
// outMaterialDetailPO.setCheckGrossWeight(pickingMaterialDetailPO.getTotalGrossWeight());
|
||||
// // 拣货数量:优先 picking_material_detail,否则 out_material_detail
|
||||
// BigDecimal pickQty = (pickingMaterialDetailPO.getPickingQuantity() != null && pickingMaterialDetailPO.getPickingQuantity().compareTo(BigDecimal.ZERO) > 0)
|
||||
// ? pickingMaterialDetailPO.getPickingQuantity() : outMaterialDetailPO.getPickingQuantity();
|
||||
// BigDecimal checkQty = outMaterialDetailPO.getCheckQuantity() != null ? outMaterialDetailPO.getCheckQuantity() : BigDecimal.ZERO;
|
||||
// // 待复核数量 = 拣货数量 - 已复核数量(复核提交后应减少)
|
||||
// BigDecimal waitQty = (pickQty != null ? pickQty : BigDecimal.ZERO).subtract(checkQty);
|
||||
// if (waitQty.compareTo(BigDecimal.ZERO) < 0) {
|
||||
// waitQty = BigDecimal.ZERO;
|
||||
// }
|
||||
// outMaterialDetailPO.setWaitCheckQuantity(waitQty);
|
||||
// // quantity=PC下发时的拣货数量,actualQuantity:已复核则取checkQuantity,否则取待复核数量
|
||||
// if (pickQty != null) {
|
||||
// outMaterialDetailPO.setQuantity(pickQty);
|
||||
// }
|
||||
// outMaterialDetailPO.setActualQuantity(checkQty.compareTo(BigDecimal.ZERO) > 0 ? checkQty : waitQty);
|
||||
// }
|
||||
// List<ExecutionOutMaterialDetailPO> children = outMaterialDetailPO.getChildren();
|
||||
// if (!CollectionUtils.isEmpty(children)) {
|
||||
// for (ExecutionOutMaterialDetailPO outMaterialDetailPOChild : children) {
|
||||
// outMaterialDetailPOChild.setMaterialCode(outMaterialDetailPOChild.getMaterialNo());
|
||||
// outMaterialDetailPOChild.setMaterialName(outMaterialDetailPOChild.getCommodityName());
|
||||
// Long uniqueIdChild = outMaterialDetailPOChild.getUniqueId();
|
||||
// PickingMaterialDetailPO pickingMaterialDetailPO1 = pickingMaterialDetailService.queryTotalsByOutNumberAndBaseId(uniqueIdChild);
|
||||
// if (ObjectUtils.isNotEmpty(pickingMaterialDetailPO1)) {
|
||||
// outMaterialDetailPOChild.setTotalArea(pickingMaterialDetailPO1.getTotalArea());
|
||||
// outMaterialDetailPOChild.setTotalVolume(pickingMaterialDetailPO1.getTotalVolume());
|
||||
// outMaterialDetailPOChild.setTotalNetWeight(pickingMaterialDetailPO1.getTotalNetWeight());
|
||||
// outMaterialDetailPOChild.setTotalGrossWeight(pickingMaterialDetailPO1.getTotalGrossWeight());
|
||||
// outMaterialDetailPOChild.setCheckArea(pickingMaterialDetailPO1.getTotalArea());
|
||||
// outMaterialDetailPOChild.setCheckVolume(pickingMaterialDetailPO1.getTotalVolume());
|
||||
// outMaterialDetailPOChild.setCheckNetWeight(pickingMaterialDetailPO1.getTotalNetWeight());
|
||||
// outMaterialDetailPOChild.setCheckGrossWeight(pickingMaterialDetailPO1.getTotalGrossWeight());
|
||||
// // 拣货数量:优先 picking_material_detail,否则 out_material_detail
|
||||
// BigDecimal pickQtyChild = (pickingMaterialDetailPO1.getPickingQuantity() != null && pickingMaterialDetailPO1.getPickingQuantity().compareTo(BigDecimal.ZERO) > 0)
|
||||
// ? pickingMaterialDetailPO1.getPickingQuantity() : outMaterialDetailPOChild.getPickingQuantity();
|
||||
// BigDecimal checkQtyChild = outMaterialDetailPOChild.getCheckQuantity() != null ? outMaterialDetailPOChild.getCheckQuantity() : BigDecimal.ZERO;
|
||||
// // 待复核数量 = 拣货数量 - 已复核数量(复核提交后应减少)
|
||||
// BigDecimal waitQtyChild = (pickQtyChild != null ? pickQtyChild : BigDecimal.ZERO).subtract(checkQtyChild);
|
||||
// if (waitQtyChild.compareTo(BigDecimal.ZERO) < 0) {
|
||||
// waitQtyChild = BigDecimal.ZERO;
|
||||
// }
|
||||
// outMaterialDetailPOChild.setWaitCheckQuantity(waitQtyChild);
|
||||
// // quantity=PC下发时的拣货数量,actualQuantity:已复核则取checkQuantity,否则取待复核数量
|
||||
// if (pickQtyChild != null) {
|
||||
// outMaterialDetailPOChild.setQuantity(pickQtyChild);
|
||||
// }
|
||||
// outMaterialDetailPOChild.setActualQuantity(checkQtyChild.compareTo(BigDecimal.ZERO) > 0 ? checkQtyChild : waitQtyChild);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// stockOutOrderPO.setMaterialDetailList(outMaterialDetailPOList);
|
||||
// BigDecimal weightLimit = BigDecimal.ZERO;
|
||||
// BigDecimal volumeLimit = BigDecimal.ZERO;
|
||||
// BigDecimal wantNumber = BigDecimal.ZERO;
|
||||
// BigDecimal alreadyNumber = BigDecimal.ZERO;
|
||||
// for (ExecutionOutMaterialDetailPO outMaterialDetailPO : outMaterialDetailPOList){
|
||||
// weightLimit = weightLimit.add(outMaterialDetailPO.getWeightLimit());
|
||||
// volumeLimit = volumeLimit.add(outMaterialDetailPO.getVolumeLimit());
|
||||
// // wantNumber=拣货数量总和,alreadyNumber=已复核总和,notHaveNumber=剩余待复核
|
||||
// BigDecimal pickQty = (outMaterialDetailPO.getQuantity() != null ? outMaterialDetailPO.getQuantity() : outMaterialDetailPO.getPickingQuantity());
|
||||
// wantNumber = wantNumber.add(pickQty != null ? pickQty : BigDecimal.ZERO);
|
||||
// alreadyNumber = alreadyNumber.add(outMaterialDetailPO.getCheckQuantity() != null ? outMaterialDetailPO.getCheckQuantity() : BigDecimal.ZERO);
|
||||
// }
|
||||
// OutMaterialCheckPO outMaterialCheckPO = new OutMaterialCheckPO();
|
||||
// outMaterialCheckPO.setCount(outMaterialDetailPOList.size());
|
||||
// outMaterialCheckPO.setWeightLimit(weightLimit);
|
||||
// outMaterialCheckPO.setVolumeLimit(volumeLimit);
|
||||
// outMaterialCheckPO.setAlreadyNumber(alreadyNumber);
|
||||
// outMaterialCheckPO.setNotHaveNumber(wantNumber.subtract(alreadyNumber));
|
||||
// stockOutOrderPO.setOutMaterialCheckPO(outMaterialCheckPO);
|
||||
//
|
||||
// List<ExecutionOutMaterialDetailPO> materialDetailList = stockOutOrderPO.getMaterialDetailList();
|
||||
// // 性能优化:批量获取批次属性,避免N+1查询问题
|
||||
// // 1. 收集所有唯一的materialBaseInfoId
|
||||
// Set<Long> materialBaseInfoIdSet = materialDetailList.stream()
|
||||
// .map(ExecutionOutMaterialDetailPO::getMaterialBaseInfoId)
|
||||
// .filter(Objects::nonNull)
|
||||
// .collect(Collectors.toSet());
|
||||
//
|
||||
// // 2. 批量查询批次属性(使用Map缓存,避免重复查询相同的materialBaseInfoId)
|
||||
// Map<Long, List<BatchDetailFeignPO>> batchDetailMap = new HashMap<>();
|
||||
// for (Long materialBaseInfoId : materialBaseInfoIdSet) {
|
||||
// try {
|
||||
// AjaxResult ajaxResult = systemServiceFeign.getBatchDetailListByMaterialBaseInfoId(materialBaseInfoId);
|
||||
// if (ajaxResult != null && "200".equals(String.valueOf(ajaxResult.get("code")))) {
|
||||
// List<BatchDetailFeignPO> batchDetailFeignPOList = JSON.parseArray(
|
||||
// JSONObject.toJSONString(ajaxResult.get("data")), BatchDetailFeignPO.class);
|
||||
// if (!CollectionUtils.isEmpty(batchDetailFeignPOList)) {
|
||||
// // 过滤isDisplay=1的属性
|
||||
// List<BatchDetailFeignPO> filteredList = batchDetailFeignPOList.stream()
|
||||
// .filter(batchDetail -> batchDetail.getIsDisplay() != null && batchDetail.getIsDisplay() == 1)
|
||||
// .collect(Collectors.toList());
|
||||
// batchDetailMap.put(materialBaseInfoId, filteredList);
|
||||
// }
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// log.warn("获取物料批次属性失败,物料基础信息ID:{},错误:{}", materialBaseInfoId, e.getMessage());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // 3. 为每个物料明细设置更多属性(从库存表中获取值)
|
||||
// setMaterialMoreDetailListFromInventory(materialDetailList, batchDetailMap);
|
||||
// // 过滤无拣货数量的明细:pickingQuantity 或 waitCheckQuantity 任一 >= 1 则保留(waitCheckQuantity 来自 picking_material_detail 已拣货数量)
|
||||
// materialDetailList.removeIf(detail -> {
|
||||
// BigDecimal pickQty = detail.getPickingQuantity() != null ? detail.getPickingQuantity() : BigDecimal.ZERO;
|
||||
// BigDecimal waitQty = detail.getWaitCheckQuantity() != null ? detail.getWaitCheckQuantity() : BigDecimal.ZERO;
|
||||
// return pickQty.compareTo(BigDecimal.ONE) < 0 && waitQty.compareTo(BigDecimal.ONE) < 0;
|
||||
// });
|
||||
// stockOutOrderPO.setMaterialDetailList(materialDetailList);
|
||||
// return stockOutOrderPO;
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 将物料明细树形结构扁平化,PDA端展示与PC端条数一致(父项+子项全部展开为独立行)
|
||||
*/
|
||||
private List<ExecutionOutMaterialDetailPO> flattenMaterialDetailTree(List<ExecutionOutMaterialDetailPO> treeList) {
|
||||
if (CollectionUtils.isEmpty(treeList)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<ExecutionOutMaterialDetailPO> result = new ArrayList<>();
|
||||
for (ExecutionOutMaterialDetailPO item : treeList) {
|
||||
result.add(item);
|
||||
List<ExecutionOutMaterialDetailPO> children = item.getChildren();
|
||||
if (!CollectionUtils.isEmpty(children)) {
|
||||
List<ExecutionOutMaterialDetailPO> flattenedChildren = flattenMaterialDetailTree(children);
|
||||
result.addAll(flattenedChildren);
|
||||
item.setChildren(null);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 修改出库单数据
|
||||
* @author ZhouGY
|
||||
* @date 2024/7/19 22:52
|
||||
* @param stockOutOrderPO
|
||||
* @param stockOutOrderDb
|
||||
* @param type 1-分配 2-取消分配
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean updateExecutionStockOutOrder(ExecutionStockOutOrderPO stockOutOrderPO, ExecutionStockOutOrder stockOutOrderDb, Integer type){
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
ExecutionStockOutOrder stockOutOrder = new ExecutionStockOutOrder();
|
||||
stockOutOrder.setOutOrderId(stockOutOrderDb.getOutOrderId());
|
||||
stockOutOrder.setStatus(8);
|
||||
stockOutOrder.setCheckStatus(2);
|
||||
if (type == 1){
|
||||
stockOutOrder.setCheckQuantity(stockOutOrderDb.getCheckQuantity().add(stockOutOrderPO.getCheckQuantity()));
|
||||
}else {
|
||||
stockOutOrder.setCheckQuantity(stockOutOrderDb.getCheckQuantity().subtract(stockOutOrderPO.getCheckQuantity()));
|
||||
}
|
||||
stockOutOrder.setUpdateBy(loginUser.getUserid());
|
||||
stockOutOrder.setUpdateByName(loginUser.getUsername());
|
||||
stockOutOrder.setUpdateTime(new Date());
|
||||
return stockOutOrderService.updateById(stockOutOrder);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @description 设置物料信息
|
||||
* @author ZhouGY
|
||||
* @date 2024/5/23 14:03
|
||||
* @param stockOutOrderDO
|
||||
*/
|
||||
private void setMaterialDetailInfo(ExecutionStockOutOrderDO stockOutOrderDO){
|
||||
List<ExecutionOutMaterialDetailDO> outMaterialDetailDOList = stockOutOrderDO.getMaterialDetailList();
|
||||
outMaterialDetailDOList.forEach(outMaterialDetailDO -> {
|
||||
// Long materialBaseInfoId = outMaterialDetailDO.getMaterialBaseInfoId();
|
||||
MaterialBaseInfoPO materialBaseInfoPO = reservationStockInOrderMapper.getinfo(outMaterialDetailDO.getMaterialBaseInfoId());
|
||||
if (materialBaseInfoPO == null){
|
||||
throw new ServiceException("物料基础信息不存在");
|
||||
}
|
||||
outMaterialDetailDO.setMaterialCode(materialBaseInfoPO.getMaterialCode());
|
||||
outMaterialDetailDO.setMaterialName(materialBaseInfoPO.getMaterialName());
|
||||
outMaterialDetailDO.setBarCode(materialBaseInfoPO.getBarCode());
|
||||
outMaterialDetailDO.setPackId(materialBaseInfoPO.getPackId());
|
||||
outMaterialDetailDO.setPackCode(materialBaseInfoPO.getPackCode());
|
||||
outMaterialDetailDO.setPackName(materialBaseInfoPO.getPackName());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 出库单提货单打印-表头
|
||||
*/
|
||||
public List<ExecutionStockOutOrderPO> queryOutStockNoticePrint(ExecutionStockOutOrderDO stockOutOrderDO) {
|
||||
return stockOutOrderService.queryOutStockNoticePrint(stockOutOrderDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库单提货单打印-明细
|
||||
*/
|
||||
public List<ExecutionOutMaterialDetailPO> queryOutStockNoticePrintDetail(ExecutionStockOutOrderDO stockOutOrderDO) {
|
||||
return stockOutOrderService.queryOutStockNoticePrintDetail(stockOutOrderDO);
|
||||
}
|
||||
|
||||
public void returnGoods(String invoiceNumber, String transportationNumber, String orderId,String pictureUrl) {
|
||||
reservationStockInOrderMapper.updateByOrderId(orderId);
|
||||
reservationStockInOrderMapper.updateByTransportationNumber(transportationNumber);
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
BusinessDeliveryDetailsLink businessDeliveryDetailsLink = businessDeliveryDetailsLinkService.getOne(new QueryWrapper<BusinessDeliveryDetailsLink>().lambda().eq(BusinessDeliveryDetailsLink::getInvoiceNumber, invoiceNumber), false);
|
||||
if (businessDeliveryDetailsLink != null) {
|
||||
businessDeliveryDetailsLink.setIsReturn(1); // 1表示已退货
|
||||
businessDeliveryDetailsLink.setUpdateBy(loginUser.getUserPo().getUserId());
|
||||
businessDeliveryDetailsLink.setUpdateByName(loginUser.getUserPo().getUserName());
|
||||
businessDeliveryDetailsLink.setUpdateTime(new Date());
|
||||
businessDeliveryDetailsLinkService.updateById(businessDeliveryDetailsLink);
|
||||
// String invoiceNumber1 = businessDeliveryDetailsLink.getInvoiceNumber();
|
||||
List<ReservationDeliveryDetailsLink> list = reservationDeliveryDetailsLinkService.list(new QueryWrapper<ReservationDeliveryDetailsLink>().lambda().eq(ReservationDeliveryDetailsLink::getInvoiceNumber, invoiceNumber));
|
||||
if (list != null && !list.isEmpty() && list.size()>0) {
|
||||
ReservationDeliveryDetailsLink reservationDeliveryDetailsLink = list.get(0);
|
||||
String orderNumber = reservationDeliveryDetailsLink.getOrderNumber();
|
||||
Integer bag = reservationDeliveryDetailsLink.getBag();
|
||||
ExecutionStockOutOrder stockOutOrder = stockOutOrderService.getOne(new QueryWrapper<ExecutionStockOutOrder>().lambda().eq(ExecutionStockOutOrder::getOutOrderNumber, orderNumber), false);
|
||||
if (stockOutOrder != null) {
|
||||
ExecutionStockInOrder reservationStockInOrder = new ExecutionStockInOrder();
|
||||
reservationStockInOrder.setPictureUrl(pictureUrl);
|
||||
reservationStockInOrder.setOrganizationId(stockOutOrder.getOrganizationId());
|
||||
reservationStockInOrder.setOrganizationName(stockOutOrder.getOrganizationName());
|
||||
reservationStockInOrder.setTopOrganizationId(stockOutOrder.getTopOrganizationId());
|
||||
reservationStockInOrder.setShipperId(stockOutOrder.getShipperId());
|
||||
reservationStockInOrder.setShipperName(stockOutOrder.getShipperName());
|
||||
reservationStockInOrder.setShipperCode(stockOutOrder.getShipperCode());
|
||||
reservationStockInOrder.setWarehouseId(stockOutOrder.getWarehouseId());
|
||||
reservationStockInOrder.setWarehouseName(stockOutOrder.getWarehouseName());
|
||||
reservationStockInOrder.setWarehouseCode(stockOutOrder.getWarehouseCode());
|
||||
reservationStockInOrder.setBusinessOrderNo(stockOutOrder.getOutOrderNumber());
|
||||
reservationStockInOrder.setIssueStatus(0);
|
||||
reservationStockInOrder.setCreateTime(new Date());
|
||||
reservationStockInOrder.setCreateBy(loginUser.getUserPo().getUserId());
|
||||
reservationStockInOrder.setCreateByName(loginUser.getUserPo().getUserName());
|
||||
reservationStockInOrder.setStatus(1);
|
||||
reservationStockInOrder.setAuditStatus(1);
|
||||
reservationStockInOrder.setOrderTypeName("退货入库");
|
||||
reservationStockInOrder.setOrderTypeCode("tui_huo_ru_ku");
|
||||
reservationStockInOrder.setBusinessType("tui_huo_ru_ku");
|
||||
reservationStockInOrder.setReservationOrderSource("系统生成");
|
||||
reservationStockInOrder.setQuantity(new BigDecimal(bag));
|
||||
// reservationStockInOrder.setInQuantity(new BigDecimal(bag));
|
||||
reservationStockInOrder.setRemark("发票号: "+invoiceNumber);
|
||||
reservationStockInOrder.setDirectWarehouse(1);
|
||||
reservationStockInOrder.setCloseOrder(2);
|
||||
reservationStockInOrder.setOrderSource(1);
|
||||
reservationStockInOrder.setOrderStatus("新增");
|
||||
reservationStockInOrder.setSalesmanId(loginUser.getUserPo().getUserId().toString());
|
||||
reservationStockInOrder.setSalesmanName(loginUser.getUserPo().getUserName());
|
||||
Random random = new Random();
|
||||
int num = random.nextInt(1000); // 0~999
|
||||
String str = String.format("%03d", num); // 不足三位前面补零
|
||||
reservationStockInOrder.setInOrderNumber("退"+stockOutOrder.getOutOrderNumber()+str);
|
||||
reservationStockInOrderMapper.insert(reservationStockInOrder);
|
||||
reservationDeliveryDetailsLink.setReturnOrderNumber(reservationStockInOrder.getInOrderNumber());
|
||||
reservationDeliveryDetailsLinkService.updateById(reservationDeliveryDetailsLink);
|
||||
reservationDeliveryDetailsLinkService.updateW(reservationStockInOrder.getInOrderNumber(), reservationDeliveryDetailsLink.getOrderNumber());
|
||||
String returnOrderNumber = stockOutOrder.getReturnOrderNumber();
|
||||
if (returnOrderNumber == null) {
|
||||
stockOutOrder.setReturnOrderNumber(reservationStockInOrder.getInOrderNumber());
|
||||
} else {
|
||||
stockOutOrder.setReturnOrderNumber(returnOrderNumber + "," + reservationStockInOrder.getInOrderNumber());
|
||||
}
|
||||
String deliveryName = stockOutOrder.getDeliveryName();
|
||||
if (deliveryName == null) {
|
||||
stockOutOrder.setDeliveryName(reservationDeliveryDetailsLink.getDeliveryName());
|
||||
} else {
|
||||
stockOutOrder.setDeliveryName(deliveryName + "," + reservationDeliveryDetailsLink.getDeliveryName());
|
||||
}
|
||||
String invoiceNumber1 = stockOutOrder.getInvoiceNumber();
|
||||
if (invoiceNumber1 == null) {
|
||||
stockOutOrder.setInvoiceNumber(reservationDeliveryDetailsLink.getInvoiceNumber());
|
||||
} else {
|
||||
stockOutOrder.setInvoiceNumber(invoiceNumber1 + "," + reservationDeliveryDetailsLink.getInvoiceNumber());
|
||||
}
|
||||
String customerNumber = stockOutOrder.getCustomerNumber();
|
||||
if (customerNumber == null) {
|
||||
stockOutOrder.setCustomerNumber(reservationDeliveryDetailsLink.getCustomerNumber());
|
||||
} else {
|
||||
stockOutOrder.setCustomerNumber(customerNumber + "," + reservationDeliveryDetailsLink.getCustomerNumber());
|
||||
}
|
||||
BigDecimal returnQuantity = stockOutOrder.getReturnQuantity();
|
||||
if (returnQuantity == null || returnQuantity.compareTo(BigDecimal.ZERO) == 0) {
|
||||
stockOutOrder.setReturnQuantity(new BigDecimal(bag));
|
||||
} else {
|
||||
stockOutOrder.setReturnQuantity(returnQuantity.add(new BigDecimal(bag)));
|
||||
}
|
||||
stockOutOrderService.updateById(stockOutOrder);
|
||||
//退货数量同步w
|
||||
reservationStockInOrderMapper.updateWmsOut(stockOutOrder.getOutOrderNumber(),stockOutOrder.getReturnQuantity());
|
||||
|
||||
String subOrderId = businessDeliveryDetailsLink.getSubOrderId();
|
||||
BusinessDocumentOrder businessDocumentOrder = businessDocumentOrderMapper.selectOne(new LambdaQueryWrapper<BusinessDocumentOrder>().eq(BusinessDocumentOrder::getId, subOrderId));
|
||||
businessDocumentOrder.setOrderStatus(3L);
|
||||
businessDocumentOrderMapper.updateById(businessDocumentOrder);
|
||||
String executeOrderNumber = businessDocumentOrder.getExecuteOrderNumber();
|
||||
if (executeOrderNumber != null){
|
||||
ExecuteOrder executeOrder = executeOrderMapper.selectOne(new LambdaQueryWrapper<ExecuteOrder>().eq(ExecuteOrder::getGoodsNumber, executeOrderNumber));
|
||||
executeOrder.setInvoiceStatus(1);
|
||||
executeOrder.setInvoiceDate(new Date());
|
||||
executeOrderMapper.updateById(executeOrder);
|
||||
// pictureUrl="123";
|
||||
executeOrderMapper.updateTmsOrderImage(executeOrderNumber,pictureUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user