Commit 2ea136ec39fa2a4b7530d5e57333c7ad8a35a65f
1 parent
dd419b0abe
Exists in
dev
#fix:优化预约挂号列表新增体重营养报告相关功能
Showing 10 changed files with 369 additions and 28 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/AppointmentMapper.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/AppointmentQuery.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/AppointmentService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/AppointmentServiceImpl.java
- platform-biz-service/src/main/resources/mainOrm/master/AppointmentMapper.xml
- platform-operate-api/src/main/java/com/lyms/hospitalapi/dtdyrm/DtdyrmFmService.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/dtdyrm/IdtdyrmFmService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java
View file @
2ea136e
| ... | ... | @@ -122,7 +122,7 @@ | 
| 122 | 122 | patientsQuery.mysqlBuild(iPatientDao.queryPatientCount(query)); | 
| 123 | 123 | query.start(patientsQuery.getOffset()).end(patientsQuery.getLimit()); | 
| 124 | 124 | } | 
| 125 | - //System.out.println(patientsQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 125 | + // System.out.println(patientsQuery.convertToQuery().convertToMongoQuery().toString()); | |
| 126 | 126 | return iPatientDao.queryPatient(query.addOrder(Sort.Direction.DESC, field)); | 
| 127 | 127 | } | 
| 128 | 128 | 
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/AppointmentMapper.java
View file @
2ea136e
| 1 | 1 | package com.lyms.platform.permission.dao.master; | 
| 2 | 2 | |
| 3 | +import com.lyms.platform.permission.model.AppointmentQuery; | |
| 3 | 4 | import com.lyms.platform.pojo.AppointmentModel; | 
| 4 | -import org.apache.ibatis.annotations.Param; | |
| 5 | 5 | |
| 6 | -import java.util.Date; | |
| 7 | 6 | import java.util.List; | 
| 8 | 7 | |
| 9 | 8 | public interface AppointmentMapper { | 
| 10 | - List<AppointmentModel> queryAppointment(@Param("doctor") String doctor, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("name")String name,@Param("dept")String dept); | |
| 9 | + List<AppointmentModel> queryAppointment(AppointmentQuery appointmentQuery); | |
| 10 | + int queryAppointmentCount(AppointmentQuery appointmentQuery); | |
| 11 | 11 | } | 
platform-biz-service/src/main/java/com/lyms/platform/permission/model/AppointmentQuery.java
View file @
2ea136e
| 1 | +package com.lyms.platform.permission.model; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.dao.BaseQuery; | |
| 4 | + | |
| 5 | +public class AppointmentQuery extends BaseQuery { | |
| 6 | + private String doctor; | |
| 7 | + private String startTime; | |
| 8 | + private String endTime; | |
| 9 | + private String name; | |
| 10 | + private String dept; | |
| 11 | + | |
| 12 | + public String getDoctor() { | |
| 13 | + return doctor; | |
| 14 | + } | |
| 15 | + | |
| 16 | + public void setDoctor(String doctor) { | |
| 17 | + this.doctor = doctor; | |
| 18 | + } | |
| 19 | + | |
| 20 | + public String getStartTime() { | |
| 21 | + return startTime; | |
| 22 | + } | |
| 23 | + | |
| 24 | + public void setStartTime(String startTime) { | |
| 25 | + this.startTime = startTime; | |
| 26 | + } | |
| 27 | + | |
| 28 | + public String getEndTime() { | |
| 29 | + return endTime; | |
| 30 | + } | |
| 31 | + | |
| 32 | + public void setEndTime(String endTime) { | |
| 33 | + this.endTime = endTime; | |
| 34 | + } | |
| 35 | + | |
| 36 | + public String getName() { | |
| 37 | + return name; | |
| 38 | + } | |
| 39 | + | |
| 40 | + public void setName(String name) { | |
| 41 | + this.name = name; | |
| 42 | + } | |
| 43 | + | |
| 44 | + public String getDept() { | |
| 45 | + return dept; | |
| 46 | + } | |
| 47 | + | |
| 48 | + public void setDept(String dept) { | |
| 49 | + this.dept = dept; | |
| 50 | + } | |
| 51 | +} | 
platform-biz-service/src/main/java/com/lyms/platform/permission/service/AppointmentService.java
View file @
2ea136e
| 1 | 1 | package com.lyms.platform.permission.service; | 
| 2 | 2 | |
| 3 | +import com.lyms.platform.permission.model.AppointmentQuery; | |
| 3 | 4 | import com.lyms.platform.pojo.AppointmentModel; | 
| 4 | 5 | |
| 6 | +import javax.servlet.http.HttpServletResponse; | |
| 5 | 7 | import java.util.List; | 
| 6 | 8 | |
| 7 | 9 | public interface AppointmentService { | 
| 8 | - List<AppointmentModel> queryAppointment(String doctor, String startTime, String endTime,String name,String doctorName); | |
| 10 | + List<AppointmentModel> queryAppointment(AppointmentQuery appointmentQuery); | |
| 9 | 11 | |
| 10 | 12 | } | 
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/AppointmentServiceImpl.java
View file @
2ea136e
| 1 | 1 | package com.lyms.platform.permission.service.impl; | 
| 2 | 2 | |
| 3 | +import com.lyms.platform.common.utils.StringUtils; | |
| 3 | 4 | import com.lyms.platform.permission.dao.master.AppointmentMapper; | 
| 5 | +import com.lyms.platform.permission.model.AppointmentQuery; | |
| 4 | 6 | import com.lyms.platform.permission.service.AppointmentService; | 
| 5 | 7 | import com.lyms.platform.pojo.AppointmentModel; | 
| 8 | +import com.lyms.platform.pojo.DtFm; | |
| 9 | +import org.apache.commons.collections.CollectionUtils; | |
| 6 | 10 | import org.springframework.beans.factory.annotation.Autowired; | 
| 7 | 11 | import org.springframework.stereotype.Service; | 
| 8 | 12 | |
| 13 | +import javax.servlet.http.HttpServletResponse; | |
| 9 | 14 | import java.util.ArrayList; | 
| 15 | +import java.util.LinkedHashMap; | |
| 10 | 16 | import java.util.List; | 
| 17 | +import java.util.Map; | |
| 18 | + | |
| 11 | 19 | @Service("appointmentService") | 
| 12 | 20 | public class AppointmentServiceImpl implements AppointmentService { | 
| 13 | 21 | @Autowired | 
| 14 | 22 | private AppointmentMapper appointmentMapper; | 
| 15 | 23 | |
| 16 | 24 | @Override | 
| 17 | - public List<AppointmentModel> queryAppointment(String doctor, String startTime, String endTime,String name,String doctorName) { | |
| 18 | - String dept=null; | |
| 19 | - if ("孙慧洁".equals(doctor)){ | |
| 20 | - dept="产科"; | |
| 21 | - doctor=doctorName; | |
| 25 | + public List<AppointmentModel> queryAppointment(AppointmentQuery appointmentQuery) { | |
| 26 | + if (StringUtils.isNotEmpty(appointmentQuery.getNeed())){ | |
| 27 | + appointmentQuery.mysqlBuild( appointmentMapper.queryAppointmentCount(appointmentQuery)); | |
| 22 | 28 | } | 
| 23 | - return appointmentMapper.queryAppointment(doctor,startTime,endTime,name,dept); | |
| 29 | + return appointmentMapper.queryAppointment(appointmentQuery); | |
| 24 | 30 | } | 
| 25 | 31 | } | 
platform-biz-service/src/main/resources/mainOrm/master/AppointmentMapper.xml
View file @
2ea136e
| ... | ... | @@ -17,14 +17,37 @@ | 
| 17 | 17 | <result property="created" column="created" jdbcType="TIMESTAMP"/> | 
| 18 | 18 | <result property="checkTime" column="checkTime" jdbcType="TIMESTAMP"/> | 
| 19 | 19 | </resultMap> | 
| 20 | + <sql id="orderAndLimit"> | |
| 21 | + <if test="need != null"> | |
| 22 | + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} | |
| 23 | + </if> | |
| 24 | + </sql> | |
| 20 | 25 | |
| 21 | - | |
| 22 | - <select id="queryAppointment" resultMap="BaseResultMap"> | |
| 26 | + <select id="queryAppointment" resultMap="BaseResultMap" parameterType="com.lyms.platform.permission.model.AppointmentQuery"> | |
| 23 | 27 | select * from appointment | 
| 24 | 28 | where | 
| 25 | 29 | 1=1 | 
| 26 | 30 | <if test="doctor!=null"> | 
| 27 | 31 | and doctor=#{doctor} | 
| 32 | + </if> | |
| 33 | + | |
| 34 | + <if test="name!=null"> | |
| 35 | + and (name like concat('%',#{name},'%') or pinyin like concat('%',#{name},'%')) | |
| 36 | + </if> | |
| 37 | + <if test="dept!=null"> | |
| 38 | + and (dept like concat(#{dept},'%') or dept like concat("产后",'%')) | |
| 39 | + </if> | |
| 40 | + and <![CDATA[checkTime>=#{startTime}]]> | |
| 41 | + and <![CDATA[checkTime<=#{endTime}]]> | |
| 42 | + <include refid="orderAndLimit"/> | |
| 43 | + </select> | |
| 44 | + | |
| 45 | + <select id="queryAppointmentCount" resultType="int" parameterType="com.lyms.platform.permission.model.AppointmentQuery"> | |
| 46 | + select count(id) from appointment | |
| 47 | + where | |
| 48 | + 1=1 | |
| 49 | + <if test="doctor!=null"> | |
| 50 | + and doctor=#{doctor} | |
| 28 | 51 | </if> | 
| 29 | 52 | |
| 30 | 53 | <if test="name!=null"> | 
platform-operate-api/src/main/java/com/lyms/hospitalapi/dtdyrm/DtdyrmFmService.java
View file @
2ea136e
| ... | ... | @@ -9,6 +9,7 @@ | 
| 9 | 9 | import com.lyms.platform.common.result.BaseResponse; | 
| 10 | 10 | import com.lyms.platform.common.utils.DateUtil; | 
| 11 | 11 | import com.lyms.platform.common.utils.ExceptionUtils; | 
| 12 | +import com.lyms.platform.common.utils.JsonUtil; | |
| 12 | 13 | import com.lyms.platform.common.utils.StringUtils; | 
| 13 | 14 | import com.lyms.platform.operate.web.facade.AutoMatchFacade; | 
| 14 | 15 | import com.lyms.platform.operate.web.facade.MatDeliverFacade; | 
| 15 | 16 | |
| 16 | 17 | |
| ... | ... | @@ -16,15 +17,12 @@ | 
| 16 | 17 | import com.lyms.platform.operate.web.request.MatDeliverAddRequest; | 
| 17 | 18 | import com.lyms.platform.operate.web.result.FmResult; | 
| 18 | 19 | import com.lyms.platform.operate.web.utils.ResponseUtil; | 
| 19 | -import com.lyms.platform.permission.model.DtFmQuery; | |
| 20 | -import com.lyms.platform.permission.model.Users; | |
| 21 | -import com.lyms.platform.permission.model.UsersQuery; | |
| 20 | +import com.lyms.platform.permission.model.*; | |
| 21 | +import com.lyms.platform.permission.service.AppointmentService; | |
| 22 | 22 | import com.lyms.platform.permission.service.DeliveryService; | 
| 23 | +import com.lyms.platform.permission.service.PatientServiceService; | |
| 23 | 24 | import com.lyms.platform.permission.service.UsersService; | 
| 24 | -import com.lyms.platform.pojo.DtFm; | |
| 25 | -import com.lyms.platform.pojo.MaternalDeliverModel; | |
| 26 | -import com.lyms.platform.pojo.Patients; | |
| 27 | -import com.lyms.platform.pojo.PersonModel; | |
| 25 | +import com.lyms.platform.pojo.*; | |
| 28 | 26 | import com.lyms.platform.query.PatientsQuery; | 
| 29 | 27 | import org.apache.commons.collections.CollectionUtils; | 
| 30 | 28 | import org.springframework.beans.BeanUtils; | 
| ... | ... | @@ -588,6 +586,92 @@ | 
| 588 | 586 | |
| 589 | 587 | |
| 590 | 588 | } | 
| 589 | + } | |
| 590 | + | |
| 591 | + @Autowired | |
| 592 | + private AppointmentService appointmentService; | |
| 593 | + @Autowired | |
| 594 | + private PatientServiceService patientServiceService; | |
| 595 | + @Override | |
| 596 | + public void reportAppointmentList(HttpServletResponse response, String doctor, String startTime, String endTime, String name, String doctorName) { | |
| 597 | + Map<String, String> cnames = new LinkedHashMap<>(); | |
| 598 | + cnames.put("建档状态", "建档状态"); | |
| 599 | + cnames.put("就诊卡号", "就诊卡号"); | |
| 600 | + cnames.put("姓名", "姓名"); | |
| 601 | + cnames.put("服务截止时间", "服务截止时间"); | |
| 602 | + cnames.put("手机号", "手机号"); | |
| 603 | + cnames.put("证件号", "证件号"); | |
| 604 | + cnames.put("出生日期", "出生日期"); | |
| 605 | + cnames.put("就诊时间", "就诊时间"); | |
| 606 | + cnames.put("就诊医生", "就诊医生"); | |
| 607 | + cnames.put("科室", "科室"); | |
| 608 | + cnames.put("预约时间", "预约时间"); | |
| 609 | + String dept=null; | |
| 610 | + if ("孙慧洁".equals(doctor)){ | |
| 611 | + dept="产科"; | |
| 612 | + doctor=doctorName; | |
| 613 | + } | |
| 614 | + AppointmentQuery appointmentQuery=new AppointmentQuery(); | |
| 615 | + appointmentQuery.setDoctor(doctor); | |
| 616 | + appointmentQuery.setStartTime(startTime); | |
| 617 | + appointmentQuery.setEndTime(endTime); | |
| 618 | + appointmentQuery.setDept(dept); | |
| 619 | + appointmentQuery.setName(name); | |
| 620 | + List<AppointmentModel> list= appointmentService.queryAppointment(appointmentQuery); | |
| 621 | + List<Map<String, Object>> results = new ArrayList<>(); | |
| 622 | + if (CollectionUtils.isNotEmpty(list)) { | |
| 623 | + PatientsQuery patientsQuery =new PatientsQuery(); | |
| 624 | + patientsQuery.setYn(1); | |
| 625 | + patientsQuery.setHospitalId("2100002419"); | |
| 626 | + for (AppointmentModel appointmentModel : list) { | |
| 627 | + Map<String, Object> result = new LinkedHashMap<>(); | |
| 628 | + String idCard=appointmentModel.getIdCard(); | |
| 629 | + String phone=appointmentModel.getPhone(); | |
| 630 | + String username=appointmentModel.getName(); | |
| 631 | + if (StringUtils.isNotEmpty(idCard)){ | |
| 632 | + patientsQuery.setCardNo(idCard); | |
| 633 | + }else { | |
| 634 | + if (StringUtils.isNotEmpty(username)&&StringUtils.isNotEmpty(phone)){ | |
| 635 | + patientsQuery.setName(username); | |
| 636 | + patientsQuery.setPhone(phone); | |
| 637 | + }else { | |
| 638 | + appointmentModel.setIsBuild(0); | |
| 639 | + } | |
| 640 | + } | |
| 641 | + if (appointmentModel.getIsBuild()==null){ | |
| 642 | + List<Patients> patientsList= patientsService.queryPatient(patientsQuery); | |
| 643 | + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(patientsList)){ | |
| 644 | + appointmentModel.setIsBuild(1); | |
| 645 | + Patients patients= patientsList.get(0); | |
| 646 | + PatientServiceQuery patientQuery = new PatientServiceQuery(); | |
| 647 | + patientQuery.setParentid(patients.getId()); | |
| 648 | + patientQuery.setSerType(1); | |
| 649 | + | |
| 650 | + List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); | |
| 651 | + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(patientServices)){ | |
| 652 | + Date serEndTime= patientServices.get(0).getSerEndTime(); | |
| 653 | + appointmentModel.setSerEndTime(serEndTime); | |
| 654 | + result.put("服务截止时间", DateUtil.gety_m_dhm(appointmentModel.getSerEndTime())); | |
| 655 | + } | |
| 656 | + }else { | |
| 657 | + appointmentModel.setIsBuild(0); | |
| 658 | + } | |
| 659 | + } | |
| 660 | + result.put("建档状态",appointmentModel.getIsBuild()==1?"已建档":"未建档"); | |
| 661 | + result.put("就诊卡号", appointmentModel.getVccardNo()); | |
| 662 | + result.put("姓名", appointmentModel.getName()); | |
| 663 | + result.put("手机号", appointmentModel.getPhone()); | |
| 664 | + result.put("证件号", appointmentModel.getIdCard()); | |
| 665 | + result.put("出生日期",appointmentModel.getAge()); | |
| 666 | + result.put("就诊时间",DateUtil.gety_m_dhm(appointmentModel.getCheckTime())); | |
| 667 | + result.put("就诊医生",appointmentModel.getDoctor()); | |
| 668 | + result.put("科室", appointmentModel.getDept()); | |
| 669 | + result.put("预约时间",DateUtil.gety_m_dhm(appointmentModel.getCreated())); | |
| 670 | + results.add(result); | |
| 671 | + } | |
| 672 | + } | |
| 673 | + | |
| 674 | + ResponseUtil.responseExcel(cnames, results, response); | |
| 591 | 675 | } | 
| 592 | 676 | } | 
platform-operate-api/src/main/java/com/lyms/hospitalapi/dtdyrm/IdtdyrmFmService.java
View file @
2ea136e
| ... | ... | @@ -14,5 +14,6 @@ | 
| 14 | 14 | BaseResponse getFmRecordList(DtFmQuery dtFmQuery, Integer userId); | 
| 15 | 15 | void saveFm(DtFm dtFm); | 
| 16 | 16 | void reportFmRecord(HttpServletResponse response,DtFmQuery dtFmQuery,Integer userId); | 
| 17 | + void reportAppointmentList(HttpServletResponse response,String doctor, String startTime, String endTime,String name,String doctorName); | |
| 17 | 18 | } | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java
View file @
2ea136e
| 1 | 1 | package com.lyms.platform.operate.web.controller; | 
| 2 | 2 | |
| 3 | +import com.lyms.hospitalapi.dtdyrm.IdtdyrmFmService; | |
| 3 | 4 | import com.lyms.platform.biz.service.*; | 
| 5 | +import com.lyms.platform.common.annotation.TokenRequired; | |
| 6 | +import com.lyms.platform.common.base.BaseController; | |
| 4 | 7 | import com.lyms.platform.common.constants.ErrorCodeConstants; | 
| 5 | 8 | import com.lyms.platform.common.dao.operator.MongoQuery; | 
| 6 | 9 | import com.lyms.platform.common.result.BaseObjectResponse; | 
| 7 | 10 | |
| ... | ... | @@ -13,9 +16,12 @@ | 
| 13 | 16 | import com.lyms.platform.operate.web.request.AntenatalExaminationQueryRequest; | 
| 14 | 17 | import com.lyms.platform.operate.web.request.PatientQueryRequest; | 
| 15 | 18 | import com.lyms.platform.operate.web.result.HighScoreResult; | 
| 19 | +import com.lyms.platform.operate.web.service.PatientWeightService; | |
| 16 | 20 | import com.lyms.platform.operate.web.utils.CollectionUtils; | 
| 17 | 21 | import com.lyms.platform.operate.web.utils.FunvCommonUtil; | 
| 18 | 22 | import com.lyms.platform.operate.web.vo.PatientNiptDTO; | 
| 23 | +import com.lyms.platform.permission.model.AppointmentQuery; | |
| 24 | +import com.lyms.platform.permission.model.DtFmQuery; | |
| 19 | 25 | import com.lyms.platform.permission.model.PatientService; | 
| 20 | 26 | import com.lyms.platform.permission.model.PatientServiceQuery; | 
| 21 | 27 | import com.lyms.platform.permission.service.AppointmentService; | 
| ... | ... | @@ -28,6 +34,7 @@ | 
| 28 | 34 | import org.springframework.stereotype.Controller; | 
| 29 | 35 | import org.springframework.web.bind.annotation.*; | 
| 30 | 36 | |
| 37 | +import javax.servlet.http.HttpServletRequest; | |
| 31 | 38 | import javax.servlet.http.HttpServletResponse; | 
| 32 | 39 | import javax.validation.Valid; | 
| 33 | 40 | import java.util.*; | 
| 34 | 41 | |
| ... | ... | @@ -37,10 +44,12 @@ | 
| 37 | 44 | */ | 
| 38 | 45 | @Controller | 
| 39 | 46 | @RequestMapping | 
| 40 | -public class PatientDtController { | |
| 47 | +public class PatientDtController extends BaseController { | |
| 41 | 48 | @Autowired | 
| 42 | 49 | private PatientsService patientsService; | 
| 43 | 50 | @Autowired | 
| 51 | + private PatientWeightService patientWeightService1; | |
| 52 | + @Autowired | |
| 44 | 53 | private PatientWeightService2 patientWeightService; | 
| 45 | 54 | @Autowired | 
| 46 | 55 | private BloodPressureService bloodPressureService; | 
| ... | ... | @@ -422,6 +431,120 @@ | 
| 422 | 431 | } | 
| 423 | 432 | |
| 424 | 433 | /** | 
| 434 | + * 获取体重列表; | |
| 435 | + * @param authorization | |
| 436 | + * @param id | |
| 437 | + * @return | |
| 438 | + */ | |
| 439 | + @ResponseBody | |
| 440 | + @RequestMapping(value = "/dt/patient/weight/info/{id}", method = RequestMethod.GET) | |
| 441 | + public BaseResponse info(@RequestHeader("Authorization")String authorization,@PathVariable String id) { | |
| 442 | + if (!authorization.contains(Authorization)){ | |
| 443 | + return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常"); | |
| 444 | + } | |
| 445 | + return patientWeightService1.info(id); | |
| 446 | + } | |
| 447 | + | |
| 448 | + /** | |
| 449 | + * 添加体重管理 | |
| 450 | + * @param patientWeight | |
| 451 | + * @return | |
| 452 | + */ | |
| 453 | + @ResponseBody | |
| 454 | + @RequestMapping(value = "/dt/patient/weight",method = RequestMethod.POST) | |
| 455 | + public BaseResponse addOrUpdate(@RequestHeader("Authorization")String authorization,PatientWeight patientWeight) { | |
| 456 | + if (!authorization.contains(Authorization)){ | |
| 457 | + return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常"); | |
| 458 | + } | |
| 459 | + return patientWeightService1.addOrUpdate(userId, patientWeight); | |
| 460 | + } | |
| 461 | + @Autowired | |
| 462 | + private PregnancyReportFacade pregnancyReportFacade; | |
| 463 | + | |
| 464 | + /** | |
| 465 | + * 获取患者体重报告 | |
| 466 | + * @return | |
| 467 | + */ | |
| 468 | + @RequestMapping(method = RequestMethod.GET, value = "/dt/getPatientReport") | |
| 469 | + @ResponseBody | |
| 470 | + public BaseResponse getPatientReport(@RequestParam(required = false) String name, | |
| 471 | + @RequestParam(required = false) Integer week, | |
| 472 | + @RequestParam(required = false) Integer weightType, | |
| 473 | + @RequestHeader("Authorization")String authorization){ | |
| 474 | + if (!authorization.contains(Authorization)){ | |
| 475 | + return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常"); | |
| 476 | + } | |
| 477 | + PregnancyReportQuery pregnancyReportQuery=new PregnancyReportQuery(); | |
| 478 | + pregnancyReportQuery.setWeek(week); | |
| 479 | + pregnancyReportQuery.setWeightType(weightType); | |
| 480 | + pregnancyReportQuery.setName(name); | |
| 481 | + return pregnancyReportFacade.getPatientReport(pregnancyReportQuery,userId); | |
| 482 | + } | |
| 483 | + @Autowired | |
| 484 | + private PregnancyReportMattersServiceFacade pregnancyReportMattersServiceFacade; | |
| 485 | + /** | |
| 486 | + * 获取模版列表 | |
| 487 | + * @return | |
| 488 | + */ | |
| 489 | + @RequestMapping(method = RequestMethod.GET, value = "/dt/matters/getList") | |
| 490 | + @ResponseBody | |
| 491 | + public BaseResponse getMattersList( | |
| 492 | + @RequestHeader("Authorization")String authorization, | |
| 493 | + @RequestParam(required = false) Integer week, | |
| 494 | + @RequestParam(required = false) Integer riskType, | |
| 495 | + @RequestParam Integer type, | |
| 496 | + @RequestParam(required = false) String name, | |
| 497 | + @RequestParam("page") Integer page, | |
| 498 | + @RequestParam("limit") Integer limit | |
| 499 | + ){ | |
| 500 | + if (!authorization.contains(Authorization)){ | |
| 501 | + return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常"); | |
| 502 | + } | |
| 503 | + PregnancyReportMattersQuery postpartumReportQuery=new PregnancyReportMattersQuery(); | |
| 504 | + postpartumReportQuery.setWeek(week); | |
| 505 | + postpartumReportQuery.setType(type); | |
| 506 | + postpartumReportQuery.setRiskType(riskType); | |
| 507 | + postpartumReportQuery.setPage(page); | |
| 508 | + postpartumReportQuery.setLimit(limit); | |
| 509 | + postpartumReportQuery.setName(name); | |
| 510 | + return pregnancyReportMattersServiceFacade.getList(postpartumReportQuery,userId); | |
| 511 | + } | |
| 512 | + | |
| 513 | + /** | |
| 514 | + * 获取高危饮食原则模版详情 | |
| 515 | + * @return | |
| 516 | + */ | |
| 517 | + @RequestMapping(method = RequestMethod.GET, value = "/dt/matters/getRisk") | |
| 518 | + @ResponseBody | |
| 519 | + public BaseResponse getReportByRisk( @RequestHeader("Authorization")String authorization,@RequestParam Integer week,@RequestParam Integer type, | |
| 520 | + @RequestParam String riskFactorId){ | |
| 521 | + if (!authorization.contains(Authorization)){ | |
| 522 | + return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常"); | |
| 523 | + } | |
| 524 | + BaseResponse baseResponse= new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 525 | + PregnancyReportMattersQuery postpartumReportQuery=new PregnancyReportMattersQuery(); | |
| 526 | + postpartumReportQuery.setWeek(week); | |
| 527 | + postpartumReportQuery.setType(type); | |
| 528 | + postpartumReportQuery.setRiskFactorId(StringUtils.covertToList(riskFactorId, String.class)); | |
| 529 | + baseResponse.setObject(pregnancyReportMattersServiceFacade.getReportByRisk(postpartumReportQuery,userId)); | |
| 530 | + return baseResponse; | |
| 531 | + } | |
| 532 | + /** | |
| 533 | + * 获取模版详情 | |
| 534 | + * @return | |
| 535 | + */ | |
| 536 | + @RequestMapping(method = RequestMethod.GET, value = "/dt/matters/getInfo") | |
| 537 | + @ResponseBody | |
| 538 | + public BaseResponse getMattersList( @RequestHeader("Authorization")String authorization,String id){ | |
| 539 | + if (!authorization.contains(Authorization)){ | |
| 540 | + return new BaseResponse().setErrorcode(-1).setErrormsg("权限异常"); | |
| 541 | + } | |
| 542 | + BaseResponse baseResponse= new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 543 | + baseResponse.setObject(pregnancyReportMattersServiceFacade.getPregnancyReport(id)); | |
| 544 | + return baseResponse; | |
| 545 | + } | |
| 546 | + | |
| 547 | + /** | |
| 425 | 548 | * 查询初诊接口 | 
| 426 | 549 | * | 
| 427 | 550 | * @param id | 
| ... | ... | @@ -494,6 +617,8 @@ | 
| 494 | 617 | } | 
| 495 | 618 | return antenatalExaminationFacade.addPatientNipt(patientNiptDTO,userId); | 
| 496 | 619 | } | 
| 620 | + //大同需要特殊处理的护士名称 | |
| 621 | + private static final String doctors="孙慧洁,曹琴,温燕芳,牛冬燕,王改然,杜文瑞,习亚美,卫娜,施春花,胡雪娇"; | |
| 497 | 622 | |
| 498 | 623 | /** | 
| 499 | 624 | * 预约挂号列表查询 | 
| ... | ... | @@ -513,7 +638,9 @@ | 
| 513 | 638 | @RequestParam(required = false) Integer isBuild, | 
| 514 | 639 | @RequestParam(required = false) Integer expire, | 
| 515 | 640 | @RequestParam(required = false) String name, | 
| 516 | - @RequestParam(required = false) String doctorName | |
| 641 | + @RequestParam(required = false) String doctorName, | |
| 642 | + @RequestParam(required = false) Integer page, | |
| 643 | + @RequestParam(required = false) Integer limit | |
| 517 | 644 | |
| 518 | 645 | ) { | 
| 519 | 646 | if (!authorization.contains(Authorization)){ | 
| 520 | 647 | |
| ... | ... | @@ -522,9 +649,28 @@ | 
| 522 | 649 | BaseResponse baseResponse=new BaseResponse(); | 
| 523 | 650 | startTime=startTime+" 00:00:00"; | 
| 524 | 651 | endTime=endTime+" 23:59:59"; | 
| 525 | - List<AppointmentModel> modelList= appointmentService.queryAppointment(doctor,startTime,endTime,name,doctorName); | |
| 652 | + String dept=null; | |
| 653 | + String need=null; | |
| 654 | + if (doctors.contains(doctor)){ | |
| 655 | + doctor=doctorName; | |
| 656 | + dept="产科"; | |
| 657 | + if (isBuild==null && expire==null){ | |
| 658 | + need="true"; | |
| 659 | + } | |
| 660 | + } | |
| 661 | + AppointmentQuery appointmentQuery=new AppointmentQuery(); | |
| 662 | + appointmentQuery.setDoctor(doctor); | |
| 663 | + appointmentQuery.setStartTime(startTime); | |
| 664 | + appointmentQuery.setEndTime(endTime); | |
| 665 | + appointmentQuery.setDept(dept); | |
| 666 | + appointmentQuery.setName(name); | |
| 667 | + appointmentQuery.setNeed(need); | |
| 668 | + appointmentQuery.setLimit(limit); | |
| 669 | + appointmentQuery.setPage(page); | |
| 670 | + List<AppointmentModel> modelList= appointmentService.queryAppointment(appointmentQuery); | |
| 526 | 671 | Date date=new Date(); | 
| 527 | 672 | if (CollectionUtils.isNotEmpty(modelList)){ | 
| 673 | + Map params=new HashMap(); | |
| 528 | 674 | boolean b=true; | 
| 529 | 675 | if (expire!=null || isBuild!=null){ | 
| 530 | 676 | b=false; | 
| 531 | 677 | |
| 532 | 678 | |
| 533 | 679 | |
| ... | ... | @@ -614,11 +760,16 @@ | 
| 614 | 760 | } | 
| 615 | 761 | } | 
| 616 | 762 | } | 
| 763 | + | |
| 617 | 764 | if (b){ | 
| 618 | - baseResponse.setObject(modelList); | |
| 765 | + params.put("data",modelList); | |
| 619 | 766 | }else { | 
| 620 | - baseResponse.setObject(checkList); | |
| 767 | + params.put("data",checkList); | |
| 621 | 768 | } | 
| 769 | + if (StringUtils.isNotEmpty(need)){ | |
| 770 | + params.put("pageInfo",appointmentQuery.getPageInfo()); | |
| 771 | + } | |
| 772 | + baseResponse.setObject(params); | |
| 622 | 773 | } | 
| 623 | 774 | baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | 
| 624 | 775 | return baseResponse; | 
| 625 | 776 | |
| 626 | 777 | |
| 627 | 778 | |
| ... | ... | @@ -640,15 +791,35 @@ | 
| 640 | 791 | return new BaseObjectResponse().setErrorcode(-1).setErrormsg("权限异常"); | 
| 641 | 792 | } | 
| 642 | 793 | Map<String,String> params=new HashMap<>(); | 
| 794 | + if (doctors.contains(doctor)){ | |
| 795 | + doctor="孙慧洁"; | |
| 796 | + } | |
| 643 | 797 | params.put("doctor",doctor); | 
| 644 | 798 | params.put("ksrq",date); | 
| 645 | 799 | params.put("jsrq",date); | 
| 646 | 800 | HttpClientUtil.doGet("http://192.168.5.23:9090/dtdyrm/getdtAppointment" ,params,"utf-8",null); | 
| 647 | - //System.out.println(str); | |
| 648 | 801 | return new BaseResponse(); | 
| 649 | 802 | } | 
| 803 | + @Autowired | |
| 804 | + private IdtdyrmFmService idtdyrmFmService; | |
| 805 | + //导出 | |
| 806 | + @ResponseBody | |
| 807 | + @RequestMapping(value = "/dt/appointment/export", method = RequestMethod.GET) | |
| 808 | + public void reportFmRecord(@RequestHeader("Authorization")String authorization, | |
| 809 | + @RequestParam String doctor, | |
| 810 | + @RequestParam String startTime, | |
| 811 | + @RequestParam String endTime, | |
| 812 | + @RequestParam(required = false) String name, | |
| 813 | + @RequestParam(required = false) String doctorName, | |
| 814 | + HttpServletResponse response) { | |
| 815 | + if (!authorization.contains(Authorization)){ | |
| 816 | + throw new RuntimeException("权限异常"); | |
| 817 | + } | |
| 818 | + idtdyrmFmService.reportAppointmentList(response,doctor,startTime,endTime,name,doctorName); | |
| 819 | + } | |
| 650 | 820 | |
| 651 | 821 | |
| 822 | + | |
| 652 | 823 | @RequestMapping(method = RequestMethod.GET, value = "/pc/pregnancy") | 
| 653 | 824 | @ResponseBody | 
| 654 | 825 | public String getPregnancyList( String page, | 
| ... | ... | @@ -671,7 +842,6 @@ | 
| 671 | 842 | params.put("type",type); | 
| 672 | 843 | str= HttpClientUtil.doGet(MEMBER_BABY_URL+"/wx/pc/articles/precise" ,params,"utf-8",null); | 
| 673 | 844 | } | 
| 674 | - //System.out.println(str); | |
| 675 | 845 | return str; | 
| 676 | 846 | } | 
| 677 | 847 | } | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java
View file @
2ea136e
| ... | ... | @@ -1484,7 +1484,11 @@ | 
| 1484 | 1484 | String date = DateUtil.getyyyy_MM_dd(DateUtil.addDay(new Date(), 1)); | 
| 1485 | 1485 | String startTime = date + " 00:00:00"; | 
| 1486 | 1486 | String endTime = date + " 23:59:59"; | 
| 1487 | - List<AppointmentModel> modelList = appointmentService.queryAppointment("孙慧洁", startTime, endTime, null, null); | |
| 1487 | + AppointmentQuery appointmentQuery=new AppointmentQuery(); | |
| 1488 | + appointmentQuery.setStartTime(startTime); | |
| 1489 | + appointmentQuery.setEndTime(endTime); | |
| 1490 | + appointmentQuery.setDept("产科"); | |
| 1491 | + List<AppointmentModel> modelList = appointmentService.queryAppointment(appointmentQuery); | |
| 1488 | 1492 | if (CollectionUtils.isNotEmpty(modelList)) { | 
| 1489 | 1493 | PatientsQuery patientsQuery = new PatientsQuery(); | 
| 1490 | 1494 | patientsQuery.setYn(1); |