Commit 351d0c46f037840fe01a237204812aed2caed757

Authored by 谭毅彬
1 parent 2d82582d

波次管理页面提交

Signed-off-by: TanYibin <5491541@qq.com>
ant-design-vue-jeecg/src/views/system/config/WaveConfigDetailList.vue 0 → 100644
  1 +<template>
  2 + <a-card :bordered="false" :class="'cust-erp-sub-tab'">
  3 + <!-- 操作按钮区域 -->
  4 + <div class="table-operator" v-if="mainId">
  5 + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  6 + <a-dropdown v-if="selectedRowKeys.length > 0">
  7 + <a-menu slot="overlay">
  8 + <a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
  9 + </a-menu>
  10 + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down"/></a-button>
  11 + </a-dropdown>
  12 + </div>
  13 +
  14 + <!-- table区域-begin -->
  15 + <div>
  16 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  17 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
  18 + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项
  19 + <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  20 + </div>
  21 +
  22 + <a-table
  23 + ref="table"
  24 + size="middle"
  25 + bordered
  26 + rowKey="id"
  27 + :scroll="{ x: true }"
  28 + :columns="columns"
  29 + :dataSource="dataSource"
  30 + :pagination="ipagination"
  31 + :loading="loading"
  32 + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
  33 + @change="handleTableChange"
  34 + >
  35 + <span slot="action" slot-scope="text, record">
  36 + <a @click="handleEdit(record)">编辑</a>
  37 + <a-divider type="vertical" />
  38 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  39 + <a>删除</a>
  40 + </a-popconfirm>
  41 + </span>
  42 + </a-table>
  43 + </div>
  44 +
  45 + <waveConfigDetail-modal ref="modalForm" @ok="modalFormOk" :mainId="mainId"></waveConfigDetail-modal>
  46 + </a-card>
  47 +</template>
  48 +
  49 +<script>
  50 +import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  51 +import WaveConfigDetailModal from './modules/WaveConfigDetailModal'
  52 +
  53 +export default {
  54 + name: 'WaveConfigDetailList',
  55 + mixins: [JeecgListMixin],
  56 + components: { WaveConfigDetailModal },
  57 + props: {
  58 + mainId: {
  59 + type: String,
  60 + default: '',
  61 + required: false
  62 + }
  63 + },
  64 + watch: {
  65 + mainId: {
  66 + immediate: true,
  67 + handler(val) {
  68 + if (!this.mainId) {
  69 + this.clearList()
  70 + } else {
  71 + this.queryParam['mainId'] = val
  72 + this.loadData(1)
  73 + }
  74 + }
  75 + }
  76 + },
  77 + data() {
  78 + return {
  79 + description: '波次配置管理页面',
  80 + disableMixinCreated: true,
  81 + // 表头
  82 + columns: [
  83 + {
  84 + title: '#',
  85 + dataIndex: '',
  86 + key: 'rowIndex',
  87 + width: 60,
  88 + align: 'center',
  89 + customRender: function(t, r, index) {
  90 + return parseInt(index) + 1
  91 + }
  92 + },
  93 + {
  94 + title: '主表ID',
  95 + align: 'center',
  96 + dataIndex: 'mainId'
  97 + },
  98 + {
  99 + title: '物料编码',
  100 + align: 'center',
  101 + dataIndex: 'materialCode'
  102 + },
  103 + {
  104 + title: '物料名称',
  105 + align: 'center',
  106 + dataIndex: 'materialName'
  107 + },
  108 + {
  109 + title: '装载数量',
  110 + align: 'center',
  111 + dataIndex: 'loadingCount'
  112 + },
  113 + {
  114 + title: '排序优先级',
  115 + align: 'center',
  116 + dataIndex: 'sortingPriority'
  117 + },
  118 + {
  119 + title: '创建人',
  120 + align: 'center',
  121 + dataIndex: 'createBy'
  122 + },
  123 + {
  124 + title: '创建日期',
  125 + align: 'center',
  126 + dataIndex: 'createTime'
  127 + },
  128 + {
  129 + title: '更新人',
  130 + align: 'center',
  131 + dataIndex: 'updateBy'
  132 + },
  133 + {
  134 + title: '更新日期',
  135 + align: 'center',
  136 + dataIndex: 'updateTime'
  137 + },
  138 + {
  139 + title: '操作',
  140 + dataIndex: 'action',
  141 + align: 'center',
  142 + fixed: 'right',
  143 + width: 147,
  144 + scopedSlots: { customRender: 'action' }
  145 + }
  146 + ],
  147 + url: {
  148 + list: '/waveConfig/waveConfig/listWaveConfigDetailByMainId',
  149 + delete: '/waveConfig/waveConfig/deleteWaveConfigDetail',
  150 + deleteBatch: '/waveConfig/waveConfig/deleteBatchWaveConfigDetail',
  151 + exportXlsUrl: '/waveConfig/waveConfig/exportWaveConfigDetail',
  152 + importUrl: '/waveConfig/waveConfig/importWaveConfigDetail'
  153 + },
  154 + dictOptions: {}
  155 + }
  156 + },
  157 + created() {},
  158 + computed: {
  159 + importExcelUrl() {
  160 + return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`
  161 + }
  162 + },
  163 + methods: {
  164 + clearList() {
  165 + this.dataSource = []
  166 + this.selectedRowKeys = []
  167 + this.ipagination.current = 1
  168 + }
  169 + }
  170 +}
  171 +</script>
  172 +<style scoped>
  173 +@import '~@assets/less/common.less';
  174 +</style>
... ...
ant-design-vue-jeecg/src/views/system/config/WaveConfigList.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.waveName"></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 + <j-dict-select-tag placeholder="请选择波次模式" v-model="queryParam.waveModel" dictCode="wave_model" />
  15 + </a-form-item>
  16 + </a-col>
  17 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18 + <a-form-item label="是否启用">
  19 + <j-dict-select-tag placeholder="请选择是否启用" v-model="queryParam.isEnable" dictCode="is_enable_status" />
  20 + </a-form-item>
  21 + </a-col>
  22 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  23 + <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  24 + <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  25 + <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  26 + </span>
  27 + </a-col>
  28 + </a-row>
  29 + </a-form>
  30 + </div>
  31 + <!-- 查询区域-END -->
  32 +
  33 + <!-- 操作按钮区域 -->
  34 + <div class="table-operator">
  35 + <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  36 + <a-button type="primary" icon="download" @click="handleExportXls('波次配置')">导出</a-button>
  37 + <a-upload
  38 + name="file"
  39 + :showUploadList="false"
  40 + :multiple="false"
  41 + :headers="tokenHeader"
  42 + :action="importExcelUrl"
  43 + @change="handleImportExcel"
  44 + >
  45 + <a-button type="primary" icon="import">导入</a-button>
  46 + </a-upload>
  47 + <!-- 高级查询区域 -->
  48 + <j-super-query
  49 + :fieldList="superFieldList"
  50 + ref="superQueryModal"
  51 + @handleSuperQuery="handleSuperQuery"
  52 + ></j-super-query>
  53 + </div>
  54 +
  55 + <!-- table区域-begin -->
  56 + <div>
  57 + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  58 + <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
  59 + <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项
  60 + <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  61 + </div>
  62 +
  63 + <a-table
  64 + ref="table"
  65 + size="middle"
  66 + bordered
  67 + rowKey="id"
  68 + class="j-table-force-nowrap"
  69 + :scroll="{ x: true }"
  70 + :columns="columns"
  71 + :dataSource="dataSource"
  72 + :pagination="ipagination"
  73 + :loading="loading"
  74 + :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio' }"
  75 + :customRow="clickThenSelect"
  76 + @change="handleTableChange"
  77 + >
  78 +
  79 + <span slot="action" slot-scope="text, record">
  80 + <a @click="handleEdit(record)">编辑</a>
  81 + <a-divider type="vertical" />
  82 + <a-dropdown>
  83 + <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
  84 + <a-menu slot="overlay">
  85 + <a-menu-item>
  86 + <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  87 + <a>删除</a>
  88 + </a-popconfirm>
  89 + </a-menu-item>
  90 + </a-menu>
  91 + </a-dropdown>
  92 + </span>
  93 +
  94 + </a-table>
  95 + </div>
  96 +
  97 + <a-tabs defaultActiveKey="1">
  98 + <a-tab-pane tab="波次配置详情" key="1">
  99 + <WaveConfigDetailList :mainId="selectedMainId" />
  100 + </a-tab-pane>
  101 + </a-tabs>
  102 +
  103 + <waveConfig-modal ref="modalForm" @ok="modalFormOk"></waveConfig-modal>
  104 + </a-card>
  105 +</template>
  106 +
  107 +<script>
  108 +import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  109 +import WaveConfigModal from './modules/WaveConfigModal'
  110 +import { getAction } from '@/api/manage'
  111 +import WaveConfigDetailList from './WaveConfigDetailList'
  112 +import '@/assets/less/TableExpand.less'
  113 +
  114 +export default {
  115 + name: 'WaveConfigList',
  116 + mixins: [JeecgListMixin],
  117 + components: {
  118 + WaveConfigDetailList,
  119 + WaveConfigModal
  120 + },
  121 + data() {
  122 + return {
  123 + description: '波次配置管理页面',
  124 + // 表头
  125 + columns: [
  126 + {
  127 + title: '波次名称',
  128 + align: 'center',
  129 + dataIndex: 'waveName'
  130 + },
  131 + {
  132 + title: '波次大小',
  133 + align: 'center',
  134 + dataIndex: 'waveSize'
  135 + },
  136 + {
  137 + title: '波次周期(秒)',
  138 + align: 'center',
  139 + dataIndex: 'waveCycle'
  140 + },
  141 + {
  142 + title: '波次模式',
  143 + align: 'center',
  144 + dataIndex: 'waveModel_dictText',
  145 + scopedSlots: {customRender: 'waveModel_dictText'}
  146 + },
  147 + {
  148 + title: '是否启用',
  149 + align: 'center',
  150 + dataIndex: 'isEnable_dictText',
  151 + scopedSlots: {customRender: 'isEnable_dictText'}
  152 + },
  153 + {
  154 + title: '创建人',
  155 + align: 'center',
  156 + dataIndex: 'createBy'
  157 + },
  158 + {
  159 + title: '创建日期',
  160 + align: 'center',
  161 + dataIndex: 'createTime'
  162 + },
  163 + {
  164 + title: '更新人',
  165 + align: 'center',
  166 + dataIndex: 'updateBy'
  167 + },
  168 + {
  169 + title: '更新日期',
  170 + align: 'center',
  171 + dataIndex: 'updateTime'
  172 + },
  173 + {
  174 + title: '操作',
  175 + dataIndex: 'action',
  176 + align: 'center',
  177 + fixed: 'right',
  178 + width: 147,
  179 + scopedSlots: { customRender: 'action' }
  180 + }
  181 + ],
  182 + url: {
  183 + list: '/waveConfig/waveConfig/list',
  184 + delete: '/waveConfig/waveConfig/delete',
  185 + deleteBatch: '/waveConfig/waveConfig/deleteBatch',
  186 + exportXlsUrl: '/waveConfig/waveConfig/exportXls',
  187 + importExcelUrl: 'waveConfig/waveConfig/importExcel'
  188 + },
  189 + dictOptions: {},
  190 + /* 分页参数 */
  191 + ipagination: {
  192 + current: 1,
  193 + pageSize: 5,
  194 + pageSizeOptions: ['5', '10', '50'],
  195 + showTotal: (total, range) => {
  196 + return range[0] + '-' + range[1] + ' 共' + total + '条'
  197 + },
  198 + showQuickJumper: true,
  199 + showSizeChanger: true,
  200 + total: 0
  201 + },
  202 + selectedMainId: '',
  203 + superFieldList: []
  204 + }
  205 + },
  206 + created() {
  207 + this.getSuperFieldList()
  208 + },
  209 + computed: {
  210 + importExcelUrl: function() {
  211 + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
  212 + }
  213 + },
  214 + methods: {
  215 + initDictConfig() {},
  216 + clickThenSelect(record) {
  217 + return {
  218 + on: {
  219 + click: () => {
  220 + this.onSelectChange(record.id.split(','), [record])
  221 + }
  222 + }
  223 + }
  224 + },
  225 + onClearSelected() {
  226 + this.selectedRowKeys = []
  227 + this.selectionRows = []
  228 + this.selectedMainId = ''
  229 + },
  230 + onSelectChange(selectedRowKeys, selectionRows) {
  231 + this.selectedMainId = selectedRowKeys[0]
  232 + this.selectedRowKeys = selectedRowKeys
  233 + this.selectionRows = selectionRows
  234 + },
  235 + loadData(arg) {
  236 + if (!this.url.list) {
  237 + this.$message.error('请设置url.list属性!')
  238 + return
  239 + }
  240 + //加载数据 若传入参数1则加载第一页的内容
  241 + if (arg === 1) {
  242 + this.ipagination.current = 1
  243 + }
  244 + this.onClearSelected()
  245 + var params = this.getQueryParams() //查询条件
  246 + this.loading = true
  247 + getAction(this.url.list, params).then(res => {
  248 + if (res.success) {
  249 + this.dataSource = res.result.records
  250 + this.ipagination.total = res.result.total
  251 + }
  252 + if (res.code === 510) {
  253 + this.$message.warning(res.message)
  254 + }
  255 + this.loading = false
  256 + })
  257 + },
  258 + getSuperFieldList() {
  259 + let fieldList = []
  260 + fieldList.push({ type: 'string', value: 'waveName', text: '波次名称', dictCode: '' })
  261 + fieldList.push({ type: 'int', value: 'waveSize', text: '波次大小', dictCode: '' })
  262 + fieldList.push({ type: 'int', value: 'waveCycle', text: '波次周期(秒)', dictCode: '' })
  263 + fieldList.push({ type: 'string', value: 'waveModel', text: '波次模式', dictCode: 'wave_model' })
  264 + fieldList.push({ type: 'int', value: 'isEnable', text: '是否启用', dictCode: 'is_enable_status' })
  265 + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' })
  266 + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' })
  267 + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' })
  268 + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' })
  269 + this.superFieldList = fieldList
  270 + }
  271 + }
  272 +}
  273 +</script>
  274 +<style scoped>
  275 +@import '~@assets/less/common.less';
  276 +</style>
0 277 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/config/modules/WaveConfigDetailModal.vue 0 → 100644
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + :confirmLoading="confirmLoading"
  7 + switchFullscreen
  8 + @ok="handleOk"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭"
  11 + >
  12 + <a-spin :spinning="confirmLoading">
  13 + <a-form-model ref="form" :model="model" :rules="validatorRules">
  14 + <a-row>
  15 + <a-col :span="24">
  16 + <a-form-model-item label="物料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialCode">
  17 + <j-search-select-tag
  18 + v-model="model.materialCode"
  19 + dict="material,name,code"
  20 + placeholder="请选择物料编码"
  21 + :pageSize="10"
  22 + :async="true"
  23 + />
  24 + </a-form-model-item>
  25 + </a-col>
  26 + <a-col :span="24">
  27 + <a-form-model-item label="装载数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="loadingCount">
  28 + <a-input-number v-model="model.loadingCount" placeholder="请输入装载数量" style="width: 100%" />
  29 + </a-form-model-item>
  30 + </a-col>
  31 + <a-col :span="24">
  32 + <a-form-model-item label="排序优先级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sortingPriority">
  33 + <a-input-number v-model="model.sortingPriority" placeholder="请输入排序优先级" style="width: 100%" />
  34 + </a-form-model-item>
  35 + </a-col>
  36 + </a-row>
  37 + </a-form-model>
  38 + </a-spin>
  39 + </j-modal>
  40 +</template>
  41 +
  42 +<script>
  43 +import { httpAction } from '@/api/manage'
  44 +import { validateDuplicateValue } from '@/utils/util'
  45 +import { searchMaterialByCode } from '@/api/api'
  46 +
  47 +export default {
  48 + name: 'WaveConfigDetailModal',
  49 + components: {},
  50 + props: {
  51 + mainId: {
  52 + type: String,
  53 + required: false,
  54 + default: ''
  55 + }
  56 + },
  57 + data() {
  58 + return {
  59 + title: '操作',
  60 + width: 800,
  61 + visible: false,
  62 + model: {},
  63 + labelCol: {
  64 + xs: { span: 24 },
  65 + sm: { span: 5 }
  66 + },
  67 + wrapperCol: {
  68 + xs: { span: 24 },
  69 + sm: { span: 16 }
  70 + },
  71 + confirmLoading: false,
  72 + validatorRules: {
  73 + materialCode: [{ required: true, message: '请输入物料编码!' }],
  74 + loadingCount: [{ required: true, message: '请输入装载数量!' }],
  75 + sortingPriority: [{ required: true, message: '请输入排序优先级!' }]
  76 + },
  77 + url: {
  78 + add: '/waveConfig/waveConfig/addWaveConfigDetail',
  79 + edit: '/waveConfig/waveConfig/editWaveConfigDetail'
  80 + }
  81 + }
  82 + },
  83 + created() {
  84 + //备份model原始值
  85 + this.modelDefault = JSON.parse(JSON.stringify(this.model))
  86 + this.searchMaterial()
  87 + },
  88 + methods: {
  89 + searchMaterial() {
  90 + const that = this
  91 + that.querySource.materialCode = that.model.materialCode
  92 + searchMaterialByCode(that.querySource).then(res => {
  93 + that.materialList = res.result
  94 + })
  95 + },
  96 + add() {
  97 + this.edit(this.modelDefault)
  98 + },
  99 + edit(record) {
  100 + this.model = Object.assign({}, record)
  101 + this.visible = true
  102 + },
  103 + close() {
  104 + this.$emit('close')
  105 + this.visible = false
  106 + this.$refs.form.clearValidate()
  107 + },
  108 + handleOk() {
  109 + const that = this
  110 + // 触发表单验证
  111 + this.$refs.form.validate(valid => {
  112 + if (valid) {
  113 + that.confirmLoading = true
  114 + let httpurl = ''
  115 + let method = ''
  116 + if (!this.model.id) {
  117 + httpurl += this.url.add
  118 + method = 'post'
  119 + } else {
  120 + httpurl += this.url.edit
  121 + method = 'put'
  122 + }
  123 + this.model['mainId'] = this.mainId
  124 + httpAction(httpurl, this.model, method)
  125 + .then(res => {
  126 + if (res.success) {
  127 + that.$message.success(res.message)
  128 + that.$emit('ok')
  129 + } else {
  130 + that.$message.warning(res.message)
  131 + }
  132 + })
  133 + .finally(() => {
  134 + that.confirmLoading = false
  135 + that.close()
  136 + })
  137 + } else {
  138 + return false
  139 + }
  140 + })
  141 + },
  142 + handleCancel() {
  143 + this.close()
  144 + }
  145 + }
  146 +}
  147 +</script>
... ...
ant-design-vue-jeecg/src/views/system/config/modules/WaveConfigModal.vue 0 → 100644
  1 +<template>
  2 + <j-modal
  3 + :title="title"
  4 + :width="width"
  5 + :visible="visible"
  6 + :confirmLoading="confirmLoading"
  7 + switchFullscreen
  8 + @ok="handleOk"
  9 + @cancel="handleCancel"
  10 + cancelText="关闭">
  11 + <a-spin :spinning="confirmLoading">
  12 + <a-form-model ref="form" :model="model" :rules="validatorRules">
  13 + <a-row>
  14 + <a-col :span="24">
  15 + <a-form-model-item label="波次名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="waveName">
  16 + <a-input v-model="model.waveName" placeholder="请输入波次名称" ></a-input>
  17 + </a-form-model-item>
  18 + </a-col>
  19 + <a-col :span="24">
  20 + <a-form-model-item label="波次大小" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="waveSize">
  21 + <a-input-number v-model="model.waveSize" placeholder="请输入波次大小" style="width: 100%" />
  22 + </a-form-model-item>
  23 + </a-col>
  24 + <a-col :span="24">
  25 + <a-form-model-item label="波次周期(秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="waveCycle">
  26 + <a-input-number v-model="model.waveCycle" placeholder="请输入波次周期(秒)" style="width: 100%" />
  27 + </a-form-model-item>
  28 + </a-col>
  29 + <a-col :span="24">
  30 + <a-form-model-item label="波次模式(缺货,补货)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="waveModel">
  31 + <j-dict-select-tag v-model="model.waveModel" title="波次模式" dictCode="wave_model" placeholder="请输入波次模式"/>
  32 + </a-form-model-item>
  33 + </a-col>
  34 + <a-col :span="24">
  35 + <a-form-model-item label="是否启用" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isEnable">
  36 + <j-dict-select-tag v-model="model.isEnable" title="是否启用" dictCode="is_enable_status" placeholder="请输入是否启用"/>
  37 + </a-form-model-item>
  38 + </a-col>
  39 + </a-row>
  40 + </a-form-model>
  41 + </a-spin>
  42 + </j-modal>
  43 +</template>
  44 +
  45 +<script>
  46 +
  47 + import { httpAction } from '@/api/manage'
  48 + import { validateDuplicateValue } from '@/utils/util'
  49 +
  50 + export default {
  51 + name: "WaveConfigModal",
  52 + components: {
  53 + },
  54 + data () {
  55 + return {
  56 + title:"操作",
  57 + width:800,
  58 + visible: false,
  59 + model:{
  60 + },
  61 + labelCol: {
  62 + xs: { span: 24 },
  63 + sm: { span: 5 },
  64 + },
  65 + wrapperCol: {
  66 + xs: { span: 24 },
  67 + sm: { span: 16 },
  68 + },
  69 +
  70 + confirmLoading: false,
  71 +validatorRules: {
  72 + waveName: [
  73 + { required: true, message: '请输入波次名称!'},
  74 + ],
  75 +},
  76 + url: {
  77 + add: "/waveConfig/waveConfig/add",
  78 + edit: "/waveConfig/waveConfig/edit",
  79 + }
  80 +
  81 + }
  82 + },
  83 + created () {
  84 + //备份model原始值
  85 + this.modelDefault = JSON.parse(JSON.stringify(this.model));
  86 + },
  87 + methods: {
  88 + add () {
  89 + this.edit(this.modelDefault);
  90 + },
  91 + edit (record) {
  92 + this.model = Object.assign({}, record);
  93 + this.visible = true;
  94 + },
  95 + close () {
  96 + this.$emit('close');
  97 + this.visible = false;
  98 + this.$refs.form.clearValidate();
  99 + },
  100 + handleOk () {
  101 + const that = this;
  102 + // 触发表单验证
  103 + this.$refs.form.validate(valid => {
  104 + if (valid) {
  105 + that.confirmLoading = true;
  106 + let httpurl = '';
  107 + let method = '';
  108 + if(!this.model.id){
  109 + httpurl+=this.url.add;
  110 + method = 'post';
  111 + }else{
  112 + httpurl+=this.url.edit;
  113 + method = 'put';
  114 + }
  115 + httpAction(httpurl,this.model,method).then((res)=>{
  116 + if(res.success){
  117 + that.$message.success(res.message);
  118 + that.$emit('ok');
  119 + }else{
  120 + that.$message.warning(res.message);
  121 + }
  122 + }).finally(() => {
  123 + that.confirmLoading = false;
  124 + that.close();
  125 + })
  126 + }else{
  127 + return false
  128 + }
  129 + })
  130 + },
  131 + handleCancel () {
  132 + this.close()
  133 + },
  134 +
  135 +
  136 + }
  137 + }
  138 +</script>
0 139 \ No newline at end of file
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/waveConfig/controller/WaveConfigController.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.waveConfig.controller;
  2 +
  3 +import java.io.IOException;
  4 +import java.util.Arrays;
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +import java.util.stream.Collectors;
  8 +
  9 +import javax.servlet.http.HttpServletRequest;
  10 +import javax.servlet.http.HttpServletResponse;
  11 +
  12 +import org.apache.shiro.SecurityUtils;
  13 +import org.apache.shiro.authz.annotation.RequiresPermissions;
  14 +import org.jeecg.common.api.vo.Result;
  15 +import org.jeecg.common.aspect.annotation.AutoLog;
  16 +import org.jeecg.common.system.base.controller.JeecgController;
  17 +import org.jeecg.common.system.query.QueryGenerator;
  18 +import org.jeecg.common.system.vo.LoginUser;
  19 +import org.jeecg.common.util.oConvertUtils;
  20 +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfig;
  21 +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfigDetail;
  22 +import org.jeecg.modules.wms.config.waveConfig.service.IWaveConfigDetailService;
  23 +import org.jeecg.modules.wms.config.waveConfig.service.IWaveConfigService;
  24 +import org.jeecgframework.poi.excel.ExcelImportUtil;
  25 +import org.jeecgframework.poi.excel.def.NormalExcelConstants;
  26 +import org.jeecgframework.poi.excel.entity.ExportParams;
  27 +import org.jeecgframework.poi.excel.entity.ImportParams;
  28 +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
  29 +import org.springframework.beans.factory.annotation.Autowired;
  30 +import org.springframework.web.bind.annotation.DeleteMapping;
  31 +import org.springframework.web.bind.annotation.GetMapping;
  32 +import org.springframework.web.bind.annotation.PathVariable;
  33 +import org.springframework.web.bind.annotation.PostMapping;
  34 +import org.springframework.web.bind.annotation.RequestBody;
  35 +import org.springframework.web.bind.annotation.RequestMapping;
  36 +import org.springframework.web.bind.annotation.RequestMethod;
  37 +import org.springframework.web.bind.annotation.RequestParam;
  38 +import org.springframework.web.bind.annotation.RestController;
  39 +import org.springframework.web.multipart.MultipartFile;
  40 +import org.springframework.web.multipart.MultipartHttpServletRequest;
  41 +import org.springframework.web.servlet.ModelAndView;
  42 +
  43 +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  44 +import com.baomidou.mybatisplus.core.metadata.IPage;
  45 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  46 +
  47 +import io.swagger.annotations.Api;
  48 +import io.swagger.annotations.ApiOperation;
  49 +import lombok.extern.slf4j.Slf4j;
  50 +
  51 +/**
  52 + * @Description: 波次配置
  53 + * @Author: jeecg-boot
  54 + * @Date: 2023-12-07
  55 + * @Version: V1.0
  56 + */
  57 +@Api(tags = "波次配置")
  58 +@RestController
  59 +@RequestMapping("/waveConfig/waveConfig")
  60 +@Slf4j
  61 +public class WaveConfigController extends JeecgController<WaveConfig, IWaveConfigService> {
  62 +
  63 + @Autowired
  64 + private IWaveConfigService waveConfigService;
  65 +
  66 + @Autowired
  67 + private IWaveConfigDetailService waveConfigDetailService;
  68 +
  69 + /*---------------------------------主表处理-begin-------------------------------------*/
  70 +
  71 + /**
  72 + * 分页列表查询
  73 + * @param waveConfig
  74 + * @param pageNo
  75 + * @param pageSize
  76 + * @param req
  77 + * @return
  78 + */
  79 + // @AutoLog(value = "波次配置-分页列表查询")
  80 + @ApiOperation(value = "波次配置-分页列表查询", notes = "波次配置-分页列表查询")
  81 + @GetMapping(value = "/list")
  82 + public Result<IPage<WaveConfig>> queryPageList(WaveConfig waveConfig, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
  83 + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
  84 + QueryWrapper<WaveConfig> queryWrapper = QueryGenerator.initQueryWrapper(waveConfig, req.getParameterMap());
  85 + Page<WaveConfig> page = new Page<WaveConfig>(pageNo, pageSize);
  86 + IPage<WaveConfig> pageList = waveConfigService.page(page, queryWrapper);
  87 + return Result.OK(pageList);
  88 + }
  89 +
  90 + /**
  91 + * 添加
  92 + * @param waveConfig
  93 + * @return
  94 + */
  95 + @AutoLog(value = "波次配置-添加")
  96 + @ApiOperation(value = "波次配置-添加", notes = "波次配置-添加")
  97 + @RequiresPermissions("waveConfig:add")
  98 + @PostMapping(value = "/add")
  99 + public Result<String> add(@RequestBody WaveConfig waveConfig) {
  100 + waveConfigService.save(waveConfig);
  101 + return Result.OK("添加成功!");
  102 + }
  103 +
  104 + /**
  105 + * 编辑
  106 + * @param waveConfig
  107 + * @return
  108 + */
  109 + @AutoLog(value = "波次配置-编辑")
  110 + @ApiOperation(value = "波次配置-编辑", notes = "波次配置-编辑")
  111 + @RequiresPermissions("waveConfig:edit")
  112 + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
  113 + public Result<String> edit(@RequestBody WaveConfig waveConfig) {
  114 + waveConfigService.updateById(waveConfig);
  115 + return Result.OK("编辑成功!");
  116 + }
  117 +
  118 + /**
  119 + * 通过id删除
  120 + * @param id
  121 + * @return
  122 + */
  123 + @AutoLog(value = "波次配置-通过id删除")
  124 + @ApiOperation(value = "波次配置-通过id删除", notes = "波次配置-通过id删除")
  125 + @RequiresPermissions("waveConfig:delete")
  126 + @DeleteMapping(value = "/delete")
  127 + public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
  128 + waveConfigService.delMain(id);
  129 + return Result.OK("删除成功!");
  130 + }
  131 +
  132 + /**
  133 + * 批量删除
  134 + * @param ids
  135 + * @return
  136 + */
  137 + @AutoLog(value = "波次配置-批量删除")
  138 + @ApiOperation(value = "波次配置-批量删除", notes = "波次配置-批量删除")
  139 + @RequiresPermissions("waveConfig:deleteBatch")
  140 + @DeleteMapping(value = "/deleteBatch")
  141 + public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
  142 + this.waveConfigService.delBatchMain(Arrays.asList(ids.split(",")));
  143 + return Result.OK("批量删除成功!");
  144 + }
  145 +
  146 + /**
  147 + * 导出
  148 + * @return
  149 + */
  150 + @RequestMapping(value = "/exportXls")
  151 + public ModelAndView exportXls(HttpServletRequest request, WaveConfig waveConfig) {
  152 + return super.exportXls(request, waveConfig, WaveConfig.class, "波次配置");
  153 + }
  154 +
  155 + /**
  156 + * 导入
  157 + * @return
  158 + */
  159 + @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
  160 + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
  161 + return super.importExcel(request, response, WaveConfig.class);
  162 + }
  163 + /*---------------------------------主表处理-end-------------------------------------*/
  164 +
  165 + /*--------------------------------子表处理-波次配置详情-begin----------------------------------------------*/
  166 + /**
  167 + * 通过主表ID查询
  168 + * @return
  169 + */
  170 + // @AutoLog(value = "波次配置详情-通过主表ID查询")
  171 + @ApiOperation(value = "波次配置详情-通过主表ID查询", notes = "波次配置详情-通过主表ID查询")
  172 + @GetMapping(value = "/listWaveConfigDetailByMainId")
  173 + public Result<IPage<WaveConfigDetail>> listWaveConfigDetailByMainId(WaveConfigDetail waveConfigDetail,
  174 + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
  175 + HttpServletRequest req) {
  176 + QueryWrapper<WaveConfigDetail> queryWrapper = QueryGenerator.initQueryWrapper(waveConfigDetail, req.getParameterMap());
  177 + Page<WaveConfigDetail> page = new Page<WaveConfigDetail>(pageNo, pageSize);
  178 + IPage<WaveConfigDetail> pageList = waveConfigDetailService.page(page, queryWrapper);
  179 + return Result.OK(pageList);
  180 + }
  181 +
  182 + /**
  183 + * 添加
  184 + * @param waveConfigDetail
  185 + * @return
  186 + */
  187 + @AutoLog(value = "波次配置详情-添加")
  188 + @ApiOperation(value = "波次配置详情-添加", notes = "波次配置详情-添加")
  189 + @PostMapping(value = "/addWaveConfigDetail")
  190 + public Result<String> addWaveConfigDetail(@RequestBody WaveConfigDetail waveConfigDetail) {
  191 + waveConfigDetailService.save(waveConfigDetail);
  192 + return Result.OK("添加成功!");
  193 + }
  194 +
  195 + /**
  196 + * 编辑
  197 + * @param waveConfigDetail
  198 + * @return
  199 + */
  200 + @AutoLog(value = "波次配置详情-编辑")
  201 + @ApiOperation(value = "波次配置详情-编辑", notes = "波次配置详情-编辑")
  202 + @RequestMapping(value = "/editWaveConfigDetail", method = {RequestMethod.PUT, RequestMethod.POST})
  203 + public Result<String> editWaveConfigDetail(@RequestBody WaveConfigDetail waveConfigDetail) {
  204 + waveConfigDetailService.updateById(waveConfigDetail);
  205 + return Result.OK("编辑成功!");
  206 + }
  207 +
  208 + /**
  209 + * 通过id删除
  210 + * @param id
  211 + * @return
  212 + */
  213 + @AutoLog(value = "波次配置详情-通过id删除")
  214 + @ApiOperation(value = "波次配置详情-通过id删除", notes = "波次配置详情-通过id删除")
  215 + @DeleteMapping(value = "/deleteWaveConfigDetail")
  216 + public Result<String> deleteWaveConfigDetail(@RequestParam(name = "id", required = true) String id) {
  217 + waveConfigDetailService.removeById(id);
  218 + return Result.OK("删除成功!");
  219 + }
  220 +
  221 + /**
  222 + * 批量删除
  223 + * @param ids
  224 + * @return
  225 + */
  226 + @AutoLog(value = "波次配置详情-批量删除")
  227 + @ApiOperation(value = "波次配置详情-批量删除", notes = "波次配置详情-批量删除")
  228 + @DeleteMapping(value = "/deleteBatchWaveConfigDetail")
  229 + public Result<String> deleteBatchWaveConfigDetail(@RequestParam(name = "ids", required = true) String ids) {
  230 + this.waveConfigDetailService.removeByIds(Arrays.asList(ids.split(",")));
  231 + return Result.OK("批量删除成功!");
  232 + }
  233 +
  234 + /**
  235 + * 导出
  236 + * @return
  237 + */
  238 + @RequestMapping(value = "/exportWaveConfigDetail")
  239 + public ModelAndView exportWaveConfigDetail(HttpServletRequest request, WaveConfigDetail waveConfigDetail) {
  240 + // Step.1 组装查询条件
  241 + QueryWrapper<WaveConfigDetail> queryWrapper = QueryGenerator.initQueryWrapper(waveConfigDetail, request.getParameterMap());
  242 + LoginUser sysUser = (LoginUser)SecurityUtils.getSubject().getPrincipal();
  243 +
  244 + // Step.2 获取导出数据
  245 + List<WaveConfigDetail> pageList = waveConfigDetailService.list(queryWrapper);
  246 + List<WaveConfigDetail> exportList = null;
  247 +
  248 + // 过滤选中数据
  249 + String selections = request.getParameter("selections");
  250 + if (oConvertUtils.isNotEmpty(selections)) {
  251 + List<String> selectionList = Arrays.asList(selections.split(","));
  252 + exportList = pageList.stream().filter(item -> selectionList.contains(item.getId().toString())).collect(Collectors.toList());
  253 + } else {
  254 + exportList = pageList;
  255 + }
  256 +
  257 + // Step.3 AutoPoi 导出Excel
  258 + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
  259 + mv.addObject(NormalExcelConstants.FILE_NAME, "波次配置详情"); // 此处设置的filename无效 ,前端会重更新设置一下
  260 + mv.addObject(NormalExcelConstants.CLASS, WaveConfigDetail.class);
  261 + mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("波次配置详情报表", "导出人:" + sysUser.getRealname(), "波次配置详情"));
  262 + mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
  263 + return mv;
  264 + }
  265 +
  266 + /**
  267 + * 导入
  268 + * @return
  269 + */
  270 + @RequestMapping(value = "/importWaveConfigDetail/{mainId}")
  271 + public Result<?> importWaveConfigDetail(HttpServletRequest request, HttpServletResponse response, @PathVariable("mainId") String mainId) {
  272 + MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest)request;
  273 + Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
  274 + for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
  275 + MultipartFile file = entity.getValue();// 获取上传文件对象
  276 + ImportParams params = new ImportParams();
  277 + params.setTitleRows(2);
  278 + params.setHeadRows(1);
  279 + params.setNeedSave(true);
  280 + try {
  281 + List<WaveConfigDetail> list = ExcelImportUtil.importExcel(file.getInputStream(), WaveConfigDetail.class, params);
  282 + for (WaveConfigDetail temp : list) {
  283 + temp.setMainId(Integer.parseInt(mainId));
  284 + }
  285 + long start = System.currentTimeMillis();
  286 + waveConfigDetailService.saveBatch(list);
  287 + log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
  288 + return Result.OK("文件导入成功!数据行数:" + list.size());
  289 + } catch (Exception e) {
  290 + log.error(e.getMessage(), e);
  291 + return Result.error("文件导入失败:" + e.getMessage());
  292 + } finally {
  293 + try {
  294 + file.getInputStream().close();
  295 + } catch (IOException e) {
  296 + e.printStackTrace();
  297 + }
  298 + }
  299 + }
  300 + return Result.error("文件导入失败!");
  301 + }
  302 +
  303 + /*--------------------------------子表处理-波次配置详情-end----------------------------------------------*/
  304 +
  305 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/waveConfig/entity/WaveConfig.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.waveConfig.entity;
  2 +
  3 +import java.io.Serializable;
  4 +import java.io.UnsupportedEncodingException;
  5 +import java.util.Date;
  6 +import com.baomidou.mybatisplus.annotation.IdType;
  7 +import com.baomidou.mybatisplus.annotation.TableId;
  8 +import com.baomidou.mybatisplus.annotation.TableName;
  9 +import org.jeecgframework.poi.excel.annotation.Excel;
  10 +import lombok.Data;
  11 +import com.fasterxml.jackson.annotation.JsonFormat;
  12 +import org.springframework.format.annotation.DateTimeFormat;
  13 +import org.jeecg.common.aspect.annotation.Dict;
  14 +import io.swagger.annotations.ApiModel;
  15 +import io.swagger.annotations.ApiModelProperty;
  16 +
  17 +/**
  18 + * @Description: 波次配置
  19 + * @Author: jeecg-boot
  20 + * @Date: 2023-12-07
  21 + * @Version: V1.0
  22 + */
  23 +@Data
  24 +@TableName("wave_config")
  25 +@ApiModel(value = "wave_config对象", description = "波次配置")
  26 +public class WaveConfig implements Serializable {
  27 + private static final long serialVersionUID = 1L;
  28 +
  29 + /** ID */
  30 + @TableId(type = IdType.AUTO)
  31 + @ApiModelProperty(value = "ID")
  32 + private java.lang.Integer id;
  33 +
  34 + /** 波次名称 */
  35 + @Excel(name = "波次名称", width = 15)
  36 + @ApiModelProperty(value = "波次名称")
  37 + private java.lang.String waveName;
  38 +
  39 + /** 波次大小 */
  40 + @Excel(name = "波次大小", width = 15)
  41 + @ApiModelProperty(value = "波次大小")
  42 + private java.lang.Integer waveSize;
  43 +
  44 + /** 波次周期(秒) */
  45 + @Excel(name = "波次周期(秒)", width = 15)
  46 + @ApiModelProperty(value = "波次周期(秒)")
  47 + private java.lang.Integer waveCycle;
  48 +
  49 + /** 波次模式(缺货,补货) */
  50 + @Excel(name = "波次模式(缺货,补货)", width = 15, dicCode = "wave_model")
  51 + @ApiModelProperty(value = "波次模式(缺货,补货)")
  52 + @Dict(dicCode = "wave_model")
  53 + private java.lang.String waveModel;
  54 +
  55 + /** 是否启用 */
  56 + @Excel(name = "是否启用", width = 15, dicCode = "is_enable_status")
  57 + @ApiModelProperty(value = "是否启用")
  58 + @Dict(dicCode = "is_enable_status")
  59 + private java.lang.Integer isEnable;
  60 +
  61 + /** 创建人 */
  62 + @ApiModelProperty(value = "创建人")
  63 + private java.lang.String createBy;
  64 +
  65 + /** 创建日期 */
  66 + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  67 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  68 + @ApiModelProperty(value = "创建日期")
  69 + private java.util.Date createTime;
  70 +
  71 + /** 更新人 */
  72 + @ApiModelProperty(value = "更新人")
  73 + private java.lang.String updateBy;
  74 +
  75 + /** 更新日期 */
  76 + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  77 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  78 + @ApiModelProperty(value = "更新日期")
  79 + private java.util.Date updateTime;
  80 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/waveConfig/entity/WaveConfigDetail.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.waveConfig.entity;
  2 +
  3 +import java.io.Serializable;
  4 +import com.baomidou.mybatisplus.annotation.IdType;
  5 +import com.baomidou.mybatisplus.annotation.TableId;
  6 +import com.baomidou.mybatisplus.annotation.TableName;
  7 +import org.jeecg.common.aspect.annotation.Dict;
  8 +import lombok.Data;
  9 +import com.fasterxml.jackson.annotation.JsonFormat;
  10 +import org.springframework.format.annotation.DateTimeFormat;
  11 +import org.jeecgframework.poi.excel.annotation.Excel;
  12 +import java.util.Date;
  13 +import io.swagger.annotations.ApiModel;
  14 +import io.swagger.annotations.ApiModelProperty;
  15 +import java.io.UnsupportedEncodingException;
  16 +
  17 +/**
  18 + * @Description: 波次配置详情
  19 + * @Author: jeecg-boot
  20 + * @Date: 2023-12-07
  21 + * @Version: V1.0
  22 + */
  23 +@Data
  24 +@TableName("wave_config_detail")
  25 +@ApiModel(value = "wave_config_detail对象", description = "波次配置详情")
  26 +public class WaveConfigDetail implements Serializable {
  27 + private static final long serialVersionUID = 1L;
  28 +
  29 + /** ID */
  30 + @TableId(type = IdType.AUTO)
  31 + @ApiModelProperty(value = "ID")
  32 + private java.lang.Integer id;
  33 +
  34 + /** 主表ID */
  35 + @ApiModelProperty(value = "主表ID")
  36 + private java.lang.Integer mainId;
  37 +
  38 + /** 物料编码 */
  39 + @Excel(name = "物料编码", width = 15)
  40 + @ApiModelProperty(value = "物料编码")
  41 + private java.lang.String materialCode;
  42 +
  43 + /** 物料名称 */
  44 + @Excel(name = "物料名称", width = 15)
  45 + @ApiModelProperty(value = "物料名称")
  46 + private java.lang.String materialName;
  47 +
  48 + /** 装载数量 */
  49 + @Excel(name = "装载数量", width = 15)
  50 + @ApiModelProperty(value = "装载数量")
  51 + private java.lang.Integer loadingCount;
  52 +
  53 + /** 排序优先级 */
  54 + @Excel(name = "排序优先级", width = 15)
  55 + @ApiModelProperty(value = "排序优先级")
  56 + private java.lang.Integer sortingPriority;
  57 +
  58 + /** 创建人 */
  59 + @ApiModelProperty(value = "创建人")
  60 + private java.lang.String createBy;
  61 +
  62 + /** 创建日期 */
  63 + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  64 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  65 + @ApiModelProperty(value = "创建日期")
  66 + private java.util.Date createTime;
  67 +
  68 + /** 更新人 */
  69 + @ApiModelProperty(value = "更新人")
  70 + private java.lang.String updateBy;
  71 +
  72 + /** 更新日期 */
  73 + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  74 + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  75 + @ApiModelProperty(value = "更新日期")
  76 + private java.util.Date updateTime;
  77 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/waveConfig/mapper/WaveConfigDetailMapper.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.waveConfig.mapper;
  2 +
  3 +import java.util.List;
  4 +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfigDetail;
  5 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  6 +import org.apache.ibatis.annotations.Param;
  7 +
  8 +/**
  9 + * @Description: 波次配置详情
  10 + * @Author: jeecg-boot
  11 + * @Date: 2023-12-07
  12 + * @Version: V1.0
  13 + */
  14 +public interface WaveConfigDetailMapper extends BaseMapper<WaveConfigDetail> {
  15 +
  16 + public boolean deleteByMainId(@Param("mainId") String mainId);
  17 +
  18 + public List<WaveConfigDetail> selectByMainId(@Param("mainId") String mainId);
  19 +
  20 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/waveConfig/mapper/WaveConfigMapper.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.waveConfig.mapper;
  2 +
  3 +import java.util.List;
  4 +
  5 +import org.apache.ibatis.annotations.Param;
  6 +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfig;
  7 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  8 +
  9 +/**
  10 + * @Description: 波次配置
  11 + * @Author: jeecg-boot
  12 + * @Date: 2023-12-07
  13 + * @Version: V1.0
  14 + */
  15 +public interface WaveConfigMapper extends BaseMapper<WaveConfig> {
  16 +
  17 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/waveConfig/mapper/xml/WaveConfigMapper.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.waveConfig.mapper.WaveConfigMapper">
  4 +
  5 +</mapper>
0 6 \ No newline at end of file
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/waveConfig/service/IWaveConfigDetailService.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.waveConfig.service;
  2 +
  3 +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfigDetail;
  4 +import com.baomidou.mybatisplus.extension.service.IService;
  5 +import java.util.List;
  6 +
  7 +/**
  8 + * @Description: 波次配置详情
  9 + * @Author: jeecg-boot
  10 + * @Date: 2023-12-07
  11 + * @Version: V1.0
  12 + */
  13 +public interface IWaveConfigDetailService extends IService<WaveConfigDetail> {
  14 +
  15 + public List<WaveConfigDetail> selectByMainId(String mainId);
  16 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/waveConfig/service/IWaveConfigService.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.waveConfig.service;
  2 +
  3 +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfigDetail;
  4 +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfig;
  5 +import com.baomidou.mybatisplus.extension.service.IService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import java.io.Serializable;
  8 +import java.util.Collection;
  9 +import java.util.List;
  10 +
  11 +/**
  12 + * @Description: 波次配置
  13 + * @Author: jeecg-boot
  14 + * @Date: 2023-12-07
  15 + * @Version: V1.0
  16 + */
  17 +public interface IWaveConfigService extends IService<WaveConfig> {
  18 +
  19 + /**
  20 + * 删除一对多
  21 + */
  22 + public void delMain(String id);
  23 +
  24 + /**
  25 + * 批量删除一对多
  26 + */
  27 + public void delBatchMain(Collection<? extends Serializable> idList);
  28 +
  29 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/waveConfig/service/impl/WaveConfigDetailServiceImpl.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.waveConfig.service.impl;
  2 +
  3 +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfigDetail;
  4 +import org.jeecg.modules.wms.config.waveConfig.mapper.WaveConfigDetailMapper;
  5 +import org.jeecg.modules.wms.config.waveConfig.service.IWaveConfigDetailService;
  6 +import org.springframework.stereotype.Service;
  7 +import java.util.List;
  8 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +
  11 +/**
  12 + * @Description: 波次配置详情
  13 + * @Author: jeecg-boot
  14 + * @Date: 2023-12-07
  15 + * @Version: V1.0
  16 + */
  17 +@Service
  18 +public class WaveConfigDetailServiceImpl extends ServiceImpl<WaveConfigDetailMapper, WaveConfigDetail> implements IWaveConfigDetailService {
  19 +
  20 + @Autowired
  21 + private WaveConfigDetailMapper waveConfigDetailMapper;
  22 +
  23 + @Override
  24 + public List<WaveConfigDetail> selectByMainId(String mainId) {
  25 + return waveConfigDetailMapper.selectByMainId(mainId);
  26 + }
  27 +}
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/waveConfig/service/impl/WaveConfigServiceImpl.java 0 → 100644
  1 +package org.jeecg.modules.wms.config.waveConfig.service.impl;
  2 +
  3 +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfig;
  4 +import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfigDetail;
  5 +import org.jeecg.modules.wms.config.waveConfig.mapper.WaveConfigDetailMapper;
  6 +import org.jeecg.modules.wms.config.waveConfig.mapper.WaveConfigMapper;
  7 +import org.jeecg.modules.wms.config.waveConfig.service.IWaveConfigService;
  8 +import org.springframework.stereotype.Service;
  9 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  10 +import org.springframework.beans.factory.annotation.Autowired;
  11 +import org.springframework.transaction.annotation.Transactional;
  12 +import java.io.Serializable;
  13 +import java.util.List;
  14 +import java.util.Collection;
  15 +
  16 +/**
  17 + * @Description: 波次配置
  18 + * @Author: jeecg-boot
  19 + * @Date: 2023-12-07
  20 + * @Version: V1.0
  21 + */
  22 +@Service
  23 +public class WaveConfigServiceImpl extends ServiceImpl<WaveConfigMapper, WaveConfig> implements IWaveConfigService {
  24 +
  25 + @Autowired
  26 + private WaveConfigMapper waveConfigMapper;
  27 +
  28 + @Autowired
  29 + private WaveConfigDetailMapper waveConfigDetailMapper;
  30 +
  31 + @Override
  32 + @Transactional
  33 + public void delMain(String id) {
  34 + waveConfigDetailMapper.deleteByMainId(id);
  35 + waveConfigMapper.deleteById(id);
  36 + }
  37 +
  38 + @Override
  39 + @Transactional
  40 + public void delBatchMain(Collection<? extends Serializable> idList) {
  41 + for (Serializable id : idList) {
  42 + waveConfigDetailMapper.deleteByMainId(id.toString());
  43 + waveConfigMapper.deleteById(id);
  44 + }
  45 + }
  46 +
  47 +}
... ...