|
@@ -0,0 +1,66 @@
|
|
|
|
+package com.fjhx.controller.quality;
|
|
|
|
+
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
+import com.fjhx.entity.quality.Quality;
|
|
|
|
+import com.fjhx.entity.stock.StockJournal;
|
|
|
|
+import com.fjhx.params.quality.QualityVo;
|
|
|
|
+import com.fjhx.service.quality.QualityService;
|
|
|
|
+import com.fjhx.service.stock.StockJournalService;
|
|
|
|
+import org.springblade.core.tool.api.R;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
+
|
|
|
|
+import java.util.Map;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * <p>
|
|
|
|
+ * 质检 前端控制器
|
|
|
|
+ * </p>
|
|
|
|
+ *
|
|
|
|
+ * @author ${author}
|
|
|
|
+ * @since 2022-12-23
|
|
|
|
+ */
|
|
|
|
+@RestController
|
|
|
|
+@RequestMapping("/quality")
|
|
|
|
+public class QualityController {
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private QualityService qualityService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private StockJournalService stockJournalService;
|
|
|
|
+
|
|
|
|
+ @PostMapping("/page")
|
|
|
|
+ public R page(@RequestBody Map<String, Object> condition) {
|
|
|
|
+ Page<Quality> result = qualityService.getPage(condition);
|
|
|
|
+ return R.success(result);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PostMapping("/add")
|
|
|
|
+ public R add(@RequestBody QualityVo qualityVo) {
|
|
|
|
+ qualityService.add(qualityVo);
|
|
|
|
+ return R.success();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PostMapping("/edit")
|
|
|
|
+ public R edit(@RequestBody QualityVo qualityVo) {
|
|
|
|
+ qualityService.edit(qualityVo);
|
|
|
|
+ return R.success();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PostMapping("/delete")
|
|
|
|
+ public R delete(@RequestBody QualityVo qualityVo) {
|
|
|
|
+ qualityService.delete(qualityVo);
|
|
|
|
+ return R.success();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PostMapping("/arrival/page")
|
|
|
|
+ public R arrivalPage(@RequestBody Map<String, Object> condition) {
|
|
|
|
+ Page<StockJournal> result = stockJournalService.getArrivalQualityPage(condition);
|
|
|
|
+ return R.success(result);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|