Quellcode durchsuchen

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

huangwenjie vor 7 Jahren
Ursprung
Commit
5f236ca369
27 geänderte Dateien mit 666 neuen und 188 gelöschten Zeilen
  1. 1 1
      common/common-entity/src/main/java/com/yihu/wlyy/entity/doctor/team/sign/SignPatientLabel.java
  2. 1 0
      common/common-entity/src/main/java/com/yihu/wlyy/entity/message/Message.java
  3. 2 0
      edu-article/JkEdu/src/com/yihu/jk/api/ArticleApiTest.java
  4. 4 1
      edu-article/JkEdu/src/com/yihu/jk/dao/ArticleDao.java
  5. 40 2
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/datastatic/PrescriptionStaticController.java
  6. 20 5
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/sign/SignFamilyController.java
  7. 9 0
      patient-co-manage/wlyy-manage/src/main/resources/application.yml
  8. 13 11
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/device/deviceHealthIndex_list_js.jsp
  9. 1 1
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/hos/hospital_list_js.jsp
  10. 12 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_list_js.jsp
  11. 51 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_status.jsp
  12. 67 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_status_js.jsp
  13. 33 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/sign/patient_reservation_list.jsp
  14. 87 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/sign/patient_reservation_list_js.jsp
  15. 1 12
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/sign/sign_family_list_js.jsp
  16. 0 80
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/sign/sign_reservation_modify.jsp
  17. 0 71
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/sign/sign_reservation_modify_js.jsp
  18. 0 4
      patient-co-service/wlyy_service/src/main/resources/application.yml
  19. 2 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java
  20. 174 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistService.java
  21. 129 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/SpecialistController.java
  22. 3 0
      patient-co/patient-co-wlyy/src/main/resources/application-dev.yml
  23. 3 0
      patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml
  24. 4 0
      patient-co/patient-co-wlyy/src/main/resources/application-local.yml
  25. 3 0
      patient-co/patient-co-wlyy/src/main/resources/application-localtest.yml
  26. 3 0
      patient-co/patient-co-wlyy/src/main/resources/application-prod.yml
  27. 3 0
      patient-co/patient-co-wlyy/src/main/resources/application-test.yml

+ 1 - 1
common/common-entity/src/main/java/com/yihu/wlyy/entity/doctor/team/sign/SignPatientLabel.java

@ -16,7 +16,7 @@ public class SignPatientLabel extends IdEntity {
    private String labelCode;
    // 标签名称
    private String labelName;
    // 标签类型 1:服务类型 2:健康情况 3:疾病类型 4:自定义
    // 标签类型 1:服务类型 2:健康情况 3:疾病类型 4:自定义,5.周月标签 6.老年人标识 7.专病类型,8.健康情况
    private String labelType;
    // 是否系统标签
    private Integer isSystem;

+ 1 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/message/Message.java

@ -52,6 +52,7 @@ public class Message extends IdEntity {
	private String over;//是否操作结束 是否操作结束 1是 0否
	private Double value1;// 当前值/收缩压,正数为高,负数为低
	private Double value2;// 上次值/舒张压,正数为高,负数为低
	//(type=14、15的时候,即健康文章消息类型,tzType表示健康文章发送给同个医生哪个角色下等同roleType)
	private String tzType;//体征类别
	private String tzCode;//体征code
	private Integer sex;//患者性别

+ 2 - 0
edu-article/JkEdu/src/com/yihu/jk/api/ArticleApiTest.java

@ -135,4 +135,6 @@ public class ArticleApiTest {
		}
	}
}

+ 4 - 1
edu-article/JkEdu/src/com/yihu/jk/dao/ArticleDao.java

