Commit f41a0147f5c90cc714f13d99dcd8ad806ae15564
1 parent
c4101445
增加打印功能
Showing
19 changed files
with
958 additions
and
25 deletions
jeecg-boot-master/ant-design-vue-jeecg/src/api/api.js
@@ -126,7 +126,7 @@ export const completeTaskByWMS = (params)=>postAction('/task/taskHeader/complete | @@ -126,7 +126,7 @@ export const completeTaskByWMS = (params)=>postAction('/task/taskHeader/complete | ||
126 | //下发任务给WCS | 126 | //下发任务给WCS |
127 | export const execute = (params)=>postAction('/task/taskHeader/execute', params); | 127 | export const execute = (params)=>postAction('/task/taskHeader/execute', params); |
128 | //取消任务 | 128 | //取消任务 |
129 | -export const cancelTask = (params)=>postAction('/task/taskHeader/cancelTask?1', params); | 129 | +export const cancelTask = (params)=>postAction('/task/taskHeader/cancelTask?ids=' + params, params); |
130 | //自动配盘 | 130 | //自动配盘 |
131 | export const autoCombination = (params)=>postAction('/shipment/shipmentCombination/autoCombination', params); | 131 | export const autoCombination = (params)=>postAction('/shipment/shipmentCombination/autoCombination', params); |
132 | //创建出库任务 | 132 | //创建出库任务 |
@@ -155,6 +155,8 @@ export const createOverStationTask = (params)=>postAction('/task/taskHeader/crea | @@ -155,6 +155,8 @@ export const createOverStationTask = (params)=>postAction('/task/taskHeader/crea | ||
155 | export const createManyEmptyIn = (params)=>postAction('/task/taskHeader/createManyEmptyIn', params); | 155 | export const createManyEmptyIn = (params)=>postAction('/task/taskHeader/createManyEmptyIn', params); |
156 | //创建空托盘组出库任务 | 156 | //创建空托盘组出库任务 |
157 | export const createManyEmptyOut = (params)=>postAction('/task/taskHeader/createManyEmptyOut', params); | 157 | export const createManyEmptyOut = (params)=>postAction('/task/taskHeader/createManyEmptyOut', params); |
158 | +//获取打印数据 | ||
159 | +export const getPrintContent = (params)=>postAction('/config/container/getPrintContent?ids=' + params, params); | ||
158 | 160 | ||
159 | // 中转HTTP请求 | 161 | // 中转HTTP请求 |
160 | export const transitRESTful = { | 162 | export const transitRESTful = { |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/ContainerList.vue
@@ -50,6 +50,7 @@ | @@ -50,6 +50,7 @@ | ||
50 | 50 | ||
51 | <!-- 操作按钮区域 --> | 51 | <!-- 操作按钮区域 --> |
52 | <div class="table-operator"> | 52 | <div class="table-operator"> |
53 | + <a-button @click="batchPrint()" type="primary" icon="plus">打印</a-button> | ||
53 | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> | 54 | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
54 | <a-button type="primary" icon="download" @click="handleExportXls('容器管理')">导出</a-button> | 55 | <a-button type="primary" icon="download" @click="handleExportXls('容器管理')">导出</a-button> |
55 | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | 56 | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
@@ -119,7 +120,7 @@ | @@ -119,7 +120,7 @@ | ||
119 | </template> | 120 | </template> |
120 | 121 | ||
121 | <span slot="action" slot-scope="text, record"> | 122 | <span slot="action" slot-scope="text, record"> |
122 | - <a @click="handleEdit(record)">编辑</a> | 123 | + <a @click="editForm(record)">编辑</a> |
123 | 124 | ||
124 | <a-divider type="vertical" /> | 125 | <a-divider type="vertical" /> |
125 | <a-dropdown> | 126 | <a-dropdown> |
@@ -141,6 +142,8 @@ | @@ -141,6 +142,8 @@ | ||
141 | </div> | 142 | </div> |
142 | 143 | ||
143 | <container-modal ref="modalForm" @ok="modalFormOk"></container-modal> | 144 | <container-modal ref="modalForm" @ok="modalFormOk"></container-modal> |
145 | + <container-edit-modal ref="modalEditForm" @ok="modalFormOk"></container-edit-modal> | ||
146 | + <container-print-modal ref="modalPrintForm" @ok="modalFormOk"></container-print-modal> | ||
144 | </a-card> | 147 | </a-card> |
145 | </template> | 148 | </template> |
146 | 149 | ||
@@ -153,11 +156,15 @@ | @@ -153,11 +156,15 @@ | ||
153 | import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | 156 | import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
154 | import {getZoneList} from '@/api/api' | 157 | import {getZoneList} from '@/api/api' |
155 | import {getContainerTypeList} from '@/api/api' | 158 | import {getContainerTypeList} from '@/api/api' |
159 | + import ContainerEditModal from "./modules/ContainerEditModal"; | ||
160 | + import ContainerPrintModal from "./modules/ContainerPrintModal"; | ||
156 | 161 | ||
157 | export default { | 162 | export default { |
158 | name: 'ContainerList', | 163 | name: 'ContainerList', |
159 | mixins:[JeecgListMixin, mixinDevice], | 164 | mixins:[JeecgListMixin, mixinDevice], |
160 | components: { | 165 | components: { |
166 | + ContainerPrintModal, | ||
167 | + ContainerEditModal, | ||
161 | ContainerModal | 168 | ContainerModal |
162 | }, | 169 | }, |
163 | data () { | 170 | data () { |
@@ -266,6 +273,26 @@ | @@ -266,6 +273,26 @@ | ||
266 | fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'}) | 273 | fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'}) |
267 | this.superFieldList = fieldList | 274 | this.superFieldList = fieldList |
268 | }, | 275 | }, |
276 | + editForm(record) { | ||
277 | + this.$refs.modalEditForm.edit(record); | ||
278 | + this.$refs.modalEditForm.title = "编辑容器"; | ||
279 | + this.$refs.modalEditForm.disableSubmit = false; | ||
280 | + }, | ||
281 | + batchPrint() { | ||
282 | + if (this.selectedRowKeys.length <= 0) { | ||
283 | + this.$message.warning('请选择一条记录!'); | ||
284 | + return; | ||
285 | + } else { | ||
286 | + var ids = ""; | ||
287 | + for (var a = 0; a < this.selectedRowKeys.length; a++) { | ||
288 | + ids += this.selectedRowKeys[a] + ","; | ||
289 | + } | ||
290 | + console.log(ids); | ||
291 | + this.$refs.modalPrintForm.edit(ids); | ||
292 | + this.$refs.modalPrintForm.title = "打印容器编码"; | ||
293 | + this.$refs.modalPrintForm.disableSubmit = false; | ||
294 | + } | ||
295 | + }, | ||
269 | loadFrom() { | 296 | loadFrom() { |
270 | getZoneList().then((res) => { | 297 | getZoneList().then((res) => { |
271 | if (res.success) { | 298 | if (res.success) { |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/LocationList.vue
@@ -99,6 +99,7 @@ | @@ -99,6 +99,7 @@ | ||
99 | 99 | ||
100 | <!-- 操作按钮区域 --> | 100 | <!-- 操作按钮区域 --> |
101 | <div class="table-operator"> | 101 | <div class="table-operator"> |
102 | + <a-button @click="batchAdd()" type="primary" icon="plus">批量新增</a-button> | ||
102 | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> | 103 | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
103 | <a-button type="primary" icon="download" @click="handleExportXls('库位管理')">导出</a-button> | 104 | <a-button type="primary" icon="download" @click="handleExportXls('库位管理')">导出</a-button> |
104 | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | 105 | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
@@ -190,6 +191,7 @@ | @@ -190,6 +191,7 @@ | ||
190 | </div> | 191 | </div> |
191 | 192 | ||
192 | <location-modal ref="modalForm" @ok="modalFormOk"></location-modal> | 193 | <location-modal ref="modalForm" @ok="modalFormOk"></location-modal> |
194 | + <location-batch-add-modal ref="batchAddModalForm" @ok="modalFormOk"></location-batch-add-modal> | ||
193 | </a-card> | 195 | </a-card> |
194 | </template> | 196 | </template> |
195 | 197 | ||
@@ -202,11 +204,13 @@ | @@ -202,11 +204,13 @@ | ||
202 | import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | 204 | import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
203 | import {getLocationTypeList} from '@/api/api' | 205 | import {getLocationTypeList} from '@/api/api' |
204 | import {getZoneList} from '@/api/api' | 206 | import {getZoneList} from '@/api/api' |
207 | + import LocationBatchAddModal from "./modules/LocationBatchAddModal"; | ||
205 | 208 | ||
206 | export default { | 209 | export default { |
207 | name: 'LocationList', | 210 | name: 'LocationList', |
208 | mixins:[JeecgListMixin, mixinDevice], | 211 | mixins:[JeecgListMixin, mixinDevice], |
209 | components: { | 212 | components: { |
213 | + LocationBatchAddModal, | ||
210 | LocationModal | 214 | LocationModal |
211 | }, | 215 | }, |
212 | data () { | 216 | data () { |
@@ -217,14 +221,9 @@ | @@ -217,14 +221,9 @@ | ||
217 | // 表头 | 221 | // 表头 |
218 | columns: [ | 222 | columns: [ |
219 | { | 223 | { |
220 | - title: '#', | ||
221 | - dataIndex: '', | ||
222 | - key:'rowIndex', | ||
223 | - width:60, | 224 | + title:'ID', |
224 | align:"center", | 225 | align:"center", |
225 | - customRender:function (t,r,index) { | ||
226 | - return parseInt(index)+1; | ||
227 | - } | 226 | + dataIndex: 'id' |
228 | }, | 227 | }, |
229 | { | 228 | { |
230 | title:'库位编码', | 229 | title:'库位编码', |
@@ -382,6 +381,11 @@ | @@ -382,6 +381,11 @@ | ||
382 | } | 381 | } |
383 | }) | 382 | }) |
384 | }, | 383 | }, |
384 | + batchAdd() { | ||
385 | + this.$refs.batchAddModalForm.add(); | ||
386 | + this.$refs.batchAddModalForm.title = "批量新增"; | ||
387 | + this.$refs.batchAddModalForm.disableSubmit = false; | ||
388 | + }, | ||
385 | solutionZoneCode(value) { | 389 | solutionZoneCode(value) { |
386 | var actions = [] | 390 | var actions = [] |
387 | Object.keys(this.zoneList).some((key) => { | 391 | Object.keys(this.zoneList).some((key) => { |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/ContainerEditForm.vue
0 → 100644
1 | +<template> | ||
2 | + <a-spin :spinning="confirmLoading"> | ||
3 | + <j-form-container :disabled="formDisabled"> | ||
4 | + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | ||
5 | + <a-row> | ||
6 | + <a-col :span="24"> | ||
7 | + <a-form-model-item label="容器类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="containerTypeCode"> | ||
8 | + <a-select | ||
9 | + show-search | ||
10 | + placeholder="请选择容器类型" | ||
11 | + option-filter-prop="children" | ||
12 | + :filter-option="filterOption" | ||
13 | + v-model="model.containerTypeCode"> | ||
14 | + <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | ||
15 | + </a-select> | ||
16 | + </a-form-model-item> | ||
17 | + </a-col> | ||
18 | + <a-col :span="24"> | ||
19 | + <a-form-model-item label="库位编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationCode"> | ||
20 | + <a-input v-model="model.locationCode" placeholder="请输入库位编码" ></a-input> | ||
21 | + </a-form-model-item> | ||
22 | + </a-col> | ||
23 | + <a-col :span="24"> | ||
24 | + <a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> | ||
25 | + <j-dict-select-tag type="list" v-model="model.status" dictCode="container_status" placeholder="请选择状态" /> | ||
26 | + </a-form-model-item> | ||
27 | + </a-col> | ||
28 | + </a-row> | ||
29 | + </a-form-model> | ||
30 | + </j-form-container> | ||
31 | + </a-spin> | ||
32 | +</template> | ||
33 | + | ||
34 | +<script> | ||
35 | + | ||
36 | + import { httpAction, getAction } from '@/api/manage' | ||
37 | + import { validateDuplicateValue } from '@/utils/util' | ||
38 | + import {getZoneList} from '@/api/api' | ||
39 | + import {getContainerTypeList} from '@/api/api' | ||
40 | + | ||
41 | + export default { | ||
42 | + name: 'ContainerEditForm', | ||
43 | + components: { | ||
44 | + }, | ||
45 | + props: { | ||
46 | + //表单禁用 | ||
47 | + disabled: { | ||
48 | + type: Boolean, | ||
49 | + default: false, | ||
50 | + required: false | ||
51 | + } | ||
52 | + }, | ||
53 | + data () { | ||
54 | + return { | ||
55 | + model:{ | ||
56 | + }, | ||
57 | + labelCol: { | ||
58 | + xs: { span: 24 }, | ||
59 | + sm: { span: 5 }, | ||
60 | + }, | ||
61 | + wrapperCol: { | ||
62 | + xs: { span: 24 }, | ||
63 | + sm: { span: 16 }, | ||
64 | + }, | ||
65 | + confirmLoading: false, | ||
66 | + zoneList:[], | ||
67 | + containerTypeList:[], | ||
68 | + validatorRules: { | ||
69 | + containerTypeCode: [ | ||
70 | + { required: true, message: '请选择容器类型!'}, | ||
71 | + ], | ||
72 | + }, | ||
73 | + url: { | ||
74 | + add: "/config/container/add", | ||
75 | + edit: "/config/container/edit", | ||
76 | + queryById: "/config/container/queryById" | ||
77 | + } | ||
78 | + } | ||
79 | + }, | ||
80 | + computed: { | ||
81 | + formDisabled(){ | ||
82 | + return this.disabled | ||
83 | + }, | ||
84 | + }, | ||
85 | + created () { | ||
86 | + //备份model原始值 | ||
87 | + this.model.status = "empty"; | ||
88 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
89 | + this.loadFrom(); | ||
90 | + }, | ||
91 | + methods: { | ||
92 | + add () { | ||
93 | + this.edit(this.modelDefault); | ||
94 | + }, | ||
95 | + edit (record) { | ||
96 | + this.model = Object.assign({}, record); | ||
97 | + this.visible = true; | ||
98 | + }, | ||
99 | + loadFrom() { | ||
100 | + getZoneList().then((res) => { | ||
101 | + if (res.success) { | ||
102 | + this.zoneList = res.result | ||
103 | + } | ||
104 | + }); | ||
105 | + getContainerTypeList().then((res) => { | ||
106 | + if (res.success) { | ||
107 | + this.containerTypeList = res.result | ||
108 | + } | ||
109 | + }); | ||
110 | + }, | ||
111 | + submitForm () { | ||
112 | + const that = this; | ||
113 | + // 触发表单验证 | ||
114 | + this.$refs.form.validate(valid => { | ||
115 | + if (valid) { | ||
116 | + that.confirmLoading = true; | ||
117 | + let httpurl = ''; | ||
118 | + let method = ''; | ||
119 | + if(!this.model.id){ | ||
120 | + httpurl+=this.url.add; | ||
121 | + method = 'post'; | ||
122 | + }else{ | ||
123 | + httpurl+=this.url.edit; | ||
124 | + method = 'put'; | ||
125 | + } | ||
126 | + httpAction(httpurl,this.model,method).then((res)=>{ | ||
127 | + if(res.success){ | ||
128 | + that.$message.success(res.message); | ||
129 | + that.$emit('ok'); | ||
130 | + }else{ | ||
131 | + that.$message.warning(res.message); | ||
132 | + } | ||
133 | + }).finally(() => { | ||
134 | + that.confirmLoading = false; | ||
135 | + }) | ||
136 | + } | ||
137 | + | ||
138 | + }) | ||
139 | + }, | ||
140 | + } | ||
141 | + } | ||
142 | +</script> | ||
0 | \ No newline at end of file | 143 | \ No newline at end of file |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/ContainerEditModal.vue
0 → 100644
1 | +<template> | ||
2 | + <j-modal | ||
3 | + :title="title" | ||
4 | + :width="width" | ||
5 | + :visible="visible" | ||
6 | + switchFullscreen | ||
7 | + @ok="handleOk" | ||
8 | + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | ||
9 | + @cancel="handleCancel" | ||
10 | + cancelText="关闭"> | ||
11 | + <location="realForm" @ok="submitCallback" :disabled="disableSubmit"></container-edit-form> | ||
12 | + </j-modal> | ||
13 | +</template> | ||
14 | + | ||
15 | +<script> | ||
16 | + | ||
17 | + import ContainerEditForm from './ContainerEditForm' | ||
18 | + export default { | ||
19 | + name: 'ContainerEditModal', | ||
20 | + components: { | ||
21 | + ContainerEditForm | ||
22 | + }, | ||
23 | + data () { | ||
24 | + return { | ||
25 | + title:'', | ||
26 | + width:800, | ||
27 | + visible: false, | ||
28 | + disableSubmit: false | ||
29 | + } | ||
30 | + }, | ||
31 | + methods: { | ||
32 | + add () { | ||
33 | + this.visible=true | ||
34 | + this.$nextTick(()=>{ | ||
35 | + this.$refs.realForm.add(); | ||
36 | + }) | ||
37 | + }, | ||
38 | + edit (record) { | ||
39 | + this.visible=true | ||
40 | + this.$nextTick(()=>{ | ||
41 | + this.$refs.realForm.edit(record); | ||
42 | + }) | ||
43 | + }, | ||
44 | + close () { | ||
45 | + this.$emit('close'); | ||
46 | + this.visible = false; | ||
47 | + }, | ||
48 | + handleOk () { | ||
49 | + this.$refs.realForm.submitForm(); | ||
50 | + }, | ||
51 | + submitCallback(){ | ||
52 | + this.$emit('ok'); | ||
53 | + this.visible = false; | ||
54 | + }, | ||
55 | + handleCancel () { | ||
56 | + this.close() | ||
57 | + } | ||
58 | + } | ||
59 | + } | ||
60 | +</script> | ||
0 | \ No newline at end of file | 61 | \ No newline at end of file |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/ContainerPrintForm.vue
0 → 100644
1 | +<template> | ||
2 | + <div class="container" style=" width:600px;/*height:228px;*/color: #333"> | ||
3 | + | ||
4 | + <div class="noprint container" style="text-align:right; float: right"> | ||
5 | + <a-button v-print="'#printContent'" ghost type="primary">打印</a-button> | ||
6 | + </div> | ||
7 | + | ||
8 | + <div class="row" id="printContent" > | ||
9 | + <table width="100%" | ||
10 | + v-for="source in dataSource"> | ||
11 | + <caption style="font-size:22px;text-align:center; color:#333; padding-bottom: 3px;"></caption> | ||
12 | + <tbody> | ||
13 | + <tr > | ||
14 | + <td scope="col" style="font-size:12px;font-weight:bold" >物料图号:{{source.code}}</td> | ||
15 | + </tr> | ||
16 | +<!-- <tr >--> | ||
17 | +<!-- <td rowspan="4" style="padding: 1px">--> | ||
18 | +<!-- <vue-qr :text="source.code" :size="70" :margin="0"></vue-qr>--> | ||
19 | +<!-- </td>--> | ||
20 | +<!-- </tr>--> | ||
21 | + </tbody> | ||
22 | + </table> | ||
23 | + </div> | ||
24 | + </div> | ||
25 | +</template> | ||
26 | + | ||
27 | +<script> | ||
28 | + | ||
29 | + import { httpAction, getAction } from '@/api/manage' | ||
30 | + import { validateDuplicateValue } from '@/utils/util' | ||
31 | + import {getZoneList} from '@/api/api' | ||
32 | + import {getContainerTypeList, getPrintContent} from '@/api/api' | ||
33 | + import JsBarcode from 'jsbarcode' | ||
34 | + | ||
35 | + export default { | ||
36 | + name: 'ContainerPrintForm', | ||
37 | + components: { | ||
38 | + JsBarcode, | ||
39 | + }, | ||
40 | + props: { | ||
41 | + //表单禁用 | ||
42 | + disabled: { | ||
43 | + type: Boolean, | ||
44 | + default: false, | ||
45 | + required: false | ||
46 | + } | ||
47 | + }, | ||
48 | + data () { | ||
49 | + return { | ||
50 | + model:{ | ||
51 | + }, | ||
52 | + dataSource:[], | ||
53 | + ids:{}, | ||
54 | + labelCol: { | ||
55 | + xs: { span: 24 }, | ||
56 | + sm: { span: 5 }, | ||
57 | + }, | ||
58 | + wrapperCol: { | ||
59 | + xs: { span: 24 }, | ||
60 | + sm: { span: 16 }, | ||
61 | + }, | ||
62 | + confirmLoading: false, | ||
63 | + zoneList:[], | ||
64 | + containerTypeList:[], | ||
65 | + url: { | ||
66 | + add: "/config/container/add", | ||
67 | + edit: "/config/container/edit", | ||
68 | + queryById: "/config/container/queryById" | ||
69 | + } | ||
70 | + } | ||
71 | + }, | ||
72 | + computed: { | ||
73 | + formDisabled(){ | ||
74 | + return this.disabled | ||
75 | + }, | ||
76 | + }, | ||
77 | + created () { | ||
78 | + //备份model原始值 | ||
79 | + this.model.status = "empty"; | ||
80 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
81 | + this.loadFrom(); | ||
82 | + }, | ||
83 | + methods: { | ||
84 | + add () { | ||
85 | + this.edit(this.modelDefault); | ||
86 | + }, | ||
87 | + edit (record) { | ||
88 | + // this.model = Object.assign({}, this.modelDefault); | ||
89 | + getPrintContent(record).then((res) => { | ||
90 | + if (res.success) { | ||
91 | + // var data = res.result; | ||
92 | + console.log("getPrintContent:" + res.result); | ||
93 | + this.dataSource = res.result; | ||
94 | + console.log("getPrintContent!!:" + this.dataSource.length); | ||
95 | + this.visible = true; | ||
96 | + } | ||
97 | + }); | ||
98 | + }, | ||
99 | + loadFrom() { | ||
100 | + getZoneList().then((res) => { | ||
101 | + if (res.success) { | ||
102 | + this.zoneList = res.result | ||
103 | + } | ||
104 | + }); | ||
105 | + getContainerTypeList().then((res) => { | ||
106 | + if (res.success) { | ||
107 | + this.containerTypeList = res.result | ||
108 | + } | ||
109 | + }); | ||
110 | + }, | ||
111 | + submitForm () { | ||
112 | + const that = this; | ||
113 | + // 触发表单验证 | ||
114 | + this.$refs.form.validate(valid => { | ||
115 | + if (valid) { | ||
116 | + that.confirmLoading = true; | ||
117 | + let httpurl = ''; | ||
118 | + let method = ''; | ||
119 | + if(!this.model.id){ | ||
120 | + httpurl+=this.url.add; | ||
121 | + method = 'post'; | ||
122 | + }else{ | ||
123 | + httpurl+=this.url.edit; | ||
124 | + method = 'put'; | ||
125 | + } | ||
126 | + httpAction(httpurl,this.model,method).then((res)=>{ | ||
127 | + if(res.success){ | ||
128 | + that.$message.success(res.message); | ||
129 | + that.$emit('ok'); | ||
130 | + }else{ | ||
131 | + that.$message.warning(res.message); | ||
132 | + } | ||
133 | + }).finally(() => { | ||
134 | + that.confirmLoading = false; | ||
135 | + }) | ||
136 | + } | ||
137 | + | ||
138 | + }) | ||
139 | + }, | ||
140 | + } | ||
141 | + } | ||
142 | +</script> | ||
0 | \ No newline at end of file | 143 | \ No newline at end of file |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/ContainerPrintModal.vue
0 → 100644
1 | +<template> | ||
2 | + <j-modal | ||
3 | + :title="title" | ||
4 | + :width="width" | ||
5 | + :visible="visible" | ||
6 | + switchFullscreen | ||
7 | + @ok="handleOk" | ||
8 | + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | ||
9 | + @cancel="handleCancel" | ||
10 | + cancelText="关闭"> | ||
11 | + <container-print-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></container-print-form> | ||
12 | + </j-modal> | ||
13 | +</template> | ||
14 | + | ||
15 | +<script> | ||
16 | + | ||
17 | + import ContainerPrintForm from './ContainerPrintForm' | ||
18 | + export default { | ||
19 | + name: 'ContainerPrintModal', | ||
20 | + components: { | ||
21 | + ContainerPrintForm | ||
22 | + }, | ||
23 | + data () { | ||
24 | + return { | ||
25 | + title:'', | ||
26 | + width:800, | ||
27 | + visible: false, | ||
28 | + disableSubmit: false | ||
29 | + } | ||
30 | + }, | ||
31 | + methods: { | ||
32 | + add () { | ||
33 | + this.visible=true | ||
34 | + this.$nextTick(()=>{ | ||
35 | + this.$refs.realForm.add(); | ||
36 | + }) | ||
37 | + }, | ||
38 | + edit (record) { | ||
39 | + console.log("record:" + record); | ||
40 | + this.visible=true | ||
41 | + this.$nextTick(()=>{ | ||
42 | + this.$refs.realForm.edit(record); | ||
43 | + }) | ||
44 | + }, | ||
45 | + close () { | ||
46 | + this.$emit('close'); | ||
47 | + this.visible = false; | ||
48 | + }, | ||
49 | + handleOk () { | ||
50 | + this.$refs.realForm.submitForm(); | ||
51 | + }, | ||
52 | + submitCallback(){ | ||
53 | + this.$emit('ok'); | ||
54 | + this.visible = false; | ||
55 | + }, | ||
56 | + handleCancel () { | ||
57 | + this.close() | ||
58 | + } | ||
59 | + } | ||
60 | + } | ||
61 | +</script> | ||
0 | \ No newline at end of file | 62 | \ No newline at end of file |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/LocationBatchAddForm.vue
0 → 100644
1 | +<template> | ||
2 | + <a-spin :spinning="confirmLoading"> | ||
3 | + <j-form-container :disabled="formDisabled"> | ||
4 | + <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | ||
5 | + <a-row> | ||
6 | + <a-col :span="24"> | ||
7 | + <a-form-model-item label="编码前缀" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="prefix"> | ||
8 | + <a-input v-model="model.prefix" placeholder="请输入编码前缀" ></a-input> | ||
9 | + </a-form-model-item> | ||
10 | + </a-col> | ||
11 | + <a-col :span="24"> | ||
12 | + <a-form-model-item label="起始行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="firstRow"> | ||
13 | + <a-input v-model="model.firstRow" placeholder="请输入起始行" ></a-input> | ||
14 | + </a-form-model-item> | ||
15 | + </a-col> | ||
16 | + <a-col :span="24"> | ||
17 | + <a-form-model-item label="最后行" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lastRow"> | ||
18 | + <a-input v-model="model.lastRow" placeholder="请输入最后行" ></a-input> | ||
19 | + </a-form-model-item> | ||
20 | + </a-col> | ||
21 | + <a-col :span="24"> | ||
22 | + <a-form-model-item label="起始列" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="firstColumn"> | ||
23 | + <a-input v-model="model.firstColumn" placeholder="请输入起始列" ></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="lastColumn"> | ||
28 | + <a-input v-model="model.lastColumn" 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="firstLayer"> | ||
33 | + <a-input v-model="model.firstLayer" placeholder="请输入起始层" ></a-input> | ||
34 | + </a-form-model-item> | ||
35 | + </a-col> | ||
36 | + <a-col :span="24"> | ||
37 | + <a-form-model-item label="最后层" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lastLayer"> | ||
38 | + <a-input v-model="model.lastLayer" placeholder="请输入最后层" ></a-input> | ||
39 | + </a-form-model-item> | ||
40 | + </a-col> | ||
41 | + <a-col :span="24"> | ||
42 | + <a-form-model-item label="巷道" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="roadWay"> | ||
43 | + <a-input v-model="model.roadWay" placeholder="请输入巷道" ></a-input> | ||
44 | + </a-form-model-item> | ||
45 | + </a-col> | ||
46 | + <a-col :span="24"> | ||
47 | + <a-form-model-item label="高低位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="high"> | ||
48 | + <j-dict-select-tag type="list" v-model="model.high" dictCode="high_status" placeholder="请选择高低位" /> | ||
49 | + </a-form-model-item> | ||
50 | + </a-col> | ||
51 | + <a-col :span="24"> | ||
52 | + <a-form-model-item label="库区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zoneCode"> | ||
53 | + <a-select | ||
54 | + show-search | ||
55 | + placeholder="请选择库区" | ||
56 | + option-filter-prop="children" | ||
57 | + :filter-option="filterOption" | ||
58 | + v-model="model.zoneCode"> | ||
59 | + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | ||
60 | + </a-select> | ||
61 | + </a-form-model-item> | ||
62 | + </a-col> | ||
63 | + <a-col :span="24"> | ||
64 | + <a-form-model-item label="库位类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="locationTypeCode"> | ||
65 | + <a-select | ||
66 | + show-search | ||
67 | + placeholder="请选择库位类型" | ||
68 | + option-filter-prop="children" | ||
69 | + :filter-option="filterOption" | ||
70 | + v-model="model.locationTypeCode"> | ||
71 | + <a-select-option v-for="item in locationTypeList" :key="item.name" :value="item.code">{{ item.name }}</a-select-option> | ||
72 | + </a-select> | ||
73 | + </a-form-model-item> | ||
74 | + </a-col> | ||
75 | +<!-- <a-col :span="24">--> | ||
76 | +<!-- <a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">--> | ||
77 | +<!-- <j-dict-select-tag type="list" v-model="model.status" dictCode="location_status" placeholder="请选择状态" />--> | ||
78 | +<!-- </a-form-model-item>--> | ||
79 | +<!-- </a-col>--> | ||
80 | +<!-- <a-col :span="24">--> | ||
81 | +<!-- <a-form-model-item label="是否可用" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enable">--> | ||
82 | +<!-- <j-dict-select-tag type="list" v-model="model.enable" dictCode="enable_status" placeholder="请选择是否可用" />--> | ||
83 | +<!-- </a-form-model-item>--> | ||
84 | +<!-- </a-col>--> | ||
85 | + </a-row> | ||
86 | + </a-form-model> | ||
87 | + </j-form-container> | ||
88 | + </a-spin> | ||
89 | +</template> | ||
90 | + | ||
91 | +<script> | ||
92 | + | ||
93 | + import { httpAction, getAction } from '@/api/manage' | ||
94 | + import { validateDuplicateValue } from '@/utils/util' | ||
95 | + import {getZoneList} from '@/api/api' | ||
96 | + import {getLocationTypeList} from '@/api/api' | ||
97 | + | ||
98 | + export default { | ||
99 | + name: 'LocationBatchAddForm', | ||
100 | + components: { | ||
101 | + }, | ||
102 | + props: { | ||
103 | + //表单禁用 | ||
104 | + disabled: { | ||
105 | + type: Boolean, | ||
106 | + default: false, | ||
107 | + required: false | ||
108 | + } | ||
109 | + }, | ||
110 | + data () { | ||
111 | + return { | ||
112 | + model:{ | ||
113 | + }, | ||
114 | + labelCol: { | ||
115 | + xs: { span: 24 }, | ||
116 | + sm: { span: 5 }, | ||
117 | + }, | ||
118 | + wrapperCol: { | ||
119 | + xs: { span: 24 }, | ||
120 | + sm: { span: 16 }, | ||
121 | + }, | ||
122 | + confirmLoading: false, | ||
123 | + zoneList:[], | ||
124 | + locationTypeList:[], | ||
125 | + validatorRules: { | ||
126 | + prefix: [ | ||
127 | + { required: true, message: '请输入编码前缀!'}, | ||
128 | + ], | ||
129 | + firstRow: [ | ||
130 | + { required: true, message: '请输入起始行!'}, | ||
131 | + ], | ||
132 | + lastRow: [ | ||
133 | + { required: true, message: '请输入最后行'}, | ||
134 | + ], | ||
135 | + firstColumn: [ | ||
136 | + { required: true, message: '请输入起始列!'}, | ||
137 | + ], | ||
138 | + lastColumn: [ | ||
139 | + { required: true, message: '请输入最后列'}, | ||
140 | + ], | ||
141 | + firstLayer: [ | ||
142 | + { required: true, message: '请输入起始层!'}, | ||
143 | + ], | ||
144 | + lastLayer: [ | ||
145 | + { required: true, message: '请输入最后层'}, | ||
146 | + ], | ||
147 | + roadWay: [ | ||
148 | + { required: true, message: '请输入巷道!'}, | ||
149 | + ], | ||
150 | + zoneCode: [ | ||
151 | + { required: true, message: '请输入库区!'}, | ||
152 | + ], | ||
153 | + locationTypeCode: [ | ||
154 | + { required: true, message: '请输入库位类型!'}, | ||
155 | + ], | ||
156 | + high: [ | ||
157 | + { required: true, message: '请输入高低位!'}, | ||
158 | + ], | ||
159 | + }, | ||
160 | + url: { | ||
161 | + add: "/config/location/batchAdd", | ||
162 | + edit: "/config/location/edit", | ||
163 | + queryById: "/config/location/queryById" | ||
164 | + } | ||
165 | + } | ||
166 | + }, | ||
167 | + computed: { | ||
168 | + formDisabled(){ | ||
169 | + return this.disabled | ||
170 | + }, | ||
171 | + }, | ||
172 | + created () { | ||
173 | + //备份model原始值 | ||
174 | + this.modelDefault = JSON.parse(JSON.stringify(this.model)); | ||
175 | + this.loadFrom(); | ||
176 | + }, | ||
177 | + methods: { | ||
178 | + add () { | ||
179 | + this.edit(this.modelDefault); | ||
180 | + }, | ||
181 | + edit (record) { | ||
182 | + this.model = Object.assign({}, record); | ||
183 | + this.visible = true; | ||
184 | + }, | ||
185 | + loadFrom() { | ||
186 | + getZoneList().then((res) => { | ||
187 | + if (res.success) { | ||
188 | + this.zoneList = res.result | ||
189 | + } | ||
190 | + }); | ||
191 | + getLocationTypeList().then((res) => { | ||
192 | + if (res.success) { | ||
193 | + this.locationTypeList = res.result | ||
194 | + } | ||
195 | + }) | ||
196 | + }, | ||
197 | + submitForm () { | ||
198 | + const that = this; | ||
199 | + // 触发表单验证 | ||
200 | + this.$refs.form.validate(valid => { | ||
201 | + if (valid) { | ||
202 | + that.confirmLoading = true; | ||
203 | + let httpurl = ''; | ||
204 | + let method = ''; | ||
205 | + httpurl+=this.url.add; | ||
206 | + method = 'post'; | ||
207 | + httpAction(httpurl,this.model,method).then((res)=>{ | ||
208 | + if(res.success){ | ||
209 | + that.$message.success(res.message); | ||
210 | + that.$emit('ok'); | ||
211 | + }else{ | ||
212 | + that.$message.warning(res.message); | ||
213 | + } | ||
214 | + }).finally(() => { | ||
215 | + that.confirmLoading = false; | ||
216 | + }) | ||
217 | + } | ||
218 | + | ||
219 | + }) | ||
220 | + }, | ||
221 | + } | ||
222 | + } | ||
223 | +</script> | ||
0 | \ No newline at end of file | 224 | \ No newline at end of file |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/config/modules/LocationBatchAddModal.vue
0 → 100644
1 | +<template> | ||
2 | + <j-modal | ||
3 | + :title="title" | ||
4 | + :width="width" | ||
5 | + :visible="visible" | ||
6 | + switchFullscreen | ||
7 | + @ok="handleOk" | ||
8 | + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | ||
9 | + @cancel="handleCancel" | ||
10 | + cancelText="关闭"> | ||
11 | + <location-batch-add-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></location-batch-add-form> | ||
12 | + </j-modal> | ||
13 | +</template> | ||
14 | + | ||
15 | +<script> | ||
16 | + | ||
17 | + import LocationBatchAddForm from "./LocationBatchAddForm"; | ||
18 | + export default { | ||
19 | + name: 'LocationBatchAddModal', | ||
20 | + components: { | ||
21 | + LocationBatchAddForm | ||
22 | + }, | ||
23 | + data () { | ||
24 | + return { | ||
25 | + title:'', | ||
26 | + width:800, | ||
27 | + visible: false, | ||
28 | + disableSubmit: false | ||
29 | + } | ||
30 | + }, | ||
31 | + methods: { | ||
32 | + add () { | ||
33 | + this.visible=true | ||
34 | + this.$nextTick(()=>{ | ||
35 | + this.$refs.realForm.add(); | ||
36 | + }) | ||
37 | + }, | ||
38 | + edit (record) { | ||
39 | + this.visible=true | ||
40 | + this.$nextTick(()=>{ | ||
41 | + this.$refs.realForm.edit(record); | ||
42 | + }) | ||
43 | + }, | ||
44 | + close () { | ||
45 | + this.$emit('close'); | ||
46 | + this.visible = false; | ||
47 | + }, | ||
48 | + handleOk () { | ||
49 | + this.$refs.realForm.submitForm(); | ||
50 | + }, | ||
51 | + submitCallback(){ | ||
52 | + this.$emit('ok'); | ||
53 | + this.visible = false; | ||
54 | + }, | ||
55 | + handleCancel () { | ||
56 | + this.close() | ||
57 | + } | ||
58 | + } | ||
59 | + } | ||
60 | +</script> | ||
0 | \ No newline at end of file | 61 | \ No newline at end of file |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ReceiptTaskHeaderList.vue
@@ -404,6 +404,7 @@ | @@ -404,6 +404,7 @@ | ||
404 | cancelTask(record) { | 404 | cancelTask(record) { |
405 | this.loading = true; | 405 | this.loading = true; |
406 | this.model = Object.assign({}, record); | 406 | this.model = Object.assign({}, record); |
407 | + console.log() | ||
407 | cancelTask(this.model.id).then((res) => { | 408 | cancelTask(this.model.id).then((res) => { |
408 | this.loading = false; | 409 | this.loading = false; |
409 | if (res.success) { | 410 | if (res.success) { |
jeecg-boot-master/ant-design-vue-jeecg/src/views/system/task/ShipmentTaskHeaderList.vue
@@ -148,6 +148,8 @@ | @@ -148,6 +148,8 @@ | ||
148 | <span slot="action" slot-scope="text, record"> | 148 | <span slot="action" slot-scope="text, record"> |
149 | <a v-if="record.status == 1" @click="executeTask(record)">执行</a> | 149 | <a v-if="record.status == 1" @click="executeTask(record)">执行</a> |
150 | <a-divider type="vertical" /> | 150 | <a-divider type="vertical" /> |
151 | + <a v-if="record.status < 100" @click="cancelTask(record)">取消</a> | ||
152 | + <a-divider type="vertical" /> | ||
151 | <a v-if="record.status < 100" @click="completeTask(record)">完成</a> | 153 | <a v-if="record.status < 100" @click="completeTask(record)">完成</a> |
152 | <a-divider type="vertical" /> | 154 | <a-divider type="vertical" /> |
153 | <a-dropdown> | 155 | <a-dropdown> |
@@ -189,7 +191,7 @@ | @@ -189,7 +191,7 @@ | ||
189 | import TaskDetailList from './TaskDetailList' | 191 | import TaskDetailList from './TaskDetailList' |
190 | import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil' | 192 | import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
191 | import '@/assets/less/TableExpand.less' | 193 | import '@/assets/less/TableExpand.less' |
192 | - import {completeTaskByWMS} from '@/api/api' | 194 | + import {completeTaskByWMS, cancelTask} from '@/api/api' |
193 | import {execute} from '@/api/api' | 195 | import {execute} from '@/api/api' |
194 | import {getZoneList} from '@/api/api' | 196 | import {getZoneList} from '@/api/api' |
195 | import EmptyOutTaskModal from './modules/EmptyOutTaskModal' | 197 | import EmptyOutTaskModal from './modules/EmptyOutTaskModal' |
@@ -394,6 +396,20 @@ | @@ -394,6 +396,20 @@ | ||
394 | this.loading = false; | 396 | this.loading = false; |
395 | }) | 397 | }) |
396 | }, | 398 | }, |
399 | + cancelTask(record) { | ||
400 | + this.loading = true; | ||
401 | + this.model = Object.assign({}, record); | ||
402 | + cancelTask(this.model.id).then((res) => { | ||
403 | + this.loading = false; | ||
404 | + if (res.success) { | ||
405 | + this.$message.success(res.message); | ||
406 | + } | ||
407 | + else { | ||
408 | + this.$message.error(res.message); | ||
409 | + } | ||
410 | + this.searchQuery(); | ||
411 | + }); | ||
412 | + }, | ||
397 | completeTask(record) { | 413 | completeTask(record) { |
398 | this.loading = true; | 414 | this.loading = true; |
399 | this.model = Object.assign({}, record); | 415 | this.model = Object.assign({}, record); |
jeecg-boot-master/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/system/util/JwtUtil.java
@@ -35,8 +35,8 @@ import org.jeecg.common.util.oConvertUtils; | @@ -35,8 +35,8 @@ import org.jeecg.common.util.oConvertUtils; | ||
35 | public class JwtUtil { | 35 | public class JwtUtil { |
36 | 36 | ||
37 | // Token过期时间2天(用户登录过期时间是此时间的两倍,以token在reids缓存时间为准) | 37 | // Token过期时间2天(用户登录过期时间是此时间的两倍,以token在reids缓存时间为准) |
38 | - public static final long EXPIRE_TIME = 2 * 24 * 60 * 60 * 1000; | ||
39 | - | 38 | +// public static final long EXPIRE_TIME = 2 * 24 * 60 * 60 * 1000; |
39 | + public static final long EXPIRE_TIME = -1; | ||
40 | /** | 40 | /** |
41 | * | 41 | * |
42 | * @param response | 42 | * @param response |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/container/controller/ContainerController.java
1 | package org.jeecg.modules.wms.config.container.controller; | 1 | package org.jeecg.modules.wms.config.container.controller; |
2 | 2 | ||
3 | +import java.lang.ref.WeakReference; | ||
3 | import java.util.Arrays; | 4 | import java.util.Arrays; |
4 | import java.util.List; | 5 | import java.util.List; |
5 | import java.util.Map; | 6 | import java.util.Map; |
@@ -7,8 +8,13 @@ import java.util.stream.Collectors; | @@ -7,8 +8,13 @@ import java.util.stream.Collectors; | ||
7 | import java.io.IOException; | 8 | import java.io.IOException; |
8 | import java.io.UnsupportedEncodingException; | 9 | import java.io.UnsupportedEncodingException; |
9 | import java.net.URLDecoder; | 10 | import java.net.URLDecoder; |
11 | +import javax.annotation.Resource; | ||
10 | import javax.servlet.http.HttpServletRequest; | 12 | import javax.servlet.http.HttpServletRequest; |
11 | import javax.servlet.http.HttpServletResponse; | 13 | import javax.servlet.http.HttpServletResponse; |
14 | + | ||
15 | +import com.aliyun.oss.ServiceException; | ||
16 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
17 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
12 | import org.jeecg.common.api.vo.Result; | 18 | import org.jeecg.common.api.vo.Result; |
13 | import org.jeecg.common.system.query.QueryGenerator; | 19 | import org.jeecg.common.system.query.QueryGenerator; |
14 | import org.jeecg.common.system.util.JwtUtil; | 20 | import org.jeecg.common.system.util.JwtUtil; |
@@ -21,6 +27,8 @@ import lombok.extern.slf4j.Slf4j; | @@ -21,6 +27,8 @@ import lombok.extern.slf4j.Slf4j; | ||
21 | 27 | ||
22 | import org.jeecg.modules.wms.config.container.entity.Container; | 28 | import org.jeecg.modules.wms.config.container.entity.Container; |
23 | import org.jeecg.modules.wms.config.container.service.IContainerService; | 29 | import org.jeecg.modules.wms.config.container.service.IContainerService; |
30 | +import org.jeecg.modules.wms.config.location.entity.Location; | ||
31 | +import org.jeecg.modules.wms.config.location.service.ILocationService; | ||
24 | import org.jeecg.utils.StringUtils; | 32 | import org.jeecg.utils.StringUtils; |
25 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 33 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
26 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | 34 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
@@ -51,6 +59,8 @@ import org.jeecg.common.aspect.annotation.AutoLog; | @@ -51,6 +59,8 @@ import org.jeecg.common.aspect.annotation.AutoLog; | ||
51 | public class ContainerController extends JeecgController<Container, IContainerService> { | 59 | public class ContainerController extends JeecgController<Container, IContainerService> { |
52 | @Autowired | 60 | @Autowired |
53 | private IContainerService containerService; | 61 | private IContainerService containerService; |
62 | + @Resource | ||
63 | + private ILocationService locationService; | ||
54 | 64 | ||
55 | /** | 65 | /** |
56 | * 分页列表查询 | 66 | * 分页列表查询 |
@@ -71,8 +81,10 @@ public class ContainerController extends JeecgController<Container, IContainerSe | @@ -71,8 +81,10 @@ public class ContainerController extends JeecgController<Container, IContainerSe | ||
71 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 81 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
72 | container.setWarehouseCode(warehouseCode); | 82 | container.setWarehouseCode(warehouseCode); |
73 | QueryWrapper<Container> queryWrapper = QueryGenerator.initQueryWrapper(container, null); | 83 | QueryWrapper<Container> queryWrapper = QueryGenerator.initQueryWrapper(container, null); |
84 | + LambdaQueryWrapper<Container> containerLambdaQueryWrapper = queryWrapper.lambda(); | ||
85 | + containerLambdaQueryWrapper.orderByAsc(Container::getId); | ||
74 | Page<Container> page = new Page<Container>(pageNo, pageSize); | 86 | Page<Container> page = new Page<Container>(pageNo, pageSize); |
75 | - IPage<Container> pageList = containerService.page(page, queryWrapper); | 87 | + IPage<Container> pageList = containerService.page(page, containerLambdaQueryWrapper); |
76 | return Result.OK(pageList); | 88 | return Result.OK(pageList); |
77 | } | 89 | } |
78 | 90 | ||
@@ -105,7 +117,17 @@ public class ContainerController extends JeecgController<Container, IContainerSe | @@ -105,7 +117,17 @@ public class ContainerController extends JeecgController<Container, IContainerSe | ||
105 | @ApiOperation(value="容器管理-编辑", notes="容器管理-编辑") | 117 | @ApiOperation(value="容器管理-编辑", notes="容器管理-编辑") |
106 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 118 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
107 | public Result<String> edit(@RequestBody Container container) { | 119 | public Result<String> edit(@RequestBody Container container) { |
108 | - containerService.updateById(container); | 120 | + String locationCode = container.getLocationCode(); |
121 | + if(StringUtils.isNotEmpty(locationCode)) { | ||
122 | + Location location = locationService.getLocationByCode(locationCode, container.getWarehouseCode()); | ||
123 | + if(location == null) { | ||
124 | + throw new ServiceException("编辑的库位号不存在"); | ||
125 | + } | ||
126 | + } | ||
127 | + boolean success = containerService.updateById(container); | ||
128 | + if(!success) { | ||
129 | + throw new ServiceException("编辑失败"); | ||
130 | + } | ||
109 | return Result.OK("编辑成功!"); | 131 | return Result.OK("编辑成功!"); |
110 | } | 132 | } |
111 | 133 | ||
@@ -137,6 +159,23 @@ public class ContainerController extends JeecgController<Container, IContainerSe | @@ -137,6 +159,23 @@ public class ContainerController extends JeecgController<Container, IContainerSe | ||
137 | return Result.OK("批量删除成功!"); | 159 | return Result.OK("批量删除成功!"); |
138 | } | 160 | } |
139 | 161 | ||
162 | + /** | ||
163 | + * 获取打印数据 | ||
164 | + * | ||
165 | + * @param ids | ||
166 | + * @return | ||
167 | + */ | ||
168 | + @AutoLog(value = "容器管理-获取打印数据") | ||
169 | + @ApiOperation(value="容器管理-获取打印数据", notes="容器管理-获取打印数据") | ||
170 | + @PostMapping(value = "/getPrintContent") | ||
171 | + @ResponseBody | ||
172 | + public Result getPrintContent(@RequestParam(name="ids",required=true) String ids) { | ||
173 | + List<String> idlist = Arrays.asList(ids.split(",")); | ||
174 | + List<Container> containerList = containerService.listByIds(idlist); | ||
175 | + return Result.OK(containerList); | ||
176 | + } | ||
177 | + | ||
178 | + | ||
140 | /** | 179 | /** |
141 | * 通过id查询 | 180 | * 通过id查询 |
142 | * | 181 | * |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/location/controller/LocationController.java
@@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | ||
9 | import java.net.URLDecoder; | 9 | import java.net.URLDecoder; |
10 | import javax.servlet.http.HttpServletRequest; | 10 | import javax.servlet.http.HttpServletRequest; |
11 | import javax.servlet.http.HttpServletResponse; | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | ||
13 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
12 | import org.jeecg.common.api.vo.Result; | 14 | import org.jeecg.common.api.vo.Result; |
13 | import org.jeecg.common.system.query.QueryGenerator; | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | import org.jeecg.common.system.util.JwtUtil; | 16 | import org.jeecg.common.system.util.JwtUtil; |
@@ -19,9 +21,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage; | @@ -19,9 +21,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage; | ||
19 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 21 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
20 | import lombok.extern.slf4j.Slf4j; | 22 | import lombok.extern.slf4j.Slf4j; |
21 | 23 | ||
24 | +import org.jeecg.modules.wms.config.container.entity.Container; | ||
25 | +import org.jeecg.modules.wms.config.location.entity.BatchLocation; | ||
22 | import org.jeecg.modules.wms.config.location.entity.Location; | 26 | import org.jeecg.modules.wms.config.location.entity.Location; |
23 | import org.jeecg.modules.wms.config.location.service.ILocationService; | 27 | import org.jeecg.modules.wms.config.location.service.ILocationService; |
24 | import org.jeecg.utils.StringUtils; | 28 | import org.jeecg.utils.StringUtils; |
29 | +import org.jeecg.utils.constant.QuantityConstant; | ||
25 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 30 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
26 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | 31 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
27 | import org.jeecgframework.poi.excel.entity.ExportParams; | 32 | import org.jeecgframework.poi.excel.entity.ExportParams; |
@@ -70,14 +75,16 @@ public class LocationController extends JeecgController<Location, ILocationServi | @@ -70,14 +75,16 @@ public class LocationController extends JeecgController<Location, ILocationServi | ||
70 | HttpServletRequest req) { | 75 | HttpServletRequest req) { |
71 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 76 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
72 | location.setWarehouseCode(warehouseCode); | 77 | location.setWarehouseCode(warehouseCode); |
73 | - QueryWrapper<Location> queryWrapper = QueryGenerator.initQueryWrapper(location, req.getParameterMap()); | 78 | + QueryWrapper<Location> queryWrapper = QueryGenerator.initQueryWrapper(location, null); |
79 | + LambdaQueryWrapper<Location> locationLambdaQueryWrapper = queryWrapper.lambda(); | ||
80 | + locationLambdaQueryWrapper.orderByAsc(Location::getId); | ||
74 | Page<Location> page = new Page<Location>(pageNo, pageSize); | 81 | Page<Location> page = new Page<Location>(pageNo, pageSize); |
75 | - IPage<Location> pageList = locationService.page(page, queryWrapper); | 82 | + IPage<Location> pageList = locationService.page(page, locationLambdaQueryWrapper); |
76 | return Result.OK(pageList); | 83 | return Result.OK(pageList); |
77 | } | 84 | } |
78 | 85 | ||
79 | /** | 86 | /** |
80 | - * 添加 | 87 | + * 添加 |
81 | * | 88 | * |
82 | * @param location | 89 | * @param location |
83 | * @return | 90 | * @return |
@@ -94,6 +101,25 @@ public class LocationController extends JeecgController<Location, ILocationServi | @@ -94,6 +101,25 @@ public class LocationController extends JeecgController<Location, ILocationServi | ||
94 | return Result.OK("添加成功!"); | 101 | return Result.OK("添加成功!"); |
95 | } | 102 | } |
96 | 103 | ||
104 | + /** | ||
105 | + * 批量添加 | ||
106 | + * | ||
107 | + * @param batchLocation | ||
108 | + * @return | ||
109 | + */ | ||
110 | + @AutoLog(value = "库位管理-批量添加") | ||
111 | + @ApiOperation(value="库位管理-批量添加", notes="库位管理-批量添加") | ||
112 | + @PostMapping(value = "/batchAdd") | ||
113 | + public Result<String> batchAdd(@RequestBody BatchLocation batchLocation, HttpServletRequest req) { | ||
114 | + String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | ||
115 | + if(StringUtils.isNotEmpty(warehouseCode)) { | ||
116 | + batchLocation.setWarehouseCode(warehouseCode); | ||
117 | + } | ||
118 | + batchLocation.setStatus(QuantityConstant.STATUS_LOCATION_EMPTY); | ||
119 | + Result result = locationService.batchAdd(batchLocation); | ||
120 | + return result; | ||
121 | + } | ||
122 | + | ||
97 | /** | 123 | /** |
98 | * 编辑 | 124 | * 编辑 |
99 | * | 125 | * |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/location/entity/BatchLocation.java
0 → 100644
1 | +package org.jeecg.modules.wms.config.location.entity; | ||
2 | + | ||
3 | +import lombok.Data; | ||
4 | + | ||
5 | +/** | ||
6 | + * @author 游杰 | ||
7 | + */ | ||
8 | +@Data | ||
9 | +public class BatchLocation { | ||
10 | + | ||
11 | + private String prefix; | ||
12 | + private Integer firstRow; | ||
13 | + private Integer lastRow; | ||
14 | + private Integer firstColumn; | ||
15 | + private Integer lastColumn; | ||
16 | + private Integer firstLayer; | ||
17 | + private Integer lastLayer; | ||
18 | + private Integer firstGrid; | ||
19 | + private Integer lastGrid; | ||
20 | + private Integer roadWay; | ||
21 | + private String zoneCode; | ||
22 | + private String locationTypeCode; | ||
23 | + private String status; | ||
24 | + private int high; | ||
25 | + private String warehouseCode; | ||
26 | +} |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/location/service/ILocationService.java
1 | package org.jeecg.modules.wms.config.location.service; | 1 | package org.jeecg.modules.wms.config.location.service; |
2 | 2 | ||
3 | import com.baomidou.mybatisplus.extension.service.IService; | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
4 | +import org.jeecg.common.api.vo.Result; | ||
5 | +import org.jeecg.modules.wms.config.location.entity.BatchLocation; | ||
4 | import org.jeecg.modules.wms.config.location.entity.Location; | 6 | import org.jeecg.modules.wms.config.location.entity.Location; |
5 | 7 | ||
6 | import java.util.List; | 8 | import java.util.List; |
@@ -36,4 +38,5 @@ public interface ILocationService extends IService<Location> { | @@ -36,4 +38,5 @@ public interface ILocationService extends IService<Location> { | ||
36 | 38 | ||
37 | boolean haveUncompleteTaskInNear(Location location); | 39 | boolean haveUncompleteTaskInNear(Location location); |
38 | 40 | ||
41 | + Result batchAdd(BatchLocation batchLocation); | ||
39 | } | 42 | } |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/location/service/impl/LocationServiceImpl.java
1 | package org.jeecg.modules.wms.config.location.service.impl; | 1 | package org.jeecg.modules.wms.config.location.service.impl; |
2 | 2 | ||
3 | +import com.aliyun.oss.ServiceException; | ||
3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
6 | +import org.jeecg.common.api.vo.Result; | ||
7 | +import org.jeecg.modules.wms.config.location.entity.BatchLocation; | ||
5 | import org.jeecg.modules.wms.config.location.entity.Location; | 8 | import org.jeecg.modules.wms.config.location.entity.Location; |
6 | import org.jeecg.modules.wms.config.location.mapper.LocationMapper; | 9 | import org.jeecg.modules.wms.config.location.mapper.LocationMapper; |
7 | import org.jeecg.modules.wms.config.location.service.ILocationService; | 10 | import org.jeecg.modules.wms.config.location.service.ILocationService; |
11 | +import org.jeecg.modules.wms.config.locationType.entity.LocationType; | ||
12 | +import org.jeecg.modules.wms.config.locationType.service.ILocationTypeService; | ||
13 | +import org.jeecg.modules.wms.config.zone.entity.Zone; | ||
14 | +import org.jeecg.modules.wms.config.zone.service.IZoneService; | ||
8 | import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; | 15 | import org.jeecg.modules.wms.task.taskHeader.service.ITaskHeaderService; |
16 | +import org.jeecg.utils.StringUtils; | ||
9 | import org.jeecg.utils.constant.QuantityConstant; | 17 | import org.jeecg.utils.constant.QuantityConstant; |
10 | import org.springframework.stereotype.Service; | 18 | import org.springframework.stereotype.Service; |
11 | 19 | ||
12 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 20 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
21 | +import org.springframework.transaction.annotation.Transactional; | ||
13 | 22 | ||
14 | import javax.annotation.Resource; | 23 | import javax.annotation.Resource; |
24 | +import java.text.MessageFormat; | ||
15 | import java.util.ArrayList; | 25 | import java.util.ArrayList; |
16 | import java.util.Collections; | 26 | import java.util.Collections; |
17 | import java.util.Comparator; | 27 | import java.util.Comparator; |
@@ -28,6 +38,10 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | @@ -28,6 +38,10 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
28 | 38 | ||
29 | @Resource | 39 | @Resource |
30 | private ITaskHeaderService taskHeaderService; | 40 | private ITaskHeaderService taskHeaderService; |
41 | + @Resource | ||
42 | + private ILocationTypeService locationTypeService; | ||
43 | + @Resource | ||
44 | + private IZoneService zoneService; | ||
31 | 45 | ||
32 | @Override | 46 | @Override |
33 | public Location getLocationByCode(String locationCode, String warehouseCode) { | 47 | public Location getLocationByCode(String locationCode, String warehouseCode) { |
@@ -229,6 +243,95 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | @@ -229,6 +243,95 @@ public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> i | ||
229 | return false; | 243 | return false; |
230 | } | 244 | } |
231 | 245 | ||
246 | + @Override | ||
247 | + @Transactional(rollbackFor = Exception.class) | ||
248 | + public Result batchAdd(BatchLocation batchLocation) { | ||
249 | + String prefix = batchLocation.getPrefix(); | ||
250 | + Integer firstRow = batchLocation.getFirstRow(); | ||
251 | + Integer lastRow = batchLocation.getLastRow(); | ||
252 | + Integer firstColumn = batchLocation.getFirstColumn(); | ||
253 | + Integer lastColumn = batchLocation.getLastColumn(); | ||
254 | + Integer firstLayer = batchLocation.getFirstLayer(); | ||
255 | + Integer lastLayer = batchLocation.getLastLayer(); | ||
256 | + Integer roadWay = batchLocation.getRoadWay(); | ||
257 | + String zoneCode = batchLocation.getZoneCode(); | ||
258 | + String locationTypeCode = batchLocation.getLocationTypeCode(); | ||
259 | + String status = batchLocation.getStatus(); | ||
260 | + int high = batchLocation.getHigh(); | ||
261 | + String warehouseCode = batchLocation.getWarehouseCode(); | ||
262 | + if(StringUtils.isEmpty(prefix)) { | ||
263 | + return Result.error("批量增加库位时, 前缀为空"); | ||
264 | + } | ||
265 | + if(StringUtils.isEmpty(zoneCode)) { | ||
266 | + return Result.error("批量增加库位时, 库区编码为空"); | ||
267 | + } | ||
268 | + if(StringUtils.isEmpty(locationTypeCode)) { | ||
269 | + return Result.error("批量增加库位时, 库位类型编码为空"); | ||
270 | + } | ||
271 | + if(StringUtils.isEmpty(status)) { | ||
272 | + return Result.error("批量增加库位时, 状态为空"); | ||
273 | + } | ||
274 | + if(StringUtils.isEmpty(warehouseCode)) { | ||
275 | + return Result.error("批量增加库位时, 仓库编码为空"); | ||
276 | + } | ||
277 | + LocationType locationType = locationTypeService.getLocationTypeByCode(locationTypeCode, warehouseCode); | ||
278 | + if(locationType == null) { | ||
279 | + return Result.error("批量增加库位时, 没有找到库位类型"); | ||
280 | + } | ||
281 | + Zone zone = zoneService.getZoneByCode(zoneCode, warehouseCode); | ||
282 | + if(zone == null) { | ||
283 | + return Result.error("批量增加库位时, 没有找到库区"); | ||
284 | + } | ||
285 | + List<Location> locationList = new ArrayList<>(); | ||
286 | + for(int i=firstRow; i<=lastRow; i++) { | ||
287 | + for(int j=firstColumn; j<= lastColumn; j++) { | ||
288 | + for( int k=firstLayer; k<= lastLayer; k++) { | ||
289 | + Location location = new Location(); | ||
290 | + location.setRow(i); | ||
291 | + location.setIcolumn(j); | ||
292 | + location.setLayer(k); | ||
293 | + location.setRoadWay(roadWay); | ||
294 | + location.setZoneCode(zoneCode); | ||
295 | + location.setLocationTypeCode(locationTypeCode); | ||
296 | + location.setStatus(status); | ||
297 | + location.setHigh(high); | ||
298 | + location.setRowFlag(QuantityConstant.ROW_IN); | ||
299 | + location.setWarehouseCode(warehouseCode); | ||
300 | + location.setEnable(QuantityConstant.STATUS_ENABLE); | ||
301 | + String code = MessageFormat.format("{0}{1}{2}{3}", | ||
302 | + prefix, | ||
303 | + String.format("%02d", i), | ||
304 | + String.format("%02d", j), | ||
305 | + String.format("%02d", k)); | ||
306 | + location.setCode(code); | ||
307 | + locationList.add(location); | ||
308 | + } | ||
309 | + } | ||
310 | + } | ||
311 | + // 计算有多少列 | ||
312 | + int rowSize = lastRow - firstRow; | ||
313 | + if(rowSize == 4) { | ||
314 | + for (Location location3 : locationList) { | ||
315 | + for (int i = 0; i < rowSize; i++) { | ||
316 | + int row = location3.getRow(); | ||
317 | + row = row % rowSize; | ||
318 | + // 每个巷道的第1行和第4行为外侧,深库位 | ||
319 | + if(row == 1 || row == 0) { | ||
320 | + location3.setRowFlag(QuantityConstant.ROW_OUT); | ||
321 | + } else { | ||
322 | + location3.setRowFlag(QuantityConstant.ROW_IN); | ||
323 | + } | ||
324 | + } | ||
325 | + } | ||
326 | + } | ||
327 | + | ||
328 | + boolean success = saveBatch(locationList); | ||
329 | + if(!success) { | ||
330 | + throw new ServiceException("批量增加库位失败"); | ||
331 | + } | ||
332 | + return Result.ok("批量增加库位成功"); | ||
333 | + } | ||
334 | + | ||
232 | private boolean getOutSideCanMove(Location location) { | 335 | private boolean getOutSideCanMove(Location location) { |
233 | Location locaiton2 = getInsideNear(location); | 336 | Location locaiton2 = getInsideNear(location); |
234 | if (locaiton2.getStatus().equals(QuantityConstant.STATUS_LOCATION_LOCK)) { | 337 | if (locaiton2.getStatus().equals(QuantityConstant.STATUS_LOCATION_LOCK)) { |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/task/taskHeader/controller/TaskHeaderController.java
@@ -346,7 +346,7 @@ public class TaskHeaderController extends JeecgController<TaskHeader, ITaskHeade | @@ -346,7 +346,7 @@ public class TaskHeaderController extends JeecgController<TaskHeader, ITaskHeade | ||
346 | @ApiOperation(value="任务表-取消任务", notes="任务表-取消任务") | 346 | @ApiOperation(value="任务表-取消任务", notes="任务表-取消任务") |
347 | @PostMapping( "/cancelTask") | 347 | @PostMapping( "/cancelTask") |
348 | @ResponseBody | 348 | @ResponseBody |
349 | - public Result cancelTask(String ids) { | 349 | + public Result cancelTask(@RequestParam(name="ids",required=true) String ids) { |
350 | if (StringUtils.isEmpty(ids)) { | 350 | if (StringUtils.isEmpty(ids)) { |
351 | return Result.error("taskId不能为空"); | 351 | return Result.error("taskId不能为空"); |
352 | } | 352 | } |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -737,6 +737,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -737,6 +737,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
737 | } | 737 | } |
738 | 738 | ||
739 | @Override | 739 | @Override |
740 | + @Transactional(rollbackFor = Exception.class) | ||
740 | public Result cancelTask(Integer taskId) { | 741 | public Result cancelTask(Integer taskId) { |
741 | TaskHeader taskHeader = getById(taskId); | 742 | TaskHeader taskHeader = getById(taskId); |
742 | if(taskHeader == null) { | 743 | if(taskHeader == null) { |
@@ -756,21 +757,18 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -756,21 +757,18 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
756 | if(!success) { | 757 | if(!success) { |
757 | return Result.error("取消任务失败, 删除任务失败"); | 758 | return Result.error("取消任务失败, 删除任务失败"); |
758 | } | 759 | } |
759 | - Result result = null; | 760 | + Result result = Result.ok("取消任务成功"); |
760 | switch (taskType) { | 761 | switch (taskType) { |
761 | case QuantityConstant.TASK_TYPE_WHOLERECEIPT: | 762 | case QuantityConstant.TASK_TYPE_WHOLERECEIPT: |
762 | case QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT: | 763 | case QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT: |
763 | - cancelLocationAndContainerStatus(taskHeader); | ||
764 | result = cancelReceiptTask(taskHeader); | 764 | result = cancelReceiptTask(taskHeader); |
765 | break; | 765 | break; |
766 | case QuantityConstant.TASK_TYPE_WHOLESHIPMENT: | 766 | case QuantityConstant.TASK_TYPE_WHOLESHIPMENT: |
767 | case QuantityConstant.TASK_TYPE_SORTINGSHIPMENT: | 767 | case QuantityConstant.TASK_TYPE_SORTINGSHIPMENT: |
768 | - cancelLocationAndContainerStatus(taskHeader); | ||
769 | result = cancelShipmentTask(taskHeader); | 768 | result = cancelShipmentTask(taskHeader); |
770 | break; | 769 | break; |
771 | - default: | ||
772 | - throw new ServiceException("不支持的任务类型" + taskType); | ||
773 | } | 770 | } |
771 | + cancelLocationAndContainerStatus(taskHeader); | ||
774 | return result; | 772 | return result; |
775 | } | 773 | } |
776 | 774 | ||
@@ -1813,14 +1811,14 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1813,14 +1811,14 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1813 | String warehouseCode = taskHeader.getWarehouseCode(); | 1811 | String warehouseCode = taskHeader.getWarehouseCode(); |
1814 | 1812 | ||
1815 | boolean success = false; | 1813 | boolean success = false; |
1816 | - if(StringUtils.isEmpty(fromLocationCode)) { | 1814 | + if(StringUtils.isNotEmpty(fromLocationCode)) { |
1817 | success = locationService.updateStatus(fromLocationCode, | 1815 | success = locationService.updateStatus(fromLocationCode, |
1818 | QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | 1816 | QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); |
1819 | if(!success) { | 1817 | if(!success) { |
1820 | throw new ServiceException("取消任务时, 更新起始库位状态失败"); | 1818 | throw new ServiceException("取消任务时, 更新起始库位状态失败"); |
1821 | } | 1819 | } |
1822 | } | 1820 | } |
1823 | - if(StringUtils.isEmpty(toLocationCode)) { | 1821 | + if(StringUtils.isNotEmpty(toLocationCode)) { |
1824 | success = locationService.updateStatus(toLocationCode, | 1822 | success = locationService.updateStatus(toLocationCode, |
1825 | QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); | 1823 | QuantityConstant.STATUS_LOCATION_EMPTY, warehouseCode); |
1826 | if(!success) { | 1824 | if(!success) { |