Commit e3be2fdcb05929dd1c5ccaa427177b330a008eff
Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4.git into develop
Showing
4 changed files
with
80 additions
and
18 deletions
ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue
@@ -6,15 +6,13 @@ | @@ -6,15 +6,13 @@ | ||
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="库区"> | 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> | 9 | + <a-form-model-item prop="zoneOptions"> |
10 | + <j-multi-select-tag | ||
11 | + v-model="queryParam.zoneCode" | ||
12 | + :options="zoneOptions" | ||
13 | + placeholder="请选择"> | ||
14 | + </j-multi-select-tag> | ||
15 | + </a-form-model-item> | ||
18 | </a-form-item> | 16 | </a-form-item> |
19 | </a-col> | 17 | </a-col> |
20 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> | 18 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
@@ -171,6 +169,7 @@ export default { | @@ -171,6 +169,7 @@ export default { | ||
171 | return { | 169 | return { |
172 | zoneList: [], | 170 | zoneList: [], |
173 | description: '库存表管理页面', | 171 | description: '库存表管理页面', |
172 | + zoneOptions:[], | ||
174 | // 表头 | 173 | // 表头 |
175 | columns: [ | 174 | columns: [ |
176 | { | 175 | { |
@@ -347,6 +346,14 @@ export default { | @@ -347,6 +346,14 @@ export default { | ||
347 | getZoneList().then((res) => { | 346 | getZoneList().then((res) => { |
348 | if (res.success) { | 347 | if (res.success) { |
349 | this.zoneList = res.result | 348 | this.zoneList = res.result |
349 | + //延迟半秒执行,避免组件未加载完,数据已经加载完 | ||
350 | + setTimeout(()=>{ | ||
351 | + //slice可以在数组的任何位置进行删除/添加操作 | ||
352 | + this.zoneOptions.splice(0, 1); | ||
353 | + for (let i = 0; i < res.result.length; i++) { | ||
354 | + this.zoneOptions.push({value:res.result[i].code,text:res.result[i].name}) | ||
355 | + } | ||
356 | + },500) | ||
350 | } | 357 | } |
351 | }); | 358 | }); |
352 | }, | 359 | }, |
ant-design-vue-jeecg/src/views/system/modules/UserModal.vue
@@ -162,7 +162,7 @@ import moment from 'moment' | @@ -162,7 +162,7 @@ import moment from 'moment' | ||
162 | import Vue from 'vue' | 162 | import Vue from 'vue' |
163 | import {ACCESS_TOKEN} from "@/store/mutation-types" | 163 | import {ACCESS_TOKEN} from "@/store/mutation-types" |
164 | import {getAction} from '@/api/manage' | 164 | import {getAction} from '@/api/manage' |
165 | -import {addUser, editUser, queryUserRole, queryall, queryWarehouse, getAllWarehouseList, getZoneList} from '@/api/api' | 165 | +import {addUser, editUser, queryUserRole, queryall, queryWarehouse, getAllWarehouseList, getZoneList, getAllZoneList} from '@/api/api' |
166 | import {disabledAuthFilter} from "@/utils/authFilter" | 166 | import {disabledAuthFilter} from "@/utils/authFilter" |
167 | import {duplicateCheck} from '@/api/api' | 167 | import {duplicateCheck} from '@/api/api' |
168 | 168 | ||
@@ -327,7 +327,7 @@ export default { | @@ -327,7 +327,7 @@ export default { | ||
327 | }); | 327 | }); |
328 | }, | 328 | }, |
329 | initZoneList() { | 329 | initZoneList() { |
330 | - getZoneList().then((res) => { | 330 | + getAllZoneList().then((res) => { |
331 | if (res.success) { | 331 | if (res.success) { |
332 | this.zoneOptions = res.result.map((item, index, arr) => { | 332 | this.zoneOptions = res.result.map((item, index, arr) => { |
333 | let c = {label: item.name, value: item.code} | 333 | let c = {label: item.name, value: item.code} |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/inventory/inventoryTransaction/entity/InventoryTransaction.java
@@ -47,6 +47,10 @@ public class InventoryTransaction implements Serializable { | @@ -47,6 +47,10 @@ public class InventoryTransaction implements Serializable { | ||
47 | @Excel(name = "容器编码", width = 15) | 47 | @Excel(name = "容器编码", width = 15) |
48 | @ApiModelProperty(value = "容器编码") | 48 | @ApiModelProperty(value = "容器编码") |
49 | private String containerCode; | 49 | private String containerCode; |
50 | + /** 库区编码 */ | ||
51 | + @Excel(name = "库区编码", width = 15) | ||
52 | + @ApiModelProperty(value = "库区编码") | ||
53 | + private String zoneCode; | ||
50 | /** 起始库位编码 */ | 54 | /** 起始库位编码 */ |
51 | @Excel(name = "起始库位编码", width = 15) | 55 | @Excel(name = "起始库位编码", width = 15) |
52 | @ApiModelProperty(value = "起始库位编码") | 56 | @ApiModelProperty(value = "起始库位编码") |
@@ -64,6 +68,14 @@ public class InventoryTransaction implements Serializable { | @@ -64,6 +68,14 @@ public class InventoryTransaction implements Serializable { | ||
64 | @Excel(name = "出库单id", width = 15) | 68 | @Excel(name = "出库单id", width = 15) |
65 | @ApiModelProperty(value = "出库单id") | 69 | @ApiModelProperty(value = "出库单id") |
66 | private Integer shipmentId; | 70 | private Integer shipmentId; |
71 | + /** 出库单编码 */ | ||
72 | + @Excel(name = "出库单编码", width = 15) | ||
73 | + @ApiModelProperty(value = "出库单编码") | ||
74 | + private String shipmentCode; | ||
75 | + /** 出库单编码 */ | ||
76 | + @Excel(name = "出库单类型", width = 15) | ||
77 | + @ApiModelProperty(value = "出库单类型") | ||
78 | + private String shipmentType; | ||
67 | /** 出库详情id */ | 79 | /** 出库详情id */ |
68 | @Excel(name = "出库详情id", width = 15) | 80 | @Excel(name = "出库详情id", width = 15) |
69 | @ApiModelProperty(value = "出库详情id") | 81 | @ApiModelProperty(value = "出库详情id") |
@@ -76,6 +88,14 @@ public class InventoryTransaction implements Serializable { | @@ -76,6 +88,14 @@ public class InventoryTransaction implements Serializable { | ||
76 | @Excel(name = "入库单id", width = 15) | 88 | @Excel(name = "入库单id", width = 15) |
77 | @ApiModelProperty(value = "入库单id") | 89 | @ApiModelProperty(value = "入库单id") |
78 | private Integer receiptId; | 90 | private Integer receiptId; |
91 | + /** 入库单编码 */ | ||
92 | + @Excel(name = "入库单编码", width = 15) | ||
93 | + @ApiModelProperty(value = "入库单编码") | ||
94 | + private String receiptCode; | ||
95 | + /** 入库单编码 */ | ||
96 | + @Excel(name = "入库单类型", width = 15) | ||
97 | + @ApiModelProperty(value = "入库单类型") | ||
98 | + private String receiptType; | ||
79 | /** 入库单详情id */ | 99 | /** 入库单详情id */ |
80 | @Excel(name = "入库单详情id", width = 15) | 100 | @Excel(name = "入库单详情id", width = 15) |
81 | @ApiModelProperty(value = "入库单详情id") | 101 | @ApiModelProperty(value = "入库单详情id") |
@@ -109,19 +129,27 @@ public class InventoryTransaction implements Serializable { | @@ -109,19 +129,27 @@ public class InventoryTransaction implements Serializable { | ||
109 | @Excel(name = "数量", width = 15) | 129 | @Excel(name = "数量", width = 15) |
110 | @ApiModelProperty(value = "数量") | 130 | @ApiModelProperty(value = "数量") |
111 | private BigDecimal qty; | 131 | private BigDecimal qty; |
132 | + /** 入库数量 */ | ||
133 | + @Excel(name = "入库数量", width = 15) | ||
134 | + @ApiModelProperty(value = "入库数量") | ||
135 | + private BigDecimal receiptQty; | ||
136 | + /** 出库数量 */ | ||
137 | + @Excel(name = "出库数量", width = 15) | ||
138 | + @ApiModelProperty(value = "出库数量") | ||
139 | + private BigDecimal shipmentQty; | ||
112 | /** 库存数量 */ | 140 | /** 库存数量 */ |
113 | @Excel(name = "库存数量", width = 15) | 141 | @Excel(name = "库存数量", width = 15) |
114 | @ApiModelProperty(value = "库存数量") | 142 | @ApiModelProperty(value = "库存数量") |
115 | private BigDecimal inventoryQty; | 143 | private BigDecimal inventoryQty; |
116 | - /** 批次 */ | 144 | + /** 批次, 批次主要用于成品,比如以生产日期为批次 */ |
117 | @Excel(name = "批次", width = 15) | 145 | @Excel(name = "批次", width = 15) |
118 | @ApiModelProperty(value = "批次") | 146 | @ApiModelProperty(value = "批次") |
119 | private String batch; | 147 | private String batch; |
120 | - /** 批号 */ | 148 | + /** 批号, 批号主要用于原料,记录原料是哪一批 */ |
121 | @Excel(name = "批号", width = 15) | 149 | @Excel(name = "批号", width = 15) |
122 | @ApiModelProperty(value = "批号") | 150 | @ApiModelProperty(value = "批号") |
123 | private String lot; | 151 | private String lot; |
124 | - /** 项目号 */ | 152 | + /** 项目号, 项目号蛀牙用于记录项目 */ |
125 | @Excel(name = "项目号", width = 15) | 153 | @Excel(name = "项目号", width = 15) |
126 | @ApiModelProperty(value = "项目号") | 154 | @ApiModelProperty(value = "项目号") |
127 | private String project; | 155 | private String project; |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -1076,6 +1076,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1076,6 +1076,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1076 | if (receiptDetail == null) { | 1076 | if (receiptDetail == null) { |
1077 | throw new JeecgBootException("未找到ID:" + taskDetail.getReceiptDetailId() + "入库单明细"); | 1077 | throw new JeecgBootException("未找到ID:" + taskDetail.getReceiptDetailId() + "入库单明细"); |
1078 | } | 1078 | } |
1079 | + ReceiptHeader receiptHeader = receiptHeaderService.getById(receiptDetail.getReceiptId()); | ||
1080 | + if (receiptHeader == null) { | ||
1081 | + throw new JeecgBootException("未找到ID:" + receiptDetail.getReceiptId() + "入库单头"); | ||
1082 | + } | ||
1079 | // 操作记录统计用 | 1083 | // 操作记录统计用 |
1080 | taskDetail.setReceiptCode(receiptDetail.getReceiptCode()); | 1084 | taskDetail.setReceiptCode(receiptDetail.getReceiptCode()); |
1081 | BigDecimal taskQty = receiptDetail.getTaskQty(); | 1085 | BigDecimal taskQty = receiptDetail.getTaskQty(); |
@@ -1117,12 +1121,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1117,12 +1121,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1117 | inventoryTransaction.setWarehouseCode(taskDetail.getWarehouseCode()); | 1121 | inventoryTransaction.setWarehouseCode(taskDetail.getWarehouseCode()); |
1118 | inventoryTransaction.setCompanyCode(taskDetail.getCompanyCode()); | 1122 | inventoryTransaction.setCompanyCode(taskDetail.getCompanyCode()); |
1119 | inventoryTransaction.setContainerCode(containerCode); | 1123 | inventoryTransaction.setContainerCode(containerCode); |
1124 | + inventoryTransaction.setZoneCode(zoneCode); | ||
1120 | inventoryTransaction.setToLocationCode(toLocationCode); | 1125 | inventoryTransaction.setToLocationCode(toLocationCode); |
1121 | inventoryTransaction.setMaterialCode(taskDetail.getMaterialCode()); | 1126 | inventoryTransaction.setMaterialCode(taskDetail.getMaterialCode()); |
1122 | inventoryTransaction.setMaterialName(taskDetail.getMaterialName()); | 1127 | inventoryTransaction.setMaterialName(taskDetail.getMaterialName()); |
1123 | inventoryTransaction.setMaterialSpec(taskDetail.getMaterialSpec()); | 1128 | inventoryTransaction.setMaterialSpec(taskDetail.getMaterialSpec()); |
1124 | inventoryTransaction.setMaterialUnit(taskDetail.getMaterialUnit()); | 1129 | inventoryTransaction.setMaterialUnit(taskDetail.getMaterialUnit()); |
1125 | inventoryTransaction.setReceiptId(taskDetail.getReceiptId()); | 1130 | inventoryTransaction.setReceiptId(taskDetail.getReceiptId()); |
1131 | + inventoryTransaction.setReceiptCode(receiptHeader.getCode()); | ||
1132 | + inventoryTransaction.setReceiptType(receiptHeader.getType()); | ||
1126 | inventoryTransaction.setReceiptDetailId(taskDetail.getReceiptDetailId()); | 1133 | inventoryTransaction.setReceiptDetailId(taskDetail.getReceiptDetailId()); |
1127 | inventoryTransaction.setReceiptContainerDetailId(taskDetail.getReceiptContainerDetailId()); | 1134 | inventoryTransaction.setReceiptContainerDetailId(taskDetail.getReceiptContainerDetailId()); |
1128 | inventoryTransaction.setBatch(taskDetail.getBatch()); | 1135 | inventoryTransaction.setBatch(taskDetail.getBatch()); |
@@ -1130,6 +1137,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1130,6 +1137,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1130 | inventoryTransaction.setProject(taskDetail.getProject()); | 1137 | inventoryTransaction.setProject(taskDetail.getProject()); |
1131 | inventoryTransaction.setInventoryStatus(taskDetail.getInventoryStatus()); | 1138 | inventoryTransaction.setInventoryStatus(taskDetail.getInventoryStatus()); |
1132 | inventoryTransaction.setQty(receiptQty); | 1139 | inventoryTransaction.setQty(receiptQty); |
1140 | + inventoryTransaction.setReceiptQty(receiptQty); | ||
1133 | // 获得库存数量 | 1141 | // 获得库存数量 |
1134 | BigDecimal inventoryQty = inventoryDetailService.getSumQty(inventoryDetail); | 1142 | BigDecimal inventoryQty = inventoryDetailService.getSumQty(inventoryDetail); |
1135 | inventoryQty = inventoryQty.add(receiptQty); | 1143 | inventoryQty = inventoryQty.add(receiptQty); |
@@ -1207,6 +1215,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1207,6 +1215,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1207 | String fromLocationCode = taskHeader.getFromLocationCode(); | 1215 | String fromLocationCode = taskHeader.getFromLocationCode(); |
1208 | String toLocationCode = taskHeader.getToLocationCode(); | 1216 | String toLocationCode = taskHeader.getToLocationCode(); |
1209 | String containerCode = taskHeader.getContainerCode(); | 1217 | String containerCode = taskHeader.getContainerCode(); |
1218 | + String zoneCode = taskHeader.getZoneCode(); | ||
1210 | int taskType = taskHeader.getTaskType(); | 1219 | int taskType = taskHeader.getTaskType(); |
1211 | List<TaskDetail> taskDetailList = taskDetailService.getTaskDetailListByTaskId(taskHeader.getId()); | 1220 | List<TaskDetail> taskDetailList = taskDetailService.getTaskDetailListByTaskId(taskHeader.getId()); |
1212 | boolean success = false; | 1221 | boolean success = false; |
@@ -1254,6 +1263,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1254,6 +1263,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1254 | if (shipmentDetail == null) { | 1263 | if (shipmentDetail == null) { |
1255 | throw new JeecgBootException("完成出库任务, 出库任务没有找到出库详情" + taskDetail.getShipmentDetailId()); | 1264 | throw new JeecgBootException("完成出库任务, 出库任务没有找到出库详情" + taskDetail.getShipmentDetailId()); |
1256 | } | 1265 | } |
1266 | + ShipmentHeader shipmentHeader = shipmentHeaderService.getById(shipmentDetail.getShipmentId()); | ||
1267 | + if (shipmentHeader == null) { | ||
1268 | + throw new JeecgBootException("完成出库任务, 出库任务没有找到出库单" + shipmentDetail.getShipmentId()); | ||
1269 | + } | ||
1257 | taskDetail.setShipmentCode(shipmentDetail.getShipmentCode()); | 1270 | taskDetail.setShipmentCode(shipmentDetail.getShipmentCode()); |
1258 | int shipmentDetailId = shipmentDetail.getId(); | 1271 | int shipmentDetailId = shipmentDetail.getId(); |
1259 | int status = QuantityConstant.SHIPMENT_HEADER_COMPLETED; | 1272 | int status = QuantityConstant.SHIPMENT_HEADER_COMPLETED; |
@@ -1302,6 +1315,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1302,6 +1315,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1302 | inventoryTransaction.setWarehouseCode(warehouseCode); | 1315 | inventoryTransaction.setWarehouseCode(warehouseCode); |
1303 | inventoryTransaction.setCompanyCode(inventoryDetail.getCompanyCode()); | 1316 | inventoryTransaction.setCompanyCode(inventoryDetail.getCompanyCode()); |
1304 | inventoryTransaction.setContainerCode(containerCode); | 1317 | inventoryTransaction.setContainerCode(containerCode); |
1318 | + inventoryTransaction.setZoneCode(zoneCode); | ||
1305 | inventoryTransaction.setFromLocationCode(fromLocationCode); | 1319 | inventoryTransaction.setFromLocationCode(fromLocationCode); |
1306 | inventoryTransaction.setMaterialCode(inventoryDetail.getMaterialCode()); | 1320 | inventoryTransaction.setMaterialCode(inventoryDetail.getMaterialCode()); |
1307 | inventoryTransaction.setMaterialName(inventoryDetail.getMaterialName()); | 1321 | inventoryTransaction.setMaterialName(inventoryDetail.getMaterialName()); |
@@ -1309,12 +1323,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1309,12 +1323,15 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1309 | inventoryTransaction.setMaterialUnit(inventoryDetail.getMaterialUnit()); | 1323 | inventoryTransaction.setMaterialUnit(inventoryDetail.getMaterialUnit()); |
1310 | inventoryTransaction.setInventoryStatus(inventoryDetail.getInventoryStatus()); | 1324 | inventoryTransaction.setInventoryStatus(inventoryDetail.getInventoryStatus()); |
1311 | inventoryTransaction.setShipmentId(taskDetail.getShipmentId()); | 1325 | inventoryTransaction.setShipmentId(taskDetail.getShipmentId()); |
1326 | + inventoryTransaction.setShipmentCode(shipmentHeader.getCode()); | ||
1327 | + inventoryTransaction.setShipmentType(shipmentHeader.getType()); | ||
1312 | inventoryTransaction.setShipmentDetailId(taskDetail.getShipmentDetailId()); | 1328 | inventoryTransaction.setShipmentDetailId(taskDetail.getShipmentDetailId()); |
1313 | inventoryTransaction.setShipmentContainerDetailId(taskDetail.getShipmentContainerDetailId()); | 1329 | inventoryTransaction.setShipmentContainerDetailId(taskDetail.getShipmentContainerDetailId()); |
1314 | inventoryTransaction.setBatch(inventoryDetail.getBatch()); | 1330 | inventoryTransaction.setBatch(inventoryDetail.getBatch()); |
1315 | inventoryTransaction.setLot(inventoryDetail.getLot()); | 1331 | inventoryTransaction.setLot(inventoryDetail.getLot()); |
1316 | inventoryTransaction.setProject(inventoryDetail.getProject()); | 1332 | inventoryTransaction.setProject(inventoryDetail.getProject()); |
1317 | inventoryTransaction.setQty(taskDetail.getQty()); | 1333 | inventoryTransaction.setQty(taskDetail.getQty()); |
1334 | + inventoryTransaction.setShipmentQty(taskDetail.getQty()); | ||
1318 | BigDecimal inventoryQty = inventoryDetailService.getSumQty(inventoryDetail); | 1335 | BigDecimal inventoryQty = inventoryDetailService.getSumQty(inventoryDetail); |
1319 | inventoryTransaction.setInventoryQty(inventoryQty); | 1336 | inventoryTransaction.setInventoryQty(inventoryQty); |
1320 | inventoryTransactionList.add(inventoryTransaction); | 1337 | inventoryTransactionList.add(inventoryTransaction); |
@@ -1810,6 +1827,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1810,6 +1827,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1810 | String containerCode = taskHeader.getContainerCode(); | 1827 | String containerCode = taskHeader.getContainerCode(); |
1811 | String fromLocationCode = taskHeader.getFromLocationCode(); | 1828 | String fromLocationCode = taskHeader.getFromLocationCode(); |
1812 | String toLocationCode = taskHeader.getToLocationCode(); | 1829 | String toLocationCode = taskHeader.getToLocationCode(); |
1830 | + String zoneCode = taskHeader.getZoneCode(); | ||
1813 | boolean success = false; | 1831 | boolean success = false; |
1814 | if (StringUtils.isEmpty(fromLocationCode)) { | 1832 | if (StringUtils.isEmpty(fromLocationCode)) { |
1815 | return Result.error("完成盘点任务时,起始库位编码为空"); | 1833 | return Result.error("完成盘点任务时,起始库位编码为空"); |
@@ -1933,17 +1951,21 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -1933,17 +1951,21 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
1933 | InventoryTransaction inventoryTransaction = new InventoryTransaction(); | 1951 | InventoryTransaction inventoryTransaction = new InventoryTransaction(); |
1934 | inventoryTransaction.setWarehouseCode(taskHeader.getWarehouseCode()); | 1952 | inventoryTransaction.setWarehouseCode(taskHeader.getWarehouseCode()); |
1935 | inventoryTransaction.setCompanyCode(taskHeader.getCompanyCode()); | 1953 | inventoryTransaction.setCompanyCode(taskHeader.getCompanyCode()); |
1954 | + inventoryTransaction.setZoneCode(zoneCode); | ||
1936 | inventoryTransaction.setContainerCode(child.getContainerCode()); | 1955 | inventoryTransaction.setContainerCode(child.getContainerCode()); |
1937 | inventoryTransaction.setToLocationCode(child.getLocationCode()); | 1956 | inventoryTransaction.setToLocationCode(child.getLocationCode()); |
1938 | inventoryTransaction.setType(QuantityConstant.INVENTORY_TRANSACTION_CYCLEINTO); | 1957 | inventoryTransaction.setType(QuantityConstant.INVENTORY_TRANSACTION_CYCLEINTO); |
1939 | - inventoryTransaction.setReceiptId(warehousingOrderId); | ||
1940 | - inventoryTransaction.setReceiptDetailId(receiptDetail.getReceiptId()); | 1958 | + inventoryTransaction.setReceiptId(receiptDetail.getReceiptId()); |
1959 | + inventoryTransaction.setReceiptCode(receiptDetail.getReceiptCode()); | ||
1960 | + inventoryTransaction.setReceiptType(QuantityConstant.RECEIPT_BILL_TYPE_QTR); | ||
1961 | + inventoryTransaction.setReceiptDetailId(receiptDetail.getId()); | ||
1941 | inventoryTransaction.setMaterialCode(child.getMaterialCode()); | 1962 | inventoryTransaction.setMaterialCode(child.getMaterialCode()); |
1942 | inventoryTransaction.setMaterialName(child.getMaterialName()); | 1963 | inventoryTransaction.setMaterialName(child.getMaterialName()); |
1943 | inventoryTransaction.setMaterialSpec(child.getMaterialSpec()); | 1964 | inventoryTransaction.setMaterialSpec(child.getMaterialSpec()); |
1944 | inventoryTransaction.setMaterialUnit(child.getMaterialUnit()); | 1965 | inventoryTransaction.setMaterialUnit(child.getMaterialUnit()); |
1945 | inventoryTransaction.setInventoryStatus(child.getInventoryStatus()); | 1966 | inventoryTransaction.setInventoryStatus(child.getInventoryStatus()); |
1946 | inventoryTransaction.setQty(child.getCountedQty()); | 1967 | inventoryTransaction.setQty(child.getCountedQty()); |
1968 | + inventoryTransaction.setReceiptQty(child.getCountedQty()); | ||
1947 | inventoryTransaction.setBatch(child.getBatch()); | 1969 | inventoryTransaction.setBatch(child.getBatch()); |
1948 | inventoryTransaction.setLot(child.getLot()); | 1970 | inventoryTransaction.setLot(child.getLot()); |
1949 | success = inventoryTransactionService.save(inventoryTransaction); | 1971 | success = inventoryTransactionService.save(inventoryTransaction); |
@@ -2006,9 +2028,12 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -2006,9 +2028,12 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
2006 | inventoryTransaction.setWarehouseCode(taskHeader.getWarehouseCode()); | 2028 | inventoryTransaction.setWarehouseCode(taskHeader.getWarehouseCode()); |
2007 | inventoryTransaction.setCompanyCode(taskHeader.getCompanyCode()); | 2029 | inventoryTransaction.setCompanyCode(taskHeader.getCompanyCode()); |
2008 | inventoryTransaction.setContainerCode(child.getContainerCode()); | 2030 | inventoryTransaction.setContainerCode(child.getContainerCode()); |
2031 | + inventoryTransaction.setZoneCode(zoneCode); | ||
2009 | inventoryTransaction.setFromLocationCode(child.getLocationCode()); | 2032 | inventoryTransaction.setFromLocationCode(child.getLocationCode()); |
2010 | inventoryTransaction.setType(QuantityConstant.INVENTORY_TRANSACTION_CYCLEOUT); | 2033 | inventoryTransaction.setType(QuantityConstant.INVENTORY_TRANSACTION_CYCLEOUT); |
2011 | - inventoryTransaction.setShipmentId(outboundOrderId); | 2034 | + inventoryTransaction.setShipmentId(shipmentDetail.getShipmentId()); |
2035 | + inventoryTransaction.setShipmentCode(shipmentDetail.getShipmentCode()); | ||
2036 | + inventoryTransaction.setShipmentType(QuantityConstant.SHIPMENT_BILL_TYPE_QTC); | ||
2012 | inventoryTransaction.setShipmentDetailId(shipmentDetail.getId()); | 2037 | inventoryTransaction.setShipmentDetailId(shipmentDetail.getId()); |
2013 | inventoryTransaction.setMaterialCode(child.getMaterialCode()); | 2038 | inventoryTransaction.setMaterialCode(child.getMaterialCode()); |
2014 | inventoryTransaction.setMaterialName(child.getMaterialName()); | 2039 | inventoryTransaction.setMaterialName(child.getMaterialName()); |
@@ -2016,6 +2041,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -2016,6 +2041,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
2016 | inventoryTransaction.setMaterialUnit(child.getMaterialUnit()); | 2041 | inventoryTransaction.setMaterialUnit(child.getMaterialUnit()); |
2017 | inventoryTransaction.setInventoryStatus(child.getInventoryStatus()); | 2042 | inventoryTransaction.setInventoryStatus(child.getInventoryStatus()); |
2018 | inventoryTransaction.setQty(child.getCountedQty()); | 2043 | inventoryTransaction.setQty(child.getCountedQty()); |
2044 | + inventoryTransaction.setShipmentQty(child.getCountedQty()); | ||
2019 | inventoryTransaction.setBatch(child.getBatch()); | 2045 | inventoryTransaction.setBatch(child.getBatch()); |
2020 | inventoryTransaction.setLot(child.getLot()); | 2046 | inventoryTransaction.setLot(child.getLot()); |
2021 | success = inventoryTransactionService.save(inventoryTransaction); | 2047 | success = inventoryTransactionService.save(inventoryTransaction); |
@@ -2128,7 +2154,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -2128,7 +2154,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
2128 | String containerCode = taskHeader.getContainerCode(); | 2154 | String containerCode = taskHeader.getContainerCode(); |
2129 | String fromLocationCode = taskHeader.getFromLocationCode(); | 2155 | String fromLocationCode = taskHeader.getFromLocationCode(); |
2130 | String toLocationCode = taskHeader.getToLocationCode(); | 2156 | String toLocationCode = taskHeader.getToLocationCode(); |
2131 | - | 2157 | + String zoneCode = taskHeader.getZoneCode(); |
2132 | if (StringUtils.isEmpty(containerCode)) { | 2158 | if (StringUtils.isEmpty(containerCode)) { |
2133 | return Result.error("完成移库任务时, 托盘号为空"); | 2159 | return Result.error("完成移库任务时, 托盘号为空"); |
2134 | } | 2160 | } |
@@ -2151,6 +2177,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | @@ -2151,6 +2177,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea | ||
2151 | inventoryDetail.setLocationCode(toLocationCode); | 2177 | inventoryDetail.setLocationCode(toLocationCode); |
2152 | InventoryTransaction inventoryTransaction = new InventoryTransaction(); | 2178 | InventoryTransaction inventoryTransaction = new InventoryTransaction(); |
2153 | inventoryTransaction.setWarehouseCode(inventoryDetail.getWarehouseCode()); | 2179 | inventoryTransaction.setWarehouseCode(inventoryDetail.getWarehouseCode()); |
2180 | + inventoryTransaction.setZoneCode(zoneCode); | ||
2154 | inventoryTransaction.setContainerCode(inventoryDetail.getContainerCode()); | 2181 | inventoryTransaction.setContainerCode(inventoryDetail.getContainerCode()); |
2155 | inventoryTransaction.setCompanyCode(inventoryDetail.getCompanyCode()); | 2182 | inventoryTransaction.setCompanyCode(inventoryDetail.getCompanyCode()); |
2156 | inventoryTransaction.setType(QuantityConstant.INVENTORY_TRANSACTION_TRANSFER); | 2183 | inventoryTransaction.setType(QuantityConstant.INVENTORY_TRANSACTION_TRANSFER); |