Browse Source

代码修改

LAPTOP-KB9HII50\70708 1 year ago
parent
commit
b33fa8628b

+ 4 - 5
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/OutpatientDao.java

@ -5,7 +5,6 @@ import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
@ -18,12 +17,12 @@ public interface OutpatientDao extends JpaRepository<WlyyOutpatientDO, String>,
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.outpatientType <> '3' and a.outpatientType <> '4' and a.status in(0,1,2)")
    List<WlyyOutpatientDO> findByPatientList(String patient);
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and  a.outpatientType = '3' and a.status in(0,1,2)")
    List<WlyyOutpatientDO> findByPatientAndDoctorList(String patient);
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and  a.outpatientType = ?2 and a.status in('0','1','2')")
    List<WlyyOutpatientDO> findByPatientAndDoctorList(String patient,String outpatientType);
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.outpatientType <> '3' and a.status in(3) order by a.createTime desc ")
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.outpatientType <> '3' and a.status in('3') order by a.createTime desc ")
    List<WlyyOutpatientDO> findByPatientListByStatus(String patient);
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.outpatientType = ?2  and a.status in(3) order by a.createTime desc ")
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.outpatientType = ?2  and a.status in('3') order by a.createTime desc ")
    List<WlyyOutpatientDO> findByPatientListByStatusAndType(String patient,String outpatientType);
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.hisStatus=1 and a.createTime>=?2 and a.createTime<=?3")

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -1528,8 +1528,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //2.判断是否有未结束的
        List<WlyyOutpatientDO> list = new ArrayList<>();
        if(StringUtils.isNotBlank(outpatientType)&&outpatientType.equalsIgnoreCase("3")){
            list = outpatientDao.findByPatientAndDoctorList(patient);
        if(StringUtils.isNotBlank(outpatientType)&&(outpatientType.equalsIgnoreCase("3")||outpatientType.equalsIgnoreCase("4"))){
            list = outpatientDao.findByPatientAndDoctorList(patient,outpatientType);
        }else {
            list = outpatientDao.findByPatientList(patient);
        }