liyuanyuan 8 ay önce
ebeveyn
işleme
183d17ca1f

+ 10 - 25
hjzx-api/src/main/java/api/controller/order/WorkOrderBaseController.java

116
         qw.eq(input.getFirsttype()!=null && input.getFirsttype()>0,WorkOrderBase::getFirsttype, input.getFirsttype());
116
         qw.eq(input.getFirsttype()!=null && input.getFirsttype()>0,WorkOrderBase::getFirsttype, input.getFirsttype());
117
         qw.like(!StringHelper.isEmpty(input.getCallnum()), WorkOrderBase::getCallnum, input.getCallnum());
117
         qw.like(!StringHelper.isEmpty(input.getCallnum()), WorkOrderBase::getCallnum, input.getCallnum());
118
         qw.like(!StringHelper.isEmpty(input.getCaller()), WorkOrderBase::getCaller, input.getCaller());
118
         qw.like(!StringHelper.isEmpty(input.getCaller()), WorkOrderBase::getCaller, input.getCaller());
119
-
119
+        qw.eq(!StringHelper.isEmpty(input.getSex()), WorkOrderBase::getSex, input.getSex());
120
 
120
 
121
         qw.like(!StringHelper.isEmpty(input.getWorkordercode()), WorkOrderBase::getWorkordercode, input.getWorkordercode());
121
         qw.like(!StringHelper.isEmpty(input.getWorkordercode()), WorkOrderBase::getWorkordercode, input.getWorkordercode());
122
 
122
 
251
         qw.like(!StringHelper.isEmpty(input.getCallnum()), WorkOrderBase::getCallnum, input.getCallnum());
251
         qw.like(!StringHelper.isEmpty(input.getCallnum()), WorkOrderBase::getCallnum, input.getCallnum());
252
         qw.like(!StringHelper.isEmpty(input.getCaller()), WorkOrderBase::getCaller, input.getCaller());
252
         qw.like(!StringHelper.isEmpty(input.getCaller()), WorkOrderBase::getCaller, input.getCaller());
253
 
253
 
254
-
254
+        qw.eq(!StringHelper.isEmpty(input.getSex()), WorkOrderBase::getSex, input.getSex());
255
         qw.like(!StringHelper.isEmpty(input.getWorkordercode()), WorkOrderBase::getWorkordercode, input.getWorkordercode());
255
         qw.like(!StringHelper.isEmpty(input.getWorkordercode()), WorkOrderBase::getWorkordercode, input.getWorkordercode());
256
 
256
 
257
         qw.eq(input.getRestartsnum() != null && input.getRestartsnum() >= 0, WorkOrderBase::getRestartsnum, input.getRestartsnum());
257
         qw.eq(input.getRestartsnum() != null && input.getRestartsnum() >= 0, WorkOrderBase::getRestartsnum, input.getRestartsnum());
303
             switch (listType) {
303
             switch (listType) {
304
                 //综合查询列表 kfyy 和admin可以看全部工单,其他人只能看见自己创建的或者自己处理的工单
304
                 //综合查询列表 kfyy 和admin可以看全部工单,其他人只能看见自己创建的或者自己处理的工单
305
                 case 0:
305
                 case 0:
306
-//                if(!(roleList.stream().anyMatch(o  -> o.getRoleKey().equals("admin"))  ||   roleList.stream().anyMatch(o -> o.getRoleKey().equals("kfyy"))))
307
-//                {
308
-//
309
-//                    qw.eq(WorkOrderBase::getCreateuser, CurrentUser().getUserName())
310
-//                            .or()
311
-//                            .eq(WorkOrderBase::getDealuser, CurrentUser().getUserName());
312
-//                }
313
-
314
                     break;
306
                     break;
315
                 //(处理人)我的待处理
307
                 //(处理人)我的待处理
316
                 case 1:
308
                 case 1:
440
                         .map(DictData::getDictLabel)
432
                         .map(DictData::getDictLabel)
441
                         .orElse(null) );
433
                         .orElse(null) );
442
             }
434
             }
443
-//        private  String previousPsychotherapyName;
444
-//        private  String concretePlanName;
445
-//        private  String handlingMeasuresName;  if(!StringHelper.isEmpty(orderBase.getTreatNow())){
446
             if(!StringHelper.isEmpty(orderBase.getPreviousPsychotherapy())){
435
             if(!StringHelper.isEmpty(orderBase.getPreviousPsychotherapy())){
447
                 //  if(orderBase.getPreviousPsychotherapy()!=null && orderBase.getPreviousPsychotherapy()>0){
436
                 //  if(orderBase.getPreviousPsychotherapy()!=null && orderBase.getPreviousPsychotherapy()>0){
448
                 orderBase.setPreviousPsychotherapyName(dictDatas.stream()
437
                 orderBase.setPreviousPsychotherapyName(dictDatas.stream()
461
                         .orElse(null) );
450
                         .orElse(null) );
462
             }
451
             }
