|
@ -32,6 +32,7 @@ import org.springframework.util.LinkedCaseInsensitiveMap;
|
|
|
import sun.misc.BASE64Encoder;
|
|
|
|
|
|
import java.io.*;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.net.URL;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
@ -71,6 +72,7 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
static String orgName = "厦门大学附属厦门眼科中心";
|
|
|
static String orgArea = "350203000";
|
|
|
static String orgSub = "350200000";
|
|
|
static String imgPath =File.separator+"usr"+File.separator+"local"+File.separator+"hospital"+File.separator+"svr-internet-hospital-job"+File.separator+"img"+File.separator;
|
|
|
|
|
|
|
|
|
public ObjectMapper objectMapper;
|
|
@ -145,13 +147,13 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
|
|
|
jb.put("hospital_phone", "0592-2112111");
|
|
|
jb.put("hospital_img","");
|
|
|
jb.put("bus_lic", ImgUtils.getImageStr("C:\\Users\\Administrator\\Desktop\\眼科医院\\监管平台\\附件\\资质证明-营业执照\\营业执照.jpg"));
|
|
|
jb.put("corp_idcord_head", ImgUtils.getImageStr("C:\\Users\\Administrator\\Desktop\\眼科医院\\监管平台\\附件\\法人身份证正反面\\a.jpg"));
|
|
|
jb.put("corp_idcord_tail", ImgUtils.getImageStr("C:\\Users\\Administrator\\Desktop\\眼科医院\\监管平台\\附件\\法人身份证正反面\\b.jpg"));
|
|
|
jb.put("pra_lic", ImgUtils.getImageStr("C:\\Users\\Administrator\\Desktop\\眼科医院\\监管平台\\附件\\执业许可证\\zyxkz.jpg"));
|
|
|
jb.put("bus_lic", ImgUtils.getImageStr(imgPath+"hospital"+File.separator+"yyzz.jpg"));
|
|
|
jb.put("corp_idcord_head", ImgUtils.getImageStr(imgPath+"hospital"+File.separator+"a.jpg"));
|
|
|
jb.put("corp_idcord_tail", ImgUtils.getImageStr(imgPath+"hospital"+File.separator+"b.jpg"));
|
|
|
jb.put("pra_lic", ImgUtils.getImageStr(imgPath+"hospital"+File.separator+"zyxkz.jpg"));
|
|
|
|
|
|
jb.put("secu_level","3");
|
|
|
jb.put("secu_level_cert",ImgUtils.getImageStr("C:\\Users\\Administrator\\Desktop\\眼科医院\\监管平台\\附件\\等保图片\\等保图片.jpg"));
|
|
|
jb.put("secu_level_cert",ImgUtils.getImageStr(imgPath+"hospital"+File.separator+"dbtp.jpg"));
|
|
|
|
|
|
jb.put("net_service", "1,3,4,5,7");
|
|
|
jb.put("net_service_ot", "");
|
|
@ -349,10 +351,10 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
jb.put("net_service", "1,3,4,5,7,9,10");
|
|
|
jb.put("cert_no", info.get("cert_no")== null ? "0":info.get("cert_no"));
|
|
|
jb.put("prac_no", info.get("prac_no")== null ? "0":info.get("prac_no"));
|
|
|
//资质证书
|
|
|
jb.put("doc_cert",ImgUtils.getImageStr("D:"+ File.separator+"zstp"+File.separator+info.get("name")+File.separator+"zg.jpg"));
|
|
|
//资格证书
|
|
|
jb.put("doc_cert",ImgUtils.getImageStr(imgPath+"doctor"+ File.separator+info.get("name")+File.separator+"zg.jpg"));
|
|
|
//执业证书
|
|
|
jb.put("cert_doc_prac", ImgUtils.getImageStr("D:"+ File.separator+"zstp"+File.separator+info.get("name")+File.separator+"zy.jpg"));
|
|
|
jb.put("cert_doc_prac", ImgUtils.getImageStr(imgPath+"doctor"+ File.separator+info.get("name")+File.separator+"zy.jpg"));
|
|
|
jb.put("txt_introduction", "厦门大学附属厦门眼科中心成立于1997年11月8日,是集医疗、教学、科研、防盲为一体的三级甲等眼科医院、国家临床重点专科、国家药物临床试验机构。设有国家博士后科研工作站、院士专家工作站、全国住院医师规培基地、转化医学研究所等。");
|
|
|
|
|
|
}catch (Exception e){
|
|
@ -431,11 +433,11 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
" WHERE 1=1" ;
|
|
|
Map<String,Object> params = new HashedMap();
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
sql = sql + " and reg.create_time >=:startDate ";
|
|
|
sql = sql + " and p.create_time >=:startDate ";
|
|
|
params.put("startDate",DateUtil.stringToDate(startDate,"yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
sql = sql + " and reg.create_time <=:endDate";
|
|
|
sql = sql + " and p.create_time <=:endDate";
|
|
|
params.put("endDate",DateUtil.stringToDate(endDate,"yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(keyId)){
|
|
@ -703,15 +705,7 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
int error = 0;
|
|
|
int dataError = 0;
|
|
|
|
|
|
/* String sql = "select a.id,a.type,c.name as docName,c.idcard as docIdCard,c.id as docId\n" +
|
|
|
" ,b.patient,b.name as patientName,b.birthday,a.czrq,a.end_time\n" +
|
|
|
" ,a.symptoms,d.sex,d.mobile,d.idcard as patIdCard,d.city_code, e.dept_code, e.dept_name\n" +
|
|
|
" from wlyy_consult a \n" +
|
|
|
" ,wlyy_consult_team b\n" +
|
|
|
" JOIN base_doctor c on c.id = b.doctor\n" +
|
|
|
" JOIN base_patient d on d.id = b.patient\n" +
|
|
|
" JOIN base_doctor_hospital e on e.doctor_code = b.doctor\n" +
|
|
|
" where a.id = b.consult AND a.symptoms <>'' AND a.symptoms IS NOT NULL ";*/
|
|
|
|
|
|
String sql = "SELECT\n" +
|
|
|
"\ta.id as \"id\",\n" +
|
|
|
"\ta.type as \"type\",\n" +
|
|
@ -740,7 +734,7 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
"JOIN topics t ON t.id = b.consult\n" +
|
|
|
"WHERE\n" +
|
|
|
"\ta.id = b.consult\n" +
|
|
|
"AND a.symptoms IS NOT NULL AND b.status=1";
|
|
|
" AND a.symptoms IS NOT NULL AND b.status=1 ";
|
|
|
|
|
|
Map<String,Object> params = new HashedMap();
|
|
|
|
|
@ -787,7 +781,7 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
|
|
|
|
|
|
for(int i=0; i<total; i++) {
|
|
|
LinkedCaseInsensitiveMap info = (LinkedCaseInsensitiveMap) list.get(i);
|
|
|
Map<String,Object> info = list.get(i);
|
|
|
JSONObject jb = new JSONObject();
|
|
|
Boolean errorFlag = false;
|
|
|
try {
|
|
@ -898,22 +892,27 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
" where a.register_no is NOT NULL and a.dept is not null " +
|
|
|
" and a.register_date is not null " ;
|
|
|
|
|
|
Map<String,Object> params = new HashedMap();
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
sql = sql + " and a.create_time >= '" + startDate + "' ";
|
|
|
sql = sql + " and a.create_time >=:startDate ";
|
|
|
params.put("startDate",DateUtil.stringToDate(startDate,"yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
sql = sql + " and a.create_time < '" + endDate + "' ";
|
|
|
sql = sql + " and a.create_time <=:endDate";
|
|
|
params.put("endDate",DateUtil.stringToDate(endDate,"yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(keyId)){
|
|
|
sql = sql + " and a.id = '" + keyId + "' ";
|
|
|
sql = sql + " and a.id =:keyId ";
|
|
|
params.put("keyId",keyId);
|
|
|
}
|
|
|
|
|
|
List list = jdbcTemplate.queryForList(sql);
|
|
|
List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,params);
|
|
|
|
|
|
total = list.size();
|
|
|
|
|
|
for(int i=0; i<list.size(); i++) {
|
|
|
LinkedCaseInsensitiveMap info = (LinkedCaseInsensitiveMap) list.get(i);
|
|
|
Map<String,Object> info = list.get(i);
|
|
|
JSONObject jb = new JSONObject();
|
|
|
Boolean errorFlag = false;
|
|
|
try {
|
|
@ -1037,22 +1036,27 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
" JOIN wlyy_outpatient p on p.id = a.outpatient_id " +
|
|
|
" where c.idcard is not null and a.real_order is not null and p.icd10 is not null ";
|
|
|
|
|
|
Map<String,Object> params = new HashedMap();
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
sql = sql + " and a.create_time >= '" + startDate + "' ";
|
|
|
sql = sql + " and a.create_time >=:startDate ";
|
|
|
params.put("startDate",DateUtil.stringToDate(startDate,"yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
sql = sql + " and a.create_time < '" + endDate + "' ";
|
|
|
sql = sql + " and a.create_time <=:endDate";
|
|
|
params.put("endDate",DateUtil.stringToDate(endDate,"yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(keyId)){
|
|
|
sql = sql + " and a.id = '" + keyId + "' ";
|
|
|
sql = sql + " and a.id =:keyId ";
|
|
|
params.put("keyId",keyId);
|
|
|
}
|
|
|
|
|
|
List list = jdbcTemplate.queryForList(sql);
|
|
|
List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,params);
|
|
|
|
|
|
total = list.size();
|
|
|
|
|
|
for(int i=0; i<total; i++) {
|
|
|
LinkedCaseInsensitiveMap info = (LinkedCaseInsensitiveMap) list.get(i);
|
|
|
Map<String,Object> info = list.get(i);
|
|
|
JSONObject jb = new JSONObject();
|
|
|
Boolean errorFlag = false;
|
|
|
|
|
@ -1161,27 +1165,33 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
" a.supply_code AS \"supply_code\"," +
|
|
|
" a.specification AS \"specification\"," +
|
|
|
" a.pack_retprice AS \"pack_retprice\"," +
|
|
|
" a.quantity AS \"quantity\"," +
|
|
|
" a.pack_retprice AS \"drug_total_price\"" +
|
|
|
" from wlyy_prescription_info a " +
|
|
|
" JOIN wlyy_prescription b " +
|
|
|
" on b.id = a.prescription_id" +
|
|
|
" where a.dosage is not null and b.real_order is not null";
|
|
|
|
|
|
Map<String,Object> params = new HashedMap();
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
sql = sql + " and b.create_time >= '" + startDate + "' ";
|
|
|
sql = sql + " and b.create_time >=:startDate ";
|
|
|
params.put("startDate",DateUtil.stringToDate(startDate,"yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
sql = sql + " and b.create_time < '" + endDate + "' ";
|
|
|
sql = sql + " and b.create_time <=:endDate";
|
|
|
params.put("endDate",DateUtil.stringToDate(endDate,"yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(keyId)){
|
|
|
sql = sql + " and a.id = '" + keyId + "' ";
|
|
|
sql = sql + " and a.id =:keyId ";
|
|
|
params.put("keyId",keyId);
|
|
|
}
|
|
|
List list = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,params);
|
|
|
|
|
|
total = list.size();
|
|
|
|
|
|
for(int i=0; i<total; i++) {
|
|
|
LinkedCaseInsensitiveMap info = (LinkedCaseInsensitiveMap) list.get(i);
|
|
|
Map<String,Object> info = list.get(i);
|
|
|
JSONObject jb = new JSONObject();
|
|
|
Boolean errorFlag = false;
|
|
|
try {
|
|
@ -1201,7 +1211,11 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
jb.put("drug_use", info.get("supply_code") == null? "0": info.get("supply_code"));
|
|
|
jb.put("standard_desc", info.get("specification") == null? "0": info.get("specification"));
|
|
|
jb.put("single_price",info.get("pack_retprice") == null? 0: info.get("pack_retprice"));
|
|
|
jb.put("drug_total_price",info.get("drug_total_price") == null? 0: info.get("drug_total_price"));
|
|
|
BigDecimal pack_retprice = (BigDecimal)info.get("pack_retprice");
|
|
|
Long quantity = Long.parseLong((String)info.get("quantity"));
|
|
|
|
|
|
Double price = pack_retprice.doubleValue()*quantity;
|
|
|
jb.put("drug_total_price",price);
|
|
|
jb.put("comments", "");
|
|
|
jb.put("anti_comments", "");
|
|
|
jb.put("dec_meth_name", "");
|
|
@ -1248,21 +1262,28 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
" p.disease_img AS \"disease_img\" " +
|
|
|
" FROM wlyy_outpatient p " +
|
|
|
" WHERE p.disease_img is not null ";
|
|
|
|
|
|
Map<String,Object> params = new HashedMap();
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
sql = sql + " and p.create_time >= '" + startDate + "' ";
|
|
|
sql = sql + " and p.create_time >=:startDate ";
|
|
|
params.put("startDate",DateUtil.stringToDate(startDate,"yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
sql = sql + " and p.create_time < '" + endDate + "' ";
|
|
|
sql = sql + " and p.create_time <=:endDate";
|
|
|
params.put("endDate",DateUtil.stringToDate(endDate,"yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(keyId)){
|
|
|
sql = sql + " and p.id = '" + keyId + "' ";
|
|
|
sql = sql + " and p.id =:keyId ";
|
|
|
params.put("keyId",keyId);
|
|
|
}
|
|
|
List list = jdbcTemplate.queryForList(sql);
|
|
|
|
|
|
List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,params);
|
|
|
|
|
|
total = list.size();
|
|
|
|
|
|
for(int i=0; i<total; i++) {
|
|
|
LinkedCaseInsensitiveMap info = (LinkedCaseInsensitiveMap) list.get(i);
|
|
|
Map<String,Object> info = list.get(i);
|
|
|
String pathimg[] = ((String)info.get("disease_img")).split(",");
|
|
|
if(pathimg!=null&&pathimg.length>0){
|
|
|
for(String img:pathimg){
|
|
@ -1420,7 +1441,8 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
return resInfo;
|
|
|
}
|
|
|
|
|
|
public String upNsInvokeTotal(String startDate, String endDate,String keyId) throws Exception {
|
|
|
//14.数据上传汇总信息
|
|
|
public String upNsInvokeTotal(String startDate, String endDate) throws Exception {
|
|
|
String url = getUrl();
|
|
|
String api = "micc.upNsInvokeTotal";
|
|
|
String upid = getCode();
|
|
@ -1431,21 +1453,26 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
int error = 0;
|
|
|
int dataError = 0;
|
|
|
|
|
|
//时间参数
|
|
|
Map<String,Object> params = new HashedMap();
|
|
|
|
|
|
//5.统计预约量
|
|
|
String yyghSql = "SELECT " +
|
|
|
" count(1) AS \"yyghtotal\"" +
|
|
|
" FROM wlyy_outpatient p " +
|
|
|
" WHERE 1=1" ;
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
yyghSql = yyghSql + " and reg.create_time >= '" + startDate + "' ";
|
|
|
yyghSql = yyghSql + " and p.create_time >=:startDate ";
|
|
|
params.put("startDate",DateUtil.stringToDate(startDate,"yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
yyghSql = yyghSql + " and reg.create_time < '" + endDate + "' ";
|
|
|
yyghSql = yyghSql + " and p.create_time <=:endDate";
|
|
|
params.put("endDate",DateUtil.stringToDate(endDate,"yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
List<Map<String,Object>> yygh = hibenateUtils.createSQLQuery(yyghSql);
|
|
|
|
|
|
List<Map<String,Object>> yygh = hibenateUtils.createSQLQuery(yyghSql,params);
|
|
|
Long yyghtotal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
if(yygh!=null&&yygh.size()>0){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
yyghtotal = hibenateUtils.objTransformLong(yygh.get(0).get("yyghtotal"));
|
|
|
}
|
|
@ -1461,14 +1488,15 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
" e.score_type = '4'";
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
yypjSql = yypjSql + " and a.create_time >= '" + startDate + "' ";
|
|
|
yypjSql = yypjSql + " and a.create_time >=:startDate ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
yypjSql = yypjSql + " and a.create_time < '" + endDate + "' ";
|
|
|
yypjSql = yypjSql + " and a.create_time <=:endDate";
|
|
|
}
|
|
|
List<Map<String,Object>> yypj = hibenateUtils.createSQLQuery(yypjSql);
|
|
|
|
|
|
List<Map<String,Object>> yypj = hibenateUtils.createSQLQuery(yypjSql,params);
|
|
|
Long yypjtotal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
if(yypj!=null&&yypj.size()>0){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
yypjtotal = hibenateUtils.objTransformLong(yypj.get(0).get("yypjtotal"));
|
|
|
}
|
|
@ -1488,14 +1516,15 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
"AND a.symptoms IS NOT NULL AND b.status=1";
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
wlzxSql = wlzxSql + " and a.czrq >= '" + startDate + "' ";
|
|
|
wlzxSql = wlzxSql + " and a.czrq >=:startDate ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
wlzxSql = wlzxSql + " and a.czrq < '" + endDate + "' ";
|
|
|
wlzxSql = wlzxSql + " and a.czrq <=:endDate";
|
|
|
}
|
|
|
List<Map<String,Object>> wlzx = hibenateUtils.createSQLQuery(wlzxSql);
|
|
|
|
|
|
List<Map<String,Object>> wlzx = hibenateUtils.createSQLQuery(wlzxSql,params);
|
|
|
Long wlzxtotal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
if(wlzx!=null&&wlzx.size()>0){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
wlzxtotal = hibenateUtils.objTransformLong(wlzx.get(0).get("wlzxtotal"));
|
|
|
}
|
|
@ -1508,16 +1537,16 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
" join base_patient c on c.id = a.patient" +
|
|
|
" where a.register_no is NOT NULL and a.dept is not null " +
|
|
|
" and a.register_date is not null " ;
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
wlzlSql = wlzlSql + " and a.create_time >= '" + startDate + "' ";
|
|
|
wlzlSql = wlzlSql + " and a.create_time >=:startDate ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
wlzlSql = wlzlSql + " and a.create_time < '" + endDate + "' ";
|
|
|
wlzlSql = wlzlSql + " and a.create_time <=:endDate";
|
|
|
}
|
|
|
List<Map<String,Object>> wlzl = hibenateUtils.createSQLQuery(wlzlSql);
|
|
|
|
|
|
List<Map<String,Object>> wlzl = hibenateUtils.createSQLQuery(wlzlSql,params);
|
|
|
Long wlzltotal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
if(wlzl!=null&&wlzl.size()>0){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
wlzltotal = hibenateUtils.objTransformLong(wlzl.get(0).get("wlzltotal"));
|
|
|
}
|
|
@ -1532,14 +1561,15 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
" where c.idcard is not null and a.real_order is not null and p.icd10 is not null ";
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
dzcfsql = dzcfsql + " and a.create_time >= '" + startDate + "' ";
|
|
|
dzcfsql = dzcfsql + " and a.create_time >=:startDate ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
dzcfsql = dzcfsql + " and a.create_time < '" + endDate + "' ";
|
|
|
dzcfsql = dzcfsql + " and a.create_time <=:endDate";
|
|
|
}
|
|
|
List<Map<String,Object>> dzcf = hibenateUtils.createSQLQuery(dzcfsql);
|
|
|
|
|
|
List<Map<String,Object>> dzcf = hibenateUtils.createSQLQuery(dzcfsql,params);
|
|
|
Long dzcftotal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
if(dzcf!=null&&dzcf.size()>0){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
dzcftotal = hibenateUtils.objTransformLong(dzcf.get(0).get("dzcftotal"));
|
|
|
}
|
|
@ -1551,15 +1581,16 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
" JOIN wlyy_prescription b " +
|
|
|
" on b.id = a.prescription_id" +
|
|
|
" where a.dosage is not null and b.real_order is not null";
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
infosql = infosql + " and b.create_time >= '" + startDate + "' ";
|
|
|
infosql = infosql + " and b.create_time >=:startDate ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
infosql = infosql + " and b.create_time < '" + endDate + "' ";
|
|
|
infosql = infosql + " and b.create_time <=:endDate";
|
|
|
}
|
|
|
List<Map<String,Object>> info = hibenateUtils.createSQLQuery(infosql);
|
|
|
List<Map<String,Object>> info = hibenateUtils.createSQLQuery(infosql,params);
|
|
|
Long infototal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
if(info!=null&&info.size()>0){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
infototal = hibenateUtils.objTransformLong(info.get(0).get("infototal"));
|
|
|
}
|
|
@ -1569,16 +1600,17 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
" count(1) AS \"gctptotal\"" +
|
|
|
" FROM wlyy_outpatient p " +
|
|
|
" WHERE p.disease_img is not null ";
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
gctpsql = gctpsql + " and p.create_time >= '" + startDate + "' ";
|
|
|
gctpsql = gctpsql + " and p.create_time >=:startDate ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
gctpsql = gctpsql + " and p.create_time < '" + endDate + "' ";
|
|
|
gctpsql = gctpsql + " and p.create_time <=:endDate";
|
|
|
}
|
|
|
|
|
|
List<Map<String,Object>> gctp = hibenateUtils.createSQLQuery(gctpsql);
|
|
|
List<Map<String,Object>> gctp = hibenateUtils.createSQLQuery(gctpsql,params);
|
|
|
Long gctptotal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
if(gctp!=null&&gctp.size()>0){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
gctptotal = hibenateUtils.objTransformLong(gctp.get(0).get("gctptotal"));
|
|
|
}
|
|
@ -1587,9 +1619,10 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
Boolean errorFlag = false;
|
|
|
try {
|
|
|
jb.put("id_ws_invoke_total",upid);
|
|
|
jb.put("organ_code", orgCode);
|
|
|
jb.put("organ_name",orgName);
|
|
|
jb.put("org_code", orgCode);
|
|
|
jb.put("org_name",orgName);
|
|
|
jb.put("wsyy_upload_count", yyghtotal);
|
|
|
jb.put("zxyj_upload_count", 0);
|
|
|
jb.put("yspj_upload_count", yypjtotal);
|
|
|
jb.put("wlzx_upload_count", wlzxtotal);
|
|
|
jb.put("wlzl_upload_count", wlzltotal);
|
|
@ -1597,15 +1630,17 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
jb.put("ypmx_upload_count", infototal);
|
|
|
jb.put("gctp_upload_count", gctptotal);
|
|
|
|
|
|
jb.put("ywsj", DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
jb.put("ywsj", DateUtil.dateToStr(new Date(),"yyyy-MM-dd"));
|
|
|
jb.put("crt_time", DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
|
|
|
|
}catch (Exception e){
|
|
|
errorFlag = true;
|
|
|
saveErrorLog(upid,"13",upid,res,1);
|
|
|
saveErrorLog(upid,"14",upid,res,1);
|
|
|
dataError++;
|
|
|
logger.error(e.toString());
|
|
|
}
|
|
|
|
|
|
logger.info(jb.toString());
|
|
|
if(!errorFlag){
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
jsonArray.add(jb);
|
|
@ -1615,13 +1650,13 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
if("200".equals(resJson.get("msg").toString())){
|
|
|
success++;
|
|
|
}else{
|
|
|
saveErrorLog(upid,"13",upid,res,2);
|
|
|
saveErrorLog(upid,"14",upid,res,2);
|
|
|
error++;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
String resInfo = "此次共上传:" + total + "条数据,其中成功 :" + success + "条,上传失败 : " + error + "条。格式错误:"+dataError+"条。";
|
|
|
saveUpLog(upid,"13",DateUtil.stringToDate(startDate,"yyyy-MM-dd HH:mm:ss"),DateUtil.stringToDate(endDate,"yyyy-MM-dd HH:mm:ss"),success,error,dataError,resInfo);
|
|
|
saveUpLog(upid,"14",DateUtil.stringToDate(startDate,"yyyy-MM-dd HH:mm:ss"),DateUtil.stringToDate(endDate,"yyyy-MM-dd HH:mm:ss"),success,error,dataError,resInfo);
|
|
|
return resInfo;
|
|
|
}
|
|
|
|