|
@@ -0,0 +1,71 @@
|
|
|
+package com.fjhx.mes.controller.mold;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.fjhx.mes.entity.mold.dto.MoldInfoDto;
|
|
|
+import com.fjhx.mes.entity.mold.dto.MoldInfoSelectDto;
|
|
|
+import com.fjhx.mes.entity.mold.vo.MoldInfoVo;
|
|
|
+import com.fjhx.mes.service.mold.MoldInfoService;
|
|
|
+import com.ruoyi.common.core.domain.BaseSelectDto;
|
|
|
+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;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 模具信息 前端控制器
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author
|
|
|
+ * @since 2024-02-01
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/moldInfo")
|
|
|
+public class MoldInfoController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private MoldInfoService moldInfoService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 模具信息分页
|
|
|
+ */
|
|
|
+ @PostMapping("/page")
|
|
|
+ public Page<MoldInfoVo> page(@RequestBody MoldInfoSelectDto dto) {
|
|
|
+ return moldInfoService.getPage(dto);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 模具信息明细
|
|
|
+ */
|
|
|
+ @PostMapping("/detail")
|
|
|
+ public MoldInfoVo detail(@RequestBody BaseSelectDto dto) {
|
|
|
+ return moldInfoService.detail(dto.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 模具信息新增
|
|
|
+ */
|
|
|
+ @PostMapping("/add")
|
|
|
+ public void add(@RequestBody MoldInfoDto moldInfoDto) {
|
|
|
+ moldInfoService.add(moldInfoDto);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 模具信息编辑
|
|
|
+ */
|
|
|
+ @PostMapping("/edit")
|
|
|
+ public void edit(@RequestBody MoldInfoDto moldInfoDto) {
|
|
|
+ moldInfoService.edit(moldInfoDto);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 模具信息删除
|
|
|
+ */
|
|
|
+ @PostMapping("/delete")
|
|
|
+ public void delete(@RequestBody BaseSelectDto dto) {
|
|
|
+ moldInfoService.delete(dto.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+}
|