@ -510,7 +510,7 @@ public class ArticleDao {
		}
		if(!StringUtils.isEmpty(vo.getUserScope())){
			behaviorParam += ",UserScope="+vo.getUserScope();
			sql.addVar("@behaviorParam"," UserScope="+vo.getUserScope());
//			sql.addVar("@behaviorParam"," UserScope="+vo.getUserScope());
		}
		if(!StringUtils.isEmpty(vo.getArticleContent())){
			behaviorParam += ",ArticleContent='"+vo.getArticleContent()+"'";
@ -520,6 +520,9 @@ public class ArticleDao {
			behaviorParam += ",UpdateTime='"+vo.getUpdateTime()+"'";
//			sql.addVar("@behaviorParam"," UpdateTime='"+vo.getUpdateTime()+"'");
		}
		if(!StringUtils.isEmpty(vo.getIsAuthentication())){
			behaviorParam += ",IsAuthentication="+vo.getIsAuthentication();
		}
		if(!StringUtils.isEmpty(behaviorParam)){
			sql.addVar("@behaviorParam",behaviorParam.substring(1));
		}

+ 40 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/datastatic/PrescriptionStaticController.java

@ -1,19 +1,24 @@
package com.yihu.wlyy.controller.manager.datastatic;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.entity.prescription.PrescriptionVO;
import com.yihu.wlyy.service.prescription.PrescriptionService;
import io.swagger.annotations.ApiOperation;
import com.yihu.wlyy.util.HttpClientUtil;
import io.swagger.annotations.ApiParam;
import jxl.Workbook;
import jxl.write.*;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
/**
@ -24,9 +29,13 @@ import java.util.List;
@Controller
@RequestMapping(value="/admin/static/prescription")
public class PrescriptionStaticController extends BaseController {
	
	@Value("${reservation.zyurl}")
	private String baseUrl;
	@Autowired
	private PrescriptionService prescriptionService;
	@Autowired
	private HttpClientUtil httpClientUtil;
	
	//长处方统计管理*******************************
	@RequestMapping(value = "initial", method = RequestMethod.GET)
@ -170,4 +179,33 @@ public class PrescriptionStaticController extends BaseController {
		}
		ws.addCell(label);
	}
	//获取长处方状态
	@RequestMapping(value = "getDataStatus/{prescription_code}",method = RequestMethod.GET)
	public String DataStatus(@PathVariable(value = "prescription_code") String prescription_code){
		return "prescription/prescription_status";
	}
	@RequestMapping(value = "getDataStatus")
	@ResponseBody
	public String getDataStatus(
			@ApiParam(name = "prescriptionCode", value = "长处方单号")
			@RequestParam(value = "prescriptionCode") String prescriptionCode){
		try {
			String url = baseUrl + "/third/prescription/getDataStatus";
			List<NameValuePair> params = new ArrayList<>();
			params.add(new BasicNameValuePair("prescriptionCode", prescriptionCode));
			params.add(new BasicNameValuePair("type", "2"));
			String response = httpClientUtil.post(url, params, "UTF-8");
//            String response = "{\"status\":200,\"msg\":\"查询成功!\",\"data\":\"{\\\"CODE\\\":\\\"1\\\",\\\"returnData\\\":[[{\\\"RECIPE_NO\\\":43861978,\\\"RECIPE_STATUS_CODE\\\":5,\\\"RECIPE_STATUS_NAME\\\":\\\"已执行\\\",\\\"CHARGE_STATUS_CODE\\\":5,\\\"CHARGE_STATUS_NAME\\\":\\\"已扣费\\\"}]],\\\"byRefParaData\\\":[]}\"}";
            JSONObject res = JSONObject.parseObject(response);
			//从JSONObject对象里取出key是data的对象
			JSONObject data = res.getJSONObject("data").getJSONArray("returnData").getJSONArray(0).getJSONObject(0);
			return write(200,"success","data",data);
		}catch (Exception e){
			error(e);
			return error(-1,"操作失败!");
		}
	}
}

Datei-Diff unterdrückt, da er zu groß ist
+ 20 - 5
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/sign/SignFamilyController.java


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

@ -97,6 +97,9 @@ sign:
  check_upload: http://172.19.103.87:8011/wlyy_service
server:
  server_url: http://weixin.xmtyw.cn/wlyy-dev/
#智业预约记录接口
reservation:
  zyurl: http://59.61.92.90:8072/wlyy_service
wechat:
  appId: wxd03f859efdf0873d
  appSecret: 2935b54b53a957d9516c920a544f2537
@ -198,6 +201,9 @@ sign:
  check_upload: http://172.19.103.88:8011/wlyy_service
server:
  server_url: http://ehr.yihu.com/wlyy/
#智业预约记录接口
reservation:
  zyurl: http://59.61.92.90:8072/wlyy_service
wechat:
  appId: wx1f129f7b51701428
  appSecret: 988f005d8309ed1795939e0f042431fb
@ -299,6 +305,9 @@ sign:
  #check_upload: http://59.61.92.90:8072/wlyy_service
server:
  server_url: http://www.xmtyw.cn/wlyy/
#智业预约记录接口
reservation:
  zyurl: http://59.61.92.90:8072/wlyy_service
wechat:
  appId: wxad04e9c4c5255acf
  appSecret: ae77c48ccf1af5d07069f5153d1ac8d3

+ 13 - 11
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/device/deviceHealthIndex_list_js.jsp

@ -199,14 +199,21 @@
                                render: function (row) {
                                    var standard = typeof(row.healthStandard)=='object'?row.healthStandard:JSON.parse(row.healthStandard)
                                    if(row.type==1){
                                        if(row.value1>standard.minValueBefore&&row.value1<standard.maxValueBefore){
                                            return row.value1;
                                        if(row.value2 == 1 || row.value2 == 3 || row.value2 == 5 || row.value2 == 7) {
                                            if (row.value1 > standard.minValueBefore && row.value1 < standard.maxValueBefore) {
                                                return row.value1;
                                            } else {
                                                return "<span style='color:red;'>" + row.value1 + "</span>";
                                            }
                                        }else {
                                            return "<span style='color:red;'>"+row.value1+"</span>";
                                            if (row.value1 > standard.minValueAfter && row.value1 < standard.maxValueAfter) {
                                                return row.value1;
                                            } else {
                                                return "<span style='color:red;'>" + row.value1 + "</span>";
                                            }
                                        }
                                    }else if(row.type==2){
                                        if(row.value1>standard.minValueSSY&&row.value1<standard.maxValueSSY){
                                        if(row.value1 > standard.minValueSSY && row.value1 < standard.maxValueSSY){
                                            return row.value1;
                                        }else {
                                            return "<span style='color:red;'>"+row.value1+"</span>";
@ -220,12 +227,7 @@
                                render: function (row) {
                                    var standard = typeof(row.healthStandard)=='object'?row.healthStandard:JSON.parse(row.healthStandard)
                                    if(row.type==1){
                                        if(row.value2>standard.minValueAfter&&row.value2<standard.maxValueAfter){
                                            return row.value2;
                                        }else {
                                            return "<span style='color:red;'>"+row.value2+"</span>";
                                        }
                                        return row.value2;
                                    }else if(row.type==2){
                                        if(row.value2>standard.minValueSZY&&row.value2<standard.maxValueSZY){

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

@ -191,7 +191,7 @@
									method: "post",
									dataType: "json",
									success: function (result) {
										debugger
										// debugger
										if (result.status == '200') {
											window.reloadMasterGrid(result.msg);
										} else {

+ 12 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_list_js.jsp

@ -225,6 +225,8 @@
                                    var html = '';
                                    html += '<a  href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "prescription:info:view", row.prescription_code) + '">续方详情</a>';
                                    html += '<a  style="margin-left:10px;" href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "prescription:order:view", row.prescription_code) + '">订单跟踪</a>';
                                    html += '<a  style="margin-left:10px;" href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "prescription:status:view", row.prescription_code) + '">长处方状态</a>';
                                    // html += '<a  style="margin-left:10px;" href="' + ctx + '/admin/static/prescription/getDataStatus/' + row.prescription_code +  '" target="centerFrame">长处方状态</a>';
                                    return html;
                                }
                            }
@ -322,6 +324,16 @@
                        })
                    });
                    $.subscribe('prescription:status:view', function (event, code) {
                        var title = '长处方状态';
                        me.prescriptionOrderDialog = $.ligerDialog.open({
                            height: 500,
                            width: 700,
                            title: title,
                            url: ctx + '/admin/static/prescription/getDataStatus/' + code
                        })
                    });
                    //城市下拉
                    me.$inpDeviceName.on( 'change', function () {
                        me.setCityFun(me);

+ 51 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_status.jsp

@ -0,0 +1,51 @@
<%@ page contentType="text/html; charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html>
<html lang="en">
<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_status_info_form" data-role-form class="m-form-inline f-mt20 f-ml30" data-role-form style="overflow-y: scroll;height: 450px">
    <input type="hidden" id="prescriptionCode" value='${prescription_code}' data-attr-scan="id"/>
    <div id="div_base_info">
        <div class="m-form-group" style="">
            <label class="label_title" style="width:220px">基卫处方号</label>
            <div class="l-text-wrapper m-form-control">
                <input type="text"  id="inp_recipe_no" class="f-w240" data-attr-scan="recipe_no"/>
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title" style="width:220px">基卫处方状态码</label>
            <div class="l-text-wrapper m-form-control">
                <input type="text"  id="inp_recipe_status_code" class="f-w240" data-attr-scan="recipe_status_code"/>
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title" style="width:220px">基卫方状态说明</label>
            <div class="l-text-wrapper m-form-control">
                <input type="text"  id="inp_recipe_status_name" class="f-w240" data-attr-scan="recipe_status_name"/>
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title" style="width:220px">基卫处方状态扣费状态码</label>
            <div class="l-text-wrapper m-form-control">
                <input type="text"  id="inp_charge_status_code" class="f-w240" data-attr-scan="charge_status_code"/>
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title" style="width:220px">基卫处方状态扣费说明</label>
            <div class="l-text-wrapper m-form-control">
                <input type="text"  id="inp_charge_status_name" class="f-w240" data-attr-scan="charge_status_name"/>
            </div>
        </div>
    </div>
</div>
</body>
<%@ include file="../head/page_foot.jsp"%>
<%@ include file="prescription_status_js.jsp" %>
</html>

+ 67 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_status_js.jsp

@ -0,0 +1,67 @@
<%@ 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 statusInfo = null;
            var prescriptionCode = $("#prescriptionCode").val();
            /* *************************** 函数定义 ******************************* */
            function pageInit() {
                statusInfo.init();
                statusInfo.initForm();
            }
            /* *************************** 模块初始化 ***************************** */
            statusInfo = {
                //变量
                $form: $("#div_status_info_form"),
                init: function () {
                    this.$form.attrScan();
                    $("#inp_recipe_no").ligerTextBox({width: 240});
                    $("#inp_recipe_status_code").ligerTextBox({width: 240});
                    $("#inp_recipe_status_name").ligerTextBox({width: 240});
                    $("#inp_charge_status_code").ligerTextBox({width: 240});
                    $("#inp_charge_status_name").ligerTextBox({width: 240});
                    this.$form.show();
                },
                initForm: function () {
                    if (isNoEmpty(prescriptionCode) && prescriptionCode != 0) {
                        $.ajax({
                            url: ctx + "/admin/static/prescription/getDataStatus",
                            method: "post",
                            dataType: "json",
                            async: "false",
                            data: {prescriptionCode: prescriptionCode},
                            success: function (result) {
                                if (result.status == '200') {
                                    var data = result.data;
                                    //填值
                                    statusInfo.$form.Fields.fillValues({
                                        recipe_no: data.RECIPE_NO,
                                        recipe_status_code: data.RECIPE_STATUS_CODE,
                                        recipe_status_name: data.RECIPE_STATUS_NAME,
                                        charge_status_code: data.CHARGE_STATUS_CODE,
                                        charge_status_name: data.CHARGE_STATUS_NAME,
                                    });
                                } else {
                                    $.Notice.error(result.msg);
                                }
                            },
                            error: function (data) {
                                $.Notice.error("系统异常,请联系管理员!");
                            }
                        })
                    }
                },
            }
            /* *************************** 页面初始化 **************************** */
            pageInit();
        })
    })(jQuery, window);
