瀏覽代碼

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

zd_123 7 年之前
父節點
當前提交
eb82977a6e
共有 35 個文件被更改,包括 930 次插入83 次删除
  1. 二進制
      edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/api/ArticleApi.class
  2. 二進制
      edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/api/ArticleApiTest.class
  3. 15 0
      edu-article/JkEdu/src/com/yihu/jk/api/ArticleApi.java
  4. 43 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/range/user_role_add.jsp
  5. 137 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/range/user_role_add_js.jsp
  6. 42 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/range/user_role_list.jsp
  7. 196 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/range/user_role_list_js.jsp
  8. 63 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/range/user_role_modify.jsp
  9. 221 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/range/user_role_modify_js.jsp
  10. 1 1
      patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/model/TrackPatient.java
  11. 19 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/common/util/DateUtil.java
  12. 2 2
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/PrescriptionController.java
  13. 7 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/prescription/PrescriptionExpressage.java
  14. 16 7
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/guahao/GuahaoService.java
  15. 66 4
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java
  16. 13 1
      patient-co-service/wlyy_service/src/main/resources/application.yml
  17. 4 1
      patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/service/ChargeZYService.java
  18. 1 5
      patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/etl/extract/db/Data2Save.java
  19. 0 15
      patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/job/business/EsToEsQuotaJob.java
  20. 1 1
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/activemq/HealthArtListener.java
  21. 二進制
      patient-co/patient-co-wlyy/doc/部署文档/正式库/厦门i健康网络架构.png
  22. 6 6
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/template/DoctorGuidanceTempDao.java
  23. 4 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/template/DoctorTeamGuidanceTemplateDao.java
  24. 4 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/device/PatientDeviceService.java
  25. 5 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java
  26. 10 10
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java
  27. 1 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/imm/ChildInfoService.java
  28. 19 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/guahao/ImmuneService.java
  29. 2 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/device/DoctorDeviceController.java
  30. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorFamilyContractController.java
  31. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/booking/PatientBookingController.java
  32. 4 8
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/family/FamilyMemberController.java
  33. 24 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/ylzpay/ThirdPayController.java
  34. 1 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/wechat/process/WeiXinEventProcess.java
  35. 1 1
      patient-co/patient-co-wlyy/src/main/resources/application.yml

二進制
edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/api/ArticleApi.class


二進制
edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/api/ArticleApiTest.class


+ 15 - 0
edu-article/JkEdu/src/com/yihu/jk/api/ArticleApi.java

@ -6,9 +6,11 @@ import com.coreframework.remoting.standard.DateOper;
import com.coreframework.util.AppConfig;
import com.yihu.jk.dao.ArticleDao;
import com.yihu.jk.dao.ArticlePcDao;
import com.yihu.jk.dao.BehaviorDao;
import com.yihu.jk.utils.ApiUtil;
import com.yihu.jk.utils.StringUtil;
import com.yihu.jk.vo.Article;
import com.yihu.jk.vo.ArticleCollection;
import com.yihu.jk.vo.ArticleStatistic;
import com.yihu.jk.vo.OrgArticleVo;
import com.yihu.wsgw.api.InterfaceMessage;
@ -24,6 +26,7 @@ import java.util.List;
public class ArticleApi {
	private static ArticleDao dao = new ArticleDao();
	private static ArticlePcDao articlePcDao = new ArticlePcDao();
	public static BehaviorDao subDao = new BehaviorDao();
	static Logger log = Logger.getLogger(ArticleApi.class.getName());
	/**
@ -244,6 +247,18 @@ public class ArticleApi {
						int collectionNumberCount = dao.collectionNumberCount(vo);
						jsonObj.put("pointNumberCount", pointNumberCount);
						jsonObj.put("collectionNumberCount", collectionNumberCount);
						//判断该用户是否有收藏过该文章
						ArticleCollection vo1 = new ArticleCollection();
						vo1.setArticleId(articleId);
						vo1.setUserType(userType);
						vo1.setUserId(userId);
						int size = subDao.getArticleCollection(vo1);
						if(size>0){
							jsonObj.put("isCollection", 1);
						}else{
							jsonObj.put("isCollection", 0);
						}
					}
					array.add(jsonObj);

+ 43 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/range/user_role_add.jsp

@ -0,0 +1,43 @@
<%@ 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>
</head>
<body>
<div id="div_wrapper">
	<!-- 检索条件 -->
	<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-ml15">
				<input type="text" id="inp_name" placeholder="请输入医生姓名" class="f-ml10" data-attr-scan="name"/>
			</div>
			<div class="m-form-control f-ml15">
				<input type="text" id="inp_mobile" placeholder="请输入身份证号" class="f-ml10" data-attr-scan="mobile"/>
			</div>
			<sec:authorize url="/admin/range/doctorList">
			<div id="btn_search" class="l-button u-btn u-btn-primary u-btn-small f-ib f-vam  f-ml10" >
				<span>查add询</span>
			</div>
			</sec:authorize>
			<!-- 保存按钮 -->
			<sec:authorize url="/admin/range/create">
				<div class="m-form-control m-form-control-fr">
					<div id="btn_add" class="l-button u-btn u-btn-primary u-btn-small f-ib f-vam" style="margin-right: 20px;">
						<span>新增</span>
					</div>
				</div>
			</sec:authorize>
		</div>
	</div>
	<!-- 列表 -->
	<div id="div_user_list">
	</div>
</div>
</body>
<%@ include file="../../head/page_foot.jsp" %>
<%@ include file="user_role_add_js.jsp" %>
</html>

+ 137 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/range/user_role_add_js.jsp

@ -0,0 +1,137 @@
<%@ 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 retrieve = null;
            var master = null;
            var isFirstPage = false;
            /* *************************** 函数定义 ******************************* */
            function pageInit() {
                retrieve.init();
                master.init();
            }
            function reloadGrid(params) {
                if (isFirstPage) {
                    this.grid.options.newPage = 1;
                }
                this.grid.setOptions({parms: params});
                this.grid.loadData(true);
            }
            /* *************************** 模块初始化 ***************************** */
            retrieve = {
                $element: $('.m-retrieve-area'),
                $searchBtn: $('#btn_search'),
                $addBtn: $('#btn_add'),
                $name: $("#inp_name"),//人员姓名
                $code: $("#inp_code"),//人员姓名
                $mobile: $("#inp_mobile"),
                init: function () {
                    this.$element.show();
                    this.$element.attrScan();
                    window.form = this.$element;
                    this.$name.ligerTextBox({width: 200}); //姓名
                    this.$code.ligerTextBox({width: 200}); //姓名
                    this.$mobile.ligerTextBox({width: 200})//手机号
                    this.bindEvents();
                },
                bindEvents: function () {
                    var self = this;
                    self.$searchBtn.click(function () {
                        master.grid.options.newPage = 1;
                        master.reloadGrid();
                    });
                    self.$addBtn.click(function () {
                        $.publish("info:create", [''])
                    });
                }
            };
            master = {
                infoDialog: null,
                grid: null,
                init: function () {
                    var data;
                    this.grid = $("#div_user_list").ligerGrid($.LigerGridEx.config({
                        url: ctx + 'doctorList',
                        parms: {},
                        ajaxHeader: ajaxHeaderName,
                        ajaxHeaderValue: ajaxHeaderValue,
                        columns: [
                            {display: 'ID', name: 'id', hide: true},
                            {display: '医生编码', name: 'code', width: '30%', align: "center"},
                            {display: '医生姓名', name: 'name', width: '8%', align: "center"},
                            {
                                display: '性别', name: 'sex', width: '5%', align: "center",
                                render: function (item) {
                                    if (!item.sex | item.sex == 0) return "未知";
                                    if (parseInt(item.sex) == 1) return '男';
                                    if (parseInt(item.sex) == 2) return '女';
                                    return '未知';
                                }
                            },
                            {display: '身份证号', name: 'idCard', width: '17%', align: "center"},
                            {display: '手机号码', name: 'mobile', width: '10%', align: "center"},
                            {display: '机构编码', name: 'hospital', width: '10%', align: "center"},
                            {display: '所属机构', name: 'hospitalName', width: '20%', align: "left"},
                        ],
                        checkbox: true,
                    }));
                    // 自适应宽度
                    this.grid.adjustToWidth();
                    this.bindEvents();
                },
                reloadGrid: function (msg) {
                    if (msg) {
                        //如果是新增,直接刷新页面
                        master.grid.loadData();
                    } else {
                        //如果是查询
                        retrieve.$element.attrScan();
                        var values = retrieve.$element.Fields.getValues();
                        reloadGrid.call(this, values);
                    }
                },
                bindEvents: function () {
                    var self = this;
                    $.subscribe('info:create', function (event, id) {
                        var title = '新增用户';
                        var rows = master.grid.getSelectedRows();
                        var codes = new Array()
                        for (var i=0;i<rows.length;i++){
                            codes.push(rows[i].code)
                        }
                        self.infoDialog = $.ligerDialog.open({
                            height: 600,
                            width: 850,
                            urlParms: {"doc": codes.toString(), "mode": "new"},
                            title: title,
                            url: ctx + '/admin/range/create'
                        })
                    });
                }
            };
            /* ************************* Dialog页面回调接口 ************************** */
            win.reloadMasterGrid = function (msg) {
                if (isNoEmpty(msg)) {
                    $.Notice.success(msg);
                }
                master.reloadGrid(msg);
            };
            win.closeUserInfoDialog = function () {
                master.infoDialog.close();
            };
            /* *************************** 页面初始化 **************************** */
            pageInit();
        });
    })(jQuery, window);
