Commit fc1ae27774a1040c9b3af175c08d6c0899d17e14
Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4 into develop
Showing
63 changed files
with
619 additions
and
686 deletions
ant-design-vue-jeecg/.gitignore
ant-design-vue-jeecg/node/node.exe
0 → 100644
No preview for this file type
ant-design-vue-jeecg/node/npm
0 → 100644
1 | +#!/usr/bin/env bash | |
2 | +(set -o igncr) 2>/dev/null && set -o igncr; # cygwin encoding fix | |
3 | + | |
4 | +basedir=`dirname "$0"` | |
5 | + | |
6 | +case `uname` in | |
7 | + *CYGWIN*) basedir=`cygpath -w "$basedir"`;; | |
8 | +esac | |
9 | + | |
10 | +NODE_EXE="$basedir/node.exe" | |
11 | +if ! [ -x "$NODE_EXE" ]; then | |
12 | + NODE_EXE="$basedir/node" | |
13 | +fi | |
14 | +if ! [ -x "$NODE_EXE" ]; then | |
15 | + NODE_EXE=node | |
16 | +fi | |
17 | + | |
18 | +# this path is passed to node.exe, so it needs to match whatever | |
19 | +# kind of paths Node.js thinks it's using, typically win32 paths. | |
20 | +CLI_BASEDIR="$("$NODE_EXE" -p 'require("path").dirname(process.execPath)')" | |
21 | +NPM_CLI_JS="$CLI_BASEDIR/node_modules/npm/bin/npm-cli.js" | |
22 | + | |
23 | +NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` | |
24 | +if [ $? -ne 0 ]; then | |
25 | + # if this didn't work, then everything else below will fail | |
26 | + echo "Could not determine Node.js install directory" >&2 | |
27 | + exit 1 | |
28 | +fi | |
29 | +NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" | |
30 | + | |
31 | +# a path that will fail -f test on any posix bash | |
32 | +NPM_WSL_PATH="/.." | |
33 | + | |
34 | +# WSL can run Windows binaries, so we have to give it the win32 path | |
35 | +# however, WSL bash tests against posix paths, so we need to construct that | |
36 | +# to know if npm is installed globally. | |
37 | +if [ `uname` = 'Linux' ] && type wslpath &>/dev/null ; then | |
38 | + NPM_WSL_PATH=`wslpath "$NPM_PREFIX_NPM_CLI_JS"` | |
39 | +fi | |
40 | +if [ -f "$NPM_PREFIX_NPM_CLI_JS" ] || [ -f "$NPM_WSL_PATH" ]; then | |
41 | + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" | |
42 | +fi | |
43 | + | |
44 | +"$NODE_EXE" "$NPM_CLI_JS" "$@" | |
... | ... |
ant-design-vue-jeecg/node/npm.cmd
0 → 100644
1 | +:: Created by npm, please don't edit manually. | |
2 | +@ECHO OFF | |
3 | + | |
4 | +SETLOCAL | |
5 | + | |
6 | +SET "NODE_EXE=%~dp0\node.exe" | |
7 | +IF NOT EXIST "%NODE_EXE%" ( | |
8 | + SET "NODE_EXE=node" | |
9 | +) | |
10 | + | |
11 | +SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" | |
12 | +FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( | |
13 | + SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" | |
14 | +) | |
15 | +IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( | |
16 | + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" | |
17 | +) | |
18 | + | |
19 | +"%NODE_EXE%" "%NPM_CLI_JS%" %* | |
... | ... |
ant-design-vue-jeecg/src/assets/css/huahengUI.css
ant-design-vue-jeecg/src/assets/icon/整盘禁用.png renamed to ant-design-vue-jeecg/src/assets/icon/ContainerDisabled.png
5.89 KB
ant-design-vue-jeecg/src/assets/icon/整盘空闲.png renamed to ant-design-vue-jeecg/src/assets/icon/grid_all.png
3.87 KB
ant-design-vue-jeecg/src/assets/icon/整盘锁定.png renamed to ant-design-vue-jeecg/src/assets/icon/grid_all_lock.png
4.77 KB
ant-design-vue-jeecg/src/assets/icon/空柜锁定.png renamed to ant-design-vue-jeecg/src/assets/icon/grid_emp_lock.png
4.45 KB
ant-design-vue-jeecg/src/assets/icon/空柜禁用.png renamed to ant-design-vue-jeecg/src/assets/icon/grid_emp_waing.png
5.38 KB
ant-design-vue-jeecg/src/assets/icon/空盘空闲.png renamed to ant-design-vue-jeecg/src/assets/icon/grid_empty.png
3.37 KB
ant-design-vue-jeecg/src/assets/icon/空盘锁定.png renamed to ant-design-vue-jeecg/src/assets/icon/grid_empty_lock.png
3.98 KB
ant-design-vue-jeecg/src/assets/icon/空盘禁用.png renamed to ant-design-vue-jeecg/src/assets/icon/grid_empty_waring.png
5.05 KB
ant-design-vue-jeecg/src/assets/icon/半盘空闲.png renamed to ant-design-vue-jeecg/src/assets/icon/grid_half.png
3.68 KB
ant-design-vue-jeecg/src/assets/icon/半盘锁定.png renamed to ant-design-vue-jeecg/src/assets/icon/grid_half_lock.png
4.86 KB
ant-design-vue-jeecg/src/assets/icon/半盘禁用.png renamed to ant-design-vue-jeecg/src/assets/icon/grid_half_waring.png
6.04 KB
ant-design-vue-jeecg/src/assets/icon/空柜空闲.png renamed to ant-design-vue-jeecg/src/assets/icon/grid_rest.png
3.62 KB
ant-design-vue-jeecg/src/assets/icon/空.png renamed to ant-design-vue-jeecg/src/assets/icon/rel_empty.png
1.45 KB
ant-design-vue-jeecg/src/components/jeecgbiz/JSelectMultiCycleCount.vue
... | ... | @@ -32,7 +32,7 @@ export default { |
32 | 32 | url: {list: '/inventory/inventoryHeader/freeList'}, |
33 | 33 | columns: [ |
34 | 34 | {title: 'ID', align: 'center', width: '20%',widthRight: '70%', dataIndex: 'id'}, |
35 | - {title: '容器号', align: 'center', width: '25%', dataIndex: 'containerCode'}, | |
35 | + {title: '容器编码', align: 'center', width: '25%', dataIndex: 'containerCode'}, | |
36 | 36 | {title: '容器状态', align: 'center', width: '20%', dataIndex: 'containerStatus'}, |
37 | 37 | {title: '库位号', align: 'center', width: '20%', dataIndex: 'locationCode'}, |
38 | 38 | {title: '总数量', align: 'center', width: '20%', dataIndex: 'totalQty'}, |
... | ... | @@ -51,7 +51,7 @@ export default { |
51 | 51 | queryConfigDefault: [ |
52 | 52 | // { |
53 | 53 | // key: 'containerCode', |
54 | - // label: '容器号', | |
54 | + // label: '容器编码', | |
55 | 55 | // // 如果包含 dictCode,那么就会显示成下拉框 |
56 | 56 | // dictCode: 'sex', |
57 | 57 | // }, |
... | ... |
ant-design-vue-jeecg/src/views/system/config/AddressList.vue
... | ... | @@ -5,18 +5,28 @@ |
5 | 5 | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
6 | 6 | <a-row :gutter="24"> |
7 | 7 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
8 | + <a-form-item label="任务名称"> | |
9 | + <j-input placeholder="请输入任务名称" v-model="queryParam.remark"></j-input> | |
10 | + </a-form-item> | |
11 | + </a-col> | |
12 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
8 | 13 | <a-form-item label="编码"> |
9 | - <a-input placeholder="请输入编码" v-model="queryParam.code"></a-input> | |
14 | + <j-input placeholder="请输入编码" v-model="queryParam.param"></j-input> | |
15 | + </a-form-item> | |
16 | + </a-col> | |
17 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
18 | + <a-form-item label="库区"> | |
19 | + <a-select show-search placeholder="请选择库区" option-filter-prop="children" v-model="queryParam.zoneCode" > | |
20 | + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code"> | |
21 | + {{ item.name }} | |
22 | + </a-select-option> | |
23 | + </a-select> | |
10 | 24 | </a-form-item> |
11 | 25 | </a-col> |
12 | 26 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
13 | 27 | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
14 | 28 | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
15 | 29 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
16 | - <a @click="handleToggleSearch" style="margin-left: 8px"> | |
17 | - {{ toggleSearchStatus ? '收起' : '展开' }} | |
18 | - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |
19 | - </a> | |
20 | 30 | </span> |
21 | 31 | </a-col> |
22 | 32 | </a-row> |
... | ... | @@ -28,16 +38,13 @@ |
28 | 38 | <div class="table-operator"> |
29 | 39 | <a-button @click="handleAdd" v-has="'address:add'" type="primary" icon="plus">新增</a-button> |
30 | 40 | <a-button v-has="'address:export'" type="primary" icon="download" @click="handleExportXls('接口地址')">导出</a-button> |
31 | - <a-upload v-has="'address:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" | |
32 | - @change="handleImportExcel"> | |
41 | + <a-upload v-has="'address:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | |
33 | 42 | <a-button type="primary" icon="import">导入</a-button> |
34 | 43 | </a-upload> |
35 | 44 | <a-dropdown v-if="selectedRowKeys.length > 0"> |
36 | 45 | <a-menu slot="overlay" v-has="'address:deleteBatch'"> |
37 | 46 | <a-menu-item key="1" @click="batchDel"> |
38 | - <a-icon type="delete"/> | |
39 | - 删除 | |
40 | - </a-menu-item> | |
47 | + <a-icon type="delete"/> 删除 </a-menu-item> | |
41 | 48 | </a-menu> |
42 | 49 | <a-button style="margin-left: 8px"> 批量操作 |
43 | 50 | <a-icon type="down"/> |
... | ... | @@ -47,12 +54,6 @@ |
47 | 54 | |
48 | 55 | <!-- table区域-begin --> |
49 | 56 | <div> |
50 | - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |
51 | - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a | |
52 | - style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项 | |
53 | - <a style="margin-left: 24px" @click="onClearSelected">清空</a> | |
54 | - </div> | |
55 | - | |
56 | 57 | <a-table |
57 | 58 | ref="table" |
58 | 59 | size="middle" |
... | ... | @@ -63,30 +64,14 @@ |
63 | 64 | :dataSource="dataSource" |
64 | 65 | :pagination="ipagination" |
65 | 66 | :loading="loading" |
66 | - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |
67 | 67 | class="j-table-force-nowrap" |
68 | 68 | @change="handleTableChange"> |
69 | 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="" | |
76 | - style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
77 | - </template> | |
78 | - <template slot="fileSlot" slot-scope="text"> | |
79 | - <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
80 | - <a-button | |
81 | - v-else | |
82 | - :ghost="true" | |
83 | - type="primary" | |
84 | - icon="download" | |
85 | - size="small" | |
86 | - @click="downloadFile(text)"> | |
87 | - 下载 | |
88 | - </a-button> | |
89 | - </template> | |
70 | + <span slot="zoneCode" slot-scope="zoneCode"> | |
71 | + <a-tag :key="zoneCode" color="blue"> | |
72 | + {{ solutionZoneCode(zoneCode) }} | |
73 | + </a-tag> | |
74 | + </span> | |
90 | 75 | |
91 | 76 | <span slot="action" slot-scope="text, record"> |
92 | 77 | <a v-has="'address:edit'" @click="handleEdit(record)">编辑</a> |
... | ... | @@ -115,11 +100,11 @@ |
115 | 100 | </template> |
116 | 101 | |
117 | 102 | <script> |
118 | - | |
119 | 103 | import '@/assets/less/TableExpand.less' |
120 | -import {mixinDevice} from '@/utils/mixin' | |
121 | -import {JeecgListMixin} from '@/mixins/JeecgListMixin' | |
104 | +import { mixinDevice } from '@/utils/mixin' | |
105 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
122 | 106 | import AddressModal from './modules/AddressModal' |
107 | +import { getZoneList } from '@/api/api' | |
123 | 108 | |
124 | 109 | export default { |
125 | 110 | name: 'AddressList', |
... | ... | @@ -130,6 +115,7 @@ export default { |
130 | 115 | data() { |
131 | 116 | return { |
132 | 117 | description: '接口地址管理页面', |
118 | + zoneList: [], | |
133 | 119 | // 表头 |
134 | 120 | columns: [ |
135 | 121 | { |
... | ... | @@ -137,93 +123,109 @@ export default { |
137 | 123 | dataIndex: '', |
138 | 124 | key: 'rowIndex', |
139 | 125 | width: 60, |
140 | - align: "center", | |
141 | - customRender: function (t, r, index) { | |
142 | - return parseInt(index) + 1; | |
126 | + align: 'center', | |
127 | + customRender: function(t, r, index) { | |
128 | + return parseInt(index) + 1 | |
143 | 129 | } |
144 | 130 | }, |
145 | 131 | { |
132 | + title: '接口名称', | |
133 | + align: 'center', | |
134 | + dataIndex: 'remark' | |
135 | + }, | |
136 | + { | |
146 | 137 | title: '编码', |
147 | - align: "center", | |
138 | + align: 'center', | |
148 | 139 | dataIndex: 'param' |
149 | 140 | }, |
141 | + | |
150 | 142 | { |
151 | 143 | title: '库区', |
152 | - align: "center", | |
153 | - dataIndex: 'zoneCode' | |
144 | + align: 'center', | |
145 | + dataIndex: 'zoneCode', | |
146 | + key: 'zoneCode', | |
147 | + scopedSlots: { customRender: 'zoneCode' } | |
154 | 148 | }, |
155 | 149 | { |
156 | 150 | title: '接口地址', |
157 | - align: "center", | |
151 | + align: 'center', | |
158 | 152 | dataIndex: 'url' |
159 | 153 | }, |
160 | 154 | { |
161 | - title: '备注', | |
162 | - align: "center", | |
163 | - dataIndex: 'remark' | |
164 | - }, | |
165 | - { | |
166 | 155 | title: '创建人', |
167 | - align: "center", | |
156 | + align: 'center', | |
168 | 157 | dataIndex: 'createBy' |
169 | 158 | }, |
170 | 159 | { |
171 | 160 | title: '创建日期', |
172 | - align: "center", | |
161 | + align: 'center', | |
173 | 162 | dataIndex: 'createTime' |
174 | 163 | }, |
175 | 164 | { |
176 | 165 | title: '更新人', |
177 | - align: "center", | |
166 | + align: 'center', | |
178 | 167 | dataIndex: 'updateBy' |
179 | 168 | }, |
180 | 169 | { |
181 | 170 | title: '更新日期', |
182 | - align: "center", | |
171 | + align: 'center', | |
183 | 172 | dataIndex: 'updateTime' |
184 | 173 | }, |
185 | 174 | { |
186 | 175 | title: '操作', |
187 | 176 | dataIndex: 'action', |
188 | - align: "center", | |
189 | - fixed: "right", | |
177 | + align: 'center', | |
178 | + fixed: 'right', | |
190 | 179 | width: 147, |
191 | - scopedSlots: {customRender: 'action'} | |
180 | + scopedSlots: { customRender: 'action' } | |
192 | 181 | } |
193 | 182 | ], |
194 | 183 | url: { |
195 | - list: "/config/address/list", | |
196 | - delete: "/config/address/delete", | |
197 | - deleteBatch: "/config/address/deleteBatch", | |
198 | - exportXlsUrl: "/config/address/exportXls", | |
199 | - importExcelUrl: "config/address/importExcel", | |
200 | - | |
184 | + list: '/config/address/list', | |
185 | + delete: '/config/address/delete', | |
186 | + deleteBatch: '/config/address/deleteBatch', | |
187 | + exportXlsUrl: '/config/address/exportXls', | |
188 | + importExcelUrl: 'config/address/importExcel' | |
201 | 189 | }, |
202 | 190 | dictOptions: {}, |
203 | - superFieldList: [], | |
191 | + superFieldList: [] | |
204 | 192 | } |
205 | 193 | }, |
206 | 194 | created() { |
207 | - this.getSuperFieldList(); | |
195 | + this.getSuperFieldList() | |
196 | + getZoneList().then(res => { | |
197 | + if (res.success) { | |
198 | + this.zoneList = res.result | |
199 | + } | |
200 | + }) | |
208 | 201 | }, |
209 | 202 | computed: { |
210 | - importExcelUrl: function () { | |
211 | - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |
212 | - }, | |
203 | + importExcelUrl: function() { | |
204 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` | |
205 | + } | |
213 | 206 | }, |
214 | 207 | methods: { |
215 | - initDictConfig() { | |
216 | - }, | |
208 | + initDictConfig() {}, | |
217 | 209 | getSuperFieldList() { |
218 | - let fieldList = []; | |
219 | - fieldList.push({type: 'string', value: 'code', text: '编码', dictCode: ''}) | |
220 | - fieldList.push({type: 'string', value: 'zoneCode', text: '库区', dictCode: ''}) | |
221 | - fieldList.push({type: 'string', value: 'url', text: '接口地址', dictCode: ''}) | |
222 | - fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) | |
223 | - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) | |
224 | - fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) | |
225 | - fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) | |
210 | + let fieldList = [] | |
211 | + fieldList.push({ type: 'string', value: 'code', text: '编码', dictCode: '' }) | |
212 | + fieldList.push({ type: 'string', value: 'zoneCode', text: '库区', dictCode: '' }) | |
213 | + fieldList.push({ type: 'string', value: 'url', text: '接口地址', dictCode: '' }) | |
214 | + fieldList.push({ type: 'string', value: 'createBy', text: '创建人', dictCode: '' }) | |
215 | + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) | |
216 | + fieldList.push({ type: 'string', value: 'updateBy', text: '更新人', dictCode: '' }) | |
217 | + fieldList.push({ type: 'datetime', value: 'updateTime', text: '更新日期' }) | |
226 | 218 | this.superFieldList = fieldList |
219 | + }, | |
220 | + solutionZoneCode(value) { | |
221 | + var actions = [] | |
222 | + Object.keys(this.zoneList).some(key => { | |
223 | + if (this.zoneList[key].code == '' + value) { | |
224 | + actions.push(this.zoneList[key].name) | |
225 | + return true | |
226 | + } | |
227 | + }) | |
228 | + return actions.join('') | |
227 | 229 | } |
228 | 230 | } |
229 | 231 | } |
... | ... |
ant-design-vue-jeecg/src/views/system/config/LocationList.vue
... | ... | @@ -35,10 +35,10 @@ |
35 | 35 | </a-col> |
36 | 36 | <template v-if="toggleSearchStatus"> |
37 | 37 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
38 | - <a-form-item label="库区编码"> | |
38 | + <a-form-item label="库区"> | |
39 | 39 | <a-select |
40 | 40 | show-search |
41 | - placeholder="请选择库区编码" | |
41 | + placeholder="请选择库区" | |
42 | 42 | option-filter-prop="children" |
43 | 43 | v-model="queryParam.zoneCode" |
44 | 44 | > |
... | ... |
ant-design-vue-jeecg/src/views/system/config/modules/AddressForm.vue
... | ... | @@ -4,13 +4,26 @@ |
4 | 4 | <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
5 | 5 | <a-row> |
6 | 6 | <a-col :span="24"> |
7 | + <a-form-model-item label="接口名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> | |
8 | + <a-input v-model="model.remark" placeholder="请输入接口名称"></a-input> | |
9 | + </a-form-model-item> | |
10 | + </a-col> | |
11 | + <a-col :span="24"> | |
7 | 12 | <a-form-model-item label="编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code"> |
8 | 13 | <a-input v-model="model.param" placeholder="请输入编码"></a-input> |
9 | 14 | </a-form-model-item> |
10 | 15 | </a-col> |
11 | 16 | <a-col :span="24"> |
12 | 17 | <a-form-model-item label="库区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zoneCode"> |
13 | - <a-input v-model="model.zoneCode" placeholder="请输入库区"></a-input> | |
18 | + <a-select | |
19 | + show-search | |
20 | + placeholder="请选择库区" | |
21 | + option-filter-prop="children" | |
22 | + v-model="model.zoneCode"> | |
23 | + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code"> | |
24 | + {{ item.name }} | |
25 | + </a-select-option> | |
26 | + </a-select> | |
14 | 27 | </a-form-model-item> |
15 | 28 | </a-col> |
16 | 29 | <a-col :span="24"> |
... | ... | @@ -18,11 +31,6 @@ |
18 | 31 | <a-input v-model="model.url" placeholder="请输入接口地址"></a-input> |
19 | 32 | </a-form-model-item> |
20 | 33 | </a-col> |
21 | - <a-col :span="24"> | |
22 | - <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> | |
23 | - <a-input v-model="model.remark" placeholder="请输入备注"></a-input> | |
24 | - </a-form-model-item> | |
25 | - </a-col> | |
26 | 34 | </a-row> |
27 | 35 | </a-form-model> |
28 | 36 | </j-form-container> |
... | ... | @@ -33,6 +41,7 @@ |
33 | 41 | |
34 | 42 | import {httpAction, getAction} from '@/api/manage' |
35 | 43 | import {validateDuplicateValue} from '@/utils/util' |
44 | +import {getZoneList} from '@/api/api' | |
36 | 45 | |
37 | 46 | export default { |
38 | 47 | name: 'AddressForm', |
... | ... | @@ -47,6 +56,7 @@ export default { |
47 | 56 | }, |
48 | 57 | data() { |
49 | 58 | return { |
59 | + zoneList: [], | |
50 | 60 | model: {}, |
51 | 61 | labelCol: { |
52 | 62 | xs: {span: 24}, |
... | ... | @@ -73,6 +83,7 @@ export default { |
73 | 83 | created() { |
74 | 84 | //备份model原始值 |
75 | 85 | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
86 | + this.loadFrom(); | |
76 | 87 | }, |
77 | 88 | methods: { |
78 | 89 | add() { |
... | ... | @@ -82,6 +93,13 @@ export default { |
82 | 93 | this.model = Object.assign({}, record); |
83 | 94 | this.visible = true; |
84 | 95 | }, |
96 | + loadFrom() { | |
97 | + getZoneList().then((res) => { | |
98 | + if (res.success) { | |
99 | + this.zoneList = res.result | |
100 | + } | |
101 | + }); | |
102 | + }, | |
85 | 103 | submitForm() { |
86 | 104 | const that = this; |
87 | 105 | // 触发表单验证 |
... | ... |
ant-design-vue-jeecg/src/views/system/config/modules/LocationForm.vue
... | ... | @@ -14,7 +14,6 @@ |
14 | 14 | show-search |
15 | 15 | placeholder="请选择库区" |
16 | 16 | option-filter-prop="children" |
17 | - | |
18 | 17 | v-model="model.zoneCode"> |
19 | 18 | <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">{{ |
20 | 19 | item.name |
... | ... | @@ -29,7 +28,7 @@ |
29 | 28 | show-search |
30 | 29 | placeholder="请选择库位类型" |
31 | 30 | option-filter-prop="children" |
32 | - | |
31 | + | |
33 | 32 | v-model="model.locationTypeCode"> |
34 | 33 | <a-select-option v-for="item in locationTypeList" :key="item.name" :value="item.code">{{ |
35 | 34 | item.name |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue
... | ... | @@ -18,8 +18,8 @@ |
18 | 18 | </a-form-item> |
19 | 19 | </a-col> |
20 | 20 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
21 | - <a-form-item label="容器号"> | |
22 | - <a-input placeholder="请输入容器号" v-model="queryParam.containerCode"></a-input> | |
21 | + <a-form-item label="容器编码"> | |
22 | + <a-input placeholder="请输入容器编码" v-model="queryParam.containerCode"></a-input> | |
23 | 23 | </a-form-item> |
24 | 24 | </a-col> |
25 | 25 | <template v-if="toggleSearchStatus"> |
... | ... | @@ -182,7 +182,7 @@ export default { |
182 | 182 | scopedSlots: {customRender: 'zoneCode'} |
183 | 183 | }, |
184 | 184 | { |
185 | - title: '容器号', | |
185 | + title: '容器编码', | |
186 | 186 | align: "center", |
187 | 187 | dataIndex: 'containerCode' |
188 | 188 | }, |
... | ... | @@ -337,7 +337,7 @@ export default { |
337 | 337 | let fieldList = []; |
338 | 338 | fieldList.push({type: 'string', value: 'companyCode', text: '货主', dictCode: ''}) |
339 | 339 | fieldList.push({type: 'string', value: 'zoneCode', text: '库区', dictCode: ''}) |
340 | - fieldList.push({type: 'string', value: 'containerCode', text: '容器号', dictCode: ''}) | |
340 | + fieldList.push({type: 'string', value: 'containerCode', text: '容器编码', dictCode: ''}) | |
341 | 341 | fieldList.push({type: 'string', value: 'containerStatus', text: '容器状态', dictCode: 'container_status'}) |
342 | 342 | fieldList.push({type: 'string', value: 'locationCode', text: '库位号', dictCode: ''}) |
343 | 343 | fieldList.push({type: 'BigDecimal', value: 'totalQty', text: '总数量', dictCode: ''}) |
... | ... |
ant-design-vue-jeecg/src/views/system/inventory/modules/InventoryHeaderModal.vue
... | ... | @@ -22,8 +22,8 @@ |
22 | 22 | </a-form-model-item> |
23 | 23 | </a-col> |
24 | 24 | <a-col :span="24"> |
25 | - <a-form-model-item label="容器号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
26 | - <a-input v-model="model.containerCode" placeholder="请输入容器号"></a-input> | |
25 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
26 | + <a-input v-model="model.containerCode" placeholder="请输入容器编码"></a-input> | |
27 | 27 | </a-form-model-item> |
28 | 28 | </a-col> |
29 | 29 | <a-col :span="24"> |
... | ... |
ant-design-vue-jeecg/src/views/system/monitor/ApiLogList.vue
... | ... | @@ -6,52 +6,52 @@ |
6 | 6 | <a-row :gutter="24"> |
7 | 7 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
8 | 8 | <a-form-item label="接口名称"> |
9 | - <a-input placeholder="请输入接口名称" v-model="queryParam.apiName"></a-input> | |
9 | + <j-input placeholder="请输入接口名称" v-model="queryParam.apiName"></j-input> | |
10 | 10 | </a-form-item> |
11 | 11 | </a-col> |
12 | 12 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
13 | - <a-form-item label="请求类型"> | |
14 | - <a-input placeholder="请输入请求类型" v-model="queryParam.apiMethod"></a-input> | |
13 | + <a-form-item label="请求方名称"> | |
14 | + <j-input placeholder="请输入请求方名称" v-model="queryParam.requestFrom"></j-input> | |
15 | 15 | </a-form-item> |
16 | 16 | </a-col> |
17 | 17 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
18 | - <a-form-item label="请求方地址"> | |
19 | - <a-input placeholder="请输入请求方地址" v-model="queryParam.ip"></a-input> | |
18 | + <a-form-item label="响应方名称"> | |
19 | + <j-input placeholder="请输入响应方名称" v-model="queryParam.responseBy"></j-input> | |
20 | 20 | </a-form-item> |
21 | 21 | </a-col> |
22 | 22 | <template v-if="toggleSearchStatus"> |
23 | 23 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
24 | - <a-form-item label="请求方名称"> | |
25 | - <a-input placeholder="请输入请求方名称" v-model="queryParam.responseFrom"></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.responseBy"></a-input> | |
31 | - </a-form-item> | |
32 | - </a-col> | |
33 | - <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
34 | 24 | <a-form-item label="请求地址"> |
35 | - <a-input placeholder="请输入请求地址" v-model="queryParam.url"></a-input> | |
25 | + <j-input placeholder="请输入请求地址" v-model="queryParam.url"></j-input> | |
36 | 26 | </a-form-item> |
37 | 27 | </a-col> |
38 | 28 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
39 | - <a-form-item label="响应耗时(毫秒)"> | |
40 | - <a-input placeholder="请输入响应耗时(毫秒)" v-model="queryParam.duration"></a-input> | |
29 | + <a-form-item label="业务响应码"> | |
30 | + <j-input placeholder="请输入业务响应码" v-model="queryParam.retCode"></j-input> | |
41 | 31 | </a-form-item> |
42 | 32 | </a-col> |
43 | 33 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
44 | - <a-form-item label="业务响应码"> | |
45 | - <a-input placeholder="请输入业务响应码" v-model="queryParam.retCode"></a-input> | |
34 | + <a-form-item label="请求内容"> | |
35 | + <j-input placeholder="请输入请求内容" v-model="queryParam.requestBody"></j-input> | |
46 | 36 | </a-form-item> |
47 | 37 | </a-col> |
48 | 38 | <a-col :xl="12" :lg="14" :md="16" :sm="24"> |
49 | - <a-form-item label="创建日期"> | |
50 | - <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" | |
51 | - class="query-group-cust" v-model="queryParam.createTime_begin"></j-date> | |
39 | + <a-form-item label="请求时间"> | |
40 | + <j-date | |
41 | + :show-time="true" | |
42 | + date-format="YYYY-MM-DD HH:mm:ss" | |
43 | + placeholder="请选择开始时间" | |
44 | + class="query-group-cust" | |
45 | + v-model="queryParam.requestTime_begin" | |
46 | + ></j-date> | |
52 | 47 | <span class="query-group-split-cust"></span> |
53 | - <j-date :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" | |
54 | - class="query-group-cust" v-model="queryParam.createTime_end"></j-date> | |
48 | + <j-date | |
49 | + :show-time="true" | |
50 | + date-format="YYYY-MM-DD HH:mm:ss" | |
51 | + placeholder="请选择结束时间" | |
52 | + class="query-group-cust" | |
53 | + v-model="queryParam.requestTime_end" | |
54 | + ></j-date> | |
55 | 55 | </a-form-item> |
56 | 56 | </a-col> |
57 | 57 | </template> |
... | ... | @@ -61,7 +61,7 @@ |
61 | 61 | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
62 | 62 | <a @click="handleToggleSearch" style="margin-left: 8px"> |
63 | 63 | {{ toggleSearchStatus ? '收起' : '展开' }} |
64 | - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |
64 | + <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> | |
65 | 65 | </a> |
66 | 66 | </span> |
67 | 67 | </a-col> |
... | ... | @@ -73,21 +73,14 @@ |
73 | 73 | <!-- 操作按钮区域 --> |
74 | 74 | <div class="table-operator"> |
75 | 75 | <a-button v-has="'apiLog:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> |
76 | - <a-button v-has="'apiLog:export'" type="primary" icon="download" @click="handleExportXls('接口日志')">导出</a-button> | |
77 | -<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"--> | |
78 | -<!-- @change="handleImportExcel">--> | |
79 | -<!-- <a-button type="primary" icon="import">导入</a-button>--> | |
80 | -<!-- </a-upload>--> | |
76 | + <a-button v-has="'apiLog:export'" type="primary" icon="download" @click="handleExportXls('接口日志')"> | |
77 | + 导出 | |
78 | + </a-button> | |
81 | 79 | <a-dropdown v-if="selectedRowKeys.length > 0"> |
82 | 80 | <a-menu slot="overlay" v-has="'apiLog:deleteBatch'"> |
83 | - <a-menu-item key="1" @click="batchDel"> | |
84 | - <a-icon type="delete"/> | |
85 | - 删除 | |
86 | - </a-menu-item> | |
81 | + <a-menu-item key="1" @click="batchDel"> <a-icon type="delete" /> 删除 </a-menu-item> | |
87 | 82 | </a-menu> |
88 | - <a-button style="margin-left: 8px"> 批量操作 | |
89 | - <a-icon type="down"/> | |
90 | - </a-button> | |
83 | + <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /> </a-button> | |
91 | 84 | </a-dropdown> |
92 | 85 | </div> |
93 | 86 | |
... | ... | @@ -96,7 +89,7 @@ |
96 | 89 | <a-table |
97 | 90 | ref="table" |
98 | 91 | size="middle" |
99 | - :scroll="{x:true}" | |
92 | + :scroll="{ x: true }" | |
100 | 93 | bordered |
101 | 94 | rowKey="id" |
102 | 95 | :columns="columns" |
... | ... | @@ -104,33 +97,12 @@ |
104 | 97 | :pagination="ipagination" |
105 | 98 | :loading="loading" |
106 | 99 | class="j-table-force-nowrap" |
107 | - @change="handleTableChange"> | |
108 | - | |
109 | - <template slot="htmlSlot" slot-scope="text"> | |
110 | - <div v-html="text"></div> | |
111 | - </template> | |
112 | - <template slot="imgSlot" slot-scope="text"> | |
113 | - <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |
114 | - <img v-else :src="getImgView(text)" height="25px" alt="" | |
115 | - style="max-width:80px;font-size: 12px;font-style: italic;"/> | |
116 | - </template> | |
117 | - <template slot="fileSlot" slot-scope="text"> | |
118 | - <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |
119 | - <a-button | |
120 | - v-else | |
121 | - :ghost="true" | |
122 | - type="primary" | |
123 | - icon="download" | |
124 | - size="small" | |
125 | - @click="downloadFile(text)">下载 | |
126 | - </a-button> | |
127 | - </template> | |
128 | - | |
100 | + @change="handleTableChange" | |
101 | + > | |
129 | 102 | <span slot="action" slot-scope="text, record"> |
130 | 103 | <a v-has="'apiLog:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a> |
131 | 104 | <a @click="handleDetail(record)">详情</a> |
132 | 105 | </span> |
133 | - | |
134 | 106 | </a-table> |
135 | 107 | </div> |
136 | 108 | |
... | ... | @@ -139,12 +111,11 @@ |
139 | 111 | </template> |
140 | 112 | |
141 | 113 | <script> |
142 | - | |
143 | 114 | import '@/assets/less/TableExpand.less' |
144 | -import {mixinDevice} from '@/utils/mixin' | |
145 | -import {JeecgListMixin} from '@/mixins/JeecgListMixin' | |
115 | +import { mixinDevice } from '@/utils/mixin' | |
116 | +import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |
146 | 117 | import ApiLogModal from './modules/ApiLogModal' |
147 | -import JEllipsis from "@comp/jeecg/JEllipsis" | |
118 | +import JEllipsis from '@comp/jeecg/JEllipsis' | |
148 | 119 | |
149 | 120 | export default { |
150 | 121 | name: 'ApiLogList', |
... | ... | @@ -154,135 +125,139 @@ export default { |
154 | 125 | JEllipsis |
155 | 126 | }, |
156 | 127 | data() { |
157 | - let ellipsis1 = (v, l = 20) => (<j-ellipsis value={v} length={l}/>) | |
158 | - let ellipsis2 = (v, l = 120) => (<j-ellipsis value={v} length={l}/>) | |
128 | + let ellipsis = (v, l = 40) => <j-ellipsis value={v} length={l} /> | |
159 | 129 | return { |
160 | 130 | description: '接口日志管理页面', |
161 | 131 | // 表头 |
162 | 132 | columns: [ |
163 | 133 | { |
164 | 134 | title: '接口名称', |
165 | - align: "center", | |
135 | + align: 'center', | |
166 | 136 | dataIndex: 'apiName' |
167 | 137 | }, |
168 | 138 | { |
169 | 139 | title: '请求类型', |
170 | - align: "center", | |
140 | + align: 'center', | |
171 | 141 | dataIndex: 'apiMethod' |
172 | 142 | }, |
173 | 143 | { |
174 | - title: '请求内容', | |
175 | - align: "left", | |
176 | - dataIndex: 'requestBody', | |
177 | - customRender: (t) => ellipsis2(t) | |
144 | + title: '请求方名称', | |
145 | + align: 'center', | |
146 | + dataIndex: 'requestFrom' | |
178 | 147 | }, |
179 | 148 | { |
180 | - title: '响应内容', | |
181 | - align: "left", | |
182 | - dataIndex: 'responseBody', | |
183 | - customRender: (t) => ellipsis2(t) | |
149 | + title: '请求方IP', | |
150 | + align: 'center', | |
151 | + dataIndex: 'ip' | |
184 | 152 | }, |
185 | 153 | { |
186 | - title: '请求方名称', | |
187 | - align: "center", | |
188 | - dataIndex: 'requestFrom' | |
154 | + title: '请求地址', | |
155 | + align: 'center', | |
156 | + dataIndex: 'url' | |
189 | 157 | }, |
190 | 158 | { |
191 | - title: '响应方名称', | |
192 | - align: "center", | |
193 | - dataIndex: 'responseBy' | |
159 | + title: '请求头', | |
160 | + align: 'center', | |
161 | + dataIndex: 'requestHeader', | |
162 | + customRender: t => ellipsis(t) | |
194 | 163 | }, |
195 | 164 | { |
196 | - title: '请求方地址', | |
197 | - align: "center", | |
198 | - dataIndex: 'ip' | |
165 | + title: '请求内容', | |
166 | + align: 'center', | |
167 | + dataIndex: 'requestBody', | |
168 | + customRender: t => ellipsis(t) | |
199 | 169 | }, |
200 | 170 | { |
201 | - title: '请求地址', | |
202 | - align: "left", | |
203 | - dataIndex: 'url', | |
171 | + title: '响应方名称', | |
172 | + align: 'center', | |
173 | + dataIndex: 'responseBy' | |
174 | + }, | |
175 | + { | |
176 | + title: '响应内容', | |
177 | + align: 'center', | |
178 | + dataIndex: 'responseBody', | |
179 | + customRender: t => ellipsis(t) | |
204 | 180 | }, |
205 | 181 | { |
206 | 182 | title: '请求时间', |
207 | - align: "center", | |
183 | + align: 'center', | |
208 | 184 | dataIndex: 'requestTime' |
209 | 185 | }, |
210 | 186 | { |
211 | 187 | title: '响应时间', |
212 | - align: "center", | |
188 | + align: 'center', | |
213 | 189 | dataIndex: 'responseTime' |
214 | 190 | }, |
215 | 191 | { |
216 | 192 | title: '响应耗时(毫秒)', |
217 | - align: "center", | |
193 | + align: 'center', | |
218 | 194 | dataIndex: 'duration' |
219 | 195 | }, |
220 | 196 | { |
221 | - title: 'httpCode', | |
222 | - align: "center", | |
197 | + title: 'Http Code', | |
198 | + align: 'center', | |
223 | 199 | dataIndex: 'httpCode' |
224 | 200 | }, |
225 | 201 | { |
226 | 202 | title: '业务响应码', |
227 | - align: "center", | |
203 | + align: 'center', | |
228 | 204 | dataIndex: 'retCode' |
229 | 205 | }, |
230 | 206 | { |
231 | 207 | title: '异常堆栈信息', |
232 | - align: "center", | |
233 | - dataIndex: 'exception' | |
208 | + align: 'center', | |
209 | + dataIndex: 'exception', | |
210 | + customRender: t => ellipsis(t) | |
234 | 211 | }, |
235 | 212 | { |
236 | 213 | title: '操作', |
237 | 214 | dataIndex: 'action', |
238 | - align: "center", | |
239 | - fixed: "right", | |
215 | + align: 'center', | |
216 | + fixed: 'right', | |
240 | 217 | width: 80, |
241 | - scopedSlots: {customRender: 'action'} | |
218 | + scopedSlots: { customRender: 'action' } | |
242 | 219 | } |
243 | 220 | ], |
244 | 221 | url: { |
245 | - list: "/monitor/apiLog/list", | |
246 | - delete: "/monitor/apiLog/delete", | |
247 | - deleteBatch: "/monitor/apiLog/deleteBatch", | |
248 | - exportXlsUrl: "/monitor/apiLog/exportXls", | |
249 | - importExcelUrl: "monitor/apiLog/importExcel", | |
250 | - | |
222 | + list: '/monitor/apiLog/list', | |
223 | + delete: '/monitor/apiLog/delete', | |
224 | + deleteBatch: '/monitor/apiLog/deleteBatch', | |
225 | + exportXlsUrl: '/monitor/apiLog/exportXls', | |
226 | + importExcelUrl: 'monitor/apiLog/importExcel' | |
251 | 227 | }, |
252 | 228 | dictOptions: {}, |
253 | - superFieldList: [], | |
229 | + superFieldList: [] | |
254 | 230 | } |
255 | 231 | }, |
256 | 232 | created() { |
257 | - this.getSuperFieldList(); | |
233 | + this.getSuperFieldList() | |
258 | 234 | }, |
259 | 235 | computed: { |
260 | - importExcelUrl: function () { | |
261 | - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |
262 | - }, | |
236 | + importExcelUrl: function() { | |
237 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` | |
238 | + } | |
263 | 239 | }, |
264 | 240 | methods: { |
265 | - initDictConfig() { | |
266 | - }, | |
241 | + initDictConfig() {}, | |
267 | 242 | getSuperFieldList() { |
268 | - let fieldList = []; | |
269 | - fieldList.push({type: 'string', value: 'apiName', text: '接口名称', dictCode: ''}) | |
270 | - fieldList.push({type: 'string', value: 'apiMethod', text: '请求类型', dictCode: ''}) | |
271 | - fieldList.push({type: 'string', value: 'ip', text: '请求方地址', dictCode: ''}) | |
272 | - fieldList.push({type: 'string', value: 'requestFrom', text: '请求方名称', dictCode: ''}) | |
273 | - fieldList.push({type: 'string', value: 'responseBy', text: '响应方名称', dictCode: ''}) | |
274 | - fieldList.push({type: 'string', value: 'url', text: '请求地址', dictCode: ''}) | |
275 | - fieldList.push({type: 'datetime', value: 'requestTime', text: '请求时间'}) | |
276 | - fieldList.push({type: 'datetime', value: 'responseTime', text: '响应时间'}) | |
277 | - fieldList.push({type: 'Text', value: 'requestHeader', text: '请求头', dictCode: ''}) | |
278 | - fieldList.push({type: 'Text', value: 'requestBody', text: '请求内容', dictCode: ''}) | |
279 | - fieldList.push({type: 'Text', value: 'responseHeader', text: '响应头', dictCode: ''}) | |
280 | - fieldList.push({type: 'Text', value: 'responseBody', text: '响应内容', dictCode: ''}) | |
281 | - fieldList.push({type: 'string', value: 'duration', text: '响应耗时(毫秒)', dictCode: ''}) | |
282 | - fieldList.push({type: 'int', value: 'httpCode', text: 'httpCode', dictCode: ''}) | |
283 | - fieldList.push({type: 'int', value: 'retCode', text: '业务响应码', dictCode: ''}) | |
284 | - fieldList.push({type: 'Text', value: 'exception', text: '异常堆栈信息', dictCode: ''}) | |
285 | - fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) | |
243 | + let fieldList = [] | |
244 | + fieldList.push({ type: 'string', value: 'apiName', text: '接口名称', dictCode: '' }) | |
245 | + fieldList.push({ type: 'string', value: 'apiMethod', text: '请求类型', dictCode: '' }) | |
246 | + fieldList.push({ type: 'string', value: 'ip', text: '请求方IP', dictCode: '' }) | |
247 | + fieldList.push({ type: 'string', value: 'requestFrom', text: '请求方名称', dictCode: '' }) | |
248 | + fieldList.push({ type: 'string', value: 'responseBy', text: '响应方名称', dictCode: '' }) | |
249 | + fieldList.push({ type: 'string', value: 'url', text: '请求地址', dictCode: '' }) | |
250 | + fieldList.push({ type: 'datetime', value: 'requestTime', text: '请求时间' }) | |
251 | + fieldList.push({ type: 'datetime', value: 'responseTime', text: '响应时间' }) | |
252 | + fieldList.push({ type: 'Text', value: 'requestHeader', text: '请求头', dictCode: '' }) | |
253 | + fieldList.push({ type: 'Text', value: 'requestBody', text: '请求内容', dictCode: '' }) | |
254 | + fieldList.push({ type: 'Text', value: 'responseHeader', text: '响应头', dictCode: '' }) | |
255 | + fieldList.push({ type: 'Text', value: 'responseBody', text: '响应内容', dictCode: '' }) | |
256 | + fieldList.push({ type: 'string', value: 'duration', text: '响应耗时(毫秒)', dictCode: '' }) | |
257 | + fieldList.push({ type: 'int', value: 'httpCode', text: 'httpCode', dictCode: '' }) | |
258 | + fieldList.push({ type: 'int', value: 'retCode', text: '业务响应码', dictCode: '' }) | |
259 | + fieldList.push({ type: 'Text', value: 'exception', text: '异常堆栈信息', dictCode: '' }) | |
260 | + fieldList.push({ type: 'datetime', value: 'createTime', text: '创建日期' }) | |
286 | 261 | this.superFieldList = fieldList |
287 | 262 | } |
288 | 263 | } |
... | ... |
ant-design-vue-jeecg/src/views/system/monitor/OperationLog.vue
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | </a-col> |
12 | 12 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
13 | 13 | <a-form-item label="业务类型"> |
14 | - <j-dict-select-tag placeholder="请选择业务类型" v-model="queryParam.bizType" dictCode="operation_log_type"/> | |
14 | + <j-input placeholder="请选择业务类型" v-model="queryParam.bizType" /> | |
15 | 15 | </a-form-item> |
16 | 16 | </a-col> |
17 | 17 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
... | ... |
ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue
... | ... | @@ -18,8 +18,7 @@ |
18 | 18 | </a-select> |
19 | 19 | </li> |
20 | 20 | <li>第 |
21 | - <select id="editable-num" name="num" style="width: 70px"> | |
22 | - </select> | |
21 | + <select id="editable-num" name="num" style="width: 70px" /> | |
23 | 22 | </li> |
24 | 23 | <li> |
25 | 24 | <select id="editable-select" name="col" @click="show" style="width: 70px"> |
... | ... | @@ -39,43 +38,20 @@ |
39 | 38 | <form id="receiptHeader-form"> |
40 | 39 | <div class="select-list"> |
41 | 40 | <ul id="img_list" style=""> |
41 | + <li>空柜空闲:<img src="~@/assets/icon/grid_rest.png"></li> | |
42 | + <li>空盘空闲:<img src="~@/assets/icon/grid_empty.png"></li> | |
43 | + <li>半盘空闲:<img src="~@/assets/icon/grid_half.png"></li> | |
44 | + <li>整盘空闲:<img src="~@/assets/icon/grid_all.png"></li> | |
45 | + <li>空柜锁定:<img src="~@/assets/icon/grid_emp_lock.png"></li> | |
46 | + <li>空盘锁定:<img src="~@/assets/icon/grid_empty_lock.png"></li> | |
47 | + <li>半盘锁定:<img src="~@/assets/icon/grid_half_lock.png"></li> | |
48 | + <li>整盘锁定:<img src="~@/assets/icon/grid_all_lock.png"></li> | |
49 | + <li>空柜禁用:<img src="~@/assets/icon/grid_emp_waing.png"></li> | |
50 | + <li>空盘禁用:<img src="~@/assets/icon/grid_empty_waring.png"></li> | |
51 | + <li>半盘禁用:<img src="~@/assets/icon/grid_half_waring.png"></li> | |
52 | + <li>整盘禁用:<img src="~@/assets/icon/ContainerDisabled.png"></li> | |
42 | 53 | <li> |
43 | - 空柜空闲:<img src="~@/assets/icon/空柜空闲.png"> | |
44 | - </li> | |
45 | - <li> | |
46 | - 空盘空闲:<img src="~@/assets/icon/空盘空闲.png"> | |
47 | - </li> | |
48 | - <li> | |
49 | - 半盘空闲:<img src="~@/assets/icon/半盘空闲.png"> | |
50 | - </li> | |
51 | - <li> | |
52 | - 整盘空闲:<img src="~@/assets/icon/整盘空闲.png"> | |
53 | - </li> | |
54 | - <li> | |
55 | - 空柜锁定:<img src="~@/assets/icon/空柜锁定.png"> | |
56 | - </li> | |
57 | - <li> | |
58 | - 空盘锁定:<img src="~@/assets/icon/空盘锁定.png"> | |
59 | - </li> | |
60 | - <li> | |
61 | - 半盘锁定:<img src="~@/assets/icon/半盘锁定.png"> | |
62 | - </li> | |
63 | - <li> | |
64 | - 整盘锁定:<img src="~@/assets/icon/整盘锁定.png"> | |
65 | - </li> | |
66 | - <li> | |
67 | - 空柜禁用:<img src="~@/assets/icon/空柜禁用.png"> | |
68 | - </li> | |
69 | - <li> | |
70 | - 空盘禁用:<img src="~@/assets/icon/空盘禁用.png"> | |
71 | - </li> | |
72 | - <li> | |
73 | - 半盘禁用:<img src="~@/assets/icon/半盘禁用.png"> | |
74 | - </li> | |
75 | - <li> | |
76 | - 整盘禁用:<img src="~@/assets/icon/整盘禁用.png"> | |
77 | - </li> | |
78 | - <li><span style="font-size: 12px">库位统计情况:</span> | |
54 | + <span style="font-size: 12px">库位统计情况:</span> | |
79 | 55 | <input style="width: 400px; font-size: 12px" type="text" id="zone" disabled/> |
80 | 56 | </li> |
81 | 57 | </ul> |
... | ... | @@ -83,7 +59,7 @@ |
83 | 59 | <ul id="info_list"> |
84 | 60 | <li><span>库位:</span><input type="text" id="code" disabled/></li> |
85 | 61 | <li><span>容器编码:</span><input type="text" id="containerCode" disabled/></li> |
86 | - <li><span>物料信息:<select id="material" style="width: auto;"><option>无</option></select></span></li> | |
62 | + <li><span>物料信息:<select id="material" style="width: auto"><option>无</option></select></span></li> | |
87 | 63 | </ul> |
88 | 64 | </div> |
89 | 65 | </form> |
... | ... | @@ -128,19 +104,19 @@ var currentMaterialCode = 0; |
128 | 104 | |
129 | 105 | import huahengUI from '../../../assets/css/huahengUI.css' |
130 | 106 | import $ from '../../../assets/js/jquery-1.11.1.min' |
131 | -import grid_rest from '@/assets/icon/空柜空闲.png' | |
132 | -import grid_empty from '@/assets/icon/空盘空闲.png' | |
133 | -import grid_half from '@/assets/icon/半盘空闲.png' | |
134 | -import grid_all from '@/assets/icon/整盘空闲.png' | |
135 | -import grid_emp_waing from '@/assets/icon/空柜禁用.png' | |
136 | -import grid_empty_waring from '@/assets/icon/空盘禁用.png' | |
137 | -import grid_half_waring from '@/assets/icon/半盘禁用.png' | |
138 | -import grid_all_waring from '@/assets/icon/整盘禁用.png' | |
139 | -import grid_emp_lock from '@/assets/icon/空柜锁定.png' | |
140 | -import grid_empty_lock from '@/assets/icon/空盘锁定.png' | |
141 | -import grid_half_lock from '@/assets/icon/半盘锁定.png' | |
142 | -import grid_all_lock from '@/assets/icon/整盘锁定.png' | |
143 | -import rel_empty from '@/assets/icon/空.png' | |
107 | +import grid_rest from '@/assets/icon/grid_rest.png' | |
108 | +import grid_empty from '@/assets/icon/grid_empty.png' | |
109 | +import grid_half from '@/assets/icon/grid_half.png' | |
110 | +import grid_all from '@/assets/icon/grid_all.png' | |
111 | +import grid_emp_waing from '@/assets/icon/grid_emp_waing.png' | |
112 | +import grid_empty_waring from '@/assets/icon/grid_empty_waring.png' | |
113 | +import grid_half_waring from '@/assets/icon/grid_half_waring.png' | |
114 | +import grid_all_waring from '@/assets/icon/ContainerDisabled.png' | |
115 | +import grid_emp_lock from '@/assets/icon/grid_emp_lock.png' | |
116 | +import grid_empty_lock from '@/assets/icon/grid_empty_lock.png' | |
117 | +import grid_half_lock from '@/assets/icon/grid_half_lock.png' | |
118 | +import grid_all_lock from '@/assets/icon/grid_all_lock.png' | |
119 | +import rel_empty from '@/assets/icon/rel_empty.png' | |
144 | 120 | import Vue from 'vue' |
145 | 121 | import {ACCESS_TOKEN} from "@/store/mutation-types" |
146 | 122 | import {getZoneList} from '@/api/api' |
... | ... |
ant-design-vue-jeecg/src/views/system/monitor/modules/ApiLogForm.vue
... | ... | @@ -14,13 +14,23 @@ |
14 | 14 | </a-form-model-item> |
15 | 15 | </a-col> |
16 | 16 | <a-col :span="24"> |
17 | - <a-form-model-item label="请求方地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ip"> | |
18 | - <a-input v-model="model.ip" placeholder="请输入请求方地址"></a-input> | |
17 | + <a-form-model-item label="请求方名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="requestFrom"> | |
18 | + <a-input v-model="model.requestFrom" placeholder="请输入请求方名称"></a-input> | |
19 | 19 | </a-form-model-item> |
20 | 20 | </a-col> |
21 | 21 | <a-col :span="24"> |
22 | - <a-form-model-item label="请求方名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="responseFrom"> | |
23 | - <a-input v-model="model.responseFrom" placeholder="请输入请求方名称"></a-input> | |
22 | + <a-form-model-item label="请求方IP" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ip"> | |
23 | + <a-input v-model="model.ip" placeholder="请输入请求方IP"></a-input> | |
24 | + </a-form-model-item> | |
25 | + </a-col> | |
26 | + <a-col :span="24"> | |
27 | + <a-form-model-item label="请求地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url"> | |
28 | + <a-input v-model="model.url" placeholder="请输入请求地址"></a-input> | |
29 | + </a-form-model-item> | |
30 | + </a-col> | |
31 | + <a-col :span="24"> | |
32 | + <a-form-model-item label="请求内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="requestBody"> | |
33 | + <a-input v-model="model.requestBody" placeholder="请输入请求内容"></a-input> | |
24 | 34 | </a-form-model-item> |
25 | 35 | </a-col> |
26 | 36 | <a-col :span="24"> |
... | ... | @@ -29,8 +39,8 @@ |
29 | 39 | </a-form-model-item> |
30 | 40 | </a-col> |
31 | 41 | <a-col :span="24"> |
32 | - <a-form-model-item label="请求地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url"> | |
33 | - <a-input v-model="model.url" placeholder="请输入请求地址"></a-input> | |
42 | + <a-form-model-item label="响应内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="responseBody"> | |
43 | + <a-input v-model="model.responseBody" placeholder="请输入响应内容"></a-input> | |
34 | 44 | </a-form-model-item> |
35 | 45 | </a-col> |
36 | 46 | <a-col :span="24"> |
... | ... | @@ -46,16 +56,6 @@ |
46 | 56 | </a-form-model-item> |
47 | 57 | </a-col> |
48 | 58 | <a-col :span="24"> |
49 | - <a-form-model-item label="请求内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="requestBody"> | |
50 | - <a-input v-model="model.requestBody" placeholder="请输入请求内容"></a-input> | |
51 | - </a-form-model-item> | |
52 | - </a-col> | |
53 | - <a-col :span="24"> | |
54 | - <a-form-model-item label="响应内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="responseBody"> | |
55 | - <a-input v-model="model.responseBody" placeholder="请输入响应内容"></a-input> | |
56 | - </a-form-model-item> | |
57 | - </a-col> | |
58 | - <a-col :span="24"> | |
59 | 59 | <a-form-model-item label="响应耗时(毫秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="duration"> |
60 | 60 | <a-input v-model="model.duration" placeholder="请输入响应耗时(毫秒)"></a-input> |
61 | 61 | </a-form-model-item> |
... | ... |
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
... | ... | @@ -5,8 +5,8 @@ |
5 | 5 | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
6 | 6 | <a-row :gutter="24"> |
7 | 7 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
8 | - <a-form-item label="容器号"> | |
9 | - <a-input placeholder="请输入容器号" v-model="queryParam.containerCode"></a-input> | |
8 | + <a-form-item label="容器编码"> | |
9 | + <a-input placeholder="请输入容器编码" v-model="queryParam.containerCode"></a-input> | |
10 | 10 | </a-form-item> |
11 | 11 | </a-col> |
12 | 12 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
... | ... | @@ -166,7 +166,7 @@ export default { |
166 | 166 | dataIndex: 'id' |
167 | 167 | }, |
168 | 168 | { |
169 | - title: '容器号', | |
169 | + title: '容器编码', | |
170 | 170 | align: "center", |
171 | 171 | dataIndex: 'containerCode' |
172 | 172 | }, |
... | ... | @@ -334,7 +334,7 @@ export default { |
334 | 334 | }, |
335 | 335 | getSuperFieldList() { |
336 | 336 | let fieldList = []; |
337 | - fieldList.push({type: 'string', value: 'containerCode', text: '容器号', dictCode: ''}) | |
337 | + fieldList.push({type: 'string', value: 'containerCode', text: '容器编码', dictCode: ''}) | |
338 | 338 | fieldList.push({type: 'int', value: 'taskType', text: '任务类型', dictCode: 'receipt_task_type'}) |
339 | 339 | fieldList.push({type: 'int', value: 'status', text: '状态', dictCode: 'receipt_container_status'}) |
340 | 340 | fieldList.push({type: 'string', value: 'fromLocationCode', text: '起始库位', dictCode: ''}) |
... | ... |
ant-design-vue-jeecg/src/views/system/receipt/modules/ReceiptContainerHeaderModal.vue
... | ... | @@ -12,8 +12,8 @@ |
12 | 12 | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
13 | 13 | <a-row> |
14 | 14 | <a-col :span="24"> |
15 | - <a-form-model-item label="容器号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | - <a-input v-model="model.containerCode" placeholder="请输入容器号"></a-input> | |
15 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | + <a-input v-model="model.containerCode" placeholder="请输入容器编码"></a-input> | |
17 | 17 | </a-form-model-item> |
18 | 18 | </a-col> |
19 | 19 | <a-col :span="24"> |
... | ... |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
... | ... | @@ -5,8 +5,8 @@ |
5 | 5 | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
6 | 6 | <a-row :gutter="24"> |
7 | 7 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
8 | - <a-form-item label="容器号"> | |
9 | - <a-input placeholder="请输入容器号" v-model="queryParam.containerCode"></a-input> | |
8 | + <a-form-item label="容器编码"> | |
9 | + <a-input placeholder="请输入容器编码" v-model="queryParam.containerCode"></a-input> | |
10 | 10 | </a-form-item> |
11 | 11 | </a-col> |
12 | 12 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
... | ... | @@ -168,7 +168,7 @@ export default { |
168 | 168 | // 表头 |
169 | 169 | columns: [ |
170 | 170 | { |
171 | - title: '容器号', | |
171 | + title: '容器编码', | |
172 | 172 | align: "center", |
173 | 173 | dataIndex: 'containerCode' |
174 | 174 | }, |
... | ... | @@ -312,7 +312,7 @@ export default { |
312 | 312 | }, |
313 | 313 | getSuperFieldList() { |
314 | 314 | let fieldList = []; |
315 | - fieldList.push({type: 'string', value: 'containerCode', text: '容器号', dictCode: ''}) | |
315 | + fieldList.push({type: 'string', value: 'containerCode', text: '容器编码', dictCode: ''}) | |
316 | 316 | fieldList.push({type: 'int', value: 'taskType', text: '任务类型', dictCode: 'shipment_task_type'}) |
317 | 317 | fieldList.push({type: 'int', value: 'status', text: '状态', dictCode: 'shipment_container_status'}) |
318 | 318 | fieldList.push({type: 'string', value: 'fromLocationCode', text: '起始库位', dictCode: ''}) |
... | ... |
ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentContainerHeaderModal.vue
... | ... | @@ -12,8 +12,8 @@ |
12 | 12 | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
13 | 13 | <a-row> |
14 | 14 | <a-col :span="24"> |
15 | - <a-form-model-item label="容器号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | - <a-input v-model="model.containerCode" placeholder="请输入容器号"></a-input> | |
15 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | + <a-input v-model="model.containerCode" placeholder="请输入容器编码"></a-input> | |
17 | 17 | </a-form-model-item> |
18 | 18 | </a-col> |
19 | 19 | <a-col :span="24"> |
... | ... |
ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue
... | ... | @@ -10,8 +10,8 @@ |
10 | 10 | </a-form-item> |
11 | 11 | </a-col> |
12 | 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> | |
13 | + <a-form-item label="容器编码"> | |
14 | + <a-input placeholder="请输入容器编码" v-model="queryParam.containerCode"></a-input> | |
15 | 15 | </a-form-item> |
16 | 16 | </a-col> |
17 | 17 | <template v-if="toggleSearchStatus"> |
... | ... | @@ -211,7 +211,7 @@ export default { |
211 | 211 | customFilterDropdown: true, |
212 | 212 | }, |
213 | 213 | { |
214 | - title: '容器号', | |
214 | + title: '容器编码', | |
215 | 215 | align: "center", |
216 | 216 | dataIndex: 'containerCode' |
217 | 217 | }, |
... | ... | @@ -411,7 +411,7 @@ export default { |
411 | 411 | getSuperFieldList() { |
412 | 412 | let fieldList = []; |
413 | 413 | fieldList.push({type: 'int', value: 'taskType', text: '任务类型', dictCode: 'task_type'}) |
414 | - fieldList.push({type: 'string', value: 'containerCode', text: '容器号', dictCode: ''}) | |
414 | + fieldList.push({type: 'string', value: 'containerCode', text: '容器编码', dictCode: ''}) | |
415 | 415 | fieldList.push({type: 'string', value: 'fromLocationCode', text: '起始库位', dictCode: ''}) |
416 | 416 | fieldList.push({type: 'string', value: 'toLocationCode', text: '目标库位', dictCode: ''}) |
417 | 417 | fieldList.push({type: 'string', value: 'isEmptyOut', text: '是否空出', dictCode: 'is_or_not'}) |
... | ... |
ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
... | ... | @@ -10,8 +10,8 @@ |
10 | 10 | </a-form-item> |
11 | 11 | </a-col> |
12 | 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> | |
13 | + <a-form-item label="容器编码"> | |
14 | + <a-input placeholder="请输入容器编码" v-model="queryParam.containerCode"></a-input> | |
15 | 15 | </a-form-item> |
16 | 16 | </a-col> |
17 | 17 | <template v-if="toggleSearchStatus"> |
... | ... | @@ -205,7 +205,7 @@ export default { |
205 | 205 | dataIndex: 'taskType_dictText', |
206 | 206 | }, |
207 | 207 | { |
208 | - title: '容器号', | |
208 | + title: '容器编码', | |
209 | 209 | align: "center", |
210 | 210 | dataIndex: 'containerCode' |
211 | 211 | }, |
... | ... | @@ -448,7 +448,7 @@ export default { |
448 | 448 | getSuperFieldList() { |
449 | 449 | let fieldList = []; |
450 | 450 | fieldList.push({type: 'int', value: 'taskType', text: '任务类型', dictCode: 'task_type'}) |
451 | - fieldList.push({type: 'string', value: 'containerCode', text: '容器号', dictCode: ''}) | |
451 | + fieldList.push({type: 'string', value: 'containerCode', text: '容器编码', dictCode: ''}) | |
452 | 452 | fieldList.push({type: 'string', value: 'fromLocationCode', text: '起始库位', dictCode: ''}) |
453 | 453 | fieldList.push({type: 'string', value: 'toLocationCode', text: '目标库位', dictCode: ''}) |
454 | 454 | fieldList.push({type: 'string', value: 'isEmptyOut', text: '是否空出', dictCode: 'is_or_not'}) |
... | ... |
ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
... | ... | @@ -10,8 +10,8 @@ |
10 | 10 | </a-form-item> |
11 | 11 | </a-col> |
12 | 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> | |
13 | + <a-form-item label="容器编码"> | |
14 | + <a-input placeholder="请输入容器编码" v-model="queryParam.containerCode"></a-input> | |
15 | 15 | </a-form-item> |
16 | 16 | </a-col> |
17 | 17 | <template v-if="toggleSearchStatus"> |
... | ... | @@ -207,7 +207,7 @@ export default { |
207 | 207 | dataIndex: 'taskType_dictText', |
208 | 208 | }, |
209 | 209 | { |
210 | - title: '容器号', | |
210 | + title: '容器编码', | |
211 | 211 | align: "center", |
212 | 212 | dataIndex: 'containerCode' |
213 | 213 | }, |
... | ... | @@ -449,7 +449,7 @@ export default { |
449 | 449 | getSuperFieldList() { |
450 | 450 | let fieldList = []; |
451 | 451 | fieldList.push({type: 'int', value: 'taskType', text: '任务类型', dictCode: 'task_type'}) |
452 | - fieldList.push({type: 'string', value: 'containerCode', text: '容器号', dictCode: ''}) | |
452 | + fieldList.push({type: 'string', value: 'containerCode', text: '容器编码', dictCode: ''}) | |
453 | 453 | fieldList.push({type: 'string', value: 'fromLocationCode', text: '起始库位', dictCode: ''}) |
454 | 454 | fieldList.push({type: 'string', value: 'toLocationCode', text: '目标库位', dictCode: ''}) |
455 | 455 | fieldList.push({type: 'string', value: 'isEmptyOut', text: '是否空出', dictCode: 'is_or_not'}) |
... | ... |
ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue
... | ... | @@ -10,8 +10,8 @@ |
10 | 10 | </a-form-item> |
11 | 11 | </a-col> |
12 | 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> | |
13 | + <a-form-item label="容器编码"> | |
14 | + <a-input placeholder="请输入容器编码" v-model="queryParam.containerCode"></a-input> | |
15 | 15 | </a-form-item> |
16 | 16 | </a-col> |
17 | 17 | <template v-if="toggleSearchStatus"> |
... | ... | @@ -212,7 +212,7 @@ export default { |
212 | 212 | dataIndex: 'taskType_dictText', |
213 | 213 | }, |
214 | 214 | { |
215 | - title: '容器号', | |
215 | + title: '容器编码', | |
216 | 216 | align: "center", |
217 | 217 | dataIndex: 'containerCode' |
218 | 218 | }, |
... | ... | @@ -459,7 +459,7 @@ export default { |
459 | 459 | getSuperFieldList() { |
460 | 460 | let fieldList = []; |
461 | 461 | fieldList.push({type: 'int', value: 'taskType', text: '任务类型', dictCode: 'task_type'}) |
462 | - fieldList.push({type: 'string', value: 'containerCode', text: '容器号', dictCode: ''}) | |
462 | + fieldList.push({type: 'string', value: 'containerCode', text: '容器编码', dictCode: ''}) | |
463 | 463 | fieldList.push({type: 'string', value: 'fromLocationCode', text: '起始库位', dictCode: ''}) |
464 | 464 | fieldList.push({type: 'string', value: 'toLocationCode', text: '目标库位', dictCode: ''}) |
465 | 465 | fieldList.push({type: 'string', value: 'isEmptyOut', text: '是否空出', dictCode: 'is_or_not'}) |
... | ... |
ant-design-vue-jeecg/src/views/system/task/modules/EmptyInTaskModal.vue
... | ... | @@ -12,8 +12,8 @@ |
12 | 12 | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
13 | 13 | <a-row> |
14 | 14 | <a-col :span="24"> |
15 | - <a-form-model-item label="容器号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | - <a-input v-model="model.containerCode" placeholder="请输入容器号"></a-input> | |
15 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | + <a-input v-model="model.containerCode" placeholder="请输入容器编码"></a-input> | |
17 | 17 | </a-form-model-item> |
18 | 18 | </a-col> |
19 | 19 | <a-col :span="24"> |
... | ... |
ant-design-vue-jeecg/src/views/system/task/modules/ManyEmptyInTaskModal.vue
... | ... | @@ -12,8 +12,8 @@ |
12 | 12 | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
13 | 13 | <a-row> |
14 | 14 | <a-col :span="24"> |
15 | - <a-form-model-item label="容器号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | - <a-input v-model="model.containerCode" placeholder="请输入容器号"></a-input> | |
15 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
16 | + <a-input v-model="model.containerCode" placeholder="请输入容器编码"></a-input> | |
17 | 17 | </a-form-model-item> |
18 | 18 | </a-col> |
19 | 19 | <a-col :span="24"> |
... | ... |
ant-design-vue-jeecg/src/views/system/task/modules/TaskHeaderModal.vue
... | ... | @@ -17,8 +17,8 @@ |
17 | 17 | </a-form-model-item> |
18 | 18 | </a-col> |
19 | 19 | <a-col :span="24"> |
20 | - <a-form-model-item label="容器号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
21 | - <a-input v-model="model.containerCode" placeholder="请输入容器号"></a-input> | |
20 | + <a-form-model-item label="容器编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerCode"> | |
21 | + <a-input v-model="model.containerCode" placeholder="请输入容器编码"></a-input> | |
22 | 22 | </a-form-model-item> |
23 | 23 | </a-col> |
24 | 24 | <a-col :span="24"> |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mes/entity/MesReceiptMaterial.java
... | ... | @@ -17,9 +17,9 @@ public class MesReceiptMaterial { |
17 | 17 | @ApiModelProperty(value = "上游单号", required = true) |
18 | 18 | private String referCode; |
19 | 19 | /** |
20 | - * 容器号 | |
20 | + * 容器编码 | |
21 | 21 | */ |
22 | - @ApiModelProperty(value = "容器号", required = true) | |
22 | + @ApiModelProperty(value = "容器编码", required = true) | |
23 | 23 | private String containerCode; |
24 | 24 | /** |
25 | 25 | * 仓库编码 |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mes/servuce/impl/MesServiceImpl.java
... | ... | @@ -91,7 +91,7 @@ public class MesServiceImpl implements IMesService { |
91 | 91 | String warehouseCode = mesReceiptMaterial.getWarehouseCode(); |
92 | 92 | String toPort = mesReceiptMaterial.getToPort(); |
93 | 93 | if (StringUtils.isEmpty(containerCode)) { |
94 | - return Result.error("MES下发入库信息,容器号为空"); | |
94 | + return Result.error("MES下发入库信息,容器编码为空"); | |
95 | 95 | } |
96 | 96 | if (StringUtils.isEmpty(warehouseCode)) { |
97 | 97 | return Result.error("MES下发入库信息,仓库编码为空"); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/address/entity/Address.java
... | ... | @@ -49,9 +49,9 @@ public class Address implements Serializable { |
49 | 49 | @Excel(name = "接口地址", width = 15) |
50 | 50 | @ApiModelProperty(value = "接口地址") |
51 | 51 | private String url; |
52 | - /** 备注 */ | |
53 | - @Excel(name = "备注", width = 15) | |
54 | - @ApiModelProperty(value = "备注") | |
52 | + /** 接口名称 */ | |
53 | + @Excel(name = "接口名称", width = 15) | |
54 | + @ApiModelProperty(value = "接口名称") | |
55 | 55 | private String remark; |
56 | 56 | /** 备用字段1 */ |
57 | 57 | @Excel(name = "备用字段1", width = 15) |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/locationMonitor/controller/LocationMonitorController.java
... | ... | @@ -21,6 +21,7 @@ import org.jeecg.utils.HuahengJwtUtil; |
21 | 21 | import org.jeecg.utils.StringUtils; |
22 | 22 | import org.jeecg.utils.constant.QuantityConstant; |
23 | 23 | import org.springframework.beans.factory.annotation.Autowired; |
24 | +import org.springframework.util.CollectionUtils; | |
24 | 25 | import org.springframework.web.bind.annotation.*; |
25 | 26 | |
26 | 27 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
... | ... | @@ -56,10 +57,15 @@ public class LocationMonitorController { |
56 | 57 | HuahengJwtUtil.setWarehouseCode(queryWrapper, Location.class, req); |
57 | 58 | queryWrapper.select(Location::getCode, Location::getStatus, Location::getContainerCode).eq(Location::getZoneCode, zoneCode); |
58 | 59 | List<Location> locationList = locationService.list(queryWrapper); |
59 | - List<String> locationCodeList = locationList.stream().map(Location::getCode).collect(Collectors.toList()); | |
60 | - | |
61 | 60 | HashMap<String, Integer> map = new HashMap<>(); |
62 | 61 | map.put("location", locationList.size()); |
62 | + if (CollectionUtils.isEmpty(locationList)) { | |
63 | + map.put("emptyLocation", 0); | |
64 | + map.put("haveContainLocation", 0); | |
65 | + map.put("haveInventoryLocation", 0); | |
66 | + return Result.ok(map); | |
67 | + } | |
68 | + List<String> locationCodeList = locationList.stream().map(Location::getCode).collect(Collectors.toList()); | |
63 | 69 | // 换stream进行数据拣选速度更快 |
64 | 70 | List<Location> emptyLocationList = |
65 | 71 | locationList.stream().filter(t -> QuantityConstant.STATUS_LOCATION_EMPTY.equals(t.getStatus())).collect(Collectors.toList()); |
... | ... | @@ -69,19 +75,16 @@ public class LocationMonitorController { |
69 | 75 | HuahengJwtUtil.setWarehouseCode(containerLambdaQueryWrapper, Container.class, req); |
70 | 76 | containerLambdaQueryWrapper.select(Container::getCode, Container::getStatus, Container::getFillStatus).in(Container::getLocationCode, locationCodeList); |
71 | 77 | List<Container> containerList = containerService.list(containerLambdaQueryWrapper); |
72 | - | |
73 | 78 | List<String> containerCodeList = containerList.stream() |
74 | 79 | .filter( |
75 | 80 | t -> QuantityConstant.STATUS_CONTAINER_FILL_EMPTY.equals(t.getFillStatus()) || QuantityConstant.STATUS_CONTAINER_FILL_MANY.equals(t.getFillStatus())) |
76 | 81 | .map(Container::getCode).collect(Collectors.toList()); |
77 | 82 | List<Location> haveEmptyContainLocation = locationList.stream().filter(t -> containerCodeList.contains(t.getContainerCode())).collect(Collectors.toList()); |
78 | 83 | map.put("haveContainLocation", haveEmptyContainLocation.size()); |
79 | - | |
80 | 84 | List<String> containerCodeList1 = containerList.stream() |
81 | 85 | .filter( |
82 | 86 | t -> QuantityConstant.STATUS_CONTAINER_FILL_SOME.equals(t.getFillStatus()) || QuantityConstant.STATUS_CONTAINER_FILL_FULL.equals(t.getFillStatus())) |
83 | 87 | .map(Container::getCode).collect(Collectors.toList()); |
84 | - | |
85 | 88 | List<Location> haveInventoryLocationList = locationList.stream().filter(t -> containerCodeList1.contains(t.getContainerCode())).collect(Collectors.toList()); |
86 | 89 | map.put("haveInventoryLocation", haveInventoryLocationList.size()); |
87 | 90 | return Result.ok(map); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/home/controller/HomePageViewController.java
... | ... | @@ -42,8 +42,11 @@ import javax.annotation.Resource; |
42 | 42 | import javax.servlet.http.HttpServletRequest; |
43 | 43 | |
44 | 44 | import java.math.BigDecimal; |
45 | +import java.text.ParseException; | |
45 | 46 | import java.text.SimpleDateFormat; |
46 | 47 | import java.util.*; |
48 | +import java.util.concurrent.ExecutionException; | |
49 | +import java.util.concurrent.TimeoutException; | |
47 | 50 | import java.util.stream.Collectors; |
48 | 51 | |
49 | 52 | /** |
... | ... | @@ -62,9 +65,13 @@ public class HomePageViewController { |
62 | 65 | /** |
63 | 66 | * 库存概况 |
64 | 67 | * @return |
68 | + * @throws TimeoutException | |
69 | + * @throws ExecutionException | |
70 | + * @throws InterruptedException | |
71 | + * @throws ParseException | |
65 | 72 | */ |
66 | 73 | @RequestMapping(value = "/deliveringAmount", method = {RequestMethod.PUT, RequestMethod.POST}) |
67 | - public Result<String> deliveringAmount(HttpServletRequest request) { | |
74 | + public Result<String> deliveringAmount(HttpServletRequest request) throws ParseException, InterruptedException, ExecutionException, TimeoutException { | |
68 | 75 | return homePageViewService.deliveringAmount(request); |
69 | 76 | } |
70 | 77 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/home/service/HomePageViewService.java
... | ... | @@ -6,7 +6,10 @@ import org.jeecg.modules.wms.config.location.entity.Location; |
6 | 6 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
7 | 7 | |
8 | 8 | import java.io.Serializable; |
9 | +import java.text.ParseException; | |
9 | 10 | import java.util.Collection; |
11 | +import java.util.concurrent.ExecutionException; | |
12 | +import java.util.concurrent.TimeoutException; | |
10 | 13 | |
11 | 14 | import javax.servlet.http.HttpServletRequest; |
12 | 15 | |
... | ... | @@ -18,7 +21,7 @@ import javax.servlet.http.HttpServletRequest; |
18 | 21 | */ |
19 | 22 | public interface HomePageViewService { |
20 | 23 | |
21 | - Result<String> deliveringAmount(HttpServletRequest request); | |
24 | + Result<String> deliveringAmount(HttpServletRequest request) throws ParseException, InterruptedException, ExecutionException, TimeoutException; | |
22 | 25 | |
23 | 26 | Result<String> inventoryUtilization(HttpServletRequest request); |
24 | 27 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/home/service/impl/HomePageViewServiceImpl.java
1 | 1 | package org.jeecg.modules.wms.home.service.impl; |
2 | 2 | |
3 | -import cn.hutool.core.util.ArrayUtil; | |
4 | -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
5 | -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
6 | -import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
7 | -import com.baomidou.mybatisplus.extension.service.IService; | |
8 | -import com.github.abel533.echarts.Option; | |
9 | -import com.github.abel533.echarts.axis.Axis; | |
10 | -import com.github.abel533.echarts.axis.CategoryAxis; | |
11 | -import com.github.abel533.echarts.axis.ValueAxis; | |
12 | -import com.github.abel533.echarts.code.*; | |
13 | -import com.github.abel533.echarts.json.GsonUtil; | |
14 | -import com.github.abel533.echarts.series.Line; | |
15 | -import com.github.abel533.echarts.series.Pie; | |
16 | -import com.github.abel533.echarts.style.itemstyle.Normal; | |
3 | +import java.math.BigDecimal; | |
4 | +import java.text.ParseException; | |
5 | +import java.text.SimpleDateFormat; | |
6 | +import java.util.ArrayList; | |
7 | +import java.util.Arrays; | |
8 | +import java.util.Date; | |
9 | +import java.util.HashMap; | |
10 | +import java.util.LinkedHashMap; | |
11 | +import java.util.List; | |
12 | +import java.util.Map; | |
13 | +import java.util.concurrent.ExecutionException; | |
14 | +import java.util.concurrent.Future; | |
15 | +import java.util.concurrent.TimeUnit; | |
16 | +import java.util.concurrent.TimeoutException; | |
17 | +import java.util.stream.Collectors; | |
18 | + | |
19 | +import javax.annotation.Resource; | |
20 | +import javax.servlet.http.HttpServletRequest; | |
21 | + | |
17 | 22 | import org.jeecg.common.api.vo.Result; |
18 | 23 | import org.jeecg.modules.system.entity.SysDictItem; |
19 | 24 | import org.jeecg.modules.system.service.impl.SysDictItemServiceImpl; |
20 | 25 | import org.jeecg.modules.wms.config.location.entity.Location; |
21 | 26 | import org.jeecg.modules.wms.config.location.service.impl.LocationServiceImpl; |
22 | 27 | import org.jeecg.modules.wms.home.service.HomePageViewService; |
23 | - | |
24 | 28 | import org.jeecg.modules.wms.home.support.ChartData; |
25 | 29 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; |
26 | 30 | import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryHeader; |
27 | 31 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.impl.InventoryDetailServiceImpl; |
28 | 32 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.impl.InventoryHeaderServiceImpl; |
29 | 33 | import org.jeecg.modules.wms.inventory.inventoryTransaction.entity.InventoryTransaction; |
30 | -import org.jeecg.modules.wms.inventory.inventoryTransaction.service.impl.InventoryTransactionServiceImpl; | |
31 | -import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | |
34 | +import org.jeecg.modules.wms.inventory.inventoryTransaction.service.IInventoryTransactionService; | |
32 | 35 | import org.jeecg.modules.wms.receipt.receiptHeader.service.impl.ReceiptHeaderServiceImpl; |
33 | -import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; | |
34 | 36 | import org.jeecg.modules.wms.shipment.shipmentHeader.service.impl.ShipmentHeaderServiceImpl; |
35 | -import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail; | |
36 | 37 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
37 | 38 | import org.jeecg.modules.wms.task.taskHeader.service.impl.TaskDetailServiceImpl; |
38 | 39 | import org.jeecg.modules.wms.task.taskHeader.service.impl.TaskHeaderServiceImpl; |
39 | 40 | import org.jeecg.utils.HuahengJwtUtil; |
40 | -import org.jeecg.utils.StringUtils; | |
41 | 41 | import org.jeecg.utils.constant.QuantityConstant; |
42 | 42 | import org.jeecg.utils.support.Convert; |
43 | +import org.jeecg.utils.support.SystemSync; | |
43 | 44 | import org.springframework.stereotype.Service; |
44 | 45 | |
45 | -import javax.annotation.Resource; | |
46 | -import javax.servlet.http.HttpServletRequest; | |
46 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
47 | +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |
48 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
49 | +import com.github.abel533.echarts.Option; | |
50 | +import com.github.abel533.echarts.axis.Axis; | |
51 | +import com.github.abel533.echarts.axis.CategoryAxis; | |
52 | +import com.github.abel533.echarts.axis.ValueAxis; | |
53 | +import com.github.abel533.echarts.code.LegendType; | |
54 | +import com.github.abel533.echarts.code.Orient; | |
55 | +import com.github.abel533.echarts.code.PointerType; | |
56 | +import com.github.abel533.echarts.code.SeriesType; | |
57 | +import com.github.abel533.echarts.code.Trigger; | |
58 | +import com.github.abel533.echarts.json.GsonUtil; | |
59 | +import com.github.abel533.echarts.series.Line; | |
60 | +import com.github.abel533.echarts.series.Pie; | |
61 | +import com.github.abel533.echarts.style.itemstyle.Normal; | |
47 | 62 | |
48 | -import java.math.BigDecimal; | |
49 | -import java.text.SimpleDateFormat; | |
50 | -import java.util.*; | |
51 | -import java.util.stream.Collectors; | |
63 | +import cn.hutool.core.date.DateUtil; | |
64 | +import cn.hutool.core.util.ArrayUtil; | |
52 | 65 | |
53 | 66 | /** |
54 | 67 | * @Description: 任务表 |
... | ... | @@ -87,60 +100,26 @@ public class HomePageViewServiceImpl implements HomePageViewService { |
87 | 100 | HomePageViewService homePageViewService; |
88 | 101 | |
89 | 102 | @Resource |
90 | - InventoryTransactionServiceImpl inventoryTransactionServiceImpl; | |
103 | + IInventoryTransactionService inventoryTransactionService; | |
104 | + | |
105 | + @Resource | |
106 | + SystemSync systemSync; | |
91 | 107 | |
92 | 108 | @Override |
93 | - public Result<String> deliveringAmount(HttpServletRequest request) { | |
94 | - // 通过库存交易记录来查询 | |
95 | - LambdaQueryWrapper<InventoryTransaction> inventoryTransactionLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
96 | - HuahengJwtUtil.setWarehouseCode(inventoryTransactionLambdaQueryWrapper, InventoryTransaction.class, request); | |
97 | - inventoryTransactionLambdaQueryWrapper.select(InventoryTransaction::getCreateTime, InventoryTransaction::getQty, InventoryTransaction::getType); | |
98 | - List<InventoryTransaction> inventoryTransactions = inventoryTransactionServiceImpl.list(inventoryTransactionLambdaQueryWrapper); | |
99 | - | |
100 | - // 查询出库单的7天出库量 | |
101 | - List<InventoryTransaction> shipmentHeaders = new ArrayList<>(); | |
102 | - shipmentHeaders.addAll(inventoryTransactions); | |
103 | - shipmentHeaders.removeIf(Inventory -> Inventory.getType() != 20); | |
104 | - LinkedHashMap<String, String> list = new LinkedHashMap<>(); | |
105 | - | |
106 | - for (int i = 6; i >= 0; i--) { | |
107 | - String today = new SimpleDateFormat("yyyy-MM-dd").format(System.currentTimeMillis() - (1000 * 60 * 60 * 24) * i).toString(); | |
108 | - List<InventoryTransaction> collect = shipmentHeaders.stream() | |
109 | - .filter(shipmentHeader -> new SimpleDateFormat("yyyy-MM-dd").format(shipmentHeader.getCreateTime()).toString().contains(today)) | |
110 | - .collect(Collectors.toList()); | |
111 | - if (collect.size() != 0) { | |
112 | - BigDecimal sum = new BigDecimal(0); | |
113 | - for (InventoryTransaction item : collect) { | |
114 | - sum = sum.add(item.getQty()); | |
115 | - } | |
116 | - list.put(today, String.valueOf(sum)); | |
117 | - } else { | |
118 | - list.put(today, "0"); | |
119 | - } | |
120 | - } | |
121 | - | |
122 | - // 查询入库单的7天入库量 | |
123 | - List<InventoryTransaction> receiptHeaders = new ArrayList<>(); | |
124 | - receiptHeaders.addAll(inventoryTransactions); | |
125 | - receiptHeaders.removeIf(Inventory -> Inventory.getType() != 10); | |
126 | - LinkedHashMap<String, String> list2 = new LinkedHashMap<>(); | |
109 | + public Result<String> deliveringAmount(HttpServletRequest request) throws ParseException, InterruptedException, ExecutionException, TimeoutException { | |
110 | + Long dateTime = new Date().getTime(); | |
111 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); | |
112 | + LinkedHashMap<String, Future<BigDecimal>> shipmentQuantityMap = new LinkedHashMap<String, Future<BigDecimal>>(); | |
113 | + LinkedHashMap<String, Future<BigDecimal>> receiptQuantityMap = new LinkedHashMap<String, Future<BigDecimal>>(); | |
114 | + // 查询出库单的7天出库量/入库量 | |
127 | 115 | for (int i = 6; i >= 0; i--) { |
128 | - List<InventoryTransaction> receiptHeadersCop = receiptHeaders; | |
129 | - String today = new SimpleDateFormat("yyyy-MM-dd").format(System.currentTimeMillis() - (1000 * 60 * 60 * 24) * i).toString(); | |
130 | - List<InventoryTransaction> collect = receiptHeadersCop.stream() | |
131 | - .filter(ReceiptHeader -> new SimpleDateFormat("yyyy-MM-dd").format(ReceiptHeader.getCreateTime()).toString().contains(today)) | |
132 | - .collect(Collectors.toList()); | |
133 | - if (collect.size() != 0) { | |
134 | - BigDecimal sum = new BigDecimal(0); | |
135 | - for (InventoryTransaction item : collect) { | |
136 | - sum = sum.add(item.getQty()); | |
137 | - } | |
138 | - list2.put(today, String.valueOf(sum)); | |
139 | - } else { | |
140 | - list2.put(today, "0"); | |
141 | - } | |
116 | + String startTime = simpleDateFormat.format(dateTime - (1000 * 60 * 60 * 24) * i); | |
117 | + String endTime = simpleDateFormat.format(DateUtil.offsetDay(simpleDateFormat.parse(startTime), 1)); | |
118 | + shipmentQuantityMap.put(startTime, | |
119 | + systemSync.asyncCalculateInventory(startTime, endTime, QuantityConstant.INVENTORY_TRANSACTION_SHIPMENT)); | |
120 | + receiptQuantityMap.put(startTime, | |
121 | + systemSync.asyncCalculateInventory(startTime, endTime, QuantityConstant.INVENTORY_TRANSACTION_RECEIPT)); | |
142 | 122 | } |
143 | - | |
144 | 123 | Option option = new Option(); |
145 | 124 | option.tooltip().trigger(Trigger.axis).axisPointer().type(PointerType.cross); |
146 | 125 | option.grid().setLeft("3%"); |
... | ... | @@ -158,17 +137,17 @@ public class HomePageViewServiceImpl implements HomePageViewService { |
158 | 137 | axis.boundaryGap(false); |
159 | 138 | Line line = new Line(); |
160 | 139 | line.setName("发货量"); |
161 | - for (String key : list.keySet()) { | |
140 | + for (String key : shipmentQuantityMap.keySet()) { | |
162 | 141 | Object o1 = key; |
163 | - Object o2 = list.get(key); | |
142 | + Object o2 = shipmentQuantityMap.get(key).get(10000, TimeUnit.MILLISECONDS); | |
164 | 143 | axis.data().add(o1); |
165 | 144 | line.data().add(o2); |
166 | 145 | } |
167 | 146 | Line line2 = new Line(); |
168 | 147 | line2.setName("收货量"); |
169 | - for (String key : list2.keySet()) { | |
148 | + for (String key : receiptQuantityMap.keySet()) { | |
170 | 149 | Object o1 = key; |
171 | - Object o2 = list2.get(key); | |
150 | + Object o2 = receiptQuantityMap.get(key).get(10000, TimeUnit.MILLISECONDS); | |
172 | 151 | line2.data().add(o2); |
173 | 152 | } |
174 | 153 | option.setxAxis(Arrays.asList(axis)); |
... | ... | @@ -346,7 +325,7 @@ public class HomePageViewServiceImpl implements HomePageViewService { |
346 | 325 | LambdaQueryWrapper<InventoryTransaction> inventoryTransactionLambdaQueryWrapper = Wrappers.lambdaQuery(); |
347 | 326 | HuahengJwtUtil.setWarehouseCode(inventoryTransactionLambdaQueryWrapper, InventoryTransaction.class, request); |
348 | 327 | inventoryTransactionLambdaQueryWrapper.select(InventoryTransaction::getType, InventoryTransaction::getQty).gt(InventoryTransaction::getCreateTime, today); |
349 | - List<InventoryTransaction> inventoryTransactions = inventoryTransactionServiceImpl.list(inventoryTransactionLambdaQueryWrapper); | |
328 | + List<InventoryTransaction> inventoryTransactions = inventoryTransactionService.list(inventoryTransactionLambdaQueryWrapper); | |
350 | 329 | BigDecimal receiptQty = BigDecimal.ZERO; |
351 | 330 | BigDecimal shipmentQty = BigDecimal.ZERO; |
352 | 331 | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/entity/InventoryHeader.java
... | ... | @@ -42,9 +42,9 @@ public class InventoryHeader implements Serializable { |
42 | 42 | @Excel(name = "库区", width = 15) |
43 | 43 | @ApiModelProperty(value = "库区") |
44 | 44 | private String zoneCode; |
45 | - /** 容器号 */ | |
46 | - @Excel(name = "容器号", width = 15) | |
47 | - @ApiModelProperty(value = "容器号") | |
45 | + /** 容器编码 */ | |
46 | + @Excel(name = "容器编码", width = 15) | |
47 | + @ApiModelProperty(value = "容器编码") | |
48 | 48 | private String containerCode; |
49 | 49 | /** 容器状态 */ |
50 | 50 | @Excel(name = "容器状态", width = 15, dicCode = "container_status") |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryTransaction/service/IInventoryTransactionService.java
... | ... | @@ -3,7 +3,10 @@ package org.jeecg.modules.wms.inventory.inventoryTransaction.service; |
3 | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
4 | 4 | import org.jeecg.modules.wms.inventory.inventoryTransaction.entity.InventoryTransaction; |
5 | 5 | |
6 | +import java.math.BigDecimal; | |
7 | +import java.text.ParseException; | |
6 | 8 | import java.util.List; |
9 | +import java.util.concurrent.Future; | |
7 | 10 | |
8 | 11 | /** |
9 | 12 | * @Description: 库存交易记录 |
... | ... | @@ -14,5 +17,5 @@ import java.util.List; |
14 | 17 | public interface IInventoryTransactionService extends IService<InventoryTransaction> { |
15 | 18 | |
16 | 19 | boolean batchSave(List<InventoryTransaction> inventoryTransactionList); |
17 | - | |
20 | + | |
18 | 21 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryTransaction/service/impl/InventoryTransactionServiceImpl.java
... | ... | @@ -3,11 +3,18 @@ package org.jeecg.modules.wms.inventory.inventoryTransaction.service.impl; |
3 | 3 | import org.jeecg.modules.wms.inventory.inventoryTransaction.entity.InventoryTransaction; |
4 | 4 | import org.jeecg.modules.wms.inventory.inventoryTransaction.mapper.InventoryTransactionMapper; |
5 | 5 | import org.jeecg.modules.wms.inventory.inventoryTransaction.service.IInventoryTransactionService; |
6 | +import org.springframework.scheduling.annotation.Async; | |
7 | +import org.springframework.scheduling.annotation.AsyncResult; | |
6 | 8 | import org.springframework.stereotype.Service; |
7 | 9 | |
10 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
11 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
8 | 12 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
9 | 13 | |
14 | +import java.math.BigDecimal; | |
15 | +import java.text.ParseException; | |
10 | 16 | import java.util.List; |
17 | +import java.util.concurrent.Future; | |
11 | 18 | |
12 | 19 | /** |
13 | 20 | * @Description: 库存交易记录 |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/entity/ReceiptContainerDetail.java
... | ... | @@ -39,9 +39,9 @@ public class ReceiptContainerDetail implements Serializable { |
39 | 39 | /** 入库单详情ID */ |
40 | 40 | @ApiModelProperty(value = "入库单详情ID") |
41 | 41 | private Integer receiptDetailId; |
42 | - /** 容器号 */ | |
43 | - @Excel(name = "容器号", width = 15) | |
44 | - @ApiModelProperty(value = "容器号") | |
42 | + /** 容器编码 */ | |
43 | + @Excel(name = "容器编码", width = 15) | |
44 | + @ApiModelProperty(value = "容器编码") | |
45 | 45 | private String containerCode; |
46 | 46 | /** 入库单编码 */ |
47 | 47 | @ApiModelProperty(value = "入库单编码") |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/entity/ReceiptContainerHeader.java
... | ... | @@ -39,9 +39,9 @@ public class ReceiptContainerHeader implements Serializable { |
39 | 39 | @Excel(name = "货主", width = 15) |
40 | 40 | @ApiModelProperty(value = "货主") |
41 | 41 | private String companyCode; |
42 | - /** 容器号 */ | |
43 | - @Excel(name = "容器号", width = 15) | |
44 | - @ApiModelProperty(value = "容器号") | |
42 | + /** 容器编码 */ | |
43 | + @Excel(name = "容器编码", width = 15) | |
44 | + @ApiModelProperty(value = "容器编码") | |
45 | 45 | private String containerCode; |
46 | 46 | /** 容器类型 */ |
47 | 47 | @Excel(name = "容器类型", width = 15) |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
... | ... | @@ -108,11 +108,11 @@ public class ReceiveServiceImpl extends ServiceImpl<ReceiveMapper, Receive> impl |
108 | 108 | } |
109 | 109 | String containerCode = receiveList.get(0).getContainerCode(); |
110 | 110 | if (StringUtils.isEmpty(containerCode)) { |
111 | - return Result.error("容器号为空"); | |
111 | + return Result.error("容器编码为空"); | |
112 | 112 | } |
113 | 113 | Container container = containerService.getContainerByCode(containerCode, warehouseCode); |
114 | 114 | if (container == null) { |
115 | - return Result.error("根据容器号 " + containerCode + ", 没有找到容器"); | |
115 | + return Result.error("根据容器编码 " + containerCode + ", 没有找到容器"); | |
116 | 116 | } |
117 | 117 | String containerStatus = container.getStatus(); |
118 | 118 | if (containerStatus.equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
... | ... | @@ -589,7 +589,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi |
589 | 589 | String containerCode = inventoryDetail.getContainerCode(); |
590 | 590 | Container container = containerService.getContainerByCode(containerCode, warehouseCode); |
591 | 591 | if (container == null) { |
592 | - return Result.error("没有找到容器,容器号" + containerCode); | |
592 | + return Result.error("没有找到容器,容器编码" + containerCode); | |
593 | 593 | } |
594 | 594 | if (container.getStatus().equals(QuantityConstant.STATUS_CONTAINER_LOCK)) { |
595 | 595 | removeInventoryList.add(inventoryDetail); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/entity/ShipmentContainerDetail.java
... | ... | @@ -53,9 +53,9 @@ public class ShipmentContainerDetail implements Serializable { |
53 | 53 | @Excel(name = "货主编码", width = 15) |
54 | 54 | @ApiModelProperty(value = "货主编码") |
55 | 55 | private String companyCode; |
56 | - /** 容器号 */ | |
57 | - @Excel(name = "容器号", width = 15) | |
58 | - @ApiModelProperty(value = "容器号") | |
56 | + /** 容器编码 */ | |
57 | + @Excel(name = "容器编码", width = 15) | |
58 | + @ApiModelProperty(value = "容器编码") | |
59 | 59 | private String containerCode; |
60 | 60 | /** 起始库位 */ |
61 | 61 | @Excel(name = "起始库位", width = 15) |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentContainerHeader/entity/ShipmentContainerHeader.java
... | ... | @@ -38,9 +38,9 @@ public class ShipmentContainerHeader implements Serializable { |
38 | 38 | @Excel(name = "货主", width = 15) |
39 | 39 | @ApiModelProperty(value = "货主") |
40 | 40 | private String companyCode; |
41 | - /** 容器号 */ | |
42 | - @Excel(name = "容器号", width = 15) | |
43 | - @ApiModelProperty(value = "容器号") | |
41 | + /** 容器编码 */ | |
42 | + @Excel(name = "容器编码", width = 15) | |
43 | + @ApiModelProperty(value = "容器编码") | |
44 | 44 | private String containerCode; |
45 | 45 | /** 容器类型 */ |
46 | 46 | @Excel(name = "容器类型", width = 15) |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/agvTask/service/impl/AgvTaskServiceImpl.java
... | ... | @@ -114,7 +114,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl |
114 | 114 | } |
115 | 115 | Container container = containerService.getContainerByCode(containerCode, warehouseCode); |
116 | 116 | if (container == null) { |
117 | - throw new JeecgBootException("完成AGV任务时,根据容器号没有找到容器"); | |
117 | + throw new JeecgBootException("完成AGV任务时,根据容器编码没有找到容器"); | |
118 | 118 | } |
119 | 119 | success = containerService.updateLocationCodeAndStatus(containerCode, toPort, QuantityConstant.STATUS_CONTAINER_EMPTY, warehouseCode); |
120 | 120 | if (!success) { |
... | ... | @@ -165,7 +165,7 @@ public class AgvTaskServiceImpl extends ServiceImpl<AgvTaskMapper, AgvTask> impl |
165 | 165 | } |
166 | 166 | Container container = containerService.getContainerByCode(containerCode, warehouseCode); |
167 | 167 | if (container == null) { |
168 | - throw new JeecgBootException("取消AGV任务。 根据容器号没有找到容器"); | |
168 | + throw new JeecgBootException("取消AGV任务。 根据容器编码没有找到容器"); | |
169 | 169 | } |
170 | 170 | // 2023-04-11 托盘状态与填充状态分离 |
171 | 171 | // String containerStatus = QuantityConstant.STATUS_CONTAINER_EMPTY; |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/entity/TaskHeader.java
... | ... | @@ -71,9 +71,9 @@ public class TaskHeader implements Serializable { |
71 | 71 | @Excel(name = "内部任务类型", width = 15) |
72 | 72 | @ApiModelProperty(value = "内部任务类型") |
73 | 73 | private Integer innernalTaskType; |
74 | - /** 容器号 */ | |
75 | - @Excel(name = "容器号", width = 15) | |
76 | - @ApiModelProperty(value = "容器号") | |
74 | + /** 容器编码 */ | |
75 | + @Excel(name = "容器编码", width = 15) | |
76 | + @ApiModelProperty(value = "容器编码") | |
77 | 77 | private String containerCode; |
78 | 78 | /** 起始库位 */ |
79 | 79 | @Excel(name = "起始库位", width = 15) |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... | ... | @@ -250,7 +250,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
250 | 250 | // container.setLastStatus(container.getStatus()); |
251 | 251 | // boolean success = containerService.updateById(container); |
252 | 252 | // if (!success) { |
253 | -// throw new JeecgBootException("创建移库任务时,更新容器状态失败,容器号" + fromLocation.getContainerCode()); | |
253 | +// throw new JeecgBootException("创建移库任务时,更新容器状态失败,容器编码" + fromLocation.getContainerCode()); | |
254 | 254 | // } |
255 | 255 | |
256 | 256 | // 3. 判断源库位旁边有托盘但是没有任务,那么不允许移库 |
... | ... | @@ -383,7 +383,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
383 | 383 | @Transactional(rollbackFor = Exception.class) |
384 | 384 | public Result createOverStationTask(String containerCode, String fromPortCode, String toPortCode, String warehouseCode) { |
385 | 385 | if (StringUtils.isEmpty(containerCode)) { |
386 | - return Result.error("创建跨站任务时,容器号为空"); | |
386 | + return Result.error("创建跨站任务时,容器编码为空"); | |
387 | 387 | } |
388 | 388 | if (StringUtils.isEmpty(fromPortCode)) { |
389 | 389 | return Result.error("创建跨站任务时,起始站台号为空"); |
... | ... | @@ -436,7 +436,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
436 | 436 | @Transactional(rollbackFor = Exception.class) |
437 | 437 | public Result createManyEmptyInTask(String containerCode, String zoneCode, String roadWay, String height, String warehouseCode) { |
438 | 438 | if (StringUtils.isEmpty(containerCode)) { |
439 | - return Result.error("创建空托盘组入库任务时,容器号为空"); | |
439 | + return Result.error("创建空托盘组入库任务时,容器编码为空"); | |
440 | 440 | } |
441 | 441 | if (StringUtils.isEmpty(zoneCode)) { |
442 | 442 | return Result.error("创建空托盘组入库任务时,库区编码为空"); |
... | ... | @@ -501,7 +501,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
501 | 501 | @Transactional(rollbackFor = Exception.class) |
502 | 502 | public Result createManyEmptyIn(String containerCode, String toLocationCode, String warehouseCode) { |
503 | 503 | if (StringUtils.isEmpty(containerCode)) { |
504 | - return Result.error("创建空托盘组入库任务时,容器号为空"); | |
504 | + return Result.error("创建空托盘组入库任务时,容器编码为空"); | |
505 | 505 | } |
506 | 506 | if (StringUtils.isEmpty(warehouseCode)) { |
507 | 507 | return Result.error("创建空托盘组入库任务时,仓库编码为空"); |
... | ... | @@ -642,9 +642,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
642 | 642 | String containerCode = taskHeader.getContainerCode(); |
643 | 643 | String fromLocationCode = taskHeader.getFromLocationCode(); |
644 | 644 | String warehouseCode = taskHeader.getWarehouseCode(); |
645 | - // 4、容器号、库位号、仓库编码 不能为空 | |
645 | + // 4、容器编码、库位号、仓库编码 不能为空 | |
646 | 646 | if (StringUtils.isEmpty(containerCode)) { |
647 | - return Result.error("处理空出失败,容器号为空"); | |
647 | + return Result.error("处理空出失败,容器编码为空"); | |
648 | 648 | } |
649 | 649 | if (StringUtils.isEmpty(fromLocationCode)) { |
650 | 650 | return Result.error("处理空出失败,起始库号位为空"); |
... | ... | @@ -666,7 +666,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
666 | 666 | if (!success) { |
667 | 667 | throw new JeecgBootException("处理空出失败, 更新容器状态失败"); |
668 | 668 | } |
669 | - // 6、删除库位上的容器号,并设置状态为空闲 | |
669 | + // 6、删除库位上的容器编码,并设置状态为空闲 | |
670 | 670 | success = |
671 | 671 | locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); |
672 | 672 | if (!success) { |
... | ... | @@ -717,9 +717,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
717 | 717 | String containerCode = taskHeader.getContainerCode(); |
718 | 718 | String originLocationCode = taskHeader.getOriginLocationCode(); |
719 | 719 | String warehouseCode = taskHeader.getWarehouseCode(); |
720 | - // 4、容器号、库位号、仓库编码 不能为空 | |
720 | + // 4、容器编码、库位号、仓库编码 不能为空 | |
721 | 721 | if (StringUtils.isEmpty(containerCode)) { |
722 | - return Result.error("处理重入失败,容器号为空"); | |
722 | + return Result.error("处理重入失败,容器编码为空"); | |
723 | 723 | } |
724 | 724 | if (StringUtils.isEmpty(originLocationCode)) { |
725 | 725 | return Result.error("处理重入失败,终点库号位为空"); |
... | ... | @@ -829,10 +829,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
829 | 829 | public Result completeTaskByWMS(Integer taskId) { |
830 | 830 | TaskHeader taskHeader = getById(taskId); |
831 | 831 | if (taskHeader == null) { |
832 | - return Result.error("任务" + taskId + "未找到,执行中止"); | |
832 | + return Result.error("任务 " + taskId + " 未找到,执行中止"); | |
833 | 833 | } |
834 | 834 | if (taskHeader.getStatus().equals(QuantityConstant.TASK_STATUS_COMPLETED)) { |
835 | - return Result.ok("任务(" + taskId + ")任务已经是完成的!"); | |
835 | + return Result.ok("任务 " + taskId + " 任务已完成!"); | |
836 | 836 | } |
837 | 837 | int taskType = taskHeader.getTaskType().intValue(); |
838 | 838 | if (taskType != QuantityConstant.TASK_TYPE_OVER_STATION) { |
... | ... | @@ -1510,7 +1510,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1510 | 1510 | } |
1511 | 1511 | Container container = containerService.getContainerByCode(containerCode, warehouseCode); |
1512 | 1512 | if (container == null) { |
1513 | - throw new JeecgBootException("合并库存时, 没有找到容器, 容器号为" + containerCode); | |
1513 | + throw new JeecgBootException("合并库存时, 没有找到容器, 容器编码为" + containerCode); | |
1514 | 1514 | } |
1515 | 1515 | inventoryHeader.setTotalQty(totalQty); |
1516 | 1516 | inventoryHeader.setTotalLines(totalLines); |
... | ... | @@ -1553,7 +1553,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1553 | 1553 | } |
1554 | 1554 | success = locationService.updateContainerCodeAndStatus(toLocationCode, containerCode, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); |
1555 | 1555 | if (!success) { |
1556 | - throw new JeecgBootException("完成空托盘入库任务时, 更新库位的容器号和状态失败"); | |
1556 | + throw new JeecgBootException("完成空托盘入库任务时, 更新库位的容器编码和状态失败"); | |
1557 | 1557 | } |
1558 | 1558 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED); |
1559 | 1559 | success = taskHeaderService.updateById(taskHeader); |
... | ... | @@ -1855,7 +1855,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1855 | 1855 | success = |
1856 | 1856 | locationService.updateContainerCodeAndStatus(fromLocationCode, QuantityConstant.EMPTY_STRING, QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); |
1857 | 1857 | if (!success) { |
1858 | - throw new JeecgBootException("完成空托盘出库任务时, 更新库位的容器号和状态失败"); | |
1858 | + throw new JeecgBootException("完成空托盘出库任务时, 更新库位的容器编码和状态失败"); | |
1859 | 1859 | } |
1860 | 1860 | taskHeader.setStatus(QuantityConstant.TASK_STATUS_COMPLETED); |
1861 | 1861 | success = taskHeaderService.updateById(taskHeader); |
... | ... | @@ -2290,7 +2290,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
2290 | 2290 | // if (StringUtils.isNotEmpty(fromLocationCode)) { |
2291 | 2291 | // success = containerService.havaLocationCodeByContainer(fromLocationCode, warehouseCode); |
2292 | 2292 | // if (success) { |
2293 | -// throw new JeecgBootException("库位表已经存在这个容器号,不能再写入"); | |
2293 | +// throw new JeecgBootException("库位表已经存在这个容器编码,不能再写入"); | |
2294 | 2294 | // } |
2295 | 2295 | // } |
2296 | 2296 | // container.setLastStatus(QuantityConstant.EMPTY_STRING); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/utils/aspect/ApiLoggerAspect.java
... | ... | @@ -23,17 +23,13 @@ import org.aspectj.lang.reflect.MethodSignature; |
23 | 23 | import org.jeecg.JeecgSystemApplication; |
24 | 24 | import org.jeecg.common.api.vo.Result; |
25 | 25 | import org.jeecg.modules.wms.config.address.entity.Address; |
26 | -import org.jeecg.modules.wms.config.address.service.IAddressService; | |
26 | +import org.jeecg.modules.wms.config.address.service.impl.AddressServiceImpl; | |
27 | 27 | import org.jeecg.modules.wms.monitor.apiLog.entity.ApiLog; |
28 | -import org.jeecg.modules.wms.monitor.apiLog.service.IApiLogService; | |
29 | 28 | import org.jeecg.utils.ServletUtils; |
30 | 29 | import org.jeecg.utils.SpringUtils; |
31 | 30 | import org.jeecg.utils.StringUtils; |
32 | -import org.jeecg.utils.config.ApplicationConfig; | |
33 | -import org.jeecg.utils.constant.QuantityConstant; | |
34 | 31 | import org.jeecg.utils.support.ApiLogger; |
35 | -import org.springframework.beans.factory.annotation.Autowired; | |
36 | -import org.springframework.scheduling.annotation.Async; | |
32 | +import org.jeecg.utils.support.SystemSync; | |
37 | 33 | import org.springframework.scheduling.annotation.EnableAsync; |
38 | 34 | import org.springframework.stereotype.Component; |
39 | 35 | |
... | ... | @@ -55,23 +51,6 @@ import okhttp3.Response; |
55 | 51 | public class ApiLoggerAspect { |
56 | 52 | |
57 | 53 | public static final String HUAHENG_SYSTEM_NAME = "HUAHENG_WMS4"; |
58 | - | |
59 | - private static IApiLogService apiLogService; | |
60 | - | |
61 | - private static IAddressService addressService; | |
62 | - | |
63 | - @Autowired | |
64 | - private ApplicationConfig applicationConfig; | |
65 | - | |
66 | - @Autowired | |
67 | - public void setApiLogService(IApiLogService apiLogService) { | |
68 | - ApiLoggerAspect.apiLogService = apiLogService; | |
69 | - } | |
70 | - | |
71 | - @Autowired | |
72 | - public void setAddressService(IAddressService addressService) { | |
73 | - ApiLoggerAspect.addressService = addressService; | |
74 | - } | |
75 | 54 | |
76 | 55 | // 配置织入点 |
77 | 56 | @Pointcut("@annotation(org.jeecg.utils.support.ApiLogger)") |
... | ... | @@ -100,151 +79,10 @@ public class ApiLoggerAspect { |
100 | 79 | return ret; |
101 | 80 | } |
102 | 81 | |
103 | -// /** 记录WMS调用第三方接口的日志 **/ | |
104 | -// private Object aroundWms2XXX(ProceedingJoinPoint point, ApiLogger apiLogger) { | |
105 | -// Object ret = null; | |
106 | -// ApiLog log = new ApiLog(); | |
107 | -// | |
108 | -// HttpURLConnection connection = null; | |
109 | -// String body = null; | |
110 | -// | |
111 | -// try { | |
112 | -// connection = (HttpURLConnection)point.getArgs()[0]; | |
113 | -// body = (String)point.getArgs()[1]; | |
114 | -// initApiLog(connection, body); | |
115 | -// ret = point.proceed(); | |
116 | -// } catch (Throwable e) { | |
117 | -// setApiLogThrowable(log, e); | |
118 | -// ret = Result.error(e.getMessage()); | |
119 | -// } finally { | |
120 | -// if (ret != null) { | |
121 | -// finishApiLog(log, connection, ret.toString()); | |
122 | -// } | |
123 | -// } | |
124 | -// return ret; | |
125 | -// } | |
126 | - | |
127 | -// /** | |
128 | -// * 记录响应头信息,保存日志到数据库 | |
129 | -// */ | |
130 | -// public static void finishApiLog(ApiLog log, HttpURLConnection connection, String body) { | |
131 | -// try { | |
132 | -// log.setResponseBody(body); | |
133 | -// log.setResponseTime(new Date()); | |
134 | -// Long duration = log.getResponseTime().getTime() - log.getRequestTime().getTime(); | |
135 | -// log.setDuration(duration.intValue()); | |
136 | -// log.setHttpCode(connection.getResponseCode()); | |
137 | -// | |
138 | -// // 响应头 | |
139 | -// Set<String> keyset = connection.getHeaderFields().keySet(); | |
140 | -// ArrayList<String> headerList = new ArrayList<>(); | |
141 | -// Iterator<String> it = keyset.iterator(); | |
142 | -// while (it.hasNext()) { | |
143 | -// String name = it.next(); | |
144 | -// String header = connection.getHeaderField(name); | |
145 | -// if (name == null || "".equals(name)) { | |
146 | -// // 第一行没有name | |
147 | -// // HTTP/1.1 200 OK | |
148 | -// headerList.add(header); | |
149 | -// } else { | |
150 | -// headerList.add(name + ": " + header); | |
151 | -// } | |
152 | -// } | |
153 | -// log.setResponseHeader(org.apache.commons.lang3.StringUtils.join(headerList, "\n")); | |
154 | -// Result json = JSON.parseObject(body, Result.class); | |
155 | -// log.setRetCode(json.getCode()); | |
156 | -// } catch (Exception e) { | |
157 | -// e.printStackTrace(); | |
158 | -// } finally { | |
159 | -// SpringUtils.getBean(ApiLogAspect.class).saveApiLog(log); | |
160 | -// } | |
161 | -// } | |
162 | - | |
163 | -// /** | |
164 | -// * 根据url,从address表中判断调用的去向 | |
165 | -// */ | |
166 | -// public static void parseUrl(ApiLog log, URL url, String warehouseCode) { | |
167 | -// try { | |
168 | -// String[] spList = url.toString().split("/"); | |
169 | -// String apiName = spList[spList.length - 1]; | |
170 | -// String ip = JeecgSystemApplication.getLocalHostExactAddress().getHostAddress(); | |
171 | -// Address address = addressService.getAddressByUrl(url.toString(), warehouseCode); | |
172 | -// log.setApiName(apiName); | |
173 | -// log.setRequestFrom("WMS"); | |
174 | -// log.setIp(ip); | |
175 | -// log.setResponseBy(address.getParam().toUpperCase()); | |
176 | -// } catch (Exception e) { | |
177 | -// e.printStackTrace(); | |
178 | -// } | |
179 | -// } | |
180 | - | |
181 | -// /** | |
182 | -// * 记录WMS调用第三方系统接口的请求信息 | |
183 | -// * 在HttpUtils.body POST方法中直接调用本类static方法 | |
184 | -// **/ | |
185 | -// public static ApiLog initApiLog(String Method, String urlStr, String body, HttpHeaders headers, String warehouseCode) { | |
186 | -// ApiLog log = new ApiLog(); | |
187 | -// try { | |
188 | -// URL url = new URL(urlStr); | |
189 | -// log.setApiMethod(Method); | |
190 | -// log.setUrl(urlStr); | |
191 | -// log.setRequestTime(new Date()); | |
192 | -// parseUrl(log, url, warehouseCode); | |
193 | -// | |
194 | -// // 请求头 | |
195 | -// Set<String> keySet = headers.keySet(); | |
196 | -// ArrayList<String> headerList = new ArrayList<>(); | |
197 | -// Iterator<String> it = keySet.iterator(); | |
198 | -// while (it.hasNext()) { | |
199 | -// String name = it.next(); | |
200 | -// String header = String.valueOf(headers.getContentType()); | |
201 | -// headerList.add(name + ": " + header); | |
202 | -// } | |
203 | -// | |
204 | -// log.setRequestHeader(org.apache.commons.lang3.StringUtils.join(headerList, "\n")); | |
205 | -// log.setRequestBody(body); | |
206 | -// } catch (Exception e) { | |
207 | -// e.printStackTrace(); | |
208 | -// } | |
209 | -// | |
210 | -// return log; | |
211 | -// } | |
212 | - | |
213 | -// /** | |
214 | -// * 记录WMS调用第三方系统接口的请求信息 | |
215 | -// * 在HttpUtils.body POST方法中直接调用本类static方法 | |
216 | -// **/ | |
217 | -// public static ApiLog initApiLog(HttpURLConnection connection, String body) { | |
218 | -// ApiLog log = new ApiLog(); | |
219 | -// try { | |
220 | -// log.setApiMethod(connection.getRequestMethod()); | |
221 | -// log.setUrl(connection.getURL().toString()); | |
222 | -// log.setRequestTime(new Date()); | |
223 | -// parseUrl(log, connection.getURL()); | |
224 | -// | |
225 | -// // 请求头 | |
226 | -// Set<String> keySet = connection.getRequestProperties().keySet(); | |
227 | -// ArrayList<String> headerList = new ArrayList<>(); | |
228 | -// Iterator<String> it = keySet.iterator(); | |
229 | -// while (it.hasNext()) { | |
230 | -// String name = it.next(); | |
231 | -// String header = connection.getRequestProperty(name); | |
232 | -// headerList.add(name + ":" + header); | |
233 | -// } | |
234 | -// | |
235 | -// log.setRequestHeader(org.apache.commons.lang3.StringUtils.join(headerList, "\n")); | |
236 | -// log.setRequestBody(body); | |
237 | -// } catch (Exception e) { | |
238 | -// e.printStackTrace(); | |
239 | -// } | |
240 | -// | |
241 | -// return log; | |
242 | -// } | |
243 | - | |
244 | 82 | /** |
245 | 83 | * 记录WMS调用第三方系统接口的请求信息 |
246 | 84 | * 在OKHttpUtils.bodypost方法中直接调用本类static方法 |
247 | - * @param apiLog | |
85 | + * @param apiLog | |
248 | 86 | **/ |
249 | 87 | public static void initApiLog(ApiLog apiLog, Request request, String body) { |
250 | 88 | try { |
... | ... | @@ -289,7 +127,7 @@ public class ApiLoggerAspect { |
289 | 127 | } catch (Exception e) { |
290 | 128 | e.printStackTrace(); |
291 | 129 | } |
292 | - SpringUtils.getBean(ApiLoggerAspect.class).saveApiLog(log); | |
130 | + SpringUtils.getBean(SystemSync.class).saveApiLog(log); | |
293 | 131 | } |
294 | 132 | } |
295 | 133 | |
... | ... | @@ -298,52 +136,19 @@ public class ApiLoggerAspect { |
298 | 136 | try { |
299 | 137 | String[] spList = url.toString().split("/"); |
300 | 138 | String apiName = spList[spList.length - 1]; |
301 | - String ip = JeecgSystemApplication.getLocalHostExactAddress().getHostAddress(); | |
302 | 139 | apiLog.setApiName(apiName); |
303 | 140 | apiLog.setRequestFrom(HUAHENG_SYSTEM_NAME); |
304 | - apiLog.setIp(ip); | |
305 | - Address address = addressService.getAddressByUrl(url.toString()); | |
306 | - apiLog.setResponseBy(address.getParam().toUpperCase()); | |
141 | + apiLog.setIp(JeecgSystemApplication.getLocalHostExactAddress().getHostAddress()); | |
142 | + Address address = SpringUtils.getBean(AddressServiceImpl.class).getAddressByUrl(url.toString()); | |
143 | + if (address != null) { | |
144 | + apiLog.setApiName(address.getRemark()); | |
145 | + apiLog.setResponseBy(address.getParam().toUpperCase()); | |
146 | + } | |
307 | 147 | } catch (Exception e) { |
308 | 148 | e.printStackTrace(); |
309 | 149 | } |
310 | 150 | } |
311 | 151 | |
312 | -// /** | |
313 | -// * 记录响应头信息 | |
314 | -// **/ | |
315 | -// public static void finishApiLog(ApiLog log, HttpHeaders headers, String body) { | |
316 | -// try { | |
317 | -// log.setResponseBody(body); | |
318 | -// log.setResponseTime(new Date()); | |
319 | -// Long duration = log.getResponseTime().getTime() - log.getRequestTime().getTime(); | |
320 | -// log.setDuration(duration.intValue()); | |
321 | -// log.setHttpCode(200); | |
322 | -// | |
323 | -// // 响应头 | |
324 | -// Set<String> keyset = headers.keySet(); | |
325 | -// ArrayList<String> headerList = new ArrayList<>(); | |
326 | -// Iterator<String> it = keyset.iterator(); | |
327 | -// while (it.hasNext()) { | |
328 | -// String name = it.next(); | |
329 | -// String header = String.valueOf(headers.getContentType()); | |
330 | -// if (name == null || "".equals(name)) | |
331 | -// // 第一行没有name | |
332 | -// // HTTP/1.1 200 OK | |
333 | -// headerList.add(header); | |
334 | -// else | |
335 | -// headerList.add(name + ": " + header); | |
336 | -// } | |
337 | -// log.setResponseHeader(org.apache.commons.lang3.StringUtils.join(headerList, "\n")); | |
338 | -// Result json = JSON.parseObject(body, Result.class); | |
339 | -// log.setRetCode(json.getCode()); | |
340 | -// } catch (Exception e) { | |
341 | -// e.printStackTrace(); | |
342 | -// } finally { | |
343 | -// SpringUtils.getBean(ApiLogAspect.class).saveApiLog(log); | |
344 | -// } | |
345 | -// } | |
346 | - | |
347 | 152 | private ApiLog initApiLog(ApiLogger apiLogger, ProceedingJoinPoint point) { |
348 | 153 | ApiLog log = new ApiLog(); |
349 | 154 | try { |
... | ... | @@ -396,7 +201,7 @@ public class ApiLoggerAspect { |
396 | 201 | } catch (Exception e) { |
397 | 202 | e.printStackTrace(); |
398 | 203 | } finally { |
399 | - saveApiLog(log); | |
204 | + SpringUtils.getBean(SystemSync.class).saveApiLog(log); | |
400 | 205 | } |
401 | 206 | } |
402 | 207 | |
... | ... | @@ -472,7 +277,6 @@ public class ApiLoggerAspect { |
472 | 277 | Object[] args = point.getArgs(); |
473 | 278 | for (int i = 0; i < m.getParameterNames().length; i++) { |
474 | 279 | String name = m.getParameterNames()[i]; |
475 | -// Class type = m.getParameterTypes()[i]; | |
476 | 280 | if (args[i] instanceof HttpServletRequest) { |
477 | 281 | continue; |
478 | 282 | } |
... | ... | @@ -520,15 +324,6 @@ public class ApiLoggerAspect { |
520 | 324 | } |
521 | 325 | } |
522 | 326 | |
523 | - @Async | |
524 | - public void saveApiLog(ApiLog log) { | |
525 | - try { | |
526 | - apiLogService.saveOrUpdate(log); | |
527 | - } catch (Exception e) { | |
528 | - e.printStackTrace(); | |
529 | - } | |
530 | - } | |
531 | - | |
532 | 327 | public static String getIpAddr(HttpServletRequest request) { |
533 | 328 | String ipAddress = request.getHeader("x-forwarded-for"); |
534 | 329 | if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/utils/support/SyncConfiguration.java
0 → 100644
1 | +package org.jeecg.utils.support; | |
2 | + | |
3 | +import java.util.concurrent.ThreadPoolExecutor; | |
4 | + | |
5 | +import org.springframework.context.annotation.Bean; | |
6 | +import org.springframework.context.annotation.Configuration; | |
7 | +import org.springframework.scheduling.annotation.EnableAsync; | |
8 | +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; | |
9 | + | |
10 | +@Configuration | |
11 | +@EnableAsync | |
12 | +public class SyncConfiguration { | |
13 | + @Bean(name = "asyncPoolTaskExecutor") | |
14 | + public ThreadPoolTaskExecutor executor() { | |
15 | + ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor(); | |
16 | + // 核心线程数 | |
17 | + taskExecutor.setCorePoolSize(10); | |
18 | + // 线程池维护线程的最大数量,只有在缓冲队列满了之后才会申请超过核心线程数的线程 | |
19 | + taskExecutor.setMaxPoolSize(100); | |
20 | + // 缓存队列 | |
21 | + taskExecutor.setQueueCapacity(50); | |
22 | + // 许的空闲时间,当超过了核心线程出之外的线程在空闲时间到达之后会被销毁 | |
23 | + taskExecutor.setKeepAliveSeconds(200); | |
24 | + // 异步方法内部线程名称 | |
25 | + taskExecutor.setThreadNamePrefix("async-"); | |
26 | + /** | |
27 | + * 当线程池的任务缓存队列已满并且线程池中的线程数目达到maximumPoolSize,如果还有任务到来就会采取任务拒绝策略 | |
28 | + * 通常有以下四种策略: | |
29 | + * ThreadPoolExecutor.AbortPolicy:丢弃任务并抛出RejectedExecutionException异常。 | |
30 | + * ThreadPoolExecutor.DiscardPolicy:也是丢弃任务,但是不抛出异常。 | |
31 | + * ThreadPoolExecutor.DiscardOldestPolicy:丢弃队列最前面的任务,然后重新尝试执行任务(重复此过程) | |
32 | + * ThreadPoolExecutor.CallerRunsPolicy:重试添加当前的任务,自动重复调用 execute() 方法,直到成功 | |
33 | + */ | |
34 | + taskExecutor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); | |
35 | + taskExecutor.initialize(); | |
36 | + return taskExecutor; | |
37 | + } | |
38 | +} | |
0 | 39 | \ No newline at end of file |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/utils/support/SystemSync.java
0 → 100644
1 | +package org.jeecg.utils.support; | |
2 | + | |
3 | +import java.math.BigDecimal; | |
4 | +import java.util.List; | |
5 | +import java.util.concurrent.Future; | |
6 | + | |
7 | +import org.jeecg.modules.wms.inventory.inventoryTransaction.entity.InventoryTransaction; | |
8 | +import org.jeecg.modules.wms.inventory.inventoryTransaction.service.IInventoryTransactionService; | |
9 | +import org.jeecg.modules.wms.monitor.apiLog.entity.ApiLog; | |
10 | +import org.jeecg.modules.wms.monitor.apiLog.service.IApiLogService; | |
11 | +import org.springframework.beans.factory.annotation.Autowired; | |
12 | +import org.springframework.scheduling.annotation.Async; | |
13 | +import org.springframework.scheduling.annotation.AsyncResult; | |
14 | +import org.springframework.stereotype.Component; | |
15 | + | |
16 | +import com.alibaba.fastjson.JSON; | |
17 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
18 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
19 | + | |
20 | +import lombok.extern.slf4j.Slf4j; | |
21 | + | |
22 | +@Slf4j | |
23 | +@Component | |
24 | +public class SystemSync { | |
25 | + | |
26 | + @Autowired | |
27 | + private IApiLogService apiLogService; | |
28 | + | |
29 | + @Autowired | |
30 | + private IInventoryTransactionService inventoryTransactionService; | |
31 | + | |
32 | + /** | |
33 | + * 保存API调用日志 | |
34 | + * @author TanYibin | |
35 | + * @createDate 2023年5月9日 | |
36 | + * @param apiLog | |
37 | + */ | |
38 | + @Async("asyncPoolTaskExecutor") | |
39 | + public void saveApiLog(ApiLog apiLog) { | |
40 | + try { | |
41 | + apiLogService.saveOrUpdate(apiLog); | |
42 | + } catch (Exception e) { | |
43 | + log.error("saveApiLog 执行异常,apiLog:{}", JSON.toJSONString(apiLog), e); | |
44 | + } | |
45 | + } | |
46 | + | |
47 | + /** | |
48 | + * 异步库存信息查询 | |
49 | + * @author TanYibin | |
50 | + * @createDate 2023年5月9日 | |
51 | + * @param startTime | |
52 | + * @param endTime | |
53 | + * @param type | |
54 | + * @return | |
55 | + */ | |
56 | + @Async("asyncPoolTaskExecutor") | |
57 | + public Future<BigDecimal> asyncCalculateInventory(String startTime, String endTime, Integer type) { | |
58 | + LambdaQueryWrapper<InventoryTransaction> inventoryTransactionLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
59 | + inventoryTransactionLambdaQueryWrapper.select(InventoryTransaction::getCreateTime, InventoryTransaction::getQty, InventoryTransaction::getType) | |
60 | + .ge(InventoryTransaction::getCreateTime, startTime).lt(InventoryTransaction::getCreateTime, endTime).eq(InventoryTransaction::getType, type); | |
61 | + List<InventoryTransaction> inventoryTransactions = inventoryTransactionService.list(inventoryTransactionLambdaQueryWrapper); | |
62 | + BigDecimal shipmentResult = inventoryTransactions.stream().map(InventoryTransaction::getQty).reduce(BigDecimal.ZERO, BigDecimal::add); | |
63 | + return new AsyncResult<>(shipmentResult); | |
64 | + } | |
65 | +} | |
... | ... |