浏览代码

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

chenweida 8 年之前
父节点
当前提交
83f98e2a1d
共有 16 个文件被更改,包括 686 次插入217 次删除
  1. 84 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/education/HealthEduArticleOpHistory.java
  2. 16 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/education/HealthEduArticleOpHistoryDao.java
  3. 6 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/education/HealthEduArticlePatientDao.java
  4. 3 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/SignFamilyDao.java
  5. 46 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java
  6. 89 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/HealthEduArticleOpHistoryService.java
  7. 96 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/HealthEduArticlePatientService.java
  8. 20 9
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/HealthEduArticleService.java
  9. 101 135
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java
  10. 5 0
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/ExpensesRemindService.java
  11. 2 2
      patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsAllService.java
  12. 16 2
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java
  13. 100 14
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthEduArticleController.java
  14. 35 41
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java
  15. 59 6
      patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/health/HealthEduArticleController.java
  16. 8 8
      patient-co-wlyy/src/main/webapp/WEB-INF/web.xml

+ 84 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/education/HealthEduArticleOpHistory.java

@ -0,0 +1,84 @@
package com.yihu.wlyy.entity.education;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 健康教育文章操作历史表
 * @author linz
 *
 */
@Entity
@Table(name = "wlyy_health_edu_article_op_history")
public class HealthEduArticleOpHistory extends IdEntity {
	// 文章标识
	private String code;
	// 文章标题
	private String title;
	// 操作类型1.阅读 2.收藏 3.转发
	private String status;
	// 操作人
	private String creater;
	// 发布时间
	private Date createdTime;
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getCreater() {
		return creater;
	}
	public void setCreater(String creater) {
		this.creater = creater;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getCreatedTime() {
		return createdTime;
	}
	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}
	/**
	 * 阅读状态
	 */
	public static final String READ_STATUS ="1";
	/**
	 * 收藏状态
	 */
	public static final String COLLECTION_STATUS ="2";
	/**
	 * 转发状态
	 */
	public static final String REPEAT_STATUS ="3";
}

+ 16 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/education/HealthEduArticleOpHistoryDao.java

@ -0,0 +1,16 @@
package com.yihu.wlyy.repository.education;
import com.yihu.wlyy.entity.education.HealthEduArticleOpHistory;
import com.yihu.wlyy.entity.education.HealthEduArticlePatient;
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;
public interface HealthEduArticleOpHistoryDao extends PagingAndSortingRepository<HealthEduArticleOpHistory, Long>, JpaSpecificationExecutor<HealthEduArticleOpHistory> {
	@Query("select count(1) from HealthEduArticleOpHistory a where a.code = ?1 and a.status = ?2")
	int countByCodeStatus(String code,String status);
	@Query("select count(1) from HealthEduArticleOpHistory a where a.creater = ?1 and a.status = ?2")
	int countByUserStatus(String user,String status);
}

+ 6 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/education/HealthEduArticlePatientDao.java

@ -7,10 +7,16 @@ import org.springframework.data.repository.PagingAndSortingRepository;
import com.yihu.wlyy.entity.education.HealthEduArticlePatient;
import java.util.List;
public interface HealthEduArticlePatientDao extends PagingAndSortingRepository<HealthEduArticlePatient, Long>, JpaSpecificationExecutor<HealthEduArticlePatient> {
	// 更新为已读
	@Modifying
	@Query("update HealthEduArticlePatient a set a.read = 0 where a.patient = ?1 and a.article = ?2 ")
	int updateRead(String patient, String article);
	HealthEduArticlePatient findByArticle(String article);
	List<HealthEduArticlePatient> findByArticleAndPatient(String article,String patient);
}

+ 3 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/SignFamilyDao.java

@ -308,4 +308,7 @@ public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Lo
	@Query("select a from SignFamily a where a.patient = ?1 and a.status >= 0")
	List<SignFamily> findAllSignByPatient(String patient);
	@Query("select a.patient from SignFamily a where a.doctor = ?1 and a.type = 2 and a.status > 0 and a.doctorHealth is null")
	List<String> findNohealthByDoctor(String doctor);
}

+ 46 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java

@ -785,6 +785,52 @@ public class DoctorInfoService extends BaseService {
        }
    }
    @Transactional
    public int updateTeamHealthDoctorsAll(String newDoctorCode,String doctor) throws Exception {
        List<String> patients = signFamilyDao.findNohealthByDoctor(doctor);
        boolean hasNoTeam = false;
        if(patients != null){
            for (String patient : patients) {
                try {
                    if(updateTeamHealthDoctorAll(newDoctorCode, patient) == -1){
                        hasNoTeam = true;
                    }
                }catch (Exception e){
                    e.printStackTrace();
                }
            }
        }
        return hasNoTeam ? 2 : 1;
    }
    @Transactional
    public int updateTeamHealthDoctorAll(String newDoctorCode, String patient) throws Exception {
        //得到患者的签约信息
        SignFamily signFamily = signFamilyDao.findByPatient(patient);
        if(StringUtils.isEmpty(signFamily.getTeamCode())){
            return -1;
        }
        Doctor newD = doctorDao.findByCode(newDoctorCode);
        //修改签约中的健康管理师
        signFamily.setDoctorHealth(newD.getCode());
        signFamily.setDoctorHealthName(newD.getName());
        //添加新的健康管理师到服务团队里
        DoctorTeamMember newDoctorTeamMember = new DoctorTeamMember();
        newDoctorTeamMember.setTeam(signFamily.getTeamCode());
        newDoctorTeamMember.setCzrq(new Date());
        newDoctorTeamMember.setName(newD.getName());
        newDoctorTeamMember.setMemberCode(newD.getCode());
        newDoctorTeamMember.setType(3);
        newDoctorTeamMember.setSignType("2");
        newDoctorTeamMember.setDel("1");
        newDoctorTeamMember.setCode(UUID.randomUUID().toString().replace("-", ""));
        doctorTeamDoctor.save(newDoctorTeamMember);
        return 1;
    }
    /**
     * 医生更换手机号
     *

+ 89 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/HealthEduArticleOpHistoryService.java

@ -0,0 +1,89 @@
package com.yihu.wlyy.service.app.health;
import com.yihu.wlyy.entity.IdEntity;
import com.yihu.wlyy.entity.education.HealthEduArticleOpHistory;
import com.yihu.wlyy.entity.education.HealthEduArticlePatient;
import com.yihu.wlyy.repository.education.HealthEduArticleOpHistoryDao;
import com.yihu.wlyy.repository.education.HealthEduArticlePatientDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.util.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springside.modules.persistence.DynamicSpecifications;
import org.springside.modules.persistence.SearchFilter;
import org.springside.modules.persistence.SearchFilter.Operator;
import java.util.HashMap;
import java.util.Map;
/**
 * 健康教育患者业务逻辑类
 * @author linz
 *
 */
