Selaa lähdekoodia

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

trick9191 7 vuotta sitten
vanhempi
commit
b0a4be8c9e
32 muutettua tiedostoa jossa 740 lisäystä ja 57 poistoa
  1. 98 0
      common/common-entity/src/main/java/com/yihu/device/entity/kit/KitDrugDetail.java
  2. 125 0
      common/common-entity/src/main/java/com/yihu/device/entity/kit/KitDrugUseRecord.java
  3. 19 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/datastatic/PayLogController.java
  4. 4 1
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/httplog/PayLogService.java
  5. 1 1
      patient-co-manage/wlyy-manage/src/main/resources/application.yml
  6. 3 3
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/activity_list_js.jsp
  7. 5 5
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/taskRule_list_js.jsp
  8. 9 9
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/task_list_js.jsp
  9. 1 1
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/hos/hospital_list_js.jsp
  10. 3 3
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/questionnaire/question/question_list_js.jsp
  11. 5 5
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/questionnaire/template/template_list_js.jsp
  12. 2 2
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/questionnaire/template/template_result.jsp
  13. 1 1
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/sign/sign_family_list_js.jsp
  14. 1 1
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/sign/sign_team_info_js.jsp
  15. 34 4
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/static/pay_log_list_js.jsp
  16. 102 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/static/pay_log_modify.jsp
  17. 123 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/static/pay_log_modify_js.jsp
  18. 4 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/doctor/SurveyScreenResultDao.java
  19. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java
  20. 2 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java
  21. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java
  22. 83 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/survey/SurveyScreenResultService.java
  23. 25 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/guahao/GuahaoXMService.java
  24. 22 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/JwSignService.java
  25. 21 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorSignController.java
  26. 39 6
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/survey/PatientQuestionnaireController.java
  27. 1 0
      patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml
  28. 1 0
      patient-co/patient-co-wlyy/src/main/resources/application-local.yml
  29. 1 0
      patient-co/patient-co-wlyy/src/main/resources/application-prod.yml
  30. 1 0
      patient-co/patient-co-wlyy/src/main/resources/application-test.yml
  31. 1 1
      patient-co/patient-co-wlyy/src/main/resources/system.properties
  32. BIN
      patient-co/patient-co-wlyy/src/main/webapp/images/banner02.png

+ 98 - 0
common/common-entity/src/main/java/com/yihu/device/entity/kit/KitDrugDetail.java

@ -0,0 +1,98 @@
package com.yihu.device.entity.kit;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by 刘文彬 on 2018/7/18.
 * 用药记录药品清单
 */
@Entity
@Table(name = "kit_drug_detail")
public class KitDrugDetail extends IdEntity {
    private String code;//业务code
    private String deviveSn;//药盒的sn码
    private String drugName;//药品名称
    private String drugCode;//药品编码(巨烨暂无提供)
    private String unit;//药品计量单位(药盒默认“粒”)
    private String measure;//药品计量
    private Date insertTime;//记录添加时间
    private String drugUseCode;//用药记录表KitDrugUseRecord的code
    private String drugImgUrl;//药品图片地址
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getDeviveSn() {
        return deviveSn;
    }
    public void setDeviveSn(String deviveSn) {
        this.deviveSn = deviveSn;
    }
    public String getDrugName() {
        return drugName;
    }
    public void setDrugName(String drugName) {
        this.drugName = drugName;
    }
    public String getDrugCode() {
        return drugCode;
    }
    public void setDrugCode(String drugCode) {
        this.drugCode = drugCode;
    }
    public String getUnit() {
        return unit;
    }
    public void setUnit(String unit) {
        this.unit = unit;
    }
    public String getMeasure() {
        return measure;
    }
    public void setMeasure(String measure) {
        this.measure = measure;
    }
    public Date getInsertTime() {
        return insertTime;
    }
    public void setInsertTime(Date insertTime) {
        this.insertTime = insertTime;
    }
    public String getDrugUseCode() {
        return drugUseCode;
    }
    public void setDrugUseCode(String drugUseCode) {
        this.drugUseCode = drugUseCode;
    }
    public String getDrugImgUrl() {
        return drugImgUrl;
    }
    public void setDrugImgUrl(String drugImgUrl) {
        this.drugImgUrl = drugImgUrl;
    }
}

+ 125 - 0
common/common-entity/src/main/java/com/yihu/device/entity/kit/KitDrugUseRecord.java

@ -0,0 +1,125 @@
package com.yihu.device.entity.kit;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by 刘文彬 on 2018/7/18.
 * 药盒用药记录
 */
@Entity
@Table(name = "kit_drug_use_record")
public class KitDrugUseRecord extends IdEntity {
    private String code;//业务code
    private Date insertTime;//记录添加时间
    private Date useTime; //居民用药时间
    private Date normalTime; //居民正常用药时间
    private Integer recordType; //记录类型(1、手动,2、设备)
    private Integer useDrugStatus;//用药状态(1、按时,2、超时,3、漏用)
    private String deviveSn;//药盒的sn码
    private String deviveModel;//药盒型号
    private String patientCode;//居民code
    private String patientName;//居民姓名
    private String kitAccountId;//药盒账号id
    private String drugDetail;//药品清单json串
    public Date getInsertTime() {
        return insertTime;
    }
    public void setInsertTime(Date insertTime) {
        this.insertTime = insertTime;
    }
    public Date getUseTime() {
        return useTime;
    }
    public void setUseTime(Date useTime) {
        this.useTime = useTime;
    }
    public Date getNormalTime() {
        return normalTime;
    }
    public void setNormalTime(Date normalTime) {
        this.normalTime = normalTime;
    }
    public Integer getRecordType() {
        return recordType;
    }
    public void setRecordType(Integer recordType) {
        this.recordType = recordType;
    }
    public Integer getUseDrugStatus() {
        return useDrugStatus;
    }
    public void setUseDrugStatus(Integer useDrugStatus) {
        this.useDrugStatus = useDrugStatus;
    }
    public String getDeviveSn() {
        return deviveSn;
    }
    public void setDeviveSn(String deviveSn) {
        this.deviveSn = deviveSn;
    }
    public String getKitAccountId() {
        return kitAccountId;
    }
    public void setKitAccountId(String kitAccountId) {
        this.kitAccountId = kitAccountId;
    }
    public String getDrugDetail() {
        return drugDetail;
    }
    public void setDrugDetail(String drugDetail) {
        this.drugDetail = drugDetail;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getDeviveModel() {
        return deviveModel;
    }
    public void setDeviveModel(String deviveModel) {
        this.deviveModel = deviveModel;
    }
    public String getPatientCode() {
        return patientCode;
    }
    public void setPatientCode(String patientCode) {
        this.patientCode = patientCode;
    }
    public String getPatientName() {
        return patientName;
    }
    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }
}

