驱动更新
This commit is contained in:
@@ -10,9 +10,7 @@ import org.nl.utils.SpringContextHolder;
|
||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @author zhangjiangwei
|
||||
@@ -38,6 +36,14 @@ public class P2PTask extends AbstractAcsTask {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建任务
|
||||
*
|
||||
* @param param String start_point_code 起点编码
|
||||
* String next_point_code 终点编码
|
||||
* @return 任务id
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public String createTask(JSONObject param) {
|
||||
// 起点
|
||||
@@ -81,16 +87,16 @@ public class P2PTask extends AbstractAcsTask {
|
||||
}
|
||||
|
||||
// 判断终点是否可以存放起点的物料
|
||||
List<String> nextPointMaterial = WQLObject
|
||||
.getWQLObject("sch_base_point_material")
|
||||
.query("point_id = " + nextPoint.getString("point_id"))
|
||||
.getResultJSONArray(0)
|
||||
.stream()
|
||||
.map(o -> ((JSONObject) o).getString("material"))
|
||||
.collect(Collectors.toList());
|
||||
if (!nextPointMaterial.contains(startPoint.getString("current_material_type"))) {
|
||||
throw new BadRequestException("终点不能存放起点的物料");
|
||||
}
|
||||
// List<String> nextPointMaterial = WQLObject
|
||||
// .getWQLObject("sch_base_point_material")
|
||||
// .query("point_id = " + nextPoint.getString("point_id"))
|
||||
// .getResultJSONArray(0)
|
||||
// .stream()
|
||||
// .map(o -> ((JSONObject) o).getString("material"))
|
||||
// .collect(Collectors.toList());
|
||||
// if (!nextPointMaterial.contains(startPoint.getString("current_material_type"))) {
|
||||
// throw new BadRequestException("终点不能存放起点的物料");
|
||||
// }
|
||||
|
||||
return SpringContextHolder.getBean(SendTask.class).createTaskRelated(
|
||||
startPoint,
|
||||
|
||||
Reference in New Issue
Block a user