</script>

+ 42 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/range/user_role_list.jsp

@ -0,0 +1,42 @@
<%@ 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>
</head>
<body>
<div id="div_wrapper">
	<!-- 检索条件 -->
	<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-ml15">
				<input type="text" id="inp_name" placeholder="请输入医生姓名" class="f-ml10" data-attr-scan="name"/>
			</div>
			<div class="m-form-control f-ml15">
				<input type="text" id="inp_mobile" placeholder="请输入身份证号" class="f-ml10" data-attr-scan="mobile"/>
			</div>
			<sec:authorize url="/admin/range/userRoleList">
			<div id="btn_search" class="l-button u-btn u-btn-primary u-btn-small f-ib f-vam  f-ml10" >
				<span>查list询</span>
			</div>
			</sec:authorize>
			<sec:authorize url="/admin/range/infoInit">
			<div class="m-form-control m-form-control-fr">
				<div id="btn_add" class="l-button u-btn u-btn-primary u-btn-small f-ib f-vam" style="margin-right: 20px;">
					<span>新增</span>
				</div>
			</div>
			</sec:authorize>
		</div>
	</div>
	<!-- 列表 -->
	<div id="div_user_list">
	</div>
</div>
</body>
<%@ include file="../../head/page_foot.jsp" %>
<%@ include file="user_role_list_js.jsp" %>
</html>

+ 196 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/range/user_role_list_js.jsp

@ -0,0 +1,196 @@
<%@ 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 retrieve = null;
			var master = null;
			var isFirstPage = false;
			/* *************************** 函数定义 ******************************* */
			function pageInit() {
				retrieve.init();
				master.init();
			}
			function reloadGrid(params) {
				if (isFirstPage) {
					this.grid.options.newPage = 1;
				}
				this.grid.setOptions({parms: params});
				this.grid.loadData(true);
			}
			/* *************************** 模块初始化 ***************************** */
			retrieve = {
				$element: $('.m-retrieve-area'),
				$searchBtn: $('#btn_search'),
				$addBtn: $('#btn_add'),
				$name: $("#inp_name"),//人员姓名
				$code: $("#inp_code"),//人员姓名
				$mobile: $("#inp_mobile"),
				init: function () {
					this.$element.show();
					this.$element.attrScan();
					window.form = this.$element;
					this.$name.ligerTextBox({width: 200}); //姓名
					this.$code.ligerTextBox({width: 200}); //姓名
					this.$mobile.ligerTextBox({width: 200})//手机号
					this.bindEvents();
				},
				bindEvents: function () {
					var self = this;
					self.$searchBtn.click(function () {
						master.grid.options.newPage = 1;
						master.reloadGrid();
					});
					self.$addBtn.click(function () {
						$.publish("info:create", [''])
					});
				}
			};
			master = {
				infoDialog: null,
				grid: null,
				init: function () {
					var data;
					this.grid = $("#div_user_list").ligerGrid($.LigerGridEx.config({
						url: ctx + 'userRoleList',
						parms: {},
						ajaxHeader: ajaxHeaderName,
						ajaxHeaderValue: ajaxHeaderValue,
						columns: [
							{display: 'ID', name: 'id', hide: true},
							{display: '医生编码', name: 'code', width: '20%', align: "center"},
							{display: '医生姓名', name: 'name', width: '8%', align: "center"},
                            {
                                display: '性别', name: 'sex', width: '5%', align: "center",
                                render: function (item) {
                                    if (!item.sex | item.sex == 0) return "未知";
                                    if (parseInt(item.sex) == 1) return '男';
                                    if (parseInt(item.sex) == 2) return '女';
                                    return '未知';
                                }
                            },
							{display: '身份证号', name: 'idCard', width: '12%', align: "center"},
							{display: '手机号码', name: 'mobile', width: '10%', align: "center"},
							{display: '机构编码', name: 'hospital', width: '10%', align: "center"},
							{display: '所属机构', name: 'hospitalName', width: '20%', align: "left"},
							{
								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}'])", "info:view", row.code) + '">查看</a>';
									<sec:authorize url="/admin/range/update">
									if (!Util.isStrEquals(row.code, "admin")) {
										html += '<a  style="margin-left:10px;"href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "info:edit", row.code) + '">编辑</a>';
									}
									</sec:authorize>
									<sec:authorize url="/admin/range/delete">
									if (!Util.isStrEquals(row.code, "admin")) {
										html += '<a  style="margin-left:10px;" title="删除" href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}','{2}'])", "info:del", row.code) + '">删除</a>';
									}
									</sec:authorize>
									return html;
								}
							}
						],
					}));
					// 自适应宽度
					this.grid.adjustToWidth();
					this.bindEvents();
				},
				reloadGrid: function (msg) {
					if (msg) {
						//如果是新增,直接刷新页面
						master.grid.loadData();
					} else {
						//如果是查询
						retrieve.$element.attrScan();
						var values = retrieve.$element.Fields.getValues();
						reloadGrid.call(this, values);
					}
				},
				delRecord: function (id, code) {
					var self = this;
					$.ajax({
						url: ctx + "/admin/range/delete",
						data: {"id": id},
						method: "post",
						dataType: "json",
						success: function (result) {
							if (result.status == '200') {
								window.reloadMasterGrid(result.msg);
							} else {
								$.Notice.error(result.msg);
							}
						},
						error: function (data) {
							$.Notice.error("系统异常,请联系管理员!");
						}
					})
				},
				bindEvents: function () {
					var self = this;
					$.subscribe('info:view', function (event, id) {
						var title = '查看用户信息';
						self.infoDialog = $.ligerDialog.open({
							height: 460,
							width: 490,
							urlParms: {"id": id, "mode": "view"},
							title: title,
							url: ctx + '/admin/range/editInit'
						})
					});
					$.subscribe('info:edit', function (event, id) {
						var title = '编辑用户信息';
						self.infoDialog = $.ligerDialog.open({
							height: 460,
							width: 490,
							urlParms: {"id": id, "mode": "edit"},
							title: title,
							url: ctx + '/admin/range/editInit'
						})
					});
					$.subscribe('info:create', function (event, id) {
						var title = '新增用户';
						self.infoDialog = $.ligerDialog.open({
							height: 600,
							width: 850,
							urlParms: {"id": id, "mode": "new"},
							title: title,
							url: ctx + '/admin/range/infoInit'
						})
					});
					$.subscribe('info:del', function (event, id, code) {
						$.ligerDialog.confirm('确认删除该行信息?<br>如果是请点击确认按钮,否则请点击取消。', function (yes) {
							if (yes) {
								self.delRecord(id, code);
							}
						});
					})
				}
			};
			/* ************************* Dialog页面回调接口 ************************** */
			win.reloadMasterGrid = function (msg) {
				if (isNoEmpty(msg)) {
					$.Notice.success(msg);
				}
				master.reloadGrid(msg);
			};
			win.closeUserInfoDialog = function () {
				master.infoDialog.close();
			};
			/* *************************** 页面初始化 **************************** */
			pageInit();
		});
	})(jQuery, window);
