Bladeren bron

代码修改

liubing 3 jaren geleden
bovenliggende
commit
18fff708ce

+ 3 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/service/course/DoctorPatientTmpDao.java

@ -1,4 +1,4 @@
package com.yihu.jw.base.service.course;
package com.yihu.jw.base.dao.course;
import com.yihu.jw.entity.care.course.DoctorPatientTmpDO;
import com.yihu.jw.entity.care.course.DoctorPatientTmpDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
@ -13,6 +13,6 @@ public interface DoctorPatientTmpDao extends PagingAndSortingRepository<DoctorPa
    DoctorPatientTmpDO findByRelationCode(String relationCode);
    DoctorPatientTmpDO findByRelationCode(String relationCode);
    @Query(value = "select count(1) from DoctorPatientTmpDO t where t.patient=?1 and t.doctorCode = ?2 ")
    Integer findByPatientAndDoctorCode(String patient,String doctorCode);
    @Query(value = "select count(1) from DoctorPatientTmpDO t where t.patient=?1 and t.doctorCode = ?2 and t.type=?3")
    Integer findByPatientAndDoctorCodeAndType(String patient,String doctorCode,Integer type);
}
}

+ 1 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/course/RecruitStudentsRecordService.java

@ -1,5 +1,6 @@
package com.yihu.jw.base.service.course;
package com.yihu.jw.base.service.course;
import com.yihu.jw.base.dao.course.DoctorPatientTmpDao;
import com.yihu.jw.base.dao.course.PatientOrderRefundDao;
import com.yihu.jw.base.dao.course.PatientOrderRefundDao;
import com.yihu.jw.base.dao.course.RecruitStudentsDao;
import com.yihu.jw.base.dao.course.RecruitStudentsDao;
import com.yihu.jw.base.dao.course.RecruitStudentsRecordDao;
import com.yihu.jw.base.dao.course.RecruitStudentsRecordDao;

+ 2 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/course/DoctorPatientTmpDao.java

@ -13,6 +13,6 @@ public interface DoctorPatientTmpDao extends PagingAndSortingRepository<DoctorPa
    DoctorPatientTmpDO findByRelationCode(String relationCode);
    DoctorPatientTmpDO findByRelationCode(String relationCode);
    @Query(value = "select count(1) from DoctorPatientTmpDO t where t.patient=?1 and t.doctorCode = ?2 ")
    Integer findByPatientAndDoctorCode(String patient,String doctorCode);
    @Query(value = "select count(1) from DoctorPatientTmpDO t where t.patient=?1 and t.doctorCode = ?2 and t.type=?3")
    Integer findByPatientAndDoctorCodeAndType(String patient,String doctorCode,Integer type);
}
}

+ 11 - 7
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/consult/ConsultService.java

