Commit 3918625d7ede7ed2e9b69b8b15b60111c020c9ee
1 parent
1d7ba66e45
Exists in
master
and in
6 other branches
update
Showing 6 changed files with 42 additions and 31 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterMysqlAntexcMapper.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/ReportMatdeliver.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/MysqlAntexcService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/MysqlAntexcServiceImpl.java
- platform-biz-service/src/main/resources/mainOrm/master/MasterMysqlAntexc.xml
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterMysqlAntexcMapper.java
View file @
3918625
| ... | ... | @@ -126,7 +126,7 @@ | 
| 126 | 126 | List<Map<String,String>> getIsYgbmkyCheckCount(Map param); | 
| 127 | 127 | List<Map<String,String>> getHasYgbmkyCheckCount(Map param); | 
| 128 | 128 | |
| 129 | - List<Map<String,String>> getMatdeliverCount(Map param); | |
| 129 | + List<Map<String,String>> getLisMatdeliverCount(Map param); | |
| 130 | 130 | List<Map<String,String>> getMatdeliverHivktCheckCount(Map param); | 
| 131 | 131 | List<Map<String,String>> getMatdeliverHivktCheckzqCount(Map param); | 
| 132 | 132 | List<Map<String,String>> getHasMatdeliverHivktCheckzqCount(Map param); | 
platform-biz-service/src/main/java/com/lyms/platform/permission/model/ReportMatdeliver.java
View file @
3918625
| ... | ... | @@ -15,6 +15,16 @@ | 
| 15 | 15 | private String fmHospital; | 
| 16 | 16 | private String hospitalId; | 
| 17 | 17 | private String sourceId; | 
| 18 | + //末次月经 | |
| 19 | + private Date lastMenses; | |
| 20 | + | |
| 21 | + public Date getLastMenses() { | |
| 22 | + return lastMenses; | |
| 23 | + } | |
| 24 | + | |
| 25 | + public void setLastMenses(Date lastMenses) { | |
| 26 | + this.lastMenses = lastMenses; | |
| 27 | + } | |
| 18 | 28 | |
| 19 | 29 | public String getSourceId() { | 
| 20 | 30 | return sourceId; | 
platform-biz-service/src/main/java/com/lyms/platform/permission/service/MysqlAntexcService.java
View file @
3918625
| ... | ... | @@ -130,7 +130,7 @@ | 
| 130 | 130 | List<Map<String,String>> getIsYgbmkyCheckCount(Map param); | 
| 131 | 131 | List<Map<String,String>> getHasYgbmkyCheckCount(Map param); | 
| 132 | 132 | |
| 133 | - List<Map<String,String>> getMatdeliverCount(Map param); | |
| 133 | + List<Map<String,String>> getLisMatdeliverCount(Map param); | |
| 134 | 134 | List<Map<String,String>> getMatdeliverHivktCheckCount(Map param); | 
| 135 | 135 | List<Map<String,String>> getMatdeliverHivktCheckzqCount(Map param); | 
| 136 | 136 | List<Map<String,String>> getHasMatdeliverHivktCheckzqCount(Map param); | 
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/MysqlAntexcServiceImpl.java
View file @
3918625
| ... | ... | @@ -362,8 +362,8 @@ | 
| 362 | 362 | } | 
| 363 | 363 | |
| 364 | 364 | @Override | 
| 365 | - public List<Map<String,String>> getMatdeliverCount(Map param){ | |
| 366 | - return masterMysqlAntexcMapper.getMatdeliverCount(param); | |
| 365 | + public List<Map<String,String>> getLisMatdeliverCount(Map param){ | |
| 366 | + return masterMysqlAntexcMapper.getLisMatdeliverCount(param); | |
| 367 | 367 | } | 
| 368 | 368 | @Override | 
| 369 | 369 | public List<Map<String,String>> getMatdeliverHivktCheckCount(Map param){ | 
platform-biz-service/src/main/resources/mainOrm/master/MasterMysqlAntexc.xml
View file @
3918625
| ... | ... | @@ -1222,7 +1222,8 @@ | 
| 1222 | 1222 | created, | 
| 1223 | 1223 | fmHospital, | 
| 1224 | 1224 | hospitalId, | 
| 1225 | - sourceId | |
| 1225 | + sourceId, | |
| 1226 | + lastMenses | |
| 1226 | 1227 | ) VALUES ( | 
| 1227 | 1228 | #{mid}, | 
| 1228 | 1229 | #{parentId}, | 
| ... | ... | @@ -1231,7 +1232,8 @@ | 
| 1231 | 1232 | #{created}, | 
| 1232 | 1233 | #{fmHospital}, | 
| 1233 | 1234 | #{hospitalId}, | 
| 1234 | - #{sourceId} | |
| 1235 | + #{sourceId}, | |
| 1236 | + #{lastMenses} | |
| 1235 | 1237 | ) | 
| 1236 | 1238 | |
| 1237 | 1239 | </insert> | 
| ... | ... | @@ -2458,7 +2460,7 @@ | 
| 2458 | 2460 | |
| 2459 | 2461 | |
| 2460 | 2462 | |
| 2461 | - <select id="getMatdeliverCount" resultType="java.util.Map" parameterType="java.util.Map"> | |
| 2463 | + <select id="getLisMatdeliverCount" resultType="java.util.Map" parameterType="java.util.Map"> | |
| 2462 | 2464 | SELECT count(f.id) as matdeliverCount ,o.id as hospitalId from report_matdeliver f INNER JOIN organization o on f.fmHospital = o.id | 
| 2463 | 2465 | <if test="hospitalId != null and hospitalId != ''"> | 
| 2464 | 2466 | and o.id = #{hospitalId,jdbcType=VARCHAR} | 
| 2465 | 2467 | |
| ... | ... | @@ -2515,10 +2517,17 @@ | 
| 2515 | 2517 | |
| 2516 | 2518 | |
| 2517 | 2519 | <select id="getMatdeliverHivktCheckzqCount" resultType="java.util.Map" parameterType="java.util.Map"> | 
| 2520 | + | |
| 2518 | 2521 | SELECT count(f.id) as matdeliverHivktCheckzqCount ,o.id as hospitalId from report_matdeliver f INNER JOIN organization o on f.fmHospital = o.id | 
| 2519 | - INNER JOIN report_antexchu c on c.sourceId= f.sourceId | |
| 2520 | - INNER JOIN report_patients p on p.patientId = c.sourceId | |
| 2521 | - where c.hivkt is not null and c.type =1 and DATEDIFF(p.lastMenses,c.checkTime) <![CDATA[ <= ]]> 83 | |
| 2522 | + INNER JOIN (select a.sourceId,a.checkTime from report_antexchu a where a.type =1 and a.hivkt is not null | |
| 2523 | + <if test="startDate != null"> | |
| 2524 | + and a.checkTime >= #{startDate} | |
| 2525 | + </if> | |
| 2526 | + <if test="endDate != null"> | |
| 2527 | + and a.checkTime <![CDATA[ <= ]]> #{endDate} | |
| 2528 | + </if> | |
| 2529 | + ) c on c.sourceId= f.sourceId | |
| 2530 | + where DATEDIFF(f.lastMenses,c.checkTime) <= 83 | |
| 2522 | 2531 | <if test="hospitalId != null and hospitalId != ''"> | 
| 2523 | 2532 | and f.fmHospital = #{hospitalId,jdbcType=VARCHAR} | 
| 2524 | 2533 | </if> | 
| 2525 | 2534 | |
| 2526 | 2535 | |
| ... | ... | @@ -2531,23 +2540,22 @@ | 
| 2531 | 2540 | <if test="areaId != null and areaId != ''"> | 
| 2532 | 2541 | and o.area_id = #{areaId,jdbcType=VARCHAR} | 
| 2533 | 2542 | </if> | 
| 2543 | + GROUP BY o.id | |
| 2534 | 2544 | |
| 2535 | - <if test="startDate != null"> | |
| 2536 | - and c.checkTime >= #{startDate} | |
| 2537 | - </if> | |
| 2538 | - <if test="endDate != null"> | |
| 2539 | - and c.checkTime <![CDATA[ <= ]]> #{endDate} | |
| 2540 | - </if> | |
| 2541 | - group by o.id | |
| 2542 | - | |
| 2543 | 2545 | </select> | 
| 2544 | 2546 | |
| 2545 | 2547 | |
| 2546 | 2548 | <select id="getHasMatdeliverHivktCheckzqCount" resultType="java.util.Map" parameterType="java.util.Map"> | 
| 2547 | 2549 | SELECT count(f.id) as hasMatdeliverHivktCheckzqCount ,o.id as hospitalId from report_matdeliver f INNER JOIN organization o on f.fmHospital = o.id | 
| 2548 | - INNER JOIN report_antexchu c on c.sourceId= f.sourceId | |
| 2549 | - INNER JOIN report_patients p on p.patientId = c.sourceId | |
| 2550 | - where c.hivkt='yang' and c.type =1 and DATEDIFF(p.lastMenses,c.checkTime) <![CDATA[ <= ]]> 83 | |
| 2550 | + INNER JOIN (select a.sourceId,a.checkTime from report_antexchu a where a.type =1 and a.hivkt ='yang' | |
| 2551 | + <if test="startDate != null"> | |
| 2552 | + and a.checkTime >= #{startDate} | |
| 2553 | + </if> | |
| 2554 | + <if test="endDate != null"> | |
| 2555 | + and a.checkTime <![CDATA[ <= ]]> #{endDate} | |
| 2556 | + </if> | |
| 2557 | + ) c on c.sourceId= f.sourceId | |
| 2558 | + where DATEDIFF(f.lastMenses,c.checkTime) <= 83 | |
| 2551 | 2559 | <if test="hospitalId != null and hospitalId != ''"> | 
| 2552 | 2560 | and f.fmHospital = #{hospitalId,jdbcType=VARCHAR} | 
| 2553 | 2561 | </if> | 
| ... | ... | @@ -2560,15 +2568,7 @@ | 
| 2560 | 2568 | <if test="areaId != null and areaId != ''"> | 
| 2561 | 2569 | and o.area_id = #{areaId,jdbcType=VARCHAR} | 
| 2562 | 2570 | </if> | 
| 2563 | - | |
| 2564 | - <if test="startDate != null"> | |
| 2565 | - and c.checkTime >= #{startDate} | |
| 2566 | - </if> | |
| 2567 | - <if test="endDate != null"> | |
| 2568 | - and c.checkTime <![CDATA[ <= ]]> #{endDate} | |
| 2569 | - </if> | |
| 2570 | - group by o.id | |
| 2571 | - | |
| 2571 | + GROUP BY o.id | |
| 2572 | 2572 | </select> | 
| 2573 | 2573 | |
| 2574 | 2574 | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientSyncMysqlFacade.java
View file @
3918625
| ... | ... | @@ -1569,6 +1569,7 @@ | 
| 1569 | 1569 | ReportMatdeliver reportMatdeliver = new ReportMatdeliver(); | 
| 1570 | 1570 | reportMatdeliver.setSourceId(StringUtils.isNotEmpty(pat.getSource()) ? pat.getSource() : maternalDeliverModel.getParentId()); | 
| 1571 | 1571 | reportMatdeliver.setMid(maternalDeliverModel.getId()); | 
| 1572 | + reportMatdeliver.setLastMenses(pat.getLastMenses()); | |
| 1572 | 1573 | try { | 
| 1573 | 1574 | ConvertUtils.register(new DateLocaleConverter(), Date.class); | 
| 1574 | 1575 | BeanUtils.copyProperties(reportMatdeliver,maternalDeliverModel); | 
| ... | ... | @@ -2380,7 +2381,7 @@ | 
| 2380 | 2381 | List<Map<String,String>> isYgbmkyCheckCounts = mysqlAntexcService.getIsYgbmkyCheckCount(param); | 
| 2381 | 2382 | List<Map<String,String>> hasYgbmkyCheckCounts = mysqlAntexcService.getHasYgbmkyCheckCount(param); | 
| 2382 | 2383 | |
| 2383 | - List<Map<String,String>> matdeliverCounts = mysqlAntexcService.getMatdeliverCount(param); | |
| 2384 | + List<Map<String,String>> matdeliverCounts = mysqlAntexcService.getLisMatdeliverCount(param); | |
| 2384 | 2385 | List<Map<String,String>> matdeliverHivktCheckCounts = mysqlAntexcService.getMatdeliverHivktCheckCount(param); | 
| 2385 | 2386 | List<Map<String,String>> matdeliverHivktCheckzqCounts = mysqlAntexcService.getMatdeliverHivktCheckzqCount(param); | 
| 2386 | 2387 | List<Map<String,String>> hasMatdeliverHivktCheckzqCounts = mysqlAntexcService.getHasMatdeliverHivktCheckzqCount(param); |