Commit 3e6657de670c5b3f46acb1fb083c318832467271
1 parent
a129f847c1
Exists in
master
and in
6 other branches
隆化-定制,本院建档本院分娩、本院建档外院分娩、外院建档本院分娩、外院建档外院分娩;数量统计
Showing 6 changed files with 88 additions and 0 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/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/controller/MatDeliverController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterMysqlAntexcMapper.java
View file @
3e6657d
platform-biz-service/src/main/java/com/lyms/platform/permission/service/MysqlAntexcService.java
View file @
3e6657d
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/MysqlAntexcServiceImpl.java
View file @
3e6657d
platform-biz-service/src/main/resources/mainOrm/master/MasterMysqlAntexc.xml
View file @
3e6657d
... | ... | @@ -2968,6 +2968,25 @@ |
2968 | 2968 | ) |
2969 | 2969 | |
2970 | 2970 | </select> |
2971 | + <select id="getLhWyJdWyFmManage" resultType="java.lang.Integer" parameterType="java.util.Map"> | |
2972 | + SELECT | |
2973 | + count( 1 ) | |
2974 | + FROM | |
2975 | + report_matdeliver f | |
2976 | + INNER JOIN organization o ON f.fmHospital = o.id | |
2977 | + INNER JOIN report_patients p ON p.patientId = f.sourceId | |
2978 | + WHERE | |
2979 | + p.ENABLE IS NULL | |
2980 | + AND f.fmHospital <![CDATA[ <> ]]> #{hospitalId,jdbcType=INTEGER} | |
2981 | + AND p.hospitalId <![CDATA[ <> ]]> #{hospitalId,jdbcType=INTEGER} | |
2982 | + <if test="startTime != null"> | |
2983 | + AND f.dueDate1 <![CDATA[ >= ]]> #{startTime} | |
2984 | + </if> | |
2985 | + <if test="endTime != null"> | |
2986 | + AND f.dueDate1 <![CDATA[ <= ]]> #{endTime} | |
2987 | + </if> | |
2988 | + AND p.areaRegisterId = '130' | |
2989 | + </select> | |
2971 | 2990 | |
2972 | 2991 | |
2973 | 2992 | </mapper> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
View file @
3e6657d
... | ... | @@ -750,5 +750,20 @@ |
750 | 750 | ExceptionUtils.catchException(e, "childbirthManagerExcel2异常"); |
751 | 751 | } |
752 | 752 | } |
753 | + /** | |
754 | + * 隆化-定制,本院建档本院分娩、本院建档外院分娩、外院建档本院分娩、外院建档外院分娩统计 | |
755 | + * @param request | |
756 | + * @param startTime,endtime | |
757 | + * @return | |
758 | + */ | |
759 | + @TokenRequired | |
760 | + @ResponseBody | |
761 | + @RequestMapping(value = "getLhByFmManageCount", method = RequestMethod.GET) | |
762 | + public BaseObjectResponse getLhByFmManageCount(HttpServletRequest request, | |
763 | + @RequestParam(required = false) Date startTime, | |
764 | + @RequestParam(required = false) Date endTime) { | |
765 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
766 | + return matDeliverFacade.getLhByFmManageCount(startTime,endTime,loginState.getId()); | |
767 | + } | |
753 | 768 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
3e6657d
... | ... | @@ -3961,5 +3961,51 @@ |
3961 | 3961 | childbirthManagerResult.setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION); |
3962 | 3962 | return childbirthManagerResult; |
3963 | 3963 | } |
3964 | + | |
3965 | + public BaseObjectResponse getLhByFmManageCount(Date startTime, Date endTime, Integer userId) { | |
3966 | + Map param = new HashMap(); | |
3967 | + //承德市中心医院、承德市附属医院、承德市妇幼、河北省隆化县医院、隆化县中医医院、隆化县妇幼保健院、隆化县隆化镇医院 | |
3968 | + String[] array={"2100001605","2100001402","2100001401","2100001291","2100001695","2100001696","2100002048"}; | |
3969 | + param.put("hospitalId",array); | |
3970 | + param.put("startTime",startTime); | |
3971 | + param.put("endTime",endTime); | |
3972 | + List<Map<String,Object>>list =mysqlAntexcService.getLhByFmManage(param); | |
3973 | + //统计本院建档本院分娩和本院建档外院分娩数量 | |
3974 | + Map<String,String> mapCount=new HashMap<>(); | |
3975 | + int byjdbyfm=0; | |
3976 | + int byjdwyfm=0; | |
3977 | + for (Map<String, Object> strMap : list) { | |
3978 | + //本院建档本院分娩 | |
3979 | + if("隆化县妇幼保健院".equals(strMap.get("hospitalName"))){ | |
3980 | + byjdbyfm++; | |
3981 | + }else { | |
3982 | + byjdwyfm++; | |
3983 | + } | |
3984 | + } | |
3985 | + //外院建档本院分娩 | |
3986 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
3987 | + Map param2 = new HashMap(); | |
3988 | + param2.put("hospitalId",Integer.valueOf(hospitalId));//当前登录用户医院的id | |
3989 | + param2.put("startTime",startTime); | |
3990 | + param2.put("endTime",endTime); | |
3991 | + List<Map<String,Object>> wyjdbyfm =mysqlAntexcService.getLhWyFmManage(param2); | |
3992 | + //外院建档外院分娩 | |
3993 | + Map param3 = new HashMap(); | |
3994 | + param2.put("hospitalId",Integer.valueOf(hospitalId));//当前登录用户医院的id | |
3995 | + param3.put("startTime",startTime); | |
3996 | + param3.put("endTime",endTime); | |
3997 | + int wyjdwyfm =mysqlAntexcService.getLhWyJdWyFmManage(param3); | |
3998 | + | |
3999 | + mapCount.put("byjdbyfm",String.valueOf(byjdbyfm));//本院建档本院分娩 | |
4000 | + mapCount.put("byjdwyfm",String.valueOf(byjdwyfm));//本院建档外院分娩 | |
4001 | + mapCount.put("wyjdbyfm",String.valueOf(wyjdbyfm.size()));//外院建档本院分娩 | |
4002 | + mapCount.put("wyjdwyfm",String.valueOf(wyjdwyfm));//外院建档外院分娩 | |
4003 | + | |
4004 | + BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
4005 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
4006 | + objectResponse.setErrormsg("成功"); | |
4007 | + objectResponse.setData(mapCount); | |
4008 | + return objectResponse; | |
4009 | + } | |
3964 | 4010 | } |