</script>

+ 63 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/range/user_role_modify.jsp

@ -0,0 +1,63 @@
<%@ 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_patient_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"/>
	<input type="hidden" id="inp_mode" value='${mode}'/>
	<div class="m-form-group" style="padding:10 0 10 0">
		<label class="label_title" style="width:120px">医生编modify码</label>
		<div class="l-text-wrapper m-form-control essential">
			<input type="text"  id="inp_code" class="required useTitle ajax f-w240 validate-special-char"  required-title="编码不能为空"  data-attr-scan="code"/>
		</div>
	</div>
	<div class="m-form-group">
		<label class="label_title" style="width:120px">医生姓名</label>
		<div class="l-text-wrapper m-form-control essential">
			<input type="text"  id="inp_name" class="required useTitle f-w240 validate-special-char"  required-title="姓名不能为空"  data-attr-scan="name"/>
		</div>
		<div class="m-form-group">
			<label class="label_title" style="width:120px">身份证号</label>
			<div class="l-text-wrapper m-form-control essential">
				<input type="text"  id="inp_phone" class="required useTitle f-w240 validate-special-char" required-title="号码不能为空"  data-attr-scan="phone"/>
			</div>
		</div>
	</div>
	<div class="m-form-group">
		<label class="label_title" style="width:120px">手机号码</label>
		<div class="l-text-wrapper m-form-control essential">
			<input type="text"  id="inp_mobile" class="required useTitle ajax validate-mobile-phone f-w240 validate-special-char" required-title="手机号码不能为空"  required-title="请输入手机号码"  data-attr-scan="mobile"/>
		</div>
	</div>
	<div class="m-form-group">
		<label class="label_title" style="width:120px">机构编码</label>
		<div class="l-text-wrapper m-form-control essential">
			<input type="text"  id="inp_type" class="required useTitle f-w240 validate-special-char" required-title="用户类型不能为空"  data-attr-scan="type"/>
		</div>
	</div>
	<div class="m-form-group" id="new_psw_div" style="display: none">
		<label class="label_title" style="width:120px">所属机构</label>
		<div class="l-text-wrapper m-form-control essential">
			<input type="password"  id="inp_psw" class="required useTitle f-w240 validate-special-char" required-title="登陆密码不能为空"  data-attr-scan="password"/>
		</div>
	</div>
	</div>
	<div class="m-form-group f-pa" id="btn_save_close"  style="right: 10px;bottom: 0;display: none">
		<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="user_role_modify_js.jsp" %>
</html>

+ 221 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/range/user_role_modify_js.jsp

@ -0,0 +1,221 @@
<%@ 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 type = $('#inp_mode').val();
			var id = $('#inp_id').val();
			var info = "";
			var oldCode = "";
			var oldMobile = "";
			var jValidation = $.jValidation;
			function pageInit() {
				info.init();
				info.initForm();
			}
			info = {
				//变量
				$form: $("#div_patient_info_form"),
				$code: $('#inp_code'),
				$name: $('#inp_name'),
				$mobile: $('#inp_mobile'),
				$type: $("#inp_type"),
                $jobNo:$("#inp_jobNo"),
                $seat:$("#inp_seat"),
                $phone:$("#inp_phone"),
				//$roles:$("#inp_roles"),
				$organization: $("#inp_organizationId"),
				init: function () {
					this.$form.attrScan();
					this.$code.ligerTextBox({width: 240});
					this.$name.ligerTextBox({width: 240});
					this.$mobile.ligerTextBox({width: 240});
					this.typeBox = this.$type.ligerComboBox({
						width: 240,
						data: [
							{text: '管理员', typeId: '1'},
							{text: '医生', typeId: '2'},
                            {text: '客服管理员', typeId: '3'},
                            {text: '普通客服', typeId: '4'},
							{text: '其他', typeId: '0'}
						],
						initIsTriggerEvent: false,
						valueField: 'typeId',
					});
                    this.$jobNo.ligerTextBox({width: 240});
                    this.$seat.ligerTextBox({width: 240});
                    this.$phone.ligerTextBox({width: 240});
				},
				initForm: function () {
					_this = this;
                    this.bindEvents();
					//修改、查看
					if (isNoEmpty(id) && id != 0) {
						$.ajax({
							url: ctx + "/admin/range/userRoleDetail",
							method: "post",
							dataType: "json",
							async: false,
							data: {id:id},
							success: function (result) {
								if (result.status == '200') {
									//通过id查信息
									var data = result.data;
									if (!data) {
										return
									}
									oldCode = data.code;
									oldMobile = data.mobile;
									_this.$form.Fields.fillValues({
										code: data.code,
										name: data.name,
										mobile: data.mobile,
                                        jobNo:data.jobNo,
                                        seat:data.seat,
                                        phone:data.phone
									});
									_this.typeBox.selectValue(data.type);
								} else {
									$.Notice.error(result.msg);
								}
							},
							error: function (data) {
								$.Notice.error("系统异常,请联系管理员!");
							}
						});
					}
					if (type == "view") {
						_this.$form.addClass("m-form-readonly"); //表单只读
						$(".essential").addClass("XXXtest");
						$(".essential").removeClass("essential");
						$("#btn_save_close").css("display", "none");
					} else {
						this.$form.removeClass("m-form-readonly");
						$(".XXXtest").addClass("essential");
						$("#btn_save_close").css("display", "block");
                        if(type == "edit"){
                            $("#new_psw_div").css("display", "block");
                            $("#old_psw_div").css("display", "block");
                        }
					}
					this.$form.show();
				},
				//绑定事件
				bindEvents: function () {
					var validator = new jValidation.Validation(this.$form, {
						immediate: true, onSubmit: false,
						onElementValidateForAjax: function (elm) {
							if (Util.isStrEquals($(elm).attr("id"), 'inp_mobile')) {
								var result = new jValidation.ajax.Result();
								var newMobile = $('#inp_mobile').val();
								if (newMobile != null && oldMobile != '' && oldMobile == newMobile) {
									return true;
								}
								if (newMobile != oldMobile) {
									$.ajax({
										url: ctx + "/admin/user/isMobileExist",
										async: false,
										method: "post",
										dataType: "json",
										data: {"mobile": newMobile},
										success: function (data) {
											if (data == true) {
												result.setResult(false);
												result.setErrorMsg("手机号已注册过");
											} else {
												result.setResult(true);
											}
										}
									});
								}
								return result;
							}
							;
							if (Util.isStrEquals($(elm).attr("id"), 'inp_code')) {
								var result = new jValidation.ajax.Result();
								var newCode = $('#inp_code').val();
								if (newCode != null && oldCode != '' && oldCode == newCode) {
									return true;
								}
								if (newCode != oldCode) {
									$.ajax({
										url: ctx + "/admin/user/isCodeExist",
										async: false,
										method: "post",
										dataType: "json",
										data: {"code": newCode},
										success: function (data) {
											if (data == true) {
												result.setResult(false);
												result.setErrorMsg("用户编码已存在");
											} else {
												result.setResult(true);
											}
										}
									});
								}
								return result;
							}
						}
					});
					var self = this;
					$("#btn_save").click(function () {
                        var values = self.$form.Fields.getValues();
                        if (!validator.validate()) {
                            return;
                        }
                        values.type = self.typeBox.getValue();
                        update(values);
                    });
                    $("#inp_type").change(function () {
                        var val = self.typeBox.getValue();
                        if(val==3||val==4){
                            $("#customer").show();
                        }else{
                            $("#customer").hide();
                        }
                        debugger
                    });
					function update(values) {
						var dataModel = $.DataModel.init();
						var url = "update";
						if (values.id == 0) {
							url = "create";
						}
						$.ajax({
							url: ctx + "/admin/user/" + url,
							async: false,
							method: "post",
							dataType: "json",
							data: {jsonData: JSON.stringify(values)},
							success: function (data) {
								if (data.status == 200) {
									parent.window.reloadMasterGrid(data.msg);
									parent.window.closeUserInfoDialog();
								} else {
									$.Notice.error(data.msg);
								}
							}
						});
					}
					$("#btn_cancel").click(function () {
						parent.window.closeUserInfoDialog();
					});
				}
			}
			pageInit();
		});
	})(jQuery, window)
