|
@ -148,6 +148,7 @@ import java.text.DecimalFormat;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* Created by Trick on 2019/5/17.
|
|
@ -5677,6 +5678,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
pagesize = 10;
|
|
|
}*/
|
|
|
testHikar();
|
|
|
long statr = new Date().getTime();
|
|
|
String sql = "SELECT " +
|
|
|
" d.id AS \"id\", " +
|
|
|
" d.photo AS \"photo\", " +
|
|
@ -5691,6 +5693,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
" d.consult_status AS \"consultStatus\"," +
|
|
|
" d.outpatient_type AS \"outpatientType\"," +
|
|
|
" a.total AS \"consultTotal\"," +
|
|
|
" d.twfz_charge_type AS \"twfz_charge_type\"," +
|
|
|
" d.spfz_charge_type AS \"spfz_charge_type\"," +
|
|
|
" d.spzx_charge_type AS \"spzx_charge_type\"," +
|
|
|
" d.xtfz_charge_type AS \"xtfz_charge_type\"," +
|
|
|
" d.twzx_charge_type AS \"twzx_charge_type\"," +
|
|
|
" d.jyzx_charge_type AS \"jyzx_charge_type\"," +
|
|
|
" h.org_name AS \"orgName\"," +
|
|
|
" h.org_code AS \"orgCode\" " ;
|
|
|
if(StringUtils.isNoneBlank(patientid)){
|
|
@ -5850,21 +5858,320 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql, params, page, pagesize);
|
|
|
List<WlyyHospitalSysDictDO> doctorFrontList = wlyyHospitalSysDictDao.findByDictNameOrderBySort("doctorFrontList",orgCode);
|
|
|
List<Map<String,Object>> frontDoctor = new ArrayList<>();
|
|
|
if (doctorFrontList!=null&&doctorFrontList.size()>0){
|
|
|
if (list!=null&&list.size()>0){
|
|
|
String sqlCharge = "SELECT t.id as \"id\",\n" +
|
|
|
"\tm.req_fee as \"twfzFee\",\n" +
|
|
|
"\ta.req_fee as \"spfzFee\",\n" +
|
|
|
"\tb.req_fee as \"spzxFee\",\n" +
|
|
|
"\tv.req_fee as \"twzxFee\",\n" +
|
|
|
"\tg.req_fee as \"jyzxFee\",\n" +
|
|
|
"\td.req_fee as \"xtzxFee\"\n" +
|
|
|
"FROM\n" +
|
|
|
"\t ("+sql+") t \n" +
|
|
|
"LEFT JOIN wlyy_charge_dict m ON t.twfz_charge_type = m.charge_type\n" +
|
|
|
"LEFT JOIN wlyy_charge_dict a ON t.spfz_charge_type = a.charge_type\n" +
|
|
|
"LEFT JOIN wlyy_charge_dict b ON t.spzx_charge_type = b.charge_type\n" +
|
|
|
"LEFT JOIN wlyy_charge_dict v ON t.twzx_charge_type = v.charge_type\n" +
|
|
|
"LEFT JOIN wlyy_charge_dict d ON t.xtfz_charge_type = d.charge_type\n" +
|
|
|
" LEFT JOIN wlyy_charge_dict g ON t.jyzx_charge_type = g.charge_type\n"+
|
|
|
" where t.id is not null ";
|
|
|
List<Map<String,Object>> chargeDictDOLists = hibenateUtils.createSQLQuery(sqlCharge, params);
|
|
|
//查询医生各项评价平均分
|
|
|
String sqlscore = "select t.doctor as \"id\" ,sum(t.score)/3 as\"score\" from ("+
|
|
|
"SELECT " +
|
|
|
"AVG(a.score) AS \"score\"," +
|
|
|
"a.score_type AS \"score_type\"," +
|
|
|
"b.doctor as \"doctor\" " +
|
|
|
"FROM ("+sql+") m , base_evaluate a,base_evaluate_score b " +
|
|
|
"WHERE " +
|
|
|
" m.id = b.doctor and " +
|
|
|
"a.relation_code=b.id " +
|
|
|
"GROUP BY a.score_type,b.doctor ORDER BY a.score_type ASC ) t GROUP BY t.doctor";
|
|
|
List<Map<String, Object>> listscore = hibenateUtils.createSQLQuery(sqlscore, params);
|
|
|
|
|
|
/*list.stream().forEach(e->{
|
|
|
if (null==e.get("consultStatus")){
|
|
|
e.put("consultStatus",0);
|
|
|
}
|
|
|
if (null==e.get("workTotal")){
|
|
|
e.put("workTotal",0);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
list.stream().sorted(Comparator.comparing((Map<String, Object> h) -> ((String) h.get("workTotal"))).reversed().thenComparing(Comparator.comparing((Map<String, Object> h) -> ((String) h.get("consultStatus")))).reversed());*/
|
|
|
List<Map<String,Object>> resultList = new ArrayList<>();
|
|
|
resultList.addAll(list) ;
|
|
|
for (Map<String,Object> map:list){
|
|
|
String doctor = map.get("id").toString();
|
|
|
/*List<Map<String,Object>> chargeDictDOLists = new ArrayList<>();
|
|
|
if(null!=map.get("chargeType")){
|
|
|
String chargeType = map.get("chargeType").toString();
|
|
|
if (chargeType.contains(",")){
|
|
|
chargeType = chargeType.replace(",","','");
|
|
|
}
|
|
|
String sqlCharge = "select charge_type as \"chargeType\",charge_name as \"chargeName\"," +
|
|
|
"req_fee as \"reqFee\",zj_fee as \"zjFee\",xt_fee as \"xtFee\",dept_type_code as \"deptTypeCode\" " +
|
|
|
" from wlyy_charge_dict where 1=1";
|
|
|
sqlCharge+=" and charge_type in ( '"+chargeType+"')";
|
|
|
if (StringUtils.isNoneBlank(deptTyepCode)){
|
|
|
sqlCharge+=" and dept_type_code in ( '"+deptTyepCode+"')";
|
|
|
}
|
|
|
chargeDictDOLists = hibenateUtils.createSQLQuery(sqlCharge);
|
|
|
}
|
|
|
map.put("chargeTypeList",chargeDictDOLists);*/
|
|
|
List<Map<String,Object>> doctorChargeDictDOLists = new ArrayList<>();
|
|
|
for (Map<String ,Object> chargMap:chargeDictDOLists){
|
|
|
if(doctor.equalsIgnoreCase(chargMap.get("id").toString())){
|
|
|
doctorChargeDictDOLists.add(chargMap);
|
|
|
}
|
|
|
}
|
|
|
map.put("chargeTypeList",doctorChargeDictDOLists);
|
|
|
|
|
|
|
|
|
Double doctorScore = new Double("0");
|
|
|
|
|
|
if (listscore != null && listscore.size() > 0) {
|
|
|
for (Map<String, Object> _listscore : listscore) {
|
|
|
if (_listscore.get("id").toString().equalsIgnoreCase(doctor)){
|
|
|
doctorScore = Double.parseDouble(_listscore.get("score").toString());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
map.put("doctorScore", doctorScore);
|
|
|
if (doctorFrontList!=null&&doctorFrontList.size()>0){
|
|
|
for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:doctorFrontList){
|
|
|
for(Map<String,Object> map: list){
|
|
|
if(map.get("id").toString().equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
map.put("doctorFrontSort",wlyyHospitalSysDictDO.getSort());
|
|
|
logger.info("doctorFrontSort",wlyyHospitalSysDictDO.getSort());
|
|
|
logger.info("doctorId",wlyyHospitalSysDictDO.getDictCode());
|
|
|
frontDoctor.add(map);
|
|
|
}
|
|
|
if(doctor.equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
map.put("doctorFrontSort",wlyyHospitalSysDictDO.getSort());
|
|
|
logger.info("doctorFrontSort"+wlyyHospitalSysDictDO.getSort());
|
|
|
logger.info("doctorId"+wlyyHospitalSysDictDO.getDictCode());
|
|
|
frontDoctor.add(map);
|
|
|
resultList.remove(map);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
List<Map<String, Object>> listCount = hibenateUtils.createSQLQuery(sqlCount, params);
|
|
|
Long count = 0L;
|
|
|
if(listCount!=null){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
count = hibenateUtils.objTransformLong(listCount.get(0).get("total"));
|
|
|
}
|
|
|
if (frontDoctor!=null&&frontDoctor.size()>0){
|
|
|
frontDoctor.sort(Comparator.comparing((Map<String, Object> h) -> ((Integer) h.get("doctorFrontSort"))));
|
|
|
logger.info("size"+frontDoctor.size());
|
|
|
for (Map<String, Object> map:resultList){
|
|
|
logger.info("id =="+map.get("id").toString());
|
|
|
frontDoctor.add(map);
|
|
|
}
|
|
|
}
|
|
|
logger.info("findDoctorByHospitalAndDiseaseAndDept end:" + DateUtil.dateToStr(new Date(), "yyyy-MM-dd HH:mm:ss:SSS"));
|
|
|
logger.info("sql:" + sql);
|
|
|
MixEnvelop envelop =new MixEnvelop();
|
|
|
envelop.setDetailModelList(frontDoctor);
|
|
|
envelop.setTotalCount(count.intValue());
|
|
|
envelop.setPageSize(pagesize);
|
|
|
envelop.setCurrPage(page);
|
|
|
System.out.println("new"+(new Date().getTime()-statr));
|
|
|
return envelop;
|
|
|
}
|
|
|
/**
|
|
|
* 根据疾病名称,热门部门查询医生
|
|
|
*
|
|
|
* @param orgCode 机构码
|
|
|
* @param dept 部门CODE
|
|
|
* @param diseaseKey 疾病名称
|
|
|
* @param jobTitleNameKey
|
|
|
* @param outpatientType
|
|
|
* @param keyName
|
|
|
* @param workingTime
|
|
|
* @param consutlSort
|
|
|
* @return
|
|
|
*/
|
|
|
@Transactional(readOnly = true)
|
|
|
public MixEnvelop findDoctorByHospitalAndDiseaseAndDept2(String iswork, String patientid, String orgCode, String dept,
|
|
|
String diseaseKey, String doctorNameKey,
|
|
|
String jobTitleNameKey, String outpatientType,
|
|
|
String keyName, String workingTime, String consultStatus, String chargType, String consutlSort, String isAttention, Integer page, Integer pagesize) {
|
|
|
|
|
|
/* if(page >=1){
|
|
|
page --;
|
|
|
|
|
|
if (pagesize <= 0) {
|
|
|
pagesize = 10;
|
|
|
}*/
|
|
|
testHikar();
|
|
|
long statr = new Date().getTime();
|
|
|
String sql = "SELECT " +
|
|
|
" d.id AS \"id\", " +
|
|
|
" d.photo AS \"photo\", " +
|
|
|
" d.name AS \"name\", " +
|
|
|
" d.expertise AS \"expertise\"," +
|
|
|
" d.introduce AS \"introduce\"," +
|
|
|
" d.job_title_code AS \"jobTitleCode\", " +
|
|
|
" d.job_title_name AS \"jobTitleName\"," +
|
|
|
" d.charge_type AS \"chargeType\"," +
|
|
|
" h.dept_name AS \"deptName\"," +
|
|
|
" dw.workTotal AS \"workTotal\","+
|
|
|
" d.consult_status AS \"consultStatus\"," +
|
|
|
" d.outpatient_type AS \"outpatientType\"," +
|
|
|
" a.total AS \"consultTotal\"," +
|
|
|
" h.org_name AS \"orgName\"," +
|
|
|
" h.org_code AS \"orgCode\" " ;
|
|
|
if(StringUtils.isNoneBlank(patientid)){
|
|
|
sql+=" , follow.id AS \"followid\" " ;
|
|
|
}
|
|
|
sql+=" FROM " +
|
|
|
" base_doctor d " +
|
|
|
" JOIN base_doctor_hospital h ON h.doctor_code = d.id " +
|
|
|
" Left join ( select count(id) as total,doctor from wlyy_outpatient where status = 3 GROUP BY doctor ) a on a.doctor = d.id ";
|
|
|
Map<String, Object> params = new HashedMap();
|
|
|
Date date = new Date();
|
|
|
sql+="LEFT JOIN (SELECT COUNT(t1.doctor) as workTotal, t1.doctor FROM wlyy_doctor_work_time t1 WHERE " +
|
|
|
"t1.start_time <=:startTime AND t1.end_time >=:endTime GROUP BY t1.doctor) dw ON dw.doctor=d.id ";
|
|
|
sql+="LEFT JOIN (\n" +
|
|
|
"\tSELECT\n" +
|
|
|
"\t\tAVG(a.score) AS score,\n" +
|
|
|
"\t\tb.doctor AS doctor\n" +
|
|
|
"\tFROM\n" +
|
|
|
"\t\tbase_evaluate a,\n" +
|
|
|
"\t\tbase_evaluate_score b\n" +
|
|
|
"\tWHERE\n" +
|
|
|
"\t\ta.relation_code = b.id\n" +
|
|
|
"\tGROUP BY\n" +
|
|
|
"\t\tb.doctor\n" +
|
|
|
") evaluate ON evaluate.doctor = d.id";
|
|
|
params.put("startTime", date);
|
|
|
params.put("endTime", date);
|
|
|
if(StringUtils.isNoneBlank(patientid)){
|
|
|
if ("1".equalsIgnoreCase(isAttention)) {
|
|
|
sql += " join base_doctor_patient_follow follow on follow.doctor = d.id and follow.patient ='" + patientid + "' ";
|
|
|
}
|
|
|
if ("0".equalsIgnoreCase(isAttention)) {
|
|
|
sql += " join base_doctor_patient_follow follow on follow.doctor = d.id and follow.patient !='" + patientid + "' ";
|
|
|
}
|
|
|
if (StringUtils.isEmpty(isAttention)) {
|
|
|
sql += " LEFT JOIN base_doctor_patient_follow follow ON follow.patient='" + patientid + "' AND follow.doctor = d.id ";
|
|
|
}
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(diseaseKey)) {
|
|
|
sql += " left join wlyy_doctor_special_disease sp on d.id = sp.doctor_code ";
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(workingTime)) {
|
|
|
sql += " JOIN wlyy_doctor_work_time wk on wk.doctor = d.id ";
|
|
|
}
|
|
|
|
|
|
|
|
|
sql += " WHERE 1=1 and h.del = '1' ";
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(chargType)) {
|
|
|
if ("all".equals(chargType)) {
|
|
|
//不过滤
|
|
|
} else {
|
|
|
sql += " AND d.charge_type = :chargType";
|
|
|
params.put("chargType", chargType);
|
|
|
}
|
|
|
}
|
|
|
List<WlyyHospitalSysDictDO> wlyyHospitalSysDictDOS = wlyyHospitalSysDictDao.findByDictCode("isDoctorWork");
|
|
|
boolean isNeedDoctorWord = true;
|
|
|
if(wlyyHospitalSysDictDOS!=null&&wlyyHospitalSysDictDOS.size()>0){
|
|
|
for(WlyyHospitalSysDictDO wlyyHospitalSysDictDO:wlyyHospitalSysDictDOS){
|
|
|
if (!"1".equalsIgnoreCase(wlyyHospitalSysDictDO.getDictValue())){
|
|
|
isNeedDoctorWord = false;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(iswork) && "1".equals(iswork)&&isNeedDoctorWord) {
|
|
|
logger.info("iswork:" + iswork);
|
|
|
sql += " AND (" +
|
|
|
" EXISTS ( " +
|
|
|
" SELECT " +
|
|
|
" 1 " +
|
|
|
" FROM " +
|
|
|
" wlyy_doctor_work_time t " +
|
|
|
" WHERE " +
|
|
|
" t.doctor = d.id " +
|
|
|
" AND t.start_time <=:startTime" +
|
|
|
" AND t.end_time >=:endTime" +
|
|
|
" ) OR " +
|
|
|
" d.consult_status = '1') ";
|
|
|
params.put("startTime", date);
|
|
|
params.put("endTime", date);
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(orgCode)) {
|
|
|
sql += " AND h.org_code =:orgCode";
|
|
|
params.put("orgCode", orgCode);
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(diseaseKey)) {
|
|
|
sql += " AND sp.disease_name like :diseaseKey";
|
|
|
params.put("diseaseKey", "%" + diseaseKey + "%");
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(doctorNameKey)) {
|
|
|
sql += " AND d.name like :doctorNameKey";
|
|
|
params.put("doctorNameKey", "%" + doctorNameKey + "%");
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(dept)) {
|
|
|
sql += " AND h.dept_code =:dept ";
|
|
|
params.put("dept", dept);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(jobTitleNameKey)) {
|
|
|
sql += " AND d.job_title_name = :jobTitleNameKey ";
|
|
|
params.put("jobTitleNameKey", jobTitleNameKey);
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(outpatientType)) {
|
|
|
if (outpatientType.contains("or")) {
|
|
|
String[] outpatientTypeArray = outpatientType.split("or");
|
|
|
sql += " AND ( ";
|
|
|
|
|
|
for (int i = 0; i < outpatientTypeArray.length; i++) {
|
|
|
sql += " d.outpatient_type like'%" + outpatientTypeArray[i] + "%'";
|
|
|
if (i != outpatientTypeArray.length - 1) {
|
|
|
sql += " or ";
|
|
|
}
|
|
|
}
|
|
|
sql += " ) ";
|
|
|
} else {
|
|
|
sql += " AND d.outpatient_type like'%" + outpatientType + "%'";
|
|
|
}
|
|
|
} else {
|
|
|
sql += " AND d.outpatient_type is not null ";
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(keyName)) {
|
|
|
sql += " AND (h.dept_name like '%" + keyName + "%' or d.name like '%" + keyName + "%' or d.expertise like '%" + keyName + "%' )";
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(workingTime)) {
|
|
|
sql += " AND wk.work_date = :workingTime ";
|
|
|
params.put("workingTime", workingTime);
|
|
|
}
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(consultStatus)) {
|
|
|
sql += " AND d.consult_status = :consultStatus ";
|
|
|
params.put("consultStatus", consultStatus);
|
|
|
|
|
|
}
|
|
|
if("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
|
|
|
if (flag){
|
|
|
sql += " and d.del='1' order by d.consult_status DESC ,evaluate.score desc,a.total " + consutlSort;
|
|
|
}else{
|
|
|
sql += " and d.del='1' order by d.consult_status desc nulls last ,evaluate.score desc nulls last ,a.total " + consutlSort;
|
|
|
sql+=" NULLS LAST,\n" +
|
|
|
"\tD.id DESC";
|
|
|
}
|
|
|
}else {
|
|
|
sql += " and d.del='1' order by d.consult_status DESC ,evaluate.score desc,a.total " + consutlSort;
|
|
|
}
|
|
|
String sqlCount = "select count(1) as \"total\" from ( "+sql+" ) t";
|
|
|
List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql, params, page, pagesize);
|
|
|
/*list.stream().forEach(e->{
|
|
|
if (null==e.get("consultStatus")){
|
|
|
e.put("consultStatus",0);
|
|
@ -5875,8 +6182,17 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
});
|
|
|
|
|
|
list.stream().sorted(Comparator.comparing((Map<String, Object> h) -> ((String) h.get("workTotal"))).reversed().thenComparing(Comparator.comparing((Map<String, Object> h) -> ((String) h.get("consultStatus")))).reversed());*/
|
|
|
String hospital="";
|
|
|
for (Map<String,Object> map:list){
|
|
|
String doctor = map.get("id").toString();
|
|
|
//号别
|
|
|
List<BaseDoctorHospitalDO> depts = baseDoctorHospitalDao.findByDoctorCode(doctor);
|
|
|
if (null!=depts&&depts.size()>0){
|
|
|
BaseDoctorHospitalDO baseDoctorHospitalDO = depts.get(0);
|
|
|
hospital = baseDoctorHospitalDO.getOrgCode();
|
|
|
|
|
|
}
|
|
|
|
|
|
/*List<Map<String,Object>> chargeDictDOLists = new ArrayList<>();
|
|
|
if(null!=map.get("chargeType")){
|
|
|
String chargeType = map.get("chargeType").toString();
|
|
@ -5932,14 +6248,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
}
|
|
|
doctorScore = doctorScore / 3;
|
|
|
map.put("doctorScore", doctorScore);
|
|
|
if(doctorFrontList!=null&&doctorFrontList.size()>0){
|
|
|
for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:doctorFrontList){
|
|
|
if (wlyyHospitalSysDictDO.getDictCode().equalsIgnoreCase(map.get("id").toString())){
|
|
|
list.remove(map);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
List<Map<String, Object>> listCount = hibenateUtils.createSQLQuery(sqlCount, params);
|
|
|
Long count = 0L;
|
|
@ -5947,10 +6255,36 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
count = hibenateUtils.objTransformLong(listCount.get(0).get("total"));
|
|
|
}
|
|
|
List<WlyyHospitalSysDictDO> doctorFrontList = wlyyHospitalSysDictDao.findByDictNameOrderBySort("doctorFrontList",hospital);
|
|
|
if (doctorFrontList!=null&&doctorFrontList.size()>0){
|
|
|
frontDoctor.addAll(list);
|
|
|
list = frontDoctor;
|
|
|
List<Map<String,Object>> frontDoctor = new ArrayList<>();
|
|
|
if (list!=null&&list.size()>0){
|
|
|
for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:doctorFrontList){
|
|
|
for(Map<String,Object> map: list){
|
|
|
if(map.get("id").toString().equalsIgnoreCase(wlyyHospitalSysDictDO.getDictCode())){
|
|
|
map.put("doctorFrontSort",wlyyHospitalSysDictDO.getSort());
|
|
|
logger.info("doctorFrontSort",wlyyHospitalSysDictDO.getSort());
|
|
|
logger.info("doctorId",wlyyHospitalSysDictDO.getDictCode());
|
|
|
frontDoctor.add(map);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:doctorFrontList){
|
|
|
for(Map<String,Object> map1: list){
|
|
|
if (wlyyHospitalSysDictDO.getDictCode().equalsIgnoreCase(map1.get("id").toString())){
|
|
|
list.remove(map1);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
for(Map<String,Object> map1: list){
|
|
|
frontDoctor.add(map1);
|
|
|
}
|
|
|
list = frontDoctor;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
logger.info("findDoctorByHospitalAndDiseaseAndDept end:" + DateUtil.dateToStr(new Date(), "yyyy-MM-dd HH:mm:ss:SSS"));
|
|
|
logger.info("sql:" + sql);
|
|
|
MixEnvelop envelop =new MixEnvelop();
|
|
@ -5958,6 +6292,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
envelop.setTotalCount(count.intValue());
|
|
|
envelop.setPageSize(pagesize);
|
|
|
envelop.setCurrPage(page);
|
|
|
System.out.println("old"+(new Date().getTime()-statr));
|
|
|
return envelop;
|
|
|
}
|
|
|
/**
|
|
@ -11779,17 +12114,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
.build())
|
|
|
.build())
|
|
|
.build();
|
|
|
if (extras.get("outpatientId")!=null){
|
|
|
|
|
|
}
|
|
|
try {
|
|
|
PushResult result = jPushClient.sendPush(payload);
|
|
|
logger.info("极光推送返回日志==="+result);
|
|
|
WlyyHttpLogDO httpLogDO = new WlyyHttpLogDO();
|
|
|
httpLogDO.setCode("JPUSH");
|
|
|
httpLogDO.setCreateTime(new Date());
|
|
|
/*httpLogDO.setRequest(jsonObject.toJSONString());
|
|
|
httpLogDO.setResponse(result);*/
|
|
|
httpLogDO.setRequest(extras==null?"":extras.toString());
|
|
|
httpLogDO.setResponse(result==null?"":result.toString());
|
|
|
wlyyHttpLogDao.save(httpLogDO);
|
|
|
logger.info("Got result - " + result);
|
|
|
} catch (APIConnectionException e) {
|