|
@@ -6,6 +6,7 @@ import com.diagbot.dto.BehospitalInfoAgeDTO;
|
|
|
import com.diagbot.dto.CheckedRecordListDTO;
|
|
|
import com.diagbot.dto.SysUserDeptDTO;
|
|
|
import com.diagbot.entity.BasDeptInfo;
|
|
|
+import com.diagbot.entity.MedBehospitalType;
|
|
|
import com.diagbot.entity.MedCheckInfo;
|
|
|
import com.diagbot.entity.SysUserDept;
|
|
|
import com.diagbot.entity.SysUserRole;
|
|
@@ -17,6 +18,7 @@ import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.MedQcresultDetailService;
|
|
|
+import com.diagbot.service.impl.MedBehospitalTypeServiceImpl;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.SysUserUtils;
|
|
@@ -24,9 +26,11 @@ import com.diagbot.vo.CheckedRecordListVO;
|
|
|
import com.diagbot.vo.RecordCheckVO;
|
|
|
import com.diagbot.vo.SysUserBaseVO;
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import com.google.common.collect.Maps;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -53,6 +57,8 @@ public class RecordCheckFacade {
|
|
|
BehospitalInfoFacade behospitalInfoFacade;
|
|
|
@Autowired
|
|
|
BasDeptInfoFacade basDeptInfoFacade;
|
|
|
+ @Autowired
|
|
|
+ MedBehospitalTypeServiceImpl medBehospitalTypeServiceImpl;
|
|
|
|
|
|
|
|
|
public IPage<CheckedRecordListDTO> checkedRecordList(CheckedRecordListVO checkedRecordListVO) {
|
|
@@ -153,5 +159,40 @@ public class RecordCheckFacade {
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
-
|
|
|
+ /**
|
|
|
+ * @Author songxl
|
|
|
+ * @Description获取当前用户的任务来源 和筛选分值
|
|
|
+ * @Date 2021/5/28
|
|
|
+ * @Param []
|
|
|
+ * @Return java.util.Map<java.lang.String,java.lang.String>
|
|
|
+ * @MethodName getCheckType
|
|
|
+ */
|
|
|
+ public Map<String, Object> getCheckType() {
|
|
|
+ Map<String,Object> out = Maps.newLinkedHashMap();
|
|
|
+ Map<Integer,String> checkTypes = Maps.newLinkedHashMap();
|
|
|
+ Long userId = Long.parseLong(SysUserUtils.getCurrentPrincipleID());
|
|
|
+ SysUserBaseVO sysUserBaseVO = new SysUserBaseVO();
|
|
|
+ sysUserBaseVO.setUserId(userId);
|
|
|
+ List<Long> roleIds = sysUserFacade.getUserRoles(sysUserBaseVO).getSelRoles().stream().map(i -> i.getId()).collect(Collectors.toList());
|
|
|
+ roleIds.stream().forEach(roleId -> {
|
|
|
+ if (roleId.intValue() == CheckerRoleEnum.DEPT_SUPERVISOR.getKey()||roleId.intValue() == CheckerRoleEnum.DEPT_GENERAL.getKey()){
|
|
|
+ checkTypes.put(CheckJobTypeEnum.DEPT_SUPERVISOR.getKey(),CheckJobTypeEnum.DEPT_SUPERVISOR.getName());
|
|
|
+ }
|
|
|
+ if (roleId.intValue() == CheckerRoleEnum.QUAT_SUPERVISOR.getKey()||roleId.intValue() == CheckerRoleEnum.QUAT_GENERAL.getKey()){
|
|
|
+ checkTypes.put(CheckJobTypeEnum.QUAT_SUPERVISOR.getKey(),CheckJobTypeEnum.QUAT_SUPERVISOR.getName());
|
|
|
+ }
|
|
|
+ if (roleId.intValue() == CheckerRoleEnum.HOSP_SUPERVISOR.getKey()||roleId.intValue() == CheckerRoleEnum.HOSP_GENERAL.getKey()){
|
|
|
+ checkTypes.put(CheckJobTypeEnum.HOSP_SUPERVISOR.getKey(),CheckJobTypeEnum.HOSP_SUPERVISOR.getName());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ Long hospitalId = Long.parseLong(SysUserUtils.getCurrentHospitalID());
|
|
|
+ List<Integer> valus = medBehospitalTypeServiceImpl.list(new QueryWrapper<MedBehospitalType>()
|
|
|
+ .eq("hospital_id", hospitalId)
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .isNotNull("value")
|
|
|
+ .groupBy("value")).stream().map(MedBehospitalType::getValue).collect(Collectors.toList());
|
|
|
+ out.put("source",checkTypes);
|
|
|
+ out.put("value",valus);
|
|
|
+ return out;
|
|
|
+ }
|
|
|
}
|