</script>

+ 33 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/sign/patient_reservation_list.jsp

@ -0,0 +1,33 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <%@ include file="../head/page_head.jsp"%>
    <title>预约记录</title>
    <style type="text/css">
        .input {
            height: 30px;
            width: 90px;
        }
        li {width: 100px; }
    </style>
</head>
<body>
<div id="div_wrapper">
	<input type="hidden" id="patient" value="${patient}"/>
	<div class="m-retrieve-area f-h50 f-dn f-pr m-form-inline" data-role-form style='display: block;'>
		<div class="m-form-group f-mt10">
			<div class="m-form-control f-ml10 f-h30">
			</div>
		</div>
	</div>
	<!--######预约记录表######-->
	<div id="div_patient_reservation_grid"></div>
</div>
</body>
<%@ include file="../head/page_foot.jsp"%>
<%@ include file="patient_reservation_list_js.jsp" %>
<%--<script src="${ctx}/static/js/team/doctor/team_member_list.js"></script>--%>
</html>

+ 87 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/sign/patient_reservation_list_js.jsp

@ -0,0 +1,87 @@
<%@ 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 master = null;
			var patient = $('#patient').val();
			/* *************************** 函数定义 ******************************* */
			function pageInit() {
				master.init();
			}
			/* *************************** 模块初始化 ***************************** */
			master = {
				grid: null,
				init: function () {
					this.grid = $("#div_patient_reservation_grid").ligerGrid($.LigerGridEx.config(
							{
								url: ctx + "/admin/sign/reservationInfo",
								parms: {patient: patient},
								ajaxHeader: ajaxHeaderName,
								ajaxHeaderValue: ajaxHeaderValue,
								root: "data",
								columns: [
                                    {display: '预约号', name: 'code', width: '20%', align: "left"},
                                    {
                                        display: '预约时间段',
                                        name: 'sectionType',
                                        width: '5%',
                                        minColumnWidth: 20,
                                        render: function (row) {
                                            if (Util.isStrEquals(row.sectionType, "a")) {
                                                return "上午";
                                            } else if (Util.isStrEquals(row.available, "p")) {
                                                return "下午";
                                            }
                                            return "";
                                        }
                                    },
									{display: '开始时间', name: 'startTime', width: '12%', align: "left"},
									{display: '结束时间', name: 'endTime', width: '12%', align: "center"},
									{display: '医院名称', name: 'orgName', width: '10%', align: "left"},
									{display: '预约科室', name: 'deptName', width: '10%', align: "center"},
									{display: '专家名称', name: 'doctorName', width: '10%', align: "center"},
									{display: '专家职位', name: 'doctorJob', width: '10%', align: "left"},
                                    {
                                        display: '状态',
                                        name: 'status',
                                        width: '10%',
                                        minColumnWidth: 20,
                                        render: function (row) {
                                            if (Util.isStrEquals(row.status, "0")) {
                                                return "取消预约";
                                            } else if (Util.isStrEquals(row.status, "1")) {
                                                return "预约成功";
                                            } else if (Util.isStrEquals(row.status, "2")) {
                                                return "已诊";
                                            } else if (Util.isStrEquals(row.status, "3")) {
                                                return "停诊";
                                            }
                                            return "";
                                        }
                                    },
                                ],
                                enabledEdit: true,
                                validate: true,
                                unSetValidateAttr: false,
                                usePager: false, //是否分页
                                rownumbers: true, //是否显示行号
                                alternatingRow: false, //是否附加奇偶行效果行
                            }));
                    // 自适应宽度
                    this.grid.adjustToWidth();
                },
            };
            /* *************************** 页面初始化 **************************** */
            pageInit();
        });
    })(jQuery, window);
