|
|
@@ -173,9 +173,9 @@ public class InboundReturnService extends BaseService<Inbound> {
|
|
|
inboundItemVO.setSPurId(inboundItemVO.getFromId());
|
|
|
//源采购明细ID(采购退货时记录)
|
|
|
inboundItemVO.setSPurItemId(inboundItemVO.getFromItemId());
|
|
|
- inboundItemVO.setIntoingQty(inboundItemVO.getReturnQty().multiply(new BigDecimal(-1)));
|
|
|
- inboundItemVO.setIntoingAmt(inboundItemVO.getReturnAmt().multiply(new BigDecimal(-1)));
|
|
|
- inboundItemVO.setPriceInto(inboundItemVO.getPriceInto());
|
|
|
+ inboundItemVO.setIntoingQty(inboundItemVO.getReturnQty());
|
|
|
+ inboundItemVO.setIntoingAmt(inboundItemVO.getReturnAmt());
|
|
|
+ inboundItemVO.setPriceInto(inboundItemVO.getPriceInto().abs());
|
|
|
inboundItemVO.setFromItemId(inboundItemVO.getItemId());
|
|
|
inboundItemVO.setSkuId(inboundItemVO.getSkuId());
|
|
|
inboundItemVO.setItemIndex(inboundItemVO.getItemIndex());
|
|
|
@@ -400,10 +400,31 @@ public class InboundReturnService extends BaseService<Inbound> {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
- public static void main(String[] args) {
|
|
|
- BigDecimal a = new BigDecimal(5);
|
|
|
- BigDecimal b = new BigDecimal(-5);
|
|
|
- System.out.println(a.add(b));
|
|
|
+ /**
|
|
|
+ * @desc : 编辑
|
|
|
+ * @date : 2022/6/28 16:58
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ public ResponseResultVO<String> returnHandle(InboundVO inboundVO){
|
|
|
+ for (InboundItemVO inboundItemVO : inboundVO.getItemList()) {
|
|
|
+ inboundItemVO.setIntoingQty(inboundItemVO.getReturnQty().abs());
|
|
|
+ inboundItemVO.setIntoingAmt(inboundItemVO.getReturnAmt().abs());
|
|
|
+ }
|
|
|
+ inboundPurchaseReturnService.saleReturnHandleInbound(inboundVO);
|
|
|
+ return ResponseResultUtil.success();
|
|
|
}
|
|
|
+ /**
|
|
|
+ * @desc : 采购退货入库撤销
|
|
|
+ * @date : 2022/6/28 16:58
|
|
|
+ * @author : 于继渤
|
|
|
+ */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ public ResponseResultVO<String> inboundReturnCancel(InboundVO inboundVO){
|
|
|
+ inboundPurchaseReturnService.saleReturnInboundCancel(inboundVO);
|
|
|
+ return ResponseResultUtil.success();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|