|
@@ -2,10 +2,11 @@ package com.fjhx.controller.stock;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.fjhx.base.Condition;
|
|
|
-import com.fjhx.entity.stock.StockJournal;
|
|
|
+import com.fjhx.enums.stock.InTypeEnum;
|
|
|
+import com.fjhx.params.stock.StockChangeVo;
|
|
|
import com.fjhx.service.apply.ApplyPurchaseService;
|
|
|
import com.fjhx.service.logistics.LogisticsDetailsService;
|
|
|
-import com.fjhx.service.stock.StockJournalService;
|
|
|
+import com.fjhx.service.stock.StockService;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -17,11 +18,11 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
- * 申购入库
|
|
|
+ * 采购入库
|
|
|
*/
|
|
|
@RestController
|
|
|
-@RequestMapping("/applyIn")
|
|
|
-public class ApplyInController {
|
|
|
+@RequestMapping("/purchase/in/stock")
|
|
|
+public class PurchaseInStockController {
|
|
|
|
|
|
@Autowired
|
|
|
private ApplyPurchaseService applyPurchaseService;
|
|
@@ -30,7 +31,7 @@ public class ApplyInController {
|
|
|
private LogisticsDetailsService logisticsDetailsService;
|
|
|
|
|
|
@Autowired
|
|
|
- private StockJournalService stockJournalService;
|
|
|
+ private StockService stockService;
|
|
|
|
|
|
@PostMapping("/page")
|
|
|
public R page(@RequestBody Condition condition) {
|
|
@@ -44,9 +45,10 @@ public class ApplyInController {
|
|
|
return R.success(result);
|
|
|
}
|
|
|
|
|
|
- @PostMapping("/inAdd")
|
|
|
- public R inAdd(@RequestBody List<StockJournal> list) {
|
|
|
-// stockJournalService.inAdd(list);
|
|
|
+ @PostMapping("/add")
|
|
|
+ public R add(@RequestBody StockChangeVo stockVo) {
|
|
|
+ stockVo.setTypeEnum(InTypeEnum.PURCHASE);
|
|
|
+ stockService.changeQuantity(stockVo);
|
|
|
return R.success();
|
|
|
}
|
|
|
|