</script>

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

@ -152,7 +152,7 @@
								render: function (row) {
									var html = '';
									html += '<a  href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "sign:info:view", row.id) + '">明细</a>';
									html += '<a style="margin-left:10px;" href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "sign:info:reservation", row.patient) + '">预约记录</a>';
									html += '<a style="margin-left:10px;" href="' + ctx + '/admin/sign/reservation/' + row.patient + '" target="centerFrame" >预约记录</a>';
									//html += '<a  style="margin-left:10px;"href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "patient:info:edit", row.id) + '">编辑</a>';
									//html += '<a  style="margin-left:10px;" title="删除" href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}','{2}'])", "patient:info:del", row.id,row.code) + '">删除</a>';
									if (row.adminTeamId) {
@ -194,17 +194,6 @@
							url: ctx + '/admin/sign/infoInit/' + id
						})
					});
					//查看预约记录
                    $.subscribe('sign:info:reservation', function (event, patient) {
                        var title = '查看预约记录';
                        self.signInfoDialog = $.ligerDialog.open({
                            height: 550,
                            width: 550,
                            // urlParms: {"id": id, "type": "view"},
                            title: title,
                            url: ctx + '/admin/sign/reservation/' + patient
                        })
                    });
				}
			};

+ 0 - 80
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/sign/sign_reservation_modify.jsp

