Commit b3e611d2755dd4ee1f57dc8be86cb3340990a2c0

Authored by 肖超群
1 parent d4f58fa0

1. 增加AGV点位和AGV任务管理

Showing 23 changed files with 1592 additions and 3 deletions
ant-design-vue-jeecg/src/views/system/config/AgvPortList.vue 0 → 100644
  1 +<template>
  2 + <a-card :bordered="false">
  3 + <!-- 查询区域 -->
  4 + <div class="table-page-search-wrapper">
  5 + <a-form layout="inline" @keyup.enter.native="searchQuery">
  6 + <a-row :gutter="24">
  7 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="编码">
  9 + <a-input placeholder="请输入编码" v-model="queryParam.code"></a-input>
  10 + </a-form-item>
  11 + </a-col>
  12 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13 + <a-form-item label="名称">
  14 + <a-input placeholder="请输入名称" v-model="queryParam.name"></a-input>
  15 + </a-form-item>
  16 + </a-col>
  17 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18 + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  19 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  20 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  21 + <a @click="handleToggleSearch" style="margin-left: 8px">
  22 + {{ toggleSearchStatus ? '收起' : '展开' }}
  23 + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  24 + </a>
  25 + </span>
  26 + </a-col>
  27 + </a-row>
  28 + </a-form>
  29 + </div>
  30 + <!-- 查询区域-END -->
  31 +
  32 + <!-- 操作按钮区域 -->
  33 + <div class="table-operator">
  34 + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  35 + <a-button type="primary" icon="download" @click="handleExportXls('AGV点位')">导出</a-button>
  36 + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  37 + <a-button type="primary" icon="import">导入</a-button>
  38 + </a-upload>
  39 + <!-- 高级查询区域 -->
  40 + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  41 + <a-dropdown v-if="selectedRowKeys.length > 0">
  42 + <a-menu slot="overlay">
  43 + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  44 + </a-menu>
  45 + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  46 + </a-dropdown>
  47 + </div>
  48 +
  49 + <!-- table区域-begin -->
  50 + <div>
  51 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  52 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  53 + <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  54 + </div>
  55 +
  56 + <a-table
  57 + ref="table"
  58 + size="middle"
  59 + :scroll="{x:true}"
  60 + bordered
  61 + rowKey="id"
  62 + :columns="columns"
  63 + :dataSource="dataSource"
  64 + :pagination="ipagination"
  65 + :loading="loading"
  66 + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  67 + class="j-table-force-nowrap"
  68 + @change="handleTableChange">
  69 +
  70 + <template slot="htmlSlot" slot-scope="text">
  71 + <div v-html="text"></div>
  72 + </template>
  73 + <template slot="imgSlot" slot-scope="text">
  74 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  75 + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  76 + </template>
  77 + <template slot="fileSlot" slot-scope="text">
  78 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  79 + <a-button
  80 + v-else
  81 + :ghost="true"
  82 + type="primary"
  83 + icon="download"
  84 + size="small"
  85 + @click="downloadFile(text)">
  86 + 下载
  87 + </a-button>
  88 + </template>
  89 +
  90 + <span slot="action" slot-scope="text, record">
  91 + <a @click="handleEdit(record)">编辑</a>
  92 +
  93 + <a-divider type="vertical" />
  94 + <a-dropdown>
  95 + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  96 + <a-menu slot="overlay">
  97 + <a-menu-item>
  98 + <a @click="handleDetail(record)">详情</a>
  99 + </a-menu-item>
  100 + <a-menu-item>
  101 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  102 + <a>删除</a>
  103 + </a-popconfirm>
  104 + </a-menu-item>
  105 + </a-menu>
  106 + </a-dropdown>
  107 + </span>
  108 +
  109 + </a-table>
  110 + </div>
  111 +
  112 + <agv-port-modal ref="modalForm" @ok="modalFormOk"></agv-port-modal>
  113 + </a-card>
  114 +</template>
  115 +
  116 +<script>
  117 +
  118 + import '@/assets/less/TableExpand.less'
  119 + import { mixinDevice } from '@/utils/mixin'
  120 + import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  121 + import AgvPortModal from './modules/AgvPortModal'
  122 +
  123 + export default {
  124 + name: 'AgvPortList',
  125 + mixins:[JeecgListMixin, mixinDevice],
  126 + components: {
  127 + AgvPortModal
  128 + },
  129 + data () {
  130 + return {
  131 + description: 'AGV点位管理页面',
  132 + // 表头
  133 + columns: [
  134 + {
  135 + title: '#',
  136 + dataIndex: '',
  137 + key:'rowIndex',
  138 + width:60,
  139 + align:"center",
  140 + customRender:function (t,r,index) {
  141 + return parseInt(index)+1;
  142 + }
  143 + },
  144 + {
  145 + title:'编码',
  146 + align:"center",
  147 + dataIndex: 'code'
  148 + },
  149 + {
  150 + title:'名称',
  151 + align:"center",
  152 + dataIndex: 'name'
  153 + },
  154 + {
  155 + title:'备注',
  156 + align:"center",
  157 + dataIndex: 'remark'
  158 + },
  159 + {
  160 + title:'创建人',
  161 + align:"center",
  162 + dataIndex: 'createBy'
  163 + },
  164 + {
  165 + title:'创建日期',
  166 + align:"center",
  167 + dataIndex: 'createTime'
  168 + },
  169 + {
  170 + title:'更新人',
  171 + align:"center",
  172 + dataIndex: 'updateBy'
  173 + },
  174 + {
  175 + title:'更新日期',
  176 + align:"center",
  177 + dataIndex: 'updateTime'
  178 + },
  179 + {
  180 + title: '操作',
  181 + dataIndex: 'action',
  182 + align:"center",
  183 + fixed:"right",
  184 + width:147,
  185 + scopedSlots: { customRender: 'action' }
  186 + }
  187 + ],
  188 + url: {
  189 + list: "/config/agvPort/list",
  190 + delete: "/config/agvPort/delete",
  191 + deleteBatch: "/config/agvPort/deleteBatch",
  192 + exportXlsUrl: "/config/agvPort/exportXls",
  193 + importExcelUrl: "config/agvPort/importExcel",
  194 +
  195 + },
  196 + dictOptions:{},
  197 + superFieldList:[],
  198 + }
  199 + },
  200 + created() {
  201 + this.getSuperFieldList();
  202 + },
  203 + computed: {
  204 + importExcelUrl: function(){
  205 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  206 + },
  207 + },
  208 + methods: {
  209 + initDictConfig(){
  210 + },
  211 + getSuperFieldList(){
  212 + let fieldList=[];
  213 + fieldList.push({type:'string',value:'code',text:'编码',dictCode:''})
  214 + fieldList.push({type:'string',value:'name',text:'名称',dictCode:''})
  215 + fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
  216 + fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''})
  217 + fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
  218 + fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''})
  219 + fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'})
  220 + this.superFieldList = fieldList
  221 + }
  222 + }
  223 + }
  224 +</script>
  225 +<style scoped>
  226 + @import '~@assets/less/common.less';
  227 +</style>
