Bläddra i källkod

医生团队查询修改

lyr 8 år sedan
förälder
incheckning
209c170e0f

+ 5 - 3
src/main/java/com/yihu/wlyy/repository/doctor/DoctorTeamDao.java

@ -13,14 +13,16 @@ JpaSpecificationExecutor<DoctorTeam> {
	DoctorTeam findByCode(String code);
	@Query("select dt from DoctorTeam dt,DoctorTeamMember dtm  where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType='2'")
	//@Query("select dt from DoctorTeam dt,DoctorTeamMember dtm  where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType='2'")
	@Query("select dtt from DoctorTeam dtt where dtt.id = (select max(dt.id) from DoctorTeam dt,DoctorTeamMember dtm  where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType='2')")
	DoctorTeam findByParientCode(String parientCode);
	@Query("select dt from DoctorTeam dt,DoctorTeamMember dtm  where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType='1'")
	DoctorTeam findBySanshiParientCode(String parientCode);
	@Query("select dt from DoctorTeam dt,DoctorTeamMember dtm  where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType=?2")
	DoctorTeam findByParientCodeAndSignType(String parientCode,String type);
	//@Query("select dt from DoctorTeam dt,DoctorTeamMember dtm  where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType=?2 order by dtm.id limit 1")
	@Query("select dtt from DoctorTeam dtt where dtt.id = (select max(dt.id) from DoctorTeam dt,DoctorTeamMember dtm  where dt.code=dtm.team and dt.del=1 and dtm.del=1 and dtm.memberCode= ?1 and dtm.type= 5 and dtm.signType=?2)")
	DoctorTeam findByParientCodeAndSignType(String parientCode, String type);
	@Modifying
	@Query("update DoctorTeam a set a.del =0  where a.code = ?1 and signType='2'")

+ 1 - 1
src/main/java/com/yihu/wlyy/service/app/talk/TalkGroupService.java

@ -343,7 +343,7 @@ public class TalkGroupService extends BaseService {
        String url = SystemConf.getInstance().getSystemProperties().getProperty("im_list_get")
                + "statistic/getchatlist.im";
        String json = HttpUtil.sendGet(url, "uid=" + doctor);
        if(!StringUtils.isEmpty(json)) {
        if(!StringUtils.isEmpty(json) && json.trim().startsWith("[") && json.trim().endsWith("]")) {
            System.out.println("one-to-one:" + json);
            result = new JSONArray(json);
        }

+ 1 - 0
src/main/java/com/yihu/wlyy/service/app/team/DrHealthTeamService.java

@ -245,6 +245,7 @@ public class DrHealthTeamService extends BaseService {
    }
    public List<Doctor> findJiatingTeamDoctors(String parientCode) {
		System.out.println("DrHealthTeamService findJiatingTeamDoctors"+parientCode);
        //查看当前的患者所在的家庭团队
        DoctorTeam doctorTeam = doctorTeamDao.findByParientCode(parientCode);
        //查看家庭团队里面的医生