浏览代码

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

zd_123 7 年之前
父节点
当前提交
236572cf1c

+ 1 - 1
patient-co-service/wlyy_device/src/main/resources/application.yml

@ -134,4 +134,4 @@ systemConfig:
  msg_push_server: http://127.0.0.1:3000/system/sendmsg.im
  jw_server: http://59.61.92.90:8072/wlyy_service
  socket_server: http://27.155.101.77:3000
  server_url: http://www.yihu.com/wlyy/
  server_url: http://www.xmtyw.cn/wlyy/

+ 20 - 2
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;
    /**
     * 调用第三方积分排名接口
@ -86,10 +92,16 @@ public class CreditLogService {
     * @param object
     * @return
     */
    public JSONObject insert(JSONObject object){
    public JSONObject insert(JSONObject object) throws Exception {
        init();
        String response = null;
        String integrate = getIntegrate("health:blank:integrate:"+object.getString("flag"));
        String patientId = object.getString("patientId");
        Patient patient = patientDao.findByCode(patientId);
        if (patient == null){
            throw new Exception("该居民不存在");
        }
        object.put("name",patient.getName());
        object.put("integrate",integrate);
        String url =baseUrl + "createCreditsDetail";
        Map<String,String> params = new HashMap<>();
@ -136,7 +148,13 @@ public class CreditLogService {
     * @param object
     * @return
     */
    public JSONObject selectAccount(JSONObject object){
    public JSONObject selectAccount(JSONObject object) throws Exception {
        String patientId = object.getString("patientId");
        Patient patient = patientDao.findByCode(patientId);
        if (patient == null){
            throw new Exception("该居民不存在");
        }
        object.put("name",patient.getName());
        String response = null;
        String url =baseUrl + "selectAccount";
        Map<String,String> params = new HashMap<>();

+ 36 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/wx/WechatMenuController.java

@ -115,6 +115,42 @@ public class WechatMenuController extends BaseController {
            return error(-1, "创建失败");
        }
    }
    
    /**
     * 海沧区微信特色菜单菜单创建
     *
     * @return
     */
    @ApiOperation(value = "海沧区微信特色菜单菜单创建")
    @RequestMapping(value = "/menu/create/haicang", method = RequestMethod.GET)
    public String createMenuTestHaicang() {
        try {
            String filePath = WechatCoreController.class.getResource("/").getPath() +
                    File.separator + "wechat" + File.separator + "weixin_menu_haicang.txt";
            String url = " https://api.weixin.qq.com/cgi-bin/menu/addconditional?access_token=" + weiXinAccessTokenUtils.getAccessToken();
            // 读取微信菜单配置文件
            InputStreamReader reader = new InputStreamReader(new FileInputStream(filePath), "utf-8");
            BufferedReader bufferedReader = new BufferedReader(reader);
            String params = "";
            String readTxt = "";
            // 读取微信菜单
            while ((readTxt = bufferedReader.readLine()) != null) {
                System.out.println(readTxt);
                params += readTxt;
            }
            
            bufferedReader.close();
            reader.close();
            // 替换服务器地址、APPID
            params = params.replaceAll("server_url", wechat_base_url);
            params = params.replaceAll("appId", appId);
            // 请求微信接口创建菜单
            String jsonStr = HttpUtil.sendPost(url, params);
            return write(200, "创建成功!", "data", jsonStr);
        } catch (Exception e) {
            return error(-1, "创建失败");
        }
    }
    /**
     * 医生助手微信菜单创建

+ 2 - 2
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/

+ 1 - 1
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:

+ 3 - 0
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:

+ 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"
        }
	 ]
  }
]

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

@ -0,0 +1,92 @@
{
"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"
		}
	 ]
  }],
    "matchrule":{
      "tag_id":"104"
      }
}