@Component
@Transactional(rollbackFor = Exception.class)
public class HealthEduArticleOpHistoryService extends BaseService {
	@Autowired
	private HealthEduArticleOpHistoryDao healthEduArticleOpHistoryDao;
	/**
	 * 汇总阅读量
	 * @param code
	 * @return
	 */
	public  int countReadAmount(String code){
		return healthEduArticleOpHistoryDao.countByCodeStatus(code,HealthEduArticleOpHistory.READ_STATUS);
	}
	/**
	 * 汇总转发量
	 * @param code
	 * @return
	 */
	public int countRepeatAmount(String code){
		return healthEduArticleOpHistoryDao.countByCodeStatus(code,HealthEduArticleOpHistory.COLLECTION_STATUS);
	}
	/**
	 * 获取收藏量
	 * @param code
	 * @return
	 */
	public  int countCollectionAmount(String code){
		return healthEduArticleOpHistoryDao.countByCodeStatus(code,HealthEduArticleOpHistory.REPEAT_STATUS);
	}
	public int countByUserStatus(String user,String status){
		return healthEduArticleOpHistoryDao.countByCodeStatus(user,status);
	}
	/**
	 *
	 * @param status 状态
	 * @param code 文章编号
	 * @param title 文章标题
	 * @param user 操作人
	 * @return
	 */
	public HealthEduArticleOpHistory saveByStatus(String status,String code,String title,String user){
		HealthEduArticleOpHistory healthEduArticleOpHistory = new HealthEduArticleOpHistory();
		healthEduArticleOpHistory.setCode(code);
		healthEduArticleOpHistory.setCreatedTime(DateUtil.getNow());
		healthEduArticleOpHistory.setStatus(status);
		healthEduArticleOpHistory.setTitle(title);
		healthEduArticleOpHistory.setCreater(user);
		healthEduArticleOpHistory.setId(0L);
		healthEduArticleOpHistoryDao.save(healthEduArticleOpHistory);
		return healthEduArticleOpHistory;
	}
}

+ 96 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/HealthEduArticlePatientService.java

@ -0,0 +1,96 @@
package com.yihu.wlyy.service.app.health;
import com.yihu.wlyy.entity.education.HealthEduArticle;
import com.yihu.wlyy.entity.education.HealthEduArticlePatient;
import com.yihu.wlyy.repository.education.HealthEduArticleDao;
import com.yihu.wlyy.repository.education.HealthEduArticlePatientDao;
import com.yihu.wlyy.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springside.modules.persistence.DynamicSpecifications;
import org.springside.modules.persistence.SearchFilter;
import org.springside.modules.persistence.SearchFilter.Operator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/**
 * 健康教育患者业务逻辑类
 * @author linz
 *
 */
@Component
@Transactional(rollbackFor = Exception.class)
public class HealthEduArticlePatientService extends BaseService {
	@Autowired
	private HealthEduArticlePatientDao healthEduArticlePatientDao;
	/**
	 * 根据文章标示获取数据
	 * @param article
	 * @return
	 *
	 */
	@Deprecated
	public HealthEduArticlePatient findByArticle(String article) {
		return healthEduArticlePatientDao.findByArticle(article);
	}
	/**
	 * 根据文章id获取数据
	 * @param id
	 * @return
	 */
	public HealthEduArticlePatient findById(Long id) {
		return healthEduArticlePatientDao.findOne(id);
	}
	public List<HealthEduArticlePatient> findByArticleAndPatient(String article,String patient) {
		return healthEduArticlePatientDao.findByArticleAndPatient(article, patient);
	}
	/**
	 * 查询患者文章
	 * @param patient 患者标识
	 * @param pagesize 分页大小
	 * @return
	 */
	public Page<HealthEduArticlePatient> findByPatient(String patient, long id, int pagesize) {
		if (pagesize <= 0) {
			pagesize = 10;
		}
		// 排序
		Sort sort = new Sort(Direction.DESC, "id");
		// 分页信息
		PageRequest pageRequest = new PageRequest(0, pagesize, sort);
		// 设置查询条件
		Map<String, SearchFilter> filters = new HashMap<String, SearchFilter>();
		// 患者过滤
		filters.put("patient", new SearchFilter("patient", Operator.EQ, patient));
		if (id > 0) {
			filters.put("id", new SearchFilter("id", Operator.LT, id));
		}
		Specification<HealthEduArticlePatient> spec = DynamicSpecifications.bySearchFilter(filters.values(), HealthEduArticlePatient.class);
		return healthEduArticlePatientDao.findAll(spec, pageRequest);
	}
	/**
	 * 文章更新为已读
	 * @param patient
	 * @param article
	 * @return
	 */
	public int updateRead(String patient, String article) {
		return healthEduArticlePatientDao.updateRead(patient, article);
	}
}

