Commit c011308e6ed31c8b3e0859a71bfd4db50f2ad8f1
1 parent
7e12b4cafc
Exists in
master
and in
6 other branches
update
Showing 6 changed files with 101 additions and 6 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/ReportAntex.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/ReportAntexchu.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/ReportMatdeliver.java
- platform-biz-service/src/main/resources/mainOrm/master/MasterMysqlAntexc.xml
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AreaCountController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/ReportAntex.java
View file @
c011308
... | ... | @@ -9,11 +9,20 @@ |
9 | 9 | private Integer id; |
10 | 10 | private String fid; |
11 | 11 | private String parentId; |
12 | + private String sourceId; | |
12 | 13 | private String pid; |
13 | 14 | private Date checkDate; |
14 | 15 | private Date nextCheckTime; |
15 | 16 | private String yn; |
16 | 17 | private Date created; |
18 | + | |
19 | + public String getSourceId() { | |
20 | + return sourceId; | |
21 | + } | |
22 | + | |
23 | + public void setSourceId(String sourceId) { | |
24 | + this.sourceId = sourceId; | |
25 | + } | |
17 | 26 | |
18 | 27 | public Integer getId() { |
19 | 28 | return id; |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/ReportAntexchu.java
View file @
c011308
... | ... | @@ -13,7 +13,17 @@ |
13 | 13 | private String hospitalId; |
14 | 14 | private String pid; |
15 | 15 | private String parentId; |
16 | + private String sourceId; | |
16 | 17 | private Date created; |
18 | + | |
19 | + | |
20 | + public String getSourceId() { | |
21 | + return sourceId; | |
22 | + } | |
23 | + | |
24 | + public void setSourceId(String sourceId) { | |
25 | + this.sourceId = sourceId; | |
26 | + } | |
17 | 27 | |
18 | 28 | public Date getCreated() { |
19 | 29 | return created; |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/ReportMatdeliver.java
View file @
c011308
... | ... | @@ -14,6 +14,15 @@ |
14 | 14 | private Date created; |
15 | 15 | private String fmHospital; |
16 | 16 | private String hospitalId; |
17 | + private String sourceId; | |
18 | + | |
19 | + public String getSourceId() { | |
20 | + return sourceId; | |
21 | + } | |
22 | + | |
23 | + public void setSourceId(String sourceId) { | |
24 | + this.sourceId = sourceId; | |
25 | + } | |
17 | 26 | |
18 | 27 | public Integer getId() { |
19 | 28 | return id; |
platform-biz-service/src/main/resources/mainOrm/master/MasterMysqlAntexc.xml
View file @
c011308
... | ... | @@ -1182,7 +1182,8 @@ |
1182 | 1182 | hospitalId, |
1183 | 1183 | pid, |
1184 | 1184 | parentId, |
1185 | - created | |
1185 | + created, | |
1186 | + sourceId | |
1186 | 1187 | ) VALUES ( |
1187 | 1188 | #{cid}, |
1188 | 1189 | #{checkTime}, |
... | ... | @@ -1190,7 +1191,8 @@ |
1190 | 1191 | #{hospitalId}, |
1191 | 1192 | #{pid}, |
1192 | 1193 | #{parentId}, |
1193 | - #{created} | |
1194 | + #{created}, | |
1195 | + #{sourceId} | |
1194 | 1196 | ) |
1195 | 1197 | |
1196 | 1198 | </insert> |
... | ... | @@ -1209,7 +1211,8 @@ |
1209 | 1211 | checkDate, |
1210 | 1212 | nextCheckTime, |
1211 | 1213 | yn, |
1212 | - created | |
1214 | + created, | |
1215 | + sourceId | |
1213 | 1216 | ) VALUES ( |
1214 | 1217 | #{fid}, |
1215 | 1218 | #{parentId}, |
... | ... | @@ -1217,7 +1220,8 @@ |
1217 | 1220 | #{checkDate}, |
1218 | 1221 | #{nextCheckTime}, |
1219 | 1222 | #{yn}, |
1220 | - #{created} | |
1223 | + #{created}, | |
1224 | + #{sourceId} | |
1221 | 1225 | ) |
1222 | 1226 | |
1223 | 1227 | </insert> |
... | ... | @@ -1236,7 +1240,8 @@ |
1236 | 1240 | dueDate1, |
1237 | 1241 | created, |
1238 | 1242 | fmHospital, |
1239 | - hospitalId | |
1243 | + hospitalId, | |
1244 | + sourceId | |
1240 | 1245 | ) VALUES ( |
1241 | 1246 | #{mid}, |
1242 | 1247 | #{parentId}, |
... | ... | @@ -1244,7 +1249,8 @@ |
1244 | 1249 | #{dueDate1}, |
1245 | 1250 | #{created}, |
1246 | 1251 | #{fmHospital}, |
1247 | - #{hospitalId} | |
1252 | + #{hospitalId}, | |
1253 | + #{sourceId} | |
1248 | 1254 | ) |
1249 | 1255 | |
1250 | 1256 | </insert> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AreaCountController.java
View file @
c011308
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 | import com.lyms.platform.common.result.BaseResponse; |
8 | 8 | import com.lyms.platform.common.utils.DateUtil; |
9 | 9 | import com.lyms.platform.operate.web.facade.AreaCountFacade; |
10 | +import com.lyms.platform.operate.web.facade.PatientSyncMysqlFacade; | |
10 | 11 | import com.lyms.platform.operate.web.request.HealthManagerListRequest; |
11 | 12 | import com.lyms.platform.permission.model.ServiceListQuery; |
12 | 13 | import org.slf4j.Logger; |
... | ... | @@ -32,6 +33,8 @@ |
32 | 33 | |
33 | 34 | @Autowired |
34 | 35 | private AreaCountFacade areaCountFacade; |
36 | + @Autowired | |
37 | + private PatientSyncMysqlFacade patientSyncMysqlFacade; | |
35 | 38 | |
36 | 39 | @ResponseBody |
37 | 40 | @RequestMapping(value = "/area/{id}", method = RequestMethod.GET) |
... | ... | @@ -79,6 +82,7 @@ |
79 | 82 | return areaCountFacade.getCheckPointCount(nodeType, time, hospitalId, provinceId, cityId, areaId, loginState.getId(), checkTime); |
80 | 83 | } |
81 | 84 | |
85 | + | |
82 | 86 | /** |
83 | 87 | * ไบงๆฃ่็นๅปบๆกฃๆ็ป |
84 | 88 | * |
... | ... | @@ -381,6 +385,32 @@ |
381 | 385 | todayEnd.set(Calendar.MINUTE, 59); |
382 | 386 | todayEnd.set(Calendar.SECOND, 59); |
383 | 387 | return todayEnd.getTime(); |
388 | + } | |
389 | + | |
390 | + | |
391 | + /** | |
392 | + * ่ดจๆง่กจ็ป่ฎก | |
393 | + * @param request | |
394 | + * @param time | |
395 | + * @param hospitalId | |
396 | + * @param provinceId | |
397 | + * @param cityId | |
398 | + * @param areaId | |
399 | + * @param nodeType | |
400 | + * @return | |
401 | + */ | |
402 | + @RequestMapping(method = RequestMethod.GET, value = "/getAreaCheckCount") | |
403 | + @ResponseBody | |
404 | + @TokenRequired | |
405 | + public BaseResponse getAreaCheckCount(HttpServletRequest request, | |
406 | + @RequestParam(required = false) String time, | |
407 | + @RequestParam(required = false) String hospitalId, | |
408 | + @RequestParam(required = false) String provinceId, | |
409 | + @RequestParam(required = false) String cityId, | |
410 | + @RequestParam(required = false) String areaId, | |
411 | + @RequestParam(required = false) Integer nodeType) { | |
412 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
413 | + return patientSyncMysqlFacade.getAreaCheckCount(time, hospitalId, provinceId, cityId, areaId, loginState.getId()); | |
384 | 414 | } |
385 | 415 | |
386 | 416 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
View file @
c011308
... | ... | @@ -1337,7 +1337,15 @@ |
1337 | 1337 | |
1338 | 1338 | for(AntExChuModel antExChu : antExChus) |
1339 | 1339 | { |
1340 | + | |
1341 | + Patients pat = patientsService.findOnePatientById(antExChu.getParentId()); | |
1342 | + if (pat == null) | |
1343 | + { | |
1344 | + continue; | |
1345 | + } | |
1346 | + | |
1340 | 1347 | ReportAntexchu reportAntexchu = new ReportAntexchu(); |
1348 | + reportAntexchu.setSourceId(StringUtils.isNotEmpty(pat.getSource()) ? pat.getSource() : antExChu.getParentId()); | |
1341 | 1349 | reportAntexchu.setCid(antExChu.getId()); |
1342 | 1350 | try { |
1343 | 1351 | |
1344 | 1352 | |
... | ... | @@ -1409,7 +1417,14 @@ |
1409 | 1417 | |
1410 | 1418 | for(AntenatalExaminationModel antex : antexs) |
1411 | 1419 | { |
1420 | + Patients pat = patientsService.findOnePatientById(antex.getParentId()); | |
1421 | + if (pat == null) | |
1422 | + { | |
1423 | + continue; | |
1424 | + } | |
1425 | + | |
1412 | 1426 | ReportAntex reportAntex = new ReportAntex(); |
1427 | + reportAntex.setSourceId(StringUtils.isNotEmpty(pat.getSource()) ? pat.getSource() : antex.getParentId()); | |
1413 | 1428 | reportAntex.setFid(antex.getId()); |
1414 | 1429 | try { |
1415 | 1430 | |
1416 | 1431 | |
... | ... | @@ -1480,7 +1495,15 @@ |
1480 | 1495 | |
1481 | 1496 | for(MaternalDeliverModel maternalDeliverModel : maternalDeliverModels) |
1482 | 1497 | { |
1498 | + | |
1499 | + Patients pat = patientsService.findOnePatientById(maternalDeliverModel.getParentId()); | |
1500 | + if (pat == null) | |
1501 | + { | |
1502 | + continue; | |
1503 | + } | |
1504 | + | |
1483 | 1505 | ReportMatdeliver reportMatdeliver = new ReportMatdeliver(); |
1506 | + reportMatdeliver.setSourceId(StringUtils.isNotEmpty(pat.getSource()) ? pat.getSource() : maternalDeliverModel.getParentId()); | |
1484 | 1507 | reportMatdeliver.setMid(maternalDeliverModel.getId()); |
1485 | 1508 | try { |
1486 | 1509 | ConvertUtils.register(new DateLocaleConverter(), Date.class); |
... | ... | @@ -1495,6 +1518,14 @@ |
1495 | 1518 | } |
1496 | 1519 | page++; |
1497 | 1520 | } |
1521 | + } | |
1522 | + | |
1523 | + | |
1524 | + | |
1525 | + public BaseObjectResponse getAreaCheckCount(String time, String hospitalId, String provinceId, String cityId, String areaId, Integer userId) | |
1526 | + { | |
1527 | + | |
1528 | + return null; | |
1498 | 1529 | } |
1499 | 1530 | } |