| 
															
																@ -2126,13 +2126,13 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        int start = 0 == page ? page++ : (page - 1) * size; 
															 | 
															
															 | 
															
																        int start = 0 == page ? page++ : (page - 1) * size; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        int end = 0 == size ? 15 : page * size; 
															 | 
															
															 | 
															
																        int end = 0 == size ? 15 : page * size; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String sql = "select ds.doctor,d.name, d.job_title_name as jobName, 1 as sortFlag " + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String sql = "select DISTINCT ds.doctor,d.name, d.job_title_name as jobName, 1 as sortFlag " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " from wlyy_door_doctor_status ds " + 
															 | 
															
															 | 
															
																                " from wlyy_door_doctor_status ds " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "        JOIN (select b.* from base_doctor b,base_doctor_hospital dh where b.id=dh.doctor_code and dh.del = 1 and dh.org_code='" + hospital + "')  d on ds.doctor = d.id " + 
															 | 
															
															 | 
															
																                "        JOIN (select b.* from base_doctor b,base_doctor_hospital dh where b.id=dh.doctor_code and dh.del = 1 and dh.org_code='" + hospital + "')  d on ds.doctor = d.id " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " LEFT JOIN base_doctor_role dr ON dr.doctor_code = d.id where ds.status in (1,2,3,4) AND dr.role_code != 'nurse' " + 
															 | 
															
															 | 
															
																                " LEFT JOIN base_doctor_role dr ON dr.doctor_code = d.id where ds.status in (1,2,3,4) AND dr.role_code != 'nurse' " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " limit " + start + "," + end ; 
															 | 
															
															 | 
															
																                " limit " + start + "," + end ; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String countSql = "select count(ds.id) " + 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String countSql = "select DISTINCT count(ds.id) " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "from wlyy_door_doctor_status ds " + 
															 | 
															
															 | 
															
																                "from wlyy_door_doctor_status ds " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                "         JOIN (select b.* from base_doctor b,base_doctor_hospital dh where b.id=dh.doctor_code and dh.del = 1 and dh.org_code= '" + hospital + "') d on ds.doctor = d.id " + 
															 | 
															
															 | 
															
																                "         JOIN (select b.* from base_doctor b,base_doctor_hospital dh where b.id=dh.doctor_code and dh.del = 1 and dh.org_code= '" + hospital + "') d on ds.doctor = d.id " + 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                " LEFT JOIN base_doctor_role dr ON dr.doctor_code = d.id where ds.status in (1,2,3,4) AND dr.role_code != 'nurse' "; 
															 | 
															
															 | 
															
																                " LEFT JOIN base_doctor_role dr ON dr.doctor_code = d.id where ds.status in (1,2,3,4) AND dr.role_code != 'nurse' "; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -2335,7 +2335,9 @@ public class WlyyDoorServiceOrderService extends BaseJpaService<WlyyDoorServiceO 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        doorServiceOrderDO.setNursingStaff(nursingStaff); 
															 | 
															
															 | 
															
																        doorServiceOrderDO.setNursingStaff(nursingStaff); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        doorServiceOrderDO.setNursingStaffName(nursingStaffName); 
															 | 
															
															 | 
															
																        doorServiceOrderDO.setNursingStaffName(nursingStaffName); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        doorServiceOrderDO.setNursingStaffType(nursingStaffType); 
															 | 
															
															 | 
															
																        doorServiceOrderDO.setNursingStaffType(nursingStaffType); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        System.out.println(dispathcherName+"医生派单给"+doctorName+"医生"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String sql = "DELETE FROM wlyy_door_doctor WHERE order_id ='"+orderId+"' AND doctor = '"+dispatcher+"'"; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        jdbcTemplate.execute(sql); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        this.save(doorServiceOrderDO); 
															 | 
															
															 | 
															
																        this.save(doorServiceOrderDO); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        // 给医生发派单消息 
															 | 
															
															 | 
															
																        // 给医生发派单消息 
															 |