|
@ -3,6 +3,7 @@ package com.yihu.jw.internet.service;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.jw.internet.dao.HospitalImgDao;
|
|
|
import com.yihu.jw.internet.dao.IntUpErrorLogDao;
|
|
|
import com.yihu.jw.internet.dao.InternetUpLogDao;
|
|
|
import com.yihu.jw.internet.dao.MedicalSkillOrdersDao;
|
|
@ -12,6 +13,7 @@ import com.yihu.jw.internet.wsapi.Wsapi;
|
|
|
import com.yihu.jw.internet.wsapi.WsapiProxy;
|
|
|
import com.yihu.jw.util.common.IdCardUtil;
|
|
|
import com.yihu.jw.util.date.DateUtil;
|
|
|
import com.yihu.jw.utils.ImageConvertUtil;
|
|
|
import com.yihu.jw.utils.JSONUtils;
|
|
|
import com.yihu.jw.utils.encode.AESUtils;
|
|
|
import com.yihu.mysql.query.BaseJpaService;
|
|
@ -38,6 +40,8 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
|
|
|
@Autowired
|
|
|
private MedicalSkillOrdersDao medicalSkillOrdersDao;
|
|
|
@Autowired
|
|
|
private HospitalImgDao hospitalImgDao;
|
|
|
|
|
|
static String userName = "xmzsyy";
|
|
|
static String psw = "7j7s9e";
|
|
@ -114,11 +118,11 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
jb.put("hospital_address", "厦门市思明区湖滨南路201-209号");
|
|
|
|
|
|
jb.put("hospital_phone", "0592-2292201");
|
|
|
jb.put("hospital_img","");
|
|
|
jb.put("bus_lic", "");
|
|
|
jb.put("corp_idcord_head","");
|
|
|
jb.put("corp_idcord_tail", "");
|
|
|
jb.put("pra_lic", "");
|
|
|
jb.put("hospital_img",hospitalImgDao.findOne("hsimg").getImg());
|
|
|
jb.put("bus_lic", hospitalImgDao.findOne("zyxkz").getImg());
|
|
|
jb.put("corp_idcord_head",hospitalImgDao.findOne("idcardA").getImg());
|
|
|
jb.put("corp_idcord_tail", hospitalImgDao.findOne("idcardB").getImg());
|
|
|
jb.put("pra_lic", hospitalImgDao.findOne("zyxkz").getImg());
|
|
|
|
|
|
jb.put("net_service", "1,3,4,5,7,9,10");
|
|
|
jb.put("net_service_ot", "");
|
|
@ -258,11 +262,14 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
|
|
|
// 因为要上传的是医师信息,所以针对到注册用户且无部门信息的用户数据不上传
|
|
|
String sql = "select a.id,a.name,a.idcard,a.sex,a.birthday, a.cert_no, a.prac_no\n" +
|
|
|
" ,a.mobile,b.dept_code,b.dept_name,a.job_title_code\n" +
|
|
|
" from base_doctor a\n" +
|
|
|
" ,base_doctor_hospital b\n" +
|
|
|
" where a.id = b.doctor_code\n" +
|
|
|
" and b.dept_code != '' \n" +
|
|
|
" ,a.mobile,b.dept_code,b.dept_name,a.job_title_code,i.fzrq,i.zyz,i.zgz,i.cert_no,i.prac_no \n" +
|
|
|
" from base_doctor a " +
|
|
|
" ,base_doctor_hospital b" +
|
|
|
" ,base_doctor_img i " +
|
|
|
" where a.id = b.doctor_code\n" +
|
|
|
" and i.doctor = a.id " +
|
|
|
" and a.name IN('陈兰')" +
|
|
|
" and b.dept_code != '' " +
|
|
|
" and a.job_title_code not in('4107','054','1313','1413','1415','018','1412','4105','1212','1312','4103','1315','1217','1215','3301','005',\n" +
|
|
|
"'1213','3501','017','020','058','002','1417','1214','1317','4101','4106') \n" ;
|
|
|
if(StringUtils.isNotBlank(startDate)){
|
|
@ -301,7 +308,7 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
jb.put("belong_dept",info.get("dept_code") == null ? dept[0].toString():info.get("dept_code"));
|
|
|
jb.put("belong_dept_name", info.get("dept_name") == null ? dept[1].toString():info.get("dept_name"));
|
|
|
jb.put("doo_tel", info.get("mobile")== null ? "":info.get("mobile"));
|
|
|
jb.put("title_rec_date", "1900-01-01");
|
|
|
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);
|
|
@ -311,15 +318,15 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
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", "");
|
|
|
jb.put("cert_doc_prac", "");
|
|
|
jb.put("doc_cert",ImageConvertUtil.getImageBinary("C://Users//Administrator//Desktop//医生信息//测试小图片.jpg"));
|
|
|
jb.put("cert_doc_prac", ImageConvertUtil.getImageBinary("C://Users//Administrator//Desktop//医生信息//测试小图片.jpg"));
|
|
|
jb.put("txt_introduction", "");
|
|
|
|
|
|
}catch (Exception e){
|
|
|
errorFlag = true;
|
|
|
saveErrorLog(upid,"3",info.get("id").toString(),"数据格式错误",1);
|
|
|
error++;
|
|
|
logger.error(e.toString());
|
|
|
// logger.error(e.toString());
|
|
|
}
|
|
|
if(!errorFlag){
|
|
|
//上传监管平台
|
|
@ -1480,5 +1487,4 @@ public class InternetService extends BaseJpaService<InternetUpErrorLogDO, IntUpE
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
}
|