Forráskód Böngészése

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

humingfen 7 éve
szülő
commit
96d47a5244

+ 1 - 1
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/JMController.java

@ -335,7 +335,7 @@ public class JMController {
		}
	}
	@RequestMapping(value = "/imm/findWzymBymykh",method = RequestMethod.POST)
	@RequestMapping(value = "/imm/findYzymBymykh",method = RequestMethod.POST)
	@ResponseBody
	@ApiOperation("计免:根据免疫卡号查询接种记录")
	public Result findWzymBymykh(@RequestParam(value = "etmykh")String etmykh)

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

@ -5624,7 +5624,9 @@ public class StatisticsESService {
                        continue;
                    }
                    //计算发放量,按发放人分组
                    String sql =" select count(*) as amount, if(d.grant_doctor is null,'other',d.grant_doctor) as doctorCode,if(d.grant_doctor_name is null,'其他',d.grant_doctor_name) as doctorName from device.wlyy_devices d where d.grant_org_code = '"+ hos.getCode()+"' GROUP BY d.grant_doctor,d.grant_doctor_name";
                    String sql =" select count(*) as amount, if(d.grant_doctor is null,'other',d.grant_doctor) as doctorCode,if(d.grant_doctor_name is null,'其他',d.grant_doctor_name) as doctorName from device.wlyy_devices d " +
                            " LEFT JOIN dm_device dd ON d.device_model = dd.model" +
                            " where dd.category_code IN('1','2') and d.grant_org_code = '"+ hos.getCode()+"' and d.grant_admin_team NOT IN(SELECT id FROM wlyy_admin_team WHERE LENGTH(org_code)!=10) GROUP BY d.grant_doctor,d.grant_doctor_name";
                    List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
                    for (Map<String, Object> one : list) {
                        Map<String, Object> obj = new HashMap<>();
@ -6326,7 +6328,8 @@ public class StatisticsESService {
        if ((level == 2 && "5".equals(lowLevel)) || (level == 4) || (level == 3 && "5".equals(lowLevel))) {
            //String time = DateUtil.getStringDateShort();
            String time=  redisTemplate.opsForValue().get("quota:date");
            String sql ="SELECT" +
            resultList = getDeviceLowLevelMapKey(level, low_level,area);
            /*String sql ="SELECT" +
                    " d.device_code," +
                    " pd.doctor," +
                    " pd.doctor_name," +
@ -6347,8 +6350,12 @@ public class StatisticsESService {
            }else if (level==2){
                sql +=" AND d.grant_admin_team IN(SELECT id FROM wlyy_admin_team WHERE available = 1)";
            }
            sqlList = jdbcTemplate.queryForList(sql);
            esModelList = getDeviceBindToTeam(sqlList);
            sqlList = jdbcTemplate.queryForList(sql);*/
            //esModelList = getDeviceBindToTeam(sqlList);
            for (Map<String,Object> map : resultList){
                map.put("amount",map.get("bindingNum"));
            }
        }else {
            esModelList = (List<SaveModel>) elasticsearchUtil.findListDateQuotaLevel0(date, area, level, index, SaveModel.timeLevel_DDL, low_level);
        }

+ 45 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandingService.java

@ -823,4 +823,49 @@ public class DataHandingService {
        sqlStr = sqlList.toArray(sqlStr);
        jdbcTemplate.batchUpdate(sqlStr);
    }
    /**
     * 24H干预指导率数据清洗
     */
    @Transactional(rollbackFor = Exception.class)
    public void abnormalSignRinse() throws Exception{
        int index =0;
        int a =0;
        while (true){
            a = index*1000;
            String sql = "select i.czrq,i.id,i.user as patient,m.receiver as doctor from wlyy.wlyy_message m " +
                    " LEFT JOIN device.wlyy_patient_health_index i on m.tz_code=i.id " +
                    " where m.type =2 and m.tz_type in ('1','2') and m.create_time>='2018-07-01 00:00:00' and m.create_time<='2018-09-26 16:00:00'  " +
                    " and i.manage_result=2 limit "+a+",1000";
            List<Map<String,Object>> resultList = jdbcTemplate.queryForList(sql);
            Date tzCzrq = null;
            Date guidanceCzrq =null;
            String guidanceSql = "";
            String patient ="";
            String doctor ="";
            long h24 = 1000*60*60*24+10;
            String tzCzrqStr ="";
            String guidanceCzrqStr ="";
            String tempSql = "";
            for(Map<String,Object> one: resultList){
                tzCzrq = (Date)one.get("czrq");
                guidanceCzrq = new Date(tzCzrq.getTime()+h24);
                tzCzrqStr = DateUtil.dateToStrLong(tzCzrq);
                guidanceCzrqStr = DateUtil.dateToStrLong(guidanceCzrq);
                patient = one.get("patient")+"";
                doctor = one.get("doctor")+"";
                guidanceSql = " select * from wlyy.wlyy_patient_health_guidance where patient='"+patient+"' and doctor='"+doctor+"' and czrq>='"+tzCzrqStr+"' and czrq<='"+guidanceCzrqStr+"'";
                List<Map<String,Object>> resultList2 = jdbcTemplate.queryForList(guidanceSql);
                if(resultList2!=null&&resultList2.size()>0){//有效干预
                    tempSql = "update device.wlyy_patient_health_index set manage_result=1 where id="+one.get("id");
                    jdbcTemplate.execute(tempSql);
                }
            }
            if(resultList.size()<1000){
                return;
            }
            index++;
        }
    }
}

+ 14 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandlingController.java

@ -403,4 +403,18 @@ public class DataHandlingController extends BaseController {
            return write(-1,"清洗数据失败!");
        }
    }
    @RequestMapping(value = "/abnormalSignRinse",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("24H干预指导率数据清洗")
    public String abnormalSignRinse(){
        try{
            dataHandingService.abnormalSignRinse();
            return write(200,"清洗数据成功");
        }catch (Exception e){
            System.out.println(e.getMessage());
            e.printStackTrace();
            return write(-1,"清洗数据失败!");
        }
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/booking/PatientBookingController.java

@ -621,7 +621,7 @@ public class PatientBookingController extends WeixinBaseController{
                                   @RequestParam(value = "barCode", required = true) String barCode){
        try{
            String re = immuneService.findWzymBymykh(barCode);
            String re = immuneService.findYzymBymykh(barCode);
            return write(200, "查询成功","data",re);
        }catch (Exception e){
            error(e);

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/EsStatisticsController.java

@ -2175,7 +2175,7 @@ public class EsStatisticsController extends BaseController {
            @RequestParam(required = true) String index,
            @RequestParam(required = false) String level2_type) {
        try {
            //新版与旧版统计适配
            //新版与旧版统计适配。
            level = elasticsearchUtil.changeLevel(level);
            String[] indexes = index.split(",");
            JSONObject result = new JSONObject();

+ 7 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/controller/message/GcOtherMessageController.java

@ -24,6 +24,8 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
@ -70,6 +72,11 @@ public class GcOtherMessageController {
            @ApiParam(name = "type", value = "1待支付,2支付成功", required = true) @RequestParam(value = "type", required = true) String type
            ) {
        try {
            System.out.println("------------start send message--------------");
            System.out.println("param1-------"+cardNo);
            System.out.println("param2-------"+templateJson);
            System.out.println("param3-------"+type);
            System.out.println("param4-------"+url);
            Patient patient =  patientDao.findBySsc(cardNo);
            String templateId = "";
            if ("1".equals(type)){
@ -79,8 +86,6 @@ public class GcOtherMessageController {
            }
            System.out.println("接收者id----"+patient.getOpenid());
            System.out.println("消息模板id----"+templateId);
            System.out.println("-----------开始发送消息--------");
            weiXinTempMsgSendUtils.sendTemplateMessage(templateId, patient.getOpenid(), url, new JSONObject(templateJson));
            return new BaseResultModel(BaseResultModel.statusEm.success.getCode(),BaseResultModel.statusEm.success.getMessage());

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

@ -56,11 +56,13 @@ applets:
  appSecret: 02de788ffea28f2aa3b9bf10312ab05e
wechat:
  appId: wxd03f859efdf0873d
  appSecret: 2935b54b53a957d9516c920a544f2537
  appId: wxddece6347fe7fe87
  #appSecret: 988f005d8309ed1795939e0f042431fb
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_base_url: http%3a%2f%2fweixin.xmtyw.cn%2fwlyy-dev
  accId: gh_ffd64560fb21
  wechat_base_url: http%3a%2f%2fehr.yihu.com%2fwlyy
  #accId: gh_ffd64560fb21
  appSecret: 41ade403de3d0e2e450f54a324ec013a
  accId: gh_710bf0b315a1
  message:
   ##医生追加建议提醒 --签约邀请
   doctor_invitel_template: TLWrBtNE2kBJaFCdVzDOOnQC8N2TtRY9ZxEzwZXQcR0

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

@ -57,11 +57,13 @@ applets:
  appSecret: 02de788ffea28f2aa3b9bf10312ab05e
wechat:
  appId: wx1f129f7b51701428
  appSecret: 988f005d8309ed1795939e0f042431fb
  appId: wxddece6347fe7fe87
  #appSecret: 988f005d8309ed1795939e0f042431fb
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_base_url: http%3a%2f%2fehr.yihu.com%2fwlyy
  accId: gh_ffd64560fb21
  #accId: gh_ffd64560fb21
  appSecret: 41ade403de3d0e2e450f54a324ec013a
  accId: gh_710bf0b315a1
  message:
    ##医生追加建议提醒 --签约邀请
    doctor_invitel_template:  uXdBJVbrhKG-WLaCG4s8C4SXSr2kknQ94vKFt-3rIiA
@ -156,9 +158,9 @@ images:
sign:
  check_upload: http://172.19.103.88:8011/wlyy_service
  #check_upload: http://172.19.103.88:8011/wlyy_service
  check_upload_sign: http://172.19.103.88:8011/wlyy_sign
  #check_upload: http://localhost:8070/
  check_upload: http://localhost:8011/
express:

+ 6 - 4
patient-co/patient-co-wlyy/src/main/resources/application-local.yml

@ -53,11 +53,13 @@ applets:
  appSecret: 02de788ffea28f2aa3b9bf10312ab05e
wechat:
  appId: wxad04e9c4c5255acf
  appSecret: ae77c48ccf1af5d07069f5153d1ac8d3
  appId: wxddece6347fe7fe87
  #appSecret: 988f005d8309ed1795939e0f042431fb
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_base_url: http%3a%2f%2fwww.xmtyw.cn%2fwlyy
  accId: gh_ffd64560fb21
  wechat_base_url: http%3a%2f%2fehr.yihu.com%2fwlyy
  #accId: gh_ffd64560fb21
  appSecret: 41ade403de3d0e2e450f54a324ec013a
  accId: gh_710bf0b315a1
  message:
   ##医生追加建议提醒 --签约邀请
   doctor_invitel_template: MQn79bx1ofb6hekhmRIuqLU7KjySJQzaBzrimgqVrzA

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

@ -48,11 +48,13 @@ applets:
  appSecret: 02de788ffea28f2aa3b9bf10312ab05e
wechat:
  appId: wx1f129f7b51701428
  appSecret: 988f005d8309ed1795939e0f042431fb
  appId: wxddece6347fe7fe87
  #appSecret: 988f005d8309ed1795939e0f042431fb
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_base_url: http%3a%2f%2fehr.yihu.com%2fwlyy
  accId: gh_ffd64560fb21
  #accId: gh_ffd64560fb21
  appSecret: 41ade403de3d0e2e450f54a324ec013a
  accId: gh_710bf0b315a1
  message:
    ##医生追加建议提醒 --签约邀请
    doctor_invitel_template:  uXdBJVbrhKG-WLaCG4s8C4SXSr2kknQ94vKFt-3rIiA

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

@ -49,11 +49,13 @@ applets:
  appSecret: 02de788ffea28f2aa3b9bf10312ab05e
wechat:
  appId: wx1f129f7b51701428
  appSecret: 988f005d8309ed1795939e0f042431fb
  appId: wxddece6347fe7fe87
  #appSecret: 988f005d8309ed1795939e0f042431fb
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_base_url: http%3a%2f%2fehr.yihu.com%2fwlyy
  accId: gh_ffd64560fb21
  #accId: gh_ffd64560fb21
  appSecret: 41ade403de3d0e2e450f54a324ec013a
  accId: gh_710bf0b315a1
  message:
   ##医生追加建议提醒 --签约邀请
   doctor_invitel_template: uXdBJVbrhKG-WLaCG4s8C4SXSr2kknQ94vKFt-3rIiA

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

@ -58,6 +58,11 @@
                "type":"click",
                "name":"用户指南",
                "key":"caozuoshuoming"
         },
         {
               	"type":"view",
                "name":"意见反馈",
                "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fwdyy%2fhtml%2fmy-appointment.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         }
	 ]
  }

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

@ -53,16 +53,16 @@
        		"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%2fjkjf%2fhtml%2funopened.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         },
         {
                "type":"click",
                "name":"用户指南",
                "key":"caozuoshuoming"
         },
         {
               	"type":"view",
                "name":"意见反馈",
                "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fwdyy%2fhtml%2fmy-appointment.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         }
	 ]
  }