0 228 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/config/modules/AgvPortForm.vue 0 → 100644
  1 +<template>
  2 + <a-spin :spinning="confirmLoading">
  3 + <j-form-container :disabled="formDisabled">
  4 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  5 + <a-row>
  6 + <a-col :span="24">
  7 + <a-form-model-item label="编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
  8 + <a-input v-model="model.code" placeholder="请输入编码" ></a-input>
  9 + </a-form-model-item>
  10 + </a-col>
  11 + <a-col :span="24">
  12 + <a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
  13 + <a-input v-model="model.name" placeholder="请输入名称" ></a-input>
  14 + </a-form-model-item>
  15 + </a-col>
  16 + <a-col :span="24">
  17 + <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
  18 + <a-input v-model="model.remark" placeholder="请输入备注" ></a-input>
  19 + </a-form-model-item>
  20 + </a-col>
  21 + </a-row>
  22 + </a-form-model>
  23 + </j-form-container>
  24 + </a-spin>
  25 +</template>
  26 +
  27 +<script>
  28 +
  29 + import { httpAction, getAction } from '@/api/manage'
  30 + import { validateDuplicateValue } from '@/utils/util'
  31 +
  32 + export default {
  33 + name: 'AgvPortForm',
  34 + components: {
  35 + },
  36 + props: {
  37 + //表单禁用
  38 + disabled: {
  39 + type: Boolean,
  40 + default: false,
  41 + required: false
  42 + }
  43 + },
  44 + data () {
  45 + return {
  46 + model:{
  47 + },
  48 + labelCol: {
  49 + xs: { span: 24 },
  50 + sm: { span: 5 },
  51 + },
  52 + wrapperCol: {
  53 + xs: { span: 24 },
  54 + sm: { span: 16 },
  55 + },
  56 + confirmLoading: false,
  57 +validatorRules: {
  58 + code: [
  59 + { required: true, message: '请输入编码!'},
  60 + ],
  61 + name: [
  62 + { required: true, message: '请输入名称!'},
  63 + ],
  64 +},
  65 + url: {
  66 + add: "/config/agvPort/add",
  67 + edit: "/config/agvPort/edit",
  68 + queryById: "/config/agvPort/queryById"
  69 + }
  70 + }
  71 + },
  72 + computed: {
  73 + formDisabled(){
  74 + return this.disabled
  75 + },
  76 + },
  77 + created () {
  78 + //备份model原始值
  79 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  80 + },
  81 + methods: {
  82 + add () {
  83 + this.edit(this.modelDefault);
  84 + },
  85 + edit (record) {
  86 + this.model = Object.assign({}, record);
  87 + this.visible = true;
  88 + },
  89 + submitForm () {
  90 + const that = this;
  91 + // 触发表单验证
  92 + this.$refs.form.validate(valid => {
  93 + if (valid) {
  94 + that.confirmLoading = true;
  95 + let httpurl = '';
  96 + let method = '';
  97 + if(!this.model.id){
  98 + httpurl+=this.url.add;
  99 + method = 'post';
  100 + }else{
  101 + httpurl+=this.url.edit;
  102 + method = 'put';
  103 + }
  104 + httpAction(httpurl,this.model,method).then((res)=>{
  105 + if(res.success){
  106 + that.$message.success(res.message);
  107 + that.$emit('ok');
  108 + }else{
  109 + that.$message.warning(res.message);
  110 + }
  111 + }).finally(() => {
  112 + that.confirmLoading = false;
  113 + })
  114 + }
  115 +
  116 + })
  117 + },
  118 + }
  119 + }
  120 +</script>
0 121 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/config/modules/AgvPortModal.Style#Drawer.vue 0 → 100644
  1 +<template>
  2 + <a-drawer
  3 + :title="title"
  4 + :width="width"
  5 + placement="right"
  6 + :closable="false"
  7 + @close="close"
  8 + destroyOnClose
  9 + :visible="visible">
  10 + <agv-port-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></agv-port-form>
  11 + <div class="drawer-footer">
  12 + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
  13 + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
  14 + </div>
  15 + </a-drawer>
  16 +</template>
  17 +
  18 +<script>
  19 +
  20 + import AgvPortForm from './AgvPortForm'
  21 +
  22 + export default {
  23 + name: 'AgvPortModal',
  24 + components: {
  25 + AgvPortForm
  26 + },
  27 + data () {
  28 + return {
  29 + title:"操作",
  30 + width:800,
  31 + visible: false,
  32 + disableSubmit: false
  33 + }
  34 + },
  35 + methods: {
  36 + add () {
  37 + this.visible=true
  38 + this.$nextTick(()=>{
  39 + this.$refs.realForm.add();
  40 + })
  41 + },
  42 + edit (record) {
  43 + this.visible=true
  44 + this.$nextTick(()=>{
  45 + this.$refs.realForm.edit(record);
  46 + });
  47 + },
  48 + close () {
  49 + this.$emit('close');
  50 + this.visible = false;
  51 + },
  52 + submitCallback(){
  53 + this.$emit('ok');
  54 + this.visible = false;
  55 + },
  56 + handleOk () {
  57 + this.$refs.realForm.submitForm();
  58 + },
  59 + handleCancel () {
  60 + this.close()
  61 + }
  62 + }
  63 + }
  64 +</script>
  65 +
  66 +<style lang="less" scoped>
  67 +/** Button按钮间距 */
  68 + .ant-btn {
  69 + margin-left: 30px;
  70 + margin-bottom: 30px;
  71 + float: right;
  72 + }
  73 + .drawer-footer{
  74 + position: absolute;
  75 + bottom: -8px;
  76 + width: 100%;
  77 + border-top: 1px solid #e8e8e8;
  78 + padding: 10px 16px;
  79 + text-align: right;
  80 + left: 0;
  81 + background: #fff;
  82 + border-radius: 0 0 2px 2px;
  83 + }
  84 +</style>
0 85 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/config/modules/AgvPortModal.vue 0 → 100644
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + switchFullscreen
  7 + @ok="handleOk"
  8 + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <agv-port-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></agv-port-form>
  12 + </j-modal>
  13 +</template>
  14 +
  15 +<script>
  16 +
  17 + import AgvPortForm from './AgvPortForm'
  18 + export default {
  19 + name: 'AgvPortModal',
  20 + components: {
  21 + AgvPortForm
  22 + },
  23 + data () {
  24 + return {
  25 + title:'',
  26 + width:800,
  27 + visible: false,
  28 + disableSubmit: false
  29 + }
  30 + },
  31 + methods: {
  32 + add () {
  33 + this.visible=true
  34 + this.$nextTick(()=>{
  35 + this.$refs.realForm.add();
  36 + })
  37 + },
  38 + edit (record) {
  39 + this.visible=true
  40 + this.$nextTick(()=>{
  41 + this.$refs.realForm.edit(record);
  42 + })
  43 + },
  44 + close () {
  45 + this.$emit('close');
  46 + this.visible = false;
  47 + },
  48 + handleOk () {
  49 + this.$refs.realForm.submitForm();
  50 + },
  51 + submitCallback(){
  52 + this.$emit('ok');
  53 + this.visible = false;
  54 + },
  55 + handleCancel () {
  56 + this.close()
  57 + }
  58 + }
  59 + }
  60 +</script>
