|  | @ -162,6 +162,9 @@ public class ImService {
 | 
												
													
														
															|  | 	@Autowired
 |  | 	@Autowired
 | 
												
													
														
															|  | 	private HibenateUtils hibenateUtils;
 |  | 	private HibenateUtils hibenateUtils;
 | 
												
													
														
															|  | 	
 |  | 	
 | 
												
													
														
															|  | 
 |  | 	@Value("${wechat.id}")
 | 
												
													
														
															|  | 
 |  | 	private String wxId;
 | 
												
													
														
															|  | 
 |  | 	
 | 
												
													
														
															|  | 	
 |  | 	
 | 
												
													
														
															|  | 	
 |  | 	
 | 
												
													
														
															|  | 	/**
 |  | 	/**
 | 
												
											
												
													
														
															|  | @ -181,9 +184,13 @@ public class ImService {
 | 
												
													
														
															|  | 				"a.id AS \"id\"," +
 |  | 				"a.id AS \"id\"," +
 | 
												
													
														
															|  | 				"a.type AS \"type\"," +
 |  | 				"a.type AS \"type\"," +
 | 
												
													
														
															|  | 				"a.title AS \"title\"," +
 |  | 				"a.title AS \"title\"," +
 | 
												
													
														
															|  | 				"a.symptoms AS \"symptoms\"," +
 |  | 
 | 
												
													
														
															|  | 				"to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\"," +
 |  | 
 | 
												
													
														
															|  | 				"b.status AS \"status\"," +
 |  | 
 | 
												
													
														
															|  | 
 |  | 				"a.symptoms AS \"symptoms\",";
 | 
												
													
														
															|  | 
 |  | 		if("xm_ykyy_wx".equals(wxId)){
 | 
												
													
														
															|  | 
 |  | 			sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
 | 
												
													
														
															|  | 
 |  | 		}else{
 | 
												
													
														
															|  | 
 |  | 			sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
 | 
												
													
														
															|  | 
 |  | 		}
 | 
												
													
														
															|  | 
 |  | 			sql = sql +"b.status AS \"status\"," +
 | 
												
													
														
															|  | 				"b.evaluate AS \"evaluate\"," +
 |  | 				"b.evaluate AS \"evaluate\"," +
 | 
												
													
														
															|  | 				"d.name AS \"doctorName\"," +
 |  | 				"d.name AS \"doctorName\"," +
 | 
												
													
														
															|  | 				"d.photo AS \"doctorphoto\"," +
 |  | 				"d.photo AS \"doctorphoto\"," +
 | 
												
											
												
													
														
															|  | @ -1591,9 +1598,14 @@ public class ImService {
 | 
												
													
														
															|  | 		String sqlScoreList = "SELECT " +
 |  | 		String sqlScoreList = "SELECT " +
 | 
												
													
														
															|  | 				"a.score as \"score\"," +
 |  | 				"a.score as \"score\"," +
 | 
												
													
														
															|  | 				"a.score_type as \"score_type\"," +
 |  | 				"a.score_type as \"score_type\"," +
 | 
												
													
														
															|  | 				"a.content as \"content\"," +
 |  | 
 | 
												
													
														
															|  | 				"to_char(b.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"create_time\"," +
 |  | 
 | 
												
													
														
															|  | 				"c.type as \"type\"," +
 |  | 
 | 
												
													
														
															|  | 
 |  | 				"a.content as \"content\",";
 | 
												
													
														
															|  | 
 |  | 		if("xm_ykyy_wx".equals(wxId)){
 | 
												
													
														
															|  | 
 |  | 			sqlScoreList +=  "to_char(b.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"create_time\",";
 | 
												
													
														
															|  | 
 |  | 		}else{
 | 
												
													
														
															|  | 
 |  | 			sqlScoreList +=  "date_format(b.create_time,'%Y-%m-%d %H:%i:%S' )  AS \"create_time\",";
 | 
												
													
														
															|  | 
 |  | 		}
 | 
												
													
														
															|  | 
 |  | 		
 | 
												
													
														
															|  | 
 |  | 		sqlScoreList +=	"c.type as \"type\"," +
 | 
												
													
														
															|  | 				"c.name as \"patientname\"," +
 |  | 				"c.name as \"patientname\"," +
 | 
												
													
														
															|  | 				"b.id as \"id\"," +
 |  | 				"b.id as \"id\"," +
 | 
												
													
														
															|  | 				"c.photo as \"patientphoto\"," +
 |  | 				"c.photo as \"patientphoto\"," +
 | 
												
											
												
													
														
															|  | @ -1702,9 +1714,13 @@ public class ImService {
 | 
												
													
														
															|  | 					"a.id AS \"id\"," +
 |  | 					"a.id AS \"id\"," +
 | 
												
													
														
															|  | 					"a.type AS \"type\"," +
 |  | 					"a.type AS \"type\"," +
 | 
												
													
														
															|  | 					"a.title AS \"title\"," +
 |  | 					"a.title AS \"title\"," +
 | 
												
													
														
															|  | 					"a.symptoms AS \"symptoms\"," +
 |  | 
 | 
												
													
														
															|  | 					"to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\"," +
 |  | 
 | 
												
													
														
															|  | 					"b.status AS \"status\"," +
 |  | 
 | 
												
													
														
															|  | 
 |  | 					"a.symptoms AS \"symptoms\",";
 | 
												
													
														
															|  | 
 |  | 			if("xm_ykyy_wx".equals(wxId)){
 | 
												
													
														
															|  | 
 |  | 				sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
 | 
												
													
														
															|  | 
 |  | 			}else{
 | 
												
													
														
															|  | 
 |  | 				sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
 | 
												
													
														
															|  | 
 |  | 			}
 | 
												
													
														
															|  | 
 |  | 			sql = sql +	"b.status AS \"status\"," +
 | 
												
													
														
															|  | 					"b.evaluate AS \"evaluate\"," +
 |  | 					"b.evaluate AS \"evaluate\"," +
 | 
												
													
														
															|  | 					"d.name AS \"patientName\"," +
 |  | 					"d.name AS \"patientName\"," +
 | 
												
													
														
															|  | 					"d.id as \"patientId\"," +
 |  | 					"d.id as \"patientId\"," +
 | 
												
											
												
													
														
															|  | @ -1722,9 +1738,13 @@ public class ImService {
 | 
												
													
														
															|  | 					"a.id AS \"id\"," +
 |  | 					"a.id AS \"id\"," +
 | 
												
													
														
															|  | 					"a.type AS \"type\"," +
 |  | 					"a.type AS \"type\"," +
 | 
												
													
														
															|  | 					"a.title AS \"title\"," +
 |  | 					"a.title AS \"title\"," +
 | 
												
													
														
															|  | 					"a.symptoms AS \"symptoms\"," +
 |  | 
 | 
												
													
														
															|  | 					"to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\"," +
 |  | 
 | 
												
													
														
															|  | 					"b.status AS \"status\"," +
 |  | 
 | 
												
													
														
															|  | 
 |  | 					"a.symptoms AS \"symptoms\"," ;
 | 
												
													
														
															|  | 
 |  | 			if("xm_ykyy_wx".equals(wxId)){
 | 
												
													
														
															|  | 
 |  | 				sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
 | 
												
													
														
															|  | 
 |  | 			}else{
 | 
												
													
														
															|  | 
 |  | 				sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
 | 
												
													
														
															|  | 
 |  | 			}
 | 
												
													
														
															|  | 
 |  | 			sql = sql +	"b.status AS \"status\"," +
 | 
												
													
														
															|  | 					"b.evaluate AS \"evaluate\"," +
 |  | 					"b.evaluate AS \"evaluate\"," +
 | 
												
													
														
															|  | 					"d.name AS \"patientName\"," +
 |  | 					"d.name AS \"patientName\"," +
 | 
												
													
														
															|  | 					"d.id as \"patientId\"," +
 |  | 					"d.id as \"patientId\"," +
 | 
												
											
												
													
														
															|  | @ -2080,9 +2100,13 @@ public class ImService {
 | 
												
													
														
															|  | 				"a.id AS \"id\"," +
 |  | 				"a.id AS \"id\"," +
 | 
												
													
														
															|  | 				"a.type AS \"type\"," +
 |  | 				"a.type AS \"type\"," +
 | 
												
													
														
															|  | 				"a.title AS \"title\"," +
 |  | 				"a.title AS \"title\"," +
 | 
												
													
														
															|  | 				"a.symptoms AS \"symptoms\"," +
 |  | 
 | 
												
													
														
															|  | 				"to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\"," +
 |  | 
 | 
												
													
														
															|  | 				"b.status AS \"status\"," +
 |  | 
 | 
												
													
														
															|  | 
 |  | 				"a.symptoms AS \"symptoms\"," ;
 | 
												
													
														
															|  | 
 |  | 		if("xm_ykyy_wx".equals(wxId)){
 | 
												
													
														
															|  | 
 |  | 			sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
 | 
												
													
														
															|  | 
 |  | 		}else{
 | 
												
													
														
															|  | 
 |  | 			sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
 | 
												
													
														
															|  | 
 |  | 		}
 | 
												
													
														
															|  | 
 |  | 			sql = sql + "b.status AS \"status\"," +
 | 
												
													
														
															|  | 				"b.evaluate AS \"evaluate\"," +
 |  | 				"b.evaluate AS \"evaluate\"," +
 | 
												
													
														
															|  | 				"d.name AS \"patientName\"," +
 |  | 				"d.name AS \"patientName\"," +
 | 
												
													
														
															|  | 				"d.id as \"patientId\"," +
 |  | 				"d.id as \"patientId\"," +
 | 
												
											
												
													
														
															|  | @ -2383,9 +2407,13 @@ public class ImService {
 | 
												
													
														
															|  | 					"a.id AS \"id\"," +
 |  | 					"a.id AS \"id\"," +
 | 
												
													
														
															|  | 					"a.type AS \"type\"," +
 |  | 					"a.type AS \"type\"," +
 | 
												
													
														
															|  | 					"a.title AS \"title\"," +
 |  | 					"a.title AS \"title\"," +
 | 
												
													
														
															|  | 					"a.symptoms AS \"symptoms\"," +
 |  | 
 | 
												
													
														
															|  | 					"to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\"," +
 |  | 
 | 
												
													
														
															|  | 					"b.status AS \"status\"," +
 |  | 
 | 
												
													
														
															|  | 
 |  | 					"a.symptoms AS \"symptoms\",";
 | 
												
													
														
															|  | 
 |  | 			if("xm_ykyy_wx".equals(wxId)){
 | 
												
													
														
															|  | 
 |  | 				sql = sql + "to_char(a.czrq,'YYYY-MM-DD hh24:mi:ss')  AS \"czrq\",";
 | 
												
													
														
															|  | 
 |  | 			}else{
 | 
												
													
														
															|  | 
 |  | 				sql = sql + "date_format(a.czrq,'%Y-%m-%d %H:%i:%S' )  AS \"czrq\",";
 | 
												
													
														
															|  | 
 |  | 			}
 | 
												
													
														
															|  | 
 |  | 			sql = sql +"b.status AS \"status\"," +
 | 
												
													
														
															|  | 					"b.evaluate AS \"evaluate\"," +
 |  | 					"b.evaluate AS \"evaluate\"," +
 | 
												
													
														
															|  | 					"b.doctor AS \"doctorCode\"," +
 |  | 					"b.doctor AS \"doctorCode\"," +
 | 
												
													
														
															|  | 					"b.actual_sender AS \"generalDoctor\"," +
 |  | 					"b.actual_sender AS \"generalDoctor\"," +
 | 
												
											
												
													
														
															|  | @ -2415,9 +2443,13 @@ public class ImService {
 | 
												
													
														
															|  | 					"patient.idcard AS \"patientIdcard\"," +
 |  | 					"patient.idcard AS \"patientIdcard\"," +
 | 
												
													
														
															|  | 					"patient.sex AS \"patientsex\"," +
 |  | 					"patient.sex AS \"patientsex\"," +
 | 
												
													
														
															|  | 					"patient.photo AS \"patientphoto\"," +
 |  | 					"patient.photo AS \"patientphoto\"," +
 | 
												
													
														
															|  | 					"op.id AS \"outpatientid\"," +
 |  | 
 | 
												
													
														
															|  | 					"to_char(op.register_date,'YYYY-MM-DD hh24:mi:ss')  AS \"registerDate\"," +
 |  | 
 | 
												
													
														
															|  | 					"op.status AS outpatientstatus " +
 |  | 
 | 
												
													
														
															|  | 
 |  | 					"op.id AS \"outpatientid\"," ;
 | 
												
													
														
															|  | 
 |  | 			if("xm_ykyy_wx".equals(wxId)){
 | 
												
													
														
															|  | 
 |  | 				sql = sql + "to_char(op.register_date,'YYYY-MM-DD hh24:mi:ss')  AS \"registerDate\",";
 | 
												
													
														
															|  | 
 |  | 			}else{
 | 
												
													
														
															|  | 
 |  | 				sql = sql + "date_format(op.register_date,'%Y-%m-%d %H:%i:%S' )  AS \"registerDate\",";
 | 
												
													
														
															|  | 
 |  | 			}
 | 
												
													
														
															|  | 
 |  | 							sql = sql +		"op.status AS outpatientstatus " +
 | 
												
													
														
															|  | 					"FROM wlyy_outpatient op," +
 |  | 					"FROM wlyy_outpatient op," +
 | 
												
													
														
															|  | 					"base_patient patient " +
 |  | 					"base_patient patient " +
 | 
												
													
														
															|  | 					"WHERE op.patient=patient.id " +
 |  | 					"WHERE op.patient=patient.id " +
 |