Pārlūkot izejas kodu

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

yeshijie 7 gadi atpakaļ
vecāks
revīzija
7cbb2e159a
16 mainītis faili ar 164 papildinājumiem un 232 dzēšanām
  1. 2 2
      common/common-entity/src/main/java/com/yihu/wlyy/entity/message/Message.java
  2. 18 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/Message.java
  3. 7 4
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/feedback/AppealService.java
  4. 5 2
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/feedback/FeedbackService.java
  5. 1 1
      patient-co-manage/wlyy-manage/src/main/resources/application.yml
  6. 0 60
      patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/web/doctor/template/DoctorFeldsherTemplateController.java
  7. 21 31
      patient-co/patient-co-doctor-assistant/src/main/resources/application-dev.yml
  8. 21 31
      patient-co/patient-co-doctor-assistant/src/main/resources/application-devtest.yml
  9. 21 31
      patient-co/patient-co-doctor-assistant/src/main/resources/application-local.yml
  10. 21 31
      patient-co/patient-co-doctor-assistant/src/main/resources/application-localtest.yml
  11. 21 31
      patient-co/patient-co-doctor-assistant/src/main/resources/application-test.yml
  12. 11 0
      patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/config/DataSourceConfig.java
  13. 1 2
      patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/etl/extract/db/DBExtract.java
  14. 8 2
      patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/service/JobService.java
  15. 4 3
      patient-co/patient-co-statistics-es/src/main/resources/application.yml
  16. 2 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/feedback/DoctorFeedbackTemplateController.java

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 2 - 2
common/common-entity/src/main/java/com/yihu/wlyy/entity/message/Message.java


+ 18 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/Message.java

