feat(入库计划明细实例): 增加库房信息

This commit is contained in:
LJW 2024-11-19 08:38:25 +08:00
parent 7cf4ad5510
commit 41b78fa0af
2 changed files with 54 additions and 18 deletions

View File

@ -18,43 +18,36 @@ public class WmsInPlanDetailEntity extends BaseEntity {
* $column.columnComment
*/
private Long id;
/**
* 入库计划ID
*/
@Excel(name = "入库计划ID")
private Long planId;
/**
* 入库计划明细ID
*/
@Excel(name = "入库计划明细ID")
private Long planDetailsId;
/**
* 来源
*/
@Excel(name = "来源")
private String source;
/**
* 台账ID
*/
@Excel(name = "台账ID")
private Long knifeId;
/**
* rfid
*/
@Excel(name = "rfid")
private String rfid;
/**
* 消耗寿命
*/
@Excel(name = "消耗寿命")
private Integer consumeLife;
/**
* 入库计划编码
*/
@ -71,7 +64,6 @@ public class WmsInPlanDetailEntity extends BaseEntity {
* 入库计划类型
*/
private String planType;
/**
* 库位编码
*/
@ -85,6 +77,11 @@ public class WmsInPlanDetailEntity extends BaseEntity {
*/
private String detailBatch;
private String warehouseName;
private String warehouseCode;
private String warehouseTypeName;
private String warehouseTypeCode;
public void setId(Long id) {
this.id = id;
}
@ -197,6 +194,38 @@ public class WmsInPlanDetailEntity extends BaseEntity {
this.detailBatch = detailBatch;
}
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public String getWarehouseCode() {
return warehouseCode;
}
public void setWarehouseCode(String warehouseCode) {
this.warehouseCode = warehouseCode;
}
public String getWarehouseTypeName() {
return warehouseTypeName;
}
public void setWarehouseTypeName(String warehouseTypeName) {
this.warehouseTypeName = warehouseTypeName;
}
public String getWarehouseTypeCode() {
return warehouseTypeCode;
}
public void setWarehouseTypeCode(String warehouseTypeCode) {
this.warehouseTypeCode = warehouseTypeCode;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@ -208,6 +237,10 @@ public class WmsInPlanDetailEntity extends BaseEntity {
.append("planType", getPlanType())
.append("cellCode", getCellCode())
.append("cellName", getCellName())
.append("warehouseName", getWarehouseName())
.append("warehouseCode", getWarehouseCode())
.append("warehouseTypeName", getWarehouseTypeName())
.append("warehouseTypeCode", getWarehouseTypeCode())
.append("detailBatch", getDetailBatch())
.append("planDetailsId", getPlanDetailsId())
.append("source", getSource())

View File

@ -5,15 +5,10 @@ import java.util.*;
import com.ktg.common.utils.DateUtils;
import com.ktg.mes.md.domain.WmsBusinessType;
import com.ktg.mes.md.mapper.WmsBusinessTypeMapper;
import com.ktg.mes.wm.domain.WmStorageArea;
import com.ktg.mes.wm.domain.WmsInPlan;
import com.ktg.mes.wm.domain.WmsInPlanDetails;
import com.ktg.mes.wm.mapper.WmStorageAreaMapper;
import com.ktg.mes.wm.mapper.WmsInPlanMapper;
import com.ktg.mes.wm.domain.*;
import com.ktg.mes.wm.mapper.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktg.mes.wm.mapper.WmsInPlanDetailEntityMapper;
import com.ktg.mes.wm.domain.WmsInPlanDetailEntity;
import com.ktg.mes.wm.service.IWmsInPlanDetailEntityService;
/**
@ -26,15 +21,16 @@ import com.ktg.mes.wm.service.IWmsInPlanDetailEntityService;
public class WmsInPlanDetailEntityServiceImpl implements IWmsInPlanDetailEntityService {
@Autowired
private WmsInPlanDetailEntityMapper wmsInPlanDetailEntityMapper;
@Autowired
private WmsInPlanMapper wmsInPlanMapper;
@Autowired
private WmsBusinessTypeMapper wmsBusinessTypeMapper;
@Autowired
private WmStorageAreaMapper wmStorageAreaMapper;
@Autowired
private WmStorageLocationMapper wmStorageLocationMapper;
@Autowired
private WmWarehouseMapper wmWarehouseMapper;
/**
* 查询入库计划明细实体
@ -83,6 +79,13 @@ public class WmsInPlanDetailEntityServiceImpl implements IWmsInPlanDetailEntityS
// 设置库位信息
entity.setCellCode(wmStorageArea.getAreaCode());
entity.setCellName(wmStorageArea.getAreaName());
// 查询库区信息
WmStorageLocation wmStorageLocation = wmStorageLocationMapper.selectWmStorageLocationByLocationId(wmStorageArea.getLocationId());
// 查询库房信息
WmWarehouse wmWarehouse = wmWarehouseMapper.selectWmWarehouseByWarehouseId(wmStorageLocation.getWarehouseId());
entity.setWarehouseCode(wmWarehouse.getWarehouseCode());
entity.setWarehouseName(wmWarehouse.getWarehouseName());
entity.setWarehouseTypeCode(wmWarehouse.getAttr2());
}
}