@ -1,80 +0,0 @@
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/5/29 0029
  Time: 下午 2:01
  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}
        ul#nav{ width:100%; height:30px; background:#00A2CA;margin:0 auto}
        ul#nav li{display:inline; height:30px}
        ul#nav li a{display:inline-block; padding:5px 10px; height:30px;
            color:#FFF; font-family:"\5FAE\8F6F\96C5\9ED1"; font-size:16px}
        ul#nav li a:hover{background:#0095BB;}/*设置鼠标滑过或悬停时变化的背景颜色*/
    </style>
</head>
<body>
<ul id="nav">
    <li><a href="#" onclick="opens(1)">基本信息</a></li>
    <li><a href="#" onclick="opens(2)">预约记录</a></li>
</ul>
<div id="div_reservation_info_form" data-role-form class="m-form-inline f-mt20 f-ml30" data-role-form style="overflow-y: scroll;height: 450px">
    <input type="hidden" id="patient" value='${patient}' data-attr-scan="id"/>
    <%-- ##################################基本信息div 开始###############################--%>
    <div id="div_base_info">
        <div class="m-form-group" style="">
            <label class="label_title" style="width:120px">居民标识符</label>
            <div class="l-text-wrapper m-form-control">
                <input type="text"  id="inp_patient" class="f-w240" data-attr-scan="patient"/>
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title" style="width:120px">居民姓名</label>
            <div class="l-text-wrapper m-form-control">
                <input type="text"  id="inp_name" class="f-w240" data-attr-scan="name"/>
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title" style="width:120px">身份证号</label>
            <div class="l-text-wrapper m-form-control">
                <input type="text"  id="inp_idcard" class="f-w240" data-attr-scan="idcard"/>
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title" style="width:120px">社保卡号</label>
            <div class="l-text-wrapper m-form-control">
                <input type="text"  id="inp_ssc" class="f-w240" data-attr-scan="ssc"/>
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title" style="width:120px">手机号</label>
            <div class="l-text-wrapper m-form-control">
                <input type="text"  id="inp_mobile" class="f-w240" data-attr-scan="mobile"/>
            </div>
        </div>
    </div>
    <%-- ##################################基本信息div 结束###############################--%>
</div>
</body>
<script>
    function opens(obj){
        if(obj == 1){
            document.getElementById("div_base_info").style.display="block";
            document.getElementById("div_reservation_info").style.display="none";
        }
        if(obj == 2){
            document.getElementById("div_base_info").style.display="none";
            document.getElementById("div_reservation_info").style.display="block";
        }
    }
</script>
<%@ include file="../head/page_foot.jsp"%>
<%@ include file="sign_reservation_modify_js.jsp" %>
</html>

+ 0 - 71
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/sign/sign_reservation_modify_js.jsp

