|
@ -31,6 +31,7 @@ import com.yihu.jw.utils.JSONUtils;
|
|
import com.yihu.jw.utils.encode.AESUtils;
|
|
import com.yihu.jw.utils.encode.AESUtils;
|
|
import com.yihu.jw.utils.hibernate.HibenateUtils;
|
|
import com.yihu.jw.utils.hibernate.HibenateUtils;
|
|
import com.yihu.mysql.query.BaseJpaService;
|
|
import com.yihu.mysql.query.BaseJpaService;
|
|
|
|
import com.ylzinfo.ehc.common.utils.DateUtils;
|
|
import org.apache.commons.collections.map.HashedMap;
|
|
import org.apache.commons.collections.map.HashedMap;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
@ -135,15 +136,7 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
getBaseSurperviseDict();
|
|
getBaseSurperviseDict();
|
|
WsapiProxy proxy = new WsapiProxy();
|
|
WsapiProxy proxy = new WsapiProxy();
|
|
proxy.setEndpoint(url);
|
|
proxy.setEndpoint(url);
|
|
JSONObject jsonObject= new JSONObject();
|
|
|
|
if (params!=null&¶ms.size()>0){
|
|
|
|
jsonObject= params.getJSONObject(0);
|
|
|
|
jsonObject.put("docimg","");
|
|
|
|
jsonObject.put("doc_cert","");
|
|
|
|
jsonObject.put("cert_doc_prac","");
|
|
|
|
|
|
|
|
}
|
|
|
|
logger.info("入参:"+jsonObject.toString());
|
|
|
|
|
|
logger.info("入参:"+params.toString());
|
|
Wsapi wsapi = proxy.getWsapi();
|
|
Wsapi wsapi = proxy.getWsapi();
|
|
|
|
|
|
// logger.info("postToInter:"+JSONUtils.toString(new String[] {token, params.toString()}));
|
|
// logger.info("postToInter:"+JSONUtils.toString(new String[] {token, params.toString()}));
|
|
@ -465,9 +458,10 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
" p.patient_name AS \"paName\"," +
|
|
" p.patient_name AS \"paName\"," +
|
|
" p.doctor_name AS \"docName\"," +
|
|
" p.doctor_name AS \"docName\"," +
|
|
" p.idcard AS \"idcard\"," +
|
|
" p.idcard AS \"idcard\"," +
|
|
" p.register_date AS \"date\"" +
|
|
|
|
|
|
" p.register_date AS \"date\"," +
|
|
|
|
" p.mobile as \"mobile\""+
|
|
" FROM wlyy_outpatient p " +
|
|
" FROM wlyy_outpatient p " +
|
|
" WHERE 1=1" ;
|
|
|
|
|
|
" WHERE 1=1 and p.register_no is not null " ;
|
|
Map<String,Object> params = new HashedMap();
|
|
Map<String,Object> params = new HashedMap();
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
sql = sql + " and p.create_time >=:startDate ";
|
|
sql = sql + " and p.create_time >=:startDate ";
|
|
@ -507,7 +501,7 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
jb.put("pt_age", IdCardUtil.getAgeForIdcard(info.get("idcard").toString()));
|
|
jb.put("pt_age", IdCardUtil.getAgeForIdcard(info.get("idcard").toString()));
|
|
jb.put("card_type", "1");
|
|
jb.put("card_type", "1");
|
|
jb.put("id_no", info.get("idcard") == null?"0":info.get("idcard"));
|
|
jb.put("id_no", info.get("idcard") == null?"0":info.get("idcard"));
|
|
jb.put("pt_tel", "00000000000");
|
|
|
|
|
|
jb.put("pt_tel", info.get("mobile") == null?"00000000000":info.get("mobile"));
|
|
jb.put("crt_date",DateUtil.dateToStrLong(DateUtil.getNow()));
|
|
jb.put("crt_date",DateUtil.dateToStrLong(DateUtil.getNow()));
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
errorFlag = true;
|
|
errorFlag = true;
|
|
@ -558,7 +552,8 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
" i.create_time AS \"create_time\", " +
|
|
" i.create_time AS \"create_time\", " +
|
|
" p.name AS \"name\", " +
|
|
" p.name AS \"name\", " +
|
|
" p.idcard AS \"idcard\", " +
|
|
" p.idcard AS \"idcard\", " +
|
|
" d.idcard AS \"doctorIdCard\"" +
|
|
|
|
|
|
" d.idcard AS \"doctorIdCard\"," +
|
|
|
|
" o.mobile AS \"mobile\"" +
|
|
"FROM " +
|
|
"FROM " +
|
|
" wlyy_inspection i " +
|
|
" wlyy_inspection i " +
|
|
" JOIN wlyy_outpatient o ON o.id = i.outpatient_id " +
|
|
" JOIN wlyy_outpatient o ON o.id = i.outpatient_id " +
|
|
@ -601,7 +596,7 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
jb.put("ge_code", sex=="3"?"9":sex);
|
|
jb.put("ge_code", sex=="3"?"9":sex);
|
|
jb.put("card_type", "1");
|
|
jb.put("card_type", "1");
|
|
jb.put("id_no", ins.get("idcard").toString());
|
|
jb.put("id_no", ins.get("idcard").toString());
|
|
jb.put("pt_tel", "00000000000");
|
|
|
|
|
|
jb.put("pt_tel", ins.get("mobile") == null?"00000000000":ins.get("mobile"));
|
|
jb.put("crt_date",DateUtil.dateToStrLong(DateUtil.getNow()));
|
|
jb.put("crt_date",DateUtil.dateToStrLong(DateUtil.getNow()));
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
errorFlag = true;
|
|
errorFlag = true;
|
|
@ -1058,7 +1053,7 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
String sex = IdCardUtil.getSexForIdcard_new(info.get("paId").toString());
|
|
String sex = IdCardUtil.getSexForIdcard_new(info.get("paId").toString());
|
|
jb.put("ge_code", sex=="3"?"9":sex);
|
|
jb.put("ge_code", sex=="3"?"9":sex);
|
|
|
|
|
|
jb.put("pt_tel", info.get("moble")==null?"00000000000":info.get("moble").toString());
|
|
|
|
|
|
jb.put("pt_tel", info.get("mobile")==null?"00000000000":info.get("mobile").toString());
|
|
jb.put("card_type", "1");
|
|
jb.put("card_type", "1");
|
|
jb.put("id_no", info.get("paId"));
|
|
jb.put("id_no", info.get("paId"));
|
|
jb.put("pt_district", "");
|
|
jb.put("pt_district", "");
|
|
@ -1141,6 +1136,8 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
" a.patient_name AS \"patient_name\"," +
|
|
" a.patient_name AS \"patient_name\"," +
|
|
" b.idcard AS \"idcard\"," +
|
|
" b.idcard AS \"idcard\"," +
|
|
" b.city_code AS \"city_code\"," +
|
|
" b.city_code AS \"city_code\"," +
|
|
|
|
" b.sex AS \"sex\"," +
|
|
|
|
" c.mobile AS \"mobile\"," +
|
|
" a.hospital AS \"hospital\"," +
|
|
" a.hospital AS \"hospital\"," +
|
|
" a.hospital_name AS \"hospital_name\"," +
|
|
" a.hospital_name AS \"hospital_name\"," +
|
|
" p.icd10 AS \"icd10\"," +
|
|
" p.icd10 AS \"icd10\"," +
|
|
@ -1188,7 +1185,7 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
// 获取监管平台唯一标识
|
|
// 获取监管平台唯一标识
|
|
String visitDocCode = achNsDoctorRecord(info.get("docIdcard").toString());
|
|
String visitDocCode = achNsDoctorRecord(info.get("docIdcard").toString());
|
|
|
|
|
|
String trialDocCode = achNsDoctorRecord("350104197904305425");
|
|
|
|
|
|
String trialDocCode = achNsDoctorRecord("362531198407290348");
|
|
|
|
|
|
jb.put("id_prescription", orgCode +"_"+ (String)info.get("id"));
|
|
jb.put("id_prescription", orgCode +"_"+ (String)info.get("id"));
|
|
jb.put("pres_no",info.get("real_order")== null?"0":info.get("real_order"));
|
|
jb.put("pres_no",info.get("real_order")== null?"0":info.get("real_order"));
|
|
@ -1224,8 +1221,8 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
jb.put("pres_doc_name", info.get("doctor_name")== null?"0":info.get("doctor_name"));
|
|
jb.put("pres_doc_name", info.get("doctor_name")== null?"0":info.get("doctor_name"));
|
|
jb.put("pres_doc_id_no", info.get("docIdcard")== null?"0":info.get("docIdcard"));
|
|
jb.put("pres_doc_id_no", info.get("docIdcard")== null?"0":info.get("docIdcard"));
|
|
jb.put("trial_doc_code", trialDocCode);
|
|
jb.put("trial_doc_code", trialDocCode);
|
|
jb.put("trial_doc_name", "陈燕莺");
|
|
|
|
jb.put("trial_doc_id_no","350104197904305425");
|
|
|
|
|
|
jb.put("trial_doc_name", "乐女金");
|
|
|
|
jb.put("trial_doc_id_no","362531198407290348");
|
|
jb.put("diag_code", info.get("icd10"));
|
|
jb.put("diag_code", info.get("icd10"));
|
|
jb.put("diag_name", info.get("icd10_name"));
|
|
jb.put("diag_name", info.get("icd10_name"));
|
|
jb.put("diseases_type", "0");
|
|
jb.put("diseases_type", "0");
|
|
@ -1535,6 +1532,7 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
int error = 0;
|
|
int error = 0;
|
|
int dataError = 0;
|
|
int dataError = 0;
|
|
|
|
|
|
|
|
logger.info("1231321321321");
|
|
//时间参数
|
|
//时间参数
|
|
Map<String,Object> params = new HashedMap();
|
|
Map<String,Object> params = new HashedMap();
|
|
|
|
|
|
@ -1542,7 +1540,7 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
String yyghSql = "SELECT " +
|
|
String yyghSql = "SELECT " +
|
|
" count(1) AS \"yyghtotal\"" +
|
|
" count(1) AS \"yyghtotal\"" +
|
|
" FROM wlyy_outpatient p " +
|
|
" FROM wlyy_outpatient p " +
|
|
" WHERE 1=1" ;
|
|
|
|
|
|
" WHERE 1=1 and p.register_no is not null " ;
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
yyghSql = yyghSql + " and p.create_time >=:startDate ";
|
|
yyghSql = yyghSql + " and p.create_time >=:startDate ";
|
|
params.put("startDate",DateUtil.stringToDate(startDate+" 00:00:00","yyyy-MM-dd HH:mm:ss"));
|
|
params.put("startDate",DateUtil.stringToDate(startDate+" 00:00:00","yyyy-MM-dd HH:mm:ss"));
|
|
@ -1700,7 +1698,7 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
gctptotal = hibenateUtils.objTransformLong(gctp.get(0).get("gctptotal"));
|
|
gctptotal = hibenateUtils.objTransformLong(gctp.get(0).get("gctptotal"));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
logger.info("1231321321321+++++");
|
|
JSONObject jb = new JSONObject();
|
|
JSONObject jb = new JSONObject();
|
|
Boolean errorFlag = false;
|
|
Boolean errorFlag = false;
|
|
try {
|
|
try {
|
|
@ -1715,7 +1713,8 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
jb.put("dzcf_upload_count", dzcftotal);
|
|
jb.put("dzcf_upload_count", dzcftotal);
|
|
jb.put("ypmx_upload_count", infototal);
|
|
jb.put("ypmx_upload_count", infototal);
|
|
jb.put("gctp_upload_count", gctptotal);
|
|
jb.put("gctp_upload_count", gctptotal);
|
|
jb.put("ywsj", startDate);
|
|
|
|
|
|
logger.info("ywsj"+DateUtil.dateToStrShort(DateUtil.strToDateShort(startDate)));
|
|
|
|
jb.put("ywsj", DateUtil.dateToStrShort(DateUtil.strToDateShort(startDate)));
|
|
jb.put("crt_time", DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
|
|
jb.put("crt_time", DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
|
|
|
|
|
|
|
@ -1725,6 +1724,7 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
|
|
dataError++;
|
|
dataError++;
|
|
logger.error(e.toString());
|
|
logger.error(e.toString());
|
|
}
|
|
}
|
|
|
|
logger.info("1231321321321====");
|
|
logger.info(jb.toString());
|
|
logger.info(jb.toString());
|
|
if(!errorFlag){
|
|
if(!errorFlag){
|
|
JSONArray jsonArray = new JSONArray();
|
|
JSONArray jsonArray = new JSONArray();
|