rev:lms
This commit is contained in:
@@ -123,6 +123,15 @@ public class PdaServiceImpl implements PdaService {
|
|||||||
}
|
}
|
||||||
// 获取点位
|
// 获取点位
|
||||||
SchBasePoint basePoint = pointService.getById(entity.getPoint_code());
|
SchBasePoint basePoint = pointService.getById(entity.getPoint_code());
|
||||||
|
if (ObjectUtil.isEmpty(basePoint)) {
|
||||||
|
throw new BadRequestException("点位信息不存在!");
|
||||||
|
}
|
||||||
|
if (!RegionEnum.ZP.getRegion_code().equals(basePoint.getRegion_code())) {
|
||||||
|
throw new BadRequestException("该点位不属于组盘区域!");
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(basePoint.getVehicle_code()) && !StrUtil.equals(entity.getVehicle_code(), basePoint.getVehicle_code())) {
|
||||||
|
throw new BadRequestException("组盘信息中的载具编码和该点位记录的载具编码不一致!");
|
||||||
|
}
|
||||||
// 获取物料
|
// 获取物料
|
||||||
MdBaseMaterial material = materialService.getById(entity.getMaterial_id());
|
MdBaseMaterial material = materialService.getById(entity.getMaterial_id());
|
||||||
SchBaseVehiclematerialgroup group = new SchBaseVehiclematerialgroup();
|
SchBaseVehiclematerialgroup group = new SchBaseVehiclematerialgroup();
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package org.nl.wms.sch.task_manage.enums;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: lyd
|
||||||
|
* @Description:
|
||||||
|
* @Date: 2023/5/25
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum PointTypeEnum {
|
||||||
|
/**
|
||||||
|
* 空托位
|
||||||
|
*/
|
||||||
|
EMPTY_POINT("1", "空托位"),
|
||||||
|
/**
|
||||||
|
* 满托位
|
||||||
|
*/
|
||||||
|
FULL_POINT("2", "满托位");
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final String label;
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import org.nl.common.exception.BadRequestException;
|
|||||||
import org.nl.system.service.notice.ISysNoticeService;
|
import org.nl.system.service.notice.ISysNoticeService;
|
||||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||||
import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||||
|
import org.nl.wms.sch.region.service.RegionEnum;
|
||||||
import org.nl.wms.sch.task.service.ISchBaseTaskService;
|
import org.nl.wms.sch.task.service.ISchBaseTaskService;
|
||||||
import org.nl.wms.sch.task.service.ISchBaseTaskconfigService;
|
import org.nl.wms.sch.task.service.ISchBaseTaskconfigService;
|
||||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||||
@@ -14,6 +15,7 @@ import org.nl.wms.sch.task_manage.AbstractTask;
|
|||||||
import org.nl.wms.sch.task_manage.GeneralDefinition;
|
import org.nl.wms.sch.task_manage.GeneralDefinition;
|
||||||
import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum;
|
import org.nl.wms.sch.task_manage.enums.NoticeTypeEnum;
|
||||||
import org.nl.wms.sch.task_manage.enums.PointStatusEnum;
|
import org.nl.wms.sch.task_manage.enums.PointStatusEnum;
|
||||||
|
import org.nl.wms.sch.task_manage.enums.PointTypeEnum;
|
||||||
import org.nl.wms.sch.task_manage.enums.TaskFinishedTypeEnum;
|
import org.nl.wms.sch.task_manage.enums.TaskFinishedTypeEnum;
|
||||||
import org.nl.wms.sch.task_manage.task.TaskType;
|
import org.nl.wms.sch.task_manage.task.TaskType;
|
||||||
import org.nl.wms.sch.task_manage.task.core.TaskStatus;
|
import org.nl.wms.sch.task_manage.task.core.TaskStatus;
|
||||||
@@ -98,7 +100,16 @@ public class LMZBQKTask extends AbstractTask {
|
|||||||
.eq(SchBasePoint::getIng_task_code, ""))
|
.eq(SchBasePoint::getIng_task_code, ""))
|
||||||
.eq(SchBasePoint::getIs_used, true);
|
.eq(SchBasePoint::getIs_used, true);
|
||||||
List<SchBasePoint> schBasePoints = pointService.list(lam);
|
List<SchBasePoint> schBasePoints = pointService.list(lam);
|
||||||
return ObjectUtil.isNotEmpty(schBasePoints) ? schBasePoints.get(0) : null;
|
SchBasePoint start_point = schBasePoints.stream()
|
||||||
|
.filter(point -> RegionEnum.BCXKZB.getRegion_code().equals(point.getRegion_code()))
|
||||||
|
.filter(point -> PointTypeEnum.EMPTY_POINT.getCode().equals(point.getPoint_type()))
|
||||||
|
.findFirst()
|
||||||
|
.orElse(null);
|
||||||
|
if (ObjectUtil.isEmpty(start_point)) {
|
||||||
|
start_point = schBasePoints.stream().filter(point -> RegionEnum.KTPHC2.getRegion_code().equals(point.getRegion_code()))
|
||||||
|
.findFirst().orElse(null);
|
||||||
|
}
|
||||||
|
return ObjectUtil.isNotEmpty(start_point) ? start_point : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<!--引入默认的一些设置-->
|
<!--引入默认的一些设置-->
|
||||||
<!--<include resource="log/XrToMes.xml"/>
|
<!--<include resource="log/XrToMes.xml"/>
|
||||||
<include resource="log/MesToErp.xml"/>-->
|
<include resource="log/MesToErp.xml"/>-->
|
||||||
<include resource="log/XgAgvDeviceDriver.xml"/>
|
<!-- <include resource="log/XgAgvDeviceDriver.xml"/>-->
|
||||||
|
|
||||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
<!--withJansi 参数改为true-->
|
<!--withJansi 参数改为true-->
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 277 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 275 KiB |
@@ -44,43 +44,68 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" />
|
<crudOperation :permission="permission" >
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-printer"
|
||||||
|
size="mini"
|
||||||
|
@click="print"
|
||||||
|
>
|
||||||
|
打印
|
||||||
|
</el-button>
|
||||||
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||||
<el-form-item label="载具编码">
|
<el-form-item label="载具编码">
|
||||||
<el-input v-model="form.vehicle_code" style="width: 370px;" />
|
<el-input v-model="form.vehicle_code" style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="载具名称">
|
<!-- <el-form-item label="载具名称">-->
|
||||||
<el-input v-model="form.vehicle_name" style="width: 370px;" />
|
<!-- <el-input v-model="form.vehicle_name" style="width: 370px;" />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="载具类型">
|
<el-form-item label="载具类型">
|
||||||
<el-input v-model="form.vehicle_type" style="width: 370px;" />
|
<!-- <el-input v-model="form.vehicle_type" style="width: 370px;" />-->
|
||||||
</el-form-item>
|
<el-select
|
||||||
<el-form-item label="一维码">
|
v-model="form.vehicle_type"
|
||||||
<el-input v-model="form.one_code" style="width: 370px;" />
|
clearable
|
||||||
</el-form-item>
|
size="mini"
|
||||||
<el-form-item label="二维码">
|
placeholder="载具类型"
|
||||||
<el-input v-model="form.two_code" style="width: 370px;" />
|
class="filter-item"
|
||||||
</el-form-item>
|
style="width: 370px;"
|
||||||
<el-form-item label="RFID编码">
|
>
|
||||||
<el-input v-model="form.rfid_code" style="width: 370px;" />
|
<el-option
|
||||||
|
v-for="item in dict.vehicle_type"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="一维码">-->
|
||||||
|
<!-- <el-input v-model="form.one_code" style="width: 370px;" />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="二维码">-->
|
||||||
|
<!-- <el-input v-model="form.two_code" style="width: 370px;" />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="RFID编码">-->
|
||||||
|
<!-- <el-input v-model="form.rfid_code" style="width: 370px;" />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="载具宽度">
|
<el-form-item label="载具宽度">
|
||||||
<el-input v-model="form.vehicle_width" style="width: 370px;" />
|
<el-input v-model="form.vehicle_width" style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="载具长度">
|
<el-form-item label="载具长度">
|
||||||
<el-input v-model="form.vehicle_long" style="width: 370px;" />
|
<el-input v-model="form.vehicle_long" style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="载具高度">
|
<!-- <el-form-item label="载具高度">-->
|
||||||
<el-input v-model="form.vehicle_height" style="width: 370px;" />
|
<!-- <el-input v-model="form.vehicle_height" style="width: 370px;" />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="载具超仓位类型">
|
<!-- <el-form-item label="载具超仓位类型">-->
|
||||||
<el-input v-model="form.overstruct_type" style="width: 370px;" />
|
<!-- <el-input v-model="form.overstruct_type" style="width: 370px;" />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="占仓位数">
|
<!-- <el-form-item label="占仓位数">-->
|
||||||
<el-input v-model="form.occupystruct_qty" style="width: 370px;" />
|
<!-- <el-input v-model="form.occupystruct_qty" style="width: 370px;" />-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
@@ -91,16 +116,20 @@
|
|||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')"/>
|
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')"/>
|
||||||
<el-table-column prop="vehicle_name" label="载具名称" :min-width="flexWidth('vehicle_name',crud.data,'载具名称')"/>
|
<!-- <el-table-column prop="vehicle_name" label="载具名称" :min-width="flexWidth('vehicle_name',crud.data,'载具名称')"/>-->
|
||||||
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型')"/>
|
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型')">
|
||||||
<el-table-column prop="one_code" label="一维码" :min-width="flexWidth('one_code',crud.data,'一维码')"/>
|
<template slot-scope="scope">
|
||||||
<el-table-column prop="two_code" label="二维码" :min-width="flexWidth('two_code',crud.data,'二维码')"/>
|
{{ dict.label.vehicle_type[scope.row.vehicle_type] }}
|
||||||
<el-table-column prop="rfid_code" label="RFID编码" :min-width="flexWidth('rfid_code',crud.data,'RFID编码')"/>
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column prop="one_code" label="一维码" :min-width="flexWidth('one_code',crud.data,'一维码')"/>-->
|
||||||
|
<!-- <el-table-column prop="two_code" label="二维码" :min-width="flexWidth('two_code',crud.data,'二维码')"/>-->
|
||||||
|
<!-- <el-table-column prop="rfid_code" label="RFID编码" :min-width="flexWidth('rfid_code',crud.data,'RFID编码')"/>-->
|
||||||
<el-table-column prop="vehicle_width" label="载具宽度" :min-width="flexWidth('vehicle_width',crud.data,'载具宽度')"/>
|
<el-table-column prop="vehicle_width" label="载具宽度" :min-width="flexWidth('vehicle_width',crud.data,'载具宽度')"/>
|
||||||
<el-table-column prop="vehicle_long" label="载具长度" :min-width="flexWidth('vehicle_long',crud.data,'载具长度')"/>
|
<el-table-column prop="vehicle_long" label="载具长度" :min-width="flexWidth('vehicle_long',crud.data,'载具长度')"/>
|
||||||
<el-table-column prop="vehicle_height" label="载具高度" :min-width="flexWidth('vehicle_height',crud.data,'载具高度')"/>
|
<!-- <el-table-column prop="vehicle_height" label="载具高度" :min-width="flexWidth('vehicle_height',crud.data,'载具高度')"/>-->
|
||||||
<el-table-column prop="overstruct_type" label="载具超仓位类型" :min-width="flexWidth('overstruct_type',crud.data,'载具超仓位类型')"/>
|
<!-- <el-table-column prop="overstruct_type" label="载具超仓位类型" :min-width="flexWidth('overstruct_type',crud.data,'载具超仓位类型')"/>-->
|
||||||
<el-table-column prop="occupystruct_qty" label="占仓位数" :min-width="flexWidth('occupystruct_qty',crud.data,'占仓位数')"/>
|
<!-- <el-table-column prop="occupystruct_qty" label="占仓位数" :min-width="flexWidth('occupystruct_qty',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 prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')"/>
|
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')"/>
|
||||||
<el-table-column prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')"/>
|
<el-table-column prop="update_name" label="修改人" :min-width="flexWidth('update_name',crud.data,'修改人')"/>
|
||||||
@@ -174,6 +203,24 @@ export default {
|
|||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
return true
|
return true
|
||||||
|
},
|
||||||
|
print() {
|
||||||
|
const _selectData = this.$refs.table.selection
|
||||||
|
if (!_selectData || _selectData.length < 1) {
|
||||||
|
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
for (let i = 0; i < _selectData.length; i++) {
|
||||||
|
const code = _selectData[i].vehicle_code
|
||||||
|
const LODOP = getLodop()
|
||||||
|
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||||
|
// 打印纸张大小设置https://www.it610.com/article/2094844.html
|
||||||
|
LODOP.SET_PRINT_PAGESIZE(1, '50mm', '30mm', '')
|
||||||
|
LODOP.ADD_PRINT_BARCODE('4.3mm', '8.2mm', '40mm', '20mm', '128Auto', code)
|
||||||
|
LODOP.PRINT()// 打印
|
||||||
|
this.crud.notify('打印成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,6 +158,16 @@
|
|||||||
>
|
>
|
||||||
解锁
|
解锁
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-printer"
|
||||||
|
size="mini"
|
||||||
|
@click="print"
|
||||||
|
>
|
||||||
|
打印
|
||||||
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="540px">
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="540px">
|
||||||
@@ -558,7 +568,25 @@ export default {
|
|||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
|
print() {
|
||||||
|
const _selectData = this.$refs.table.selection
|
||||||
|
if (!_selectData || _selectData.length < 1) {
|
||||||
|
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
for (let i = 0; i < _selectData.length; i++) {
|
||||||
|
const code = _selectData[i].point_code
|
||||||
|
const LODOP = getLodop()
|
||||||
|
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||||
|
// 打印纸张大小设置https://www.it610.com/article/2094844.html
|
||||||
|
LODOP.SET_PRINT_PAGESIZE(1, '50mm', '30mm', '')
|
||||||
|
LODOP.ADD_PRINT_BARCODE('4.3mm', '8.2mm', '40mm', '20mm', '128Auto', code)
|
||||||
|
LODOP.PRINT()// 打印
|
||||||
|
this.crud.notify('打印成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user