Commit af8cfd37ca1f2f34518a0be9680dd54b24e8d46d

Authored by wangbo
1 parent 8fb7ae19d8

儿保体重测量数据回显

Showing 8 changed files with 602 additions and 524 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MeasureDataInfoMapper.java View file @ af8cfd3
... ... @@ -29,7 +29,11 @@
29 29 void addMeasureBabyDataInfo(MeasureBabyInfoModel model);
30 30  
31 31 List<MeasureBabyInfoModel> queryMeasureBabyInfoList(MeasureBabyDataInfoQuery query);
  32 +
32 33 int queryMeasureBabyInfoCount(MeasureBabyDataInfoQuery query);
  34 +
33 35 int updateMeasureBabyDataInfo(MeasureBabyInfoModel model);
  36 +
  37 + MeasureBabyInfoModel queryOneMeasureBaby(MeasureBabyDataInfoQuery query);
34 38 }
platform-biz-service/src/main/java/com/lyms/platform/permission/service/MeasureDataInfoService.java View file @ af8cfd3
... ... @@ -25,6 +25,9 @@
25 25 void addMeasureBabyInfo(MeasureBabyInfoModel model);
26 26  
27 27 List<MeasureBabyInfoModel> queryMeasureBabyInfoList(MeasureBabyDataInfoQuery query);
  28 +
28 29 int updateMeasureBabyDataInfo(MeasureBabyInfoModel model);
  30 +
  31 + MeasureBabyInfoModel queryOneMeasureBaby(MeasureBabyDataInfoQuery query);
29 32 }
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/MeasureDataInfoServiceImpl.java View file @ af8cfd3
... ... @@ -67,5 +67,11 @@
67 67 public int updateMeasureBabyDataInfo(MeasureBabyInfoModel model) {
68 68 return measureDataInfoMapper.updateMeasureBabyDataInfo(model);
69 69 }
  70 +
  71 + @Override
  72 + public MeasureBabyInfoModel queryOneMeasureBaby(MeasureBabyDataInfoQuery query) {
  73 + return measureDataInfoMapper.queryOneMeasureBaby(query);
  74 + }
  75 +
70 76 }
platform-biz-service/src/main/resources/mainOrm/master/MeasureDataInfoMapper.xml View file @ af8cfd3
1 1 <?xml version="1.0" encoding="UTF-8"?>
2   -<!DOCTYPE mapper
3   - PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4   - "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  2 +<!DOCTYPE mapper
  3 + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4 + "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5 5 <mapper namespace="com.lyms.platform.permission.dao.master.MeasureDataInfoMapper">
6 6  
7   - <resultMap type="com.lyms.platform.pojo.MeasureDataInfoModel" id="measureDataInfoModelMap">
8   - <result column="id" property="id"/>
9   - <result column="measure_user_id" property="measureUserId"/>
10   - <result column="value_one" property="valueOne"/>
11   - <result column="value_two" property="valueTwo"/>
12   - <result column="value_three" property="valueThree"/>
13   - <result column="value_type" property="valueType"/>
14   - <result column="record_count" property="recordCount"/>
15   - <result column="created" property="created"/>
16   - <result column="modified" property="modified"/>
17   - <result column="today_count" property="todayCount"/>
18   - <result column="remark_value" property="remarkValue"/>
19   - </resultMap>
  7 + <resultMap type="com.lyms.platform.pojo.MeasureDataInfoModel" id="measureDataInfoModelMap">
  8 + <result column="id" property="id"/>
  9 + <result column="measure_user_id" property="measureUserId"/>
  10 + <result column="value_one" property="valueOne"/>
  11 + <result column="value_two" property="valueTwo"/>
  12 + <result column="value_three" property="valueThree"/>
  13 + <result column="value_type" property="valueType"/>
  14 + <result column="record_count" property="recordCount"/>
  15 + <result column="created" property="created"/>
  16 + <result column="modified" property="modified"/>
  17 + <result column="today_count" property="todayCount"/>
  18 + <result column="remark_value" property="remarkValue"/>
  19 + </resultMap>
20 20  
21 21  
22   - <resultMap type="com.lyms.platform.pojo.MeasureDataInfoModel" id="measureDataInfoModelMapList">
23   - <id property="id" column="id"/>
24   - <result column="measure_user_id" property="measureUserId"/>
25   - <result column="value_one" property="valueOne"/>
26   - <result column="value_two" property="valueTwo"/>
27   - <result column="value_three" property="valueThree"/>
28   - <result column="value_type" property="valueType"/>
29   - <result column="record_count" property="recordCount"/>
30   - <result column="created" property="created"/>
31   - <result column="modified" property="modified"/>
32   - <result column="today_count" property="todayCount"/>
33   - <result column="record_content" property="recordContent"/>
34   - <result column="remark_value" property="remarkValue"/>
35   - <association property="measureUserInfoModel" javaType="com.lyms.platform.pojo.MeasureUserInfoModel">
36   - <result column="user_name" property="userName"/>
37   - <result column="cert_type" property="certType"/>
38   - <result column="cert_no" property="certNo"/>
39   - <result column="age" property="age"/>
40   - <result column="phone" property="phone"/>
41   - <result column="sex" property="sex"/>
42   - <result column="vc_card_no" property="vcCardNo"/>
43   - <result column="hospital_id" property="hospitalId"/>
44   - <result column="created" property="created"/>
45   - <result column="modified" property="modified"/>
46   - <result column="zy_no" property="zyNo"/>
47   - <result column="visit_id" property="visitId"/>
48   - <result column="patient_id" property="patientId"/>
49   - <result column="address" property="address"/>
50   - <result column="face" property="face"/>
51   - <result column="finger" property="finger"/>
52   - </association>
53   - </resultMap>
54   -
55   - <insert id="addMeasureDataInfo" parameterType="com.lyms.platform.pojo.MeasureDataInfoModel" >
  22 + <resultMap type="com.lyms.platform.pojo.MeasureDataInfoModel" id="measureDataInfoModelMapList">
  23 + <id property="id" column="id"/>
  24 + <result column="measure_user_id" property="measureUserId"/>
  25 + <result column="value_one" property="valueOne"/>
  26 + <result column="value_two" property="valueTwo"/>
  27 + <result column="value_three" property="valueThree"/>
  28 + <result column="value_type" property="valueType"/>
  29 + <result column="record_count" property="recordCount"/>
  30 + <result column="created" property="created"/>
  31 + <result column="modified" property="modified"/>
  32 + <result column="today_count" property="todayCount"/>
  33 + <result column="record_content" property="recordContent"/>
  34 + <result column="remark_value" property="remarkValue"/>
  35 + <association property="measureUserInfoModel" javaType="com.lyms.platform.pojo.MeasureUserInfoModel">
  36 + <result column="user_name" property="userName"/>
  37 + <result column="cert_type" property="certType"/>
  38 + <result column="cert_no" property="certNo"/>
  39 + <result column="age" property="age"/>
  40 + <result column="phone" property="phone"/>
  41 + <result column="sex" property="sex"/>
  42 + <result column="vc_card_no" property="vcCardNo"/>
  43 + <result column="hospital_id" property="hospitalId"/>
  44 + <result column="created" property="created"/>
  45 + <result column="modified" property="modified"/>
  46 + <result column="zy_no" property="zyNo"/>
  47 + <result column="visit_id" property="visitId"/>
  48 + <result column="patient_id" property="patientId"/>
  49 + <result column="address" property="address"/>
  50 + <result column="face" property="face"/>
  51 + <result column="finger" property="finger"/>
  52 + </association>
  53 + </resultMap>
  54 +
  55 + <insert id="addMeasureDataInfo" parameterType="com.lyms.platform.pojo.MeasureDataInfoModel">
