| 
					
				 | 
			
			
				@ -3,21 +3,42 @@ package com.yihu.jw.hospital.prescription.service.entrance; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.alibaba.fastjson.JSON; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.alibaba.fastjson.JSONArray; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.alibaba.fastjson.JSONObject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.dict.dao.BaseDictJobTitleDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.dict.dao.DictDoctorDutyDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.dict.dao.DictHospitalDeptDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.doctor.dao.BaseDoctorDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.doctor.dao.BaseDoctorRoleDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.dict.DictDoctorDutyDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.dict.DictHospitalDeptDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.doctor.BaseDoctorDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.base.doctor.BaseDoctorRoleDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.hospital.dict.WlyyChargeDictDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.dict.WlyyChargeDictDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.rm.base.BaseRequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.common.IdCardUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.utils.StringUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.utils.WebserviceUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.utils.security.MD5; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import net.sf.json.xml.XMLSerializer; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.commons.collections.map.HashedMap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.checkerframework.checker.units.qual.A; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.slf4j.Logger; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.slf4j.LoggerFactory; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import javax.transaction.Transactional; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.Date; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.Map; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.Random; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * 心脏中心内网his对接服务 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -34,6 +55,18 @@ public class XzzxEntranceService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private DictHospitalDeptDao dictHospitalDeptDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private DictDoctorDutyDao dictDoctorDutyDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private WlyyChargeDictDao chargeDictDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private BaseDoctorDao doctorDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private BaseDoctorHospitalDao doctorHospitalDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private BaseDoctorRoleDao doctorRoleDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private DoctorMappingDao doctorMappingDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String getXzzxWebServiceInfo(String api, Map<String,String> params)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -56,7 +89,7 @@ public class XzzxEntranceService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 获取部门信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String getDeptInfo()throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String getDeptInfo(String code)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String api = "GetDeptInfo"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String key ="bvvsf3JA0mUXMU+mVnMaOQ=="; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -66,8 +99,12 @@ public class XzzxEntranceService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <callOperator></callOperator> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <certificate>"+key+"</certificate> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "</root>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String condition =""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNoneBlank(code)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            condition = "<code>"+code+"</code>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "<root></root>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "<root>"+condition+"</root>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String,String> params = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        params.put("msgHeader",msgHeader); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -80,27 +117,37 @@ public class XzzxEntranceService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String json = xmlSerializer.read(xml).toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("getDeptInfo json:"+json); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray depts = JSON.parseArray(json); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray depts = JSONArray.parseArray(json).getJSONArray(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(depts!=null&&depts.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for(int i=0;i<depts.size();i++){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                JSONObject dept = (JSONObject) depts.get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                JSONObject dept = depts.getJSONObject(i); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String deptCode = dept.getString("code"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                List<DictHospitalDeptDO> list = dictHospitalDeptDao.findByOrgCodeAndCode(deptCode,"350211A5010"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String consultDeptFlag=null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (!dept.getString("consultDeptFlag").equalsIgnoreCase("[]")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    consultDeptFlag = dept.getString("consultDeptFlag"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if(list!=null&&list.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    DictHospitalDeptDO deptDO = list.get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    deptDO.setCode(deptCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    deptDO.setName(dept.getString("name")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    deptDO.setConsultDeptFlag(dept.getString("consultDeptFlag")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (StringUtils.isNoneBlank(consultDeptFlag)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        deptDO.setConsultDeptFlag(consultDeptFlag); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    deptDO.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    dictHospitalDeptDao.save(deptDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    DictHospitalDeptDO deptDO = new DictHospitalDeptDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    deptDO.setCode(deptCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    deptDO.setName(dept.getString("name")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    deptDO.setConsultDeptFlag(dept.getString("consultDeptFlag")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (StringUtils.isNoneBlank(consultDeptFlag)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        deptDO.setConsultDeptFlag(consultDeptFlag); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    deptDO.setOrgCode("350211A5010"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    deptDO.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    dictHospitalDeptDao.save(deptDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -109,4 +156,312 @@ public class XzzxEntranceService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return json; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 同步医生信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String getDoctorInfo(String idcard)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String api = "GetDoctorInfo"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String key ="bvvsf3JA0mUXMU+mVnMaOQ=="; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "<root> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <serverName>"+api+"</serverName>  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <format>xml</format>" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <callOperator></callOperator> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <certificate>"+key+"</certificate> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "</root>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String condition =""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNoneBlank(idcard)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            condition = "<Idcard>"+idcard+"</Idcard>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "<root>"+condition+"</root>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String,String> params = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        params.put("msgHeader",msgHeader); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        params.put("msgBody",msgBody); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("getDoctorInfo params:"+params.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String xml = getXzzxWebServiceInfo("CallInterface",params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        XMLSerializer xmlSerializer = new XMLSerializer(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String json = xmlSerializer.read(xml).toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("getDoctorInfo json:"+json); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray doctors = JSONArray.parseArray(json); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        findWlyyDoctor(doctors); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return json; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String findWlyyDoctor(JSONArray doctors)throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("doctors size:"+doctors.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(doctors!=null&&doctors.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Integer count = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for(int i=0;i<doctors.size();i++){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    JSONObject doctorJson = doctors.getJSONObject(i); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String idcard = doctorJson.getString("idcard"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if(StringUtils.isNotBlank(idcard)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        List<BaseDoctorDO> ds = doctorDao.findByIdcard(idcard); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        if (ds != null && ds.size() > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            //已有账号更新 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            BaseDoctorDO doctor = ds.get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setName(doctorJson.getString("name")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setIdcard(doctorJson.getString("idcard")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setMobile(doctorJson.getString("mobile")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setSex(Integer.parseInt(IdCardUtil.getSexForIdcard_new(idcard))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setBirthday(IdCardUtil.getBirthdayForIdcard(idcard)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setProvinceCode("350000"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setProvinceName("福建省"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setTownCode("350203"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setTownName("思明区"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setCityCode("350200"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setCityName("厦门市"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setExpertise(doctorJson.getString("expertise")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setIntroduce(doctorJson.getString("introduce")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setPhoto(doctorJson.getString("photo")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setIscertified(doctorJson.getString("iscertified")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setSpell(doctorJson.getString("spell")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                String salt = randomString(5); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                String pw = idcard.substring(idcard.length() - 6); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                doctor.setPassword(MD5.md5Hex(pw + "{" + salt + "}")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//                                doctor.setSalt(salt); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setJobTitleCode(doctorJson.getString("jobTitleCode")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setJobTitleName(doctorJson.getString("jobTitleName")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setChargeType(doctorJson.getString("chargeType")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctorDao.save(doctor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            //更新机构科室信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            String dept =doctorJson.getString("dept"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            if(StringUtils.isNotBlank(dept)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                List<BaseDoctorHospitalDO> hospitalDOs = doctorHospitalDao.findByDeptCodeAndDoctorCode(dept,doctor.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                if(hospitalDOs!=null&&hospitalDOs.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    BaseDoctorHospitalDO hospitalDO = hospitalDOs.get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    hospitalDO.setOrgCode("350211A5010"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    hospitalDO.setOrgName("厦门大学附属心血管病医院"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    hospitalDO.setDeptCode(doctorJson.getString("dept")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    hospitalDO.setDeptName(doctorJson.getString("deptName")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    doctorHospitalDao.save(hospitalDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            List<DoctorMappingDO> doctorMappingDOS = doctorMappingDao.findByOrgCodeAndMappingCode("350211A5010",doctorJson.getString("code")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            if (doctorMappingDOS!=null&&doctorMappingDOS.size()!=0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                DoctorMappingDO doctorMappingDO = doctorMappingDOS.get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                doctorMappingDO.setIdcard(idcard); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                doctorMappingDO.setDoctor(doctor.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                doctorMappingDO.setOrgCode("350211A5010"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                doctorMappingDO.setOrgName("厦门大学附属心血管病医院"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                doctorMappingDO.setMappingCode(doctorJson.getString("code")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                doctorMappingDO.setMappingName(doctorJson.getString("name")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                doctorMappingDO.setDoctorName(doctor.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                doctorMappingDO.setMappingDeptName(doctorJson.getString("deptName")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                doctorMappingDO.setMappingDept(doctorJson.getString("dept")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                doctorMappingDO.setMappingJob(doctorJson.getString("jobTitleCode")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                doctorMappingDO.setMappingJobName(doctorJson.getString("jobTitleName")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                doctorMappingDO.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                doctorMappingDao.save(doctorMappingDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            BaseDoctorDO doctor = new BaseDoctorDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setName(doctorJson.getString("name")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setIdcard(doctorJson.getString("idcard")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setMobile(doctorJson.getString("mobile")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setSex(Integer.parseInt(IdCardUtil.getSexForIdcard_new(idcard))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setBirthday(IdCardUtil.getBirthdayForIdcard(idcard)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setProvinceCode("350000"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setProvinceName("福建省"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setTownCode("350203"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setTownName("思明区"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setCityCode("350200"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setCityName("厦门市"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setExpertise(doctorJson.getString("expertise")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setIntroduce(doctorJson.getString("introduce")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setPhoto(doctorJson.getString("photo")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setIscertified(doctorJson.getString("iscertified")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setSpell(doctorJson.getString("spell")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setOutpatientType("zj"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            //认证信息设置 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            String salt = randomString(5); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            String pw = idcard.substring(idcard.length() - 6); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setPassword(MD5.md5Hex(pw + "{" + salt + "}")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setSalt(salt); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setDel("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setEnabled(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setLocked(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setJobTitleCode(doctorJson.getString("jobTitleCode")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctor.setJobTitleName(doctorJson.getString("jobTitleName")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            BaseDoctorDO temp = doctorDao.save(doctor); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            //机构信息部门信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            BaseDoctorHospitalDO hospitalDO = new BaseDoctorHospitalDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            hospitalDO.setDoctorCode(temp.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            hospitalDO.setOrgCode("350211A5010"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            hospitalDO.setOrgName("厦门大学附属心血管病医院"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            hospitalDO.setDeptCode(doctorJson.getString("dept")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            hospitalDO.setDeptName(doctorJson.getString("deptName")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            hospitalDO.setDel("1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctorHospitalDao.save(hospitalDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            BaseDoctorRoleDO role = new BaseDoctorRoleDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            role.setDoctorCode(temp.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            role.setRoleCode("specialist"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctorRoleDao.save(role); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            DoctorMappingDO mappingDO = new DoctorMappingDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            mappingDO.setIdcard(idcard); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            mappingDO.setDoctor(temp.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            mappingDO.setOrgCode("350211A5010"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            mappingDO.setOrgName("厦门大学附属心血管病医院"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            mappingDO.setMappingCode(doctorJson.getString("code")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            mappingDO.setMappingName(doctorJson.getString("name")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            mappingDO.setDoctorName(temp.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            mappingDO.setMappingDeptName(doctorJson.getString("deptName")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            mappingDO.setMappingDept(doctorJson.getString("dept")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            mappingDO.setMappingJob(doctorJson.getString("jobTitleCode")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            mappingDO.setMappingJobName(doctorJson.getString("jobTitleName")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            mappingDO.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            doctorMappingDao.save(mappingDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            count++; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }catch (Exception e){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    logger.info("data error"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            logger.info("add count:"+count); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return "ok"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String randomString(int length) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        StringBuffer buffer = new StringBuffer(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Random random = new Random(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for(int i = 0; i < length; ++i) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int pos = random.nextInt(str.length()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            buffer.append(str.charAt(pos)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return buffer.toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 获取职称字典 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String getJobTitle()throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String api = "GetTitleInfo"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String key ="bvvsf3JA0mUXMU+mVnMaOQ=="; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "<root> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <serverName>"+api+"</serverName>  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <format>xml</format>" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <callOperator></callOperator> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <certificate>"+key+"</certificate> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "</root>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "<root></root>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String,String> params = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        params.put("msgHeader",msgHeader); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        params.put("msgBody",msgBody); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("getJobTitleInfo params:"+params.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String xml = getXzzxWebServiceInfo("CallInterface",params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        XMLSerializer xmlSerializer = new XMLSerializer(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String json = xmlSerializer.read(xml).toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("getJobTitleInfo json:"+json); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray list = JSONArray.parseArray(json).getJSONArray(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(list!=null&&list.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for(int i=0;i<list.size();i++){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                JSONObject object = list.getJSONObject(i); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("getJobTitleInfo object:"+object.toJSONString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String code = object.getString("code"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String name = object.getString("name"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                DictDoctorDutyDO dictDoctorDutyDO = dictDoctorDutyDao.findByCode(code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (dictDoctorDutyDO!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    dictDoctorDutyDO.setName(name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    dictDoctorDutyDao.save(dictDoctorDutyDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    DictDoctorDutyDO dictDoctorDutyDO1 = new DictDoctorDutyDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    dictDoctorDutyDO1.setCode(code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    dictDoctorDutyDO1.setName(name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    dictDoctorDutyDO1.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    dictDoctorDutyDao.save(dictDoctorDutyDO1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return json; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 获取号别字典 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String getChargeDict()throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String api = "GetScheduleType"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String key ="bvvsf3JA0mUXMU+mVnMaOQ=="; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "<root> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <serverName>"+api+"</serverName>  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <format>xml</format>" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <callOperator></callOperator> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "   <certificate>"+key+"</certificate> " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "</root>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "<root></root>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String,String> params = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        params.put("msgHeader",msgHeader); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        params.put("msgBody",msgBody); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("getChargeDictInfo params:"+params.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String xml = getXzzxWebServiceInfo("CallInterface",params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        XMLSerializer xmlSerializer = new XMLSerializer(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String json = xmlSerializer.read(xml).toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("getChargeDictInfo json:"+json); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray list = JSONArray.parseArray(json).getJSONArray(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(list!=null&&list.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for(int i=0;i<list.size();i++){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                JSONObject object = list.getJSONObject(i); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("getJobTitleInfo object:"+object.toJSONString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String code = object.getString("chargeType"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String name = object.getString("chargeTypeName"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String reqFee = object.getString("reqFee"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Double reqFees = 0.0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (StringUtils.isNoneBlank(reqFee)&&!reqFee.equalsIgnoreCase("[]")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    reqFees= Double.parseDouble(reqFee); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                WlyyChargeDictDO chargeDictDO = chargeDictDao.findByChargeType(code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (chargeDictDO!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    chargeDictDO.setChargeType(code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    chargeDictDO.setChargeName(name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    chargeDictDO.setReqFee(reqFees); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    chargeDictDao.save(chargeDictDO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                }else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    WlyyChargeDictDO chargeDictDO1 = new WlyyChargeDictDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    chargeDictDO1.setChargeType(code); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    chargeDictDO1.setChargeName(name); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    chargeDictDO1.setReqFee(reqFees); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    chargeDictDO1.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    chargeDictDao.save(chargeDictDO1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return json; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |