Commit 6ddc0dc3576fc9d859d568654263df3ea7a090a5
1 parent
15064acc2e
Exists in
master
and in
6 other branches
update
Showing 3 changed files with 131 additions and 183 deletions
platform-biz-service/src/main/resources/mainOrm/master/MasterLis.xml
View file @
6ddc0dc
... | ... | @@ -2,65 +2,65 @@ |
2 | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
3 | 3 | <mapper namespace="com.lyms.platform.permission.dao.master.MasterLisMapper"> |
4 | 4 | |
5 | - <insert id="saveLisData" parameterType="com.lyms.platform.permission.model.LisReportQuery"> | |
5 | + <insert id="saveLisData" parameterType="com.lyms.platform.permission.model.LisReportModel"> | |
6 | 6 | INSERT INTO LIS_REPORT_TBL( |
7 | - LIS_ID, | |
8 | - TITLE, | |
9 | - TYPE, | |
10 | - VCCARDNO, | |
11 | - NAME, | |
12 | - BHNUM, | |
13 | - AGE, | |
14 | - SEX, | |
15 | - APPLY_TIME, | |
16 | - CHECK_TIME, | |
17 | - PUBLISH_TIME, | |
18 | - APPLY_DOCTOR, | |
19 | - APPLY_DEPT, | |
20 | - CHECKER, | |
21 | - MODIFIED, | |
22 | - CREATED, | |
23 | - HOSPITAL_ID, | |
24 | - PHONE, | |
25 | - ITEM_JSON, | |
26 | - STATUS | |
7 | + LIS_ID, | |
8 | + TITLE, | |
9 | + TYPE, | |
10 | + VCCARDNO, | |
11 | + NAME, | |
12 | + BHNUM, | |
13 | + AGE, | |
14 | + SEX, | |
15 | + APPLY_TIME, | |
16 | + CHECK_TIME, | |
17 | + PUBLISH_TIME, | |
18 | + APPLY_DOCTOR, | |
19 | + APPLY_DEPT, | |
20 | + CHECKER, | |
21 | + MODIFIED, | |
22 | + CREATED, | |
23 | + HOSPITAL_ID, | |
24 | + PHONE, | |
25 | + ITEM_JSON, | |
26 | + STATUS | |
27 | 27 | ) VALUES ( |
28 | - #{lisId}, | |
29 | - #{title}, | |
30 | - #{type}, | |
31 | - #{vcCardNo}, | |
32 | - #{name}, | |
33 | - #{ bhnum}, | |
34 | - #{age}, | |
35 | - #{sex}, | |
36 | - #{applyTime}, | |
37 | - #{checkTime}, | |
38 | - #{publishTime}, | |
39 | - #{applyDoctor}, | |
40 | - #{applyDept}, | |
41 | - #{checker}, | |
42 | - #{modified}, | |
43 | - #{created}, | |
44 | - #{hospitalId}, | |
45 | - #{phone}, | |
46 | - #{itemJson}, | |
47 | - #{status} | |
28 | + #{lisId}, | |
29 | + #{title}, | |
30 | + #{type}, | |
31 | + #{vcCardNo}, | |
32 | + #{name}, | |
33 | + #{ bhnum}, | |
34 | + #{age}, | |
35 | + #{sex}, | |
36 | + #{applyTime}, | |
37 | + #{checkTime}, | |
38 | + #{publishTime}, | |
39 | + #{applyDoctor}, | |
40 | + #{applyDept}, | |
41 | + #{checker}, | |
42 | + #{modified}, | |
43 | + #{created}, | |
44 | + #{hospitalId}, | |
45 | + #{phone}, | |
46 | + #{itemJson}, | |
47 | + #{status} | |
48 | 48 | ) |
49 | 49 | |
50 | 50 | </insert> |
51 | 51 | |
52 | 52 | <insert id="saveLisItemsData" parameterType="java.util.List"> |
53 | 53 | insert into LIS_REPORT_ITEM_TBL ( |
54 | - LIS_ID, | |
55 | - CODE, | |
56 | - NAME, | |
57 | - RESULT, | |
58 | - RESULT_FLAG, | |
59 | - REF, | |
60 | - RESULT_TYPE, | |
61 | - UNIT, | |
62 | - PRINT_ORDER, | |
63 | - HOSPITAL_ID | |
54 | + LIS_ID, | |
55 | + CODE, | |
56 | + NAME, | |
57 | + RESULT, | |
58 | + RESULT_FLAG, | |
59 | + REF, | |
60 | + RESULT_TYPE, | |
61 | + UNIT, | |
62 | + PRINT_ORDER, | |
63 | + HOSPITAL_ID | |
64 | 64 | ) |
65 | 65 | values |
66 | 66 | <foreach collection="list" item="item" index="index" separator="," > |
67 | 67 | |
68 | 68 | |
69 | 69 | |
... | ... | @@ -83,106 +83,55 @@ |
83 | 83 | DELETE FROM LIS_REPORT_TBL WHERE LIS_ID = #{lisId} AND HOSPITAL_ID = #{hospitalId} |
84 | 84 | </delete> |
85 | 85 | |
86 | - <select id="queryLisDataByModel" parameterType="com.lyms.platform.permission.model.LisReportModel" | |
86 | + <select id="queryLisDataByModel" parameterType="com.lyms.platform.permission.model.LisReportQuery" | |
87 | 87 | resultType="com.lyms.platform.permission.model.LisReportModel"> |
88 | - SELECT | |
89 | - ID AS id, | |
90 | - LIS_ID AS lisId, | |
91 | - TITLE AS title, | |
92 | - TYPE AS type, | |
93 | - VCCARDNO AS vcCardNo, | |
94 | - NAME AS name, | |
95 | - BHNUM AS bhnum, | |
96 | - AGE AS age, | |
97 | - SEX AS sex, | |
98 | - APPLY_TIME AS applyTime, | |
99 | - CHECK_TIME AS checkTime, | |
100 | - PUBLISH_TIME AS publishTime, | |
101 | - APPLY_DOCTOR AS applyDoctor, | |
102 | - APPLY_DEPT AS applyDept, | |
103 | - CHECKER AS checker, | |
104 | - MODIFIED AS modified, | |
105 | - CREATED AS created, | |
106 | - HOSPITAL_ID AS hospitalId, | |
107 | - PHONE AS phone, | |
108 | - ITEM_JSON AS itemJson | |
109 | - FROM LIS_REPORT_TBL | |
110 | - WHERE 1 = 1 | |
111 | - <if test="lisId != null and lisId != ''"> | |
112 | - AND LIS_ID = #{lisId} | |
113 | - </if> | |
114 | - <if test="vcCardNo != null"> | |
115 | - AND VCCARDNO = #{vcCardNo} | |
116 | - </if> | |
117 | - <if test="vcCardNo == null"> | |
118 | - AND VCCARDNO = '' | |
119 | - </if> | |
120 | - <if test="hospitalId != null and hospitalId != ''"> | |
121 | - AND HOSPITAL_ID = #{hospitalId} | |
122 | - </if> | |
88 | + SELECT | |
89 | + ID AS id, | |
90 | + LIS_ID AS lisId, | |
91 | + TITLE AS title, | |
92 | + TYPE AS type, | |
93 | + VCCARDNO AS vcCardNo, | |
94 | + NAME AS name, | |
95 | + BHNUM AS bhnum, | |
96 | + AGE AS age, | |
97 | + SEX AS sex, | |
98 | + APPLY_TIME AS applyTime, | |
99 | + CHECK_TIME AS checkTime, | |
100 | + PUBLISH_TIME AS publishTime, | |
101 | + APPLY_DOCTOR AS applyDoctor, | |
102 | + APPLY_DEPT AS applyDept, | |
103 | + CHECKER AS checker, | |
104 | + MODIFIED AS modified, | |
105 | + CREATED AS created, | |
106 | + HOSPITAL_ID AS hospitalId, | |
107 | + PHONE AS phone, | |
108 | + ITEM_JSON AS itemJson | |
109 | + FROM LIS_REPORT_TBL | |
110 | + WHERE 1 = 1 | |
111 | + <if test="lisId != null and lisId != ''"> | |
112 | + AND LIS_ID = #{lisId} | |
113 | + </if> | |
114 | + <if test="vcCardNo != null and vcCardNo != ''"> | |
115 | + AND VCCARDNO = #{vcCardNo} | |
116 | + </if> | |
117 | + <if test="phone != null and phone != ''"> | |
118 | + AND PHONE = #{phone} | |
119 | + </if> | |
120 | + <if test="hospitalId != null and hospitalId != ''"> | |
121 | + AND HOSPITAL_ID = #{hospitalId} | |
122 | + </if> | |
123 | 123 | |
124 | - <if test="checkTime != null"> | |
125 | - AND date_format(CHECK_TIME,'%Y-%m-%d') = date_format(#{checkTime},'%Y-%m-%d') | |
126 | - </if> | |
124 | + <if test="checkTime != null"> | |
125 | + AND date_format(CHECK_TIME,'%Y-%m-%d') = date_format(#{checkTime},'%Y-%m-%d') | |
126 | + </if> | |
127 | 127 | |
128 | - <if test="titles.size() !=0 "> | |
129 | - AND TITLE IN | |
130 | - <foreach collection="titles" item="title" | |
131 | - index="index" open="(" close=")" separator=","> | |
132 | - #{title} | |
133 | - </foreach> | |
134 | - </if> | |
135 | - | |
136 | - | |
137 | - UNION | |
138 | - SELECT | |
139 | - ID AS id, | |
140 | - LIS_ID AS lisId, | |
141 | - TITLE AS title, | |
142 | - TYPE AS type, | |
143 | - VCCARDNO AS vcCardNo, | |
144 | - NAME AS name, | |
145 | - BHNUM AS bhnum, | |
146 | - AGE AS age, | |
147 | - SEX AS sex, | |
148 | - APPLY_TIME AS applyTime, | |
149 | - CHECK_TIME AS checkTime, | |
150 | - PUBLISH_TIME AS publishTime, | |
151 | - APPLY_DOCTOR AS applyDoctor, | |
152 | - APPLY_DEPT AS applyDept, | |
153 | - CHECKER AS checker, | |
154 | - MODIFIED AS modified, | |
155 | - CREATED AS created, | |
156 | - HOSPITAL_ID AS hospitalId, | |
157 | - PHONE AS phone, | |
158 | - ITEM_JSON AS itemJson | |
159 | - FROM LIS_REPORT_TBL | |
160 | - WHERE 1 = 1 | |
161 | - <if test="lisId != null and lisId != ''"> | |
162 | - AND LIS_ID = #{lisId} | |
163 | - </if> | |
164 | - <if test="phone != null"> | |
165 | - AND PHONE = #{phone} | |
166 | - </if> | |
167 | - <if test="phone == null"> | |
168 | - AND PHONE = '' | |
169 | - </if> | |
170 | - <if test="hospitalId != null and hospitalId != ''"> | |
171 | - AND HOSPITAL_ID = #{hospitalId} | |
172 | - </if> | |
173 | - | |
174 | - <if test="checkTime != null"> | |
175 | - AND date_format(CHECK_TIME,'%Y-%m-%d') = date_format(#{checkTime},'%Y-%m-%d') | |
176 | - </if> | |
177 | - | |
178 | - <if test="titles.size() !=0 "> | |
179 | - AND TITLE IN | |
180 | - <foreach collection="titles" item="title" | |
181 | - index="index" open="(" close=")" separator=","> | |
182 | - #{title} | |
183 | - </foreach> | |
184 | - </if> | |
185 | - | |
128 | + <if test="titles != null and titles.size() !=0 "> | |
129 | + AND TITLE IN | |
130 | + <foreach collection="titles" item="title" | |
131 | + index="index" open="(" close=")" separator=","> | |
132 | + #{title} | |
133 | + </foreach> | |
134 | + </if> | |
186 | 135 | </select> |
187 | 136 | |
188 | 137 | |
... | ... | @@ -214,9 +163,6 @@ |
214 | 163 | <if test="lisId != null and lisId != ''"> |
215 | 164 | AND LIS_ID = #{lisId} |
216 | 165 | </if> |
217 | - <if test="title != null and title != ''"> | |
218 | - AND TITLE = #{title} | |
219 | - </if> | |
220 | 166 | <if test="hospitalId != null and hospitalId != ''"> |
221 | 167 | AND HOSPITAL_ID = #{hospitalId} |
222 | 168 | </if> |
... | ... | @@ -226,16 +172,16 @@ |
226 | 172 | <select id="queryLisItemByModel" parameterType="com.lyms.platform.permission.model.LisReportItemModel" |
227 | 173 | resultType="com.lyms.platform.permission.model.LisReportItemModel"> |
228 | 174 | SELECT |
229 | - LIS_ID, | |
230 | - CODE, | |
231 | - NAME, | |
232 | - RESULT, | |
233 | - RESULT_FLAG, | |
234 | - REF, | |
235 | - RESULT_TYPE, | |
236 | - UNIT, | |
237 | - PRINT_ORDER, | |
238 | - HOSPITAL_ID | |
175 | + LIS_ID, | |
176 | + CODE, | |
177 | + NAME, | |
178 | + RESULT, | |
179 | + RESULT_FLAG, | |
180 | + REF, | |
181 | + RESULT_TYPE, | |
182 | + UNIT, | |
183 | + PRINT_ORDER, | |
184 | + HOSPITAL_ID | |
239 | 185 | FROM LIS_REPORT_ITEM_TBL |
240 | 186 | WHERE 1 = 1 |
241 | 187 | <if test="lisId != null and lisId != ''"> |
... | ... | @@ -289,27 +235,27 @@ |
289 | 235 | |
290 | 236 | |
291 | 237 | <resultMap id="queryListItemsMap" type="com.lyms.platform.permission.model.LisReportModel" > |
292 | - <id property="id" column="ID"/> | |
293 | - <result property="lisId" column="LIS_ID"/> | |
294 | - <result property="title" column="TITLE"/> | |
295 | - <result property="type" column="TYPE"/> | |
296 | - <result property="vcCardNo" column="VCCARDNO"/> | |
297 | - <result property="name" column="NAME"/> | |
298 | - <result property="bhnum" column="BHNUM"/> | |
299 | - <result property="age" column="AGE"/> | |
300 | - <result property="sex" column="SEX"/> | |
301 | - <result property="applyTime" column="APPLY_TIME"/> | |
302 | - <result property="checkTime" column="CHECK_TIME"/> | |
303 | - <result property="publishTime" column="PUBLISH_TIME"/> | |
304 | - <result property="applyDoctor" column="APPLY_DOCTOR"/> | |
305 | - <result property="applyDept" column="APPLY_DEPT"/> | |
306 | - <result property="checker" column="CHECKER"/> | |
307 | - <result property="modified" column="MODIFIED"/> | |
308 | - <result property="created" column="CREATED"/> | |
309 | - <result property="hospitalId" column="HOSPITAL_ID"/> | |
310 | - <result property="phone" column="PHONE"/> | |
311 | - <result property="itemJson" column="ITEM_JSON"/> | |
312 | - <result property="status" column="STATUS"/> | |
238 | + <id property="id" column="ID"/> | |
239 | + <result property="lisId" column="LIS_ID"/> | |
240 | + <result property="title" column="TITLE"/> | |
241 | + <result property="type" column="TYPE"/> | |
242 | + <result property="vcCardNo" column="VCCARDNO"/> | |
243 | + <result property="name" column="NAME"/> | |
244 | + <result property="bhnum" column="BHNUM"/> | |
245 | + <result property="age" column="AGE"/> | |
246 | + <result property="sex" column="SEX"/> | |
247 | + <result property="applyTime" column="APPLY_TIME"/> | |
248 | + <result property="checkTime" column="CHECK_TIME"/> | |
249 | + <result property="publishTime" column="PUBLISH_TIME"/> | |
250 | + <result property="applyDoctor" column="APPLY_DOCTOR"/> | |
251 | + <result property="applyDept" column="APPLY_DEPT"/> | |
252 | + <result property="checker" column="CHECKER"/> | |
253 | + <result property="modified" column="MODIFIED"/> | |
254 | + <result property="created" column="CREATED"/> | |
255 | + <result property="hospitalId" column="HOSPITAL_ID"/> | |
256 | + <result property="phone" column="PHONE"/> | |
257 | + <result property="itemJson" column="ITEM_JSON"/> | |
258 | + <result property="status" column="STATUS"/> | |
313 | 259 | </resultMap> |
314 | 260 | |
315 | 261 |
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
6ddc0dc
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LisFacade.java
View file @
6ddc0dc
... | ... | @@ -442,7 +442,7 @@ |
442 | 442 | { |
443 | 443 | if (lis != null && reportModel != null) |
444 | 444 | { |
445 | - if (StringUtils.isNotEmpty(lis.getLisId()) && lis.getLisId().equals(reportModel.getLisId())) | |
445 | + if (StringUtils.isNotEmpty(lis.getLisId()) && !lis.getLisId().equals(reportModel.getLisId())) | |
446 | 446 | { |
447 | 447 | isExist = true; |
448 | 448 | break; |