56 56 INSERT INTO measure_data_info(measure_user_id,
57 57 value_one,value_two,value_three,value_type
58 58 ,record_count,created,modified,today_count,remark_value,record_content)
59 59  
60 60  
61 61  
62 62  
63 63  
64 64  
65 65  
66 66  
67 67  
68 68  
69 69  
70 70  
71 71  
72 72  
73 73  
74 74  
75 75  
76 76  
77 77  
78 78  
79 79  
80 80  
81 81  
... ... @@ -60,276 +60,275 @@
60 60 ,#{valueTwo},#{valueThree},#{valueType},#{recordCount},#{created},#{modified},#{todayCount},#{remarkValue},#{recordContent})
61 61 </insert>
62 62  
63   - <select id="queryMeasureDataInfoList" parameterType="com.lyms.platform.query.MeasureDataInfoQuery"
64   - resultMap="measureDataInfoModelMap">
65   - SELECT id,measure_user_id,
66   - value_one,value_two,value_three,value_type
67   - ,record_count,created,modified,today_count,remark_value,record_content
68   - FROM measure_data_info
69   - <include refid="queryMeasureDataInfoCondition"/>
70   - <include refid="orderAndLimit"/>
71   - </select>
  63 + <select id="queryMeasureDataInfoList" parameterType="com.lyms.platform.query.MeasureDataInfoQuery"
  64 + resultMap="measureDataInfoModelMap">
  65 + SELECT id,measure_user_id,
  66 + value_one,value_two,value_three,value_type
  67 + ,record_count,created,modified,today_count,remark_value,record_content
  68 + FROM measure_data_info
  69 + <include refid="queryMeasureDataInfoCondition"/>
  70 + <include refid="orderAndLimit"/>
  71 + </select>
72 72  
73 73  
  74 + <sql id="queryMeasureListCondition">
  75 + <where>
  76 + 1 = 1
  77 + <if test="id != null and id >= 0">
  78 + and m.id = #{id,jdbcType=INTEGER}
  79 + </if>
  80 + <if test="valueOne != null and valueOne != ''">
  81 + and m.value_one = #{valueOne,jdbcType=VARCHAR}
  82 + </if>
  83 + <if test="valueTwo != null and valueTwo != ''">
  84 + and m.value_two = #{valueTwo,jdbcType=VARCHAR}
  85 + </if>
  86 + <if test="valueThree != null and valueThree != ''">
  87 + and m.value_three = #{valueThree,jdbcType=VARCHAR}
  88 + </if>
  89 + <if test="valueType != null and valueType > 0">
  90 + and m.value_type = #{valueType,jdbcType=INTEGER}
  91 + </if>
  92 + <if test="created != null">
  93 + AND date_format(m.created,'%Y-%m-%d') = #{created}
  94 + </if>
  95 + <if test="recordCount != null and recordCount >= 0">
  96 + and m.record_count = #{m.recordCount,jdbcType=INTEGER}
  97 + </if>
74 98  
75   - <sql id="queryMeasureListCondition">
76   - <where>
77   - 1 = 1
78   - <if test="id != null and id >= 0">
79   - and m.id = #{id,jdbcType=INTEGER}
80   - </if>
81   - <if test="valueOne != null and valueOne != ''">
82   - and m.value_one = #{valueOne,jdbcType=VARCHAR}
83   - </if>
84   - <if test="valueTwo != null and valueTwo != ''">
85   - and m.value_two = #{valueTwo,jdbcType=VARCHAR}
86   - </if>
87   - <if test="valueThree != null and valueThree != ''">
88   - and m.value_three = #{valueThree,jdbcType=VARCHAR}
89   - </if>
90   - <if test="valueType != null and valueType > 0">
91   - and m.value_type = #{valueType,jdbcType=INTEGER}
92   - </if>
93   - <if test="created != null">
94   - AND date_format(m.created,'%Y-%m-%d') = #{created}
95   - </if>
96   - <if test="recordCount != null and recordCount >= 0">
97   - and m.record_count = #{m.recordCount,jdbcType=INTEGER}
98   - </if>
  99 + <if test="modified != null">
  100 + AND date_format(m.modified,'%Y-%m-%d') = #{modified}
  101 + </if>
