Commit 402a38d4ed34f39a665f7584703b62c337c1f8f3
1 parent
762fc73755
Exists in
dev
#fix:新增大同一键跳转逻辑、预约挂号页面开发等逻辑接口
Showing 23 changed files with 1166 additions and 3 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPostpartumReportDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPregnancyReportDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPregnancyReportMattersDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/IPregnancyReportMattersDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PostpartumReportDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PregnancyReportDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PostpartumReportService.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PregnancyReportMattersService.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PregnancyReportService.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/service/AppointmentService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/AppointmentServiceImpl.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java
- platform-biz-service/src/main/resources/mainOrm/master/AppointmentMapper.xml
- platform-common/src/main/java/com/lyms/platform/common/utils/HttpClientUtil.java
- platform-dal/src/main/java/com/lyms/platform/beans/SerialIdEnum.java
- platform-dal/src/main/java/com/lyms/platform/pojo/AppointmentModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/PostpartumReport.java
- platform-dal/src/main/java/com/lyms/platform/pojo/PregnancyReport.java
- platform-dal/src/main/java/com/lyms/platform/pojo/PregnancyReportMatters.java
- platform-dal/src/main/java/com/lyms/platform/query/PostpartumReportQuery.java
- platform-dal/src/main/java/com/lyms/platform/query/PregnancyReportMattersQuery.java
- platform-dal/src/main/java/com/lyms/platform/query/PregnancyReportQuery.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPostpartumReportDao.java
View file @
402a38d
| 1 | +package com.lyms.platform.biz.dal; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 4 | +import com.lyms.platform.common.dao.operator.Page; | |
| 5 | +import com.lyms.platform.pojo.PostpartumReport; | |
| 6 | + | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | +public interface IPostpartumReportDao { | |
| 10 | + PostpartumReport add(PostpartumReport postpartumReport); | |
| 11 | + void updateById(PostpartumReport postpartumReport,String id); | |
| 12 | + public PostpartumReport getPatient(String id); | |
| 13 | + | |
| 14 | + public int queryPatientCount(MongoQuery query); | |
| 15 | + | |
| 16 | + public List<PostpartumReport> queryPatient(MongoQuery query); | |
| 17 | + | |
| 18 | + public Page<PostpartumReport> findPage(MongoQuery query); | |
| 19 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPregnancyReportDao.java
View file @
402a38d
| 1 | +package com.lyms.platform.biz.dal; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 4 | +import com.lyms.platform.pojo.PregnancyReport; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +public interface IPregnancyReportDao { | |
| 9 | + PregnancyReport add(PregnancyReport pregnancyReport); | |
| 10 | + void updateById(PregnancyReport pregnancyReport,String id); | |
| 11 | + public PregnancyReport getPatient(String id); | |
| 12 | + | |
| 13 | + public int queryPatientCount(MongoQuery query); | |
| 14 | + | |
| 15 | + public List<PregnancyReport> queryPatient(MongoQuery query); | |
| 16 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPregnancyReportMattersDao.java
View file @
402a38d
| 1 | +package com.lyms.platform.biz.dal; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 4 | +import com.lyms.platform.pojo.PregnancyReportMatters; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +public interface IPregnancyReportMattersDao { | |
| 9 | + PregnancyReportMatters add(PregnancyReportMatters pregnancyReport); | |
| 10 | + void updateById(PregnancyReportMatters pregnancyReport,String id); | |
| 11 | + public PregnancyReportMatters getPatient(String id); | |
| 12 | + public int queryPatientCount(MongoQuery query); | |
| 13 | + public List<PregnancyReportMatters> queryMatters(MongoQuery query); | |
| 14 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/IPregnancyReportMattersDaoImpl.java
View file @
402a38d
| 1 | +package com.lyms.platform.biz.dal.impl; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IPregnancyReportDao; | |
| 4 | +import com.lyms.platform.biz.dal.IPregnancyReportMattersDao; | |
| 5 | +import com.lyms.platform.common.dao.BaseMongoDAOImpl; | |
| 6 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
| 7 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
| 8 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 9 | +import com.lyms.platform.pojo.PregnancyReport; | |
| 10 | +import com.lyms.platform.pojo.PregnancyReportMatters; | |
| 11 | +import org.springframework.stereotype.Repository; | |
| 12 | + | |
| 13 | +import java.util.Date; | |
| 14 | +import java.util.List; | |
| 15 | + | |
| 16 | +@Repository("pregnancyReportMattersDao") | |
| 17 | +public class IPregnancyReportMattersDaoImpl extends BaseMongoDAOImpl<PregnancyReportMatters> implements IPregnancyReportMattersDao { | |
| 18 | + @Override | |
| 19 | + public PregnancyReportMatters add(PregnancyReportMatters pregnancyReport) { | |
| 20 | + pregnancyReport.setYn(1); | |
| 21 | + pregnancyReport.setCreated(new Date()); | |
| 22 | + return save(pregnancyReport); | |
| 23 | + } | |
| 24 | + | |
| 25 | + @Override | |
| 26 | + public void updateById(PregnancyReportMatters pregnancyReport, String id) { | |
| 27 | + update(new MongoQuery(new MongoCondition("id", id, MongoOper.IS)).convertToMongoQuery(), pregnancyReport); | |
| 28 | + } | |
| 29 | + | |
| 30 | + @Override | |
| 31 | + public PregnancyReportMatters getPatient(String id) { | |
| 32 | + return findById(id); | |
| 33 | + } | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public int queryPatientCount(MongoQuery query) { | |
| 37 | + return (int) count(query.convertToMongoQuery()); | |
| 38 | + } | |
| 39 | + | |
| 40 | + @Override | |
| 41 | + public List<PregnancyReportMatters> queryMatters(MongoQuery query) { | |
| 42 | + return find(query.convertToMongoQuery()); | |
| 43 | + } | |
| 44 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PostpartumReportDaoImpl.java
View file @
402a38d
| 1 | +package com.lyms.platform.biz.dal.impl; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IPostpartumReportDao; | |
| 4 | +import com.lyms.platform.common.dao.BaseMongoDAOImpl; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
| 6 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
| 7 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 8 | +import com.lyms.platform.common.dao.operator.Page; | |
| 9 | +import com.lyms.platform.pojo.PostpartumReport; | |
| 10 | +import org.springframework.stereotype.Repository; | |
| 11 | + | |
| 12 | +import java.util.Date; | |
| 13 | +import java.util.List; | |
| 14 | + | |
| 15 | +@Repository("postpartumReportDao") | |
| 16 | +public class PostpartumReportDaoImpl extends BaseMongoDAOImpl<PostpartumReport> implements IPostpartumReportDao { | |
| 17 | + | |
| 18 | + @Override | |
| 19 | + public PostpartumReport add(PostpartumReport postpartumReport) { | |
| 20 | + postpartumReport.setCreated(new Date()); | |
| 21 | + return save(postpartumReport); | |
| 22 | + } | |
| 23 | + | |
| 24 | + @Override | |
| 25 | + public void updateById(PostpartumReport postpartumReport, String id) { | |
| 26 | + postpartumReport.setModified(new Date()); | |
| 27 | + update(new MongoQuery(new MongoCondition("id", id, MongoOper.IS)).convertToMongoQuery(), postpartumReport); | |
| 28 | + } | |
| 29 | + | |
| 30 | + @Override | |
| 31 | + public PostpartumReport getPatient(String id) { | |
| 32 | + return findById(id); | |
| 33 | + } | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public int queryPatientCount(MongoQuery query) { | |
| 37 | + return (int) count(query.convertToMongoQuery()); | |
| 38 | + } | |
| 39 | + | |
| 40 | + @Override | |
| 41 | + public List<PostpartumReport> queryPatient(MongoQuery query) { | |
| 42 | + return find(query.convertToMongoQuery()); | |
| 43 | + } | |
| 44 | + | |
| 45 | + @Override | |
| 46 | + public Page<PostpartumReport> findPage(MongoQuery query) { | |
| 47 | + return findPage(query.convertToMongoQuery()); | |
| 48 | + } | |
| 49 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PregnancyReportDaoImpl.java
View file @
402a38d
| 1 | +package com.lyms.platform.biz.dal.impl; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IPregnancyReportDao; | |
| 4 | +import com.lyms.platform.common.dao.BaseMongoDAOImpl; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
| 6 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
| 7 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 8 | +import com.lyms.platform.pojo.PregnancyReport; | |
| 9 | +import org.springframework.stereotype.Repository; | |
| 10 | + | |
| 11 | +import java.util.Date; | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | +@Repository("pregnancyReportDao") | |
| 15 | +public class PregnancyReportDaoImpl extends BaseMongoDAOImpl<PregnancyReport> implements IPregnancyReportDao { | |
| 16 | + @Override | |
| 17 | + public PregnancyReport add(PregnancyReport pregnancyReport) { | |
| 18 | + pregnancyReport.setCreated(new Date()); | |
| 19 | + pregnancyReport.setYn(1); | |
| 20 | + return save(pregnancyReport); | |
| 21 | + } | |
| 22 | + | |
| 23 | + @Override | |
| 24 | + public void updateById(PregnancyReport pregnancyReport, String id) { | |
| 25 | + pregnancyReport.setModified(new Date()); | |
| 26 | + update(new MongoQuery(new MongoCondition("id", id, MongoOper.IS)).convertToMongoQuery(), pregnancyReport); | |
| 27 | + } | |
| 28 | + | |
| 29 | + @Override | |
| 30 | + public PregnancyReport getPatient(String id) { | |
| 31 | + return findById(id); | |
| 32 | + } | |
| 33 | + | |
| 34 | + @Override | |
| 35 | + public int queryPatientCount(MongoQuery query) { | |
| 36 | + return (int) count(query.convertToMongoQuery()); | |
| 37 | + } | |
| 38 | + | |
| 39 | + @Override | |
| 40 | + public List<PregnancyReport> queryPatient(MongoQuery query) { | |
| 41 | + return find(query.convertToMongoQuery()); | |
| 42 | + } | |
| 43 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PostpartumReportService.java
View file @
402a38d
| 1 | +package com.lyms.platform.biz.service; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IPostpartumReportDao; | |
| 4 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 6 | +import com.lyms.platform.common.dao.operator.Page; | |
| 7 | +import com.lyms.platform.common.result.BaseListResponse; | |
| 8 | +import com.lyms.platform.common.result.BaseResponse; | |
| 9 | +import com.lyms.platform.pojo.PostpartumReport; | |
| 10 | +import com.lyms.platform.query.PostpartumReportQuery; | |
| 11 | +import org.apache.commons.collections.ArrayStack; | |
| 12 | +import org.apache.commons.collections.CollectionUtils; | |
| 13 | +import org.apache.commons.lang.StringUtils; | |
| 14 | +import org.apache.velocity.util.ArrayListWrapper; | |
| 15 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 16 | +import org.springframework.stereotype.Service; | |
| 17 | + | |
| 18 | +import java.util.ArrayList; | |
| 19 | +import java.util.HashMap; | |
| 20 | +import java.util.List; | |
| 21 | +import java.util.Map; | |
| 22 | + | |
| 23 | +@Service("postpartumReportService") | |
| 24 | +public class PostpartumReportService { | |
| 25 | + @Autowired | |
| 26 | + private IPostpartumReportDao postpartumReportDao; | |
| 27 | + | |
| 28 | + | |
| 29 | + public PostpartumReport add(PostpartumReport postpartumReport){ | |
| 30 | + postpartumReport.setYn(1); | |
| 31 | + return postpartumReportDao.add(postpartumReport); | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void updateById(PostpartumReport postpartumReport,String id){ | |
| 35 | + postpartumReportDao.updateById(postpartumReport,id); | |
| 36 | + } | |
| 37 | + | |
| 38 | + public PostpartumReport getPatient(String id){ | |
| 39 | + return postpartumReportDao.getPatient(id); | |
| 40 | + } | |
| 41 | + | |
| 42 | + public BaseResponse queryPatient(PostpartumReportQuery postpartumReportQuery){ | |
| 43 | + MongoQuery query = postpartumReportQuery.convertToQuery(); | |
| 44 | + if (StringUtils.isNotEmpty(postpartumReportQuery.getNeed())) { | |
| 45 | + postpartumReportQuery.mysqlBuild(postpartumReportDao.queryPatientCount(postpartumReportQuery.convertToQuery())); | |
| 46 | + query.start(postpartumReportQuery.getOffset()).end(postpartumReportQuery.getLimit()); | |
| 47 | + } | |
| 48 | + List<PostpartumReport> results= postpartumReportDao.queryPatient(query); | |
| 49 | + List<Map<String,Object>> mapList=new ArrayList<>(); | |
| 50 | + if (CollectionUtils.isNotEmpty(results)){ | |
| 51 | + for (PostpartumReport postpartumReport: results){ | |
| 52 | + Map<String,Object> params=new HashMap<>(); | |
| 53 | + params.put("id",postpartumReport.getId()); | |
| 54 | + params.put("num",postpartumReport.getNum()); | |
| 55 | + params.put("riskFactorName",postpartumReport.getRiskFactorName()); | |
| 56 | + params.put("created",postpartumReport.getCreated()); | |
| 57 | + mapList.add(params); | |
| 58 | + } | |
| 59 | + } | |
| 60 | + BaseListResponse objectResponse = new BaseListResponse(); | |
| 61 | + objectResponse.setData(mapList); | |
| 62 | + objectResponse.setPageInfo(postpartumReportQuery.getPageInfo()); | |
| 63 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 64 | + objectResponse.setErrormsg("成功"); | |
| 65 | + return objectResponse; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public Page<PostpartumReport> findPage(MongoQuery query){ | |
| 69 | + return postpartumReportDao.findPage(query); | |
| 70 | + } | |
| 71 | + | |
| 72 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PregnancyReportMattersService.java
View file @
402a38d
| 1 | +package com.lyms.platform.biz.service; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IPregnancyReportMattersDao; | |
| 4 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 5 | +import com.lyms.platform.pojo.PregnancyReport; | |
| 6 | +import com.lyms.platform.pojo.PregnancyReportMatters; | |
| 7 | +import com.lyms.platform.query.PregnancyReportMattersQuery; | |
| 8 | +import com.lyms.platform.query.PregnancyReportQuery; | |
| 9 | +import org.apache.commons.lang.StringUtils; | |
| 10 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 11 | +import org.springframework.stereotype.Service; | |
| 12 | + | |
| 13 | +import java.util.List; | |
| 14 | + | |
| 15 | +@Service("pregnancyReportMattersService") | |
| 16 | +public class PregnancyReportMattersService { | |
| 17 | + @Autowired | |
| 18 | + private IPregnancyReportMattersDao pregnancyReportMattersDao; | |
| 19 | + | |
| 20 | + public PregnancyReportMatters add(PregnancyReportMatters postpartumReport){ | |
| 21 | + return pregnancyReportMattersDao.add(postpartumReport); | |
| 22 | + } | |
| 23 | + | |
| 24 | + public void updateById(PregnancyReportMatters postpartumReport,String id){ | |
| 25 | + pregnancyReportMattersDao.updateById(postpartumReport,id); | |
| 26 | + } | |
| 27 | + | |
| 28 | + public PregnancyReportMatters getPregnancyReport(String id){ | |
| 29 | + return pregnancyReportMattersDao.getPatient(id); | |
| 30 | + } | |
| 31 | + | |
| 32 | + public List<PregnancyReportMatters> queryPregnancyReport(PregnancyReportMattersQuery postpartumReportQuery){ | |
| 33 | + MongoQuery query = postpartumReportQuery.convertToQuery(); | |
| 34 | + if (StringUtils.isNotEmpty(postpartumReportQuery.getNeed())) { | |
| 35 | + postpartumReportQuery.mysqlBuild(pregnancyReportMattersDao.queryPatientCount(postpartumReportQuery.convertToQuery())); | |
| 36 | + query.start(postpartumReportQuery.getOffset()).end(postpartumReportQuery.getLimit()); | |
| 37 | + } | |
| 38 | + List<PregnancyReportMatters> results= pregnancyReportMattersDao.queryMatters(query); | |
| 39 | + return results; | |
| 40 | + } | |
| 41 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PregnancyReportService.java
View file @
402a38d
| 1 | +package com.lyms.platform.biz.service; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IPregnancyReportDao; | |
| 4 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 5 | +import com.lyms.platform.pojo.PregnancyReport; | |
| 6 | +import com.lyms.platform.query.PregnancyReportQuery; | |
| 7 | +import org.apache.commons.lang.StringUtils; | |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | +import org.springframework.stereotype.Service; | |
| 10 | + | |
| 11 | +import java.util.List; | |
| 12 | + | |
| 13 | +@Service("pregnancyReportService") | |
| 14 | +public class PregnancyReportService { | |
| 15 | + | |
| 16 | + @Autowired | |
| 17 | + private IPregnancyReportDao pregnancyReportDao; | |
| 18 | + | |
| 19 | + public PregnancyReport add(PregnancyReport postpartumReport){ | |
| 20 | + return pregnancyReportDao.add(postpartumReport); | |
| 21 | + } | |
| 22 | + | |
| 23 | + public void updateById(PregnancyReport postpartumReport,String id){ | |
| 24 | + pregnancyReportDao.updateById(postpartumReport,id); | |
| 25 | + } | |
| 26 | + | |
| 27 | + public PregnancyReport getPregnancyReport(String id){ | |
| 28 | + return pregnancyReportDao.getPatient(id); | |
| 29 | + } | |
| 30 | + | |
| 31 | + public List<PregnancyReport> queryPregnancyReport(PregnancyReportQuery postpartumReportQuery){ | |
| 32 | + MongoQuery query = postpartumReportQuery.convertToQuery(); | |
| 33 | + if (StringUtils.isNotEmpty(postpartumReportQuery.getNeed())) { | |
| 34 | + postpartumReportQuery.mysqlBuild(pregnancyReportDao.queryPatientCount(postpartumReportQuery.convertToQuery())); | |
| 35 | + query.start(postpartumReportQuery.getOffset()).end(postpartumReportQuery.getLimit()); | |
| 36 | + } | |
| 37 | + List<PregnancyReport> results= pregnancyReportDao.queryPatient(query); | |
| 38 | + return results; | |
| 39 | + } | |
| 40 | +} |
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/AppointmentMapper.java
View file @
402a38d
| 1 | +package com.lyms.platform.permission.dao.master; | |
| 2 | + | |
| 3 | +import com.lyms.platform.pojo.AppointmentModel; | |
| 4 | +import org.apache.ibatis.annotations.Param; | |
| 5 | + | |
| 6 | +import java.util.Date; | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | +public interface AppointmentMapper { | |
| 10 | + List<AppointmentModel> queryAppointment(@Param("doctor") String doctor, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("name")String name); | |
| 11 | +} |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/AppointmentService.java
View file @
402a38d
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/AppointmentServiceImpl.java
View file @
402a38d
| 1 | +package com.lyms.platform.permission.service.impl; | |
| 2 | + | |
| 3 | +import com.lyms.platform.permission.dao.master.AppointmentMapper; | |
| 4 | +import com.lyms.platform.permission.service.AppointmentService; | |
| 5 | +import com.lyms.platform.pojo.AppointmentModel; | |
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | + | |
| 9 | +import java.util.Date; | |
| 10 | +import java.util.List; | |
| 11 | +@Service("appointmentService") | |
| 12 | +public class AppointmentServiceImpl implements AppointmentService { | |
| 13 | + @Autowired | |
| 14 | + private AppointmentMapper appointmentMapper; | |
| 15 | + @Override | |
| 16 | + public List<AppointmentModel> queryAppointment(String doctor, String startTime, String endTime,String name) { | |
| 17 | + return appointmentMapper.queryAppointment(doctor,startTime,endTime,name); | |
| 18 | + } | |
| 19 | +} |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java
View file @
402a38d
| ... | ... | @@ -724,7 +724,7 @@ |
| 724 | 724 | |
| 725 | 725 | private String buildRef(ReferValue referValue) { |
| 726 | 726 | if (StringUtils.isNotBlank(referValue.getEmergencyMin()) && StringUtils.isNotBlank(referValue.getEmergencyMax())) { |
| 727 | - return "<" + referValue.getEmergencyMin() + " || " + ">" + referValue.getEmergencyMax(); | |
| 727 | + return "<" + referValue.getEmergencyMin() + " 或 " + ">" + referValue.getEmergencyMax(); | |
| 728 | 728 | } else { |
| 729 | 729 | if (StringUtils.isNotBlank(referValue.getEmergencyMin())) { |
| 730 | 730 | return "<" + referValue.getEmergencyMin(); |
platform-biz-service/src/main/resources/mainOrm/master/AppointmentMapper.xml
View file @
402a38d
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | |
| 3 | +<mapper namespace="com.lyms.platform.permission.dao.master.AppointmentMapper"> | |
| 4 | + | |
| 5 | + <resultMap id="BaseResultMap" type="com.lyms.platform.pojo.AppointmentModel"> | |
| 6 | + <id property="id" column="id" jdbcType="INTEGER"/> | |
| 7 | + <result property="vccardNo" column="vccardNo" jdbcType="VARCHAR"/> | |
| 8 | + <result property="name" column="name" jdbcType="VARCHAR"/> | |
| 9 | + <result property="sex" column="sex" jdbcType="VARCHAR"/> | |
| 10 | + <result property="age" column="age" jdbcType="VARCHAR"/> | |
| 11 | + <result property="phone" column="phone" jdbcType="VARCHAR"/> | |
| 12 | + <result property="idCard" column="idCard" jdbcType="VARCHAR"/> | |
| 13 | + <result property="dept" column="dept" jdbcType="VARCHAR"/> | |
| 14 | + <result property="bhNum" column="bhNum" jdbcType="VARCHAR"/> | |
| 15 | + <result property="doctor" column="doctor" jdbcType="VARCHAR"/> | |
| 16 | + <result property="created" column="created" jdbcType="TIMESTAMP"/> | |
| 17 | + <result property="checkTime" column="checkTime" jdbcType="TIMESTAMP"/> | |
| 18 | + </resultMap> | |
| 19 | + | |
| 20 | + | |
| 21 | + <select id="queryAppointment" resultMap="BaseResultMap"> | |
| 22 | + select * from appointment | |
| 23 | + where doctor=#{doctor} | |
| 24 | + <if test="name!=null"> | |
| 25 | + and name=#{name} | |
| 26 | + </if> | |
| 27 | + and <![CDATA[checkTime>=#{startTime}]]> | |
| 28 | + and <![CDATA[checkTime<=#{endTime}]]> | |
| 29 | + </select> | |
| 30 | +</mapper> |
platform-common/src/main/java/com/lyms/platform/common/utils/HttpClientUtil.java
View file @
402a38d
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | // 设置连接池 |
| 42 | 42 | connMgr = new PoolingHttpClientConnectionManager(); |
| 43 | 43 | // 设置连接池大小 |
| 44 | - connMgr.setMaxTotal(20); | |
| 44 | + connMgr.setMaxTotal(50); | |
| 45 | 45 | connMgr.setDefaultMaxPerRoute(connMgr.getMaxTotal()); |
| 46 | 46 | |
| 47 | 47 | RequestConfig.Builder configBuilder = RequestConfig.custom(); |
platform-dal/src/main/java/com/lyms/platform/beans/SerialIdEnum.java
View file @
402a38d
| ... | ... | @@ -140,7 +140,8 @@ |
| 140 | 140 | CervicalCancerModel("CervicalCancerModel", 4302505773278441592L), |
| 141 | 141 | ResidentSmgRecordModel("ResidentSmgRecordModel", 430205773278441592L), |
| 142 | 142 | DefectiveChildModel("DefectiveChildModel", 1684816144240073408L), |
| 143 | - WxChooseInfoModel("WxChooseInfoModel",-1814469732375965270L); | |
| 143 | + WxChooseInfoModel("WxChooseInfoModel",-1814469732375965270L), | |
| 144 | + PostpartumReport("PostpartumReport",-2956731479920504335L); | |
| 144 | 145 | |
| 145 | 146 | private String cname; |
| 146 | 147 | private Long cid; |
platform-dal/src/main/java/com/lyms/platform/pojo/AppointmentModel.java
View file @
402a38d
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | +import java.util.Date; | |
| 6 | + | |
| 7 | +public class AppointmentModel { | |
| 8 | + private static final long serialVersionUID = 1L; | |
| 9 | + private Integer id; | |
| 10 | + private String bhNum; | |
| 11 | + private String vccardNo; | |
| 12 | + private String name; | |
| 13 | + private String phone; | |
| 14 | + private String age; | |
| 15 | + private String idCard; | |
| 16 | + private String sex; | |
| 17 | + private Date checkTime; | |
| 18 | + private String doctor; | |
| 19 | + private String dept; | |
| 20 | + private Date created; | |
| 21 | + | |
| 22 | + public Integer getId() { | |
| 23 | + return id; | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void setId(Integer id) { | |
| 27 | + this.id = id; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public String getBhNum() { | |
| 31 | + return bhNum; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void setBhNum(String bhNum) { | |
| 35 | + this.bhNum = bhNum; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public String getVccardNo() { | |
| 39 | + return vccardNo; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public void setVccardNo(String vccardNo) { | |
| 43 | + this.vccardNo = vccardNo; | |
| 44 | + } | |
| 45 | + | |
| 46 | + public String getName() { | |
| 47 | + return name; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public void setName(String name) { | |
| 51 | + this.name = name; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public String getPhone() { | |
| 55 | + return phone; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public void setPhone(String phone) { | |
| 59 | + this.phone = phone; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public String getAge() { | |
| 63 | + return age; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void setAge(String age) { | |
| 67 | + this.age = age; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public String getIdCard() { | |
| 71 | + return idCard; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void setIdCard(String idCard) { | |
| 75 | + this.idCard = idCard; | |
| 76 | + } | |
| 77 | + | |
| 78 | + public String getSex() { | |
| 79 | + return sex; | |
| 80 | + } | |
| 81 | + | |
| 82 | + public void setSex(String sex) { | |
| 83 | + this.sex = sex; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public Date getCheckTime() { | |
| 87 | + return checkTime; | |
| 88 | + } | |
| 89 | + | |
| 90 | + public void setCheckTime(Date checkTime) { | |
| 91 | + this.checkTime = checkTime; | |
| 92 | + } | |
| 93 | + | |
| 94 | + public String getDoctor() { | |
| 95 | + return doctor; | |
| 96 | + } | |
| 97 | + | |
| 98 | + public void setDoctor(String doctor) { | |
| 99 | + this.doctor = doctor; | |
| 100 | + } | |
| 101 | + | |
| 102 | + public String getDept() { | |
| 103 | + return dept; | |
| 104 | + } | |
| 105 | + | |
| 106 | + public void setDept(String dept) { | |
| 107 | + this.dept = dept; | |
| 108 | + } | |
| 109 | + | |
| 110 | + public Date getCreated() { | |
| 111 | + return created; | |
| 112 | + } | |
| 113 | + | |
| 114 | + public void setCreated(Date created) { | |
| 115 | + this.created = created; | |
| 116 | + } | |
| 117 | + | |
| 118 | + @Override | |
| 119 | + public String toString() { | |
| 120 | + return "AppointmentModel{" + | |
| 121 | + "id=" + id + | |
| 122 | + ", bhNum='" + bhNum + '\'' + | |
| 123 | + ", vccardNo='" + vccardNo + '\'' + | |
| 124 | + ", name='" + name + '\'' + | |
| 125 | + ", phone='" + phone + '\'' + | |
| 126 | + ", age='" + age + '\'' + | |
| 127 | + ", idCard='" + idCard + '\'' + | |
| 128 | + ", sex='" + sex + '\'' + | |
| 129 | + ", checkTime=" + checkTime + | |
| 130 | + ", doctor='" + doctor + '\'' + | |
| 131 | + ", dept='" + dept + '\'' + | |
| 132 | + ", created=" + created + | |
| 133 | + '}'; | |
| 134 | + } | |
| 135 | +} |
platform-dal/src/main/java/com/lyms/platform/pojo/PostpartumReport.java
View file @
402a38d
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import com.lyms.platform.beans.SerialIdEnum; | |
| 4 | +import com.lyms.platform.common.result.BaseModel; | |
| 5 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 6 | + | |
| 7 | +import java.util.Date; | |
| 8 | +import java.util.List; | |
| 9 | +import java.util.Map; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * 产后营养指南模版 | |
| 13 | + */ | |
| 14 | +@Document(collection = "lyms_postpartum_report") | |
| 15 | +public class PostpartumReport extends BaseModel { | |
| 16 | + private static final long serialVersionUID = SerialIdEnum.PostpartumReport.getCid(); | |
| 17 | + | |
| 18 | + private String id; | |
| 19 | + //医院ID | |
| 20 | + private String hospitalId; | |
| 21 | + | |
| 22 | + //每日食物推荐量 | |
| 23 | + private List<Map> foodRecommends; | |
| 24 | + //一日食谱 | |
| 25 | + private List<Map> recipe; | |
| 26 | + //营养膳食指导 | |
| 27 | + private String guidance; | |
| 28 | + //哺乳期注意事项 | |
| 29 | + private String matters; | |
| 30 | + //次数 | |
| 31 | + private Integer num; | |
| 32 | + //高危风险id | |
| 33 | + private List<String> riskFactorId; | |
| 34 | + //高危风险名称 | |
| 35 | + private List<String> riskFactorName; | |
| 36 | + //风险等级颜色 | |
| 37 | + private String riskLevelId; | |
| 38 | + | |
| 39 | + private Integer yn; | |
| 40 | + | |
| 41 | + private Date created; | |
| 42 | + private Date modified; | |
| 43 | + | |
| 44 | + public Integer getYn() { | |
| 45 | + return yn; | |
| 46 | + } | |
| 47 | + | |
| 48 | + public void setYn(Integer yn) { | |
| 49 | + this.yn = yn; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public String getId() { | |
| 53 | + return id; | |
| 54 | + } | |
| 55 | + | |
| 56 | + public void setId(String id) { | |
| 57 | + this.id = id; | |
| 58 | + } | |
| 59 | + | |
| 60 | + public List<Map> getFoodRecommends() { | |
| 61 | + return foodRecommends; | |
| 62 | + } | |
| 63 | + | |
| 64 | + public void setFoodRecommends(List<Map> foodRecommends) { | |
| 65 | + this.foodRecommends = foodRecommends; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public List<Map> getRecipe() { | |
| 69 | + return recipe; | |
| 70 | + } | |
| 71 | + | |
| 72 | + public void setRecipe(List<Map> recipe) { | |
| 73 | + this.recipe = recipe; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public String getGuidance() { | |
| 77 | + return guidance; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public void setGuidance(String guidance) { | |
| 81 | + this.guidance = guidance; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public String getMatters() { | |
| 85 | + return matters; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public void setMatters(String matters) { | |
| 89 | + this.matters = matters; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public Integer getNum() { | |
| 93 | + return num; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public void setNum(Integer num) { | |
| 97 | + this.num = num; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public List<String> getRiskFactorId() { | |
| 101 | + return riskFactorId; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public void setRiskFactorId(List<String> riskFactorId) { | |
| 105 | + this.riskFactorId = riskFactorId; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public String getRiskLevelId() { | |
| 109 | + return riskLevelId; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public void setRiskLevelId(String riskLevelId) { | |
| 113 | + this.riskLevelId = riskLevelId; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public List<String> getRiskFactorName() { | |
| 117 | + return riskFactorName; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public void setRiskFactorName(List<String> riskFactorName) { | |
| 121 | + this.riskFactorName = riskFactorName; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public Date getCreated() { | |
| 125 | + return created; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public void setCreated(Date created) { | |
| 129 | + this.created = created; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public Date getModified() { | |
| 133 | + return modified; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public void setModified(Date modified) { | |
| 137 | + this.modified = modified; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public String getHospitalId() { | |
| 141 | + return hospitalId; | |
| 142 | + } | |
| 143 | + | |
| 144 | + public void setHospitalId(String hospitalId) { | |
| 145 | + this.hospitalId = hospitalId; | |
| 146 | + } | |
| 147 | +} |
platform-dal/src/main/java/com/lyms/platform/pojo/PregnancyReport.java
View file @
402a38d
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.result.BaseModel; | |
| 4 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 5 | + | |
| 6 | +import java.util.Date; | |
| 7 | +import java.util.List; | |
| 8 | +import java.util.Map; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 孕期营养报告指南 | |
| 12 | + */ | |
| 13 | +@Document(collection = "lyms_pregnancy_report") | |
| 14 | +public class PregnancyReport extends BaseModel { | |
| 15 | + private static final long serialVersionUID = -1; | |
| 16 | + private String id; | |
| 17 | + //医院ID | |
| 18 | + private String hospitalId; | |
| 19 | + //当前孕期 1是孕早期 14周之前 2是孕中期 14-27周+6 3是孕晚期28周及以后 | |
| 20 | + private Integer week; | |
| 21 | + //体重类型 0为正常 1为轻 2为重 | |
| 22 | + private Integer weightType; | |
| 23 | + //高危风险id | |
| 24 | + private List<String> riskFactorId; | |
| 25 | + //高危风险名称 | |
| 26 | + private List<String> riskFactorName; | |
| 27 | + //综合营养指南 | |
| 28 | + private String guidance; | |
| 29 | + //注意事项 | |
| 30 | + private String matters; | |
| 31 | + //所需热量建议 | |
| 32 | + private String suggest; | |
| 33 | + //孕期营养食谱 | |
| 34 | + private List<Map> weekRecipe; | |
| 35 | + | |
| 36 | + private Integer yn; | |
| 37 | + | |
| 38 | + private Date created; | |
| 39 | + private Date modified; | |
| 40 | + | |
| 41 | + public String getId() { | |
| 42 | + return id; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public void setId(String id) { | |
| 46 | + this.id = id; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public String getHospitalId() { | |
| 50 | + return hospitalId; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public void setHospitalId(String hospitalId) { | |
| 54 | + this.hospitalId = hospitalId; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public Integer getWeek() { | |
| 58 | + return week; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public void setWeek(Integer week) { | |
| 62 | + this.week = week; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public Integer getWeightType() { | |
| 66 | + return weightType; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setWeightType(Integer weightType) { | |
| 70 | + this.weightType = weightType; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public List<String> getRiskFactorId() { | |
| 74 | + return riskFactorId; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public void setRiskFactorId(List<String> riskFactorId) { | |
| 78 | + this.riskFactorId = riskFactorId; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public List<String> getRiskFactorName() { | |
| 82 | + return riskFactorName; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void setRiskFactorName(List<String> riskFactorName) { | |
| 86 | + this.riskFactorName = riskFactorName; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public String getGuidance() { | |
| 90 | + return guidance; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public void setGuidance(String guidance) { | |
| 94 | + this.guidance = guidance; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public String getMatters() { | |
| 98 | + return matters; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public void setMatters(String matters) { | |
| 102 | + this.matters = matters; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public String getSuggest() { | |
| 106 | + return suggest; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public void setSuggest(String suggest) { | |
| 110 | + this.suggest = suggest; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public List<Map> getWeekRecipe() { | |
| 114 | + return weekRecipe; | |
| 115 | + } | |
| 116 | + | |
| 117 | + public void setWeekRecipe(List<Map> weekRecipe) { | |
| 118 | + this.weekRecipe = weekRecipe; | |
| 119 | + } | |
| 120 | + | |
| 121 | + public Integer getYn() { | |
| 122 | + return yn; | |
| 123 | + } | |
| 124 | + | |
| 125 | + public void setYn(Integer yn) { | |
| 126 | + this.yn = yn; | |
| 127 | + } | |
| 128 | + | |
| 129 | + public Date getCreated() { | |
| 130 | + return created; | |
| 131 | + } | |
| 132 | + | |
| 133 | + public void setCreated(Date created) { | |
| 134 | + this.created = created; | |
| 135 | + } | |
| 136 | + | |
| 137 | + public Date getModified() { | |
| 138 | + return modified; | |
| 139 | + } | |
| 140 | + | |
| 141 | + public void setModified(Date modified) { | |
| 142 | + this.modified = modified; | |
| 143 | + } | |
| 144 | +} |
platform-dal/src/main/java/com/lyms/platform/pojo/PregnancyReportMatters.java
View file @
402a38d
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.result.BaseModel; | |
| 4 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 5 | + | |
| 6 | +import java.util.Date; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * 孕期营养报告注意事项 | |
| 10 | + */ | |
| 11 | +@Document(collection = "lyms_pregnancy_report_matters") | |
| 12 | +public class PregnancyReportMatters extends BaseModel { | |
| 13 | + private static final long serialVersionUID = -1; | |
| 14 | + private String id; | |
| 15 | + //医院ID | |
| 16 | + private String hospitalId; | |
| 17 | + //0是健康 1是高危 | |
| 18 | + private Integer riskType; | |
| 19 | + //当前孕周 | |
| 20 | + private Integer week; | |
| 21 | + //注意事项 | |
| 22 | + private String matters; | |
| 23 | + private Integer yn; | |
| 24 | + private Date created; | |
| 25 | + | |
| 26 | + public String getId() { | |
| 27 | + return id; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void setId(String id) { | |
| 31 | + this.id = id; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public String getHospitalId() { | |
| 35 | + return hospitalId; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public void setHospitalId(String hospitalId) { | |
| 39 | + this.hospitalId = hospitalId; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public Integer getRiskType() { | |
| 43 | + return riskType; | |
| 44 | + } | |
| 45 | + | |
| 46 | + public void setRiskType(Integer riskType) { | |
| 47 | + this.riskType = riskType; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public Integer getWeek() { | |
| 51 | + return week; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public void setWeek(Integer week) { | |
| 55 | + this.week = week; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public String getMatters() { | |
| 59 | + return matters; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public void setMatters(String matters) { | |
| 63 | + this.matters = matters; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public Integer getYn() { | |
| 67 | + return yn; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void setYn(Integer yn) { | |
| 71 | + this.yn = yn; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public Date getCreated() { | |
| 75 | + return created; | |
| 76 | + } | |
| 77 | + | |
| 78 | + public void setCreated(Date created) { | |
| 79 | + this.created = created; | |
| 80 | + } | |
| 81 | +} |
platform-dal/src/main/java/com/lyms/platform/query/PostpartumReportQuery.java
View file @
402a38d
| 1 | +package com.lyms.platform.query; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.base.IConvertToNativeQuery; | |
| 4 | +import com.lyms.platform.common.dao.BaseQuery; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
| 6 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
| 7 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 8 | +import com.lyms.platform.common.utils.StringUtils; | |
| 9 | + | |
| 10 | +import java.util.List; | |
| 11 | + | |
| 12 | +public class PostpartumReportQuery extends BaseQuery implements IConvertToNativeQuery { | |
| 13 | + | |
| 14 | + private String hospitalId; | |
| 15 | + | |
| 16 | + private Integer yn=-1; | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 高危因素集合 | |
| 20 | + */ | |
| 21 | + private List<String> rFactorList; | |
| 22 | + /** | |
| 23 | + * 高危因素 | |
| 24 | + */ | |
| 25 | + private String rFactor; | |
| 26 | + | |
| 27 | + public String getrFactor() { | |
| 28 | + return rFactor; | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void setrFactor(String rFactor) { | |
| 32 | + this.rFactor = rFactor; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public String getHospitalId() { | |
| 36 | + return hospitalId; | |
| 37 | + } | |
| 38 | + | |
| 39 | + public void setHospitalId(String hospitalId) { | |
| 40 | + this.hospitalId = hospitalId; | |
| 41 | + } | |
| 42 | + | |
| 43 | + public Integer getYn() { | |
| 44 | + return yn; | |
| 45 | + } | |
| 46 | + | |
| 47 | + public void setYn(Integer yn) { | |
| 48 | + this.yn = yn; | |
| 49 | + } | |
| 50 | + | |
| 51 | + public List<String> getrFactorList() { | |
| 52 | + return rFactorList; | |
| 53 | + } | |
| 54 | + | |
| 55 | + public void setrFactorList(List<String> rFactorList) { | |
| 56 | + this.rFactorList = rFactorList; | |
| 57 | + } | |
| 58 | + | |
| 59 | + @Override | |
| 60 | + public MongoQuery convertToQuery() { | |
| 61 | + MongoCondition condition = MongoCondition.newInstance(); | |
| 62 | + | |
| 63 | + if (null != hospitalId) { | |
| 64 | + condition = condition.and("hospitalId", hospitalId, MongoOper.IS); | |
| 65 | + } | |
| 66 | + | |
| 67 | + if (StringUtils.isNotEmpty(rFactor)) { | |
| 68 | + condition = condition.and("riskFactorId", rFactor, MongoOper.IN); | |
| 69 | + } else if (null != rFactorList && !rFactorList.isEmpty()) { | |
| 70 | + condition = condition.and("riskFactorId", rFactorList, MongoOper.IN); | |
| 71 | + } | |
| 72 | + if (-1 != yn) { | |
| 73 | + condition = condition.and("yn", yn, MongoOper.IS); | |
| 74 | + } | |
| 75 | + return condition.toMongoQuery(); | |
| 76 | +// | |
| 77 | + } | |
| 78 | +} |
platform-dal/src/main/java/com/lyms/platform/query/PregnancyReportMattersQuery.java
View file @
402a38d
| 1 | +package com.lyms.platform.query; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.base.IConvertToNativeQuery; | |
| 4 | +import com.lyms.platform.common.dao.BaseQuery; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
| 6 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
| 7 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 8 | + | |
| 9 | +public class PregnancyReportMattersQuery extends BaseQuery implements IConvertToNativeQuery { | |
| 10 | + private String hospitalId; | |
| 11 | + private Integer yn=-1; | |
| 12 | + //0是健康 1是高危 | |
| 13 | + private Integer riskType; | |
| 14 | + | |
| 15 | + //当前孕周 | |
| 16 | + private Integer week; | |
| 17 | + | |
| 18 | + public String getHospitalId() { | |
| 19 | + return hospitalId; | |
| 20 | + } | |
| 21 | + | |
| 22 | + public void setHospitalId(String hospitalId) { | |
| 23 | + this.hospitalId = hospitalId; | |
| 24 | + } | |
| 25 | + | |
| 26 | + public Integer getYn() { | |
| 27 | + return yn; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public void setYn(Integer yn) { | |
| 31 | + this.yn = yn; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public Integer getRiskType() { | |
| 35 | + return riskType; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public void setRiskType(Integer riskType) { | |
| 39 | + this.riskType = riskType; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public Integer getWeek() { | |
| 43 | + return week; | |
| 44 | + } | |
| 45 | + | |
| 46 | + public void setWeek(Integer week) { | |
| 47 | + this.week = week; | |
| 48 | + } | |
| 49 | + | |
| 50 | + @Override | |
| 51 | + public MongoQuery convertToQuery() { | |
| 52 | + MongoCondition condition = MongoCondition.newInstance(); | |
| 53 | + if (null != hospitalId) { | |
| 54 | + condition = condition.and("hospitalId", hospitalId, MongoOper.IS); | |
| 55 | + } | |
| 56 | + if (null!=week){ | |
| 57 | + condition = condition.and("week", week, MongoOper.IS); | |
| 58 | + } | |
| 59 | + if (null!=riskType){ | |
| 60 | + condition = condition.and("riskType", riskType, MongoOper.IS); | |
| 61 | + } | |
| 62 | + if (-1 != yn) { | |
| 63 | + condition = condition.and("yn", yn, MongoOper.IS); | |
| 64 | + } | |
| 65 | + return condition.toMongoQuery(); | |
| 66 | + } | |
| 67 | +} |
platform-dal/src/main/java/com/lyms/platform/query/PregnancyReportQuery.java
View file @
402a38d
| 1 | +package com.lyms.platform.query; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.base.IConvertToNativeQuery; | |
| 4 | +import com.lyms.platform.common.dao.BaseQuery; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
| 6 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
| 7 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 8 | +import com.lyms.platform.common.utils.StringUtils; | |
| 9 | + | |
| 10 | +import java.util.List; | |
| 11 | + | |
| 12 | +public class PregnancyReportQuery extends BaseQuery implements IConvertToNativeQuery { | |
| 13 | + | |
| 14 | + private String hospitalId; | |
| 15 | + | |
| 16 | + private Integer yn=-1; | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 高危因素集合 | |
| 20 | + */ | |
| 21 | + private List<String> rFactorList; | |
| 22 | + /** | |
| 23 | + * 高危因素 | |
| 24 | + */ | |
| 25 | + private String rFactor; | |
| 26 | + | |
| 27 | + //当前孕周 | |
| 28 | + private Integer week; | |
| 29 | + //体重类型 0为正常 1为轻 2为重 | |
| 30 | + private Integer weightType; | |
| 31 | + | |
| 32 | + public String getHospitalId() { | |
| 33 | + return hospitalId; | |
| 34 | + } | |
| 35 | + | |
| 36 | + public void setHospitalId(String hospitalId) { | |
| 37 | + this.hospitalId = hospitalId; | |
| 38 | + } | |
| 39 | + | |
| 40 | + public Integer getYn() { | |
| 41 | + return yn; | |
| 42 | + } | |
| 43 | + | |
| 44 | + public void setYn(Integer yn) { | |
| 45 | + this.yn = yn; | |
| 46 | + } | |
| 47 | + | |
| 48 | + public List<String> getrFactorList() { | |
| 49 | + return rFactorList; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public void setrFactorList(List<String> rFactorList) { | |
| 53 | + this.rFactorList = rFactorList; | |
| 54 | + } | |
| 55 | + | |
| 56 | + public String getrFactor() { | |
| 57 | + return rFactor; | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void setrFactor(String rFactor) { | |
| 61 | + this.rFactor = rFactor; | |
| 62 | + } | |
| 63 | + | |
| 64 | + public Integer getWeek() { | |
| 65 | + return week; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setWeek(Integer week) { | |
| 69 | + this.week = week; | |
| 70 | + } | |
| 71 | + | |
| 72 | + public Integer getWeightType() { | |
| 73 | + return weightType; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public void setWeightType(Integer weightType) { | |
| 77 | + this.weightType = weightType; | |
| 78 | + } | |
| 79 | + | |
| 80 | + @Override | |
| 81 | + public MongoQuery convertToQuery() { | |
| 82 | + MongoCondition condition = MongoCondition.newInstance(); | |
| 83 | + if (null != hospitalId) { | |
| 84 | + condition = condition.and("hospitalId", hospitalId, MongoOper.IS); | |
| 85 | + } | |
| 86 | + if (null!=week){ | |
| 87 | + condition = condition.and("week", week, MongoOper.IS); | |
| 88 | + } | |
| 89 | + if (null!=weightType){ | |
| 90 | + condition = condition.and("weightType", weightType, MongoOper.IS); | |
| 91 | + } | |
| 92 | + if (StringUtils.isNotEmpty(rFactor)) { | |
| 93 | + condition = condition.and("riskFactorId", rFactor, MongoOper.IN); | |
| 94 | + } else if (null != rFactorList && !rFactorList.isEmpty()) { | |
| 95 | + condition = condition.and("riskFactorId", rFactorList, MongoOper.IN); | |
| 96 | + } | |
| 97 | + if (-1 != yn) { | |
| 98 | + condition = condition.and("yn", yn, MongoOper.IS); | |
| 99 | + } | |
| 100 | + return condition.toMongoQuery(); | |
| 101 | + } | |
| 102 | +} |