Commit 0fddc1b6ca82187092dd3810b5c42c5c98923aa6
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms4.git into develop
Showing
6 changed files
with
83 additions
and
13 deletions
ant-design-vue-jeecg/src/views/system/receipt/ReceiptHeaderList.vue
... | ... | @@ -175,8 +175,9 @@ |
175 | 175 | </template> |
176 | 176 | |
177 | 177 | <span slot="action" slot-scope="text, record"> |
178 | - <a-popconfirm v-has="'receiptHeader:back'" v-show="record.lastStatus == 800 && record.referCode != null" title="确定回传吗?" @confirm="() => hanleBack(record)"> | |
178 | + <a-popconfirm v-has="'receiptHeader:back'" v-show="(record.lastStatus == 800 || record.lastStatus == 850)&& record.referCode != null" title="确定回传吗?" @confirm="() => hanleBack(record)"> | |
179 | 179 | <a><a-button type="default">回传</a-button></a> |
180 | + <a-divider type="vertical"/> | |
180 | 181 | </a-popconfirm> |
181 | 182 | <a-popconfirm v-has="'receiptHeader:crossDocking'" v-show="record.lastStatus == 0" title="确定越库吗?" @confirm="() => hanleCross(record)"> |
182 | 183 | <a><a-button type="primary">越库</a-button></a> |
... | ... |
ant-design-vue-jeecg/src/views/system/shipment/ShipmentHeaderList.vue
... | ... | @@ -204,9 +204,11 @@ |
204 | 204 | <span slot="action" slot-scope="text, record"> |
205 | 205 | <a v-if="record.firstStatus == '0' && flowOff == '1'" @click="createAudit(record)"><a-button type="primary">提交审核</a-button><a-divider type="vertical"/></a> |
206 | 206 | <a v-if="record.nextAuditor == username && flowOff == '1' " @click="audit(record)"><a-button type="primary">审核</a-button><a-divider type="vertical"/></a> |
207 | - <a-popconfirm v-has="'shipmentHeader:back'" v-if="record.lastStatus == 800 && record.referCode != null" title="确定回传吗?" @confirm="() => hanleBack(record)"> | |
207 | + <a-popconfirm v-has="'shipmentHeader:back'" v-show="(record.lastStatus == 800 || record.lastStatus == 850)&& record.referCode != null" title="确定回传吗?" @confirm="() => hanleBack(record)"> | |
208 | 208 | <a><a-button type="default">回传</a-button></a> |
209 | + <a-divider type="vertical"/> | |
209 | 210 | </a-popconfirm> |
211 | + <a v-show="record.lastStatus == 850" @click="viewReason(record)"><a-button type="danger">原因</a-button><a-divider type="vertical"/></a> | |
210 | 212 | <a v-if="((record.firstStatus >= 15 && record.firstStatus != '20' && record.lastStatus < 800)) |
211 | 213 | || (flowOff == '0' && record.lastStatus <= 200)" @click="autoShipmentCombine(record)" v-has="'shipmentHeader:autoShipmentCombine'"><a-button type="primary">自动配盘</a-button><a-divider type="vertical"/></a> |
212 | 214 | <a-dropdown v-if="(record.firstStatus > 0 && record.firstStatus <= 20 && flowOff=='1') |
... | ... | @@ -269,6 +271,7 @@ import ShipmentAuditModal from "./modules/ShipmentAuditModal"; |
269 | 271 | import FlowProcess from "../flow/FlowProcess"; |
270 | 272 | import AutoShipmentSelectModal from "@views/system/shipment/modules/AutoShipmentSelectModal"; |
271 | 273 | import '@/assets/less/TableExpand.less' |
274 | +import {notification} from "ant-design-vue"; | |
272 | 275 | |
273 | 276 | export default { |
274 | 277 | name: "ShipmentHeaderList", |
... | ... | @@ -481,6 +484,12 @@ export default { |
481 | 484 | this.$message.error("至少选择两条符合条件的记录!") |
482 | 485 | } |
483 | 486 | }, |
487 | + viewReason(record){ | |
488 | + notification.open({ | |
489 | + message:"出库单号:"+record.code, | |
490 | + description:record.backErrorMsg | |
491 | + }) | |
492 | + }, | |
484 | 493 | getDocumentAduitFlowStaus(){ |
485 | 494 | getDocumentAduitFlow().then((res) => { |
486 | 495 | this.flowOff=res.message; |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/ErpTask.java
... | ... | @@ -42,8 +42,7 @@ public class ErpTask implements Job { |
42 | 42 | @Override |
43 | 43 | public void execute(JobExecutionContext context) throws JobExecutionException { |
44 | 44 | LambdaQueryWrapper<ReceiptHeader> receiptHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
45 | - receiptHeaderLambdaQueryWrapper.in(ReceiptHeader::getLastStatus, QuantityConstant.RECEIPT_HEADER_COMPLETED, QuantityConstant.RECEIPT_HEADER_RETURN_ERROR) | |
46 | - .isNotNull(ReceiptHeader::getReferCode); | |
45 | + receiptHeaderLambdaQueryWrapper.eq(ReceiptHeader::getLastStatus, QuantityConstant.RECEIPT_HEADER_COMPLETED).isNotNull(ReceiptHeader::getReferCode); | |
47 | 46 | List<ReceiptHeader> receiptHeaderList = receiptHeaderService.list(receiptHeaderLambdaQueryWrapper); |
48 | 47 | for (ReceiptHeader receiptHeader : receiptHeaderList) { |
49 | 48 | try { |
... | ... | @@ -53,8 +52,7 @@ public class ErpTask implements Job { |
53 | 52 | } |
54 | 53 | } |
55 | 54 | LambdaQueryWrapper<ShipmentHeader> shipmentHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); |
56 | - shipmentHeaderLambdaQueryWrapper.in(ShipmentHeader::getLastStatus, QuantityConstant.SHIPMENT_HEADER_COMPLETED, QuantityConstant.SHIPMENT_HEADER_RETURN_ERROR) | |
57 | - .isNotNull(ShipmentHeader::getReferCode); | |
55 | + shipmentHeaderLambdaQueryWrapper.eq(ShipmentHeader::getLastStatus, QuantityConstant.SHIPMENT_HEADER_COMPLETED).isNotNull(ShipmentHeader::getReferCode); | |
58 | 56 | List<ShipmentHeader> shipmentHeaderList = shipmentHeaderService.list(shipmentHeaderLambdaQueryWrapper); |
59 | 57 | for (ShipmentHeader shipmentHeader : shipmentHeaderList) { |
60 | 58 | try { |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/monitor/job/ErpTryTask.java
0 → 100644
1 | +package org.jeecg.modules.wms.monitor.job; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +import javax.annotation.Resource; | |
6 | + | |
7 | +import org.jeecg.modules.wms.api.erp.service.IErpService; | |
8 | +import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService; | |
9 | +import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | |
10 | +import org.jeecg.modules.wms.receipt.receiptHeader.service.IReceiptHeaderService; | |
11 | +import org.jeecg.modules.wms.shipment.shipmentHeader.entity.ShipmentHeader; | |
12 | +import org.jeecg.modules.wms.shipment.shipmentHeader.service.IShipmentHeaderService; | |
13 | +import org.jeecg.utils.constant.QuantityConstant; | |
14 | +import org.quartz.*; | |
15 | + | |
16 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
17 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
18 | + | |
19 | +import lombok.extern.slf4j.Slf4j; | |
20 | + | |
21 | +/** | |
22 | + * @author 游杰 | |
23 | + */ | |
24 | +@Slf4j | |
25 | +@PersistJobDataAfterExecution | |
26 | +@DisallowConcurrentExecution | |
27 | +public class ErpTryTask implements Job { | |
28 | + | |
29 | + @Resource | |
30 | + private IReceiptHeaderService receiptHeaderService; | |
31 | + | |
32 | + @Resource | |
33 | + private IShipmentHeaderService shipmentHeaderService; | |
34 | + | |
35 | + @Resource | |
36 | + private IErpService erpService; | |
37 | + @Resource | |
38 | + private IHuahengMultiHandlerService huahengMultiHandlerService; | |
39 | + | |
40 | + @Override | |
41 | + public void execute(JobExecutionContext context) throws JobExecutionException { | |
42 | + LambdaQueryWrapper<ReceiptHeader> receiptHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
43 | + receiptHeaderLambdaQueryWrapper.eq(ReceiptHeader::getLastStatus, QuantityConstant.RECEIPT_HEADER_RETURN_ERROR).isNotNull(ReceiptHeader::getReferCode); | |
44 | + List<ReceiptHeader> receiptHeaderList = receiptHeaderService.list(receiptHeaderLambdaQueryWrapper); | |
45 | + for (ReceiptHeader receiptHeader : receiptHeaderList) { | |
46 | + try { | |
47 | + huahengMultiHandlerService.backReceipt(receiptHeader); | |
48 | + } catch (Exception e) { | |
49 | + e.printStackTrace(); | |
50 | + } | |
51 | + } | |
52 | + LambdaQueryWrapper<ShipmentHeader> shipmentHeaderLambdaQueryWrapper = Wrappers.lambdaQuery(); | |
53 | + shipmentHeaderLambdaQueryWrapper.eq(ShipmentHeader::getLastStatus, QuantityConstant.SHIPMENT_HEADER_RETURN_ERROR).isNotNull(ShipmentHeader::getReferCode); | |
54 | + List<ShipmentHeader> shipmentHeaderList = shipmentHeaderService.list(shipmentHeaderLambdaQueryWrapper); | |
55 | + for (ShipmentHeader shipmentHeader : shipmentHeaderList) { | |
56 | + try { | |
57 | + huahengMultiHandlerService.backShipment(shipmentHeader); | |
58 | + } catch (Exception e) { | |
59 | + e.printStackTrace(); | |
60 | + } | |
61 | + } | |
62 | + } | |
63 | +} | |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptHeaderServiceImpl.java
... | ... | @@ -78,7 +78,8 @@ public class ReceiptHeaderServiceImpl extends ServiceImpl<ReceiptHeaderMapper, R |
78 | 78 | msg = "'上游单号:'+ #receiptHeader.getReferCode() + ',仓库编码:' + #receiptHeader.getWarehouseCode()", recordReturnValue = true) |
79 | 79 | public boolean delMain(String id, String reason) { |
80 | 80 | ReceiptHeader receiptHeader = getById(id); |
81 | - if (receiptHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD) { | |
81 | + if (receiptHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD | |
82 | + && receiptHeader.getFirstStatus().intValue() <= QuantityConstant.RECEIPT_HEADER_COMPLETED) { | |
82 | 83 | throw new JeecgBootException("不能删除非新建状态单据"); |
83 | 84 | } |
84 | 85 | receiptHeaderHistoryService.saveById(id, reason); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentHeaderServiceImpl.java
... | ... | @@ -6,7 +6,6 @@ import java.text.SimpleDateFormat; |
6 | 6 | import java.util.Collection; |
7 | 7 | import java.util.Date; |
8 | 8 | import java.util.List; |
9 | -import java.util.Map; | |
10 | 9 | import java.util.stream.Collectors; |
11 | 10 | |
12 | 11 | import javax.annotation.Resource; |
... | ... | @@ -26,9 +25,7 @@ import org.jeecg.modules.wms.config.waveConfig.entity.WaveConfigDetail; |
26 | 25 | import org.jeecg.modules.wms.config.zone.entity.Zone; |
27 | 26 | import org.jeecg.modules.wms.config.zone.service.IZoneService; |
28 | 27 | import org.jeecg.modules.wms.framework.service.IHuahengMultiHandlerService; |
29 | -import org.jeecg.modules.wms.inventory.inventoryHeader.entity.InventoryDetail; | |
30 | 28 | import org.jeecg.modules.wms.inventory.inventoryHeader.service.IInventoryDetailService; |
31 | -import org.jeecg.modules.wms.receipt.receiptHeader.entity.ReceiptHeader; | |
32 | 29 | import org.jeecg.modules.wms.shipment.shipmentCombination.service.IShipmentCombinationService; |
33 | 30 | import org.jeecg.modules.wms.shipment.shipmentContainerAdvice.entity.ShipmentContainerAdvice; |
34 | 31 | import org.jeecg.modules.wms.shipment.shipmentContainerAdvice.service.IShipmentContainerAdviceService; |
... | ... | @@ -127,10 +124,11 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl<ShipmentHeaderMapper, |
127 | 124 | @Transactional(rollbackFor = Exception.class) |
128 | 125 | public boolean delMain(String id, String reason) { |
129 | 126 | ShipmentHeader shipmentHeader = getById(id); |
130 | - if (shipmentHeader == null) { | |
127 | + if (shipmentHeader == null) { | |
131 | 128 | throw new JeecgBootException("获取出库单信息失败!"); |
132 | - } | |
133 | - if (shipmentHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD) { | |
129 | + } | |
130 | + if (shipmentHeader.getFirstStatus().intValue() > QuantityConstant.SHIPMENT_HEADER_BUILD | |
131 | + && shipmentHeader.getFirstStatus().intValue() <= QuantityConstant.SHIPMENT_HEADER_COMPLETED) { | |
134 | 132 | throw new JeecgBootException("不能删除非新建状态单据"); |
135 | 133 | } |
136 | 134 | LambdaUpdateWrapper<ShipmentHeader> shipmentHeaderLambdaUpdateWrapper = Wrappers.lambdaUpdate(); |
... | ... |