From a28d97cea7cfc53bc9911c1489883b86a276278e Mon Sep 17 00:00:00 2001 From: liujun Date: Thu, 21 Dec 2023 13:58:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=96=B9=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E7=BB=9F=E4=B8=80=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/xgf/XgfUserController.java | 28 +++++++++++++++++++ .../datasource/xgf/TrainingBatchMapper.java | 2 ++ .../mapper/datasource/xgf/XgfUserMapper.java | 2 ++ .../service/xgf/TrainingBatchService.java | 2 ++ .../zcloud/service/xgf/XgfUserService.java | 2 ++ .../xgf/impl/TrainingBatchServiceImpl.java | 5 ++++ .../service/xgf/impl/XgfUserServiceImpl.java | 5 ++++ .../datasource/xgf/TrainingBatchMapper.xml | 16 +++++++++++ .../mybatis/datasource/xgf/XgfUserMapper.xml | 15 ++++++++++ 9 files changed, 77 insertions(+) diff --git a/src/main/java/com/zcloud/controller/xgf/XgfUserController.java b/src/main/java/com/zcloud/controller/xgf/XgfUserController.java index 14169e38..3929e092 100644 --- a/src/main/java/com/zcloud/controller/xgf/XgfUserController.java +++ b/src/main/java/com/zcloud/controller/xgf/XgfUserController.java @@ -3,13 +3,17 @@ package com.zcloud.controller.xgf; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; +import com.zcloud.service.xgf.TrainingBatchService; import com.zcloud.service.xgf.XgfUserService; +import com.zcloud.util.HttpClientService; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import javax.annotation.Resource; import java.util.HashMap; +import java.util.List; import java.util.Map; @Controller @@ -19,6 +23,12 @@ public class XgfUserController extends BaseController { @Resource private XgfUserService xgfUserService; + @Value("${preventionxgf.api.url}") + private String url; + + @Resource + private TrainingBatchService trainingBatchService; + @RequestMapping(value = "/list") @ResponseBody @@ -59,11 +69,29 @@ public class XgfUserController extends BaseController { public Object getInfo() throws Exception { PageData request = this.getPageData(); PageData condition = new PageData(); + /*组织人员信息*/ condition.put("XGF_USER_ID", request.getString("XGF_USER_ID")); PageData entity = xgfUserService.findInfo(condition); + /*组织人员图片信息*/ + condition.put("USER_ID", entity.getString("XGF_USER_ID")); + condition.put("CORPINFO_ID", entity.getString("BELONG_TO_CORP")); + Map result = HttpClientService.doPost(url + "/openApi/user/getInfoPicture", condition); + if (result == null || !"succeed".equals(result.get("result"))) throw new RuntimeException("请求失败"); + /*组织员工培训信息*/ + condition.clear(); + condition.put("USER_ID", entity.getString("XGF_USER_ID")); + List recordList = xgfUserService.findRecordList(condition); + /*培训申请记录*/ + condition.clear(); + condition.put("USER_ID", entity.getString("XGF_USER_ID")); + List trainList = trainingBatchService.findByUserId(condition); + PageData response = new PageData(); response.put("result", "success"); response.put("info", entity); + response.put("img", result); + response.put("trainRecordList", recordList); + response.put("applyList", trainList); response.put("data", request); return response; } diff --git a/src/main/java/com/zcloud/mapper/datasource/xgf/TrainingBatchMapper.java b/src/main/java/com/zcloud/mapper/datasource/xgf/TrainingBatchMapper.java index ef808ece..e25807f2 100644 --- a/src/main/java/com/zcloud/mapper/datasource/xgf/TrainingBatchMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/xgf/TrainingBatchMapper.java @@ -74,5 +74,7 @@ public interface TrainingBatchMapper{ PageData findAndTimeById(PageData pd); void graduation(PageData condition); + + List findByUserId(PageData condition); } diff --git a/src/main/java/com/zcloud/mapper/datasource/xgf/XgfUserMapper.java b/src/main/java/com/zcloud/mapper/datasource/xgf/XgfUserMapper.java index aaf87245..63d2150e 100644 --- a/src/main/java/com/zcloud/mapper/datasource/xgf/XgfUserMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/xgf/XgfUserMapper.java @@ -68,4 +68,6 @@ public interface XgfUserMapper { List flowlistPage(Page page); PageData getInfoById(PageData condition); + + List findRecordList(PageData condition); } diff --git a/src/main/java/com/zcloud/service/xgf/TrainingBatchService.java b/src/main/java/com/zcloud/service/xgf/TrainingBatchService.java index 2c55d312..1218f53d 100644 --- a/src/main/java/com/zcloud/service/xgf/TrainingBatchService.java +++ b/src/main/java/com/zcloud/service/xgf/TrainingBatchService.java @@ -87,5 +87,7 @@ public interface TrainingBatchService{ void updateClassMessage(PageData condition); void saveFlow(PageData request) throws Exception; + + List findByUserId(PageData condition) throws Exception; } diff --git a/src/main/java/com/zcloud/service/xgf/XgfUserService.java b/src/main/java/com/zcloud/service/xgf/XgfUserService.java index 8e0f2c92..3397027c 100644 --- a/src/main/java/com/zcloud/service/xgf/XgfUserService.java +++ b/src/main/java/com/zcloud/service/xgf/XgfUserService.java @@ -22,4 +22,6 @@ public interface XgfUserService { void approve(PageData request) throws Exception; PageData findInfo(PageData condition); + + List findRecordList(PageData condition) throws Exception; } diff --git a/src/main/java/com/zcloud/service/xgf/impl/TrainingBatchServiceImpl.java b/src/main/java/com/zcloud/service/xgf/impl/TrainingBatchServiceImpl.java index 71758050..0431c093 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/TrainingBatchServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/TrainingBatchServiceImpl.java @@ -381,5 +381,10 @@ public class TrainingBatchServiceImpl implements TrainingBatchService { next_flow.put("PARENT_ID",flow.getString("FLOW_DETAIL_ID")); flowDetailMapper.save(next_flow); } + + @Override + public List findByUserId(PageData condition) throws Exception { + return trainingbatchMapper.findByUserId(condition); + } } diff --git a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java index e25efcb5..93e6543c 100644 --- a/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java @@ -146,4 +146,9 @@ public class XgfUserServiceImpl implements XgfUserService { public PageData findInfo(PageData condition) { return xgfUserMapper.getInfoById(condition); } + + @Override + public List findRecordList(PageData condition) throws Exception { + return xgfUserMapper.findRecordList(condition); + } } diff --git a/src/main/resources/mybatis/datasource/xgf/TrainingBatchMapper.xml b/src/main/resources/mybatis/datasource/xgf/TrainingBatchMapper.xml index db1bc1a0..93c694a7 100644 --- a/src/main/resources/mybatis/datasource/xgf/TrainingBatchMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/TrainingBatchMapper.xml @@ -355,4 +355,20 @@ where f.TRAINING_BATCH_ID = #{TRAINING_BATCH_ID} + diff --git a/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml b/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml index ad1548bc..7f75b3bd 100644 --- a/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml +++ b/src/main/resources/mybatis/datasource/xgf/XgfUserMapper.xml @@ -268,5 +268,20 @@ and a.XGF_USER_ID = #{XGF_USER_ID} +