463
             if(!StringHelper.isEmpty(orderBase.getHandlingMeasures())){
452
             if(!StringHelper.isEmpty(orderBase.getHandlingMeasures())){
464
-                //    if(orderBase.getHandlingMeasures()!=null && orderBase.getHandlingMeasures()>0){
465
-//                orderBase.setHandlingMeasuresName(dictDatas.stream()
466
-//                        .filter(x -> Objects.equals(x.getDictValue(), orderBase.getHandlingMeasures()))
467
-//                        .findFirst()
468
-//                        .map(DictData::getDictLabel)
469
-//                        .orElse(null) );
470
-
471
-
472
                 // 通过Stream过滤并生成新List
453
                 // 通过Stream过滤并生成新List
473
                 String[] targetNames = orderBase.getHandlingMeasures().split(",");
454
                 String[] targetNames = orderBase.getHandlingMeasures().split(",");
474
                 // 转换为Set以提高查询效率
455
                 // 转换为Set以提高查询效率
483
 
464
 
484
 
465
 
485
         List<ExportWorkOrderBaseView>  baseView=  JSON.parseArray(JSON.toJSONString(View),ExportWorkOrderBaseView.class);
466
         List<ExportWorkOrderBaseView>  baseView=  JSON.parseArray(JSON.toJSONString(View),ExportWorkOrderBaseView.class);
486
-
487
-
488
-
489
         ExcelHelper<ExportWorkOrderBaseView> excel = new ExcelHelper<>(ExportWorkOrderBaseView.class);
467
         ExcelHelper<ExportWorkOrderBaseView> excel = new ExcelHelper<>(ExportWorkOrderBaseView.class);
490
         excel.exportExcel("xlsx", baseView);
468
         excel.exportExcel("xlsx", baseView);
491
     }
469
     }
633
                 pt.setIsDelete(0L);
611
                 pt.setIsDelete(0L);
634
                 pt.setSource(PatientSource.CALL.getValue());
612
                 pt.setSource(PatientSource.CALL.getValue());
635
                 pt.setName(input.getCaller());
613
                 pt.setName(input.getCaller());
636
-
614
+                 if(!StringHelper.isEmpty( input.getSex())){
615
+                   if(Objects.equals(input.getSex(), "男")){
616
+                       pt.setSex(1L);
617
+                   }
618
+                     if(Objects.equals(input.getSex(), "女")){
619
+                         pt.setSex(2L);
620
+                     }
621
+                 }
637
                 pt.setPatientId(uuid.toString());
622
                 pt.setPatientId(uuid.toString());
