|
|
|
@ -19,14 +19,13 @@ import com.ynxbd.wx.config.WeChatConfig; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.ObjectUtils; |
|
|
|
import org.apache.commons.lang3.ObjectUtils; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.*; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Slf4j |
|
|
|
@Slf4j |
|
|
|
public class AIGuidanceService { |
|
|
|
public class AIGuidanceService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final String DEFAULT_IMAGE_PATH = "/wx/web/images/doctor/doctor_header_round.svg"; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 查询医院详细信息 |
|
|
|
* 查询医院详细信息 |
|
|
|
* |
|
|
|
* |
|
|
|
@ -45,7 +44,7 @@ public class AIGuidanceService { |
|
|
|
} |
|
|
|
} |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
map.put("hosId", HCAIGuidanceConfig.HOSP_ID); |
|
|
|
map.put("hosId", HCAIGuidanceConfig.HOSP_ID); |
|
|
|
map.put("branchId", ""); // 如果有分院,则填写分院Id, 主院的分院Id为hosId本身
|
|
|
|
map.put("branchId", HCAIGuidanceConfig.BRANCH_ID); // 如果有分院,则填写分院Id, 主院的分院Id为hosId本身
|
|
|
|
map.put("hosName", HCAIGuidanceConfig.HOSP_NAME); // 如果是分院,则填写分院名称,否则填写主院名称
|
|
|
|
map.put("hosName", HCAIGuidanceConfig.HOSP_NAME); // 如果是分院,则填写分院名称,否则填写主院名称
|
|
|
|
map.put("hosIntro", HCAIGuidanceConfig.HOSP_INTRO); |
|
|
|
map.put("hosIntro", HCAIGuidanceConfig.HOSP_INTRO); |
|
|
|
map.put("hosLevel", HCAIGuidanceConfig.HOSP_LEVEL); |
|
|
|
map.put("hosLevel", HCAIGuidanceConfig.HOSP_LEVEL); |
|
|
|
@ -86,7 +85,7 @@ public class AIGuidanceService { |
|
|
|
List<Dept> deptList; |
|
|
|
List<Dept> deptList; |
|
|
|
if (HCAIGuidanceConfig.IS_SPLIT_TIME_REG) { // 分时段
|
|
|
|
if (HCAIGuidanceConfig.IS_SPLIT_TIME_REG) { // 分时段
|
|
|
|
String curDate = DateHelper.getCurDate(); |
|
|
|
String curDate = DateHelper.getCurDate(); |
|
|
|
deptList = new HisRegisterDao().getTimeDeptList(curDate, DateHelper.getMoveDate(curDate, 7), ""); |
|
|
|
deptList = new HisRegisterDao().getTimeDeptList(curDate, DateHelper.getMoveDate(curDate, 7), "", "0"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
deptList = new RegService().queryHisRegDeptList(); |
|
|
|
deptList = new RegService().queryHisRegDeptList(); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -100,10 +99,10 @@ public class AIGuidanceService { |
|
|
|
if (addItem == null) { |
|
|
|
if (addItem == null) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
dataList.add(addItem); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
children = dept.getChildren(); |
|
|
|
children = dept.getChildren(); |
|
|
|
if (children != null && !children.isEmpty()) { |
|
|
|
boolean hasChildren = children != null && !children.isEmpty(); |
|
|
|
|
|
|
|
if (hasChildren) { |
|
|
|
for (Dept childDept : children) { |
|
|
|
for (Dept childDept : children) { |
|
|
|
childDept.setSubDeptCode(childDept.getDeptCode()); |
|
|
|
childDept.setSubDeptCode(childDept.getDeptCode()); |
|
|
|
childDept.setDeptCode(dept.getDeptCode()); |
|
|
|
childDept.setDeptCode(dept.getDeptCode()); |
|
|
|
@ -113,6 +112,8 @@ public class AIGuidanceService { |
|
|
|
} |
|
|
|
} |
|
|
|
dataList.add(addItem); |
|
|
|
dataList.add(addItem); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
dataList.add(addItem); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return Result.success(ResultEnum.AI_SUCCESS, dataList); |
|
|
|
return Result.success(ResultEnum.AI_SUCCESS, dataList); |
|
|
|
@ -128,10 +129,10 @@ public class AIGuidanceService { |
|
|
|
if (!ObjectUtils.isEmpty(dept.getDeptAlias())) { |
|
|
|
if (!ObjectUtils.isEmpty(dept.getDeptAlias())) { |
|
|
|
deptName = dept.getDeptAlias(); |
|
|
|
deptName = dept.getDeptAlias(); |
|
|
|
} |
|
|
|
} |
|
|
|
item.setDeptId(dept.getDeptCode()); |
|
|
|
item.setDeptId(dept.getDeptCode() + (isSubDept ? ("_" + dept.getSubDeptCode()) : "")); |
|
|
|
item.setDeptName(deptName); |
|
|
|
item.setDeptName(deptName); |
|
|
|
item.setDeptIntro(dept.getDescription() == null ? "" : dept.getDescription()); // 科室简介
|
|
|
|
item.setDeptIntro(dept.getDescription() == null ? "暂无内容" : dept.getDescription()); // 科室简介
|
|
|
|
item.setDeptAddr(dept.getAddress() == null ? "" : dept.getAddress()); // 科室地址
|
|
|
|
item.setDeptAddr(dept.getAddress() == null ? "暂无内容" : dept.getAddress()); // 科室地址
|
|
|
|
item.setLevel(2); |
|
|
|
item.setLevel(2); |
|
|
|
item.setParentDeptId(isSubDept ? dept.getDeptCode() : ""); |
|
|
|
item.setParentDeptId(isSubDept ? dept.getDeptCode() : ""); |
|
|
|
item.setFeatureFlag(0); // 是否特色科室
|
|
|
|
item.setFeatureFlag(0); // 是否特色科室
|
|
|
|
@ -168,6 +169,15 @@ public class AIGuidanceService { |
|
|
|
return Result.error(ResultEnum.PARAM_IS_DEFECT); |
|
|
|
return Result.error(ResultEnum.PARAM_IS_DEFECT); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String subDeptCode = null; |
|
|
|
|
|
|
|
if (deptId.contains("_")) { |
|
|
|
|
|
|
|
String[] deptInfo = deptId.split("_"); |
|
|
|
|
|
|
|
if (deptInfo.length == 2) { |
|
|
|
|
|
|
|
deptId = deptInfo[0]; |
|
|
|
|
|
|
|
subDeptCode = deptInfo[1]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!HCAIGuidanceConfig.HOSP_ID.equals(hosId)) { // 医院id校验
|
|
|
|
if (!HCAIGuidanceConfig.HOSP_ID.equals(hosId)) { // 医院id校验
|
|
|
|
log.warn("[智能导诊]医生列表查询-hosId不匹配"); |
|
|
|
log.warn("[智能导诊]医生列表查询-hosId不匹配"); |
|
|
|
return Result.success(ResultEnum.AI_SUCCESS, new ArrayList<>()); |
|
|
|
return Result.success(ResultEnum.AI_SUCCESS, new ArrayList<>()); |
|
|
|
@ -178,10 +188,10 @@ public class AIGuidanceService { |
|
|
|
List<Doctor> doctorList; |
|
|
|
List<Doctor> doctorList; |
|
|
|
if (HCAIGuidanceConfig.IS_SPLIT_TIME_REG) { // 分时段
|
|
|
|
if (HCAIGuidanceConfig.IS_SPLIT_TIME_REG) { // 分时段
|
|
|
|
String curDate = DateHelper.getCurDate(); |
|
|
|
String curDate = DateHelper.getCurDate(); |
|
|
|
doctorList = hisRegisterDao.queryHisTimeRegDoctorList(deptId, branchId, curDate, DateHelper.getMoveDate(curDate, 7)); |
|
|
|
doctorList = hisRegisterDao.queryHisTimeRegDoctorList(deptId, subDeptCode, curDate, DateHelper.getMoveDate(curDate, 7)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// 注意:需先查询今日挂号
|
|
|
|
// 注意:需先查询今日挂号
|
|
|
|
doctorList = hisRegisterDao.queryHisRegTodayDoctorList(deptId, null); // 今日挂号
|
|
|
|
doctorList = hisRegisterDao.queryHisRegTodayDoctorList(deptId, subDeptCode); // 今日挂号
|
|
|
|
List<Doctor> resDoctorList = hisRegisterDao.queryHisResRegDoctorList(deptId, null); // 预约挂号
|
|
|
|
List<Doctor> resDoctorList = hisRegisterDao.queryHisResRegDoctorList(deptId, null); // 预约挂号
|
|
|
|
for (Doctor doctor : resDoctorList) { |
|
|
|
for (Doctor doctor : resDoctorList) { |
|
|
|
Doctor findItem = doctorList.stream().filter(o -> o.getDoctCode().equals(doctor.getDoctCode())).findFirst().orElse(null); |
|
|
|
Doctor findItem = doctorList.stream().filter(o -> o.getDoctCode().equals(doctor.getDoctCode())).findFirst().orElse(null); |
|
|
|
@ -241,6 +251,11 @@ public class AIGuidanceService { |
|
|
|
item.setDoctorImage(domain + headImg); // 头像
|
|
|
|
item.setDoctorImage(domain + headImg); // 头像
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ObjectUtils.isEmpty(doctor.getHeadImg())) { |
|
|
|
|
|
|
|
item.setDoctorImage(domain + DEFAULT_IMAGE_PATH); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
item.setExtraData("{}"); // 额外信息
|
|
|
|
item.setExtraData("{}"); // 额外信息
|
|
|
|
item.setIsHTML(true); |
|
|
|
item.setIsHTML(true); |
|
|
|
item.setDoctorMiniWxUrl(""); |
|
|
|
item.setDoctorMiniWxUrl(""); |
|
|
|
@ -255,18 +270,18 @@ public class AIGuidanceService { |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
//reg-doct-source?date=2026-03-02&deptCode=0501&doctCode=1477&subDeptCode=0001&deptName=%25E5%25A6%2587%25E7%25A7%2591-%25E5%25A6%2587%25E7%25A7%2591%25E6%2599%25AE%25E9%2580%259A%25E9%2597%25A8%25E8%25AF%258A&doctName=%25E6%2598%258E%25E6%25BB%25A1%25E6%25B1%259F&hospitalArea=
|
|
|
|
//reg-doct-source?date=2026-03-02&deptCode=0501&doctCode=1477&subDeptCode=0001&deptName=%25E5%25A6%2587%25E7%25A7%2591-%25E5%25A6%2587%25E7%25A7%2591%25E6%2599%25AE%25E9%2580%259A%25E9%2597%25A8%25E8%25AF%258A&doctName=%25E6%2598%258E%25E6%25BB%25A1%25E6%25B1%259F&hospitalArea=
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
Map<String, Object> urlMap = new HashMap<>(); |
|
|
|
map.put("date", DateHelper.getCurDate()); |
|
|
|
urlMap.put("date", DateHelper.getCurDate()); |
|
|
|
map.put("deptCode", deptCode); |
|
|
|
urlMap.put("deptCode", deptCode); |
|
|
|
map.put("deptName", URLHelper.encodeURL(deptName)); |
|
|
|
urlMap.put("deptName", URLHelper.encodeURL(deptName)); |
|
|
|
map.put("doctName", URLHelper.encodeURL(doctor.getDoctName())); |
|
|
|
urlMap.put("doctName", URLHelper.encodeURL(doctor.getDoctName())); |
|
|
|
map.put("doctCode", doctor.getDoctCode()); |
|
|
|
urlMap.put("doctCode", doctor.getDoctCode()); |
|
|
|
map.put("subDeptCode", ""); |
|
|
|
urlMap.put("subDeptCode", ""); |
|
|
|
map.put("hospitalArea", ""); |
|
|
|
urlMap.put("hospitalArea", ""); |
|
|
|
if (HCAIGuidanceConfig.IS_SPLIT_TIME_REG) { |
|
|
|
if (HCAIGuidanceConfig.IS_SPLIT_TIME_REG) { |
|
|
|
item.setDoctorUrl(webReqURL + "reg-reserve.html#/reg-doct-source" + URLHelper.mapParamsToUrl(map, true)); |
|
|
|
item.setDoctorUrl(webReqURL + "reg-reserve.html#/reg-doct-source" + URLHelper.mapParamsToUrl(urlMap, true)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
item.setDoctorUrl(webReqURL + "reg-reserve.html#/reg-doctor" + URLHelper.mapParamsToUrl(map, true)); |
|
|
|
item.setDoctorUrl(webReqURL + "reg-reserve.html#/reg-doctor" + URLHelper.mapParamsToUrl(urlMap, true)); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("[智能导诊]医生链接异常:{}", e.getMessage()); |
|
|
|
log.error("[智能导诊]医生链接异常:{}", e.getMessage()); |
|
|
|
@ -283,7 +298,7 @@ public class AIGuidanceService { |
|
|
|
* @param patientId 患者id |
|
|
|
* @param patientId 患者id |
|
|
|
* @return map |
|
|
|
* @return map |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public Result getPatientCardList(String patientId, String hosId, String branchId) { |
|
|
|
public Result getPatientCardList(String hosId, String branchId, String patientId) { |
|
|
|
List<AIPatient> cardList = new ArrayList<>(); |
|
|
|
List<AIPatient> cardList = new ArrayList<>(); |
|
|
|
Map<String, Object> resp = new HashMap<>(); |
|
|
|
Map<String, Object> resp = new HashMap<>(); |
|
|
|
resp.put("hospitalId", HCAIGuidanceConfig.HOSP_ID); |
|
|
|
resp.put("hospitalId", HCAIGuidanceConfig.HOSP_ID); |
|
|
|
@ -313,6 +328,12 @@ public class AIGuidanceService { |
|
|
|
item.setGender("女".equals(patient.getSex()) ? "女" : "男"); // 防空->默认男
|
|
|
|
item.setGender("女".equals(patient.getSex()) ? "女" : "男"); // 防空->默认男
|
|
|
|
item.setEcardNo(patientId); |
|
|
|
item.setEcardNo(patientId); |
|
|
|
item.setBirthday(birthday); |
|
|
|
item.setBirthday(birthday); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Date date = DateHelper.strToDate(patient.getBindDate(), DateHelper.DateEnum.yyyy_MM_dd_HH_mm_ss); |
|
|
|
|
|
|
|
String bindTime = DateHelper.dateToStr(date, DateHelper.DateEnum.yyyy_MM_dd_HH_mm_ss); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
item.setLastBindTime(bindTime == null ? DateHelper.getCurDateTime() : bindTime); |
|
|
|
|
|
|
|
item.setRelation(ObjectUtils.isEmpty(patient.getIdCardNo()) ? "2" : "6"); // 2子女; 6其他
|
|
|
|
cardList.add(item); |
|
|
|
cardList.add(item); |
|
|
|
|
|
|
|
|
|
|
|
resp.put("cardList", cardList); |
|
|
|
resp.put("cardList", cardList); |
|
|
|
@ -325,6 +346,7 @@ public class AIGuidanceService { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public Result getDoctorSchedule(String hosId, String branchId, String doctorsJson) { |
|
|
|
public Result getDoctorSchedule(String hosId, String branchId, String doctorsJson) { |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
map.put("status", "OK"); |
|
|
|
if (!HCAIGuidanceConfig.HOSP_ID.equals(hosId)) { // 医院id校验
|
|
|
|
if (!HCAIGuidanceConfig.HOSP_ID.equals(hosId)) { // 医院id校验
|
|
|
|
log.warn("[智能导诊]获取医生号源排班信息-hosId不匹配"); |
|
|
|
log.warn("[智能导诊]获取医生号源排班信息-hosId不匹配"); |
|
|
|
return Result.success(ResultEnum.AI_SUCCESS, map); |
|
|
|
return Result.success(ResultEnum.AI_SUCCESS, map); |
|
|
|
@ -337,13 +359,29 @@ public class AIGuidanceService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
List<AIDoctorSchedule> deptList = new ArrayList<>(); |
|
|
|
List<AIDoctorSchedule> deptList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
for (AIDoctorSchedule item : doctorScheduleList) { |
|
|
|
for (AIDoctorSchedule item : doctorScheduleList) { |
|
|
|
String docId = item.getDocId(); |
|
|
|
String docId = item.getDocId(); |
|
|
|
String departmentId = item.getDepartmentId(); |
|
|
|
String departmentId = item.getDepartmentId(); |
|
|
|
AIDoctorSchedule findDept = deptList.stream().filter(o -> o.getDepartmentId().equals(departmentId)).findFirst().orElse(null); |
|
|
|
String subDeptCode = null; |
|
|
|
|
|
|
|
if (departmentId.contains("_")) { |
|
|
|
|
|
|
|
String[] deptInfo = departmentId.split("_"); |
|
|
|
|
|
|
|
if (deptInfo.length == 2) { |
|
|
|
|
|
|
|
departmentId = deptInfo[0]; |
|
|
|
|
|
|
|
subDeptCode = deptInfo[1]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String finalDepartmentId = departmentId; |
|
|
|
|
|
|
|
AIDoctorSchedule findDept = deptList.stream().filter(o -> o.getDepartmentId().equals(finalDepartmentId)).findFirst().orElse(null); |
|
|
|
|
|
|
|
if ("0".equals(docId)) { |
|
|
|
|
|
|
|
docId = "*"; // 任意医生
|
|
|
|
|
|
|
|
} |
|
|
|
if (findDept == null) { |
|
|
|
if (findDept == null) { |
|
|
|
AIDoctorSchedule dept = new AIDoctorSchedule(); |
|
|
|
AIDoctorSchedule dept = new AIDoctorSchedule(); |
|
|
|
dept.setDepartmentId(departmentId); |
|
|
|
dept.setDepartmentId(departmentId); |
|
|
|
|
|
|
|
dept.setSubDeptCode(subDeptCode); |
|
|
|
Map<String, String> doctorIds = new HashMap<>(); |
|
|
|
Map<String, String> doctorIds = new HashMap<>(); |
|
|
|
doctorIds.put(docId, docId); |
|
|
|
doctorIds.put(docId, docId); |
|
|
|
dept.setDoctorIds(doctorIds); |
|
|
|
dept.setDoctorIds(doctorIds); |
|
|
|
@ -365,6 +403,7 @@ public class AIGuidanceService { |
|
|
|
HisRegisterDao hisRegisterDao = new HisRegisterDao(); |
|
|
|
HisRegisterDao hisRegisterDao = new HisRegisterDao(); |
|
|
|
for (AIDoctorSchedule deptItem : deptList) { |
|
|
|
for (AIDoctorSchedule deptItem : deptList) { |
|
|
|
String departmentId = deptItem.getDepartmentId(); |
|
|
|
String departmentId = deptItem.getDepartmentId(); |
|
|
|
|
|
|
|
String subDeptCode = deptItem.getSubDeptCode(); |
|
|
|
if (ObjectUtils.isEmpty(departmentId)) { |
|
|
|
if (ObjectUtils.isEmpty(departmentId)) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -373,10 +412,9 @@ public class AIGuidanceService { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (HCAIGuidanceConfig.IS_SPLIT_TIME_REG) { // 分时段
|
|
|
|
if (HCAIGuidanceConfig.IS_SPLIT_TIME_REG) { // 分时段
|
|
|
|
String curDate = DateHelper.getCurDate(); |
|
|
|
String curDate = DateHelper.getCurDate(); |
|
|
|
hisDoctorList = hisRegisterDao.queryHisTimeRegDoctorList(departmentId, branchId, curDate, DateHelper.getMoveDate(curDate, 7)); |
|
|
|
hisDoctorList = hisRegisterDao.queryHisTimeRegDoctorList(departmentId, subDeptCode, curDate, DateHelper.getMoveDate(curDate, 7)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
hisDoctorList = hisRegisterDao.queryHisRegTodayDoctorList(departmentId, null); |
|
|
|
hisDoctorList = hisRegisterDao.queryHisRegTodayDoctorList(departmentId, null); |
|
|
|
List<Doctor> resDoctorList = hisRegisterDao.queryHisResRegDoctorList(departmentId, null); |
|
|
|
List<Doctor> resDoctorList = hisRegisterDao.queryHisResRegDoctorList(departmentId, null); |
|
|
|
@ -391,7 +429,7 @@ public class AIGuidanceService { |
|
|
|
for (Map.Entry<String, String> item : doctorIds.entrySet()) { |
|
|
|
for (Map.Entry<String, String> item : doctorIds.entrySet()) { |
|
|
|
String docId = item.getKey(); |
|
|
|
String docId = item.getKey(); |
|
|
|
Doctor findRegDoctorItem = regDoctorList.stream().filter(o -> o.getDoctCode().equals(docId)).findFirst().orElse(null); |
|
|
|
Doctor findRegDoctorItem = regDoctorList.stream().filter(o -> o.getDoctCode().equals(docId)).findFirst().orElse(null); |
|
|
|
if (findRegDoctorItem != null) { |
|
|
|
if (findRegDoctorItem != null) { // 已存在
|
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
Doctor findHisDoctorItem = hisDoctorList.stream().filter(o -> o.getDoctCode().equals(docId)).findFirst().orElse(null); |
|
|
|
Doctor findHisDoctorItem = hisDoctorList.stream().filter(o -> o.getDoctCode().equals(docId)).findFirst().orElse(null); |
|
|
|
@ -410,6 +448,7 @@ public class AIGuidanceService { |
|
|
|
AIDoctorSchedule item; |
|
|
|
AIDoctorSchedule item; |
|
|
|
String headImg; |
|
|
|
String headImg; |
|
|
|
for (Doctor doctor : regDoctorList) { |
|
|
|
for (Doctor doctor : regDoctorList) { |
|
|
|
|
|
|
|
String subDeptCode = doctor.getSubDeptCode(); |
|
|
|
String deptCode = doctor.getDeptCode(); |
|
|
|
String deptCode = doctor.getDeptCode(); |
|
|
|
String deptName = doctor.getDeptName(); |
|
|
|
String deptName = doctor.getDeptName(); |
|
|
|
String doctCode = doctor.getDoctCode(); |
|
|
|
String doctCode = doctor.getDoctCode(); |
|
|
|
@ -419,7 +458,7 @@ public class AIGuidanceService { |
|
|
|
item.setHosId(HCAIGuidanceConfig.HOSP_ID); |
|
|
|
item.setHosId(HCAIGuidanceConfig.HOSP_ID); |
|
|
|
item.setBranchId(branchId); |
|
|
|
item.setBranchId(branchId); |
|
|
|
//
|
|
|
|
//
|
|
|
|
item.setDocId(doctCode); |
|
|
|
item.setDocId("*".equals(doctCode) ? "0" : doctCode); |
|
|
|
item.setName(doctName); |
|
|
|
item.setName(doctName); |
|
|
|
item.setDepartmentId(deptCode); |
|
|
|
item.setDepartmentId(deptCode); |
|
|
|
item.setDeptName(deptName); |
|
|
|
item.setDeptName(deptName); |
|
|
|
@ -433,24 +472,30 @@ public class AIGuidanceService { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ObjectUtils.isEmpty(doctor.getHeadImg())) { |
|
|
|
|
|
|
|
item.setIconURL(domain + DEFAULT_IMAGE_PATH); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
map.put("date", curDate); |
|
|
|
Map<String, Object> urlMap = new HashMap<>(); |
|
|
|
map.put("deptCode", deptCode); |
|
|
|
urlMap.put("date", curDate); |
|
|
|
map.put("deptName", URLHelper.encodeURL(deptName)); |
|
|
|
urlMap.put("deptCode", deptCode); |
|
|
|
map.put("doctName", URLHelper.encodeURL(doctName)); |
|
|
|
urlMap.put("deptName", URLHelper.encodeURL(deptName)); |
|
|
|
map.put("doctCode", doctCode); |
|
|
|
urlMap.put("doctName", URLHelper.encodeURL(doctName)); |
|
|
|
map.put("subDeptCode", ""); |
|
|
|
urlMap.put("doctCode", doctCode); |
|
|
|
map.put("hospitalArea", ""); |
|
|
|
urlMap.put("subDeptCode", ObjectUtils.isEmpty(subDeptCode) ? "" : subDeptCode); |
|
|
|
|
|
|
|
urlMap.put("hospitalArea", ""); |
|
|
|
if (HCAIGuidanceConfig.IS_SPLIT_TIME_REG) { |
|
|
|
if (HCAIGuidanceConfig.IS_SPLIT_TIME_REG) { |
|
|
|
item.setUrl(webReqURL + "reg-reserve.html#/reg-doct-source" + URLHelper.mapParamsToUrl(map, true)); |
|
|
|
item.setUrl(webReqURL + "reg-reserve.html#/reg-doct-source" + URLHelper.mapParamsToUrl(urlMap, true)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
item.setUrl(webReqURL + "reg-reserve.html#/reg-doctor" + URLHelper.mapParamsToUrl(map, true)); |
|
|
|
item.setUrl(webReqURL + "reg-reserve.html#/reg-doctor" + URLHelper.mapParamsToUrl(urlMap, true)); |
|
|
|
} |
|
|
|
} |
|
|
|
item.setSchedule(queryDoctorSchedule(deptCode, null, doctCode)); |
|
|
|
item.setSchedule(queryDoctorSchedule(deptCode, null, doctCode)); |
|
|
|
|
|
|
|
|
|
|
|
doctors.add(item); |
|
|
|
doctors.add(item); |
|
|
|
} |
|
|
|
} |
|
|
|
return Result.success(ResultEnum.AI_SUCCESS, doctors); |
|
|
|
|
|
|
|
|
|
|
|
map.put("doctors", doctors); |
|
|
|
|
|
|
|
return Result.respJson(map); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public List<AISchedule> queryDoctorSchedule(String deptCode, String subDeptCode, String doctCode) { |
|
|
|
public List<AISchedule> queryDoctorSchedule(String deptCode, String subDeptCode, String doctCode) { |
|
|
|
@ -465,9 +510,11 @@ public class AIGuidanceService { |
|
|
|
AISchedule addItem = new AISchedule(); |
|
|
|
AISchedule addItem = new AISchedule(); |
|
|
|
addItem.setDate(regDate); |
|
|
|
addItem.setDate(regDate); |
|
|
|
addItem.setAvailable(1); |
|
|
|
addItem.setAvailable(1); |
|
|
|
|
|
|
|
addItem.setTotal(1); |
|
|
|
addItem.setType("普通"); |
|
|
|
addItem.setType("普通"); |
|
|
|
schedules.add(addItem); |
|
|
|
schedules.add(addItem); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
findItem.setTotal(findItem.getAvailable() + 1); |
|
|
|
findItem.setAvailable(findItem.getAvailable() + 1); |
|
|
|
findItem.setAvailable(findItem.getAvailable() + 1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -490,6 +537,8 @@ public class AIGuidanceService { |
|
|
|
setH5Url(webReqURL + "reg-reserve.html"); |
|
|
|
setH5Url(webReqURL + "reg-reserve.html"); |
|
|
|
setRemark("线上挂号,线下就诊"); |
|
|
|
setRemark("线上挂号,线下就诊"); |
|
|
|
setWxAppId(""); |
|
|
|
setWxAppId(""); |
|
|
|
|
|
|
|
setWxAppPath(""); |
|
|
|
|
|
|
|
setWxAppOriginalId(""); |
|
|
|
}}); |
|
|
|
}}); |
|
|
|
|
|
|
|
|
|
|
|
dataList.add(new HCHospitalHome() {{ |
|
|
|
dataList.add(new HCHospitalHome() {{ |
|
|
|
@ -498,6 +547,8 @@ public class AIGuidanceService { |
|
|
|
setH5Url(webReqURL + "app.html"); |
|
|
|
setH5Url(webReqURL + "app.html"); |
|
|
|
setRemark("医院官网,功能分类展示"); |
|
|
|
setRemark("医院官网,功能分类展示"); |
|
|
|
setWxAppId(""); |
|
|
|
setWxAppId(""); |
|
|
|
|
|
|
|
setWxAppPath(""); |
|
|
|
|
|
|
|
setWxAppOriginalId(""); |
|
|
|
}}); |
|
|
|
}}); |
|
|
|
|
|
|
|
|
|
|
|
dataList.add(new HCHospitalHome() {{ |
|
|
|
dataList.add(new HCHospitalHome() {{ |
|
|
|
@ -506,6 +557,8 @@ public class AIGuidanceService { |
|
|
|
setH5Url(webReqURL + "pay-info.html"); |
|
|
|
setH5Url(webReqURL + "pay-info.html"); |
|
|
|
setRemark("处方和申请单线上缴费"); |
|
|
|
setRemark("处方和申请单线上缴费"); |
|
|
|
setWxAppId(""); |
|
|
|
setWxAppId(""); |
|
|
|
|
|
|
|
setWxAppPath(""); |
|
|
|
|
|
|
|
setWxAppOriginalId(""); |
|
|
|
}}); |
|
|
|
}}); |
|
|
|
|
|
|
|
|
|
|
|
dataList.add(new HCHospitalHome() {{ |
|
|
|
dataList.add(new HCHospitalHome() {{ |
|
|
|
@ -514,9 +567,11 @@ public class AIGuidanceService { |
|
|
|
setH5Url(webReqURL + "all-result.html"); |
|
|
|
setH5Url(webReqURL + "all-result.html"); |
|
|
|
setRemark("检验、检查报告查询"); |
|
|
|
setRemark("检验、检查报告查询"); |
|
|
|
setWxAppId(""); |
|
|
|
setWxAppId(""); |
|
|
|
|
|
|
|
setWxAppPath(""); |
|
|
|
|
|
|
|
setWxAppOriginalId(""); |
|
|
|
}}); |
|
|
|
}}); |
|
|
|
|
|
|
|
|
|
|
|
map.put("dataList", dataList); |
|
|
|
map.put("dataList", dataList); |
|
|
|
return Result.success(map); |
|
|
|
return Result.success(ResultEnum.AI_SUCCESS, map); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|