|
@@ -0,0 +1,54 @@
|
|
|
+package com.iamberry.rst.controllers.pts;
|
|
|
+
|
|
|
+import com.iamberry.rst.core.order.Order;
|
|
|
+import com.iamberry.rst.core.pts.Produce;
|
|
|
+import com.iamberry.rst.faces.pts.ProduceService;
|
|
|
+import com.iamberry.wechat.tools.RespJsonBean;
|
|
|
+import com.iamberry.wechat.tools.ResponseJson;
|
|
|
+import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+import org.springframework.web.servlet.ModelAndView;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 生产产品管理 controller
|
|
|
+ * wangxiaoming
|
|
|
+ */
|
|
|
+@Controller
|
|
|
+@RequestMapping("/produce")
|
|
|
+public class ProduceAppController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ProduceService produceService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取生产产品、员工工作工序、工序操作选项 接口
|
|
|
+ * @return:RespJsonBean 用于对接app的专用Bean
|
|
|
+ */
|
|
|
+ //@RequiresPermissions("produce:save_produce:produce")
|
|
|
+ @ResponseBody
|
|
|
+ @RequestMapping("/getProduce")
|
|
|
+ public RespJsonBean getProduce(HttpServletRequest request) {
|
|
|
+ RespJsonBean rsj = new RespJsonBean();
|
|
|
+ String employeeId = request.getParameter("employeeId"); //获取员工id
|
|
|
+
|
|
|
+ if (employeeId == null || "".equals(employeeId)) {
|
|
|
+ rsj.setResultCode(500);
|
|
|
+ rsj.setResultMsg("ERROR");
|
|
|
+ rsj.addResponseKeyValue("员工id为空");
|
|
|
+ return rsj;
|
|
|
+ }
|
|
|
+ //查询员工所做的产品,产品的工序,工序的节点操作
|
|
|
+ List<Produce> list = produceService.getAllProduceList(Integer.valueOf(employeeId));
|
|
|
+ rsj.setResultCode(200);
|
|
|
+ rsj.setResultMsg("SUCCESS");
|
|
|
+ rsj.setReturnMsg(list);
|
|
|
+ return rsj;
|
|
|
+ }
|
|
|
+}
|