oms修改;
This commit is contained in:
+4
@@ -2,7 +2,9 @@ package com.mhd.oms.domain.reservationInMaterialDetail.repository.facade;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.entity.ReservationInMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.QueryOrderOverStockDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -59,4 +61,6 @@ public interface IReservationInMaterialDetailService extends IService<Reservatio
|
||||
* 查询物料明细
|
||||
*/
|
||||
public com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO getInfo(Long materialDetailId);
|
||||
|
||||
public List<InventoryAdjustmentRecordPO> getkctzjl(Long materialBaseInfoId, String orderNumber, String adjustType);
|
||||
}
|
||||
+4
@@ -2,7 +2,9 @@ package com.mhd.oms.domain.reservationInMaterialDetail.repository.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.entity.ReservationInMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.QueryOrderOverStockDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -24,4 +26,6 @@ public interface ReservationInMaterialDetailMapper extends BaseMapper<Reservatio
|
||||
*/
|
||||
public List<com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO> queryInOrderList(QueryOrderOverStockDO queryOrderOverStockDO);
|
||||
|
||||
public List<InventoryAdjustmentRecordPO> getkctzjl(@Param("materialBaseInfoId") Long materialBaseInfoId, @Param("orderNumber") String orderNumber, @Param("adjustType") String adjustType);
|
||||
|
||||
}
|
||||
+7
-4
@@ -12,6 +12,7 @@ import com.mhd.oms.domain.reservationInMaterialDetail.entity.ReservationInMateri
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.facade.IReservationInMaterialDetailService;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.mapper.ReservationInMaterialDetailMapper;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.QueryOrderOverStockDO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailBaseDO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO;
|
||||
@@ -21,10 +22,7 @@ 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.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -273,4 +271,9 @@ public class ReservationInMaterialDetailImpl extends ServiceImpl<ReservationInMa
|
||||
return inMaterialDetailPO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InventoryAdjustmentRecordPO> getkctzjl(Long materialBaseInfoId, String orderNumber, String adjustType) {
|
||||
return inMaterialDetailMapper.getkctzjl(materialBaseInfoId, orderNumber, adjustType);
|
||||
}
|
||||
|
||||
}
|
||||
+58
@@ -410,4 +410,62 @@ public class ReservationInMaterialDetailPO extends ReservationStockInOrderBasePO
|
||||
@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;
|
||||
|
||||
}
|
||||
+255
@@ -0,0 +1,255 @@
|
||||
package com.mhd.oms.domain.reservationInMaterialDetail.repository.todo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mhd.common.core.annotation.Excel;
|
||||
import com.mhd.common.core.web.domain.BaseVOEntity;
|
||||
//import com.mhd.wms.domain.materialMoreDetail.repository.po.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;
|
||||
|
||||
|
||||
/**
|
||||
* 库存调整记录对象 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")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date productionDate;
|
||||
|
||||
@ApiModelProperty("过期日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "过期日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date expiryDate;
|
||||
|
||||
@ApiModelProperty("存货日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "存货日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date inventoryDate;
|
||||
|
||||
@ApiModelProperty("ExtAttr3")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr3", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr3;
|
||||
|
||||
@ApiModelProperty("ExtAttr4")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "ExtAttr4", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date extAttr4;
|
||||
//
|
||||
// @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;
|
||||
}
|
||||
+58
@@ -370,4 +370,62 @@ public class ReservationInMaterialDetailDO extends ReservationStockInOrderBaseDO
|
||||
@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;
|
||||
}
|
||||
+57
@@ -378,4 +378,61 @@ public class ReservationInMaterialDetailDTO extends BaseVOEntity {
|
||||
@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;
|
||||
}
|
||||
+58
@@ -525,4 +525,62 @@ public class ReservationOutMaterialDetailPO extends ReservationStockOutOrderBase
|
||||
@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;
|
||||
}
|
||||
+58
@@ -472,4 +472,62 @@ public class ReservationOutMaterialDetailDO extends BaseVOEntity {
|
||||
@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;
|
||||
}
|
||||
+58
@@ -462,4 +462,62 @@ public class ReservationOutMaterialDetailDTO extends BaseVOEntity {
|
||||
@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;
|
||||
}
|
||||
+24
-3
@@ -13,6 +13,7 @@ import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.entity.ReservationInMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.facade.IReservationInMaterialDetailService;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.po.ReservationInMaterialDetailPO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailBaseDO;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.ReservationInMaterialDetailDO;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.entity.ReservationStockInOrder;
|
||||
@@ -186,7 +187,8 @@ public class ReservationStockInOrderDomainService {
|
||||
{
|
||||
ReservationStockInOrderPO stockInOrderPO = stockInOrderService.getInfo(inOrderId);
|
||||
ReservationInMaterialDetailDO inMaterialDetailDO = new ReservationInMaterialDetailDO();
|
||||
inMaterialDetailDO.setInOrderNumber(stockInOrderPO.getInOrderNumber());
|
||||
String inOrderNumber = stockInOrderPO.getInOrderNumber();
|
||||
inMaterialDetailDO.setInOrderNumber(inOrderNumber);
|
||||
inMaterialDetailDO.setLevel(1);
|
||||
List<ReservationInMaterialDetailPO> inMaterialDetailPOList = materialDetailService.queryList(inMaterialDetailDO);
|
||||
|
||||
@@ -258,6 +260,25 @@ public class ReservationStockInOrderDomainService {
|
||||
for (ReservationInMaterialDetailPO 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());
|
||||
}
|
||||
// 填充收货数量(入库单对应的收货单实际收货数量)
|
||||
//ReceiptMaterialDetailPO receiptDetail = receiptDetailMap.get(materialDetailId);
|
||||
// if (receiptDetail != null) {
|
||||
@@ -400,14 +421,14 @@ public class ReservationStockInOrderDomainService {
|
||||
for (Long inOrderId : inOrderIds) {
|
||||
ReservationStockInOrder byId = stockInOrderService.getById(inOrderId);
|
||||
StockInOrder stockInOrder = new StockInOrder();
|
||||
BeanUtils.copyProperties(byId, stockInOrder);
|
||||
BeanUtils.copyProperties(byId, stockInOrder,"inOrderId");
|
||||
wmsServiceFeign.omsInOrderAdd(stockInOrder);
|
||||
String inOrderNumber = stockInOrder.getInOrderNumber();
|
||||
List<ReservationInMaterialDetail> materialDetailList = materialDetailService.list(new QueryWrapper<ReservationInMaterialDetail>().lambda().eq(ReservationInMaterialDetail::getInOrderNumber, inOrderNumber));
|
||||
List<InMaterialDetail> inMaterialDetailList = new ArrayList<>();
|
||||
for (ReservationInMaterialDetail reservationInMaterialDetail : materialDetailList) {
|
||||
InMaterialDetail inMaterialDetail = new InMaterialDetail();
|
||||
BeanUtils.copyProperties(reservationInMaterialDetail, inMaterialDetail);
|
||||
BeanUtils.copyProperties(reservationInMaterialDetail, inMaterialDetail,"materialDetailId");
|
||||
inMaterialDetailList.add(inMaterialDetail);
|
||||
}
|
||||
wmsServiceFeign.omsInOrderAddDetail(inMaterialDetailList);
|
||||
|
||||
+54
-27
@@ -16,12 +16,15 @@ import com.mhd.common.core.utils.bean.BeanUtils;
|
||||
import com.mhd.common.core.utils.uuid.IdGenerator;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.security.utils.SecurityUtils;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.facade.IReservationInMaterialDetailService;
|
||||
import com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.InventoryAdjustmentRecordPO;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.entity.ReservationOutMaterialDetail;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.repository.facade.IReservationOutMaterialDetailService;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.repository.po.ReservationOutMaterialDetailPO;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.repository.todo.ReservationOutMaterialDetailDO;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.repository.po.OutMaterialCheckPO;
|
||||
import com.mhd.oms.domain.reservationOutMaterialDetail.service.ReservationOutMaterialDetailDomainService;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.facade.IReservationStockInOrderService;
|
||||
import com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDO;
|
||||
import com.mhd.oms.domain.reservationStockOutOrder.entity.ReservationStockOutOrder;
|
||||
import com.mhd.oms.domain.reservationStockOutOrder.repository.facade.IReservationStockOutOrderService;
|
||||
@@ -69,6 +72,8 @@ public class ReservationStockOutOrderApplicationService {
|
||||
@Autowired
|
||||
private IReservationStockOutOrderService stockOutOrderService;
|
||||
@Autowired
|
||||
private IReservationInMaterialDetailService reservationInMaterialDetailService;
|
||||
@Autowired
|
||||
private IReservationOutMaterialDetailService outMaterialDetailService;
|
||||
// @Autowired
|
||||
// private IPickingMaterialDetailService pickingMaterialDetailService;
|
||||
@@ -246,40 +251,62 @@ public class ReservationStockOutOrderApplicationService {
|
||||
}
|
||||
|
||||
List<ReservationOutMaterialDetailPO> detailList = stockOutOrderPO.getMaterialDetailList();
|
||||
|
||||
// 性能优化:批量获取批次属性,避免N+1查询问题
|
||||
// 1. 收集所有唯一的materialBaseInfoId
|
||||
Set<Long> materialBaseInfoIdSet = detailList.stream()
|
||||
.map(ReservationOutMaterialDetailPO::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());
|
||||
String outOrderNumber = stockOutOrderPO.getOutOrderNumber();
|
||||
for (ReservationOutMaterialDetailPO reservationOutMaterialDetailPO : detailList) {
|
||||
Long materialBaseInfoId = reservationOutMaterialDetailPO.getMaterialBaseInfoId();
|
||||
List<InventoryAdjustmentRecordPO> inventoryAdjustmentRecordPOS = reservationInMaterialDetailService.getkctzjl(materialBaseInfoId, outOrderNumber, "出库");
|
||||
if (inventoryAdjustmentRecordPOS != null && inventoryAdjustmentRecordPOS.size() > 0) {
|
||||
InventoryAdjustmentRecordPO inventoryAdjustmentRecordPO = inventoryAdjustmentRecordPOS.get(0);
|
||||
reservationOutMaterialDetailPO.setAllocationBeforeQuantity(inventoryAdjustmentRecordPO.getAllocationBeforeQuantity());
|
||||
reservationOutMaterialDetailPO.setAllocationAfterQuantity(inventoryAdjustmentRecordPO.getAllocationAfterQuantity());
|
||||
reservationOutMaterialDetailPO.setFreezeAfterQuantity(inventoryAdjustmentRecordPO.getFreezeAfterQuantity());
|
||||
reservationOutMaterialDetailPO.setFreezeBeforeQuantity(inventoryAdjustmentRecordPO.getFreezeBeforeQuantity());
|
||||
reservationOutMaterialDetailPO.setInventoryAfterQuantity(inventoryAdjustmentRecordPO.getInventoryAfterQuantity());
|
||||
reservationOutMaterialDetailPO.setInventoryBeforeQuantity(inventoryAdjustmentRecordPO.getInventoryBeforeQuantity());
|
||||
reservationOutMaterialDetailPO.setNetWeight(inventoryAdjustmentRecordPO.getNetWeight());
|
||||
reservationOutMaterialDetailPO.setGrossWeight(inventoryAdjustmentRecordPO.getGrossWeight());
|
||||
reservationOutMaterialDetailPO.setVolume(inventoryAdjustmentRecordPO.getVolume());
|
||||
reservationOutMaterialDetailPO.setArea(inventoryAdjustmentRecordPO.getArea());
|
||||
reservationOutMaterialDetailPO.setAdjustedNetWeight(inventoryAdjustmentRecordPO.getAdjustedNetWeight());
|
||||
reservationOutMaterialDetailPO.setAdjustedGrossWeight(inventoryAdjustmentRecordPO.getAdjustedGrossWeight());
|
||||
reservationOutMaterialDetailPO.setAdjustedVolume(inventoryAdjustmentRecordPO.getAdjustedVolume());
|
||||
reservationOutMaterialDetailPO.setAdjustedArea(inventoryAdjustmentRecordPO.getAdjustedArea());
|
||||
}
|
||||
}
|
||||
//
|
||||
// // 性能优化:批量获取批次属性,避免N+1查询问题
|
||||
// // 1. 收集所有唯一的materialBaseInfoId
|
||||
// Set<Long> materialBaseInfoIdSet = detailList.stream()
|
||||
// .map(ReservationOutMaterialDetailPO::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. 为每个物料明细设置更多属性(从物料明细表中获取值),递归处理所有层级
|
||||
//setMaterialMoreDetailListRecursively(detailList, batchDetailMap);
|
||||
|
||||
// 4. 为每个物料明细设置分配按钮显示类型,递归处理所有层级
|
||||
setAllocationButtonTypeRecursively(detailList);
|
||||
//setAllocationButtonTypeRecursively(detailList);
|
||||
|
||||
// 5. 出库交接场景(已出库/已复核):过滤 pickingQuantity 为 0 的明细,与交接详情一致
|
||||
// if (stockOutOrderPO.getStatus() != null && (stockOutOrderPO.getStatus() == 9 || stockOutOrderPO.getStatus() == 12)) {
|
||||
|
||||
+2
-2
@@ -256,14 +256,14 @@ public class ReservationStockOutOrderDomainService {
|
||||
for (Long inOrderId : inOrderIds) {
|
||||
ReservationStockOutOrder byId = stockOutOrderService.getById(inOrderId);
|
||||
StockOutOrder stockOutOrder = new StockOutOrder();
|
||||
BeanUtils.copyProperties(byId, stockOutOrder);
|
||||
BeanUtils.copyProperties(byId, stockOutOrder,"outOrderId");
|
||||
wmsServiceFeign.omsOutOrderAdd(stockOutOrder);
|
||||
String inOrderNumber = stockOutOrder.getOutOrderNumber();
|
||||
List<ReservationOutMaterialDetail> materialDetailList = outMaterialDetailService.list(new QueryWrapper<ReservationOutMaterialDetail>().lambda().eq(ReservationOutMaterialDetail::getOutOrderNumber, inOrderNumber));
|
||||
List<OutMaterialDetail> outMaterialDetailList = new ArrayList<>();
|
||||
for (ReservationOutMaterialDetail reservationOutMaterialDetail : materialDetailList) {
|
||||
OutMaterialDetail outMaterialDetail = new OutMaterialDetail();
|
||||
BeanUtils.copyProperties(reservationOutMaterialDetail, outMaterialDetail);
|
||||
BeanUtils.copyProperties(reservationOutMaterialDetail, outMaterialDetail,"materialDetailId");
|
||||
outMaterialDetailList.add(outMaterialDetail);
|
||||
}
|
||||
wmsServiceFeign.omsOutOrderAddDetail(outMaterialDetailList);
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import java.util.List;
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/stockOutOrderApi")
|
||||
@RequestMapping("/reservationStockOutOrderApi")
|
||||
public class ReservationStockOutOrderApi extends BaseController {
|
||||
@Autowired
|
||||
private ReservationStockOutOrderApplicationService stockOutOrderApplicationService;
|
||||
|
||||
+4
@@ -336,4 +336,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="joinStockInOrderPoWhere"/>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getkctzjl" resultType="com.mhd.oms.domain.reservationInMaterialDetail.repository.todo.InventoryAdjustmentRecordPO">
|
||||
select * from "NGWL_TEST_WMS".INVENTORY_ADJUSTMENT_RECORD where MATERIAL_BASE_INFO_ID = #{materialBaseInfoId} and RELATE_NO = #{orderNumber} and ADJUST_TYPE = #{adjustType}
|
||||
</select>
|
||||
</mapper>
|
||||
+3
-1
@@ -42,4 +42,6 @@ public interface IHandoverTaskOrderService extends IService<HandoverTaskOrder>
|
||||
public HandoverTaskOrderPO getInfo(Long outTaskOrderId);
|
||||
|
||||
boolean taskDistribution(HandoverTaskOrderDO handoverTaskOrderDO);
|
||||
}
|
||||
|
||||
public void updateOmsOrder(String orderNumber, Integer status);
|
||||
}
|
||||
+4
-1
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.entity.HandoverTaskOrder;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.repository.po.HandoverTaskOrderPO;
|
||||
import com.mhd.wms.domain.handoverTaskOrder.repository.todo.HandoverTaskOrderDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -20,4 +21,6 @@ public interface HandoverTaskOrderMapper extends BaseMapper<HandoverTaskOrder>
|
||||
*/
|
||||
public List<HandoverTaskOrderPO> queryList(HandoverTaskOrderDO handoverTaskOrderDO);
|
||||
|
||||
}
|
||||
public void updateOmsOrder(@Param("orderNumber") String orderNumber, @Param("status") Integer status);
|
||||
|
||||
}
|
||||
+6
-1
@@ -86,6 +86,11 @@ public class HandoverTaskOrderImpl extends ServiceImpl<HandoverTaskOrderMapper,
|
||||
return handoverTaskOrderPO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateOmsOrder(String orderNumber, Integer status) {
|
||||
handoverTaskOrderMapper.updateOmsOrder(orderNumber, status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean taskDistribution(HandoverTaskOrderDO handoverTaskOrderDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
@@ -113,4 +118,4 @@ public class HandoverTaskOrderImpl extends ServiceImpl<HandoverTaskOrderMapper,
|
||||
return i > 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+12
@@ -287,6 +287,10 @@ public class HandoverTaskOrderDomainService {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
//修改库存
|
||||
xgkc(handoverTaskOrderIds,loginUser);
|
||||
//推送oms
|
||||
for (Long handoverTaskOrderId : handoverTaskOrderIds) {
|
||||
pushOms(handoverTaskOrderId);
|
||||
}
|
||||
return handoverTaskOrderService.update(null, new UpdateWrapper<HandoverTaskOrder>().lambda()
|
||||
.set(HandoverTaskOrder::getStatus, 2)
|
||||
.set(HandoverTaskOrder::getUpdateBy, loginUser.getUserid())
|
||||
@@ -296,6 +300,14 @@ public class HandoverTaskOrderDomainService {
|
||||
);
|
||||
}
|
||||
|
||||
private void pushOms(Long handoverTaskOrderId) {
|
||||
HandoverTaskOrder handoverTaskOrder = handoverTaskOrderService.getById(handoverTaskOrderId);
|
||||
if (handoverTaskOrder != null) {
|
||||
handoverTaskOrderService.updateOmsOrder(handoverTaskOrder.getOrderNumber(),4);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public synchronized void xgkc(List<Long> handoverTaskOrderIds,LoginUser loginUser) {
|
||||
for (Long handoverTaskOrderId : handoverTaskOrderIds) {
|
||||
HandoverTaskOrder handoverTaskOrder = handoverTaskOrderService.getById(handoverTaskOrderId);
|
||||
|
||||
+4
-1
@@ -45,4 +45,7 @@ public interface IStockShelfOrderService extends IService<StockShelfOrder>
|
||||
* 查询上架单
|
||||
*/
|
||||
public StockShelfOrderPO getInfo(Long shelfOrderId);
|
||||
}
|
||||
|
||||
|
||||
public void updateOmsOrder(String orderNumber, Integer status);
|
||||
}
|
||||
+4
-1
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mhd.wms.domain.stockShelfOrder.entity.StockShelfOrder;
|
||||
import com.mhd.wms.domain.stockShelfOrder.repository.po.StockShelfOrderPO;
|
||||
import com.mhd.wms.domain.stockShelfOrder.repository.todo.StockShelfOrderDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -20,4 +21,6 @@ public interface StockShelfOrderMapper extends BaseMapper<StockShelfOrder>
|
||||
*/
|
||||
public List<StockShelfOrderPO> queryList(StockShelfOrderDO stockShelfOrderDO);
|
||||
|
||||
}
|
||||
public void updateOmsOrder(@Param("orderNumber") String orderNumber, @Param("status") Integer status);
|
||||
|
||||
}
|
||||
+6
-1
@@ -107,6 +107,11 @@ public class StockShelfOrderImpl extends ServiceImpl<StockShelfOrderMapper, Stoc
|
||||
return stockShelfOrderPOList.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateOmsOrder(String orderNumber, Integer status) {
|
||||
stockShelfOrderMapper.updateOmsOrder(orderNumber, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 更新订单任务下发状态
|
||||
* @author ZhouGY
|
||||
@@ -128,4 +133,4 @@ public class StockShelfOrderImpl extends ServiceImpl<StockShelfOrderMapper, Stoc
|
||||
.set(StockShelfOrder::getUpdateTime, new Date())
|
||||
.eq(StockShelfOrder::getShelfOrderNumber, deliveTaskDO.getTrackingNumber()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -148,4 +148,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<update id="updateOmsOrder" parameterType="java.lang.String">
|
||||
update "NGWL_TEST_OMS".RESERVATION_STOCK_OUT_ORDER set ISSUE_STATUS = #{status} where OUT_ORDER_NUMBER = #{orderNumber}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -124,4 +124,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<update id="updateOmsOrder" parameterType="java.lang.String">
|
||||
update "NGWL_TEST_OMS".RESERVATION_STOCK_IN_ORDER set ISSUE_STATUS = #{status} where IN_ORDER_NUMBER = #{orderNumber}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user