|
@@ -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.ResponseJson;
|
|
|
|
+import com.iamberry.wechat.tools.payUtil.StringUtil;
|
|
|
|
+import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.Map;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * pts系统员工信息controller
|
|
|
|
+ * Created by wangxiaoming on 2017/8/29.
|
|
|
|
+ */
|
|
|
|
+public class PtsEmployeeController {
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private PtsEmployeeService ptsEmployeeService;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 根据员工编号查询员工信息
|
|
|
|
+ *
|
|
|
|
+ * @param request
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ //@RequiresPermissions("produce:list_produce:produce")
|
|
|
|
+ @RequestMapping("/staffmember/getStaffmemberByNumber")
|
|
|
|
+ public ResponseJson getStaffmemberByNumber(HttpServletRequest request) {
|
|
|
|
+ ResponseJson rsj = new ResponseJson();
|
|
|
|
+ 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.addResponseKeyValue("returnMsg", ptsEmployee);
|
|
|
|
+ return rsj;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|