diff --git a/op-modules/op-open/src/main/java/com/op/open/controller/OpenController.java b/op-modules/op-open/src/main/java/com/op/open/controller/OpenController.java index eec938c2..de9fc1df 100644 --- a/op-modules/op-open/src/main/java/com/op/open/controller/OpenController.java +++ b/op-modules/op-open/src/main/java/com/op/open/controller/OpenController.java @@ -155,7 +155,16 @@ public class OpenController extends BaseController { return openService.GetOaNodeInfo(requestId); } - + /** + * 获取HR人员信息 + * dateTime :"2024-01-05" + * @param dateTime + * @return + */ + @GetMapping("/GetHrUserInfo") + public AjaxResult GetHrUserInfo(@RequestParam("dateTime") String dateTime) { + return openService.GetHrUserInfo(dateTime); + } } diff --git a/op-modules/op-open/src/main/java/com/op/open/service/OpenService.java b/op-modules/op-open/src/main/java/com/op/open/service/OpenService.java index 1074fedb..18fcd985 100644 --- a/op-modules/op-open/src/main/java/com/op/open/service/OpenService.java +++ b/op-modules/op-open/src/main/java/com/op/open/service/OpenService.java @@ -32,4 +32,6 @@ public interface OpenService { AjaxResult OAInspection(Map paramMap); AjaxResult GetOaNodeInfo(String requestId); + + AjaxResult GetHrUserInfo(String dateTime); } diff --git a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java index c510be45..e414b782 100644 --- a/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java +++ b/op-modules/op-open/src/main/java/com/op/open/service/impl/OpenServiceImpl.java @@ -75,6 +75,9 @@ public class OpenServiceImpl implements OpenService { @Value("${OA.getnodeInfo}") private String getnodeInfo; + @Value("${HR.url}") + private String hr_url; + @Autowired private OpenMapper openMapper; @@ -411,8 +414,6 @@ public class OpenServiceImpl implements OpenService { String requestName = paramMap.get("requestName").toString(); String workflowId = paramMap.get("workflowId").toString(); String mainObject = paramMap.get("mainObject").toString(); - String details = paramMap.get("details").toString(); - // Building the postData string using StringBuilder StringBuilder postDataBuilder = new StringBuilder(); postDataBuilder.append("user=").append(user) @@ -421,6 +422,7 @@ public class OpenServiceImpl implements OpenService { .append("&workflowId=").append(workflowId) .append("&mainObject=").append(URLEncoder.encode(mainObject, StandardCharsets.UTF_8.toString())); if (Constants.WORKFLOWID_ZL0020.equals(workflowId)) { + String details = paramMap.get("details").toString(); postDataBuilder.append("&details=").append(URLEncoder.encode(details, StandardCharsets.UTF_8.toString())); } String postData = postDataBuilder.toString(); @@ -454,4 +456,16 @@ public class OpenServiceImpl implements OpenService { } } + @Override + public AjaxResult GetHrUserInfo(String dateTime) { + try { + StringBuilder postDataBuilder = new StringBuilder(); + postDataBuilder.append("createTime=").append("dateTime"); + String result = HttpUtils.sendPost("http://lj.lanju.cn:8801/outside/api/mes/getUserList.do",postDataBuilder.toString()); + return success(result); + } catch (Exception e) { + e.printStackTrace(); + return error(e.getMessage()); + } + } }