Commit 41354f038f79e65bc753a759ccc6006e78f16892

Authored by yangfei
1 parent 73fb2bbe62

听力诊断模块

Showing 7 changed files with 186 additions and 126 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/model/PatientMarkHospital.java View file @ 41354f0
... ... @@ -68,7 +68,7 @@
68 68 */
69 69 private String inHospitRemark;
70 70 /**
71   - * 住院失败原因(1-电话无人接听、2-他院已办理住院、3-暂时未确定、4-其他)2
  71 + * 住院失败原因(1-电话无人接听、2-他院已办理住院、3-暂时未确定、4-其他)
72 72 */
73 73 private Integer inHospitFailure;
74 74 /**
75 75  
... ... @@ -99,7 +99,18 @@
99 99 * 住院时间
100 100 */
101 101 private Date hospitDate;
  102 + /**
  103 + * 住院类型(1-分娩住院、2-其他住院)
  104 + */
  105 + private Integer hospitType;
102 106  
  107 + public Integer getHospitType() {
  108 + return hospitType;
  109 + }
  110 +
  111 + public void setHospitType(Integer hospitType) {
  112 + this.hospitType = hospitType;
  113 + }
103 114  
104 115 public Integer getHospitStatus() {
105 116 return hospitStatus;
platform-biz-service/src/main/java/com/lyms/platform/permission/model/PatientMarkHospitalQuery.java View file @ 41354f0
... ... @@ -115,7 +115,18 @@
115 115 * 住院时间
116 116 */
117 117 private Date hospitDate;
  118 + /**
  119 + * 住院类型(1-分娩住院、2-其他住院)
  120 + */
  121 + private Integer hospitType;
118 122  
  123 + public Integer getHospitType() {
  124 + return hospitType;
  125 + }
  126 +
  127 + public void setHospitType(Integer hospitType) {
  128 + this.hospitType = hospitType;
  129 + }
119 130 public Date getMakeStartDate() {
120 131 return makeStartDate;
121 132 }
platform-biz-service/src/main/resources/mainOrm/master/PatientMarkHospital.xml View file @ 41354f0
... ... @@ -3,111 +3,115 @@
3 3 <mapper namespace="com.lyms.platform.permission.dao.master.PatientMarkHospitalMapper">
4 4  
5 5 <resultMap id="PatientMarkHospitalResultMap" type="com.lyms.platform.permission.model.PatientMarkHospital">
6   - <id column="id" property="id" jdbcType="VARCHAR" />
7   - <result column="patient_id" property="patientId" jdbcType="VARCHAR" />
8   - <result column="pid" property="pid" jdbcType="VARCHAR" />
9   - <result column="back_status" property="backStatus" jdbcType="INTEGER" />
10   - <result column="back_result" property="backResult" jdbcType="INTEGER" />
11   - <result column="back_doctor" property="backDoctor" jdbcType="VARCHAR" />
12   - <result column="back_date" property="backDate" jdbcType="TIMESTAMP" />
13   - <result column="back_make_date" property="backMakeDate" jdbcType="TIMESTAMP" />
14   - <result column="back_remark" property="backRemark" jdbcType="VARCHAR" />
15   - <result column="back_failure" property="backFailure" jdbcType="INTEGER" />
16   - <result column="in_hospit_status" property="inHospitStatus" jdbcType="INTEGER" />
17   - <result column="in_hospit_result" property="inHospitResult" jdbcType="INTEGER" />
18   - <result column="in_hospit_doctor" property="inHospitDoctor" jdbcType="VARCHAR" />
19   - <result column="in_hospit_date" property="inHospitDate" jdbcType="TIMESTAMP" />
20   - <result column="in_hospit_make_date" property="inHospitMakeDate" jdbcType="TIMESTAMP" />
21   - <result column="in_hospit_remark" property="inHospitRemark" jdbcType="VARCHAR" />
22   - <result column="in_hospit_failure" property="inHospitFailure" jdbcType="INTEGER" />
23   - <result column="make_in_hospit_date" property="makeInHospitDate" jdbcType="TIMESTAMP" />
24   - <result column="make_date" property="makeDate" jdbcType="TIMESTAMP" />
25   - <result column="make_doctor" property="makeDoctor" jdbcType="VARCHAR" />
26   - <result column="make_remark" property="makeRemark" jdbcType="VARCHAR" />
27   - <result column="hospital_id" property="hospitalId" jdbcType="VARCHAR" />
28   - <result column="hospit_status" property="hospitStatus" jdbcType="INTEGER" />
29   - <result column="hospit_date" property="hospitDate" jdbcType="TIMESTAMP" />
  6 + <id column="id" property="id" jdbcType="VARCHAR"/>
  7 + <result column="patient_id" property="patientId" jdbcType="VARCHAR"/>
  8 + <result column="pid" property="pid" jdbcType="VARCHAR"/>
  9 + <result column="back_status" property="backStatus" jdbcType="INTEGER"/>
  10 + <result column="back_result" property="backResult" jdbcType="INTEGER"/>
  11 + <result column="back_doctor" property="backDoctor" jdbcType="VARCHAR"/>
  12 + <result column="back_date" property="backDate" jdbcType="TIMESTAMP"/>
  13 + <result column="back_make_date" property="backMakeDate" jdbcType="TIMESTAMP"/>
  14 + <result column="back_remark" property="backRemark" jdbcType="VARCHAR"/>
  15 + <result column="back_failure" property="backFailure" jdbcType="INTEGER"/>
  16 + <result column="in_hospit_status" property="inHospitStatus" jdbcType="INTEGER"/>
  17 + <result column="in_hospit_result" property="inHospitResult" jdbcType="INTEGER"/>
  18 + <result column="in_hospit_doctor" property="inHospitDoctor" jdbcType="VARCHAR"/>
  19 + <result column="in_hospit_date" property="inHospitDate" jdbcType="TIMESTAMP"/>
  20 + <result column="in_hospit_make_date" property="inHospitMakeDate" jdbcType="TIMESTAMP"/>
  21 + <result column="in_hospit_remark" property="inHospitRemark" jdbcType="VARCHAR"/>
  22 + <result column="in_hospit_failure" property="inHospitFailure" jdbcType="INTEGER"/>
  23 + <result column="make_in_hospit_date" property="makeInHospitDate" jdbcType="TIMESTAMP"/>
  24 + <result column="make_date" property="makeDate" jdbcType="TIMESTAMP"/>
  25 + <result column="make_doctor" property="makeDoctor" jdbcType="VARCHAR"/>
  26 + <result column="make_remark" property="makeRemark" jdbcType="VARCHAR"/>
  27 + <result column="hospital_id" property="hospitalId" jdbcType="VARCHAR"/>
  28 + <result column="hospit_status" property="hospitStatus" jdbcType="INTEGER"/>
  29 + <result column="hospit_date" property="hospitDate" jdbcType="TIMESTAMP"/>
  30 + <result column="hospit_type" property="hospitType" jdbcType="INTEGER"/>
30 31 </resultMap>
31 32  
32 33  
33   -
34 34 <insert id="addPatientMarkHospital" parameterType="com.lyms.platform.permission.model.PatientMarkHospital">
35   - insert into patient_mark_hospital (id,patient_id,pid,back_status,back_result,back_doctor,back_date,back_make_date,back_remark,back_failure,in_hospit_status,in_hospit_result,in_hospit_doctor,in_hospit_date,in_hospit_make_date,in_hospit_remark,in_hospit_failure,make_in_hospit_date,make_date,make_doctor,make_remark,hospital_id,hospit_status,hospit_date) values (#{id},#{patientId},#{pid},#{backStatus},#{backResult},#{backDoctor},#{backDate},#{backMakeDate},#{backRemark},#{backFailure},#{inHospitStatus},#{inHospitResult},#{inHospitDoctor},#{inHospitDate},#{inHospitMakeDate},#{inHospitRemark},#{inHospitFailure},#{makeInHospitDate},#{makeDate},#{makeDoctor},#{makeRemark},#{hospitalId},#{hospitStatus},#{hospitDate})
  35 + insert into patient_mark_hospital (id,patient_id,pid,back_status,back_result,back_doctor,back_date,back_make_date,back_remark,back_failure,in_hospit_status,in_hospit_result,in_hospit_doctor,in_hospit_date,in_hospit_make_date,in_hospit_remark,in_hospit_failure,make_in_hospit_date,make_date,make_doctor,make_remark,hospital_id,hospit_status,hospit_date,hospit_type) values (#{id},#{patientId},#{pid},#{backStatus},#{backResult},#{backDoctor},#{backDate},#{backMakeDate},#{backRemark},#{backFailure},#{inHospitStatus},#{inHospitResult},#{inHospitDoctor},#{inHospitDate},#{inHospitMakeDate},#{inHospitRemark},#{inHospitFailure},#{makeInHospitDate},#{makeDate},#{makeDoctor},#{makeRemark},#{hospitalId},#{hospitStatus},#{hospitDate},#{hospitType})
36 36 </insert>
37 37  
38 38  
39   -
40 39 <update id="updatePatientMarkHospital" parameterType="com.lyms.platform.permission.model.PatientMarkHospital">
41   - update patient_mark_hospital <set><if test="patientId != null and patientId != ''">
42   - patient_id = #{patientId,jdbcType=VARCHAR},
43   - </if>
44   - <if test="pid != null and pid != ''">
45   - pid = #{pid,jdbcType=VARCHAR},
46   - </if>
47   - <if test="backStatus != null and backStatus >= 0">
48   - back_status = #{backStatus,jdbcType=INTEGER},
49   - </if>
50   - <if test="backResult != null and backResult >= 0">
51   - back_result = #{backResult,jdbcType=INTEGER},
52   - </if>
53   - <if test="backDoctor != null and backDoctor != ''">
54   - back_doctor = #{backDoctor,jdbcType=VARCHAR},
55   - </if>
56   - <if test="backDate != null">
57   - back_date = #{backDate,jdbcType=TIMESTAMP},
58   - </if>
59   - <if test="backMakeDate != null">
60   - back_make_date = #{backMakeDate,jdbcType=TIMESTAMP},
61   - </if>
62   - <if test="backRemark != null and backRemark != ''">
63   - back_remark = #{backRemark,jdbcType=VARCHAR},
64   - </if>
65   - <if test="backFailure != null and backFailure >= 0">
66   - back_failure = #{backFailure,jdbcType=INTEGER},
67   - </if>
68   - <if test="inHospitStatus != null and inHospitStatus >= 0">
69   - in_hospit_status = #{inHospitStatus,jdbcType=INTEGER},
70   - </if>
71   - <if test="inHospitResult != null and inHospitResult >= 0">
72   - in_hospit_result = #{inHospitResult,jdbcType=INTEGER},
73   - </if>
74   - <if test="inHospitDoctor != null and inHospitDoctor != ''">
75   - in_hospit_doctor = #{inHospitDoctor,jdbcType=VARCHAR},
76   - </if>
77   - <if test="inHospitDate != null">
78   - in_hospit_date = #{inHospitDate,jdbcType=TIMESTAMP},
79   - </if>
80   - <if test="inHospitMakeDate != null">
81   - in_hospit_make_date = #{inHospitMakeDate,jdbcType=TIMESTAMP},
82   - </if>
83   - <if test="inHospitRemark != null and inHospitRemark != ''">
84   - in_hospit_remark = #{inHospitRemark,jdbcType=VARCHAR},
85   - </if>
86   - <if test="inHospitFailure != null and inHospitFailure >= 0">
87   - in_hospit_failure = #{inHospitFailure,jdbcType=INTEGER},
88   - </if>
89   - <if test="makeInHospitDate != null">
90   - make_in_hospit_date = #{makeInHospitDate,jdbcType=TIMESTAMP},
91   - </if>
92   - <if test="makeDate != null">
93   - make_date = #{makeDate,jdbcType=TIMESTAMP},
94   - </if>
95   - <if test="makeDoctor != null and makeDoctor != ''">
96   - make_doctor = #{makeDoctor,jdbcType=VARCHAR},
97   - </if>
98   - <if test="makeRemark != null and makeRemark != ''">
99   - make_remark = #{makeRemark,jdbcType=VARCHAR},
100   - </if>
101   - <if test="hospitalId != null and hospitalId != ''">
102   - hospital_id = #{hospitalId,jdbcType=VARCHAR},
103   - </if>
104   - <if test="hospitStatus != null and hospitStatus >= 0">
105   - hospit_status = #{hospitStatus,jdbcType=INTEGER},
106   - </if>
107   - <if test="hospitDate != null">
108   - hospit_date = #{hospitDate,jdbcType=TIMESTAMP},
109   - </if>
110   - </set>
  40 + update patient_mark_hospital
  41 + <set>
  42 + <if test="patientId != null and patientId != ''">
  43 + patient_id = #{patientId,jdbcType=VARCHAR},
  44 + </if>
  45 + <if test="pid != null and pid != ''">
  46 + pid = #{pid,jdbcType=VARCHAR},
  47 + </if>
  48 + <if test="backStatus != null and backStatus >= 0">
  49 + back_status = #{backStatus,jdbcType=INTEGER},
  50 + </if>
  51 + <if test="backResult != null and backResult >= 0">
  52 + back_result = #{backResult,jdbcType=INTEGER},
  53 + </if>
  54 + <if test="backDoctor != null and backDoctor != ''">
  55 + back_doctor = #{backDoctor,jdbcType=VARCHAR},
  56 + </if>
  57 + <if test="backDate != null">
  58 + back_date = #{backDate,jdbcType=TIMESTAMP},
  59 + </if>
  60 + <if test="backMakeDate != null">
  61 + back_make_date = #{backMakeDate,jdbcType=TIMESTAMP},
  62 + </if>
  63 + <if test="backRemark != null and backRemark != ''">
  64 + back_remark = #{backRemark,jdbcType=VARCHAR},
  65 + </if>
  66 + <if test="backFailure != null and backFailure >= 0">
  67 + back_failure = #{backFailure,jdbcType=INTEGER},
  68 + </if>
  69 + <if test="inHospitStatus != null and inHospitStatus >= 0">
  70 + in_hospit_status = #{inHospitStatus,jdbcType=INTEGER},
  71 + </if>
  72 + <if test="inHospitResult != null and inHospitResult >= 0">
  73 + in_hospit_result = #{inHospitResult,jdbcType=INTEGER},
  74 + </if>
  75 + <if test="inHospitDoctor != null and inHospitDoctor != ''">
  76 + in_hospit_doctor = #{inHospitDoctor,jdbcType=VARCHAR},
  77 + </if>
  78 + <if test="inHospitDate != null">
  79 + in_hospit_date = #{inHospitDate,jdbcType=TIMESTAMP},
  80 + </if>
  81 + <if test="inHospitMakeDate != null">
  82 + in_hospit_make_date = #{inHospitMakeDate,jdbcType=TIMESTAMP},
  83 + </if>
  84 + <if test="inHospitRemark != null and inHospitRemark != ''">
  85 + in_hospit_remark = #{inHospitRemark,jdbcType=VARCHAR},
  86 + </if>
  87 + <if test="inHospitFailure != null and inHospitFailure >= 0">
  88 + in_hospit_failure = #{inHospitFailure,jdbcType=INTEGER},
  89 + </if>
  90 + <if test="makeInHospitDate != null">
  91 + make_in_hospit_date = #{makeInHospitDate,jdbcType=TIMESTAMP},
  92 + </if>
  93 + <if test="makeDate != null">
  94 + make_date = #{makeDate,jdbcType=TIMESTAMP},
  95 + </if>
  96 + <if test="makeDoctor != null and makeDoctor != ''">
  97 + make_doctor = #{makeDoctor,jdbcType=VARCHAR},
  98 + </if>
  99 + <if test="makeRemark != null and makeRemark != ''">
  100 + make_remark = #{makeRemark,jdbcType=VARCHAR},
  101 + </if>
  102 + <if test="hospitalId != null and hospitalId != ''">
  103 + hospital_id = #{hospitalId,jdbcType=VARCHAR},
  104 + </if>
  105 + <if test="hospitStatus != null and hospitStatus >= 0">
  106 + hospit_status = #{hospitStatus,jdbcType=INTEGER},
  107 + </if>
  108 + <if test="hospitDate != null">
  109 + hospit_date = #{hospitDate,jdbcType=TIMESTAMP},
  110 + </if>
  111 + <if test="hospitType != null">
  112 + hospit_type = #{hospitType,jdbcType=INTEGER},
  113 + </if>
  114 + </set>
111 115 where id = #{id,jdbcType=VARCHAR}
112 116 </update>
113 117  
114 118  
... ... @@ -117,9 +121,8 @@
117 121 </delete>
118 122  
119 123  
120   -
121 124 <select id="getPatientMarkHospital" resultMap="PatientMarkHospitalResultMap" parameterType="java.lang.String">
122   - select id,patient_id,pid,back_status,back_result,back_doctor,back_date,back_make_date,back_remark,back_failure,in_hospit_status,in_hospit_result,in_hospit_doctor,in_hospit_date,in_hospit_make_date,in_hospit_remark,in_hospit_failure,make_in_hospit_date,make_date,make_doctor,make_remark,hospital_id,hospit_status,hospit_date
  125 + select id,patient_id,pid,back_status,back_result,back_doctor,back_date,back_make_date,back_remark,back_failure,in_hospit_status,in_hospit_result,in_hospit_doctor,in_hospit_date,in_hospit_make_date,in_hospit_remark,in_hospit_failure,make_in_hospit_date,make_date,make_doctor,make_remark,hospital_id,hospit_status,hospit_date,hospit_type
123 126 from patient_mark_hospital where id = #{id,jdbcType=VARCHAR}
124 127 </select>
125 128  
... ... @@ -134,7 +137,6 @@
134 137 </sql>
135 138  
136 139  
137   -
138 140 <sql id="PatientMarkHospitalCondition">
139 141 <where>
140 142 1 = 1
141 143  
142 144  
143 145  
144 146  
... ... @@ -233,21 +235,21 @@
233 235 </sql>
234 236  
235 237  
236   -
237   - <select id="queryPatientMarkHospital" resultMap="PatientMarkHospitalResultMap" parameterType="com.lyms.platform.permission.model.PatientMarkHospitalQuery">
238   - select id,patient_id,pid,back_status,back_result,back_doctor,back_date,back_make_date,back_remark,back_failure,in_hospit_status,in_hospit_result,in_hospit_doctor,in_hospit_date,in_hospit_make_date,in_hospit_remark,in_hospit_failure,make_in_hospit_date,make_date,make_doctor,make_remark,hospital_id,hospit_status,hospit_date
  238 + <select id="queryPatientMarkHospital" resultMap="PatientMarkHospitalResultMap"
  239 + parameterType="com.lyms.platform.permission.model.PatientMarkHospitalQuery">
  240 + select
  241 + id,patient_id,pid,back_status,back_result,back_doctor,back_date,back_make_date,back_remark,back_failure,in_hospit_status,in_hospit_result,in_hospit_doctor,in_hospit_date,in_hospit_make_date,in_hospit_remark,in_hospit_failure,make_in_hospit_date,make_date,make_doctor,make_remark,hospital_id,hospit_status,hospit_date
239 242 from patient_mark_hospital
240   - <include refid="PatientMarkHospitalCondition" />
241   - <include refid="orderAndLimit" />
  243 + <include refid="PatientMarkHospitalCondition"/>
  244 + <include refid="orderAndLimit"/>
242 245 </select>
243 246  
244 247  
245   -
246   - <select id="queryPatientMarkHospitalCount" resultType="int" parameterType="com.lyms.platform.permission.model.PatientMarkHospitalQuery">
  248 + <select id="queryPatientMarkHospitalCount" resultType="int"
  249 + parameterType="com.lyms.platform.permission.model.PatientMarkHospitalQuery">
247 250 select count(1) from patient_mark_hospital
248   - <include refid="PatientMarkHospitalCondition" />
  251 + <include refid="PatientMarkHospitalCondition"/>
249 252 </select>
250   -
251 253  
252 254  
253 255 </mapper>
platform-common/src/main/java/com/lyms/platform/common/enums/MakeHospitalEnums.java View file @ 41354f0
1 1 package com.lyms.platform.common.enums;
2 2  
  3 +import java.util.ArrayList;
  4 +import java.util.HashMap;
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +
3 8 /**
4 9 * @auther yangfei
5 10 * @createTime 2017年09月15日 13时58分
... ... @@ -13,6 +18,17 @@
13 18  
14 19 private int id;
15 20 private String name;
  21 + //服务类型
  22 + public static List getMakeHospital() {
  23 + List<Object> list = new ArrayList<>();
  24 + for (MakeHospitalEnums enums : MakeHospitalEnums.values()) {
  25 + Map<String, Object> resultMap = new HashMap<>();
  26 + resultMap.put("id", enums.getId());
  27 + resultMap.put("name", enums.getName());
  28 + list.add(resultMap);
  29 + }
  30 + return list;
  31 + }
16 32  
17 33 public static String getTitle(int id) {
18 34 for (MakeHospitalEnums cfEnums : MakeHospitalEnums.values()) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientServiceController.java View file @ 41354f0
... ... @@ -191,13 +191,6 @@
191 191 baseResponse.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR);
192 192 return baseResponse;
193 193 }
194   - //服务状态
195   - if(ps.getSerStatus()==null){
196   - baseResponse.setErrormsg("serStatus");
197   - baseResponse.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR);
198   - return baseResponse;
199   - }
200   -
201 194 baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
202 195 return baseResponse;
203 196 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientMarkHospServiceFacade.java View file @ 41354f0
... ... @@ -50,13 +50,14 @@
50 50 */
51 51 public BaseResponse PatientMarkHospitalInit() {
52 52 Map map = new HashMap();
  53 + map.put("makeType",MakeHospitalEnums.getMakeHospital());
  54 +
53 55 return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION).setData(map);
54 56 }
55 57  
56 58  
57 59 /**
58 60 * 根据id查询一条住院提醒记录
59   - *
60 61 * @param id
61 62 * @return
62 63 */
... ... @@ -91,11 +92,6 @@
91 92 if (CollectionUtils.isNotEmpty(PatientMarkHospitals)) {
92 93 BaseResponse baseResponse = new BaseResponse();
93 94 baseResponse.setErrorcode(ErrorCodeConstants.DATA_EXIST);
94   - String serDoct = "产检医生";
95   - Users users = usersService.getUsers(Integer.parseInt(ps.getInHospitDoctor()));
96   - if (users != null) {
97   - serDoct = users.getName();
98   - }
99 95 baseResponse.setErrormsg("该孕妇存在预约住院信息");
100 96 return baseResponse;
101 97 }
102 98  
... ... @@ -130,13 +126,13 @@
130 126 markHospitalLog.setHospitalId(hospitalId);
131 127 markHospitalLog.setPatientMakeHosId(ps.getId());
132 128 markHospitalLog.setPatientId(ps.getPatientId());
133   - if (type == 1) {
  129 + if (type == 1) {//预约住院
134 130 markHospitalLog.setMakeDate(ps.getMakeDate());
135 131 markHospitalLog.setMakeRemark(ps.getMakeRemark());
136 132 markHospitalLog.setMarkeDoctor(ps.getMakeDoctor());
137 133 markHospitalLog.setMarkeDate(ps.getMakeDate());
138 134 markHospitalLog.setMarkeType(1);
139   - } else if (type == 2) {
  135 + } else if (type == 2) {//回院提醒
140 136 markHospitalLog.setRemResult(ps.getBackResult());
141 137 markHospitalLog.setMakeDate(ps.getBackMakeDate());
142 138 markHospitalLog.setMakeFailure(ps.getBackFailure());
... ... @@ -144,7 +140,7 @@
144 140 markHospitalLog.setMarkeDoctor(ps.getBackDoctor());
145 141 markHospitalLog.setMarkeDate(ps.getBackDate());
146 142 markHospitalLog.setMarkeType(2);
147   - } else if (type == 3) {
  143 + } else if (type == 3) {//住院提醒
148 144 markHospitalLog.setRemResult(ps.getInHospitResult());
149 145 markHospitalLog.setMakeDate(ps.getInHospitMakeDate());
150 146 markHospitalLog.setMakeFailure(ps.getInHospitFailure());
... ... @@ -301,6 +297,35 @@
301 297 baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
302 298 baseResponse.setErrormsg("成功");
303 299 return baseResponse;
  300 + }
  301 +
  302 + /**
  303 + * 同步查询乐陵住院数据
  304 + */
  305 + public void synLlHisData(int offset,int page){
  306 +
  307 + PatientMarkHospitalQuery patientMarkHospQuery = new PatientMarkHospitalQuery();
  308 + patientMarkHospQuery.setSort("create_date");
  309 + patientMarkHospQuery.setNeed("y");
  310 + patientMarkHospQuery.setOffset(offset);
  311 + patientMarkHospQuery.setLimit(100);
  312 + patientMarkHospQuery.setPage(page);
  313 +
  314 + List<PatientMarkHospital> patientMarkHospitals = patientMarkHospitalService.queryPatientMarkHospital(patientMarkHospQuery);
  315 + for (PatientMarkHospital ps : patientMarkHospitals) {
  316 + synUpdateHisData(ps);
  317 + }
  318 + if(patientMarkHospQuery.getCount()>page*100){
  319 + synLlHisData((page+1)*100,page+1);
  320 + }
  321 + }
  322 +
  323 + /**
  324 + * 同步更新数据库
  325 + * @param ps
  326 + */
  327 + public void synUpdateHisData(PatientMarkHospital ps){
  328 +
304 329 }
305 330  
306 331 public static Map<String, Integer> initHospitType() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java View file @ 41354f0
... ... @@ -134,6 +134,8 @@
134 134 ps.setHospitalId(hospitalId);
135 135 // ps.setCreateDate(new Date());
136 136 // ps.setCreateUser(String.valueOf(id));
  137 + //默认开通状态
  138 + ps.setSerStatus(PatientSerEnums.SerStatusEnums.kt.getId());
137 139 //默认已经领取
138 140 ps.setStatus(2);
139 141 //领取时间