|  | @@ -6164,10 +6164,10 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 | 
											
												
													
														|  |                          if (StringUtils.isNotNull(tWhgenle) && (wb.getfQty() <= tWhgenle.getfQtyblc())) { // 非空 且 撤销数 <= 结余数
 |  |                          if (StringUtils.isNotNull(tWhgenle) && (wb.getfQty() <= tWhgenle.getfQtyblc())) { // 非空 且 撤销数 <= 结余数
 | 
											
												
													
														|  |                              updateTWhgenlegData(wb, tWhgenle.getfId(), billsType);
 |  |                              updateTWhgenlegData(wb, tWhgenle.getfId(), billsType);
 | 
											
												
													
														|  |                              TWhgenleg whgenleg = tWhgenlegMapper.selectTWhgenlegById(tWhgenle.getfId());
 |  |                              TWhgenleg whgenleg = tWhgenlegMapper.selectTWhgenlegById(tWhgenle.getfId());
 | 
											
												
													
														|  | -                            Long qtyblc = whgenleg.getfQtyblc();
 |  | 
 | 
											
												
													
														|  | -                            BigDecimal grossweightblc = whgenleg.getfGrossweightblc();
 |  | 
 | 
											
												
													
														|  | -                            BigDecimal netweightblc = whgenleg.getfNetweightblc();
 |  | 
 | 
											
												
													
														|  | -                            if (qtyblc == 0 && grossweightblc.compareTo(BigDecimal.ZERO) == 0 && netweightblc.compareTo(BigDecimal.ZERO) == 0) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +                            Long qtyd = whgenleg.getfQtyd();
 | 
											
												
													
														|  | 
 |  | +                            BigDecimal grossweightd = whgenleg.getfGrossweightd();
 | 
											
												
													
														|  | 
 |  | +                            BigDecimal netweightd = whgenleg.getfNetweightd();
 | 
											
												
													
														|  | 
 |  | +                            if (qtyd == 0 && grossweightd.compareTo(BigDecimal.ZERO) == 0 && netweightd.compareTo(BigDecimal.ZERO) == 0) {
 | 
											
												
													
														|  |                                  tWhgenlegMapper.deleteTWhgenlegById(whgenleg.getfId());
 |  |                                  tWhgenlegMapper.deleteTWhgenlegById(whgenleg.getfId());
 | 
											
												
													
														|  |                              }
 |  |                              }
 | 
											
												
													
														|  |                          } else { // 撤销数>结余数
 |  |                          } else { // 撤销数>结余数
 | 
											
										
											
												
													
														|  | @@ -6197,6 +6197,13 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 | 
											
												
													
														|  |                          TWhgenleg tWhgenle = queryWhgenlegService.secondStockWhgenleg(tWarehousebills, wb, goods.getIfCntrno(), WarehouseTypeEnum.CONFIRM_OPERATION.getType());
 |  |                          TWhgenleg tWhgenle = queryWhgenlegService.secondStockWhgenleg(tWarehousebills, wb, goods.getIfCntrno(), WarehouseTypeEnum.CONFIRM_OPERATION.getType());
 | 
											
												
													
														|  |                          if (StringUtils.isNotNull(tWhgenle) && (wb.getfQty() <= tWhgenle.getfQtyblc())) {
 |  |                          if (StringUtils.isNotNull(tWhgenle) && (wb.getfQty() <= tWhgenle.getfQtyblc())) {
 | 
											
												
													
														|  |                              updateTWhgenlegData(wb, tWhgenle.getfId(), WarehouseTypeEnum.SJRK_REVOKE.getType());
 |  |                              updateTWhgenlegData(wb, tWhgenle.getfId(), WarehouseTypeEnum.SJRK_REVOKE.getType());
 | 
											
												
													
														|  | 
 |  | +                            TWhgenleg whgenleg = tWhgenlegMapper.selectTWhgenlegById(tWhgenle.getfId());
 | 
											
												
													
														|  | 
 |  | +                            Long qtyd = whgenleg.getfQtyd();
 | 
											
												
													
														|  | 
 |  | +                            BigDecimal grossweightd = whgenleg.getfGrossweightd();
 | 
											
												
													
														|  | 
 |  | +                            BigDecimal netweightd = whgenleg.getfNetweightd();
 | 
											
												
													
														|  | 
 |  | +                            if (qtyd == 0 && grossweightd.compareTo(BigDecimal.ZERO) == 0 && netweightd.compareTo(BigDecimal.ZERO) == 0) {
 | 
											
												
													
														|  | 
 |  | +                                tWhgenlegMapper.deleteTWhgenlegById(whgenleg.getfId());
 | 
											
												
													
														|  | 
 |  | +                            }
 | 
											
												
													
														|  |                          } else {
 |  |                          } else {
 | 
											
												
													
														|  |                              throw new WarehouseException("第" + i + "行撤销数大于库存结余数");
 |  |                              throw new WarehouseException("第" + i + "行撤销数大于库存结余数");
 | 
											
												
													
														|  |                          }
 |  |                          }
 |