完成出库任务公开列表增加台账实体数据

This commit is contained in:
刘名喜 2024-12-16 11:12:18 +08:00
parent dab8541b37
commit e6b8cbc848
2 changed files with 66 additions and 5 deletions

View File

@ -44,6 +44,11 @@ public class WmsOutTask extends BaseEntity {
@Excel(name = "出库类型ID")
private Long wmsBusinessTypeId;
/**
* 出库类型编码
*/
private String wmsBusinessTypeCode;
/**
* 任务编码
*/
@ -132,6 +137,38 @@ public class WmsOutTask extends BaseEntity {
private List<HashMap<String, Object>> outInfoList;
private List<BaseKnife> baseKnifes;
public WmsOutTask() {
super();
}
public WmsOutTask(Long wmsOutTaskId, Long wmsOutPlanId, String wmsOutPlanCode, Long wmsOutPlanDetailId, Long wmsBusinessTypeId, String wmsBusinessTypeCode, String taskCode, Integer taskNumber, Integer outNumber, Long wmStorageAreaId, String batchNum, Long mdItemId, String mdItemCode, String mdItemName, String mdItemUnit, String taskState, String recipientUsername, String attr1, String attr2, Integer attr3, Integer attr4, List<HashMap<String, Object>> outInfoList, List<BaseKnife> baseKnifes) {
this.wmsOutTaskId = wmsOutTaskId;
this.wmsOutPlanId = wmsOutPlanId;
this.wmsOutPlanCode = wmsOutPlanCode;
this.wmsOutPlanDetailId = wmsOutPlanDetailId;
this.wmsBusinessTypeId = wmsBusinessTypeId;
this.wmsBusinessTypeCode = wmsBusinessTypeCode;
this.taskCode = taskCode;
this.taskNumber = taskNumber;
this.outNumber = outNumber;
this.wmStorageAreaId = wmStorageAreaId;
this.batchNum = batchNum;
this.mdItemId = mdItemId;
this.mdItemCode = mdItemCode;
this.mdItemName = mdItemName;
this.mdItemUnit = mdItemUnit;
this.taskState = taskState;
this.recipientUsername = recipientUsername;
this.attr1 = attr1;
this.attr2 = attr2;
this.attr3 = attr3;
this.attr4 = attr4;
this.outInfoList = outInfoList;
this.baseKnifes = baseKnifes;
}
public Long getWmsOutTaskId() {
return wmsOutTaskId;
}
@ -172,6 +209,14 @@ public class WmsOutTask extends BaseEntity {
this.wmsBusinessTypeId = wmsBusinessTypeId;
}
public String getWmsBusinessTypeCode() {
return wmsBusinessTypeCode;
}
public void setWmsBusinessTypeCode(String wmsBusinessTypeCode) {
this.wmsBusinessTypeCode = wmsBusinessTypeCode;
}
public String getTaskCode() {
return taskCode;
}
@ -300,6 +345,14 @@ public class WmsOutTask extends BaseEntity {
this.outInfoList = outInfoList;
}
public List<BaseKnife> getBaseKnifes() {
return baseKnifes;
}
public void setBaseKnifes(List<BaseKnife> baseKnifes) {
this.baseKnifes = baseKnifes;
}
@Override
public String toString() {
return "WmsOutTask{" +
@ -308,6 +361,7 @@ public class WmsOutTask extends BaseEntity {
", wmsOutPlanCode='" + wmsOutPlanCode + '\'' +
", wmsOutPlanDetailId=" + wmsOutPlanDetailId +
", wmsBusinessTypeId=" + wmsBusinessTypeId +
", wmsBusinessTypeCode='" + wmsBusinessTypeCode + '\'' +
", taskCode='" + taskCode + '\'' +
", taskNumber=" + taskNumber +
", outNumber=" + outNumber +
@ -324,6 +378,7 @@ public class WmsOutTask extends BaseEntity {
", attr3=" + attr3 +
", attr4=" + attr4 +
", outInfoList=" + outInfoList +
", baseKnifes=" + baseKnifes +
'}';
}
}

View File

@ -12,10 +12,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
/**
* 出库任务Service业务层处理
@ -136,7 +134,15 @@ public class WmsOutTaskServiceImpl implements IWmsOutTaskService {
*/
@Override
public List<WmsOutTask> selectWmsOutTaskList(WmsOutTask wmsOutTask) {
return wmsOutTaskMapper.selectWmsOutTaskList(wmsOutTask);
List<WmsOutTask> wmsOutTaskList = wmsOutTaskMapper.selectWmsOutTaskList(wmsOutTask);
wmsOutTaskList.forEach(nowWmsOutTask -> {
WmsOutPlanDetailEntity entityQuery = new WmsOutPlanDetailEntity();
entityQuery.setWmsOutPlanDetailId(nowWmsOutTask.getWmsOutPlanDetailId());
nowWmsOutTask.setBaseKnifes(wmsOutPlanDetailEntityMapper.selectWmsOutPlanDetailEntityList(entityQuery).stream()
.map(it -> this.baseKnifeMapper.selectBaseKnifeByBaseKnifeId(it.getBaseKnifeId()))
.filter(Objects::nonNull).collect(Collectors.toList()));
});
return wmsOutTaskList;
}
/**