Kaynağa Gözat

三院问题处理

wangzhinan 4 ay önce
ebeveyn
işleme
6ae7bd1563

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

@ -15,7 +15,7 @@ import java.util.List;
 */
public interface OutpatientDao extends JpaRepository<WlyyOutpatientDO, String>, JpaSpecificationExecutor<WlyyOutpatientDO> {
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.outpatientType <> '3' and a.outpatientType <> '4' and a.status in(0,1,2)")
    @Query("from WlyyOutpatientDO a where a.patient = ?1 and a.outpatientType <> '3' and a.outpatientType <> '4' and a.outpatientType <> '5' and a.status in(0,1,2)")
    List<WlyyOutpatientDO> findByPatientList(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);

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

@ -1597,14 +1597,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        //2.判断是否有未结束的
        List<WlyyOutpatientDO> list = new ArrayList<>();
        if(StringUtils.isNotBlank(outpatientType)&&(outpatientType.equalsIgnoreCase("3")||outpatientType.equalsIgnoreCase("4"))){
        if(StringUtils.isNotBlank(outpatientType)&&(outpatientType.equalsIgnoreCase("3")||outpatientType.equalsIgnoreCase("4")||outpatientType.equalsIgnoreCase("5"))){
            list = outpatientDao.findByPatientAndDoctorList(patient,outpatientType);
        }else {
            list = outpatientDao.findByPatientList(patient);
        }
        if (list != null && list.size() > 0) {
            if(!list.get(0).getOutpatientType().equalsIgnoreCase("3")){
            if(list.get(0).getOutpatientType().equalsIgnoreCase("1")){
                rs.put("outpatient", list.get(0));
                rs.put("code", -2);
                rs.put("mes", "存在未结束的诊断");