|
|
@@ -32,9 +32,11 @@ import com.dk.mdm.model.response.sale.OrderResponse;
|
|
|
import com.dk.mdm.model.vo.ivt.InboundItemVO;
|
|
|
import com.dk.mdm.model.vo.ivt.OutboundItemVO;
|
|
|
import com.dk.mdm.model.vo.ivt.OutboundVO;
|
|
|
+import com.dk.mdm.model.vo.mac.RecPayVO;
|
|
|
import com.dk.mdm.service.common.CommonService;
|
|
|
import com.dk.mdm.service.ivt.inventory.InventoryService;
|
|
|
import com.dk.mdm.service.mac.AccountService;
|
|
|
+import com.dk.mdm.service.mac.ReceiptService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -89,7 +91,8 @@ public class OutboundSaleReturnService extends BaseService<Outbound> {
|
|
|
|
|
|
@Autowired
|
|
|
private OutCommon outCommon;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private ReceiptService receiptService;
|
|
|
|
|
|
/**
|
|
|
* @desc : 修改原总单数据(订单,出库单)
|
|
|
@@ -282,7 +285,28 @@ public class OutboundSaleReturnService extends BaseService<Outbound> {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ /**
|
|
|
+ * @desc : 销售退货出库新建>>>退款
|
|
|
+ * @date : 2024/3/7 14:13
|
|
|
+ * @author : 寇珊珊
|
|
|
+ */
|
|
|
+ @Transactional(rollbackFor = {Exception.class})
|
|
|
+ public ResponseResultVO<?> saleReturnOutboundInsertRefund(OutboundVO outboundVO) {
|
|
|
+ //新建退货出库
|
|
|
+ saleReturnOutboundInsert(outboundVO);
|
|
|
+ //新建退款
|
|
|
+ RecPayVO recPayVO = new RecPayVO();
|
|
|
+ recPayVO.setObjectId(outboundVO.getObjectId());
|
|
|
+ recPayVO.setOrgId(outboundVO.getOrgId());
|
|
|
+ recPayVO.setStaffId(outboundVO.getStaffId());
|
|
|
+ recPayVO.setAccDate(outboundVO.getAccDate());
|
|
|
+ recPayVO.setMakeStaff(outboundVO.getMakeStaff());
|
|
|
+ recPayVO.setRpType(outboundVO.getRpType());
|
|
|
+ recPayVO.setSumAmtRec(outboundVO.getSumAmtRec());
|
|
|
+ recPayVO.setItemList(outboundVO.getItemListRecPayItemVO());
|
|
|
+ receiptService.insertRefund(recPayVO);
|
|
|
+ return ResponseResultUtil.success();
|
|
|
+ }
|
|
|
/**
|
|
|
* @desc : 销售退货出库新建
|
|
|
* @date : 2024/3/7 14:13
|