Browse Source

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

wangzhinan 7 năm trước cách đây
mục cha
commit
19298cc59e

+ 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);

+ 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));

+ 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("在绑定设备的时候查找患者(带签约信息)")

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

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