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 ? "直接送到布料机" : "");
|
||||
|
||||
@@ -62,6 +62,15 @@
|
||||
<el-form-item label="点位号">
|
||||
<el-input v-model="form.point_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料标识" prop="material_number">
|
||||
<el-input
|
||||
v-model="form.material_id"
|
||||
style="width: 300px"
|
||||
clearable
|
||||
@focus="materialShow=true"
|
||||
@clear="form.material_id=''; form.material_number=''; form.material_name=''"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否满垛" prop="is_full">
|
||||
<el-radio v-model="form.is_full" label="0">否</el-radio>
|
||||
<el-radio v-model="form.is_full" label="1">是</el-radio>
|
||||
@@ -102,6 +111,7 @@
|
||||
/>
|
||||
<el-table-column prop="qty" label="数量" :min-width="flexWidth('qty',crud.data,'数量')" />
|
||||
<el-table-column prop="weight" label="重量" :min-width="flexWidth('weight',crud.data,'重量')" />
|
||||
<el-table-column prop="material_number"label="物料号":min-width="flexWidth('material_number',crud.data,'物料号')"/>
|
||||
<!-- <el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')"/>-->
|
||||
<el-table-column prop="is_full" label="是否满垛" :min-width="flexWidth('is_full',crud.data,'是否满垛')">
|
||||
<template slot-scope="scope">
|
||||
@@ -143,6 +153,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<MaterDtl :dialog-show.sync="materialShow" :is-single="true" @setMaterValue="setMaterValue" />
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
@@ -154,6 +165,7 @@ import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = {
|
||||
@@ -222,12 +234,14 @@ const defaultForm = {
|
||||
update_time: null,
|
||||
is_delete: null,
|
||||
is_fire: '0',
|
||||
is_in_kiln: null
|
||||
is_in_kiln: null,
|
||||
material_id: null,
|
||||
material_number: null
|
||||
}
|
||||
export default {
|
||||
name: 'VehicleDetail',
|
||||
dicts: ['vehicle_type'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, crudOperation,MaterDtl, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
@@ -241,6 +255,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
materialShow: false,
|
||||
rules: {
|
||||
vehicle_type: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
@@ -261,6 +276,11 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 新增编辑给form表单物料相关信息赋值
|
||||
setMaterValue(row) {
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_number = row.material_number
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user