代码修改

This commit is contained in:
lyd
2022-10-28 09:05:17 +08:00
32 changed files with 637 additions and 249 deletions

View File

@@ -1,93 +0,0 @@
package org.nl.wms.sch;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
public class PointFindUtil {
public static JSONObject getInStruct(JSONObject jsonObject) {
String material_id = jsonObject.getString("material_id");
String area_type = jsonObject.getString("area_type");
String vehicle_code = jsonObject.getString("vehicle_code");
if (StrUtil.isEmpty(vehicle_code)) {
throw new BadRequestException("托盘不能为空!");
}
//根据托盘找托盘类型,
JSONObject vehicleObj = WQLObject.getWQLObject("md_pb_vehicle").query("vehicle_code='" + vehicle_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicleObj)) {
throw new BadRequestException("未找到托盘号为'" + vehicle_code + "' 托盘信息!");
}
if (StrUtil.isEmpty(material_id)) {
throw new BadRequestException("物料不能为空!");
}
if (StrUtil.isEmpty(area_type)) {
throw new BadRequestException("区域不能为空!");
}
String vehice_type = vehicleObj.getString("vehicle_type");
JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "2")
.addParam("material_id", material_id).addParam("area_type", area_type).addParam("vehice_type", vehice_type).process().uniqueResult(0);
return result;
}
public static JSONObject getOutStruct(JSONObject jsonObject) {
String material_id = jsonObject.getString("material_id");
String area_type = jsonObject.getString("area_type");
String is_full = jsonObject.getString("is_full");
String workprocedure_id = jsonObject.getString("workprocedure_id");
if (StrUtil.isEmpty(material_id)) {
throw new BadRequestException("物料不能为空!");
}
if (StrUtil.isEmpty(area_type)) {
throw new BadRequestException("区域不能为空!");
}
if (StrUtil.isEmpty(is_full)) {
throw new BadRequestException("是否满托不能为空!");
}
if (StrUtil.isEmpty(workprocedure_id)) {
throw new BadRequestException("工序不能为空!");
}
JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "3")
.addParam("material_id", material_id).addParam("area_type", area_type)
.addParam("is_full", is_full).addParam("workprocedure_id", workprocedure_id)
.process().uniqueResult(0);
return result;
}
public static JSONObject getEmptyVehicleInStruct(JSONObject jsonObject) {
String area_type = jsonObject.getString("area_type");
String vehicle_code = jsonObject.getString("vehicle_code");
if (StrUtil.isEmpty(vehicle_code)) {
throw new BadRequestException("托盘不能为空!");
}
//根据托盘找托盘类型,
JSONObject vehicleObj = WQLObject.getWQLObject("md_pb_vehicle").query("vehicle_code='" + vehicle_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicleObj)) {
throw new BadRequestException("未找到托盘号为'" + vehicle_code + "' 托盘信息!");
}
if (StrUtil.isEmpty(area_type)) {
throw new BadRequestException("区域不能为空!");
}
String vehice_type = vehicleObj.getString("vehicle_type");
JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "4")
.addParam("area_type", area_type).addParam("vehice_type", vehice_type).process().uniqueResult(0);
return result;
}
public static JSONObject getEmptyVehicleOutStruct(JSONObject jsonObject) {
String area_type = jsonObject.getString("area_type");
String vehicle_type = jsonObject.getString("vehicle_type");
if (StrUtil.isEmpty(area_type)) {
throw new BadRequestException("区域不能为空!");
}
JSONObject result = WQL.getWO("QSTRUCT_RULE").addParam("flag", "5")
.addParam("area_type", area_type).addParam("vehicle_type", vehicle_type).process().uniqueResult(0);
return result;
}
}

View File

@@ -295,7 +295,7 @@
</el-table-column>
<el-table-column prop="vehicle_code" label="载具编码" />
<el-table-column prop="vehicle_qty" label="载具数量" />
<el-table-column prop="remark" label="备注" />
<el-table-column prop="remark" label="备注" min-width="100" show-overflow-tooltip/>
<el-table-column prop="is_used" label="是否启用">
<template slot-scope="scope">
{{ scope.row.is_used=='1' ? '是' : '否' }}

View File

@@ -177,22 +177,6 @@
<el-form-item label="点位编码" prop="standing_time">
<el-input v-model="form.point_code" style="width: 370px;" :disabled="true"/>
</el-form-item>
<el-form-item label="点位状态">
<el-select
v-model="form.point_status"
clearable
filterable
size="mini"
class="filter-item"
style="width: 370px;"
>
<el-option
v-for="item in dict.sch_point_status"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="托盘类型">
<el-select
v-model="form.vehicle_type"
@@ -336,7 +320,7 @@ import crudRegion from '@/api/wms/sch/region'
const defaultForm = { point_id: null, point_code: null, pcsn: null, material_id: null, ivt_qty: null, qty_unit_id: null, instorage_time: null, ext_code: null, point_status: null, vehicle_type: null, row_num: null, col_num: null, layer_num: null, remark: null, is_used: null, is_lock: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
export default {
name: 'CppInventory',
dicts: ['sch_point_status', 'vehicle_type', 'is_used', 'd_lock_type', 'vehicle_type'],
dicts: ['sch_point_status', 'vehicle_type', 'is_used', 'd_lock_type'],
components: { pagination, crudOperation, rrOperation, udOperation },
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
@@ -400,7 +384,6 @@ export default {
this.showTab = !this.showTab
},
doEdit(datas) {
console.log(datas)
if (datas.length > 0) {
crudStructivt.batchEdit(datas).then(res => {
this.crud.notify('保存成功', CRUD.NOTIFICATION_TYPE.SUCCESS)

View File

@@ -228,7 +228,7 @@
<el-table-column prop="point_code" label="点位编码" min-width="100" show-overflow-tooltip />
<el-table-column prop="region_name" label="区域名称" min-width="120" show-overflow-tooltip />
<el-table-column prop="pcsn" label="批次" />
<el-table-column prop="ivt_qty" label="库存数" min-width="100">
<el-table-column prop="ivt_qty" label="库存数" :formatter="crud.formatNum3" width="100">
<template slot-scope="scope">
<el-input type="text" v-model="scope.row.ivt_qty" v-show="!showTab" />
<span v-show="showTab">{{scope.row.ivt_qty}}</span>
@@ -331,7 +331,7 @@ const defaultForm = { point_id: null, point_code: null, pcsn: null, material_id:
export default {
name: 'Inventory',
components: { pagination, crudOperation, rrOperation, udOperation },
dicts: ['sch_point_status', 'vehicle_type', 'is_used', 'd_lock_type'],
dicts: ['vehicle_type', 'is_used', 'd_lock_type'],
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({
@@ -395,7 +395,6 @@ export default {
})
},
doEdit(datas) {
console.log(datas)
if (datas.length > 0) {
crudStructivt.batchEdit(datas).then(res => {
this.crud.notify('保存成功', CRUD.NOTIFICATION_TYPE.SUCCESS)