+ 19 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/datastatic/PayLogController.java

@ -26,6 +26,12 @@ public class PayLogController extends BaseController {
        return "static/pay_log_list";
    }
    @RequestMapping(value = "infoInit", method = RequestMethod.GET)
    public String initInfoPage(@RequestParam(value = "id") Integer id){
        request.setAttribute("id",id);
        return "static/pay_log_modify";
    }
    @RequestMapping(value ="list",method = RequestMethod.POST)
    @ResponseBody
    public String searchList(
@ -42,4 +48,17 @@ public class PayLogController extends BaseController {
            return error(-1,"操作失败!");
        }
    }
    //根据id获取
    @RequestMapping(value = "findById")
    @ResponseBody
    public String findById(@RequestParam(value = "id") Long id) {
        try {
            PayLog payLog = payLogService.findById(id);
            return write(200, "操作成功!", "data", payLog);
        } catch (Exception e) {
            error(e);
            return error(-1, "操作失败!");
        }
    }
}

+ 4 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/httplog/PayLogService.java

@ -50,7 +50,7 @@ public class PayLogService extends BaseJpaService<PayLog,PayLogDao> {
            filters.append("and create_time < '"+endDate+"' ");
        }
        payLogList = jdbcTemplate.query(sql+filters.toString()+" order by p.create_time "+" limit "+(page-1)*pageSize+","+pageSize, new BeanPropertyRowMapper<>(PayLog.class));
        payLogList = jdbcTemplate.query(sql+filters.toString()+" order by p.create_time desc"+" limit "+(page-1)*pageSize+","+pageSize, new BeanPropertyRowMapper<>(PayLog.class));
        if(payLogList.size()<=0){
            return new PageImpl<PayLog>(new ArrayList<>(), pageRequest, 0);
        }
@ -58,4 +58,7 @@ public class PayLogService extends BaseJpaService<PayLog,PayLogDao> {
        return new PageImpl<PayLog>(payLogList,pageRequest,count);
    }
    public PayLog findById(Long id) {
        return payLogDao.findOne(id);
    }
}

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

@ -317,7 +317,7 @@ reservation:
  zyurl: http://59.61.92.90:8072/wlyy_service
#健康活动url
healthbank:
  url: http://172.19.103.33:8660/svr-wlyy-health-bank/svr-health-bank/
  url: http://192.168.120.167:8661/svr-wlyy-health-bank/svr-health-bank/
wechat:
  appId: wxad04e9c4c5255acf
  appSecret: ae77c48ccf1af5d07069f5153d1ac8d3

+ 3 - 3
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/activity_list_js.jsp