+ 20 - 9
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/HealthEduArticleService.java

@ -1,10 +1,11 @@
package com.yihu.wlyy.service.app.health;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.io.File;
import java.util.*;
import com.yihu.wlyy.entity.education.HealthEduArticleOpHistory;
import com.yihu.wlyy.entity.patient.PatientHealthRecordMedication;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
@ -36,6 +37,8 @@ public class HealthEduArticleService extends BaseService {
	private HealthEduArticleDao healthEduArticleDao;
	@Autowired
	private HealthEduArticlePatientDao healthEduArticlePatientDao;
	@Autowired
	private HealthEduArticleOpHistoryService healthEduArticleOpHistoryService;
	/**
	 * 查询文章信息
@ -52,20 +55,23 @@ public class HealthEduArticleService extends BaseService {
	 * @param pagesize 分页大小
	 * @return 列表
	 */
	public Page<HealthEduArticle> findAll(long id, int pagesize) {
	public Page<HealthEduArticle> findAll(int page, int pagesize,String filter) {
		if (pagesize <= 0) {
			pagesize = 10;
		}
		if(page<0){
			page = 0;
		}
		// 排序
		Sort sort = new Sort(Direction.DESC, "id");
		// 分页信息
		PageRequest pageRequest = new PageRequest(0, pagesize, sort);
		PageRequest pageRequest = new PageRequest(page, pagesize, sort);
		// 设置查询条件
		Map<String, SearchFilter> filters = new HashMap<String, SearchFilter>();
		if (id > 0) {
			filters.put("id", new SearchFilter("id", Operator.LT, id));
		if (StringUtils.isNotBlank(filter)) {
			filters.put("title", new SearchFilter("filter", Operator.LIKE, filter));
		}
		Specification<HealthEduArticle> spec = DynamicSpecifications.bySearchFilter(filters.values(), HealthEduArticle.class);
		Specification<HealthEduArticle> spec = DynamicSpecifications.bySearchFilter(filters.values(),HealthEduArticle.class);
		return healthEduArticleDao.findAll(spec, pageRequest);
	}
@ -111,11 +117,16 @@ public class HealthEduArticleService extends BaseService {
	 */
	public int send(List<HealthEduArticlePatient> list) {
		Iterable<HealthEduArticlePatient> iterable = healthEduArticlePatientDao.save(list);
		//记录转发量
		for(HealthEduArticlePatient healthEduArticlePatient:list){
			healthEduArticleOpHistoryService.saveByStatus(HealthEduArticleOpHistory.COLLECTION_STATUS,healthEduArticlePatient.getArticle(),healthEduArticlePatient.getTitle(),healthEduArticlePatient.getDoctor());
		}
		Iterator<HealthEduArticlePatient> iterator = iterable.iterator();
		if (iterator.hasNext()) {
			return 1;
		} else {
			return 0;
		}
	}
}

+ 101 - 135
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java

@ -1,6 +1,7 @@
package com.yihu.wlyy.service.app.label;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
import com.yihu.wlyy.entity.doctor.team.sign.DoctorPatientGroupInfo;
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabel;
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabelInfo;
@ -14,6 +15,7 @@ import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.patient.PatientDiseaseDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.IdCardUtil;
import org.apache.commons.beanutils.converters.CalendarConverter;
@ -57,6 +59,8 @@ public class SignPatientLabelInfoService extends BaseService {
    SignFamilyDao signFamilyDao;
    @Autowired
    StringRedisTemplate redisTemplate;
    @Autowired
    AdminTeamService adminTeamService;
    /**
     * 查询单个居民信息
@ -243,7 +247,7 @@ public class SignPatientLabelInfoService extends BaseService {
        }
        String sqlDoc = sql.replaceAll("repdoctor", "doctor");
        String sqlDocHealth = sql.replaceAll("repdoctor", "doctor_health").replaceAll("t1", "t3").replaceAll("t2", "t4").replaceAll("repf","repf1").replaceAll("repl","repl1");
        String sqlDocHealth = sql.replaceAll("repdoctor", "doctor_health").replaceAll("t1", "t3").replaceAll("t2", "t4").replaceAll("repf", "repf1").replaceAll("repl", "repl1");
        sql = "select t.* from (" + sqlDoc + " union all " + sqlDocHealth + ") t limit " + start + "," + pagesize;
@ -612,7 +616,7 @@ public class SignPatientLabelInfoService extends BaseService {
                }
                String sqlDoc = sql.replaceAll("repdoctor", "doctor");
                String sqlDocHealth = sql.replaceAll("repdoctor", "doctor_health").replaceAll("t1", "t3").replaceAll("t2", "t4").replaceAll("repf","repf1").replaceAll("repl","repl1");
                String sqlDocHealth = sql.replaceAll("repdoctor", "doctor_health").replaceAll("t1", "t3").replaceAll("t2", "t4").replaceAll("repf", "repf1").replaceAll("repl", "repl1");
                sql = "select count(DISTINCT t.patient) count from (" + sqlDoc + " union all " + sqlDocHealth + ") t";
@ -978,6 +982,101 @@ public class SignPatientLabelInfoService extends BaseService {
        return result.size() > 0 ? new JSONArray(result.values()) : new JSONArray();
    }
    /**
     * 查询所有团队下患者
     *
     * @param filter 搜索关键字
     * @param doctor 医生
     * @return
     */
    public JSONArray searchTeamsPatients(String filter, String doctor, long teamCode, int page, int pagesize) throws Exception {
        JSONArray reArray = new JSONArray();
        Map<String, JSONArray> map = new HashMap<>();
        Map<Long, AdminTeam> teamMap = new HashMap<>();
        List<AdminTeam> teams = null;
        int start = page * pagesize;
        int size = pagesize;
        if (teamCode > 0) {
            teams = new ArrayList<>();
            AdminTeam team = adminTeamService.getTeam(teamCode);
            if (team == null) {
                throw new Exception("adminTeam is not exist");
            }
            teams.add(team);
        } else {
            teams = adminTeamService.getDoctorTeams(doctor);
        }
        String sql = "select distinct t.* from (" +
                " select " +
                "     patient " +
                "     ,name " +
                "     ,openid " +
                "     ,admin_team_code " +
                " from " +
                "     wlyy_sign_family " +
                " where " +
                "      doctor = ? and admin_team_code = ? and status > 0 and name like ? " +
                " union all " +
                "select " +
                "     patient " +
                "     ,name " +
                "     ,openid " +
                "     ,admin_team_code " +
                " from " +
                "     wlyy_sign_family " +
                " where " +
                "      doctor_health = ? and admin_team_code = ? and status > 0 and name like ? " +
                ") t " + (page < 0 ? "" :"limit " + start + "," + size);
        if (teams != null) {
            for (AdminTeam team : teams) {
                teamMap.put(team.getId(), team);
                List<Map<String, Object>> result = jdbcTemplate.queryForList(sql, new Object[]{doctor, team.getId(),
                        "%" + filter + "%", doctor, team.getId(), "%" + filter + "%"});
                if (result != null && result.size() > 0) {
                    for (Map<String, Object> p : result) {
                        JSONObject pJson = new JSONObject();
                        pJson.put("code", String.valueOf(p.get("patient")));
                        pJson.put("name", String.valueOf(p.get("name")));
                        pJson.put("openid", String.valueOf(p.get("openid")));
                        pJson.put("adminTeamCode", String.valueOf(p.get("admin_team_code")));
                        List<SignPatientLabelInfo> labels = labelInfoDao.findByPatientAndStatus(String.valueOf(p.get("patient")), 1);
                        pJson.put("labels", labels == null ? "" : labels);
                        if (map.containsKey(String.valueOf(p.get("admin_team_code")))) {
                            JSONArray array = map.get(String.valueOf(p.get("admin_team_code")));
                            array.put(pJson);
                        } else {
                            JSONArray array = new JSONArray();
                            array.put(pJson);
                            map.put(String.valueOf(p.get("admin_team_code")), array);
                        }
                    }
                }
            }
            if (map != null && map.size() > 0) {
                for (String key : map.keySet()) {
                    AdminTeam team = teamMap.get(Long.valueOf(key));
                    JSONObject tJson = new JSONObject();
                    tJson.put("teamCode", team.getId());
                    tJson.put("teamName", team.getName());
                    tJson.put("patients", map.get(key));
                    reArray.put(tJson);
                }
            }
        }
        return reArray;
    }
    /**
     * 添加居民到某个标签
     *
@ -1121,137 +1220,4 @@ public class SignPatientLabelInfoService extends BaseService {
        return 1;
    }
    /**
     * 疾病转标签
     *
     * @return
     */
    public boolean diseaseToLabel() {
        List<PatientDisease> diseases = diseaseDao.findByDel("1");
        Iterator<Patient> patients = patientDao.findAll().iterator();
        Map<String, String> patientNames = new HashMap<>();
        while (patients.hasNext()) {
            Patient p = patients.next();
            patientNames.put(p.getCode(), p.getName());
        }
        for (PatientDisease disease : diseases) {
            SignPatientLabelInfo labelInfo = new SignPatientLabelInfo();
            labelInfo.setPatient(disease.getPatient());
            labelInfo.setPname(patientNames.get(disease.getPatient()));
            labelInfo.setLabel(disease.getDisease());
            labelInfo.setLabelName(disease.getDiseaseName());
            labelInfo.setLabelType("3");
            labelInfo.setStatus(1);
            labelInfo.setCzrq(new Date());
            labelInfoDao.save(labelInfo);
        }
        return true;
    }
    /**
     * 分组转标签
     *
     * @return
     */
    public boolean groupToLabel() throws Exception {
        Iterator<Patient> patients = patientDao.findAll().iterator();
        Map<String, Patient> patientNames = new HashMap<>();
        Map<String, SignPatientLabelInfo> normalLabel = new HashMap<>();
        Map<String, SignPatientLabelInfo> manbingLabel = new HashMap<>();
        Map<String, SignPatientLabelInfo> sixFiveLabel = new HashMap<>();
        while (patients.hasNext()) {
            Patient p = patients.next();
            patientNames.put(p.getCode(), p);
        }
        List<DoctorPatientGroupInfo> groupInfos = groupInfoDao.findByGroupAndStatus("1", 1);
        for (DoctorPatientGroupInfo groupInfo : groupInfos) {
            Patient p = patientNames.get(groupInfo.getPatient());
            if (p == null) {
                continue;
            }
            SignPatientLabelInfo labelInfo = new SignPatientLabelInfo();
            labelInfo.setPatient(p.getCode());
            labelInfo.setPname(p.getName());
            labelInfo.setLabel("1");
            labelInfo.setLabelName("普通人群");
            labelInfo.setLabelType("1");
            labelInfo.setStatus(1);
            labelInfo.setCzrq(new Date());
            normalLabel.put(p.getCode(), labelInfo);
        }
        List<DoctorPatientGroupInfo> groupInfos1 = groupInfoDao.findByGroupAndStatus("2", 1);
        for (DoctorPatientGroupInfo groupInfo : groupInfos1) {
            Patient p = patientNames.get(groupInfo.getPatient());
            if (p == null) {
                continue;
            }
            SignPatientLabelInfo labelInfo = new SignPatientLabelInfo();
            labelInfo.setPatient(p.getCode());
            labelInfo.setPname(p.getName());
            labelInfo.setLabel("2");
            labelInfo.setLabelName("慢病人群");
            labelInfo.setLabelType("1");
            labelInfo.setStatus(1);
            labelInfo.setCzrq(new Date());
            manbingLabel.put(p.getCode(), labelInfo);
        }
        List<DoctorPatientGroupInfo> groupInfos2 = groupInfoDao.findByGroupAndStatus("3", 1);
        for (DoctorPatientGroupInfo groupInfo : groupInfos2) {
            Patient p = patientNames.get(groupInfo.getPatient());
            if (p == null) {
                continue;
            }
            SignPatientLabelInfo labelInfo = new SignPatientLabelInfo();
            labelInfo.setPatient(p.getCode());
            labelInfo.setPname(p.getName());
            labelInfo.setLabel("3");
            labelInfo.setLabelName("65岁以上人群");
            labelInfo.setLabelType("1");
            labelInfo.setStatus(1);
            labelInfo.setCzrq(new Date());
            sixFiveLabel.put(p.getCode(), labelInfo);
        }
        if (normalLabel.size() > 0) {
            for (SignPatientLabelInfo labelInfo : normalLabel.values()) {
                labelInfoDao.save(labelInfo);
            }
        }
        if (manbingLabel.size() > 0) {
            for (SignPatientLabelInfo labelInfo : manbingLabel.values()) {
                labelInfoDao.save(labelInfo);
            }
        }
        if (sixFiveLabel.size() > 0) {
            for (SignPatientLabelInfo labelInfo : sixFiveLabel.values()) {
                labelInfoDao.save(labelInfo);
            }
        }
        return true;
    }
}

+ 5 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/ExpensesRemindService.java

@ -103,6 +103,11 @@ public class ExpensesRemindService extends BaseService {
                    Patient p = patientDao.findByCode(String.valueOf(map.get("patient")));
                    if (p != null) {
                        String epTime = redisTemplate.opsForValue().get("expenses:remind:" + p.getCode());
                        if(StringUtils.isNotEmpty(epTime) &&
                                new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime)) {
                            continue;
                        }
                        remindPatientExpenses(p, doc, hos, true);
                    }
                }

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsAllService.java

@ -353,8 +353,8 @@ public class StatisticsAllService extends BaseService {
                    num = peopleNum.getInt("gxyNum");
                    taskNum = peopleNum.getInt("gxyTaskNum");
                } else if (lowCode.equals("2")) {
                    num = peopleNum.getInt("gxyNum");
                    taskNum = peopleNum.getInt("gxyTaskNum");
                    num = peopleNum.getInt("tnbNum");
                    taskNum = peopleNum.getInt("tnbTaskNum");
                }
            }
        }

