소스 검색

1.4.5需求

trick9191 7 년 전
부모
커밋
f338397126

+ 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
	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), 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());
//		}
	}
}

+ 4 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultTeamDao.java

@ -201,6 +201,10 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
	@Query("select a from ConsultTeam a where  a.type=?3  and a.del = '1' and a.patient=?1 and a.doctor=?2 and  a.status=0 ")
	ConsultTeam findByParientCodeAndSignTypeAndDoctor(String patientCode, String doctor, int s);
	@Query("select distinct a.patient from ConsultTeam a where a.type=2  and a.del = '1' and a.doctor=?1 and  a.status=0 ")
	List<String> findParientListByDoctor(String doctor) throws Exception;
	//名医咨询 -全部 带symptoms 未处理、未回复
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.id < ?2 and a.symptoms like ?3 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findFamousDoctorUnReplyReadList(String uid, long id,String title, Pageable pageRequest);

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

@ -1214,6 +1214,7 @@ public class DoctorInfoService extends BaseService {
        Map<String, Integer> returnMap = new HashMap();
        String[] patiensString = patients.split(",");
        Integer successs = 0;//转移成功
        Integer error = 0;//转移失败

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

@ -2006,6 +2006,11 @@ public class ConsultTeamService extends ConsultService {
        return consultTeam;
    }
    public List<String> getConsultListByPatientAndDoctor(String doctor) throws Exception{
        List<String> list =consultTeamDao.findParientListByDoctor(doctor);
        return list;
    }
    public void transfers(String uid, String doctor, String consult) {
        String[] doctors = doctor.split(",");
        for (int i = 0; i < doctors.length; i++) {

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -3382,7 +3382,7 @@ public class FamilyContractService extends BaseService {
                    JSONObject jo = new JSONObject();
                    jo.put("signcode", map.get("signcode"));
                    jo.put("name", map.get("name"));
                    jo.put("photo", map.get("photo")==null?"":map.get("photo"));
                    jo.put("photo", map.get("photo")==null?"../../../images/p-female.png":map.get("photo"));
                    jo.put("code", map.get("code"));
                    jo.put("hasopenid", map.get("hasopenid"));
                    jo.put("age", IdCardUtil.getAgeForIdcard(map.get("idcard").toString()));

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/PatientRemindService.java

@ -219,7 +219,7 @@ public class PatientRemindService extends BaseService {
            if (StringUtils.isNotEmpty(p.getMobile())) {
                isMobileExist = true;
                JSONObject result = smsService.sendMsg(p.getMobile(), doc.getName() + "医生提醒您:为完成家庭医生签约," +
                        "尽早为您提供家庭医生服务,请尽快到" + hos.getName() + "(地址:" + hos.getAddress() + ")缴费");
                        "尽早为您提供家庭医生服务,请尽快到" + hos.getName() + "(地址:" + hos.getAddress() + ")确认签约");
                if (result != null && result.getInt("result") == 0) {
                    mFlag = true;
                }

+ 3 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultController.java

@ -647,9 +647,10 @@ public class DoctorConsultController extends WeixinBaseController {
        try {
            JSONArray json = new JSONArray();
            String[] patients = patientCode.split(",");
            //查询医生未结束居民列表
            List<String> list = consultTeamService.getConsultListByPatientAndDoctor(doctor);
            for (int i = 0; i < patients.length; i++) {
                ConsultTeam consultTeam = consultTeamService.getConsultByPatientAndDoctor(patients[i], doctor);
                if (consultTeam != null) {
                if (list.contains(patients[i])) {
                    json.put(patients[i]);
                }
            }