|
@@ -270,21 +270,30 @@ public class ABehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public RespDTO sendDateInfo(String startDate, String endDate){
|
|
|
|
|
|
+ public RespDTO sendDateInfo(String startDate, String endDate, String isLeave){
|
|
try {
|
|
try {
|
|
//验证数据是否存在
|
|
//验证数据是否存在
|
|
if(StringUtil.isBlank(startDate)){
|
|
if(StringUtil.isBlank(startDate)){
|
|
return RespDTO.onError("请输入开始时间!");
|
|
return RespDTO.onError("请输入开始时间!");
|
|
}else if(StringUtil.isBlank(endDate)){
|
|
}else if(StringUtil.isBlank(endDate)){
|
|
return RespDTO.onError("请输入截止时间!");
|
|
return RespDTO.onError("请输入截止时间!");
|
|
|
|
+ }else if(StringUtil.isBlank(isLeave)){
|
|
|
|
+ return RespDTO.onError("请输入统计方式标识!");
|
|
}else{
|
|
}else{
|
|
- String sql = "SELECT * FROM AI_V_SENDPATIENTINFO t WHERE to_char(t.behospitalDate,'yyyy-mm-dd') >='" + startDate
|
|
|
|
- + "' and to_char(t.behospitalDate,'yyyy-mm-dd') < '" + endDate + "'";
|
|
|
|
|
|
+ String sql = "";
|
|
|
|
+ if("2".equals(isLeave)){
|
|
|
|
+ sql = "SELECT * FROM AI_V_SENDPATIENTINFO t WHERE to_char(t.leaveHospitalDate,'yyyy-mm-dd') >='" + startDate
|
|
|
|
+ + "' and to_char(t.leaveHospitalDate,'yyyy-mm-dd') < '" + endDate + "'";
|
|
|
|
+ }else {
|
|
|
|
+ sql = "SELECT * FROM AI_V_SENDPATIENTINFO t WHERE to_char(t.behospitalDate,'yyyy-mm-dd') >='" + startDate
|
|
|
|
+ + "' and to_char(t.behospitalDate,'yyyy-mm-dd') < '" + endDate + "'";
|
|
|
|
+ }
|
|
sql = sql.replace("\"","");
|
|
sql = sql.replace("\"","");
|
|
List<BehospitalInfo> behospitalInfoList = tzDBConn.getBehospitalInfo(sql);
|
|
List<BehospitalInfo> behospitalInfoList = tzDBConn.getBehospitalInfo(sql);
|
|
if(behospitalInfoList.size() == 0){
|
|
if(behospitalInfoList.size() == 0){
|
|
return RespDTO.onError("未找到病历!");
|
|
return RespDTO.onError("未找到病历!");
|
|
}
|
|
}
|
|
|
|
+ aMedAbnormalInfoFacade.saveAbnormalInfo("准备执行插入语句","对应总数"+behospitalInfoList.size(), sql,"","");
|
|
execute(behospitalInfoList);
|
|
execute(behospitalInfoList);
|
|
}
|
|
}
|
|
return RespDTO.onSuc("入院信息更新成功!");
|
|
return RespDTO.onSuc("入院信息更新成功!");
|