Przeglądaj źródła

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

Conflicts:
	patient-co-wlyy/src/main/java/com/yihu/wlyy/util/SendP2PUtil.java
8 lat temu
rodzic
commit
68fb59b061

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultTeamDao.java

@ -289,7 +289,7 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.status=?2  and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findMyFamousDoctorListByStatus(String uid, int status, Pageable pageRequest);
	@Query("select a from ConsultTeam a where a.patient = ?1 and a.doctor = ?2 and a.del = '1' and a.status = 0 order by id desc ")
	@Query("select a from ConsultTeam a where ((a.patient = ?1 and a.doctor = ?2) or (a.patient = ?2 and a.doctor = ?1))  and a.del = '1' and a.status = 0 order by id desc ")
	List<ConsultTeam> findUnfinishedConsult(String patient,String doctor);
	@Query("select a.doctor from ConsultTeam a where team = ?1  and del = '1' and type=?2 ")

+ 14 - 4
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -51,6 +51,7 @@ import org.springside.modules.persistence.SearchFilter.Operator;
import org.springside.modules.utils.Clock;
import com.yihu.wlyy.task.PushMsgTask;
import org.springside.modules.utils.Threads;
import javax.print.Doc;
@ -139,8 +140,7 @@ public class ConsultTeamService extends ConsultService {
    /**
     * 查詢醫生網絡諮詢列表
     *
     * @param type     咨询类型:1、咨询我的,2、公共的, 3、参与过的,4、已结束的 5 名医咨询 全部  6 名医咨询 进行中 7 名医咨询 已结束 8名医咨询 待处理 9咨询我的三师 + 家庭 + 名医
     * @param type 咨询类型:1、咨询我的,2、公共的, 3、参与过的,4、已结束的 5 名医咨询 全部  6 名医咨询 进行中 7 名医咨询 已结束 8名医咨询 待处理 9咨询我的三师 + 家庭 + 名医
     * @param id
     * @param pagesize 每页显示数,默认为10
     * @return
@ -1469,7 +1469,17 @@ public class ConsultTeamService extends ConsultService {
                    }
                }
            }
            Doctor doctorTemp = doctorDao.findByCode(ct.getDoctor());
            JSONObject qiuzuObj = new JSONObject();
            qiuzuObj.put("session_id",oldConsult.getPatient()+"_consult_"+oldConsult.getType());
            qiuzuObj.put("patient",ct.getPatient());
            qiuzuObj.put("old_consult_code",oldConsultCode);
            qiuzuObj.put("doctor",ct.getDoctor());
            qiuzuObj.put("doctor_name",doctorTemp.getName());
            ImUtill.sendTopicIM(doctor.getCode(),doctor.getName(),oldConsultCode,"5",qiuzuObj.toString());
        }
        ImUtill.sendImMsg(ct.getPatient(), ct.getDoctor(), session.getString("id"),"1","咨询问题:"+ ct.getSymptoms(),"1");
        //推送给IM图片
        if (StringUtils.isNotEmpty(ct.getImages())) {
@ -1537,7 +1547,7 @@ public class ConsultTeamService extends ConsultService {
            Consult oldConsult = consultDao.findByCode(oldConsultCode);
            ct.setTeam(oldConsultCode);
            if(oldConsult!=null&&isSend==1){
                JSONObject messages = ImUtill.getCreateTopicMessage(doctorTemp.getCode(), doctorTemp.getName(), consult.getTitle(), oldConsult.getSymptoms(), oldConsult.getImages());
                JSONObject messages = ImUtill.getCreateTopicMessage(doctorTemp.getCode(), doctorTemp.getName(), consult.getTitle(), "居民问题:"+oldConsult.getSymptoms(), oldConsult.getImages());
                JSONObject jsonObject = new JSONObject();
                jsonObject.put(ct.getPatient(), 0);
                jsonObject.put(ct.getDoctor(), 0);
@ -1554,7 +1564,7 @@ public class ConsultTeamService extends ConsultService {
                }
            }
            JSONObject qiuzuObj = new JSONObject();
            qiuzuObj.put("session_id",oldConsult.getPatient()+"_consult_"+consult.getType());
            qiuzuObj.put("session_id",oldConsult.getPatient()+"_consult_"+oldConsult.getType());
            qiuzuObj.put("patient",ct.getPatient());
            qiuzuObj.put("old_consult_code",oldConsultCode);
            qiuzuObj.put("doctor",ct.getDoctor());

+ 2 - 13
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/talk/TalkGroupService.java

@ -215,20 +215,9 @@ public class TalkGroupService extends BaseService {
     */
    public JSONArray getCommonDoctors(String doctor) {
        JSONArray result = new JSONArray();
        String sql = "select distinct d.*" +
                " from" +
                " wlyy_talk_group g" +
                " left join" +
                " wlyy_talk_group_member m" +
                " on g.code = m.group_code" +
                " join " +
                " wlyy_doctor d" +
                " on m.member_code = d.code" +
                " where g.creator = ? and g.type = 2 and m.member_code != ? ";
        List<Doctor> doctors = jdbcTemplate.query(sql, new Object[]{doctor, doctor},
        String sql = "select DISTINCT d.* from wlyy_consult_team p LEFT JOIN wlyy_doctor d on p.doctor = d.code where p.patient =?  order by p.czrq DESC ";
        List<Doctor> doctors = jdbcTemplate.query(sql, new Object[]{doctor},
                new BeanPropertyRowMapper(Doctor.class));
        for (Doctor doc : doctors) {
            JSONObject json = new JSONObject(doc);

+ 1 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultController.java

@ -881,6 +881,7 @@ public class DoctorConsultController extends WeixinBaseController {
                json.put("consult", ct.getConsult());
                //是否是医生求助医生
                if(ct.getType()==10){
                    //取出原有咨询求助返回原咨询的患者
                    ConsultTeam consultTeam = consultTeamService.findByConsultCode(ct.getTeam());
                    Patient patient = patientService.findByCode(consultTeam.getPatient());
                    json.put("zxGroupCode",consultTeam.getPatient()+"_consult_"+consultTeam.getType());