0 61 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue 0 → 100644
  1 +<template>
  2 + <a-card :bordered="false">
  3 + <!-- 查询区域 -->
  4 + <div class="table-page-search-wrapper">
  5 + <a-form layout="inline" @keyup.enter.native="searchQuery">
  6 + <a-row :gutter="24">
  7 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="任务类型">
  9 + <j-dict-select-tag placeholder="请选择任务类型" v-model="queryParam.taskType" dictCode="agv_task_type"/>
  10 + </a-form-item>
  11 + </a-col>
  12 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13 + <a-form-item label="容器编码">
  14 + <a-input placeholder="请输入容器编码" v-model="queryParam.containerCode"></a-input>
  15 + </a-form-item>
  16 + </a-col>
  17 + <template v-if="toggleSearchStatus">
  18 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  19 + <a-form-item label="状态">
  20 + <j-dict-select-tag placeholder="请选择状态" v-model="queryParam.status" dictCode="agv_task_status"/>
  21 + </a-form-item>
  22 + </a-col>
  23 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  24 + <a-form-item label="起始点位">
  25 + <a-input placeholder="请输入起始点位" v-model="queryParam.fromPort"></a-input>
  26 + </a-form-item>
  27 + </a-col>
  28 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  29 + <a-form-item label="目标点位">
  30 + <a-input placeholder="请输入目标点位" v-model="queryParam.toPort"></a-input>
  31 + </a-form-item>
  32 + </a-col>
  33 + </template>
  34 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  35 + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  36 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  37 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  38 + <a @click="handleToggleSearch" style="margin-left: 8px">
  39 + {{ toggleSearchStatus ? '收起' : '展开' }}
  40 + <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  41 + </a>
  42 + </span>
  43 + </a-col>
  44 + </a-row>
  45 + </a-form>
  46 + </div>
  47 + <!-- 查询区域-END -->
  48 +
  49 + <!-- 操作按钮区域 -->
  50 + <div class="table-operator">
  51 + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  52 + <a-button type="primary" icon="download" @click="handleExportXls('AGV任务')">导出</a-button>
  53 + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
  54 + <a-button type="primary" icon="import">导入</a-button>
  55 + </a-upload>
  56 + <!-- 高级查询区域 -->
  57 + <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
  58 + <a-dropdown v-if="selectedRowKeys.length > 0">
  59 + <a-menu slot="overlay">
  60 + <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
  61 + </a-menu>
  62 + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
  63 + </a-dropdown>
  64 + </div>
  65 +
  66 + <!-- table区域-begin -->
  67 + <div>
  68 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  69 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  70 + <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  71 + </div>
  72 +
  73 + <a-table
  74 + ref="table"
  75 + size="middle"
  76 + :scroll="{x:true}"
  77 + bordered
  78 + rowKey="id"
  79 + :columns="columns"
  80 + :dataSource="dataSource"
  81 + :pagination="ipagination"
  82 + :loading="loading"
  83 + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  84 + class="j-table-force-nowrap"
  85 + @change="handleTableChange">
  86 +
  87 + <template slot="htmlSlot" slot-scope="text">
  88 + <div v-html="text"></div>
  89 + </template>
  90 + <template slot="imgSlot" slot-scope="text">
  91 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  92 + <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  93 + </template>
  94 + <template slot="fileSlot" slot-scope="text">
  95 + <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  96 + <a-button
  97 + v-else
  98 + :ghost="true"
  99 + type="primary"
  100 + icon="download"
  101 + size="small"
  102 + @click="downloadFile(text)">
  103 + 下载
  104 + </a-button>
  105 + </template>
  106 +
  107 + <span slot="action" slot-scope="text, record">
  108 + <a @click="handleEdit(record)">编辑</a>
  109 +
  110 + <a-divider type="vertical" />
  111 + <a-dropdown>
  112 + <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  113 + <a-menu slot="overlay">
  114 + <a-menu-item>
  115 + <a @click="handleDetail(record)">详情</a>
  116 + </a-menu-item>
  117 + <a-menu-item>
  118 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  119 + <a>删除</a>
  120 + </a-popconfirm>
  121 + </a-menu-item>
  122 + </a-menu>
  123 + </a-dropdown>
  124 + </span>
  125 +
  126 + </a-table>
  127 + </div>
  128 +
  129 + <agv-task-modal ref="modalForm" @ok="modalFormOk"></agv-task-modal>
  130 + </a-card>
  131 +</template>
  132 +
  133 +<script>
  134 +
  135 + import '@/assets/less/TableExpand.less'
  136 + import { mixinDevice } from '@/utils/mixin'
  137 + import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  138 + import AgvTaskModal from './modules/AgvTaskModal'
  139 + import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
  140 +
  141 + export default {
  142 + name: 'AgvTaskList',
  143 + mixins:[JeecgListMixin, mixinDevice],
  144 + components: {
  145 + AgvTaskModal
  146 + },
  147 + data () {
  148 + return {
  149 + description: 'AGV任务管理页面',
  150 + // 表头
  151 + columns: [
  152 + {
  153 + title: '#',
  154 + dataIndex: '',
  155 + key:'rowIndex',
  156 + width:60,
  157 + align:"center",
  158 + customRender:function (t,r,index) {
  159 + return parseInt(index)+1;
  160 + }
  161 + },
  162 + {
  163 + title:'任务类型',
  164 + align:"center",
  165 + dataIndex: 'taskType_dictText'
  166 + },
  167 + {
  168 + title:'容器编码',
  169 + align:"center",
  170 + dataIndex: 'containerCode'
  171 + },
  172 + {
  173 + title:'小车编码',
  174 + align:"center",
  175 + dataIndex: 'carno'
  176 + },
  177 + {
  178 + title:'优先级',
  179 + align:"center",
  180 + dataIndex: 'priority'
  181 + },
  182 + {
  183 + title:'状态',
  184 + align:"center",
  185 + dataIndex: 'status_dictText'
  186 + },
  187 + {
  188 + title:'起始点位',
  189 + align:"center",
  190 + dataIndex: 'fromPort'
  191 + },
  192 + {
  193 + title:'目标点位',
  194 + align:"center",
  195 + dataIndex: 'toPort'
  196 + },
  197 + {
  198 + title:'创建人',
  199 + align:"center",
  200 + dataIndex: 'createBy'
  201 + },
  202 + {
  203 + title:'创建日期',
  204 + align:"center",
  205 + dataIndex: 'createTime'
  206 + },
  207 + {
  208 + title:'更新人',
  209 + align:"center",
  210 + dataIndex: 'updateBy'
  211 + },
  212 + {
  213 + title:'更新日期',
  214 + align:"center",
  215 + dataIndex: 'updateTime'
  216 + },
  217 + {
  218 + title: '操作',
  219 + dataIndex: 'action',
  220 + align:"center",
  221 + fixed:"right",
  222 + width:147,
  223 + scopedSlots: { customRender: 'action' }
  224 + }
  225 + ],
  226 + url: {
  227 + list: "/task/agvTask/list",
  228 + delete: "/task/agvTask/delete",
  229 + deleteBatch: "/task/agvTask/deleteBatch",
  230 + exportXlsUrl: "/task/agvTask/exportXls",
  231 + importExcelUrl: "task/agvTask/importExcel",
  232 +
  233 + },
  234 + dictOptions:{},
  235 + superFieldList:[],
  236 + }
  237 + },
  238 + created() {
  239 + this.getSuperFieldList();
  240 + },
  241 + computed: {
  242 + importExcelUrl: function(){
  243 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  244 + },
  245 + },
  246 + methods: {
  247 + initDictConfig(){
  248 + },
  249 + getSuperFieldList(){
  250 + let fieldList=[];
  251 + fieldList.push({type:'string',value:'warehouseCode',text:'仓库编码',dictCode:''})
  252 + fieldList.push({type:'string',value:'zoneCode',text:'库区',dictCode:''})
  253 + fieldList.push({type:'int',value:'taskType',text:'任务类型',dictCode:'agv_task_type'})
  254 + fieldList.push({type:'string',value:'containerCode',text:'容器编码',dictCode:''})
  255 + fieldList.push({type:'string',value:'carno',text:'小车编码',dictCode:''})
  256 + fieldList.push({type:'int',value:'priority',text:'优先级',dictCode:''})
  257 + fieldList.push({type:'int',value:'status',text:'状态',dictCode:'agv_task_status'})
  258 + fieldList.push({type:'string',value:'fromPort',text:'起始点位',dictCode:''})
  259 + fieldList.push({type:'string',value:'toPort',text:'目标点位',dictCode:''})
  260 + fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''})
  261 + fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
  262 + fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''})
  263 + fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'})
  264 + this.superFieldList = fieldList
  265 + }
  266 + }
  267 + }
  268 +</script>
  269 +<style scoped>
  270 + @import '~@assets/less/common.less';
  271 +</style>
