|
|
@@ -165,6 +165,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
updateDetails.add(detail);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
//插入从表
|
|
|
if (insertDetails.size()>0) {
|
|
|
prodIODetailMapper.batchInsert(insertDetails);
|
|
|
@@ -173,7 +174,11 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
|
|
|
if (updateDetails.size()>0) {
|
|
|
prodIODetailMapper.batchUpdate(updateDetails);
|
|
|
}
|
|
|
-
|
|
|
+ //销售退货单的数量必须小于出货单数量
|
|
|
+ Integer inQty = prodInOutMapper.checkSaleInQty(pi_id);
|
|
|
+ if (inQty > 0) {
|
|
|
+ throw new BizException(BizExceptionCode.SALEIN_OUTOFQTY);
|
|
|
+ }
|
|
|
baseDTO = getBaseDTOById(pi_id,pi_class,pi_inoutno);
|
|
|
ProdInOut prodInOutNow = checkAndReturnOrder(pi_id);
|
|
|
//更新明细金额等
|