@ -45,6 +45,24 @@ public class Message extends IdEntity {
	private String tzType;//体征类别
	private String tzCode;//体征code
	private Integer sex;//患者性别
	private String relationCode;//业务关联code,type=6时为咨询code,type=7、8、9时为续方code type = 10/11时为申诉和反馈ID
	private String prescriptionStatus;//type=6续方审核状态 0待审核,1审核通过,2审核失败,3居民取消|type=7续方状态 0待取药,1已取药
	public String getRelationCode() {
		return relationCode;
	}
	public void setRelationCode(String relationCode) {
		this.relationCode = relationCode;
	}
	public String getPrescriptionStatus() {
		return prescriptionStatus;
	}
	public void setPrescriptionStatus(String prescriptionStatus) {
		this.prescriptionStatus = prescriptionStatus;
	}
	public String getCode() {
		return code;

+ 7 - 4
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/feedback/AppealService.java

@ -240,11 +240,12 @@ public class AppealService extends BaseService {
            if (appeal.getIdentity() == 2) {
                String creater = appeal.getCreater();
                SimpleDateFormat formatDate = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
                String newDate = formatDate.format(new Date());
                Date createTime = appeal.getCreateTime();
                String newDate = formatDate.format(createTime);
                String title = "新增系统消息";
                String content = "您在" + newDate + "提交的意见反馈已处理,您可点此查看处理结果";
                String content = "您在" + newDate + "提交的账号申诉已处理,您可点此查看处理结果";
                Message message = new Message();
                message.setType(10);
                message.setType(11);
                message.setCode(UUID.randomUUID().toString());
                message.setCzrq(new Date());
                message.setCreateTime(new Date());
@ -254,14 +255,16 @@ public class AppealService extends BaseService {
                message.setSender("system");//设置发送的用户
                message.setTitle(title);
                message.setReadonly(1);//是否只读消息
                message.setRelationCode(id.toString());
                //wlyy给医生发送系统消息
                Doctor doctor = doctorDao.findByCode(creater);
                String doctorOpenID = doctor.getOpenid();
                String url = wlyyService + "/patient/feedback/sendMessage";
                String url = wlyyService + "/doctor/feedback/sendMessage";
                List<NameValuePair> params = new ArrayList<>();
                params.add(new BasicNameValuePair("receiver", creater));
                params.add(new BasicNameValuePair("title", title));
                params.add(new BasicNameValuePair("type", "11"));
                params.add(new BasicNameValuePair("content", content));
                HttpClientUtil.post(url, params, "UTF-8");

+ 5 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/feedback/FeedbackService.java

@ -232,7 +232,8 @@ public class FeedbackService extends BaseService {
                }
            } else if (identity == 2) {
                SimpleDateFormat formatDate = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
                String newDate = formatDate.format(new Date());
                Date createTime = feedback.getCreateTime();
                String newDate = formatDate.format(createTime);
                String title = "新增系统消息";
                String content = "您在" + newDate + "提交的意见反馈已处理,您可点此查看处理结果";
                Message message = new Message();
@ -246,14 +247,16 @@ public class FeedbackService extends BaseService {
                message.setSender("system");//设置发送的用户
                message.setTitle(title);
                message.setReadonly(1);//是否只读消息
                message.setRelationCode(feedback.getId().toString());
                //wlyy给医生发送系统消息
                Doctor doctor = doctorDao.findByCode(creater);
                String doctorOpenID = doctor.getOpenid();
                String url = wlyyService + "/patient/feedback/sendMessage";
                String url = wlyyService + "/doctor/feedback/sendMessage";
                List<NameValuePair> params = new ArrayList<>();
                params.add(new BasicNameValuePair("receiver", creater));
                params.add(new BasicNameValuePair("title", title));
                params.add(new BasicNameValuePair("type", "10"));
                params.add(new BasicNameValuePair("content",content));
                HttpClientUtil.post(url, params, "UTF-8");

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/resources/application.yml

@ -76,7 +76,7 @@ yueren:
doctorAssistant:
  api: http://192.168.131.113:8080
wlyyService:
  api: http://10.95.22.10:8011/wlyy/
  api: http://192.168.131.113:8081
image:
  imgUrlDomain: http://172.19.103.54/
---

+ 0 - 60
patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/web/doctor/template/DoctorFeldsherTemplateController.java

@ -1,60 +0,0 @@
package com.yihu.wlyy.web.doctor.template;
import com.yihu.wlyy.repository.template.DoctorGuidanceTempDao;
import com.yihu.wlyy.service.template.DoctorFeldsherTemplateService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * 医生健康指导模板
 * <p>
 * Created by Reece on 2017/9/14.
 */
@RestController
@RequestMapping(value = "/doctor/feldsher")
@Api(description = "医生健康指导模板")
public class DoctorFeldsherTemplateController extends BaseController {
    @Autowired
    private DoctorFeldsherTemplateService feldsherTemplateService;
    @Autowired
    DoctorGuidanceTempDao guidanceTempDao;
    /**
     * @param doctorCode   医生code
     * @param sessionId    会话Id
     * @param sessionType  会话类型
     * @param businessType 消息类型
     * @param from         发送者
     * @param content      消息内容
     * @return
     */
    @RequestMapping(value = "/sendDoctorTemplate", method = RequestMethod.POST)
    @ApiOperation(value = "医生助手给医生发送模板消息")
    public String sendDoctorTemplate(@RequestParam @ApiParam(value = "医生code") String doctorCode,
                                     @RequestParam @ApiParam(value = "会话Id", required = false) String sessionId,
                                     @RequestParam @ApiParam(value = "会话类型", required = false) String sessionType,
                                     @RequestParam @ApiParam(value = "消息类型") String businessType,
                                     @RequestParam @ApiParam(value = "发送者", required = false) String from,
                                     @RequestParam @ApiParam(value = "消息内容") String content) {
        try {
            Boolean flag = feldsherTemplateService.sendDoctorTemplate(doctorCode, sessionId, sessionType, businessType, from, content);
            if (flag){
                return write(200, "发送成功!");
            }else {
                return write( -1, "发送失败!");
            }
        } catch (Exception e) {
            e.printStackTrace();
            return invalidUserException(e, -1, "发送失败!");
        }
    }
}

+ 21 - 31
patient-co/patient-co-doctor-assistant/src/main/resources/application-dev.yml

@ -26,40 +26,30 @@ im:
  data_base_name: ichat
wechat:
  appId: wxd03f859efdf0873d
  appSecret: 2935b54b53a957d9516c920a544f2537
  appId: wxb3827510b2e15012
  appSecret: c5bdedd909ded9c2ee08028487e6f50d
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_base_url: http%3a%2f%2fweixin.xmtyw.cn%2fwlyy-dev
  accId: gh_ffd64560fb21
  accId: gh_aa9cd602b84b
  message:
   ##医生追加建议提醒 --签约邀请
   doctor_invitel_template: TLWrBtNE2kBJaFCdVzDOOnQC8N2TtRY9ZxEzwZXQcR0
   #咨询回复
   template_consult_notice: qSOW0DBxO3qEBm4ucG0Ial0jxsOyD7_f2TFK5e-mQEc
   #签约成功
   template_sign_success: hDWV_sknKlhxhOwR5h68OCXbAhRpcgnx9INrT8BybE8
   #签约失败
   template_sign_failed: ezgttXE7rG4rAboQK2ituG1dKq4PeyCj3LxGJWO_vOA
   #健康指导提醒
   template_health_notice: 128RCfyCHi22jW8PZzo7vabKMsA3SBv5VeHaDPr2Bhw
   #解约提醒
   template_termination:  LrrzHjnIF67ww5uQUvSiv3_pVKJiIK4ZE3fKrvsT0AE
   #预约成功
   template_appoint_success:  Bo2yqNczSU9zkg4wXoouv9tSeefZ6TziggWL3dTXPYE
   #预约取消
   template_appoint_failed:  pErTBTdweIdrNRf_1Oo62YtQC0aHwPvtLaCzw44JzCQ
   #缴费提醒
   template_expenses_remind:  BkTGJ8S18qZ3DfaptAXnZznAk8RJjx9v93og5vyO0bs
   #健康教育
   template_healthy_article: LA7erINJ0CSsG2G_ZCrgsDaX3krhsI4qg_NSHEyL_l4
   #医生变更
   template_doctor_change:  TNIDMjduVKgVL4-k71umYLpHROvFB8K6mmm8aZC_EH8
   #问卷调查
   template_doctor_survey:  IjQvzBy0PLeft2kN9mdBhACXPE9I_jyJywJ6B-JRxsY
   #审核结果通知
   template_doctor_audit:  OFyLUeBW3r9trWw-i6pbB1sPSTD4J2recCv_mc-gKxA
   #服务结果通知
   template_doctor_service:  ezr5RlX0nvh7bGU9aVsGDMJbjKDp1uMKP-AGGYXwI5g
   ##处方待处理提醒
   template_prescription_pending: aPl14500g7SblWWGBsisRgFGqtSskiGxmhGMD5tS9ik
   ##服务状态提醒
   template_consult_notice: 5eOa_Wx60tqsbuQK7ITTgRXB-8SntBONvopai_HFnhY
   #居民体征异常提醒
   template_abnormal_signs: 5i4OuDef0Bzk3SBD9iuhOGqoCH0OSaH3HYIC8Sgg-yA
   #咨询请求通知
   template_consult_request: TeiAPgxC7JTVfWa24fkemlJ8Nvji_NCPYmxKzXql05A
   #签约申请通知
   template_sign_request: 7zB0Qf4nUEZlkGnoElmx8I4Q5dm0Gq9JZP6PCzl9b7s
   #随访提醒
   template_followup_success: -9blCMt1b7t24biL7QbkmQH0KWLgOIDQ5LtyX_Ai49E
   #处理结果通知
   template_treatment_result: J3W3-ZGZ5miHd0Ka1JLaXCYkIoCdiuJ-c527PH5nPQI
   #咨询回复提醒
   template_consult_reply: x7fIXWcd1YsXAnwhP-gmW1D__GtzD39j5KZLudoe0Y0
   #代办事项提醒
   template_schedule_remind: z32DERzD6X4ShOl86sI3YCOWl-lkr5Z9sKh1w_YG8Bs
yihu:
  yihu_OpenPlatform_url: http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/

+ 21 - 31
patient-co/patient-co-doctor-assistant/src/main/resources/application-devtest.yml

@ -26,40 +26,30 @@ im:
  data_base_name: im_new
wechat:
  appId: wx088a4d8e8208e6ce
  appSecret: ab3cdd509fb76fd0149e8864c97e8ddb
  appId: wxb3827510b2e15012
  appSecret: c5bdedd909ded9c2ee08028487e6f50d
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_base_url: http%3a%2f%2fwww.xmtyw.cn%2fassistant
  accId: gh_b0f086d0d2f5
  accId: gh_aa9cd602b84b
  message:
    ##医生追加建议提醒 --签约邀请
    doctor_invitel_template:  uXdBJVbrhKG-WLaCG4s8C4SXSr2kknQ94vKFt-3rIiA
    #咨询回复
    template_consult_notice: dr4QNyFoRvVsf8uWxXMC1dRyjwnbUuJwJ21vBLhf18
    #签约成功
    template_sign_success: VYGj8OUKj6FH4i4_nZS2UAHurJxQHx-7_OBPILIdB8s
    #签约失败
    template_sign_failed: m221Jrkm0UUY00ExTCpQNTB8t_1U_V4LR9Bg8BgH9-o
    #健康指导提醒
    template_health_notice: 5Nts8lA_at9Cd1JuTK-qDxx95lchpcmUfPTEwYDgXYQ
    #解约提醒
    template_termination:  qZm1NwSueAsbHaOf9DrnLoSj0X5gZuh9W7aDYzLWNds
    #预约成功
    template_appoint_success:  vU5x2tGyk1zUngBrEqMfnFqqMa6M8J98w8k5MCSUYM
    #预约取消
    template_appoint_failed:  r-bVEKgXVyl8O96saoJXlLd7DX1zW7fXA4a0PZHxiQM
    #缴费提醒
    template_expenses_remind:  pZby4Mz3H5angmjGTuvXzo9lwlaVfEiqORwI8soI-5E
    #健康教育
    template_healthy_article: aO_qqk5nAXaGXhsikPVLNelqzwlrp1LTPfIQ1qRMpxo
    #医生变更
    template_doctor_change:  V5h0F84t972kUzQvWy8qYrgdaYGJVj10pFeFVl19Nb8
    #问卷调查
    template_doctor_survey:  OqQXrb-e43_TJpq_70_K_y6vYJgY5mpjFYY4c5RWFP4
    #审核结果通知
    template_doctor_audit:  lCtOgJgL1tBJbAytqN7cn-FgCH_Usg99FENEy2TrC08
    #服务结果通知
    template_doctor_service: i34rq3xFLnpf_VN2Jor9n2YlQqJMM7oXyYvuctriISw
   ##处方待处理提醒
   template_prescription_pending: aPl14500g7SblWWGBsisRgFGqtSskiGxmhGMD5tS9ik
   ##服务状态提醒
   template_consult_notice: 5eOa_Wx60tqsbuQK7ITTgRXB-8SntBONvopai_HFnhY
   #居民体征异常提醒
   template_abnormal_signs: 5i4OuDef0Bzk3SBD9iuhOGqoCH0OSaH3HYIC8Sgg-yA
   #咨询请求通知
   template_consult_request: TeiAPgxC7JTVfWa24fkemlJ8Nvji_NCPYmxKzXql05A
   #签约申请通知
   template_sign_request: 7zB0Qf4nUEZlkGnoElmx8I4Q5dm0Gq9JZP6PCzl9b7s
   #随访提醒
   template_followup_success: -9blCMt1b7t24biL7QbkmQH0KWLgOIDQ5LtyX_Ai49E
   #处理结果通知
   template_treatment_result: J3W3-ZGZ5miHd0Ka1JLaXCYkIoCdiuJ-c527PH5nPQI
   #咨询回复提醒
   template_consult_reply: x7fIXWcd1YsXAnwhP-gmW1D__GtzD39j5KZLudoe0Y0
   #代办事项提醒
   template_schedule_remind: z32DERzD6X4ShOl86sI3YCOWl-lkr5Z9sKh1w_YG8Bs
yihu:

+ 21 - 31
patient-co/patient-co-doctor-assistant/src/main/resources/application-local.yml

@ -26,40 +26,30 @@ im:
  data_base_name: im_new
wechat:
  appId: wx1f129f7b51701428
  appSecret: 988f005d8309ed1795939e0f042431fb
  appId: wxb3827510b2e15012
  appSecret: c5bdedd909ded9c2ee08028487e6f50d
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_base_url: http%3a%2f%2fehr.yihu.com%2fwlyy
  accId: gh_ffd64560fb21
  accId: gh_aa9cd602b84b
  message:
    ##医生追加建议提醒 --签约邀请
    doctor_invitel_template:  uXdBJVbrhKG-WLaCG4s8C4SXSr2kknQ94vKFt-3rIiA
    #咨询回复
    template_consult_notice: dr4QNyFoRvVsf8uWxXMC1dRyjwnbUuJwJ21vBLhf18
    #签约成功
    template_sign_success: VYGj8OUKj6FH4i4_nZS2UAHurJxQHx-7_OBPILIdB8s
    #签约失败
    template_sign_failed: m221Jrkm0UUY00ExTCpQNTB8t_1U_V4LR9Bg8BgH9-o
    #健康指导提醒
    template_health_notice: 5Nts8lA_at9Cd1JuTK-qDxx95lchpcmUfPTEwYDgXYQ
    #解约提醒
    template_termination:  qZm1NwSueAsbHaOf9DrnLoSj0X5gZuh9W7aDYzLWNds
    #预约成功
    template_appoint_success:  vU5x2tGyk1zUngBrEqMfnFqqMa6M8J98w8k5MCSUYM
    #预约取消
    template_appoint_failed:  r-bVEKgXVyl8O96saoJXlLd7DX1zW7fXA4a0PZHxiQM
    #缴费提醒
    template_expenses_remind:  pZby4Mz3H5angmjGTuvXzo9lwlaVfEiqORwI8soI-5E
    #健康教育
    template_healthy_article: aO_qqk5nAXaGXhsikPVLNelqzwlrp1LTPfIQ1qRMpxo
    #医生变更
    template_doctor_change:  V5h0F84t972kUzQvWy8qYrgdaYGJVj10pFeFVl19Nb8
    #问卷调查
    template_doctor_survey:  OqQXrb-e43_TJpq_70_K_y6vYJgY5mpjFYY4c5RWFP4
    #审核结果通知
    template_doctor_audit:  lCtOgJgL1tBJbAytqN7cn-FgCH_Usg99FENEy2TrC08
    #服务结果通知
    template_doctor_service: i34rq3xFLnpf_VN2Jor9n2YlQqJMM7oXyYvuctriISw
    ##处方待处理提醒
    template_prescription_pending: aPl14500g7SblWWGBsisRgFGqtSskiGxmhGMD5tS9ik
    ##服务状态提醒
    template_consult_notice: 5eOa_Wx60tqsbuQK7ITTgRXB-8SntBONvopai_HFnhY
    #居民体征异常提醒
    template_abnormal_signs: 5i4OuDef0Bzk3SBD9iuhOGqoCH0OSaH3HYIC8Sgg-yA
    #咨询请求通知
    template_consult_request: TeiAPgxC7JTVfWa24fkemlJ8Nvji_NCPYmxKzXql05A
    #签约申请通知
    template_sign_request: 7zB0Qf4nUEZlkGnoElmx8I4Q5dm0Gq9JZP6PCzl9b7s
    #随访提醒
    template_followup_success: -9blCMt1b7t24biL7QbkmQH0KWLgOIDQ5LtyX_Ai49E
    #处理结果通知
    template_treatment_result: J3W3-ZGZ5miHd0Ka1JLaXCYkIoCdiuJ-c527PH5nPQI
    #咨询回复提醒
    template_consult_reply: x7fIXWcd1YsXAnwhP-gmW1D__GtzD39j5KZLudoe0Y0
    #代办事项提醒
    template_schedule_remind: z32DERzD6X4ShOl86sI3YCOWl-lkr5Z9sKh1w_YG8Bs
yihu:

+ 21 - 31
patient-co/patient-co-doctor-assistant/src/main/resources/application-localtest.yml

@ -26,40 +26,30 @@ im:
  data_base_name: im_new
wechat:
  appId: wx1f129f7b51701428
  appSecret: 988f005d8309ed1795939e0f042431fb
  appId: wxb3827510b2e15012
  appSecret: c5bdedd909ded9c2ee08028487e6f50d
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_base_url: http%3a%2f%2fehr.yihu.com%2fwlyy
  accId: gh_ffd64560fb21
  accId: gh_aa9cd602b84b
  message:
    ##医生追加建议提醒 --签约邀请
    doctor_invitel_template:  uXdBJVbrhKG-WLaCG4s8C4SXSr2kknQ94vKFt-3rIiA
    #咨询回复
    template_consult_notice: dr4QNyFoRvVsf8uWxXMC1dRyjwnbUuJwJ21vBLhf18
    #签约成功
    template_sign_success: VYGj8OUKj6FH4i4_nZS2UAHurJxQHx-7_OBPILIdB8s
    #签约失败
    template_sign_failed: m221Jrkm0UUY00ExTCpQNTB8t_1U_V4LR9Bg8BgH9-o
    #健康指导提醒
    template_health_notice: 5Nts8lA_at9Cd1JuTK-qDxx95lchpcmUfPTEwYDgXYQ
    #解约提醒
    template_termination:  qZm1NwSueAsbHaOf9DrnLoSj0X5gZuh9W7aDYzLWNds
    #预约成功
    template_appoint_success:  vU5x2tGyk1zUngBrEqMfnFqqMa6M8J98w8k5MCSUYM
    #预约取消
    template_appoint_failed:  r-bVEKgXVyl8O96saoJXlLd7DX1zW7fXA4a0PZHxiQM
    #缴费提醒
    template_expenses_remind:  pZby4Mz3H5angmjGTuvXzo9lwlaVfEiqORwI8soI-5E
    #健康教育
    template_healthy_article: aO_qqk5nAXaGXhsikPVLNelqzwlrp1LTPfIQ1qRMpxo
    #医生变更
    template_doctor_change:  V5h0F84t972kUzQvWy8qYrgdaYGJVj10pFeFVl19Nb8
    #问卷调查
    template_doctor_survey:  OqQXrb-e43_TJpq_70_K_y6vYJgY5mpjFYY4c5RWFP4
    #审核结果通知
    template_doctor_audit:  lCtOgJgL1tBJbAytqN7cn-FgCH_Usg99FENEy2TrC08
    #服务结果通知
    template_doctor_service: i34rq3xFLnpf_VN2Jor9n2YlQqJMM7oXyYvuctriISw
    ##处方待处理提醒
    template_prescription_pending: aPl14500g7SblWWGBsisRgFGqtSskiGxmhGMD5tS9ik
    ##服务状态提醒
    template_consult_notice: 5eOa_Wx60tqsbuQK7ITTgRXB-8SntBONvopai_HFnhY
    #居民体征异常提醒
    template_abnormal_signs: 5i4OuDef0Bzk3SBD9iuhOGqoCH0OSaH3HYIC8Sgg-yA
    #咨询请求通知
    template_consult_request: TeiAPgxC7JTVfWa24fkemlJ8Nvji_NCPYmxKzXql05A
    #签约申请通知
    template_sign_request: 7zB0Qf4nUEZlkGnoElmx8I4Q5dm0Gq9JZP6PCzl9b7s
    #随访提醒
    template_followup_success: -9blCMt1b7t24biL7QbkmQH0KWLgOIDQ5LtyX_Ai49E
    #处理结果通知
    template_treatment_result: J3W3-ZGZ5miHd0Ka1JLaXCYkIoCdiuJ-c527PH5nPQI
    #咨询回复提醒
    template_consult_reply: x7fIXWcd1YsXAnwhP-gmW1D__GtzD39j5KZLudoe0Y0
    #代办事项提醒
    template_schedule_remind: z32DERzD6X4ShOl86sI3YCOWl-lkr5Z9sKh1w_YG8Bs
yihu:

+ 21 - 31
patient-co/patient-co-doctor-assistant/src/main/resources/application-test.yml

@ -25,40 +25,30 @@ im:
  data_base_name: im_new
wechat:
  appId: wx088a4d8e8208e6ce
  appSecret: ab3cdd509fb76fd0149e8864c97e8ddb
  appId: wxb3827510b2e15012
  appSecret: c5bdedd909ded9c2ee08028487e6f50d
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_base_url: http%3a%2f%2fwww.xmtyw.cn%2fassistant
  accId: gh_b0f086d0d2f5
  accId: gh_aa9cd602b84b
  message:
   ##医生追加建议提醒 --签约邀请
   doctor_invitel_template: uXdBJVbrhKG-WLaCG4s8C4SXSr2kknQ94vKFt-3rIiA
   #咨询回复
   template_consult_notice: dr4QNyFoRvVsf8uWxXMC1dRyjwnbUuJwJ21vBLhf18
   #签约成功
   template_sign_success: VYGj8OUKj6FH4i4_nZS2UAHurJxQHx-7_OBPILIdB8s
   #签约失败
   template_sign_failed: m221Jrkm0UUY00ExTCpQNTB8t_1U_V4LR9Bg8BgH9-o
   #健康指导提醒
   template_health_notice: 5Nts8lA_at9Cd1JuTK-qDxx95lchpcmUfPTEwYDgXYQ
   #解约提醒
   template_termination:  qZm1NwSueAsbHaOf9DrnLoSj0X5gZuh9W7aDYzLWNds
   #预约成功
   template_appoint_success:  vU5x2tGyk1zUngBrEqMfnFqqMa6M8J98w8k5MCSUYM
   #预约取消
   template_appoint_failed:  r-bVEKgXVyl8O96saoJXlLd7DX1zW7fXA4a0PZHxiQM
   #缴费提醒
   template_expenses_remind:  pZby4Mz3H5angmjGTuvXzo9lwlaVfEiqORwI8soI-5E
   #健康教育
   template_healthy_article: aO_qqk5nAXaGXhsikPVLNelqzwlrp1LTPfIQ1qRMpxo
   #医生变更
   template_doctor_change:  V5h0F84t972kUzQvWy8qYrgdaYGJVj10pFeFVl19Nb8
   #问卷调查
   template_doctor_survey:  OqQXrb-e43_TJpq_70_K_y6vYJgY5mpjFYY4c5RWFP4
   #审核结果通知
   template_doctor_audit:  lCtOgJgL1tBJbAytqN7cn-FgCH_Usg99FENEy2TrC08
   #服务结果通知
   template_doctor_service:  i34rq3xFLnpf_VN2Jor9n2YlQqJMM7oXyYvuctriISw
     ##处方待处理提醒
     template_prescription_pending: aPl14500g7SblWWGBsisRgFGqtSskiGxmhGMD5tS9ik
     ##服务状态提醒
     template_consult_notice: 5eOa_Wx60tqsbuQK7ITTgRXB-8SntBONvopai_HFnhY
     #居民体征异常提醒
     template_abnormal_signs: 5i4OuDef0Bzk3SBD9iuhOGqoCH0OSaH3HYIC8Sgg-yA
     #咨询请求通知
     template_consult_request: TeiAPgxC7JTVfWa24fkemlJ8Nvji_NCPYmxKzXql05A
     #签约申请通知
     template_sign_request: 7zB0Qf4nUEZlkGnoElmx8I4Q5dm0Gq9JZP6PCzl9b7s
     #随访提醒
     template_followup_success: -9blCMt1b7t24biL7QbkmQH0KWLgOIDQ5LtyX_Ai49E
     #处理结果通知
    template_treatment_result: J3W3-ZGZ5miHd0Ka1JLaXCYkIoCdiuJ-c527PH5nPQI
     #咨询回复提醒
     template_consult_reply: x7fIXWcd1YsXAnwhP-gmW1D__GtzD39j5KZLudoe0Y0
     #代办事项提醒
     template_schedule_remind: z32DERzD6X4ShOl86sI3YCOWl-lkr5Z9sKh1w_YG8Bs
yihu:
  yihu_OpenPlatform_url: http://ssotest.yihu.cn/OpenPlatform/cgiBin/1.0/

+ 11 - 0
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/config/DataSourceConfig.java

@ -40,6 +40,10 @@ public class DataSourceConfig {
    private boolean testOnBorrow;
    @Value("${spring.datasource.testOnReturn}")
    private boolean testOnReturn;
    @Value("${spring.datasource.poolPreparedStatements}")
    private boolean poolPreparedStatements;
    @Value("${spring.datasource.maxPoolPreparedStatementPerConnectionSize}")
    private int maxPoolPreparedStatementPerConnectionSize;
@ -75,6 +79,9 @@ public class DataSourceConfig {
        datasource.setTestWhileIdle(testWhileIdle);
        datasource.setTestOnBorrow(testOnBorrow);
        datasource.setTestOnReturn(testOnReturn);
        datasource.setPoolPreparedStatements(poolPreparedStatements);
        datasource.setMaxPoolPreparedStatementPerConnectionSize(maxPoolPreparedStatementPerConnectionSize);
        return datasource;
    }
@ -107,6 +114,8 @@ public class DataSourceConfig {
        datasource.setTestWhileIdle(testWhileIdle);
        datasource.setTestOnBorrow(testOnBorrow);
        datasource.setTestOnReturn(testOnReturn);
        datasource.setPoolPreparedStatements(poolPreparedStatements);
        datasource.setMaxPoolPreparedStatementPerConnectionSize(maxPoolPreparedStatementPerConnectionSize);
        return datasource;
    }
@ -136,6 +145,8 @@ public class DataSourceConfig {
        datasource.setTestWhileIdle(testWhileIdle);
        datasource.setTestOnBorrow(testOnBorrow);
        datasource.setTestOnReturn(testOnReturn);
        datasource.setPoolPreparedStatements(poolPreparedStatements);
        datasource.setMaxPoolPreparedStatementPerConnectionSize(maxPoolPreparedStatementPerConnectionSize);
        return datasource;
    }

+ 1 - 2
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/etl/extract/db/DBExtract.java

@ -16,6 +16,7 @@ import java.util.List;
@Component
@Scope("prototype")
public class DBExtract<T> {
    Integer pageSize=100000;
    /**
     * 不分页抽取
@ -49,7 +50,6 @@ public class DBExtract<T> {
        if(StringUtils.isEmpty(countSql)){
            return extract(clazz,sql,jdbcTemplate);
        }
        int pageSize=10000;
        return SpringUtil.getBean(DBPageExtract.class).extractByPage(clazz,sql,countSql,pageSize,isMultithreading,jdbcTemplate);
    }
    /**
@ -59,7 +59,6 @@ public class DBExtract<T> {
     * @return
     */
    public List<Object> extractByPage(Class<T> clazz,String sql,JdbcTemplate jdbcTemplate)throws  Exception{
        int pageSize=10000;
        Boolean isMultithreading=false;
        String countSql="";
        return SpringUtil.getBean(DBPageExtract.class).extractByPage(clazz,sql,countSql,pageSize,isMultithreading,jdbcTemplate);

+ 8 - 2
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/service/JobService.java

@ -14,6 +14,8 @@ import com.yihu.wlyy.statistics.vo.WlyyJobConfigVO;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,6 +44,9 @@ public class JobService {
    @Autowired
    private DoctorPatientGroupInfoDao doctorPatientGroupInfoDao;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Transactional
    public void stopById(String id) throws Exception {
@ -170,6 +175,7 @@ public class JobService {
    }
    public void productDataByOneDay(String yesterday) throws Exception {
        String sql="select * from wlyy_job_config_new a where  a.del='1' and a.id !=11 order by a.id asc";
        SimpleDateFormat dataSimple = new SimpleDateFormat("yyyy-MM-dd");
        Date date = dataSimple.parse(yesterday);
@ -181,7 +187,7 @@ public class JobService {
        calendar.add(calendar.DATE, -1);//把日期往后增加一天.整数往后推,负数往前移动
        Date nowDate = calendar.getTime();   //这个时间就是日期往后推一天的结果
        String daybefore = new SimpleDateFormat("yyyy-MM-dd").format(nowDate.getTime());
        List<QuartzJobConfig> quartzJobConfigs = wlyyJobConfigDao.findByIds();
        List<QuartzJobConfig> quartzJobConfigs = jdbcTemplate.query(sql,new BeanPropertyRowMapper(QuartzJobConfig.class));
        for (QuartzJobConfig quartzJobConfig : quartzJobConfigs) {
            WlyyJobConfigVO wlyyJobConfigVO = new WlyyJobConfigVO();
@ -300,7 +306,7 @@ public class JobService {
        int day = daysBetween(startDate, endDate);
        for (int i = 0; i < day; i++) {
            Cache.cleanCache();//清空缓存
            Thread.sleep(60000L);//休息60秒
           // Thread.sleep(60000L);//休息60秒
            productDataByOneDay(getYesterday(i, startDate));
        }
    }

+ 4 - 3
patient-co/patient-co-statistics-es/src/main/resources/application.yml

@ -14,17 +14,18 @@ spring:
  datasource:
    driverClassName: com.mysql.jdbc.Driver
    initialSize: 20
    initialSize: 50
    maxActive: 50
    minIdle: 50 #最大空闲连接
    maxWait: 10
    maxWait: 50
    validationQuery: SELECT 1 #SQL 查询, 用来验证从连接池取出的连接, 在将连接返回给调用者之前。 如果指定, 则查询必须是一个SQL SELECT 并且必须返回至少一行记录
    testOnBorrow: true #指明是否在从池中取出连接前进行检验, 如果检验失败, 则从池中去除连接并尝试取出另一个。注意: 设置为true 后如果要生效,validationQuery 参数必须设置为非空字符串
    testOnReturn: true #指明是否在归还到池中前进行检验 注意: 设置为true 后如果要生效validationQuery 参数必须设置为非空字符串
    testWhileIdle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    minEvictableIdleTimeMillis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    timeBetweenEvictionRunsMillis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
    poolPreparedStatements: true # 打开PSCache,并且指定每个连接上PSCache的大小
    maxPoolPreparedStatementPerConnectionSize: 50
    # REDIS
  redis:
    database: 0 # Database index used by the connection factory.

+ 2 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/feedback/DoctorFeedbackTemplateController.java

@ -42,9 +42,10 @@ public class DoctorFeedbackTemplateController extends BaseController {
    public String saveFeedback(
            @RequestParam String receiver,
            @RequestParam String title,
            @RequestParam String type,
            @RequestParam String content) {
        try {
            pushMsgTask.put(receiver, "8", title, content, "");
            pushMsgTask.put(receiver, type, title, content, "");
            return write(200, "发送成功!");
        } catch (Exception e) {
            error(e);