@ -96,10 +96,10 @@
                            {display: '活动地点', name: 'location', width: '10%', align: "left"},
                            {display: '活动说明', name: 'description', width: '10%', align: "left"},
                            {display: '活动类型', name: 'type', width: '10%', align: "left"},
                            {display: '开始时间', name: 'startTime', width: '10%', align: "left"},
                            {display: '结束时间', name: 'endTime', width: '10%', align: "left"},
                            {display: '开始时间', name: 'startTime', width: '10%', align: "center"},
                            {display: '结束时间', name: 'endTime', width: '10%', align: "center"},
                            {
                                display: '活动状态', name: 'status', width: '10%', align: "left",
                                display: '活动状态', name: 'status', width: '10%', align: "center",
                                render: function (row) {
                                    if (row.status == 1) {
                                        return "报名中"

+ 5 - 5
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/taskRule_list_js.jsp

@ -86,10 +86,10 @@
                        columns: [
                            {display: 'id', name: 'id', hide: true},
                            {display: '规则名称', name: 'name', width: '10%', align: "left"},
                            {display: '规则描述', name: 'description', width: '10%', align: "left"},
                            {display: '规则描述', name: 'description', width: '20%', align: "left"},
                            {display: '积分', name: 'integrate', width: '10%', align: "left"},
                            {
                                display: '交易类型', name: 'tradeDirection', width: '10%', align: "left",
                                display: '交易类型', name: 'tradeDirection', width: '10%', align: "center",
                                render: function (row) {
                                    if(row.tradeDirection == 1) {
                                        return "增"
@ -103,7 +103,7 @@
                                }
                            },
                            {
                                display: '规则类型', name: 'type', width: '10%', align: "left",
                                display: '规则类型', name: 'type', width: '10%', align: "center",
                                render: function (row) {
                                    if (row.type == "NORMAL") {
                                        return "手动"
@ -115,7 +115,7 @@
                            },
                            {display: 'Java反射类路径', name: 'javaClassPath', width: '10%', align: "left"},
                            {
                                display: '周期', name: 'period', width: '10%', align: "left",
                                display: '周期', name: 'period', width: '10%', align: "center",
                                render: function (row) {
                                    if (row.period == 1) {
                                        return "一次性"
@ -126,7 +126,7 @@
                                }
                            },
                            {
                                display: '状态', name: 'status', width: '10%', align: "left",
                                display: '状态', name: 'status', width: '10%', align: "center",
                                render: function (row) {
                                    if (row.status == 1) {
                                        return "有效"

+ 9 - 9
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/task_list_js.jsp

@ -86,11 +86,11 @@
                        ajaxHeaderValue: ajaxHeaderValue,
                        columns: [
                            {display: 'id', name: 'id', hide: true},
                            {display: '任务标题', name: 'title', width: '10%', align: "left"},
                            {display: '任务说明', name: 'content', width: '10%', align: "left"},
                            {display: '任务编码', name: 'taskCode', width: '10%', align: "left"},
                            {display: '任务标题', name: 'title', width: '15%', align: "left"},
                            {display: '任务说明', name: 'content', width: '15%', align: "left"},
                            {display: '任务编码', name: 'taskCode', width: '10%', align: "center"},
                            {
                                display: '任务类型', name: 'type', width: '10%', align: "left",
                                display: '任务类型', name: 'type', width: '10%', align: "center",
                                render: function (row) {
                                    if (row.type == "NORMAL_TASK") {
                                        return "普通任务"
@ -105,20 +105,20 @@
                            },
                            // {display: '业务Id', name: 'startTime', width: '10%', align: "left"},
                            {
                                display: '周期', name: 'period', width: '10%', align: "left",
                                display: '周期', name: 'period', width: '10%', align: "center",
                                render: function (row) {
                                    if (row.period == 1) {
                                        return "一次性"
                                    }
                                    if (row.period == 0) {
                                        return "每天"
                                        return "周期性"
                                    }
                                }
                            },
                            {display: '开始时间', name: 'startTime', width: '10%', align: "left"},
                            {display: '结束时间', name: 'endTime', width: '10%', align: "left"},
                            {display: '开始时间', name: 'startTime', width: '10%', align: "center"},
                            {display: '结束时间', name: 'endTime', width: '10%', align: "center"},
                            {
                                display: '状态', name: 'status', width: '10%', align: "left",
                                display: '状态', name: 'status', width: '10%', align: "center",
                                render: function (row) {
                                    if (row.status == 1) {
                                        return "有效"

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/hos/hospital_list_js.jsp

@ -77,7 +77,7 @@
										display: '医院类别',
										name: 'level',
										width: '10%',
										align: "center",
										align: "left",
										render: function (row) {
											if (row.level == 1) {
												return "医院";

+ 3 - 3
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/questionnaire/question/question_list_js.jsp

@ -105,7 +105,7 @@
						ajaxHeaderValue: ajaxHeaderValue,
						columns: [
							{display: 'ID', name: 'id', hide: true},
							{display: '标题', name: 'title', width: '20%', align: "center"},
							{display: '标题', name: 'title', width: '25%', align: "left"},
							{display: '类型', name: 'questionType', width: '10%', align: "center",
								render: function (row) {
									if (Util.isStrEquals(row.questionType, 0)) {
@ -116,9 +116,9 @@
									return "问答";
								}
							},
							{display: '问题说明', name: 'comment', width: '40%', align: "center"},
							{display: '问题说明', name: 'comment', width: '50%', align: "left"},
							{
								display: '操作', name: 'operator', width: '30%', align: "center", isSort: false,
								display: '操作', name: 'operator', width: '15%', align: "center", isSort: false,
								render: function (row) {
									var html = '';
									html += '<a  href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}','{2}'])", "info:view", row.id, row.questionType) + '">查看</a>';

+ 5 - 5
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/questionnaire/template/template_list_js.jsp

@ -104,12 +104,12 @@
						ajaxHeaderValue: ajaxHeaderValue,
						columns: [
							{display: 'ID', name: 'id', hide: true},
							{display: '标题', name: 'title', width: '25%', align: "center"},
							{display: '标签', name: 'labelName', width: '20%', align: "center"},
							{display: '说明', name: 'comment', width: '20%', align: "center"},
							{display: '创建人', name: 'createName', width: '15%', align: "center"},
							{display: '标题', name: 'title', width: '15%', align: "left"},
							{display: '标签', name: 'labelName', width: '15%', align: "left"},
							{display: '说明', name: 'comment', width: '50%', align: "left"},
							{display: '创建人', name: 'createName', width: '10%', align: "center"},
							{
								display: '操作', name: 'operator', width: '20%', align: "center", isSort: false,
								display: '操作', name: 'operator', width: '10%', align: "center", isSort: false,
								render: function (row) {
									var html = '';
									html += '<a  href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}','{2}'])", "info:view", row.id, row.labelName) + '">查看</a>';

+ 2 - 2
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/questionnaire/template/template_result.jsp

@ -65,11 +65,11 @@
                <span>&nbsp;&nbsp;~&nbsp;&nbsp;</span>
                <input type="text" class="form-control flex-box-item mw100 high_score">
                <span class="mr40"><span class="red-color">*</span>分析结果&nbsp;&nbsp;</span>
                <input type="text" class="form-control flex-box-item result"></div>
                <input type="text" class="form-control flex-box-item result" placeholder="请输入不超过200字的分析结果"></div>
            <div class="col-xs-10 flex-box">
                <span style="align-self: flex-start;"><span class="red-color">*</span>筛查建议&nbsp;&nbsp;</span>
                <textarea rows="5" class="form-control flex-box-item h120 advice" placeholder="筛查建议"></textarea>
                <textarea rows="5" class="form-control flex-box-item h120 advice" placeholder="请输入不超过200字的筛查建议"></textarea>
            </div>
            <div class="col-xs-2 caozuo-btn">
                <label class="btn btn-success width100">显示预警<input type="checkbox" class="xsyj"><i></i></label>

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/sign/sign_family_list_js.jsp

@ -148,7 +148,7 @@
								}
							},
							{
								display: '操作', name: 'operator', width: '10%', align: "center", isSort: false,
								display: '操作', name: 'operator', width: '10%', align: "left", isSort: false,
								render: function (row) {
									var html = '';
									html += '<a  href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "sign:info:view", row.id) + '">明细</a>';

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/sign/sign_team_info_js.jsp

@ -35,7 +35,7 @@
									{display: '医生名称', name: 'doctorName', width: '10%', align: "left"},
									{display: '联系电话', name: 'mobile', width: '10%', align: "left"},
									{display: '职称', name: 'jobName', width: '10%', align: "left"},
									{display: '医生角色', name: 'levelName', width: '10%', align: "center"},
									{display: '医生角色', name: 'levelName', width: '10%', align: "left"},
									{display: '加入团队时间', name: 'joinTime', width: '12%', align: "left"},
									{display: '最后修改时间', name: 'lastModified', width: '13%', align: "left"},
									{

+ 34 - 4
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/static/pay_log_list_js.jsp

@ -9,6 +9,14 @@
            var retrieve = null;
            var master = null;
            var isFirstPage = false;
            var now = new Date();
            var year = now.getFullYear();
            var month = now.getMonth() + 1;
            if(month < 7) {
                year = year - 1;
            }
            var date = year+"-07-01" ;
            /* *************************** 函数定义 ******************************* */
            function pageInit() {
                retrieve.init();
@ -51,6 +59,7 @@
                        labelAlign: 'center',
                        cancelable: true
                    });
                    $("#inp_startDate").val(date);
                    this.bindEvents();
                },
                bindEvents: function () {
@ -67,7 +76,7 @@
                init: function () {
                    this.grid = $("#div_paylog_list").ligerGrid($.LigerGridEx.config({
                        url: ctx + '/admin/paylog/list',
                        parms: {},
                        parms: {startDate:$("#inp_startDate").val()},
                        ajaxHeader: ajaxHeaderName,
                        ajaxHeaderValue: ajaxHeaderValue,
                        columns: [
@ -85,31 +94,52 @@
                            },
                            {display: '业务内容', name: 'content', width: '10%', align: "left"},
                            {display: '调用接口', name: 'api', width: '10%', align: "left"},
                            {display: '调用方式', name: 'method', width: '5%', align: "left"},
                            {display: '调用方式', name: 'method', width: '5%', align: "center"},
                            {display: '调用参数', name: 'params', width: '10%', align: "left"},
                            {display: '调用头部信息', name: 'header', width: '10%', align: "left"},
                            {display: '返回结果', name: 'response', width: '10%', align: "left"},
                            {display: '错误信息', name: 'error', width: '10%', align: "left"},
                            {display: '重试次数', name: 'retryTimes', width: '5%', align: "left"},
                            {
                                display: '状态', name: 'status', width: '5%', align: "left",
                                display: '状态', name: 'status', width: '5%', align: "center",
                                render: function (row) {
                                    if (row.status == 0) {
                                        return "失败"
                                    }
                                    if (row.status == 1) {
                                        return "成功"
                                    }
                                    }ia
                                    if (row.status == 2) {
                                        return "已重试"
                                    }
                                }
                            },
                            {display: '创建时间', name: 'createTime', width: '10%', align: "left"},
                            {
                                display: '操作', name: 'operator', width: '5%', render: function (row) {
                                    var html = '';
                                    html += '<a  href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "static:paylog:view", row.id) + '">查看</a>';
                                    return html;
                                }
                            }
                        ],
                    }));
                    // 自适应宽度
                    this.grid.adjustToWidth();
                    this.bindEvents();
                },
                bindEvents: function () {
                    $.subscribe('static:paylog:view', function (event, id) {
                        var title = '支付日志详情';
                        $.ligerDialog.open({
                            height: 750,
                            width: 650,
                            title: title,
                            urlParms: {"id": id},
                            url: ctx + '/admin/paylog/infoInit',
                        })
                    });
                },
                reloadGrid: function (msg) {
                    retrieve.$element.attrScan();

+ 102 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/static/pay_log_modify.jsp

@ -0,0 +1,102 @@
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/7/18 0018
  Time: 下午 8:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html; charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<html>
<head>
    <%@ include file="../head/page_head.jsp"%>
    <title>支付日志详情</title>
    <style type="text/css">
        .m-form-group label.label_title{width: 100px}
    </style>
</head>
<body>
<div id="div_paylog_info_form" data-role-form class="m-form-inline f-mt20 f-ml30" data-role-form>
    <input type="hidden" id="inp_id" value='${id}' data-attr-scan="id"/>
    <div class="m-form-group" style="padding:10 0 10 0">
        <label class="label_title" style="width:120px">接口类型</label>
        <div class="l-text-wrapper m-form-control ">
            <input type="text"  id="inp_type" class="f-w240 validate-special-char"   data-attr-scan="type"/>
        </div>
    </div>
    <div class="m-form-group">
        <label class="label_title" style="width:120px">业务内容</label>
        <div class="l-text-wrapper m-form-control ">
            <input type="text"  id="inp_content" class="f-w240 validate-special-char"   data-attr-scan="content"/>
        </div>
    </div>
    <div class="m-form-group">
        <label class="label_title" style="width:120px">调用接口</label>
        <div class="l-text-wrapper m-form-control ">
            <input type="text"  id="inp_api" class="ajax f-w240 validate-special-char"  data-attr-scan="api"/>
        </div>
    </div>
    <div class="m-form-group">
        <label class="label_title" style="width:120px">调用方式</label>
        <div class="l-text-wrapper m-form-control">
            <input type="text"  id="inp_method" class="useTitle ajax f-w240 validate-special-char"  data-attr-scan="method"/>
        </div>
    </div>
    <div class="m-form-group">
        <label class="label_title" style="width:120px">调用头部信息</label>
        <div class="l-text-wrapper m-form-control ">
            <input type="text"  id="inp_header" class="f-w240 validate-special-char" data-attr-scan="header"/>
        </div>
    </div>
    <div class="m-form-group">
        <label class="label_title" style="width:120px">调用参数</label>
        <div class="l-text-wrapper m-form-control ">
            <textarea type="text"  id="inp_params" data_type='select' class="f-w240 validate-special-char"  data-attr-scan="params"></textarea>
        </div>
    </div>
    <div class="m-form-group">
        <label class="label_title" style="width:120px">返回结果</label>
        <div class="l-text-wrapper m-form-control">
            <textarea type="text"  id="inp_response" class="f-w240 validate-special-char" data-attr-scan="response"></textarea>
        </div>
    </div>
    <div class="m-form-group">
        <label class="label_title" style="width:120px">错误信息</label>
        <div class="l-text-wrapper m-form-control">
            <textarea type="text"  id="inp_error" class="f-w240 validate-special-char"   data-attr-scan="error"></textarea>
        </div>
    </div>
    <div class="m-form-group">
        <label class="label_title" style="width:120px">状态</label>
        <div class="l-text-wrapper m-form-control">
            <input type="text"  id="inp_status" class="f-w240 validate-special-char"   data-attr-scan="status"/>
        </div>
    </div>
    <div class="m-form-group">
        <label class="label_title" style="width:120px">重试次数</label>
        <div class="l-text-wrapper m-form-control">
            <input type="text"  id="inp_retryTimes" class="f-w240 validate-special-char"   data-attr-scan="retryTimes"/>
        </div>
    </div>
    <div class="m-form-group">
        <label class="label_title" style="width:120px">创建时间</label>
        <div class="l-text-wrapper m-form-control">
            <input type="text"  id="inp_createTime" class="f-w240 validate-special-char"   data-attr-scan="createTime"/>
        </div>
    </div>
    <%--<div class="m-form-group f-pa" id="btn_save_close" style="right: 10px;bottom: 0;">
        <div class="m-form-control">
            <input type="button" value="保存" id="btn_save" class="l-button u-btn u-btn-primary u-btn-large f-ib f-vam" />
            <div id="btn_cancel" class="l-button u-btn u-btn-cancel u-btn-large f-ib f-vam" >
                <span>关闭</span>
            </div>
        </div>
    </div>--%>
</div>
</body>
<%@ include file="../head/page_foot.jsp"%>
<%@ include file="pay_log_modify_js.jsp" %>
<%--<script src="${ctx}/static/js/device/device_modify.js"></script>--%>
</html>

+ 123 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/static/pay_log_modify_js.jsp

@ -0,0 +1,123 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<script>
    (function ($, win) {
        $(function () {
            /* ************************** 变量定义 ******************************** */
            var Util = $.Util;
            var menuInfo = null;
            var id = $("#inp_id").val();
            // 表单校验工具类
            var jValidation = $.jValidation;
            /* *************************** 函数定义 ******************************* */
            function pageInit() {
                menuInfo.init();
            }
            /* *************************** 模块初始化 ***************************** */
            menuInfo = {
                $form: $("#div_paylog_info_form"),
                $type: $("#inp_type"),
                $content: $("#inp_content"),
                $api: $("#inp_api"),
                $method: $("#inp_method"),
                $params: $("#inp_params"),
                $header: $("#inp_header"),
                $response: $("#inp_response"),
                $error: $("#inp_error"),
                $status: $("#inp_status"),
                $retryTimes: $("#inp_retryTimes"),
                $createTime: $("#inp_createTime"),
                init: function () {
                    _this = this;
                    this.$form.attrScan();
                    var onlyRead = false; //是否只读
                    this.$form.ligerForm({
                        validate: true
                    });
                    _this.typeBox = _this.$type.ligerComboBox({
                        width: 240,
                        data: [
                            {text: '家庭签约支付', id: '0'},
                            {text: '续方支付', id: '1'},
                        ],
                        initIsTriggerEvent: false,
                        valueField: 'id',
                    });
                    _this.$content.ligerTextBox({width: 240});
                    _this.$api.ligerTextBox({width: 240});
                    _this.$method.ligerTextBox({width: 240});
                    _this.$params.ligerTextBox({width: 430, height: 150});
                    _this.$header.ligerTextBox({width: 240});
                    _this.$response.ligerTextBox({width: 430, height: 150});
                    _this.$retryTimes.ligerTextBox({width: 240});
                    _this.$error.ligerTextBox({width: 430, height: 150});
                    _this.statusBox = _this.$status.ligerComboBox({
                        width: 180,
                        data: [
                            {text: '失败', statusId: '0'},
                            {text: '成功', statusId: '1'},
                            {text: '已重试', statusId: '2'}
                        ],
                        initIsTriggerEvent: false,
                        valueField: 'statusId',
                    });
                    _this.$createTime.ligerTextBox({width: 240});
                    if (isNoEmpty(id) && id != 0) {
                        $.ajax({
                            url: ctx + '/admin/paylog/findById',
                            method: "post",
                            dataType: "json",
                            async: false,
                            data: {id: id},
                            success: function (result) {
                                if (result.status == '200') {
                                    //通过id查信息
                                    var data = result.data;
                                    _this.$form.Fields.fillValues({
                                        //位置:显示内容
                                        content: data.content,
                                        api: data.api,
                                        method: data.method,
                                        params: data.params,
                                        header: data.header,
                                        response: data.response,
                                        error: data.error,
                                        status: data.status,
                                        retryTimes: data.retryTimes,
                                        createTime: data.creatTime,
                                    });
                                    //填值
                                    _this.typeBox.setValue(data.type);
                                    _this.statusBox.setValue(data.status);
                                    // _this.$form.addClass("m-form-readonly");
                                } else {
                                    $.Notice.error(result.msg);
                                }
                            },
                            error: function (data) {
                                $.Notice.error("系统异常,请联系管理员!");
                            }
                        });
                    }
                    $("#btn_cancel").click(function () {
                        parent.window.closePayLogInfoDialog();
                    });
                }
            };
            /* *************************** 页面初始化 **************************** */
            pageInit();
        });
    })(jQuery, window);
</script>

+ 4 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/doctor/SurveyScreenResultDao.java

@ -5,6 +5,7 @@ import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.Date;
import java.util.List;
/**
@ -28,4 +29,7 @@ public interface SurveyScreenResultDao extends PagingAndSortingRepository<Survey
    @Query("select a from  SurveyScreenResult a where a.reservationCode=?1")
    List<SurveyScreenResult> getByReservationCode(String reservationCode);
    /*@Modifying
    @Query("update SurveyScreenResult s set s.over=1,s.czrq=?1,s.screenResultScore=?2,s.screenResultCode=?3,s.screenResult=?4,s.isDanger=?5 where s.code=?6")
    void updateScreenAndSaveAnswer(Date czrq, int totalScore, String screenResultCode, String screenResult, int isDanger, String code);*/
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java

@ -134,7 +134,7 @@ public class MessageService extends BaseService {
        // 体征指标未读消息总数
        Integer healthIndex = messageDao.amountUnreadHealthByReceiver(doctor);
        JSONObject indexJson = new JSONObject();
        indexJson.put("l", healthIndex);
        indexJson.put("amount", healthIndex);
        if (healthIndex > 0) {
            PageRequest pageRequest = new PageRequest(0, 1);
            List<Message> msgs = messageDao.amountUnreadHealthLastByReceiver(doctor, pageRequest);

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

@ -6,7 +6,6 @@ import com.yihu.wlyy.entity.address.Street;
import com.yihu.wlyy.entity.address.Town;
import com.yihu.wlyy.entity.charge.WlyyCharge;
import com.yihu.wlyy.entity.consult.Consult;
import com.yihu.wlyy.entity.device.PatientDevice;
import com.yihu.wlyy.entity.device.PatientDeviceLog;
import com.yihu.wlyy.entity.dict.SystemDict;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
@ -31,7 +30,6 @@ import com.yihu.wlyy.repository.message.MessageDao;
import com.yihu.wlyy.repository.patient.*;
import com.yihu.wlyy.repository.wechat.WechatTemplateConfigDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.app.device.PatientDeviceService;
import com.yihu.wlyy.service.app.label.SignPatientLabelInfoService;
import com.yihu.wlyy.service.app.statistics.ServiceStatisticsService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
@ -47,7 +45,6 @@ import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.slf4j.Logger;
@ -2906,7 +2903,8 @@ public class SignWebService extends BaseService {
        Integer signTotal = 0;
        Integer limitTotal = 0;
        List<AdminTeam> adminTeams = doctorAdminTeamMemberDao.findDoctorTeams(doctorCode);
        for(AdminTeam one:adminTeams){
        for (int i =0;i<(adminTeams.size()>=4?4:adminTeams.size());i++){
            AdminTeam one = adminTeams.get(i);
            //获取团队签约数
            Integer signCount = signFamilyDao.findByAdminTeamIdAndStatus(one.getId(),0);
            signTotal+=signCount;

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

@ -5454,7 +5454,7 @@ public class StatisticsESService {
//                startUseSaveModel = elasticsearchUtil.findDateQuotaLevel1(mondayTime, mondayTime, area, level, index_87, SaveModel.timeLevel_DDL, "hemopiezometer", null, null);
//                endUseSaveModel = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_87, SaveModel.timeLevel_DDL, "hemopiezometer", null, null);
                anomalySaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_88, SaveModel.timeLevel_DDL, "hemopiezometer");
                anomalyCountSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_97, SaveModel.timeLevel_DDL, "hemopiezometer");
                anomalyCountSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_97, SaveModel.timeLevel_DDL, "1");
//                anomalyCountSql = " SELECT COUNT(i.id) FROM device.wlyy_patient_health_index i left join device.wlyy_devices d on i.device_sn=d.device_code where i.type =1 and i.status=1 and i.del=1 " + areaCondition;
                allAmountList = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_85, SaveModel.timeLevel_DDL, "hemopiezometer", "", low_level);
                bindingAmountList = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_86, SaveModel.timeLevel_DDL, "hemopiezometer", "", low_level);
@ -5469,7 +5469,7 @@ public class StatisticsESService {
//                startUseSaveModel = elasticsearchUtil.findDateQuotaLevel1(mondayTime, mondayTime, area, level, index_87, SaveModel.timeLevel_DDL, "glucometer", null, null);
//                endUseSaveModel = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_87, SaveModel.timeLevel_DDL, "glucometer", null, null);
                anomalySaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_88, SaveModel.timeLevel_DDL, "glucometer");
                anomalyCountSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_97, SaveModel.timeLevel_DDL, "glucometer");
                anomalyCountSaveModel = elasticsearchUtil.findOneDateQuotaLevel1(timeKey, area, level, index_97, SaveModel.timeLevel_DDL, "2");
//                anomalyCountSql = " SELECT COUNT(i.id) FROM device.wlyy_patient_health_index i left join device.wlyy_devices d on i.device_sn=d.device_code where i.type =2 and i.status=1 and i.del=1 " + areaCondition;
                allAmountList = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_85, SaveModel.timeLevel_DDL, "glucometer", "", low_level);
                bindingAmountList = elasticsearchUtil.findDateQuotaLevel1(timeKey, timeKey, area, level, index_86, SaveModel.timeLevel_DDL, "glucometer", "", low_level);

+ 83 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/survey/SurveyScreenResultService.java

@ -13,6 +13,7 @@ import com.yihu.wlyy.repository.wechat.WechatTemplateConfigDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.survey.ManagerQuestionnaireService;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.IdCardUtil;
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
@ -433,7 +434,7 @@ public class SurveyScreenResultService extends BaseService {
            if (surveyScreenResult.getFollowing()==1){
                followCount++;
            }
            if (surveyScreenResult.getIsOrder()==1){
            if (surveyScreenResult.getIsOrder()>0){
                orderCount++;
            }
            if (StringUtils.isNotEmpty(surveyScreenResult.getParentCode())){
@ -759,7 +760,9 @@ public class SurveyScreenResultService extends BaseService {
                        String name = null;
                        String openId = null;
                        String first = null;
                        String screenCode =null;
                        try {
                            screenCode = saveAfterBatchScreen(c,openId,name,doctor,wxTemplateCode);
                            p = patientDao.findByCode(c);
                            name = p.getName();
                            openId = p.getOpenid();
@ -767,7 +770,7 @@ public class SurveyScreenResultService extends BaseService {
                            json.put("keyword2", sdf.format(new Date()));
                            json.put("survey", wxTemplateCode+"_"+doctor);
                            json.put("toUser", c);
                            json.put("url","jkpg/html/start-survey.html?survey="+wxTemplateCode+"&doctor="+doctor+"&toUser="+c+"&toName="+name);
                            json.put("url","jkpg/html/wx-template-message.html?survey="+wxTemplateCode+"&doctor="+doctor+"&toUser="+c+"&toName="+name+"&screenCode="+screenCode);
//                          String first = name + ",您好!为了给您提供更好的家庭医生健康服务,现有一份问卷需要您填写。";
                            first = templateConfig.getFirst();
                            first = first.replace("key1",(name==null?"":name));
@ -792,7 +795,7 @@ public class SurveyScreenResultService extends BaseService {
                                    if (StringUtils.isNotBlank(member.getOpenid())) {
                                        json.remove("toUser");
                                        json.put("toUser", member.getCode());
                                        json.put("url","jkpg/html/start-survey.html?survey="+wxTemplateCode+"&doctor="+doctor+"&toUser="+member.getCode()+"&toName="+member.getName());
                                        json.put("url","jkpg/html/wx-template-message.html?survey="+wxTemplateCode+"&doctor="+doctor+"&toUser="+member.getCode()+"&toName="+member.getName()+"&screenCode="+screenCode);
                                        json.remove("first");
                                        try {
                                            json.put("keyword1", keyword1);
@ -1024,4 +1027,81 @@ public class SurveyScreenResultService extends BaseService {
        surveyDao.save(survey);
        return surveyCode;
    }
    public String saveAfterBatchScreen(String patientCode,String openId,String patientName,String doctorCode,String surveyCode){
        SurveyScreenResult surveyScreenResult =  new SurveyScreenResult();
        SurveyTemplates surveyTemplates = surveyTemplatesDao.findById(surveyCode);
        Patient patient = patientDao.findByCode(patientCode);
        String code = getCode();
        surveyScreenResult.setCode(code);
        if (surveyTemplates!=null){
            surveyScreenResult.setTemplateCode(surveyTemplates.getCode());
            surveyScreenResult.setTemplateTitle(surveyTemplates.getTitle());
            surveyScreenResult.setDisease(surveyTemplates.getDiseaseType());
        }
        surveyScreenResult.setDoctor(doctorCode);
        surveyScreenResult.setPatientCode(patientCode);
        if (patient!=null){
            surveyScreenResult.setPatientName(patient.getName());
            surveyScreenResult.setOpenId(patient.getOpenid());
        }else {
            surveyScreenResult.setOpenId(openId);
            surveyScreenResult.setPatientName(patientName);
        }
        surveyScreenResult.setIsDanger(0);
        surveyScreenResult.setIsOrder(0);
        surveyScreenResult.setFollowing(0);
        surveyScreenResult.setIsEducate(0);
        surveyScreenResult.setOver(0);
        surveyScreenResult.setCzrq(new Date());
        surveyScreenResult.setIsAgain(1);
        surveyScreenResult.setOriginCode(code);
        surveyScreenResult.setSource(1);
        surveyScreenResult.setScreenResultScore(0);
        surveyScreenResultDao.save(surveyScreenResult);
        return code;
    }
    public String updateScreenAndSaveAnswer(String patientCode,String screenCode, JSONObject jsonData)throws Exception{
        System.out.println("********保存筛查结果--jsonData********* " + jsonData);
        String surveyCode = jsonData.get("surveyCode").toString();
        SurveyScreenResult surveyScreenResult =  surveyScreenResultDao.getSurveyScreenResultByCode(screenCode);
        //解析json保存各种答案--获取一维数组
        JSONArray questions = jsonData.getJSONArray("questions");
        int totalScore = 0;
        for (int i = 0; i < questions.length(); i++) {
            //获取每一道题的信息
            JSONObject question = new JSONObject(questions.get(i).toString());
            int type = Integer.parseInt(question.get("type").toString());
            if (type != 2) {
                if (question.has("options")) {
                    //获取每道题的所有选项
                    JSONArray options = question.getJSONArray("options");
                    for (int j = 0; j < options.length(); j++) {
                        JSONObject option = new JSONObject(options.get(j).toString());
                        int score = option.getInt("score");
                        totalScore += score;
                    }
                }
            }
        }
        //查询该筛查的结果设置
        SurveyTemplateResult surveyTemplateResult = surveyTemplateResultDao.getByTemplateCodeAndLowScoreAndHighScore(surveyCode,totalScore);
       /* surveyScreenResult.setOver(1);
        surveyScreenResult.setCzrq(new Date());
        surveyScreenResult.setScreenResultScore(totalScore);
        if (surveyTemplateResult!=null){
            surveyScreenResult.setScreenResultCode(surveyTemplateResult.getCode());
            surveyScreenResult.setIsDanger(surveyTemplateResult.getWarning());
            surveyScreenResult.setScreenResult(surveyTemplateResult.getResult());
        }*/
       String sql ="UPDATE wlyy_survey_screen_result SET over=1,czrq=?,screen_result_code=?,screen_result=?,screen_result_score=?,is_danger=? WHERE code=?";
       jdbcTemplate.update(sql,new Object[]{new Date(),surveyTemplateResult.getCode(),surveyTemplateResult.getResult(),totalScore,surveyTemplateResult.getWarning(),screenCode});
        //surveyScreenResultDao.updateScreenAndSaveAnswer(new Date(),totalScore,surveyTemplateResult.getCode(),surveyTemplateResult.getResult(),surveyTemplateResult.getWarning(),screenCode);
        managerQuestionnaireService.saveAnswer(patientCode,surveyScreenResult.getCode(),jsonData);
        return screenCode;
    }
}

+ 25 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/guahao/GuahaoXMService.java

@ -1,6 +1,7 @@
package com.yihu.wlyy.service.third.guahao;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.wlyy.entity.doctor.DoctorMapping;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.survey.SurveyScreenResult;
import com.yihu.wlyy.entity.message.Message;
@ -8,6 +9,7 @@ import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.PatientReservation;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.doctor.DoctorMappingDao;
import com.yihu.wlyy.repository.doctor.SurveyScreenResultDao;
import com.yihu.wlyy.repository.message.MessageDao;
import com.yihu.wlyy.repository.organization.HospitalMappingDao;
@ -84,6 +86,9 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
    @Autowired
    private DoctorDao doctorDao;
    @Autowired
    private DoctorMappingDao doctorMappingDao;
    private ObjectMapper objectMapper = new ObjectMapper();
@ -119,6 +124,15 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
            e.printStackTrace();
            System.out.println("获取医生信息失败");
        }
        DoctorMapping doctorMapping = null;
        try{
            if (doctor != null){
                doctorMapping = doctorMappingDao.findByJwDoctorHospitalAndJwDoctor(doctor.getHospitalName(),doctorId);
            }
        }catch (Exception e){
            e.printStackTrace();
            System.out.println("获取系统医生信息失败");
        }
        // 保存预约记录
        PatientReservation reservation = new PatientReservation();
        reservation.setCode(code);
@ -169,17 +183,23 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
            SurveyScreenResult surveyScreenResult = surveyScreenResultDao.getSurveyScreenResultByCode(surveyCode);
            surveyScreenResult.setIsOrder(1);
            surveyScreenResult.setReservationCode(patientReservation.getCode());
            surveyScreenResult.setFollowing(0);
            String sql = "update wlyy_survey_screen_result ssr set ssr.is_order = "+surveyScreenResult.getIsOrder()+"," +
                    "reservation_code = '"+surveyScreenResult.getReservationCode()+"' where ssr.id = '"+surveyScreenResult.getId()+"'";
                    "reservation_code = '"+surveyScreenResult.getReservationCode()+"',following = "+surveyScreenResult.getFollowing()+ " where ssr.id = '"+surveyScreenResult.getId()+"'";
            jdbcTemplate.update(sql);
            //发送消息
            Message message = new Message();
            message.setCzrq(new Date());
            message.setCreateTime(new Date());
            message.setContent("您有一个居民开通专科服务");
            message.setRead(1);//设置未读
            message.setReceiver(doctorId);//设置接受医生的code
            if (doctorMapping!=null){
                message.setReceiver(doctorMapping.getDoctorCode());//设置接受医生的code
           }else {
                message.setReceiver("40f5371c810d411ab085cb8d9f0160a6");
           }
            message.setSender(patient);//设置发送的用户
            message.setSenderName(patientName);
            message.setCode(getCode());
@ -1242,8 +1262,8 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
            String startTime = map.get("startTime");
            String endTime = map.get("endTime");
            /*String response = jwSmjkService.webRegisterByFamily(cardNo, patientName, clinicCard, sectionType, startTime, hospitalId, hosDeptId, hosDeptName, doctorId, doctorName,patientPhone);*/
            String response = UUID.randomUUID()+"|516|熊永强";
            String response = jwSmjkService.webRegisterByFamily(cardNo, patientName, clinicCard, sectionType, startTime, hospitalId, hosDeptId, hosDeptName, doctorId, doctorName,patientPhone);
            /*String response = UUID.randomUUID()+"|516|熊永强";*/
            re = CreateOrderAfter(response, hospitalId, hospitalName, hosDeptId, hosDeptName, doctorId, doctorName, sectionType, startTime, endTime, patient, patientName, cardNo, clinicCard, patientPhone, dname, dcode,surveyCode);
        } else {
            throw new Exception("该排班信息错误或者不存在!");
@ -1288,6 +1308,7 @@ public class GuahaoXMService extends BaseService implements IGuahaoService {
        messageDao.save(message);
        SurveyScreenResult surveyScreenResult = surveyScreenResultDao.getSurveyScreenResultByCode(surveyCode);
        surveyScreenResult.setIsOrder(2);
        surveyScreenResult.setFollowing(0);
        surveyScreenResultDao.save(surveyScreenResult);
        JSONObject object = new JSONObject();
        object.put("message",message);

+ 22 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/JwSignService.java

@ -23,6 +23,8 @@ public class JwSignService {
    @Value("${sign.check_upload}")
    private String jwUrl;
    @Value("${sign.check_upload_sign}")
    private String jwSignUrl;
    /****************************************************************************************************************************/
    /**
@ -77,4 +79,24 @@ public class JwSignService {
        return HttpClientUtil.post(url, params, "UTF-8");
    }
    
    /**
     * 根据身份证号同步居民签约信息
     */
    public String LoadSignFamilyByIdcard(String idcard) throws Exception {
        String url = jwSignUrl + "/third/sign/LoadSignFamilyByIdcard";
        
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        
        String result =HttpClientUtil.post(url, params, "UTF-8");
        
        com.alibaba.fastjson.JSONObject rejson = com.alibaba.fastjson.JSONObject.parseObject(result);
        
        if(rejson.getInteger("status")!=200){
            throw new Exception("更新签约失败!");
        }
        return "更新签约成功!";
        
    }
}

+ 21 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorSignController.java

@ -6,6 +6,7 @@ import com.yihu.wlyy.service.app.account.DoctorInfoService;
import com.yihu.wlyy.service.app.account.PatientInfoService;
import com.yihu.wlyy.service.app.sign.SignWebService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.service.third.jw.JwSignService;
import com.yihu.wlyy.util.CommonUtil;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.IdCardUtil;
@ -41,6 +42,8 @@ public class DoctorSignController extends WeixinBaseController {
    private PatientInfoService patientInfoService;
    @Autowired
    private SignWebService signWebService;
    @Autowired
    private JwSignService jwSignService;
    @Autowired
    private CommonUtil CommonUtil;
@ -799,4 +802,22 @@ public class DoctorSignController extends WeixinBaseController {
            return error(-1, "查询失败");
        }
    }
    
    /**
     * 根据身份证号同步居民签约信息
     * @param idcard
     * @return
     */
    @RequestMapping(value = "/loadSignFamilyByIdcard", method = {RequestMethod.GET, RequestMethod.POST})
    @ResponseBody
    public String loadSignFamilyByIdcard(@RequestParam(required = true)String idcard){
        try {
            String re = jwSignService.LoadSignFamilyByIdcard(idcard);
            Patient patient = patientService.findByIdcard(idcard);
            return write(200, "更新签约成功","patient",patient);
        } catch (Exception e) {
            error(e);
            return error(-1, "更新签约失败!");
        }
    }
}

+ 39 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/survey/PatientQuestionnaireController.java

@ -2,8 +2,12 @@ package com.yihu.wlyy.web.patient.survey;
import com.google.gson.JsonObject;
import com.yihu.es.entity.QuestionnaireWinningESDO;
import com.yihu.wlyy.entity.doctor.survey.SurveyScreenResult;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.entity.questionnaire.QuestionnaireUsers;
import com.yihu.wlyy.repository.doctor.SurveyScreenResultDao;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.repository.questionnaire.QuestionnaireUsersDao;
import com.yihu.wlyy.rest.model.common.SimpleResult;
@ -40,17 +44,15 @@ public class    PatientQuestionnaireController extends BaseController {
    @Autowired
    private PatientQuestionnaireService patientQuestionnaireService;
    @Autowired
    private StringRedisTemplate redisTemplate;
    @Autowired
    private QuestionnaireService questionnaireService;
    @Autowired
    private QuestionnaireUsersDao questionnaireUsersDao;
    @Autowired
    private SurveyScreenResultService surveyScreenResultService;
    @Autowired
    private ManagerQuestionnaireService managerQuestionnaireService;
    @Autowired
    private SignFamilyDao signFamilyDao;
    @Autowired
    private SurveyScreenResultDao surveyScreenResultDao;
    @Autowired
    private PatientDao patientDao;
    @RequestMapping(value = "getSurveySummary", method = RequestMethod.GET)
    @ApiOperation(value = "居民端获取问卷概述")
@ -195,4 +197,35 @@ public class    PatientQuestionnaireController extends BaseController {
        }
    }
    @RequestMapping(value = "checkIsOver", method = RequestMethod.POST)
    @ApiOperation(value = "用户点击消息模板查看该份筛查是否已经完成")
    @ResponseBody
    public String checkIsOver(@ApiParam(value = "筛查记录code")@RequestParam(value = "screenCode")String screenCode) {
        try {
            SurveyScreenResult surveyScreenResult = surveyScreenResultDao.getSurveyScreenResultByCode(screenCode);
            return write(200,"获取成功!","data",surveyScreenResult);
        } catch (Exception e) {
            e.printStackTrace();
            return write(-1, "获取失败!");
        }
    }
    @RequestMapping(value = "updateScreenAndSaveAnswer", method = RequestMethod.POST)
    @ApiOperation(value = "用户点击消息模板完成筛查.")
    @ResponseBody
    public String updateScreenAndSaveAnswer( @RequestParam String jsonData,
                              @ApiParam(value = "医生code")@RequestParam(value = "doctorCode",required = false)String doctorCode,
                              @ApiParam(value = "筛查记录code")@RequestParam(value = "screenCode")String screenCode) {
        try {
            JSONObject json = new JSONObject(jsonData);
            return  write(200, "保存成功!","data",surveyScreenResultService.updateScreenAndSaveAnswer(getUID(),screenCode,json));
        } catch (Exception e) {
            e.printStackTrace();
            return write(-1, "保存失败!");
        }
    }
}

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

@ -116,6 +116,7 @@ images:
sign:
  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/

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

@ -106,6 +106,7 @@ images:
sign:
  check_upload: http://10.95.22.10:8011/wlyy_service
  check_upload_sign: http://10.95.22.10:8011/wlyy_sign
express:
  sf_url: http://bsp-ois.sit.sf-express.com:9080/bsp-ois/sfexpressService

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

@ -113,6 +113,7 @@ images:
sign:
  check_upload: http://59.61.92.90:8072/wlyy_service
  check_upload_sign: http://59.61.92.90:8072/wlyy_sign
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService

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

@ -106,6 +106,7 @@ images:
sign:
  check_upload: http://172.19.103.88:8011/wlyy_service
  check_upload_sign: http://172.19.103.88:8011/wlyy_sign
express:
  sf_url: http://218.17.248.244:11080/bsp-oisp/sfexpressService

+ 1 - 1
patient-co/patient-co-wlyy/src/main/resources/system.properties

@ -35,7 +35,7 @@ patient_immune_url=https://open.weixin.qq.com/connect/oauth2/authorize?appid={ap
#居民wifi图片地址
patient_wifi_pic_url = {server}/images/wifi.png
#居民抽奖图片地址
patient_draw_pic_url = {server}/images/banner01.png
patient_draw_pic_url = {server}/images/banner02.png
#专科医生签约图片地址
specialist_sign_url = {server}/images/SpBanner.png
#专科医生签约图片地址

BIN
patient-co/patient-co-wlyy/src/main/webapp/images/banner02.png