Commit fc426da2c8d36f584aad16abc25370abfdfef305

Authored by zhangchao
1 parent 774a99120e
Exists in luanping

#fix:优化威县五色专案管理新增高危、医生账号等接口

Showing 3 changed files with 120 additions and 24 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientWxController.java View file @ fc426da
... ... @@ -292,15 +292,7 @@
292 292 return stopPregnancyFacade.queryInPerson2(userId);
293 293 }
294 294  
295   - /**
296   - * 危急列表
297   - * @param response
298   - * @param page
299   - * @param limit
300   - * @param cardNo
301   - * @param phone
302 295  
303   - */
304 296 /*@RequestMapping(value = "/wx/lisCrisisItems", method = RequestMethod.GET)
305 297 public void getEmergenceTreatments(HttpServletResponse response,
306 298 @RequestHeader("Authorization")String authorization,
307 299  
... ... @@ -395,14 +387,14 @@
395 387 return patientFacade.findPatient2(request, userId);
396 388 }
397 389  
398   - /* @RequestMapping(method = RequestMethod.GET, value = "/wx/getGongGaoCurve")
  390 + @RequestMapping(method = RequestMethod.GET, value = "/wx/getGongGaoCurve")
399 391 @ResponseBody
400 392 public BaseResponse getGongGaoLine(@RequestParam(required = true) String patientId, @RequestHeader("Authorization")String authorization) {
401 393 if (!authorization.contains(Authorization)){
402 394 return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常");
403 395 }
404 396 return antenatalExaminationFacade.getGongGaoLine(patientId, userId);
405   - }*/
  397 + }
406 398  
407 399 @RequestMapping(method = RequestMethod.GET, value = "/wx/antex")
408 400 @ResponseBody
... ... @@ -556,7 +548,7 @@
556 548 return br;
557 549 }
558 550  
559   - /* @Autowired
  551 + @Autowired
560 552 private LisFacade lisFacade;
561 553  
562 554 @RequestMapping(method = RequestMethod.GET, value = "/dt/getLisAndRisData")
... ... @@ -576,7 +568,7 @@
576 568 return lisFacade.getLisAndRisData(vcCardNo,sINCard, phone,cardNo, sortType,perType, userName,userId);
577 569 }
578 570  
579   - *//**
  571 + /**
580 572 * 增加产检高危手册(大同)
581 573 * @param antExHighRiskModel
582 574 * @return
583 575  
584 576  
585 577  
... ... @@ -1133,17 +1125,16 @@
1133 1125 }
1134 1126 Map<String,String> params=new HashMap<>();
1135 1127 if (doctors.contains(doctor)){
1136   - doctor="孙慧洁";
  1128 + doctor="牛向静";
1137 1129 }
1138 1130 params.put("doctor",doctor);
1139 1131 params.put("ksrq",date);
1140 1132 params.put("jsrq",date);
1141   - HttpClientUtil.doGet("http://192.168.5.23:9090/dtdyrm/getdtAppointment" ,params,"utf-8",null);
  1133 + HttpClientUtil.doGet("http://172.26.1.190:9090/xtwx/getAppointment" ,params,"utf-8",null);
1142 1134 return new BaseResponse();
1143 1135 }
1144   - /*@Autowired
1145   - private IdtdyrmFmService idtdyrmFmService;
1146 1136  
  1137 +
1147 1138 //导出
1148 1139 @ResponseBody
1149 1140 @RequestMapping(value = "/wx/appointment/export", method = RequestMethod.GET)
... ... @@ -1160,8 +1151,8 @@
1160 1151 if (doctors.contains(doctor)){
1161 1152 doctor="孙慧洁";
1162 1153 }
1163   - idtdyrmFmService.reportAppointmentList(response,doctor,startTime,endTime,name,doctorName);
1164   - }*/
  1154 + patientFacade.reportAppointmentList(response,doctor,startTime,endTime,name,doctorName);
  1155 + }
