|
@ -4887,25 +4887,25 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
public com.alibaba.fastjson.JSONObject doctorIndexStatis(String doctor){
|
|
|
com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
|
|
|
|
|
|
WlyyHospitalSysDictDO dictDO = hospitalSysDictDao.findOneByDictNameAndDictCode("HOSPITAL_INTEGRATE_VALIDITY_DICT","HOSPITAL_INTEGRATE_VALIDITY_DICT");
|
|
|
com.alibaba.fastjson.JSONArray jsonArray = JSON.parseArray(dictDO.getDictValue());
|
|
|
//[{"type":0,"flag":0,"dateTime":"2023-07-06T16:00:00.000Z","days":"","description":"<p>1111</p>"},
|
|
|
//{"type":1,"flag":1,"dateTime":"","days":"2","description":"<p>5555</p>"}]
|
|
|
int flag = 0;
|
|
|
String dateTime = "";
|
|
|
String days = "";
|
|
|
for (int i=0;i<jsonArray.size();i++){
|
|
|
com.alibaba.fastjson.JSONObject jsonObject = jsonArray.getJSONObject(i);
|
|
|
if(jsonObject.get("type") instanceof Integer && jsonObject.getInteger("type")==1){
|
|
|
flag = jsonObject.getInteger("flag");
|
|
|
dateTime = jsonObject.getString("dateTime");
|
|
|
days = jsonObject.getString("days");
|
|
|
}
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(dateTime)){
|
|
|
dateTime = dateTime.substring(0,19);
|
|
|
dateTime = dateTime.replaceAll("T"," ");
|
|
|
}
|
|
|
// WlyyHospitalSysDictDO dictDO = hospitalSysDictDao.findOneByDictNameAndDictCode("HOSPITAL_INTEGRATE_VALIDITY_DICT","HOSPITAL_INTEGRATE_VALIDITY_DICT");
|
|
|
// com.alibaba.fastjson.JSONArray jsonArray = JSON.parseArray(dictDO.getDictValue());
|
|
|
// //[{"type":0,"flag":0,"dateTime":"2023-07-06T16:00:00.000Z","days":"","description":"<p>1111</p>"},
|
|
|
// //{"type":1,"flag":1,"dateTime":"","days":"2","description":"<p>5555</p>"}]
|
|
|
// int flag = 0;
|
|
|
// String dateTime = "";
|
|
|
// String days = "";
|
|
|
// for (int i=0;i<jsonArray.size();i++){
|
|
|
// com.alibaba.fastjson.JSONObject jsonObject = jsonArray.getJSONObject(i);
|
|
|
// if(jsonObject.get("type") instanceof Integer && jsonObject.getInteger("type")==1){
|
|
|
// flag = jsonObject.getInteger("flag");
|
|
|
// dateTime = jsonObject.getString("dateTime");
|
|
|
// days = jsonObject.getString("days");
|
|
|
// }
|
|
|
// }
|
|
|
// if(StringUtils.isNotBlank(dateTime)){
|
|
|
// dateTime = dateTime.substring(0,19);
|
|
|
// dateTime = dateTime.replaceAll("T"," ");
|
|
|
// }
|
|
|
//医生获取积分数据
|
|
|
String integrateSql ="SELECT\n" +
|
|
|
"\tIFNULL(SUM(integrate), 0) AS \"total\"\n" +
|
|
@ -4913,11 +4913,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
"\tbase_hospital_user_integrate\n" +
|
|
|
"WHERE\n" +
|
|
|
"\tuser = '"+doctor+"' and status=1 ";
|
|
|
if(flag==0){
|
|
|
integrateSql += " and create_time>'"+dateTime+"' ";
|
|
|
}else {
|
|
|
integrateSql += " and (integrate_type=2 or (integrate_type=1 and DATEDIFF(NOW(),create_time)<'"+days+"')) ";
|
|
|
}
|
|
|
// if(flag==0){
|
|
|
// integrateSql += " and create_time>'"+dateTime+"' ";
|
|
|
// }else {
|
|
|
// integrateSql += " and (integrate_type=2 or (integrate_type=1 and DATEDIFF(NOW(),create_time)<'"+days+"')) ";
|
|
|
// }
|
|
|
List<Map<String, Object>> rstotal = hibenateUtils.createSQLQuery(integrateSql);
|
|
|
Double integrateTotal = 0.0;
|
|
|
if (rstotal != null && rstotal.size() > 0) {
|
|
@ -9293,7 +9293,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
wlyyHttpLogDO.setCreateTime(new Date());
|
|
|
wlyyHttpLogDao.save(wlyyHttpLogDO);
|
|
|
}
|
|
|
|
|
|
return outpatient;
|
|
|
}
|
|
|
|