|
@ -19,8 +19,10 @@ import com.yihu.jw.utils.ImgUtils;
|
|
|
import com.yihu.jw.utils.JSONUtils;
|
|
|
import com.yihu.jw.utils.StringUtil;
|
|
|
import com.yihu.jw.utils.encode.AESUtils;
|
|
|
import com.yihu.jw.utils.hibernate.HibenateUtils;
|
|
|
import com.yihu.mysql.query.BaseJpaService;
|
|
|
import com.ylzinfo.ehc.common.utils.DateUtils;
|
|
|
import org.apache.commons.collections.map.HashedMap;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -53,11 +55,14 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
|
|
|
@Autowired
|
|
|
private WlyyHospitalSysDictDao dictDao;
|
|
|
@Autowired
|
|
|
private HibenateUtils hibenateUtils;
|
|
|
|
|
|
static String userName = "xmykzx";
|
|
|
static String psw = "7j39c7";
|
|
|
static String appId = "ws022";
|
|
|
static String AesEncodeKey = "834irjf3jd39rh2m";
|
|
|
//http://fjhlw.bsoft.com.cn:18081/micc/wsapi/1.0?
|
|
|
static String urlString = "http://10.120.102.202:18081/micc/wsapi/1.0?wsdl"; // 正式线路径
|
|
|
// static String urlString = "http://fjhlw.bsoft.com.cn:18081/micc/wsapi/1.0?wsdl"; // 测试线路径
|
|
|
static String method = "execute";
|
|
@ -128,7 +133,7 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
jb.put("organ_name",orgName);
|
|
|
jb.put("corporation", "苏庆灿");
|
|
|
jb.put("no_pra_lic", "42660991-335020016A5122");
|
|
|
jb.put("second_organ_name", "");
|
|
|
jb.put("second_organ_name", "厦门眼科中心");
|
|
|
jb.put("charge_person", "");
|
|
|
|
|
|
jb.put("level", "1");
|
|
@ -263,6 +268,7 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
|
|
|
jb.put("third_compeny_prot", "");
|
|
|
|
|
|
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
jsonArray.add(jb);
|
|
|
|
|
@ -273,7 +279,7 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
}
|
|
|
|
|
|
// 3 医师基本信息 micc.upNsDoctorRecord --- 完成
|
|
|
public String upNsDoctorRecord(String startDate, String endDate,String keyId) throws Exception {
|
|
|
public String upNsDoctorRecord(String keyId) throws Exception {
|
|
|
String url = getUrl();
|
|
|
String api = "micc.upNsDoctorRecord";
|
|
|
String upid = getCode();
|
|
@ -296,18 +302,13 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
" a.mobile AS \"mobile\"," +
|
|
|
" b.dept_code AS \"dept_code\"," +
|
|
|
" b.dept_name AS \"dept_name\"," +
|
|
|
" a.job_title_code AS \"job_title_code\"" +
|
|
|
" a.job_title_code AS \"job_title_code\"," +
|
|
|
" a.fzrq AS \"fzrq\"" +
|
|
|
" from base_doctor a " +
|
|
|
" ,base_doctor_hospital b" +
|
|
|
" where a.id = b.doctor_code" +
|
|
|
" and b.dept_code is NOT NULL ";
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
sql = sql + " and a.update_time >= '" + startDate + "' ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
sql = sql + " and a.update_time < '" + endDate + "' ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(keyId)){
|
|
|
sql = sql + " and a.id = '" + keyId + "' ";
|
|
|
}
|
|
@ -322,7 +323,7 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
Boolean errorFlag = false;
|
|
|
JSONObject jb = new JSONObject();
|
|
|
try {
|
|
|
String[] dept = depToSubject("1090000");
|
|
|
String[] dept = depToSubject(jb.getString("dept_code"));
|
|
|
// 中山医院 监管平台 职务字典强转
|
|
|
String[] dutyInfo = classToduty(info.get("job_title_code").toString());
|
|
|
|
|
@ -335,10 +336,10 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
jb.put("birthday", info.get("birthday") == null?"1900-01-01": DateUtil.dateToStrLong((Date)info.get("birthday")));
|
|
|
jb.put("subject", dept[0].toString());
|
|
|
jb.put("subject_name", dept[1].toString());
|
|
|
jb.put("belong_dept","1090000");
|
|
|
jb.put("belong_dept_name", "眼科");
|
|
|
jb.put("belong_dept",jb.getString("dept_code"));
|
|
|
jb.put("belong_dept_name", jb.getString("dept_name"));
|
|
|
jb.put("doo_tel", info.get("mobile")== null ? "":info.get("mobile"));
|
|
|
// jb.put("title_rec_date", info.get("fzrq"));
|
|
|
jb.put("title_rec_date", info.get("fzrq"));
|
|
|
jb.put("prac_type", "1"); // 因为上传的是医师的信息,所以该字段全部默认设置为 1 医师
|
|
|
jb.put("title_code", dutyInfo[0].toString()); // 需要与监管平台的字典进行映射
|
|
|
jb.put("first_compeny_code", orgCode);
|
|
@ -352,7 +353,7 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
jb.put("doc_cert",ImgUtils.getImageStr("D:"+ File.separator+"zstp"+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("txt_introduction", "");
|
|
|
jb.put("txt_introduction", "厦门大学附属厦门眼科中心成立于1997年11月8日,是集医疗、教学、科研、防盲为一体的三级甲等眼科医院、国家临床重点专科、国家药物临床试验机构。设有国家博士后科研工作站、院士专家工作站、全国住院医师规培基地、转化医学研究所等。");
|
|
|
|
|
|
}catch (Exception e){
|
|
|
errorFlag = true;
|
|
@ -376,7 +377,7 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
|
|
|
}
|
|
|
String resInfo = "此次共上传:" + total + "条数据,其中成功 :" + success + "条,上传失败 : " + error + "条。格式错误:"+dataError+"条。";
|
|
|
saveUpLog(upid,"3",DateUtil.stringToDate(startDate,"yyyy-MM-dd HH:mm:ss"),DateUtil.stringToDate(endDate,"yyyy-MM-dd HH:mm:ss"),success,error,dataError,resInfo);
|
|
|
saveUpLog(upid,"3",new Date(),new Date(),success,error,dataError,resInfo);
|
|
|
return resInfo;
|
|
|
}
|
|
|
|
|
@ -428,22 +429,25 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
" p.register_date AS \"date\"" +
|
|
|
" FROM wlyy_outpatient p " +
|
|
|
" WHERE 1=1" ;
|
|
|
|
|
|
Map<String,Object> params = new HashedMap();
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
sql = sql + " and reg.create_time >= '" + startDate + "' ";
|
|
|
sql = sql + " and reg.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 reg.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);
|
|
|
JSONObject jb = new JSONObject();
|
|
|
Boolean errorFlag = false;
|
|
|
try{
|
|
@ -602,27 +606,6 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
|
|
|
String token = upNsUserToken(url);
|
|
|
|
|
|
// String sql = "select " +
|
|
|
// " a.id AS \"id\", " +
|
|
|
// " c.name AS \"name\"," +
|
|
|
// " a.score AS \"score\"," +
|
|
|
// " a.patient_name AS \"patient_name\"," +
|
|
|
// " a.create_time AS \"create_time\"," +
|
|
|
// " content_table.content AS \"content\"," +
|
|
|
// " c.idcard AS \"docIdCard\", " +
|
|
|
// " d.dept_code AS \"dept_code\", " +
|
|
|
// " d.dept_name AS \"dept_name\" "+
|
|
|
// " from base_evaluate_score a ," +
|
|
|
// " ( select " +
|
|
|
// " a.relation_code AS \"rcode\"," +
|
|
|
// " group_concat(a.content order by a.content desc) as content" +
|
|
|
// " from base_evaluate a" +
|
|
|
// " group by a.relation_code ) content_table," +
|
|
|
// " base_doctor c," +
|
|
|
// " base_doctor_hospital d " +
|
|
|
// " where content_table.rcode = a.id " +
|
|
|
// " and c.id = a.doctor" +
|
|
|
// " and c.id = d.doctor_code";
|
|
|
String sql ="SELECT " +
|
|
|
" a.id AS \"id\", " +
|
|
|
" a.doctor_name AS \"name\", " +
|
|
@ -637,23 +620,27 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
"JOIN base_doctor d ON d.id = a.doctor " +
|
|
|
"WHERE " +
|
|
|
" e.score_type = '4'";
|
|
|
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);
|
|
|
Boolean errorFlag = false;
|
|
|
JSONObject jb = new JSONObject();
|
|
|
|
|
@ -755,21 +742,25 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
"\ta.id = b.consult\n" +
|
|
|
"AND a.symptoms IS NOT NULL AND b.status=1";
|
|
|
|
|
|
Map<String,Object> params = new HashedMap();
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
sql = sql + " and a.czrq >= '" + startDate + "' ";
|
|
|
sql = sql + " and a.czrq >=:startDate ";
|
|
|
params.put("startDate",DateUtil.stringToDate(startDate,"yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
sql = sql + " and a.czrq < '" + endDate + "' ";
|
|
|
sql = sql + " and a.czrq <=: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);
|
|
|
String sqlMessage ="SELECT\n" +
|
|
|
"\tM .SENDER_NAME AS \"sender_name\",\n" +
|
|
|
"\tM .\"TIMESTAMP\" AS \"timestamp\",\n" +
|
|
@ -1429,6 +1420,211 @@ public class YkyyInternetService extends BaseJpaService<InternetUpErrorLogDO, In
|
|
|
return resInfo;
|
|
|
}
|
|
|
|
|
|
public String upNsInvokeTotal(String startDate, String endDate,String keyId) throws Exception {
|
|
|
String url = getUrl();
|
|
|
String api = "micc.upNsInvokeTotal";
|
|
|
String upid = getCode();
|
|
|
String token = upNsUserToken(url);
|
|
|
String res = "";
|
|
|
int total = 0;
|
|
|
int success = 0;
|
|
|
int error = 0;
|
|
|
int dataError = 0;
|
|
|
|
|
|
//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 + "' ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
yyghSql = yyghSql + " and reg.create_time < '" + endDate + "' ";
|
|
|
}
|
|
|
List<Map<String,Object>> yygh = hibenateUtils.createSQLQuery(yyghSql);
|
|
|
Long yyghtotal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
yyghtotal = hibenateUtils.objTransformLong(yygh.get(0).get("yyghtotal"));
|
|
|
}
|
|
|
|
|
|
//7.医生评价
|
|
|
String yypjSql ="SELECT " +
|
|
|
" count(1) AS \"yypjtotal\"" +
|
|
|
" FROM " +
|
|
|
" base_evaluate_score a " +
|
|
|
" JOIN base_evaluate e ON a.id = e.relation_code " +
|
|
|
" JOIN base_doctor d ON d.id = a.doctor " +
|
|
|
" WHERE " +
|
|
|
" e.score_type = '4'";
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
yypjSql = yypjSql + " and a.create_time >= '" + startDate + "' ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
yypjSql = yypjSql + " and a.create_time < '" + endDate + "' ";
|
|
|
}
|
|
|
List<Map<String,Object>> yypj = hibenateUtils.createSQLQuery(yypjSql);
|
|
|
Long yypjtotal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
yypjtotal = hibenateUtils.objTransformLong(yypj.get(0).get("yypjtotal"));
|
|
|
}
|
|
|
|
|
|
//8.统计网络咨询
|
|
|
String wlzxSql = "SELECT\n" +
|
|
|
" count(1) AS \"wlzxtotal\"" +
|
|
|
"FROM\n" +
|
|
|
"\twlyy_consult a ,\n" +
|
|
|
"\twlyy_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" +
|
|
|
"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";
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
wlzxSql = wlzxSql + " and a.czrq >= '" + startDate + "' ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
wlzxSql = wlzxSql + " and a.czrq < '" + endDate + "' ";
|
|
|
}
|
|
|
List<Map<String,Object>> wlzx = hibenateUtils.createSQLQuery(wlzxSql);
|
|
|
Long wlzxtotal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
wlzxtotal = hibenateUtils.objTransformLong(wlzx.get(0).get("wlzxtotal"));
|
|
|
}
|
|
|
|
|
|
//9.网络诊疗服务
|
|
|
String wlzlSql = "select " +
|
|
|
" count(1) AS \"wlzltotal\"" +
|
|
|
" from wlyy_outpatient a " +
|
|
|
" join base_doctor b on b.id = a.doctor" +
|
|
|
" 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 + "' ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
wlzlSql = wlzlSql + " and a.create_time < '" + endDate + "' ";
|
|
|
}
|
|
|
List<Map<String,Object>> wlzl = hibenateUtils.createSQLQuery(wlzlSql);
|
|
|
Long wlzltotal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
wlzltotal = hibenateUtils.objTransformLong(wlzl.get(0).get("wlzltotal"));
|
|
|
}
|
|
|
|
|
|
//10.电子处方
|
|
|
String dzcfsql = "select " +
|
|
|
" count(1) AS \"dzcftotal\"" +
|
|
|
" from wlyy_prescription a" +
|
|
|
" JOIN base_patient b on a.patient_code = b.id " +
|
|
|
" JOIN base_doctor c on a.doctor = c.id " +
|
|
|
" 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 ";
|
|
|
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
dzcfsql = dzcfsql + " and a.create_time >= '" + startDate + "' ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
dzcfsql = dzcfsql + " and a.create_time < '" + endDate + "' ";
|
|
|
}
|
|
|
List<Map<String,Object>> dzcf = hibenateUtils.createSQLQuery(dzcfsql);
|
|
|
Long dzcftotal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
dzcftotal = hibenateUtils.objTransformLong(dzcf.get(0).get("dzcftotal"));
|
|
|
}
|
|
|
|
|
|
//11.电子处方药品明细
|
|
|
String infosql = "select " +
|
|
|
" count(1) AS \"infototal\"" +
|
|
|
" 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";
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
|
infosql = infosql + " and b.create_time >= '" + startDate + "' ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
infosql = infosql + " and b.create_time < '" + endDate + "' ";
|
|
|
}
|
|
|
List<Map<String,Object>> info = hibenateUtils.createSQLQuery(infosql);
|
|
|
Long infototal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
infototal = hibenateUtils.objTransformLong(info.get(0).get("infototal"));
|
|
|
}
|
|
|
|
|
|
//12.过程图片
|
|
|
String gctpsql = "SELECT " +
|
|
|
" 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 + "' ";
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endDate)){
|
|
|
gctpsql = gctpsql + " and p.create_time < '" + endDate + "' ";
|
|
|
}
|
|
|
|
|
|
List<Map<String,Object>> gctp = hibenateUtils.createSQLQuery(gctpsql);
|
|
|
Long gctptotal = 0L;
|
|
|
if(yyghtotal!=null){
|
|
|
//mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
|
|
|
gctptotal = hibenateUtils.objTransformLong(gctp.get(0).get("gctptotal"));
|
|
|
}
|
|
|
|
|
|
JSONObject jb = new JSONObject();
|
|
|
Boolean errorFlag = false;
|
|
|
try {
|
|
|
jb.put("id_ws_invoke_total",upid);
|
|
|
jb.put("organ_code", orgCode);
|
|
|
jb.put("organ_name",orgName);
|
|
|
jb.put("wsyy_upload_count", yyghtotal);
|
|
|
jb.put("yspj_upload_count", yypjtotal);
|
|
|
jb.put("wlzx_upload_count", wlzxtotal);
|
|
|
jb.put("wlzl_upload_count", wlzltotal);
|
|
|
jb.put("dzcf_upload_count", dzcftotal);
|
|
|
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"));
|
|
|
|
|
|
}catch (Exception e){
|
|
|
errorFlag = true;
|
|
|
saveErrorLog(upid,"13",upid,res,1);
|
|
|
dataError++;
|
|
|
logger.error(e.toString());
|
|
|
}
|
|
|
|
|
|
if(!errorFlag){
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
jsonArray.add(jb);
|
|
|
res = postToInter(token,api, jsonArray,url);
|
|
|
|
|
|
JSONObject resJson = (JSONObject) JSONObject.parse(res);
|
|
|
if("200".equals(resJson.get("msg").toString())){
|
|
|
success++;
|
|
|
}else{
|
|
|
saveErrorLog(upid,"13",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);
|
|
|
return resInfo;
|
|
|
}
|
|
|
|
|
|
// 基于医生所在科室,转换成国家诊疗科目代码(中山医院专用)
|
|
|
// 当科室信息在列表中不存在的情况,全部配置为预防保健科
|
|
|
public static String[] depToSubject(String dep){
|