add 项目更新
This commit is contained in:
@@ -67,7 +67,15 @@ public class YZCallMaterialTask extends AbstractAcsTask {
|
||||
.addParam("device_code", workorder.getString("device_code"))
|
||||
.process()
|
||||
.uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(point1)) {
|
||||
point1 = WQL
|
||||
.getWO("CALL_MATERIAL_TASK")
|
||||
.addParam("flag", "6")
|
||||
.addParam("material_id", task.getString("material_id"))
|
||||
.addParam("device_code", workorder.getString("device_code"))
|
||||
.process()
|
||||
.uniqueResult(0);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(point1)) {
|
||||
point.put("lock_type", LockType.TASK_LOCKED.value());
|
||||
point.put("task_code", task.getString("task_code"));
|
||||
@@ -91,13 +99,13 @@ public class YZCallMaterialTask extends AbstractAcsTask {
|
||||
return task.getString("task_code");
|
||||
} else {
|
||||
// update: 设置点位状态为等待(4),设置所需要的参数到remark中:materialId
|
||||
point.put("point_status", PointStatus.WAITING.value());
|
||||
point.put("remark", workorder.getString("material_id"));
|
||||
TaskUtils.addFormUpdateColum(point, form);
|
||||
WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
|
||||
point_table.update(point);
|
||||
return null;
|
||||
// throw new BadRequestException("[" + point.get("point_code") + "] 的叫料任务未找到起点!");
|
||||
// point.put("point_status", PointStatus.WAITING.value());
|
||||
// point.put("remark", workorder.getString("material_id"));
|
||||
// TaskUtils.addFormUpdateColum(point, form);
|
||||
// WQLObject point_table = WQLObject.getWQLObject("sch_base_point");
|
||||
// point_table.update(point);
|
||||
// return null;
|
||||
throw new BadRequestException("[" + point.get("point_code") + "] 的叫料任务未找到起点!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,9 +101,9 @@
|
||||
p.is_used = '1'
|
||||
AND p.lock_type = '1'
|
||||
AND p.region_code = 'KLHJ'
|
||||
AND p.point_type IN ('1', '3')
|
||||
AND p.point_type = '3'
|
||||
AND p.point_status = '3'
|
||||
AND (p.device_code = 输入.device_code OR p.point_type = '1')
|
||||
AND p.device_code = 输入.device_code
|
||||
AND p.vehicle_type = '1'
|
||||
AND vd.material_id = 输入.material_id
|
||||
AND vd.stand_status IN ('2', '3')
|
||||
@@ -156,3 +156,30 @@
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "6"
|
||||
QUERY
|
||||
SELECT
|
||||
p.*
|
||||
FROM
|
||||
sch_base_point p
|
||||
LEFT JOIN st_ivt_vehicle_detail vd ON p.vd_id = vd.vd_id
|
||||
LEFT JOIN pdm_bd_workorder wo ON vd.workorder_id = wo.workorder_id
|
||||
WHERE
|
||||
p.is_used = '1'
|
||||
AND p.lock_type = '1'
|
||||
AND p.region_code = 'KLHJ'
|
||||
AND p.point_type = '1'
|
||||
AND p.point_status = '3'
|
||||
AND wo.associated_device = 输入.device_code
|
||||
AND p.vehicle_type = '1'
|
||||
AND vd.material_id = 输入.material_id
|
||||
AND vd.stand_status IN ('2', '3')
|
||||
ORDER BY
|
||||
wo.is_pri DESC,
|
||||
vd.create_time ASC
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
@@ -137,30 +137,30 @@ public class HLSendMaterialTask extends AbstractAcsTask {
|
||||
taskCode, deviceCode, object.getString("associated_device"), nextPoint);
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isEmpty(nextPoint) || ObjectUtil.isEmpty(nextPoint.get("point_code"))) {
|
||||
// 判断压机上是否有点位状态是4,物料对应
|
||||
flag = true;
|
||||
nextPoint = WQL.getWO("SEND_MATERIAL_TASK")
|
||||
.addParam("flag", "10")
|
||||
.addParam("material_id", task.getString("material_id"))
|
||||
.process()
|
||||
.uniqueResult(0);
|
||||
log.info("任务 {} 设备 {} 查找等待的压机物料是 {} ,得到的数据 {}",
|
||||
taskCode, deviceCode, task.getString("material_id"), nextPoint);
|
||||
} else {
|
||||
task.put("priority", "4");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(nextPoint)) {
|
||||
// if (ObjectUtil.isEmpty(nextPoint) || ObjectUtil.isEmpty(nextPoint.get("point_code"))) {
|
||||
// // 判断压机上是否有点位状态是4,物料对应
|
||||
// flag = true;
|
||||
// nextPoint = WQL.getWO("SEND_MATERIAL_TASK")
|
||||
// .addParam("flag", "10")
|
||||
// .addParam("material_id", task.getString("material_id"))
|
||||
// .process()
|
||||
// .uniqueResult(0);
|
||||
// log.info("任务 {} 设备 {} 查找等待的压机物料是 {} ,得到的数据 {}",
|
||||
// taskCode, deviceCode, task.getString("material_id"), nextPoint);
|
||||
// } else {
|
||||
// task.put("priority", "4");
|
||||
// }
|
||||
if (ObjectUtil.isEmpty(nextPoint)||ObjectUtil.isEmpty(nextPoint.get("point_code"))) {
|
||||
flag = false;
|
||||
// 先去普通压机困料货位
|
||||
nextPoint = WQL.getWO("SEND_MATERIAL_TASK")
|
||||
.addParam("flag", "4")
|
||||
.addParam("material_id", task.getString("material_id"))
|
||||
.process()
|
||||
.uniqueResult(0);
|
||||
log.info("任务 {} 设备 {} 满料去了普通压机的困料位,物料是 {} ,得到的数据 {}",
|
||||
taskCode, deviceCode, task.getString("material_id"), nextPoint);
|
||||
if (ObjectUtil.isEmpty(nextPoint)) {
|
||||
// nextPoint = WQL.getWO("SEND_MATERIAL_TASK")
|
||||
// .addParam("flag", "4")
|
||||
// .addParam("material_id", task.getString("material_id"))
|
||||
// .process()
|
||||
// .uniqueResult(0);
|
||||
// log.info("任务 {} 设备 {} 满料去了普通压机的困料位,物料是 {} ,得到的数据 {}",
|
||||
// taskCode, deviceCode, task.getString("material_id"), nextPoint);
|
||||
if (ObjectUtil.isEmpty(nextPoint)||ObjectUtil.isEmpty(nextPoint.get("point_code"))) {
|
||||
// 公共货位
|
||||
nextPoint = WQL.getWO("SEND_MATERIAL_TASK")
|
||||
.addParam("flag", "5")
|
||||
@@ -171,7 +171,7 @@ public class HLSendMaterialTask extends AbstractAcsTask {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(nextPoint)) {
|
||||
if (ObjectUtil.isNotEmpty(nextPoint)&&ObjectUtil.isNotEmpty(nextPoint.get("point_code"))) {
|
||||
task.put("task_status", TaskStatus.START_AND_END.value());
|
||||
task.put("point_code2", nextPoint.getString("point_code"));
|
||||
task.put("remark", flag ? "直接送到布料机" : "");
|
||||
|
||||
Reference in New Issue
Block a user