|
@ -111,12 +111,40 @@ public class WorkTimeService {
|
|
|
public Boolean checkDoctorWork(String doctor,String ywCode){
|
|
|
logger.info("当前判断的业务Code:"+ywCode);
|
|
|
if (StringUtils.isNoneBlank(ywCode)){
|
|
|
BaseDoctorDO doctorDO = baseDoctorDao.findById(doctor);
|
|
|
if (ywCode.contains(",")){
|
|
|
String[] split = ywCode.split(",");
|
|
|
Integer j =0;
|
|
|
for (int i = 0;i<split.length;i++){
|
|
|
WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findById(split[i]);
|
|
|
String isCheckDoctorWork = "";
|
|
|
|
|
|
boolean flag = false;
|
|
|
if (split[i].equalsIgnoreCase("isDoctorWorkTWFZ")){
|
|
|
if (StringUtils.isNoneBlank(doctorDO.getOutpatientType())){
|
|
|
if (doctorDO.getOutpatientType().contains("1")){
|
|
|
flag=true;
|
|
|
}
|
|
|
}
|
|
|
}else if (split[i].equalsIgnoreCase("isDoctorWorkSPFZ")){
|
|
|
if (StringUtils.isNoneBlank(doctorDO.getSpfzChargeType())){
|
|
|
if (doctorDO.getOutpatientType().contains("2")){
|
|
|
flag=true;
|
|
|
}
|
|
|
}
|
|
|
}else if (split[i].equalsIgnoreCase("isDoctorWorkTWZX")){
|
|
|
if (StringUtils.isNoneBlank(doctorDO.getTwzxChargeType())){
|
|
|
if (doctorDO.getOutpatientType().contains("zj")){
|
|
|
flag=true;
|
|
|
}
|
|
|
}
|
|
|
}else if (split[i].equalsIgnoreCase("isDoctorWorkSPZX")){
|
|
|
if (StringUtils.isNoneBlank(doctorDO.getSpzxChargeType())){
|
|
|
if (doctorDO.getOutpatientType().contains("zj")){
|
|
|
flag=true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (wlyyHospitalSysDictDO!=null){
|
|
|
isCheckDoctorWork = wlyyHospitalSysDictDO.getDictValue();
|
|
|
}
|
|
@ -146,11 +174,13 @@ public class WorkTimeService {
|
|
|
params.put("startTime",date);
|
|
|
params.put("endTime",date);
|
|
|
List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,params);
|
|
|
if(list!=null&&list.size()>0){
|
|
|
if(list!=null&&list.size()>0&&flag){
|
|
|
j++;
|
|
|
}
|
|
|
}else {
|
|
|
j++;
|
|
|
if (flag){
|
|
|
j++;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (j>=1){
|
|
@ -161,6 +191,32 @@ public class WorkTimeService {
|
|
|
}else {
|
|
|
WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findById(ywCode);
|
|
|
String isCheckDoctorWork = "1";
|
|
|
boolean flag = false;
|
|
|
if (ywCode.equalsIgnoreCase("isDoctorWorkTWFZ")){
|
|
|
if (StringUtils.isNoneBlank(doctorDO.getOutpatientType())){
|
|
|
if (doctorDO.getOutpatientType().contains("1")){
|
|
|
flag=true;
|
|
|
}
|
|
|
}
|
|
|
}else if (ywCode.equalsIgnoreCase("isDoctorWorkSPFZ")){
|
|
|
if (StringUtils.isNoneBlank(doctorDO.getSpfzChargeType())){
|
|
|
if (doctorDO.getOutpatientType().contains("2")){
|
|
|
flag=true;
|
|
|
}
|
|
|
}
|
|
|
}else if (ywCode.equalsIgnoreCase("isDoctorWorkTWZX")){
|
|
|
if (StringUtils.isNoneBlank(doctorDO.getTwzxChargeType())){
|
|
|
if (doctorDO.getOutpatientType().contains("zj")){
|
|
|
flag=true;
|
|
|
}
|
|
|
}
|
|
|
}else if (ywCode.equalsIgnoreCase("isDoctorWorkSPZX")){
|
|
|
if (StringUtils.isNoneBlank(doctorDO.getSpzxChargeType())){
|
|
|
if (doctorDO.getOutpatientType().contains("zj")){
|
|
|
flag=true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (wlyyHospitalSysDictDO!=null){
|
|
|
isCheckDoctorWork = wlyyHospitalSysDictDO.getDictValue();
|
|
|
}
|
|
@ -190,13 +246,15 @@ public class WorkTimeService {
|
|
|
params.put("startTime",date);
|
|
|
params.put("endTime",date);
|
|
|
List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,params);
|
|
|
if(list!=null&&list.size()>0){
|
|
|
if(list!=null&&list.size()>0&&flag){
|
|
|
return true;
|
|
|
}else {
|
|
|
return false;
|
|
|
}
|
|
|
}else {
|
|
|
return true;
|
|
|
if (flag){
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}else {
|