소스 검색

新增医生助手功能

trick9191 7 년 전
부모
커밋
4b4146b60d

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionReviewedDao.java

@ -12,7 +12,7 @@ import java.util.List;
 */
public interface PrescriptionReviewedDao extends PagingAndSortingRepository<PrescriptionReviewed, Long>, JpaSpecificationExecutor<PrescriptionReviewed> {
    @Query("select p from PrescriptionReviewed p where p.prescriptionCode=?1")
    @Query(value = "select p from PrescriptionReviewed p where p.prescriptionCode=?1 order by p.reviewedTime desc")
    PrescriptionReviewed findByPrescriptionCode(String prescriptionCode);
    @Query("select p from PrescriptionReviewed p where p.prescriptionCode=?1 and p.status=?2")

+ 4 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -1367,7 +1367,7 @@ public class PrescriptionInfoService extends BaseService {
            param.add(endDate + " 23:59:59");
        }
        if (StringUtils.isNotBlank(hospital)) {
            pre_sql.append(" AND e.hospital_code = ? ");
            pre_sql.append(" AND e.patient_hospital_code = ? ");
            param.add(hospital);
        }
        if (StringUtils.isNotBlank(state)) {
@ -1409,7 +1409,7 @@ public class PrescriptionInfoService extends BaseService {
            param.add(endDate + " 23:59:59");
        }
        if (StringUtils.isNotBlank(hospital)) {
            pre_sql.append(" AND e.hospital_code = ? ");
            pre_sql.append(" AND e.patient_hospital_code = ? ");
            param.add(hospital);
        }
        if (StringUtils.isNotBlank(state)) {
@ -1453,13 +1453,13 @@ public class PrescriptionInfoService extends BaseService {
    }
    public JSONArray getHospitalListTitle(String teamCode) {
        StringBuffer pre_sql = new StringBuffer("SELECT e.hospital_code AS hospitalCode ,e.hospital_name AS hospitalName FROM " +
        StringBuffer pre_sql = new StringBuffer("SELECT e.patient_hospital_code AS hospitalCode ,e.patient_hospital_name AS hospitalName FROM " +
                "  wlyy_prescription pr " +
                "  JOIN wlyy_prescription_expressage e ON pr.code = e.prescription_code " +
                "  WHERE pr.admin_team_id = ? " +
                "  AND (e.expressage_code IS NULL OR e.expressage_code ='') " +
                "  AND pr.dispensary_type =3 " +
                "  GROUP BY e.hospital_code ");
                "  GROUP BY e.patient_hospital_code ");
        List<Map<String, Object>> list = jdbcTemplate.queryForList(pre_sql.toString(), new Object[]{teamCode});
        return new JSONArray(list);
    }