Commit 64327ec26704ae4cd8aa2e00bb27528d81f9ee4c

Authored by liquanyu
1 parent e3164cb490

助产机构报表

Showing 6 changed files with 386 additions and 163 deletions

platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java View file @ 64327ec
... ... @@ -268,16 +268,14 @@
268 268 titleFormt.setVerticalAlignment(VerticalAlignment.CENTRE);
269 269  
270 270 int column = 25;
271   - for (String key : areaNams)
  271 + for (int i = 0;i < areaNams.size() - 1;i++)
272 272 {
273 273 column++;
274 274 ws.insertColumn(column);
275   - ws.insertColumn(column);
276   - ws.insertColumn(column);
277 275 }
278 276  
279 277  
280   - ws.mergeCells(26, 3, 26 + areaNams.size(), 3);
  278 + ws.mergeCells(26, 3, 25 + areaNams.size(), 3);
281 279 ws.addCell(new Label(26, 3, "本市户籍", contentFormt));
282 280  
283 281 int index = 25;
284 282  
285 283  
286 284  
... ... @@ -311,17 +309,19 @@
311 309 }
312 310 }
313 311  
314   - for (int i = 5, len = values.size(); i < len; i++)
  312 + int arrayIndex = 0;
  313 + for (int i = 5, len = values.size()+5; i < len; i++, arrayIndex++)
315 314 {
316 315  
317   - Set<String> sets = values.get(i).keySet();
  316 + Set<String> sets = values.get(arrayIndex).keySet();
318 317 int j = 0;
319 318 for (String key : sets)
320 319 {
321   - String value = values.get(i).get(key);
  320 + String value = values.get(arrayIndex).get(key);
322 321 if (StringUtils.isNotEmpty(value) && StringUtils.isNum(value))
323 322 {
324 323 WritableCellFormat wcfN = new WritableCellFormat(contentFont);
  324 + wcfN.setBorder(jxl.format.Border.ALL, jxl.format.BorderLineStyle.THIN);
325 325 wcfN.setAlignment(jxl.format.Alignment.CENTRE);
326 326 wcfN.setVerticalAlignment(VerticalAlignment.CENTRE);
327 327 Number labelNF = new Number(j, i,Integer.parseInt(value), wcfN);
328 328  
329 329  
330 330  
... ... @@ -333,18 +333,19 @@
333 333 }
334 334 j++;
335 335 }
  336 +
336 337 }
337 338  
338   - ws.addCell(new Label(0, 30, "注:统计时限:"+ time +";分娩方式中其他包括:吸引产、臀助产、臀牵引、产钳产等。", leftFormt));
  339 + ws.addCell(new Label(0, values.size()+5, "注:统计时限:"+ time +";分娩方式中其他包括:吸引产、臀助产、臀牵引、产钳产等。", leftFormt));
339 340  
340   - ws.mergeCells(0, 30, 36, 30);
  341 + ws.mergeCells(0, values.size()+5, 36, values.size()+5);
341 342  
342   - ws.addCell(new Label(0, 31, "填报单位:", leftFormt));
343   - ws.mergeCells(0, 31, 5, 31);
344   - ws.addCell(new Label(6, 31, "填报人:", leftFormt));
345   - ws.mergeCells(6, 31, 10, 31);
346   - ws.addCell(new Label(11, 31, "填报日期:", leftFormt));
347   - ws.mergeCells(11, 31,36, 31);
  343 + ws.addCell(new Label(0, values.size()+6, "填报单位:", leftFormt));
  344 + ws.mergeCells(0, values.size()+6, 5, values.size()+6);
  345 + ws.addCell(new Label(6, values.size()+6, "填报人:", leftFormt));
  346 + ws.mergeCells(6, values.size()+6, 10, values.size()+6);
  347 + ws.addCell(new Label(11, values.size()+6, "填报日期:", leftFormt));
  348 + ws.mergeCells(11, values.size()+6,36, values.size()+6);
348 349  
349 350 book.write();
350 351 book.close();
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java View file @ 64327ec
... ... @@ -198,6 +198,45 @@
198 198 this.modifiedEnd = modifiedEnd;
199 199 }
200 200  
  201 + //体重
  202 + private String babyWeightStart;
  203 + private String babyWeightEnd;
  204 + //身高
  205 + private String babyHeightStart;
  206 + private String babyHeightEnd;
  207 +
  208 + public String getBabyWeightStart() {
  209 + return babyWeightStart;
  210 + }
  211 +
  212 + public void setBabyWeightStart(String babyWeightStart) {
  213 + this.babyWeightStart = babyWeightStart;
  214 + }
  215 +
  216 + public String getBabyWeightEnd() {
  217 + return babyWeightEnd;
  218 + }
  219 +
  220 + public void setBabyWeightEnd(String babyWeightEnd) {
  221 + this.babyWeightEnd = babyWeightEnd;
  222 + }
  223 +
  224 + public String getBabyHeightStart() {
  225 + return babyHeightStart;
  226 + }
  227 +
  228 + public void setBabyHeightStart(String babyHeightStart) {
  229 + this.babyHeightStart = babyHeightStart;
  230 + }
  231 +
  232 + public String getBabyHeightEnd() {
  233 + return babyHeightEnd;
  234 + }
  235 +
  236 + public void setBabyHeightEnd(String babyHeightEnd) {
  237 + this.babyHeightEnd = babyHeightEnd;
  238 + }
  239 +
