Browse Source

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 8 years ago
parent
commit
27c4937118

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

@ -5,7 +5,6 @@
 *******************************************************************************/
package com.yihu.wlyy.repository.patient;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.entity.patient.SignFamilyRenew;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
@ -27,6 +26,7 @@ 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 ")
    List<SignFamilyRenew> findByDoctorAndPatient(String doctor,String patient);
    List<SignFamilyRenew> findByDoctorHealthAndPatient(String doctorHealth,String patient);

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

@ -917,6 +917,9 @@ public class SignWebService extends BaseService {
                data.put("doctorName",renew.getDoctorName());
                data.put("date",DateUtil.dateToStr(new Date(), "yyyy-MM-dd"));
                data.put("content","家庭医生续签");
                data.put("doctor",dotorCode);
                data.put("toUser",patientCode);
                data.put("toName",renew.getName());
                Patient patient = patientService.findByCode(renew.getPatient());
                if(patient!=null && StringUtils.isNotBlank(patient.getOpenid())){
@ -954,6 +957,8 @@ public class SignWebService extends BaseService {
                    }
                }
            }
        }else{
            return 0;
        }
        return 1;
    }

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

@ -1694,7 +1694,7 @@ public class StatisticsService extends BaseService {
        String rs = "";
        //市级
        if(level==4){
            if(StringUtils.isNotBlank(lowLevel)){
            if(StringUtils.isBlank(lowLevel)){
                rs = redisTemplate.opsForValue().get("quota:28:"+level+":"+area+":3:"+timeKey);
            }else{
                rs = redisTemplate.opsForValue().get("quota:28:"+level+":"+area+":2:"+timeKey);

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/task/PushMsgTask.java

@ -538,7 +538,7 @@ public class PushMsgTask {
            temp.setData(m);
            ObjectMapper mapper = new ObjectMapper();
            String strJson = mapper.writeValueAsString(temp);
            System.out.println("send message================>" + strJson);
            //System.out.println("send message================>" + strJson);
            logger.error("send message================>" + strJson);
            return strJson;
        } catch (Exception e) {

+ 10 - 6
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorSignController.java

@ -308,8 +308,8 @@ public class DoctorSignController extends WeixinBaseController {
//            data.put("totalPage", totalPage);
//            data.put("page", page);
            return write(200, "查询成功!", "data", data);
        } catch (Exception ex) {
            ex.printStackTrace();
        } catch (Exception e) {
            error(e);
            return error(-1, "系统错误,请联系管理员!");
        }
    }
@ -340,7 +340,7 @@ public class DoctorSignController extends WeixinBaseController {
        try{
            return write(200,"查询成功","data",signWebService.isRemindExpensesAll(getUID()));
        }catch (Exception e){
            e.printStackTrace();
            error(e);
            return error(-1,"查询失败");
        }
    }
@ -411,7 +411,7 @@ public class DoctorSignController extends WeixinBaseController {
            data.put("list", jsonArray);
            return write(200, "查询成功!", "data", data);
        } catch (Exception ex) {
            ex.printStackTrace();
            error(ex);
            return error(-1, "系统错误,请联系管理员!");
        }
    }
@ -432,6 +432,7 @@ public class DoctorSignController extends WeixinBaseController {
                return write(200, "提醒成功!", "data", rs);
            }
        }catch (Exception e){
            error(e);
            return error(-1, "提醒失败");
        }
    }
@ -446,14 +447,15 @@ public class DoctorSignController extends WeixinBaseController {
    public String agreeRenew(@RequestParam(required = true)String state,
                             @RequestParam(required = true)String patient){
        try{
            int rs =signWebService.agreeRenew(getAccessToken(),getUID(),patient,state);
            //int rs =signWebService.agreeRenew(getAccessToken(),"64de930c-5b15-11e6-8344-fa163e8aee56",patient,state);
            //int rs =signWebService.agreeRenew(getAccessToken(),getUID(),patient,state);
            int rs =signWebService.agreeRenew(getAccessToken(),"test00000000005",patient,state);
            if(rs == 0){
                return error(-1, "操作失败");
            }else{
                return write(200, "操作成功!", "data", rs);
            }
        }catch (Exception e){
            error(e);
            return error(-1, "请求失败");
        }
    }
@ -511,6 +513,7 @@ public class DoctorSignController extends WeixinBaseController {
            //JSONObject rs =signWebService.getRenewYearCount("64de930c-5b15-11e6-8344-fa163e8aee56");
            return write(200, "操作成功!", "data", rs);
        }catch (Exception e){
            error(e);
            return error(-1, "请求失败");
        }
    }
@ -529,6 +532,7 @@ public class DoctorSignController extends WeixinBaseController {
            }
            return error(-1, "提醒失败");
        }catch (Exception e){
            error(e);
            return error(-1, "请求失败");
        }
    }