瀏覽代碼

居民端指导阅读状态

wujunjie 8 年之前
父節點
當前提交
17fd625f0a

+ 10 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/PatientHealthGuidance.java

@ -40,6 +40,16 @@ public class PatientHealthGuidance extends IdEntity {
	private Integer signType;
	private Integer signType;
	// 行政团队
	// 行政团队
	private Long adminTeamCode;
	private Long adminTeamCode;
//	指导阅读状态
	private int readStatus;
	public int getReadStatus() {
		return readStatus;
	}
	public void setReadStatus(int readStatus) {
		this.readStatus = readStatus;
	}
	public String getPatient() {
	public String getPatient() {
		return patient;
		return patient;

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/PatientHealthGuidanceDao.java

@ -18,10 +18,10 @@ import com.yihu.wlyy.entity.patient.PatientHealthGuidance;
public interface PatientHealthGuidanceDao extends PagingAndSortingRepository<PatientHealthGuidance, Long>, JpaSpecificationExecutor<PatientHealthGuidance> {
public interface PatientHealthGuidanceDao extends PagingAndSortingRepository<PatientHealthGuidance, Long>, JpaSpecificationExecutor<PatientHealthGuidance> {
	@Query("select b.name, b.photo, a.id, a.content, a.czrq,b.level from PatientHealthGuidance a, Doctor b where a.patient = ?1 and a.doctor = b.code and a.del = '1' order by a.id desc")
	@Query("select b.name, b.photo, a.id, a.content, a.czrq,b.level,a.readStatus from PatientHealthGuidance a, Doctor b where a.patient = ?1 and a.doctor = b.code and a.del = '1' order by a.id desc")
	Page<Object> findByPatient(String patient, Pageable pageRequest);
	Page<Object> findByPatient(String patient, Pageable pageRequest);
	@Query("select b.name, b.photo, a.id, a.content, a.czrq,b.level from PatientHealthGuidance a, Doctor b where a.patient = ?1 and a.doctor = b.code and a.id < ?2 and a.del = '1' order by a.id desc")
	@Query("select b.name, b.photo, a.id, a.content, a.czrq,b.level,a.readStatus from PatientHealthGuidance a, Doctor b where a.patient = ?1 and a.doctor = b.code and a.id < ?2 and a.del = '1' order by a.id desc")
	Page<Object> findByPatient(String patient, long id, Pageable pageRequest);
	Page<Object> findByPatient(String patient, long id, Pageable pageRequest);
	
	
	@Query("select b.name, b.photo, a.id, a.content, a.czrq from PatientHealthGuidance a, Patient b where a.doctor = ?1 and a.patient = b.code and a.del = '1' order by a.id desc")
	@Query("select b.name, b.photo, a.id, a.content, a.czrq from PatientHealthGuidance a, Patient b where a.doctor = ?1 and a.patient = b.code and a.del = '1' order by a.id desc")

+ 2 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthGuidanceService.java

@ -232,7 +232,7 @@ public class PatientHealthGuidanceService extends BaseService {
		if (page != null) {
		if (page != null) {
			for (Object obj : page) {
			for (Object obj : page) {
				Object[] temp = (Object[]) obj;
				Object[] temp = (Object[]) obj;
				if (temp == null || temp.length != 6) {
				if (temp == null || temp.length != 7) {
					continue;
					continue;
				}
				}
//				控制返回内容50字以内
//				控制返回内容50字以内
@ -250,6 +250,7 @@ public class PatientHealthGuidanceService extends BaseService {
				json.put("content", contain);
				json.put("content", contain);
				json.put("czrq", DateUtil.dateToStrLong((Date) temp[4]));
				json.put("czrq", DateUtil.dateToStrLong((Date) temp[4]));
				json.put("level", temp[5]);
				json.put("level", temp[5]);
				json.put("readStatus", temp[6]);
				array.put(json);
				array.put(json);
			}
			}
		}
		}