|
|
@@ -1,5 +1,6 @@
|
|
|
package com.zd.laboratory.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.convert.Convert;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.zd.common.core.annotation.DataScope;
|
|
|
import com.zd.common.core.exception.ServiceException;
|
|
|
@@ -10,7 +11,6 @@ import com.zd.laboratory.domain.vo.LabClassifiedVo;
|
|
|
import com.zd.laboratory.domain.vo.LabClasstypeVo;
|
|
|
import com.zd.laboratory.domain.vo.LabSubjectVO;
|
|
|
import com.zd.laboratory.domain.vo.XxpClassifyDetailVO;
|
|
|
-import com.zd.laboratory.interfaces.SysProperties;
|
|
|
import com.zd.laboratory.mapper.LabHazardSubjectRelationMapper;
|
|
|
import com.zd.laboratory.mapper.LabQpSubjectRelationMapper;
|
|
|
import com.zd.laboratory.mapper.LabSubjectMapper;
|
|
|
@@ -35,7 +35,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import java.io.File;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -689,4 +688,19 @@ public class LabSubjectServiceImpl implements ILabSubjectService {
|
|
|
public Integer isAdminOrSafeUser(Long subjectId, Long userId) {
|
|
|
return labSubjectMapper.isAdminOrSafeUser(subjectId,userId);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Map<Long, Map<String, Object>> getPositionBySubId(String subIds) {
|
|
|
+ Long[] longs = Convert.toLongArray(subIds.split(","));
|
|
|
+ List<Map<String, Object>> positionBySubId = labSubjectMapper.getPositionBySubId(longs);
|
|
|
+ if (positionBySubId.isEmpty()){
|
|
|
+ return new HashMap<>();
|
|
|
+ }
|
|
|
+ Map<Long,Map<String,Object>> map = new HashMap<>();
|
|
|
+ for (Map<String, Object> stringStringMap : positionBySubId) {
|
|
|
+ Long subId = (Long) stringStringMap.get("subId");
|
|
|
+ map.put(subId,stringStringMap);
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
}
|