0 272 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/task/modules/AgvTaskForm.vue 0 → 100644
  1 +<template>
  2 + <a-spin :spinning="confirmLoading">
  3 + <j-form-container :disabled="formDisabled">
  4 + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
  5 + <a-row>
  6 + <a-col :span="24">
  7 + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode">
  8 + <a-input v-model="model.containerCode" placeholder="请输入容器编码" ></a-input>
  9 + </a-form-model-item>
  10 + </a-col>
  11 + <a-col :span="24">
  12 + <a-form-model-item label="起始点位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fromPort">
  13 + <a-input v-model="model.fromPort" placeholder="请输入起始点位" ></a-input>
  14 + </a-form-model-item>
  15 + </a-col>
  16 + <a-col :span="24">
  17 + <a-form-model-item label="目标点位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toPort">
  18 + <a-input v-model="model.toPort" placeholder="请输入目标点位" ></a-input>
  19 + </a-form-model-item>
  20 + </a-col>
  21 + </a-row>
  22 + </a-form-model>
  23 + </j-form-container>
  24 + </a-spin>
  25 +</template>
  26 +
  27 +<script>
  28 +
  29 + import { httpAction, getAction } from '@/api/manage'
  30 + import { validateDuplicateValue } from '@/utils/util'
  31 +
  32 + export default {
  33 + name: 'AgvTaskForm',
  34 + components: {
  35 + },
  36 + props: {
  37 + //表单禁用
  38 + disabled: {
  39 + type: Boolean,
  40 + default: false,
  41 + required: false
  42 + }
  43 + },
  44 + data () {
  45 + return {
  46 + model:{
  47 + },
  48 + labelCol: {
  49 + xs: { span: 24 },
  50 + sm: { span: 5 },
  51 + },
  52 + wrapperCol: {
  53 + xs: { span: 24 },
  54 + sm: { span: 16 },
  55 + },
  56 + confirmLoading: false,
  57 +validatorRules: {
  58 +},
  59 + url: {
  60 + add: "/task/agvTask/add",
  61 + edit: "/task/agvTask/edit",
  62 + queryById: "/task/agvTask/queryById"
  63 + }
  64 + }
  65 + },
  66 + computed: {
  67 + formDisabled(){
  68 + return this.disabled
  69 + },
  70 + },
  71 + created () {
  72 + //备份model原始值
  73 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  74 + },
  75 + methods: {
  76 + add () {
  77 + this.edit(this.modelDefault);
  78 + },
  79 + edit (record) {
  80 + this.model = Object.assign({}, record);
  81 + this.visible = true;
  82 + },
  83 + submitForm () {
  84 + const that = this;
  85 + // 触发表单验证
  86 + this.$refs.form.validate(valid => {
  87 + if (valid) {
  88 + that.confirmLoading = true;
  89 + let httpurl = '';
  90 + let method = '';
  91 + if(!this.model.id){
  92 + httpurl+=this.url.add;
  93 + method = 'post';
  94 + }else{
  95 + httpurl+=this.url.edit;
  96 + method = 'put';
  97 + }
  98 + httpAction(httpurl,this.model,method).then((res)=>{
  99 + if(res.success){
  100 + that.$message.success(res.message);
  101 + that.$emit('ok');
  102 + }else{
  103 + that.$message.warning(res.message);
  104 + }
  105 + }).finally(() => {
  106 + that.confirmLoading = false;
  107 + })
  108 + }
  109 +
  110 + })
  111 + },
  112 + }
  113 + }
  114 +</script>
0 115 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/task/modules/AgvTaskModal.Style#Drawer.vue 0 → 100644
  1 +<template>
  2 + <a-drawer
  3 + :title="title"
  4 + :width="width"
  5 + placement="right"
  6 + :closable="false"
  7 + @close="close"
  8 + destroyOnClose
  9 + :visible="visible">
  10 + <agv-task-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></agv-task-form>
  11 + <div class="drawer-footer">
  12 + <a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
  13 + <a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
  14 + </div>
  15 + </a-drawer>
  16 +</template>
  17 +
  18 +<script>
  19 +
  20 + import AgvTaskForm from './AgvTaskForm'
  21 +
  22 + export default {
  23 + name: 'AgvTaskModal',
  24 + components: {
  25 + AgvTaskForm
  26 + },
  27 + data () {
  28 + return {
  29 + title:"操作",
  30 + width:800,
  31 + visible: false,
  32 + disableSubmit: false
  33 + }
  34 + },
  35 + methods: {
  36 + add () {
  37 + this.visible=true
  38 + this.$nextTick(()=>{
  39 + this.$refs.realForm.add();
  40 + })
  41 + },
  42 + edit (record) {
  43 + this.visible=true
  44 + this.$nextTick(()=>{
  45 + this.$refs.realForm.edit(record);
  46 + });
  47 + },
  48 + close () {
  49 + this.$emit('close');
  50 + this.visible = false;
  51 + },
  52 + submitCallback(){
  53 + this.$emit('ok');
  54 + this.visible = false;
  55 + },
  56 + handleOk () {
  57 + this.$refs.realForm.submitForm();
  58 + },
  59 + handleCancel () {
  60 + this.close()
  61 + }
  62 + }
  63 + }
  64 +</script>
  65 +
  66 +<style lang="less" scoped>
  67 +/** Button按钮间距 */
  68 + .ant-btn {
  69 + margin-left: 30px;
  70 + margin-bottom: 30px;
  71 + float: right;
  72 + }
  73 + .drawer-footer{
  74 + position: absolute;
  75 + bottom: -8px;
  76 + width: 100%;
  77 + border-top: 1px solid #e8e8e8;
  78 + padding: 10px 16px;
  79 + text-align: right;
  80 + left: 0;
  81 + background: #fff;
  82 + border-radius: 0 0 2px 2px;
  83 + }
  84 +</style>
