|  | @ -8,7 +8,6 @@ import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
 | 
	
		
			
				|  |  | 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.im.ConsultTeamDo;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.org.BaseOrgDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.patient.BasePatientDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
 | 
	
	
		
			
				|  | @ -46,9 +45,6 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.common.IdCardUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.common.QrcodeUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.date.DateUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.http.HttpClientUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.security.Code16;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.security.MD5;
 | 
	
		
			
				|  |  | import com.yihu.mysql.query.BaseJpaService;
 | 
	
		
			
				|  |  | import com.ylzinfo.ehc.EhcHandler;
 | 
	
		
			
				|  |  | import com.ylzinfo.ehc.common.utils.DateUtils;
 | 
	
	
		
			
				|  | @ -59,8 +55,6 @@ import net.sf.json.JSONArray;
 | 
	
		
			
				|  |  | import net.sf.json.JSONObject;
 | 
	
		
			
				|  |  | import org.apache.commons.collections.map.HashedMap;
 | 
	
		
			
				|  |  | import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  | import org.apache.http.NameValuePair;
 | 
	
		
			
				|  |  | import org.apache.http.message.BasicNameValuePair;
 | 
	
		
			
				|  |  | import org.slf4j.Logger;
 | 
	
		
			
				|  |  | import org.slf4j.LoggerFactory;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Autowired;
 | 
	
	
		
			
				|  | @ -70,7 +64,6 @@ import org.springframework.jdbc.core.JdbcTemplate;
 | 
	
		
			
				|  |  | import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  | import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  | import org.springframework.util.CollectionUtils;
 | 
	
		
			
				|  |  | import org.springframework.util.ErrorHandler;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | import java.io.IOException;
 | 
	
		
			
				|  |  | import java.io.InputStream;
 | 
	
	
		
			
				|  | @ -201,7 +194,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public WlyyPrescriptionVO findOriginPrescription(String registerSn, String patNo, String admNo, String realOrder, boolean demoFlag)throws Exception{
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         List<WlyyPrescriptionVO> rs = entranceService.BS16017(registerSn,patNo,admNo,realOrder,demoFlag);
 | 
	
		
			
				|  |  |         List<WlyyPrescriptionVO> rs = entranceService.BS16017(registerSn,realOrder,admNo,patNo,demoFlag);
 | 
	
		
			
				|  |  |         if(rs!=null&&rs.size()>0){
 | 
	
		
			
				|  |  |             return rs.get(0);
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -733,6 +726,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(chargeType)){
 | 
	
		
			
				|  |  |             sql+=" AND d.charge_type ='"+chargeType+"'";
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             sql+=" AND d.charge_type is not null ";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(outpatientType)){
 | 
	
		
			
				|  |  |             sql+=" AND d.outpatient_type like'%"+outpatientType+"%'";
 | 
	
	
		
			
				|  | @ -795,6 +790,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(chargeType)){
 | 
	
		
			
				|  |  |             totalSql+= " AND d.charge_type ='"+chargeType+"'";
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             totalSql+= " AND d.charge_type is not null ";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(outpatientType)){
 | 
	
		
			
				|  |  |             totalSql+= " AND d.outpatient_type like'%"+outpatientType+"%'";
 | 
	
	
		
			
				|  | @ -852,6 +849,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(chargeType)){
 | 
	
		
			
				|  |  |             sql+= " AND d.charge_type ='"+chargeType+"'";
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             sql+= " AND d.charge_type is not null";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(outpatientType)){
 | 
	
		
			
				|  |  |             sql+= " AND d.outpatient_type like'%"+outpatientType+"%'";
 | 
	
	
		
			
				|  | @ -1521,7 +1520,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public net.sf.json.JSONObject getCardInfo(String cardNo, boolean demoFlag) throws Exception {
 | 
	
		
			
				|  |  |         return entranceService.qutpatientBalance(cardNo,demoFlag);
 | 
	
		
			
				|  |  |         return entranceService.qutpatientBalance(cardNo,true);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public List<Map<String,Object>> findWorkTimeInfo(String id){
 | 
	
	
		
			
				|  | @ -2260,7 +2259,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public Boolean saveDoctorWorkTimeJson(String type,String codes,String workTimeJson)throws Exception{
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         List<WlyyDoctorWorkTimeDO> wlyyDoctorWorkTimeDOs = (List<WlyyDoctorWorkTimeDO>) com.alibaba.fastjson.JSONArray.parseArray(workTimeJson, WlyyDoctorWorkTimeDO.class);
 | 
	
		
			
				|  |  |         com.alibaba.fastjson.JSONArray works = JSON.parseArray(workTimeJson);
 | 
	
		
			
				|  |  |         List<WlyyDoctorWorkTimeDO> wlyyDoctorWorkTimeDOs = new ArrayList<>();
 | 
	
		
			
				|  |  |         for(int i=0;i<works.size();i++){
 | 
	
		
			
				|  |  |             com.alibaba.fastjson.JSONObject work = (com.alibaba.fastjson.JSONObject)works.get(i);
 | 
	
		
			
				|  |  |             WlyyDoctorWorkTimeDO timeDO = objectMapper.readValue(work.toJSONString(),WlyyDoctorWorkTimeDO.class);
 | 
	
		
			
				|  |  |             wlyyDoctorWorkTimeDOs.add(timeDO);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //全院医生
 | 
	
		
			
				|  |  |         if("1".equals(type)){
 |