|  | @ -14,16 +14,18 @@ import com.yihu.jw.entity.door.*;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.hospital.message.SystemMessageDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.im.dao.ConsultDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.im.dao.ConsultTeamDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.http.HttpClientUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.im.util.ImUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.message.dao.MessageDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.patient.dao.BasePatientDao;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.common.IdCardUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.date.DateUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.util.http.HttpClientUtil;
 | 
	
		
			
				|  |  | import jxl.Workbook;
 | 
	
		
			
				|  |  | import jxl.write.*;
 | 
	
		
			
				|  |  | import org.apache.commons.collections.CollectionUtils;
 | 
	
		
			
				|  |  | import org.apache.commons.lang.StringUtils;
 | 
	
		
			
				|  |  | import org.apache.http.NameValuePair;
 | 
	
		
			
				|  |  | import org.apache.http.message.BasicNameValuePair;
 | 
	
		
			
				|  |  | import org.apache.poi.poifs.filesystem.POIFSFileSystem;
 | 
	
		
			
				|  |  | import org.jsoup.Jsoup;
 | 
	
		
			
				|  |  | import org.jsoup.nodes.Document;
 | 
	
	
		
			
				|  | @ -377,14 +379,15 @@ public class DoorOrderService {
 | 
	
		
			
				|  |  |      * @param signImg
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public WlyyDoorServiceOrderDO signIn(String orderId, String signTime, Integer signWay, String signLocation, String signImg, String twoDimensionalCode) throws Exception {
 | 
	
		
			
				|  |  |     public WlyyDoorServiceOrderDO signIn(String orderId, String signTime, Integer signWay, String signLocation,
 | 
	
		
			
				|  |  |                                          String signImg, String twoDimensionalCode,String doctorId) throws Exception {
 | 
	
		
			
				|  |  |         WlyyDoorServiceOrderDO doorServiceOrder = this.doorServiceOrderDao.findOne(orderId);
 | 
	
		
			
				|  |  |         doorServiceOrder.setDoctorSignTime(DateUtil.strToDate(signTime));
 | 
	
		
			
				|  |  |         doorServiceOrder.setDoctorSignWay(signWay);
 | 
	
		
			
				|  |  |         // 签到方式-2扫码时,需要去解析地址
 | 
	
		
			
				|  |  |         doorServiceOrder.setDoctorSignLocation(signLocation);
 | 
	
		
			
				|  |  |         doorServiceOrder.setDoctorSignImg(StringUtils.isEmpty(signImg) ? null : signImg);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         doorServiceOrder.setStatus(4);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if(signWay == 4 ){//扫码签到
 | 
	
		
			
				|  |  |             if (twoDimensionalCode.equals(doorServiceOrder.getNumber())){
 | 
	
	
		
			
				|  | @ -392,6 +395,7 @@ public class DoorOrderService {
 | 
	
		
			
				|  |  |                 doorServiceOrder = doorServiceOrderDao.save(doorServiceOrder);
 | 
	
		
			
				|  |  |                 // 修改医生上门服务工单状态 4服务中
 | 
	
		
			
				|  |  |                 this.updateDispatchStatusBySystem(doorServiceOrder.getDoctor(), 4);
 | 
	
		
			
				|  |  |                 appointmentRevisitOnDoor(doorServiceOrder,doctorId);
 | 
	
		
			
				|  |  |                 return doorServiceOrder;
 | 
	
		
			
				|  |  |             }else {
 | 
	
		
			
				|  |  |                 logger.info("扫码签到失败");
 | 
	
	
		
			
				|  | @ -402,10 +406,33 @@ public class DoorOrderService {
 | 
	
		
			
				|  |  |             doorServiceOrder = doorServiceOrderDao.save(doorServiceOrder);
 | 
	
		
			
				|  |  |             // 修改医生上门服务工单状态 4服务中
 | 
	
		
			
				|  |  |             this.updateDispatchStatusBySystem(doorServiceOrder.getDoctor(), 4);
 | 
	
		
			
				|  |  |             appointmentRevisitOnDoor(doorServiceOrder,doctorId);
 | 
	
		
			
				|  |  |             return doorServiceOrder;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 挂号
 | 
	
		
			
				|  |  |      * @param orderDO
 | 
	
		
			
				|  |  |      * @param doctorId
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public void appointmentRevisitOnDoor(WlyyDoorServiceOrderDO orderDO,String doctorId){
 | 
	
		
			
				|  |  |         BaseDoctorDO doctorDO = doctorDao.findById(doctorId);
 | 
	
		
			
				|  |  |         JSONObject outpatientJson = new JSONObject();
 | 
	
		
			
				|  |  |         outpatientJson.put("hospital",orderDO.getHospital());
 | 
	
		
			
				|  |  |         outpatientJson.put("patient",orderDO.getPatient());
 | 
	
		
			
				|  |  |         outpatientJson.put("patientName",orderDO.getPatientName());
 | 
	
		
			
				|  |  |         outpatientJson.put("mobile",orderDO.getPatientPhone());
 | 
	
		
			
				|  |  |         outpatientJson.put("doctor",doctorId);
 | 
	
		
			
				|  |  |         outpatientJson.put("doctorName",doctorDO.getName());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         String url = hospitalUrl + "/open/noLogin/appointmentRevisitOnDoor";
 | 
	
		
			
				|  |  |         List<NameValuePair> params = new ArrayList<>();
 | 
	
		
			
				|  |  |         params.add(new BasicNameValuePair("outpatientJson", outpatientJson.toJSONString()));
 | 
	
		
			
				|  |  |         String res = httpClientUtil.post(url,params,"UTF-8");
 | 
	
		
			
				|  |  |         System.out.println("appointmentRevisitOnDoor res:"+res);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 编辑保存服务工单小结
 | 
	
		
			
				|  |  |      * @param model
 |