Commit e6fcd213ad3b1878434fb57beaf53194267562b7

Authored by 肖超群
2 parents 7525b72b cee29210

Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4 into develop

Showing 42 changed files with 387 additions and 280 deletions
ant-design-vue-jeecg/.env.test
1 1 NODE_ENV=production
2   -VUE_APP_ENV=test
  2 +VUE_APP_ENV=production
3 3 outputDir=dist
4 4 VUE_APP_API_BASE_URL=http://172.16.29.77:8081/wms
5 5 VUE_APP_CAS_BASE_URL=http://localhost:8443/cas
... ...
ant-design-vue-jeecg/src/assets/huaheng.png

19.2 KB | W: 250px | H: 50px

14.8 KB | W: 220px | H: 28px

  • 2-up
  • Swipe
  • Onion skin
ant-design-vue-jeecg/src/components/jeecg/JEditableTable.vue
... ... @@ -3110,7 +3110,7 @@ export default {
3110 3110 margin-bottom: 8px;
3111 3111  
3112 3112 .gap {
3113   - padding-left: 8px;
  3113 + padding-left: 0px;
3114 3114 }
3115 3115  
3116 3116 }
... ...
ant-design-vue-jeecg/src/components/layouts/UserLayout.vue
... ... @@ -59,9 +59,9 @@ export default {
59 59 .container {
60 60 width: 100%;
61 61 min-height: 100%;
62   - background: #f0f2f5 url(~@/assets/background.svg) no-repeat 50%;
  62 + background-color: 255, 255, 255;
63 63 background-size: 100%;
64   - padding: 110px 0 144px;
  64 + // padding: 110px 0 144px;
65 65 position: relative;
66 66  
67 67 a {
... ... @@ -72,8 +72,9 @@ export default {
72 72 text-align: center;
73 73  
74 74 .header {
75   - height: 44px;
76   - line-height: 44px;
  75 + height: 59px;
  76 + line-height: 59px;
  77 + background-color: #111;
77 78  
78 79 .badge {
79 80 position: absolute;
... ... @@ -86,7 +87,9 @@ export default {
86 87 }
87 88  
88 89 .logo {
89   - height: 44px;
  90 + height: 59px;
  91 + line-height: 59px;
  92 + padding: 19px;
90 93 vertical-align: top;
91 94 border-style: none;
92 95 }
... ... @@ -102,10 +105,11 @@ export default {
102 105 }
103 106  
104 107 .desc {
105   - font-size: 14px;
106   - color: rgba(0, 0, 0, 0.45);
107   - margin-top: 12px;
108   - margin-bottom: 40px;
  108 + font-size: 24px;
  109 + color: #111;
  110 + margin-top: 170px;
  111 + margin-bottom: 70px;
  112 + font-weight: bolder;
109 113 }
110 114 }
111 115  
... ...
ant-design-vue-jeecg/src/components/page/GlobalHeader.vue
... ... @@ -150,9 +150,9 @@ export default {
150 150 this.topMenuStyle.headerIndexRight = {}
151 151 this.topMenuStyle.headerIndexLeft = {}
152 152 } else {
153   - let rightWidth = '400px'
154   - this.topMenuStyle.topNavHeader = {'min-width': '165px'}
155   - this.topMenuStyle.topSmenuStyle = {'width': 'calc(100% - 165px)'}
  153 + let rightWidth = '356px'
  154 + this.topMenuStyle.topNavHeader = {'min-width': '208px'}
  155 + this.topMenuStyle.topSmenuStyle = {'width': 'calc(100% - 208px)'}
156 156 this.topMenuStyle.headerIndexRight = {'min-width': rightWidth, 'white-space': 'nowrap'}
157 157 this.topMenuStyle.headerIndexLeft = {'width': `calc(100% - ${rightWidth})`}
158 158 }
... ... @@ -180,7 +180,7 @@ export default {
180 180 .top-nav-header-index {
181 181  
182 182 .header-index-wide {
183   - margin-left: 10px;
  183 + margin-left: 0px;
184 184  
185 185 .ant-menu.ant-menu-horizontal {
186 186 height: @height;
... ... @@ -201,7 +201,7 @@ export default {
201 201 z-index: 2;
202 202 color: white;
203 203 height: @height;
204   - background-color: @primary-color;
  204 + background-color: #111;
205 205 transition: background 300ms;
206 206  
207 207 /* dark 样式 */
... ...
ant-design-vue-jeecg/src/components/page/GlobalLayout.vue
... ... @@ -9,7 +9,7 @@
9 9 @close="() => this.collapsed = false"
10 10 :closable="false"
11 11 :visible="collapsed"
12   - width="200px"
  12 + width="208px"
13 13 >
14 14 <side-menu
15 15 mode="inline"
... ... @@ -41,7 +41,7 @@
41 41 @close="() => this.collapsed = false"
42 42 :closable="false"
43 43 :visible="collapsed"
44   - width="200px"
  44 + width="208px"
45 45 >
46 46 <side-menu
47 47 mode="inline"
... ... @@ -56,7 +56,7 @@
56 56  
57 57 <a-layout
58 58 :class="[layoutMode, `content-width-${contentWidth}`]"
59   - :style="{ paddingLeft: fixSiderbar && isDesktop() ? `${sidebarOpened ? 200 : 80}px` : '0' }">
  59 + :style="{ paddingLeft: fixSiderbar && isDesktop() ? `${sidebarOpened ? 208 : 80}px` : '0' }">
60 60 <!-- layout header -->
61 61 <global-header
62 62 :mode="layoutMode"
... ... @@ -259,12 +259,12 @@ body {
259 259 }
260 260  
261 261 .trigger {
262   - font-size: 22px;
263   - line-height: 59px;
264   - padding: 0 18px;
265   - cursor: pointer;
  262 + font-size: 25px;
  263 + line-height: 20px;
  264 + padding: 17px 18px 17px 18px;
  265 + margin: 0px 0px 0px 0px;
  266 + vertical-align: top;
266 267 transition: color 300ms, background 300ms;
267   -
268 268 &:hover {
269 269 background: rgba(255, 255, 255, 0.3);
270 270 }
... ... @@ -313,7 +313,7 @@ body {
313 313 transition: width .2s;
314 314  
315 315 &.ant-header-side-opened {
316   - width: calc(100% - 200px)
  316 + width: calc(100% - 208px)
317 317 }
318 318  
319 319 &.ant-header-side-closed {
... ... @@ -354,10 +354,10 @@ body {
354 354 }
355 355  
356 356 .avatar {
357   - margin: 20px 10px 20px 0;
  357 + margin: 18px 0px 17px 0px;
358 358 color: #1890ff;
359 359 background: hsla(0, 0%, 100%, .85);
360   - vertical-align: middle;
  360 + vertical-align: top;
361 361 }
362 362  
363 363 .icon {
... ... @@ -403,8 +403,8 @@ body {
403 403  
404 404 .logo.top-nav-header {
405 405 text-align: center;
406   - width: 58px;
407   - line-height: 58px;
  406 + width: 59px;
  407 + line-height: 59px;
408 408 }
409 409 }
410 410 }
... ... @@ -455,14 +455,14 @@ body {
455 455 .header-index-wide {
456 456 width: 100%;
457 457 margin: auto;
458   - padding: 0 20px 0 0;
  458 + padding: 0 12px 0 0;
459 459 display: flex;
460 460 height: 59px;
461 461  
462 462 .ant-menu.ant-menu-horizontal {
463 463 border: none;
464   - height: 64px;
465   - line-height: 64px;
  464 + height: 59px;
  465 + line-height: 59px;
466 466 }
467 467  
468 468 .header-index-left {
... ... @@ -470,17 +470,19 @@ body {
470 470 display: flex;
471 471  
472 472 .logo.top-nav-header {
473   - width: 160px;
474   - height: 58px;
  473 + width: 208px;
  474 + height: 59px;
  475 + padding: 0 10px;
  476 + text-align: center;
475 477 position: relative;
476   - line-height: 58px;
  478 + line-height: 54px;
477 479 transition: all .3s;
478 480 overflow: hidden;
479 481  
480 482 img {
481 483 display: inline-block;
482 484 vertical-align: middle;
483   - height: 32px;
  485 + height: 20px;
484 486 }
485 487  
486 488 h1 {
... ... @@ -595,11 +597,11 @@ body {
595 597 height: 64px;
596 598 position: relative;
597 599 line-height: 64px;
598   - padding-left: 24px;
599 600 -webkit-transition: all .3s;
600 601 transition: all .3s;
601 602 background: #002140;
602 603 overflow: hidden;
  604 + text-align: center;
603 605  
604 606 img, h1 {
605 607 display: inline-block;
... ... @@ -607,7 +609,8 @@ body {
607 609 }
608 610  
609 611 img {
610   - height: 32px;
  612 + height: 20px;
  613 + vertical-align: middle;
611 614 }
612 615  
613 616 h1 {
... ... @@ -644,7 +647,7 @@ body {
644 647 padding: 4px 0;
645 648  
646 649 .ant-dropdown-menu-item {
647   - width: 160px;
  650 + width: auto;
648 651 }
649 652  
650 653 .ant-dropdown-menu-item > .anticon:first-child,
... ...
ant-design-vue-jeecg/src/components/tools/Logo.vue
... ... @@ -60,7 +60,7 @@ export default {
60 60 }
61 61  
62 62 &.light .logo {
63   - background-color: @primary-color;
  63 + background-color: #111;
64 64 }
65 65 }
66 66 </style>
67 67 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/components/tools/UserMenu.vue
... ... @@ -36,8 +36,8 @@
36 36 <header-notice class="action"/>
37 37 <a-dropdown>
38 38 <span class="action action-full ant-dropdown-link user-dropdown-menu">
39   - <!-- <a-avatar class="avatar" size="small" :src="getAvatar()"/> -->
40   - <span v-if="isDesktop()">欢迎您,{{ nickname() }}</span>
  39 + <a-avatar class="avatar" size="small" :src="getAvatar()"/>
  40 + <span v-if="isDesktop()" style="padding: 0px 0px 0px 10px;">欢迎您,{{ nickname() }}</span>
41 41 </span>
42 42 <a-menu slot="overlay" class="user-dropdown-menu-wrapper">
43 43 <!-- <a-menu-item key="0">
... ... @@ -46,12 +46,12 @@
46 46 <span>个人中心</span>
47 47 </router-link>
48 48 </a-menu-item> -->
49   - <a-menu-item key="1">
  49 + <!-- <a-menu-item key="1">
50 50 <router-link :to="{ name: 'account-settings-base' }">
51 51 <a-icon type="setting"/>
52 52 <span>账户设置</span>
53 53 </router-link>
54   - </a-menu-item>
  54 + </a-menu-item> -->
55 55 <a-menu-item key="3" @click="systemSetting">
56 56 <a-icon type="tool"/>
57 57 <span>系统设置</span>
... ...
ant-design-vue-jeecg/src/defaultSettings.js
... ... @@ -18,7 +18,7 @@ export default {
18 18 navTheme: 'dark', // theme for nav menu
19 19 layout: 'sidemenu', // nav menu position: sidemenu or topmenu
20 20 contentWidth: 'Fixed', // layout of content: Fluid or Fixed, only works when layout is topmenu
21   - fixedHeader: false, // sticky header
  21 + fixedHeader: true, // sticky header
22 22 fixSiderbar: true, // sticky siderbar
23 23 autoHideHeader: false, // auto hide header
24 24 colorWeak: false,
... ...
ant-design-vue-jeecg/src/views/system/RoleUserList.vue
... ... @@ -543,6 +543,6 @@ export default {
543 543 @import '~@assets/less/common.less';
544 544 /** Button按钮间距 */
545 545 .ant-btn {
546   - margin-left: 8px
  546 + margin-left: 0px
547 547 }
548 548 </style>
549 549 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/config/AddressList.vue
... ... @@ -147,7 +147,6 @@ export default {
147 147 align: 'center',
148 148 dataIndex: 'param'
149 149 },
150   -
151 150 {
152 151 title: '库区',
153 152 align: 'center',
... ...
ant-design-vue-jeecg/src/views/system/config/LocationTypeList.vue
... ... @@ -5,6 +5,14 @@
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-form-model-item prop="zoneOptions">
  10 + <j-multi-select-tag v-model="queryParam.zoneCode" :options="zoneOptions" placeholder="请选择">
  11 + </j-multi-select-tag>
  12 + </a-form-model-item>
  13 + </a-form-item>
  14 + </a-col>
  15 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
8 16 <a-form-item label="编码">
9 17 <a-input placeholder="请输入编码" v-model="queryParam.code"></a-input>
10 18 </a-form-item>
... ... @@ -78,6 +86,12 @@
78 86 class="j-table-force-nowrap"
79 87 @change="handleTableChange"
80 88 >
  89 + <span slot="zoneCode" slot-scope="zoneCode">
  90 + <a-tag :key="zoneCode" color="blue">
  91 + {{ solutionZoneCode(zoneCode) }}
  92 + </a-tag>
  93 + </span>
  94 +
81 95 <template slot="htmlSlot" slot-scope="text">
82 96 <div v-html="text"></div>
83 97 </template>
... ... @@ -126,6 +140,7 @@ import &#39;@/assets/less/TableExpand.less&#39;
126 140 import { mixinDevice } from '@/utils/mixin'
127 141 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
128 142 import LocationTypeModal from './modules/LocationTypeModal'
  143 +import { getZoneList } from '@/api/api'
129 144  
130 145 export default {
131 146 name: 'LocationTypeList',
... ... @@ -135,6 +150,8 @@ export default {
135 150 },
136 151 data() {
137 152 return {
  153 + zoneList: [],
  154 + zoneOptions: [],
138 155 description: '库位类型管理页面',
139 156 // 表头
140 157 columns: [
... ... @@ -161,7 +178,9 @@ export default {
161 178 {
162 179 title: '库区',
163 180 align: 'center',
164   - dataIndex: 'zoneCode'
  181 + dataIndex: 'zoneCode',
  182 + key: 'zoneCode',
  183 + scopedSlots: { customRender: 'zoneCode' }
165 184 },
166 185 {
167 186 title: '长度',
... ... @@ -225,6 +244,19 @@ export default {
225 244 },
226 245 created() {
227 246 this.getSuperFieldList()
  247 + getZoneList().then(res => {
  248 + if (res.success) {
  249 + this.zoneList = res.result
  250 + //延迟半秒执行,避免组件未加载完,数据已经加载完
  251 + setTimeout(() => {
  252 + //slice可以在数组的任何位置进行删除/添加操作
  253 + this.zoneOptions.splice(0, 1)
  254 + for (let i = 0; i < res.result.length; i++) {
  255 + this.zoneOptions.push({ value: res.result[i].code, text: res.result[i].name })
  256 + }
  257 + }, 500)
  258 + }
  259 + })
228 260 },
229 261 computed: {
230 262 importExcelUrl: function() {
... ... @@ -233,6 +265,16 @@ export default {
233 265 },
234 266 methods: {
235 267 initDictConfig() {},
  268 + solutionZoneCode(value) {
  269 + var actions = []
  270 + Object.keys(this.zoneList).some(key => {
  271 + if (this.zoneList[key].code == '' + value) {
  272 + actions.push(this.zoneList[key].name)
  273 + return true
  274 + }
  275 + })
  276 + return actions.join('')
  277 + },
236 278 getSuperFieldList() {
237 279 let fieldList = []
238 280 fieldList.push({ type: 'string', value: 'code', text: '编码', dictCode: '' })
... ...
ant-design-vue-jeecg/src/views/system/config/modules/AddressForm.vue
... ... @@ -14,17 +14,13 @@
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="zoneCode">
18   - <a-select
19   - show-search
20   - placeholder="请选择库区"
21   - option-filter-prop="children"
22   - v-model="model.zoneCode">
  17 + <a-form-item label="库区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zoneCode">
  18 + <a-select show-search placeholder="请选择库区" option-filter-prop="children" v-model="model.zoneCode">
23 19 <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">
24 20 {{ item.name }}
25 21 </a-select-option>
26 22 </a-select>
27   - </a-form-model-item>
  23 + </a-form-item>
28 24 </a-col>
29 25 <a-col :span="24">
30 26 <a-form-model-item label="接口地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url">
... ... @@ -38,10 +34,9 @@
38 34 </template>
39 35  
40 36 <script>
41   -
42   -import {httpAction, getAction} from '@/api/manage'
43   -import {validateDuplicateValue} from '@/utils/util'
44   -import {getZoneList} from '@/api/api'
  37 +import { httpAction, getAction } from '@/api/manage'
  38 +import { validateDuplicateValue } from '@/utils/util'
  39 +import { getZoneList } from '@/api/api'
45 40  
46 41 export default {
47 42 name: 'AddressForm',
... ... @@ -56,79 +51,79 @@ export default {
56 51 },
57 52 data() {
58 53 return {
59   - zoneList: [],
60 54 model: {},
  55 + zoneList: [],
61 56 labelCol: {
62   - xs: {span: 24},
63   - sm: {span: 5},
  57 + xs: { span: 24 },
  58 + sm: { span: 5 }
64 59 },
65 60 wrapperCol: {
66   - xs: {span: 24},
67   - sm: {span: 16},
  61 + xs: { span: 24 },
  62 + sm: { span: 16 }
68 63 },
69 64 confirmLoading: false,
70 65 validatorRules: {},
71 66 url: {
72   - add: "/config/address/add",
73   - edit: "/config/address/edit",
74   - queryById: "/config/address/queryById"
  67 + add: '/config/address/add',
  68 + edit: '/config/address/edit',
  69 + queryById: '/config/address/queryById'
75 70 }
76 71 }
77 72 },
78 73 computed: {
79 74 formDisabled() {
80 75 return this.disabled
81   - },
  76 + }
82 77 },
83 78 created() {
84 79 //备份model原始值
85   - this.modelDefault = JSON.parse(JSON.stringify(this.model));
86   - this.loadFrom();
  80 + this.modelDefault = JSON.parse(JSON.stringify(this.model))
  81 + this.loadFrom()
87 82 },
88 83 methods: {
89   - add() {
90   - this.edit(this.modelDefault);
91   - },
92   - edit(record) {
93   - this.model = Object.assign({}, record);
94   - this.visible = true;
95   - },
96 84 loadFrom() {
97   - getZoneList().then((res) => {
  85 + getZoneList().then(res => {
98 86 if (res.success) {
99 87 this.zoneList = res.result
100 88 }
101   - });
  89 + })
  90 + },
  91 + add() {
  92 + this.edit(this.modelDefault)
  93 + },
  94 + edit(record) {
  95 + this.model = Object.assign({}, record)
  96 + this.visible = true
102 97 },
103 98 submitForm() {
104   - const that = this;
  99 + const that = this
105 100 // 触发表单验证
106 101 this.$refs.form.validate(valid => {
107 102 if (valid) {
108   - that.confirmLoading = true;
109   - let httpurl = '';
110   - let method = '';
  103 + that.confirmLoading = true
  104 + let httpurl = ''
  105 + let method = ''
111 106 if (!this.model.id) {
112   - httpurl += this.url.add;
113   - method = 'post';
  107 + httpurl += this.url.add
  108 + method = 'post'
114 109 } else {
115   - httpurl += this.url.edit;
116   - method = 'put';
  110 + httpurl += this.url.edit
  111 + method = 'put'
117 112 }
118   - httpAction(httpurl, this.model, method).then((res) => {
  113 + httpAction(httpurl, this.model, method).then(res => {
119 114 if (res.success) {
120   - that.$message.success(res.message);
121   - that.$emit('ok');
  115 + that.$message.success(res.message)
  116 + that.$emit('ok')
122 117 } else {
123   - that.$message.warning(res.message);
  118 + that.$message.warning(res.message)
124 119 }
125   - }).finally(() => {
126   - that.confirmLoading = false;
  120 + })
  121 + .finally(() => {
  122 + that.confirmLoading = false
127 123 })
128 124 }
129   -
130 125 })
131   - },
  126 + }
132 127 }
133 128 }
134 129 </script>
135 130 \ No newline at end of file
... ...
ant-design-vue-jeecg/src/views/system/inventory/InventoryDetailList.vue
... ... @@ -115,7 +115,9 @@ export default {
115 115 {
116 116 title: '库存详情ID',
117 117 align: 'center',
118   - dataIndex: 'id'
  118 + dataIndex: 'id',
  119 + fixed: "left",
  120 + width: 100,
119 121 },
120 122 {
121 123 title: '货主',
... ... @@ -229,14 +231,14 @@ export default {
229 231 align: 'center',
230 232 dataIndex: 'updateTime'
231 233 },
232   - {
233   - title: '操作',
234   - dataIndex: 'action',
235   - align: 'center',
236   - fixed: 'right',
237   - width: 147,
238   - scopedSlots: {customRender: 'action'}
239   - }
  234 + // {
  235 + // title: '操作',
  236 + // dataIndex: 'action',
  237 + // align: 'center',
  238 + // fixed: 'right',
  239 + // width: 147,
  240 + // scopedSlots: {customRender: 'action'}
  241 + // }
240 242 ],
241 243 url: {
242 244 list: '/inventory/inventoryHeader/listInventoryDetailByMainId',
... ...
ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue
... ... @@ -175,6 +175,8 @@ export default {
175 175 {
176 176 title: '库存ID',
177 177 align: "center",
  178 + fixed: "left",
  179 + width: 100,
178 180 dataIndex: 'id'
179 181 },
180 182 {
... ... @@ -230,14 +232,14 @@ export default {
230 232 align: "center",
231 233 dataIndex: 'updateTime'
232 234 },
233   - {
234   - title: '操作',
235   - dataIndex: 'action',
236   - align: "center",
237   - fixed: "right",
238   - width: 147,
239   - scopedSlots: {customRender: 'action'},
240   - }
  235 + // {
  236 + // title: '操作',
  237 + // dataIndex: 'action',
  238 + // align: "center",
  239 + // fixed: "right",
  240 + // width: 147,
  241 + // scopedSlots: {customRender: 'action'},
  242 + // }
241 243 ],
242 244 url: {
243 245 list: "/inventory/inventoryHeader/list",
... ...
ant-design-vue-jeecg/src/views/system/inventory/InventoryTransactionList.vue
... ... @@ -15,7 +15,7 @@
15 15 </a-form-model-item>
16 16 </a-form-item>
17 17 </a-col>
18   - <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18 + <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
19 19 <a-form-item label="货主">
20 20 <a-select
21 21 show-search
... ... @@ -28,6 +28,16 @@
28 28 </a-select-option>
29 29 </a-select>
30 30 </a-form-item>
  31 + </a-col> -->
  32 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  33 + <a-form-item label="入库单编码">
  34 + <a-input placeholder="请输入入库单编码" v-model="queryParam.receiptCode"></a-input>
  35 + </a-form-item>
  36 + </a-col>
  37 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  38 + <a-form-item label="出库单编码">
  39 + <a-input placeholder="请输入出库单编码" v-model="queryParam.shipmentCode"></a-input>
  40 + </a-form-item>
31 41 </a-col>
32 42 <a-col :xl="6" :lg="7" :md="8" :sm="24">
33 43 <a-form-item label="库位编码">
... ... @@ -49,18 +59,18 @@
49 59 <j-dict-select-tag placeholder="请选择库存状态" v-model="queryParam.inventoryStatus" dictCode="inventory_status"/>
50 60 </a-form-item>
51 61 </a-col>
52   - <a-col :xl="6" :lg="7" :md="8" :sm="24">
53   - <a-form-item label="物料编码">
54   - <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input>
55   - </a-form-item>
56   - </a-col>
57   - <a-col :xl="6" :lg="7" :md="8" :sm="24">
58   - <a-form-item label="物料名称">
59   - <a-input placeholder="请输入物料名称" v-model="queryParam.materialName"></a-input>
60   - </a-form-item>
61   - </a-col>
62 62 <template v-if="toggleSearchStatus">
63 63 <a-col :xl="6" :lg="7" :md="8" :sm="24">
  64 + <a-form-item label="物料编码">
  65 + <a-input placeholder="请输入物料编码" v-model="queryParam.materialCode"></a-input>
  66 + </a-form-item>
  67 + </a-col>
  68 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  69 + <a-form-item label="物料名称">
  70 + <a-input placeholder="请输入物料名称" v-model="queryParam.materialName"></a-input>
  71 + </a-form-item>
  72 + </a-col>
  73 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
64 74 <a-form-item label="物料规格">
65 75 <a-input placeholder="请输入物料规格" v-model="queryParam.materialSpec"></a-input>
66 76 </a-form-item>
... ... @@ -107,36 +117,14 @@
107 117  
108 118 <!-- 操作按钮区域 -->
109 119 <div class="table-operator">
110   - <a-button @click="handleAdd" v-has="'inventoryTransaction:add'" type="primary" icon="plus">新增</a-button>
111   - <a-button v-has="'inventoryTransaction:export'" type="primary" icon="download"
112   - @click="handleExportXls('库存交易记录')">导出
113   - </a-button>
114   - <a-upload v-has="'inventoryTransaction:import'" name="file" :showUploadList="false" :multiple="false"
115   - :headers="tokenHeader" :action="importExcelUrl"
116   - @change="handleImportExcel">
  120 + <a-button v-has="'inventoryTransaction:export'" type="primary" icon="download" @click="handleExportXls('库存交易记录')">导出</a-button>
  121 + <a-upload v-has="'inventoryTransaction:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
117 122 <a-button type="primary" icon="import">导入</a-button>
118 123 </a-upload>
119   - <a-dropdown v-if="selectedRowKeys.length > 0">
120   - <a-menu slot="overlay" v-has="'inventoryTransaction:deleteBatch'">
121   - <a-menu-item key="1" @click="batchDel">
122   - <a-icon type="delete"/>
123   - 删除
124   - </a-menu-item>
125   - </a-menu>
126   - <a-button style="margin-left: 8px"> 批量操作
127   - <a-icon type="down"/>
128   - </a-button>
129   - </a-dropdown>
130 124 </div>
131 125  
132 126 <!-- table区域-begin -->
133 127 <div>
134   - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
135   - <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
136   - style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项
137   - <a style="margin-left: 24px" @click="onClearSelected">清空</a>
138   - </div>
139   -
140 128 <a-table
141 129 ref="table"
142 130 size="middle"
... ... @@ -147,7 +135,6 @@
147 135 :dataSource="dataSource"
148 136 :pagination="ipagination"
149 137 :loading="loading"
150   - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
151 138 class="j-table-force-nowrap"
152 139 @change="handleTableChange">
153 140  
... ... @@ -168,8 +155,6 @@
168 155 {{ solutionZoneCode(zoneCode) }}
169 156 </a-tag>
170 157 </span>
171   - </a-table>
172   -
173 158 <template slot="htmlSlot" slot-scope="text">
174 159 <div v-html="text"></div>
175 160 </template>
... ... @@ -190,7 +175,6 @@
190 175 下载
191 176 </a-button>
192 177 </template>
193   -
194 178 <span slot="action" slot-scope="text, record">
195 179 <a v-has="'inventoryTransaction:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a>
196 180 <a-dropdown>
... ... @@ -207,7 +191,6 @@
207 191 </a-menu>
208 192 </a-dropdown>
209 193 </span>
210   -
211 194 </a-table>
212 195 </div>
213 196  
... ... @@ -241,7 +224,9 @@ export default {
241 224 {
242 225 title: '库存交易ID',
243 226 align: "center",
244   - dataIndex: 'id'
  227 + dataIndex: 'id',
  228 + fixed: 'left',
  229 + width: 100,
245 230 },
246 231 {
247 232 title: '库区',
... ... @@ -258,6 +243,16 @@ export default {
258 243 // scopedSlots: {customRender: 'companyCode'}
259 244 // },
260 245 {
  246 + title: '入库单编码',
  247 + align: "center",
  248 + dataIndex: 'receiptCode'
  249 + },
  250 + {
  251 + title: '出库单编码',
  252 + align: "center",
  253 + dataIndex: 'shipmentCode'
  254 + },
  255 + {
261 256 title: '容器编码',
262 257 align: "center",
263 258 dataIndex: 'containerCode'
... ... @@ -319,16 +314,6 @@ export default {
319 314 dataIndex: 'batch'
320 315 },
321 316 {
322   - title: '入库单编码',
323   - align: "center",
324   - dataIndex: 'receiptCode'
325   - },
326   - {
327   - title: '出库单编码',
328   - align: "center",
329   - dataIndex: 'shipmentCode'
330   - },
331   - {
332 317 title: '创建人',
333 318 align: "center",
334 319 dataIndex: 'createBy'
... ... @@ -348,14 +333,14 @@ export default {
348 333 align: "center",
349 334 dataIndex: 'updateTime'
350 335 },
351   - {
352   - title: '操作',
353   - dataIndex: 'action',
354   - align: "center",
355   - fixed: "right",
356   - width: 147,
357   - scopedSlots: {customRender: 'action'}
358   - }
  336 + // {
  337 + // title: '操作',
  338 + // dataIndex: 'action',
  339 + // align: "center",
  340 + // fixed: "right",
  341 + // width: 147,
  342 + // scopedSlots: {customRender: 'action'}
  343 + // }
359 344 ],
360 345 url: {
361 346 list: "/inventory/inventoryTransaction/list",
... ...
ant-design-vue-jeecg/src/views/system/inventory/SimpleInventoryDetailList.vue
... ... @@ -161,7 +161,6 @@
161 161 :dataSource="dataSource"
162 162 :pagination="ipagination"
163 163 :loading="loading"
164   - :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
165 164 class="j-table-force-nowrap"
166 165 @change="handleTableChange"
167 166 >
... ... @@ -198,9 +197,7 @@
198 197 </template>
199 198 <template slot="fileSlot" slot-scope="text">
200 199 <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
201   - <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
202   - 下载
203   - </a-button>
  200 + <a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">下载</a-button>
204 201 </template>
205 202 <span slot="action" slot-scope="text, record">
206 203 <a v-has="'inventoryDetail:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical"/></a>
... ... @@ -238,14 +235,11 @@ export default {
238 235 // 表头
239 236 columns: [
240 237 {
241   - title: '#',
242   - dataIndex: '',
243   - key: 'rowIndex',
244   - width: 60,
  238 + title: '库存详情ID',
245 239 align: 'center',
246   - customRender: function (t, r, index) {
247   - return parseInt(index) + 1
248   - }
  240 + dataIndex: 'id',
  241 + fixed: "left",
  242 + width: 100,
249 243 },
250 244 {
251 245 title: '货主',
... ... @@ -355,14 +349,14 @@ export default {
355 349 align: 'center',
356 350 dataIndex: 'updateTime'
357 351 },
358   - {
359   - title: '操作',
360   - dataIndex: 'action',
361   - align: 'center',
362   - fixed: 'right',
363   - width: 147,
364   - scopedSlots: {customRender: 'action'}
365   - }
  352 + // {
  353 + // title: '操作',
  354 + // dataIndex: 'action',
  355 + // align: 'center',
  356 + // fixed: 'right',
  357 + // width: 147,
  358 + // scopedSlots: {customRender: 'action'}
  359 + // }
366 360 ],
367 361 url: {
368 362 list: '/inventory/inventoryDetail/list',
... ...
ant-design-vue-jeecg/src/views/system/inventory/subTables/InventoryDetailSubTable.vue
... ... @@ -94,6 +94,7 @@ export default {
94 94 align: 'center',
95 95 dataIndex: 'id',
96 96 fixed: 'left',
  97 + width: 100,
97 98 },
98 99 {
99 100 title: '货主',
... ...
ant-design-vue-jeecg/src/views/system/monitor/ApiLogList.vue
... ... @@ -103,24 +103,24 @@
103 103 <template :slot="expandedRowRender" slot-scope="record">
104 104 <div style="margin: 0">
105 105 <div>
106   - <a-badge status="default" style="vertical-align: revert;" />
  106 + <a-badge status="default" style="vertical-align: text-bottom;" />
107 107 <a-button @click="copyToClipboard(record.requestHeader)" type="link" icon="copy" style="vertical-align: revert;"></a-button>
108   - <span style="vertical-align: left;word-break:break-all;white-space:pre-wrap;overflow:hidden;color:#b3b3b3;">请求头:{{ record.requestHeader }}</span>
  108 + <span style="vertical-align: text-bottom; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#b3b3b3;">请求头:{{ record.requestHeader }}</span>
109 109 </div>
110 110 <div>
111   - <a-badge status="success" style="vertical-align: middle;" />
112   - <a-button @click="copyToClipboard(record.requestBody)" type="link" icon="copy" style="vertical-align: middle;"></a-button>
113   - <span style="vertical-align: middle; word-break: break-all; white-space: pre-wrap; overflow: hidden; color: saddlebrown;">请求内容:{{ record.requestBody }}</span>
  111 + <a-badge status="success" style="vertical-align: text-bottom;" />
  112 + <a-button @click="copyToClipboard(record.requestBody)" type="link" icon="copy" style="vertical-align: revert;"></a-button>
  113 + <span style="vertical-align: text-bottom; word-break:break-all; white-space:pre-wrap; overflow:hidden; color: saddlebrown;">请求内容:{{ record.requestBody }}</span>
114 114 </div>
115 115 <div>
116   - <a-badge status="processing" style="vertical-align: revert;" />
  116 + <a-badge status="processing" style="vertical-align: text-bottom;" />
117 117 <a-button @click="copyToClipboard(record.responseBody)" type="link" icon="copy" style="vertical-align: revert;"></a-button>
118   - <span style="vertical-align: text-bottom;word-break:break-all;white-space:pre-wrap;overflow:hidden;color:#0066CC;">响应内容:{{ record.responseBody }}</span>
  118 + <span style="vertical-align: text-bottom; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:#0066CC;">响应内容:{{ record.responseBody }}</span>
119 119 </div>
120 120 <div v-if="record.exception" >
121   - <a-badge status="error" style="vertical-align: revert;" />
  121 + <a-badge status="error" style="vertical-align: text-bottom;" />
122 122 <a-button @click="copyToClipboard(record.exception)" type="link" icon="copy" style="vertical-align: revert;"></a-button>
123   - <span style="vertical-align: text-bottom;word-break:break-all;white-space:pre-wrap;overflow:hidden;color:red">异常堆栈信息:{{ record.exception }}</span>
  123 + <span style="vertical-align: text-bottom; word-break:break-all; white-space:pre-wrap; overflow:hidden; color:red">异常堆栈信息:{{ record.exception }}</span>
124 124 </div>
125 125 </div>
126 126 </template>
... ...
ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
... ... @@ -117,8 +117,8 @@
117 117 </a-button>
118 118 </template>
119 119 <span slot="action" slot-scope="text, record">
120   - <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button> <a-divider type="vertical"/></a>
121   - <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button> <a-divider type="vertical"/></a>
  120 + <a v-if="record.status == 0 && record.taskType == 200" @click="selectFillPort(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>
  121 + <a v-else-if="record.status == 0" @click="selectContainerStatus(record)" v-has="'receiptContainerHeader:createTask'"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>
122 122 <!-- <a v-if="record.status == 0 && record.taskType == 200" @click="selectPort(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a>-->
123 123 <!-- <a v-else-if="record.status == 0" @click="createTask(record)" v-has="'receiptContainerHeader:createTask'">生成任务<a-divider type="vertical"/></a>-->
124 124 <a-popconfirm v-if="record.status == 0" v-has="'receiptContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)">
... ...
ant-design-vue-jeecg/src/views/system/shipment/ShipmentContainerHeaderList.vue
... ... @@ -126,11 +126,11 @@
126 126 </template>
127 127  
128 128 <span slot="action" slot-scope="text, record">
129   - <a v-if="record.status == 0" @click="selectPort(record)"><a-button type="primary">生成任务</a-button> </a>
  129 + <a v-if="record.status == 0" @click="selectPort(record)"><a-button type="primary">生成任务</a-button><a-divider type="vertical"/></a>
130 130 <a-popconfirm v-if="record.status == 0" v-has="'shipmentContainerHeader:delete'" title="确定取消配盘吗?" @confirm="() => handleDelete(record.id)">
131   - <a><a-divider type="vertical"/><a-button type="danger">取消配盘</a-button> </a>
  131 + <a><a-button type="danger">取消配盘</a-button><a-divider type="vertical"/></a>
132 132 </a-popconfirm>
133   - <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)"><a-divider type="vertical"/><a-button type="default">编辑</a-button></a>
  133 + <a v-has="'receiptContainerHeader:edit'" @click="handleEdit(record)"><a-button type="default">编辑</a-button></a>
134 134 </span>
135 135 </a-table>
136 136 </div>
... ...
ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailList.vue
... ... @@ -78,7 +78,6 @@
78 78 <span slot="action" slot-scope="text, record">
79 79 <a @click="combine(record)"><a-button type="primary">配盘</a-button></a>
80 80 <a-divider type="vertical"/>
81   -
82 81 <a-dropdown>
83 82 <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
84 83 <a-menu slot="overlay">
... ...
ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
... ... @@ -46,7 +46,7 @@
46 46 </a-form-item>
47 47 </a-col>
48 48 <template v-if="toggleSearchStatus">
49   - <a-col :xl="6" :lg="7" :md="8" :sm="24">
  49 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
50 50 <a-form-item label="起始出入口">
51 51 <a-input placeholder="请输入起始出入口" v-model="queryParam.fromPortCode"></a-input>
52 52 </a-form-item>
... ...
ant-design-vue-jeecg/src/views/system/task/TaskDetailList.vue
... ... @@ -78,8 +78,7 @@
78 78 <adjustment-doc-modal ref="adjustmentModal" @ok="modalFormOk" :id="record.id" :taskHeaderId="record.taskHeaderId"/>
79 79 <a v-if="record.taskType==700" @click="createMany(record)">实盘登记</a>
80 80 <a-divider type="vertical" v-if="record.taskType==700" />
81   - <a v-has="'taskDetail:edit'" @click="handleEdit(record)">编辑</a>
82   - <a-divider type="vertical"/>
  81 + <a v-has="'taskDetail:edit'" @click="handleEdit(record)">编辑<a-divider type="vertical" /></a>
83 82 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
84 83 <a v-has="'taskDetail:delete'">删除</a>
85 84 </a-popconfirm>
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/cas/controller/CasClientController.java
... ... @@ -5,15 +5,9 @@ import java.util.List;
5 5 import javax.servlet.http.HttpServletRequest;
6 6 import javax.servlet.http.HttpServletResponse;
7 7  
8   -import cn.hutool.crypto.SecureUtil;
9   -import cn.monitor4all.logRecord.annotation.OperationLog;
10   -
11 8 import org.apache.commons.lang.StringUtils;
12 9 import org.jeecg.common.api.vo.Result;
13   -import org.jeecg.common.constant.CacheConstant;
14 10 import org.jeecg.common.constant.CommonConstant;
15   -import org.jeecg.utils.HuahengJwtUtil;
16   -import org.jeecg.common.system.vo.LoginUser;
17 11 import org.jeecg.common.util.RedisUtil;
18 12 import org.jeecg.modules.cas.util.CASServiceUtil;
19 13 import org.jeecg.modules.cas.util.XmlUtils;
... ... @@ -21,7 +15,7 @@ import org.jeecg.modules.system.entity.SysDepart;
21 15 import org.jeecg.modules.system.entity.SysUser;
22 16 import org.jeecg.modules.system.service.ISysDepartService;
23 17 import org.jeecg.modules.system.service.ISysUserService;
24   -import org.springframework.beans.BeanUtils;
  18 +import org.jeecg.utils.HuahengJwtUtil;
25 19 import org.springframework.beans.factory.annotation.Autowired;
26 20 import org.springframework.beans.factory.annotation.Value;
27 21 import org.springframework.http.HttpEntity;
... ... @@ -45,11 +39,21 @@ import lombok.extern.slf4j.Slf4j;
45 39 @RestController
46 40 @RequestMapping("/sys/cas/client")
47 41 public class CasClientController {
  42 +
  43 + /** Token失效时间 */
  44 + private Long TOKEN_EXPIRE_TIME;
  45 +
  46 + @Value("${system.token.expireTime}")
  47 + public void setExpireTime(String expireTime) {
  48 + TOKEN_EXPIRE_TIME = Long.parseLong(expireTime);
  49 + }
48 50  
49 51 @Autowired
50 52 private ISysUserService sysUserService;
  53 +
51 54 @Autowired
52 55 private ISysDepartService sysDepartService;
  56 +
53 57 @Autowired
54 58 private RedisUtil redisUtil;
55 59  
... ... @@ -83,7 +87,7 @@ public class CasClientController {
83 87 String token = HuahengJwtUtil.sign(sysUser.getUsername(), sysUser.getPassword());
84 88 // 设置超时时间
85 89 redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
86   - redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, HuahengJwtUtil.EXPIRE_TIME / 1000);
  90 + redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, TOKEN_EXPIRE_TIME / 1000);
87 91  
88 92 // 获取用户部门信息
89 93 JSONObject obj = new JSONObject();
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/LoginController.java
... ... @@ -50,6 +50,7 @@ import org.jeecg.utils.config.ApplicationConfig;
50 50 import org.jeecg.utils.support.SystemRSA256Key;
51 51 import org.springframework.beans.BeanUtils;
52 52 import org.springframework.beans.factory.annotation.Autowired;
  53 +import org.springframework.beans.factory.annotation.Value;
53 54 import org.springframework.context.annotation.Bean;
54 55 import org.springframework.core.io.DefaultResourceLoader;
55 56 import org.springframework.core.io.ResourceLoader;
... ... @@ -89,6 +90,15 @@ import lombok.extern.slf4j.Slf4j;
89 90 @Api(tags = "用户登录")
90 91 @Slf4j
91 92 public class LoginController {
  93 +
  94 + /** Token失效时间 */
  95 + private Long TOKEN_EXPIRE_TIME;
  96 +
  97 + @Value("${system.token.expireTime}")
  98 + public void setExpireTime(String expireTime) {
  99 + TOKEN_EXPIRE_TIME = Long.parseLong(expireTime);
  100 + }
  101 +
92 102 @Autowired
93 103 private ISysUserService sysUserService;
94 104  
... ... @@ -115,7 +125,7 @@ public class LoginController {
115 125  
116 126 @Autowired
117 127 private HuahengRedisUtil huahengRedisUtil;
118   -
  128 +
119 129 @Autowired
120 130 private ApplicationConfig applicationConfig;
121 131  
... ... @@ -226,7 +236,7 @@ public class LoginController {
226 236 private Result<JSONObject> checkSystemActivationCode() throws IOException {
227 237 Result<JSONObject> result = new Result<JSONObject>();
228 238 // 是否需要校验激活码
229   - if(applicationConfig.getCheckSystemActivationCode() != null && !applicationConfig.getCheckSystemActivationCode()) {
  239 + if (applicationConfig.getCheckSystemActivationCode() != null && !applicationConfig.getCheckSystemActivationCode()) {
230 240 return result;
231 241 }
232 242 FileInputStream inputStream = null;
... ... @@ -312,7 +322,7 @@ public class LoginController {
312 322 }
313 323 return result;
314 324 }
315   -
  325 +
316 326 /**
317 327 * 退出登录
318 328 * @param request
... ... @@ -615,7 +625,7 @@ public class LoginController {
615 625 String token = HuahengJwtUtil.sign(username, syspassword, warehouseCode, roles);
616 626 // 设置token缓存有效时间
617 627 redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
618   - redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, HuahengJwtUtil.EXPIRE_TIME / 1000);
  628 + redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, TOKEN_EXPIRE_TIME / 1000);
619 629 obj.put("token", token);
620 630 obj.put("userInfo", sysUser);
621 631 obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
... ... @@ -721,7 +731,7 @@ public class LoginController {
721 731 String token = JwtUtil.sign(username, syspassword);
722 732 // 设置超时时间
723 733 redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
724   - redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, HuahengJwtUtil.EXPIRE_TIME / 1000);
  734 + redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, TOKEN_EXPIRE_TIME / 1000);
725 735  
726 736 // token 信息
727 737 obj.put("token", token);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/ThirdLoginController.java
1 1 package org.jeecg.modules.system.controller;
2 2  
3   -import com.alibaba.fastjson.JSONObject;
4   -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
5   -import com.xkcoding.justauth.AuthRequestFactory;
6   -import io.swagger.annotations.ApiOperation;
7   -import lombok.extern.slf4j.Slf4j;
8   -import me.zhyd.oauth.model.AuthCallback;
9   -import me.zhyd.oauth.model.AuthResponse;
10   -import me.zhyd.oauth.request.AuthRequest;
11   -import me.zhyd.oauth.utils.AuthStateUtils;
  3 +import java.io.IOException;
  4 +import java.io.UnsupportedEncodingException;
  5 +import java.net.URLEncoder;
  6 +import java.util.List;
  7 +
  8 +import javax.servlet.http.HttpServletResponse;
  9 +
12 10 import org.jeecg.common.api.vo.Result;
13 11 import org.jeecg.common.constant.CommonConstant;
14   -import org.jeecg.utils.HuahengJwtUtil;
15 12 import org.jeecg.common.util.PasswordUtil;
16 13 import org.jeecg.common.util.RedisUtil;
17 14 import org.jeecg.common.util.RestUtil;
... ... @@ -26,16 +23,30 @@ import org.jeecg.modules.system.service.ISysThirdAccountService;
26 23 import org.jeecg.modules.system.service.ISysUserService;
27 24 import org.jeecg.modules.system.service.impl.ThirdAppDingtalkServiceImpl;
28 25 import org.jeecg.modules.system.service.impl.ThirdAppWechatEnterpriseServiceImpl;
  26 +import org.jeecg.utils.HuahengJwtUtil;
29 27 import org.springframework.beans.factory.annotation.Autowired;
  28 +import org.springframework.beans.factory.annotation.Value;
30 29 import org.springframework.stereotype.Controller;
31 30 import org.springframework.ui.ModelMap;
32   -import org.springframework.web.bind.annotation.*;
  31 +import org.springframework.web.bind.annotation.GetMapping;
  32 +import org.springframework.web.bind.annotation.PathVariable;
  33 +import org.springframework.web.bind.annotation.PostMapping;
  34 +import org.springframework.web.bind.annotation.RequestBody;
  35 +import org.springframework.web.bind.annotation.RequestMapping;
  36 +import org.springframework.web.bind.annotation.RequestMethod;
  37 +import org.springframework.web.bind.annotation.RequestParam;
  38 +import org.springframework.web.bind.annotation.ResponseBody;
33 39  
34   -import javax.servlet.http.HttpServletResponse;
35   -import java.io.IOException;
36   -import java.io.UnsupportedEncodingException;
37   -import java.net.URLEncoder;
38   -import java.util.List;
  40 +import com.alibaba.fastjson.JSONObject;
  41 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  42 +import com.xkcoding.justauth.AuthRequestFactory;
  43 +
  44 +import io.swagger.annotations.ApiOperation;
  45 +import lombok.extern.slf4j.Slf4j;
  46 +import me.zhyd.oauth.model.AuthCallback;
  47 +import me.zhyd.oauth.model.AuthResponse;
  48 +import me.zhyd.oauth.request.AuthRequest;
  49 +import me.zhyd.oauth.utils.AuthStateUtils;
39 50  
40 51 /**
41 52 * @Author scott
... ... @@ -45,22 +56,36 @@ import java.util.List;
45 56 @RequestMapping("/sys/thirdLogin")
46 57 @Slf4j
47 58 public class ThirdLoginController {
  59 +
  60 + /** Token失效时间 */
  61 + private Long TOKEN_EXPIRE_TIME;
  62 +
  63 + @Value("${system.token.expireTime}")
  64 + public void setExpireTime(String expireTime) {
  65 + TOKEN_EXPIRE_TIME = Long.parseLong(expireTime);
  66 + }
  67 +
48 68 @Autowired
49 69 private ISysUserService sysUserService;
  70 +
50 71 @Autowired
51 72 private ISysThirdAccountService sysThirdAccountService;
52 73  
53 74 @Autowired
54 75 private BaseCommonService baseCommonService;
  76 +
55 77 @Autowired
56 78 private RedisUtil redisUtil;
  79 +
57 80 @Autowired
58 81 private AuthRequestFactory factory;
59 82  
60 83 @Autowired
61 84 ThirdAppConfig thirdAppConfig;
  85 +
62 86 @Autowired
63 87 private ThirdAppWechatEnterpriseServiceImpl thirdAppWechatEnterpriseService;
  88 +
64 89 @Autowired
65 90 private ThirdAppDingtalkServiceImpl thirdAppDingtalkService;
66 91  
... ... @@ -198,7 +223,7 @@ public class ThirdLoginController {
198 223 String token = HuahengJwtUtil.sign(user.getUsername(), user.getPassword());
199 224 redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
200 225 // 设置超时时间
201   - redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, HuahengJwtUtil.EXPIRE_TIME / 1000);
  226 + redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, TOKEN_EXPIRE_TIME / 1000);
202 227 return token;
203 228 }
204 229  
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mes/servuce/impl/MesServiceImpl.java
... ... @@ -150,7 +150,11 @@ public class MesServiceImpl implements IMesService {
150 150 if (!success) {
151 151 throw new JeecgBootException("MES下发入库信息,更新入库组盘头失败");
152 152 }
153   - return huahengMultiHandlerService.createReceiptTask(receiptContainerHeader, warehouseCode);
  153 + result = receiptContainerHeaderService.createReceiptTask(receiptContainerHeader, warehouseCode);
  154 + if (!result.isSuccess()) {
  155 + throw new JeecgBootException(result.getMessage());
  156 + }
  157 + return result;
154 158 }
155 159  
156 160 @Override
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wms/service/WmsServiceImpl.java
... ... @@ -162,7 +162,11 @@ public class WmsServiceImpl implements WmsService {
162 162 if (!success) {
163 163 throw new JeecgBootException("WMS下发入库信息,更新入库组盘头失败");
164 164 }
165   - return huahengMultiHandlerService.createReceiptTask(receiptContainerHeader, warehouseCode);
  165 + result = receiptContainerHeaderService.createReceiptTask(receiptContainerHeader, warehouseCode);
  166 + if (!result.isSuccess()) {
  167 + throw new JeecgBootException(result.getMessage());
  168 + }
  169 + return result;
166 170 }
167 171  
168 172 @Override
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/service/IHuahengMultiHandlerService.java
... ... @@ -18,7 +18,7 @@ public interface IHuahengMultiHandlerService {
18 18  
19 19 Result sendTaskToWcs(TaskHeader taskHeader);
20 20  
21   - Result<TaskHeader> createReceiptTask(ReceiptContainerHeader receiptContainerHeader, String warehouseCode);
  21 + Result createReceiptTask(ReceiptContainerHeader receiptContainerHeader, String warehouseCode);
22 22  
23 23 Result combination(CombinationModel combinationModel);
24 24  
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/framework/service/impl/HuahengMultiHandlerServiceImpl.java
... ... @@ -71,13 +71,11 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem
71 71  
72 72 @Override
73 73 @Transactional(rollbackFor = Exception.class)
74   - public Result<TaskHeader> createReceiptTask(ReceiptContainerHeader receiptContainerHeader, String warehouseCode) {
75   - String lockKey = warehouseCode;
76   - Result result = handleMultiProcess("createReceiptTask", lockKey, new MultiProcessListener() {
  74 + public Result createReceiptTask(ReceiptContainerHeader receiptContainerHeader, String warehouseCode) {
  75 + Result result = handleMultiProcess("createReceiptTask", warehouseCode, new MultiProcessListener() {
77 76 @Override
78 77 public Result<?> doProcess() {
79   - Result result = receiptContainerHeaderService.createReceiptTask(receiptContainerHeader, warehouseCode);
80   - return result;
  78 + return receiptContainerHeaderService.createReceiptTask(receiptContainerHeader, warehouseCode);
81 79 }
82 80 });
83 81 return result;
... ... @@ -89,8 +87,7 @@ public class HuahengMultiHandlerServiceImpl extends HuahengBaseController implem
89 87 Result result = handleMultiProcess("combination", new MultiProcessListener() {
90 88 @Override
91 89 public Result<?> doProcess() {
92   - Result result = shipmentCombinationService.combination(combinationModel);
93   - return result;
  90 + return shipmentCombinationService.combination(combinationModel);
94 91 }
95 92 });
96 93 return result;
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
... ... @@ -57,26 +57,37 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
57 57  
58 58 @Autowired
59 59 private ReceiptContainerHeaderMapper receiptContainerHeaderMapper;
  60 +
60 61 @Autowired
61 62 private ReceiptContainerDetailMapper receiptContainerDetailMapper;
  63 +
62 64 @Resource
63 65 private IContainerService containerService;
  66 +
64 67 @Resource
65 68 private IReceiptContainerDetailService receiptContainerDetailService;
  69 +
66 70 @Resource
67 71 private ILocationService locationService;
  72 +
68 73 @Resource
69 74 private IReceiptContainerHeaderService receiptContainerHeaderService;
  75 +
70 76 @Resource
71 77 private ITaskHeaderService taskHeaderService;
  78 +
72 79 @Resource
73 80 private ITaskDetailService taskDetailService;
  81 +
74 82 @Resource
75 83 private IReceiptDetailService receiptDetailService;
  84 +
76 85 @Resource
77 86 private IReceiptHeaderService receiptHeaderService;
  87 +
78 88 @Resource
79 89 private IInventoryHeaderService inventoryHeaderService;
  90 +
80 91 @Resource
81 92 private IParameterConfigurationService parameterConfigurationService;
82 93  
... ... @@ -106,7 +117,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
106 117 }
107 118  
108 119 @Override
109   - @Transactional(rollbackFor = JeecgBootException.class, propagation = Propagation.REQUIRES_NEW)
  120 + @Transactional
110 121 @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'入库任务生成'", extra = "#extraJsonString1", msg = "'任务ID:' + #taskHeader.getId()",
111 122 condition = "#receiptContainerDetailList.size() > 0", recordReturnValue = true)
112 123 @OperationLog(bizId = "''", bizType = "'任务追踪'", tag = "'入库任务生成'", extra = "#extraJsonString2",
... ... @@ -115,7 +126,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
115 126 public Result<TaskHeader> createReceiptTask(ReceiptContainerHeader receiptContainerHeader, String warehouseCode) {
116 127 log.info("开始创建入库任务");
117 128 if (!receiptContainerHeader.getWarehouseCode().equals(warehouseCode)) {
118   - return Result.error("创建入库任务, id:" + receiptContainerHeader.getId() + "的入库组盘不能在" + warehouseCode + "仓库操作");
  129 + throw new JeecgBootException("创建入库任务, id:" + receiptContainerHeader.getId() + "的入库组盘不能在" + warehouseCode + "仓库操作");
119 130 }
120 131 String containerCode = receiptContainerHeader.getContainerCode();
121 132 String fromLocationCode = receiptContainerHeader.getFromLocationCode();
... ... @@ -125,11 +136,11 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
125 136 List<ReceiptContainerDetail> receiptContainerDetailList =
126 137 receiptContainerDetailService.getReceiptContainerDetailListByHeaderId(receiptContainerHeader.getId());
127 138 if (receiptContainerDetailList.size() == 0) {
128   - return Result.error("创建入库任务, id:" + receiptContainerHeader.getId() + "的入库组盘,没有组盘明细,请先组盘!");
  139 + throw new JeecgBootException("创建入库任务, id:" + receiptContainerHeader.getId() + "的入库组盘,没有组盘明细,请先组盘!");
129 140 }
130 141 int receiptContainerStatus = receiptContainerHeader.getStatus();
131 142 if (receiptContainerStatus != QuantityConstant.RECEIPT_CONTAINER_BUILD) {
132   - return Result.error("创建入库任务, 入库组盘状态不是创建状态");
  143 + throw new JeecgBootException("创建入库任务, 入库组盘状态不是创建状态");
133 144 }
134 145 String containerFillStatus = QuantityConstant.STATUS_CONTAINER_FILL_SOME;
135 146 if (!StringUtils.isEmpty(receiptContainerHeader.getContainerFillStatus())) {
... ... @@ -411,30 +422,36 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
411 422 }
412 423  
413 424 @Override
  425 + @Transactional
414 426 public Result cancelReceiving(List<Integer> ids) {
415 427 Result result = null;
416 428 for (Integer id : ids) {
417   - result = cancelReceiving(id);
  429 + result = receiptContainerHeaderService.cancelReceiving(id);
  430 + if (!result.isSuccess()) {
  431 + throw new JeecgBootException(result.getMessage());
  432 + }
418 433 }
419 434 return result;
420 435 }
421 436  
422 437 @Override
  438 + @Transactional
423 439 public boolean updateToPortById(String toPort, int id) {
424 440 ReceiptContainerHeader receiptContainerHeader = new ReceiptContainerHeader();
425 441 receiptContainerHeader.setToPort(toPort);
426 442 receiptContainerHeader.setId(id);
427   - boolean success = updateById(receiptContainerHeader);
  443 + boolean success = receiptContainerHeaderService.updateById(receiptContainerHeader);
428 444 return success;
429 445 }
430 446  
431 447 @Override
  448 + @Transactional
432 449 public boolean updateToPortAndStatus(String toPort, int status, int id) {
433 450 ReceiptContainerHeader receiptContainerHeader = new ReceiptContainerHeader();
434 451 receiptContainerHeader.setToPort(toPort);
435 452 receiptContainerHeader.setStatus(status);
436 453 receiptContainerHeader.setId(id);
437   - boolean success = updateById(receiptContainerHeader);
  454 + boolean success = receiptContainerHeaderService.updateById(receiptContainerHeader);
438 455 return success;
439 456 }
440 457  
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
... ... @@ -181,15 +181,18 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl&lt;ReceiptHeaderMapper, R
181 181 }
182 182 }
183 183 }
184   - receiptHeader = new ReceiptHeader();
185   - receiptHeader.setId(id);
186   - receiptHeader.setFirstStatus(maxStatus);
187   - receiptHeader.setLastStatus(minStatus);
188   - if (!receiptHeaderService.updateById(receiptHeader)) {
  184 + ReceiptHeader updateReceiptHeader = new ReceiptHeader();
  185 + updateReceiptHeader.setId(id);
  186 + updateReceiptHeader.setCode(receiptHeader.getCode());
  187 + updateReceiptHeader.setReferCode(receiptHeader.getReferCode());
  188 + updateReceiptHeader.setWarehouseCode(receiptHeader.getWarehouseCode());
  189 + updateReceiptHeader.setFirstStatus(maxStatus);
  190 + updateReceiptHeader.setLastStatus(minStatus);
  191 + if (!receiptHeaderService.updateById(updateReceiptHeader)) {
189 192 throw new JeecgBootException("更新入库单:" + id + " 状态失败");
190 193 }
191 194 LogRecordContext.putVariable("minStatus", minStatus);
192   - LogRecordContext.putVariable("receiptHeader", receiptHeader);
  195 + LogRecordContext.putVariable("receiptHeader", updateReceiptHeader);
193 196 return true;
194 197 }
195 198  
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/controller/ReceiveController.java
... ... @@ -100,7 +100,7 @@ public class ReceiveController extends HuahengBaseController {
100 100 @ApiOperation(value = "入库单-生成任务", notes = "入库单-生成任务")
101 101 @PostMapping("/receivingAndCreateTask")
102 102 @ResponseBody
103   - public Result<TaskHeader> receivingAndCreateTask(@RequestBody List<Receive> receiveList, HttpServletRequest req) {
  103 + public Result receivingAndCreateTask(@RequestBody List<Receive> receiveList, HttpServletRequest req) {
104 104 String warehouseCode = HuahengJwtUtil.getWarehouseCodeByToken(req);
105 105 String lockKey = warehouseCode;
106 106 Result result = handleMultiProcess("receivingAndCreateTask", lockKey, new MultiProcessListener() {
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/IReceiveService.java
... ... @@ -2,6 +2,7 @@ package org.jeecg.modules.wms.receipt.receiving.service;
2 2  
3 3 import com.baomidou.mybatisplus.extension.service.IService;
4 4 import org.jeecg.common.api.vo.Result;
  5 +import org.jeecg.modules.wms.receipt.receiptContainerHeader.entity.ReceiptContainerHeader;
5 6 import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader;
6 7 import org.jeecg.modules.wms.receipt.receiving.domain.Receive;
7 8 import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader;
... ... @@ -14,7 +15,7 @@ import java.util.List;
14 15 */
15 16 public interface IReceiveService extends IService<Receive> {
16 17  
17   - Result receiving(List<Receive> receiveList, String warehouseCode);
  18 + Result<ReceiptContainerHeader> receiving(List<Receive> receiveList, String warehouseCode);
18 19  
19 20 Result<TaskHeader> receivingAndCreateTask(List<Receive> receiveList, String warehouseCode);
20 21 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
... ... @@ -222,7 +222,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
222 222 combinationModel.setShipQty(inventoryQty);
223 223 shipmentQty = shipmentQty.subtract(inventoryQty);
224 224 }
225   - Result result = huahengMultiHandlerService.combination(combinationModel);
  225 + Result result = shipmentCombinationService.combination(combinationModel);
226 226 if (!result.isSuccess()) {
227 227 throw new JeecgBootException(result.getMessage());
228 228 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
... ... @@ -867,7 +867,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
867 867 }
868 868  
869 869 @Override
870   - @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
  870 + @Transactional
871 871 public Result sendTaskToWcs(Integer taskId) {
872 872 TaskHeader taskHeader = taskHeaderService.getById(taskId);
873 873 if (taskHeader == null) {
... ... @@ -1670,7 +1670,6 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1670 1670 @Transactional(rollbackFor = Exception.class)
1671 1671 public Result completeTaskUnLockContainerAndLocation(String containerFillStatus, int taskType, String containerCode, String fromLocationCode,
1672 1672 String toLocationCode, String warehouseCode) {
1673   - Result result = null;
1674 1673 boolean success = false;
1675 1674 if (StringUtils.isEmpty(containerCode)) {
1676 1675 return Result.error("任务类型" + taskType + "完成任务时, 容器编码为空");
... ...
huaheng-wms-core/src/main/java/org/jeecg/utils/HuahengJwtUtil.java
... ... @@ -17,6 +17,7 @@ import org.jeecg.utils.support.ApiAuthentication;
17 17 import org.jeecg.utils.support.RSA256Key;
18 18 import org.jeecg.utils.support.SystemAuthentication;
19 19 import org.jeecg.utils.support.SystemRSA256Key;
  20 +import org.springframework.beans.factory.annotation.Value;
20 21 import org.springframework.stereotype.Component;
21 22 import org.springframework.util.CollectionUtils;
22 23  
... ... @@ -35,8 +36,13 @@ import cn.hutool.core.util.StrUtil;
35 36 @Component
36 37 public class HuahengJwtUtil {
37 38  
38   - /** token失效时间 1天 */
39   - public static final long EXPIRE_TIME = 12 * 60 * 60 * 1000;
  39 + /** Token失效时间 */
  40 + private static Long TOKEN_EXPIRE_TIME;
  41 +
  42 + @Value("${system.token.expireTime}")
  43 + public void setExpireTime(String expireTime) {
  44 + TOKEN_EXPIRE_TIME = Long.parseLong(expireTime);
  45 + }
40 46  
41 47 /** 仓库视察员角色 */
42 48 public static final String USER_ROLE_INSPECTOR = "inspector";
... ... @@ -164,7 +170,7 @@ public class HuahengJwtUtil {
164 170 * @return 加密的token
165 171 */
166 172 public static String sign(String username, String secret) {
167   - Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME);
  173 + Date date = new Date(System.currentTimeMillis() + TOKEN_EXPIRE_TIME);
168 174 Algorithm algorithm = Algorithm.HMAC256(secret);
169 175 // 附带username信息
170 176 return JWT.create().withClaim("username", username).withExpiresAt(date).sign(algorithm);
... ... @@ -179,7 +185,7 @@ public class HuahengJwtUtil {
179 185 * @return 加密的token
180 186 */
181 187 public static String sign(String username, String secret, String warehouseCode, List<String> roles) {
182   - Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME);
  188 + Date date = new Date(System.currentTimeMillis() + TOKEN_EXPIRE_TIME);
183 189 Algorithm algorithm = Algorithm.HMAC256(secret);
184 190 // 附带username信息
185 191 return JWT.create().withClaim("username", username).withClaim("warehouseCode", warehouseCode).withClaim("roles", roles).withExpiresAt(date).sign(algorithm);
... ...
huaheng-wms-core/src/main/java/org/jeecg/utils/aspect/ApiAuthenticationAspect.java
... ... @@ -25,6 +25,8 @@ import com.auth0.jwt.algorithms.Algorithm;
25 25 import com.auth0.jwt.exceptions.JWTVerificationException;
26 26 import com.auth0.jwt.interfaces.DecodedJWT;
27 27  
  28 +import cn.hutool.core.date.DatePattern;
  29 +import cn.hutool.core.date.DateUtil;
28 30 import lombok.extern.slf4j.Slf4j;
29 31  
30 32 /**
... ... @@ -37,13 +39,13 @@ import lombok.extern.slf4j.Slf4j;
37 39 @Component
38 40 @EnableAsync
39 41 public class ApiAuthenticationAspect {
40   -
  42 +
41 43 /** 全局认证TOKEN */
42   - private String token = "MTY3OTU1MTE0MCwib3BlcmF0b3IiOiJIVUFIRU5HLVdNUzQiLCJqdGkiOiI3ZGExMDQyYS1iMDBhLTQzZmMtOTliO";
  44 + private String token = "MTY3OTU1MTE0MCwib3BlcmF0b3IiOiJIVUFIRU5HLVdNUzQiLCJqdGkiOiI3ZGExMDQyYS1iMDBhLTQzZmMtOTliO";
43 45  
44 46 @Autowired
45 47 private RSA256Key rsa256Key;
46   -
  48 +
47 49 @Autowired
48 50 private ApplicationConfig applicationConfig;
49 51  
... ... @@ -79,21 +81,19 @@ public class ApiAuthenticationAspect {
79 81 }
80 82 try {
81 83 if (token.equals("MTY3OTU1MTE0MCwib3BlcmF0b3IiOiJIVUFIRU5HLVdNUzQiLCJqdGkiOiI3ZGExMDQyYS1iMDBhLTQzZmMtOTliO")) {
  84 + log.error("API Authentication token 非法使用");
82 85 return;
83 86 }
84 87 Algorithm algorithm = Algorithm.RSA256(rsa256Key.getPublicKey(), rsa256Key.getPrivateKey());
85 88 JWTVerifier verifier = JWT.require(algorithm).withIssuer(applicationConfig.getArtifactId()).build();
86 89 DecodedJWT jwt = verifier.verify(token);
87   - new ApiAuthentication.ApiAuthenticationBuild()
88   - .operator(jwt.getClaim("operator").asString())
89   - .audience(jwt.getAudience().get(0))
90   - .issuer(jwt.getIssuer())
91   - .issuedAt(jwt.getIssuedAt())
92   - .expireDateTime(jwt.getExpiresAt())
93   - .bulid();
  90 + new ApiAuthentication.ApiAuthenticationBuild().operator(jwt.getClaim("operator").asString()).audience(jwt.getAudience().get(0)).issuer(jwt.getIssuer())
  91 + .issuedAt(jwt.getIssuedAt()).expireDateTime(jwt.getExpiresAt()).bulid();
94 92 if (jwt.getClaim("operator").asString().equals(jwt.getIssuer())) {
95 93 throw new RuntimeException("Authentication token error");
96 94 }
  95 + log.info("API Authentication token info: 使用方: {}, 提供方: {}, 失效时间: {}", jwt.getAudience().get(0), jwt.getClaim("operator").asString(),
  96 + DateUtil.format(jwt.getExpiresAt(), DatePattern.NORM_DATETIME_PATTERN));
97 97 } catch (JWTVerificationException e) {
98 98 log.error(e.getMessage());
99 99 throw e;
... ...
huaheng-wms-core/src/main/resources/application-dev.yml
... ... @@ -355,3 +355,7 @@ third-app:
355 355 # appSecret
356 356 client-secret: ??
357 357 agent-id: ??
  358 +system:
  359 + token:
  360 + # 登录TOKEN缓存1年
  361 + expireTime: 31536000000
... ...
huaheng-wms-core/src/main/resources/application-prod.yml
... ... @@ -355,3 +355,7 @@ third-app:
355 355 # appSecret
356 356 client-secret: ??
357 357 agent-id: ??
  358 +system:
  359 + token:
  360 + # 登录TOKEN缓存12小时
  361 + expireTime: 43200000
... ...
huaheng-wms-core/src/main/resources/application-test.yml
... ... @@ -356,3 +356,7 @@ third-app:
356 356 # appSecret
357 357 client-secret: ??
358 358 agent-id: ??
  359 +system:
  360 + token:
  361 + # 登录TOKEN缓存1年
  362 + expireTime: 31536000000
... ...