Commit c253603245c4c0f9f735a8ebee8975b2dca8b7c7

Authored by 陈翱
2 parents 7a4f377b d8ad8df5

Merge remote-tracking branch 'origin/develop' into develop

Showing 34 changed files with 449 additions and 149 deletions
ant-design-vue-jeecg/src/views/system/config/ContainerList.vue
@@ -20,8 +20,7 @@ @@ -20,8 +20,7 @@
20 show-search 20 show-search
21 placeholder="请选择容器类型" 21 placeholder="请选择容器类型"
22 option-filter-prop="children" 22 option-filter-prop="children"
23 - v-model="queryParam.containerTypeCode"  
24 - > 23 + v-model="queryParam.containerTypeCode">
25 <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code" 24 <a-select-option v-for="item in containerTypeList" :key="item.name" :value="item.code"
26 >{{ item.name }} 25 >{{ item.name }}
27 </a-select-option> 26 </a-select-option>
@@ -252,6 +251,13 @@ export default { @@ -252,6 +251,13 @@ export default {
252 scopedSlots: {customRender: 'fillStatus_dictText'} 251 scopedSlots: {customRender: 'fillStatus_dictText'}
253 }, 252 },
254 { 253 {
  254 + title: '库区',
  255 + align: "center",
  256 + dataIndex: 'zoneCode',
  257 + key: 'zoneCode',
  258 + scopedSlots: {customRender: 'zoneCode'}
  259 + },
  260 + {
255 title: '创建人', 261 title: '创建人',
256 align: 'center', 262 align: 'center',
257 dataIndex: 'createBy' 263 dataIndex: 'createBy'
ant-design-vue-jeecg/src/views/system/config/LocationHighList.vue
@@ -5,6 +5,19 @@ @@ -5,6 +5,19 @@
5 <a-form layout="inline" @keyup.enter.native="searchQuery"> 5 <a-form layout="inline" @keyup.enter.native="searchQuery">
6 <a-row :gutter="24"> 6 <a-row :gutter="24">
7 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 7 <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="库区">
  9 + <a-select
  10 + show-search
  11 + placeholder="请选择库区"
  12 + option-filter-prop="children"
  13 + v-model="queryParam.zoneCode">
  14 + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">
  15 + {{ item.name }}
  16 + </a-select-option>
  17 + </a-select>
  18 + </a-form-item>
  19 + </a-col>
  20 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
8 <a-form-item label="编码"> 21 <a-form-item label="编码">
9 <a-input placeholder="请输入编码" v-model="queryParam.code"></a-input> 22 <a-input placeholder="请输入编码" v-model="queryParam.code"></a-input>
10 </a-form-item> 23 </a-form-item>
@@ -68,6 +81,13 @@ @@ -68,6 +81,13 @@
68 class="j-table-force-nowrap" 81 class="j-table-force-nowrap"
69 @change="handleTableChange"> 82 @change="handleTableChange">
70 83
  84 +
  85 + <span slot="zoneCode" slot-scope="zoneCode">
  86 + <a-tag :key="zoneCode" color=blue>
  87 + {{ solutionZoneCode(zoneCode) }}
  88 + </a-tag>
  89 + </span>
  90 +
71 <span slot="locationTypeCode" slot-scope="locationTypeCode"> 91 <span slot="locationTypeCode" slot-scope="locationTypeCode">
72 <a-tag :key="locationTypeCode" color=pink> 92 <a-tag :key="locationTypeCode" color=pink>
73 {{ solutionLocationType(locationTypeCode) }} 93 {{ solutionLocationType(locationTypeCode) }}
@@ -125,7 +145,7 @@ import &#39;@/assets/less/TableExpand.less&#39; @@ -125,7 +145,7 @@ import &#39;@/assets/less/TableExpand.less&#39;
125 import {mixinDevice} from '@/utils/mixin' 145 import {mixinDevice} from '@/utils/mixin'
126 import {JeecgListMixin} from '@/mixins/JeecgListMixin' 146 import {JeecgListMixin} from '@/mixins/JeecgListMixin'
127 import LocationHighModal from './modules/LocationHighModal' 147 import LocationHighModal from './modules/LocationHighModal'
128 -import {getLocationTypeList} from '@/api/api' 148 +import {getLocationTypeList, getZoneList} from '@/api/api'
129 149
130 export default { 150 export default {
131 name: 'LocationHighList', 151 name: 'LocationHighList',
@@ -167,6 +187,13 @@ export default { @@ -167,6 +187,13 @@ export default {
167 scopedSlots: {customRender: 'locationTypeCode'} 187 scopedSlots: {customRender: 'locationTypeCode'}
168 }, 188 },
169 { 189 {
  190 + title: '库区',
  191 + align: "center",
  192 + dataIndex: 'zoneCode',
  193 + key: 'zoneCode',
  194 + scopedSlots: {customRender: 'zoneCode'}
  195 + },
  196 + {
170 title: '高低位', 197 title: '高低位',
171 align: "center", 198 align: "center",
172 dataIndex: 'high_dictText' 199 dataIndex: 'high_dictText'
@@ -246,7 +273,23 @@ export default { @@ -246,7 +273,23 @@ export default {
246 if (res.success) { 273 if (res.success) {
247 this.locationTypeList = res.result 274 this.locationTypeList = res.result
248 } 275 }
  276 + }),
  277 + getZoneList().then((res) => {
  278 + if (res.success) {
  279 + this.zoneList = res.result
  280 + }
  281 + });
  282 + },
  283 + solutionZoneCode(value) {
  284 + var actions = []
  285 + console.log("solutionZoneCode " + this.zoneList);
  286 + Object.keys(this.zoneList).some((key) => {
  287 + if (this.zoneList[key].code == ('' + value)) {
  288 + actions.push(this.zoneList[key].name)
  289 + return true
  290 + }
249 }) 291 })
  292 + return actions.join('')
250 }, 293 },
251 solutionLocationType(value) { 294 solutionLocationType(value) {
252 var actions = [] 295 var actions = []
ant-design-vue-jeecg/src/views/system/config/ParameterConfigurationList.vue
@@ -14,6 +14,20 @@ @@ -14,6 +14,20 @@
14 <a-input placeholder="请输入参数键名" v-model="queryParam.code"></a-input> 14 <a-input placeholder="请输入参数键名" v-model="queryParam.code"></a-input>
15 </a-form-item> 15 </a-form-item>
16 </a-col> 16 </a-col>
  17 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
  18 + <a-form-item label="库区">
  19 + <a-select
  20 + show-search
  21 + placeholder="请选择库区"
  22 + option-filter-prop="children"
  23 + v-model="queryParam.zoneCode">
  24 + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">{{
  25 + item.name
  26 + }}
  27 + </a-select-option>
  28 + </a-select>
  29 + </a-form-item>
  30 + </a-col>
17 <template v-if="toggleSearchStatus"> 31 <template v-if="toggleSearchStatus">
18 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 32 <a-col :xl="6" :lg="7" :md="8" :sm="24">
19 <a-form-item label="参数键值"> 33 <a-form-item label="参数键值">
@@ -79,6 +93,12 @@ @@ -79,6 +93,12 @@
79 class="j-table-force-nowrap" 93 class="j-table-force-nowrap"
80 @change="handleTableChange"> 94 @change="handleTableChange">
81 95
  96 + <span slot="zoneCode" slot-scope="zoneCode">
  97 + <a-tag :key="zoneCode" color=blue>
  98 + {{ solutionZoneCode(zoneCode) }}
  99 + </a-tag>
  100 + </span>
  101 +
82 <template slot="htmlSlot" slot-scope="text"> 102 <template slot="htmlSlot" slot-scope="text">
83 <div v-html="text"></div> 103 <div v-html="text"></div>
84 </template> 104 </template>
@@ -132,6 +152,7 @@ import &#39;@/assets/less/TableExpand.less&#39; @@ -132,6 +152,7 @@ import &#39;@/assets/less/TableExpand.less&#39;
132 import {mixinDevice} from '@/utils/mixin' 152 import {mixinDevice} from '@/utils/mixin'
133 import {JeecgListMixin} from '@/mixins/JeecgListMixin' 153 import {JeecgListMixin} from '@/mixins/JeecgListMixin'
134 import ParameterConfigurationModal from './modules/ParameterConfigurationModal' 154 import ParameterConfigurationModal from './modules/ParameterConfigurationModal'
  155 +import {getZoneList} from "@api/api";
135 156
136 export default { 157 export default {
137 name: 'ParameterConfigurationList', 158 name: 'ParameterConfigurationList',
@@ -142,6 +163,7 @@ export default { @@ -142,6 +163,7 @@ export default {
142 data() { 163 data() {
143 return { 164 return {
144 description: '参数配置管理页面', 165 description: '参数配置管理页面',
  166 + zoneList: [],
145 // 表头 167 // 表头
146 columns: [ 168 columns: [
147 { 169 {
@@ -155,6 +177,13 @@ export default { @@ -155,6 +177,13 @@ export default {
155 } 177 }
156 }, 178 },
157 { 179 {
  180 + title: '库区',
  181 + align: "center",
  182 + dataIndex: 'zoneCode',
  183 + key: 'zoneCode',
  184 + scopedSlots: {customRender: 'zoneCode'}
  185 + },
  186 + {
158 title: '参数名称', 187 title: '参数名称',
159 align: "center", 188 align: "center",
160 dataIndex: 'name' 189 dataIndex: 'name'
@@ -217,6 +246,7 @@ export default { @@ -217,6 +246,7 @@ export default {
217 }, 246 },
218 created() { 247 created() {
219 this.getSuperFieldList(); 248 this.getSuperFieldList();
  249 + this.loadFrom();
220 }, 250 },
221 computed: { 251 computed: {
222 importExcelUrl: function () { 252 importExcelUrl: function () {
@@ -226,6 +256,24 @@ export default { @@ -226,6 +256,24 @@ export default {
226 methods: { 256 methods: {
227 initDictConfig() { 257 initDictConfig() {
228 }, 258 },
  259 + loadFrom() {
  260 + getZoneList().then((res) => {
  261 + if (res.success) {
  262 + this.zoneList = res.result
  263 + }
  264 + });
  265 + },
  266 + solutionZoneCode(value) {
  267 + var actions = []
  268 + console.log("solutionZoneCode " + this.zoneList);
  269 + Object.keys(this.zoneList).some((key) => {
  270 + if (this.zoneList[key].code == ('' + value)) {
  271 + actions.push(this.zoneList[key].name)
  272 + return true
  273 + }
  274 + })
  275 + return actions.join('')
  276 + },
229 getSuperFieldList() { 277 getSuperFieldList() {
230 let fieldList = []; 278 let fieldList = [];
231 fieldList.push({type: 'string', value: 'name', text: '参数名称', dictCode: ''}) 279 fieldList.push({type: 'string', value: 'name', text: '参数名称', dictCode: ''})
ant-design-vue-jeecg/src/views/system/config/modules/ContainerForm.vue
@@ -17,6 +17,20 @@ @@ -17,6 +17,20 @@
17 </a-form-model-item> 17 </a-form-model-item>
18 </a-col> 18 </a-col>
19 <a-col :span="24"> 19 <a-col :span="24">
  20 + <a-form-model-item label="库区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zoneCode">
  21 + <a-select
  22 + show-search
  23 + placeholder="请选择库区"
  24 + option-filter-prop="children"
  25 + v-model="model.zoneCode">
  26 + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">{{
  27 + item.name
  28 + }}
  29 + </a-select-option>
  30 + </a-select>
  31 + </a-form-model-item>
  32 + </a-col>
  33 + <a-col :span="24">
20 <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userdef1"> 34 <a-form-model-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userdef1">
21 <a-input v-model="model.userdef1" placeholder="请输入数量"></a-input> 35 <a-input v-model="model.userdef1" placeholder="请输入数量"></a-input>
22 </a-form-model-item> 36 </a-form-model-item>
ant-design-vue-jeecg/src/views/system/config/modules/ContainerModal.vue
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
15 <script> 15 <script>
16 16
17 import ContainerForm from './ContainerForm' 17 import ContainerForm from './ContainerForm'
  18 +import {getZoneList} from "@api/api";
18 19
19 export default { 20 export default {
20 name: 'ContainerModal', 21 name: 'ContainerModal',
ant-design-vue-jeecg/src/views/system/config/modules/LocationHighForm.vue
@@ -19,6 +19,20 @@ @@ -19,6 +19,20 @@
19 </a-form-model-item> 19 </a-form-model-item>
20 </a-col> 20 </a-col>
21 <a-col :span="24"> 21 <a-col :span="24">
  22 + <a-form-model-item label="库区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zoneCode">
  23 + <a-select
  24 + show-search
  25 + placeholder="请选择库区"
  26 + option-filter-prop="children"
  27 + v-model="model.zoneCode">
  28 + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">{{
  29 + item.name
  30 + }}
  31 + </a-select-option>
  32 + </a-select>
  33 + </a-form-model-item>
  34 + </a-col>
  35 + <a-col :span="24">
22 <a-form-model-item label="高低位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="high"> 36 <a-form-model-item label="高低位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="high">
23 <j-dict-select-tag type="list" v-model="model.high" dictCode="high_status" placeholder="请选择高低位"/> 37 <j-dict-select-tag type="list" v-model="model.high" dictCode="high_status" placeholder="请选择高低位"/>
24 </a-form-model-item> 38 </a-form-model-item>
@@ -38,6 +52,7 @@ @@ -38,6 +52,7 @@
38 52
39 import {httpAction, getAction} from '@/api/manage' 53 import {httpAction, getAction} from '@/api/manage'
40 import {validateDuplicateValue} from '@/utils/util' 54 import {validateDuplicateValue} from '@/utils/util'
  55 +import {getContainerTypeList, getZoneList} from "@api/api";
41 56
42 export default { 57 export default {
43 name: 'LocationHighForm', 58 name: 'LocationHighForm',
@@ -53,6 +68,7 @@ export default { @@ -53,6 +68,7 @@ export default {
53 data() { 68 data() {
54 return { 69 return {
55 model: {}, 70 model: {},
  71 + zoneList: [],
56 labelCol: { 72 labelCol: {
57 xs: {span: 24}, 73 xs: {span: 24},
58 sm: {span: 5}, 74 sm: {span: 5},
@@ -91,6 +107,7 @@ export default { @@ -91,6 +107,7 @@ export default {
91 created() { 107 created() {
92 //备份model原始值 108 //备份model原始值
93 this.modelDefault = JSON.parse(JSON.stringify(this.model)); 109 this.modelDefault = JSON.parse(JSON.stringify(this.model));
  110 + this.loadFrom();
94 }, 111 },
95 methods: { 112 methods: {
96 add() { 113 add() {
@@ -100,6 +117,13 @@ export default { @@ -100,6 +117,13 @@ export default {
100 this.model = Object.assign({}, record); 117 this.model = Object.assign({}, record);
101 this.visible = true; 118 this.visible = true;
102 }, 119 },
  120 + loadFrom() {
  121 + getZoneList().then((res) => {
  122 + if (res.success) {
  123 + this.zoneList = res.result
  124 + }
  125 + });
  126 + },
103 submitForm() { 127 submitForm() {
104 const that = this; 128 const that = this;
105 // 触发表单验证 129 // 触发表单验证
ant-design-vue-jeecg/src/views/system/config/modules/ParameterConfigurationForm.vue
@@ -14,6 +14,20 @@ @@ -14,6 +14,20 @@
14 </a-form-model-item> 14 </a-form-model-item>
15 </a-col> 15 </a-col>
16 <a-col :span="24"> 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">
  23 + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">{{
  24 + item.name
  25 + }}
  26 + </a-select-option>
  27 + </a-select>
  28 + </a-form-model-item>
  29 + </a-col>
  30 + <a-col :span="24">
17 <a-form-model-item label="参数键值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="value"> 31 <a-form-model-item label="参数键值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="value">
18 <a-input v-model="model.value" placeholder="请输入参数键值"></a-input> 32 <a-input v-model="model.value" placeholder="请输入参数键值"></a-input>
19 </a-form-model-item> 33 </a-form-model-item>
@@ -33,6 +47,7 @@ @@ -33,6 +47,7 @@
33 47
34 import {httpAction, getAction} from '@/api/manage' 48 import {httpAction, getAction} from '@/api/manage'
35 import {validateDuplicateValue} from '@/utils/util' 49 import {validateDuplicateValue} from '@/utils/util'
  50 +import {getZoneList} from "@api/api";
36 51
37 export default { 52 export default {
38 name: 'ParameterConfigurationForm', 53 name: 'ParameterConfigurationForm',
@@ -48,6 +63,7 @@ export default { @@ -48,6 +63,7 @@ export default {
48 data() { 63 data() {
49 return { 64 return {
50 model: {}, 65 model: {},
  66 + zoneList: [],
51 labelCol: { 67 labelCol: {
52 xs: {span: 24}, 68 xs: {span: 24},
53 sm: {span: 5}, 69 sm: {span: 5},
@@ -73,6 +89,7 @@ export default { @@ -73,6 +89,7 @@ export default {
73 created() { 89 created() {
74 //备份model原始值 90 //备份model原始值
75 this.modelDefault = JSON.parse(JSON.stringify(this.model)); 91 this.modelDefault = JSON.parse(JSON.stringify(this.model));
  92 + this.loadFrom();
76 }, 93 },
77 methods: { 94 methods: {
78 add() { 95 add() {
@@ -82,6 +99,13 @@ export default { @@ -82,6 +99,13 @@ export default {
82 this.model = Object.assign({}, record); 99 this.model = Object.assign({}, record);
83 this.visible = true; 100 this.visible = true;
84 }, 101 },
  102 + loadFrom() {
  103 + getZoneList().then((res) => {
  104 + if (res.success) {
  105 + this.zoneList = res.result
  106 + }
  107 + });
  108 + },
85 submitForm() { 109 submitForm() {
86 const that = this; 110 const that = this;
87 // 触发表单验证 111 // 触发表单验证
ant-design-vue-jeecg/src/views/system/shipment/ShipmentDetailList.vue
@@ -157,11 +157,16 @@ export default { @@ -157,11 +157,16 @@ export default {
157 dataIndex: 'qty' 157 dataIndex: 'qty'
158 }, 158 },
159 { 159 {
160 - title: '已出数量', 160 + title: '配盘数量',
161 align: "center", 161 align: "center",
162 dataIndex: 'taskQty' 162 dataIndex: 'taskQty'
163 }, 163 },
164 { 164 {
  165 + title: '已出数量',
  166 + align: "center",
  167 + dataIndex: 'shipmentQty'
  168 + },
  169 + {
165 title: '可出数量', 170 title: '可出数量',
166 align: "center", 171 align: "center",
167 dataIndex: 'availableQty' 172 dataIndex: 'availableQty'
ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderList.vue
@@ -5,6 +5,20 @@ @@ -5,6 +5,20 @@
5 <a-form layout="inline" @keyup.enter.native="searchQuery"> 5 <a-form layout="inline" @keyup.enter.native="searchQuery">
6 <a-row :gutter="24"> 6 <a-row :gutter="24">
7 <a-col :xl="6" :lg="7" :md="8" :sm="24"> 7 <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8 + <a-form-item label="库区">
  9 + <a-select
  10 + show-search
  11 + placeholder="请选择库区"
  12 + option-filter-prop="children"
  13 + v-model="queryParam.zoneCode">
  14 + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">{{
  15 + item.name
  16 + }}
  17 + </a-select-option>
  18 + </a-select>
  19 + </a-form-item>
  20 + </a-col>
  21 + <a-col :xl="6" :lg="7" :md="8" :sm="24">
8 <a-form-item label="出库单编码"> 22 <a-form-item label="出库单编码">
9 <a-input placeholder="请输入出库单编码" v-model="queryParam.code"></a-input> 23 <a-input placeholder="请输入出库单编码" v-model="queryParam.code"></a-input>
10 </a-form-item> 24 </a-form-item>
@@ -158,6 +172,12 @@ @@ -158,6 +172,12 @@
158 </a-tag> 172 </a-tag>
159 </span> 173 </span>
160 174
  175 + <span slot="zoneCode" slot-scope="zoneCode">
  176 + <a-tag :key="zoneCode" color=blue>
  177 + {{ solutionZoneCode(zoneCode) }}
  178 + </a-tag>
  179 + </span>
  180 +
161 <span slot="type" slot-scope="type"> 181 <span slot="type" slot-scope="type">
162 <a-tag :key="type" color=pink> 182 <a-tag :key="type" color=pink>
163 {{ solutionShipmentType(type) }} 183 {{ solutionShipmentType(type) }}
@@ -197,8 +217,8 @@ @@ -197,8 +217,8 @@
197 </a-popconfirm> 217 </a-popconfirm>
198 <a v-if="((record.firstStatus >= 15 && record.firstStatus != '20' && record.lastStatus <= 200)) 218 <a v-if="((record.firstStatus >= 15 && record.firstStatus != '20' && record.lastStatus <= 200))
199 || (flowOff == '0' && record.lastStatus <= 200)" @click="autoShipmentCombine(record)" v-has="'shipmentHeader:autoShipmentCombine'"><a-button type="primary">自动配盘</a-button><a-divider type="vertical"/></a> 219 || (flowOff == '0' && record.lastStatus <= 200)" @click="autoShipmentCombine(record)" v-has="'shipmentHeader:autoShipmentCombine'"><a-button type="primary">自动配盘</a-button><a-divider type="vertical"/></a>
200 - <a v-if="((record.firstStatus >= 15 && record.firstStatus != '20' && record.lastStatus < 800))  
201 - || (flowOff == '0' && record.lastStatus < 800)" @click="openAutoShipmentCombine(record)" v-has="'shipmentHeader:autoShipment'"><a-button type="primary">自动出库</a-button></a> 220 + <a v-if="((record.firstStatus >= 15 && record.firstStatus != '20' && record.lastStatus <= 200))
  221 + || (flowOff == '0' && record.lastStatus <= 200)" @click="openAutoShipmentCombine(record)" v-has="'shipmentHeader:autoShipment'"><a-button type="primary">自动出库</a-button></a>
202 <a-dropdown v-if="(record.firstStatus > 0 && record.firstStatus <= 20 && flowOff=='1') || (record.firstStatus == 0 && record.lastStatus == 0 && record.referCode == null)"> 222 <a-dropdown v-if="(record.firstStatus > 0 && record.firstStatus <= 20 && flowOff=='1') || (record.firstStatus == 0 && record.lastStatus == 0 && record.referCode == null)">
203 <a class="ant-dropdown-link"><a-divider type="vertical"/>更多 <a-icon type="down"/></a> 223 <a class="ant-dropdown-link"><a-divider type="vertical"/>更多 <a-icon type="down"/></a>
204 <a-menu slot="overlay"> 224 <a-menu slot="overlay">
@@ -240,7 +260,7 @@ import {getAction} from &#39;@/api/manage&#39; @@ -240,7 +260,7 @@ import {getAction} from &#39;@/api/manage&#39;
240 import ShipmentDetailList from './ShipmentDetailList' 260 import ShipmentDetailList from './ShipmentDetailList'
241 import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil' 261 import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil'
242 import '@/assets/less/TableExpand.less' 262 import '@/assets/less/TableExpand.less'
243 -import {getCompanyList, backErpShipment} from '@/api/api' 263 +import {getCompanyList, backErpShipment, getZoneList} from '@/api/api'
244 import {getShipmentTypeList} from '@/api/api' 264 import {getShipmentTypeList} from '@/api/api'
245 import {getCustomerList} from '@/api/api' 265 import {getCustomerList} from '@/api/api'
246 import {autoCombination} from '@/api/api' 266 import {autoCombination} from '@/api/api'
@@ -266,6 +286,7 @@ export default { @@ -266,6 +286,7 @@ export default {
266 selectIndex: null, 286 selectIndex: null,
267 description: '出库单管理页面', 287 description: '出库单管理页面',
268 companyList: [], 288 companyList: [],
  289 + zoneList: [],
269 shipmentTypeList: [], 290 shipmentTypeList: [],
270 customerList: [], 291 customerList: [],
271 username: '', 292 username: '',
@@ -285,6 +306,13 @@ export default { @@ -285,6 +306,13 @@ export default {
285 dataIndex: 'code' 306 dataIndex: 'code'
286 }, 307 },
287 { 308 {
  309 + title: '库区',
  310 + align: "center",
  311 + dataIndex: 'zoneCode',
  312 + key: 'zoneCode',
  313 + scopedSlots: {customRender: 'zoneCode'}
  314 + },
  315 + {
288 title: '货主', 316 title: '货主',
289 align: "center", 317 align: "center",
290 dataIndex: 'companyCode', 318 dataIndex: 'companyCode',
@@ -528,6 +556,11 @@ export default { @@ -528,6 +556,11 @@ export default {
528 this.customerList = res.result 556 this.customerList = res.result
529 } 557 }
530 }); 558 });
  559 + getZoneList().then((res) => {
  560 + if (res.success) {
  561 + this.zoneList = res.result
  562 + }
  563 + });
531 }, 564 },
532 batchPrint() { 565 batchPrint() {
533 if (this.selectedRowKeys.length <= 0) { 566 if (this.selectedRowKeys.length <= 0) {
@@ -549,6 +582,17 @@ export default { @@ -549,6 +582,17 @@ export default {
549 }) 582 })
550 return actions.join('') 583 return actions.join('')
551 }, 584 },
  585 + solutionZoneCode(value) {
  586 + var actions = []
  587 + console.log("solutionZoneCode " + this.zoneList);
  588 + Object.keys(this.zoneList).some((key) => {
  589 + if (this.zoneList[key].code == ('' + value)) {
  590 + actions.push(this.zoneList[key].name)
  591 + return true
  592 + }
  593 + })
  594 + return actions.join('')
  595 + },
552 solutionShipmentType(value) { 596 solutionShipmentType(value) {
553 var actions = [] 597 var actions = []
554 Object.keys(this.shipmentTypeList).some((key) => { 598 Object.keys(this.shipmentTypeList).some((key) => {
@@ -624,6 +668,7 @@ export default { @@ -624,6 +668,7 @@ export default {
624 let fieldList = []; 668 let fieldList = [];
625 fieldList.push({type: 'string', value: 'code', text: '出库单编码', dictCode: ''}) 669 fieldList.push({type: 'string', value: 'code', text: '出库单编码', dictCode: ''})
626 fieldList.push({type: 'string', value: 'companyCode', text: '货主', dictCode: ''}) 670 fieldList.push({type: 'string', value: 'companyCode', text: '货主', dictCode: ''})
  671 + fieldList.push({type: 'string', value: 'zoneCode', text: '库区', dictCode: ''})
627 fieldList.push({type: 'string', value: 'type', text: '出库单类型', dictCode: ''}) 672 fieldList.push({type: 'string', value: 'type', text: '出库单类型', dictCode: ''})
628 fieldList.push({type: 'int', value: 'firstStatus', text: '头状态', dictCode: 'shipment_status'}) 673 fieldList.push({type: 'int', value: 'firstStatus', text: '头状态', dictCode: 'shipment_status'})
629 fieldList.push({type: 'int', value: 'lastStatus', text: '尾状态', dictCode: 'shipment_status'}) 674 fieldList.push({type: 'int', value: 'lastStatus', text: '尾状态', dictCode: 'shipment_status'})
ant-design-vue-jeecg/src/views/system/shipment/modules/ShipmentHeaderModal.vue
@@ -42,6 +42,21 @@ @@ -42,6 +42,21 @@
42 </a-col> 42 </a-col>
43 43
44 <a-col :span="24"> 44 <a-col :span="24">
  45 + <a-form-model-item label="库区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="zoneCode">
  46 + <a-select
  47 + show-search
  48 + placeholder="请选择库区"
  49 + option-filter-prop="children"
  50 + v-model="model.zoneCode">
  51 + <a-select-option v-for="item in zoneList" :key="item.name" :value="item.code">{{
  52 + item.name
  53 + }}
  54 + </a-select-option>
  55 + </a-select>
  56 + </a-form-model-item>
  57 + </a-col>
  58 +
  59 + <a-col :span="24">
45 <a-form-model-item label="客户编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerCode"> 60 <a-form-model-item label="客户编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="customerCode">
46 <a-select 61 <a-select
47 show-search 62 show-search
@@ -71,7 +86,7 @@ @@ -71,7 +86,7 @@
71 86
72 import {httpAction} from '@/api/manage' 87 import {httpAction} from '@/api/manage'
73 import {validateDuplicateValue} from '@/utils/util' 88 import {validateDuplicateValue} from '@/utils/util'
74 -import {getCompanyList} from '@/api/api' 89 +import {getCompanyList, getZoneList} from '@/api/api'
75 import {getShipmentTypeList} from '@/api/api' 90 import {getShipmentTypeList} from '@/api/api'
76 import {getCustomerList} from '@/api/api' 91 import {getCustomerList} from '@/api/api'
77 92
@@ -83,6 +98,7 @@ export default { @@ -83,6 +98,7 @@ export default {
83 companyList: [], 98 companyList: [],
84 shipmentTypeList: [], 99 shipmentTypeList: [],
85 customerList: [], 100 customerList: [],
  101 + zoneList: [],
86 title: "操作", 102 title: "操作",
87 width: 800, 103 width: 800,
88 visible: false, 104 visible: false,
@@ -178,6 +194,11 @@ export default { @@ -178,6 +194,11 @@ export default {
178 this.customerList = res.result 194 this.customerList = res.result
179 } 195 }
180 }); 196 });
  197 + getZoneList().then((res) => {
  198 + if (res.success) {
  199 + this.zoneList = res.result
  200 + }
  201 + });
181 }, 202 },
182 203
183 } 204 }
huaheng-wms-core/pom.xml
@@ -209,8 +209,8 @@ @@ -209,8 +209,8 @@
209 <plugin> 209 <plugin>
210 <groupId>org.springframework.boot</groupId> 210 <groupId>org.springframework.boot</groupId>
211 <artifactId>spring-boot-maven-plugin</artifactId> 211 <artifactId>spring-boot-maven-plugin</artifactId>
212 - <!-- 启动jar包命令:包含引入lib包,开启远程调试端口7080,启动环境选择  
213 - java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=7080,suspend=n -jar -Dloader.path=./lib -Dspring.profiles.active=prod huaheng-wms-core.jar --> 212 + <!-- 启动jar包命令:包含引入lib包,开启远程调试端口7080,启动环境选择 java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=7080,suspend=n -jar -Dloader.path=./lib
  213 + -Dspring.profiles.active=prod huaheng-wms-core.jar -->
214 <configuration> 214 <configuration>
215 <mainClass>org.jeecg.JeecgSystemApplication</mainClass> 215 <mainClass>org.jeecg.JeecgSystemApplication</mainClass>
216 <layout>ZIP</layout> 216 <layout>ZIP</layout>
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/mobile/service/impl/MobileService.java
@@ -74,7 +74,7 @@ public class MobileService implements IMobileService { @@ -74,7 +74,7 @@ public class MobileService implements IMobileService {
74 74
75 String fromLocationCode = container.getLocationCode(); 75 String fromLocationCode = container.getLocationCode();
76 String toLocationCode = QuantityConstant.EMPTY_STRING; 76 String toLocationCode = QuantityConstant.EMPTY_STRING;
77 - String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION); 77 + String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION, container.getZoneCode());
78 int taskLocationRule = Integer.parseInt(value); 78 int taskLocationRule = Integer.parseInt(value);
79 if (taskLocationRule == QuantityConstant.RULE_TASK_SET_LOCATION) { 79 if (taskLocationRule == QuantityConstant.RULE_TASK_SET_LOCATION) {
80 toLocationCode = fromLocationCode; 80 toLocationCode = fromLocationCode;
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationServiceImpl.java
@@ -241,7 +241,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService @@ -241,7 +241,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
241 if (StringUtils.isEmpty(roadWays)) { 241 if (StringUtils.isEmpty(roadWays)) {
242 return roadWay; 242 return roadWay;
243 } 243 }
244 - roadWay = getRoadWayByMaxFreeLocation(roadWays, warehouseCode); 244 + roadWay = locationAllocationService.getRoadWayByMaxFreeLocation(roadWays, warehouseCode);
245 return roadWay; 245 return roadWay;
246 } 246 }
247 247
@@ -278,7 +278,12 @@ public class LocationAllocationServiceImpl implements LocationAllocationService @@ -278,7 +278,12 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
278 @Override 278 @Override
279 @Transactional(rollbackFor = Exception.class) 279 @Transactional(rollbackFor = Exception.class)
280 public List<Integer> removeRoadWaysByPreLocations(List<Integer> roadWays, String warehouseCode) { 280 public List<Integer> removeRoadWaysByPreLocations(List<Integer> roadWays, String warehouseCode) {
  281 + String value = parameterConfigurationService.getValueByCode(QuantityConstant.MAX_ROADWAY_RECEIPT);
281 // 同巷道分配的库位大于等于2时,这个巷道就不能再分了 282 // 同巷道分配的库位大于等于2时,这个巷道就不能再分了
  283 + int maxRoadReceipt = 2;
  284 + if (StringUtils.isNotEmpty(value)) {
  285 + maxRoadReceipt = Integer.parseInt(value);
  286 + }
282 LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); 287 LambdaQueryWrapper<TaskHeader> taskHeaderLambdaQueryWrapper = Wrappers.lambdaQuery();
283 taskHeaderLambdaQueryWrapper.lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED).ne(TaskHeader::getToLocationCode, 288 taskHeaderLambdaQueryWrapper.lt(TaskHeader::getStatus, QuantityConstant.TASK_STATUS_COMPLETED).ne(TaskHeader::getToLocationCode,
284 QuantityConstant.EMPTY_STRING); 289 QuantityConstant.EMPTY_STRING);
@@ -288,7 +293,8 @@ public class LocationAllocationServiceImpl implements LocationAllocationService @@ -288,7 +293,8 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
288 List<Integer> removeRoadWayList = new ArrayList<>(); 293 List<Integer> removeRoadWayList = new ArrayList<>();
289 for (Integer roadWay : roadWays) { 294 for (Integer roadWay : roadWays) {
290 int i = Collections.frequency(roadWayList, roadWay); 295 int i = Collections.frequency(roadWayList, roadWay);
291 - if (i >= 2) { 296 + // 同巷道分配的库位大于等于2时,这个巷道就不能再分了
  297 + if (i >= maxRoadReceipt) {
292 removeRoadWayList.add(roadWay); 298 removeRoadWayList.add(roadWay);
293 } 299 }
294 } 300 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
@@ -109,8 +109,7 @@ public class WcsServiceImpl implements WcsService { @@ -109,8 +109,7 @@ public class WcsServiceImpl implements WcsService {
109 @Transactional(rollbackFor = Exception.class) 109 @Transactional(rollbackFor = Exception.class)
110 @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情分配库位'", extra = "#extraJsonString", 110 @OperationLog(bizId = "''", bizType = "'入库单追踪'", tag = "'详情分配库位'", extra = "#extraJsonString",
111 msg = "'任务ID:' + #warecellDomain.getTaskNo() + ',库位编码:' + #locationCode", recordReturnValue = true) 111 msg = "'任务ID:' + #warecellDomain.getTaskNo() + ',库位编码:' + #locationCode", recordReturnValue = true)
112 - @OperationLog(bizId = "#taskHeader == null ? '' : #taskHeader.getId()", bizType = "'任务追踪'", tag = "'分配库位'",  
113 - msg = "'任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", 112 + @OperationLog(bizId = "#taskHeader == null ? '' : #taskHeader.getId()", bizType = "'任务追踪'", tag = "'分配库位'", msg = "'目标库位:' + #taskHeader.getToLocationCode()",
114 recordReturnValue = true) 113 recordReturnValue = true)
115 public Result warecellAllocation(WarecellDomain warecellDomain) { 114 public Result warecellAllocation(WarecellDomain warecellDomain) {
116 log.info("开始分配库位"); 115 log.info("开始分配库位");
@@ -159,7 +158,7 @@ public class WcsServiceImpl implements WcsService { @@ -159,7 +158,7 @@ public class WcsServiceImpl implements WcsService {
159 if (containerType == null) { 158 if (containerType == null) {
160 return Result.error("分配库位时,托盘类型为空,托盘类型值为" + containerTypeCode); 159 return Result.error("分配库位时,托盘类型为空,托盘类型值为" + containerTypeCode);
161 } 160 }
162 - String locationTypeCodes = containerType.getLocationType(); 161 + List<String> locationTypeCodes = containerType.getLocationTypes();
163 // 查询满足条件的库位类型 162 // 查询满足条件的库位类型
164 LambdaQueryWrapper<LocationType> locationTypeLambdaQueryWrapper = Wrappers.lambdaQuery(); 163 LambdaQueryWrapper<LocationType> locationTypeLambdaQueryWrapper = Wrappers.lambdaQuery();
165 locationTypeLambdaQueryWrapper.in(LocationType::getCode, locationTypeCodes).eq(LocationType::getWarehouseCode, warehouseCode); 164 locationTypeLambdaQueryWrapper.in(LocationType::getCode, locationTypeCodes).eq(LocationType::getWarehouseCode, warehouseCode);
@@ -170,13 +169,14 @@ public class WcsServiceImpl implements WcsService { @@ -170,13 +169,14 @@ public class WcsServiceImpl implements WcsService {
170 int highHeight = Float.valueOf(height).intValue(); 169 int highHeight = Float.valueOf(height).intValue();
171 List<String> locationTypeCodeList = locationTypeList.stream().map(t -> t.getCode()).collect(Collectors.toList()); 170 List<String> locationTypeCodeList = locationTypeList.stream().map(t -> t.getCode()).collect(Collectors.toList());
172 LambdaQueryWrapper<LocationHigh> locationHighLambdaQueryWrapper = Wrappers.lambdaQuery(); 171 LambdaQueryWrapper<LocationHigh> locationHighLambdaQueryWrapper = Wrappers.lambdaQuery();
173 - locationHighLambdaQueryWrapper.eq(LocationHigh::getHighLevel, highHeight).in(LocationHigh::getLocationTypeCode, locationTypeCodeList); 172 + locationHighLambdaQueryWrapper.eq(LocationHigh::getHighLevel, highHeight).in(LocationHigh::getLocationTypeCode, locationTypeCodeList)
  173 + .eq(LocationHigh::getZoneCode, zoneCode);
174 LocationHigh locationHigh = locationHighService.getOne(locationHighLambdaQueryWrapper); 174 LocationHigh locationHigh = locationHighService.getOne(locationHighLambdaQueryWrapper);
175 if (locationHigh == null) { 175 if (locationHigh == null) {
176 return Result.error("分配库位时,高度不匹配,WCS给的高度值" + highHeight + "不在WMS系统配置范围内"); 176 return Result.error("分配库位时,高度不匹配,WCS给的高度值" + highHeight + "不在WMS系统配置范围内");
177 } 177 }
178 int high = locationHigh.getHigh(); 178 int high = locationHigh.getHigh();
179 - String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_ALLOCATION); 179 + String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_ALLOCATION, zoneCode);
180 if (StringUtils.isEmpty(value)) { 180 if (StringUtils.isEmpty(value)) {
181 return Result.error("分配库位时, 未绑定定位规则"); 181 return Result.error("分配库位时, 未绑定定位规则");
182 } 182 }
@@ -289,7 +289,7 @@ public class WcsServiceImpl implements WcsService { @@ -289,7 +289,7 @@ public class WcsServiceImpl implements WcsService {
289 @Override 289 @Override
290 @Transactional(rollbackFor = Exception.class) 290 @Transactional(rollbackFor = Exception.class)
291 @OperationLog(bizId = "#taskHeader == null ? '' : #taskHeader.getId()", bizType = "'任务追踪'", tag = "'任务下发'", extra = "''", 291 @OperationLog(bizId = "#taskHeader == null ? '' : #taskHeader.getId()", bizType = "'任务追踪'", tag = "'任务下发'", extra = "''",
292 - msg = "'任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()", 292 + msg = "'任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',容器编码:' + #taskHeader.getContainerCode()",
293 recordReturnValue = true) 293 recordReturnValue = true)
294 public Result wcsTaskAssign(TaskHeader taskHeader) { 294 public Result wcsTaskAssign(TaskHeader taskHeader) {
295 if (taskHeader == null) { 295 if (taskHeader == null) {
@@ -425,13 +425,13 @@ public class WcsServiceImpl implements WcsService { @@ -425,13 +425,13 @@ public class WcsServiceImpl implements WcsService {
425 throw new JeecgBootException("下发任务时,容器没有找到"); 425 throw new JeecgBootException("下发任务时,容器没有找到");
426 } 426 }
427 427
428 - String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_CONNECT_WCS); 428 + String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_CONNECT_WCS, container.getZoneCode());
429 if (StringUtils.isEmpty(value)) { 429 if (StringUtils.isEmpty(value)) {
430 throw new JeecgBootException("下发任务时,没有找到连接WCS的数据配置"); 430 throw new JeecgBootException("下发任务时,没有找到连接WCS的数据配置");
431 } 431 }
432 int connectWCS = Integer.parseInt(value); 432 int connectWCS = Integer.parseInt(value);
433 if (connectWCS == QuantityConstant.RULE_WCS_CONNECT) { 433 if (connectWCS == QuantityConstant.RULE_WCS_CONNECT) {
434 - String url = addressService.getUrlByParam(QuantityConstant.ADDRESS_WCS_TASK_ASSIGN); 434 + String url = addressService.getUrlByParam(QuantityConstant.ADDRESS_WCS_TASK_ASSIGN, warehouseCode, container.getZoneCode());
435 wcsTask = switchTaskTypeToWcs(wcsTask); 435 wcsTask = switchTaskTypeToWcs(wcsTask);
436 String jsonParam = JSON.toJSONString(wcsTask); 436 String jsonParam = JSON.toJSONString(wcsTask);
437 System.out.println(jsonParam); 437 System.out.println(jsonParam);
@@ -702,8 +702,7 @@ public class WcsServiceImpl implements WcsService { @@ -702,8 +702,7 @@ public class WcsServiceImpl implements WcsService {
702 @Override 702 @Override
703 @Transactional(rollbackFor = Exception.class) 703 @Transactional(rollbackFor = Exception.class)
704 @OperationLog(bizId = "#taskHeader == null ? '' : #taskHeader.getId()", bizType = "'任务追踪'", tag = "'到达站台'", extra = "''", 704 @OperationLog(bizId = "#taskHeader == null ? '' : #taskHeader.getId()", bizType = "'任务追踪'", tag = "'到达站台'", extra = "''",
705 - msg = "'任务类型:' + #taskHeader.getTaskType() + ',起始库位:' + #taskHeader.getFromLocationCode() + ',目标库位:' + #taskHeader.getToLocationCode() + ',容器编码:' + #taskHeader.getContainerCode() + ',目标出入口:' + #taskHeader.getToPortCode()",  
706 - recordReturnValue = true) 705 + msg = "'目标出入口:' + #taskHeader.getToPortCode()", recordReturnValue = true)
707 public Result arrivedNotice(String taskNo, String port) { 706 public Result arrivedNotice(String taskNo, String port) {
708 TaskHeader taskHeader = taskHeaderService.getById(taskNo); 707 TaskHeader taskHeader = taskHeaderService.getById(taskNo);
709 if (taskHeader == null) { 708 if (taskHeader == null) {
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/address/service/impl/AddressServiceImpl.java
@@ -36,7 +36,7 @@ public class AddressServiceImpl extends ServiceImpl&lt;AddressMapper, Address&gt; impl @@ -36,7 +36,7 @@ public class AddressServiceImpl extends ServiceImpl&lt;AddressMapper, Address&gt; impl
36 .eq(!StringUtils.isEmpty(zoneCode), Address::getZoneCode, zoneCode); 36 .eq(!StringUtils.isEmpty(zoneCode), Address::getZoneCode, zoneCode);
37 Address address = getOne(addressLambdaQueryWrapper); 37 Address address = getOne(addressLambdaQueryWrapper);
38 if (address == null) { 38 if (address == null) {
39 - return null; 39 + return getUrlByParam(param);
40 } 40 }
41 return address.getUrl(); 41 return address.getUrl();
42 } 42 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/service/impl/ContainerServiceImpl.java
@@ -53,6 +53,7 @@ public class ContainerServiceImpl extends ServiceImpl&lt;ContainerMapper, Container @@ -53,6 +53,7 @@ public class ContainerServiceImpl extends ServiceImpl&lt;ContainerMapper, Container
53 public Result<?> batchAddContainers(Container container, int number) { 53 public Result<?> batchAddContainers(Container container, int number) {
54 String containerTypeCode = container.getContainerTypeCode(); 54 String containerTypeCode = container.getContainerTypeCode();
55 String warehouseCode = container.getWarehouseCode(); 55 String warehouseCode = container.getWarehouseCode();
  56 + String zoneCode = container.getZoneCode();
56 int startNumber = getStartNumber(containerTypeCode, container.getWarehouseCode()); 57 int startNumber = getStartNumber(containerTypeCode, container.getWarehouseCode());
57 List<Container> containerList = new ArrayList<>(); 58 List<Container> containerList = new ArrayList<>();
58 for (int i = 0; i < number; i++) { 59 for (int i = 0; i < number; i++) {
@@ -61,6 +62,7 @@ public class ContainerServiceImpl extends ServiceImpl&lt;ContainerMapper, Container @@ -61,6 +62,7 @@ public class ContainerServiceImpl extends ServiceImpl&lt;ContainerMapper, Container
61 addcontainer.setContainerTypeCode(containerTypeCode); 62 addcontainer.setContainerTypeCode(containerTypeCode);
62 String code = String.format("%s%05d", containerTypeCode, startNumber); 63 String code = String.format("%s%05d", containerTypeCode, startNumber);
63 addcontainer.setCode(code); 64 addcontainer.setCode(code);
  65 + addcontainer.setZoneCode(zoneCode);
64 addcontainer.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY); 66 addcontainer.setStatus(QuantityConstant.STATUS_CONTAINER_EMPTY);
65 addcontainer.setFillStatus(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY); 67 addcontainer.setFillStatus(QuantityConstant.STATUS_CONTAINER_FILL_EMPTY);
66 addcontainer.setWarehouseCode(warehouseCode); 68 addcontainer.setWarehouseCode(warehouseCode);
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/locationHigh/entity/LocationHigh.java
1 package org.jeecg.modules.wms.config.locationHigh.entity; 1 package org.jeecg.modules.wms.config.locationHigh.entity;
2 2
3 import java.io.Serializable; 3 import java.io.Serializable;
4 -import java.io.UnsupportedEncodingException;  
5 import java.util.Date; 4 import java.util.Date;
6 -import java.math.BigDecimal; 5 +
  6 +import org.jeecg.common.aspect.annotation.Dict;
  7 +import org.jeecgframework.poi.excel.annotation.Excel;
  8 +
7 import com.baomidou.mybatisplus.annotation.IdType; 9 import com.baomidou.mybatisplus.annotation.IdType;
8 import com.baomidou.mybatisplus.annotation.TableId; 10 import com.baomidou.mybatisplus.annotation.TableId;
9 import com.baomidou.mybatisplus.annotation.TableName; 11 import com.baomidou.mybatisplus.annotation.TableName;
10 -import lombok.Data;  
11 -import com.fasterxml.jackson.annotation.JsonFormat;  
12 -import org.springframework.format.annotation.DateTimeFormat;  
13 -import org.jeecgframework.poi.excel.annotation.Excel;  
14 -import org.jeecg.common.aspect.annotation.Dict; 12 +
15 import io.swagger.annotations.ApiModel; 13 import io.swagger.annotations.ApiModel;
16 import io.swagger.annotations.ApiModelProperty; 14 import io.swagger.annotations.ApiModelProperty;
  15 +import lombok.Data;
17 import lombok.EqualsAndHashCode; 16 import lombok.EqualsAndHashCode;
18 import lombok.experimental.Accessors; 17 import lombok.experimental.Accessors;
19 18
@@ -60,6 +59,9 @@ public class LocationHigh implements Serializable { @@ -60,6 +59,9 @@ public class LocationHigh implements Serializable {
60 @ApiModelProperty(value = "高低位") 59 @ApiModelProperty(value = "高低位")
61 @Dict(dicCode = "high_status") 60 @Dict(dicCode = "high_status")
62 private Integer high; 61 private Integer high;
  62 + @Excel(name = "库区编码", width = 15)
  63 + @ApiModelProperty(value = "库区编码")
  64 + private String zoneCode;
63 /** 备用字段 */ 65 /** 备用字段 */
64 @Excel(name = "备用字段", width = 15) 66 @Excel(name = "备用字段", width = 15)
65 @ApiModelProperty(value = "备用字段") 67 @ApiModelProperty(value = "备用字段")
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/materialWarning/entity/MaterialLevelAlarm.java
@@ -48,17 +48,16 @@ public class MaterialLevelAlarm extends MaterialWarning { @@ -48,17 +48,16 @@ public class MaterialLevelAlarm extends MaterialWarning {
48 48
49 @Override 49 @Override
50 public String toString() { 50 public String toString() {
51 - String str = getMaterialName() + " " + getMaterialCode() + " 库存数=" + qtySum + " "; 51 + String str = "<ul>";
52 if (inLower) { 52 if (inLower) {
53 - str = str + " < " + getLower(); 53 + str = str + "<li><b>" + getMaterialName() + "</b> &nbsp;&nbsp;" + getMaterialCode() + " 库存数" + getQtySum() + "&nbsp;&nbsp;低于下限预警值" + getLower() + "</li>";
54 } else if (inUpper) { 54 } else if (inUpper) {
55 - str = str + " > " + getUpper(); 55 + str = str + "<li><b>" + getMaterialName() + "</b> &nbsp;&nbsp;" + getMaterialCode() + " 库存数" + getQtySum() + "&nbsp;&nbsp;高于上限预警值" + getUpper() + "</li>";
56 } else if (inMin) { 56 } else if (inMin) {
57 - str = str + " < " + getMin(); 57 + str = str + "<li><b>" + getMaterialName() + "</b> &nbsp;&nbsp;" + getMaterialCode() + " 库存数" + getQtySum() + "&nbsp;&nbsp;低于最低值" + getMin() + "</li>";
58 } else if (inMax) { 58 } else if (inMax) {
59 - str = str + " > " + getMax(); 59 + str = str + "<li><b>" + getMaterialName() + "</b> &nbsp;&nbsp;" + getMaterialCode() + " 库存数" + getQtySum() + "&nbsp;&nbsp;超过最高值" + getMax() + "</li>";
60 } 60 }
61 -  
62 - return str; 61 + return str + "</ul>";
63 } 62 }
64 } 63 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/materialWarning/entity/MaterialWarning.java
@@ -74,11 +74,11 @@ public class MaterialWarning implements Serializable { @@ -74,11 +74,11 @@ public class MaterialWarning implements Serializable {
74 /** 上限预警值 */ 74 /** 上限预警值 */
75 @Excel(name = "上限预警值", width = 15) 75 @Excel(name = "上限预警值", width = 15)
76 @ApiModelProperty(value = "上限预警值") 76 @ApiModelProperty(value = "上限预警值")
77 - private Integer upper; 77 + private int upper;
78 /** 下限预警值 */ 78 /** 下限预警值 */
79 @Excel(name = "下限预警值", width = 15) 79 @Excel(name = "下限预警值", width = 15)
80 @ApiModelProperty(value = "下限预警值") 80 @ApiModelProperty(value = "下限预警值")
81 - private Integer lower; 81 + private int lower;
82 /** 备注 */ 82 /** 备注 */
83 @Excel(name = "备注", width = 15) 83 @Excel(name = "备注", width = 15)
84 @ApiModelProperty(value = "备注") 84 @ApiModelProperty(value = "备注")
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/parameterConfiguration/entity/ParameterConfiguration.java
1 package org.jeecg.modules.wms.config.parameterConfiguration.entity; 1 package org.jeecg.modules.wms.config.parameterConfiguration.entity;
2 2
3 import java.io.Serializable; 3 import java.io.Serializable;
4 -import java.io.UnsupportedEncodingException;  
5 import java.util.Date; 4 import java.util.Date;
6 -import java.math.BigDecimal; 5 +
  6 +import org.jeecgframework.poi.excel.annotation.Excel;
  7 +
7 import com.baomidou.mybatisplus.annotation.IdType; 8 import com.baomidou.mybatisplus.annotation.IdType;
8 import com.baomidou.mybatisplus.annotation.TableId; 9 import com.baomidou.mybatisplus.annotation.TableId;
9 import com.baomidou.mybatisplus.annotation.TableName; 10 import com.baomidou.mybatisplus.annotation.TableName;
10 -import lombok.Data;  
11 -import com.fasterxml.jackson.annotation.JsonFormat;  
12 -import org.springframework.format.annotation.DateTimeFormat;  
13 -import org.jeecgframework.poi.excel.annotation.Excel;  
14 -import org.jeecg.common.aspect.annotation.Dict; 11 +
15 import io.swagger.annotations.ApiModel; 12 import io.swagger.annotations.ApiModel;
16 import io.swagger.annotations.ApiModelProperty; 13 import io.swagger.annotations.ApiModelProperty;
  14 +import lombok.Data;
17 import lombok.EqualsAndHashCode; 15 import lombok.EqualsAndHashCode;
18 import lombok.experimental.Accessors; 16 import lombok.experimental.Accessors;
19 17
@@ -47,6 +45,10 @@ public class ParameterConfiguration implements Serializable { @@ -47,6 +45,10 @@ public class ParameterConfiguration implements Serializable {
47 @Excel(name = "参数键值", width = 15) 45 @Excel(name = "参数键值", width = 15)
48 @ApiModelProperty(value = "参数键值") 46 @ApiModelProperty(value = "参数键值")
49 private String value; 47 private String value;
  48 + /** 库区 */
  49 + @Excel(name = "库区", width = 15)
  50 + @ApiModelProperty(value = "库区")
  51 + private String zoneCode;
50 /** 备注 */ 52 /** 备注 */
51 @Excel(name = "备注", width = 15) 53 @Excel(name = "备注", width = 15)
52 @ApiModelProperty(value = "备注") 54 @ApiModelProperty(value = "备注")
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/parameterConfiguration/service/IParameterConfigurationService.java
@@ -14,5 +14,7 @@ public interface IParameterConfigurationService extends IService&lt;ParameterConfig @@ -14,5 +14,7 @@ public interface IParameterConfigurationService extends IService&lt;ParameterConfig
14 14
15 String getValueByCode(String code); 15 String getValueByCode(String code);
16 16
  17 + String getValueByCode(String code, String zoneCode);
  18 +
17 int getValueIntByCode(String code); 19 int getValueIntByCode(String code);
18 } 20 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/parameterConfiguration/service/impl/ParameterConfigurationServiceImpl.java
1 package org.jeecg.modules.wms.config.parameterConfiguration.service.impl; 1 package org.jeecg.modules.wms.config.parameterConfiguration.service.impl;
2 2
  3 +import javax.annotation.Resource;
  4 +
3 import org.jeecg.modules.wms.config.parameterConfiguration.entity.ParameterConfiguration; 5 import org.jeecg.modules.wms.config.parameterConfiguration.entity.ParameterConfiguration;
4 import org.jeecg.modules.wms.config.parameterConfiguration.mapper.ParameterConfigurationMapper; 6 import org.jeecg.modules.wms.config.parameterConfiguration.mapper.ParameterConfigurationMapper;
5 import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService; 7 import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService;
  8 +import org.jeecg.utils.constant.QuantityConstant;
6 import org.springframework.stereotype.Service; 9 import org.springframework.stereotype.Service;
7 10
8 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 11 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -18,10 +21,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -18,10 +21,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
18 @Service 21 @Service
19 public class ParameterConfigurationServiceImpl extends ServiceImpl<ParameterConfigurationMapper, ParameterConfiguration> implements IParameterConfigurationService { 22 public class ParameterConfigurationServiceImpl extends ServiceImpl<ParameterConfigurationMapper, ParameterConfiguration> implements IParameterConfigurationService {
20 23
  24 + @Resource
  25 + IParameterConfigurationService parameterConfigurationService;
  26 +
21 @Override 27 @Override
22 public String getValueByCode(String code) { 28 public String getValueByCode(String code) {
23 LambdaQueryWrapper<ParameterConfiguration> parameterConfigurationLambdaQueryWrapper = Wrappers.lambdaQuery(); 29 LambdaQueryWrapper<ParameterConfiguration> parameterConfigurationLambdaQueryWrapper = Wrappers.lambdaQuery();
24 - parameterConfigurationLambdaQueryWrapper.eq(ParameterConfiguration::getCode, code); 30 + parameterConfigurationLambdaQueryWrapper.eq(ParameterConfiguration::getCode, code).eq(ParameterConfiguration::getZoneCode, QuantityConstant.EMPTY_STRING);
25 ParameterConfiguration parameterConfiguration = getOne(parameterConfigurationLambdaQueryWrapper); 31 ParameterConfiguration parameterConfiguration = getOne(parameterConfigurationLambdaQueryWrapper);
26 if (parameterConfiguration == null) { 32 if (parameterConfiguration == null) {
27 return null; 33 return null;
@@ -31,6 +37,18 @@ public class ParameterConfigurationServiceImpl extends ServiceImpl&lt;ParameterConf @@ -31,6 +37,18 @@ public class ParameterConfigurationServiceImpl extends ServiceImpl&lt;ParameterConf
31 } 37 }
32 38
33 @Override 39 @Override
  40 + public String getValueByCode(String code, String zoneCode) {
  41 + LambdaQueryWrapper<ParameterConfiguration> parameterConfigurationLambdaQueryWrapper = Wrappers.lambdaQuery();
  42 + parameterConfigurationLambdaQueryWrapper.eq(ParameterConfiguration::getCode, code).eq(ParameterConfiguration::getZoneCode, zoneCode);
  43 + ParameterConfiguration parameterConfiguration = getOne(parameterConfigurationLambdaQueryWrapper);
  44 + if (parameterConfiguration == null) {
  45 + return parameterConfigurationService.getValueByCode(code);
  46 + }
  47 + String value = parameterConfiguration.getValue();
  48 + return value;
  49 + }
  50 +
  51 + @Override
34 public int getValueIntByCode(String code) { 52 public int getValueIntByCode(String code) {
35 LambdaQueryWrapper<ParameterConfiguration> parameterConfigurationLambdaQueryWrapper = Wrappers.lambdaQuery(); 53 LambdaQueryWrapper<ParameterConfiguration> parameterConfigurationLambdaQueryWrapper = Wrappers.lambdaQuery();
36 parameterConfigurationLambdaQueryWrapper.eq(ParameterConfiguration::getCode, code); 54 parameterConfigurationLambdaQueryWrapper.eq(ParameterConfiguration::getCode, code);
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryHeader/service/impl/InventoryHeaderServiceImpl.java
@@ -250,7 +250,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe @@ -250,7 +250,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
250 } 250 }
251 251
252 List<Integer> shipmentContainerHeaderIdList = 252 List<Integer> shipmentContainerHeaderIdList =
253 - shipmentContainerDetailList.stream().map(ShipmentContainerDetail::getShipmentContainerId).collect(Collectors.toList()); 253 + shipmentContainerDetailList.stream().map(ShipmentContainerDetail::getShipmentContainerId).distinct().collect(Collectors.toList());
254 long shipmentOrder = System.currentTimeMillis(); 254 long shipmentOrder = System.currentTimeMillis();
255 int sequenceNumber = shipmentContainerHeaderIdList.size(); 255 int sequenceNumber = shipmentContainerHeaderIdList.size();
256 int sequence = 0; 256 int sequence = 0;
@@ -336,7 +336,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe @@ -336,7 +336,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
336 } 336 }
337 337
338 List<Integer> shipmentContainerHeaderIdList = 338 List<Integer> shipmentContainerHeaderIdList =
339 - shipmentContainerDetailList.stream().map(ShipmentContainerDetail::getShipmentContainerId).collect(Collectors.toList()); 339 + shipmentContainerDetailList.stream().map(ShipmentContainerDetail::getShipmentContainerId).distinct().collect(Collectors.toList());
340 long shipmentOrder = System.currentTimeMillis(); 340 long shipmentOrder = System.currentTimeMillis();
341 int sequenceNumber = shipmentContainerHeaderIdList.size(); 341 int sequenceNumber = shipmentContainerHeaderIdList.size();
342 int sequence = 0; 342 int sequence = 0;
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/MaterialLevelAlarmTask.java
@@ -77,7 +77,7 @@ public class MaterialLevelAlarmTask implements Job { @@ -77,7 +77,7 @@ public class MaterialLevelAlarmTask implements Job {
77 String msg = String.join("\n", list); 77 String msg = String.join("\n", list);
78 78
79 SysAnnouncement sysAnnouncement = new SysAnnouncement(); 79 SysAnnouncement sysAnnouncement = new SysAnnouncement();
80 - String title = "物料水位预警" + DateUtils.now(); 80 + String title = "物料水位预警";
81 sysAnnouncement.setTitile(title); 81 sysAnnouncement.setTitile(title);
82 sysAnnouncement.setMsgContent(msg); 82 sysAnnouncement.setMsgContent(msg);
83 sysAnnouncement.setEndTime(DateUtil.offsetDay(new Date(), 1)); 83 sysAnnouncement.setEndTime(DateUtil.offsetDay(new Date(), 1));
@@ -86,6 +86,7 @@ public class MaterialLevelAlarmTask implements Job { @@ -86,6 +86,7 @@ public class MaterialLevelAlarmTask implements Job {
86 sysAnnouncement.setMsgCategory(CommonConstant.MSG_CATEGORY_2); 86 sysAnnouncement.setMsgCategory(CommonConstant.MSG_CATEGORY_2);
87 sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_ALL); 87 sysAnnouncement.setMsgType(CommonConstant.MSG_TYPE_ALL);
88 sysAnnouncement.setMsgAbstract(title); 88 sysAnnouncement.setMsgAbstract(title);
  89 + sysAnnouncement.setSender("WMS");
89 sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_0.toString()); 90 sysAnnouncement.setDelFlag(CommonConstant.DEL_FLAG_0.toString());
90 sysAnnouncement.setSendStatus(CommonSendStatus.PUBLISHED_STATUS_1); 91 sysAnnouncement.setSendStatus(CommonSendStatus.PUBLISHED_STATUS_1);
91 sysAnnouncementService.saveAnnouncement(sysAnnouncement); 92 sysAnnouncementService.saveAnnouncement(sysAnnouncement);
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptContainerHeader/service/impl/ReceiptContainerHeaderServiceImpl.java
@@ -11,6 +11,7 @@ import javax.annotation.Resource; @@ -11,6 +11,7 @@ import javax.annotation.Resource;
11 11
12 import org.jeecg.common.api.vo.Result; 12 import org.jeecg.common.api.vo.Result;
13 import org.jeecg.common.exception.JeecgBootException; 13 import org.jeecg.common.exception.JeecgBootException;
  14 +import org.jeecg.modules.wms.config.container.entity.Container;
14 import org.jeecg.modules.wms.config.container.service.IContainerService; 15 import org.jeecg.modules.wms.config.container.service.IContainerService;
15 import org.jeecg.modules.wms.config.location.service.ILocationService; 16 import org.jeecg.modules.wms.config.location.service.ILocationService;
16 import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService; 17 import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService;
@@ -331,7 +332,19 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai @@ -331,7 +332,19 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl&lt;ReceiptContai
331 if (receiptContainerStatus != QuantityConstant.RECEIPT_CONTAINER_TASK) { 332 if (receiptContainerStatus != QuantityConstant.RECEIPT_CONTAINER_TASK) {
332 throw new JeecgBootException("取消入库任务时, 任务状态不为生成任务状态"); 333 throw new JeecgBootException("取消入库任务时, 任务状态不为生成任务状态");
333 } 334 }
334 - String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION); 335 + String containerCode = taskHeader.getContainerCode();
  336 + String warehouseCode = taskHeader.getWarehouseCode();
  337 + if (StringUtils.isEmpty(containerCode)) {
  338 + throw new JeecgBootException("取消入库任务时, 容器编码为空");
  339 + }
  340 + if (StringUtils.isEmpty(warehouseCode)) {
  341 + throw new JeecgBootException("取消入库任务时, 仓库编码为空");
  342 + }
  343 + Container container = containerService.getContainerByCode(containerCode, warehouseCode);
  344 + if (container == null) {
  345 + throw new JeecgBootException("取消入库任务时, 容器为空");
  346 + }
  347 + String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION, container.getZoneCode());
335 if (StringUtils.isEmpty(value)) { 348 if (StringUtils.isEmpty(value)) {
336 throw new JeecgBootException("取消入库任务时, 没有获取到配置属性"); 349 throw new JeecgBootException("取消入库任务时, 没有获取到配置属性");
337 } 350 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiving/service/impl/ReceiveServiceImpl.java
@@ -174,7 +174,7 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl @@ -174,7 +174,7 @@ public class ReceiveServiceImpl extends ServiceImpl&lt;ReceiveMapper, Receive&gt; impl
174 receiptContainerHeader.setTaskType(taskType); 174 receiptContainerHeader.setTaskType(taskType);
175 receiptContainerHeader.setFromLocationCode(fromLocationCode); 175 receiptContainerHeader.setFromLocationCode(fromLocationCode);
176 if (taskType == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) { 176 if (taskType == QuantityConstant.TASK_TYPE_SUPPLEMENTRECEIPT) {
177 - String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION); 177 + String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION, container.getZoneCode());
178 int taskLocationRule = Integer.parseInt(value); 178 int taskLocationRule = Integer.parseInt(value);
179 if (taskLocationRule == QuantityConstant.RULE_TASK_SET_LOCATION) { 179 if (taskLocationRule == QuantityConstant.RULE_TASK_SET_LOCATION) {
180 receiptContainerHeader.setToLocationCode(fromLocationCode); 180 receiptContainerHeader.setToLocationCode(fromLocationCode);
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentCombination/service/impl/ShipmentCombinationServiceImpl.java
@@ -98,6 +98,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi @@ -98,6 +98,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
98 String companyCode = shipmentDetail.getCompanyCode(); 98 String companyCode = shipmentDetail.getCompanyCode();
99 String materialCode = shipmentDetail.getMaterialCode(); 99 String materialCode = shipmentDetail.getMaterialCode();
100 String inventoryStatus = shipmentDetail.getInventoryStatus(); 100 String inventoryStatus = shipmentDetail.getInventoryStatus();
  101 + String zoneCode = shipmentDetail.getZoneCode();
101 if (StringUtils.isEmpty(warehouseCode)) { 102 if (StringUtils.isEmpty(warehouseCode)) {
102 throw new JeecgBootException("寻找库存详情时,出库详情没有仓库编码"); 103 throw new JeecgBootException("寻找库存详情时,出库详情没有仓库编码");
103 } 104 }
@@ -114,6 +115,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi @@ -114,6 +115,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
114 inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getWarehouseCode, warehouseCode).eq(InventoryDetail::getCompanyCode, companyCode) 115 inventoryDetailLambdaQueryWrapper.eq(InventoryDetail::getWarehouseCode, warehouseCode).eq(InventoryDetail::getCompanyCode, companyCode)
115 .eq(InventoryDetail::getMaterialCode, materialCode).eq(InventoryDetail::getInventoryStatus, inventoryStatus) 116 .eq(InventoryDetail::getMaterialCode, materialCode).eq(InventoryDetail::getInventoryStatus, inventoryStatus)
116 .eq(InventoryDetail::getEnable, QuantityConstant.INVENTORY_DETAIL_STATUS_ENABLE) 117 .eq(InventoryDetail::getEnable, QuantityConstant.INVENTORY_DETAIL_STATUS_ENABLE)
  118 + .eq(StringUtils.isNotEmpty(zoneCode), InventoryDetail::getZoneCode, zoneCode)
117 .eq(InventoryDetail::getContainerStatus, QuantityConstant.STATUS_CONTAINER_EMPTY); 119 .eq(InventoryDetail::getContainerStatus, QuantityConstant.STATUS_CONTAINER_EMPTY);
118 List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper); 120 List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(inventoryDetailLambdaQueryWrapper);
119 return inventoryDetailList; 121 return inventoryDetailList;
@@ -394,7 +396,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi @@ -394,7 +396,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
394 } 396 }
395 } 397 }
396 } else { 398 } else {
397 - String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION); 399 + String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION, container.getZoneCode());
398 if (StringUtils.isEmpty(value)) { 400 if (StringUtils.isEmpty(value)) {
399 throw new JeecgBootException("取消入库任务时, 没有获取到配置属性"); 401 throw new JeecgBootException("取消入库任务时, 没有获取到配置属性");
400 } 402 }
@@ -514,6 +516,10 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi @@ -514,6 +516,10 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
514 if (location == null) { 516 if (location == null) {
515 return Result.error("生成出库任务时, 库位编码" + fromLocationCode + "没有找到库位"); 517 return Result.error("生成出库任务时, 库位编码" + fromLocationCode + "没有找到库位");
516 } 518 }
  519 + Container container = containerService.getContainerByCode(containerCode, warehouseCode);
  520 + if (container == null) {
  521 + throw new JeecgBootException("生成出库任务时, 容器为空");
  522 + }
517 if (location.getRowFlag() == QuantityConstant.ROW_OUT) { 523 if (location.getRowFlag() == QuantityConstant.ROW_OUT) {
518 Location location1 = locationService.getNear(location); 524 Location location1 = locationService.getNear(location);
519 if (location1 != null) { 525 if (location1 != null) {
@@ -542,7 +548,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi @@ -542,7 +548,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
542 } else if (inventoryTotal.compareTo(shipmentTotal) > 0) { 548 } else if (inventoryTotal.compareTo(shipmentTotal) > 0) {
543 taskType = QuantityConstant.TASK_TYPE_SORTINGSHIPMENT; 549 taskType = QuantityConstant.TASK_TYPE_SORTINGSHIPMENT;
544 } 550 }
545 - String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_SHIPMENT_TASK); 551 + String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_SHIPMENT_TASK, container.getZoneCode());
546 int shipmentTaskRule = Integer.parseInt(value); 552 int shipmentTaskRule = Integer.parseInt(value);
547 if (shipmentTaskRule == QuantityConstant.RULE_TASK_PICK_SHIPMENT) { 553 if (shipmentTaskRule == QuantityConstant.RULE_TASK_PICK_SHIPMENT) {
548 taskType = QuantityConstant.TASK_TYPE_SORTINGSHIPMENT; 554 taskType = QuantityConstant.TASK_TYPE_SORTINGSHIPMENT;
@@ -618,7 +624,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi @@ -618,7 +624,7 @@ public class ShipmentCombinationServiceImpl implements IShipmentCombinationServi
618 if (!success) { 624 if (!success) {
619 throw new JeecgBootException("生成出库任务时, 创建任务详情失败"); 625 throw new JeecgBootException("生成出库任务时, 创建任务详情失败");
620 } 626 }
621 - value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION); 627 + value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION, container.getZoneCode());
622 int taskLocationRule = Integer.parseInt(value); 628 int taskLocationRule = Integer.parseInt(value);
623 int shipmentContainerHeaderId = shipmentContainerHeader.getId(); 629 int shipmentContainerHeaderId = shipmentContainerHeader.getId();
624 shipmentContainerHeader = new ShipmentContainerHeader(); 630 shipmentContainerHeader = new ShipmentContainerHeader();
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/entity/ShipmentDetail.java
@@ -48,6 +48,10 @@ public class ShipmentDetail implements Serializable { @@ -48,6 +48,10 @@ public class ShipmentDetail implements Serializable {
48 @Excel(name = "仓库编码", width = 15) 48 @Excel(name = "仓库编码", width = 15)
49 @ApiModelProperty(value = "仓库编码") 49 @ApiModelProperty(value = "仓库编码")
50 private String warehouseCode; 50 private String warehouseCode;
  51 + /** 库区 */
  52 + @Excel(name = "库区", width = 15)
  53 + @ApiModelProperty(value = "库区")
  54 + private String zoneCode;
51 /** 货主编码 */ 55 /** 货主编码 */
52 @Excel(name = "货主编码", width = 15) 56 @Excel(name = "货主编码", width = 15)
53 @ApiModelProperty(value = "货主编码") 57 @ApiModelProperty(value = "货主编码")
@@ -72,10 +76,14 @@ public class ShipmentDetail implements Serializable { @@ -72,10 +76,14 @@ public class ShipmentDetail implements Serializable {
72 @Excel(name = "单据数量", width = 15) 76 @Excel(name = "单据数量", width = 15)
73 @ApiModelProperty(value = "单据数量") 77 @ApiModelProperty(value = "单据数量")
74 private java.math.BigDecimal qty; 78 private java.math.BigDecimal qty;
75 - /** 已出数量 */  
76 - @Excel(name = "已出数量", width = 15)  
77 - @ApiModelProperty(value = "已出数量") 79 + /** 配盘数量 */
  80 + @Excel(name = "配盘数量", width = 15)
  81 + @ApiModelProperty(value = "配盘数量")
78 private java.math.BigDecimal taskQty; 82 private java.math.BigDecimal taskQty;
  83 + /** 出库数量 */
  84 + @Excel(name = "出库数量", width = 15)
  85 + @ApiModelProperty(value = "出库数量")
  86 + private java.math.BigDecimal shipmentQty;
79 /** 可出数量 */ 87 /** 可出数量 */
80 @ApiModelProperty(value = "可出数量") 88 @ApiModelProperty(value = "可出数量")
81 @TableField(exist = false) 89 @TableField(exist = false)
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/entity/ShipmentHeader.java
@@ -43,6 +43,10 @@ public class ShipmentHeader implements Serializable { @@ -43,6 +43,10 @@ public class ShipmentHeader implements Serializable {
43 @Excel(name = "仓库编码", width = 15) 43 @Excel(name = "仓库编码", width = 15)
44 @ApiModelProperty(value = "仓库编码") 44 @ApiModelProperty(value = "仓库编码")
45 private String warehouseCode; 45 private String warehouseCode;
  46 + /** 库区 */
  47 + @Excel(name = "库区", width = 15)
  48 + @ApiModelProperty(value = "库区")
  49 + private String zoneCode;
46 /** 货主编码 */ 50 /** 货主编码 */
47 @Excel(name = "货主编码", width = 15) 51 @Excel(name = "货主编码", width = 15)
48 @ApiModelProperty(value = "货主编码") 52 @ApiModelProperty(value = "货主编码")
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentDetailServiceImpl.java
@@ -71,6 +71,7 @@ public class ShipmentDetailServiceImpl extends ServiceImpl&lt;ShipmentDetailMapper, @@ -71,6 +71,7 @@ public class ShipmentDetailServiceImpl extends ServiceImpl&lt;ShipmentDetailMapper,
71 String warehouseCode = shipmentHeader.getWarehouseCode(); 71 String warehouseCode = shipmentHeader.getWarehouseCode();
72 String companyCode = shipmentHeader.getCompanyCode(); 72 String companyCode = shipmentHeader.getCompanyCode();
73 String materialCode = shipmentDetail.getMaterialCode(); 73 String materialCode = shipmentDetail.getMaterialCode();
  74 + String zoneCode = shipmentHeader.getZoneCode();
74 Material material = materialService.getMaterialByCode(materialCode); 75 Material material = materialService.getMaterialByCode(materialCode);
75 if (material == null) { 76 if (material == null) {
76 return Result.error("添加失败,没有找到物料信息," + materialCode); 77 return Result.error("添加失败,没有找到物料信息," + materialCode);
@@ -85,6 +86,7 @@ public class ShipmentDetailServiceImpl extends ServiceImpl&lt;ShipmentDetailMapper, @@ -85,6 +86,7 @@ public class ShipmentDetailServiceImpl extends ServiceImpl&lt;ShipmentDetailMapper,
85 shipmentDetail.setMaterialSpec(materialSpec); 86 shipmentDetail.setMaterialSpec(materialSpec);
86 shipmentDetail.setMaterialUnit(materialUnit); 87 shipmentDetail.setMaterialUnit(materialUnit);
87 shipmentDetail.setStatus(QuantityConstant.RECEIPT_HEADER_BUILD); 88 shipmentDetail.setStatus(QuantityConstant.RECEIPT_HEADER_BUILD);
  89 + shipmentDetail.setZoneCode(zoneCode);
88 boolean success = shipmentDetailService.save(shipmentDetail); 90 boolean success = shipmentDetailService.save(shipmentDetail);
89 if (!success) { 91 if (!success) {
90 throw new JeecgBootException("添加失败, 保存出库单详情的时候报错"); 92 throw new JeecgBootException("添加失败, 保存出库单详情的时候报错");
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -317,7 +317,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -317,7 +317,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
317 } 317 }
318 String fromLocationCode = container.getLocationCode(); 318 String fromLocationCode = container.getLocationCode();
319 String toLocationCode = QuantityConstant.EMPTY_STRING; 319 String toLocationCode = QuantityConstant.EMPTY_STRING;
320 - String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION); 320 + String value = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_TASK_LOCATION, container.getZoneCode());
321 int taskLocationRule = Integer.parseInt(value); 321 int taskLocationRule = Integer.parseInt(value);
322 if (taskLocationRule == QuantityConstant.RULE_TASK_SET_LOCATION) { 322 if (taskLocationRule == QuantityConstant.RULE_TASK_SET_LOCATION) {
323 toLocationCode = fromLocationCode; 323 toLocationCode = fromLocationCode;
@@ -873,6 +873,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -873,6 +873,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
873 } 873 }
874 // 保存历史任务表 874 // 保存历史任务表
875 taskHeaderHistoryService.saveById(taskHeader.getId()); 875 taskHeaderHistoryService.saveById(taskHeader.getId());
  876 +
876 if (!taskHeaderService.removeById(taskId)) { 877 if (!taskHeaderService.removeById(taskId)) {
877 throw new JeecgBootException("取消任务失败, 删除任务失败"); 878 throw new JeecgBootException("取消任务失败, 删除任务失败");
878 } 879 }
@@ -1258,7 +1259,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -1258,7 +1259,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1258 if (StringUtils.isEmpty(fromLocationCode)) { 1259 if (StringUtils.isEmpty(fromLocationCode)) {
1259 return Result.error("完成出库任务" + taskHeader.getId() + "没有起始库位,执行中止"); 1260 return Result.error("完成出库任务" + taskHeader.getId() + "没有起始库位,执行中止");
1260 } 1261 }
1261 - if (StringUtils.isEmpty(toLocationCode) && taskType == QuantityConstant.TASK_TYPE_SORTINGSHIPMENT) { 1262 + if (StringUtils.isEmpty(toLocationCode) && (taskType == QuantityConstant.TASK_TYPE_SORTINGSHIPMENT)) {
1262 return Result.error("完成出库任务,任务" + taskHeader.getId() + "没有目的库位,执行中止"); 1263 return Result.error("完成出库任务,任务" + taskHeader.getId() + "没有目的库位,执行中止");
1263 } 1264 }
1264 InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode); 1265 InventoryHeader inventoryHeader = inventoryHeaderService.getInventoryHeaderByContainerCode(containerCode, warehouseCode);
@@ -1284,18 +1285,21 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -1284,18 +1285,21 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
1284 } 1285 }
1285 taskDetail.setShipmentCode(shipmentDetail.getShipmentCode()); 1286 taskDetail.setShipmentCode(shipmentDetail.getShipmentCode());
1286 int shipmentDetailId = shipmentDetail.getId(); 1287 int shipmentDetailId = shipmentDetail.getId();
  1288 + BigDecimal shipmentQty = shipmentDetail.getShipmentQty();
  1289 + shipmentQty = shipmentQty.add(taskDetail.getQty());
1287 int status = QuantityConstant.SHIPMENT_HEADER_COMPLETED; 1290 int status = QuantityConstant.SHIPMENT_HEADER_COMPLETED;
1288 - if (shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) == 0) { 1291 + if (shipmentDetail.getQty().compareTo(shipmentQty) == 0) {
1289 status = QuantityConstant.SHIPMENT_HEADER_COMPLETED; 1292 status = QuantityConstant.SHIPMENT_HEADER_COMPLETED;
1290 - } else if (shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) > 0) { 1293 + } else if (shipmentDetail.getQty().compareTo(shipmentQty) > 0) {
1291 status = QuantityConstant.SHIPMENT_HEADER_OFF_SHELF; 1294 status = QuantityConstant.SHIPMENT_HEADER_OFF_SHELF;
1292 - } else if (shipmentDetail.getQty().compareTo(shipmentDetail.getTaskQty()) < 0) {  
1293 - throw new JeecgBootException("完成出库任务时, 出库单 单据数量不能小于配盘数量"); 1295 + } else if (shipmentDetail.getQty().compareTo(shipmentQty) < 0) {
  1296 + throw new JeecgBootException("完成出库任务时, 出库单 单据数量不能小于出库数量");
1294 } 1297 }
1295 shipmentDetailList.add(shipmentDetail); 1298 shipmentDetailList.add(shipmentDetail);
1296 ShipmentDetail updateStatusShipmentDetail = new ShipmentDetail(); 1299 ShipmentDetail updateStatusShipmentDetail = new ShipmentDetail();
1297 updateStatusShipmentDetail.setId(shipmentDetailId); 1300 updateStatusShipmentDetail.setId(shipmentDetailId);
1298 updateStatusShipmentDetail.setStatus(status); 1301 updateStatusShipmentDetail.setStatus(status);
  1302 + updateStatusShipmentDetail.setShipmentQty(shipmentQty);
1299 updateStatusShipmentDetailList.add(updateStatusShipmentDetail); 1303 updateStatusShipmentDetailList.add(updateStatusShipmentDetail);
1300 InventoryDetail inventoryDetail = inventoryDetailService.getById(taskDetail.getFromInventoryDetailId()); 1304 InventoryDetail inventoryDetail = inventoryDetailService.getById(taskDetail.getFromInventoryDetailId());
1301 if (inventoryDetail == null) { 1305 if (inventoryDetail == null) {
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeaderHistory/service/impl/TaskHeaderHistoryServiceImpl.java
1 package org.jeecg.modules.wms.task.taskHeaderHistory.service.impl; 1 package org.jeecg.modules.wms.task.taskHeaderHistory.service.impl;
2 -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;  
3 -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 2 +
  3 +import java.io.Serializable;
  4 +import java.util.Collection;
  5 +import java.util.List;
  6 +
  7 +import javax.annotation.Resource;
  8 +
4 import org.jeecg.common.exception.JeecgBootException; 9 import org.jeecg.common.exception.JeecgBootException;
5 -import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptDetail;  
6 -import org.jeecg.modules.wms.receipt.receiptHeaderHistory.entity.ReceiptDetailHistory;  
7 import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail; 10 import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail;
8 import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; 11 import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader;
9 import org.jeecg.modules.wms.task.taskHeader.service.ITaskDetailService; 12 import org.jeecg.modules.wms.task.taskHeader.service.ITaskDetailService;
@@ -15,100 +18,98 @@ import org.jeecg.modules.wms.task.taskHeaderHistory.mapper.TaskHeaderHistoryMapp @@ -15,100 +18,98 @@ import org.jeecg.modules.wms.task.taskHeaderHistory.mapper.TaskHeaderHistoryMapp
15 import org.jeecg.modules.wms.task.taskHeaderHistory.service.ITaskDetailHistoryService; 18 import org.jeecg.modules.wms.task.taskHeaderHistory.service.ITaskDetailHistoryService;
16 import org.jeecg.modules.wms.task.taskHeaderHistory.service.ITaskHeaderHistoryService; 19 import org.jeecg.modules.wms.task.taskHeaderHistory.service.ITaskHeaderHistoryService;
17 import org.springframework.beans.BeanUtils; 20 import org.springframework.beans.BeanUtils;
18 -import org.springframework.stereotype.Service;  
19 import org.springframework.beans.factory.annotation.Autowired; 21 import org.springframework.beans.factory.annotation.Autowired;
  22 +import org.springframework.stereotype.Service;
20 import org.springframework.transaction.annotation.Transactional; 23 import org.springframework.transaction.annotation.Transactional;
21 import org.springframework.util.CollectionUtils; 24 import org.springframework.util.CollectionUtils;
22 25
23 -import javax.annotation.Resource;  
24 -import java.io.Serializable;  
25 -import java.util.List;  
26 -import java.util.Collection; 26 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  27 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
27 28
28 /** 29 /**
29 * @Description: task_header_history 30 * @Description: task_header_history
30 - * @Author: jeecg-boot  
31 - * @Date: 2023-09-14  
32 - * @Version: V1.0 31 + * @Author: jeecg-boot
  32 + * @Date: 2023-09-14
  33 + * @Version: V1.0
33 */ 34 */
34 @Service 35 @Service
35 public class TaskHeaderHistoryServiceImpl extends ServiceImpl<TaskHeaderHistoryMapper, TaskHeaderHistory> implements ITaskHeaderHistoryService { 36 public class TaskHeaderHistoryServiceImpl extends ServiceImpl<TaskHeaderHistoryMapper, TaskHeaderHistory> implements ITaskHeaderHistoryService {
36 37
37 - @Autowired  
38 - private TaskHeaderHistoryMapper taskHeaderHistoryMapper;  
39 - @Autowired  
40 - private TaskDetailHistoryMapper taskDetailHistoryMapper;  
41 - @Resource  
42 - private ITaskHeaderService taskHeaderService;  
43 - @Resource  
44 - private ITaskDetailService taskDetailService;  
45 - @Resource  
46 - private ITaskDetailHistoryService taskDetailHistoryService;  
47 - 38 + @Autowired
  39 + private TaskHeaderHistoryMapper taskHeaderHistoryMapper;
  40 + @Autowired
  41 + private TaskDetailHistoryMapper taskDetailHistoryMapper;
  42 + @Resource
  43 + private ITaskHeaderService taskHeaderService;
  44 + @Resource
  45 + private ITaskDetailService taskDetailService;
  46 + @Resource
  47 + private ITaskDetailHistoryService taskDetailHistoryService;
48 48
49 - @Override  
50 - @Transactional  
51 - public void saveMain(TaskHeaderHistory taskHeaderHistory, List<TaskDetailHistory> taskDetailHistoryList) {  
52 - taskHeaderHistoryMapper.insert(taskHeaderHistory);  
53 - if(taskDetailHistoryList!=null && taskDetailHistoryList.size()>0) {  
54 - for(TaskDetailHistory entity:taskDetailHistoryList) {  
55 - //外键设置  
56 - entity.setTaskHeaderId(taskHeaderHistory.getId());  
57 - taskDetailHistoryMapper.insert(entity);  
58 - }  
59 - }  
60 - } 49 + @Override
  50 + @Transactional
  51 + public void saveMain(TaskHeaderHistory taskHeaderHistory, List<TaskDetailHistory> taskDetailHistoryList) {
  52 + taskHeaderHistoryMapper.insert(taskHeaderHistory);
  53 + if (taskDetailHistoryList != null && taskDetailHistoryList.size() > 0) {
  54 + for (TaskDetailHistory entity : taskDetailHistoryList) {
  55 + // 外键设置
  56 + entity.setTaskHeaderId(taskHeaderHistory.getId());
  57 + taskDetailHistoryMapper.insert(entity);
  58 + }
  59 + }
  60 + }
61 61
62 - @Override  
63 - @Transactional  
64 - public void updateMain(TaskHeaderHistory taskHeaderHistory,List<TaskDetailHistory> taskDetailHistoryList) {  
65 - taskHeaderHistoryMapper.updateById(taskHeaderHistory); 62 + @Override
  63 + @Transactional
  64 + public void updateMain(TaskHeaderHistory taskHeaderHistory, List<TaskDetailHistory> taskDetailHistoryList) {
  65 + taskHeaderHistoryMapper.updateById(taskHeaderHistory);
66 66
67 - //1.先删除子表数据  
68 - //taskDetailHistoryMapper.deleteByMainId(taskHeaderHistory.getId()); 67 + // 1.先删除子表数据
  68 + // taskDetailHistoryMapper.deleteByMainId(taskHeaderHistory.getId());
69 69
70 - //2.子表数据重新插入  
71 - if(taskDetailHistoryList!=null && taskDetailHistoryList.size()>0) {  
72 - for(TaskDetailHistory entity:taskDetailHistoryList) {  
73 - //外键设置  
74 - entity.setTaskHeaderId(taskHeaderHistory.getId());  
75 - taskDetailHistoryMapper.insert(entity);  
76 - }  
77 - }  
78 - } 70 + // 2.子表数据重新插入
  71 + if (taskDetailHistoryList != null && taskDetailHistoryList.size() > 0) {
  72 + for (TaskDetailHistory entity : taskDetailHistoryList) {
  73 + // 外键设置
  74 + entity.setTaskHeaderId(taskHeaderHistory.getId());
  75 + taskDetailHistoryMapper.insert(entity);
  76 + }
  77 + }
  78 + }
79 79
80 - @Override  
81 - @Transactional  
82 - public void delMain(String id) {  
83 - taskDetailHistoryMapper.deleteByMainId(id);  
84 - taskHeaderHistoryMapper.deleteById(id);  
85 - } 80 + @Override
  81 + @Transactional
  82 + public void delMain(String id) {
  83 + taskDetailHistoryMapper.deleteByMainId(id);
  84 + taskHeaderHistoryMapper.deleteById(id);
  85 + }
86 86
87 - @Override  
88 - @Transactional  
89 - public void delBatchMain(Collection<? extends Serializable> idList) {  
90 - for(Serializable id:idList) {  
91 - taskDetailHistoryMapper.deleteByMainId(id.toString());  
92 - taskHeaderHistoryMapper.deleteById(id);  
93 - }  
94 - } 87 + @Override
  88 + @Transactional
  89 + public void delBatchMain(Collection<? extends Serializable> idList) {
  90 + for (Serializable id : idList) {
  91 + taskDetailHistoryMapper.deleteByMainId(id.toString());
  92 + taskHeaderHistoryMapper.deleteById(id);
  93 + }
  94 + }
95 95
96 - @Override  
97 - public void saveById(Integer id) {  
98 - TaskHeader taskHeader=taskHeaderService.getById(id);  
99 - TaskHeaderHistory taskHeaderHistory=new TaskHeaderHistory();  
100 - BeanUtils.copyProperties(taskHeader,taskHeaderHistory);  
101 - taskHeaderHistoryMapper.insert(taskHeaderHistory);  
102 - List<TaskDetail>taskDetailList=taskDetailService.list(new LambdaQueryWrapper<TaskDetail>().eq(TaskDetail::getTaskHeaderId, taskHeader.getId()));  
103 - if (!CollectionUtils.isEmpty(taskDetailList)) {  
104 - for (TaskDetail detail : taskDetailList) {  
105 - TaskDetailHistory taskDetailHistory = new TaskDetailHistory();  
106 - BeanUtils.copyProperties(detail, taskDetailHistory);  
107 - if (!taskDetailHistoryService.save(taskDetailHistory)) {  
108 - throw new JeecgBootException("批量新增失败");  
109 - }  
110 - }  
111 - } 96 + @Override
  97 + @Transactional
  98 + public void saveById(Integer id) {
  99 + TaskHeader taskHeader = taskHeaderService.getById(id);
  100 + TaskHeaderHistory taskHeaderHistory = new TaskHeaderHistory();
  101 + BeanUtils.copyProperties(taskHeader, taskHeaderHistory);
  102 + taskHeaderHistoryMapper.insert(taskHeaderHistory);
  103 + List<TaskDetail> taskDetailList = taskDetailService.list(new LambdaQueryWrapper<TaskDetail>().eq(TaskDetail::getTaskHeaderId, taskHeader.getId()));
  104 + if (!CollectionUtils.isEmpty(taskDetailList)) {
  105 + for (TaskDetail detail : taskDetailList) {
  106 + TaskDetailHistory taskDetailHistory = new TaskDetailHistory();
  107 + BeanUtils.copyProperties(detail, taskDetailHistory);
  108 + if (!taskDetailHistoryService.save(taskDetailHistory)) {
  109 + throw new JeecgBootException("批量新增失败");
  110 + }
  111 + }
  112 + }
112 113
113 - } 114 + }
114 } 115 }
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
@@ -484,6 +484,7 @@ public class QuantityConstant { @@ -484,6 +484,7 @@ public class QuantityConstant {
484 public static final String RULE_CALL_BOX_ALLOW_EMPTY = "callBoxAllowEmpty"; 484 public static final String RULE_CALL_BOX_ALLOW_EMPTY = "callBoxAllowEmpty";
485 public static final String DOUBLE_FORK_RESERVE_LOCATION = "doubleForkReserveLocation"; 485 public static final String DOUBLE_FORK_RESERVE_LOCATION = "doubleForkReserveLocation";
486 public static final String DOUBLE_FORK_SEARCH_LOCATION = "doubleForkSearchLocation"; 486 public static final String DOUBLE_FORK_SEARCH_LOCATION = "doubleForkSearchLocation";
  487 + public static final String MAX_ROADWAY_RECEIPT = "maxRoadWayReceipt";
487 public static final String WAREHOUSING_WEIGHING = "warehousingWeighing"; 488 public static final String WAREHOUSING_WEIGHING = "warehousingWeighing";
488 public static final String EXCEPTION_TO_CACHE = "exceptionToCache"; 489 public static final String EXCEPTION_TO_CACHE = "exceptionToCache";
489 public static final String CONTAINER_SPEC = "containerSpec"; 490 public static final String CONTAINER_SPEC = "containerSpec";
@@ -12,17 +12,16 @@ @@ -12,17 +12,16 @@
12 <groupId>com.huaheng.wms</groupId> 12 <groupId>com.huaheng.wms</groupId>
13 <artifactId>huaheng-wms4</artifactId> 13 <artifactId>huaheng-wms4</artifactId>
14 <version>4.0.1</version> 14 <version>4.0.1</version>
15 - 15 +
16 <packaging>pom</packaging> 16 <packaging>pom</packaging>
17 17
18 <name>huaheng-wms4</name> 18 <name>huaheng-wms4</name>
19 <description>huaheng wms project for Spring Boot</description> 19 <description>huaheng wms project for Spring Boot</description>
20 20
21 <modules> 21 <modules>
22 - <module>huaheng-wms-core</module>  
23 <module>ant-design-vue-jeecg</module> 22 <module>ant-design-vue-jeecg</module>
  23 + <module>huaheng-wms-core</module>
24 </modules> 24 </modules>
25 -  
26 <repositories> 25 <repositories>
27 <repository> 26 <repository>
28 <id>aliyun</id> 27 <id>aliyun</id>