Commit b93bf0f08264997544d3de9dd00cafa1ad3560e3
Exists in
master
修改产检删除
Showing 57 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBabyBookBuildingDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IOrganizationGroupsDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IOrganizationGroupsItemsDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BabyBookbuildingDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/OrganizationGroupsDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/OrganizationGroupsItemsDaoImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BabyBookbuildingService.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/MongoSyncService.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/OrganizationGroupsItemService.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/OrganizationGroupsService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/Permissions2.java
- platform-biz-service/src/main/resources/mainOrm/master/Permissions2.xml
- platform-biz-service/src/main/resources/mainOrm/slave/Permissions2.xml
- platform-common/src/main/java/com/lyms/platform/common/dao/BaseMongoDAOImpl.java
- platform-common/src/main/java/com/lyms/platform/common/pojo/SyncDataModel.java
- platform-common/src/main/java/com/lyms/platform/common/pojo/UpdateMultiData.java
- platform-dal/src/main/java/com/lyms/platform/pojo/BabyCheckModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/BabyModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/OrganizationGroups.java
- platform-dal/src/main/java/com/lyms/platform/pojo/OrganizationGroupsItems.java
- platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
- platform-dal/src/main/java/com/lyms/platform/pojo/ResidentsArchiveModel.java
- platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
- platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java
- platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
- platform-dal/src/main/java/com/lyms/platform/query/ResidentsArchiveQuery.java
- platform-data-api/src/main/java/com/lyms/platform/data/util/AmsMessageService.java
- platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PremaritalCheckupController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentArchivesRegionController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentsArchiveController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/FolicAcidFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PremaritalCheckupFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyBookbuildingAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyCheckRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/NewBabyManagerRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientManagerRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ResidentsArchiveAddRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ResidentsArchiveQueryRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBuildResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyCheckResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyGrowthCountResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ChildbirthManagerQueryModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/GrowthCountTask.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IBabyBookBuildingDao.java
View file @
b93bf0f
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IOrganizationGroupsDao.java
View file @
b93bf0f
| 1 | +package com.lyms.platform.biz.dal; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 4 | +import com.lyms.platform.pojo.OrganizationGroups; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * | |
| 10 | + * 机构组操作 | |
| 11 | + * | |
| 12 | + * Created by Administrator on 2016/12/21 0021. | |
| 13 | + */ | |
| 14 | +public interface IOrganizationGroupsDao { | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * | |
| 18 | + * 根据当前机构查询机构下的分组 | |
| 19 | + * | |
| 20 | + * @return | |
| 21 | + */ | |
| 22 | + List<OrganizationGroups> queryByOwner(MongoQuery mongoQuery); | |
| 23 | + | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 增加一个机构组 | |
| 27 | + * | |
| 28 | + * @param organizationGroups | |
| 29 | + * @return | |
| 30 | + */ | |
| 31 | + OrganizationGroups addOneEntity(OrganizationGroups organizationGroups); | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 查询符合条件的count | |
| 35 | + * | |
| 36 | + * @return 条数 | |
| 37 | + */ | |
| 38 | + int count(MongoQuery mongoQuery); | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 根据组id查询 | |
| 42 | + * | |
| 43 | + * @param id | |
| 44 | + * @return | |
| 45 | + */ | |
| 46 | + OrganizationGroups findById(String id); | |
| 47 | + | |
| 48 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IOrganizationGroupsItemsDao.java
View file @
b93bf0f
| 1 | +package com.lyms.platform.biz.dal; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 4 | +import com.lyms.platform.pojo.OrganizationGroupsItems; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * | |
| 10 | + * 机构组下的数据 | |
| 11 | + * | |
| 12 | + * Created by Administrator on 2016/12/21 0021. | |
| 13 | + */ | |
| 14 | +public interface IOrganizationGroupsItemsDao { | |
| 15 | + | |
| 16 | + /** | |
| 17 | + * 查询当前区域下选择的医院 | |
| 18 | + * | |
| 19 | + * @param mogoQuery | |
| 20 | + * @return | |
| 21 | + */ | |
| 22 | + List<OrganizationGroupsItems> queryList (MongoQuery mogoQuery); | |
| 23 | + | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 查询符合条件的条数 | |
| 27 | + * | |
| 28 | + * @param mongoQuery | |
| 29 | + * @return | |
| 30 | + */ | |
| 31 | + int count(MongoQuery mongoQuery); | |
| 32 | + | |
| 33 | + /** | |
| 34 | + * 增加一条数据 | |
| 35 | + * | |
| 36 | + * @param groupsItems | |
| 37 | + * @return | |
| 38 | + */ | |
| 39 | + OrganizationGroupsItems addOneEntity(OrganizationGroupsItems groupsItems); | |
| 40 | + | |
| 41 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/BabyBookbuildingDaoImpl.java
View file @
b93bf0f
| 1 | 1 | package com.lyms.platform.biz.dal.impl; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.common.utils.StringUtils; |
| 4 | +import com.lyms.platform.pojo.AntExChuModel; | |
| 4 | 5 | import com.lyms.platform.pojo.BabyCheckModel; |
| 5 | 6 | import com.mongodb.DBCollection; |
| 6 | 7 | import com.mongodb.DBObject; |
| ... | ... | @@ -10,6 +11,8 @@ |
| 10 | 11 | import org.springframework.data.mongodb.core.aggregation.AggregationOperation; |
| 11 | 12 | import org.springframework.data.mongodb.core.aggregation.AggregationResults; |
| 12 | 13 | import org.springframework.data.mongodb.core.query.Criteria; |
| 14 | +import org.springframework.data.mongodb.core.query.Query; | |
| 15 | +import org.springframework.data.mongodb.core.query.Update; | |
| 13 | 16 | import org.springframework.stereotype.Repository; |
| 14 | 17 | |
| 15 | 18 | import com.lyms.platform.biz.dal.IBabyBookBuildingDao; |
| ... | ... | @@ -103,6 +106,14 @@ |
| 103 | 106 | } |
| 104 | 107 | } |
| 105 | 108 | return ids; |
| 109 | + } | |
| 110 | + | |
| 111 | + | |
| 112 | + @Override | |
| 113 | + public void updateBabyLastGrowth(BabyCheckModel model) { | |
| 114 | + this.mongoTemplate.updateFirst(new Query(Criteria.where("id").is(model.getBuildId())), | |
| 115 | + Update.update("weightEvaluate", model.getWeightEvaluate()).set("heightEvaluate", | |
| 116 | + model.getHeadEvaluate()).set("headEvaluate",model.getHeadEvaluate()).set("heightWeight",model.getHeightWeight()), BabyModel.class); | |
| 106 | 117 | } |
| 107 | 118 | |
| 108 | 119 | } |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/OrganizationGroupsDaoImpl.java
View file @
b93bf0f
| 1 | +package com.lyms.platform.biz.dal.impl; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IOrganizationGroupsDao; | |
| 4 | +import com.lyms.platform.common.dao.BaseMongoDAOImpl; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 6 | +import com.lyms.platform.pojo.OrganizationGroups; | |
| 7 | +import org.springframework.stereotype.Repository; | |
| 8 | + | |
| 9 | +import java.util.List; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * | |
| 13 | + *机构组的dao | |
| 14 | + * | |
| 15 | + * Created by Administrator on 2016/12/21 0021. | |
| 16 | + */ | |
| 17 | +@Repository("organizationGroupsDao") | |
| 18 | +public class OrganizationGroupsDaoImpl extends BaseMongoDAOImpl<OrganizationGroups> implements IOrganizationGroupsDao { | |
| 19 | + | |
| 20 | + @Override | |
| 21 | + public List<OrganizationGroups> queryByOwner(MongoQuery mongoQuery) { | |
| 22 | + return find(mongoQuery.convertToMongoQuery()); | |
| 23 | + } | |
| 24 | + | |
| 25 | + @Override | |
| 26 | + public OrganizationGroups addOneEntity(OrganizationGroups organizationGroups) { | |
| 27 | + return save(organizationGroups); | |
| 28 | + } | |
| 29 | + | |
| 30 | + /** | |
| 31 | + * 根据组id查询 | |
| 32 | + * | |
| 33 | + * @param id | |
| 34 | + * @return | |
| 35 | + */ | |
| 36 | + public OrganizationGroups findById(String id){ | |
| 37 | + return super.findById(id); | |
| 38 | + } | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 查询符合条件的count | |
| 42 | + * | |
| 43 | + * @return 条数 | |
| 44 | + */ | |
| 45 | + public int count(MongoQuery mongoQuery){ | |
| 46 | + return (int)count(mongoQuery.convertToMongoQuery()); | |
| 47 | + } | |
| 48 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/OrganizationGroupsItemsDaoImpl.java
View file @
b93bf0f
| 1 | +package com.lyms.platform.biz.dal.impl; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IOrganizationGroupsItemsDao; | |
| 4 | +import com.lyms.platform.common.dao.BaseMongoDAOImpl; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 6 | +import com.lyms.platform.pojo.OrganizationGroupsItems; | |
| 7 | +import org.springframework.stereotype.Repository; | |
| 8 | + | |
| 9 | +import java.util.List; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * | |
| 13 | + * 机构组的成员 | |
| 14 | + * | |
| 15 | + * Created by Administrator on 2016/12/21 0021. | |
| 16 | + */ | |
| 17 | +@Repository("orgGroupsItemDao") | |
| 18 | +public class OrganizationGroupsItemsDaoImpl extends BaseMongoDAOImpl<OrganizationGroupsItems> implements IOrganizationGroupsItemsDao { | |
| 19 | + @Override | |
| 20 | + public List<OrganizationGroupsItems> queryList(MongoQuery mogoQuery) { | |
| 21 | + return find(mogoQuery.convertToMongoQuery()); | |
| 22 | + } | |
| 23 | + | |
| 24 | + @Override | |
| 25 | + public int count(MongoQuery mongoQuery) { | |
| 26 | + return (int) count(mongoQuery.convertToMongoQuery()); | |
| 27 | + } | |
| 28 | + | |
| 29 | + | |
| 30 | + public OrganizationGroupsItems addOneEntity(OrganizationGroupsItems groupsItems){ | |
| 31 | + return save(groupsItems); | |
| 32 | + } | |
| 33 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BabyBookbuildingService.java
View file @
b93bf0f
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/MongoSyncService.java
View file @
b93bf0f
| ... | ... | @@ -11,6 +11,7 @@ |
| 11 | 11 | import org.apache.commons.lang.StringUtils; |
| 12 | 12 | import org.springframework.beans.factory.annotation.Autowired; |
| 13 | 13 | import org.springframework.data.mongodb.core.MongoTemplate; |
| 14 | +import org.springframework.data.mongodb.core.query.Criteria; | |
| 14 | 15 | import org.springframework.data.mongodb.core.query.Query; |
| 15 | 16 | import org.springframework.data.mongodb.core.query.Update; |
| 16 | 17 | import org.springframework.stereotype.Service; |
| ... | ... | @@ -58,8 +59,14 @@ |
| 58 | 59 | } |
| 59 | 60 | if (obj instanceof UpdateMultiData) { |
| 60 | 61 | UpdateMultiData data = (UpdateMultiData) obj; |
| 61 | - if (data.getMongoQuery() != null && data.getMongoUpdate() != null) { | |
| 62 | - mongoTemplate.updateMulti(data.getMongoQuery(), data.getMongoUpdate(), updateClass); | |
| 62 | + if (data.getQuery() != null && data.getUpdate() != null) { | |
| 63 | + Update update = MongoConvertHelper | |
| 64 | + .convertToNativeUpdate(data.getUpdate()); | |
| 65 | + MongoCondition condition = new MongoCondition(); | |
| 66 | + for (String key:data.getQuery().keySet()) { | |
| 67 | + condition = condition.and(key,data.getQuery().get(key),MongoOper.IS); | |
| 68 | + } | |
| 69 | + mongoTemplate.updateMulti(condition.toMongoQuery().convertToMongoQuery(), update, updateClass); | |
| 63 | 70 | return true; |
| 64 | 71 | } else if (data.getQuery() != null && data.getUpdate() != null) { |
| 65 | 72 | MongoCondition c = null; |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/OrganizationGroupsItemService.java
View file @
b93bf0f
| 1 | +package com.lyms.platform.biz.service; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IOrganizationGroupsItemsDao; | |
| 4 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 5 | +import com.lyms.platform.pojo.OrganizationGroupsItems; | |
| 6 | +import com.lyms.platform.query.OrganizationGroupsItemQuery; | |
| 7 | +import org.apache.commons.lang.StringUtils; | |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | +import org.springframework.data.domain.Sort; | |
| 10 | +import org.springframework.stereotype.Service; | |
| 11 | + | |
| 12 | +import java.util.Date; | |
| 13 | +import java.util.List; | |
| 14 | + | |
| 15 | +/** | |
| 16 | + * 机构组的成员 | |
| 17 | + * <p/> | |
| 18 | + * Created by Administrator on 2016/12/21 0021. | |
| 19 | + */ | |
| 20 | +@Service | |
| 21 | +public class OrganizationGroupsItemService { | |
| 22 | + @Autowired | |
| 23 | + private IOrganizationGroupsItemsDao iOrganizationGroupsItemsDao; | |
| 24 | + | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 查询当前区域下选择的医院 | |
| 28 | + * | |
| 29 | + * @param mogoQuery | |
| 30 | + * @return | |
| 31 | + */ | |
| 32 | + public List<OrganizationGroupsItems> queryList(OrganizationGroupsItemQuery mogoQuery) { | |
| 33 | + MongoQuery mogo = mogoQuery.convertToQuery(); | |
| 34 | + if (StringUtils.isNotEmpty(mogoQuery.getNeed())) { | |
| 35 | + mogoQuery.mysqlBuild(iOrganizationGroupsItemsDao.count(mogo)); | |
| 36 | + mogo.start(mogoQuery.getOffset()).end(mogoQuery.getLimit()); | |
| 37 | + } | |
| 38 | + return iOrganizationGroupsItemsDao.queryList(mogo.addOrder(Sort.Direction.DESC, "modified")); | |
| 39 | + } | |
| 40 | + | |
| 41 | + public int count(OrganizationGroupsItemQuery mogoQuery) { | |
| 42 | + MongoQuery mogo = mogoQuery.convertToQuery(); | |
| 43 | + return iOrganizationGroupsItemsDao.count(mogo); | |
| 44 | + } | |
| 45 | + | |
| 46 | + /** | |
| 47 | + * 增加一条记录 | |
| 48 | + * | |
| 49 | + * @param groupsItems | |
| 50 | + * @return | |
| 51 | + */ | |
| 52 | + public OrganizationGroupsItems addOneEntity(OrganizationGroupsItems groupsItems) { | |
| 53 | + groupsItems.setCreated(new Date()); | |
| 54 | + groupsItems.setModified(new Date()); | |
| 55 | + return iOrganizationGroupsItemsDao.addOneEntity(groupsItems); | |
| 56 | + } | |
| 57 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/OrganizationGroupsService.java
View file @
b93bf0f
| 1 | +package com.lyms.platform.biz.service; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.IOrganizationGroupsDao; | |
| 4 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 5 | +import com.lyms.platform.pojo.OrganizationGroups; | |
| 6 | +import com.lyms.platform.query.OrganizationGroupsQuery; | |
| 7 | +import org.apache.commons.lang.StringUtils; | |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | +import org.springframework.data.domain.Sort; | |
| 10 | +import org.springframework.stereotype.Service; | |
| 11 | + | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * 机构组的服务 | |
| 16 | + * <p/> | |
| 17 | + * Created by Administrator on 2016/12/21 0021. | |
| 18 | + */ | |
| 19 | +@Service | |
| 20 | +public class OrganizationGroupsService { | |
| 21 | + | |
| 22 | + @Autowired | |
| 23 | + private IOrganizationGroupsDao iOrganizationGroupsDao; | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 根据id查询 | |
| 27 | + * | |
| 28 | + * @param id | |
| 29 | + * @return | |
| 30 | + */ | |
| 31 | + public OrganizationGroups findById(String id) { | |
| 32 | + return iOrganizationGroupsDao.findById(id); | |
| 33 | + } | |
| 34 | + | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 根据当前机构查询机构下的分组 | |
| 38 | + * | |
| 39 | + * @return | |
| 40 | + */ | |
| 41 | + public List<OrganizationGroups> queryByOwner(OrganizationGroupsQuery mongoQuery) { | |
| 42 | + MongoQuery mogo = mongoQuery.convertToQuery(); | |
| 43 | + if (StringUtils.isEmpty(mongoQuery.getNeed())) { | |
| 44 | + mongoQuery.mysqlBuild(iOrganizationGroupsDao.count(mogo)); | |
| 45 | + mogo.start(mongoQuery.getOffset()).end(mongoQuery.getLimit()); | |
| 46 | + } | |
| 47 | + return iOrganizationGroupsDao.queryByOwner(mogo.addOrder(Sort.Direction.DESC, "modified")); | |
| 48 | + } | |
| 49 | + | |
| 50 | + | |
| 51 | + /** | |
| 52 | + * 增加一个机构组 | |
| 53 | + * | |
| 54 | + * @param organizationGroups | |
| 55 | + * @return | |
| 56 | + */ | |
| 57 | + public OrganizationGroups addOneEntity(OrganizationGroups organizationGroups) { | |
| 58 | + return iOrganizationGroupsDao.addOneEntity(organizationGroups); | |
| 59 | + } | |
| 60 | +} |
platform-biz-service/src/main/java/com/lyms/platform/permission/model/Permissions2.java
View file @
b93bf0f
| ... | ... | @@ -15,6 +15,15 @@ |
| 15 | 15 | private String createUser; |
| 16 | 16 | private Integer enable; |
| 17 | 17 | private String extra_data; |
| 18 | + private Integer weight; | |
| 19 | + | |
| 20 | + public Integer getWeight() { | |
| 21 | + return weight; | |
| 22 | + } | |
| 23 | + | |
| 24 | + public void setWeight(Integer weight) { | |
| 25 | + this.weight = weight; | |
| 26 | + } | |
| 18 | 27 | |
| 19 | 28 | public String getExtra_data() { |
| 20 | 29 | return extra_data; |
platform-biz-service/src/main/resources/mainOrm/master/Permissions2.xml
View file @
b93bf0f
| ... | ... | @@ -14,6 +14,7 @@ |
| 14 | 14 | <result column="create_user" property="createUser" jdbcType="VARCHAR" /> |
| 15 | 15 | <result column="enable" property="enable" jdbcType="INTEGER" /> |
| 16 | 16 | <result column="extra_data" property="extra_data" jdbcType="VARCHAR" /> |
| 17 | + <result column="weight" property="weight" jdbcType="INTEGER" /> | |
| 17 | 18 | </resultMap> |
| 18 | 19 | |
| 19 | 20 | |
| ... | ... | @@ -65,7 +66,7 @@ |
| 65 | 66 | |
| 66 | 67 | |
| 67 | 68 | <select id="getPermissions2" resultMap="Permissions2ResultMap" parameterType="java.lang.Integer"> |
| 68 | - select id,name,uri,type,puri,icon,yn,create_date,create_user,enable,extra_data | |
| 69 | + select id,name,uri,type,puri,icon,yn,create_date,create_user,enable,extra_data,weight | |
| 69 | 70 | from permissions2 where id = #{id,jdbcType=INTEGER} |
| 70 | 71 | </select> |
| 71 | 72 | |
| ... | ... | @@ -120,7 +121,7 @@ |
| 120 | 121 | |
| 121 | 122 | |
| 122 | 123 | <select id="queryPermissions2" resultMap="Permissions2ResultMap" parameterType="com.lyms.platform.permission.model.Permissions2Query"> |
| 123 | - select id,name,uri,type,puri,icon,yn,create_date,create_user,enable,extra_data | |
| 124 | + select id,name,uri,type,puri,icon,yn,create_date,create_user,enable,extra_data,weight | |
| 124 | 125 | from permissions2 |
| 125 | 126 | <include refid="Permissions2Condition" /> |
| 126 | 127 | <include refid="orderAndLimit" /> |
platform-biz-service/src/main/resources/mainOrm/slave/Permissions2.xml
View file @
b93bf0f
| ... | ... | @@ -14,6 +14,7 @@ |
| 14 | 14 | <result column="create_user" property="createUser" jdbcType="VARCHAR" /> |
| 15 | 15 | <result column="enable" property="enable" jdbcType="INTEGER" /> |
| 16 | 16 | <result column="extra_data" property="extra_data" jdbcType="VARCHAR" /> |
| 17 | + <result column="weight" property="weight" jdbcType="INTEGER" /> | |
| 17 | 18 | </resultMap> |
| 18 | 19 | |
| 19 | 20 | |
| ... | ... | @@ -64,7 +65,7 @@ |
| 64 | 65 | |
| 65 | 66 | |
| 66 | 67 | <select id="getPermissions2" resultMap="Permissions2ResultMap" parameterType="java.lang.Integer"> |
| 67 | - select id,name,uri,type,puri,icon,yn,create_date,create_user,enable,extra_data | |
| 68 | + select id,name,uri,type,puri,icon,yn,create_date,create_user,enable,extra_data,weight | |
| 68 | 69 | from permissions2 where id = #{id,jdbcType=INTEGER} |
| 69 | 70 | </select> |
| 70 | 71 | |
| ... | ... | @@ -119,7 +120,7 @@ |
| 119 | 120 | |
| 120 | 121 | |
| 121 | 122 | <select id="queryPermissions2" resultMap="Permissions2ResultMap" parameterType="com.lyms.platform.permission.model.Permissions2Query"> |
| 122 | - select id,name,uri,type,puri,icon,yn,create_date,create_user,enable,extra_data | |
| 123 | + select id,name,uri,type,puri,icon,yn,create_date,create_user,enable,extra_data,weight | |
| 123 | 124 | from permissions2 |
| 124 | 125 | <include refid="Permissions2Condition" /> |
| 125 | 126 | <include refid="orderAndLimit" /> |
platform-common/src/main/java/com/lyms/platform/common/dao/BaseMongoDAOImpl.java
View file @
b93bf0f
| 1 | 1 | package com.lyms.platform.common.dao; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
| 4 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 3 | 6 | import com.lyms.platform.common.dao.operator.Page; |
| 4 | 7 | import com.lyms.platform.common.pojo.SyncDataModel; |
| 5 | 8 | import com.lyms.platform.common.pojo.UpdateMultiData; |
| ... | ... | @@ -8,6 +11,7 @@ |
| 8 | 11 | import org.apache.commons.collections.CollectionUtils; |
| 9 | 12 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | 13 | import org.springframework.data.mongodb.core.MongoTemplate; |
| 14 | +import org.springframework.data.mongodb.core.query.Criteria; | |
| 11 | 15 | import org.springframework.data.mongodb.core.query.Query; |
| 12 | 16 | import org.springframework.data.mongodb.core.query.Update; |
| 13 | 17 | import org.springframework.util.Assert; |
| ... | ... | @@ -144,7 +148,6 @@ |
| 144 | 148 | // 数据上传 |
| 145 | 149 | UpdateMultiData data = new UpdateMultiData(); |
| 146 | 150 | data.setMongoQuery(query); |
| 147 | - data.setMongoUpdate(update); | |
| 148 | 151 | data.setUpdate(ReflectionUtils.getUpdateField(obj)); |
| 149 | 152 | // 批量修改的情况下,ID字段是要修改的CLASS |
| 150 | 153 | addSyncData("UPDATEMULTI", data, obj.getClass().getName()); |
platform-common/src/main/java/com/lyms/platform/common/pojo/SyncDataModel.java
View file @
b93bf0f
| 1 | 1 | package com.lyms.platform.common.pojo; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
| 4 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 3 | 6 | import com.lyms.platform.common.result.BaseModel; |
| 7 | +import com.lyms.platform.common.utils.MongoConvertHelper; | |
| 8 | +import com.lyms.platform.common.utils.ReflectionUtils; | |
| 9 | +import com.lyms.platform.common.utils.SerializUtils; | |
| 10 | +import org.apache.commons.codec.binary.Base64; | |
| 4 | 11 | import org.springframework.data.mongodb.core.mapping.Document; |
| 12 | +import org.springframework.data.mongodb.core.query.Query; | |
| 13 | +import org.springframework.data.mongodb.core.query.Update; | |
| 14 | +import org.springframework.util.Assert; | |
| 5 | 15 | |
| 16 | +import java.io.Serializable; | |
| 6 | 17 | import java.util.Date; |
| 7 | 18 | |
| 8 | 19 | /** |
| ... | ... | @@ -10,6 +21,21 @@ |
| 10 | 21 | */ |
| 11 | 22 | @Document(collection = "lyms_sync_data") |
| 12 | 23 | public class SyncDataModel extends BaseModel { |
| 24 | + | |
| 25 | + public static void main(String[] a) { | |
| 26 | + Query query = new MongoQuery(new MongoCondition("yn", 1, MongoOper.IS)).convertToMongoQuery(); | |
| 27 | + SyncDataModel model = new SyncDataModel(); | |
| 28 | + model.setDataId("fuck"); | |
| 29 | + Assert.notNull(model, "execute findAndModify method must not null."); | |
| 30 | + Update update = MongoConvertHelper | |
| 31 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(model)); | |
| 32 | + Assert.notNull(update, "execute findAndModify method must not null.update:" + update); | |
| 33 | + // 数据上传 | |
| 34 | + UpdateMultiData data = new UpdateMultiData(); | |
| 35 | + data.setMongoQuery(query); | |
| 36 | + data.setUpdate(ReflectionUtils.getUpdateField(model)); | |
| 37 | + System.out.println(Base64.encodeBase64String(SerializUtils.objToByte((Serializable) data))); | |
| 38 | + } | |
| 13 | 39 | |
| 14 | 40 | private static final long serialVersionUID = 97531300010L; |
| 15 | 41 |
platform-common/src/main/java/com/lyms/platform/common/pojo/UpdateMultiData.java
View file @
b93bf0f
| ... | ... | @@ -21,21 +21,6 @@ |
| 21 | 21 | private Map<String, Object> query; |
| 22 | 22 | private Map<String, Object> update; |
| 23 | 23 | |
| 24 | - private Query mongoQuery; | |
| 25 | - private Update mongoUpdate; | |
| 26 | - | |
| 27 | - public Update getMongoUpdate() { | |
| 28 | - return mongoUpdate; | |
| 29 | - } | |
| 30 | - | |
| 31 | - public void setMongoUpdate(Update mongoUpdate) { | |
| 32 | - this.mongoUpdate = mongoUpdate; | |
| 33 | - } | |
| 34 | - | |
| 35 | - public Query getMongoQuery() { | |
| 36 | - return mongoQuery; | |
| 37 | - } | |
| 38 | - | |
| 39 | 24 | public void setQuery(Map<String, Object> query) { |
| 40 | 25 | this.query = query; |
| 41 | 26 | } |
| ... | ... | @@ -45,7 +30,6 @@ |
| 45 | 30 | } |
| 46 | 31 | |
| 47 | 32 | public void setMongoQuery(Query query) { |
| 48 | - this.mongoQuery = query; | |
| 49 | 33 | DBObject dbObject = query.getQueryObject(); |
| 50 | 34 | this.query = new HashMap<>(); |
| 51 | 35 | for (String key:dbObject.keySet()) { |
platform-dal/src/main/java/com/lyms/platform/pojo/BabyCheckModel.java
View file @
b93bf0f
| ... | ... | @@ -225,6 +225,37 @@ |
| 225 | 225 | |
| 226 | 226 | private String hospitalId; |
| 227 | 227 | |
| 228 | + //体重评价 | |
| 229 | + private String weightEvaluate; | |
| 230 | + //身长评价 | |
| 231 | + private String heightEvaluate; | |
| 232 | + //头围评价 | |
| 233 | + private String headEvaluate; | |
| 234 | + | |
| 235 | + public String getWeightEvaluate() { | |
| 236 | + return weightEvaluate; | |
| 237 | + } | |
| 238 | + | |
| 239 | + public void setWeightEvaluate(String weightEvaluate) { | |
| 240 | + this.weightEvaluate = weightEvaluate; | |
| 241 | + } | |
| 242 | + | |
| 243 | + public String getHeightEvaluate() { | |
| 244 | + return heightEvaluate; | |
| 245 | + } | |
| 246 | + | |
| 247 | + public void setHeightEvaluate(String heightEvaluate) { | |
| 248 | + this.heightEvaluate = heightEvaluate; | |
| 249 | + } | |
| 250 | + | |
| 251 | + public String getHeadEvaluate() { | |
| 252 | + return headEvaluate; | |
| 253 | + } | |
| 254 | + | |
| 255 | + public void setHeadEvaluate(String headEvaluate) { | |
| 256 | + this.headEvaluate = headEvaluate; | |
| 257 | + } | |
| 258 | + | |
| 228 | 259 | public String getHospitalId() { |
| 229 | 260 | return hospitalId; |
| 230 | 261 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/BabyModel.java
View file @
b93bf0f
| ... | ... | @@ -210,6 +210,59 @@ |
| 210 | 210 | //儿童诊断 |
| 211 | 211 | private String babyDiagnosis; |
| 212 | 212 | |
| 213 | + //体重评价 | |
| 214 | + private String weightEvaluate; | |
| 215 | + //身长评价 | |
| 216 | + private String heightEvaluate; | |
| 217 | + //头围评价 | |
| 218 | + private String headEvaluate; | |
| 219 | + | |
| 220 | + //身长别体重 | |
| 221 | + private String heightWeight; | |
| 222 | + | |
| 223 | + //病历号(住院号) | |
| 224 | + private String blNo; | |
| 225 | + | |
| 226 | + public String getBlNo() { | |
| 227 | + return blNo; | |
| 228 | + } | |
| 229 | + | |
| 230 | + public void setBlNo(String blNo) { | |
| 231 | + this.blNo = blNo; | |
| 232 | + } | |
| 233 | + | |
| 234 | + public String getWeightEvaluate() { | |
| 235 | + return weightEvaluate; | |
| 236 | + } | |
| 237 | + | |
| 238 | + public void setWeightEvaluate(String weightEvaluate) { | |
| 239 | + this.weightEvaluate = weightEvaluate; | |
| 240 | + } | |
| 241 | + | |
| 242 | + public String getHeightEvaluate() { | |
| 243 | + return heightEvaluate; | |
| 244 | + } | |
| 245 | + | |
| 246 | + public void setHeightEvaluate(String heightEvaluate) { | |
| 247 | + this.heightEvaluate = heightEvaluate; | |
| 248 | + } | |
| 249 | + | |
| 250 | + public String getHeadEvaluate() { | |
| 251 | + return headEvaluate; | |
| 252 | + } | |
| 253 | + | |
| 254 | + public void setHeadEvaluate(String headEvaluate) { | |
| 255 | + this.headEvaluate = headEvaluate; | |
| 256 | + } | |
| 257 | + | |
| 258 | + public String getHeightWeight() { | |
| 259 | + return heightWeight; | |
| 260 | + } | |
| 261 | + | |
| 262 | + public void setHeightWeight(String heightWeight) { | |
| 263 | + this.heightWeight = heightWeight; | |
| 264 | + } | |
| 265 | + | |
| 213 | 266 | public String getBabyDiagnosis() { |
| 214 | 267 | return babyDiagnosis; |
| 215 | 268 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/OrganizationGroups.java
View file @
b93bf0f
| 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 | + | |
| 9 | +/** | |
| 10 | + * 机构组 | |
| 11 | + * <p/> | |
| 12 | + * Created by Administrator on 2016/12/21 0021. | |
| 13 | + */ | |
| 14 | +@Document(collection = "lyms_groups") | |
| 15 | +public class OrganizationGroups extends BaseModel{ | |
| 16 | + | |
| 17 | + private String id; | |
| 18 | + //机构id | |
| 19 | + private Integer owner; | |
| 20 | + | |
| 21 | + | |
| 22 | + //组名 | |
| 23 | + private String groupName; | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * | |
| 27 | + * 建档方式 | |
| 28 | + * | |
| 29 | + * @link GroupEnums.BuildType | |
| 30 | + */ | |
| 31 | + private Integer bType; | |
| 32 | + | |
| 33 | + private Date created; | |
| 34 | + | |
| 35 | + private Date modified; | |
| 36 | + | |
| 37 | + public Integer getOwner() { | |
| 38 | + return owner; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setOwner(Integer owner) { | |
| 42 | + this.owner = owner; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public String getId() { | |
| 46 | + return id; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public void setId(String id) { | |
| 50 | + this.id = id; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public String getGroupName() { | |
| 54 | + return groupName; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public void setGroupName(String groupName) { | |
| 58 | + this.groupName = groupName; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public Integer getbType() { | |
| 62 | + return bType; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void setbType(Integer bType) { | |
| 66 | + this.bType = bType; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public Date getCreated() { | |
| 70 | + return created; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public void setCreated(Date created) { | |
| 74 | + this.created = created; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public Date getModified() { | |
| 78 | + return modified; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public void setModified(Date modified) { | |
| 82 | + this.modified = modified; | |
| 83 | + } | |
| 84 | +} |
platform-dal/src/main/java/com/lyms/platform/pojo/OrganizationGroupsItems.java
View file @
b93bf0f
| 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 | + | |
| 9 | +/** | |
| 10 | + * 机构组项目 | |
| 11 | + * | |
| 12 | + * | |
| 13 | + * Created by Administrator on 2016/12/21 0021. | |
| 14 | + */ | |
| 15 | +@Document(collection = "lyms_group_items") | |
| 16 | +public class OrganizationGroupsItems extends BaseModel { | |
| 17 | + | |
| 18 | + | |
| 19 | + private String id; | |
| 20 | + //省市区id | |
| 21 | + private String parentId; | |
| 22 | + //组id | |
| 23 | + private String groupId; | |
| 24 | + | |
| 25 | + //类型 -1 表示 是选择的区域 1 表示选择了具体的医院 | |
| 26 | + private Integer type; | |
| 27 | + //选择的医院 | |
| 28 | + private List<Integer> hId; | |
| 29 | + | |
| 30 | + private Date created; | |
| 31 | + | |
| 32 | + private Date modified; | |
| 33 | + | |
| 34 | + public String getGroupId() { | |
| 35 | + return groupId; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public void setGroupId(String groupId) { | |
| 39 | + this.groupId = groupId; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public String getId() { | |
| 43 | + return id; | |
| 44 | + } | |
| 45 | + | |
| 46 | + public void setId(String id) { | |
| 47 | + this.id = id; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public String getParentId() { | |
| 51 | + return parentId; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public void setParentId(String parentId) { | |
| 55 | + this.parentId = parentId; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public Integer getType() { | |
| 59 | + return type; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public void setType(Integer type) { | |
| 63 | + this.type = type; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public List<Integer> gethId() { | |
| 67 | + return hId; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void sethId(List<Integer> hId) { | |
| 71 | + this.hId = hId; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public Date getCreated() { | |
| 75 | + return created; | |
| 76 | + } | |
| 77 | + | |
| 78 | + public void setCreated(Date created) { | |
| 79 | + this.created = created; | |
| 80 | + } | |
| 81 | + | |
| 82 | + public Date getModified() { | |
| 83 | + return modified; | |
| 84 | + } | |
| 85 | + | |
| 86 | + public void setModified(Date modified) { | |
| 87 | + this.modified = modified; | |
| 88 | + } | |
| 89 | +} |
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java
View file @
b93bf0f
| 1 | 1 | package com.lyms.platform.pojo; |
| 2 | 2 | |
| 3 | -import java.util.Date; | |
| 4 | -import java.util.List; | |
| 5 | -import java.util.Objects; | |
| 6 | - | |
| 7 | 3 | import com.lyms.platform.beans.SerialIdEnum; |
| 4 | +import com.lyms.platform.common.result.BaseModel; | |
| 5 | +import com.lyms.platform.common.utils.DateUtil; | |
| 8 | 6 | import org.springframework.data.mongodb.core.mapping.Document; |
| 9 | 7 | import org.springframework.data.mongodb.core.mapping.Field; |
| 10 | 8 | |
| 11 | -import com.lyms.platform.common.result.BaseModel; | |
| 12 | -import com.lyms.platform.common.utils.DateUtil; | |
| 9 | +import java.util.Date; | |
| 10 | +import java.util.List; | |
| 11 | +import java.util.Objects; | |
| 13 | 12 | |
| 14 | 13 | |
| 15 | 14 | @Document(collection="lyms_patient") |
| ... | ... | @@ -235,6 +234,48 @@ |
| 235 | 234 | private Integer postViewTimes; |
| 236 | 235 | //操作人 |
| 237 | 236 | private Integer operator; |
| 237 | + | |
| 238 | + // 分娩相关信息 | |
| 239 | + // 分娩医院 | |
| 240 | + private String fmHospital; | |
| 241 | + // 分娩年龄 | |
| 242 | + private Integer fmAge; | |
| 243 | + // 分娩孕周 | |
| 244 | + private Integer fmWeek; | |
| 245 | + // 分娩方式 | |
| 246 | + private String fmType; | |
| 247 | + | |
| 248 | + public String getFmHospital() { | |
| 249 | + return fmHospital; | |
| 250 | + } | |
| 251 | + | |
| 252 | + public void setFmHospital(String fmHospital) { | |
| 253 | + this.fmHospital = fmHospital; | |
| 254 | + } | |
| 255 | + | |
| 256 | + public Integer getFmAge() { | |
| 257 | + return fmAge; | |
| 258 | + } | |
| 259 | + | |
| 260 | + public void setFmAge(Integer fmAge) { | |
| 261 | + this.fmAge = fmAge; | |
| 262 | + } | |
| 263 | + | |
| 264 | + public Integer getFmWeek() { | |
| 265 | + return fmWeek; | |
| 266 | + } | |
| 267 | + | |
| 268 | + public void setFmWeek(Integer fmWeek) { | |
| 269 | + this.fmWeek = fmWeek; | |
| 270 | + } | |
| 271 | + | |
| 272 | + public String getFmType() { | |
| 273 | + return fmType; | |
| 274 | + } | |
| 275 | + | |
| 276 | + public void setFmType(String fmType) { | |
| 277 | + this.fmType = fmType; | |
| 278 | + } | |
| 238 | 279 | |
| 239 | 280 | public String getSource() { |
| 240 | 281 | return source; |
platform-dal/src/main/java/com/lyms/platform/pojo/ResidentsArchiveModel.java
View file @
b93bf0f
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | //性别 |
| 25 | 25 | private String sex; |
| 26 | 26 | //出生日期 |
| 27 | - private String birthday; | |
| 27 | + private Date birthday; | |
| 28 | 28 | //国籍 |
| 29 | 29 | private String countryId; |
| 30 | 30 | //民族Id |
| ... | ... | @@ -87,7 +87,7 @@ |
| 87 | 87 | //建档人 |
| 88 | 88 | private String buildDoctor; |
| 89 | 89 | //建档日期 |
| 90 | - private String buildDay; | |
| 90 | + private Date buildDay; | |
| 91 | 91 | |
| 92 | 92 | /* table info */ |
| 93 | 93 | |
| 94 | 94 | |
| ... | ... | @@ -132,11 +132,11 @@ |
| 132 | 132 | this.sex = sex; |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - public String getBirthday() { | |
| 135 | + public Date getBirthday() { | |
| 136 | 136 | return birthday; |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | - public void setBirthday(String birthday) { | |
| 139 | + public void setBirthday(Date birthday) { | |
| 140 | 140 | this.birthday = birthday; |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | |
| ... | ... | @@ -372,11 +372,11 @@ |
| 372 | 372 | this.buildDoctor = buildDoctor; |
| 373 | 373 | } |
| 374 | 374 | |
| 375 | - public String getBuildDay() { | |
| 375 | + public Date getBuildDay() { | |
| 376 | 376 | return buildDay; |
| 377 | 377 | } |
| 378 | 378 | |
| 379 | - public void setBuildDay(String buildDay) { | |
| 379 | + public void setBuildDay(Date buildDay) { | |
| 380 | 380 | this.buildDay = buildDay; |
| 381 | 381 | } |
| 382 | 382 |
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
View file @
b93bf0f
| ... | ... | @@ -245,6 +245,48 @@ |
| 245 | 245 | |
| 246 | 246 | private String queryNo; |
| 247 | 247 | |
| 248 | + //体重评价 | |
| 249 | + private String weightEvaluate; | |
| 250 | + //身长评价 | |
| 251 | + private String heightEvaluate; | |
| 252 | + //头围评价 | |
| 253 | + private String headEvaluate; | |
| 254 | + | |
| 255 | + //身长别体重 | |
| 256 | + private String heightWeight; | |
| 257 | + | |
| 258 | + public String getWeightEvaluate() { | |
| 259 | + return weightEvaluate; | |
| 260 | + } | |
| 261 | + | |
| 262 | + public void setWeightEvaluate(String weightEvaluate) { | |
| 263 | + this.weightEvaluate = weightEvaluate; | |
| 264 | + } | |
| 265 | + | |
| 266 | + public String getHeightEvaluate() { | |
| 267 | + return heightEvaluate; | |
| 268 | + } | |
| 269 | + | |
| 270 | + public void setHeightEvaluate(String heightEvaluate) { | |
| 271 | + this.heightEvaluate = heightEvaluate; | |
| 272 | + } | |
| 273 | + | |
| 274 | + public String getHeadEvaluate() { | |
| 275 | + return headEvaluate; | |
| 276 | + } | |
| 277 | + | |
| 278 | + public void setHeadEvaluate(String headEvaluate) { | |
| 279 | + this.headEvaluate = headEvaluate; | |
| 280 | + } | |
| 281 | + | |
| 282 | + public String getHeightWeight() { | |
| 283 | + return heightWeight; | |
| 284 | + } | |
| 285 | + | |
| 286 | + public void setHeightWeight(String heightWeight) { | |
| 287 | + this.heightWeight = heightWeight; | |
| 288 | + } | |
| 289 | + | |
| 248 | 290 | public String getQueryNo() { |
| 249 | 291 | return queryNo; |
| 250 | 292 | } |
| ... | ... | @@ -448,6 +490,20 @@ |
| 448 | 490 | if (null != pregnancyOut) { |
| 449 | 491 | condition = condition.and("pregnancyOut", pregnancyOut, MongoOper.IS); |
| 450 | 492 | } |
| 493 | + | |
| 494 | + if (null != weightEvaluate) { | |
| 495 | + condition = condition.and("weightEvaluate", weightEvaluate, MongoOper.IS); | |
| 496 | + } | |
| 497 | + if (null != heightEvaluate) { | |
| 498 | + condition = condition.and("heightEvaluate", heightEvaluate, MongoOper.IS); | |
| 499 | + } | |
| 500 | + if (null != headEvaluate) { | |
| 501 | + condition = condition.and("pregnancyOut", headEvaluate, MongoOper.IS); | |
| 502 | + } | |
| 503 | + if (null != heightWeight) { | |
| 504 | + condition = condition.and("pregnancyOut", heightWeight, MongoOper.IS); | |
| 505 | + } | |
| 506 | + | |
| 451 | 507 | |
| 452 | 508 | if (!StringUtils.isEmpty(mcertNo)) { |
| 453 | 509 | condition = condition.and("mcertNo", mcertNo, MongoOper.IS); |
platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java
View file @
b93bf0f
| ... | ... | @@ -31,6 +31,17 @@ |
| 31 | 31 | |
| 32 | 32 | private boolean neEnd; |
| 33 | 33 | |
| 34 | + private String deliveryModeQueryJson; | |
| 35 | + private String fmHospital; | |
| 36 | + | |
| 37 | + public String getFmHospital() { | |
| 38 | + return fmHospital; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setFmHospital(String fmHospital) { | |
| 42 | + this.fmHospital = fmHospital; | |
| 43 | + } | |
| 44 | + | |
| 34 | 45 | public boolean isNeEnd() { |
| 35 | 46 | return neEnd; |
| 36 | 47 | } |
| ... | ... | @@ -127,6 +138,12 @@ |
| 127 | 138 | if (null != hospitalId) { |
| 128 | 139 | condition = condition.and("hospitalId", hospitalId, MongoOper.IS); |
| 129 | 140 | } |
| 141 | + if (null != fmHospital) { | |
| 142 | + condition = condition.and("fmHospital", fmHospital, MongoOper.IS); | |
| 143 | + } | |
| 144 | + if (null != deliveryModeQueryJson) { | |
| 145 | + condition = condition.and("deliveryMode", deliveryModeQueryJson, MongoOper.LIKE); | |
| 146 | + } | |
| 130 | 147 | Criteria c = null; |
| 131 | 148 | |
| 132 | 149 | Boolean isAddStart = Boolean.FALSE; |
| ... | ... | @@ -215,6 +232,14 @@ |
| 215 | 232 | |
| 216 | 233 | public void setDeliveryMode(String deliveryMode) { |
| 217 | 234 | this.deliveryMode = deliveryMode; |
| 235 | + } | |
| 236 | + | |
| 237 | + public String getDeliveryModeQueryJson() { | |
| 238 | + return deliveryModeQueryJson; | |
| 239 | + } | |
| 240 | + | |
| 241 | + public void setDeliveryModeQueryJson(String deliveryModeQueryJson) { | |
| 242 | + this.deliveryModeQueryJson = deliveryModeQueryJson; | |
| 218 | 243 | } |
| 219 | 244 | } |
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
b93bf0f
| ... | ... | @@ -182,6 +182,9 @@ |
| 182 | 182 | //查询号 |
| 183 | 183 | private String queryNo; |
| 184 | 184 | |
| 185 | + //另一个查询号 | |
| 186 | + private String queryNo1; | |
| 187 | + | |
| 185 | 188 | public String getQueryNo() { |
| 186 | 189 | return queryNo; |
| 187 | 190 | } |
| ... | ... | @@ -190,6 +193,14 @@ |
| 190 | 193 | this.queryNo = queryNo; |
| 191 | 194 | } |
| 192 | 195 | |
| 196 | + public String getQueryNo1() { | |
| 197 | + return queryNo1; | |
| 198 | + } | |
| 199 | + | |
| 200 | + public void setQueryNo1(String queryNo1) { | |
| 201 | + this.queryNo1 = queryNo1; | |
| 202 | + } | |
| 203 | + | |
| 193 | 204 | public Integer getPostViewTimes() { |
| 194 | 205 | return postViewTimes; |
| 195 | 206 | } |
| 196 | 207 | |
| 197 | 208 | |
| ... | ... | @@ -357,10 +368,24 @@ |
| 357 | 368 | |
| 358 | 369 | //建档医生 |
| 359 | 370 | private String bookbuildingDoctor; |
| 371 | + private List<String> bookbuildingDoctorList; | |
| 360 | 372 | |
| 361 | 373 | //档案编号 |
| 362 | 374 | private String fileCode; |
| 375 | + // 分娩相关信息 | |
| 376 | + // 分娩医院 | |
| 377 | + private String fmHospital; | |
| 378 | + private List<String> fmHospitalList; | |
| 379 | + // 分娩年龄 | |
| 380 | + private Integer fmAgeStart; | |
| 381 | + private Integer fmAgeEnd; | |
| 382 | + // 分娩孕周 | |
| 383 | + private Integer fmWeekStart; | |
| 384 | + private Integer fmWeekEnd; | |
| 385 | + // 分娩方式 | |
| 386 | + private String fmType; | |
| 363 | 387 | |
| 388 | + | |
| 364 | 389 | public String getFileCode() { |
| 365 | 390 | return fileCode; |
| 366 | 391 | } |
| ... | ... | @@ -730,6 +755,54 @@ |
| 730 | 755 | this.phone = phone; |
| 731 | 756 | } |
| 732 | 757 | |
| 758 | + public String getFmHospital() { | |
| 759 | + return fmHospital; | |
| 760 | + } | |
| 761 | + | |
| 762 | + public void setFmHospital(String fmHospital) { | |
| 763 | + this.fmHospital = fmHospital; | |
| 764 | + } | |
| 765 | + | |
| 766 | + public Integer getFmAgeStart() { | |
| 767 | + return fmAgeStart; | |
| 768 | + } | |
| 769 | + | |
| 770 | + public void setFmAgeStart(Integer fmAgeStart) { | |
| 771 | + this.fmAgeStart = fmAgeStart; | |
| 772 | + } | |
| 773 | + | |
| 774 | + public Integer getFmAgeEnd() { | |
| 775 | + return fmAgeEnd; | |
| 776 | + } | |
| 777 | + | |
| 778 | + public void setFmAgeEnd(Integer fmAgeEnd) { | |
| 779 | + this.fmAgeEnd = fmAgeEnd; | |
| 780 | + } | |
| 781 | + | |
| 782 | + public Integer getFmWeekStart() { | |
| 783 | + return fmWeekStart; | |
| 784 | + } | |
| 785 | + | |
| 786 | + public void setFmWeekStart(Integer fmWeekStart) { | |
| 787 | + this.fmWeekStart = fmWeekStart; | |
| 788 | + } | |
| 789 | + | |
| 790 | + public Integer getFmWeekEnd() { | |
| 791 | + return fmWeekEnd; | |
| 792 | + } | |
| 793 | + | |
| 794 | + public void setFmWeekEnd(Integer fmWeekEnd) { | |
| 795 | + this.fmWeekEnd = fmWeekEnd; | |
| 796 | + } | |
| 797 | + | |
| 798 | + public String getFmType() { | |
| 799 | + return fmType; | |
| 800 | + } | |
| 801 | + | |
| 802 | + public void setFmType(String fmType) { | |
| 803 | + this.fmType = fmType; | |
| 804 | + } | |
| 805 | + | |
| 733 | 806 | public String getAddress() { |
| 734 | 807 | return address; |
| 735 | 808 | } |
| ... | ... | @@ -796,6 +869,9 @@ |
| 796 | 869 | if (bookbuildingDoctor != null) { |
| 797 | 870 | condition = condition.and("bookbuildingDoctor", bookbuildingDoctor, MongoOper.IS); |
| 798 | 871 | } |
| 872 | + if (CollectionUtils.isNotEmpty(bookbuildingDoctorList)) { | |
| 873 | + condition = condition.and("bookbuildingDoctor", bookbuildingDoctorList, MongoOper.IN); | |
| 874 | + } | |
| 799 | 875 | if (visitstatus != -1) { |
| 800 | 876 | condition = condition.and("isVisit", visitstatus, MongoOper.IS); |
| 801 | 877 | } |
| 802 | 878 | |
| ... | ... | @@ -829,7 +905,9 @@ |
| 829 | 905 | condition = condition.and("areaRegisterId", areaRegisterId, MongoOper.IS); |
| 830 | 906 | } |
| 831 | 907 | |
| 908 | + // 分娩信息 | |
| 832 | 909 | |
| 910 | + | |
| 833 | 911 | /* //户籍地 |
| 834 | 912 | private String provinceRegisterId; |
| 835 | 913 | private String cityRegisterId; |
| ... | ... | @@ -883,6 +961,14 @@ |
| 883 | 961 | c1= c.orCondition(new MongoCondition[]{con1, con2, con3,con4}).getCriteria(); |
| 884 | 962 | } |
| 885 | 963 | |
| 964 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(queryNo1)) { | |
| 965 | + MongoCondition c = MongoCondition.newInstance(); | |
| 966 | + MongoCondition con1 = MongoCondition.newInstance("phone", queryNo1, MongoOper.IS); | |
| 967 | + MongoCondition con2 = MongoCondition.newInstance("username", queryNo1, MongoOper.IS); | |
| 968 | + MongoCondition con3 = MongoCondition.newInstance("cardNo", queryNo1, MongoOper.IS); | |
| 969 | + c1= c.orCondition(new MongoCondition[]{con1, con2, con3}).getCriteria(); | |
| 970 | + } | |
| 971 | + | |
| 886 | 972 | if (lastCheckEmployeeId != null) { |
| 887 | 973 | condition = condition.and("lastCheckEmployeeId", lastCheckEmployeeId, MongoOper.IS); |
| 888 | 974 | } |
| ... | ... | @@ -1102,6 +1188,51 @@ |
| 1102 | 1188 | c1 = Criteria.where("birth").lte(birthEnd); |
| 1103 | 1189 | } |
| 1104 | 1190 | } |
| 1191 | + | |
| 1192 | + if (null != fmAgeStart) { | |
| 1193 | + if (null != c1) { | |
| 1194 | + c1 = c1.and("fmAge").gte(fmAgeStart); | |
| 1195 | + } else { | |
| 1196 | + c1 = Criteria.where("fmAge").gte(fmAgeStart); | |
| 1197 | + } | |
| 1198 | + } | |
| 1199 | + | |
| 1200 | + if (null != fmAgeEnd) { | |
| 1201 | + if (null != fmAgeStart) { | |
| 1202 | + c1 = c1.lte(fmAgeEnd); | |
| 1203 | + } else { | |
| 1204 | + c1 = Criteria.where("fmAge").lte(fmAgeEnd); | |
| 1205 | + } | |
| 1206 | + } | |
| 1207 | + | |
| 1208 | + if (null != fmWeekStart) { | |
| 1209 | + if (null != c1) { | |
| 1210 | + c1 = c1.and("fmWeek").gte(fmWeekStart); | |
| 1211 | + } else { | |
| 1212 | + c1 = Criteria.where("fmWeek").gte(fmWeekStart); | |
| 1213 | + } | |
| 1214 | + } | |
| 1215 | + | |
| 1216 | + if (null != fmWeekEnd) { | |
| 1217 | + if (null != fmWeekStart) { | |
| 1218 | + c1 = c1.lte(fmWeekEnd); | |
| 1219 | + } else { | |
| 1220 | + c1 = Criteria.where("fmWeek").lte(fmWeekEnd); | |
| 1221 | + } | |
| 1222 | + } | |
| 1223 | + | |
| 1224 | + if (null != fmHospital) { | |
| 1225 | + condition = condition.and("fmHospital", fmHospital, MongoOper.IS); | |
| 1226 | + } | |
| 1227 | + | |
| 1228 | + if (null != fmHospitalList) { | |
| 1229 | + condition = condition.and("fmHospital", fmHospitalList, MongoOper.IN); | |
| 1230 | + } | |
| 1231 | + | |
| 1232 | + if (null != fmType) { | |
| 1233 | + condition = condition.and("fmType", fmType, MongoOper.LIKE); | |
| 1234 | + } | |
| 1235 | + | |
| 1105 | 1236 | if (null != c1) { |
| 1106 | 1237 | condition = condition.andCondition(new MongoCondition(c1)); |
| 1107 | 1238 | |
| ... | ... | @@ -1110,6 +1241,14 @@ |
| 1110 | 1241 | return condition.toMongoQuery(); |
| 1111 | 1242 | } |
| 1112 | 1243 | |
| 1244 | + public List<String> getFmHospitalList() { | |
| 1245 | + return fmHospitalList; | |
| 1246 | + } | |
| 1247 | + | |
| 1248 | + public void setFmHospitalList(List<String> fmHospitalList) { | |
| 1249 | + this.fmHospitalList = fmHospitalList; | |
| 1250 | + } | |
| 1251 | + | |
| 1113 | 1252 | public Integer gethScoreEnd() { |
| 1114 | 1253 | return hScoreEnd; |
| 1115 | 1254 | } |
| ... | ... | @@ -1156,6 +1295,14 @@ |
| 1156 | 1295 | |
| 1157 | 1296 | public void setHusbandPhone(String husbandPhone) { |
| 1158 | 1297 | this.husbandPhone = husbandPhone; |
| 1298 | + } | |
| 1299 | + | |
| 1300 | + public List<String> getBookbuildingDoctorList() { | |
| 1301 | + return bookbuildingDoctorList; | |
| 1302 | + } | |
| 1303 | + | |
| 1304 | + public void setBookbuildingDoctorList(List<String> bookbuildingDoctorList) { | |
| 1305 | + this.bookbuildingDoctorList = bookbuildingDoctorList; | |
| 1159 | 1306 | } |
| 1160 | 1307 | } |
platform-dal/src/main/java/com/lyms/platform/query/ResidentsArchiveQuery.java
View file @
b93bf0f
| ... | ... | @@ -6,8 +6,11 @@ |
| 6 | 6 | import com.lyms.platform.common.dao.operator.MongoOper; |
| 7 | 7 | import com.lyms.platform.common.dao.operator.MongoQuery; |
| 8 | 8 | import org.apache.commons.lang.StringUtils; |
| 9 | +import org.springframework.data.mongodb.core.query.Criteria; | |
| 9 | 10 | |
| 11 | +import javax.validation.constraints.Min; | |
| 10 | 12 | import java.util.Date; |
| 13 | +import java.util.List; | |
| 11 | 14 | |
| 12 | 15 | /** |
| 13 | 16 | * Created by Administrator on 2016/11/9 0009. |
| ... | ... | @@ -21,7 +24,8 @@ |
| 21 | 24 | //性别 |
| 22 | 25 | private String sex; |
| 23 | 26 | //出生日期 |
| 24 | - private Date birthday; | |
| 27 | + private Date birthdayStart; | |
| 28 | + private Date birthdayEnd; | |
| 25 | 29 | //国籍 |
| 26 | 30 | private String countryId; |
| 27 | 31 | //民族Id |
| ... | ... | @@ -100,6 +104,12 @@ |
| 100 | 104 | |
| 101 | 105 | private String publishName; |
| 102 | 106 | |
| 107 | + //年龄 | |
| 108 | + private Integer ageMin; | |
| 109 | + private Integer ageMax; | |
| 110 | + | |
| 111 | + private List<String> hospitalIds; | |
| 112 | + | |
| 103 | 113 | @Override |
| 104 | 114 | public MongoQuery convertToQuery() { |
| 105 | 115 | MongoCondition condition = MongoCondition.newInstance(); |
| ... | ... | @@ -109,6 +119,9 @@ |
| 109 | 119 | if (StringUtils.isNotBlank(username)) { |
| 110 | 120 | condition = condition.and("username", username, MongoOper.LIKE); |
| 111 | 121 | } |
| 122 | + if (hospitalIds!=null) { | |
| 123 | + condition = condition.and("hospitalId", hospitalIds, MongoOper.IN); | |
| 124 | + } | |
| 112 | 125 | if (StringUtils.isNotBlank(phone)) { |
| 113 | 126 | condition = condition.and("phone", phone, MongoOper.IS); |
| 114 | 127 | } |
| ... | ... | @@ -127,6 +140,15 @@ |
| 127 | 140 | if (StringUtils.isNotBlank(areaId)) { |
| 128 | 141 | condition = condition.and("areaId", areaId, MongoOper.IS); |
| 129 | 142 | } |
| 143 | + if (StringUtils.isNotBlank(provinceRegisterId)) { | |
| 144 | + condition = condition.and("provinceRegisterId", provinceRegisterId, MongoOper.IS); | |
| 145 | + } | |
| 146 | + if (StringUtils.isNotBlank(cityRegisterId)) { | |
| 147 | + condition = condition.and("cityRegisterId", cityRegisterId, MongoOper.IS); | |
| 148 | + } | |
| 149 | + if (StringUtils.isNotBlank(areaRegisterId)) { | |
| 150 | + condition = condition.and("areaRegisterId", areaRegisterId, MongoOper.IS); | |
| 151 | + } | |
| 130 | 152 | if (StringUtils.isNotBlank(vcCardNo)) { |
| 131 | 153 | condition = condition.and("vcCardNo", vcCardNo, MongoOper.IS); |
| 132 | 154 | } |
| 133 | 155 | |
| ... | ... | @@ -142,9 +164,58 @@ |
| 142 | 164 | if (StringUtils.isNotBlank(hospitalId)) { |
| 143 | 165 | condition = condition.and("hospitalId", hospitalId, MongoOper.IS); |
| 144 | 166 | } |
| 167 | + Criteria c1 = null; | |
| 168 | + if(null!=birthdayStart){ | |
| 169 | + c1 = Criteria.where("birthday").gte(birthdayStart); | |
| 170 | + } | |
| 171 | + if(null!=birthdayEnd){ | |
| 172 | + if (null==c1) { | |
| 173 | + c1 = Criteria.where("birthday").lte(birthdayEnd); | |
| 174 | + } else { | |
| 175 | + c1 = c1.lte(birthdayEnd); | |
| 176 | + } | |
| 177 | + } | |
| 178 | + if (null!=ageMin){ | |
| 179 | + c1 = Criteria.where("age").gte(ageMin); | |
| 180 | + } | |
| 181 | + if(null!=ageMax){ | |
| 182 | + if (null==c1) { | |
| 183 | + c1 = Criteria.where("age").lte(ageMax); | |
| 184 | + } else { | |
| 185 | + c1 = c1.lte(ageMax); | |
| 186 | + } | |
| 187 | + } | |
| 188 | + | |
| 189 | + if (c1!=null) { | |
| 190 | + condition = condition.andCondition(new MongoCondition(c1)); | |
| 191 | + } | |
| 145 | 192 | return condition.toMongoQuery(); |
| 146 | 193 | } |
| 147 | 194 | |
| 195 | + public List<String> getHospitalIds() { | |
| 196 | + return hospitalIds; | |
| 197 | + } | |
| 198 | + | |
| 199 | + public void setHospitalIds(List<String> hospitalIds) { | |
| 200 | + this.hospitalIds = hospitalIds; | |
| 201 | + } | |
| 202 | + | |
| 203 | + public Integer getAgeMin() { | |
| 204 | + return ageMin; | |
| 205 | + } | |
| 206 | + | |
| 207 | + public void setAgeMin(Integer ageMin) { | |
| 208 | + this.ageMin = ageMin; | |
| 209 | + } | |
| 210 | + | |
| 211 | + public Integer getAgeMax() { | |
| 212 | + return ageMax; | |
| 213 | + } | |
| 214 | + | |
| 215 | + public void setAgeMax(Integer ageMax) { | |
| 216 | + this.ageMax = ageMax; | |
| 217 | + } | |
| 218 | + | |
| 148 | 219 | public Integer getAge() { |
| 149 | 220 | return age; |
| 150 | 221 | } |
| 151 | 222 | |
| ... | ... | @@ -177,12 +248,20 @@ |
| 177 | 248 | this.sex = sex; |
| 178 | 249 | } |
| 179 | 250 | |
| 180 | - public Date getBirthday() { | |
| 181 | - return birthday; | |
| 251 | + public Date getBirthdayStart() { | |
| 252 | + return birthdayStart; | |
| 182 | 253 | } |
| 183 | 254 | |
| 184 | - public void setBirthday(Date birthday) { | |
| 185 | - this.birthday = birthday; | |
| 255 | + public void setBirthdayStart(Date birthdayStart) { | |
| 256 | + this.birthdayStart = birthdayStart; | |
| 257 | + } | |
| 258 | + | |
| 259 | + public Date getBirthdayEnd() { | |
| 260 | + return birthdayEnd; | |
| 261 | + } | |
| 262 | + | |
| 263 | + public void setBirthdayEnd(Date birthdayEnd) { | |
| 264 | + this.birthdayEnd = birthdayEnd; | |
| 186 | 265 | } |
| 187 | 266 | |
| 188 | 267 | public String getCountryId() { |
platform-data-api/src/main/java/com/lyms/platform/data/util/AmsMessageService.java
View file @
b93bf0f
| ... | ... | @@ -183,12 +183,12 @@ |
| 183 | 183 | |
| 184 | 184 | |
| 185 | 185 | public static void main(String[] args) { |
| 186 | - Map<String,List<MessageContent>> list = getMessageTemplateMap("204", | |
| 186 | + Map<String,List<MessageContent>> list = getMessageTemplateMap("241", | |
| 187 | 187 | AmsServiceTypeEnum.CHILD_GUIDE); |
| 188 | 188 | |
| 189 | -// List<MessageContent> msgs = list.get("肺结核"); | |
| 189 | + List<MessageContent> msgs = list.get("高血压"); | |
| 190 | 190 | // |
| 191 | -// System.out.println(list); | |
| 191 | + System.out.println(msgs); | |
| 192 | 192 | |
| 193 | 193 | // for (int i = 0;i< 100 ;i++) |
| 194 | 194 | // { |
platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyHisService.java
View file @
b93bf0f
| ... | ... | @@ -341,13 +341,14 @@ |
| 341 | 341 | for (PregPatientinfo info:list) { |
| 342 | 342 | Map<String,Object> map = new HashMap<>(); |
| 343 | 343 | map.put("bhnum", info.getP_BHNUM()); |
| 344 | - if ("1".equals(info.getP_SEX())) { | |
| 344 | + if ("男".equals(info.getP_SEX())) { | |
| 345 | 345 | map.put("sex", "男"); |
| 346 | - } else if ("2".equals(info.getP_SEX())) { | |
| 346 | + } else if ("女".equals(info.getP_SEX())) { | |
| 347 | 347 | map.put("sex", "女"); |
| 348 | 348 | } |
| 349 | 349 | map.put("name", info.getP_NAME()); |
| 350 | - map.put("cardNo", info.getP_CARDNO()); | |
| 350 | + map.put("idCardNo", info.getP_CARDNO()); //身份证号码 | |
| 351 | + map.put("cardNo", cardNo);//就诊卡号 | |
| 351 | 352 | map.put("phone", info.getP_MOBILEPHONE()); |
| 352 | 353 | map.put("birth", DateUtil.getyyyy_MM_dd(parseYmd(info.getBIRTH()))); |
| 353 | 354 | result.add(map); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java
View file @
b93bf0f
| ... | ... | @@ -371,5 +371,19 @@ |
| 371 | 371 | return babyBookbuildingFacade.queryHisBabyDiagnosis(blNo); |
| 372 | 372 | } |
| 373 | 373 | |
| 374 | + | |
| 375 | + /** | |
| 376 | + * 儿童生长统计 | |
| 377 | + * @return | |
| 378 | + */ | |
| 379 | + @RequestMapping(method = RequestMethod.GET, value = "/getBabyGroupCount") | |
| 380 | + @ResponseBody | |
| 381 | + public BaseResponse getBabyGroupCount(@Valid @RequestBody BabyManageRequest babyManageRequest, | |
| 382 | + HttpServletRequest request) { | |
| 383 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 384 | + return babyBookbuildingFacade.getBabyGroupCount(babyManageRequest,loginState.getId()); | |
| 385 | + } | |
| 386 | + | |
| 387 | + | |
| 374 | 388 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/MatDeliverController.java
View file @
b93bf0f
| ... | ... | @@ -139,6 +139,7 @@ |
| 139 | 139 | public void childbirthManagerExcel(HttpServletRequest httpServletRequest, @RequestBody ChildbirthManagerRequest childbirthManagerRequest, HttpServletResponse httpServletResponse) { |
| 140 | 140 | try { |
| 141 | 141 | childbirthManagerRequest.setOperatorId(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId()); |
| 142 | + childbirthManagerRequest.setExcel(true); | |
| 142 | 143 | // 这里返回的结果必然是这个泛型,之所以query返回的结果集没有用泛型是为了更好的传递数据 |
| 143 | 144 | @SuppressWarnings("unchecked") |
| 144 | 145 | List<ChildbirthManagerQueryModel> childbirthManagerQueryModelList = matDeliverFacade.childbirthManager(childbirthManagerRequest).getData(); |
| ... | ... | @@ -179,6 +180,7 @@ |
| 179 | 180 | BaseListResponse baseListResponse; |
| 180 | 181 | try { |
| 181 | 182 | newBabyManagerRequest.setOperatorId(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId()); |
| 183 | + newBabyManagerRequest.setExcel(true); | |
| 182 | 184 | NewBabyManagerResult newBabyManagerResult = matDeliverFacade.newBabyManager(newBabyManagerRequest); |
| 183 | 185 | if (newBabyManagerResult.getErrorcode() != ErrorCodeConstants.SUCCESS) { |
| 184 | 186 | baseListResponse = new BaseListResponse().setErrorcode(newBabyManagerResult.getErrorcode()).setErrormsg(newBabyManagerResult.getErrormsg()); |
| ... | ... | @@ -222,7 +224,7 @@ |
| 222 | 224 | map.put("dueType", "顺产"); |
| 223 | 225 | } |
| 224 | 226 | if ("2".equals(dueType)) { |
| 225 | - map.put("dueType", "刨宫产"); | |
| 227 | + map.put("dueType", "剖宫产"); | |
| 226 | 228 | } |
| 227 | 229 | list.add(map); |
| 228 | 230 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PremaritalCheckupController.java
View file @
b93bf0f
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | @TokenRequired |
| 42 | 42 | public BaseResponse addOrUpdatePremaritalCheckup(@RequestBody PremaritalCheckupAddRequest addRequest, |
| 43 | 43 | HttpServletRequest request){ |
| 44 | - //获取当前登录用户ID | |
| 44 | +// 获取当前登录用户ID | |
| 45 | 45 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 46 | 46 | |
| 47 | 47 | return premaritalCheckupFacade.addPremaritalCheckup(addRequest , loginState.getId()); |
| ... | ... | @@ -103,6 +103,20 @@ |
| 103 | 103 | premaritalCheckupFacade.premaritalCheckupExport(queryRequest,loginState.getId(),response); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | + /** | |
| 107 | + * 删除婚前检查记录 | |
| 108 | + * @param id | |
| 109 | + * @param request | |
| 110 | + * @return | |
| 111 | + */ | |
| 112 | + @RequestMapping(value = "/deletePremaritalCheckup", method = RequestMethod.DELETE) | |
| 113 | + @ResponseBody | |
| 114 | + @TokenRequired | |
| 115 | + public BaseResponse deletePremaritalCheckup(@RequestParam("id") String id, | |
| 116 | + HttpServletRequest request) { | |
| 117 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 118 | + return premaritalCheckupFacade.deletePremaritalCheckup(id,loginState.getId()); | |
| 119 | + } | |
| 106 | 120 | |
| 107 | 121 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
b93bf0f
| ... | ... | @@ -7,15 +7,17 @@ |
| 7 | 7 | import com.lyms.platform.common.result.BaseListResponse; |
| 8 | 8 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 9 | 9 | import com.lyms.platform.common.result.BaseResponse; |
| 10 | +import com.lyms.platform.common.utils.BeanUtils; | |
| 11 | +import com.lyms.platform.common.utils.ExcelUtil; | |
| 12 | +import com.lyms.platform.common.utils.ExceptionUtils; | |
| 10 | 13 | import com.lyms.platform.common.utils.SystemConfig; |
| 11 | 14 | import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade; |
| 12 | 15 | import com.lyms.platform.operate.web.facade.BasicConfigFacade; |
| 13 | 16 | import com.lyms.platform.operate.web.facade.PatientFacade; |
| 14 | -import com.lyms.platform.operate.web.facade.PuerperaManagerFacade; | |
| 15 | 17 | import com.lyms.platform.operate.web.request.*; |
| 16 | 18 | import com.lyms.platform.operate.web.result.BasicConfigResult; |
| 17 | -import com.lyms.platform.operate.web.utils.HiskCountTask; | |
| 18 | -import com.lyms.platform.pojo.BasicConfig; | |
| 19 | +import com.lyms.platform.operate.web.result.PatientManagerQueryModel; | |
| 20 | +import com.lyms.platform.operate.web.result.PatientManagerResult; | |
| 19 | 21 | import org.apache.commons.collections.CollectionUtils; |
| 20 | 22 | import org.springframework.beans.factory.annotation.Autowired; |
| 21 | 23 | import org.springframework.stereotype.Controller; |
| ... | ... | @@ -24,12 +26,7 @@ |
| 24 | 26 | import javax.servlet.http.HttpServletRequest; |
| 25 | 27 | import javax.servlet.http.HttpServletResponse; |
| 26 | 28 | import javax.validation.Valid; |
| 27 | -import java.util.ArrayList; | |
| 28 | -import java.util.HashMap; | |
| 29 | -import java.util.List; | |
| 30 | -import java.util.Map; | |
| 31 | -import java.util.concurrent.Callable; | |
| 32 | -import java.util.concurrent.Future; | |
| 29 | +import java.util.*; | |
| 33 | 30 | |
| 34 | 31 | /** |
| 35 | 32 | * 孕产妇管理接口 |
| ... | ... | @@ -264,5 +261,63 @@ |
| 264 | 261 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 265 | 262 | return patientFacade.queryHighRisk(patientsQueryRequest,null,1,loginState.getId(),"true",Boolean.TRUE); |
| 266 | 263 | } |
| 264 | + | |
| 265 | + /** | |
| 266 | + * @auther HuJiaqi | |
| 267 | + * @createTime 2016年12月20日 15时03分 | |
| 268 | + * @discription 建档管理 | |
| 269 | + */ | |
| 270 | + @TokenRequired | |
| 271 | + @ResponseBody | |
| 272 | + @RequestMapping(value = "patientManager", method = RequestMethod.POST) | |
| 273 | + public BaseListResponse patientManager(@RequestBody PatientManagerRequest patientManagerRequest, HttpServletRequest httpServletRequest) { | |
| 274 | + BaseListResponse baseListResponse; | |
| 275 | + try { | |
| 276 | + patientManagerRequest.setOperatorId(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId()); | |
| 277 | + PatientManagerResult patientManagerResult = patientFacade.patientManager(patientManagerRequest); | |
| 278 | + if (patientManagerResult.getErrorcode() != ErrorCodeConstants.SUCCESS) { | |
| 279 | + baseListResponse = new BaseListResponse().setErrorcode(patientManagerResult.getErrorcode()).setErrormsg(patientManagerResult.getErrormsg()); | |
| 280 | + return baseListResponse; | |
| 281 | + } | |
| 282 | + baseListResponse = new BaseListResponse().setErrorcode(patientManagerResult.getErrorcode()).setErrormsg(patientManagerResult.getErrormsg()).setData(patientManagerResult.getData()).setPageInfo(patientManagerResult.getPageInfo()); | |
| 283 | + } catch (Exception e) { | |
| 284 | + baseListResponse = new BaseListResponse().setErrorcode(ErrorCodeConstants.SYSTEM_ERROR).setErrormsg(ErrorCodeConstants.SYSTEM_ERROR_DESCRIPTION); | |
| 285 | + ExceptionUtils.catchException(e, "patientManager异常"); | |
| 286 | + } | |
| 287 | + return baseListResponse; | |
| 288 | + } | |
| 289 | + | |
| 290 | + @TokenRequired | |
| 291 | + @RequestMapping(value = "patientManagerExcel", method = RequestMethod.POST) | |
| 292 | + public void patientManagerExcel(HttpServletRequest httpServletRequest, @RequestBody PatientManagerRequest patientManagerRequest, HttpServletResponse httpServletResponse) { | |
| 293 | + try { | |
| 294 | + patientManagerRequest.setOperatorId(((LoginContext) httpServletRequest.getAttribute("loginContext")).getId()); | |
| 295 | + // 这里返回的结果必然是这个泛型,之所以query返回的结果集没有用泛型是为了更好的传递数据 | |
| 296 | + @SuppressWarnings("unchecked") | |
| 297 | + List<PatientManagerQueryModel> patientManagerQueryModelList = patientFacade.patientManager(patientManagerRequest).getData(); | |
| 298 | + List<Map<String, Object>> list = new ArrayList<>(); | |
| 299 | + for (PatientManagerQueryModel patientManagerQueryModel : patientManagerQueryModelList) { | |
| 300 | + Map<String, Object> map = BeanUtils.objectToObjectMap(patientManagerQueryModel); | |
| 301 | + list.add(map); | |
| 302 | + } | |
| 303 | + Map<String, String> header = new LinkedHashMap<>(); | |
| 304 | + header.put("username", "姓名"); | |
| 305 | + header.put("age", "年龄"); | |
| 306 | + header.put("phone", "联系电话"); | |
| 307 | + header.put("cardNo", "证件号码"); | |
| 308 | + header.put("addressRegister", "户口所在地"); | |
| 309 | + header.put("husbandName", "丈夫姓名"); | |
| 310 | + header.put("husbandAddressRegister", "丈夫户口所在地"); | |
| 311 | + header.put("bookbuildingDate", "建档时间"); | |
| 312 | + header.put("bookbuildingDoctor", "建档医生"); | |
| 313 | + header.put("serviceType", "服务类型"); | |
| 314 | + httpServletResponse.setContentType("application/force-download"); | |
| 315 | + httpServletResponse.setHeader("Content-Disposition", "attachment;filename=" + new String(("建档管理.xls").getBytes("UTF-8"), "ISO-8859-1")); | |
| 316 | + ExcelUtil.toExcel(httpServletResponse.getOutputStream(), list, header); | |
| 317 | + } catch (Exception e) { | |
| 318 | + ExceptionUtils.catchException(e, "childbirthManagerExcel异常"); | |
| 319 | + } | |
| 320 | + } | |
| 321 | + | |
| 267 | 322 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentArchivesRegionController.java
View file @
b93bf0f
| 1 | +package com.lyms.platform.operate.web.controller; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.annotation.TokenRequired; | |
| 4 | +import com.lyms.platform.common.base.BaseController; | |
| 5 | +import com.lyms.platform.common.base.LoginContext; | |
| 6 | +import com.lyms.platform.common.result.BaseResponse; | |
| 7 | +import com.lyms.platform.operate.web.facade.ResidentsFacade; | |
| 8 | +import com.lyms.platform.operate.web.request.ResidentsArchiveQueryRequest; | |
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 10 | +import org.springframework.stereotype.Controller; | |
| 11 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 12 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 13 | +import org.springframework.web.bind.annotation.ResponseBody; | |
| 14 | + | |
| 15 | +import javax.servlet.http.HttpServletRequest; | |
| 16 | +import javax.servlet.http.HttpServletResponse; | |
| 17 | +import javax.validation.Valid; | |
| 18 | + | |
| 19 | +/** | |
| 20 | + * | |
| 21 | + * 妇女健康档案管理(区域妇幼) | |
| 22 | + * | |
| 23 | + * Created by Administrator on 2016/12/20 0020. | |
| 24 | + */ | |
| 25 | +@Controller | |
| 26 | +public class ResidentArchivesRegionController extends BaseController{ | |
| 27 | + | |
| 28 | + @Autowired | |
| 29 | + private ResidentsFacade residentsFacade; | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 妇女健康档案管理 | |
| 33 | + * | |
| 34 | + * @param queryRequest | |
| 35 | + * @param request | |
| 36 | + * @return | |
| 37 | + */ | |
| 38 | + @RequestMapping(value = "/regionalWomenList", method = RequestMethod.GET) | |
| 39 | + @ResponseBody | |
| 40 | + @TokenRequired | |
| 41 | + public BaseResponse queryAllResidents(@Valid ResidentsArchiveQueryRequest queryRequest, | |
| 42 | + HttpServletRequest request) { | |
| 43 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 44 | + return residentsFacade.queryResidentsArchives(queryRequest,loginState.getId()); | |
| 45 | + } | |
| 46 | + | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 妇女健康档案管理数据导出接口 | |
| 50 | + * @param queryRequest | |
| 51 | + * @param request | |
| 52 | + * @param response | |
| 53 | + */ | |
| 54 | + @RequestMapping(value = "/regionalWomenExport", method = RequestMethod.GET) | |
| 55 | + @ResponseBody | |
| 56 | + @TokenRequired | |
| 57 | + public void regionalResidentsExport(@Valid ResidentsArchiveQueryRequest queryRequest, | |
| 58 | + HttpServletRequest request, | |
| 59 | + HttpServletResponse response) { | |
| 60 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 61 | + residentsFacade.regionaResidentsExport(queryRequest,loginState.getId(),response); | |
| 62 | + } | |
| 63 | + | |
| 64 | + | |
| 65 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ResidentsArchiveController.java
View file @
b93bf0f
| ... | ... | @@ -55,7 +55,7 @@ |
| 55 | 55 | param.setVcCardNo(vcCardNo); |
| 56 | 56 | param.setCertificateTypeId(certificateTypeId); |
| 57 | 57 | param.setCardNo(cardNo); |
| 58 | - return residentsArchiveFacade.queryResidentsArchive(param,loginState.getId()); | |
| 58 | + return residentsArchiveFacade.queryResidentsArchive(param , loginState.getId()); | |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
| ... | ... | @@ -121,7 +121,7 @@ |
| 121 | 121 | @RequestMapping(value = "/residentsArchiveList", method = RequestMethod.GET) |
| 122 | 122 | @ResponseBody |
| 123 | 123 | @TokenRequired |
| 124 | - public BaseResponse queryAllPuerpera(@Valid ResidentsArchiveQueryRequest residentsArchiveQueryRequest,HttpServletRequest request) { | |
| 124 | + public BaseResponse queryAllResidents(@Valid ResidentsArchiveQueryRequest residentsArchiveQueryRequest,HttpServletRequest request) { | |
| 125 | 125 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 126 | 126 | return residentsArchiveFacade.queryResidentsArchives(residentsArchiveQueryRequest,loginState.getId(),"true"); |
| 127 | 127 | } |
| ... | ... | @@ -169,6 +169,20 @@ |
| 169 | 169 | return residentsArchiveFacade.womenGuildSms(womenGuideSmsRequest, loginState.getId()); |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | + /** | |
| 173 | + * 删除单条居民建档 | |
| 174 | + * @param id | |
| 175 | + * @param request | |
| 176 | + * @return | |
| 177 | + */ | |
| 178 | + @RequestMapping(value = "/deleteResidentsArchive", method = RequestMethod.DELETE) | |
| 179 | + @ResponseBody | |
| 180 | + @TokenRequired | |
| 181 | + public BaseResponse deleteArchive(@RequestParam("id") String id, | |
| 182 | + HttpServletRequest request) { | |
| 183 | + LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
| 184 | + return residentsArchiveFacade.deleteArchive(id,loginState.getId()); | |
| 185 | + } | |
| 172 | 186 | |
| 173 | 187 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
b93bf0f
| 1 | 1 | package com.lyms.platform.operate.web.controller; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.hospitalapi.qhdfy.QhdfyHisService; |
| 4 | -import com.lyms.platform.biz.service.AntenatalExaminationService; | |
| 5 | -import com.lyms.platform.biz.service.AssayConfigService; | |
| 6 | -import com.lyms.platform.biz.service.PatientsService; | |
| 7 | -import com.lyms.platform.biz.service.SieveService; | |
| 4 | +import com.lyms.platform.biz.service.*; | |
| 8 | 5 | import com.lyms.platform.common.enums.YnEnums; |
| 9 | 6 | import com.lyms.platform.common.utils.CompressEncodeingUtil; |
| 10 | 7 | import com.lyms.platform.common.utils.DateUtil; |
| 11 | 8 | import com.lyms.platform.common.utils.JsonUtil; |
| 12 | 9 | import com.lyms.platform.operate.web.facade.AntenatalExaminationFacade; |
| 10 | +import com.lyms.platform.operate.web.facade.BabyCheckFacade; | |
| 13 | 11 | import com.lyms.platform.operate.web.result.HighScoreResult; |
| 14 | 12 | import com.lyms.platform.operate.web.service.SyncDataTaskService; |
| 15 | 13 | import com.lyms.platform.permission.service.OrganizationService; |
| 16 | -import com.lyms.platform.pojo.AntExChuModel; | |
| 17 | -import com.lyms.platform.pojo.AntenatalExaminationModel; | |
| 18 | -import com.lyms.platform.pojo.AssayConfig; | |
| 19 | -import com.lyms.platform.pojo.Patients; | |
| 14 | +import com.lyms.platform.pojo.*; | |
| 15 | +import com.lyms.platform.query.*; | |
| 16 | +import javafx.scene.shape.LineTo; | |
| 17 | +import com.lyms.platform.pojo.*; | |
| 20 | 18 | import com.lyms.platform.query.AntExChuQuery; |
| 21 | 19 | import com.lyms.platform.query.AntExQuery; |
| 20 | +import com.lyms.platform.query.MatDeliverQuery; | |
| 22 | 21 | import com.lyms.platform.query.PatientsQuery; |
| 23 | 22 | import org.apache.commons.collections.CollectionUtils; |
| 24 | 23 | import org.apache.commons.io.FileUtils; |
| ... | ... | @@ -67,6 +66,19 @@ |
| 67 | 66 | @Autowired |
| 68 | 67 | private AntenatalExaminationFacade antenatalExaminationFacade; |
| 69 | 68 | |
| 69 | + @Autowired | |
| 70 | + private MatDeliverService matDeliverService; | |
| 71 | + | |
| 72 | + @Autowired | |
| 73 | + private BabyBookbuildingService babyBookbuildingService; | |
| 74 | + | |
| 75 | + @Autowired | |
| 76 | + private BabyCheckService babyCheckService; | |
| 77 | + | |
| 78 | + | |
| 79 | + @Autowired | |
| 80 | + private BabyCheckFacade babyCheckFacade; | |
| 81 | + | |
| 70 | 82 | /** |
| 71 | 83 | * 获取科室 |
| 72 | 84 | */ |
| ... | ... | @@ -364,6 +376,11 @@ |
| 364 | 376 | return "syncPatNextTime finish"; |
| 365 | 377 | } |
| 366 | 378 | |
| 379 | + /** | |
| 380 | + * @auther HuJiaqi | |
| 381 | + * @createTime 2016年12月21日 15时56分 | |
| 382 | + * @discription 冗余最后一次产检 | |
| 383 | + */ | |
| 367 | 384 | @ResponseBody |
| 368 | 385 | @RequestMapping(value = "/syncPatientsLastCheckEmployeeId", method = RequestMethod.GET) |
| 369 | 386 | public String syncPatientsLastCheckEmployeeId(@RequestParam String hospitalId, |
| ... | ... | @@ -431,6 +448,70 @@ |
| 431 | 448 | return "syncPatientsLastCheckEmployeeId start......"; |
| 432 | 449 | } |
| 433 | 450 | |
| 451 | + /** | |
| 452 | + * @auther HuJiaqi | |
| 453 | + * @createTime 2016年12月21日 15时56分 | |
| 454 | + * @discription 冗余分娩分娩医院,分娩年龄,分娩孕周,分娩方式 | |
| 455 | + */ | |
| 456 | + @ResponseBody | |
| 457 | + @RequestMapping(value = "/syncPatientsFmInfo", method = RequestMethod.GET) | |
| 458 | + public String syncPatientsFmInfo(@RequestParam(required = false) String size,@RequestParam(required = false) String hospitalId) { | |
| 459 | + MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); | |
| 460 | + matDeliverQuery.setYn(YnEnums.YES.getId()); | |
| 461 | + if (StringUtils.isNotEmpty(hospitalId)) { | |
| 462 | + matDeliverQuery.setFmHospital(hospitalId); | |
| 463 | + } | |
| 464 | + // 查询 | |
| 465 | + List<MaternalDeliverModel> maternalDeliverModelList = matDeliverService.query(matDeliverQuery); | |
| 466 | + System.out.println("本次读取了【" + maternalDeliverModelList.size() + "】条数据"); | |
| 467 | + int batchSize = StringUtils.isEmpty(size) ? 1000 : Integer.valueOf(size); | |
| 468 | + int end = 0; | |
| 469 | + for (int i = 0; i < maternalDeliverModelList.size(); i += batchSize) { | |
| 470 | + end = (end + batchSize); | |
| 471 | + if (end > maternalDeliverModelList.size()) { | |
| 472 | + end = maternalDeliverModelList.size(); | |
| 473 | + } | |
| 474 | + final List<MaternalDeliverModel> tempList = maternalDeliverModelList.subList(i, end); | |
| 475 | + new Thread(new Runnable() { | |
| 476 | + @Override | |
| 477 | + public void run() { | |
| 478 | + if (CollectionUtils.isNotEmpty(tempList)) { | |
| 479 | + for (MaternalDeliverModel maternalDeliverModel : tempList) { | |
| 480 | + Patients patients = patientsService.findOnePatientById(maternalDeliverModel.getParentId()); | |
| 481 | + if (patients != null) { | |
| 482 | + // 顺便跑成产妇 | |
| 483 | + patients.setType(3); | |
| 484 | + patients.setFmHospital(maternalDeliverModel.getFmHospital()); | |
| 485 | + patients.setFmType(maternalDeliverModel.getDeliveryMode()); | |
| 486 | + try { | |
| 487 | + patients.setFmAge(DateUtil.getAge(patients.getBirth(), patients.getFmDate())); | |
| 488 | + } catch (Exception e) { | |
| 489 | + System.out.println(patients.getId() + ":这条数据的生日和分娩时间异常"); | |
| 490 | + // 跳过 | |
| 491 | + } | |
| 492 | + try { | |
| 493 | + patients.setFmWeek(DateUtil.getDays(patients.getLastMenses(), patients.getFmDate())); | |
| 494 | + } catch (Exception e) { | |
| 495 | + System.out.println(patients.getId() + ":这条数据的末日月经和分娩时间异常"); | |
| 496 | + // 跳过 | |
| 497 | + } | |
| 498 | + | |
| 499 | + System.out.println(patients.getFmHospital()); | |
| 500 | + System.out.println(patients.getFmType()); | |
| 501 | + System.out.println(patients.getFmAge()); | |
| 502 | + System.out.println(patients.getFmWeek()); | |
| 503 | + System.out.println(patients.toString()); | |
| 504 | + | |
| 505 | + patientsService.updatePatient(patients); | |
| 506 | + } | |
| 507 | + } | |
| 508 | + } | |
| 509 | + } | |
| 510 | + }).start(); | |
| 511 | + } | |
| 512 | + return "syncPatientsLastCheckEmployeeId start......"; | |
| 513 | + } | |
| 514 | + | |
| 434 | 515 | @RequestMapping(value = "/initCardNo", method = RequestMethod.GET) |
| 435 | 516 | @ResponseBody |
| 436 | 517 | public String initCardNo() { |
| ... | ... | @@ -610,7 +691,7 @@ |
| 610 | 691 | Date max = pat.getFmDate(); |
| 611 | 692 | if (min != null && max != null) |
| 612 | 693 | { |
| 613 | - HighScoreResult highScoreResult = antenatalExaminationFacade.getPatLastRiskByDate(pat.getPid(),true,min,max); | |
| 694 | + HighScoreResult highScoreResult = antenatalExaminationFacade.getPatLastRiskByDate(pat.getPid(), true, min, max); | |
| 614 | 695 | PatientsQuery patientsQuery1 = new PatientsQuery(); |
| 615 | 696 | patientsQuery1.setId(pat.getId()); |
| 616 | 697 | patientsQuery1.setYn(YnEnums.YES.getId()); |
| ... | ... | @@ -634,6 +715,99 @@ |
| 634 | 715 | return "updateChanLaskRisk finish"; |
| 635 | 716 | } |
| 636 | 717 | |
| 718 | + /** | |
| 719 | + * 更新儿童检查表中的生长发育评价 | |
| 720 | + * @param hid | |
| 721 | + * @return | |
| 722 | + */ | |
| 723 | + @RequestMapping(value = "/updateBabyGrowth", method = RequestMethod.GET) | |
| 724 | + @ResponseBody | |
| 725 | + public String updateBabyGrowth(@RequestParam(required = true) String hid) { | |
| 726 | + | |
| 727 | + BabyModelQuery babyModelQuery = new BabyModelQuery(); | |
| 728 | + babyModelQuery.setYn(YnEnums.YES.getId()); | |
| 729 | + babyModelQuery.setHospitalId(hid); | |
| 730 | + | |
| 731 | + List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyModelQuery); | |
| 732 | + if (CollectionUtils.isNotEmpty(models)) | |
| 733 | + { | |
| 734 | + int batchSize = 200; | |
| 735 | + int end = 0; | |
| 736 | + for (int i = 0; i < models.size(); i += batchSize) { | |
| 737 | + end = (end + batchSize); | |
| 738 | + if (end > models.size()) { | |
| 739 | + end = models.size(); | |
| 740 | + } | |
| 741 | + System.out.println("start:" + i + ",end:" + end); | |
| 742 | + final List<BabyModel> tempList = models.subList(i, end); | |
| 743 | + new Thread(new Runnable() { | |
| 744 | + @Override | |
| 745 | + public void run() { | |
| 746 | + if (CollectionUtils.isNotEmpty(tempList)) | |
| 747 | + { | |
| 748 | + for (BabyModel babyModel : tempList) { | |
| 749 | + if (babyModel != null) | |
| 750 | + { | |
| 751 | + BabyCheckModelQuery query = new BabyCheckModelQuery(); | |
| 752 | + query.setYn(YnEnums.YES.getId()); | |
| 753 | + query.setBuildId(babyModel.getId()); | |
| 754 | + | |
| 755 | + List<BabyCheckModel> checkModels = babyCheckService.queryBabyCheckRecord(query); | |
| 756 | + if (CollectionUtils.isNotEmpty(checkModels)) | |
| 757 | + { | |
| 758 | + for (BabyCheckModel checkModel : checkModels) | |
| 759 | + { | |
| 760 | + String height = checkModel.getHeight(); | |
| 761 | + String birth = DateUtil.getyyyy_MM_dd(babyModel.getBirth()); | |
| 762 | + // type 0 体重标准差数值表 1 身长/身高标准差数值表 2 头围标准差数值表 3身高别体重 | |
| 763 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(height)) | |
| 764 | + { | |
| 765 | + String value = babyCheckFacade.getGrowthValue(birth,Double.parseDouble(height),babyModel.getSex(),1); | |
| 766 | + checkModel.setHeadEvaluate(value); | |
| 767 | + | |
| 768 | + } | |
| 769 | + String head = checkModel.getHead(); | |
| 770 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(head)) { | |
| 771 | + String value = babyCheckFacade.getGrowthValue(birth,Double.parseDouble(head),babyModel.getSex(),1); | |
| 772 | + checkModel.setHeadEvaluate(value); | |
| 773 | + } | |
| 774 | + | |
| 775 | + String weight = checkModel.getWeight(); | |
| 776 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(weight)) { | |
| 777 | + String value = babyCheckFacade.getGrowthValue(birth,Double.parseDouble(weight),babyModel.getSex(),1); | |
| 778 | + checkModel.setHeadEvaluate(value); | |
| 779 | + } | |
| 780 | + | |
| 781 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(height) && | |
| 782 | + com.lyms.platform.common.utils.StringUtils.isNotEmpty(weight)) | |
| 783 | + { | |
| 784 | + //发育评价 | |
| 785 | + List<String> growthEvaluate = babyCheckFacade.getBabyGrowthEvaluate(Double.parseDouble(height), babyModel.getSex(), birth, Double.parseDouble(weight)); | |
| 786 | + if (CollectionUtils.isNotEmpty(growthEvaluate)) | |
| 787 | + { | |
| 788 | + checkModel.setGrowthEvaluate(JsonUtil.array2JsonString(growthEvaluate)); | |
| 789 | + } | |
| 790 | + | |
| 791 | + String hw = babyCheckFacade.getBabyHW(Double.parseDouble(height),Double.parseDouble(weight),babyModel.getSex(),birth); | |
| 792 | + checkModel.setHeightWeight(hw); | |
| 793 | + | |
| 794 | + } | |
| 795 | + | |
| 796 | + babyCheckService.updateBabyCheck(checkModel,checkModel.getId()); | |
| 797 | + } | |
| 798 | + } | |
| 799 | + } | |
| 800 | + } | |
| 801 | + } | |
| 802 | + } | |
| 803 | + }).start(); | |
| 804 | + } | |
| 805 | + | |
| 806 | + } | |
| 807 | + | |
| 808 | + | |
| 809 | + return "updateBabyGrowth finish"; | |
| 810 | + } | |
| 637 | 811 | |
| 638 | 812 | public static void main(String[] a) { |
| 639 | 813 | try { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
b93bf0f
| ... | ... | @@ -14,6 +14,7 @@ |
| 14 | 14 | import com.lyms.platform.operate.web.request.*; |
| 15 | 15 | import com.lyms.platform.operate.web.result.*; |
| 16 | 16 | import com.lyms.platform.operate.web.utils.BabyListTask; |
| 17 | +import com.lyms.platform.operate.web.utils.GrowthCountTask; | |
| 17 | 18 | import com.lyms.platform.operate.web.utils.HiskCountTask; |
| 18 | 19 | import com.lyms.platform.operate.web.utils.MessageCenterService; |
| 19 | 20 | import com.lyms.platform.permission.model.Organization; |
| 20 | 21 | |
| ... | ... | @@ -31,11 +32,9 @@ |
| 31 | 32 | import javax.servlet.http.HttpServletResponse; |
| 32 | 33 | import java.io.IOException; |
| 33 | 34 | import java.io.OutputStream; |
| 35 | +import java.text.DecimalFormat; | |
| 34 | 36 | import java.util.*; |
| 35 | -import java.util.concurrent.Callable; | |
| 36 | -import java.util.concurrent.ExecutorService; | |
| 37 | -import java.util.concurrent.Executors; | |
| 38 | -import java.util.concurrent.Future; | |
| 37 | +import java.util.concurrent.*; | |
| 39 | 38 | |
| 40 | 39 | /** |
| 41 | 40 | * |
| ... | ... | @@ -109,7 +108,7 @@ |
| 109 | 108 | private AutoMatchFacade autoMatchFacade; |
| 110 | 109 | |
| 111 | 110 | |
| 112 | - private static ExecutorService pool = Executors.newFixedThreadPool(4); | |
| 111 | + private static ExecutorService pool = Executors.newFixedThreadPool(10); | |
| 113 | 112 | |
| 114 | 113 | |
| 115 | 114 | public BaseResponse getBabyBase(String babyId) { |
| ... | ... | @@ -530,7 +529,7 @@ |
| 530 | 529 | return; |
| 531 | 530 | } |
| 532 | 531 | |
| 533 | - ExceptionUtils.catchException("儿童建档1---------->"+babyModel.getMphone()+";name="+babyModel.getName()); | |
| 532 | + ExceptionUtils.catchException("儿童建档1---------->" + babyModel.getMphone() + ";name=" + babyModel.getName()); | |
| 534 | 533 | |
| 535 | 534 | SmsTemplateQuery query = new SmsTemplateQuery(); |
| 536 | 535 | query.setYn(YnEnums.YES.getId()); |
| ... | ... | @@ -800,6 +799,7 @@ |
| 800 | 799 | |
| 801 | 800 | bm.setDueWeek(b.getDueWeek()); |
| 802 | 801 | bm.setBabyDiagnosis(b.getBabyDiagnosis()); |
| 802 | + bm.setBlNo(b.getBlNo()); | |
| 803 | 803 | |
| 804 | 804 | return bm; |
| 805 | 805 | } |
| ... | ... | @@ -967,7 +967,7 @@ |
| 967 | 967 | result.setExpType(model.getExpType()); |
| 968 | 968 | |
| 969 | 969 | result.setBabyDiagnosis(model.getBabyDiagnosis()); |
| 970 | - | |
| 970 | + result.setBlNo(model.getBlNo()); | |
| 971 | 971 | result.setDueWeek(model.getDueWeek()); |
| 972 | 972 | return result; |
| 973 | 973 | } |
| 974 | 974 | |
| 975 | 975 | |
| 976 | 976 | |
| 977 | 977 | |
| 978 | 978 | |
| 979 | 979 | |
| ... | ... | @@ -1956,41 +1956,108 @@ |
| 1956 | 1956 | List<Map<String, Object>> datas = new ArrayList<>(); |
| 1957 | 1957 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 1958 | 1958 | babyQuery.setHospitalId(String.valueOf(hospitalId)); |
| 1959 | - List<BabyModel> models = getBabayListByCondition(request, false, babyQuery); | |
| 1960 | - if (CollectionUtils.isNotEmpty(models)) { | |
| 1961 | - for (BabyModel model : models) { | |
| 1962 | - Map<String, Object> data = new HashMap<>(); | |
| 1963 | - if (model.getLastHighRisk() == null || model.getLastHighRisk() == 0) { | |
| 1964 | - data.put("highRisk", "健康"); | |
| 1965 | - } else { | |
| 1966 | - data.put("highRisk", "高危"); | |
| 1959 | + List<BabyModel> ms = getBabayListByCondition(request, false, babyQuery); | |
| 1960 | + | |
| 1961 | + if (CollectionUtils.isNotEmpty(ms)) { | |
| 1962 | + | |
| 1963 | + int batchSize = 100; | |
| 1964 | + int end = 0; | |
| 1965 | + List<Future> futures = new ArrayList<>(); | |
| 1966 | + for (int i = 0; i < ms.size(); i += batchSize) { | |
| 1967 | + end = (end + batchSize); | |
| 1968 | + if (end > ms.size()) { | |
| 1969 | + end = ms.size(); | |
| 1967 | 1970 | } |
| 1968 | - data.put("sex", StringUtils.emptyDeal(SexEnum.getTextById(model.getSex()))); | |
| 1969 | - data.put("babyName", StringUtils.emptyDeal(model.getName())); | |
| 1970 | - data.put("birthday", StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getBirth()))); | |
| 1971 | - data.put("mommyName", StringUtils.emptyDeal(model.getMname())); | |
| 1972 | - data.put("mommnyPhone", StringUtils.emptyDeal(model.getMphone())); | |
| 1973 | - data.put("serviceType", StringUtils.emptyDeal(model.getServiceType() == null ? "" : ServiceTypeEnums.getTitleById(model.getServiceType()))); | |
| 1974 | - data.put("serviceStatus", StringUtils.emptyDeal(model.getServiceStatus() == null ? "" : ServiceStatusEnums.getNameById(model.getServiceStatus()))); | |
| 1975 | - data.put("nextDate", StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getNextDate()))); | |
| 1976 | - data.put("monthAge", StringUtils.emptyDeal(DateUtil.getBabyMonthAge(model.getBirth(), new Date()))); | |
| 1977 | 1971 | |
| 1978 | - String diagnose = ""; | |
| 1979 | - if (StringUtils.isNotEmpty(model.getPid())) { | |
| 1980 | - List diagList = babyCheckFacade.getBabyLastDiagnose(model.getPid()); | |
| 1981 | - if (CollectionUtils.isNotEmpty(diagList)) { | |
| 1982 | - for (Object obj : diagList) { | |
| 1983 | - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById((String) obj); | |
| 1984 | - if (basicConfig != null) { | |
| 1985 | - diagnose += basicConfig.getName() + " "; | |
| 1972 | + final List<BabyModel> models = ms.subList(i, end); | |
| 1973 | + Callable c = new Callable() | |
| 1974 | + { | |
| 1975 | + @Override | |
| 1976 | + public List<Map<String, Object>> call() throws Exception { | |
| 1977 | + List<Map<String, Object>> results = new ArrayList<>(); | |
| 1978 | + if (CollectionUtils.isNotEmpty(models)) { | |
| 1979 | + for (BabyModel model : models) { | |
| 1980 | + Map<String, Object> data = new HashMap<>(); | |
| 1981 | + if (model.getLastHighRisk() == null || model.getLastHighRisk() == 0) { | |
| 1982 | + data.put("highRisk", "健康"); | |
| 1983 | + } else { | |
| 1984 | + data.put("highRisk", "高危"); | |
| 1985 | + } | |
| 1986 | + data.put("sex", StringUtils.emptyDeal(SexEnum.getTextById(model.getSex()))); | |
| 1987 | + data.put("babyName", StringUtils.emptyDeal(model.getName())); | |
| 1988 | + data.put("birthday", StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getBirth()))); | |
| 1989 | + data.put("mommyName", StringUtils.emptyDeal(model.getMname())); | |
| 1990 | + data.put("mommnyPhone", StringUtils.emptyDeal(model.getMphone())); | |
| 1991 | + data.put("serviceType", StringUtils.emptyDeal(model.getServiceType() == null ? "" : ServiceTypeEnums.getTitleById(model.getServiceType()))); | |
| 1992 | + data.put("serviceStatus", StringUtils.emptyDeal(model.getServiceStatus() == null ? "" : ServiceStatusEnums.getNameById(model.getServiceStatus()))); | |
| 1993 | + data.put("nextDate", StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getNextDate()))); | |
| 1994 | + data.put("monthAge", StringUtils.emptyDeal(DateUtil.getBabyMonthAge(model.getBirth(), new Date()))); | |
| 1995 | + | |
| 1996 | + String diagnose = ""; | |
| 1997 | + if (StringUtils.isNotEmpty(model.getPid())) { | |
| 1998 | + List diagList = babyCheckFacade.getBabyLastDiagnose(model.getPid()); | |
| 1999 | + if (CollectionUtils.isNotEmpty(diagList)) { | |
| 2000 | + for (Object obj : diagList) { | |
| 2001 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById((String) obj); | |
| 2002 | + if (basicConfig != null) { | |
| 2003 | + diagnose += basicConfig.getName() + " "; | |
| 2004 | + } | |
| 2005 | + } | |
| 2006 | + } | |
| 2007 | + } | |
| 2008 | + data.put("diagnose", diagnose); | |
| 2009 | + results.add(data); | |
| 1986 | 2010 | } |
| 1987 | 2011 | } |
| 2012 | + return results; | |
| 1988 | 2013 | } |
| 2014 | + }; | |
| 2015 | + | |
| 2016 | + Future f = pool.submit(c); | |
| 2017 | + futures.add(f); | |
| 2018 | + } | |
| 2019 | + for (Future f : futures) { | |
| 2020 | + try { | |
| 2021 | + datas.addAll((List) f.get(30, TimeUnit.SECONDS)); | |
| 2022 | + } catch (Exception e) { | |
| 2023 | + ExceptionUtils.catchException(e, "baby list export."); | |
| 1989 | 2024 | } |
| 1990 | - data.put("diagnose", diagnose); | |
| 1991 | - datas.add(data); | |
| 1992 | 2025 | } |
| 1993 | 2026 | } |
| 2027 | +// if (CollectionUtils.isNotEmpty(models)) { | |
| 2028 | +// for (BabyModel model : models) { | |
| 2029 | +// Map<String, Object> data = new HashMap<>(); | |
| 2030 | +// if (model.getLastHighRisk() == null || model.getLastHighRisk() == 0) { | |
| 2031 | +// data.put("highRisk", "健康"); | |
| 2032 | +// } else { | |
| 2033 | +// data.put("highRisk", "高危"); | |
| 2034 | +// } | |
| 2035 | +// data.put("sex", StringUtils.emptyDeal(SexEnum.getTextById(model.getSex()))); | |
| 2036 | +// data.put("babyName", StringUtils.emptyDeal(model.getName())); | |
| 2037 | +// data.put("birthday", StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getBirth()))); | |
| 2038 | +// data.put("mommyName", StringUtils.emptyDeal(model.getMname())); | |
| 2039 | +// data.put("mommnyPhone", StringUtils.emptyDeal(model.getMphone())); | |
| 2040 | +// data.put("serviceType", StringUtils.emptyDeal(model.getServiceType() == null ? "" : ServiceTypeEnums.getTitleById(model.getServiceType()))); | |
| 2041 | +// data.put("serviceStatus", StringUtils.emptyDeal(model.getServiceStatus() == null ? "" : ServiceStatusEnums.getNameById(model.getServiceStatus()))); | |
| 2042 | +// data.put("nextDate", StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(model.getNextDate()))); | |
| 2043 | +// data.put("monthAge", StringUtils.emptyDeal(DateUtil.getBabyMonthAge(model.getBirth(), new Date()))); | |
| 2044 | +// | |
| 2045 | +// String diagnose = ""; | |
| 2046 | +// if (StringUtils.isNotEmpty(model.getPid())) { | |
| 2047 | +// List diagList = babyCheckFacade.getBabyLastDiagnose(model.getPid()); | |
| 2048 | +// if (CollectionUtils.isNotEmpty(diagList)) { | |
| 2049 | +// for (Object obj : diagList) { | |
| 2050 | +// BasicConfig basicConfig = basicConfigService.getOneBasicConfigById((String) obj); | |
| 2051 | +// if (basicConfig != null) { | |
| 2052 | +// diagnose += basicConfig.getName() + " "; | |
| 2053 | +// } | |
| 2054 | +// } | |
| 2055 | +// } | |
| 2056 | +// } | |
| 2057 | +// data.put("diagnose", diagnose); | |
| 2058 | +// datas.add(data); | |
| 2059 | +// } | |
| 2060 | +// } | |
| 1994 | 2061 | OutputStream out = httpServletResponse.getOutputStream(); |
| 1995 | 2062 | Map<String, String> cnames = new LinkedHashMap<>(); |
| 1996 | 2063 | cnames.put("sex", "性别"); |
| ... | ... | @@ -2045,6 +2112,212 @@ |
| 2045 | 2112 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 2046 | 2113 | objectResponse.setErrormsg("成功"); |
| 2047 | 2114 | return objectResponse; |
| 2115 | + } | |
| 2116 | + | |
| 2117 | + /** | |
| 2118 | + * 儿童生长发育统计 | |
| 2119 | + * @param request | |
| 2120 | + * @param userId | |
| 2121 | + * @return | |
| 2122 | + */ | |
| 2123 | + public BaseResponse getBabyGroupCount(BabyManageRequest request, Integer userId) { | |
| 2124 | + String hospitalId = ""; | |
| 2125 | + //得到当前登录的医院id | |
| 2126 | + if (userId != null) { | |
| 2127 | + Users dbuser = usersService.getUsers(userId); | |
| 2128 | + if (dbuser != null) { | |
| 2129 | + hospitalId = String.valueOf(dbuser.getOrgId()); | |
| 2130 | + } | |
| 2131 | + } | |
| 2132 | + | |
| 2133 | + BabyModelQuery babyQuery = new BabyModelQuery(); | |
| 2134 | + List buildType = new ArrayList(); | |
| 2135 | + buildType.add(1); | |
| 2136 | + buildType.add(2); | |
| 2137 | + babyQuery.setBuildTypeList(buildType); | |
| 2138 | + babyQuery.setHospitalId(hospitalId); | |
| 2139 | + | |
| 2140 | + babyQuery.setYn(YnEnums.YES.getId()); | |
| 2141 | + Date currentDate = DateUtil.formatDate(new Date()); | |
| 2142 | + | |
| 2143 | + if(StringUtils.isNotEmpty(request.getBirth()) && request.getMonthAgeStart() != null && request.getMonthAgeEnd() != null) | |
| 2144 | + { | |
| 2145 | + | |
| 2146 | + Date start = DateUtil.addMonth(currentDate, -request.getMonthAgeStart()); | |
| 2147 | + String birthStr = request.getBirth(); | |
| 2148 | + String[] dates = birthStr.split(" - "); | |
| 2149 | + | |
| 2150 | + if (DateUtil.parseYMD(dates[1]).getTime() < start.getTime()) | |
| 2151 | + { | |
| 2152 | + babyQuery.setBirthEnd(DateUtil.parseYMD(dates[1])); | |
| 2153 | + | |
| 2154 | + } | |
| 2155 | + else | |
| 2156 | + { | |
| 2157 | + babyQuery.setBirthEnd(start); | |
| 2158 | + } | |
| 2159 | + | |
| 2160 | + Date end = DateUtil.addDay(DateUtil.addMonth(currentDate, -request.getMonthAgeEnd() - 1), 1); | |
| 2161 | + | |
| 2162 | + if (DateUtil.parseYMD(dates[0]).getTime() < end.getTime()) | |
| 2163 | + { | |
| 2164 | + babyQuery.setBirthStart(end); | |
| 2165 | + } | |
| 2166 | + else | |
| 2167 | + { | |
| 2168 | + babyQuery.setBirthStart(DateUtil.parseYMD(dates[0])); | |
| 2169 | + } | |
| 2170 | + } | |
| 2171 | + else if (StringUtils.isNotEmpty(request.getBirth()) && request.getMonthAgeStart() != null ) | |
| 2172 | + { | |
| 2173 | + | |
| 2174 | + Date start = DateUtil.addMonth(currentDate, -request.getMonthAgeStart()); | |
| 2175 | + String birthStr = request.getBirth(); | |
| 2176 | + String[] dates = birthStr.split(" - "); | |
| 2177 | + | |
| 2178 | + if (DateUtil.parseYMD(dates[1]).getTime() < start.getTime()) | |
| 2179 | + { | |
| 2180 | + babyQuery.setBirthEnd(DateUtil.parseYMD(dates[1])); | |
| 2181 | + } | |
| 2182 | + else | |
| 2183 | + { | |
| 2184 | + babyQuery.setBirthEnd(start); | |
| 2185 | + } | |
| 2186 | + | |
| 2187 | + babyQuery.setBirthStart(DateUtil.parseYMD(dates[0])); | |
| 2188 | + | |
| 2189 | + } | |
| 2190 | + else if (StringUtils.isNotEmpty(request.getBirth())) | |
| 2191 | + { | |
| 2192 | + String birthStr = request.getBirth(); | |
| 2193 | + String[] dates = birthStr.split(" - "); | |
| 2194 | + babyQuery.setBirthStart(DateUtil.parseYMD(dates[0])); | |
| 2195 | + babyQuery.setBirthEnd(DateUtil.parseYMD(dates[1])); | |
| 2196 | + } | |
| 2197 | + else if (request.getMonthAgeStart() != null && request.getMonthAgeEnd() != null) | |
| 2198 | + { | |
| 2199 | + Date start = DateUtil.addMonth(currentDate, -request.getMonthAgeStart()); | |
| 2200 | + babyQuery.setBirthEnd(start); | |
| 2201 | + | |
| 2202 | + Date end = DateUtil.addDay(DateUtil.addMonth(currentDate, -request.getMonthAgeEnd() - 1), 1); | |
| 2203 | + babyQuery.setBirthStart(end); | |
| 2204 | + } | |
| 2205 | + else if (request.getMonthAgeStart() != null) | |
| 2206 | + { | |
| 2207 | + Date start = DateUtil.addMonth(currentDate, -request.getMonthAgeStart()); | |
| 2208 | + babyQuery.setBirthEnd(start); | |
| 2209 | + } | |
| 2210 | + else if (request.getMonthAgeEnd() != null) | |
| 2211 | + { | |
| 2212 | + Date end = DateUtil.addDay(DateUtil.addMonth(currentDate, -request.getMonthAgeEnd() - 1), 1); | |
| 2213 | + babyQuery.setBirthStart(end); | |
| 2214 | + } | |
| 2215 | + Map<String,List<BabyGrowthCountResult>> result = new HashMap<>(); | |
| 2216 | + | |
| 2217 | + Map<String,List<BabyGrowthCountResult>> mapItems = getCountGroupItemMaps(); | |
| 2218 | + for(String key : mapItems.keySet()) | |
| 2219 | + { | |
| 2220 | + List<BabyGrowthCountResult> groups = mapItems.get(key); | |
| 2221 | + GrowthCountTask task = new GrowthCountTask(groups,babyQuery,babyBookbuildingService,key); | |
| 2222 | + result.put(key,task.getResults()); | |
| 2223 | + } | |
| 2224 | + | |
| 2225 | + BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
| 2226 | + objectResponse.setData(result); | |
| 2227 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 2228 | + objectResponse.setErrormsg("成功"); | |
| 2229 | + return objectResponse; | |
| 2230 | + } | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + public Map<String,List<BabyGrowthCountResult>> getCountGroupItemMaps() | |
| 2234 | + { | |
| 2235 | + List<BabyGrowthCountResult> list1 = new ArrayList<>(); | |
| 2236 | + BabyGrowthCountResult growH = new BabyGrowthCountResult(); | |
| 2237 | + growH.setBzc("> +3SD"); | |
| 2238 | + growH.setEvaluate("上"); | |
| 2239 | + list1.add(growH); | |
| 2240 | + | |
| 2241 | + BabyGrowthCountResult growH1 = new BabyGrowthCountResult(); | |
| 2242 | + growH1.setBzc("+2SD - +3SD"); | |
| 2243 | + growH1.setEvaluate("中上"); | |
| 2244 | + list1.add(growH1); | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + BabyGrowthCountResult growH2 = new BabyGrowthCountResult(); | |
| 2248 | + growH2.setBzc("+1SD > +2SD"); | |
| 2249 | + growH2.setEvaluate("中+"); | |
| 2250 | + list1.add(growH2); | |
| 2251 | + | |
| 2252 | + BabyGrowthCountResult growH3 = new BabyGrowthCountResult(); | |
| 2253 | + growH3.setBzc("-1SD - +1SD"); | |
| 2254 | + growH3.setEvaluate("中"); | |
| 2255 | + list1.add(growH3); | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + BabyGrowthCountResult growH4 = new BabyGrowthCountResult(); | |
| 2259 | + growH4.setBzc("-2SD> -1SD"); | |
| 2260 | + growH4.setEvaluate("中-"); | |
| 2261 | + list1.add(growH4); | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + BabyGrowthCountResult growH5 = new BabyGrowthCountResult(); | |
| 2265 | + growH5.setBzc("-3SD - -2SD"); | |
| 2266 | + growH5.setEvaluate("中下"); | |
| 2267 | + list1.add(growH5); | |
| 2268 | + | |
| 2269 | + BabyGrowthCountResult growH6 = new BabyGrowthCountResult(); | |
| 2270 | + growH6.setBzc("< -3SD"); | |
| 2271 | + growH6.setEvaluate("下"); | |
| 2272 | + list1.add(growH5); | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + List<BabyGrowthCountResult> list2 = new ArrayList<>(); | |
| 2277 | + BabyGrowthCountResult growW = new BabyGrowthCountResult(); | |
| 2278 | + growW.setBzc("> +3SD"); | |
| 2279 | + growW.setEvaluate("上"); | |
| 2280 | + list2.add(growW); | |
| 2281 | + | |
| 2282 | + BabyGrowthCountResult growW1 = new BabyGrowthCountResult(); | |
| 2283 | + growW1.setBzc("+2SD - +3SD"); | |
| 2284 | + growW1.setEvaluate("中上"); | |
| 2285 | + list2.add(growW1); | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + BabyGrowthCountResult growW2 = new BabyGrowthCountResult(); | |
| 2289 | + growW2.setBzc("+1SD > +2SD"); | |
| 2290 | + growW2.setEvaluate("中+"); | |
| 2291 | + list2.add(growW2); | |
| 2292 | + | |
| 2293 | + BabyGrowthCountResult growW3 = new BabyGrowthCountResult(); | |
| 2294 | + growW3.setBzc("-1SD - +1SD"); | |
| 2295 | + growW3.setEvaluate("中"); | |
| 2296 | + list2.add(growW3); | |
| 2297 | + | |
| 2298 | + | |
| 2299 | + BabyGrowthCountResult growW4 = new BabyGrowthCountResult(); | |
| 2300 | + growW4.setBzc("-2SD> -1SD"); | |
| 2301 | + growW4.setEvaluate("中-"); | |
| 2302 | + list2.add(growW4); | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + BabyGrowthCountResult growW5 = new BabyGrowthCountResult(); | |
| 2306 | + growW5.setBzc("-3SD - -2SD"); | |
| 2307 | + growW5.setEvaluate("中下"); | |
| 2308 | + list2.add(growH5); | |
| 2309 | + | |
| 2310 | + BabyGrowthCountResult growW6 = new BabyGrowthCountResult(); | |
| 2311 | + growW6.setBzc("< -3SD"); | |
| 2312 | + growW6.setEvaluate("下"); | |
| 2313 | + list2.add(growW6); | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + Map<String,List<BabyGrowthCountResult>> map1 = new HashMap<>(); | |
| 2317 | + map1.put("身长",list1); | |
| 2318 | + map1.put("体重",list2); | |
| 2319 | + | |
| 2320 | + return map1; | |
| 2048 | 2321 | } |
| 2049 | 2322 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
b93bf0f
| ... | ... | @@ -94,6 +94,8 @@ |
| 94 | 94 | bm.setLastDiagnose(diagnoseNames); |
| 95 | 95 | } |
| 96 | 96 | babyBookbuildingService.updateBabyBuild(bm, request.getBuildId()); |
| 97 | + updateLastGrowth(model); | |
| 98 | + | |
| 97 | 99 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 98 | 100 | } |
| 99 | 101 | |
| 100 | 102 | |
| ... | ... | @@ -182,9 +184,10 @@ |
| 182 | 184 | |
| 183 | 185 | model.setDrugGllergic(JsonUtil.obj2JsonString(request.getDrugGllergic())); |
| 184 | 186 | model.setChestw(request.getChestw()); |
| 185 | - | |
| 186 | - | |
| 187 | 187 | model.setCheckDate(DateUtil.parseYMD(request.getCheckDate())); |
| 188 | + model.setWeightEvaluate(request.getWeightEvaluate()); | |
| 189 | + model.setHeadEvaluate(request.getHeadEvaluate()); | |
| 190 | + model.setHeightEvaluate(request.getHeightEvaluate()); | |
| 188 | 191 | |
| 189 | 192 | return model; |
| 190 | 193 | } |
| 191 | 194 | |
| 192 | 195 | |
| 193 | 196 | |
| ... | ... | @@ -293,19 +296,47 @@ |
| 293 | 296 | applyOrderService.updateByParentId(referralApplyOrderQuery2, model1); |
| 294 | 297 | } |
| 295 | 298 | } |
| 299 | + | |
| 300 | + updateLastGrowth(model); | |
| 301 | + | |
| 296 | 302 | br.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 297 | 303 | br.setErrormsg("成功"); |
| 298 | 304 | br.setData(model.getId()); |
| 299 | 305 | return br; |
| 300 | 306 | } |
| 301 | 307 | |
| 308 | + | |
| 309 | + public void updateLastGrowth(BabyCheckModel model) | |
| 310 | + { | |
| 311 | + babyBookbuildingService.updateBabyLastGrowth(model); | |
| 312 | + } | |
| 313 | + | |
| 314 | + | |
| 302 | 315 | /** |
| 303 | 316 | * 删除儿保检查 |
| 304 | 317 | * |
| 305 | 318 | * @param id |
| 306 | 319 | */ |
| 307 | 320 | public void deleteBabyCheckById(String id) { |
| 321 | + BabyCheckModelQuery query = new BabyCheckModelQuery(); | |
| 322 | + query.setYn(YnEnums.YES.getId()); | |
| 323 | + query.setId(id); | |
| 324 | + //查询儿童的检查记录 | |
| 325 | + List<BabyCheckModel> checkModels = babyCheckService.queryBabyCheckRecord(query,"checkDate", Sort.Direction.DESC); | |
| 326 | + | |
| 308 | 327 | babyCheckService.deleteBabyCheckById(id); |
| 328 | + if (CollectionUtils.isNotEmpty(checkModels)) | |
| 329 | + { | |
| 330 | + query.setId(null); | |
| 331 | + query.setBuildId(checkModels.get(0).getBuildId()); | |
| 332 | + checkModels = babyCheckService.queryBabyCheckRecord(query,"checkDate", Sort.Direction.DESC); | |
| 333 | + if (CollectionUtils.isNotEmpty(checkModels)) | |
| 334 | + { | |
| 335 | + updateLastGrowth(checkModels.get(0)); | |
| 336 | + } | |
| 337 | + } | |
| 338 | + | |
| 339 | + | |
| 309 | 340 | } |
| 310 | 341 | |
| 311 | 342 | /** |
| ... | ... | @@ -862,6 +893,10 @@ |
| 862 | 893 | model.setDrugGllergic(JsonUtil.str2Obj(checkModel.getDrugGllergic(), Map.class)); |
| 863 | 894 | model.setChestw(checkModel.getChestw()); |
| 864 | 895 | |
| 896 | + model.setWeightEvaluate(checkModel.getWeightEvaluate()); | |
| 897 | + model.setHeadEvaluate(checkModel.getHeadEvaluate()); | |
| 898 | + model.setHeightEvaluate(checkModel.getHeightEvaluate()); | |
| 899 | + | |
| 865 | 900 | return model; |
| 866 | 901 | |
| 867 | 902 | } |
| 868 | 903 | |
| ... | ... | @@ -872,8 +907,20 @@ |
| 872 | 907 | * @param sex |
| 873 | 908 | * @return |
| 874 | 909 | */ |
| 875 | - public BaseObjectResponse queryHWByHeight(Double height,Double value, Integer sex,String birth) { | |
| 910 | + public BaseObjectResponse queryHWByHeight(Double height,Double weight, Integer sex,String birth) { | |
| 876 | 911 | |
| 912 | + | |
| 913 | + String res = getBabyHW(height,weight,sex,birth); | |
| 914 | + BaseObjectResponse br = new BaseObjectResponse(); | |
| 915 | + br.setData(res); | |
| 916 | + br.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 917 | + br.setErrormsg("成功"); | |
| 918 | + return br; | |
| 919 | + } | |
| 920 | + | |
| 921 | + | |
| 922 | + public String getBabyHW(Double height,Double weight, Integer sex,String birth) | |
| 923 | + { | |
| 877 | 924 | Double hw = getHw(height); |
| 878 | 925 | |
| 879 | 926 | //计算儿童的月龄 |
| 880 | 927 | |
| 881 | 928 | |
| 882 | 929 | |
| 883 | 930 | |
| 884 | 931 | |
| 885 | 932 | |
| 886 | 933 | |
| ... | ... | @@ -891,41 +938,36 @@ |
| 891 | 938 | if (CollectionUtils.isNotEmpty(list)) { |
| 892 | 939 | AwModel model = list.get(0); |
| 893 | 940 | |
| 894 | - if (model.getPthreeDs() < value) | |
| 941 | + if (model.getPthreeDs() < weight) | |
| 895 | 942 | { |
| 896 | 943 | res = "上"; |
| 897 | 944 | } |
| 898 | - else if (model.getPthreeDs() >=value && value > model.getPtwoDs()) | |
| 945 | + else if (model.getPthreeDs() >=weight && weight > model.getPtwoDs()) | |
| 899 | 946 | { |
| 900 | 947 | res = "中上"; |
| 901 | 948 | } |
| 902 | - else if (model.getPtwoDs() >=value && value > model.getPoneDs()) | |
| 949 | + else if (model.getPtwoDs() >=weight && weight > model.getPoneDs()) | |
| 903 | 950 | { |
| 904 | 951 | res = "中+"; |
| 905 | 952 | } |
| 906 | - else if (model.getPoneDs() >=value && value >= model.getRoneDs()) | |
| 953 | + else if (model.getPoneDs() >=weight && weight >= model.getRoneDs()) | |
| 907 | 954 | { |
| 908 | 955 | res = "中"; |
| 909 | 956 | } |
| 910 | - else if (model.getRoneDs() >value && value >= model.getRtwoDs()) | |
| 957 | + else if (model.getRoneDs() >weight && weight >= model.getRtwoDs()) | |
| 911 | 958 | { |
| 912 | 959 | res = "中-"; |
| 913 | 960 | } |
| 914 | - else if (model.getRtwoDs() >value && value >= model.getRthreeDs()) | |
| 961 | + else if (model.getRtwoDs() >weight && weight >= model.getRthreeDs()) | |
| 915 | 962 | { |
| 916 | 963 | res = "中下"; |
| 917 | 964 | } |
| 918 | - else if (model.getRtwoDs() >value) | |
| 965 | + else if (model.getRtwoDs() >weight) | |
| 919 | 966 | { |
| 920 | 967 | res = "下"; |
| 921 | 968 | } |
| 922 | 969 | } |
| 923 | - | |
| 924 | - BaseObjectResponse br = new BaseObjectResponse(); | |
| 925 | - br.setData(res); | |
| 926 | - br.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 927 | - br.setErrormsg("成功"); | |
| 928 | - return br; | |
| 970 | + return res; | |
| 929 | 971 | } |
| 930 | 972 | |
| 931 | 973 | /** |
| ... | ... | @@ -975,6 +1017,16 @@ |
| 975 | 1017 | */ |
| 976 | 1018 | public BaseObjectResponse queryGrowthEvaluate(Double height, Integer sex, String birth,Double weight) { |
| 977 | 1019 | |
| 1020 | + List<String> list = getBabyGrowthEvaluate(height, sex, birth, weight); | |
| 1021 | + BaseObjectResponse br = new BaseObjectResponse(); | |
| 1022 | + br.setData(list); | |
| 1023 | + br.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 1024 | + br.setErrormsg("成功"); | |
| 1025 | + return br; | |
| 1026 | + } | |
| 1027 | + | |
| 1028 | + public List<String> getBabyGrowthEvaluate(Double height, Integer sex, String birth,Double weight) | |
| 1029 | + { | |
| 978 | 1030 | List<String> growthEvaluate = new ArrayList<>(); |
| 979 | 1031 | Double hw = getHw(height); |
| 980 | 1032 | |
| 981 | 1033 | |
| ... | ... | @@ -1022,32 +1074,28 @@ |
| 1022 | 1074 | |
| 1023 | 1075 | if (value != null) |
| 1024 | 1076 | { |
| 1025 | - //中位数百分比 | |
| 1026 | - Double mp = weight/value; | |
| 1027 | - if (mp < 0.8) | |
| 1028 | - { | |
| 1029 | - growthEvaluate.add("重度消瘦"); | |
| 1030 | - } | |
| 1031 | - else if (0.8 <= mp && mp < 0.9) | |
| 1032 | - { | |
| 1033 | - growthEvaluate.add("轻度消瘦"); | |
| 1034 | - } | |
| 1035 | - else if (1.1 < mp && mp <= 1.2) | |
| 1036 | - { | |
| 1037 | - growthEvaluate.add("超重"); | |
| 1038 | - } | |
| 1039 | - else if ( mp > 1.2) | |
| 1040 | - { | |
| 1041 | - growthEvaluate.add("肥胖"); | |
| 1042 | - } | |
| 1077 | + //中位数百分比 | |
| 1078 | + Double mp = weight/value; | |
| 1079 | + if (mp < 0.8) | |
| 1080 | + { | |
| 1081 | + growthEvaluate.add("重度消瘦"); | |
| 1082 | + } | |
| 1083 | + else if (0.8 <= mp && mp < 0.9) | |
| 1084 | + { | |
| 1085 | + growthEvaluate.add("轻度消瘦"); | |
| 1086 | + } | |
| 1087 | + else if (1.1 < mp && mp <= 1.2) | |
| 1088 | + { | |
| 1089 | + growthEvaluate.add("超重"); | |
| 1090 | + } | |
| 1091 | + else if ( mp > 1.2) | |
| 1092 | + { | |
| 1093 | + growthEvaluate.add("肥胖"); | |
| 1094 | + } | |
| 1043 | 1095 | } |
| 1044 | 1096 | |
| 1045 | 1097 | } |
| 1046 | - BaseObjectResponse br = new BaseObjectResponse(); | |
| 1047 | - br.setData(growthEvaluate); | |
| 1048 | - br.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 1049 | - br.setErrormsg("成功"); | |
| 1050 | - return br; | |
| 1098 | + return growthEvaluate; | |
| 1051 | 1099 | } |
| 1052 | 1100 | |
| 1053 | 1101 | public BaseObjectResponse getBaseConfig() { |
| 1054 | 1102 | |
| ... | ... | @@ -1090,7 +1138,17 @@ |
| 1090 | 1138 | } |
| 1091 | 1139 | |
| 1092 | 1140 | public BaseObjectResponse queryBabyHealthStatus(String birth,Double value, Integer sex, Integer type) { |
| 1141 | + String res = getGrowthValue(birth,value,sex,type); | |
| 1142 | + BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
| 1143 | + objectResponse.setData(res); | |
| 1144 | + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 1145 | + objectResponse.setErrormsg("成功"); | |
| 1146 | + return objectResponse; | |
| 1147 | + } | |
| 1093 | 1148 | |
| 1149 | + | |
| 1150 | + public String getGrowthValue(String birth,Double value, Integer sex, Integer type) | |
| 1151 | + { | |
| 1094 | 1152 | //计算儿童的月龄 |
| 1095 | 1153 | int monthAge = DateUtil.getBabyAgeMonth(DateUtil.parseYMD(birth), new Date()); |
| 1096 | 1154 | |
| 1097 | 1155 | |
| ... | ... | @@ -1101,40 +1159,38 @@ |
| 1101 | 1159 | if (CollectionUtils.isNotEmpty(list)) { |
| 1102 | 1160 | AwModel model = list.get(0); |
| 1103 | 1161 | |
| 1104 | - if (model.getPthreeDs() < value) | |
| 1105 | - { | |
| 1106 | - res = "上"; | |
| 1107 | - } | |
| 1108 | - else if (model.getPthreeDs() >=value && value > model.getPtwoDs()) | |
| 1109 | - { | |
| 1110 | - res = "中上"; | |
| 1111 | - } | |
| 1112 | - else if (model.getPtwoDs() >=value && value > model.getPoneDs()) | |
| 1113 | - { | |
| 1114 | - res = "中+"; | |
| 1115 | - } | |
| 1116 | - else if (model.getPoneDs() >=value && value >= model.getRoneDs()) | |
| 1117 | - { | |
| 1118 | - res = "中"; | |
| 1119 | - } | |
| 1120 | - else if (model.getRoneDs() >value && value >= model.getRtwoDs()) | |
| 1121 | - { | |
| 1122 | - res = "中-"; | |
| 1123 | - } | |
| 1124 | - else if (model.getRtwoDs() >value && value >= model.getRthreeDs()) | |
| 1125 | - { | |
| 1126 | - res = "中下"; | |
| 1127 | - } | |
| 1128 | - else if (model.getRtwoDs() >value) | |
| 1129 | - { | |
| 1130 | - res = "下"; | |
| 1131 | - } | |
| 1162 | + if (model.getPthreeDs() < value) | |
| 1163 | + { | |
| 1164 | + res = "上"; | |
| 1165 | + } | |
| 1166 | + else if (model.getPthreeDs() >=value && value > model.getPtwoDs()) | |
| 1167 | + { | |
| 1168 | + res = "中上"; | |
| 1169 | + } | |
| 1170 | + else if (model.getPtwoDs() >=value && value > model.getPoneDs()) | |
| 1171 | + { | |
| 1172 | + res = "中+"; | |
| 1173 | + } | |
| 1174 | + else if (model.getPoneDs() >=value && value >= model.getRoneDs()) | |
| 1175 | + { | |
| 1176 | + res = "中"; | |
| 1177 | + } | |
| 1178 | + else if (model.getRoneDs() >value && value >= model.getRtwoDs()) | |
| 1179 | + { | |
| 1180 | + res = "中-"; | |
| 1181 | + } | |
| 1182 | + else if (model.getRtwoDs() >value && value >= model.getRthreeDs()) | |
| 1183 | + { | |
| 1184 | + res = "中下"; | |
| 1185 | + } | |
| 1186 | + else if (model.getRtwoDs() >value) | |
| 1187 | + { | |
| 1188 | + res = "下"; | |
| 1189 | + } | |
| 1132 | 1190 | } |
| 1133 | - BaseObjectResponse objectResponse = new BaseObjectResponse(); | |
| 1134 | - objectResponse.setData(res); | |
| 1135 | - objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 1136 | - objectResponse.setErrormsg("成功"); | |
| 1137 | - return objectResponse; | |
| 1191 | + | |
| 1192 | + return res; | |
| 1193 | + | |
| 1138 | 1194 | } |
| 1139 | 1195 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/FolicAcidFacade.java
View file @
b93bf0f
| ... | ... | @@ -112,13 +112,13 @@ |
| 112 | 112 | model.setUsername(addRequest.getUsername()); |
| 113 | 113 | model.setCertificateNum(addRequest.getCardNo()); |
| 114 | 114 | model.setCertificateTypeId(addRequest.getCertificateTypeId()); |
| 115 | - model.setBirthday(addRequest.getBirthday()); | |
| 115 | + model.setBirthday(addRequest.getBirthday()!=null ? DateUtil.parseYMD(addRequest.getBirthday()) : null); | |
| 116 | 116 | model.setAge(addRequest.getAge()); |
| 117 | 117 | model.setPhone(addRequest.getPhone()); |
| 118 | 118 | |
| 119 | 119 | model.setSex(SystemConfig.WOMAN_ID); |
| 120 | 120 | //建档日期 |
| 121 | - model.setBuildDay(DateUtil.getyyyy_MM_dd(new Date())); | |
| 121 | + model.setBuildDay(new Date()); | |
| 122 | 122 | |
| 123 | 123 | model.setVcCardNo(addRequest.getVcCardNo()); |
| 124 | 124 | |
| ... | ... | @@ -204,8 +204,8 @@ |
| 204 | 204 | archiveMap.put("certificateNum", archiveModel.getCertificateNum()); |
| 205 | 205 | archiveMap.put("certificateTypeId", archiveModel.getCertificateTypeId()); |
| 206 | 206 | archiveMap.put("username", archiveModel.getUsername()); |
| 207 | - archiveMap.put("birthday",archiveModel.getBirthday()); | |
| 208 | - archiveMap.put("age", StringUtils.isEmpty(archiveModel.getBirthday()) ? "" : DateUtil.getAge(DateUtil.parseYMD(archiveModel.getBirthday()))); | |
| 207 | + archiveMap.put("birthday",archiveModel.getBirthday() != null ? DateUtil.getyyyy_MM_dd(archiveModel.getBirthday()) : null); | |
| 208 | + archiveMap.put("age", archiveModel.getBirthday() != null ? "" : DateUtil.getAge(archiveModel.getBirthday())); | |
| 209 | 209 | archiveMap.put("phone", archiveModel.getPhone()); |
| 210 | 210 | archiveMap.put("id", archiveModel.getId()); |
| 211 | 211 | if (StringUtils.isEmpty(archiveModel.getSex()) || archiveModel.getSex().equals(SystemConfig.WOMAN_ID )){ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
b93bf0f
| ... | ... | @@ -16,6 +16,8 @@ |
| 16 | 16 | import com.lyms.platform.operate.web.worker.WorkHR; |
| 17 | 17 | import com.lyms.platform.permission.model.Organization; |
| 18 | 18 | import com.lyms.platform.permission.model.OrganizationQuery; |
| 19 | +import com.lyms.platform.permission.model.Users; | |
| 20 | +import com.lyms.platform.permission.model.UsersQuery; | |
| 19 | 21 | import com.lyms.platform.permission.service.OrganizationService; |
| 20 | 22 | import com.lyms.platform.permission.service.UsersService; |
| 21 | 23 | import com.lyms.platform.pojo.*; |
| ... | ... | @@ -749,6 +751,80 @@ |
| 749 | 751 | } |
| 750 | 752 | |
| 751 | 753 | return str; |
| 754 | + } | |
| 755 | + | |
| 756 | + public PatientManagerResult patientManager(PatientManagerRequest patientManagerRequest) { | |
| 757 | + PatientManagerResult patientManagerResult = new PatientManagerResult(); | |
| 758 | + | |
| 759 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 760 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 761 | + patientsQuery.setLimit(patientManagerRequest.getLimit()); | |
| 762 | + patientsQuery.setPage(patientManagerRequest.getLimit()); | |
| 763 | + patientsQuery.setHospitalId(autoMatchFacade.getHospitalId(patientManagerRequest.getOperatorId())); | |
| 764 | + patientsQuery.setProvinceRegisterId(StringUtils.isEmpty(patientManagerRequest.getProvinceRegisterId()) ? null : patientManagerRequest.getProvinceRegisterId()); | |
| 765 | + patientsQuery.setCityRegisterId(StringUtils.isEmpty(patientManagerRequest.getCityRegisterId()) ? null : patientManagerRequest.getCityRegisterId()); | |
| 766 | + patientsQuery.setAreaRegisterId(StringUtils.isEmpty(patientManagerRequest.getAreaRegisterId()) ? null : patientManagerRequest.getAreaRegisterId()); | |
| 767 | + UsersQuery usersQuery = new UsersQuery(); | |
| 768 | + usersQuery.setName(patientManagerRequest.getBookbuildingDoctor()); | |
| 769 | + usersQuery.setYn(YnEnums.YES.getId()); | |
| 770 | + List<Users> usersList = usersService.queryUsers(usersQuery); | |
| 771 | + if(CollectionUtils.isNotEmpty(usersList)){ | |
| 772 | + List<String> bookbuildingDoctorList = new ArrayList<>(); | |
| 773 | + for (Users users : usersList) { | |
| 774 | + bookbuildingDoctorList.add(users.getId().toString()); | |
| 775 | + } | |
| 776 | + patientsQuery.setBookbuildingDoctorList(bookbuildingDoctorList); | |
| 777 | + } | |
| 778 | + patientsQuery.setProvinceId(StringUtils.isEmpty(patientManagerRequest.getProvinceId()) ? null : patientManagerRequest.getProvinceId()); | |
| 779 | + patientsQuery.setCityId(StringUtils.isEmpty(patientManagerRequest.getCityId()) ? null : patientManagerRequest.getCityId()); | |
| 780 | + patientsQuery.setAreaId(StringUtils.isEmpty(patientManagerRequest.getAreaId()) ? null : patientManagerRequest.getAreaId()); | |
| 781 | + patientsQuery.setNeed("need"); | |
| 782 | + if (StringUtils.isNotEmpty(patientManagerRequest.getBookBuildingDate())) { | |
| 783 | + try { | |
| 784 | + patientsQuery.setBookbuildingDateStart(DateUtil.getSNDate(patientManagerRequest.getBookBuildingDate())[0]); | |
| 785 | + patientsQuery.setBookbuildingDateEnd(DateUtil.getSNDate(patientManagerRequest.getBookBuildingDate())[1]); | |
| 786 | + } catch (Exception e) { | |
| 787 | + // 什么都不做,这里是数据传入错误了 | |
| 788 | + } | |
| 789 | + } | |
| 790 | + patientsQuery.setName(StringUtils.isEmpty(patientManagerRequest.getQueryNo()) ? null : patientManagerRequest.getQueryNo()); | |
| 791 | + | |
| 792 | + List<Patients> patientsList = patientsService.queryPatient(patientsQuery); | |
| 793 | + List<PatientManagerQueryModel> patientManagerQueryModelList = new ArrayList<>(); | |
| 794 | + if (CollectionUtils.isNotEmpty(patientsList)) { | |
| 795 | + for (Patients patients : patientsList) { | |
| 796 | + PatientManagerQueryModel patientManagerQueryModel = new PatientManagerQueryModel(); | |
| 797 | + BeanUtils.copy(patients, patientManagerQueryModel); | |
| 798 | + patientManagerQueryModel.setAge(DateUtil.getAge(patients.getBirth())); | |
| 799 | + switch (patients.getBuildType()) { | |
| 800 | + case 0: | |
| 801 | + patientManagerQueryModel.setServiceType("未分娩建档"); | |
| 802 | + break; | |
| 803 | + case 1: | |
| 804 | + patientManagerQueryModel.setServiceType("儿童建档时建档"); | |
| 805 | + break; | |
| 806 | + case 2: | |
| 807 | + patientManagerQueryModel.setServiceType("自动分娩类型"); | |
| 808 | + break; | |
| 809 | + case 3: | |
| 810 | + patientManagerQueryModel.setServiceType("转诊自动建档"); | |
| 811 | + break; | |
| 812 | + default: | |
| 813 | + patientManagerQueryModel.setServiceType(""); | |
| 814 | + } | |
| 815 | + patientManagerQueryModel.setBookbuildingDoctor(StringUtils.isEmpty(patients.getBookbuildingDoctor()) ? "" : usersService.getUsers(Integer.valueOf(patients.getBookbuildingDoctor())).getName()); | |
| 816 | + patientManagerQueryModel.setBookbuildingDate(DateUtil.getyyyy_MM_dd(patients.getBookbuildingDate())); | |
| 817 | + patientManagerQueryModel.setAddressRegister(CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService)); | |
| 818 | + patientManagerQueryModel.setHusbandAddressRegister(CommonsHelper.getResidence(patients.getHprovinceRegisterId(), patients.getHcityRegisterId(), patients.getHareaRegisterId(), patients.getHstreetRegisterId(), patients.getHaddressRegister(), basicConfigService)); | |
| 819 | + patientManagerQueryModelList.add(patientManagerQueryModel); | |
| 820 | + } | |
| 821 | + } | |
| 822 | + | |
| 823 | + patientManagerResult.setPageInfo(patientsQuery.getPageInfo()); | |
| 824 | + patientManagerResult.setData(patientManagerQueryModelList); | |
| 825 | + patientManagerResult.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 826 | + patientManagerResult.setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION); | |
| 827 | + return patientManagerResult; | |
| 752 | 828 | } |
| 753 | 829 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PremaritalCheckupFacade.java
View file @
b93bf0f
| ... | ... | @@ -3,7 +3,6 @@ |
| 3 | 3 | import com.lyms.platform.biz.service.BasicConfigService; |
| 4 | 4 | import com.lyms.platform.biz.service.PremaritalCheckupService; |
| 5 | 5 | import com.lyms.platform.biz.service.ResidentsArchiveService; |
| 6 | -import com.lyms.platform.common.base.PageInfo; | |
| 7 | 6 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 8 | 7 | import com.lyms.platform.common.enums.MedicalAdviceEnum; |
| 9 | 8 | import com.lyms.platform.common.enums.PhysiologyStatusEnum; |
| ... | ... | @@ -30,7 +29,6 @@ |
| 30 | 29 | import org.apache.commons.collections.CollectionUtils; |
| 31 | 30 | import org.apache.commons.lang.StringUtils; |
| 32 | 31 | import org.springframework.beans.factory.annotation.Autowired; |
| 33 | -import org.springframework.data.domain.Sort; | |
| 34 | 32 | import org.springframework.stereotype.Component; |
| 35 | 33 | |
| 36 | 34 | import javax.servlet.http.HttpServletResponse; |
| ... | ... | @@ -137,8 +135,14 @@ |
| 137 | 135 | archiveMap.put("certificateTypeId", archiveModel.getCertificateTypeId()); |
| 138 | 136 | archiveMap.put("username", archiveModel.getUsername()); |
| 139 | 137 | archiveMap.put("age", archiveModel.getAge()); |
| 140 | - archiveMap.put("sex", archiveModel.getSex()); | |
| 141 | - archiveMap.put("birthday", getBirthday(archiveModel.getBirthday())); | |
| 138 | + if (archiveModel.getSex()!=null){ | |
| 139 | + if (archiveModel.getSex().equals(SystemConfig.WOMAN_ID)){ | |
| 140 | + archiveMap.put("sex", "女"); | |
| 141 | + }else if (archiveModel.getSex().equals(SystemConfig.MAN_ID)){ | |
| 142 | + archiveMap.put("sex", "男"); | |
| 143 | + } | |
| 144 | + } | |
| 145 | + archiveMap.put("birthday", getBirthday(archiveModel.getBirthday()!=null ? DateUtil.getyyyy_MM_dd(archiveModel.getBirthday()) : null )); | |
| 142 | 146 | archiveMap.put("phone", archiveModel.getPhone()); |
| 143 | 147 | archiveMap.put("residence", CommonsHelper.getResidence(archiveModel.getProvinceRegisterId(), archiveModel.getCityRegisterId(), |
| 144 | 148 | archiveModel.getAreaRegisterId(), archiveModel.getStreetRegisterId(), archiveModel.getAddressRegister(), basicConfigService)); |
| ... | ... | @@ -175,7 +179,13 @@ |
| 175 | 179 | checkupResult.setParentId(result.getId()); |
| 176 | 180 | checkupResult.setPremaritalUpTime(DateUtil.getyyyy_MM_dd(result.getPremaritalUpTime())); |
| 177 | 181 | checkupResult.setPublishId(result.getPublishId()); |
| 178 | - checkupResult.setHospitalId(result.getHospitalId()); | |
| 182 | + //查询的时候,返回医院的名称 | |
| 183 | + if (result.getHospitalId()!=null){ | |
| 184 | + Organization organization = organizationService.getOrganization(Integer.valueOf(result.getHospitalId())); | |
| 185 | + if (organization!=null && organization.getYn()==YnEnums.YES.getId()){ | |
| 186 | + checkupResult.setHospitalId(organization.getName()); | |
| 187 | + } | |
| 188 | + } | |
| 179 | 189 | checkupResult.setCertificateNum(result.getCertificateNum()); |
| 180 | 190 | checkupResult.setCertificateTypeId(result.getCertificateTypeId()); |
| 181 | 191 | checkupResult.setVcCardNo(result.getVcCardNo()); |
| 182 | 192 | |
| ... | ... | @@ -266,9 +276,16 @@ |
| 266 | 276 | checkupResult.setHouJieDetails(result.getHouJieDetails()); |
| 267 | 277 | checkupResult.setRuXianNvXingHua(result.getRuXianNvXingHua()); |
| 268 | 278 | checkupResult.setRuXianNvXingHuaDetails(result.getRuXianNvXingHuaDetails()); |
| 279 | + | |
| 269 | 280 | checkupResult.setGcWaiYin(result.getGcWaiYin()); |
| 270 | 281 | checkupResult.setGcFenMiWu(result.getGcFenMiWu()); |
| 271 | 282 | checkupResult.setGcZiGong(result.getGcZiGong()); |
| 283 | + checkupResult.setGcFuJian(result.getGcFuJian()); | |
| 284 | + | |
| 285 | + checkupResult.setWaiYin(result.getWaiYin()); | |
| 286 | + checkupResult.setYinDao(result.getYinDao()); | |
| 287 | + checkupResult.setGongJing(result.getGongJing()); | |
| 288 | + checkupResult.setZiGong(result.getZiGong()); | |
| 272 | 289 | checkupResult.setFuJian(result.getFuJian()); |
| 273 | 290 | checkupResult.setYinDaoQiTa(result.getYinDaoQiTa()); |
| 274 | 291 | |
| ... | ... | @@ -329,6 +346,7 @@ |
| 329 | 346 | /** |
| 330 | 347 | * 婚前检查管理 |
| 331 | 348 | * @param request |
| 349 | + * @param userId | |
| 332 | 350 | * @return |
| 333 | 351 | */ |
| 334 | 352 | public BaseListResponse queryPremaritalCheckup(PremaritalCheckupQueryRequest request,Integer userId) { |
| ... | ... | @@ -678,7 +696,36 @@ |
| 678 | 696 | return id; |
| 679 | 697 | } |
| 680 | 698 | |
| 681 | - //婚前检查导出 | |
| 699 | + /** | |
| 700 | + * 删除一条婚前检查记录 | |
| 701 | + * @param id | |
| 702 | + * @param userId | |
| 703 | + * @return | |
| 704 | + */ | |
| 705 | + public BaseResponse deletePremaritalCheckup(String id,Integer userId){ | |
| 706 | + BaseResponse br = new BaseResponse(); | |
| 707 | + if (StringUtils.isEmpty(id)){ | |
| 708 | + br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); | |
| 709 | + br.setErrormsg("id为空"); | |
| 710 | + return br; | |
| 711 | + } | |
| 712 | + | |
| 713 | + PremaritalCheckup premaritalCheckup = premaritalCheckupService.getPremaritalCheckup(id); | |
| 714 | + if (premaritalCheckup!=null){ | |
| 715 | + premaritalCheckup.setYn(YnEnums.NO.getId()); | |
| 716 | + premaritalCheckup.setModified(new Date()); | |
| 717 | + premaritalCheckupService.updatePremaritalCheckup(premaritalCheckup,id); | |
| 718 | + } | |
| 719 | + return br.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 720 | + } | |
| 721 | + | |
| 722 | + | |
| 723 | + /** | |
| 724 | + * 婚前检查导出 | |
| 725 | + * @param request | |
| 726 | + * @param userId | |
| 727 | + * @param response | |
| 728 | + */ | |
| 682 | 729 | public void premaritalCheckupExport(PremaritalCheckupQueryRequest request,Integer userId, |
| 683 | 730 | HttpServletResponse response){ |
| 684 | 731 | OutputStream out = null; |
| ... | ... | @@ -767,8 +814,8 @@ |
| 767 | 814 | if (archiveModel!=null && archiveModel.getYn()==YnEnums.YES.getId()){ |
| 768 | 815 | username = archiveModel.getUsername(); |
| 769 | 816 | phone = archiveModel.getPhone(); |
| 770 | - if (StringUtils.isNotEmpty(archiveModel.getBirthday())){ | |
| 771 | - age = DateUtil.getAge(DateUtil.parseYMD(archiveModel.getBirthday())); | |
| 817 | + if (archiveModel.getBirthday()!=null){ | |
| 818 | + age = DateUtil.getAge(archiveModel.getBirthday()); | |
| 772 | 819 | } |
| 773 | 820 | } |
| 774 | 821 | } |
| ... | ... | @@ -1130,8 +1177,8 @@ |
| 1130 | 1177 | if (archiveModel!=null && archiveModel.getYn()==YnEnums.YES.getId()){ |
| 1131 | 1178 | username = archiveModel.getUsername(); |
| 1132 | 1179 | phone = archiveModel.getPhone(); |
| 1133 | - if (StringUtils.isNotEmpty(archiveModel.getBirthday())){ | |
| 1134 | - age = DateUtil.getAge(DateUtil.parseYMD(archiveModel.getBirthday())); | |
| 1180 | + if (archiveModel.getBirthday()!=null){ | |
| 1181 | + age = DateUtil.getAge(archiveModel.getBirthday()); | |
| 1135 | 1182 | } |
| 1136 | 1183 | } |
| 1137 | 1184 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
View file @
b93bf0f
| ... | ... | @@ -148,11 +148,18 @@ |
| 148 | 148 | } |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | + ResidentsArchiveModel newModel = null; | |
| 152 | + | |
| 151 | 153 | //历史建档记录 |
| 152 | 154 | List<Map> list = new ArrayList<>(); |
| 153 | 155 | List<ResidentsArchiveHistoryResult> resultList = new ArrayList<>(); |
| 154 | 156 | if (CollectionUtils.isNotEmpty(residents)){ |
| 157 | + | |
| 158 | + //如果该身份证号或者就诊卡号已经在某家医院建档,拉取最新的一条建档记录返回给前端 | |
| 159 | + newModel = residents.get(0); | |
| 160 | + | |
| 155 | 161 | for (ResidentsArchiveModel data : residents){ |
| 162 | + | |
| 156 | 163 | ResidentsArchiveHistoryResult result = new ResidentsArchiveHistoryResult(); |
| 157 | 164 | //查询医院机构 |
| 158 | 165 | if (StringUtils.isNotEmpty(data.getHospitalId())){ |
| 159 | 166 | |
| ... | ... | @@ -162,11 +169,12 @@ |
| 162 | 169 | result.setHospitalId(String.valueOf(org.getId())); |
| 163 | 170 | } |
| 164 | 171 | } |
| 165 | - result.setBookBuildDate(data.getBuildDay()); | |
| 172 | + result.setBookBuildDate(DateUtil.getyyyy_MM_dd(data.getBuildDay())); | |
| 166 | 173 | result.setId(data.getId()); |
| 167 | 174 | resultList.add(result); |
| 168 | 175 | } |
| 169 | 176 | } |
| 177 | + | |
| 170 | 178 | //性别 |
| 171 | 179 | List<BasicConfigResult> sexResults = basicConfigFacade.getBaseicConfigByParentId(SystemConfig.SEX_ID); |
| 172 | 180 | typeMap.put("sex", sexResults); |
| ... | ... | @@ -208,6 +216,7 @@ |
| 208 | 216 | |
| 209 | 217 | //历史建档记录 |
| 210 | 218 | Map<String,Object> mapData = new HashMap<>(); |
| 219 | + mapData.put("firstBuildData",newModel); | |
| 211 | 220 | mapData.put("archiveHistory",resultList); |
| 212 | 221 | mapData.put("initBuildDate", DateUtil.getyyyy_MM_dd(new Date())); |
| 213 | 222 | list.add(mapData); |
| ... | ... | @@ -428,7 +437,7 @@ |
| 428 | 437 | temp.setHospitalId(String.valueOf(org.getId())); |
| 429 | 438 | } |
| 430 | 439 | } |
| 431 | - temp.setBookBuildDate(archiveModel.getBuildDay()); | |
| 440 | + temp.setBookBuildDate(DateUtil.getyyyy_MM_dd(archiveModel.getBuildDay())); | |
| 432 | 441 | temp.setId(archiveModel.getId()); |
| 433 | 442 | historyResults.add(temp); |
| 434 | 443 | } |
| ... | ... | @@ -449,7 +458,7 @@ |
| 449 | 458 | result.setId(model.getId()); |
| 450 | 459 | result.setUsername(model.getUsername()); |
| 451 | 460 | result.setSex(model.getSex()); |
| 452 | - result.setBirthday(model.getBirthday()); | |
| 461 | + result.setBirthday(DateUtil.getyyyy_MM_dd(model.getBirthday())); | |
| 453 | 462 | result.setCountryId(model.getCountryId()); |
| 454 | 463 | result.setNationId(model.getNationId()); |
| 455 | 464 | result.setMarriageId(model.getMarriageId()); |
| ... | ... | @@ -483,7 +492,7 @@ |
| 483 | 492 | |
| 484 | 493 | result.setVcCardNo(model.getVcCardNo()); |
| 485 | 494 | result.setBuildDoctor(model.getBuildDoctor()); |
| 486 | - result.setBuildDay(model.getBuildDay()); | |
| 495 | + result.setBuildDay(DateUtil.getyyyy_MM_dd(model.getBuildDay())); | |
| 487 | 496 | |
| 488 | 497 | result.setCreated(model.getCreated()); |
| 489 | 498 | result.setModified(model.getModified()); |
| ... | ... | @@ -537,7 +546,7 @@ |
| 537 | 546 | map.put("id",model.getId()); |
| 538 | 547 | map.put("username",model.getUsername()); |
| 539 | 548 | map.put("certificateNum",model.getCertificateNum()); |
| 540 | - map.put("age",DateUtil.getAge(DateUtil.parseYMD(model.getBirthday()))); | |
| 549 | + map.put("age",DateUtil.getAge(model.getBirthday())); | |
| 541 | 550 | map.put("residence", CommonsHelper.getResidence(model.getProvinceId(), model.getCityId(), model.getAreaId(), model.getStreetId(), model.getAddress(), basicConfigService)); |
| 542 | 551 | map.put("isCheckup",queryPremaritalCheckup(model.getId(), model.getHospitalId())); |
| 543 | 552 | map.put("phone", FunvCommonUtil.getXingPhone(model.getPhone())); |
| 544 | 553 | |
| ... | ... | @@ -609,16 +618,16 @@ |
| 609 | 618 | Map<String,Object> map = new HashMap<>(); |
| 610 | 619 | map.put("username",data.getUsername()); |
| 611 | 620 | map.put("sex","女"); |
| 612 | - map.put("birthday",getBirthday(data.getBirthday())); | |
| 613 | - map.put("countryId",getBaseicConfigByid(data.getCountryId())); | |
| 614 | - map.put("nationId",getBaseicConfigByid(data.getNationId())); | |
| 615 | - map.put("marriageId",getBaseicConfigByid(data.getMarriageId())); | |
| 616 | - map.put("certificateTypeId",getBaseicConfigByid(data.getCertificateTypeId())); | |
| 621 | + map.put("birthday", FunvCommonUtil.getBirthday(DateUtil.getyyyy_MM_dd(data.getBirthday()))); | |
| 622 | + map.put("countryId",FunvCommonUtil.getBaseicConfigByid(data.getCountryId(), basicConfigService)); | |
| 623 | + map.put("nationId",FunvCommonUtil.getBaseicConfigByid(data.getNationId(), basicConfigService)); | |
| 624 | + map.put("marriageId",FunvCommonUtil.getBaseicConfigByid(data.getMarriageId(), basicConfigService)); | |
| 625 | + map.put("certificateTypeId",FunvCommonUtil.getBaseicConfigByid(data.getCertificateTypeId(), basicConfigService)); | |
| 617 | 626 | map.put("certificateNum",data.getCertificateNum()); |
| 618 | - map.put("censusTypeId",getBaseicConfigByid(data.getCensusTypeId())); | |
| 619 | - map.put("liveTypeId",getBaseicConfigByid(data.getLiveTypeId())); | |
| 620 | - map.put("levelTypeId",getBaseicConfigByid(data.getLevelTypeId())); | |
| 621 | - map.put("professionTypeId", getBaseicConfigByid(data.getProfessionTypeId())); | |
| 627 | + map.put("censusTypeId",FunvCommonUtil.getBaseicConfigByid(data.getCensusTypeId(), basicConfigService)); | |
| 628 | + map.put("liveTypeId",FunvCommonUtil.getBaseicConfigByid(data.getLiveTypeId(), basicConfigService)); | |
| 629 | + map.put("levelTypeId",FunvCommonUtil.getBaseicConfigByid(data.getLevelTypeId(), basicConfigService)); | |
| 630 | + map.put("professionTypeId", FunvCommonUtil.getBaseicConfigByid(data.getProfessionTypeId(), basicConfigService)); | |
| 622 | 631 | if (StringUtils.isNotEmpty(data.getHospitalId())){ |
| 623 | 632 | Organization organization = organizationService.getOrganization(Integer.valueOf(data.getHospitalId())); |
| 624 | 633 | if (organization != null && organization.getYn()==YnEnums.YES.getId()){ |
| ... | ... | @@ -644,7 +653,7 @@ |
| 644 | 653 | map.put("vcCardNo", data.getVcCardNo()); |
| 645 | 654 | |
| 646 | 655 | map.put("buildDoctor", data.getBuildDoctor()); |
| 647 | - map.put("buildDay", data.getBuildDay()); | |
| 656 | + map.put("buildDay", DateUtil.getyyyy_MM_dd(data.getBuildDay())); | |
| 648 | 657 | list.add(map); |
| 649 | 658 | } |
| 650 | 659 | } |
| ... | ... | @@ -685,29 +694,6 @@ |
| 685 | 694 | } |
| 686 | 695 | } |
| 687 | 696 | |
| 688 | - //获取生日 | |
| 689 | - public String getBirthday(String b){ | |
| 690 | - if (b!=null){ | |
| 691 | - String year = b.substring(0,4); | |
| 692 | - String mouth = b.substring(5,7); | |
| 693 | - String day = b.substring(8,10); | |
| 694 | - return year + "年" + mouth + "月" + day + "日"; | |
| 695 | - } | |
| 696 | - return null; | |
| 697 | - } | |
| 698 | - | |
| 699 | - //获取基础基础名称 | |
| 700 | - public String getBaseicConfigByid(String id) { | |
| 701 | - | |
| 702 | - if (StringUtils.isNotEmpty(id)){ | |
| 703 | - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(id); | |
| 704 | - if (basicConfig!=null && basicConfig.getYn()!=YnEnums.NO.getId()){ | |
| 705 | - return basicConfig.getName(); | |
| 706 | - } | |
| 707 | - } | |
| 708 | - return ""; | |
| 709 | - } | |
| 710 | - | |
| 711 | 697 | /** |
| 712 | 698 | * 发送妇女指导短信 |
| 713 | 699 | * @param request |
| ... | ... | @@ -786,6 +772,24 @@ |
| 786 | 772 | } |
| 787 | 773 | } |
| 788 | 774 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 775 | + } | |
| 776 | + | |
| 777 | + | |
| 778 | + public BaseResponse deleteArchive(String id,Integer userId){ | |
| 779 | + BaseResponse br = new BaseResponse(); | |
| 780 | + if (StringUtils.isEmpty(id)){ | |
| 781 | + br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); | |
| 782 | + br.setErrormsg("id为空"); | |
| 783 | + return br; | |
| 784 | + } | |
| 785 | + | |
| 786 | + ResidentsArchiveModel resident = residentsArchiveService.getResident(id); | |
| 787 | + if (resident!=null){ | |
| 788 | + resident.setYn(YnEnums.NO.getId()); | |
| 789 | + resident.setModified(new Date()); | |
| 790 | + residentsArchiveService.updateResident(resident,id); | |
| 791 | + } | |
| 792 | + return br.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 789 | 793 | } |
| 790 | 794 | |
| 791 | 795 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsFacade.java
View file @
b93bf0f
| 1 | +package com.lyms.platform.operate.web.facade; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.service.*; | |
| 4 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 5 | +import com.lyms.platform.common.enums.YnEnums; | |
| 6 | +import com.lyms.platform.common.result.BaseListResponse; | |
| 7 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
| 8 | +import com.lyms.platform.common.result.BaseResponse; | |
| 9 | +import com.lyms.platform.common.utils.DateUtil; | |
| 10 | +import com.lyms.platform.common.utils.ExcelUtil; | |
| 11 | +import com.lyms.platform.common.utils.SystemConfig; | |
| 12 | +import com.lyms.platform.operate.web.request.ResidentsArchiveQueryRequest; | |
| 13 | +import com.lyms.platform.operate.web.utils.CommonsHelper; | |
| 14 | +import com.lyms.platform.operate.web.utils.FunvCommonUtil; | |
| 15 | +import com.lyms.platform.permission.model.Organization; | |
| 16 | +import com.lyms.platform.permission.model.OrganizationQuery; | |
| 17 | +import com.lyms.platform.permission.service.OrganizationService; | |
| 18 | +import com.lyms.platform.pojo.AntExChuModel; | |
| 19 | +import com.lyms.platform.pojo.DataPermissionsModel; | |
| 20 | +import com.lyms.platform.pojo.Patients; | |
| 21 | +import com.lyms.platform.pojo.ResidentsArchiveModel; | |
| 22 | +import com.lyms.platform.query.AntExChuQuery; | |
| 23 | +import com.lyms.platform.query.DataPermissionsModelQuery; | |
| 24 | +import com.lyms.platform.query.PatientsQuery; | |
| 25 | +import com.lyms.platform.query.ResidentsArchiveQuery; | |
| 26 | +import org.apache.commons.collections.CollectionUtils; | |
| 27 | +import org.apache.commons.lang.StringUtils; | |
| 28 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 29 | +import org.springframework.stereotype.Component; | |
| 30 | + | |
| 31 | +import javax.servlet.http.HttpServletResponse; | |
| 32 | +import java.io.OutputStream; | |
| 33 | +import java.util.*; | |
| 34 | + | |
| 35 | +/** | |
| 36 | + * Created by Administrator on 2016/12/20 0020. | |
| 37 | + */ | |
| 38 | +@Component | |
| 39 | +public class ResidentsFacade { | |
| 40 | + | |
| 41 | + @Autowired | |
| 42 | + private OrganizationService organizationService; | |
| 43 | + @Autowired | |
| 44 | + private AutoMatchFacade autoMatchFacade; | |
| 45 | + @Autowired | |
| 46 | + private DataPermissionService dataPermissionService; | |
| 47 | + @Autowired | |
| 48 | + private ResidentsArchiveService residentsArchiveService; | |
| 49 | + @Autowired | |
| 50 | + private BasicConfigService basicConfigService; | |
| 51 | + @Autowired | |
| 52 | + private PatientsService patientsService; | |
| 53 | + @Autowired | |
| 54 | + private AntenatalExaminationService antenatalExaminationService; | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * 妇女健康档案管理 | |
| 60 | + * | |
| 61 | + * @param request | |
| 62 | + * @param userId | |
| 63 | + * @return | |
| 64 | + */ | |
| 65 | + public BaseResponse queryResidentsArchives(ResidentsArchiveQueryRequest request,Integer userId){ | |
| 66 | + | |
| 67 | + /* | |
| 68 | + 记录孕次,用查询出来的妇女身份证,去patients表中查询是否建档,如果已经建档,孕次返回默认1,如果有初诊记录,返回初诊中的孕次, | |
| 69 | + 如果没有建档,返回 "-" | |
| 70 | + */ | |
| 71 | + ResidentsArchiveQuery query = new ResidentsArchiveQuery(); | |
| 72 | + query.setPage(request.getPage()); | |
| 73 | + query.setLimit(request.getLimit()); | |
| 74 | + query.setNeed("y"); | |
| 75 | + query.setYn(YnEnums.YES.getId()); | |
| 76 | + query.setSex(SystemConfig.WOMAN_ID); | |
| 77 | + | |
| 78 | + //出生日期范围查询 | |
| 79 | + if(StringUtils.isNotEmpty(request.getBirthday())){ | |
| 80 | + String[] dates = request.getBirthday().split(" - "); | |
| 81 | + query.setBirthdayStart(DateUtil.parseYMD(dates[0])); | |
| 82 | + if(dates.length>=2){ | |
| 83 | + Date date= DateUtil.parseYMD(dates[1]); | |
| 84 | + if(null!=date){ | |
| 85 | + long d = date.getTime() + 86398000; | |
| 86 | + date = new Date(d); | |
| 87 | + } | |
| 88 | + query.setBirthdayEnd(date); | |
| 89 | + } | |
| 90 | + } | |
| 91 | + | |
| 92 | + //年龄范围查询 | |
| 93 | + if (StringUtils.isNotEmpty(request.getAge())){ | |
| 94 | + String[] ages = request.getAge().split(" - "); | |
| 95 | + query.setAgeMin(Integer.parseInt(ages[0])); | |
| 96 | + if (ages.length>=2){ | |
| 97 | + Integer ageMax = Integer.parseInt(ages[1]); | |
| 98 | + query.setAgeMax(ageMax); | |
| 99 | + } | |
| 100 | + } | |
| 101 | + | |
| 102 | + //户籍地 | |
| 103 | + query.setProvinceRegisterId(request.getProvinceRegisterId()); | |
| 104 | + query.setCityRegisterId(request.getCityRegisterId()); | |
| 105 | + query.setAreaRegisterId(request.getAreaRegisterId()); | |
| 106 | + | |
| 107 | + //居住地 | |
| 108 | + query.setProvinceId(request.getProvinceId()); | |
| 109 | + query.setCityId(request.getCityId()); | |
| 110 | + query.setAreaId(request.getAreaId()); | |
| 111 | + | |
| 112 | + List<Map<String,Object>> list = new ArrayList<>(); | |
| 113 | + | |
| 114 | + List<Organization> organizationList = null; | |
| 115 | + //建档机构 | |
| 116 | + | |
| 117 | + List<String> hospitalList = null; | |
| 118 | + if (userId!=null){ | |
| 119 | + hospitalList = new ArrayList<>(); | |
| 120 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
| 121 | + if(null!=hospital){ | |
| 122 | + //当前用户本院 | |
| 123 | + hospitalList.add(hospital); | |
| 124 | + } | |
| 125 | + | |
| 126 | + //查询用户是否有区域权限 | |
| 127 | + DataPermissionsModelQuery dataPermissionsModelQuery = new DataPermissionsModelQuery(); | |
| 128 | + dataPermissionsModelQuery.setUserId(userId); | |
| 129 | + List<DataPermissionsModel> permissionsModels = dataPermissionService.queryPermission(dataPermissionsModelQuery); | |
| 130 | + if (CollectionUtils.isNotEmpty(permissionsModels)) { | |
| 131 | + Set<String> set = permissionsModels.get(0).getData().keySet(); | |
| 132 | + Iterator<String> it = set.iterator(); | |
| 133 | + while (it.hasNext()) { | |
| 134 | + String id = it.next(); | |
| 135 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(id) && !hospitalList.contains(id)) { | |
| 136 | + hospitalList.add(id); | |
| 137 | + } | |
| 138 | + } | |
| 139 | + } | |
| 140 | + | |
| 141 | + //指定医院 | |
| 142 | + if (StringUtils.isNotEmpty(request.getHospitalId())){ | |
| 143 | + List<String> orgId = new ArrayList<>(); | |
| 144 | + orgId.add(request.getHospitalId()); | |
| 145 | + hospitalList.retainAll(orgId); | |
| 146 | + } | |
| 147 | + | |
| 148 | + //省市区筛选机构 | |
| 149 | + if (StringUtils.isNotEmpty(request.getBuildProvinceId()) || StringUtils.isNotEmpty(request.getBuildCityId()) || | |
| 150 | + StringUtils.isNotEmpty(request.getBuildAreaId())){ | |
| 151 | + OrganizationQuery organizationQuery = new OrganizationQuery(); | |
| 152 | + organizationQuery.setYn(YnEnums.YES.getId()); | |
| 153 | + organizationQuery.setProvinceId(request.getBuildProvinceId()); | |
| 154 | + organizationQuery.setCityId(request.getBuildCityId()); | |
| 155 | + organizationQuery.setAreaId(request.getBuildAreaId()); | |
| 156 | + organizationList = new ArrayList<>(); | |
| 157 | + organizationList = organizationService.queryHospitals(organizationQuery); | |
| 158 | + } | |
| 159 | + if (organizationList!=null){ | |
| 160 | + List<String> orgId = new ArrayList<>(); | |
| 161 | + if (CollectionUtils.isNotEmpty(organizationList)) { | |
| 162 | + for (Organization org : organizationList) { | |
| 163 | + if (null != org.getId()) { | |
| 164 | + orgId.add(org.getId() + ""); | |
| 165 | + } | |
| 166 | + } | |
| 167 | + } | |
| 168 | + hospitalList.retainAll(orgId); | |
| 169 | + } | |
| 170 | + | |
| 171 | + query.setHospitalIds(hospitalList); | |
| 172 | + } | |
| 173 | + | |
| 174 | + List<ResidentsArchiveModel> modelList = residentsArchiveService.queryResident(query); | |
| 175 | + if (CollectionUtils.isNotEmpty(modelList)){ | |
| 176 | + for (ResidentsArchiveModel model : modelList){ | |
| 177 | + Map<String,Object> map = new HashMap<>(); | |
| 178 | + map.put("username",model.getUsername()); | |
| 179 | + map.put("certificateNum",model.getCertificateNum()); | |
| 180 | + map.put("age",DateUtil.getAge(model.getBirthday())); | |
| 181 | + map.put("householdRegister", CommonsHelper.getResidence(model.getProvinceRegisterId(), model.getCityId(), | |
| 182 | + model.getAreaRegisterId(), model.getStreetRegisterId(), model.getAddressRegister(), basicConfigService)); | |
| 183 | + map.put("Residence", CommonsHelper.getResidence(model.getProvinceId(), model.getCityId(), model.getAreaId(), | |
| 184 | + model.getStreetId(), model.getAddress(), basicConfigService)); | |
| 185 | + map.put("mod",referMod(model.getHospitalId(),model.getCertificateNum())); | |
| 186 | + | |
| 187 | + String name = null; | |
| 188 | + if (StringUtils.isNotEmpty(model.getHospitalId())){ | |
| 189 | + Organization organization = organizationService.getOrganization(Integer.parseInt(model.getHospitalId())); | |
| 190 | + if (organization!=null){ | |
| 191 | + name = organization.getName(); | |
| 192 | + } | |
| 193 | + } | |
| 194 | + map.put("hospitalName",name); | |
| 195 | + map.put("id",model.getId()); | |
| 196 | + | |
| 197 | + list.add(map); | |
| 198 | + } | |
| 199 | + } | |
| 200 | + return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(list).setPageInfo(query.getPageInfo()); | |
| 201 | + } | |
| 202 | + | |
| 203 | + //查询孕次 | |
| 204 | + public String referMod(String hospitalId,String cardNo){ | |
| 205 | + | |
| 206 | + if (StringUtils.isEmpty(hospitalId) || StringUtils.isEmpty(cardNo)){ | |
| 207 | + return ""; | |
| 208 | + } | |
| 209 | + | |
| 210 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 211 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 212 | + patientsQuery.setHospitalId(hospitalId); | |
| 213 | + patientsQuery.setCardNo(cardNo); | |
| 214 | + List<Patients> patientsList = patientsService.queryPatient1(patientsQuery, "created"); | |
| 215 | + | |
| 216 | + Patients patients = null; | |
| 217 | + | |
| 218 | + if (CollectionUtils.isNotEmpty(patientsList)){ | |
| 219 | + patients = new Patients(); | |
| 220 | + patients = patientsList.get(0); | |
| 221 | + } | |
| 222 | + | |
| 223 | + //如果没有在patients中,直接返回 - | |
| 224 | + if (patients==null){ | |
| 225 | + return "-"; | |
| 226 | + } | |
| 227 | + | |
| 228 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 229 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
| 230 | + antExChuQuery.setHospitalId(patients.getHospitalId()); | |
| 231 | + antExChuQuery.setParentId(patients.getId()); | |
| 232 | + List<AntExChuModel> antExChuModelList = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
| 233 | + | |
| 234 | + AntExChuModel antExChuModel = null; | |
| 235 | + | |
| 236 | + if (CollectionUtils.isNotEmpty(antExChuModelList)){ | |
| 237 | + antExChuModel = new AntExChuModel(); | |
| 238 | + antExChuModel = antExChuModelList.get(0); | |
| 239 | + } | |
| 240 | + | |
| 241 | + String num = "1"; | |
| 242 | + //已经建档,但没有做初诊,默认返回 1 | |
| 243 | + if (antExChuModel==null){ | |
| 244 | + return num; | |
| 245 | + } | |
| 246 | + if (antExChuModel.getPregnancyTimes()!=null){ | |
| 247 | + num = String.valueOf(antExChuModel.getPregnancyTimes()); | |
| 248 | + } | |
| 249 | + return num; | |
| 250 | + } | |
| 251 | + | |
| 252 | + //数据导出接口 | |
| 253 | + public void regionaResidentsExport(ResidentsArchiveQueryRequest request,Integer userId,HttpServletResponse response){ | |
| 254 | + | |
| 255 | + OutputStream out = null; | |
| 256 | + | |
| 257 | + try { | |
| 258 | + ResidentsArchiveQuery query = new ResidentsArchiveQuery(); | |
| 259 | + query.setPage(request.getPage()); | |
| 260 | + query.setLimit(request.getLimit()); | |
| 261 | + query.setNeed("y"); | |
| 262 | + query.setYn(YnEnums.YES.getId()); | |
| 263 | + //只查女性 | |
| 264 | + query.setSex(SystemConfig.WOMAN_ID); | |
| 265 | + //出生日期范围查询 | |
| 266 | + if(StringUtils.isNotEmpty(request.getBirthday())){ | |
| 267 | + String[] dates = request.getBirthday().split(" - "); | |
| 268 | + query.setBirthdayStart(DateUtil.parseYMD(dates[0])); | |
| 269 | + if(dates.length>=2){ | |
| 270 | + Date date= DateUtil.parseYMD(dates[1]); | |
| 271 | + if(null!=date){ | |
| 272 | + long d = date.getTime() + 86398000; | |
| 273 | + date = new Date(d); | |
| 274 | + } | |
| 275 | + query.setBirthdayEnd(date); | |
| 276 | + } | |
| 277 | + } | |
| 278 | + //年龄范围查询 | |
| 279 | + if (StringUtils.isNotEmpty(request.getAge())){ | |
| 280 | + String[] ages = request.getAge().split(" - "); | |
| 281 | + query.setAgeMin(Integer.parseInt(ages[0])); | |
| 282 | + if (ages.length>=2){ | |
| 283 | + Integer ageMax = Integer.parseInt(ages[1]); | |
| 284 | + query.setAgeMax(ageMax); | |
| 285 | + } | |
| 286 | + } | |
| 287 | + //户籍地 | |
| 288 | + query.setProvinceRegisterId(request.getProvinceRegisterId()); | |
| 289 | + query.setCityRegisterId(request.getCityRegisterId()); | |
| 290 | + query.setAreaRegisterId(request.getAreaRegisterId()); | |
| 291 | + //居住地 | |
| 292 | + query.setProvinceId(request.getProvinceId()); | |
| 293 | + query.setCityId(request.getCityId()); | |
| 294 | + query.setAreaId(request.getAreaId()); | |
| 295 | + | |
| 296 | + List<Organization> organizationList = null; | |
| 297 | + | |
| 298 | + //建档机构 | |
| 299 | + List<String> hospitalList = null; | |
| 300 | + if (userId!=null){ | |
| 301 | + hospitalList = new ArrayList<>(); | |
| 302 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
| 303 | + if(null!=hospital){ | |
| 304 | + //当前用户本院 | |
| 305 | + hospitalList.add(hospital); | |
| 306 | + } | |
| 307 | + //查询用户是否有区域权限 | |
| 308 | + DataPermissionsModelQuery dataPermissionsModelQuery = new DataPermissionsModelQuery(); | |
| 309 | + dataPermissionsModelQuery.setUserId(userId); | |
| 310 | + List<DataPermissionsModel> permissionsModels = dataPermissionService.queryPermission(dataPermissionsModelQuery); | |
| 311 | + if (CollectionUtils.isNotEmpty(permissionsModels)) { | |
| 312 | + Set<String> set = permissionsModels.get(0).getData().keySet(); | |
| 313 | + Iterator<String> it = set.iterator(); | |
| 314 | + while (it.hasNext()) { | |
| 315 | + String id = it.next(); | |
| 316 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(id) && !hospitalList.contains(id)) { | |
| 317 | + hospitalList.add(id); | |
| 318 | + } | |
| 319 | + } | |
| 320 | + } | |
| 321 | + //指定医院 | |
| 322 | + if (StringUtils.isNotEmpty(request.getHospitalId())){ | |
| 323 | + List<String> orgId = new ArrayList<>(); | |
| 324 | + orgId.add(request.getHospitalId()); | |
| 325 | + hospitalList.retainAll(orgId); | |
| 326 | + } | |
| 327 | + //省市区筛选机构 | |
| 328 | + if (StringUtils.isNotEmpty(request.getBuildProvinceId()) || StringUtils.isNotEmpty(request.getBuildCityId()) || | |
| 329 | + StringUtils.isNotEmpty(request.getBuildAreaId())){ | |
| 330 | + OrganizationQuery organizationQuery = new OrganizationQuery(); | |
| 331 | + organizationQuery.setYn(YnEnums.YES.getId()); | |
| 332 | + organizationQuery.setProvinceId(request.getBuildProvinceId()); | |
| 333 | + organizationQuery.setCityId(request.getBuildCityId()); | |
| 334 | + organizationQuery.setAreaId(request.getBuildAreaId()); | |
| 335 | + organizationList = new ArrayList<>(); | |
| 336 | + organizationList = organizationService.queryHospitals(organizationQuery); | |
| 337 | + } | |
| 338 | + if (organizationList!=null){ | |
| 339 | + List<String> orgId = new ArrayList<>(); | |
| 340 | + if (CollectionUtils.isNotEmpty(organizationList)) { | |
| 341 | + for (Organization org : organizationList) { | |
| 342 | + if (null != org.getId()) { | |
| 343 | + orgId.add(org.getId() + ""); | |
| 344 | + } | |
| 345 | + } | |
| 346 | + } | |
| 347 | + hospitalList.retainAll(orgId); | |
| 348 | + } | |
| 349 | + query.setHospitalIds(hospitalList); | |
| 350 | + } | |
| 351 | + | |
| 352 | + List<Map<String,Object>> list = new ArrayList<>(); | |
| 353 | + | |
| 354 | + List<ResidentsArchiveModel> archiveModelList = residentsArchiveService.queryResident(query); | |
| 355 | + if (CollectionUtils.isNotEmpty(archiveModelList)){ | |
| 356 | + for (ResidentsArchiveModel data : archiveModelList){ | |
| 357 | + Map<String,Object> map = new HashMap<>(); | |
| 358 | + map.put("username",data.getUsername()); | |
| 359 | + map.put("sex","女"); | |
| 360 | + map.put("birthday", FunvCommonUtil.getBirthday(DateUtil.getyyyy_MM_dd(data.getBirthday()))); | |
| 361 | + map.put("countryId",FunvCommonUtil.getBaseicConfigByid(data.getCountryId(),basicConfigService)); | |
| 362 | + map.put("nationId",FunvCommonUtil.getBaseicConfigByid(data.getNationId(),basicConfigService)); | |
| 363 | + map.put("marriageId",FunvCommonUtil.getBaseicConfigByid(data.getMarriageId(),basicConfigService)); | |
| 364 | + map.put("certificateTypeId",FunvCommonUtil.getBaseicConfigByid(data.getCertificateTypeId(),basicConfigService)); | |
| 365 | + map.put("certificateNum",data.getCertificateNum()); | |
| 366 | + map.put("censusTypeId",FunvCommonUtil.getBaseicConfigByid(data.getCensusTypeId(),basicConfigService)); | |
| 367 | + map.put("liveTypeId",FunvCommonUtil.getBaseicConfigByid(data.getLiveTypeId(),basicConfigService)); | |
| 368 | + map.put("levelTypeId",FunvCommonUtil.getBaseicConfigByid(data.getLevelTypeId(),basicConfigService)); | |
| 369 | + map.put("professionTypeId", FunvCommonUtil.getBaseicConfigByid(data.getProfessionTypeId(),basicConfigService)); | |
| 370 | + if (StringUtils.isNotEmpty(data.getHospitalId())){ | |
| 371 | + Organization organization = organizationService.getOrganization(Integer.valueOf(data.getHospitalId())); | |
| 372 | + if (organization != null && organization.getYn()==YnEnums.YES.getId()){ | |
| 373 | + map.put("hospital", organization.getName()); | |
| 374 | + } | |
| 375 | + } | |
| 376 | + map.put("age",data.getAge()); | |
| 377 | + map.put("phone",data.getPhone()); | |
| 378 | + map.put("workUnit",data.getWorkUnit()); | |
| 379 | + map.put("residence",CommonsHelper.getResidence(data.getProvinceId(), data.getCityId(), | |
| 380 | + data.getAreaId(), data.getStreetId(), data.getAddress(), basicConfigService)); | |
| 381 | + map.put("residenceRegister",CommonsHelper.getResidence(data.getProvinceRegisterId(), data.getCityRegisterId(), | |
| 382 | + data.getAreaRegisterId(), data.getStreetRegisterId(), | |
| 383 | + data.getAddressRegister(), basicConfigService)); | |
| 384 | + | |
| 385 | + //病史 | |
| 386 | + | |
| 387 | + map.put("vcCardNo", data.getVcCardNo()); | |
| 388 | + map.put("buildDoctor", data.getBuildDoctor()); | |
| 389 | + map.put("buildDay", DateUtil.getyyyy_MM_dd(data.getBuildDay())); | |
| 390 | + //孕次 | |
| 391 | + map.put("mod",referMod(data.getHospitalId(),data.getCertificateNum())); | |
| 392 | + list.add(map); | |
| 393 | + } | |
| 394 | + } | |
| 395 | + out = response.getOutputStream(); | |
| 396 | + Map<String, String> cnames = new LinkedHashMap<>(); | |
| 397 | + cnames.put("username","姓名"); | |
| 398 | + cnames.put("sex","性别"); | |
| 399 | + cnames.put("birthday","出生日期"); | |
| 400 | + cnames.put("countryId","国籍"); | |
| 401 | + cnames.put("nationId","民族"); | |
| 402 | + cnames.put("marriageId","婚姻状况"); | |
| 403 | + cnames.put("certificateTypeId","证件类型"); | |
| 404 | + cnames.put("certificateNum","证件号"); | |
| 405 | + cnames.put("censusTypeId","户籍类型"); | |
| 406 | + cnames.put("liveTypeId","居住类别"); | |
| 407 | + cnames.put("levelTypeId","文化程度"); | |
| 408 | + cnames.put("professionTypeId","职业类别"); | |
| 409 | + cnames.put("hospital","建档医院"); | |
| 410 | + cnames.put("age","年龄"); | |
| 411 | + cnames.put("phone","联系方式"); | |
| 412 | + cnames.put("workUnit","工作单位"); | |
| 413 | + cnames.put("residence","居住地"); | |
| 414 | + cnames.put("residenceRegister","户籍地址"); | |
| 415 | + /*cnames.put("pastHistory","既往史"); | |
| 416 | + cnames.put("familyHistory","家族史"); | |
| 417 | + cnames.put("personalHistory","个人史"); | |
| 418 | + cnames.put("ywgmHistory","药物过敏史"); | |
| 419 | + cnames.put("presentHistory","现病史");*/ | |
| 420 | + cnames.put("vcCardNo","就诊卡号"); | |
| 421 | + cnames.put("buildDoctor","建档人"); | |
| 422 | + cnames.put("buildDay","建档日期"); | |
| 423 | + cnames.put("mod","记录孕次"); | |
| 424 | + response.setContentType("application/octet-stream"); | |
| 425 | + response.setHeader("Content-Disposition", "attachment;fileName=" + "qyfy.xls"); | |
| 426 | + ExcelUtil.toExcel(out, list, cnames); | |
| 427 | + }catch (Exception e){ | |
| 428 | + e.printStackTrace(); | |
| 429 | + } | |
| 430 | + | |
| 431 | + } | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyBookbuildingAddRequest.java
View file @
b93bf0f
| ... | ... | @@ -166,6 +166,17 @@ |
| 166 | 166 | //儿童诊断 |
| 167 | 167 | private String babyDiagnosis; |
| 168 | 168 | |
| 169 | + //病历号(住院号) | |
| 170 | + private String blNo; | |
| 171 | + | |
| 172 | + public String getBlNo() { | |
| 173 | + return blNo; | |
| 174 | + } | |
| 175 | + | |
| 176 | + public void setBlNo(String blNo) { | |
| 177 | + this.blNo = blNo; | |
| 178 | + } | |
| 179 | + | |
| 169 | 180 | public String getBabyDiagnosis() { |
| 170 | 181 | return babyDiagnosis; |
| 171 | 182 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyCheckRequest.java
View file @
b93bf0f
| ... | ... | @@ -70,6 +70,13 @@ |
| 70 | 70 | //头围 |
| 71 | 71 | private String head; |
| 72 | 72 | |
| 73 | + //体重评价 | |
| 74 | + private String weightEvaluate; | |
| 75 | + //身长评价 | |
| 76 | + private String heightEvaluate; | |
| 77 | + //头围评价 | |
| 78 | + private String headEvaluate; | |
| 79 | + | |
| 73 | 80 | //胸围 |
| 74 | 81 | private String chestw; |
| 75 | 82 | |
| ... | ... | @@ -221,6 +228,30 @@ |
| 221 | 228 | private String checkDate; |
| 222 | 229 | |
| 223 | 230 | private String monthAge; |
| 231 | + | |
| 232 | + public String getWeightEvaluate() { | |
| 233 | + return weightEvaluate; | |
| 234 | + } | |
| 235 | + | |
| 236 | + public void setWeightEvaluate(String weightEvaluate) { | |
| 237 | + this.weightEvaluate = weightEvaluate; | |
| 238 | + } | |
| 239 | + | |
| 240 | + public String getHeightEvaluate() { | |
| 241 | + return heightEvaluate; | |
| 242 | + } | |
| 243 | + | |
| 244 | + public void setHeightEvaluate(String heightEvaluate) { | |
| 245 | + this.heightEvaluate = heightEvaluate; | |
| 246 | + } | |
| 247 | + | |
| 248 | + public String getHeadEvaluate() { | |
| 249 | + return headEvaluate; | |
| 250 | + } | |
| 251 | + | |
| 252 | + public void setHeadEvaluate(String headEvaluate) { | |
| 253 | + this.headEvaluate = headEvaluate; | |
| 254 | + } | |
| 224 | 255 | |
| 225 | 256 | public String getMonthAge() { |
| 226 | 257 | return monthAge; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java
View file @
b93bf0f
| ... | ... | @@ -9,27 +9,13 @@ |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * @auther HuJiaqi |
| 12 | - * @createTime 2016年12月07日 14时13分 | |
| 13 | - * @discription 产妇姓名 | |
| 12 | + * @createTime 2016年12月19日 16时02分 | |
| 13 | + * @discription 查询号 | |
| 14 | 14 | */ |
| 15 | - private String userName; | |
| 15 | + private String queryNo; | |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * @auther HuJiaqi |
| 19 | - * @createTime 2016年12月07日 14时13分 | |
| 20 | - * @discription 证件号 | |
| 21 | - */ | |
| 22 | - private String cardNo; | |
| 23 | - | |
| 24 | - /** | |
| 25 | - * @auther HuJiaqi | |
| 26 | - * @createTime 2016年12月07日 14时13分 | |
| 27 | - * @discription 联系方式 | |
| 28 | - */ | |
| 29 | - private String phone; | |
| 30 | - | |
| 31 | - /** | |
| 32 | - * @auther HuJiaqi | |
| 33 | 19 | * @createTime 2016年12月13日 17时13分 |
| 34 | 20 | * @discription 分娩日期 |
| 35 | 21 | */ |
| ... | ... | @@ -40,7 +26,7 @@ |
| 40 | 26 | * @createTime 2016年12月07日 14时14分 |
| 41 | 27 | * @discription 分娩方式 |
| 42 | 28 | */ |
| 43 | - private String DeliveryMode; | |
| 29 | + private String deliveryMode; | |
| 44 | 30 | |
| 45 | 31 | /** |
| 46 | 32 | * @auther HuJiaqi |
| 47 | 33 | |
| 48 | 34 | |
| 49 | 35 | |
| 50 | 36 | |
| 51 | 37 | |
| 52 | 38 | |
| ... | ... | @@ -51,30 +37,136 @@ |
| 51 | 37 | |
| 52 | 38 | // TODO 高帆说条码号暂时先不管 |
| 53 | 39 | |
| 54 | - private Integer operatorId; | |
| 40 | + /** | |
| 41 | + * @auther HuJiaqi | |
| 42 | + * @createTime 2016年12月21日 10时41分 | |
| 43 | + * @discription 是否区域 | |
| 44 | + */ | |
| 45 | + private String isArea; | |
| 55 | 46 | |
| 56 | - public String getUserName() { | |
| 57 | - return userName; | |
| 58 | - } | |
| 47 | + /** | |
| 48 | + * @auther HuJiaqi | |
| 49 | + * @createTime 2016年12月21日 10时56分 | |
| 50 | + * @discription 户籍地省 | |
| 51 | + */ | |
| 52 | + private String registerProvinceId; | |
| 59 | 53 | |
| 60 | - public void setUserName(String userName) { | |
| 61 | - this.userName = userName; | |
| 62 | - } | |
| 54 | + /** | |
| 55 | + * @auther HuJiaqi | |
| 56 | + * @createTime 2016年12月21日 10时56分 | |
| 57 | + * @discription 户籍地市 | |
| 58 | + */ | |
| 59 | + private String registerCityId; | |
| 63 | 60 | |
| 64 | - public String getCardNo() { | |
| 65 | - return cardNo; | |
| 61 | + /** | |
| 62 | + * @auther HuJiaqi | |
| 63 | + * @createTime 2016年12月21日 10时56分 | |
| 64 | + * @discription 户籍地区县 | |
| 65 | + */ | |
| 66 | + private String registerAreaId; | |
| 67 | + | |
| 68 | + /** | |
| 69 | + * @auther HuJiaqi | |
| 70 | + * @createTime 2016年12月21日 10时56分 | |
| 71 | + * @discription 居住地省 | |
| 72 | + */ | |
| 73 | + private String livingProvinceId; | |
| 74 | + | |
| 75 | + /** | |
| 76 | + * @auther HuJiaqi | |
| 77 | + * @createTime 2016年12月21日 10时56分 | |
| 78 | + * @discription 居住地市 | |
| 79 | + */ | |
| 80 | + private String livingCityId; | |
| 81 | + | |
| 82 | + /** | |
| 83 | + * @auther HuJiaqi | |
| 84 | + * @createTime 2016年12月21日 10时56分 | |
| 85 | + * @discription 居住地区县 | |
| 86 | + */ | |
| 87 | + private String livingAreaId; | |
| 88 | + | |
| 89 | + /** | |
| 90 | + * @auther HuJiaqi | |
| 91 | + * @createTime 2016年12月21日 10时56分 | |
| 92 | + * @discription 分娩医院省 | |
| 93 | + */ | |
| 94 | + private String hospitalProvinceId; | |
| 95 | + | |
| 96 | + /** | |
| 97 | + * @auther HuJiaqi | |
| 98 | + * @createTime 2016年12月21日 10时56分 | |
| 99 | + * @discription 分娩医院市 | |
| 100 | + */ | |
| 101 | + private String hospitalCityId; | |
| 102 | + | |
| 103 | + /** | |
| 104 | + * @auther HuJiaqi | |
| 105 | + * @createTime 2016年12月21日 10时56分 | |
| 106 | + * @discription 分娩医院区县 | |
| 107 | + */ | |
| 108 | + private String hospitalAreaId; | |
| 109 | + | |
| 110 | + /** | |
| 111 | + * @auther HuJiaqi | |
| 112 | + * @createTime 2016年12月21日 10时56分 | |
| 113 | + * @discription 分娩医院id | |
| 114 | + */ | |
| 115 | + private String hospitalId; | |
| 116 | + | |
| 117 | + /** | |
| 118 | + * @auther HuJiaqi | |
| 119 | + * @createTime 2016年12月21日 10时56分 | |
| 120 | + * @discription 分娩年龄start | |
| 121 | + */ | |
| 122 | + private String startAge; | |
| 123 | + | |
| 124 | + /** | |
| 125 | + * @auther HuJiaqi | |
| 126 | + * @createTime 2016年12月21日 10时56分 | |
| 127 | + * @discription 分娩年龄end | |
| 128 | + */ | |
| 129 | + private String endAge; | |
| 130 | + | |
| 131 | + /** | |
| 132 | + * @auther HuJiaqi | |
| 133 | + * @createTime 2016年12月21日 10时56分 | |
| 134 | + * @discription 分娩孕周start | |
| 135 | + */ | |
| 136 | + private String startDueWeek; | |
| 137 | + | |
| 138 | + /** | |
| 139 | + * @auther HuJiaqi | |
| 140 | + * @createTime 2016年12月21日 10时56分 | |
| 141 | + * @discription 分娩孕周end | |
| 142 | + */ | |
| 143 | + private String endDueWeek; | |
| 144 | + | |
| 145 | + /** | |
| 146 | + * @auther HuJiaqi | |
| 147 | + * @createTime 2016年12月21日 10时41分 | |
| 148 | + * @discription 自定义查询 | |
| 149 | + */ | |
| 150 | + private String initQuery; | |
| 151 | + | |
| 152 | + private boolean isExcel; | |
| 153 | + | |
| 154 | + private Integer operatorId; | |
| 155 | + | |
| 156 | + public boolean isExcel() { | |
| 157 | + return isExcel; | |
| 66 | 158 | } |
| 67 | 159 | |
| 68 | - public void setCardNo(String cardNo) { | |
| 69 | - this.cardNo = cardNo; | |
| 160 | + public void setExcel(boolean excel) { | |
| 161 | + isExcel = excel; | |
| 70 | 162 | } |
| 71 | 163 | |
| 72 | - public String getPhone() { | |
| 73 | - return phone; | |
| 164 | + public String getQueryNo() { | |
| 165 | + return queryNo; | |
| 74 | 166 | } |
| 75 | 167 | |
| 76 | - public void setPhone(String phone) { | |
| 77 | - this.phone = phone; | |
| 168 | + public void setQueryNo(String queryNo) { | |
| 169 | + this.queryNo = queryNo; | |
| 78 | 170 | } |
| 79 | 171 | |
| 80 | 172 | public String getBirthDate() { |
| 81 | 173 | |
| 82 | 174 | |
| 83 | 175 | |
| ... | ... | @@ -86,27 +178,155 @@ |
| 86 | 178 | } |
| 87 | 179 | |
| 88 | 180 | public String getDeliveryMode() { |
| 89 | - return DeliveryMode; | |
| 181 | + return deliveryMode; | |
| 90 | 182 | } |
| 91 | 183 | |
| 92 | 184 | public void setDeliveryMode(String deliveryMode) { |
| 93 | - DeliveryMode = deliveryMode; | |
| 185 | + this.deliveryMode = deliveryMode; | |
| 94 | 186 | } |
| 95 | 187 | |
| 96 | - public Integer getOperatorId() { | |
| 97 | - return operatorId; | |
| 98 | - } | |
| 99 | - | |
| 100 | - public void setOperatorId(Integer operatorId) { | |
| 101 | - this.operatorId = operatorId; | |
| 102 | - } | |
| 103 | - | |
| 104 | 188 | public String getHusbandPhone() { |
| 105 | 189 | return husbandPhone; |
| 106 | 190 | } |
| 107 | 191 | |
| 108 | 192 | public void setHusbandPhone(String husbandPhone) { |
| 109 | 193 | this.husbandPhone = husbandPhone; |
| 194 | + } | |
| 195 | + | |
| 196 | + public String getIsArea() { | |
| 197 | + return isArea; | |
| 198 | + } | |
| 199 | + | |
| 200 | + public void setIsArea(String isArea) { | |
| 201 | + this.isArea = isArea; | |
| 202 | + } | |
| 203 | + | |
| 204 | + public String getRegisterProvinceId() { | |
| 205 | + return registerProvinceId; | |
| 206 | + } | |
| 207 | + | |
| 208 | + public void setRegisterProvinceId(String registerProvinceId) { | |
| 209 | + this.registerProvinceId = registerProvinceId; | |
| 210 | + } | |
| 211 | + | |
| 212 | + public String getRegisterCityId() { | |
| 213 | + return registerCityId; | |
| 214 | + } | |
| 215 | + | |
| 216 | + public void setRegisterCityId(String registerCityId) { | |
| 217 | + this.registerCityId = registerCityId; | |
| 218 | + } | |
| 219 | + | |
| 220 | + public String getRegisterAreaId() { | |
| 221 | + return registerAreaId; | |
| 222 | + } | |
| 223 | + | |
| 224 | + public void setRegisterAreaId(String registerAreaId) { | |
| 225 | + this.registerAreaId = registerAreaId; | |
| 226 | + } | |
| 227 | + | |
| 228 | + public String getLivingProvinceId() { | |
| 229 | + return livingProvinceId; | |
| 230 | + } | |
| 231 | + | |
| 232 | + public void setLivingProvinceId(String livingProvinceId) { | |
| 233 | + this.livingProvinceId = livingProvinceId; | |
| 234 | + } | |
| 235 | + | |
| 236 | + public String getLivingCityId() { | |
| 237 | + return livingCityId; | |
| 238 | + } | |
| 239 | + | |
| 240 | + public void setLivingCityId(String livingCityId) { | |
| 241 | + this.livingCityId = livingCityId; | |
| 242 | + } | |
| 243 | + | |
| 244 | + public String getLivingAreaId() { | |
| 245 | + return livingAreaId; | |
| 246 | + } | |
| 247 | + | |
| 248 | + public void setLivingAreaId(String livingAreaId) { | |
| 249 | + this.livingAreaId = livingAreaId; | |
| 250 | + } | |
| 251 | + | |
| 252 | + public String getHospitalProvinceId() { | |
| 253 | + return hospitalProvinceId; | |
| 254 | + } | |
| 255 | + | |
| 256 | + public void setHospitalProvinceId(String hospitalProvinceId) { | |
| 257 | + this.hospitalProvinceId = hospitalProvinceId; | |
| 258 | + } | |
| 259 | + | |
| 260 | + public String getHospitalCityId() { | |
| 261 | + return hospitalCityId; | |
| 262 | + } | |
| 263 | + | |
| 264 | + public void setHospitalCityId(String hospitalCityId) { | |
| 265 | + this.hospitalCityId = hospitalCityId; | |
| 266 | + } | |
| 267 | + | |
| 268 | + public String getHospitalAreaId() { | |
| 269 | + return hospitalAreaId; | |
| 270 | + } | |
| 271 | + | |
| 272 | + public void setHospitalAreaId(String hospitalAreaId) { | |
| 273 | + this.hospitalAreaId = hospitalAreaId; | |
| 274 | + } | |
| 275 | + | |
| 276 | + public String getHospitalId() { | |
| 277 | + return hospitalId; | |
| 278 | + } | |
| 279 | + | |
| 280 | + public void setHospitalId(String hospitalId) { | |
| 281 | + this.hospitalId = hospitalId; | |
| 282 | + } | |
| 283 | + | |
| 284 | + public String getStartAge() { | |
| 285 | + return startAge; | |
| 286 | + } | |
| 287 | + | |
| 288 | + public void setStartAge(String startAge) { | |
| 289 | + this.startAge = startAge; | |
| 290 | + } | |
| 291 | + | |
| 292 | + public String getEndAge() { | |
| 293 | + return endAge; | |
| 294 | + } | |
| 295 | + | |
| 296 | + public void setEndAge(String endAge) { | |
| 297 | + this.endAge = endAge; | |
| 298 | + } | |
| 299 | + | |
| 300 | + public String getStartDueWeek() { | |
| 301 | + return startDueWeek; | |
| 302 | + } | |
| 303 | + | |
| 304 | + public void setStartDueWeek(String startDueWeek) { | |
| 305 | + this.startDueWeek = startDueWeek; | |
| 306 | + } | |
| 307 | + | |
| 308 | + public String getEndDueWeek() { | |
| 309 | + return endDueWeek; | |
| 310 | + } | |
| 311 | + | |
| 312 | + public void setEndDueWeek(String endDueWeek) { | |
| 313 | + this.endDueWeek = endDueWeek; | |
| 314 | + } | |
| 315 | + | |
| 316 | + public String getInitQuery() { | |
| 317 | + return initQuery; | |
| 318 | + } | |
| 319 | + | |
| 320 | + public void setInitQuery(String initQuery) { | |
| 321 | + this.initQuery = initQuery; | |
| 322 | + } | |
| 323 | + | |
| 324 | + public Integer getOperatorId() { | |
| 325 | + return operatorId; | |
| 326 | + } | |
| 327 | + | |
| 328 | + public void setOperatorId(Integer operatorId) { | |
| 329 | + this.operatorId = operatorId; | |
| 110 | 330 | } |
| 111 | 331 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/NewBabyManagerRequest.java
View file @
b93bf0f
| ... | ... | @@ -28,9 +28,19 @@ |
| 28 | 28 | */ |
| 29 | 29 | private String dueType; |
| 30 | 30 | |
| 31 | + private boolean isExcel; | |
| 32 | + | |
| 31 | 33 | // TODO 条码号暂时不管 |
| 32 | 34 | |
| 33 | 35 | private Integer operatorId; |
| 36 | + | |
| 37 | + public boolean isExcel() { | |
| 38 | + return isExcel; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setExcel(boolean excel) { | |
| 42 | + isExcel = excel; | |
| 43 | + } | |
| 34 | 44 | |
| 35 | 45 | public String getQueryNo() { |
| 36 | 46 | return queryNo; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientManagerRequest.java
View file @
b93bf0f
| 1 | +package com.lyms.platform.operate.web.request; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * @auther HuJiaqi | |
| 5 | + * @createTime 2016年12月20日 14时33分 | |
| 6 | + * @discription | |
| 7 | + */ | |
| 8 | +public class PatientManagerRequest extends BasePageQueryRequest { | |
| 9 | + | |
| 10 | + private Integer operatorId; | |
| 11 | + | |
| 12 | + /** | |
| 13 | + * @auther HuJiaqi | |
| 14 | + * @createTime 2016年12月20日 14时59分 | |
| 15 | + * @discription 户口所在地省id | |
| 16 | + */ | |
| 17 | + private String provinceRegisterId; | |
| 18 | + | |
| 19 | + /** | |
| 20 | + * @auther HuJiaqi | |
| 21 | + * @createTime 2016年12月20日 14时59分 | |
| 22 | + * @discription 户口所在地市id | |
| 23 | + */ | |
| 24 | + private String cityRegisterId; | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * @auther HuJiaqi | |
| 28 | + * @createTime 2016年12月20日 14时59分 | |
| 29 | + * @discription 户口所在地区县id | |
| 30 | + */ | |
| 31 | + private String areaRegisterId; | |
| 32 | + | |
| 33 | + // 居住地 | |
| 34 | + private String provinceId; | |
| 35 | + private String cityId; | |
| 36 | + private String areaId; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * @auther HuJiaqi | |
| 40 | + * @createTime 2016年12月22日 11时12分 | |
| 41 | + * @discription 建档医生 | |
| 42 | + */ | |
| 43 | + private String bookbuildingDoctor; | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * @auther HuJiaqi | |
| 47 | + * @createTime 2016年12月20日 14时59分 | |
| 48 | + * @discription 建档日期 | |
| 49 | + */ | |
| 50 | + private String bookBuildingDate; | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * @auther HuJiaqi | |
| 54 | + * @createTime 2016年12月20日 14时59分 | |
| 55 | + * @discription 查询号 | |
| 56 | + */ | |
| 57 | + private String queryNo; | |
| 58 | + | |
| 59 | + // 条码号暂时不管 | |
| 60 | + | |
| 61 | + public String getProvinceRegisterId() { | |
| 62 | + return provinceRegisterId; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void setProvinceRegisterId(String provinceRegisterId) { | |
| 66 | + this.provinceRegisterId = provinceRegisterId; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public String getCityRegisterId() { | |
| 70 | + return cityRegisterId; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public void setCityRegisterId(String cityRegisterId) { | |
| 74 | + this.cityRegisterId = cityRegisterId; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public String getAreaRegisterId() { | |
| 78 | + return areaRegisterId; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public void setAreaRegisterId(String areaRegisterId) { | |
| 82 | + this.areaRegisterId = areaRegisterId; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public String getBookBuildingDate() { | |
| 86 | + return bookBuildingDate; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public void setBookBuildingDate(String bookBuildingDate) { | |
| 90 | + this.bookBuildingDate = bookBuildingDate; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public String getProvinceId() { | |
| 94 | + return provinceId; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public void setProvinceId(String provinceId) { | |
| 98 | + this.provinceId = provinceId; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public String getCityId() { | |
| 102 | + return cityId; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public void setCityId(String cityId) { | |
| 106 | + this.cityId = cityId; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public String getAreaId() { | |
| 110 | + return areaId; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public void setAreaId(String areaId) { | |
| 114 | + this.areaId = areaId; | |
| 115 | + } | |
| 116 | + | |
| 117 | + public String getBookbuildingDoctor() { | |
| 118 | + return bookbuildingDoctor; | |
| 119 | + } | |
| 120 | + | |
| 121 | + public void setBookbuildingDoctor(String bookbuildingDoctor) { | |
| 122 | + this.bookbuildingDoctor = bookbuildingDoctor; | |
| 123 | + } | |
| 124 | + | |
| 125 | + public String getQueryNo() { | |
| 126 | + return queryNo; | |
| 127 | + } | |
| 128 | + | |
| 129 | + public void setQueryNo(String queryNo) { | |
| 130 | + this.queryNo = queryNo; | |
| 131 | + } | |
| 132 | + | |
| 133 | + public Integer getOperatorId() { | |
| 134 | + return operatorId; | |
| 135 | + } | |
| 136 | + | |
| 137 | + public void setOperatorId(Integer operatorId) { | |
| 138 | + this.operatorId = operatorId; | |
| 139 | + } | |
| 140 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ResidentsArchiveAddRequest.java
View file @
b93bf0f
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | import com.lyms.platform.common.base.IBasicRequestConvert; |
| 4 | 4 | import com.lyms.platform.common.core.annotation.form.Form; |
| 5 | 5 | import com.lyms.platform.common.core.annotation.form.FormParam; |
| 6 | +import com.lyms.platform.common.utils.DateUtil; | |
| 6 | 7 | import com.lyms.platform.common.utils.JsonUtil; |
| 7 | 8 | import com.lyms.platform.pojo.ResidentsArchiveModel; |
| 8 | 9 | import org.hibernate.validator.constraints.NotEmpty; |
| ... | ... | @@ -99,7 +100,7 @@ |
| 99 | 100 | model.setId(id); |
| 100 | 101 | model.setUsername(username); |
| 101 | 102 | model.setSex(sex); |
| 102 | - model.setBirthday(birthday); | |
| 103 | + model.setBirthday((birthday != null && birthday != "") ? DateUtil.parseYMD(birthday) : null); | |
| 103 | 104 | model.setCountryId(countryId); |
| 104 | 105 | model.setNationId(nationId); |
| 105 | 106 | model.setMarriageId(marriageId); |
| ... | ... | @@ -142,7 +143,7 @@ |
| 142 | 143 | } |
| 143 | 144 | model.setVcCardNo(vcCardNo); |
| 144 | 145 | model.setBuildDoctor(buildDoctor); |
| 145 | - model.setBuildDay(buildDay); | |
| 146 | + model.setBuildDay((buildDay!=null && buildDay!="") ? DateUtil.parseYMD(buildDay) : null); | |
| 146 | 147 | return model; |
| 147 | 148 | } |
| 148 | 149 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ResidentsArchiveQueryRequest.java
View file @
b93bf0f
| ... | ... | @@ -17,18 +17,97 @@ |
| 17 | 17 | private String certificateTypeId; |
| 18 | 18 | //就诊卡号 |
| 19 | 19 | private String vcCardNo; |
| 20 | + //姓名 | |
| 21 | + private String username; | |
| 22 | + //联系方式 | |
| 23 | + private String phone; | |
| 24 | + | |
| 25 | + /* 建档医院 */ | |
| 26 | + private String buildProvinceId; | |
| 27 | + private String buildCityId; | |
| 28 | + private String buildAreaId; | |
| 20 | 29 | //医院ID |
| 21 | 30 | private String hospitalId; |
| 31 | + /* 居住地省市区 */ | |
| 22 | 32 | //省 |
| 23 | 33 | private String provinceId; |
| 24 | 34 | //市 |
| 25 | 35 | private String cityId; |
| 26 | 36 | //区县 |
| 27 | 37 | private String areaId; |
| 28 | - //姓名 | |
| 29 | - private String username; | |
| 30 | - //联系方式 | |
| 31 | - private String phone; | |
| 38 | + /* 户籍地址省市区 */ | |
| 39 | + private String provinceRegisterId; | |
| 40 | + private String cityRegisterId; | |
| 41 | + private String areaRegisterId; | |
| 42 | + | |
| 43 | + //年龄(如: 24 - 26) | |
| 44 | + private String age; | |
| 45 | + //出生日期(范围值 1991-01-01 - 1994-02-02 ) | |
| 46 | + private String birthday; | |
| 47 | + | |
| 48 | + public String getBuildProvinceId() { | |
| 49 | + return buildProvinceId; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public void setBuildProvinceId(String buildProvinceId) { | |
| 53 | + this.buildProvinceId = buildProvinceId; | |
| 54 | + } | |
| 55 | + | |
| 56 | + public String getBuildCityId() { | |
| 57 | + return buildCityId; | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void setBuildCityId(String buildCityId) { | |
| 61 | + this.buildCityId = buildCityId; | |
| 62 | + } | |
| 63 | + | |
| 64 | + public String getBuildAreaId() { | |
| 65 | + return buildAreaId; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setBuildAreaId(String buildAreaId) { | |
| 69 | + this.buildAreaId = buildAreaId; | |
| 70 | + } | |
| 71 | + | |
| 72 | + public String getProvinceRegisterId() { | |
| 73 | + return provinceRegisterId; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public void setProvinceRegisterId(String provinceRegisterId) { | |
| 77 | + this.provinceRegisterId = provinceRegisterId; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public String getCityRegisterId() { | |
| 81 | + return cityRegisterId; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public void setCityRegisterId(String cityRegisterId) { | |
| 85 | + this.cityRegisterId = cityRegisterId; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public String getAreaRegisterId() { | |
| 89 | + return areaRegisterId; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public void setAreaRegisterId(String areaRegisterId) { | |
| 93 | + this.areaRegisterId = areaRegisterId; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public String getAge() { | |
| 97 | + return age; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public void setAge(String age) { | |
| 101 | + this.age = age; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public String getBirthday() { | |
| 105 | + return birthday; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public void setBirthday(String birthday) { | |
| 109 | + this.birthday = birthday; | |
| 110 | + } | |
| 32 | 111 | |
| 33 | 112 | public String getCertificateTypeId() { |
| 34 | 113 | return certificateTypeId; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyBuildResult.java
View file @
b93bf0f
| ... | ... | @@ -137,6 +137,18 @@ |
| 137 | 137 | //儿童诊断 |
| 138 | 138 | private String babyDiagnosis; |
| 139 | 139 | |
| 140 | + | |
| 141 | + //病历号(住院号) | |
| 142 | + private String blNo; | |
| 143 | + | |
| 144 | + public String getBlNo() { | |
| 145 | + return blNo; | |
| 146 | + } | |
| 147 | + | |
| 148 | + public void setBlNo(String blNo) { | |
| 149 | + this.blNo = blNo; | |
| 150 | + } | |
| 151 | + | |
| 140 | 152 | public String getBabyDiagnosis() { |
| 141 | 153 | return babyDiagnosis; |
| 142 | 154 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyCheckResult.java
View file @
b93bf0f
| ... | ... | @@ -209,7 +209,37 @@ |
| 209 | 209 | private String checkDate; |
| 210 | 210 | private String monthAge; |
| 211 | 211 | |
| 212 | + //体重评价 | |
| 213 | + private String weightEvaluate; | |
| 214 | + //身长评价 | |
| 215 | + private String heightEvaluate; | |
| 216 | + //头围评价 | |
| 217 | + private String headEvaluate; | |
| 212 | 218 | |
| 219 | + | |
| 220 | + public String getWeightEvaluate() { | |
| 221 | + return weightEvaluate; | |
| 222 | + } | |
| 223 | + | |
| 224 | + public void setWeightEvaluate(String weightEvaluate) { | |
| 225 | + this.weightEvaluate = weightEvaluate; | |
| 226 | + } | |
| 227 | + | |
| 228 | + public String getHeightEvaluate() { | |
| 229 | + return heightEvaluate; | |
| 230 | + } | |
| 231 | + | |
| 232 | + public void setHeightEvaluate(String heightEvaluate) { | |
| 233 | + this.heightEvaluate = heightEvaluate; | |
| 234 | + } | |
| 235 | + | |
| 236 | + public String getHeadEvaluate() { | |
| 237 | + return headEvaluate; | |
| 238 | + } | |
| 239 | + | |
| 240 | + public void setHeadEvaluate(String headEvaluate) { | |
| 241 | + this.headEvaluate = headEvaluate; | |
| 242 | + } | |
| 213 | 243 | |
| 214 | 244 | public String getMonthAge() { |
| 215 | 245 | return monthAge; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyGrowthCountResult.java
View file @
b93bf0f
| 1 | +package com.lyms.platform.operate.web.result; | |
| 2 | + | |
| 3 | +import java.util.ArrayList; | |
| 4 | +import java.util.HashMap; | |
| 5 | +import java.util.List; | |
| 6 | +import java.util.Map; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Created by lqy on 2016-12-21. | |
| 10 | + */ | |
| 11 | +public class BabyGrowthCountResult { | |
| 12 | + | |
| 13 | + //标准差 | |
| 14 | + private String bzc; | |
| 15 | + | |
| 16 | + //评价 | |
| 17 | + private String evaluate; | |
| 18 | + | |
| 19 | + //人数 | |
| 20 | + private String count; | |
| 21 | + | |
| 22 | + public String getBzc() { | |
| 23 | + return bzc; | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void setBzc(String bzc) { | |
| 27 | + this.bzc = bzc; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public String getEvaluate() { | |
| 31 | + return evaluate; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void setEvaluate(String evaluate) { | |
| 35 | + this.evaluate = evaluate; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public String getCount() { | |
| 39 | + return count; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public void setCount(String count) { | |
| 43 | + this.count = count; | |
| 44 | + } | |
| 45 | + | |
| 46 | + | |
| 47 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ChildbirthManagerQueryModel.java
View file @
b93bf0f
| ... | ... | @@ -8,6 +8,12 @@ |
| 8 | 8 | */ |
| 9 | 9 | public class ChildbirthManagerQueryModel { |
| 10 | 10 | |
| 11 | + private String maternalDeliverId; | |
| 12 | + | |
| 13 | + private String patientId; | |
| 14 | + | |
| 15 | + private String pId; | |
| 16 | + | |
| 11 | 17 | /** |
| 12 | 18 | * @auther HuJiaqi |
| 13 | 19 | * @createTime 2016年12月07日 16时36分 |
| ... | ... | @@ -20,7 +26,7 @@ |
| 20 | 26 | * @createTime 2016年12月07日 16时36分 |
| 21 | 27 | * @discription 姓名 |
| 22 | 28 | */ |
| 23 | - private String username; | |
| 29 | + private String name; | |
| 24 | 30 | |
| 25 | 31 | /** |
| 26 | 32 | * @auther HuJiaqi |
| ... | ... | @@ -85,6 +91,13 @@ |
| 85 | 91 | */ |
| 86 | 92 | private String phone; |
| 87 | 93 | |
| 94 | + /** | |
| 95 | + * @auther HuJiaqi | |
| 96 | + * @createTime 2016年12月22日 11时25分 | |
| 97 | + * @discription 居住地 | |
| 98 | + */ | |
| 99 | + private String address; | |
| 100 | + | |
| 88 | 101 | // 上面是一般查询,下面的是自定义查询 |
| 89 | 102 | |
| 90 | 103 | // 基本信息开始 |
| ... | ... | @@ -386,6 +399,30 @@ |
| 386 | 399 | // 院内信息结束 |
| 387 | 400 | |
| 388 | 401 | |
| 402 | + public String getMaternalDeliverId() { | |
| 403 | + return maternalDeliverId; | |
| 404 | + } | |
| 405 | + | |
| 406 | + public void setMaternalDeliverId(String maternalDeliverId) { | |
| 407 | + this.maternalDeliverId = maternalDeliverId; | |
| 408 | + } | |
| 409 | + | |
| 410 | + public String getPatientId() { | |
| 411 | + return patientId; | |
| 412 | + } | |
| 413 | + | |
| 414 | + public void setPatientId(String patientId) { | |
| 415 | + this.patientId = patientId; | |
| 416 | + } | |
| 417 | + | |
| 418 | + public String getpId() { | |
| 419 | + return pId; | |
| 420 | + } | |
| 421 | + | |
| 422 | + public void setpId(String pId) { | |
| 423 | + this.pId = pId; | |
| 424 | + } | |
| 425 | + | |
| 389 | 426 | public String getDueDate() { |
| 390 | 427 | return dueDate; |
| 391 | 428 | } |
| 392 | 429 | |
| ... | ... | @@ -394,12 +431,12 @@ |
| 394 | 431 | this.dueDate = dueDate; |
| 395 | 432 | } |
| 396 | 433 | |
| 397 | - public String getUsername() { | |
| 398 | - return username; | |
| 434 | + public String getName() { | |
| 435 | + return name; | |
| 399 | 436 | } |
| 400 | 437 | |
| 401 | - public void setUsername(String username) { | |
| 402 | - this.username = username; | |
| 438 | + public void setName(String name) { | |
| 439 | + this.name = name; | |
| 403 | 440 | } |
| 404 | 441 | |
| 405 | 442 | public Integer getAge() { |
| ... | ... | @@ -792,6 +829,14 @@ |
| 792 | 829 | |
| 793 | 830 | public void setFmHospital(String fmHospital) { |
| 794 | 831 | this.fmHospital = fmHospital; |
| 832 | + } | |
| 833 | + | |
| 834 | + public String getAddress() { | |
| 835 | + return address; | |
| 836 | + } | |
| 837 | + | |
| 838 | + public void setAddress(String address) { | |
| 839 | + this.address = address; | |
| 795 | 840 | } |
| 796 | 841 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java
View file @
b93bf0f
| 1 | +package com.lyms.platform.operate.web.result; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * @auther HuJiaqi | |
| 5 | + * @createTime 2016年12月20日 14时35分 | |
| 6 | + * @discription | |
| 7 | + */ | |
| 8 | +public class PatientManagerQueryModel { | |
| 9 | + | |
| 10 | + /** | |
| 11 | + * @auther HuJiaqi | |
| 12 | + * @createTime 2016年12月20日 14时42分 | |
| 13 | + * @discription 姓名 | |
| 14 | + */ | |
| 15 | + private String username; | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * @auther HuJiaqi | |
| 19 | + * @createTime 2016年12月20日 14时42分 | |
| 20 | + * @discription 年龄 | |
| 21 | + */ | |
| 22 | + private Integer age; | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * @auther HuJiaqi | |
| 26 | + * @createTime 2016年12月20日 14时42分 | |
| 27 | + * @discription 联系电话 | |
| 28 | + */ | |
| 29 | + private String phone; | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * @auther HuJiaqi | |
| 33 | + * @createTime 2016年12月20日 14时42分 | |
| 34 | + * @discription 证件号码 | |
| 35 | + */ | |
| 36 | + private String cardNo; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * @auther HuJiaqi | |
| 40 | + * @createTime 2016年12月20日 14时42分 | |
| 41 | + * @discription 户口所在地 | |
| 42 | + */ | |
| 43 | + private String addressRegister; | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * @auther HuJiaqi | |
| 47 | + * @createTime 2016年12月20日 14时42分 | |
| 48 | + * @discription 丈夫姓名 | |
| 49 | + */ | |
| 50 | + private String husbandName; | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * @auther HuJiaqi | |
| 54 | + * @createTime 2016年12月20日 14时42分 | |
| 55 | + * @discription 丈夫户口所在地 | |
| 56 | + */ | |
| 57 | + private String husbandAddressRegister; | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * @auther HuJiaqi | |
| 61 | + * @createTime 2016年12月20日 14时43分 | |
| 62 | + * @discription 建档时间 | |
| 63 | + */ | |
| 64 | + private String bookbuildingDate; | |
| 65 | + | |
| 66 | + /** | |
| 67 | + * @auther HuJiaqi | |
| 68 | + * @createTime 2016年12月20日 14时43分 | |
| 69 | + * @discription 建档医生 | |
| 70 | + */ | |
| 71 | + private String bookbuildingDoctor; | |
| 72 | + | |
| 73 | + /** | |
| 74 | + * @auther HuJiaqi | |
| 75 | + * @createTime 2016年12月20日 14时43分 | |
| 76 | + * @discription 服务类型 | |
| 77 | + */ | |
| 78 | + private String serviceType; | |
| 79 | + | |
| 80 | + public String getUsername() { | |
| 81 | + return username; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public void setUsername(String username) { | |
| 85 | + this.username = username; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public Integer getAge() { | |
| 89 | + return age; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public void setAge(Integer age) { | |
| 93 | + this.age = age; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public String getPhone() { | |
| 97 | + return phone; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public void setPhone(String phone) { | |
| 101 | + this.phone = phone; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public String getCardNo() { | |
| 105 | + return cardNo; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public void setCardNo(String cardNo) { | |
| 109 | + this.cardNo = cardNo; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public String getHusbandName() { | |
| 113 | + return husbandName; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public void setHusbandName(String husbandName) { | |
| 117 | + this.husbandName = husbandName; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public String getAddressRegister() { | |
| 121 | + return addressRegister; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public void setAddressRegister(String addressRegister) { | |
| 125 | + this.addressRegister = addressRegister; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public String getHusbandAddressRegister() { | |
| 129 | + return husbandAddressRegister; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public void setHusbandAddressRegister(String husbandAddressRegister) { | |
| 133 | + this.husbandAddressRegister = husbandAddressRegister; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public String getBookbuildingDate() { | |
| 137 | + return bookbuildingDate; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public void setBookbuildingDate(String bookbuildingDate) { | |
| 141 | + this.bookbuildingDate = bookbuildingDate; | |
| 142 | + } | |
| 143 | + | |
| 144 | + public String getBookbuildingDoctor() { | |
| 145 | + return bookbuildingDoctor; | |
| 146 | + } | |
| 147 | + | |
| 148 | + public void setBookbuildingDoctor(String bookbuildingDoctor) { | |
| 149 | + this.bookbuildingDoctor = bookbuildingDoctor; | |
| 150 | + } | |
| 151 | + | |
| 152 | + public String getServiceType() { | |
| 153 | + return serviceType; | |
| 154 | + } | |
| 155 | + | |
| 156 | + public void setServiceType(String serviceType) { | |
| 157 | + this.serviceType = serviceType; | |
| 158 | + } | |
| 159 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerResult.java
View file @
b93bf0f
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/FunvCommonUtil.java
View file @
b93bf0f
| 1 | 1 | package com.lyms.platform.operate.web.utils; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.biz.service.BasicConfigService; | |
| 4 | +import com.lyms.platform.common.enums.YnEnums; | |
| 5 | +import com.lyms.platform.pojo.BasicConfig; | |
| 3 | 6 | import org.apache.commons.lang.StringUtils; |
| 4 | 7 | |
| 8 | +import java.util.HashMap; | |
| 9 | +import java.util.Map; | |
| 10 | + | |
| 5 | 11 | /** |
| 6 | 12 | * 妇女模块公共方法 |
| 7 | 13 | * |
| ... | ... | @@ -16,7 +22,11 @@ |
| 16 | 22 | public static String YES = "是"; |
| 17 | 23 | public static String NO = "否"; |
| 18 | 24 | |
| 19 | - //返回中间四位数为*号的手机号 | |
| 25 | + /** | |
| 26 | + * 返回中间四位数为*号的手机号 | |
| 27 | + * @param phone | |
| 28 | + * @return | |
| 29 | + */ | |
| 20 | 30 | public static String getXingPhone(String phone){ |
| 21 | 31 | if (StringUtils.isNotEmpty(phone)){ |
| 22 | 32 | String a = phone.substring(0,3)+"****"+phone.substring(7,11); |
| ... | ... | @@ -74,6 +84,76 @@ |
| 74 | 84 | } |
| 75 | 85 | return ""; |
| 76 | 86 | } |
| 87 | + | |
| 88 | + /** | |
| 89 | + * 获取生日(****年**月**日) | |
| 90 | + * @param b | |
| 91 | + * @return | |
| 92 | + */ | |
| 93 | + public static String getBirthday(String b){ | |
| 94 | + if (b!=null){ | |
| 95 | + String year = b.substring(0,4); | |
| 96 | + String mouth = b.substring(5,7); | |
| 97 | + String day = b.substring(8,10); | |
| 98 | + return year + "年" + mouth + "月" + day + "日"; | |
| 99 | + } | |
| 100 | + return null; | |
| 101 | + } | |
| 102 | + | |
| 103 | + /** | |
| 104 | + * 获取基础基础名称 | |
| 105 | + * @param id 基础类型ID | |
| 106 | + * @param basicConfigService | |
| 107 | + * @return | |
| 108 | + */ | |
| 109 | + public static String getBaseicConfigByid(String id,BasicConfigService basicConfigService) { | |
| 110 | + if (StringUtils.isNotEmpty(id)){ | |
| 111 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(id); | |
| 112 | + if (basicConfig!=null && basicConfig.getYn()!= YnEnums.NO.getId()){ | |
| 113 | + return basicConfig.getName(); | |
| 114 | + } | |
| 115 | + } | |
| 116 | + return ""; | |
| 117 | + } | |
| 118 | + | |
| 119 | + private static final Map<String, String> content = new HashMap<>(); | |
| 120 | + | |
| 121 | + static { | |
| 122 | + content.put("ycxjbs", "遗传性疾病史"); | |
| 123 | + content.put("jsjbs", "精神疾病史"); | |
| 124 | + content.put("xtjx", "先天畸形"); | |
| 125 | + content.put("xtyx", "先天愚型"); | |
| 126 | + content.put("ny", "聋哑"); | |
| 127 | + content.put("mr", "盲人"); | |
| 128 | + content.put("cel", "唇腭裂"); | |
| 129 | + content.put("xyb", "血友病"); | |
| 130 | + content.put("sm", "色盲"); | |
| 131 | + content.put("npx", "牛皮癣"); | |
| 132 | + content.put("st", "双胎"); | |
| 133 | + content.put("gb", "肝病"); | |
| 134 | + content.put("jh", "结核"); | |
| 135 | + | |
| 136 | + content.put("xy", "吸烟"); | |
| 137 | + content.put("yj", "饮酒"); | |
| 138 | + content.put("fyyw", "服用药物"); | |
| 139 | + content.put("jcydyhwz", "接触有毒有害物质"); | |
| 140 | + content.put("jcfsx", "接触放射线"); | |
| 141 | + | |
| 142 | + content.put("qmsgm", "青霉素过敏"); | |
| 143 | + content.put("xfmsgm", "先锋霉素过敏"); | |
| 144 | + content.put("halywgm", "磺胺类药物过敏"); | |
| 145 | + } | |
| 146 | + | |
| 147 | + public static String findName(Map map){ | |
| 148 | + StringBuilder sb = new StringBuilder(); | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + return ""; | |
| 155 | + } | |
| 156 | + | |
| 77 | 157 | |
| 78 | 158 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/GrowthCountTask.java
View file @
b93bf0f
| 1 | +package com.lyms.platform.operate.web.utils; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.service.BabyBookbuildingService; | |
| 4 | +import com.lyms.platform.common.utils.ExceptionUtils; | |
| 5 | +import com.lyms.platform.operate.web.result.BabyGrowthCountResult; | |
| 6 | +import com.lyms.platform.query.BabyModelQuery; | |
| 7 | +import org.apache.commons.collections.CollectionUtils; | |
| 8 | + | |
| 9 | +import java.util.ArrayList; | |
| 10 | +import java.util.List; | |
| 11 | +import java.util.concurrent.*; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * Created by lqy on 2016-12-21. | |
| 15 | + */ | |
| 16 | +public class GrowthCountTask{ | |
| 17 | + | |
| 18 | + private static ExecutorService pool = Executors.newFixedThreadPool(6); | |
| 19 | + private BabyModelQuery babyQuery; | |
| 20 | + private List<BabyGrowthCountResult> growth; | |
| 21 | + private BabyBookbuildingService babyBookbuildingService; | |
| 22 | + private String type; | |
| 23 | + public GrowthCountTask(List<BabyGrowthCountResult> growth,BabyModelQuery babyQuery, | |
| 24 | + BabyBookbuildingService babyBookbuildingService,String type) | |
| 25 | + { | |
| 26 | + this.babyQuery=babyQuery; | |
| 27 | + this.growth = growth; | |
| 28 | + this.babyBookbuildingService = babyBookbuildingService; | |
| 29 | + this.type = type; | |
| 30 | + } | |
| 31 | + public List<BabyGrowthCountResult> getResults() { | |
| 32 | + List<BabyGrowthCountResult> results = new ArrayList<>(); | |
| 33 | + if (CollectionUtils.isNotEmpty(growth)) { | |
| 34 | + | |
| 35 | + int batchSize = 1; | |
| 36 | + int end = 0; | |
| 37 | + List<Future> futures = new ArrayList<>(); | |
| 38 | + for (int i = 0; i < growth.size(); i += batchSize) { | |
| 39 | + end = (end + batchSize); | |
| 40 | + if (end > growth.size()) { | |
| 41 | + end = growth.size(); | |
| 42 | + } | |
| 43 | + | |
| 44 | + final List<BabyGrowthCountResult> growths = growth.subList(i, end); | |
| 45 | + Callable c = new Callable() | |
| 46 | + { | |
| 47 | + @Override | |
| 48 | + public List<BabyGrowthCountResult> call() throws Exception { | |
| 49 | + | |
| 50 | + if (CollectionUtils.isNotEmpty(growths)) | |
| 51 | + { | |
| 52 | + for(BabyGrowthCountResult grouwth : growths) | |
| 53 | + { | |
| 54 | + if ("身长".equals(type)) | |
| 55 | + { | |
| 56 | + babyQuery.setHeightEvaluate(grouwth.getEvaluate()); | |
| 57 | + } | |
| 58 | + else if ("体重".equals(type)) | |
| 59 | + { | |
| 60 | + babyQuery.setWeightEvaluate(grouwth.getEvaluate()); | |
| 61 | + } | |
| 62 | + int count = babyBookbuildingService.queryBabyCount(babyQuery); | |
| 63 | + grouwth.setCount(String.valueOf(count)); | |
| 64 | + } | |
| 65 | + } | |
| 66 | + | |
| 67 | + return growths; | |
| 68 | + } | |
| 69 | + }; | |
| 70 | + | |
| 71 | + Future f = pool.submit(c); | |
| 72 | + futures.add(f); | |
| 73 | + } | |
| 74 | + for (Future f : futures) { | |
| 75 | + try { | |
| 76 | + results.addAll((List) f.get(30, TimeUnit.SECONDS)); | |
| 77 | + } catch (Exception e) { | |
| 78 | + ExceptionUtils.catchException(e, "baby growth count"); | |
| 79 | + } | |
| 80 | + } | |
| 81 | + } | |
| 82 | + | |
| 83 | + return results; | |
| 84 | + } | |
| 85 | +} |