|
@@ -0,0 +1,91 @@
|
|
|
|
|
+package com.jeesite.modules.mes.web;
|
|
|
|
|
+
|
|
|
|
|
+import com.jeesite.common.config.Global;
|
|
|
|
|
+import com.jeesite.common.entity.Page;
|
|
|
|
|
+import com.jeesite.common.web.BaseController;
|
|
|
|
|
+import com.jeesite.modules.mes.entity.MesGp12Items;
|
|
|
|
|
+import com.jeesite.modules.mes.resp.CommonResp;
|
|
|
|
|
+import com.jeesite.modules.mes.service.MesGp12ItemsService;
|
|
|
|
|
+import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
|
|
+import org.springframework.ui.Model;
|
|
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
|
|
+import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
+
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * GP12工位问题项(不良原因)Controller
|
|
|
|
|
+ * @author mes
|
|
|
|
|
+ * @version 2026-08-04
|
|
|
|
|
+ */
|
|
|
|
|
+@Controller
|
|
|
|
|
+@RequestMapping(value = "${adminPath}/mes/mesGp12Items")
|
|
|
|
|
+public class MesGp12ItemsController extends BaseController {
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private MesGp12ItemsService mesGp12ItemsService;
|
|
|
|
|
+
|
|
|
|
|
+ @ModelAttribute
|
|
|
|
|
+ public MesGp12Items get(String id, boolean isNewRecord) {
|
|
|
|
|
+ return mesGp12ItemsService.get(id, isNewRecord);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @RequiresPermissions("mes:mesGp12Items:view")
|
|
|
|
|
+ @RequestMapping(value = {"list", ""})
|
|
|
|
|
+ public String list(MesGp12Items mesGp12Items, Model model) {
|
|
|
|
|
+ model.addAttribute("mesGp12Items", mesGp12Items);
|
|
|
|
|
+ return "modules/mes/mesGp12ItemsList";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @RequiresPermissions("mes:mesGp12Items:view")
|
|
|
|
|
+ @RequestMapping(value = "listData")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public Page<MesGp12Items> listData(MesGp12Items mesGp12Items, HttpServletRequest request, HttpServletResponse response) {
|
|
|
|
|
+ mesGp12Items.setPage(new Page<>(request, response));
|
|
|
|
|
+ return mesGp12ItemsService.findPage(mesGp12Items);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @RequiresPermissions("mes:mesGp12Items:view")
|
|
|
|
|
+ @RequestMapping(value = "form")
|
|
|
|
|
+ public String form(MesGp12Items mesGp12Items, Model model) {
|
|
|
|
|
+ model.addAttribute("mesGp12Items", mesGp12Items);
|
|
|
|
|
+ return "modules/mes/mesGp12ItemsForm";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @RequiresPermissions("mes:mesGp12Items:edit")
|
|
|
|
|
+ @PostMapping(value = "save")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public String save(@Validated MesGp12Items mesGp12Items) {
|
|
|
|
|
+ mesGp12ItemsService.save(mesGp12Items);
|
|
|
|
|
+ return renderResult(Global.TRUE, text("保存不良原因成功!"));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @RequiresPermissions("mes:mesGp12Items:edit")
|
|
|
|
|
+ @RequestMapping(value = "delete")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public String delete(MesGp12Items mesGp12Items) {
|
|
|
|
|
+ mesGp12ItemsService.delete(mesGp12Items);
|
|
|
|
|
+ return renderResult(Global.TRUE, text("删除不良原因成功!"));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 客户端:查询不良原因列表(anon)
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping(value = "items")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public CommonResp items() {
|
|
|
|
|
+ CommonResp<List<MesGp12Items>> resp = new CommonResp<>();
|
|
|
|
|
+ List<MesGp12Items> list = mesGp12ItemsService.findList(new MesGp12Items());
|
|
|
|
|
+ resp.setResult(Global.TRUE);
|
|
|
|
|
+ resp.setMessage("查询成功");
|
|
|
|
|
+ resp.setData(list);
|
|
|
|
|
+ return resp;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|