refactor(入库任务): 增加查询 入库计划明细实例
This commit is contained in:
parent
816085fedc
commit
f62ad17b71
@ -58,6 +58,16 @@ public class WmsInTaskController extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询入库任务列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/open/list")
|
||||||
|
public TableDataInfo openList(WmsInTask wmsInTask) {
|
||||||
|
startPage();
|
||||||
|
List<WmsInTask> list = wmsInTaskService.selectWmsInTaskList(wmsInTask);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出入库任务列表
|
* 导出入库任务列表
|
||||||
*/
|
*/
|
||||||
|
@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||||||
import com.ktg.common.annotation.Excel;
|
import com.ktg.common.annotation.Excel;
|
||||||
import com.ktg.common.core.domain.BaseEntity;
|
import com.ktg.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入库任务对象 WMS_IN_TASK
|
* 入库任务对象 WMS_IN_TASK
|
||||||
*
|
*
|
||||||
@ -129,6 +131,8 @@ public class WmsInTask extends BaseEntity {
|
|||||||
@Excel(name = "入库明细ID")
|
@Excel(name = "入库明细ID")
|
||||||
private Long detailInId;
|
private Long detailInId;
|
||||||
|
|
||||||
|
private List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList;
|
||||||
|
|
||||||
public void setId(Long id) {
|
public void setId(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
@ -289,6 +293,14 @@ public class WmsInTask extends BaseEntity {
|
|||||||
this.materialUnit = materialUnit;
|
this.materialUnit = materialUnit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<WmsInPlanDetailEntity> getWmsInPlanDetailEntityList() {
|
||||||
|
return wmsInPlanDetailEntityList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWmsInPlanDetailEntityList(List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList) {
|
||||||
|
this.wmsInPlanDetailEntityList = wmsInPlanDetailEntityList;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
@ -316,6 +328,7 @@ public class WmsInTask extends BaseEntity {
|
|||||||
.append("materialCode", getMaterialCode())
|
.append("materialCode", getMaterialCode())
|
||||||
.append("materialName", getMaterialName())
|
.append("materialName", getMaterialName())
|
||||||
.append("detailInId", getDetailInId())
|
.append("detailInId", getDetailInId())
|
||||||
|
.append("wmsInPlanDetailEntityList", getWmsInPlanDetailEntityList())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.ktg.mes.wm.service.impl;
|
package com.ktg.mes.wm.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.ktg.common.utils.DateUtils;
|
import com.ktg.common.utils.DateUtils;
|
||||||
@ -8,6 +9,8 @@ import com.ktg.generator.util.MultiModuleCodeGenerator;
|
|||||||
import com.ktg.mes.md.domain.MdItem;
|
import com.ktg.mes.md.domain.MdItem;
|
||||||
import com.ktg.mes.md.mapper.MdItemMapper;
|
import com.ktg.mes.md.mapper.MdItemMapper;
|
||||||
import com.ktg.mes.md.service.IMdItemService;
|
import com.ktg.mes.md.service.IMdItemService;
|
||||||
|
import com.ktg.mes.wm.domain.WmsInPlanDetailEntity;
|
||||||
|
import com.ktg.mes.wm.service.IWmsInPlanDetailEntityService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ktg.mes.wm.mapper.WmsInTaskMapper;
|
import com.ktg.mes.wm.mapper.WmsInTaskMapper;
|
||||||
@ -24,9 +27,10 @@ import com.ktg.mes.wm.service.IWmsInTaskService;
|
|||||||
public class WmsInTaskServiceImpl implements IWmsInTaskService {
|
public class WmsInTaskServiceImpl implements IWmsInTaskService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private WmsInTaskMapper wmsInTaskMapper;
|
private WmsInTaskMapper wmsInTaskMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MdItemMapper mdItemMapper;
|
private MdItemMapper mdItemMapper;
|
||||||
|
@Autowired
|
||||||
|
private IWmsInPlanDetailEntityService wmsInPlanDetailEntityService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询入库任务
|
* 查询入库任务
|
||||||
@ -51,6 +55,11 @@ public class WmsInTaskServiceImpl implements IWmsInTaskService {
|
|||||||
wmsInTaskMapper.selectWmsInTaskList(wmsInTask).forEach(task -> {
|
wmsInTaskMapper.selectWmsInTaskList(wmsInTask).forEach(task -> {
|
||||||
MdItem mdItem = mdItemMapper.selectMdItemByCode(task.getMaterialCode());
|
MdItem mdItem = mdItemMapper.selectMdItemByCode(task.getMaterialCode());
|
||||||
task.setMaterialName(mdItem.getItemName());
|
task.setMaterialName(mdItem.getItemName());
|
||||||
|
|
||||||
|
WmsInPlanDetailEntity wmsInPlanDetailEntityQuery = new WmsInPlanDetailEntity();
|
||||||
|
wmsInPlanDetailEntityQuery.setPlanDetailsId(task.getDetailInId());
|
||||||
|
List<WmsInPlanDetailEntity> wmsInPlanDetailEntityList = wmsInPlanDetailEntityService.selectWmsInPlanDetailEntityList(wmsInPlanDetailEntityQuery);
|
||||||
|
task.setWmsInPlanDetailEntityList(wmsInPlanDetailEntityList);
|
||||||
wmsInTaskList.add(task);
|
wmsInTaskList.add(task);
|
||||||
});
|
});
|
||||||
return wmsInTaskList;
|
return wmsInTaskList;
|
||||||
|
Loading…
Reference in New Issue
Block a user