Jelajahi Sumber

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

wujunjie 8 tahun lalu
induk
melakukan
aeae467877

+ 1 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -43,6 +43,7 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("select a from Message a where a.receiver = ?1 and a.sender=?2 and a.tzType=?3 order by a.czrq desc")
    List<Message> getHealthIndexMessageByPatient(String doctor,String patient,String type,Pageable pageRequest);
    @Modifying
    @Query("update Message a set a.read = 0 where a.receiver = ?1 and a.sender=?2 and a.tzType=?3")
    int updateHealthIndexMessageByPatient(String doctor,String patient,String type);

+ 7 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/SignFamilyRenewDao.java

@ -27,9 +27,12 @@ public interface SignFamilyRenewDao extends PagingAndSortingRepository<SignFamil
    @Query(value = "select a from SignFamilyRenew a where a.patient = ?1 and a.status <> -1 and a.status <> -2")
    List<SignFamilyRenew> findAllActiveSignByPatient(String patient);
    @Query(value = "select a from SignFamilyRenew a where a.doctor =?1 and a.patient = ?2 and a.signYear =?3")
    @Query(value = "select a from SignFamilyRenew a where a.doctor =?1 and a.patient = ?2 and a.signYear =?3 ")
    List<SignFamilyRenew> findByDoctorAndPatient(String doctor,String patient,String signYear);
    @Query(value = "select a from SignFamilyRenew a where a.doctor =?1 and a.patient = ?2 and a.signYear =?3 and a.status = 0")
    List<SignFamilyRenew> findByDoctorAndPatientStatus0(String doctor,String patient,String signYear);
    @Query(value = "select a from SignFamilyRenew a where a.doctor =?1 and a.patient = ?2 and a.signYear =?3 and a.status = 1 and a.expensesStatus ='1'")
    List<SignFamilyRenew> findByDoctorAndPatientIsValid(String doctor,String patient,String signYear);
@ -39,6 +42,9 @@ public interface SignFamilyRenewDao extends PagingAndSortingRepository<SignFamil
    @Query(value = "select a from SignFamilyRenew a where a.doctorHealth =?1 and a.patient = ?2 and a.signYear =?3")
    List<SignFamilyRenew> findByDoctorHealthAndPatient(String doctorHealth,String patient,String signYear);
    @Query(value = "select a from SignFamilyRenew a where a.doctorHealth =?1 and a.patient = ?2 and a.signYear =?3 and a.status=0")
    List<SignFamilyRenew> findByDoctorHealthAndPatientStatus0(String doctorHealth,String patient,String signYear);
    // 查询患者已生效的家庭续签约
    @Query("select a from SignFamilyRenew a where a.patient = ?1 and a.type = 2 and a.status = 0")
    SignFamilyRenew findSigningByPatient(String patient);

+ 10 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -1620,6 +1620,16 @@ public class ConsultTeamService extends ConsultService {
            Patient p = patientDao.findByCode(endOperator);
            endName = p.getName();
            endId = p.getCode();
            String openId = p.getOpenid();
            JSONObject json = new JSONObject();
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            json.put("keyword1","满意度评价");
            json.put("keyword2",sdf.format(new Date()));
            json.put("toUser", p.getCode());
            json.put("remark", "");
            json.put("consult",consult);
            json.put("first", endName +",您好!您有1条咨询已结束,请及时对咨询医生进行满意度评价。");
            PushMsgTask.getInstance().putWxMsg(accessTokenUtils.getAccessToken(), 17, openId, p.getName(), json);
        } else {
            if (endOperator.equals("admin")) {
                endId = "system";

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/EvaluateLabelService.java

@ -42,7 +42,7 @@ public class EvaluateLabelService extends BaseService {
	public 	List<Map<String, Object>> findDistinctLabelByLaDoctor(String doctor){
		String sql ="select content,count(content) as amount from wlyy_evaluate_label where doctor =? group by content";
		String sql ="select content,count(content) as amount from wlyy_evaluate_label where doctor =? group by content order by amount DESC,id DESC ";
		List<Object> params = new ArrayList<Object>();
		params.add(doctor);
		List<Map<String, Object>> result = this.jdbcTemplate.queryForList(sql,params.toArray());

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java

@ -901,10 +901,10 @@ public class SignWebService extends BaseService {
     */
    public int agreeRenew(String access_token,String dotorCode,String patientCode,String state,Long mesId,String signYear) throws Exception{
        List<SignFamilyRenew> renews =  signFamilyRenewDao.findByDoctorAndPatient(dotorCode,patientCode,signYear);
        List<SignFamilyRenew> renews =  signFamilyRenewDao.findByDoctorAndPatientStatus0(dotorCode,patientCode,signYear);
        if(renews==null||renews.size()==0){
            renews =  signFamilyRenewDao.findByDoctorHealthAndPatient(dotorCode,patientCode,signYear);
            renews =  signFamilyRenewDao.findByDoctorHealthAndPatientStatus0(dotorCode,patientCode,signYear);
        }
        if(renews!=null&&renews.size()>0){

+ 4 - 4
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/message/DoctorMessageController.java

@ -208,7 +208,7 @@ public class DoctorMessageController extends BaseController {
            return write(200, "获取超标指标消息成功", "data", list);
        } catch (Exception ex) {
            return invalidUserException(ex, -1, ex.getMessage());
            return invalidUserException(ex, -1, "查询失败");
        }
    }
@ -332,11 +332,11 @@ public class DoctorMessageController extends BaseController {
    @ApiOperation("设置某类消息已读")
    public String setMessageReaded(@RequestParam @ApiParam(value = "消息类型") Integer type) {
        try {
            messageService.setMessageReaded(getUID(),type);
            return write(200,"设置成功");
            messageService.setMessageReaded(getUID(), type);
            return write(200, "设置成功");
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1,"设置失败");
            return error(-1, "设置失败");
        }
    }
}

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultMoviController.java

@ -19,7 +19,7 @@ import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.web.WeixinBaseController;
/**
 * 患者端:视频咨询控制类
 * 患者端视频咨询控制类
 * 
 * @author George
 */