Browse Source

咨询统计修改

wangjun 4 years ago
parent
commit
80aebea3f5

+ 9 - 4
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -3655,13 +3655,18 @@ public class ImService {
	public Long doctorConsults(String doctorCode){
		String sql=  "SELECT count(1) AS \"total\"  " +
		/*String sql=  "SELECT count(1) AS \"total\"  " +
				" FROM wlyy_consult a," +
				"wlyy_consult_team b," +
				"base_patient d  " +
				" WHERE a.id=b.consult " +
				" AND b.patient=d.id AND b.doctor='" + doctorCode + "' AND b.type in (1,15,17) and b.status = 0 and a.pay_status=1" +
				" ORDER BY a.czrq desc ";
				" ORDER BY a.czrq desc ";*/
		String sql=  "SELECT count(1) AS \"total\"  " +
				" FROM wlyy_outpatient a " +
				" WHERE a.outpatient_type in (1,2,3)" +
				" AND b.doctor='" + doctorCode + "' AND a.type in (1,2,3) and a.status in (0,1) and a.pay_status=1" +
				" ORDER BY a.create_time desc ";
		List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(sql);
		Long consultCount = 0l;
		if (rstotal != null && rstotal.size() > 0) {
@ -3672,8 +3677,8 @@ public class ImService {
	public Long doctorConsultsNew(String doctorCode){
		String sql=  "SELECT count(1) AS \"total\"  " +
				" FROM wlyy_outpatient a " +
				" WHERE a.outpatient_type = 3 " +
				" AND b.doctor='" + doctorCode + "' AND a.type in (1,2,3) and a.status in (0,1) and a.pay_status=1" +
				" WHERE a.outpatient_type in (1,2,3)" +
				" AND b.doctor='" + doctorCode + "' AND a.type in (1,2,3) and a.status in (0,1,2) and a.pay_status=1" +
				" ORDER BY a.create_time desc ";
		List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(sql);
		Long consultCount = 0l;