|
@@ -1,8 +1,19 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.diagbot.client.UserServiceClient;
|
|
|
+import com.diagbot.dto.LisMappingPageDTO;
|
|
|
+import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.service.impl.LisMappingServiceImpl;
|
|
|
+import com.diagbot.vo.LisMappingPageVO;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
/**
|
|
|
* @Description:化验项目公表映射业务层
|
|
|
* @Author:zhaops
|
|
@@ -10,5 +21,27 @@ import org.springframework.stereotype.Component;
|
|
|
*/
|
|
|
@Component
|
|
|
public class LisMappingFacade extends LisMappingServiceImpl {
|
|
|
+ @Autowired
|
|
|
+ private UserServiceClient userServiceClient;
|
|
|
|
|
|
+ /**
|
|
|
+ * 化验公表映射分页信息
|
|
|
+ *
|
|
|
+ * @param lisMappingPageVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public IPage<LisMappingPageDTO> getLisMappingPage(LisMappingPageVO lisMappingPageVO) {
|
|
|
+ IPage<LisMappingPageDTO> dtoPage = this.lisMappingPage(lisMappingPageVO);
|
|
|
+ List<LisMappingPageDTO> records = dtoPage.getRecords();
|
|
|
+ List<String> userIds = records.stream().map(record -> record.getModifier()).collect(Collectors.toList());
|
|
|
+ RespDTO<Map<String, String>> data = userServiceClient.getUserInfoByIds(userIds);
|
|
|
+ Map<String, String> userInfos = data.data;
|
|
|
+ for (LisMappingPageDTO record : records) {
|
|
|
+ record.setGmtOperate(record.getGmtModified());
|
|
|
+ record.setOperator(record.getModifier());
|
|
|
+ record.setOperatorName(userInfos.get(record.getModifier()));
|
|
|
+ }
|
|
|
+ dtoPage.setRecords(records);
|
|
|
+ return dtoPage;
|
|
|
+ }
|
|
|
}
|