This commit is contained in:
zhengxuming
2025-08-14 10:00:01 +08:00
7 changed files with 76 additions and 166 deletions

View File

@@ -60,106 +60,6 @@
</el-form> </el-form>
</el-card> </el-card>
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<span class="role-span">指令相关</span>
</div>
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="78px">
<el-row>
<el-col :span="8">
<el-form-item label="检验有货">
<el-switch v-model="form.inspect_in_stocck" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="取货校验" label-width="150px">
<el-switch v-model="form.ignore_pickup_check" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="放货校验" label-width="150px">
<el-switch v-model="form.ignore_release_check" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="呼叫">
<el-switch v-model="form.apply_task" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="响应" label-width="150px">
<el-switch v-model="form.manual_create_task" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="关联设备" prop="device_code">
<el-select
v-model="form.link_device_code"
filterable
multiple
placeholder="请选择"
>
<el-option
v-for="item in deviceList"
:key="item.device_code"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="关联三色灯" prop="device_code" label-width="100px">
<el-select
v-model="form.link_three_lamp"
filterable
clearable
placeholder="请选择"
>
<el-option
v-for="item in deviceList"
:key="item.device_code"
:label="item.device_name"
:value="item.device_code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="是否输入物料" label-width="150px">
<el-switch v-model="form.input_material" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card class="box-card" shadow="never">
<div slot="header" class="clearfix">
<span class="role-span">AGV相关</span>
</div>
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="78px">
<el-row>
<el-col :span="8">
<el-form-item label="取货">
<el-switch v-model="form.is_pickup" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="放货">
<el-switch v-model="form.is_release" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card class="box-card" shadow="never"> <el-card class="box-card" shadow="never">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span class="role-span">PLC读取字段</span> <span class="role-span">PLC读取字段</span>
@@ -274,7 +174,6 @@ import { selectListByOpcID } from '@/api/acs/device/opcPlc'
import crud from '@/mixins/crud' import crud from '@/mixins/crud'
import deviceCrud from '@/api/acs/device/device' import deviceCrud from '@/api/acs/device/device'
export default { export default {
name: 'UnpackingMachine', name: 'UnpackingMachine',
mixins: [crud], mixins: [crud],

View File

@@ -332,6 +332,7 @@ public class PdaJBServiceImpl implements PdaJBService {
if (ObjectUtil.isEmpty(materialbase)) { if (ObjectUtil.isEmpty(materialbase)) {
throw new BadRequestException("物料【" + workorder.getMaterial_id() + "】不存在!"); throw new BadRequestException("物料【" + workorder.getMaterial_id() + "】不存在!");
} }
JSONObject extData = JSONObject.parseObject(workorder.getExt_data());
// 0、创建组盘 // 0、创建组盘
GroupPlate groupPlate = new GroupPlate(); GroupPlate groupPlate = new GroupPlate();
groupPlate.setGroup_id(IdUtil.getStringId()); groupPlate.setGroup_id(IdUtil.getStringId());
@@ -339,7 +340,6 @@ public class PdaJBServiceImpl implements PdaJBService {
// 料桶类型根据工单,工单是根据点位 // 料桶类型根据工单,工单是根据点位
groupPlate.setStoragevehicle_type(workorder.getVehicle_type()); groupPlate.setStoragevehicle_type(workorder.getVehicle_type());
groupPlate.setMaterial_id(materialbase.getMaterial_id()); groupPlate.setMaterial_id(materialbase.getMaterial_id());
groupPlate.setPcsn(DateUtil.format(new Date(), "yyyy-MM-dd"));
groupPlate.setQty(weight); groupPlate.setQty(weight);
groupPlate.setQty_unit_id("11"); groupPlate.setQty_unit_id("11");
groupPlate.setQty_unit_name("kg"); groupPlate.setQty_unit_name("kg");
@@ -348,6 +348,9 @@ public class PdaJBServiceImpl implements PdaJBService {
groupPlate.setCreate_id(currentUserId); groupPlate.setCreate_id(currentUserId);
groupPlate.setCreate_name(nickName); groupPlate.setCreate_name(nickName);
groupPlate.setCreate_time(now); groupPlate.setCreate_time(now);
groupPlate.setPcsn(extData.getString("pcsn"));
groupPlate.setSupp_code(extData.getString("supp_code"));
groupPlate.setSupp_name(extData.getString("supp_name"));
groupplateService.save(groupPlate); groupplateService.save(groupPlate);
Dict dict = dictService.getDictByCodeAndValue("storagevehicle_type", workorder.getVehicle_type()); Dict dict = dictService.getDictByCodeAndValue("storagevehicle_type", workorder.getVehicle_type());
@@ -517,6 +520,7 @@ public class PdaJBServiceImpl implements PdaJBService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public PdaResponse jbReturnMaterial(JSONObject param) { public PdaResponse jbReturnMaterial(JSONObject param) {
MDC.put(TagNameEnum.TAG_NAME.getTag(), TagNameEnum.PDA_JB_BACK_MATERIAL.getTag());
// param: area, point_code, workorder_id // param: area, point_code, workorder_id
String currentUserId = SecurityUtils.getCurrentUserId(); String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName(); String nickName = SecurityUtils.getCurrentNickName();
@@ -539,6 +543,7 @@ public class PdaJBServiceImpl implements PdaJBService {
throw new BadRequestException("物料【" + workOrder.getMaterial_id() + "】不存在!"); throw new BadRequestException("物料【" + workOrder.getMaterial_id() + "】不存在!");
} }
Structattr structattr = structattrService.findByCode(workOrder.getStruct_code()); Structattr structattr = structattrService.findByCode(workOrder.getStruct_code());
JSONObject extData = JSONObject.parseObject(workOrder.getExt_data());
// 0 组盘(涉及什么库区,通过工单对应的仓位的属性。) // 0 组盘(涉及什么库区,通过工单对应的仓位的属性。)
GroupPlate groupPlate = new GroupPlate(); GroupPlate groupPlate = new GroupPlate();
groupPlate.setGroup_id(IdUtil.getStringId()); groupPlate.setGroup_id(IdUtil.getStringId());
@@ -546,7 +551,6 @@ public class PdaJBServiceImpl implements PdaJBService {
// 料桶类型根据工单,工单是根据点位 // 料桶类型根据工单,工单是根据点位
groupPlate.setStoragevehicle_type(vehicleInfo.getStoragevehicle_type()); groupPlate.setStoragevehicle_type(vehicleInfo.getStoragevehicle_type());
groupPlate.setMaterial_id(workOrder.getMaterial_id()); groupPlate.setMaterial_id(workOrder.getMaterial_id());
groupPlate.setPcsn(DateUtil.format(new Date(), "yyyy-MM-dd"));
groupPlate.setQty(workOrder.getPlan_weight()); groupPlate.setQty(workOrder.getPlan_weight());
groupPlate.setQty_unit_id("11"); groupPlate.setQty_unit_id("11");
groupPlate.setQty_unit_name("kg"); groupPlate.setQty_unit_name("kg");
@@ -555,6 +559,9 @@ public class PdaJBServiceImpl implements PdaJBService {
groupPlate.setCreate_id(currentUserId); groupPlate.setCreate_id(currentUserId);
groupPlate.setCreate_name(nickName); groupPlate.setCreate_name(nickName);
groupPlate.setCreate_time(now); groupPlate.setCreate_time(now);
groupPlate.setPcsn(extData.getString("pcsn"));
groupPlate.setSupp_code(extData.getString("supp_code"));
groupPlate.setSupp_name(extData.getString("supp_name"));
groupplateService.save(groupPlate); groupplateService.save(groupPlate);
// 1 创建退料入库单、明细单、分配单 // 1 创建退料入库单、明细单、分配单
Map<String, Object> insertInvObj = new HashMap(); Map<String, Object> insertInvObj = new HashMap();

View File

@@ -115,5 +115,4 @@ public class PdmBdWorkorder implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private String material_spec; private String material_spec;
} }

View File

@@ -3,6 +3,7 @@ package org.nl.wms.pm_manage.service.impl;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;

View File

@@ -27,6 +27,10 @@ public enum TagNameEnum {
* 解包手持下料 * 解包手持下料
*/ */
PDA_JB_DOWN_MATERIAL("解包手持下料"), PDA_JB_DOWN_MATERIAL("解包手持下料"),
/**
* 解包手持退料
*/
PDA_JB_BACK_MATERIAL("解包手持退料"),
/** /**
* 标记符号 * 标记符号
*/ */

View File

@@ -85,9 +85,11 @@
</el-table-column> </el-table-column>
<el-table-column prop="material_code" label="物料编码" width="160" /> <el-table-column prop="material_code" label="物料编码" width="160" />
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip /> <el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
<el-table-column prop="pcsn" label="物料批次" width="180" show-overflow-tooltip />
<el-table-column prop="struct_code" label="仓位编码" width="160" /> <el-table-column prop="struct_code" label="仓位编码" width="160" />
<el-table-column prop="storagevehicle_code" label="载具编码" width="160" /> <el-table-column prop="storagevehicle_code" label="载具编码" width="160" />
<el-table-column prop="qty_unit_name" label="单位" width="160" /> <el-table-column prop="qty_unit_name" label="单位" width="160" />
<el-table-column prop="supp_name" label="供应商" width="160" />
<!-- <el-table-column prop="raw_material_code" label="泥料编码" width="160" />--> <!-- <el-table-column prop="raw_material_code" label="泥料编码" width="160" />-->
<!-- <el-table-column prop="material_spec" label="物料规格" width="140" />--> <!-- <el-table-column prop="material_spec" label="物料规格" width="140" />-->
<!-- <el-table-column prop="material_model" label="物料型号" width="140" />--> <!-- <el-table-column prop="material_model" label="物料型号" width="140" />-->

View File

@@ -391,25 +391,26 @@
label="实际结束时间" label="实际结束时间"
:min-width="flexWidth('realproduceend_date',crud.data,'实际结束时间')" :min-width="flexWidth('realproduceend_date',crud.data,'实际结束时间')"
/> />
<el-table-column <!-- <el-table-column-->
prop="standing_time" <!-- prop="standing_time"-->
label="静置时间(分钟)" <!-- label="静置时间(分钟)"-->
:min-width="flexWidth('standing_time',crud.data,'静置时间(分钟)')" <!-- :min-width="flexWidth('standing_time',crud.data,'静置时间(分钟)')"-->
/> <!-- />-->
<el-table-column <!-- <el-table-column-->
prop="is_needmove" <!-- prop="is_needmove"-->
label="是否自动搬运" <!-- label="是否自动搬运"-->
:min-width="flexWidth('is_needmove',crud.data,'是否自动搬运')" <!-- :min-width="flexWidth('is_needmove',crud.data,'是否自动搬运')"-->
> <!-- >-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.is_needmove ? '是' : '否' }} <!-- {{ scope.row.is_needmove ? '是' : '否' }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column prop="is_urgent" label="是否加急" :min-width="flexWidth('is_urgent',crud.data,'是否加急')"> <!-- <el-table-column prop="is_urgent" label="是否加急" :min-width="flexWidth('is_urgent',crud.data,'是否加急')">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ scope.row.is_urgent ? '是' : '否' }} <!-- {{ scope.row.is_urgent ? '是' : '否' }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column prop="operator" label="开工人" :min-width="flexWidth('operator',crud.data,'创建人')" />
<el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" /> <el-table-column prop="create_name" label="创建人" :min-width="flexWidth('create_name',crud.data,'创建人')" />
<el-table-column <el-table-column
prop="create_time" prop="create_time"
@@ -491,7 +492,7 @@ const defaultForm = {
real_weight: 0, real_weight: 0,
plan_weight: 0, plan_weight: 0,
guadansum: 0, guadansum: 0,
ext_data: 0, ext_data: null,
priority: 1, priority: 1,
show: false show: false
} }
@@ -571,15 +572,6 @@ export default {
[CRUD.HOOK.beforeRefresh]() { [CRUD.HOOK.beforeRefresh]() {
return true return true
}, },
[CRUD.HOOK.beforeToCU]() {
const extData = this.form.ext_data
if (extData !== undefined || extData !== null || extData !== '') {
const ext = JSON.parse(extData)
this.form.order_no = ext.order_no
this.form.order_subnum = ext.custer_no
this.form.custer_no = ext.custer_no
}
},
getWorkShopList() { // 获取车间列表 getWorkShopList() { // 获取车间列表
}, },
@@ -625,19 +617,25 @@ export default {
this.form.struct_code = row.struct_code this.form.struct_code = row.struct_code
this.form.raw_material_code = row.storagevehicle_code this.form.raw_material_code = row.storagevehicle_code
this.form.plan_weight = row.qty this.form.plan_weight = row.qty
const ext = {
pcsn: row.pcsn,
supp_code: row.supp_code,
supp_name: row.supp_name
}
this.form.ext_data = JSON.stringify(ext)
} }
}, },
clearRecordMesOrder() { // clearRecordMesOrder() {
this.form.order_no = null // this.form.order_no = null
this.form.order_subnum = 0 // this.form.order_subnum = 0
this.form.guadansum = 0 // this.form.guadansum = 0
}, // },
recordMesOrder(row) { // 操作mes工单 // recordMesOrder(row) { // 操作mes工单
this.clearRecordMesOrder() // this.clearRecordMesOrder()
this.form.order_no = row.forder_NO // this.form.order_no = row.forder_NO
this.form.order_subnum = row.forder_SUBNUM // this.form.order_subnum = row.forder_SUBNUM
this.form.guadansum = row.guadansum // this.form.guadansum = row.guadansum
}, // },
setRegionName(data) { setRegionName(data) {
// 清空 // 清空
this.form.point_code = null this.form.point_code = null
@@ -660,28 +658,28 @@ export default {
this.crud.toQuery() this.crud.toQuery()
}, },
// 下发 // 下发
submits(row) { // submits(row) {
this.fullscreenLoading = true // this.fullscreenLoading = true
crudPdmBdWorkorder.submits(row).then(res => { // crudPdmBdWorkorder.submits(row).then(res => {
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS) // this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery() // this.crud.toQuery()
}).catch(() => { // }).catch(() => {
this.fullscreenLoading = false // this.fullscreenLoading = false
}).finally(() => { // }).finally(() => {
this.fullscreenLoading = false // this.fullscreenLoading = false
}) // })
}, // },
synchronize() { // synchronize() {
this.fullscreenLoading = true // this.fullscreenLoading = true
crudPdmBdWorkorder.orderSynchronize(this.crud.query).then(res => { // crudPdmBdWorkorder.orderSynchronize(this.crud.query).then(res => {
this.fullscreenLoading = false // this.fullscreenLoading = false
this.crud.notify('同步成功!', CRUD.NOTIFICATION_TYPE.SUCCESS) // this.crud.notify('同步成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(() => { // }).catch(() => {
this.fullscreenLoading = false // this.fullscreenLoading = false
}).finally(() => { // }).finally(() => {
this.fullscreenLoading = false // this.fullscreenLoading = false
}) // })
}, // },
forceFinish(row) { forceFinish(row) {
this.fullscreenLoading = true this.fullscreenLoading = true
crudPdmBdWorkorder.forceFinish(row).then(res => { crudPdmBdWorkorder.forceFinish(row).then(res => {