Commit 6ed35dc27f3adae56708c2f42d038e1e7388bdda

Authored by 谭毅彬
1 parent 81603874

出库单头表删除事务优化

Signed-off-by: TanYibin <5491541@qq.com>
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/receipt/receiptHeader/service/impl/ReceiptDetailServiceImpl.java
@@ -53,7 +53,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R @@ -53,7 +53,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl&lt;ReceiptDetailMapper, R
53 53
54 @Override 54 @Override
55 public boolean save(@Valid ReceiptDetail entity) { 55 public boolean save(@Valid ReceiptDetail entity) {
56 - BigDecimal qty = entity.getQty(); 56 +// BigDecimal qty = entity.getQty();
57 // if (qty.compareTo(BigDecimal.ZERO) < 0) { 57 // if (qty.compareTo(BigDecimal.ZERO) < 0) {
58 // throw new JeecgBootException("单据数量不能小于0"); 58 // throw new JeecgBootException("单据数量不能小于0");
59 // } 59 // }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/shipment/shipmentHeader/service/impl/ShipmentHeaderServiceImpl.java
@@ -80,12 +80,9 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl&lt;ShipmentHeaderMapper, @@ -80,12 +80,9 @@ public class ShipmentHeaderServiceImpl extends ServiceImpl&lt;ShipmentHeaderMapper,
80 if (shipmentHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD) { 80 if (shipmentHeader.getFirstStatus().intValue() > QuantityConstant.RECEIPT_HEADER_BUILD) {
81 throw new JeecgBootException("不能删除非新建状态单据"); 81 throw new JeecgBootException("不能删除非新建状态单据");
82 } 82 }
83 - boolean success = shipmentDetailMapper.deleteByMainId(id);  
84 - if (!success) {  
85 - return success;  
86 - }  
87 - success = removeById(id);  
88 - return success; 83 + shipmentDetailMapper.deleteByMainId(id.toString());
  84 + shipmentHeaderMapper.deleteById(id);
  85 + return true;
89 } 86 }
90 87
91 @Override 88 @Override