99 102  
100   - <if test="modified != null">
101   - AND date_format(m.modified,'%Y-%m-%d') = #{modified}
102   - </if>
  103 + <if test="createdTimeStart != null">
  104 + AND m.created >= date_format(#{createdTimeStart},'%Y-%m-%d')
  105 + </if>
  106 + <if test="createdTimeEnd != null">
  107 + AND <![CDATA[ m.created < date_format(#{createdTimeEnd},'%Y-%m-%d') ]]>
  108 + </if>
103 109  
104   - <if test="createdTimeStart != null">
105   - AND m.created >= date_format(#{createdTimeStart},'%Y-%m-%d')
106   - </if>
107   - <if test="createdTimeEnd != null">
108   - AND <![CDATA[ m.created < date_format(#{createdTimeEnd},'%Y-%m-%d') ]]>
109   - </if>
  110 + <if test="modifiedTimeStart != null">
  111 + AND m.modified >= date_format(#{modifiedTimeStart},'%Y-%m-%d')
  112 + </if>
  113 + <if test="modifiedTimeEnd != null">
  114 + AND <![CDATA[ m.modified < date_format(#{modifiedTimeEnd},'%Y-%m-%d') ]]>
  115 + </if>
110 116  
111   - <if test="modifiedTimeStart != null">
112   - AND m.modified >= date_format(#{modifiedTimeStart},'%Y-%m-%d')
113   - </if>
114   - <if test="modifiedTimeEnd != null">
115   - AND <![CDATA[ m.modified < date_format(#{modifiedTimeEnd},'%Y-%m-%d') ]]>
116   - </if>
  117 + <if test="todayCount != null and todayCount > 0">
  118 + m.today_count = #{todayCount,jdbcType=INTEGER},
  119 + </if>
117 120  
118   - <if test="todayCount != null and todayCount > 0">
119   - m.today_count = #{todayCount,jdbcType=INTEGER},
120   - </if>
  121 + <if test="queryNo != null and queryNo != ''">
  122 + and (u.phone = #{queryNo,jdbcType=VARCHAR} or u.cert_no = #{queryNo,jdbcType=VARCHAR}
  123 + or u.user_name = #{queryNo,jdbcType=VARCHAR})
  124 + </if>
121 125  
122   - <if test="queryNo != null and queryNo != ''">
123   - and (u.phone = #{queryNo,jdbcType=VARCHAR} or u.cert_no = #{queryNo,jdbcType=VARCHAR}
124   - or u.user_name = #{queryNo,jdbcType=VARCHAR})
125   - </if>
  126 + <if test="hospitalId != null and hospitalId != ''">
  127 + and u.hospital_id = #{hospitalId,jdbcType=VARCHAR}
  128 + </if>
  129 + <if test="hospitalIds != null and hospitalIds.size() > 0">
  130 + and u.hospital_id in
  131 + <foreach collection="hospitalIds" index="index" item="item" open="(" separator="," close=")">
  132 + #{item}
  133 + </foreach>
  134 + </if>
  135 + <if test="address != null and address != ''">
  136 + and u.address = #{address,jdbcType=VARCHAR}
  137 + </if>
  138 + <if test="face != null and face != ''">
  139 + and u.face = #{face,jdbcType=VARCHAR}
  140 + </if>
  141 + <if test="finger != null and finger != ''">
  142 + and u.finger = #{finger,jdbcType=VARCHAR}
  143 + </if>
126 144  
127   - <if test="hospitalId != null and hospitalId != ''">
128   - and u.hospital_id = #{hospitalId,jdbcType=VARCHAR}
129   - </if>
130   - <if test="hospitalIds != null and hospitalIds.size() > 0">
131   - and u.hospital_id in
132   - <foreach collection="hospitalIds" index="index" item="item" open="(" separator="," close=")">
133   - #{item}
134   - </foreach>
135   - </if>
136   - <if test="address != null and address != ''">
137   - and u.address = #{address,jdbcType=VARCHAR}
138   - </if>
139   - <if test="face != null and face != ''">
140   - and u.face = #{face,jdbcType=VARCHAR}
141   - </if>
142   - <if test="finger != null and finger != ''">
143   - and u.finger = #{finger,jdbcType=VARCHAR}
144   - </if>
  145 + <if test="userName != null">
  146 + and u.user_name = #{userName,jdbcType=VARCHAR}
  147 + </if>
  148 + <if test="certType != null and certType != ''">
  149 + and u.cert_type = #{certType,jdbcType=VARCHAR}
  150 + </if>
  151 + <if test="certNo != null and certNo != ''">
  152 + and u.cert_no = #{certNo,jdbcType=VARCHAR}
  153 + </if>
  154 + <if test="age != null and age != ''">
  155 + and u.age = #{age,jdbcType=VARCHAR}
  156 + </if>
  157 + <if test="phone != null and phone != ''">
  158 + and u.phone = #{phone,jdbcType=VARCHAR}
  159 + </if>
  160 + <if test="sex != null">
  161 + and u.sex = #{sex,jdbcType=INTEGER}
  162 + </if>
  163 + <if test="vcCardNo != null and vcCardNo != ''">
  164 + and u.vc_card_no = #{vcCardNo,jdbcType=VARCHAR}
  165 + </if>
  166 + <if test="zyNo != null and zyNo != ''">
  167 + and u.zy_no = #{zyNo,jdbcType=VARCHAR}
  168 + </if>
  169 + <if test="visitId != null and visitId != ''">
  170 + and u.visit_id = #{visitId,jdbcType=VARCHAR}
  171 + </if>
  172 + <if test="patientId != null and patientId != ''">
  173 + and u.patient_id = #{valueOne,jdbcType=VARCHAR}
  174 + </if>
  175 + </where>
  176 + </sql>
145 177  
146   - <if test="userName != null">
147   - and u.user_name = #{userName,jdbcType=VARCHAR}
148   - </if>
149   - <if test="certType != null and certType != ''">
150   - and u.cert_type = #{certType,jdbcType=VARCHAR}
151   - </if>
152   - <if test="certNo != null and certNo != ''">
153   - and u.cert_no = #{certNo,jdbcType=VARCHAR}
154   - </if>
155   - <if test="age != null and age != ''">
156   - and u.age = #{age,jdbcType=VARCHAR}
157   - </if>
158   - <if test="phone != null and phone != ''">
159   - and u.phone = #{phone,jdbcType=VARCHAR}
160   - </if>
161   - <if test="sex != null">
162   - and u.sex = #{sex,jdbcType=INTEGER}
163   - </if>
164   - <if test="vcCardNo != null and vcCardNo != ''">
165   - and u.vc_card_no = #{vcCardNo,jdbcType=VARCHAR}
166   - </if>
167   - <if test="zyNo != null and zyNo != ''">
168   - and u.zy_no = #{zyNo,jdbcType=VARCHAR}
169   - </if>
170   - <if test="visitId != null and visitId != ''">
171   - and u.visit_id = #{visitId,jdbcType=VARCHAR}
172   - </if>
173   - <if test="patientId != null and patientId != ''">
174   - and u.patient_id = #{valueOne,jdbcType=VARCHAR}
175   - </if>
176   - </where>
177   - </sql>
  178 + <select id="queryMeasureList" parameterType="com.lyms.platform.query.MeasureDataInfoQuery"
  179 + resultMap="measureDataInfoModelMapList">
  180 + SELECT
  181 + m.id,
  182 + m.measure_user_id,
  183 + m.value_one,m.value_two,m.value_three,m.value_type,
  184 + m.record_count,m.created,m.modified,
  185 + m.today_count,m.remark_value,
  186 + m.record_content,
  187 + u.user_name,u.cert_type,
  188 + u.cert_no,u.age,u.phone,u.sex,u.vc_card_no,
  189 + u.hospital_id,u.patient_id,u.address,u.face,u.finger
  190 + FROM measure_data_info m
  191 + LEFT JOIN
  192 + measure_user_info u ON m.measure_user_id = u.id
  193 + <include refid="queryMeasureListCondition"/>
  194 + order by m.created desc
  195 + <if test="need != null">
  196 + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER}
  197 + </if>
  198 + </select>
178 199  
179   - <select id="queryMeasureList" parameterType="com.lyms.platform.query.MeasureDataInfoQuery"
180   - resultMap="measureDataInfoModelMapList">
181   - SELECT
182   - m.id,
183   - m.measure_user_id,
184   - m.value_one,m.value_two,m.value_three,m.value_type,
185   - m.record_count,m.created,m.modified,
186   - m.today_count,m.remark_value,
187   - m.record_content,
188   - u.user_name,u.cert_type,
189   - u.cert_no,u.age,u.phone,u.sex,u.vc_card_no,
190   - u.hospital_id,u.patient_id,u.address,u.face,u.finger
191   - FROM measure_data_info m
192   - LEFT JOIN
193   - measure_user_info u ON m.measure_user_id = u.id
194   - <include refid="queryMeasureListCondition"/>
195   - order by m.created desc
196   - <if test="need != null">
197   - limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER}
198   - </if>
199   - </select>
200 200  
  201 + <select id="queryMeasureListCount" parameterType="com.lyms.platform.query.MeasureDataInfoQuery"
  202 + resultType="int">
  203 + SELECT
  204 + count(m.id)
  205 + FROM measure_data_info m
  206 + LEFT JOIN
  207 + measure_user_info u ON m.measure_user_id = u.id
  208 + <include refid="queryMeasureListCondition"/>
  209 + order by m.created desc
  210 + <if test="need != null">
  211 + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER}
  212 + </if>
  213 + </select>
201 214  
202   - <select id="queryMeasureListCount" parameterType="com.lyms.platform.query.MeasureDataInfoQuery"
203   - resultType="int">
204   - SELECT
205   - count(m.id)
206   - FROM measure_data_info m
207   - LEFT JOIN
208   - measure_user_info u ON m.measure_user_id = u.id
209   - <include refid="queryMeasureListCondition"/>
210   - order by m.created desc
211   - <if test="need != null">
212   - limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER}
213   - </if>
214   - </select>
215 215  
  216 + <select id="queryMeasureDataInfoListCount" parameterType="com.lyms.platform.query.MeasureDataInfoQuery"
  217 + resultType="int">
  218 + SELECT count(id) FROM measure_data_info
  219 + <include refid="queryMeasureDataInfoCondition"/>
  220 + </select>
216 221  
217 222  
218   - <select id="queryMeasureDataInfoListCount" parameterType="com.lyms.platform.query.MeasureDataInfoQuery" resultType="int">
219   - SELECT count(id) FROM measure_data_info
220   - <include refid="queryMeasureDataInfoCondition"/>
221   - </select>
  223 + <update id="updateMeasureDataInfo" parameterType="com.lyms.platform.pojo.MeasureDataInfoModel">
  224 + UPDATE
  225 + measure_data_info
  226 + <set>
  227 + <if test="id != null and id >= 0">
  228 + id = #{id,jdbcType=INTEGER},
  229 + </if>
  230 + <if test="measureUserId != null">
  231 + measure_user_id = #{measureUserId},
  232 + </if>
222 233  
  234 + <if test="valueOne != null and valueOne != ''">
  235 + value_one = #{valueOne,jdbcType=VARCHAR},
  236 + </if>
  237 + <if test="valueTwo != null and valueTwo != ''">
  238 + value_two = #{valueTwo,jdbcType=VARCHAR},
  239 + </if>
  240 + <if test="valueThree != null and valueThree != ''">
  241 + value_three = #{valueThree,jdbcType=VARCHAR},
  242 + </if>
  243 + <if test="valueType != null and valueType > 0">
  244 + value_type = #{valueType,jdbcType=INTEGER},
  245 + </if>
  246 + <if test="recordCount != null and recordCount >= 0">
  247 + record_count = #{recordCount,jdbcType=INTEGER},
  248 + </if>
  249 + <if test="recordContent != null">
  250 + record_content = #{recordContent,jdbcType=VARCHAR},
  251 + </if>
  252 + <if test="created != null">
  253 + created = #{created},
  254 + </if>
  255 + <if test="modified != null">
  256 + modified = #{modified},
  257 + </if>
  258 + <if test="todayCount != null and todayCount > 0">
  259 + today_count = #{todayCount,jdbcType=INTEGER},
  260 + </if>
  261 + <if test="remarkValue != null and remarkValue != ''">
  262 + remark_value = #{remarkValue,jdbcType=VARCHAR},
  263 + </if>
  264 + </set>
  265 + where id = #{id,jdbcType=INTEGER}
  266 + </update>
223 267  
224   - <update id="updateMeasureDataInfo" parameterType="com.lyms.platform.pojo.MeasureDataInfoModel" >
225   - UPDATE
226   - measure_data_info
227   - <set>
228   - <if test="id != null and id >= 0">
229   - id = #{id,jdbcType=INTEGER},
230   - </if>
231   - <if test="measureUserId != null">
232   - measure_user_id = #{measureUserId},
233   - </if>
234 268  
235   - <if test="valueOne != null and valueOne != ''">
236   - value_one = #{valueOne,jdbcType=VARCHAR},
237   - </if>
238   - <if test="valueTwo != null and valueTwo != ''">
239   - value_two = #{valueTwo,jdbcType=VARCHAR},
240   - </if>
241   - <if test="valueThree != null and valueThree != ''">
242   - value_three = #{valueThree,jdbcType=VARCHAR},
243   - </if>
244   - <if test="valueType != null and valueType > 0">
245   - value_type = #{valueType,jdbcType=INTEGER},
246   - </if>
247   - <if test="recordCount != null and recordCount >= 0">
248   - record_count = #{recordCount,jdbcType=INTEGER},
249   - </if>
250   - <if test="recordContent != null">
251   - record_content = #{recordContent,jdbcType=VARCHAR},
252   - </if>
253   - <if test="created != null">
254   - created = #{created},
255   - </if>
256   - <if test="modified != null">
257   - modified = #{modified},
258   - </if>
259   - <if test="todayCount != null and todayCount > 0">
260   - today_count = #{todayCount,jdbcType=INTEGER},
261   - </if>
262   - <if test="remarkValue != null and remarkValue != ''">
263   - remark_value = #{remarkValue,jdbcType=VARCHAR},
264   - </if>
265   - </set>
266   - where id = #{id,jdbcType=INTEGER}
267   - </update>
  269 + <sql id="orderAndLimit">
  270 + <if test="sort != null and sort != '' ">
  271 + order by ${sort}
  272 + <if test="need != null">
  273 + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER}
  274 + </if>
  275 + </if>
  276 + </sql>
268 277  
269 278  
270   - <sql id="orderAndLimit">
271   - <if test="sort != null and sort != '' ">
272   - order by ${sort}
273   - <if test="need != null">
274   - limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER}
275   - </if>
276   - </if>
277   - </sql>
  279 + <sql id="queryMeasureDataInfoCondition">
  280 + <where>
  281 + 1 = 1
  282 + <if test="id != null and id >= 0">
  283 + and id = #{id,jdbcType=INTEGER}
  284 + </if>
  285 + <if test="valueOne != null and valueOne != ''">
  286 + and value_one = #{valueOne,jdbcType=VARCHAR}
  287 + </if>
  288 + <if test="valueTwo != null and valueTwo != ''">
  289 + and value_two = #{valueTwo,jdbcType=VARCHAR}
  290 + </if>
  291 + <if test="valueThree != null and valueThree != ''">
  292 + and value_three = #{valueThree,jdbcType=VARCHAR}
  293 + </if>
  294 + <if test="valueType != null and valueType > 0">
  295 + and value_type = #{valueType,jdbcType=INTEGER}
  296 + </if>
  297 + <if test="created != null">
  298 + AND date_format(created,'%Y-%m-%d') = #{created}
  299 + </if>
  300 + <if test="recordCount != null and recordCount >= 0">
  301 + and record_count = #{recordCount,jdbcType=INTEGER}
  302 + </if>
278 303  
  304 + <if test="measureUserId != null and measureUserId >= 0">
  305 + and measure_user_id = #{measureUserId,jdbcType=INTEGER}
  306 + </if>
279 307  
280   - <sql id="queryMeasureDataInfoCondition">
281   - <where>
282   - 1 = 1
283   - <if test="id != null and id >= 0">
284   - and id = #{id,jdbcType=INTEGER}
285   - </if>
286   - <if test="valueOne != null and valueOne != ''">
287   - and value_one = #{valueOne,jdbcType=VARCHAR}
288   - </if>
289   - <if test="valueTwo != null and valueTwo != ''">
290   - and value_two = #{valueTwo,jdbcType=VARCHAR}
291   - </if>
292   - <if test="valueThree != null and valueThree != ''">
293   - and value_three = #{valueThree,jdbcType=VARCHAR}
294   - </if>
295   - <if test="valueType != null and valueType > 0">
296   - and value_type = #{valueType,jdbcType=INTEGER}
297   - </if>
298   - <if test="created != null">
299   - AND date_format(created,'%Y-%m-%d') = #{created}
300   - </if>
301   - <if test="recordCount != null and recordCount >= 0">
302   - and record_count = #{recordCount,jdbcType=INTEGER}
303   - </if>
  308 + <if test="recordContent != null">
  309 + and record_content = #{recordContent,jdbcType=VARCHAR}
  310 + </if>
  311 + <if test="createdTimeStart != null">
  312 + AND created >= date_format(#{createdTimeStart},'%Y-%m-%d')
  313 + </if>
  314 + <if test="createdTimeEnd != null">
  315 + AND <![CDATA[ created < date_format(#{createdTimeEnd},'%Y-%m-%d') ]]>
  316 + </if>
304 317  
305   - <if test="measureUserId != null and measureUserId >= 0">
306   - and measure_user_id = #{measureUserId,jdbcType=INTEGER}
307   - </if>
  318 + <if test="modifiedTimeStart != null">
  319 + AND modified >= date_format(#{modifiedTimeStart},'%Y-%m-%d')
  320 + </if>
  321 + <if test="modifiedTimeEnd != null">
  322 + AND <![CDATA[ modified < date_format(#{modifiedTimeEnd},'%Y-%m-%d') ]]>
  323 + </if>
308 324  
309   - <if test="recordContent != null">
310   - and record_content = #{recordContent,jdbcType=VARCHAR}
311   - </if>
312   - <if test="createdTimeStart != null">
313   - AND created >= date_format(#{createdTimeStart},'%Y-%m-%d')
314   - </if>
315   - <if test="createdTimeEnd != null">
316   - AND <![CDATA[ created < date_format(#{createdTimeEnd},'%Y-%m-%d') ]]>
317   - </if>
  325 + <if test="todayCount != null and todayCount > 0">
  326 + AND today_count = #{todayCount,jdbcType=INTEGER}
  327 + </if>
  328 + </where>
  329 + </sql>
318 330  
319   - <if test="modifiedTimeStart != null">
320   - AND modified >= date_format(#{modifiedTimeStart},'%Y-%m-%d')
321   - </if>
322   - <if test="modifiedTimeEnd != null">
323   - AND <![CDATA[ modified < date_format(#{modifiedTimeEnd},'%Y-%m-%d') ]]>
324   - </if>
325   -
326   - <if test="todayCount != null and todayCount > 0">
327   - AND today_count = #{todayCount,jdbcType=INTEGER}
328   - </if>
329   - </where>
330   - </sql>
331   -
332   - <insert id="addMeasureBabyDataInfo" parameterType="com.lyms.platform.pojo.MeasureBabyInfoModel">
  331 + <insert id="addMeasureBabyDataInfo" parameterType="com.lyms.platform.pojo.MeasureBabyInfoModel">
333 332 INSERT INTO measure_baby_info(
334 333 value_one,value_two,value_three,value_type
335 334 ,record_count,created,modified,today_count,remark_value,hospital_id,baby_id)
336 335  
337 336  
338 337  
339 338  
340 339  
341 340  
342 341  
343 342  
344 343  
345 344  
346 345  
347 346  
348 347  
... ... @@ -338,136 +337,148 @@
338 337 </insert>
339 338  
340 339  
341   - <resultMap type="com.lyms.platform.pojo.MeasureBabyInfoModel" id="measureBabyDataInfoMap">
342   - <result column="id" property="id"/>
343   - <result column="hospital_id" property="hospitalId"/>
344   - <result column="baby_id" property="babyId"/>
345   - <result column="value_one" property="valueOne"/>
346   - <result column="value_two" property="valueTwo"/>
347   - <result column="value_three" property="valueThree"/>
348   - <result column="value_type" property="valueType"/>
349   - <result column="record_count" property="recordCount"/>
350   - <result column="created" property="created"/>
351   - <result column="modified" property="modified"/>
352   - <result column="today_count" property="todayCount"/>
353   - <result column="remark_value" property="remarkValue"/>
354   - </resultMap>
  340 + <resultMap type="com.lyms.platform.pojo.MeasureBabyInfoModel" id="measureBabyDataInfoMap">
  341 + <result column="id" property="id"/>
  342 + <result column="hospital_id" property="hospitalId"/>
  343 + <result column="baby_id" property="babyId"/>
  344 + <result column="value_one" property="valueOne"/>
  345 + <result column="value_two" property="valueTwo"/>
  346 + <result column="value_three" property="valueThree"/>
  347 + <result column="value_type" property="valueType"/>
  348 + <result column="record_count" property="recordCount"/>
  349 + <result column="created" property="created"/>
  350 + <result column="modified" property="modified"/>
  351 + <result column="today_count" property="todayCount"/>
  352 + <result column="remark_value" property="remarkValue"/>
  353 + </resultMap>
355 354  
356 355  
357   - <sql id="queryMeasureBabyDataInfoCondition">
358   - <where>
359   - 1 = 1
360   - <if test="id != null and id >= 0">
361   - and id = #{id,jdbcType=INTEGER}
362   - </if>
363   - <if test="valueOne != null and valueOne != ''">
364   - and value_one = #{valueOne,jdbcType=VARCHAR}
365   - </if>
366   - <if test="valueTwo != null and valueTwo != ''">
367   - and value_two = #{valueTwo,jdbcType=VARCHAR}
368   - </if>
369   - <if test="valueThree != null and valueThree != ''">
370   - and value_three = #{valueThree,jdbcType=VARCHAR}
371   - </if>
372   - <if test="valueType != null and valueType > 0">
373   - and value_type = #{valueType,jdbcType=INTEGER}
374   - </if>
375   - <if test="created != null">
376   - AND date_format(created,'%Y-%m-%d') = #{created}
377   - </if>
378   - <if test="recordCount != null and recordCount >= 0">
379   - and record_count = #{recordCount,jdbcType=INTEGER}
380   - </if>
  356 + <sql id="queryMeasureBabyDataInfoCondition">
  357 + <where>
  358 + 1 = 1
  359 + <if test="id != null and id >= 0">
  360 + and id = #{id,jdbcType=INTEGER}
  361 + </if>
  362 + <if test="valueOne != null and valueOne != ''">
  363 + and value_one = #{valueOne,jdbcType=VARCHAR}
  364 + </if>
  365 + <if test="valueTwo != null and valueTwo != ''">
  366 + and value_two = #{valueTwo,jdbcType=VARCHAR}
  367 + </if>
  368 + <if test="valueThree != null and valueThree != ''">
  369 + and value_three = #{valueThree,jdbcType=VARCHAR}
  370 + </if>
  371 + <if test="valueType != null and valueType > 0">
  372 + and value_type = #{valueType,jdbcType=INTEGER}
  373 + </if>
  374 + <if test="created != null">
  375 + AND date_format(created,'%Y-%m-%d') = #{created}
  376 + </if>
  377 + <if test="recordCount != null and recordCount >= 0">
  378 + and record_count = #{recordCount,jdbcType=INTEGER}
  379 + </if>
381 380  
382   - <if test="babyId != null and babyId != ''">
383   - and baby_id = #{babyId,jdbcType=VARCHAR}
384   - </if>
  381 + <if test="babyId != null and babyId != ''">
  382 + and baby_id = #{babyId,jdbcType=VARCHAR}
  383 + </if>
385 384  
386   - <if test="createdTimeStart != null">
387   - AND created >= date_format(#{createdTimeStart},'%Y-%m-%d')
388   - </if>
389   - <if test="createdTimeEnd != null">
390   - AND <![CDATA[ created < date_format(#{createdTimeEnd},'%Y-%m-%d') ]]>
391   - </if>
  385 + <if test="createdTimeStart != null">
  386 + AND created >= date_format(#{createdTimeStart},'%Y-%m-%d')
  387 + </if>
  388 + <if test="createdTimeEnd != null">
  389 + AND <![CDATA[ created < date_format(#{createdTimeEnd},'%Y-%m-%d') ]]>
  390 + </if>
392 391  
393   - <if test="modifiedTimeStart != null">
394   - AND modified >= date_format(#{modifiedTimeStart},'%Y-%m-%d')
395   - </if>
396   - <if test="modifiedTimeEnd != null">
397   - AND <![CDATA[ modified < date_format(#{modifiedTimeEnd},'%Y-%m-%d') ]]>
398   - </if>
  392 + <if test="modifiedTimeStart != null">
  393 + AND modified >= date_format(#{modifiedTimeStart},'%Y-%m-%d')
  394 + </if>
  395 + <if test="modifiedTimeEnd != null">
  396 + AND <![CDATA[ modified < date_format(#{modifiedTimeEnd},'%Y-%m-%d') ]]>
  397 + </if>
399 398  
400   - <if test="todayCount != null and todayCount > 0">
401   - AND today_count = #{todayCount,jdbcType=INTEGER}
402   - </if>
  399 + <if test="todayCount != null and todayCount > 0">
  400 + AND today_count = #{todayCount,jdbcType=INTEGER}
  401 + </if>
403 402  
404   - <if test="babyIds != null and babyIds.size > 0">
405   - and baby_id in
406   - <foreach collection="babyIds" open="(" close=")" separator="," item="bid">
407   - #{bid}
408   - </foreach>
409   - </if>
  403 + <if test="babyIds != null and babyIds.size > 0">
  404 + and baby_id in
  405 + <foreach collection="babyIds" open="(" close=")" separator="," item="bid">
  406 + #{bid}
  407 + </foreach>
  408 + </if>
410 409  
411   - </where>
412   - </sql>
  410 + </where>
  411 + </sql>
413 412  
414 413  
415   - <select id="queryMeasureBabyInfoList" resultMap="measureBabyDataInfoMap">
416   - SELECT id,value_one,value_two,value_three,value_type
417   - ,record_count,created,modified,today_count,remark_value,hospital_id,baby_id FROM measure_baby_info
418   - <include refid="queryMeasureBabyDataInfoCondition"/>
419   - <include refid="orderAndLimit"/>
420   - </select>
  414 + <select id="queryMeasureBabyInfoList" resultMap="measureBabyDataInfoMap">
  415 + SELECT id,value_one,value_two,value_three,value_type
  416 + ,record_count,created,modified,today_count,remark_value,hospital_id,baby_id FROM measure_baby_info
  417 + <include refid="queryMeasureBabyDataInfoCondition"/>
  418 + <include refid="orderAndLimit"/>
  419 + </select>
421 420  
422   - <select id="queryMeasureBabyInfoCount" resultType="int">
423   - SELECT count(1) FROM measure_baby_info
424   - <include refid="queryMeasureBabyDataInfoCondition"/>
425   - <include refid="orderAndLimit"/>
426   - </select>
  421 + <select id="queryMeasureBabyInfoCount" resultType="int">
  422 + SELECT count(1) FROM measure_baby_info
  423 + <include refid="queryMeasureBabyDataInfoCondition"/>
  424 + <include refid="orderAndLimit"/>
  425 + </select>
427 426  
428 427  
  428 + <update id="updateMeasureBabyDataInfo" parameterType="com.lyms.platform.pojo.MeasureBabyInfoModel">
  429 + UPDATE
  430 + measure_baby_info
  431 + <set>
  432 + <if test="id != null and id >= 0">
  433 + id = #{id,jdbcType=INTEGER},
  434 + </if>
  435 + <if test="babyId != null">
  436 + baby_id = #{babyId},
  437 + </if>
429 438  
430   - <update id="updateMeasureBabyDataInfo" parameterType="com.lyms.platform.pojo.MeasureBabyInfoModel" >
431   - UPDATE
432   - measure_baby_info
433   - <set>
434   - <if test="id != null and id >= 0">
435   - id = #{id,jdbcType=INTEGER},
436   - </if>
437   - <if test="babyId != null">
438   - baby_id = #{babyId},
439   - </if>
  439 + <if test="valueOne != null and valueOne != ''">
  440 + value_one = #{valueOne,jdbcType=VARCHAR},
  441 + </if>
  442 + <if test="valueTwo != null and valueTwo != ''">
  443 + value_two = #{valueTwo,jdbcType=VARCHAR},
  444 + </if>
  445 + <if test="valueThree != null and valueThree != ''">
  446 + value_three = #{valueThree,jdbcType=VARCHAR},
  447 + </if>
  448 + <if test="valueType != null and valueType > 0">
  449 + value_type = #{valueType,jdbcType=INTEGER},
  450 + </if>
  451 + <if test="recordCount != null and recordCount >= 0">
  452 + record_count = #{recordCount,jdbcType=INTEGER},
  453 + </if>
440 454  
441   - <if test="valueOne != null and valueOne != ''">
442   - value_one = #{valueOne,jdbcType=VARCHAR},
443   - </if>
444   - <if test="valueTwo != null and valueTwo != ''">
445   - value_two = #{valueTwo,jdbcType=VARCHAR},
446   - </if>
447   - <if test="valueThree != null and valueThree != ''">
448   - value_three = #{valueThree,jdbcType=VARCHAR},
449   - </if>
450   - <if test="valueType != null and valueType > 0">
451   - value_type = #{valueType,jdbcType=INTEGER},
452   - </if>
453   - <if test="recordCount != null and recordCount >= 0">
454   - record_count = #{recordCount,jdbcType=INTEGER},
455   - </if>
  455 + <if test="created != null">
  456 + created = #{created},
  457 + </if>
  458 + <if test="modified != null">
  459 + modified = #{modified},
  460 + </if>
  461 + <if test="todayCount != null and todayCount > 0">
  462 + today_count = #{todayCount,jdbcType=INTEGER},
  463 + </if>
  464 + <if test="remarkValue != null and remarkValue != ''">
  465 + remark_value = #{remarkValue,jdbcType=VARCHAR},
  466 + </if>
  467 + </set>
  468 + where id = #{id,jdbcType=INTEGER}
  469 + </update>
456 470  
457   - <if test="created != null">
458   - created = #{created},
459   - </if>
460   - <if test="modified != null">
461   - modified = #{modified},
462   - </if>
463   - <if test="todayCount != null and todayCount > 0">
464   - today_count = #{todayCount,jdbcType=INTEGER},
465   - </if>
466   - <if test="remarkValue != null and remarkValue != ''">
467   - remark_value = #{remarkValue,jdbcType=VARCHAR},
468   - </if>
469   - </set>
470   - where id = #{id,jdbcType=INTEGER}
471   - </update>
  471 + <select id="queryOneMeasureBaby" resultMap="measureBabyDataInfoMap">
  472 + select baby_id,hospital_id,value_one,value_two,value_three from measure_baby_info
  473 + where
  474 + <if test="babyId !=null">
  475 + baby_id= #{babyId,jdbcType=VARCHAR}
  476 + </if>
  477 + <if test="hospitalId!=null">
  478 + AND hospital_id=#{hospitalId,jdbcType=VARCHAR}
  479 + </if>
  480 +
  481 + </select>
  482 +
472 483 </mapper>
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MeasureInfoController.java View file @ af8cfd3
... ... @@ -19,7 +19,7 @@
19 19  
20 20 /**
21 21 * 测量血糖和脉搏、身高和体重的值
22   - *
  22 + * <p>
23 23 * Created by Administrator on 2018-01-10.
24 24 */
25 25 @Controller
26 26  
27 27  
28 28  
... ... @@ -34,26 +34,28 @@
34 34 /**
35 35 * 血糖和脉搏 身高和体重的值列表
36 36 * valueType 值类型: 1 体重和身高 2 血压和脉搏 3 体温 4血糖
  37 + *
37 38 * @return
38 39 */
39 40 @RequestMapping(method = RequestMethod.GET, value = "/queryMeasureInfoList")
40 41 @ResponseBody
41 42 @TokenRequired
42 43 public BaseListResponse queryMeasureInfoList(@RequestParam(value = "queryNo", required = false) String queryNo,
43   - @RequestParam("page") Integer page,
44   - @RequestParam("limit") Integer limit,
45   - @RequestParam("valueType") Integer valueType,
46   - @RequestParam(value = "vcCardNo", required = false) String vcCardNo,
47   - @RequestParam(value = "recordTime", required = false) String recordTime,
48   - @RequestParam(value = "age", required = false) String age,
  44 + @RequestParam("page") Integer page,
  45 + @RequestParam("limit") Integer limit,
  46 + @RequestParam("valueType") Integer valueType,
  47 + @RequestParam(value = "vcCardNo", required = false) String vcCardNo,
  48 + @RequestParam(value = "recordTime", required = false) String recordTime,
  49 + @RequestParam(value = "age", required = false) String age,
49 50 HttpServletRequest request
50   - ) {
  51 + ) {
51 52 return measureInfoFacade.queryMeasureInfoList(queryNo, valueType, vcCardNo, recordTime, age, page, limit, getUserId(request));
52 53 }
53 54  
54 55  
55 56 /**
56 57 * 添加 血糖和脉搏 身高和体重的值列表/体温
  58 + *
57 59 * @param measureInfoRequest
58 60 * @param request
59 61 * @return
60 62  
... ... @@ -65,9 +67,9 @@
65 67 }
66 68  
67 69  
68   -
69 70 /**
70 71 * 添加测量用户的基本信息(面部识别,指纹识别,证件类型)
  72 + *
71 73 * @param measureInfoRequest
72 74 * @param request
73 75 * @return
74 76  
... ... @@ -79,11 +81,9 @@
79 81 }
80 82  
81 83  
82   -
83   -
84   -
85 84 /**
86   - * 查询录入测量用户基本信息
  85 + * 查询录入测量用户基本信息
  86 + *
87 87 * @param certType
88 88 * @param certNo
89 89 * @param hospitalId
90 90  
... ... @@ -93,17 +93,17 @@
93 93 @RequestMapping(method = RequestMethod.GET, value = "/getMeasureBaseInfo")
94 94 @ResponseBody
95 95 public BaseObjectResponse queryClBaseInfo(@RequestParam(value = "certType", required = true) String certType,
96   - @RequestParam(value = "certNo", required = true) String certNo,
97   - @RequestParam(value = "hospitalId", required = true) String hospitalId,
98   - HttpServletRequest request
99   - )
100   - {
  96 + @RequestParam(value = "certNo", required = true) String certNo,
  97 + @RequestParam(value = "hospitalId", required = true) String hospitalId,
  98 + HttpServletRequest request
  99 + ) {
101 100 return measureInfoFacade.getMeasureBaseInfo(certType, certNo, hospitalId);
102 101 }
103 102  
104 103  
105 104 /**
106 105 * 查询院内系统孕妇基本信息 只查询院内系统
  106 + *
107 107 * @param certType
108 108 * @param certNo
109 109 * @param hospitalId
110 110  
... ... @@ -113,17 +113,17 @@
113 113 @RequestMapping(method = RequestMethod.GET, value = "/getSystemPatientBaseInfo")
114 114 @ResponseBody
115 115 public BaseObjectResponse getSystemPatientBaseInfo(@RequestParam(value = "certType", required = true) String certType,
116   - @RequestParam(value = "certNo", required = true) String certNo,
117   - @RequestParam(value = "hospitalId", required = true) String hospitalId,
118   - HttpServletRequest request
119   - )
120   - {
  116 + @RequestParam(value = "certNo", required = true) String certNo,
  117 + @RequestParam(value = "hospitalId", required = true) String hospitalId,
  118 + HttpServletRequest request
  119 + ) {
121 120 return measureInfoFacade.getSystemPatientBaseInfo(certType, certNo, hospitalId);
122 121 }
123 122  
124 123  
125 124 /**
126   - * 查询测量人的信息
  125 + * 查询测量人的信息
  126 + *
127 127 * @param certType
128 128 * @param certNo
129 129 * @param hospitalId
130 130  
... ... @@ -133,18 +133,18 @@
133 133 @RequestMapping(method = RequestMethod.GET, value = "/getMeasurePatientInfo")
134 134 @ResponseBody
135 135 public BaseObjectResponse getMeasurePatientInfo(@RequestParam(value = "certType", required = true) String certType,
136   - @RequestParam(value = "certNo", required = true) String certNo,
137   - @RequestParam(value = "hospitalId", required = true) String hospitalId,
138   - HttpServletRequest request
139   - )
140   - {
  136 + @RequestParam(value = "certNo", required = true) String certNo,
  137 + @RequestParam(value = "hospitalId", required = true) String hospitalId,
  138 + HttpServletRequest request
  139 + ) {
141 140 return measureInfoFacade.getMeasurePatientInfo(certType, certNo, hospitalId);
142 141 }
143 142  
144 143  
145 144 /**
146 145 * 体重与营养管理,获取孕妇基本信息
147   - * @param certType 1身份证 2就诊卡
  146 + *
  147 + * @param certType 1身份证 2就诊卡
148 148 * @param certNo
149 149 * @param hospitalId
150 150 * @param request
151 151  
152 152  
153 153  
... ... @@ -153,32 +153,32 @@
153 153 @RequestMapping(method = RequestMethod.GET, value = "/getNutritionPatientInfo")
154 154 @ResponseBody
155 155 public BaseObjectResponse getNutritionPatientInfo(@RequestParam(value = "certType", required = true) Integer certType,
156   - @RequestParam(value = "certNo", required = true) String certNo,
157   - @RequestParam(value = "hospitalId", required = true) String hospitalId,
158   - HttpServletRequest request
159   - )
160   - {
  156 + @RequestParam(value = "certNo", required = true) String certNo,
  157 + @RequestParam(value = "hospitalId", required = true) String hospitalId,
  158 + HttpServletRequest request
  159 + ) {
161 160 return measureInfoFacade.getNutritionPatientInfo(certType, certNo, hospitalId);
162 161 }
163 162  
164 163  
165 164 /**
166 165 * 体重与营养管理 保存体重测量数据
  166 + *
167 167 * @param request
168 168 * @return
169 169 */
170 170 @RequestMapping(method = RequestMethod.POST, value = "/addNutritionInfo")
171 171 @ResponseBody
172 172 public BaseObjectResponse addNutritionInfo(@RequestBody NutritionInfoRequest nutritionInfoRequest,
173   - HttpServletRequest request
174   - )
175   - {
  173 + HttpServletRequest request
  174 + ) {
176 175 return measureInfoFacade.addNutritionInfo(nutritionInfoRequest);
177 176 }
178 177  
179 178  
180 179 /**
181 180 * 获取面部信息
  181 + *
182 182 * @param patientId
183 183 * @param request
184 184 * @return
185 185  
... ... @@ -186,15 +186,15 @@
186 186 @RequestMapping(method = RequestMethod.GET, value = "/getFaceInfo")
187 187 @ResponseBody
188 188 public BaseObjectResponse getFaceInfo(@RequestParam(value = "patientId", required = true) String patientId,
189   - HttpServletRequest request
190   - )
191   - {
  189 + HttpServletRequest request
  190 + ) {
192 191 return measureInfoFacade.getFaceInfo(patientId);
193 192 }
194 193  
195 194  
196 195 /**
197 196 * 面部识别以及获取信息
  197 + *
198 198 * @param nutritionInfoRequest
199 199 * @param request
200 200 * @return
201 201  
... ... @@ -203,14 +203,14 @@
203 203 @ResponseBody
204 204 public BaseObjectResponse getFacePairMatching(@RequestBody NutritionInfoRequest nutritionInfoRequest,
205 205 HttpServletRequest request
206   - )
207   - {
  206 + ) {
208 207 return measureInfoFacade.getFacePairMatching(nutritionInfoRequest);
209 208 }
210 209  
211 210  
212 211 /**
213 212 * 添加面部信息
  213 + *
214 214 * @param nutritionInfoRequest
215 215 * @param request
216 216 * @return
217 217  
... ... @@ -218,15 +218,15 @@
218 218 @RequestMapping(method = RequestMethod.POST, value = "/addFaceInfo")
219 219 @ResponseBody
220 220 public BaseResponse addFaceInfo(@RequestBody NutritionInfoRequest nutritionInfoRequest,
221   - HttpServletRequest request
222   - )
223   - {
  221 + HttpServletRequest request
  222 + ) {
224 223 return measureInfoFacade.addFaceInfo(nutritionInfoRequest);
225 224 }
226 225  
227 226  
228 227 /**
229 228 * 添加体温
  229 + *
230 230 * @param nutritionInfoRequest
231 231 * @param request
232 232 * @return
... ... @@ -234,9 +234,8 @@
234 234 @RequestMapping(method = RequestMethod.POST, value = "/addNutritionTemp")
235 235 @ResponseBody
236 236 public BaseResponse addNutritionTemp(@RequestBody NutritionInfoRequest nutritionInfoRequest,
237   - HttpServletRequest request
238   - )
239   - {
  237 + HttpServletRequest request
  238 + ) {
240 239 TempAddRequest addRequest = new TempAddRequest();
241 240 addRequest.setParentId(nutritionInfoRequest.getPatientId());
242 241 addRequest.setPid(nutritionInfoRequest.getPid());
... ... @@ -247,6 +246,7 @@
247 246  
248 247 /**
249 248 * 添加血压
  249 + *
250 250 * @param nutritionInfoRequest
251 251 * @param request
252 252 * @return
... ... @@ -255,8 +255,7 @@
255 255 @ResponseBody
256 256 public BaseResponse addBloodPressure(@RequestBody NutritionInfoRequest nutritionInfoRequest,
257 257 HttpServletRequest request
258   - )
259   - {
  258 + ) {
260 259  
261 260 return measureInfoFacade.addBloodPressure(nutritionInfoRequest);
262 261 }
... ... @@ -264,6 +263,7 @@
264 263  
265 264 /**
266 265 * 添加血糖
  266 + *
267 267 * @param bloodSugar
268 268 * @param request
269 269 * @return
... ... @@ -271,9 +271,8 @@
271 271 @RequestMapping(method = RequestMethod.POST, value = "/addBloodSugar")
272 272 @ResponseBody
273 273 public BaseResponse addBloodSugar(@RequestBody BloodSugar bloodSugar,
274   - HttpServletRequest request
275   - )
276   - {
  274 + HttpServletRequest request
  275 + ) {
277 276  
278 277 return measureInfoFacade.addBloodSugar(bloodSugar);
279 278 }
280 279  
... ... @@ -285,8 +284,9 @@
285 284 /**
286 285 * 住院号类型 : certType:1
287 286 * 其他类型根据院内系统类型传
288   - *
  287 + * <p>
289 288 * 查询测量用户,如果用户在随心测没有建档就 建档并返回结果
  289 + *
290 290 * @param measureAllInfoRequest
291 291 * @return
292 292 */
... ... @@ -298,7 +298,8 @@
298 298  
299 299 /**
300 300 * 添加指纹信息
301   - * @param measureInfoRequest hospitalId finger certNo
  301 + *
  302 + * @param measureInfoRequest hospitalId finger certNo
302 303 * @param request
303 304 * @return
304 305 */
... ... @@ -311,6 +312,7 @@
311 312  
312 313 /**
313 314 * 秦皇岛添加所有测量接口
  315 + *
314 316 * @param measureAllInfoRequest
315 317 * @return
316 318 */
... ... @@ -326,6 +328,7 @@
326 328  
327 329 /**
328 330 * 儿童快速测量信息查询
  331 + *
329 332 * @param certType
330 333 * @param certNo
331 334 * @param hospitalId
332 335  
... ... @@ -335,17 +338,17 @@
335 338 @RequestMapping(method = RequestMethod.GET, value = "/getBabyMeasureInfo")
336 339 @ResponseBody
337 340 public BaseObjectResponse getBabyMeasureInfo(@RequestParam(value = "certType", required = true) String certType,
338   - @RequestParam(value = "certNo", required = true) String certNo,
339   - @RequestParam(value = "hospitalId", required = true) String hospitalId,
340   - HttpServletRequest request
341   - )
342   - {
  341 + @RequestParam(value = "certNo", required = true) String certNo,
  342 + @RequestParam(value = "hospitalId", required = true) String hospitalId,
  343 + HttpServletRequest request
  344 + ) {
343 345 return measureInfoFacade.getBabyMeasureInfo(certType, certNo, hospitalId);
344 346 }
345 347  
346 348  
347 349 /**
348 350 * 添加儿童体重测量
  351 + *
349 352 * @param measureBabyInfoRequest
350 353 * @param request
351 354 * @return
... ... @@ -359,6 +362,7 @@
359 362  
360 363 /**
361 364 * 儿童体重
  365 + *
362 366 * @param queryNo
363 367 * @param page
364 368 * @param limit
365 369  
366 370  
367 371  
... ... @@ -372,15 +376,25 @@
372 376 @ResponseBody
373 377 @TokenRequired
374 378 public BaseResponse queryMeasureBabyDataList(@RequestParam(value = "queryNo", required = false) String queryNo,
375   - @RequestParam("page") Integer page,
376   - @RequestParam("limit") Integer limit,
377   - @RequestParam("valueType") Integer valueType,
378   - @RequestParam(value = "vcCardNo", required = false) String vcCardNo,
379   - @RequestParam(value = "recordTime", required = false) String recordTime
  379 + @RequestParam("page") Integer page,
  380 + @RequestParam("limit") Integer limit,
  381 + @RequestParam("valueType") Integer valueType,
  382 + @RequestParam(value = "vcCardNo", required = false) String vcCardNo,
  383 + @RequestParam(value = "recordTime", required = false) String recordTime
380 384 , HttpServletRequest request) {
381   - return measureInfoFacade.queryMeasureBabyDataList(queryNo,page,limit,valueType,vcCardNo,recordTime,getUserId(request));
  385 + return measureInfoFacade.queryMeasureBabyDataList(queryNo, page, limit, valueType, vcCardNo, recordTime, getUserId(request));
382 386 }
383 387  
  388 + /**
  389 + * 获取一个儿童的体重身高
  390 + */
384 391  
  392 + @RequestMapping(method = RequestMethod.GET, value = "/queryOneMeasureBaby")
  393 + @ResponseBody
  394 + @TokenRequired
  395 + public BaseResponse queryOneMeasureBaby(@RequestParam(value = "babyId", required = false) String queryNo,
  396 + @RequestParam(value = "hospitalId", required = false) String hospitalId) {
  397 + return null;
  398 + }
385 399 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ af8cfd3
... ... @@ -21,10 +21,7 @@
21 21 import com.lyms.platform.permission.model.Organization;
22 22 import com.lyms.platform.permission.model.PatientService;
23 23 import com.lyms.platform.permission.model.Users;
24   -import com.lyms.platform.permission.service.CouponService;
25   -import com.lyms.platform.permission.service.OrganizationService;
26   -import com.lyms.platform.permission.service.PatientServiceService;
27   -import com.lyms.platform.permission.service.UsersService;
  24 +import com.lyms.platform.permission.service.*;
28 25 import com.lyms.platform.pojo.*;
29 26 import com.lyms.platform.query.*;
30 27 import org.apache.commons.collections.CollectionUtils;
... ... @@ -107,6 +104,8 @@
107 104  
108 105 @Autowired
109 106 private AreaCountFacade areaCountFacade;
  107 + @Autowired
  108 + private MeasureDataInfoService measureDataInfoService;
110 109  
111 110 public static final String HIS_VERSION = PropertiesUtils.getPropertyValue("his_version");
112 111  
... ... @@ -880,6 +879,23 @@
880 879 base.setPregnantCertificateTypeId(model.getMcertTypeId());
881 880 base.setMonthAge(DateUtil.getBabyMonthAge(model.getBirth(), new Date()));
882 881 base.setMonth(DateUtil.getMonth(model.getBirth(), new Date()));
  882 + /**
  883 + * 查询儿童测量体重数据
  884 + * */
  885 + if (StringUtils.isNotEmpty(model.getId()) && StringUtils.isNotEmpty(model.getHospitalId())) {
  886 + MeasureBabyDataInfoQuery measureBabyDataInfoQuery = new MeasureBabyDataInfoQuery();
  887 + measureBabyDataInfoQuery.setBabyId(model.getId());
  888 + System.out.println(model.getId());
  889 + System.out.println(model.getHospitalId());
  890 + measureBabyDataInfoQuery.setHospitalId(model.getHospitalId());
  891 + MeasureBabyInfoModel measureBabyInfoModel = measureDataInfoService.queryOneMeasureBaby(measureBabyDataInfoQuery);
  892 + if (null != measureBabyInfoModel) {
  893 + base.setBabyHeight(measureBabyInfoModel.getValueTwo());
  894 + base.setBabyWeight(measureBabyInfoModel.getValueOne());
  895 + }
  896 + }
  897 +
  898 +
883 899 //计算儿童的预产期
884 900 if (model.getBirth() != null && model.getDueWeek() != null && model.getDueWeek() < 37) {//早产儿,根据出生孕周计算末次月经,在根据末次月经计算预产期
885 901 String birthStr = DateUtil.getyyyy_MM_dd(model.getBirth());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java View file @ af8cfd3
... ... @@ -1546,5 +1546,7 @@
1546 1546 objectResponse.setErrormsg("成功");
1547 1547 return objectResponse;
1548 1548 }
  1549 +
  1550 +
1549 1551 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBasicResult.java View file @ af8cfd3
... ... @@ -75,10 +75,32 @@
75 75  
76 76 private String correctValue;
77 77  
  78 +
78 79 /**
79 80 * 增值服务name list
80 81 */
81 82 private List<String> serviceList;
  83 +
  84 +
  85 + private String babyHeight;
  86 +
  87 + private String babyWeight;
  88 +
  89 + public String getBabyHeight() {
  90 + return babyHeight;
  91 + }
  92 +
  93 + public void setBabyHeight(String babyHeight) {
  94 + this.babyHeight = babyHeight;
  95 + }
  96 +
  97 + public String getBabyWeight() {
  98 + return babyWeight;
  99 + }
  100 +
  101 + public void setBabyWeight(String babyWeight) {
  102 + this.babyWeight = babyWeight;
  103 + }
82 104  
83 105 public Integer getMonth() {
84 106 return month;