638
                 try {
623
                 try {
639
                     if (StringHelper.isNotBlank(input.getCallnum())) {
624
                     if (StringHelper.isNotBlank(input.getCallnum())) {

+ 2 - 1
hjzx-api/src/main/resources/application-dev.yml

6
   datasource:
6
   datasource:
7
     type: com.alibaba.druid.pool.DruidDataSource
7
     type: com.alibaba.druid.pool.DruidDataSource
8
     driver-class-name: com.mysql.cj.jdbc.Driver
8
     driver-class-name: com.mysql.cj.jdbc.Driver
9
-    url: jdbc:mysql://192.168.1.200:3306/hjzx_xinxiang?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
9
+    #url: jdbc:mysql://192.168.1.200:3306/hjzx_xinxiang?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
10
+    url: jdbc:mysql://192.168.1.8:3306/xlrx?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
10
     username: root
11
     username: root
11
     password: 800100
12
     password: 800100
12
 
13
 

+ 6 - 0
hjzx-entity/src/main/java/api/entity/database/order/WorkOrderBase.java

8
 import io.swagger.annotations.ApiModel;
8
 import io.swagger.annotations.ApiModel;
9
 import io.swagger.annotations.ApiModelProperty;
9
 import io.swagger.annotations.ApiModelProperty;
10
 import lombok.Data;
10
 import lombok.Data;
11
+import org.springframework.format.annotation.DateTimeFormat;
11
 
12
 
12
 import java.util.ArrayList;
13
 import java.util.ArrayList;
13
 import java.util.Date;
14
 import java.util.Date;
57
     private String result;
58
     private String result;
58
     /** createtime */
59
     /** createtime */
59
     @ApiModelProperty("createtime")
60
     @ApiModelProperty("createtime")
61
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
60
     private Date createtime;
62
     private Date createtime;
61
     /** endtime */
63
     /** endtime */
62
     @ApiModelProperty("endtime")
64
     @ApiModelProperty("endtime")
65
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
63
     private Date endtime;
66
     private Date endtime;
64
     /** createuser */
67
     /** createuser */
65
     @ApiModelProperty("createuser")
68
     @ApiModelProperty("createuser")
187
 
190
 
188
     @ApiModelProperty("年龄分组")
191
     @ApiModelProperty("年龄分组")
189
     private String ageGroup;
192
     private String ageGroup;
193
+
194
+    @ApiModelProperty("性别")
195
+    private String sex;
190
 }
196
 }

+ 1 - 1
hjzx-entity/src/main/java/api/entity/database/patient/Patient.java

47
     @ApiModelProperty("住址")
47
     @ApiModelProperty("住址")
48
     private String address;
48
     private String address;
49
     /** 性别 */
49
     /** 性别 */
50
-    @ApiModelProperty("性别")
50
+    @ApiModelProperty("性别,0未知 1男2女")
51
     private Long sex;
51
     private Long sex;
52
     /** 医保卡号 */
52
     /** 医保卡号 */
53
     @ApiModelProperty("医保卡号")
53
     @ApiModelProperty("医保卡号")

+ 4 - 1
hjzx-entity/src/main/java/api/entity/view/order/ExportWorkOrderBaseView.java

112
 
112
 
113
     @ApiModelProperty("年龄分组")
113
     @ApiModelProperty("年龄分组")
114
     private String ageGroup;
114
     private String ageGroup;
115
-
115
+    @ApiModelProperty("性别")
116
+    private  String  sex;
116
     @ApiModelProperty("学历")
117
     @ApiModelProperty("学历")
117
     private  String gradeName;
118
     private  String gradeName;
118
     @ApiModelProperty("婚姻情况")
119
     @ApiModelProperty("婚姻情况")
138
 
139
 
139
 
140
 
140
 
141
 
142
+
143
+
141
 }
144
 }

+ 9 - 3
hjzx-util/src/main/java/api/util/helper/ExcelHelper.java

316
             cellStyle.setBorderLeft(BorderStyle.THIN);
316
             cellStyle.setBorderLeft(BorderStyle.THIN);
317
             cellStyle.setBorderRight(BorderStyle.THIN);
317
             cellStyle.setBorderRight(BorderStyle.THIN);
318
             cellStyle.setAlignment(HorizontalAlignment.CENTER);
318
             cellStyle.setAlignment(HorizontalAlignment.CENTER);
319
-
319
+            cellStyle.setWrapText(true); // 启用自动换行
320
 
320
 
321
             int limit=60000;
321
             int limit=60000;
322
             int rowindex=0;
322
             int rowindex=0;
350
                         }
350
                         }
351
                     }
351
                     }
352
                 }
352
                 }
353
-                sheet.setColumnWidth(columnNum, columnWidth * 256);
353
+                columnWidth = Math.min(columnWidth, 255);
354
+               sheet.setColumnWidth(columnNum, columnWidth * 256);
355
+
356
+               // sheet.autoSizeColumn(columnNum);
354
             }
357
             }
355
 
358
 
356
 
359
 
582
                         }
585
                         }
583
                     }
586
                     }
584
                 }
587
                 }
588
+                columnWidth = Math.min(columnWidth, 255);
585
                 sheet.setColumnWidth(columnNum, columnWidth * 256);
589
                 sheet.setColumnWidth(columnNum, columnWidth * 256);
590
+              //  sheet.autoSizeColumn(columnNum);
586
             }
591
             }
587
 
592
 
588
 
593
 
605
                 out.write(JSON.toJSONString(map));
610
                 out.write(JSON.toJSONString(map));
606
                 out.flush();
611
                 out.flush();
607
                 out.close();
612
                 out.close();
608
-            } catch (IOException ex) {
613
+             } catch (IOException ex) {
609
                 throw new RuntimeException(ex);
614
                 throw new RuntimeException(ex);
610
             }
615
             }
611
         }
616
         }
678
                         }
683
                         }
679
                     }
684
                     }
680
                 }
685
                 }
686
+                columnWidth = Math.min(columnWidth, 255);
681
                 sheet.setColumnWidth(columnNum, columnWidth * 256);
687
                 sheet.setColumnWidth(columnNum, columnWidth * 256);
682
             }
688
             }
683
 
689