201 240 public Integer getMalformation() {
202 241 return malformation;
203 242 }
... ... @@ -951,14 +990,6 @@
951 990 c = c.where("created").gte(createdTimeStart).lte(createdTimeEnd);
952 991 }else{
953 992 c = Criteria.where("created").gte(createdTimeStart).lte(createdTimeEnd);
954   - }
955   - }
956   -
957   - if(null != modifiedStart && modifiedEnd != null){
958   - if(c != null){
959   - c = c.where("modified").gte(modifiedStart).lte(modifiedEnd);
960   - }else{
961   - c = Criteria.where("modified").gte(modifiedStart).lte(modifiedEnd);
962 993 }
963 994 }
964 995  
platform-msg-generate/src/main/java/com/lyms/platform/msg/remote/AmsMessageService.java View file @ 64327ec
... ... @@ -173,7 +173,7 @@
173 173 // }
174 174  
175 175 public static void main(String[] args) {
176   - Map<String,List<MessageContent>> list = getMessageTemplateMap("2100001718",
  176 + Map<String,List<MessageContent>> list = getMessageTemplateMap("2100001635",
177 177 AmsServiceTypeEnum.CHILD_GUIDE);
178 178 List<MessageContent> msgs = list.get("0周");
179 179 System.out.println(list);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java View file @ 64327ec
... ... @@ -21,10 +21,7 @@
21 21 import com.lyms.platform.permission.service.OrganizationService;
22 22 import com.lyms.platform.permission.service.UsersService;
23 23 import com.lyms.platform.pojo.*;
24   -import com.lyms.platform.query.AntExRecordQuery;
25   -import com.lyms.platform.query.BasicConfigQuery;
26   -import com.lyms.platform.query.DataPermissionsModelQuery;
27   -import com.lyms.platform.query.PatientsQuery;
  24 +import com.lyms.platform.query.*;
28 25 import org.apache.commons.collections.CollectionUtils;
29 26 import org.apache.commons.lang.math.NumberUtils;
30 27 import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -37,6 +34,7 @@
37 34 import java.io.IOException;
38 35 import java.io.OutputStream;
39 36 import java.util.*;
  37 +import java.util.concurrent.Callable;
40 38 import java.util.concurrent.Future;
41 39 import java.util.concurrent.TimeUnit;
42 40  
... ... @@ -630,6 +628,7 @@
630 628  
631 629 //antExRecordQuery.setLevelId(antExManagerQueryRequest.getLevel());
632 630 List<AntExRecordModel> antExRecordModelList = recordService.queryAntExRecords(antExRecordQuery, Sort.Direction.DESC,"created");
  631 + System.out.println("antExRecordModelList===================="+antExRecordModelList.size());
633 632 Map<String,List<AntExRecordModel>> map = handleAntexRecord(antExRecordModelList);
634 633 AntExRecordQuery pageAntExRecordsQuery = new AntExRecordQuery();
635 634  
636 635  
637 636  
638 637  
639 638  
640 639  
641 640  
642 641  
643 642  
644 643  
645 644  
646 645  
647 646  
648 647  
649 648  
650 649  
651 650  
... ... @@ -643,121 +642,255 @@
643 642 }
644 643  
645 644  
646   - private List<AntExRecordModel> getIncrRiskAntexRecard(Map<String,List<AntExRecordModel>> map,AntExRecordQuery pageAntExRecordsQuery,AntExManagerQueryRequest request)
  645 + private List<AntExRecordModel> getIncrRiskAntexRecard(final Map<String,List<AntExRecordModel>> map,AntExRecordQuery pageAntExRecordsQuery,final AntExManagerQueryRequest request)
647 646 {
648 647 List<String> ids = new ArrayList<>();
649 648 Map<String,List<String>> incriskMap = new HashMap<>();
650   - AntExRecordQuery beforeRecordQuery = new AntExRecordQuery();
651 649  
652 650 if (map.size() > 0)
653 651 {
  652 + List<String> parentIds = new ArrayList<>();
654 653 for (String patientId : map.keySet())
655 654 {
656   - List<AntExRecordModel> list = map.get(patientId);
657   - if (CollectionUtils.isNotEmpty(list))
658   - {
659   - if (list.size() == 1)
660   - {
661   - AntExRecordModel oneRecord = list.get(0);
662   - if (!(CollectionUtils.isNotEmpty(oneRecord.gethRisk()) && oneRecord.gethRisk().contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")))
663   - {
664   - if (CollectionUtils.isNotEmpty(oneRecord.gethRisk()))
665   - {
666   - beforeRecordQuery.setParentId(patientId);
667   - beforeRecordQuery.setCheckTimeEnd(oneRecord.getCheckTime());
668   - beforeRecordQuery.setNeqId(oneRecord.getId());
669   - List<AntExRecordModel> beforeAntRecords = recordService.queryAntExRecords(beforeRecordQuery);
670   - if (CollectionUtils.isNotEmpty(beforeAntRecords))
671   - {
672   - AntExRecordModel twoRecord = beforeAntRecords.get(0);
673   - List currentRiskList = oneRecord.gethRisk();
674   - List beforeRiskList = twoRecord.gethRisk();
  655 + parentIds.add(patientId);
  656 + }
675 657  
676   - if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")
677   - && getConditionRisk(request.getRiskFactorId(),currentRiskList,request.getLevel()))
678   - {
679   - ids.add(oneRecord.getId());
680   - incriskMap.put(oneRecord.getId(), currentRiskList);
681   - }
682   - else if (CollectionUtils.isNotEmpty(beforeRiskList) )
683   - {
684   - List incrHrisk = new ArrayList();
685   - for (Object riskId : currentRiskList)
686   - {
687   - if (!beforeRiskList.contains(riskId))
688   - {
689   - incrHrisk.add(riskId);
690   - }
691   - }
692   - if (CollectionUtils.isNotEmpty(incrHrisk) && getConditionRisk(request.getRiskFactorId(),incrHrisk,request.getLevel()))
693   - {
694   - ids.add(oneRecord.getId());
695   - incriskMap.put(oneRecord.getId(), incrHrisk);
696   - }
697   - }
698   - }
699   - else
700   - {
701   - if (CollectionUtils.isNotEmpty(oneRecord.gethRisk()) && getConditionRisk(request.getRiskFactorId(),
702   - oneRecord.gethRisk(),request.getLevel()))
703   - {
704   - ids.add(oneRecord.getId());
705   - incriskMap.put(oneRecord.getId(), oneRecord.gethRisk());
706   - }
707   - }
708   - }
709   - }
  658 + if (CollectionUtils.isNotEmpty(parentIds))
  659 + {
  660 +
  661 + List<Future> listFuture = new ArrayList<>();
  662 + int batchSize = 50;
  663 + int end = 0;
  664 + for (int i = 0; i < parentIds.size(); i += batchSize) {
  665 + end = (end + batchSize);
  666 + if (end > parentIds.size()) {
  667 + end = parentIds.size();
710 668 }
711   - else if (list.size() > 1)
712   - {
713   - AntExRecordModel oneRecord = list.get(0);
  669 + System.out.println("start:" + i + ",end:" + end);
  670 + final List<String> tempList = parentIds.subList(i, end);
  671 + listFuture.add(commonThreadPool.submit(new Callable() {
  672 + @Override
  673 + public Map<String, Object> call() {
  674 + Map<String, Object> result = new HashMap<String, Object>();
  675 + if (CollectionUtils.isNotEmpty(tempList)) {
  676 + List<String> ids = new ArrayList<>();
  677 + Map<String, List<String>> incriskMap = new HashMap<>();
  678 + AntExRecordQuery beforeRecordQuery = new AntExRecordQuery();
  679 + for (String patientId : tempList) {
  680 + List<AntExRecordModel> list = map.get(patientId);
  681 + if (CollectionUtils.isNotEmpty(list)) {
  682 + if (list.size() == 1) {
  683 + AntExRecordModel oneRecord = list.get(0);
  684 + if (!(CollectionUtils.isNotEmpty(oneRecord.gethRisk()) && oneRecord.gethRisk().contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6"))) {
  685 + if (CollectionUtils.isNotEmpty(oneRecord.gethRisk())) {
  686 + beforeRecordQuery.setParentId(patientId);
  687 + beforeRecordQuery.setCheckTimeEnd(oneRecord.getCheckTime());
  688 + beforeRecordQuery.setNeqId(oneRecord.getId());
  689 + List<AntExRecordModel> beforeAntRecords = recordService.queryAntExRecords(beforeRecordQuery);
  690 + if (CollectionUtils.isNotEmpty(beforeAntRecords)) {
  691 + AntExRecordModel twoRecord = beforeAntRecords.get(0);
  692 + List currentRiskList = oneRecord.gethRisk();
  693 + List beforeRiskList = twoRecord.gethRisk();
714 694  
715   - if (CollectionUtils.isNotEmpty(oneRecord.gethRisk()) && oneRecord.gethRisk().contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6"))
716   - {
717   - continue;
718   - }
  695 + if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")
  696 + && getConditionRisk(request.getRiskFactorId(), currentRiskList, request.getLevel())) {
  697 + ids.add(oneRecord.getId());
  698 + incriskMap.put(oneRecord.getId(), currentRiskList);
  699 + } else if (CollectionUtils.isNotEmpty(beforeRiskList)) {
  700 + List incrHrisk = new ArrayList();
  701 + for (Object riskId : currentRiskList) {
  702 + if (!beforeRiskList.contains(riskId)) {
  703 + incrHrisk.add(riskId);
  704 + }
  705 + }
  706 + if (CollectionUtils.isNotEmpty(incrHrisk) && getConditionRisk(request.getRiskFactorId(), incrHrisk, request.getLevel())) {
  707 + ids.add(oneRecord.getId());
  708 + incriskMap.put(oneRecord.getId(), incrHrisk);
  709 + }
  710 + }
  711 + } else {
  712 + if (CollectionUtils.isNotEmpty(oneRecord.gethRisk()) && getConditionRisk(request.getRiskFactorId(),
  713 + oneRecord.gethRisk(), request.getLevel())) {
  714 + ids.add(oneRecord.getId());
  715 + incriskMap.put(oneRecord.getId(), oneRecord.gethRisk());
  716 + }
  717 + }
  718 + }
  719 + }
  720 + } else if (list.size() > 1) {
  721 + AntExRecordModel oneRecord = list.get(0);
719 722  
720   - AntExRecordModel twoRecord = list.get(1);
  723 + if (CollectionUtils.isNotEmpty(oneRecord.gethRisk()) && oneRecord.gethRisk().contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")) {
  724 + continue;
  725 + }
721 726  
722   - List currentRiskList = oneRecord.gethRisk();
723   - List beforeRiskList = twoRecord.gethRisk();
  727 + AntExRecordModel twoRecord = list.get(1);
724 728  
725   - if (CollectionUtils.isEmpty(currentRiskList) && CollectionUtils.isEmpty(beforeRiskList))
726   - {
727   - continue;
728   - }
729   - if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")
730   - && CollectionUtils.isEmpty(currentRiskList))
731   - {
732   - continue;
733   - }
  729 + List currentRiskList = oneRecord.gethRisk();
  730 + List beforeRiskList = twoRecord.gethRisk();
734 731  
735   - if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")
736   - && getConditionRisk(request.getRiskFactorId(),currentRiskList,request.getLevel()))
737   - {
738   - ids.add(oneRecord.getId());
739   - incriskMap.put(oneRecord.getId(), currentRiskList);
  732 + if (CollectionUtils.isEmpty(currentRiskList) && CollectionUtils.isEmpty(beforeRiskList)) {
  733 + continue;
  734 + }
  735 + if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")
  736 + && CollectionUtils.isEmpty(currentRiskList)) {
  737 + continue;
  738 + }
  739 +
  740 + if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")
  741 + && getConditionRisk(request.getRiskFactorId(), currentRiskList, request.getLevel())) {
  742 + ids.add(oneRecord.getId());
  743 + incriskMap.put(oneRecord.getId(), currentRiskList);
  744 + } else if (CollectionUtils.isNotEmpty(beforeRiskList)) {
  745 + List<String> incrHrisk = new ArrayList();
  746 + for (Object riskId : currentRiskList) {
  747 + if (!beforeRiskList.contains(riskId)) {
  748 + incrHrisk.add(String.valueOf(riskId));
  749 + }
  750 + }
  751 + if (CollectionUtils.isNotEmpty(incrHrisk) && getConditionRisk(request.getRiskFactorId(), incrHrisk, request.getLevel())) {
  752 +
  753 + ids.add(oneRecord.getId());
  754 + incriskMap.put(oneRecord.getId(), incrHrisk);
  755 + }
  756 + }
  757 + }
  758 + }
  759 + }
  760 + result.put("ids",ids);
  761 + result.put("inc",incriskMap);
  762 + }
  763 + return result;
740 764 }
741   - else if (CollectionUtils.isNotEmpty(beforeRiskList) )
742   - {
743   - List<String> incrHrisk = new ArrayList();
744   - for (Object riskId : currentRiskList)
  765 + }));
  766 +
  767 + for (Future f : listFuture) {
  768 + try {
  769 + Map<String,Object> fmap = (Map) f.get(30, TimeUnit.SECONDS);
  770 + if (fmap.get("ids") != null)
745 771 {
746   - if (!beforeRiskList.contains(riskId))
747   - {
748   - incrHrisk.add(String.valueOf(riskId));
749   - }
  772 + ids.addAll((List)fmap.get("ids"));
750 773 }
751   - if (CollectionUtils.isNotEmpty(incrHrisk) && getConditionRisk(request.getRiskFactorId(),incrHrisk,request.getLevel()))
  774 + if (fmap.get("inc") != null)
752 775 {
753   -
754   - ids.add(oneRecord.getId());
755   - incriskMap.put(oneRecord.getId(), incrHrisk);
  776 + incriskMap.putAll((Map)fmap.get("inc"));
756 777 }
  778 + } catch (Exception e) {
  779 + ExceptionUtils.catchException(e, "antexrecord findList get result future error.");
757 780 }
758 781 }
759 782 }
760 783 }
  784 +
  785 +
  786 +
  787 +// for (String patientId : map.keySet())
  788 +// {
  789 +// List<AntExRecordModel> list = map.get(patientId);
  790 +// if (CollectionUtils.isNotEmpty(list))
  791 +// {
  792 +// if (list.size() == 1)
  793 +// {
  794 +// AntExRecordModel oneRecord = list.get(0);
  795 +// if (!(CollectionUtils.isNotEmpty(oneRecord.gethRisk()) && oneRecord.gethRisk().contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")))
  796 +// {
  797 +// if (CollectionUtils.isNotEmpty(oneRecord.gethRisk()))
  798 +// {
  799 +// beforeRecordQuery.setParentId(patientId);
  800 +// beforeRecordQuery.setCheckTimeEnd(oneRecord.getCheckTime());
  801 +// beforeRecordQuery.setNeqId(oneRecord.getId());
  802 +// List<AntExRecordModel> beforeAntRecords = recordService.queryAntExRecords(beforeRecordQuery);
  803 +// if (CollectionUtils.isNotEmpty(beforeAntRecords))
  804 +// {
  805 +// AntExRecordModel twoRecord = beforeAntRecords.get(0);
  806 +// List currentRiskList = oneRecord.gethRisk();
  807 +// List beforeRiskList = twoRecord.gethRisk();
  808 +//
  809 +// if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")
  810 +// && getConditionRisk(request.getRiskFactorId(),currentRiskList,request.getLevel()))
  811 +// {
  812 +// ids.add(oneRecord.getId());
  813 +// incriskMap.put(oneRecord.getId(), currentRiskList);
  814 +// }
  815 +// else if (CollectionUtils.isNotEmpty(beforeRiskList) )
  816 +// {
  817 +// List incrHrisk = new ArrayList();
  818 +// for (Object riskId : currentRiskList)
  819 +// {
  820 +// if (!beforeRiskList.contains(riskId))
  821 +// {
  822 +// incrHrisk.add(riskId);
  823 +// }
  824 +// }
  825 +// if (CollectionUtils.isNotEmpty(incrHrisk) && getConditionRisk(request.getRiskFactorId(),incrHrisk,request.getLevel()))
  826 +// {
  827 +// ids.add(oneRecord.getId());
  828 +// incriskMap.put(oneRecord.getId(), incrHrisk);
  829 +// }
  830 +// }
  831 +// }
  832 +// else
  833 +// {
  834 +// if (CollectionUtils.isNotEmpty(oneRecord.gethRisk()) && getConditionRisk(request.getRiskFactorId(),
  835 +// oneRecord.gethRisk(),request.getLevel()))
  836 +// {
  837 +// ids.add(oneRecord.getId());
  838 +// incriskMap.put(oneRecord.getId(), oneRecord.gethRisk());
  839 +// }
  840 +// }
  841 +// }
  842 +// }
  843 +// }
  844 +// else if (list.size() > 1)
  845 +// {
  846 +// AntExRecordModel oneRecord = list.get(0);
  847 +//
  848 +// if (CollectionUtils.isNotEmpty(oneRecord.gethRisk()) && oneRecord.gethRisk().contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6"))
  849 +// {
  850 +// continue;
  851 +// }
  852 +//
  853 +// AntExRecordModel twoRecord = list.get(1);
  854 +//
  855 +// List currentRiskList = oneRecord.gethRisk();
  856 +// List beforeRiskList = twoRecord.gethRisk();
  857 +//
  858 +// if (CollectionUtils.isEmpty(currentRiskList) && CollectionUtils.isEmpty(beforeRiskList))
  859 +// {
  860 +// continue;
  861 +// }
  862 +// if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")
  863 +// && CollectionUtils.isEmpty(currentRiskList))
  864 +// {
  865 +// continue;
  866 +// }
  867 +//
  868 +// if (CollectionUtils.isNotEmpty(beforeRiskList) && beforeRiskList.contains("d42eec03-aa86-45b8-a4e0-78a0ff365fb6")
  869 +// && getConditionRisk(request.getRiskFactorId(),currentRiskList,request.getLevel()))
  870 +// {
  871 +// ids.add(oneRecord.getId());
  872 +// incriskMap.put(oneRecord.getId(), currentRiskList);
  873 +// }
  874 +// else if (CollectionUtils.isNotEmpty(beforeRiskList) )
  875 +// {
  876 +// List<String> incrHrisk = new ArrayList();
  877 +// for (Object riskId : currentRiskList)
  878 +// {
  879 +// if (!beforeRiskList.contains(riskId))
  880 +// {
  881 +// incrHrisk.add(String.valueOf(riskId));
  882 +// }
  883 +// }
  884 +// if (CollectionUtils.isNotEmpty(incrHrisk) && getConditionRisk(request.getRiskFactorId(),incrHrisk,request.getLevel()))
  885 +// {
  886 +//
  887 +// ids.add(oneRecord.getId());
  888 +// incriskMap.put(oneRecord.getId(), incrHrisk);
  889 +// }
  890 +// }
  891 +// }
  892 +// }
  893 +// }
761 894 }
762 895  
763 896 if (CollectionUtils.isEmpty(ids))
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ 64327ec
... ... @@ -2636,9 +2636,38 @@
2636 2636  
2637 2637 httpServletResponse.setContentType("application/force-download");
2638 2638 httpServletResponse.setHeader("Content-Disposition", "attachment;filename=" + new String(("助产机构报表.xls").getBytes("UTF-8"), "ISO-8859-1"));
2639   - String path = this.getClass().getResource("/").getPath()+ "/due_org_report.xls";
  2639 + String path = this.getClass().getResource("/").getPath()+ "due_org_report.xls";
2640 2640 System.out.println(path);
2641   - ExcelUtil.writeExclFile(path , httpServletResponse.getOutputStream(), areaNames,"成都市","成都取",time,list);
  2641 +
  2642 + String timeStr = DateUtil.getyyyy_MM_dd1(DateUtil.getSNDate(time)[0])+"-"+DateUtil.getyyyy_MM_dd1(DateUtil.getSNDate(time)[1]);
  2643 + String title = "";
  2644 + String areaName = "";
  2645 + if (StringUtils.isNotEmpty(areaId))
  2646 + {
  2647 + BasicConfigQuery basicConfigQuery1 = new BasicConfigQuery();
  2648 + basicConfigQuery1.setYn(YnEnums.YES.getId());
  2649 + basicConfigQuery1.setId(areaId);
  2650 + List<BasicConfig> areas = basicConfigService.queryBasicConfig(basicConfigQuery);
  2651 + if (CollectionUtils.isNotEmpty(areas))
  2652 + {
  2653 + title = areas.get(0).getName()+"助产机构相关数据月报表";
  2654 + areaName = "市县区:"+areas.get(0).getName();
  2655 + }
  2656 + }
  2657 + else
  2658 + {
  2659 + BasicConfigQuery basicConfigQuery1 = new BasicConfigQuery();
  2660 + basicConfigQuery1.setYn(YnEnums.YES.getId());
  2661 + basicConfigQuery1.setId(cityId);
  2662 + List<BasicConfig> cities = basicConfigService.queryBasicConfig(basicConfigQuery);
  2663 + if (CollectionUtils.isNotEmpty(cities))
  2664 + {
  2665 + title = cities.get(0).getName()+"助产机构相关数据月报表";
  2666 + areaName = "市县区:"+cities.get(0).getName();
  2667 + }
  2668 + }
  2669 +
  2670 + ExcelUtil.writeExclFile(path , httpServletResponse.getOutputStream(), areaNames,title,areaName,timeStr,list);
2642 2671 } catch (IOException e) {
2643 2672 ExceptionUtils.catchException(e, "exporDueOrgCount error");
2644 2673 }
2645 2674  
... ... @@ -2742,10 +2771,13 @@
2742 2771 int huiYinSpitCount = 0; //会阴情况 切开
2743 2772 int fzrDoubleCount = 0; //非自然妊娠双胎
2744 2773  
2745   -// int lowWeightCount = ; //低出生体重数
  2774 +
  2775 + int bigBoyCount =0 ; //巨大儿数
  2776 + int lowWeightCount = 0; //低出生体重数
  2777 +
2746 2778 // int babySiWangCount = ; //新生儿死亡数
2747 2779 // int sieveCount = ; //筛查数
2748   -// int bigBoyCount = ; //巨大儿数
  2780 +
2749 2781 // int sieveFreeCount = ; //35岁以下免费筛查数
2750 2782 // int fmOtherCount = ; //分娩方式 其他
2751 2783  
2752 2784  
... ... @@ -2774,12 +2806,42 @@
2774 2806 doubleCount += Integer.parseInt(map.get("doubleCount")); //双胎数
2775 2807 huiYinSpitCount += Integer.parseInt(map.get("huiYinSpitCount")); //会阴情况 切开
2776 2808 fzrDoubleCount += Integer.parseInt(map.get("fzrDoubleCount")); //非自然妊娠双胎
  2809 +
  2810 + bigBoyCount += Integer.parseInt(map.get("bigBoyCount")); //巨大儿数
  2811 + lowWeightCount += Integer.parseInt(map.get("lowWeightCount")); //低出生体重数
2777 2812 }
2778 2813 }
2779 2814  
2780 2815  
2781 2816 Map<String,String> totalMap = new LinkedHashMap<>();
2782 2817  
  2818 + totalMap.put("orgName","合计");
  2819 + totalMap.put("chanCount",String.valueOf(chanCount));
  2820 + totalMap.put("riskCount",String.valueOf(riskCount));
  2821 + totalMap.put("huoChanCount",String.valueOf(huoChanCount));
  2822 + totalMap.put("doubleCount",String.valueOf(doubleCount));
  2823 + totalMap.put("fzrDoubleCount",String.valueOf(fzrDoubleCount));
  2824 + totalMap.put("boyCount",String.valueOf(boyCount));
  2825 + totalMap.put("girlCount",String.valueOf(girlCount));
  2826 + totalMap.put("fmShunChanCount",String.valueOf(fmShunChanCount));
  2827 + totalMap.put("fmPoGongCount",String.valueOf(fmPoGongCount));
  2828 + totalMap.put("fmCount",String.valueOf(fmCount));
  2829 + totalMap.put("fmOtherCount","");
  2830 + totalMap.put("huiYinFullCount",String.valueOf(huiYinFullCount));
  2831 + totalMap.put("huiYinSpitCount",String.valueOf(huiYinSpitCount));
  2832 + totalMap.put("siLielevelCount",String.valueOf(siLielevelCount));
  2833 + totalMap.put("siLielevelYzCount",String.valueOf(siLielevelYzCount));
  2834 + totalMap.put("huiYingTotalCount",String.valueOf(huiYingTotalCount));
  2835 + totalMap.put("queXianBabyCount",String.valueOf(queXianBabyCount));
  2836 + totalMap.put("babySiWangCount","");
  2837 + totalMap.put("babySiChanCount",String.valueOf(babySiChanCount));
  2838 + totalMap.put("babySiTaiCount",String.valueOf(babySiTaiCount));
  2839 + totalMap.put("bigBoyCount",String.valueOf(bigBoyCount));
  2840 + totalMap.put("lowWeightCount",String.valueOf(lowWeightCount));
  2841 + totalMap.put("zcBabyCount",String.valueOf(zcBabyCount));
  2842 + totalMap.put("bswsCount",String.valueOf(bswsCount));
  2843 + totalMap.put("wsCount",String.valueOf(wsCount));
  2844 +
2783 2845 //各个区总和计算
2784 2846 for (int i = 1 ; i <= basicConfigs.size() ; i++)
2785 2847 {
2786 2848  
2787 2849  
... ... @@ -2791,37 +2853,8 @@
2791 2853 totalMap.put("areaCount"+i,String.valueOf(total));
2792 2854 }
2793 2855  
2794   -
2795   - totalMap.put("orgName","合计");
2796   - totalMap.put("fmPoGongCount",String.valueOf(fmPoGongCount));
2797   - totalMap.put("wsCount",String.valueOf(wsCount));
2798   - totalMap.put("chanCount",String.valueOf(chanCount));
2799   - totalMap.put("babySiTaiCount",String.valueOf(babySiTaiCount));
2800   - totalMap.put("girlCount",String.valueOf(girlCount));
2801   - totalMap.put("boyCount",String.valueOf(boyCount));
2802   - totalMap.put("bswsCount",String.valueOf(bswsCount));
2803   - totalMap.put("huoChanCount",String.valueOf(huoChanCount));
2804   - totalMap.put("babySiChanCount",String.valueOf(babySiChanCount));
2805   - totalMap.put("zcBabyCount",String.valueOf(zcBabyCount));
2806   - totalMap.put("huiYinFullCount",String.valueOf(huiYinFullCount));
2807   - totalMap.put("siLielevelCount",String.valueOf(siLielevelCount));
2808   - totalMap.put("siLielevelYzCount",String.valueOf(siLielevelYzCount));
2809   - totalMap.put("queXianBabyCount",String.valueOf(queXianBabyCount));
2810   - totalMap.put("huiYingTotalCount",String.valueOf(huiYingTotalCount));
2811   - totalMap.put("fmShunChanCount",String.valueOf(fmShunChanCount));
2812   -
2813   - totalMap.put("riskCount",String.valueOf(riskCount));
2814   - totalMap.put("fmCount",String.valueOf(fmCount));
2815   - totalMap.put("doubleCount",String.valueOf(doubleCount));
2816   - totalMap.put("huiYinSpitCount",String.valueOf(huiYinSpitCount));
2817   - totalMap.put("fzrDoubleCount",String.valueOf(fzrDoubleCount));
2818   -
2819   - totalMap.put("lowWeightCount","");
2820   - totalMap.put("babySiWangCount","");
2821 2856 totalMap.put("sieveCount","");
2822   - totalMap.put("bigBoyCount","");
2823 2857 totalMap.put("sieveFreeCount","");
2824   - totalMap.put("fmOtherCount","");
2825 2858 list.add(totalMap);
2826 2859 }
2827 2860 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/DueOrgCountWorker.java View file @ 64327ec
... ... @@ -95,6 +95,7 @@
95 95 patientsQuery.setCreatedTimeStart(DateUtil.getSNDate(time)[0]);
96 96 patientsQuery.setCreatedTimeEnd(DateUtil.getSNDate(time)[1]);
97 97 }
  98 + patientsQuery.setHospitalId(hospialId);