0 85 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/task/modules/AgvTaskModal.vue 0 → 100644
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + switchFullscreen
  7 + @ok="handleOk"
  8 + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <agv-task-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></agv-task-form>
  12 + </j-modal>
  13 +</template>
  14 +
  15 +<script>
  16 +
  17 + import AgvTaskForm from './AgvTaskForm'
  18 + export default {
  19 + name: 'AgvTaskModal',
  20 + components: {
  21 + AgvTaskForm
  22 + },
  23 + data () {
  24 + return {
  25 + title:'',
  26 + width:800,
  27 + visible: false,
  28 + disableSubmit: false
  29 + }
  30 + },
  31 + methods: {
  32 + add () {
  33 + this.visible=true
  34 + this.$nextTick(()=>{
  35 + this.$refs.realForm.add();
  36 + })
  37 + },
  38 + edit (record) {
  39 + this.visible=true
  40 + this.$nextTick(()=>{
  41 + this.$refs.realForm.edit(record);
  42 + })
  43 + },
  44 + close () {
  45 + this.$emit('close');
  46 + this.visible = false;
  47 + },
  48 + handleOk () {
  49 + this.$refs.realForm.submitForm();
  50 + },
  51 + submitCallback(){
  52 + this.$emit('ok');
  53 + this.visible = false;
  54 + },
  55 + handleCancel () {
  56 + this.close()
  57 + }
  58 + }
  59 + }
  60 +</script>