+ 16 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java

@ -1472,9 +1472,23 @@ public class DoctorController extends BaseController {
    @ResponseBody
    public String updateTeamHealthDoctors(String newDoctorCode,
                                          @RequestParam(required = false) String oldDoctorCode,
                                          String patients) {
                                          @RequestParam(required = false) String patients,
                                          @RequestParam(required = false) String isAll) {
        try {
            doctorInfoService.updateTeamHealthDoctors(newDoctorCode, oldDoctorCode, patients);
            if (StringUtils.isNotEmpty(isAll) && isAll.equals("1")) {
                int result = doctorInfoService.updateTeamHealthDoctorsAll(newDoctorCode, getUID());
                if(result == 1){
                    return write(200,"分配健管师成功");
                } else if(result == 2){
                    return write(200,"部分居民因没有服务团队分配失败");
                }
            } else {
                if (StringUtils.isEmpty(patients)) {
                    return error(-1, "居民不能为空");
                }
                doctorInfoService.updateTeamHealthDoctors(newDoctorCode, oldDoctorCode, patients);
            }
            return write(200, "更新成功");
        } catch (Exception e) {
            e.printStackTrace();

+ 100 - 14
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthEduArticleController.java

@ -1,11 +1,11 @@
package com.yihu.wlyy.web.doctor.health;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import com.yihu.wlyy.entity.education.HealthEduArticleOpHistory;
import com.yihu.wlyy.service.app.health.HealthEduArticleOpHistoryService;
import com.yihu.wlyy.service.app.health.HealthEduArticlePatientService;
import com.yihu.wlyy.service.app.label.SignPatientLabelInfoService;
import io.swagger.annotations.Api;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
@ -16,6 +16,7 @@ import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
@ -42,7 +43,14 @@ public class DoctorHealthEduArticleController extends BaseController {
	private HealthEduArticleService healthEduArticleService;
	@Autowired
	private DoctorService doctorService;
	@Autowired
	private HealthEduArticleOpHistoryService healthEduArticleOpHistoryService;
	@Autowired
	private SignPatientLabelInfoService signPatientLabelInfoService;
	@Autowired
	private HealthEduArticlePatientService healthEduArticlePatientService;
	/**
	 * 查询
	 * @param pagesize 分页大小
@ -50,9 +58,9 @@ public class DoctorHealthEduArticleController extends BaseController {
	 */
	@RequestMapping(value = "list")
	@ResponseBody
	public String list(long id, int pagesize) {
	public String list(@RequestParam(value = "page",required = true)int page, @RequestParam(value = "pagesize",required = true)int pagesize,@RequestParam(value = "filter",required = false)String filter) {
		try {
			Page<HealthEduArticle> list = healthEduArticleService.findAll(id, pagesize);
			Page<HealthEduArticle> list = healthEduArticleService.findAll(page, pagesize,filter);
			JSONArray jsonArray = new JSONArray();
			if (list != null) {
				for (HealthEduArticle article : list) {
@ -68,6 +76,18 @@ public class DoctorHealthEduArticleController extends BaseController {
					json.put("content", article.getContent());
					// 添加日期
					json.put("czrq", DateUtil.dateToStrLong(article.getCzrq()));
					int collectionAmount =  healthEduArticleOpHistoryService.countCollectionAmount(article.getCode());
					int readAmount = healthEduArticleOpHistoryService.countReadAmount(article.getCode());
					int repeatAmount = healthEduArticleOpHistoryService.countRepeatAmount(article.getCode());
					//阅读量
					json.put("readAmount", readAmount);
					//收藏量
					json.put("collectionAmount", collectionAmount);
					//转发量
					json.put("repeatAmount", repeatAmount);
					//是否收藏
					json.put("collection",1);
					jsonArray.put(json);
				}
			}
@ -78,36 +98,90 @@ public class DoctorHealthEduArticleController extends BaseController {
		}
	}
	/**
	 * 查询文章列表
	 * @param code 数据文章唯一标示code
	 * @return 列表
	 */
	@RequestMapping(value = "article")
	@ResponseBody
	public String article(@RequestParam(value = "code",required = true) String code) {
		try {
			//获取单条文章记录
			HealthEduArticle healthEduArticle = healthEduArticleService.findArticleByCode(code);
			int isRead  = healthEduArticleOpHistoryService.countByUserStatus(getUID(), HealthEduArticleOpHistory.READ_STATUS);
			//插入文章读取状态第一次阅读记录浏览数量
			if(isRead==0){
				//更新浏览量
				healthEduArticleOpHistoryService.saveByStatus(HealthEduArticleOpHistory.READ_STATUS,healthEduArticle.getCode(),healthEduArticle.getTitle(),getUID());
			}
			JSONObject json = new JSONObject();
			json.put("id", healthEduArticle.getId());
			// 文章标识
			json.put("code", healthEduArticle.getCode());
			// 文章标题
			json.put("title", healthEduArticle.getTitle());
			// 文章内容
			json.put("content", healthEduArticle.getContent());
			// 添加日期
			json.put("czrq", DateUtil.dateToStrLong(healthEduArticle.getCzrq()));
			int readAmount = healthEduArticleOpHistoryService.countReadAmount(code);
			json.put("readAmount",readAmount);
			json.put("collection",1);
			return write(200, "查询成功", "data", json);
		} catch (Exception ex) {
			error(ex);
			return invalidUserException(ex, -1, "查询失败!");
		}
	}
	/**
	 * 发送文章给患者
	 * @param article 文章标识,多个以逗号分隔
	 * @param code 文章标识,多个以逗号分隔
	 * @param patient 患者标识,多个以逗号分隔
	 * @param  group 所选群组,多个用逗号分隔
	 * @return
	 */
	@RequestMapping(value = "send")
	@ResponseBody
	public String send(String article, String patient) {
	public String send(@RequestParam(value = "code")String code,
					   @RequestParam(value = "patient",required = false)String patient,
					   @RequestParam(value = "group",required = false,defaultValue = "")String group,
					   @RequestParam(value = "labelType",required = false)String labelType,
					   @RequestParam(value = "labelCode",required = false)String labelCode,
					   @RequestParam(value = "teamCode",required = false)long teamCode) {
		try {
			List<HealthEduArticlePatient> list = new ArrayList<HealthEduArticlePatient>();
			if (StringUtils.isEmpty(article)) {
			if (StringUtils.isEmpty(code)) {
				return error(-1, "请至少选择一篇文章!");
			}
			if (StringUtils.isEmpty(patient)) {
			if (StringUtils.isEmpty(patient)&&StringUtils.isEmpty(group)) {
				return error(-1, "请至少选择一个患者!");
			}
			String[] articles = article.split(",");
			String[] articles = code.split(",");
			String[] patients = patient.split(",");
			String[] groups = group.split(",");
			if (articles.length == 0) {
				return error(-1, "请至少选择一篇文章!");
			}
			if (patients.length == 0) {
			if (patients.length == 0&&groups.length==0) {
				return error(-1, "请至少选择一个患者!");
			}
			Map<String, HealthEduArticle> maps = new HashMap<String, HealthEduArticle>();
			Set<String> patientSet = new HashSet<>();
			if(StringUtils.isNotBlank(group)&&groups.length>0){
				//递归患者数据
				getPatientByGroup(labelCode,labelType,teamCode,patientSet,1,100);
			}
			//去重操作
			for (String p : patients) {
				patientSet.add(p);
			}
			// 查询医生信息
			Doctor doctor = doctorService.findDoctorByCode(getUID());
			JSONArray messages = new JSONArray();
			for (String p : patients) {
			for (String p : patientSet) {
				for (String a : articles) {
					// 查询文章信息
					HealthEduArticle temp = maps.get(a);
@ -116,6 +190,7 @@ public class DoctorHealthEduArticleController extends BaseController {
						// 添加到缓存
						maps.put(a, temp);
					}
					HealthEduArticlePatient heap = new HealthEduArticlePatient();
					// 设置文章标识
					heap.setArticle(a);
@ -159,5 +234,16 @@ public class DoctorHealthEduArticleController extends BaseController {
			return error(-1, "发送失败!");
		}
	}
	private void getPatientByGroup(String labelCode, String labelType, Long teamCode,Set<String> patientSet,int page,int pagesize) throws Exception{
		JSONArray result = signPatientLabelInfoService.getPatientByLabel(getUID(), labelCode, labelType, teamCode, page, pagesize);
		for(Object o : result){
			JSONObject json  = (JSONObject)o;
			String patient  = (String)json.get("code");
			patientSet.add(patient);
		}
		if(result.length()==100){
			getPatientByGroup( labelCode,labelType,teamCode,patientSet,page+1,pagesize);
		}
	}
}

+ 35 - 41
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java

@ -3,14 +3,13 @@ package com.yihu.wlyy.web.doctor.patient;
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabelInfo;
import com.yihu.wlyy.service.app.label.SignPatientLabelInfoService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -21,6 +20,7 @@ import java.util.List;
 */
@RestController
@RequestMapping(value = "/doctor/patient_label_info")
@Api("居民管理")
public class SignPatientLabelInfoController extends BaseController {
    @Autowired
@ -33,17 +33,16 @@ public class SignPatientLabelInfoController extends BaseController {
     * @return
     */
    @RequestMapping(value = "/patient")
    @ResponseBody
    public String getPatient(String patient){
        try{
            if(StringUtils.isEmpty(patient)){
                return error(-1,"居民不能为空");
    public String getPatient(String patient) {
        try {
            if (StringUtils.isEmpty(patient)) {
                return error(-1, "居民不能为空");
            }
            JSONObject p = labelInfoService.getPatient(patient);
            return write(200,"查询成功","data",p);
        }catch (Exception e){
            return write(200, "查询成功", "data", p);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1,"查询失败");
            return error(-1, "查询失败");
        }
    }
@ -102,7 +101,7 @@ public class SignPatientLabelInfoController extends BaseController {
            }
            page = page - 1;
            JSONArray result = labelInfoService.getPatientByTeamCode(getUID(), teamCode, exLabelCode,exLabelType,page, pagesize);
            JSONArray result = labelInfoService.getPatientByTeamCode(getUID(), teamCode, exLabelCode, exLabelType, page, pagesize);
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
@ -207,13 +206,13 @@ public class SignPatientLabelInfoController extends BaseController {
     * @return
     */
    @RequestMapping(value = "/patient_search")
    public String searchPatientByNameOrLabel(@RequestParam(required = true)String filter,
    public String searchPatientByNameOrLabel(@RequestParam(required = true) String filter,
                                             @RequestParam(required = false) String labelCode,
                                             @RequestParam(required = false) String labelType,
                                             @RequestParam(required = false) Long teamCode,
                                             @RequestParam(required = false) String exLabelCode,
                                             @RequestParam(required = false) String exLabelType,
                                             @RequestParam(required = true)int page, @RequestParam(required = true)int pagesize) {
                                             @RequestParam(required = true) int page, @RequestParam(required = true) int pagesize) {
        try {
            if (StringUtils.isEmpty(filter)) {
                return error(-1, "搜索字段不能为空");
@ -242,6 +241,27 @@ public class SignPatientLabelInfoController extends BaseController {
        }
    }
    @RequestMapping(value = "/patient_search_all", method = RequestMethod.GET)
    @ApiOperation("根据姓名搜索所有团队下居民")
    public String searchPatients(@RequestParam(required = true) String filter,
                                 @RequestParam(required = false, defaultValue = "0") long teamCode,
                                 @RequestParam(required = false, defaultValue = "0") int page,
                                 @RequestParam(required = false, defaultValue = "15") int pagesize) {
        try {
            if (StringUtils.isEmpty(filter)) {
                return error(-1, "查询参数不能为空");
            }
            JSONArray result = labelInfoService.searchTeamsPatients(filter, getUID(), teamCode, page, pagesize);
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "查询失败");
        }
    }
    /**
     * 添加居民到某个标签
     *
@ -353,31 +373,5 @@ public class SignPatientLabelInfoController extends BaseController {
        }
    }
    @RequestMapping(value = "/disease_to_label")
    public String diseaseToLabel() {
        try {
            if (labelInfoService.diseaseToLabel()) {
                return write(200, "转换成功");
            } else {
                return error(-1, "转换失败");
            }
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "转换失败");
        }
    }
    @RequestMapping(value = "/group_to_label")
    public String groupToLabel() {
        try {
            if (labelInfoService.groupToLabel()) {
                return write(200, "转换成功");
            } else {
                return error(-1, "转换失败");
            }
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, "转换失败");
        }
    }
}

+ 59 - 6
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/health/HealthEduArticleController.java

@ -1,5 +1,8 @@
package com.yihu.wlyy.web.patient.health;
import com.yihu.wlyy.entity.education.HealthEduArticleOpHistory;
import com.yihu.wlyy.service.app.health.HealthEduArticleOpHistoryService;
import com.yihu.wlyy.service.app.health.HealthEduArticlePatientService;
import io.swagger.annotations.Api;
import org.json.JSONArray;
import org.json.JSONObject;
@ -9,6 +12,7 @@ import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.yihu.wlyy.entity.education.HealthEduArticlePatient;
@ -27,7 +31,10 @@ import com.yihu.wlyy.web.BaseController;
public class HealthEduArticleController extends BaseController {
	@Autowired
	private HealthEduArticleService healthEduArticleService;
	private HealthEduArticlePatientService healthEduArticlePatientService;
	@Autowired
	private HealthEduArticleOpHistoryService healthEduArticleOpHistoryService;
	/**
	 * 查询文章列表
@ -36,9 +43,9 @@ public class HealthEduArticleController extends BaseController {
	 */
	@RequestMapping(value = "list")
	@ResponseBody
	public String list(long id, int pagesize) {
	public String list(@RequestParam("id")long id, @RequestParam("pagesize") int pagesize) {
		try {
			Page<HealthEduArticlePatient> list = healthEduArticleService.findByPatient(getUID(), id, pagesize);
			Page<HealthEduArticlePatient> list = healthEduArticlePatientService.findByPatient(getUID(), id, pagesize);
			JSONArray jsonArray = new JSONArray();
			if (list != null) {
				for (HealthEduArticlePatient article : list) {
@ -58,6 +65,15 @@ public class HealthEduArticleController extends BaseController {
					json.put("read", article.getRead());
					// 添加日期
					json.put("czrq", DateUtil.dateToStrLong(article.getCzrq()));
					//int collectionAmount =  healthEduArticleOpHistoryService.countCollectionAmount(article.getArticle());
					//int readAmount = healthEduArticleOpHistoryService.countReadAmount(article.getArticle());
					//int repeatAmount = healthEduArticleOpHistoryService.countRepeatAmount(article.getArticle());
					////阅读量
					//json.put("readAmount", readAmount);
					////收藏量
					//json.put("collectionAmount", collectionAmount);
					////转发量
					//json.put("repeatAmount", repeatAmount);
					jsonArray.put(json);
				}
			}
@ -67,7 +83,44 @@ public class HealthEduArticleController extends BaseController {
			return invalidUserException(ex, -1, "查询失败!");
		}
	}
	/**
	 * 查询文章列表
	 * @param id 数据文章唯一标示article
	 * @return 列表
	 */
	@RequestMapping(value = "article")
	@ResponseBody
	public String article(@RequestParam(value = "article",required = true) long id) {
		try {
			//获取单条文章记录
			HealthEduArticlePatient healthEduArticlePatient = healthEduArticlePatientService.findById(id);
			int isRead  = healthEduArticleOpHistoryService.countByUserStatus(getUID(),HealthEduArticleOpHistory.READ_STATUS);
			//插入文章读取状态第一次阅读记录浏览数量//暂时更新每次都算一次浏览量
			healthEduArticleOpHistoryService.saveByStatus(HealthEduArticleOpHistory.READ_STATUS,healthEduArticlePatient.getArticle(),healthEduArticlePatient.getTitle(),getUID());
			if(isRead==0){
				//将文章更新为已读
				healthEduArticlePatientService.updateRead(getUID(), healthEduArticlePatient.getArticle());
			}
			JSONObject json = new JSONObject();
			json.put("id", healthEduArticlePatient.getId());
			// 文章标识
			json.put("article", healthEduArticlePatient.getArticle());
			// 医生姓名
			json.put("doctorName", healthEduArticlePatient.getDoctorName());
			// 文章标题
			json.put("title", healthEduArticlePatient.getTitle());
			// 文章内容
			json.put("content", healthEduArticlePatient.getContent());
			// 添加日期
			json.put("czrq", DateUtil.dateToStrLong(healthEduArticlePatient.getCzrq()));
			int readAmount = healthEduArticleOpHistoryService.countReadAmount(healthEduArticlePatient.getArticle());
			json.put("readAmount",readAmount);
			return write(200, "查询成功", "data", json);
		} catch (Exception ex) {
			error(ex);
			return invalidUserException(ex, -1, "查询失败!");
		}
	}
	/**
	 * 更新文章为已读
	 * @param article 文章标识
@ -75,9 +128,9 @@ public class HealthEduArticleController extends BaseController {
	 */
	@RequestMapping(value = "read")
	@ResponseBody
	public String read(String article) {
	public String read(@RequestParam("article") String article) {
		try {
			healthEduArticleService.updateRead(getUID(), article);
			healthEduArticlePatientService.updateRead(getUID(), article);
			return success("操作成功!");
		} catch (Exception ex) {
			error(ex);

+ 8 - 8
patient-co-wlyy/src/main/webapp/WEB-INF/web.xml

@ -53,14 +53,14 @@
    <filter-name>shiroFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping> -->
  <filter>
    <filter-name>sitemeshFilter</filter-name>
    <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>sitemeshFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <!--<filter>-->
    <!--<filter-name>sitemeshFilter</filter-name>-->
    <!--<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>-->
  <!--</filter>-->
  <!--<filter-mapping>-->
    <!--<filter-name>sitemeshFilter</filter-name>-->
    <!--<url-pattern>/*</url-pattern>-->
  <!--</filter-mapping>-->
  <servlet>
    <servlet-name>springServlet</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>