Selaa lähdekoodia

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

zd_123 7 vuotta sitten
vanhempi
commit
2cc0a29576

+ 1 - 1
common/common-entity/src/main/java/com/yihu/wlyy/entity/message/Message.java

@ -30,7 +30,7 @@ public class Message extends IdEntity {
	/** type
	/** type
	 *  消息类型(1.是家庭签约信息  2.体征消息  3分配健管师 4.随访提醒 5.咨询回复提醒,6.续方咨询待审核提醒,7.续方消息待取药
	 *  消息类型(1.是家庭签约信息  2.体征消息  3分配健管师 4.随访提醒 5.咨询回复提醒,6.续方咨询待审核提醒,7.续方消息待取药
	 *  8.续方支付成功后团队长分配健管师,9线下调整完成,10意见反馈 11账号申诉,12.协同服务 13.孕检提醒 14.文章提交审核消息  15、健康文章审核结果
	 *  8.续方支付成功后团队长分配健管师,9线下调整完成,10意见反馈 11账号申诉,12.协同服务 13.孕检提醒 14.文章提交审核消息  15、健康文章审核结果
	 *  16.专科医生申请签约消息,17、家庭医生转诊预约消息,18、专科医生共管通知,19、
	 *  16.专科医生申请签约消息,17、家庭医生转诊预约消息,18、专科医生共管通知,:19 受理提醒,20 待办工作提醒 21 服务进展提醒-已完成 22 服务进展提醒-未完成 23 服务进展提醒-待完成 24、协同服务消息
	 *  101患者申请取消签约、102患者同意取消签约、103患者拒绝取消签约、104患者填写了血糖记录、105患者填写了血压记录、106患者填写了体重记录、
	 *  101患者申请取消签约、102患者同意取消签约、103患者拒绝取消签约、104患者填写了血糖记录、105患者填写了血压记录、106患者填写了体重记录、
	 *  107患者填写了腰围记录、108患者填写了运动记录、109患者填写了用药记录、110患者填写了饮食记录、111患者提交了问卷随访、112请求添加好友消息、
	 *  107患者填写了腰围记录、108患者填写了运动记录、109患者填写了用药记录、110患者填写了饮食记录、111患者提交了问卷随访、112请求添加好友消息、
	 *  113入群消息、114群解散消息、115踢出群消息、116新的网络咨询、117网络咨询追问、
	 *  113入群消息、114群解散消息、115踢出群消息、116新的网络咨询、117网络咨询追问、

+ 2 - 3
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/WlyySignApplication.java

@ -1,6 +1,5 @@
package com.yihu.wlyy.sign;
package com.yihu.wlyy.sign;
import com.yihu.wlyy.sign.common.thread.*;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.builder.SpringApplicationBuilder;
@ -15,7 +14,7 @@ public class WlyySignApplication extends SpringBootServletInitializer {
    @Override
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        //加载机构签约修改
        /*//加载机构签约修改
        Thread loadThread = new Thread(new LoadThread());
        Thread loadThread = new Thread(new LoadThread());
        loadThread.start();
        loadThread.start();
@ -47,7 +46,7 @@ public class WlyySignApplication extends SpringBootServletInitializer {
        //加载续签数据
        //加载续签数据
       /* Thread loadRenewSignThread = new Thread(new LoadRenewSignThread());
        Thread loadRenewSignThread = new Thread(new LoadRenewSignThread());
        loadRenewSignThread.start();*/
        loadRenewSignThread.start();*/
        return application.sources(WlyySignApplication.class);
        return application.sources(WlyySignApplication.class);

+ 10 - 0
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/entity/FamilyLianQian.java

@ -32,6 +32,8 @@ public class FamilyLianQian extends IdEntity implements Serializable {
    private String name;//姓名
    private String name;//姓名
    @Column(name = "address_name")
    @Column(name = "address_name")
    private String addressName;//地址名称
    private String addressName;//地址名称
    @Column(name = "address")
    private String address;//地址
    @Column(name = "phone")
    @Column(name = "phone")
    private String phone;//联系方式
    private String phone;//联系方式
    @Column(name = "high_blood_pressure")
    @Column(name = "high_blood_pressure")
@ -189,4 +191,12 @@ public class FamilyLianQian extends IdEntity implements Serializable {
    public void setSex(Integer sex) {
    public void setSex(Integer sex) {
        this.sex = sex;
        this.sex = sex;
    }
    }
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
}
}

+ 6 - 6
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/service/SignRenewZYService.java

@ -310,8 +310,8 @@ public class SignRenewZYService {
                                //密码迁移
                                //密码迁移
                                if(patientHad!=null&&!StringUtil.isEmpty(patientHad.getPassword())&&!StringUtil.isEmpty(patientHad.getSalt()))
                                if(patientHad!=null&&!StringUtil.isEmpty(patientHad.getPassword())&&!StringUtil.isEmpty(patientHad.getSalt()))
                                {
                                {
                                    patient.setOpenid(patientHad.getPassword());
                                    patient.setOpenid(patientHad.getSalt());
                                    patient.setPassword(patientHad.getPassword());
                                    patient.setSalt(patientHad.getSalt());
                                }
                                }
                                else{
                                else{
                                    //修改旧的默认密码
                                    //修改旧的默认密码
@ -925,8 +925,8 @@ public class SignRenewZYService {
                                //密码迁移
                                //密码迁移
                                if(patientHad!=null&&!StringUtil.isEmpty(patientHad.getPassword())&&!StringUtil.isEmpty(patientHad.getSalt()))
                                if(patientHad!=null&&!StringUtil.isEmpty(patientHad.getPassword())&&!StringUtil.isEmpty(patientHad.getSalt()))
                                {
                                {
                                    patient.setOpenid(patientHad.getPassword());
                                    patient.setOpenid(patientHad.getSalt());
                                    patient.setPassword(patientHad.getPassword());
                                    patient.setSalt(patientHad.getSalt());
                                }
                                }
                                else{
                                else{
                                    //修改旧的默认密码
                                    //修改旧的默认密码
@ -1116,11 +1116,11 @@ public class SignRenewZYService {
                        needSave = true;
                        needSave = true;
                    }
                    }
                    //手机号覆盖
                    //手机号覆盖
                    /*if(!StringUtil.isEmpty(phoneNumber) && !phoneNumber.equals(patient.getMobile()))
                    if(!StringUtil.isEmpty(phoneNumber) && !phoneNumber.equals(patient.getMobile()))
                    {
                    {
                        patient.setMobile(phoneNumber);
                        patient.setMobile(phoneNumber);
                        needSave = true;
                        needSave = true;
                    }*/
                    }
                    if(needSave)
                    if(needSave)
                    {
                    {

+ 21 - 21
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/job/FollowUpSynJob.java

@ -28,26 +28,26 @@ public class FollowUpSynJob implements Job {
	
	
	@Override
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
	public void execute(JobExecutionContext context) throws JobExecutionException {
//		logger.info("START=====居民随访记录同步JOB");
//		try {
//
//			Date end = new Date();
//			do{
//				String startTime =  systemDictService.getFollowupSynTime();   //上次执行时间
//				logger.info("采集时间:start="+startTime);
//				end = DateUtil.getNextMin(DateUtil.strToDate(startTime), 20);
//				String endTime = DateUtil.dateToStrLong(end);//采集20分钟后的数据
//				logger.info("采集时间:end="+endTime);
//				//根据起止时间查询家签居民随访记录,并同步到本地数据库
//				jwPrescriptionService.getFollowUpByTime(startTime,endTime);
//				//更新下次采集签约时间
//				systemDictService.saveFollowupSynTime(endTime);
//
//			}while (end.before(new Date()));
//			logger.info("END========居民随访记录同步JOB");
//		}catch (Exception e){
//			e.printStackTrace();
//			logger.info("END===ERROE===居民随访记录同步JOB,message:"+e.getMessage());
//		}
		logger.info("START=====居民随访记录同步JOB");
		try {
			Date end = new Date();
			do{
				String startTime =  systemDictService.getFollowupSynTime();   //上次执行时间
				logger.info("采集时间:start="+startTime);
				end = DateUtil.getNextMin(DateUtil.strToDate(startTime), 5);
				String endTime = DateUtil.dateToStrLong(end);//采集20分钟后的数据
				logger.info("采集时间:end="+endTime);
				//根据起止时间查询家签居民随访记录,并同步到本地数据库
				jwPrescriptionService.getFollowUpByTime(startTime,endTime);
				//更新下次采集签约时间
				systemDictService.saveFollowupSynTime(endTime);
			}while (end.before(new Date()));
			logger.info("END========居民随访记录同步JOB");
		}catch (Exception e){
			e.printStackTrace();
			logger.info("END===ERROE===居民随访记录同步JOB,message:"+e.getMessage());
		}
	}
	}
}
}

+ 3 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -60,13 +60,13 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("update Message a set a.read = 0 where a.receiver = ?1 and a.sender=?2 and a.tzType=?3")
    @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);
    int updateHealthIndexMessageByPatient(String doctor, String patient, String type);
    @Query("select a from Message a where a.read= 1 and a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15,16,17,18,19,20,21,22,23) order by a.czrq desc")
    @Query("select a from Message a where a.read= 1 and a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15,16,17,18,19,20,21,22,23,24) order by a.czrq desc")
    List<Message> getSystemMessageUnread(String doctor);
    List<Message> getSystemMessageUnread(String doctor);
    @Query("select a from Message a where a.receiver = ?1 and a.prescriptionStatus=?2 and a.type in (6,7) order by a.createTime desc")
    @Query("select a from Message a where a.receiver = ?1 and a.prescriptionStatus=?2 and a.type in (6,7) order by a.createTime desc")
    List<Message> getSysTemMessageByPrescription(String doctor, String prescriptionStatus);
    List<Message> getSysTemMessageByPrescription(String doctor, String prescriptionStatus);
    @Query("select a from Message a where a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15,301,16,17,18,19,20,21,22,23) and (a.del = '1' or a.del is null) ")
    @Query("select a from Message a where a.receiver = ?1 and a.type not in (1,2,6,7,12,101,14,15,301,16,17,18,19,20,21,22,23,24) and (a.del = '1' or a.del is null) ")
    List<Message> getSystemMessage(String doctor, Pageable pageRequest);
    List<Message> getSystemMessage(String doctor, Pageable pageRequest);
    @Query("select a from Message a where a.receiver = ?1 and a.type=?2 and a.prescriptionStatus='0' ")
    @Query("select a from Message a where a.receiver = ?1 and a.type=?2 and a.prescriptionStatus='0' ")
@ -169,4 +169,5 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("update Message a set a.read = 0 where a.id = ?1")
    @Query("update Message a set a.read = 0 where a.id = ?1")
    @Modifying
    @Modifying
    int setSpecialistReadById(Long id);
    int setSpecialistReadById(Long id);
}
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/family/FamilyMemberService.java

@ -146,7 +146,7 @@ public class FamilyMemberService extends BaseService {
            fm.setFamilyMember(member);
            fm.setFamilyMember(member);
        }
        }
        fm.setFamilyRelation(relation);
        fm.setFamilyRelation(relation);
        fm.setIsAuthorize(1);//默认授权
        fm.setIsAuthorize(0);//默认授权
        fm.setCzrq(new Date());
        fm.setCzrq(new Date());
        // 添加对方与自己的关系
        // 添加对方与自己的关系

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

@ -177,7 +177,7 @@ public class PatientHealthGuidanceService extends BaseService {
		if(StringUtils.isNotEmpty(tzCode)&&!"undefined".equals(tzCode)){
		if(StringUtils.isNotEmpty(tzCode)&&!"undefined".equals(tzCode)){
			String sql = " select * from device.wlyy_patient_health_index where id in ("+tzCode+")";
			String sql = " select * from device.wlyy_patient_health_index where id in ("+tzCode+")";
			List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
			List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
			long h24 = 60*60*60*24+10;
			long h24 = 1000*60*60*24+10;
			for(Map<String, Object> one :list){
			for(Map<String, Object> one :list){
				if(one.get("manage_result")!=null&&((Integer)one.get("manage_result")==1||(Integer)one.get("manage_result")==2))continue;
				if(one.get("manage_result")!=null&&((Integer)one.get("manage_result")==1||(Integer)one.get("manage_result")==2))continue;
				String tempSql="";
				String tempSql="";

+ 12 - 5
patient-co/patient-co-wlyy/src/main/resources/application-local.yml

@ -39,6 +39,10 @@ specialist:
iot:
iot:
  url: http://192.168.131.24:8088/svr-iot/
  url: http://192.168.131.24:8088/svr-iot/
#健康银行配置
healthBank:
  url: http://192.168.120.167:8661/svr-wlyy-health-bank/svr-health-bank/
#康复计划配置
#康复计划配置
rehabilitation:
rehabilitation:
  url: http://localhost:10055/svr-rehabilitation/
  url: http://localhost:10055/svr-rehabilitation/
@ -93,10 +97,7 @@ wechat:
   template_patient_bind_device: 1GWPw6LFcSuz2LFTo6LhE-YY8abtmcKRvor1fUzfxBE
   template_patient_bind_device: 1GWPw6LFcSuz2LFTo6LhE-YY8abtmcKRvor1fUzfxBE
   #积分到账通知
   #积分到账通知
   template_healthbank_credit: A2L6WBm1p6bDPYGkGnUmoMvpWlRruP2lapYwHfLV7Rg
   template_healthbank_credit: A2L6WBm1p6bDPYGkGnUmoMvpWlRruP2lapYwHfLV7Rg
   #支付提醒
   template_to_be_pay: Y5d-V3qW78ThFEi_DuepFdZ3dn1FpHeL2NzH0ilw-qM
   #支付成功通知
   template_pay_success: wetf1x_yZ7iKu6wRIld6KMXCO3NVase4VvhQrQxNWEo
yihu:
yihu:
  yihu_OpenPlatform_url: http://api.yihu.com.cn/OpenPlatform/cgiBin/1.0/
  yihu_OpenPlatform_url: http://api.yihu.com.cn/OpenPlatform/cgiBin/1.0/
@ -175,4 +176,10 @@ ylz:
  redirectUrl:  aaa
  redirectUrl:  aaa
  termId: aaa
  termId: aaa
  gateway:
  gateway:
    url: http://120.42.37.94:1301/ehc-empi-web/gateway
    url: http://120.42.37.94:1301/ehc-empi-web/gateway
# 药盒请求巨烨的域名以及巨烨给予的公司编号
juye:
  url: http://api.zayata.com/index.php?s=/Company/Device/
  companyCode: 86350206000000001
  companySecret: ODZhZjg1OWM4YTQyMDNkMWU5MDkxNjE0YmRhODI5YmU=