@ -1,71 +0,0 @@
<%@ 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 patient = $('#patient').val();
            var reservationInfo = "";
            function pageInit() {
                reservationInfo.init();
                reservationInfo.initForm();
            }
            reservationInfo = {
                //变量
                $form: $("#div_reservation_info_form"),
                //费用信息
                init: function () {
                    this.$form.attrScan();
                    //基本信息
                    $('#inp_patient').ligerTextBox({width: 240});
                    $('#inp_name').ligerTextBox({width: 240});
                    $('#inp_idcard').ligerTextBox({width: 240});
                    $('#inp_mobile').ligerTextBox({width: 240});
                    $('#inp_ssc').ligerTextBox({width: 240});
                },
                initForm: function () {
                    if (isNoEmpty(patient) && patient != 0) {
                        $.ajax({
                            url: ctx + "/admin/sign/reservationInfo/" + patient,
                            data: {"patient" : patient},
                            method: "post",
                            dataType: "json",
                            async: false,
                            success: function (result) {
                                if (result.status == '200') {
                                    //通过patient查信息
                                    var data = result.data;
                                    var status = data.status;
                                    reservationInfo.$form.Fields.fillValues({
                                        //基本信息填值
                                        patient: data.patient,
                                        name: data.name,
                                        idcard: data.idcard,
                                        mobile: data.mobile,
                                        ssc: data.ssc,
                                    });
                                } else {
                                    $.Notice.error(result.msg);
                                }
                            },
                            error: function (data) {
                                $.Notice.error("系统异常,请联系管理员!");
                            }
                        });
                    }
                    this.$form.addClass("m-form-readonly"); //表单只读
                    this.bindEvents();
                },
                //绑定事件
                bindEvents: function () {
                    $("#btn_cancel").click(function () {
                        parent.window.closePatientInfoDialog();
                    });
                }
            }
            pageInit();
        });
    })(jQuery, window)
</script>

+ 0 - 4
patient-co-service/wlyy_service/src/main/resources/application.yml

@ -166,7 +166,3 @@ zyapi:
#    i健康项目地址
wlyy:
  api: http://www.xmtyw.cn/wlyy
#智业预约记录接口
reservation:
  zyurl: http://59.61.92.90:8072/wlyy_service

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java

