Commit 777757e75f702672809c6bef65ac81db95babd59

Authored by zhangchao
1 parent 24e4d9a46a
Exists in dev

#fix:优化门诊页面新增未建档患者问诊次数

Showing 7 changed files with 46 additions and 3 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/model/AppointmentQuery.java View file @ 777757e
... ... @@ -8,6 +8,15 @@
8 8 private String endTime;
9 9 private String name;
10 10 private String dept;
  11 + private String idCard;
  12 +
  13 + public String getIdCard() {
  14 + return idCard;
  15 + }
  16 +
  17 + public void setIdCard(String idCard) {
  18 + this.idCard = idCard;
  19 + }
11 20  
12 21 public String getDoctor() {
13 22 return doctor;
platform-biz-service/src/main/java/com/lyms/platform/permission/service/AppointmentService.java View file @ 777757e
... ... @@ -8,6 +8,6 @@
8 8  
9 9 public interface AppointmentService {
10 10 List<AppointmentModel> queryAppointment(AppointmentQuery appointmentQuery);
11   -
  11 + int queryAppointmentCount(AppointmentQuery appointmentQuery);
12 12 }
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/AppointmentServiceImpl.java View file @ 777757e
... ... @@ -28,5 +28,10 @@
28 28 }
29 29 return appointmentMapper.queryAppointment(appointmentQuery);
30 30 }
  31 +
  32 + @Override
  33 + public int queryAppointmentCount(AppointmentQuery appointmentQuery) {
  34 + return appointmentMapper.queryAppointmentCount(appointmentQuery);
  35 + }
31 36 }
platform-biz-service/src/main/resources/mainOrm/master/AppointmentMapper.xml View file @ 777757e
... ... @@ -30,7 +30,9 @@
30 30 <if test="doctor!=null">
31 31 and doctor=#{doctor}
32 32 </if>
33   -
  33 + <if test="idCard!=null">
  34 + and idCard=#{idCard}
  35 + </if>
34 36 <if test="name!=null">
35 37 and (name like concat('%',#{name},'%') or pinyin like concat('%',#{name},'%'))
36 38 </if>
... ... @@ -49,7 +51,9 @@
49 51 <if test="doctor!=null">
50 52 and doctor=#{doctor}
51 53 </if>
52   -
  54 + <if test="idCard!=null">
  55 + and idCard=#{idCard}
  56 + </if>
53 57 <if test="name!=null">
54 58 and (name like concat('%',#{name},'%') or pinyin like concat('%',#{name},'%'))
55 59 </if>
platform-dal/src/main/java/com/lyms/platform/pojo/AppointmentModel.java View file @ 777757e
... ... @@ -33,6 +33,16 @@
33 33 private Date created;
34 34 @Transient
35 35 private List<Map> rlevel;//高危风险颜色
  36 + @Transient
  37 + private Integer appointmentNum;//未建档用户就诊次数
  38 +
  39 + public Integer getAppointmentNum() {
  40 + return appointmentNum;
  41 + }
  42 +
  43 + public void setAppointmentNum(Integer appointmentNum) {
  44 + this.appointmentNum = appointmentNum;
  45 + }
36 46  
37 47 public List<Map> getrlevel() {
38 48 return rlevel;
platform-operate-api/src/main/java/com/lyms/hospitalapi/dtdyrm/DtdyrmFmService.java View file @ 777757e
... ... @@ -597,6 +597,7 @@
597 597 Map<String, String> cnames = new LinkedHashMap<>();
598 598 cnames.put("建档状态", "建档状态");
599 599 cnames.put("就诊卡号", "就诊卡号");
  600 + cnames.put("就诊次数", "就诊次数");
600 601 cnames.put("姓名", "姓名");
601 602 cnames.put("服务截止时间", "服务截止时间");
602 603 cnames.put("手机号", "手机号");
... ... @@ -636,6 +637,9 @@
636 637 patientsQuery.setPhone(phone);
637 638 }else {
638 639 appointmentModel.setIsBuild(0);
  640 + appointmentQuery.setIdCard(idCard);
  641 + appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery));
  642 +
639 643 }
640 644 }
641 645 if (appointmentModel.getIsBuild()==null){
642 646  
... ... @@ -655,10 +659,15 @@
655 659 }
656 660 }else {
657 661 appointmentModel.setIsBuild(0);
  662 + if (appointmentModel.getAppointmentNum()==null || appointmentModel.getAppointmentNum()==0){
  663 + appointmentQuery.setIdCard(idCard);
  664 + appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery));
  665 + }
658 666 }
659 667 }
660 668 result.put("建档状态",appointmentModel.getIsBuild()==1?"已建档":"未建档");
661 669 result.put("就诊卡号", appointmentModel.getVccardNo());
  670 + result.put("就诊次数",appointmentModel.getAppointmentNum());
662 671 result.put("姓名", appointmentModel.getName());
663 672 result.put("手机号", appointmentModel.getPhone());
664 673 result.put("证件号", appointmentModel.getIdCard());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java View file @ 777757e
... ... @@ -694,6 +694,8 @@
694 694 }else {
695 695 appointmentModel.setIsBuild(0);
696 696 appointmentModel.setExpire(1);
  697 + appointmentQuery.setIdCard(idCard);
  698 + appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery));
697 699 }
698 700 }
699 701 if (appointmentModel.getIsBuild()==null){
... ... @@ -740,6 +742,10 @@
740 742 }else {
741 743 appointmentModel.setIsBuild(0);
742 744 appointmentModel.setExpire(1);
  745 + if (appointmentModel.getAppointmentNum()==null || appointmentModel.getAppointmentNum()==0){
  746 + appointmentQuery.setIdCard(idCard);
  747 + appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery));
  748 + }
743 749 }
744 750 }
745 751 if (isBuild!=null){