0 61 \ No newline at end of file
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/agvPort/controller/AgvPortController.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.agvPort.controller;
  2 +
  3 +import java.util.Arrays;
  4 +
  5 +import javax.servlet.http.HttpServletRequest;
  6 +import javax.servlet.http.HttpServletResponse;
  7 +
  8 +import org.jeecg.common.api.vo.Result;
  9 +import org.jeecg.common.aspect.annotation.AutoLog;
  10 +import org.jeecg.common.system.base.controller.JeecgController;
  11 +import org.jeecg.common.system.query.QueryGenerator;
  12 +import org.jeecg.modules.wms.config.agvPort.entity.AgvPort;
  13 +import org.jeecg.modules.wms.config.agvPort.service.IAgvPortService;
  14 +import org.springframework.beans.factory.annotation.Autowired;
  15 +import org.springframework.web.bind.annotation.*;
  16 +import org.springframework.web.servlet.ModelAndView;
  17 +
  18 +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  19 +import com.baomidou.mybatisplus.core.metadata.IPage;
  20 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  21 +
  22 +import io.swagger.annotations.Api;
  23 +import io.swagger.annotations.ApiOperation;
  24 +import lombok.extern.slf4j.Slf4j;
  25 +
  26 +/**
  27 + * @Description: AGV点位
  28 + * @Author: jeecg-boot
  29 + * @Date: 2023-02-01
  30 + * @Version: V1.0
  31 + */
  32 +@Api(tags = "AGV点位")
  33 +@RestController
  34 +@RequestMapping("/config/agvPort")
  35 +@Slf4j
  36 +public class AgvPortController extends JeecgController<AgvPort, IAgvPortService> {
  37 + @Autowired
  38 + private IAgvPortService agvPortService;
  39 +
  40 + /**
  41 + * 分页列表查询
  42 + * @param agvPort
  43 + * @param pageNo
  44 + * @param pageSize
  45 + * @param req
  46 + * @return
  47 + */
  48 + // @AutoLog(value = "AGV点位-分页列表查询")
  49 + @ApiOperation(value = "AGV点位-分页列表查询", notes = "AGV点位-分页列表查询")
  50 + @GetMapping(value = "/list")
  51 + public Result<IPage<AgvPort>> queryPageList(AgvPort agvPort, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
  52 + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
  53 + QueryWrapper<AgvPort> queryWrapper = QueryGenerator.initQueryWrapper(agvPort, req.getParameterMap());
  54 + Page<AgvPort> page = new Page<AgvPort>(pageNo, pageSize);
  55 + IPage<AgvPort> pageList = agvPortService.page(page, queryWrapper);
  56 + return Result.OK(pageList);
  57 + }
  58 +
  59 + /**
  60 + * 添加
  61 + * @param agvPort
  62 + * @return
  63 + */
  64 + @AutoLog(value = "AGV点位-添加")
  65 + @ApiOperation(value = "AGV点位-添加", notes = "AGV点位-添加")
  66 + @PostMapping(value = "/add")
  67 + public Result<String> add(@RequestBody AgvPort agvPort) {
  68 + agvPortService.save(agvPort);
  69 + return Result.OK("添加成功!");
  70 + }
  71 +
  72 + /**
  73 + * 编辑
  74 + * @param agvPort
  75 + * @return
  76 + */
  77 + @AutoLog(value = "AGV点位-编辑")
  78 + @ApiOperation(value = "AGV点位-编辑", notes = "AGV点位-编辑")
  79 + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
  80 + public Result<String> edit(@RequestBody AgvPort agvPort) {
  81 + agvPortService.updateById(agvPort);
  82 + return Result.OK("编辑成功!");
  83 + }
  84 +
  85 + /**
  86 + * 通过id删除
  87 + * @param id
  88 + * @return
  89 + */
  90 + @AutoLog(value = "AGV点位-通过id删除")
  91 + @ApiOperation(value = "AGV点位-通过id删除", notes = "AGV点位-通过id删除")
  92 + @DeleteMapping(value = "/delete")
  93 + public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
  94 + agvPortService.removeById(id);
  95 + return Result.OK("删除成功!");
  96 + }
  97 +
  98 + /**
  99 + * 批量删除
  100 + * @param ids
  101 + * @return
  102 + */
  103 + @AutoLog(value = "AGV点位-批量删除")
  104 + @ApiOperation(value = "AGV点位-批量删除", notes = "AGV点位-批量删除")
  105 + @DeleteMapping(value = "/deleteBatch")
  106 + public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
  107 + this.agvPortService.removeByIds(Arrays.asList(ids.split(",")));
  108 + return Result.OK("批量删除成功!");
  109 + }
  110 +
  111 + /**
  112 + * 通过id查询
  113 + * @param id
  114 + * @return
  115 + */
  116 + // @AutoLog(value = "AGV点位-通过id查询")
  117 + @ApiOperation(value = "AGV点位-通过id查询", notes = "AGV点位-通过id查询")
  118 + @GetMapping(value = "/queryById")
  119 + public Result<AgvPort> queryById(@RequestParam(name = "id", required = true) String id) {
  120 + AgvPort agvPort = agvPortService.getById(id);
  121 + if (agvPort == null) {
  122 + return Result.error("未找到对应数据");
  123 + }
  124 + return Result.OK(agvPort);
  125 + }
  126 +
  127 + /**
  128 + * 导出excel
  129 + * @param request
  130 + * @param agvPort
  131 + */
  132 + @RequestMapping(value = "/exportXls")
  133 + public ModelAndView exportXls(HttpServletRequest request, AgvPort agvPort) {
  134 + return super.exportXls(request, agvPort, AgvPort.class, "AGV点位");
  135 + }
  136 +
  137 + /**
  138 + * 通过excel导入数据
  139 + * @param request
  140 + * @param response
  141 + * @return
  142 + */
  143 + @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
  144 + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
  145 + return super.importExcel(request, response, AgvPort.class);
  146 + }
  147 +
  148 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/agvPort/entity/AgvPort.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.agvPort.entity;
  2 +
  3 +import java.io.Serializable;
  4 +import java.util.Date;
  5 +
  6 +import org.jeecgframework.poi.excel.annotation.Excel;
  7 +
  8 +import com.baomidou.mybatisplus.annotation.IdType;
  9 +import com.baomidou.mybatisplus.annotation.TableId;
  10 +import com.baomidou.mybatisplus.annotation.TableName;
  11 +
  12 +import io.swagger.annotations.ApiModel;
  13 +import io.swagger.annotations.ApiModelProperty;
  14 +import lombok.Data;
  15 +import lombok.EqualsAndHashCode;
  16 +import lombok.experimental.Accessors;
  17 +
  18 +/**
  19 + * @Description: AGV点位
  20 + * @Author: jeecg-boot
  21 + * @Date: 2023-02-01
  22 + * @Version: V1.0
  23 + */
  24 +@Data
  25 +@TableName("agv_port")
  26 +@Accessors(chain = true)
  27 +@EqualsAndHashCode(callSuper = false)
  28 +@ApiModel(value = "agv_port对象", description = "AGV点位")
  29 +public class AgvPort implements Serializable {
  30 + private static final long serialVersionUID = 1L;
  31 +
  32 + /** 主键 */
  33 + @TableId(type = IdType.ASSIGN_ID)
  34 + @ApiModelProperty(value = "主键")
  35 + private String id;
  36 + /** 仓库编码 */
  37 + @Excel(name = "仓库编码", width = 15)
  38 + @ApiModelProperty(value = "仓库编码")
  39 + private String warehouseCode;
  40 + /** 编码 */
  41 + @Excel(name = "编码", width = 15)
  42 + @ApiModelProperty(value = "编码")
  43 + private String code;
  44 + /** 名称 */
  45 + @Excel(name = "名称", width = 15)
  46 + @ApiModelProperty(value = "名称")
  47 + private String name;
  48 + /** 备注 */
  49 + @Excel(name = "备注", width = 15)
  50 + @ApiModelProperty(value = "备注")
  51 + private String remark;
  52 + /** 创建人 */
  53 + @ApiModelProperty(value = "创建人")
  54 + private String createBy;
  55 + /** 创建日期 */
  56 + @ApiModelProperty(value = "创建日期")
  57 + private Date createTime;
  58 + /** 更新人 */
  59 + @ApiModelProperty(value = "更新人")
  60 + private String updateBy;
  61 + /** 更新日期 */
  62 + @ApiModelProperty(value = "更新日期")
  63 + private Date updateTime;
  64 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/agvPort/mapper/AgvPortMapper.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.agvPort.mapper;
  2 +
  3 +import org.jeecg.modules.wms.config.agvPort.entity.AgvPort;
  4 +
  5 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  6 +
  7 +/**
  8 + * @Description: AGV点位
  9 + * @Author: jeecg-boot
  10 + * @Date: 2023-02-01
  11 + * @Version: V1.0
  12 + */
  13 +public interface AgvPortMapper extends BaseMapper<AgvPort> {
  14 +
  15 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/agvPort/mapper/xml/AgvPortMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="org.jeecg.modules.wms.config.mapper.AgvPortMapper">
  4 +
  5 +</mapper>
0 6 \ No newline at end of file
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/agvPort/service/IAgvPortService.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.agvPort.service;
  2 +
  3 +import org.jeecg.modules.wms.config.agvPort.entity.AgvPort;
  4 +
  5 +import com.baomidou.mybatisplus.extension.service.IService;
  6 +
  7 +/**
  8 + * @Description: AGV点位
  9 + * @Author: jeecg-boot
  10 + * @Date: 2023-02-01
  11 + * @Version: V1.0
  12 + */
  13 +public interface IAgvPortService extends IService<AgvPort> {
  14 +
  15 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/agvPort/service/impl/AgvPortServiceImpl.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.agvPort.service.impl;
  2 +
  3 +import org.jeecg.modules.wms.config.agvPort.entity.AgvPort;
  4 +import org.jeecg.modules.wms.config.agvPort.mapper.AgvPortMapper;
  5 +import org.jeecg.modules.wms.config.agvPort.service.IAgvPortService;
  6 +import org.springframework.stereotype.Service;
  7 +
  8 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  9 +
  10 +/**
  11 + * @Description: AGV点位
  12 + * @Author: jeecg-boot
  13 + * @Date: 2023-02-01
  14 + * @Version: V1.0
  15 + */
  16 +@Service
  17 +public class AgvPortServiceImpl extends ServiceImpl<AgvPortMapper, AgvPort> implements IAgvPortService {
  18 +
  19 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/MesTrYTask.java renamed to huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/MesTryTask.java
... ... @@ -24,7 +24,7 @@ import lombok.extern.slf4j.Slf4j;
24 24 * @author 游杰
25 25 */
26 26 @Slf4j
27   -public class MesTrYTask implements Job {
  27 +public class MesTryTask implements Job {
28 28  
29 29 @Resource
30 30 private IMesService mesService;
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/RyTask.java renamed to huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/WcsTask.java
... ... @@ -25,7 +25,7 @@ import lombok.extern.slf4j.Slf4j;
25 25 */
26 26  
27 27 @Slf4j
28   -public class RyTask implements Job {
  28 +public class WcsTask implements Job {
29 29  
30 30 // 并发控制
31 31 Map<String, Boolean> runningTaskMap = new HashMap<>();
... ... @@ -42,7 +42,7 @@ public class RyTask implements Job {
42 42 try {
43 43 runningTaskMap.put(taskKey, true);
44 44 LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery();
45   - taskHeaderLambdaQueryWrapper.eq(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_BUILD);
  45 + taskHeaderLambdaQueryWrapper.eq(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_BUILD).eq(TaskHeader::getAgvTaskId, 0);
46 46 List<TaskHeader> taskHeaderList = taskHeaderService.list(taskHeaderLambdaQueryWrapper);
47 47 for (TaskHeader taskHeader : taskHeaderList) {
48 48 try {
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/controller/AgvTaskController.java 0 → 100644
  1 +package org.jeecg.modules.wms.task.agvTask.controller;
  2 +
  3 +import java.util.Arrays;
  4 +
  5 +import javax.servlet.http.HttpServletRequest;
  6 +import javax.servlet.http.HttpServletResponse;
  7 +
  8 +import org.jeecg.common.api.vo.Result;
  9 +import org.jeecg.common.aspect.annotation.AutoLog;
  10 +import org.jeecg.common.system.base.controller.JeecgController;
  11 +import org.jeecg.common.system.query.QueryGenerator;
  12 +import org.jeecg.modules.wms.task.agvTask.entity.AgvTask;
  13 +import org.jeecg.modules.wms.task.agvTask.service.IAgvTaskService;
  14 +import org.jeecg.utils.HuahengJwtUtil;
  15 +import org.jeecg.utils.constant.QuantityConstant;
  16 +import org.springframework.beans.factory.annotation.Autowired;
  17 +import org.springframework.web.bind.annotation.*;
  18 +import org.springframework.web.servlet.ModelAndView;
  19 +
  20 +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  21 +import com.baomidou.mybatisplus.core.metadata.IPage;
  22 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  23 +
  24 +import io.swagger.annotations.Api;
  25 +import io.swagger.annotations.ApiOperation;
  26 +import lombok.extern.slf4j.Slf4j;
  27 +
  28 +/**
  29 + * @Description: AGV任务
  30 + * @Author: jeecg-boot
  31 + * @Date: 2023-02-01
  32 + * @Version: V1.0
  33 + */
  34 +@Api(tags = "AGV任务")
  35 +@RestController
  36 +@RequestMapping("/task/agvTask")
  37 +@Slf4j
  38 +public class AgvTaskController extends JeecgController<AgvTask, IAgvTaskService> {
  39 + @Autowired
  40 + private IAgvTaskService agvTaskService;
  41 +
  42 + /**
  43 + * 分页列表查询
  44 + * @param agvTask
  45 + * @param pageNo
  46 + * @param pageSize
  47 + * @param req
  48 + * @return
  49 + */
  50 + // @AutoLog(value = "AGV任务-分页列表查询")
  51 + @ApiOperation(value = "AGV任务-分页列表查询", notes = "AGV任务-分页列表查询")
  52 + @GetMapping(value = "/list")
  53 + public Result<IPage<AgvTask>> queryPageList(AgvTask agvTask, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
  54 + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
  55 + QueryWrapper<AgvTask> queryWrapper = QueryGenerator.initQueryWrapper(agvTask, req.getParameterMap());
  56 + Page<AgvTask> page = new Page<AgvTask>(pageNo, pageSize);
  57 + IPage<AgvTask> pageList = agvTaskService.page(page, queryWrapper);
  58 + return Result.OK(pageList);
  59 + }
  60 +
  61 + /**
  62 + * 添加
  63 + * @param agvTask
  64 + * @return
  65 + */
  66 + @AutoLog(value = "AGV任务-添加")
  67 + @ApiOperation(value = "AGV任务-添加", notes = "AGV任务-添加")
  68 + @PostMapping(value = "/add")
  69 + public Result<String> add(@RequestBody AgvTask agvTask, HttpServletRequest req) {
  70 + String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
  71 + agvTask.setWarehouseCode(warehouseCode);
  72 + agvTask.setTaskType(QuantityConstant.AGV_TYPE_TAKE_AND_RELEASE);
  73 + agvTask.setStatus(QuantityConstant.AGV_TASK_STATUS_BUILD);
  74 + agvTask.setPriority(10);
  75 + agvTaskService.save(agvTask);
  76 + return Result.OK("添加成功!");
  77 + }
  78 +
  79 + /**
  80 + * 编辑
  81 + * @param agvTask
  82 + * @return
  83 + */
  84 + @AutoLog(value = "AGV任务-编辑")
  85 + @ApiOperation(value = "AGV任务-编辑", notes = "AGV任务-编辑")
  86 + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
  87 + public Result<String> edit(@RequestBody AgvTask agvTask) {
  88 + agvTaskService.updateById(agvTask);
  89 + return Result.OK("编辑成功!");
  90 + }
  91 +
  92 + /**
  93 + * 通过id删除
  94 + * @param id
  95 + * @return
  96 + */
  97 + @AutoLog(value = "AGV任务-通过id删除")
  98 + @ApiOperation(value = "AGV任务-通过id删除", notes = "AGV任务-通过id删除")
  99 + @DeleteMapping(value = "/delete")
  100 + public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
  101 + agvTaskService.removeById(id);
  102 + return Result.OK("删除成功!");
  103 + }
  104 +
  105 + /**
  106 + * 批量删除
  107 + * @param ids
  108 + * @return
  109 + */
  110 + @AutoLog(value = "AGV任务-批量删除")
  111 + @ApiOperation(value = "AGV任务-批量删除", notes = "AGV任务-批量删除")
  112 + @DeleteMapping(value = "/deleteBatch")
  113 + public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
  114 + this.agvTaskService.removeByIds(Arrays.asList(ids.split(",")));
  115 + return Result.OK("批量删除成功!");
  116 + }
  117 +
  118 + /**
  119 + * 通过id查询
  120 + * @param id
  121 + * @return
  122 + */
  123 + // @AutoLog(value = "AGV任务-通过id查询")
  124 + @ApiOperation(value = "AGV任务-通过id查询", notes = "AGV任务-通过id查询")
  125 + @GetMapping(value = "/queryById")
  126 + public Result<AgvTask> queryById(@RequestParam(name = "id", required = true) String id) {
  127 + AgvTask agvTask = agvTaskService.getById(id);
  128 + if (agvTask == null) {
  129 + return Result.error("未找到对应数据");
  130 + }
  131 + return Result.OK(agvTask);
  132 + }
  133 +
  134 + /**
  135 + * 导出excel
  136 + * @param request
  137 + * @param agvTask
  138 + */
  139 + @RequestMapping(value = "/exportXls")
  140 + public ModelAndView exportXls(HttpServletRequest request, AgvTask agvTask) {
  141 + return super.exportXls(request, agvTask, AgvTask.class, "AGV任务");
  142 + }
  143 +
  144 + /**
  145 + * 通过excel导入数据
  146 + * @param request
  147 + * @param response
  148 + * @return
  149 + */
  150 + @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
  151 + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
  152 + return super.importExcel(request, response, AgvTask.class);
  153 + }
  154 +
  155 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/entity/AgvTask.java 0 → 100644
  1 +package org.jeecg.modules.wms.task.agvTask.entity;
  2 +
  3 +import java.io.Serializable;
  4 +import java.util.Date;
  5 +
  6 +import org.jeecg.common.aspect.annotation.Dict;
  7 +import org.jeecgframework.poi.excel.annotation.Excel;
  8 +
  9 +import com.baomidou.mybatisplus.annotation.IdType;
  10 +import com.baomidou.mybatisplus.annotation.TableId;
  11 +import com.baomidou.mybatisplus.annotation.TableName;
  12 +
  13 +import io.swagger.annotations.ApiModel;
  14 +import io.swagger.annotations.ApiModelProperty;
  15 +import lombok.Data;
  16 +import lombok.EqualsAndHashCode;
  17 +import lombok.experimental.Accessors;
  18 +
  19 +/**
  20 + * @Description: AGV任务
  21 + * @Author: jeecg-boot
  22 + * @Date: 2023-02-01
  23 + * @Version: V1.0
  24 + */
  25 +@Data
  26 +@TableName("agv_task")
  27 +@Accessors(chain = true)
  28 +@EqualsAndHashCode(callSuper = false)
  29 +@ApiModel(value = "agv_task对象", description = "AGV任务")
  30 +public class AgvTask implements Serializable {
  31 + private static final long serialVersionUID = 1L;
  32 +
  33 + /** 主键 */
  34 + @TableId(type = IdType.AUTO)
  35 + @ApiModelProperty(value = "主键")
  36 + private Integer id;
  37 + /** 前置任务号 */
  38 + @ApiModelProperty(value = "前置任务号")
  39 + private Integer preTaskNo;
  40 + /** 仓库编码 */
  41 + @Excel(name = "仓库编码", width = 15)
  42 + @ApiModelProperty(value = "仓库编码")
  43 + private String warehouseCode;
  44 + /** 库区 */
  45 + @Excel(name = "库区", width = 15)
  46 + @ApiModelProperty(value = "库区")
  47 + private String zoneCode;
  48 + /** 任务类型 */
  49 + @Excel(name = "任务类型", width = 15, dicCode = "agv_task_type")
  50 + @Dict(dicCode = "agv_task_type")
  51 + @ApiModelProperty(value = "任务类型")
  52 + private Integer taskType;
  53 + /** 容器编码 */
  54 + @Excel(name = "容器编码", width = 15)
  55 + @ApiModelProperty(value = "容器编码")
  56 + private String containerCode;
  57 + /** 小车编码 */
  58 + @Excel(name = "小车编码", width = 15)
  59 + @ApiModelProperty(value = "小车编码")
  60 + private String carno;
  61 + /** 优先级 */
  62 + @Excel(name = "优先级", width = 15)
  63 + @ApiModelProperty(value = "优先级")
  64 + private Integer priority;
  65 + /** 状态 */
  66 + @Excel(name = "状态", width = 15, dicCode = "agv_task_status")
  67 + @Dict(dicCode = "agv_task_status")
  68 + @ApiModelProperty(value = "状态")
  69 + private Integer status;
  70 + /** 起始点位 */
  71 + @Excel(name = "起始点位", width = 15)
  72 + @ApiModelProperty(value = "起始点位")
  73 + private String fromPort;
  74 + /** 目标点位 */
  75 + @Excel(name = "目标点位", width = 15)
  76 + @ApiModelProperty(value = "目标点位")
  77 + private String toPort;
  78 + /** 创建人 */
  79 + @ApiModelProperty(value = "创建人")
  80 + private String createBy;
  81 + /** 创建日期 */
  82 + @ApiModelProperty(value = "创建日期")
  83 + private Date createTime;
  84 + /** 更新人 */
  85 + @ApiModelProperty(value = "更新人")
  86 + private String updateBy;
  87 + /** 更新日期 */
  88 + @ApiModelProperty(value = "更新日期")
  89 + private Date updateTime;
  90 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/mapper/AgvTaskMapper.java 0 → 100644
  1 +package org.jeecg.modules.wms.task.agvTask.mapper;
  2 +
  3 +import org.jeecg.modules.wms.task.agvTask.entity.AgvTask;
  4 +
  5 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  6 +
  7 +/**
  8 + * @Description: AGV任务
  9 + * @Author: jeecg-boot
  10 + * @Date: 2023-02-01
  11 + * @Version: V1.0
  12 + */
  13 +public interface AgvTaskMapper extends BaseMapper<AgvTask> {
  14 +
  15 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/mapper/xml/AgvTaskMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3 +<mapper namespace="org.jeecg.modules.wms.task.agvTask.mapper.AgvTaskMapper">
  4 +
  5 +</mapper>
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/service/IAgvTaskService.java 0 → 100644
  1 +package org.jeecg.modules.wms.task.agvTask.service;
  2 +
  3 +import org.jeecg.modules.wms.task.agvTask.entity.AgvTask;
  4 +
  5 +import com.baomidou.mybatisplus.extension.service.IService;
  6 +
  7 +/**
  8 + * @Description: AGV任务
  9 + * @Author: jeecg-boot
  10 + * @Date: 2023-02-01
  11 + * @Version: V1.0
  12 + */
  13 +public interface IAgvTaskService extends IService<AgvTask> {
  14 +
  15 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/service/impl/AgvTaskServiceImpl.java 0 → 100644
  1 +package org.jeecg.modules.wms.task.agvTask.service.impl;
  2 +
  3 +import org.jeecg.modules.wms.task.agvTask.entity.AgvTask;
  4 +import org.jeecg.modules.wms.task.agvTask.mapper.AgvTaskMapper;
  5 +import org.jeecg.modules.wms.task.agvTask.service.IAgvTaskService;
  6 +import org.springframework.stereotype.Service;
  7 +
  8 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  9 +
  10 +/**
  11 + * @Description: AGV任务
  12 + * @Author: jeecg-boot
  13 + * @Date: 2023-02-01
  14 + * @Version: V1.0
  15 + */
  16 +@Service
  17 +public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> implements IAgvTaskService {
  18 +
  19 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskHeader.java
... ... @@ -7,6 +7,7 @@ import org.jeecg.common.aspect.annotation.Dict;
7 7 import org.jeecgframework.poi.excel.annotation.Excel;
8 8  
9 9 import com.baomidou.mybatisplus.annotation.IdType;
  10 +import com.baomidou.mybatisplus.annotation.TableField;
10 11 import com.baomidou.mybatisplus.annotation.TableId;
11 12 import com.baomidou.mybatisplus.annotation.TableName;
12 13  
... ... @@ -102,6 +103,9 @@ public class TaskHeader implements Serializable {
102 103 @Excel(name = "目标出入口", width = 15)
103 104 @ApiModelProperty(value = "目标出入口")
104 105 private String toPortCode;
  106 + @ApiModelProperty(value = "AGV关联任务ID")
  107 + @TableField(value = "agvTaskId")
  108 + private int agvTaskId;
105 109 @ApiModelProperty(value = "生成agv任务")
106 110 private Integer sendAgv;
107 111 @ApiModelProperty(value = "回传MES信息")
... ...