Ver código fonte

代码修改

LAPTOP-KB9HII50\70708 1 ano atrás
pai
commit
217bc7056b

+ 2 - 2
business/im-service/src/main/java/com/yihu/jw/im/dao/ConsultTeamDao.java

@ -24,8 +24,8 @@ public interface ConsultTeamDao  extends JpaRepository<ConsultTeamDo, String>, J
//	@Query("update ConsultTeam a set a.status = 1 where a.consult = ?1")
//	int updateStatusByConsult(String consult);
//
//	@Query("select a from ConsultTeamDo a,ConsultTeamDoctor b where a.consult = b.consult and a.patient = ?1 and b.to = ?2 and a.del = '1' and a.type<>8 and a.status = 0")
//	List<ConsultTeamDo> findUnfinishedConsultType(String patient,String doctor);
	@Query("select a from ConsultTeamDo a where a.patient = ?1 and a.doctor = ?2 and a.del = '1' and a.type=?3 and a.status = 0")
	List<ConsultTeamDo> findUnfinishedConsultType(String patient,String doctor,Integer type);
	@Query("select count(id) from  ConsultTeamDo a where a.type = ?1 and a.doctor = ?2 and a.czrq >=?3 and a.czrq <=?4")
	Integer  countByTime(int type, String doctor, Date startTime, Date endTime);

+ 8 - 5
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -361,15 +361,18 @@ public class ImService {
        return consultCode;
    }
    public List<ConsultTeamDo> getUnfinishedConsult3(String patient, String doctor,int type) {
        return consultTeamDao.findUnfinishedConsultType(patient,doctor,type);
    }
    public String getUnfinishedConsult(String patient, String doctor,int type) {
        String totalSql = "SELECT a.consult as \"consultCode\" " +
                "FROM wlyy_consult_team a,wlyy_consult_team_doctor b " +
                "WHERE a.consult=b.consult " +
                "AND a.patient= '" + patient + "' " +
                "AND b.to_doctor='" + doctor + "' " +
                "FROM wlyy_consult_team a " +
                "WHERE a.patient= '" + patient + "' " +
                "AND a.doctor='" + doctor + "' " +
                "AND a.del='1' " +
                "AND a.type=" +type+
                "AND a.status=0";
                " AND a.status=0";
        List<Map<String, Object>> rstotal = hibenateUtils.createSQLQuery(totalSql);
        String consultCode = null;
        if (rstotal != null && rstotal.size() > 0) {