98 99 int riskCount = patientsService.queryPatientCount(patientsQuery);
99 100 map.put("riskCount", String.valueOf(riskCount));
100 101  
... ... @@ -104,8 +105,8 @@
104 105 babyModelQuery.setHospitalId(hospialId);
105 106 if (StringUtils.isNotEmpty(time))
106 107 {
107   - babyModelQuery.setBuildDateStart(DateUtil.getSNDate(time)[0]);
108   - babyModelQuery.setBuildDateEnd(DateUtil.getSNDate(time)[1]);
  108 + babyModelQuery.setBirthStart(DateUtil.getSNDate(time)[0]);
  109 + babyModelQuery.setBirthEnd(DateUtil.getSNDate(time)[1]);
109 110 }
110 111 babyModelQuery.setBuildType(2);
111 112 babyModelQuery.setOrder("birth");
... ... @@ -147,8 +148,8 @@
147 148 babyModelQuery1.setBuildType(2);
148 149 if (StringUtils.isNotEmpty(time))
149 150 {
150   - babyModelQuery1.setBuildDateStart(DateUtil.getSNDate(time)[0]);
151   - babyModelQuery1.setBuildDateEnd(DateUtil.getSNDate(time)[1]);
  151 + babyModelQuery1.setBirthStart(DateUtil.getSNDate(time)[0]);
  152 + babyModelQuery1.setBirthEnd(DateUtil.getSNDate(time)[1]);
152 153 }
153 154 babyModelQuery1.setOrder("birth");
154 155 babyModelQuery1.setSex(1);
... ... @@ -163,8 +164,8 @@
163 164  
164 165 if (StringUtils.isNotEmpty(time))
165 166 {
166   - babyModelQuery2.setBuildDateStart(DateUtil.getSNDate(time)[0]);
167   - babyModelQuery2.setBuildDateEnd(DateUtil.getSNDate(time)[1]);
  167 + babyModelQuery2.setBirthStart(DateUtil.getSNDate(time)[0]);
  168 + babyModelQuery2.setBirthEnd(DateUtil.getSNDate(time)[1]);
168 169 }
169 170  
170 171 babyModelQuery2.setBuildType(2);
... ... @@ -279,8 +280,8 @@
279 280 babyModelQuery3.setHospitalId(hospialId);
280 281 if (StringUtils.isNotEmpty(time))
281 282 {
282   - babyModelQuery3.setBuildDateStart(DateUtil.getSNDate(time)[0]);
283   - babyModelQuery3.setBuildDateEnd(DateUtil.getSNDate(time)[1]);
  283 + babyModelQuery3.setBirthStart(DateUtil.getSNDate(time)[0]);
  284 + babyModelQuery3.setBirthEnd(DateUtil.getSNDate(time)[1]);
284 285 }
285 286 //0非畸形 1畸形
286 287 babyModelQuery3.setBuildType(2);
287 288  
288 289  
... ... @@ -335,10 +336,34 @@
335 336 map.put("babySiChanCount", String.valueOf(babySiChanCount));
336 337 map.put("babySiTaiCount", String.valueOf(babySiTaiCount));
337 338  
  339 +
  340 + BabyModelQuery babyModelQuery5 = new BabyModelQuery();
  341 + babyModelQuery5.setDataStatus(false);
  342 + babyModelQuery5.setHospitalId(hospialId);
  343 + if (StringUtils.isNotEmpty(time))
  344 + {
  345 + babyModelQuery5.setBirthStart(DateUtil.getSNDate(time)[0]);
  346 + babyModelQuery5.setBirthEnd(DateUtil.getSNDate(time)[1]);
  347 + }
  348 + babyModelQuery5.setBabyWeightStart("4");
  349 + int bigBoyCount = babyService.queryBabyCount(babyModelQuery5);
  350 +
338 351 //巨大儿数
339   - map.put("bigBoyCount", "");
  352 + map.put("bigBoyCount", String.valueOf(bigBoyCount));
  353 +
  354 +
  355 + BabyModelQuery babyModelQuery6 = new BabyModelQuery();
  356 + babyModelQuery6.setDataStatus(false);
  357 + babyModelQuery6.setHospitalId(hospialId);
  358 + if (StringUtils.isNotEmpty(time))
  359 + {
  360 + babyModelQuery5.setBirthStart(DateUtil.getSNDate(time)[0]);
  361 + babyModelQuery5.setBirthEnd(DateUtil.getSNDate(time)[1]);
  362 + }
  363 + babyModelQuery6.setBabyWeightEnd("2.5");
  364 + int lowWeightCount = babyService.queryBabyCount(babyModelQuery5);
340 365 //低出生体重数
341   - map.put("lowWeightCount", "");
  366 + map.put("lowWeightCount", String.valueOf(lowWeightCount));
342 367  
343 368 //早产儿数
344 369 int zcBabyCount = 0;