1165 1156  
1166 1157  
1167 1158  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ fc426da
... ... @@ -24,14 +24,11 @@
24 24 import com.lyms.platform.operate.web.service.impl.CervicalCancerServiceImpl;
25 25 import com.lyms.platform.operate.web.utils.CommonsHelper;
26 26 import com.lyms.platform.operate.web.utils.JxlsUtils;
  27 +import com.lyms.platform.operate.web.utils.ResponseUtil;
27 28 import com.lyms.platform.operate.web.worker.*;
28 29 import com.lyms.platform.permission.dao.master.CouponMapper;
29   -import com.lyms.platform.permission.model.Organization;
30   -import com.lyms.platform.permission.model.OrganizationQuery;
31   -import com.lyms.platform.permission.model.Users;
32   -import com.lyms.platform.permission.service.CouponService;
33   -import com.lyms.platform.permission.service.OrganizationService;
34   -import com.lyms.platform.permission.service.UsersService;
  30 +import com.lyms.platform.permission.model.*;
  31 +import com.lyms.platform.permission.service.*;
35 32 import com.lyms.platform.pojo.*;
36 33 import com.lyms.platform.query.*;
37 34 import org.apache.commons.collections.CollectionUtils;
... ... @@ -3699,5 +3696,111 @@
3699 3696 private PremaritalCheckupFacade premaritalCheckupFacade;
3700 3697 @Autowired
3701 3698 private ResidentsArchiveFacade residentsArchiveFacade;
  3699 + @Autowired
  3700 + private AppointmentService appointmentService;
  3701 + @Autowired
  3702 + private PatientServiceService patientServiceService;
  3703 +
  3704 + public void reportAppointmentList(HttpServletResponse response, String doctor, String startTime, String endTime, String name, String doctorName) {
  3705 + Map<String, String> cnames = new LinkedHashMap<>();
  3706 + cnames.put("建档状态", "建档状态");
  3707 + cnames.put("就诊卡号", "就诊卡号");
  3708 + cnames.put("就诊次数", "就诊次数");
  3709 + cnames.put("姓名", "姓名");
  3710 + cnames.put("服务开始时间", "服务开始时间");
  3711 + cnames.put("服务截止时间", "服务截止时间");
  3712 + cnames.put("手机号", "手机号");
  3713 + cnames.put("证件号", "证件号");
  3714 + cnames.put("出生日期", "出生日期");
  3715 + cnames.put("建档时间", "建档时间");
  3716 + cnames.put("就诊时间", "就诊时间");
  3717 + cnames.put("就诊医生", "就诊医生");
  3718 + cnames.put("科室", "科室");
  3719 + cnames.put("预约时间", "预约时间");
  3720 + String dept=null;
  3721 + if ("孙慧洁".equals(doctor)){
  3722 + dept="产科";
  3723 + doctor=doctorName;
  3724 + }
  3725 + AppointmentQuery appointmentQuery=new AppointmentQuery();
  3726 + appointmentQuery.setDoctor(doctor);
  3727 + appointmentQuery.setStartTime(startTime);
  3728 + appointmentQuery.setEndTime(endTime);
  3729 + appointmentQuery.setDept(dept);
  3730 + appointmentQuery.setName(name);
  3731 + List<AppointmentModel> list= appointmentService.queryAppointment(appointmentQuery);
  3732 + List<Map<String, Object>> results = new ArrayList<>();
  3733 + if (CollectionUtils.isNotEmpty(list)) {
  3734 + PatientsQuery patientsQuery =new PatientsQuery();
  3735 + patientsQuery.setYn(1);
  3736 + patientsQuery.setHospitalId("2100002419");
  3737 + for (AppointmentModel appointmentModel : list) {
  3738 +
  3739 + Map<String, Object> result = new LinkedHashMap<>();
  3740 + String idCard=appointmentModel.getIdCard();
  3741 + String phone=appointmentModel.getPhone();
  3742 + String username=appointmentModel.getName();
  3743 + if (StringUtils.isNotEmpty(idCard)){
  3744 + patientsQuery.setName(null);
  3745 + patientsQuery.setPhone(null);
  3746 + patientsQuery.setCardNo(idCard);
  3747 + }else {
  3748 + if (StringUtils.isNotEmpty(username)&&StringUtils.isNotEmpty(phone)){
  3749 + patientsQuery.setCardNo(null);
  3750 + patientsQuery.setName(username);
  3751 + patientsQuery.setPhone(phone);
  3752 + }else {
  3753 + appointmentModel.setIsBuild(0);
  3754 + appointmentQuery.setIdCard(idCard);
  3755 + appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery));
  3756 +
  3757 + }
  3758 + }
  3759 + if (appointmentModel.getIsBuild()==null){
  3760 + List<Patients> patientsList= patientsService.queryPatient(patientsQuery);
  3761 + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(patientsList)){
  3762 + appointmentModel.setIsBuild(1);
  3763 + Patients patients= patientsList.get(0);
  3764 + appointmentModel.setBookbuildingDate(patients.getBookbuildingDate());
  3765 + PatientServiceQuery patientQuery = new PatientServiceQuery();
  3766 + patientQuery.setParentid(patients.getId());
  3767 + patientQuery.setSerType(1);
  3768 +
  3769 + List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery);
  3770 + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(patientServices)){
  3771 + Date serEndTime= patientServices.get(0).getSerEndTime();
  3772 + Date serStartTime=patientServices.get(0).getUpdateDate();
  3773 + appointmentModel.setSerEndTime(serEndTime);
  3774 + appointmentModel.setSerStartTime(serStartTime);
  3775 + result.put("服务截止时间", DateUtil.gety_m_dhm(appointmentModel.getSerEndTime()));
  3776 + }
  3777 + }else {
  3778 + appointmentModel.setIsBuild(0);
  3779 + if (appointmentModel.getAppointmentNum()==null || appointmentModel.getAppointmentNum()==0){
  3780 + appointmentQuery.setIdCard(idCard);
  3781 + appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery));
  3782 + }
  3783 + }
  3784 + }
  3785 + result.put("建档状态",appointmentModel.getIsBuild()==1?"已建档":"未建档");
  3786 + result.put("就诊卡号", appointmentModel.getVccardNo());
  3787 + result.put("就诊次数",appointmentModel.getAppointmentNum());
  3788 + result.put("姓名", appointmentModel.getName());
  3789 + result.put("手机号", appointmentModel.getPhone());
  3790 + result.put("证件号", appointmentModel.getIdCard());
  3791 + result.put("出生日期",appointmentModel.getAge());
  3792 + result.put("服务开始时间",DateUtil.gety_m_dhm(appointmentModel.getSerStartTime()));
  3793 + result.put("服务截至时间",DateUtil.gety_m_dhm(appointmentModel.getSerEndTime()));
  3794 + result.put("建档时间",DateUtil.getYyyyMmDd(appointmentModel.getBookbuildingDate()));
  3795 + result.put("就诊时间",DateUtil.gety_m_dhm(appointmentModel.getCheckTime()));
  3796 + result.put("就诊医生",StringUtils.isNotEmpty(appointmentModel.getDoctor())?appointmentModel.getDoctor():"-");
  3797 + result.put("科室", appointmentModel.getDept());
  3798 + result.put("预约时间",DateUtil.gety_m_dhm(appointmentModel.getCreated()));
  3799 + results.add(result);
  3800 +
  3801 + }
  3802 + }
  3803 + ResponseUtil.responseExcel(cnames, results, response);
  3804 + }
3702 3805 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/StopPregnancyFacade.java View file @ fc426da
... ... @@ -638,6 +638,8 @@
638 638 pmap.put("id", user.getId());
639 639 pmap.put("name", user.getName());
640 640 pmap.put("deptId", user.getDeptId());
  641 + pmap.put("account",user.getAccount());
  642 + pmap.put("x",user.getPwd());
641 643 list.add(pmap);
642 644 }
643 645 }