Browse Source

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

chenweida 7 năm trước cách đây
mục cha
commit
8a35b4d4e7

+ 5 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/PatientInfoService.java

@ -1743,20 +1743,22 @@ public class PatientInfoService extends BaseService {
        }
    }
    public List<Map<String,Object>> getPatientSignByNameOrIdCard(String keyWord,String deviceSn,String doctorId,int pageNo,int pageSize){
    public List<Map<String,Object>> getPatientSignByNameOrIdCard(String keyWord,String deviceSn,String doctorId,int pageNo,int pageSize)throws Exception{
        Doctor doctor = doctorDao.findByCode(doctorId);
        String hospital = doctor.getHospital();
        int start = (pageNo-1)*pageSize;
        List<Map<String,Object>> patientList = new ArrayList<>();
        String sql = "SELECT p.code,p.name,CASE p.sex WHEN 1 THEN '男' WHEN 2 THEN '女' END sex,p.idcard,f.doctor_name" +
       /* String sql = "SELECT p.code,p.name,CASE p.sex WHEN 1 THEN '男' WHEN 2 THEN '女' END sex,p.idcard,f.doctor_name" +
                " FROM wlyy_patient p  LEFT JOIN wlyy_sign_family f ON p.code = f.patient" +
                " WHERE f.status = 1 AND p.name LIKE '%"+keyWord+"%' OR p.idcard LIKE '%"+keyWord+"%' and f.hospital = '"+hospital+"'"+" limit ?,?";
                " WHERE f.status = 1 AND p.name LIKE '%"+keyWord+"%' OR p.idcard LIKE '%"+keyWord+"%' and f.hospital = '"+hospital+"'"+" limit ?,?";*/
       String sql ="SELECT f.patient as code,f.name,f.idcard,f.doctor_name FROM wlyy_sign_family f where f.status > 0 AND f.hospital = '"+hospital+"' AND f.name LIKE '%"+keyWord+"%' OR f.idcard LIKE '%"+keyWord+"%' limit ?,?";
        patientList = jdbcTemplate.queryForList(sql ,new Object[]{start,pageSize});
        String patientDeviceSql = "SELECT user as patientCode FROM wlyy_patient_device WHERE device_sn='"+deviceSn+"'";
        List<Map<String,Object>> patientDeviceList = jdbcTemplate.queryForList(patientDeviceSql);
        for (Map<String,Object> map : patientList){
            map.put("age",IdCardUtil.getAgeForIdcard(String.valueOf(map.get("idcard"))));
            map.put("sex",Constant.getLevelSexName(IdCardUtil.getSexForIdcard_new(String.valueOf(map.get("idcard")))));
            for (Map<String,Object> patientDeviceMap : patientDeviceList){
                if (String.valueOf(map.get("code")).equals(String.valueOf(patientDeviceMap.get("patientCode")))){
                    map.put("del",0);

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

@ -1892,6 +1892,8 @@ public class SignWebService extends BaseService {
                Patient patient = patientService.findByCode(renew.getPatient());
                if (patient != null && StringUtils.isNotBlank(patient.getOpenid())) {
                    data.put("agent","0");
                    if ("0".equals(state)) {
                        if (StringUtils.isNotEmpty(refuseReason)){
                            data.put("content", refuseReason);
@ -1903,6 +1905,7 @@ public class SignWebService extends BaseService {
                        first = first.replace("key1",(renew.getName()==null?"":renew.getName())).replace("br","\n");
                        String remark = templateConfig.getRemark();
                        data.put("first", first);
                        data.put("remark", remark);
                        /*data.put("first", renew.getName() + ",您好!\n" +
@ -1915,7 +1918,6 @@ public class SignWebService extends BaseService {
                        first = first.replace("key1",(renew.getName()==null?"":renew.getName())).replace("br","\n");
                        String remark = templateConfig.getRemark();
                        String keyword4 = templateConfig.getKeyword4();
                        data.put("first", first);
                        data.put("remark", remark);
                        data.put("content", keyword4);
@ -1929,6 +1931,9 @@ public class SignWebService extends BaseService {
                }else {
                    //发送代理人
                    JSONArray jsonArray = weiXinOpenIdUtils.getAgentOpenId(patient.getCode(), patient.getOpenid());
                    data.put("agent","1");
                    if (jsonArray != null && jsonArray.length() > 0) {
                        for (int i = 0; i < jsonArray.length(); i++) {
                            JSONObject j = jsonArray.getJSONObject(i);

+ 8 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java

@ -5170,8 +5170,14 @@ public class StatisticsESService {
        List<SaveModel> allAmountList = elasticsearchUtil.findDateQuotaLevel0(timeKey, timeKey, area, level, index_85, SaveModel.timeLevel_DDL, "", low_level);
        //绑定量
        List<SaveModel> bindingAmountList = elasticsearchUtil.findDateQuotaLevel0(timeKey, timeKey, area, level, index_86, SaveModel.timeLevel_DDL, "", low_level);
        Integer totalAllNum = allAmountList.get(0).getResult2().intValue();
        Integer totalBindingNum = bindingAmountList.get(0).getResult2().intValue();
        Integer totalAllNum = 0;
        Integer totalBindingNum = 0;
        for (SaveModel totalSaveModel : allAmountList){
            totalAllNum += totalSaveModel.getResult2().intValue();
        }
        for (SaveModel bindSaveModel : bindingAmountList){
            totalBindingNum += bindSaveModel.getResult2().intValue();
        }
        resultMap.put("totalAll",totalAllNum);
        resultMap.put("totalBinding",totalBindingNum);
        resultMap.put("totalRange",getRange(totalBindingNum, totalAllNum, 2));

+ 12 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/health/bank/CreditLogService.java

@ -4,7 +4,9 @@ package com.yihu.wlyy.service.third.health.bank;/**
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.service.app.device.PatientDeviceService;
import com.yihu.wlyy.util.HttpClientUtil;
import org.slf4j.Logger;
@ -44,6 +46,10 @@ public class CreditLogService {
    private StringRedisTemplate redisTemplate;
    @Autowired
    private PatientDeviceService patientDeviceService;
    @Autowired
    private PatientDao patientDao;
    /**
     * 调用第三方积分排名接口
@ -90,6 +96,9 @@ public class CreditLogService {
        init();
        String response = null;
        String integrate = getIntegrate("health:blank:integrate:"+object.getString("flag"));
        String patientId = object.getString("patientId");
        Patient patient = patientDao.findByCode(patientId);
        object.put("name",patient.getName());
        object.put("integrate",integrate);
        String url =baseUrl + "createCreditsDetail";
        Map<String,String> params = new HashMap<>();
@ -137,6 +146,9 @@ public class CreditLogService {
     * @return
     */
    public JSONObject selectAccount(JSONObject object){
        String patientId = object.getString("patientId");
        Patient patient = patientDao.findByCode(patientId);
        object.put("name",patient.getName());
        String response = null;
        String url =baseUrl + "selectAccount";
        Map<String,String> params = new HashMap<>();

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/Constant.java

@ -15,8 +15,8 @@ public class Constant {
    public static String level_sex_1="1";
    public static String level_sex_2="2";
    public static String level_sex_3="3";
    public static String level_sex_1_name="女";
    public static String level_sex_2_name="男";
    public static String level_sex_1_name="男";
    public static String level_sex_2_name="女";
    public static String level_sex_3_name="未知";
    //二级维度的年龄

+ 8 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/PatientInfoController.java

@ -517,6 +517,14 @@ public class PatientInfoController extends BaseController {
        }
    }
    /**
     *
     * @param keyWord
     * @param deviceSn
     * @param page
     * @param pageSize
     * @return
     */
    @RequestMapping(value = "/getPatientSignByNameOrIdCard",method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("在绑定设备的时候查找患者(带签约信息)")

+ 3 - 3
patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

@ -84,9 +84,9 @@ wechat:
   #处理结果通知
   template_deal_with:  VagkqFW_LFqLKE3gP2wmPtUfDWQOah40XMloipfi1do
    #设备绑定结果通知
    template_patient_bind_device: 1GWPw6LFcSuz2LFTo6LhE-YY8abtmcKRvor1fUzfxBE
   template_patient_bind_device: 1GWPw6LFcSuz2LFTo6LhE-YY8abtmcKRvor1fUzfxBE
    #积分到账通知
    template_healthbank_credit: A2L6WBm1p6bDPYGkGnUmoMvpWlRruP2lapYwHfLV7Rg
   template_healthbank_credit: A2L6WBm1p6bDPYGkGnUmoMvpWlRruP2lapYwHfLV7Rg
yihu:
  yihu_OpenPlatform_url: http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/
@ -167,4 +167,4 @@ ylz:
  aapSecret:  aaa
  redirectUrl:  aaa
  gateway:
    url: http://120.42.37.94:1301/ehc-empi-web/gateway
    url: http://120.42.37.94:1301/ehc-empi-web/gateway

+ 2 - 2
patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

@ -39,7 +39,7 @@ iot:
  url: http://localhost:10050/svr-iot/
#健康银行配置
healthBank:
  url: http://172.19.103.33:8660/svr-health-bank/
  url: http://localhost:10051/svr-health-bank/
#康复计划配置
rehabilitation:
@ -169,4 +169,4 @@ ylz:
  aapSecret:  aaa
  redirectUrl:  aaa
  gateway:
    url: http://120.42.37.94:1301/ehc-empi-web/gateway
    url: http://120.42.37.94:1301/ehc-empi-web/gateway

+ 5 - 2
patient-co/patient-co-wlyy/src/main/resources/application-prod.yml

@ -35,6 +35,9 @@ im:
#物联网配置
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:
@ -80,7 +83,7 @@ wechat:
   #处理结果通知
   template_deal_with:  GyXCmXVYCD7PXi0IbHdPOD8apa-RQoSrSw-4-0pj9Go
   #设备绑定结果通知
   template_patient_bind_device: 1GWPw6LFcSuz2LFTo6LhE-YY8abtmcKRvor1fUzfxBE
   template_patient_bind_device:
   #积分到账通知
   template_healthbank_credit: A2L6WBm1p6bDPYGkGnUmoMvpWlRruP2lapYwHfLV7Rg
@ -171,4 +174,4 @@ ylz:
  aapSecret:  aaa
  redirectUrl:  aaa
  gateway:
    url: http://120.42.37.94:1301/ehc-empi-web/gateway
    url: http://120.42.37.94:1301/ehc-empi-web/gateway

+ 5 - 5
patient-co/patient-co-wlyy/src/main/resources/wechat/weixin_menu.txt

@ -79,11 +79,11 @@
		   "name":"我的设备",
		   "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fwdsb%2fhtml%2fmy-equipments.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		},
		{
		   "type":"view",
		   "name":"健康银行",
		   "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkjf%2fhtml%2findex.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		}
        {
         	"type":"click",
         	"name":"操作说明",
         	"key":"caozuoshuoming"
        }
	 ]
  }
]

+ 90 - 0
patient-co/patient-co-wlyy/src/main/resources/wechat/weixin_menu_haicang.txt

@ -0,0 +1,90 @@
{
"button":[
   {
	  "name":"家庭医生",
	  "sub_button":[
		  {
			"type":"view",
			"name":"签约管理",
			"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fqygl%2fhtml%2fsigning_management.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		  },
		  {
			"type":"view",
			"name":"医生咨询",
			"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fyszx%2fhtml%2fdoctor-consultation.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		  },
		  {
			"type":"view",
			"name":"医生指导",
			"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fyszd%2fhtml%2fdoctor-guidance.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		  },
		  {
            "type":"view",
            "name":"健教文库",
            "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkjy%2fhtml%2farticle_list.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
          }
	  ]
   },
   {
	  "name":"健康管理",
	  "sub_button":[
		 {
			  "type":"view",
			  "name":"预约挂号",
			  "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fwdyy%2fhtml%2fappointment-register.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		 },
		 {
               "type":"view",
               "name":"健康记录",
               "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkjl%2fhtml%2fhealth-record.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         },
		{
			"type":"click",
			"name":"健康档案",
			"key":"jiankangdangan"
		},
         {
            "type":"view",
            "name":"慢病管理",
            "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjbsq%2fhtml%2fslow-disease-manage.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
                  },
        {
            "type":"click",
            "name":"妇幼保健",
            "key":"fuyoubaojian"
        }
	  ]
   },
   {
	  "name":"我的",
	  "sub_button":[
		{
           "type":"view",
           "name":"电子健康卡",
           "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fgrzx%2fhtml%2fmy-health-card.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
        },
		{
		   "type":"view",
		   "name":"我的资料",
		   "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fgrzx%2fhtml%2fmy-detail.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		},
        {
           "type":"view",
           "name":"我的家庭",
           "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjtgx%2fhtml%2ffamily.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
        },
		{
		   "type":"view",
		   "name":"我的设备",
		   "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fwdsb%2fhtml%2fmy-equipments.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		},
		{
		   "type":"view",
		   "name":"健康银行",
		   "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkjf%2fhtml%2findex.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		}
	 ]
  }
]
}