@ -90,7 +90,7 @@ public class ConsultService {
                "WHERE " +
                "WHERE " +
                " b.doctor = h.doctor_code " +
                " b.doctor = h.doctor_code " +
                "AND b.patient = '"+patient+"' " +
                "AND b.patient = '"+patient+"' " +
                "AND b.type = "+type;
                "AND b.type = "+type+" ";
        if(StringUtils.isEmpty(orgCode)){
        if(StringUtils.isEmpty(orgCode)){
            String doctor = sessionId.split("_")[1];
            String doctor = sessionId.split("_")[1];
            sql += "AND b.doctor = '"+doctor+"' ";
            sql += "AND b.doctor = '"+doctor+"' ";
@ -589,12 +589,16 @@ public class ConsultService {
        }
        }
        if (ct.getType()==23){
        if (ct.getType()==23){
            DoctorPatientTmpDO tmpDO = new DoctorPatientTmpDO();
            tmpDO.setDoctorCode(doctor);
            tmpDO.setPatient(patient);
            tmpDO.setType(1);
            tmpDO.setRelationCode(ct.getConsult());
            doctorPatientTmpDao.save(tmpDO);
            if(doctorPatientTmpDao.findByPatientAndDoctorCodeAndType(patient,doctor,1)==0){
                DoctorPatientTmpDO tmpDO = new DoctorPatientTmpDO();
                tmpDO.setDoctorCode(doctor);
                tmpDO.setPatient(patient);
                tmpDO.setType(1);
                tmpDO.setDel(1);
                tmpDO.setRelationCode(ct.getConsult());
                doctorPatientTmpDao.save(tmpDO);
            }
        }
        }

+ 3 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/course/CourseService.java

@ -815,6 +815,8 @@ public class CourseService {
        DoctorPatientTmpDO tmpDO = new DoctorPatientTmpDO();
        DoctorPatientTmpDO tmpDO = new DoctorPatientTmpDO();
        tmpDO.setPatient(recordDO.getPatient());
        tmpDO.setPatient(recordDO.getPatient());
        tmpDO.setType(3);
        tmpDO.setType(3);
        tmpDO.setStatus(0);//未入取
        tmpDO.setDel(1);
        tmpDO.setDoctorCode(recordDO.getOrgCode());
        tmpDO.setDoctorCode(recordDO.getOrgCode());
        tmpDO.setRelationCode(recordDO.getId());
        tmpDO.setRelationCode(recordDO.getId());
        doctorPatientTmpDao.save(tmpDO);
        doctorPatientTmpDao.save(tmpDO);
@ -857,6 +859,7 @@ public class CourseService {
        DoctorPatientTmpDO tmpDO = new DoctorPatientTmpDO();
        DoctorPatientTmpDO tmpDO = new DoctorPatientTmpDO();
        tmpDO.setPatient(recordDO.getPatient());
        tmpDO.setPatient(recordDO.getPatient());
        tmpDO.setType(4);
        tmpDO.setType(4);
        tmpDO.setDel(1);
        tmpDO.setDoctorCode(courseDO.getDoctor());
        tmpDO.setDoctorCode(courseDO.getDoctor());
        tmpDO.setRelationCode(recordDO.getId());
        tmpDO.setRelationCode(recordDO.getId());
        doctorPatientTmpDao.save(tmpDO);
        doctorPatientTmpDao.save(tmpDO);

+ 2 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/doorCoach/DoctorDoorCoachOrderService.java

@ -457,11 +457,12 @@ public class DoctorDoorCoachOrderService {
        }
        }
        //  待接单消息设为已操作, 434 医生接单-- 王五接受了服务工单12345678
        //  待接单消息设为已操作, 434 医生接单-- 王五接受了服务工单12345678
        messageUtil.updateDoorCoachMessage(doorServiceOrder,new String[]{"703","707"},"734",null,null);
        messageUtil.updateDoorCoachMessage(doorServiceOrder,new String[]{"703","707"},"734",null,null);
        if(doctorPatientTmpDao.findByPatientAndDoctorCode(doorServiceOrder.getPatient(),doorServiceOrder.getDoctor())==0){
        if(doctorPatientTmpDao.findByPatientAndDoctorCodeAndType(doorServiceOrder.getPatient(),doorServiceOrder.getDoctor(),2)==0){
            DoctorPatientTmpDO tmpDO = new DoctorPatientTmpDO();
            DoctorPatientTmpDO tmpDO = new DoctorPatientTmpDO();
            tmpDO.setDoctorCode(doorServiceOrder.getDoctor());
            tmpDO.setDoctorCode(doorServiceOrder.getDoctor());
            tmpDO.setPatient(doorServiceOrder.getPatient());
            tmpDO.setPatient(doorServiceOrder.getPatient());
            tmpDO.setType(2);
            tmpDO.setType(2);
            tmpDO.setDel(1);
            tmpDO.setRelationCode(doorServiceOrder.getId());
            tmpDO.setRelationCode(doorServiceOrder.getId());
            doctorPatientTmpDao.save(tmpDO);
            doctorPatientTmpDao.save(tmpDO);
        }
        }