@ -1207,6 +1207,7 @@ public class JMJkEduArticleService extends BaseService {
                message.setDel("1");
                message.setData(b);
                message.setRelationCode("0");
                message.setTzType(roleType.toString());
                messageDao.save(message);
                if(messageService.getMessageNoticeSettingByMessageType(one.get("code")+"","1", MessageNoticeSetting.MessageTypeEnum.signSwitch.getValue())){
                    // 发送消息给医生
@ -1370,6 +1371,7 @@ public class JMJkEduArticleService extends BaseService {
                message.setDel("1");
                message.setData(article.get("articleId")+"");
                message.setRelationCode(isAuthentication);
                message.setTzType(article.get("roleType")+"");
                messageDao.save(message);
                if(messageService.getMessageNoticeSettingByMessageType(receiveDoctor.getCode(),"1", MessageNoticeSetting.MessageTypeEnum.signSwitch.getValue())){
                    // 发送消息给医生

+ 174 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistService.java

@ -0,0 +1,174 @@
package com.yihu.wlyy.service.specialist;
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabel;
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabelInfo;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.doctor.SignPatientLabelDao;
import com.yihu.wlyy.repository.doctor.SignPatientLabelInfoDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.util.http.HttpResponse;
import com.yihu.wlyy.util.http.HttpUtils;
import org.apache.commons.collections.map.HashedMap;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * Created by Trick on 2018/5/31.
 */
@Service
public class SpecialistService extends BaseService {
    @Autowired
    private SignPatientLabelDao signPatientLabelDao;
    @Autowired
    private SignPatientLabelInfoDao signPatientLabelInfoDao;
    @Autowired
    private DoctorDao doctorDao;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Value("${specialist.url}")
    private String specialistUrl;
    public String setPatientLabelInfo(List<SignPatientLabelInfo> list){
        if(list!=null&&list.size()>0){
            for(SignPatientLabelInfo signPatientLabelInfo : list){
                signPatientLabelInfo.setCzrq(new Date());
                signPatientLabelInfo.setStatus(1);
            }
            signPatientLabelInfoDao.save(list);
        }
        return "1";
    }
    public List<Map<String,Object>> findHealthAssistant(){
        String sql="SELECT " +
                " d.`code`, " +
                " d.`name`, " +
                " d.photo " +
                " FROM " +
                " wlyy_doctor d " +
                " WHERE " +
                " d.`level` = '5' " +
                " AND `status` = 1";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        return list;
    }
    public List<SignPatientLabel> findLabelbyType(String type,Long teamCode){
        //自定义标签
        if("4".equals(type)){
            List<SignPatientLabel> list = signPatientLabelDao.findByLabelTypeAndStatusAndTeamCode(type,1,teamCode);
            return list;
        }else{
            //非自定义标签
            List<SignPatientLabel> list = signPatientLabelDao.findByLabelTypeAndStatus(type,1);
            return list;
        }
    }
    public Long findSpecialistPatientRelationCout(String doctor)throws Exception{
        Map<String,Object> param = new HashedMap();
        param.put("doctor",doctor);
        HttpResponse response = HttpUtils.doGet(specialistUrl+"findSpecialistPatientRelationCout",param);
        JSONObject  rs = new JSONObject(response.getContent());
        if("succes".equals(rs.getString("message"))){
            return rs.getLong("obj");
        }
        return 0L;
    }
    public JSONArray findNoLabelPatientRelation(String doctor)throws Exception{
        Map<String,Object> param = new HashedMap();
        param.put("doctor",doctor);
        HttpResponse response = HttpUtils.doGet(specialistUrl+"findNoLabelPatientRelation",param);
        JSONObject  rs = new JSONObject(response.getContent());
        if("succes".equals(rs.getString("message"))){
            return rs.getJSONArray("obj");
        }
        return null;
    }
    public JSONArray findPatientRelatioByAssistant(String assistant,Integer page,Integer size)throws Exception{
        Map<String,Object> param = new HashedMap();
        param.put("assistant",assistant);
        param.put("page",page);
        param.put("size",size);
        HttpResponse response = HttpUtils.doGet(specialistUrl+"findPatientRelatioByAssistant",param);
        JSONObject  rs = new JSONObject(response.getContent());
        if("succes".equals(rs.getString("message"))){
            return rs.getJSONArray("obj");
        }
        return null;
    }
    public String saveHealthAssistant(String json)throws Exception{
        Map<String,Object> param = new HashedMap();
        param.put("json",json);
        HttpResponse response = HttpUtils.doPost(specialistUrl+"saveHealthAssistant",param);
        JSONObject  rs = new JSONObject(response.getContent());
        if("succes".equals(rs.getString("message"))){
            return rs.getString("obj");
        }
        return "";
    }
    public List<Map<String,Object>> getPatientByLabel(String labelType,String labelCode,Integer page,Integer size){
        String sql="SELECT " +
                " p. NAME, " +
                " p. CODE, " +
                " IFNULL( " +
                "  YEAR ( " +
                "   from_days(datediff(now(), p.birthday)) " +
                "  ), " +
                "  '未知' " +
                " ) age, " +
                " lb.labelName, " +
                " lb.labelType, " +
                " lb.label, " +
                " p.photo, " +
                " h.label_name as health, " +
                " h.label AS healthcode " +
                " FROM " +
                " ( " +
                "  SELECT " +
                "   i.label_type AS labelType, " +
                "   i.label, " +
                "   i.label_name AS labelName, " +
                "   i.patient " +
                "  FROM " +
                "   wlyy_sign_patient_label_info i " +
                "  WHERE " +
                "   i.label = '"+labelCode+"' " +
                "  AND i.label_type = '"+labelType+"' " +
                "  AND i.`status` = '1' " +
                " ) lb " +
                " JOIN wlyy_patient p ON p. CODE = lb.patient " +
                " LEFT JOIN ( " +
                " SELECT " +
                "  t.label, " +
                "  t.label_name, " +
                "  t.patient " +
                " FROM " +
                "  wlyy_sign_patient_label_info t " +
                " WHERE " +
                "  t.label_type = '8' " +
                " AND t.`status` = '1' " +
                " ) h ON h.patient = lb.patient " +
                " LIMIT LIMIT "+(page-1)*size+","+size;
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        return list;
    }
}

+ 129 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/SpecialistController.java

@ -0,0 +1,129 @@
package com.yihu.wlyy.web.doctor.specialist;
import com.alibaba.fastjson.JSONArray;
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabelInfo;
import com.yihu.wlyy.service.specialist.SpecialistService;
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.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * Created by Trick on 2018/5/31.
 */
@RestController
@RequestMapping(value = "/doctor/specialist", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "医生端-专病管理")
public class SpecialistController extends BaseController {
    @Autowired
    private SpecialistService specialistService;
    @RequestMapping(value = "setPatientLabelInfo",method = RequestMethod.POST)
    @ApiOperation("设置居民标签")
    public String setPatientLabelInfo(@ApiParam(name = "json", value = "居民标签实体") @RequestParam(required = true) String json){
        try {
            List<SignPatientLabelInfo> info = (List<SignPatientLabelInfo>) JSONArray.parseArray(json, SignPatientLabelInfo.class);
            return write(200,"获取成功","data",specialistService.setPatientLabelInfo(info));
        }catch (Exception e){
            error(e);
            return error(-1,"请求失败");
        }
    }
    @RequestMapping(value = "findHealthAssistant",method = RequestMethod.GET)
    @ApiOperation("获取所有计管师")
    public String findHealthAssistant(){
        try {
            return write(200,"获取成功","data",specialistService.findHealthAssistant());
        }catch (Exception e){
            error(e);
            return error(-1,"请求失败");
        }
    }
    @RequestMapping(value = "findLabelbyType",method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("获取标签")
    public String findLabelbyType(@ApiParam(name = "type", value = "标签类型") @RequestParam(required = true)String type,
                                  @ApiParam(name = "teamCode", value = "团队id") @RequestParam(required = false)Long teamCode){
        try {
            return write(200,"获取成功","data",specialistService.findLabelbyType(type,teamCode));
        }catch (Exception e){
            error(e);
            return error(-1,"请求失败");
        }
    }
    @RequestMapping(value = "findSpecialistPatientRelationCout",method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("获取专科医生下未分配标签居民数目")
    public String findSpecialistPatientRelationCout(@ApiParam(name = "doctor", value = "医生code") @RequestParam(required = true)String doctor){
        try {
            return write(200,"获取成功","data",specialistService.findSpecialistPatientRelationCout(doctor));
        }catch (Exception e){
            error(e);
            return error(-1,"请求失败");
        }
    }
    @RequestMapping(value = "findNoLabelPatientRelation",method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("获取专科医生下未分配标签居民")
    public  String findNoLabelPatientRelation(@ApiParam(name = "doctor", value = "医生code") @RequestParam(required = true)String doctor){
        try {
            return write(200,"获取成功","data",specialistService.findNoLabelPatientRelation(doctor));
        }catch (Exception e){
            error(e);
            return error(-1,"请求失败");
        }
    }
    @RequestMapping(value = "findPatientRelatioByAssistant",method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("获取计管师下未分配标签居民")
    public String findPatientRelatioByAssistant(@ApiParam(name = "assistant", value = "计管师") @RequestParam(required = true)String assistant,
                                                @ApiParam(name = "page", value = "第几页,1开始") @RequestParam(required = true)Integer page,
                                                @ApiParam(name = "size", value = "每页大小") @RequestParam(required = true)Integer size)throws Exception {
        try {
            return write(200,"获取成功","data",specialistService.findPatientRelatioByAssistant(assistant,page,size));
        }catch (Exception e){
            error(e);
            return error(-1,"请求失败");
        }
    }
    @RequestMapping(value = "saveHealthAssistant",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("分配计管师居民")
    public String saveHealthAssistant(String json){
        try {
            return write(200,"获取成功","data",specialistService.saveHealthAssistant(json));
        }catch (Exception e){
            error(e);
            return error(-1,"请求失败");
        }
    }
    @RequestMapping(value = "getPatientByLabel",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("获取标签下居民")
    public String getPatientByLabel(@ApiParam(name = "labelType", value = "标签类型")String labelType,
                                    @ApiParam(name = "labelCode", value = "标签code")String labelCode,
                                    @ApiParam(name = "page", value = "第几页,1开始")Integer page,
                                    @ApiParam(name = "size", value = "每页大小")Integer size) {
        try {
            return write(200,"获取成功","data",specialistService.getPatientByLabel(labelType,labelCode,page,size));
        }catch (Exception e){
            error(e);
            return error(-1,"请求失败");
        }
    }
}

+ 3 - 0
patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

@ -33,6 +33,9 @@ im:
  im_list_get: http://172.19.103.88:3000/
  data_base_name: ichat
#专病配置
specialist:
  url: http://localhost:10051/svr-specialist/
#物联网配置
iot:
  url: http://192.168.131.24:8088/svr-iot/

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

@ -33,6 +33,9 @@ im:
  im_list_get: http://172.19.103.88:3000/
  data_base_name: im_new
#专病配置
specialist:
  url: http://localhost:10051/svr-wlyy-specialist/
#物联网配置
iot:
#  url: http://192.168.131.24:8088/svr-iot/

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

@ -29,6 +29,10 @@ im:
  im_list_get: http://10.95.22.138:3000/
  data_base_name: im
#专病配置
specialist:
  url: http://localhost:10051/svr-wlyy-specialist/
#物联网配置
iot:
  url: http://192.168.131.24:8088/svr-iot/

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

@ -29,6 +29,9 @@ im:
  im_list_get: http://172.19.103.88:3000/
  data_base_name: im_new
#专病配置
specialist:
  url: http://localhost:10051/svr-wlyy-specialist/
#物联网配置
iot:
  url: http://192.168.131.24:8088/svr-iot/

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

@ -32,6 +32,9 @@ im:
  im_list_get: http://27.155.101.77:3000/
  data_base_name: im
#专病配置
specialist:
  url: http://localhost:10051/svr-wlyy-specialist/
#物联网配置
iot:
  url: http://192.168.131.24:8088/svr-iot/

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

@ -28,6 +28,9 @@ im:
  im_list_get: http://172.19.103.88:3000/
  data_base_name: im_new
#专病配置
specialist:
  url: http://localhost:10051/svr-wlyy-specialist/
#物联网配置
iot:
  url: http://172.19.103.33:8088/svr-iot/