|
@@ -0,0 +1,57 @@
|
|
|
+package com.iamberry.rst.controllers.pts;
|
|
|
+
|
|
|
+import com.iamberry.rst.core.pts.PtsEmployee;
|
|
|
+import com.iamberry.rst.faces.pts.PtsEmployeeService;
|
|
|
+import com.iamberry.wechat.tools.RespJsonBean;
|
|
|
+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.ResponseBody;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+
|
|
|
+
|
|
|
+ * pts系统员工信息controller
|
|
|
+ * Created by wangxiaoming on 2017/8/29.
|
|
|
+ */
|
|
|
+@Controller
|
|
|
+@RequestMapping("/staffmember")
|
|
|
+public class PtsEmployeeAppController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private PtsEmployeeService ptsEmployeeService;
|
|
|
+
|
|
|
+
|
|
|
+ * 根据员工编号查询员工信息
|
|
|
+ *
|
|
|
+ * @param request
|
|
|
+ * @return:RespJsonBean 用于对接app的专用Bean
|
|
|
+ */
|
|
|
+
|
|
|
+ @ResponseBody
|
|
|
+ @RequestMapping("/getStaffmemberByNumber")
|
|
|
+ public RespJsonBean getStaffmemberByNumber(HttpServletRequest request) {
|
|
|
+ RespJsonBean rsj = new RespJsonBean();
|
|
|
+ String employeeNo = request.getParameter("staffmemberNumber");
|
|
|
+ if (employeeNo == null || "".equals(employeeNo)) {
|
|
|
+ rsj.setResultCode(500);
|
|
|
+ rsj.setResultMsg("ERROR");
|
|
|
+ rsj.addResponseKeyValue("员工编号为空");
|
|
|
+ return rsj;
|
|
|
+ }
|
|
|
+ PtsEmployee ptsEmployee = new PtsEmployee();
|
|
|
+ ptsEmployee.setEmployeeNo(employeeNo);
|
|
|
+ ptsEmployee = ptsEmployeeService.getPtsEmployee(ptsEmployee);
|
|
|
+ if (ptsEmployee == null) {
|
|
|
+ rsj.setResultCode(500);
|
|
|
+ rsj.setResultMsg("ERROR");
|
|
|
+ rsj.addResponseKeyValue("查询不到该员工");
|
|
|
+ return rsj;
|
|
|
+ }
|
|
|
+ rsj.setResultCode(200);
|
|
|
+ rsj.setResultMsg("SUCCESS");
|
|
|
+ rsj.setReturnMsg(ptsEmployee);
|
|
|
+ return rsj;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|