</script>

+ 1 - 1
patient-co-service/wlyy_device/src/main/java/com/yihu/hos/device/model/TrackPatient.java

@ -8,7 +8,7 @@ import java.util.Date;
 * Created by Trick on 2018/1/4.
 */
@Entity
@Table(name = "wlyy_track_patient")
@Table(name = "wlyy_track_patient",schema ="wlyy",catalog = "wlyy")
public class TrackPatient extends IdEntity {
    private String patientCode;//关联居民code,医生的重点关注对象

+ 19 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/common/util/DateUtil.java

@ -78,6 +78,25 @@ public class DateUtil {
        return formatter.format(dateDate);
    }
    /**
     *  字符串转时间
     * @param str 时间字符串
     * @param eg 格式
     * @return
     */
    public static java.util.Date stringToDate(String str, String eg) {
        DateFormat format = new SimpleDateFormat(eg);
        java.util.Date date = null;
        if (str != null && !"".equals(str)) {
            try {
                date = format.parse(str);
            } catch (Exception e) {
                return null;
            }
        }
        return date;
    }
    /**
     * 将短时间格式时间转换为字符串 yyyy-MM-dd
     *

文件差異過大導致無法顯示
+ 2 - 2
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/PrescriptionController.java


+ 7 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/entity/prescription/PrescriptionExpressage.java

@ -31,6 +31,7 @@ public class PrescriptionExpressage extends IdEntity {
    private Integer weight;                  //快递重量  单位是g
    //配送人信息
    private String hospitalName;            // 如果配送方式是健管师那么这个字段存服务站名称,如果是快递配送那么是快递公司名称
    private String hospitalCode;            // 配药机构code
    private String hospitalAddress;         // 机构地址
    private String expressageName;          //配送人名称
    private String expressageCode;          //配送人code
@ -51,7 +52,13 @@ public class PrescriptionExpressage extends IdEntity {
    private Date deliveryTime; //送达时间
    public String getHospitalCode() {
        return hospitalCode;
    }
    public void setHospitalCode(String hospitalCode) {
        this.hospitalCode = hospitalCode;
    }
    @Column(name = "code", unique = true , nullable=false)
    public String getCode() {

+ 16 - 7
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/guahao/GuahaoService.java

@ -1159,10 +1159,19 @@ public class GuahaoService {
    /**
     * 计免预约Post接口
     */
    private String immPostSecond(String api,String content, Map<String,String> params) throws Exception
    private String immPostSecond(String apistr,String content, Map<String,String> params) throws Exception
    {
        String re = "";
    
        ZysoftApi api = ZysoftApi.getSingleton();
        if(!params.containsKey("Credential")&&!params.containsKey("key")) {
            //strCredential和strKey设置
            params.put("Credential", api.getCryptoCredential());
            params.put("key", api.getCryptoKey());
        }
        
        String msgBody = net.sf.json.JSONObject.fromObject(params).toString();
        //System.out.print("params:"+msgBody+"\r\n");
        //新增日志
        String method = "POST";
        Boolean isSuccess = true;
@ -1170,31 +1179,31 @@ public class GuahaoService {
        
        int times = 0;
        try {
            re = ZysoftApi.getSingleton().post("imm/"+api, params, null,openCrypto);
            re = ZysoftApi.getSingleton().post("imm/"+apistr, params, null,false);
    
            //---结果验证,并保存日志 ---START
            if (StringUtils.isEmpty(re)) {
                // 请求失败
                //保存http日志
                logService.saveHttpLog(isSuccess,api,content,method,api,net.sf.json.JSONObject.fromObject(params).toString(),re,error);
                logService.saveHttpLog(isSuccess,apistr,content,method,apistr,net.sf.json.JSONObject.fromObject(params).toString(),re,error);
                throw new Exception(error);
            } else if (StringUtils.startsWith(re, "System-Error")) {
                // 调用失败
                //保存http日志
                error = re.substring(re.indexOf(":") + 1, re.length());
                logService.saveHttpLog(isSuccess,api,content,method,api,net.sf.json.JSONObject.fromObject(params).toString(),re,error);
                logService.saveHttpLog(isSuccess,apistr,content,method,apistr,net.sf.json.JSONObject.fromObject(params).toString(),re,error);
                throw new Exception(error);
            } else if (StringUtils.startsWith(re, "Error")) {
                // 调用失败
                //保存http日志
                error = re.substring(re.indexOf(":") + 1, re.length());
                logService.saveHttpLog(isSuccess,api,content,method,api,net.sf.json.JSONObject.fromObject(params).toString(),re,error);
                logService.saveHttpLog(isSuccess,apistr,content,method,apistr,net.sf.json.JSONObject.fromObject(params).toString(),re,error);
                throw new Exception(error);
            }
            //---结果验证,并保存日志 ---END
            
            //保存http日志
            logService.saveHttpLog(isSuccess,api,content,method,api, net.sf.json.JSONObject.fromObject(params).toString(),re,error);
            logService.saveHttpLog(isSuccess,apistr,content,method,apistr, net.sf.json.JSONObject.fromObject(params).toString(),re,error);
        }
        catch (Exception ex)
        {
@ -1205,7 +1214,7 @@ public class GuahaoService {
            isSuccess = false;
            
            //保存http日志
            logService.saveHttpLog(isSuccess,api,content,method,api,net.sf.json.JSONObject.fromObject(params).toString(),re,error);
            logService.saveHttpLog(isSuccess,apistr,content,method,apistr,net.sf.json.JSONObject.fromObject(params).toString(),re,error);
            
            if(ex instanceof ApiException)
            {

+ 66 - 4
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java

@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.service.common.SystemConfig;
import com.yihu.wlyy.service.common.http.HttpClientUtil;
import com.yihu.wlyy.service.common.model.Result;
import com.yihu.wlyy.service.common.util.AmoutUtils;
import com.yihu.wlyy.service.common.util.CommonUtil;
@ -18,6 +19,7 @@ import com.yihu.wlyy.service.entity.consult.ConsultTeam;
import com.yihu.wlyy.service.entity.prescription.*;
import com.yihu.wlyy.service.entity.prescription.VO.PrescriptionExpressageVO;
import com.yihu.wlyy.service.service.ZysoftBaseService;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -74,6 +76,8 @@ public class PrescriptionService extends ZysoftBaseService{
    private String im;
    @Value("${redisChannel.prescription}")
    private String channelTopic;
    @Value("${wlyy.api}")
    private String wlyyApi;
    @Autowired
    private ConsultTeamDao consultTeamDao;
    @Autowired
@ -82,6 +86,8 @@ public class PrescriptionService extends ZysoftBaseService{
    private ZyIvPhysicDictDao zyIvPhysicDictDao;
    @Autowired
    private FollowupDao followupDao;
    @Autowired
    private PrescriptionExpressageDao expressageDao;
    /**
     * 新增续方日志
@ -1238,6 +1244,7 @@ public class PrescriptionService extends ZysoftBaseService{
     * @return
     * @throws Exception
     */
    @Transactional
    public Result offlinepay(String data)  throws Exception{
        String error = null;
        String status = "1";
@ -1248,6 +1255,8 @@ public class PrescriptionService extends ZysoftBaseService{
            if(code==1){
                String orderNo = json.getString("orderNo");//挂号编号
                String recipeNo = json.getString("recipeNo");//处方编号
                String idCard = json.containsKey("idNo")?json.getString("idNo"):null;
                String outChargeTime = json.containsKey("outChargeTime")?json.getString("outChargeTime"):null;
            
                Prescription prescription = prescriptionDao.findByVisitNoAndRecipeNo(orderNo,recipeNo);
                if(prescription.getStatus().equals(PrescriptionLog.PrescriptionLogStatus.wait_pay.getValue())){
@ -1256,6 +1265,7 @@ public class PrescriptionService extends ZysoftBaseService{
                    } else{
                        prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.wait_expressage.getValue());
                    }*/
                    String prescriptionCode = prescription.getCode();
                    prescription.setDispensaryType(1);
                    prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.pay_success.getValue());
@ -1269,9 +1279,9 @@ public class PrescriptionService extends ZysoftBaseService{
                    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                    String uuid = sdf.format(new Date()) + UUID.randomUUID().toString().replaceAll("-", "").substring(0, 4);
                    pay.setCode(uuid); //接入应用业务流水号outChargeNo
                    pay.setPrescriptionCode(prescription.getCode());//开处方的医生code 关联 wlyy_prescription
                    pay.setPrescriptionCode(prescriptionCode);//开处方的医生code 关联 wlyy_prescription
                    pay.setType(2);//1 医保支付 2基卫线下支付
                    pay.setOutChargeTime(json.containsKey("outChargeTime")?format.parse(json.getString("outChargeTime")):null);//支付日期
                    pay.setOutChargeTime(outChargeTime == null?null:format.parse(outChargeTime));//支付日期
                    pay.setChannel("offline");//支付方式
                    pay.setChargeNo(json.containsKey("chargeNo")?json.getString("chargeNo"):null);//支付平台流水号
                    pay.setChargeTime(json.containsKey("chargeTime")?format.parse(json.getString("chargeTime")):null);//支付平台交易成功时间
@ -1283,7 +1293,7 @@ public class PrescriptionService extends ZysoftBaseService{
                    pay.setOpenid(null);//用户openID
                    pay.setUserName(json.containsKey("userName")?json.getString("userName"):null);//用户名字
                    pay.setIdType("01"); //证件类型
                    pay.setIdNo(json.containsKey("idNo")?json.getString("idNo"):null);//证件号码
                    pay.setIdNo(idCard);//证件号码
                    pay.setTradeStatus("1");//交易状态
                    pay.setMiSettleNo(json.containsKey("miSettleNo")?json.getString("miSettleNo"):null);//医保收费单据号
                    pay.setMiRegisterNo(json.containsKey("miRegisterNo")?json.getString("miRegisterNo"):null); //医保挂号
@ -1321,7 +1331,7 @@ public class PrescriptionService extends ZysoftBaseService{
                    //新增log表
                    PrescriptionLog log = new PrescriptionLog();
                    log.setPrescriptionCode(prescription.getCode());
                    log.setPrescriptionCode(prescriptionCode);
                    log.setCode(getCode());
                    log.setCreateTime(new Date());
                    log.setType(PrescriptionLog.PrescriptionLogType.zy.getValue());
@ -1335,6 +1345,58 @@ public class PrescriptionService extends ZysoftBaseService{
                    log.setRemark("待配药");
                    prescriptionLogDao.save(log);
                    //新增wlyy_prescription_expressage表
                    PrescriptionExpressage expressage = expressageDao.findByPrescriptionPay(prescriptionCode);
                    if (expressage == null) {
                        expressage = new PrescriptionExpressage();
                        expressage.setCode(getCode());
                    }
                    expressage.setPrescriptionCode(prescriptionCode);
                    if (StringUtils.isEmpty(idCard)){
                        errMsg = "患者身份证为空!";
                    }
                    Patient pateint = patientDao.findByIdcard(idCard);
                    if(pateint != null){
                        expressage.setMobile(pateint.getMobile());//收货人手机号码
                        expressage.setName(pateint.getName());//居民姓名
                        expressage.setProvinceCode(pateint.getProvince());//省代码
                        expressage.setProvinceName(pateint.getProvinceName());//省名称
                        expressage.setCityCode(pateint.getCity());//市代码
                        expressage.setCityName(pateint.getCityName());//市名称
                        expressage.setTownCode(pateint.getTown());//区code
                        expressage.setTownName(pateint.getTownName());//区名称
                        expressage.setStreetCode(pateint.getStreet());//街道code
                        expressage.setStreetName(pateint.getStreetName());//街道名称
                        expressage.setAddress(pateint.getAddress());//居民详细地址
                        //        配药机构信息(签约机构)
                        SignFamily signFamily = signFamilyDao.findByPatient(pateint.getCode());
                        if (signFamily != null && signFamily.getHospital()!=null){
                            String hospitalCode  = signFamily.getHospital();
                            Hospital hospital = hospitalDao.findByCode(hospitalCode);
                            expressage.setHospitalCode(hospitalCode);
                            expressage.setHospitalName(hospital.getName());
                            expressage.setHospitalAddress(hospital.getAddress());
                        }
                        expressage.setCreateTime(new Date());//创建时间
                        expressage.setOneselfPickupFlg(1);//是否自取 1是 0否
                        expressage.setDel(1);//有效
                        if (StringUtils.isNotBlank(outChargeTime)) {
                            Date dt = DateUtil.stringToDate(outChargeTime, "yyyy-MM-dd");
                            expressage.setDeliveryTime(dt);//送达时间
                        }
                        //保存物流信息
                        expressageDao.save(expressage);
                    }
                    //调用生成取药二维码接口
                    Map<String,Object> params = new HashedMap();
                    params.put("prescriptionCode",prescriptionCode);
                    HttpClientUtil.request("POST",wlyyApi+"/third/pay/dispensaryCode/saveQRCode",params,null,null,null,null);
     /*               if(2 == prescription.getDispensaryType()){//如果是快递配送,则直接修改成配送中
                        log.setStatus(PrescriptionLog.PrescriptionLogStatus.expressageing.getValue());
                        log.setRemark("快递配送:配药成功,配送中");

+ 13 - 1
patient-co-service/wlyy_service/src/main/resources/application.yml

@ -77,6 +77,9 @@ im:
zyapi:
  openCrypto: false
#    i健康项目地址
wlyy:
  api: http://192.168.131.113:8081
---
spring:
  profiles: devtest
@ -98,6 +101,9 @@ im:
zyapi:
  openCrypto: false
#    i健康项目地址
wlyy:
  api: http://192.168.131.113:8081
---
spring:
  profiles: test
@ -118,6 +124,9 @@ im:
zyapi:
  openCrypto: false
#    i健康项目地址
wlyy:
  api: http://172.19.103.88:9092/wlyy
---
spring:
  profiles: production
@ -137,4 +146,7 @@ im:
  data_base_name: im
zyapi:
  openCrypto: true
  openCrypto: true
#    i健康项目地址
wlyy:
  api: http://www.xmtyw.cn/wlyy

+ 4 - 1
patient-co-service/wlyy_sign/src/main/java/com/yihu/wlyy/sign/service/ChargeZYService.java

@ -225,7 +225,10 @@ public class ChargeZYService {
                //--huangwenjie--2018.01.12--扣费总额需要扣除政府补贴
                if(StringUtils.isNotBlank(charge.getCadresPay())){
                    infoobj.put("zfbtzf", NumberUtil.feeToYuan(Integer.parseInt(charge.getCadresPay().trim())));//政府补贴支付
    
                    System.out.println("totailAmount:"+String.valueOf(charge.getTotalAmount()));
                    System.out.println("cadrespay:"+charge.getCadresPay().trim());
                    Integer totalAmount = charge.getTotalAmount() - Integer.parseInt(charge.getCadresPay().trim());
                    System.out.println(String.valueOf(totalAmount));
                    infoobj.put("zje000",NumberUtil.feeToYuan(charge.getTotalAmount()-Integer.parseInt(charge.getCadresPay().trim())));//扣费总额
                }else{
                    infoobj.put("zfbtzf","0.00");//政府补贴支付

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

@ -13,7 +13,6 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
/**
@ -77,6 +76,7 @@ public class Data2Save {
            }
            savelist.add(saveModel);
        }
        //如果有维度的数据就设置维度的数据
        if (dimensionQuotas!=null && dimensionQuotas.size()>0){
            //如果有维度就设置维度的数据
            for (int i = 0; i < dimensionQuotas.size(); i++) {
@ -91,10 +91,8 @@ public class Data2Save {
    private List<SaveModel> setSlaveKey(int savleKeyNum, List<SaveModel> savelist, List<DictModel> dictModels,Map<String, DataModel> dataModelMap,int dimensize) {
        List<SaveModel> newSavelist = new ArrayList<>();
//        savelist.stream().forEach(one -> {
        for(SaveModel one:savelist) {
            for(DictModel dict:dictModels){
//            dictModels.stream().forEach(dict -> {
            SaveModel newSaveModel = new SaveModel();
            BeanUtils.copyProperties(one, newSaveModel);
            try {
@ -117,8 +115,6 @@ public class Data2Save {
            } catch (Exception e) {
                e.printStackTrace();
            }
//            });
//        });
        }
        }
        return newSavelist;

+ 0 - 15
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/job/business/EsToEsQuotaJob.java

@ -64,11 +64,7 @@ public class EsToEsQuotaJob implements Job {
    @Autowired
    private QuartzJobLogDao quartzJobLogDao;//执行日志Dao
    @Autowired
    private WlyyDimensionQuotaDao dimensionQuotaDao;
    @Autowired
    private QuartzJobConfigDao quartzJobConfigDao;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private ElasticFactory elasticFactory;
@ -153,17 +149,6 @@ public class EsToEsQuotaJob implements Job {
            deleteData(quotaDate, wlyyJobCongId, timeLevel);
            // 1..抽取数据 如果是累加就是 List<DataModel>  如果是相除 Map<String,List<DataModel>>
            List<DataModel> dataModels = extract();
//            //扩展 有维度的统计
//
            //兼容旧代码,封装
//            FilterModel filterModel = new FilterModel(dataModels,new ArrayList<ErrModel>());
//            //得到该指标的维度
//            List<WlyyDimensionQuota> dimensionQuotas = dimensionQuotaDao.findDimensionQuotasByQuotaCode(wlyyJobCongId);
//            //2.1.从维度的key转换
//            if (dimensionQuotas != null && dimensionQuotas.size() > 0) {
//                filterModel = convert(filterModel, dimensionQuotas);
//            }
            // 2 DataModel 转SaveModel即可
            List<SaveModel> saveModels = data2Save.data2save(dataModels,quartzJobConfig,quotaDate,timeLevel);
            // 3.保存数据

+ 1 - 1
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/activemq/HealthArtListener.java

@ -114,7 +114,7 @@ public class HealthArtListener implements MessageListener {
        try {
            //卫纪委发送不推IM
            if (1 == one.getSendType()) {
                consultService.sendMucMessageBySingnType(one.getDoctorCode(), one.getDoctorName(), one.getPatientCode(), "{\"title\":\"" + one.getArticleTitle() + "\",\"type\":0,\"id\":\"" + one.getId() + "\",\"img\":\"" + one.getArticleCover() + "\",\"content\":\"为了您的健康,我给您发送了一篇文章,请咨询查阅,如有问题,可随时与我沟通\"}", "4", patient.getName());
                consultService.sendMucMessageBySingnType(one.getDoctorCode(), one.getDoctorName(), one.getPatientCode(), "{\"title\":\"" + one.getArticleTitle() + "\",\"type\":0,\"id\":\"" + one.getArticleId() + "\",\"img\":\"" + one.getArticleCover() + "\",\"content\":\"为了您的健康,我给您发送了一篇文章,请咨询查阅,如有问题,可随时与我沟通\"}", "4", patient.getName());
                if (StringUtils.isNotBlank(one.getLeaveWords())) {
                    //发送备注
                    consultService.sendMucMessageBySingnType(one.getDoctorCode(), one.getDoctorName(), one.getPatientCode(), one.getLeaveWords(), ImUtill.CONTENT_TYPE_TEXT, patient.getName());

二進制
patient-co/patient-co-wlyy/doc/部署文档/正式库/厦门i健康网络架构.png


+ 6 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/template/DoctorGuidanceTempDao.java

@ -19,11 +19,11 @@ public interface DoctorGuidanceTempDao extends PagingAndSortingRepository<Doctor
    int deleteByCode(String code);
    @Query("select t from DoctorGuidanceTemp t where t.owner = ?1 order by t.sendTimes desc")
    @Query("select t from DoctorGuidanceTemp t where t.owner = ?1 order by t.sendTimes desc ,t.createTime desc")
    Page<DoctorGuidanceTemp> findByOwner(String owner, Pageable pageRequest);
//    Page<List<DoctorGuidanceTemp>> findByOwner(String owner, Pageable pageRequest);
    @Query("select t from DoctorGuidanceTemp t where t.owner = ?1 or t.owner = 'system' order by t.sendTimes desc")
    @Query("select t from DoctorGuidanceTemp t where t.owner = ?1 or t.owner = 'system' order by t.sendTimes desc ,t.createTime desc")
    Page<DoctorGuidanceTemp> findByOwnerAndSystem(String owner, Pageable pageRequest);
    //    Page<List<DoctorGuidanceTemp>> findByOwnerAndSystem(String owner, Pageable pageRequest);
@ -32,17 +32,17 @@ public interface DoctorGuidanceTempDao extends PagingAndSortingRepository<Doctor
    List<DoctorGuidanceTemp> findByTitle(String owner,String title);
    //根据模板文章标题模糊搜索系统指导模板
    @Query(value = "select t from DoctorGuidanceTemp t where t.owner = 'system' and t.modelName like ?1 order by t.sendTimes desc ")
    @Query(value = "select t from DoctorGuidanceTemp t where t.owner = 'system' and t.modelName like ?1 order by t.sendTimes desc ,t.createTime desc ")
    Page<DoctorGuidanceTemp> listByTileSystem(String filter, Pageable pageRequest);
    //根据模板文章标题模糊搜索个人指导模板
    @Query(value = "select t from DoctorGuidanceTemp t where t.owner != 'system' and t.modelName like ?1 order by t.sendTimes desc ")
    @Query(value = "select t from DoctorGuidanceTemp t where t.owner != 'system' and t.modelName like ?1 order by t.sendTimes desc ,t.createTime desc ")
    Page<DoctorGuidanceTemp> listByTile(String filter, Pageable pageRequest);
    //根据模板文章标题模糊搜索个人指导模板
    @Query(value = "select t from DoctorGuidanceTemp t where t.owner = ?1 and t.modelName like ?2 order by t.sendTimes desc ")
    @Query(value = "select t from DoctorGuidanceTemp t where t.owner = ?1 and t.modelName like ?2 order by t.sendTimes desc ,t.createTime desc ")
    Page<DoctorGuidanceTemp> listOwnerByTile(String owner, String filter, Pageable pageRequest);
    @Query("select t from DoctorGuidanceTemp t where (t.owner = 'system' or t.owner = ?1) and t.modelName like ?2 order by t.sendTimes desc ")
    @Query("select t from DoctorGuidanceTemp t where (t.owner = 'system' or t.owner = ?1) and t.modelName like ?2 order by t.sendTimes desc ,t.createTime desc ")
    Page<DoctorGuidanceTemp> listByTileAll(String owner,String filter, Pageable pageRequest);
}

+ 4 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/template/DoctorTeamGuidanceTemplateDao.java

@ -53,22 +53,22 @@ public interface DoctorTeamGuidanceTemplateDao extends PagingAndSortingRepositor
    // 根据模板文章标题模糊搜索团队指导模板
    @Query("SELECT b FROM DoctorTeamGuidanceDetail a, DoctorTeamGuidanceTemplate b WHERE a.code = b.teamTemplateCode  " +
            " AND b.del = 1 AND b.title LIKE ?1 order by b.useTimes desc  ")
            " AND b.del = 1 AND b.title LIKE ?1 order by b.useTimes desc ,b.createTime desc ")
    Page<DoctorTeamGuidanceTemplate> listByTile(String title, Pageable pageRequest);
    // 根据模板文章标题模糊搜索团队指导模板
    @Query("SELECT b FROM DoctorTeamGuidanceDetail a, DoctorTeamGuidanceTemplate b WHERE a.code = b.teamTemplateCode  " +
            " AND b.del = 1 AND b.creater = ?1  AND b.teamId = ?2 AND b.title LIKE ?3 order by b.useTimes desc  ")
            " AND b.del = 1 AND b.creater = ?1  AND b.teamId = ?2 AND b.title LIKE ?3 order by b.useTimes desc ,b.createTime desc ")
    List<DoctorTeamGuidanceTemplate> countTeamListByTile(String doctor, int teamId, String title);
    // 根据模板文章标题模糊搜索团队指导模板
    @Query("SELECT b FROM DoctorTeamGuidanceDetail a, DoctorTeamGuidanceTemplate b WHERE a.code = b.teamTemplateCode  " +
            " AND b.del = 1  AND b.creater = ?1  AND b.title LIKE ?2 GROUP BY b.teamId order by b.useTimes desc  ")
            " AND b.del = 1  AND b.creater = ?1  AND b.title LIKE ?2 GROUP BY b.teamId order by b.useTimes desc ,b.createTime desc ")
    List<DoctorTeamGuidanceTemplate> countTeamListByTile(String doctor, String title);
    // 根据模板文章标题模糊搜索团队指导模板
    @Query("SELECT b FROM DoctorTeamGuidanceDetail a, DoctorTeamGuidanceTemplate b WHERE a.code = b.teamTemplateCode  " +
            " AND b.del = 1 AND b.creater = ?1 AND b.title LIKE ?2 order by b.useTimes desc  ")
            " AND b.del = 1 AND b.creater = ?1 AND b.title LIKE ?2 order by b.useTimes desc ,b.createTime desc ")
    List<DoctorTeamGuidanceTemplate> getListByTile(String doctor, String title, Pageable pageRequest);
}

+ 4 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/device/PatientDeviceService.java

@ -236,13 +236,14 @@ public class PatientDeviceService extends BaseService {
    /**
     * 删除患者设备
     */
    public List<JSONObject> deleteDevice(String id, String uuid) {
    public List<com.alibaba.fastjson.JSONObject> deleteDevice(String id, String uuid) {
        PatientDevice device = patientDeviceDao.findOne(Long.valueOf(id));
        patientDeviceDao.delete(device);
        List<PatientDevice> patientDevices = patientDeviceDao.findByDeviceSnAndCategoryCode(device.getDeviceSn(), device.getCategoryCode());
        List<JSONObject> objects = new ArrayList<>();
        List<com.alibaba.fastjson.JSONObject> objects = new ArrayList<>();
        for (PatientDevice patientDevice : patientDevices) {
            JSONObject object = new JSONObject(patientDevice);
            String json = com.alibaba.fastjson.JSONObject.toJSONString(patientDevice) ;
            com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(json) ;
            Patient patient = patientDao.findByCode(patientDevice.getUser());
            if (patient != null) {
                object.put("userName", patient.getName());

+ 5 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java

@ -5,9 +5,11 @@ import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabel;
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabelInfo;
import com.yihu.wlyy.entity.patient.*;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.PatientDisease;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.entity.patient.TrackPatient;
import com.yihu.wlyy.entity.patient.vo.PatientVO;
import com.yihu.wlyy.entity.statistics.WlyyQuotaResult;
import com.yihu.wlyy.logs.BusinessLogs;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.doctor.DoctorPatientGroupInfoDao;
@ -20,7 +22,6 @@ import com.yihu.wlyy.service.app.health.PatientHealthIndexService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.IdCardUtil;
import io.swagger.models.auth.In;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
@ -4040,7 +4041,7 @@ public class SignPatientLabelInfoService extends BaseService {
                PatientVO p = new PatientVO();
                List<PatientVO> plist = new ArrayList<>();
                if(sign.get("patient") != null){
                    String patientsql = "select a.*,b. as deviceType,c.disease as disease from wlyy_patient a" +
                    String patientsql = "select a.*,b.deviceType as deviceType,c.disease as disease from wlyy_patient a" +
                            "  left join (select user,group_concat(category_code) deviceType FROM wlyy_patient_device GROUP BY user) b on a.code = b.user" +
                            "  left join (select patient,group_concat(label) disease from wlyy_sign_patient_label_info where label_type = 3 and status=1 " +
                            " and (label = 1 or label = 2) and patient = '"+sign.get("patient").toString()+"' GROUP BY patient) c on a.code = c.patient" +

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

@ -2677,21 +2677,21 @@ public class SignWebService extends BaseService {
            //获取智业团队签约上线
            String jwCode = one.getMappingCode();//智业服务团队的code
            try{
//                String response = jwSignService.getSickFamilyDoctorSignLimit(jwCode);
//                com.alibaba.fastjson.JSONObject json = com.alibaba.fastjson.JSONObject.parseObject(response);
//                if(json.getInteger("status")==200){
//                    com.alibaba.fastjson.JSONObject data = json.getJSONObject("data");
//                    if("1".equals(data.getString("CODE"))&&data.getJSONArray("DATA").size()>0){
//                        int sign_limit_number = data.getJSONArray("DATA").getJSONObject(0).getInteger("SIGN_LIMIT_NUMBER");//签约上线
//                        limitTotal+=sign_limit_number;
//                    }
//                }
                String response = jwSignService.getSickFamilyDoctorSignLimit(jwCode);
                com.alibaba.fastjson.JSONObject json = com.alibaba.fastjson.JSONObject.parseObject(response);
                if(json.getInteger("status")==200){
                    com.alibaba.fastjson.JSONObject data = json.getJSONObject("data");
                    if("1".equals(data.getString("CODE"))&&data.getJSONArray("DATA").size()>0){
                        int sign_limit_number = data.getJSONArray("DATA").getJSONObject(0).getInteger("SIGN_LIMIT_NUMBER");//签约上线
                        limitTotal+=sign_limit_number;
                    }
                }
            }catch (Exception e){
                e.printStackTrace();
            }
        }
        re.put("signTotal",signTotal);
        re.put("limitTotal",1500);
        re.put("limitTotal",limitTotal);
        return re;
    }

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/imm/ChildInfoService.java

@ -114,6 +114,7 @@ public class ChildInfoService extends BaseService {
		vo.setMotherName(c.getMotherName());
		vo.setMotherSsc(c.getMotherSsc());
		vo.setSex(c.getSex());
		vo.setSsc(c.getSsc());
		return vo;
	}
}

+ 19 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/guahao/ImmuneService.java

@ -501,6 +501,25 @@ public class ImmuneService {
				V_RESERVATION_IMMUNE_JSON.put("ID_CARD", ID_CARD.getTextTrim());
				V_RESERVATION_IMMUNE_JSON.put("RES_ID", RES_ID.getTextTrim());
				V_RESERVATION_IMMUNE_JSON.put("BARCODE", BARCODE.getTextTrim());
				
				//组装预约时间给前端调用:取消预约用
				String START_TIME_VO = RES_DATE.getTextTrim()+" "+START_TIME.getTextTrim();
				V_RESERVATION_IMMUNE_JSON.put("START_TIME_VO",START_TIME_VO);
				
				//组装坐诊类型给前端调用:取消预约用
				Date date = DateUtil.strToDate(START_TIME_VO+":00");
				GregorianCalendar cal= new GregorianCalendar();
				cal.setTime(date);
				int AM_PM = cal.get(GregorianCalendar.AM_PM);
				String SectionType = "";
				if(0 == AM_PM){
					SectionType = "AM";
				}
				if(1 == AM_PM){
					SectionType = "PM";
				}
				V_RESERVATION_IMMUNE_JSON.put("SectionType",SectionType);
				
				result.add(V_RESERVATION_IMMUNE_JSON);
			}
			

+ 2 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/device/DoctorDeviceController.java

@ -12,7 +12,6 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
@ -97,7 +96,7 @@ public class DoctorDeviceController extends BaseController {
			if(pd!=null)
			{
				if(StringUtils.isNotBlank(pd.getDoctor())&&StringUtils.equals(pd.getDoctor(), getUID())){
					List<JSONObject> objects = patientDeviceService.deleteDevice(id,getUID());
					List<com.alibaba.fastjson.JSONObject> objects = patientDeviceService.deleteDevice(id,getUID());
					return write(200,"","data",objects);
				}
				else if(StringUtils.isNotBlank(pd.getDoctor())&&!StringUtils.equals(pd.getDoctor(), getUID())){
@ -108,7 +107,7 @@ public class DoctorDeviceController extends BaseController {
						bo = true;
					}
					if(bo){//同行政团队
						List<JSONObject> objects = patientDeviceService.deleteDevice(id,getUID());
						List<com.alibaba.fastjson.JSONObject> objects = patientDeviceService.deleteDevice(id,getUID());
						return write(200,"","data",objects);
					}else{
						return error(-1, "只允许删除自己及自己行政团队绑定的设备!");

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorFamilyContractController.java

@ -885,7 +885,7 @@ public class DoctorFamilyContractController extends WeixinBaseController {
                // 设置患者身份证号
                json.put("idCard", temp.getIdcard());
                //1.4.2 医疗保险号
                json.put("medicareNumber", temp.getMedicareNumber());
                json.put("medicareNumber", temp.getMedicareNumber()==null?"":temp.getMedicareNumber());
                // 设置患者出生年月
                json.put("birthday", DateUtil.dateToStr(temp.getBirthday(), DateUtil.YYYY_MM_DD));
                // 设置患者手机号码

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

@ -255,7 +255,7 @@ public class PatientBookingController extends WeixinBaseController{
    @ResponseBody
    @ObserverRequired
    @ApiOperation("计免:根据条形码获取预约记录")
    public String UnResRegisterImmune (@ApiParam(name="BarCode",value="新生儿条形编码",defaultValue = "")
    public String GetResImmuneListWithBarCode (@ApiParam(name="BarCode",value="新生儿条形编码",defaultValue = "")
                                       @RequestParam String BarCode){
        
        try{

+ 4 - 8
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/family/FamilyMemberController.java

@ -485,25 +485,21 @@ public class FamilyMemberController extends WeixinBaseController {
    public String addImmuneMenberByBarCode(@ApiParam(name = "barCode", value = "新生儿条形编码", defaultValue = "")
                                           @RequestParam(value = "barCode", required = true) String barCode,
                                           @ApiParam(name = "idcard", value = "新生儿身份证号", defaultValue = "")
                                           @RequestParam(value = "idcard", required = true) String idcard,
                                           @RequestParam(value = "idcard", required = false) String idcard,
                                           @ApiParam(name = "ssc", value = "新生儿条形编码", defaultValue = "")
                                           @RequestParam(value = "ssc", required = true) String ssc,
                                           @RequestParam(value = "ssc", required = false) String ssc,
                                           @ApiParam(name = "relation", value = "1父亲 2母亲 3老公 4老婆 5儿子 6女儿 7其他")
                                           @RequestParam(value = "relation", required = true) Integer relation){
        try {
    
            ChildInfo childInfo  = childInfoService.getByBarCode(barCode);
            
            if(StringUtils.isBlank(idcard) || StringUtils.isBlank(ssc)){
                return error(-1, "新生儿身份证和社保卡号不能为空!");
            }
            
            if(!idcard.equals(childInfo.getIdcard()) && StringUtils.isNotBlank(childInfo.getIdcard())){
                return error(-1, "新生儿身份证信息不一致,无法绑定");
                return error(-1, "输入的新生儿身份证信息不一致,无法绑定");
            }
    
            if(!ssc.equals(childInfo.getSsc()) && StringUtils.isNotBlank(childInfo.getSsc())){
                return error(-1, "新生儿身份证信息不一致,无法绑定");
                return error(-1, "输入的新生儿社保卡不一致,无法绑定");
            }
    
            childFamilyImmuneService.addFamilyMembers(childInfo,getRepUID(),idcard,ssc,relation);

+ 24 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/ylzpay/ThirdPayController.java

@ -1,14 +1,15 @@
package com.yihu.wlyy.web.third.ylzpay;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.service.app.prescription.PatientPrescriptionPayService;
import com.yihu.wlyy.service.app.prescription.PrescriptionDispensaryCodeService;
import com.yihu.wlyy.service.third.jw.JwPrescriptionService;
import com.yihu.wlyy.web.WeixinBaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -27,6 +28,8 @@ public class ThirdPayController extends WeixinBaseController {
    private PatientPrescriptionPayService payService;
    @Autowired
    private JwPrescriptionService jwPrescriptionService;
    @Autowired
    private PrescriptionDispensaryCodeService prescriptionDispensaryCodeService;
    /**
@ -51,4 +54,22 @@ public class ThirdPayController extends WeixinBaseController {
        }
    }
    /**
     * 生成取药码
     */
    @RequestMapping(value = "/dispensaryCode/saveQRCode", method = RequestMethod.POST)
    @ResponseBody
    @ObserverRequired
    public String saveQRCode2(
            @ApiParam(required = true, name = "prescriptionCode", value = "处方code") @RequestParam(value = "prescriptionCode", required = true) String prescriptionCode) {
        try {
            prescriptionDispensaryCodeService.saveQRCode(prescriptionCode);
            return write(200, "生成二维码成功!");
        } catch (Exception e) {
            error(e);
            return error(-1, "生成二维码失败!");
        }
    }
}

+ 1 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/wechat/process/WeiXinEventProcess.java

@ -400,8 +400,7 @@ public class WeiXinEventProcess {
                    " WHERE " +
                    " p.openid ='"+openid+"' " +
                    " AND f.`status` >0 " +
                    " AND f.expenses_status ='1' " +
                    " AND f.hospital = '3502030400'";
                    " AND f.expenses_status ='1' ";
            List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
            logger.info("hslq_Wifi_openid_info: "+openid);

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

@ -64,7 +64,7 @@ redis:
hibernate:
  dialect: org.hibernate.dialect.MySQL5Dialect
  show_sql: true
  show_sql: false
  ejb:
    naming_strategy: org.hibernate.cfg.ImprovedNamingStrategy