Commit 20bcf4aa2b5535c99f93e0e31e5601eea1d691d5
1 parent
db34e588b9
Exists in
master
and in
3 other branches
增加权限
Showing 1 changed file with 18 additions and 18 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
20bcf4a
| ... | ... | @@ -14,15 +14,14 @@ |
| 14 | 14 | import com.lyms.platform.operate.web.result.PuerperaResult; |
| 15 | 15 | import com.lyms.platform.pojo.CommunityConfig; |
| 16 | 16 | import com.lyms.platform.pojo.Patients; |
| 17 | -import com.lyms.platform.pojo.PuerperaModel; | |
| 18 | 17 | import com.lyms.platform.query.PatientsQuery; |
| 19 | -import com.lyms.platform.query.PuerperaModelQuery; | |
| 20 | 18 | import org.apache.commons.collections.CollectionUtils; |
| 21 | 19 | import org.apache.commons.lang.StringUtils; |
| 22 | 20 | import org.springframework.beans.factory.annotation.Autowired; |
| 23 | 21 | import org.springframework.stereotype.Component; |
| 24 | 22 | |
| 25 | 23 | import java.util.ArrayList; |
| 24 | +import java.util.Date; | |
| 26 | 25 | import java.util.List; |
| 27 | 26 | |
| 28 | 27 | /** |
| 29 | 28 | |
| 30 | 29 | |
| 31 | 30 | |
| ... | ... | @@ -43,23 +42,21 @@ |
| 43 | 42 | * 修改产妇的社区 |
| 44 | 43 | * |
| 45 | 44 | * @param puerperaMatcherCommunityRequest 修改产妇社区 |
| 46 | - * | |
| 47 | 45 | * @return |
| 48 | 46 | */ |
| 49 | - public BaseResponse matchCommunity(PuerperaMatcherCommunityRequest puerperaMatcherCommunityRequest){ | |
| 47 | + public BaseResponse matchCommunity(PuerperaMatcherCommunityRequest puerperaMatcherCommunityRequest) { | |
| 50 | 48 | Patients puerperaModel = patientsService.findOnePatientById(puerperaMatcherCommunityRequest.getParentId()); |
| 51 | 49 | Assert.notNull(puerperaModel, "产妇信息不存在"); |
| 52 | 50 | puerperaModel.setCommunityId(puerperaMatcherCommunityRequest.getCommunityId()); |
| 53 | 51 | patientsService.updatePatient(puerperaModel); |
| 54 | 52 | //TODO 产妇分配了社区,需要给对应的社区提示消息 |
| 55 | - return new BaseResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 53 | + return new BaseResponse().setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 56 | 54 | } |
| 57 | 55 | |
| 58 | 56 | /** |
| 59 | 57 | * 修改产妇信息 |
| 60 | 58 | * |
| 61 | - * @param managerUpdateRequest | |
| 62 | - * 产妇信息修改请求 | |
| 59 | + * @param managerUpdateRequest 产妇信息修改请求 | |
| 63 | 60 | * @return |
| 64 | 61 | */ |
| 65 | 62 | public BaseResponse updateOnePuerperaData(PuerperaManagerUpdateRequest managerUpdateRequest) { |
| ... | ... | @@ -78,7 +75,12 @@ |
| 78 | 75 | PatientsQuery puerperaQuery = new PatientsQuery(); |
| 79 | 76 | puerperaQuery.setLimit(managerRequest.getLimit()); |
| 80 | 77 | puerperaQuery.setPage(managerRequest.getPage()); |
| 81 | - puerperaQuery.setDueDateEnd(DateUtil.parseYMD(managerRequest.getDueDateEnd())); | |
| 78 | + Date date = DateUtil.parseYMD(managerRequest.getDueDateEnd()); | |
| 79 | + if (null != date) { | |
| 80 | + long d = date.getTime() + 86398000; | |
| 81 | + date = new Date(d); | |
| 82 | + } | |
| 83 | + puerperaQuery.setDueDateEnd(date); | |
| 82 | 84 | puerperaQuery.setDueDateStart(DateUtil.parseYMD(managerRequest.getDueDateStart())); |
| 83 | 85 | puerperaQuery.setKeyword(managerRequest.getKeyword()); |
| 84 | 86 | puerperaQuery.setCommunityId(managerRequest.getCommunityId()); |
| 85 | 87 | |
| 86 | 88 | |
| ... | ... | @@ -94,15 +96,15 @@ |
| 94 | 96 | |
| 95 | 97 | for (Patients model : puerperaList) { |
| 96 | 98 | PuerperaResult result = new PuerperaResult(); |
| 97 | - String comm="未分配"; | |
| 98 | - if(StringUtils.isNotEmpty(model.getCommunityId())){ | |
| 99 | + String comm = "未分配"; | |
| 100 | + if (StringUtils.isNotEmpty(model.getCommunityId())) { | |
| 99 | 101 | CommunityConfig communityConfig = communityConfigService.queryAreaById(model.getCommunityId()); |
| 100 | - if(null!=communityConfig){ | |
| 101 | - comm= communityConfig.getName(); | |
| 102 | + if (null != communityConfig) { | |
| 103 | + comm = communityConfig.getName(); | |
| 102 | 104 | } |
| 103 | 105 | } |
| 104 | - String tips= visitFacade.getFindTips(model.getId()); | |
| 105 | - data.add(result.convertToResult(model,comm,tips)); | |
| 106 | + String tips = visitFacade.getFindTips(model.getId()); | |
| 107 | + data.add(result.convertToResult(model, comm, tips)); | |
| 106 | 108 | } |
| 107 | 109 | } |
| 108 | 110 | |
| ... | ... | @@ -112,10 +114,8 @@ |
| 112 | 114 | /** |
| 113 | 115 | * 删除一条产妇数据 |
| 114 | 116 | * |
| 115 | - * @param id | |
| 116 | - * 产妇id | |
| 117 | - * @param softDel | |
| 118 | - * 是否是软删除 <code>true/false</code> | |
| 117 | + * @param id 产妇id | |
| 118 | + * @param softDel 是否是软删除 <code>true/false</code> | |
| 119 | 119 | * @return 处理结果 |
| 120 | 120 | */ |
| 121 | 121 | public BaseResponse deleteOnePuerperaById(String id, boolean softDel) { |