|  | @ -291,8 +291,8 @@ public class WlyyBusinessService {
 | 
												
													
														
															|  |             params.put("idcard",idcard);
 |  |             params.put("idcard",idcard);
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             String patientCardNo = null;
 |  |             String patientCardNo = null;
 | 
												
													
														
															|  |             patientMedicareCardDao.deleteByPatientId(patientId);
 |  | 
 | 
												
													
														
															|  |             if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
 |  |             if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
 | 
												
													
														
															|  | 
 |  |                 patientMedicareCardDao.deleteByPatientId(patientId);
 | 
												
													
														
															|  |                 net.sf.json.JSONArray array =prescriptionService.findPatientCard(patientId);
 |  |                 net.sf.json.JSONArray array =prescriptionService.findPatientCard(patientId);
 | 
												
													
														
															|  |                 for (int i=0;i<array.size();i++){
 |  |                 for (int i=0;i<array.size();i++){
 | 
												
													
														
															|  |                     net.sf.json.JSONObject object = array.getJSONObject(i);
 |  |                     net.sf.json.JSONObject object = array.getJSONObject(i);
 | 
												
											
												
													
														
															|  | @ -316,6 +316,7 @@ public class WlyyBusinessService {
 | 
												
													
														
															|  |                     patientMedicareCardDao.save(patientMedicareCardDO);
 |  |                     patientMedicareCardDao.save(patientMedicareCardDO);
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  |             }else if (wxId.equalsIgnoreCase("xm_xzzx_wx")){
 |  |             }else if (wxId.equalsIgnoreCase("xm_xzzx_wx")){
 | 
												
													
														
															|  | 
 |  |                 patientMedicareCardDao.deleteByPatientId(patientId);
 | 
												
													
														
															|  |                 JSONArray array = xzzxEntranceService.selectPateintCard(patientId);
 |  |                 JSONArray array = xzzxEntranceService.selectPateintCard(patientId);
 | 
												
													
														
															|  |                 for (int i=0;i<array.size();i++){
 |  |                 for (int i=0;i<array.size();i++){
 | 
												
													
														
															|  |                     JSONObject jsonObject = array.getJSONObject(i);
 |  |                     JSONObject jsonObject = array.getJSONObject(i);
 | 
												
											
												
													
														
															|  | @ -374,18 +375,21 @@ public class WlyyBusinessService {
 | 
												
													
														
															|  |             patientSccParams.put("sex",basePatientDO.getSex().toString());
 |  |             patientSccParams.put("sex",basePatientDO.getSex().toString());
 | 
												
													
														
															|  |             patientSccParams.put("phone",basePatientDO.getMobile());
 |  |             patientSccParams.put("phone",basePatientDO.getMobile());
 | 
												
													
														
															|  |             patientSccParams.put("birthday",DateUtil.dateToStrShort(basePatientDO.getBirthday()));
 |  |             patientSccParams.put("birthday",DateUtil.dateToStrShort(basePatientDO.getBirthday()));
 | 
												
													
														
															|  |             //JSONObject object = wlyyHttpService.sendWlyyMes("wlyyFindAccountBySsc", null, patientSccParams);
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyGetPatientAccetokenByIdcard",null,params);
 |  | 
 | 
												
													
														
															|  |             if(rs!=null){
 |  | 
 | 
												
													
														
															|  |                 Integer status = rs.getInteger("status");
 |  | 
 | 
												
													
														
															|  |                 if(200 == status){
 |  | 
 | 
												
													
														
															|  |                     JSONObject data = rs.getJSONObject("data");
 |  | 
 | 
												
													
														
															|  |                     result = data.getString("patientCode");
 |  | 
 | 
												
													
														
															|  |                 }else{
 |  | 
 | 
												
													
														
															|  |                     logger.info(rs.toJSONString());
 |  | 
 | 
												
													
														
															|  |                     throw new Exception("请求i健康接口失败");
 |  | 
 | 
												
													
														
															|  | 
 |  |             JSONObject object = wlyyHttpService.sendWlyyMes("wlyyFindAccountBySsc", null, patientSccParams);
 | 
												
													
														
															|  | 
 |  |             try {
 | 
												
													
														
															|  | 
 |  |                 JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyGetPatientAccetokenByIdcard",null,params);
 | 
												
													
														
															|  | 
 |  |                 if(rs!=null){
 | 
												
													
														
															|  | 
 |  |                     Integer status = rs.getInteger("status");
 | 
												
													
														
															|  | 
 |  |                     if(200 == status){
 | 
												
													
														
															|  | 
 |  |                         JSONObject data = rs.getJSONObject("data");
 | 
												
													
														
															|  | 
 |  |                         result = data.getString("patientCode");
 | 
												
													
														
															|  | 
 |  |                     }else{
 | 
												
													
														
															|  | 
 |  |                         logger.info(rs.toJSONString());
 | 
												
													
														
															|  | 
 |  |                         throw new Exception("请求i健康接口失败");
 | 
												
													
														
															|  | 
 |  |                     }
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  | 
 |  |             }catch (Exception e){
 | 
												
													
														
															|  | 
 |  |                 e.printStackTrace();
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  |             try {
 |  |             try {
 | 
												
													
														
															|  |                 baseOperateLogService.saveOperateLog(doctorId,patientId,"JKDA","健康档案","","");
 |  |                 baseOperateLogService.saveOperateLog(doctorId,patientId,"JKDA","健康档案","","");
 |