Commit 87d8c869b516890bab94744d5909245e790a5b14
Exists in
master
and in
8 other branches
Merge remote-tracking branch 'origin/master'
Showing 20 changed files
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/CommunityConfigService.java
 - platform-biz-service/src/main/java/com/lyms/platform/permission/model/Users.java
 - platform-common/src/main/java/com/lyms/platform/common/constants/ErrorCodeConstants.java
 - platform-common/src/main/java/com/lyms/platform/common/utils/LoginUtil.java
 - platform-dal/src/main/java/com/lyms/platform/pojo/CommunityConfig.java
 - platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CommunityConfigController.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/OrganizationController.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ReferConfigController.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyManagerFacade.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.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/VisitFacade.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManagerQueryRequest.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BasicConfigQueryRequest.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PuerperaManagerQueryRequest.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/VisitAddRequest.java
 - platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/VisitResult.java
 - platform-operate-api/src/main/webapp/WEB-INF/web.xml
 
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/CommunityConfigService.java
View file @
87d8c86
| ... | ... | @@ -66,7 +66,7 @@ | 
| 66 | 66 | public List<CommunityConfig> queryCommunity(CommunityQuery communityQuery) { | 
| 67 | 67 | MongoCondition mongoCondition = MongoCondition.newInstance(); | 
| 68 | 68 | if(null != communityQuery.getKeyword()) { | 
| 69 | - mongoCondition.orCondition(new MongoCondition[]{new MongoCondition("name", communityQuery.getKeyword(), MongoOper.LIKE), new MongoCondition("gxxq", communityQuery.getKeyword(), MongoOper.LIKE)}); | |
| 69 | + mongoCondition.orCondition(new MongoCondition[]{new MongoCondition("name", communityQuery.getKeyword(), MongoOper.LIKE), new MongoCondition("gxxq", communityQuery.getKeyword(), MongoOper.LIKE), new MongoCondition("parentId", communityQuery.getKeyword(), MongoOper.IS), new MongoCondition("id", communityQuery.getKeyword(), MongoOper.IS)}); | |
| 70 | 70 | } | 
| 71 | 71 | |
| 72 | 72 | if(null == communityQuery.getId()) { | 
platform-biz-service/src/main/java/com/lyms/platform/permission/model/Users.java
View file @
87d8c86
platform-common/src/main/java/com/lyms/platform/common/constants/ErrorCodeConstants.java
View file @
87d8c86
platform-common/src/main/java/com/lyms/platform/common/utils/LoginUtil.java
View file @
87d8c86
| ... | ... | @@ -11,7 +11,7 @@ | 
| 11 | 11 | |
| 12 | 12 | public class LoginUtil { | 
| 13 | 13 | |
| 14 | - public static Integer register(String phone, String token, String typeId) { | |
| 14 | + public static LoginContext register(String phone, String token, String typeId) { | |
| 15 | 15 | HttpClient client = new HttpClient(); | 
| 16 | 16 | PostMethod post = new MessageUtil.UTF8PostMethod("http://passport.healthbaby.com.cn/v1/register.action"); | 
| 17 | 17 | NameValuePair[] data = { | 
| ... | ... | @@ -27,7 +27,7 @@ | 
| 27 | 27 | post.releaseConnection(); | 
| 28 | 28 | if(200 == statusCode) { | 
| 29 | 29 | LoginContext loginState = JsonUtil.str2Obj(result, LoginContext.class); | 
| 30 | - return loginState.getId(); | |
| 30 | + return loginState; | |
| 31 | 31 | } | 
| 32 | 32 | } catch (Exception e) { | 
| 33 | 33 | e.printStackTrace(); | 
platform-dal/src/main/java/com/lyms/platform/pojo/CommunityConfig.java
View file @
87d8c86
| ... | ... | @@ -13,7 +13,7 @@ | 
| 13 | 13 | private String name; | 
| 14 | 14 | private String parentId; | 
| 15 | 15 | private Integer yn; | 
| 16 | - private Integer type; //1 地名, 2 小区 | |
| 16 | + private Integer type; //1 地名, 2 社区 | |
| 17 | 17 | private CommunityConfig parent; | 
| 18 | 18 | private List<CommunityConfig> nodes; | 
| 19 | 19 | private String gxxq; //管辖小区 | 
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
87d8c86
| ... | ... | @@ -184,9 +184,9 @@ | 
| 184 | 184 | condition = condition.orCondition(new MongoCondition[]{con1,con}); | 
| 185 | 185 | } | 
| 186 | 186 | if(visitstatus!=-1){ | 
| 187 | - condition= condition.and("visitstatus", visitstatus, MongoOper.IS); | |
| 187 | + condition= condition.and("isVisit", visitstatus, MongoOper.IS); | |
| 188 | 188 | } | 
| 189 | - if(null!=communityId){ | |
| 189 | + if(null!=communityId&&!"-1".equals(communityId)){ | |
| 190 | 190 | condition= condition.and("communityId", communityId, MongoOper.IS); | 
| 191 | 191 | } | 
| 192 | 192 | if(null!=id){ | 
| ... | ... | @@ -198,6 +198,9 @@ | 
| 198 | 198 | } | 
| 199 | 199 | if(null!=phone){ | 
| 200 | 200 | condition=condition.and("phone", phone, MongoOper.IS); | 
| 201 | + } | |
| 202 | + if(null!=name){ | |
| 203 | + condition=condition.and("username", name, MongoOper.IS); | |
| 201 | 204 | } | 
| 202 | 205 | if(-1!=yn){ | 
| 203 | 206 | condition=condition.and("yn", yn, MongoOper.IS); | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CommunityConfigController.java
View file @
87d8c86
| ... | ... | @@ -5,8 +5,13 @@ | 
| 5 | 5 | import javax.validation.Valid; | 
| 6 | 6 | |
| 7 | 7 | import com.lyms.platform.biz.param.CommunityQuery; | 
| 8 | +import com.lyms.platform.biz.service.PatientsService; | |
| 8 | 9 | import com.lyms.platform.common.annotation.TokenRequired; | 
| 10 | +import com.lyms.platform.operate.web.facade.PuerperaManagerFacade; | |
| 11 | +import com.lyms.platform.operate.web.request.PuerperaManagerQueryRequest; | |
| 9 | 12 | import com.lyms.platform.operate.web.result.FrontEndResult; | 
| 13 | +import com.lyms.platform.pojo.Patients; | |
| 14 | +import com.lyms.platform.query.PatientsQuery; | |
| 10 | 15 | import org.springframework.beans.factory.annotation.Autowired; | 
| 11 | 16 | import org.springframework.stereotype.Controller; | 
| 12 | 17 | import org.springframework.web.bind.annotation.PathVariable; | 
| 13 | 18 | |
| ... | ... | @@ -31,8 +36,9 @@ | 
| 31 | 36 | public class CommunityConfigController extends RestController { | 
| 32 | 37 | @Autowired | 
| 33 | 38 | private CommunityConfigService communityConfigService; | 
| 39 | + @Autowired | |
| 40 | + private PatientsService patientsService; | |
| 34 | 41 | |
| 35 | - | |
| 36 | 42 | // //新增小区 | 
| 37 | 43 | // @RequestMapping(value = "addCommunity", method = RequestMethod.POST) | 
| 38 | 44 | // @ResponseBody | 
| ... | ... | @@ -81,7 +87,6 @@ | 
| 81 | 87 | CommunityConfig communityConfig = new CommunityConfig(); | 
| 82 | 88 | communityConfig.setId(id); | 
| 83 | 89 | communityConfig.setGxxq(""); | 
| 84 | - | |
| 85 | 90 | communityConfigService.updateArea(communityConfig); | 
| 86 | 91 | |
| 87 | 92 | return new BaseResponse() | 
| ... | ... | @@ -134,6 +139,13 @@ | 
| 134 | 139 | @ResponseBody | 
| 135 | 140 | @TokenRequired | 
| 136 | 141 | public BaseResponse deleteArea(@PathVariable String id) { | 
| 142 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 143 | + patientsQuery.setCommunityId(id); | |
| 144 | + List<Patients > q = patientsService.queryPatient(patientsQuery); | |
| 145 | + if(0 < q.size()) { | |
| 146 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.DONT_DELETE).setErrormsg("该社区下有产妇数据不能删除!"); | |
| 147 | + } | |
| 148 | + | |
| 137 | 149 | CommunityConfig communityConfig = new CommunityConfig(); | 
| 138 | 150 | communityConfig.setId(id); | 
| 139 | 151 | communityConfigService.deleteArea(communityConfig); | 
| ... | ... | @@ -170,7 +182,7 @@ | 
| 170 | 182 | if(null != communityConfig.getParentId()) { | 
| 171 | 183 | communityConfig.setParent(communityConfigService.queryAreaById(communityConfig.getParentId())); | 
| 172 | 184 | } else { | 
| 173 | - communityConfig.setParent(new CommunityConfig("0", "root")); | |
| 185 | +// communityConfig.setParent(new CommunityConfig("0", "root")); | |
| 174 | 186 | } | 
| 175 | 187 | } | 
| 176 | 188 | return FrontEndResult.ini().setData(communityConfigList).setPageInfo(communityQuery.getPageInfo()).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/OrganizationController.java
View file @
87d8c86
| ... | ... | @@ -10,10 +10,7 @@ | 
| 10 | 10 | import com.lyms.platform.common.enums.YnEnums; | 
| 11 | 11 | import com.lyms.platform.common.utils.ResultUtils; | 
| 12 | 12 | import com.lyms.platform.operate.web.result.FrontEndResult; | 
| 13 | -import com.lyms.platform.permission.model.Organization; | |
| 14 | -import com.lyms.platform.permission.model.OrganizationQuery; | |
| 15 | -import com.lyms.platform.permission.model.Regions; | |
| 16 | -import com.lyms.platform.permission.model.Users; | |
| 13 | +import com.lyms.platform.permission.model.*; | |
| 17 | 14 | import com.lyms.platform.permission.service.*; | 
| 18 | 15 | import org.apache.commons.lang.StringUtils; | 
| 19 | 16 | import org.springframework.beans.factory.annotation.Autowired; | 
| ... | ... | @@ -38,6 +35,8 @@ | 
| 38 | 35 | private OrganizationService organizationService; | 
| 39 | 36 | @Autowired | 
| 40 | 37 | private RegionsService regionsService; | 
| 38 | + @Autowired | |
| 39 | + private DepartmentsService departmentsService; | |
| 41 | 40 | |
| 42 | 41 | |
| 43 | 42 | /** | 
| ... | ... | @@ -58,6 +57,24 @@ | 
| 58 | 57 | return; | 
| 59 | 58 | } | 
| 60 | 59 | |
| 60 | + //机构有使用 不能删除 | |
| 61 | + UsersQuery usersQuery = new UsersQuery(); | |
| 62 | + usersQuery.setOrgId(organization.getId()); | |
| 63 | + usersQuery.setYn(YnEnums.YES.getId()); | |
| 64 | + if(0 < usersService.queryUsersCount(usersQuery)) { | |
| 65 | + ResultUtils.buildResultAndWrite(response, ErrorCodeConstants.DONT_DELETE, "机构下有用户信息,不能删除!"); | |
| 66 | + return; | |
| 67 | + } | |
| 68 | + | |
| 69 | + DepartmentsQuery departmentsQuery = new DepartmentsQuery(); | |
| 70 | + departmentsQuery.setYn(YnEnums.YES.getId()); | |
| 71 | + departmentsQuery.setOrgId(organization.getId()); | |
| 72 | + if(0 < departmentsService.queryDepartmentsCount(departmentsQuery)) { | |
| 73 | + ResultUtils.buildResultAndWrite(response, ErrorCodeConstants.DONT_DELETE, "机构下有部门信息,不能删除!"); | |
| 74 | + return; | |
| 75 | + } | |
| 76 | + | |
| 77 | + //删除机构 | |
| 61 | 78 | organization.setYn(YnEnums.NO.getId()); | 
| 62 | 79 | organization.setModified(new Date()); | 
| 63 | 80 | organizationService.updateOrganization(organization); | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ReferConfigController.java
View file @
87d8c86
| ... | ... | @@ -8,6 +8,7 @@ | 
| 8 | 8 | import com.lyms.platform.common.annotation.TokenRequired; | 
| 9 | 9 | import com.lyms.platform.common.enums.YnEnums; | 
| 10 | 10 | import com.lyms.platform.operate.web.result.FrontEndResult; | 
| 11 | +import org.apache.commons.lang.StringUtils; | |
| 11 | 12 | import org.springframework.beans.factory.annotation.Autowired; | 
| 12 | 13 | import org.springframework.stereotype.Controller; | 
| 13 | 14 | import org.springframework.web.bind.annotation.PathVariable; | 
| ... | ... | @@ -52,7 +53,9 @@ | 
| 52 | 53 | public BaseResponse addRefer(@RequestBody @Valid ReferValue referValue) { | 
| 53 | 54 | //添加前先设置项目代码, 标准代码 | 
| 54 | 55 | |
| 55 | - | |
| 56 | + if(StringUtils.isEmpty(referValue.getCharRefer())){ | |
| 57 | + referValue.setCharRefer(null); | |
| 58 | + } | |
| 56 | 59 | |
| 57 | 60 | referConfigService.addRefer(referValue); | 
| 58 | 61 | return new BaseResponse() | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/UsersController.java
View file @
87d8c86
| ... | ... | @@ -84,7 +84,7 @@ | 
| 84 | 84 | //设置用户角色信息 | 
| 85 | 85 | for(Users user : users) { | 
| 86 | 86 | user.setRoles(this.getUserRoles(user.getId())); | 
| 87 | - user.setOrganization(organizationService.getOrganization(user.getId())); | |
| 87 | + user.setOrganization(organizationService.getOrganization(user.getOrgId())); | |
| 88 | 88 | user.setDepartmentses(departmentsService.getDepartments(user.getDeptId())); | 
| 89 | 89 | } | 
| 90 | 90 | |
| ... | ... | @@ -110,7 +110,7 @@ | 
| 110 | 110 | @RequestParam(value = "page", required = false) Integer page, | 
| 111 | 111 | @RequestParam(value = "limit", required = false) Integer limit, | 
| 112 | 112 | @RequestParam(value = "orgId", required = false) Integer orgId, | 
| 113 | - @RequestParam(value = "ksId", required = false) Integer ksId) { | |
| 113 | + @RequestParam(value = "deptId", required = false) Integer deptId) { | |
| 114 | 114 | |
| 115 | 115 | limit = limit == null ? 10 : limit; | 
| 116 | 116 | page = page == null ? 1 : page; | 
| ... | ... | @@ -119,7 +119,7 @@ | 
| 119 | 119 | usersQuery.setNeed("true"); | 
| 120 | 120 | usersQuery.setSort("id desc"); | 
| 121 | 121 | usersQuery.setYn(YnEnums.YES.getId()); | 
| 122 | - usersQuery.setKsId(ksId); | |
| 122 | + usersQuery.setDeptId(deptId); | |
| 123 | 123 | usersQuery.setKeyword(keyword); | 
| 124 | 124 | usersQuery.setType(1); | 
| 125 | 125 | usersQuery.setOrgId(orgId); | 
| ... | ... | @@ -133,7 +133,7 @@ | 
| 133 | 133 | //设置用户角色信息 | 
| 134 | 134 | for(Users user : users) { | 
| 135 | 135 | user.setRoles(this.getUserRoles(user.getId())); | 
| 136 | - user.setOrganization(organizationService.getOrganization(user.getId())); | |
| 136 | + user.setOrganization(organizationService.getOrganization(user.getOrgId())); | |
| 137 | 137 | user.setDepartmentses(departmentsService.getDepartments(user.getDeptId())); | 
| 138 | 138 | } | 
| 139 | 139 | |
| 140 | 140 | |
| ... | ... | @@ -216,12 +216,16 @@ | 
| 216 | 216 | UsersQuery usersQuery = new UsersQuery(); | 
| 217 | 217 | usersQuery.setPhone(phone); | 
| 218 | 218 | usersQuery.setYn(YnEnums.YES.getId()); | 
| 219 | - int count = usersService.queryUsersCount(usersQuery); | |
| 220 | - if(0 == count) { | |
| 219 | + List<Users> list = usersService.queryUsers(usersQuery); | |
| 220 | + if(0 == list.size()) { | |
| 221 | 221 | ResultUtils.buildParameterErrorResultAndWrite(httpServletResponse, "该账户不存在"); | 
| 222 | 222 | return; | 
| 223 | 223 | } | 
| 224 | 224 | |
| 225 | + if(list.get(0).getEnable().equals(2)) { | |
| 226 | + ResultUtils.buildParameterErrorResultAndWrite(httpServletResponse, "该账户已被禁用"); | |
| 227 | + return; | |
| 228 | + } | |
| 225 | 229 | |
| 226 | 230 | LoginContext loginContext = LoginUtil.sendVerCode(phone, typeId, token); | 
| 227 | 231 | if(null != loginContext) { | 
| 228 | 232 | |
| 229 | 233 | |
| ... | ... | @@ -423,13 +427,14 @@ | 
| 423 | 427 | // users.setPwd(LoginUtil.md5(NumberUtils.getRandomString(6))); | 
| 424 | 428 | |
| 425 | 429 | //关联登录中心ID | 
| 426 | - Integer loginCenterId = LoginUtil.register(phone, token, typeId); | |
| 427 | - if(null == loginCenterId) { | |
| 428 | - ResultUtils.buildResultAndWrite(response, ErrorCodeConstants.SYSTEM_ERROR, "服务器内部错误"); | |
| 430 | + LoginContext loginContext = LoginUtil.register(phone, token, typeId); | |
| 431 | + if(!loginContext.getErrorcode().equals(0)) { | |
| 432 | + ResultUtils.buildResultAndWrite(response, ErrorCodeConstants.SYSTEM_ERROR, loginContext.getErrormsg()); | |
| 429 | 433 | return; | 
| 430 | 434 | } | 
| 431 | - users.setLogincenterId(loginCenterId); | |
| 435 | + users.setLogincenterId(loginContext.getId()); | |
| 432 | 436 | |
| 437 | + | |
| 433 | 438 | usersService.addUsers(users); | 
| 434 | 439 | |
| 435 | 440 | |
| ... | ... | @@ -504,7 +509,7 @@ | 
| 504 | 509 | |
| 505 | 510 | //准备添加数据 | 
| 506 | 511 | Users users = new Users(); | 
| 507 | - users.setType(1); //1管理员 | |
| 512 | + users.setType(1); //1普通用户 | |
| 508 | 513 | users.setDeptId(deptId); | 
| 509 | 514 | users.setOrgId(orgId); | 
| 510 | 515 | users.setName(name); | 
| 511 | 516 | |
| ... | ... | @@ -522,12 +527,12 @@ | 
| 522 | 527 | // users.setPwd(LoginUtil.md5(NumberUtils.getRandomString(6))); | 
| 523 | 528 | |
| 524 | 529 | //关联登录中心ID | 
| 525 | - Integer loginCenterId = LoginUtil.register(phone, token, typeId); | |
| 526 | - if(null == loginCenterId) { | |
| 527 | - ResultUtils.buildResultAndWrite(response, ErrorCodeConstants.SYSTEM_ERROR, "服务器内部错误"); | |
| 530 | + LoginContext loginContext = LoginUtil.register(phone, token, typeId); | |
| 531 | + if(!loginContext.getErrorcode().equals(0)) { | |
| 532 | + ResultUtils.buildResultAndWrite(response, ErrorCodeConstants.SYSTEM_ERROR, loginContext.getErrormsg()); | |
| 528 | 533 | return; | 
| 529 | 534 | } | 
| 530 | - users.setLogincenterId(loginCenterId); | |
| 535 | + users.setLogincenterId(loginContext.getId()); | |
| 531 | 536 | |
| 532 | 537 | usersService.addUsers(users); | 
| 533 | 538 | |
| ... | ... | @@ -665,7 +670,9 @@ | 
| 665 | 670 | @RequestParam(value = "phone",required = false) String phone, | 
| 666 | 671 | @RequestParam(value = "enable",required = false) Integer enable, | 
| 667 | 672 | @RequestParam(value = "remarks",required = false) String remarks, | 
| 668 | - @RequestParam(value = "roleIds",required = false) String roleIds) { | |
| 673 | + @RequestParam(value = "roleIds",required = false) String roleIds, | |
| 674 | + @RequestParam(value = "orgId",required = false) Integer orgId, | |
| 675 | + @RequestParam(value = "deptId",required = false) Integer deptId) { | |
| 669 | 676 | |
| 670 | 677 | |
| 671 | 678 | |
| ... | ... | @@ -695,6 +702,8 @@ | 
| 695 | 702 | users.setEnable(enable); | 
| 696 | 703 | users.setRemarks(remarks); | 
| 697 | 704 | users.setModified(new Date()); | 
| 705 | + users.setDeptId(deptId); | |
| 706 | + users.setOrgId(orgId); | |
| 698 | 707 | // users.setPwd(LoginUtil.md5(NumberUtils.getRandomString(6))); | 
| 699 | 708 | usersService.updateUsers(users); | 
| 700 | 709 | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyManagerFacade.java
View file @
87d8c86
| 1 | 1 | package com.lyms.platform.operate.web.facade; | 
| 2 | 2 | |
| 3 | -import java.util.ArrayList; | |
| 4 | -import java.util.HashMap; | |
| 5 | -import java.util.List; | |
| 6 | -import java.util.Map; | |
| 3 | +import java.util.*; | |
| 7 | 4 | |
| 8 | 5 | import com.lyms.platform.biz.service.*; | 
| 9 | 6 | import com.lyms.platform.common.utils.DateUtil; | 
| 10 | 7 | |
| ... | ... | @@ -54,8 +51,15 @@ | 
| 54 | 51 | PatientsQuery patientsQuery = new PatientsQuery(); | 
| 55 | 52 | patientsQuery.setType(2); | 
| 56 | 53 | patientsQuery.setYn(YnEnums.YES.getId()); | 
| 57 | - patientsQuery.setBirthEnd(DateUtil.parseYMD(babyManagerRequest.getdEnd())); | |
| 54 | + Date date = DateUtil.parseYMD(babyManagerRequest.getdEnd()); | |
| 55 | + if (null != date) { | |
| 56 | + long d = date.getTime() + 86398000; | |
| 57 | + date = new Date(d); | |
| 58 | + } | |
| 59 | + patientsQuery.setBirthEnd(date); | |
| 58 | 60 | patientsQuery.setBirthStart(DateUtil.parseYMD(babyManagerRequest.getdStart())); | 
| 61 | + patientsQuery.setPhone(babyManagerRequest.getPhone()); | |
| 62 | + patientsQuery.setName(babyManagerRequest.getName()); | |
| 59 | 63 | patientsQuery.setVisitstatus(babyManagerRequest.getVisitstatus()); | 
| 60 | 64 | patientsQuery.setPage(babyManagerRequest.getPage()); | 
| 61 | 65 | patientsQuery.setLimit(babyManagerRequest.getLimit()); | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BasicConfigFacade.java
View file @
87d8c86
| ... | ... | @@ -32,13 +32,29 @@ | 
| 32 | 32 | * @return 返回结果 | 
| 33 | 33 | */ | 
| 34 | 34 | public BaseListResponse findBasicConfigList(BasicConfigQueryRequest basicConfigQueryRequest) { | 
| 35 | + | |
| 35 | 36 | BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | 
| 36 | 37 | basicConfigQuery.setNeed("1"); | 
| 38 | +// basicConfigQuery.setId(basicConfigQueryRequest.getId()); | |
| 39 | +// basicConfigQuery.setParentId(basicConfigQueryRequest.getParentId()); | |
| 37 | 40 | basicConfigQuery.setPage(basicConfigQueryRequest.getPage()); | 
| 38 | 41 | basicConfigQuery.setLimit(basicConfigQueryRequest.getLimit()); | 
| 39 | 42 | basicConfigQuery.setYn(YnEnums.YES.getId()); | 
| 40 | 43 | basicConfigQuery.setKeyword(basicConfigQueryRequest.getKeywords()); | 
| 44 | + basicConfigQuery.setParentId(basicConfigQueryRequest.getId()); | |
| 41 | 45 | List<BasicConfig> data = basicConfigService.queryBasicConfig(basicConfigQuery); | 
| 46 | + | |
| 47 | + return new BaseListResponse().setData(buildResult(data)).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(basicConfigQuery.getPageInfo()); | |
| 48 | + } | |
| 49 | + | |
| 50 | +/* public BaseListResponse findByParentId(String id){ | |
| 51 | + BasicConfigQuery basicConfigQuery = new BasicConfigQuery(); | |
| 52 | + basicConfigQuery.setParentId(id); | |
| 53 | + List<BasicConfig> data = basicConfigService.queryBasicConfig(basicConfigQuery); | |
| 54 | + return new BaseListResponse().setData(buildResult(data)).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 55 | + }*/ | |
| 56 | + | |
| 57 | + public List<BasicConfigResult> buildResult( List<BasicConfig> data){ | |
| 42 | 58 | List<BasicConfigResult> dataList = new ArrayList<>(); | 
| 43 | 59 | if (CollectionUtils.isNotEmpty(data)) { | 
| 44 | 60 | for (BasicConfig basicConfig : data) { | 
| 45 | 61 | |
| ... | ... | @@ -47,13 +63,11 @@ | 
| 47 | 63 | dataList.add(basicConfigResult); | 
| 48 | 64 | } | 
| 49 | 65 | } | 
| 50 | - basicConfigQueryRequest.setCount(basicConfigQuery.getCount()); | |
| 51 | - basicConfigQueryRequest.setLimit(basicConfigQuery.getLimit()); | |
| 52 | - basicConfigQueryRequest.setPage(basicConfigQuery.getPage()); | |
| 53 | - basicConfigQueryRequest.setLastPage(basicConfigQuery.getLastPage()); | |
| 54 | - | |
| 55 | - return new BaseListResponse().setData(dataList).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 66 | + return dataList; | |
| 56 | 67 | } | 
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 57 | 71 | |
| 58 | 72 | /** | 
| 59 | 73 | * 修改一条基础项配置 | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
87d8c86
| ... | ... | @@ -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,14 @@ | 
| 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.setName(managerRequest.getName()); | |
| 84 | + puerperaQuery.setPhone(managerRequest.getPhone()); | |
| 85 | + puerperaQuery.setDueDateEnd(date); | |
| 82 | 86 | puerperaQuery.setDueDateStart(DateUtil.parseYMD(managerRequest.getDueDateStart())); | 
| 83 | 87 | puerperaQuery.setKeyword(managerRequest.getKeyword()); | 
| 84 | 88 | puerperaQuery.setCommunityId(managerRequest.getCommunityId()); | 
| 85 | 89 | |
| 86 | 90 | |
| ... | ... | @@ -94,15 +98,15 @@ | 
| 94 | 98 | |
| 95 | 99 | for (Patients model : puerperaList) { | 
| 96 | 100 | PuerperaResult result = new PuerperaResult(); | 
| 97 | - String comm="未分配"; | |
| 98 | - if(StringUtils.isNotEmpty(model.getCommunityId())){ | |
| 101 | + String comm = "未分配"; | |
| 102 | + if (StringUtils.isNotEmpty(model.getCommunityId())) { | |
| 99 | 103 | CommunityConfig communityConfig = communityConfigService.queryAreaById(model.getCommunityId()); | 
| 100 | - if(null!=communityConfig){ | |
| 101 | - comm= communityConfig.getName(); | |
| 104 | + if (null != communityConfig) { | |
| 105 | + comm = communityConfig.getName(); | |
| 102 | 106 | } | 
| 103 | 107 | } | 
| 104 | - String tips= visitFacade.getFindTips(model.getId()); | |
| 105 | - data.add(result.convertToResult(model,comm,tips)); | |
| 108 | + String tips = visitFacade.getFindTips(model.getId()); | |
| 109 | + data.add(result.convertToResult(model, comm, tips)); | |
| 106 | 110 | } | 
| 107 | 111 | } | 
| 108 | 112 | |
| ... | ... | @@ -112,10 +116,8 @@ | 
| 112 | 116 | /** | 
| 113 | 117 | * 删除一条产妇数据 | 
| 114 | 118 | * | 
| 115 | - * @param id | |
| 116 | - * 产妇id | |
| 117 | - * @param softDel | |
| 118 | - * 是否是软删除 <code>true/false</code> | |
| 119 | + * @param id 产妇id | |
| 120 | + * @param softDel 是否是软删除 <code>true/false</code> | |
| 119 | 121 | * @return 处理结果 | 
| 120 | 122 | */ | 
| 121 | 123 | public BaseResponse deleteOnePuerperaById(String id, boolean softDel) { | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/VisitFacade.java
View file @
87d8c86
| ... | ... | @@ -152,7 +152,7 @@ | 
| 152 | 152 | public BaseResponse addOneVisit(VisitAddRequest visitRequest) { | 
| 153 | 153 | // 获取患者id | 
| 154 | 154 | String parentId = visitRequest.getParentId(); | 
| 155 | - if (StringUtils.isNotEmpty(parentId)) { | |
| 155 | + if (StringUtils.isNotBlank(parentId)) { | |
| 156 | 156 | Patients model; | 
| 157 | 157 | PatientsQuery patientsQuery = new PatientsQuery(); | 
| 158 | 158 | patientsQuery.setId(parentId); | 
| 159 | 159 | |
| 160 | 160 | |
| 161 | 161 | |
| ... | ... | @@ -173,19 +173,25 @@ | 
| 173 | 173 | // parentId = puerperaService.addPuerpera(visitRequest.getPuerpera().build()).getId(); | 
| 174 | 174 | Patients patients = visitRequest.getPatients(); | 
| 175 | 175 | patients.setType(3); | 
| 176 | + patients.setYn(1); | |
| 177 | + patients.setId(null); | |
| 176 | 178 | parentId = patientsService.addPatient(patients).getId(); | 
| 177 | 179 | } | 
| 178 | 180 | |
| 179 | 181 | // 如果为空表示新增 | 
| 180 | - if (StringUtils.isEmpty(visitRequest.getRequestVisit().getId())) { | |
| 182 | + if (StringUtils.isBlank(visitRequest.getRequestVisit().getId())) { | |
| 181 | 183 | VisitModel visitModel = visitRequest.getRequestVisit(); | 
| 182 | - if (StringUtils.isNotEmpty(parentId)) { | |
| 184 | + if (StringUtils.isNotBlank(parentId)) { | |
| 183 | 185 | visitModel.setParentId(parentId); | 
| 184 | 186 | } | 
| 185 | 187 | visitService.addVisit(visitModel); | 
| 186 | 188 | } else { | 
| 187 | 189 | visitService.updateVisit(visitRequest.getRequestVisit()); | 
| 188 | 190 | } | 
| 191 | + Patients patients = new Patients(); | |
| 192 | + patients.setId(parentId); | |
| 193 | + patients.setIsVisit(1); | |
| 194 | + patientsService.updatePatient(patients); | |
| 189 | 195 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | 
| 190 | 196 | } | 
| 191 | 197 | |
| ... | ... | @@ -204,8 +210,10 @@ | 
| 204 | 210 | |
| 205 | 211 | public BaseResponse addOrUpdateBabyAndVisit(BabyVisitAddRequest babyVisitAddRequest) { | 
| 206 | 212 | // 访视记录id为空表示新增 | 
| 207 | - if (StringUtils.isEmpty(babyVisitAddRequest.getId())) { | |
| 208 | - babyVisitService.addOneBabyVisit(babyVisitAddRequest.convertToDataModel()); | |
| 213 | + if (StringUtils.isBlank(babyVisitAddRequest.getId())) { | |
| 214 | + BabyVisitModel babyVisitModel = babyVisitAddRequest.convertToDataModel(); | |
| 215 | + babyVisitModel.setId(null); | |
| 216 | + babyVisitService.addOneBabyVisit(babyVisitModel); | |
| 209 | 217 | } else { | 
| 210 | 218 | babyVisitService.updateOneBabyVisit(babyVisitAddRequest.convertToDataModel(), babyVisitAddRequest.getId()); | 
| 211 | 219 | } | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManagerQueryRequest.java
View file @
87d8c86
| ... | ... | @@ -23,7 +23,27 @@ | 
| 23 | 23 | */ | 
| 24 | 24 | @FormParam("keywords") | 
| 25 | 25 | private String keyword; | 
| 26 | + @FormParam | |
| 27 | + private String phone; | |
| 28 | + @FormParam | |
| 29 | + private String name; | |
| 26 | 30 | |
| 31 | + public String getName() { | |
| 32 | + return name; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public void setName(String name) { | |
| 36 | + this.name = name; | |
| 37 | + } | |
| 38 | + | |
| 39 | + public String getPhone() { | |
| 40 | + return phone; | |
| 41 | + } | |
| 42 | + | |
| 43 | + public void setPhone(String phone) { | |
| 44 | + this.phone = phone; | |
| 45 | + } | |
| 46 | + | |
| 27 | 47 | /** | 
| 28 | 48 | * 访视状态 | 
| 29 | 49 | */ | 
| ... | ... | @@ -51,6 +71,10 @@ | 
| 51 | 71 | } | 
| 52 | 72 | |
| 53 | 73 | public int getVisitstatus() { | 
| 74 | + //如果传的未访视就转成0 | |
| 75 | + if(visitstatus==2){ | |
| 76 | + visitstatus=0; | |
| 77 | + } | |
| 54 | 78 | return visitstatus; | 
| 55 | 79 | } | 
| 56 | 80 | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BasicConfigQueryRequest.java
View file @
87d8c86
| ... | ... | @@ -19,7 +19,29 @@ | 
| 19 | 19 | |
| 20 | 20 | @FormParam | 
| 21 | 21 | private String keywords; | 
| 22 | - | |
| 22 | + private String id; | |
| 23 | + private String parentId; | |
| 24 | + | |
| 25 | + public static long getSerialVersionUID() { | |
| 26 | + return serialVersionUID; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public String getId() { | |
| 30 | + return id; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setId(String id) { | |
| 34 | + this.id = id; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public String getParentId() { | |
| 38 | + return parentId; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setParentId(String parentId) { | |
| 42 | + this.parentId = parentId; | |
| 43 | + } | |
| 44 | + | |
| 23 | 45 | public String getKeywords() { | 
| 24 | 46 | return keywords; | 
| 25 | 47 | } | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PuerperaManagerQueryRequest.java
View file @
87d8c86
| 1 | 1 | package com.lyms.platform.operate.web.request; | 
| 2 | 2 | |
| 3 | -import java.util.Date; | |
| 4 | - | |
| 5 | 3 | import com.lyms.platform.common.core.annotation.form.Form; | 
| 6 | 4 | import com.lyms.platform.common.core.annotation.form.FormParam; | 
| 7 | 5 | |
| 8 | 6 | /** | 
| 9 | 7 | * 产妇管理请求 | 
| 10 | - * | |
| 8 | + * | |
| 11 | 9 | * @author Administrator | 
| 12 | 10 | */ | 
| 13 | 11 | @Form | 
| 14 | 12 | public class PuerperaManagerQueryRequest extends BasePageQueryRequest { | 
| 15 | 13 | |
| 16 | 14 | /** | 
| 17 | - * | |
| 15 | + * | |
| 18 | 16 | */ | 
| 19 | 17 | private static final long serialVersionUID = 1L; | 
| 20 | 18 | |
| 21 | 19 | |
| ... | ... | @@ -23,7 +21,27 @@ | 
| 23 | 21 | */ | 
| 24 | 22 | @FormParam("keywords") | 
| 25 | 23 | private String keyword; | 
| 24 | + @FormParam | |
| 25 | + private String phone; | |
| 26 | + @FormParam | |
| 27 | + private String name; | |
| 26 | 28 | |
| 29 | + public String getName() { | |
| 30 | + return name; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setName(String name) { | |
| 34 | + this.name = name; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public String getPhone() { | |
| 38 | + return phone; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setPhone(String phone) { | |
| 42 | + this.phone = phone; | |
| 43 | + } | |
| 44 | + | |
| 27 | 45 | /** | 
| 28 | 46 | * 社区名称 | 
| 29 | 47 | */ | 
| ... | ... | @@ -65,6 +83,10 @@ | 
| 65 | 83 | } | 
| 66 | 84 | |
| 67 | 85 | public int getVisitstatus() { | 
| 86 | + //如果传的未访视就转成0 | |
| 87 | + if(visitstatus==2){ | |
| 88 | + visitstatus=0; | |
| 89 | + } | |
| 68 | 90 | return visitstatus; | 
| 69 | 91 | } | 
| 70 | 92 | |
| ... | ... | @@ -77,7 +99,7 @@ | 
| 77 | 99 | } | 
| 78 | 100 | |
| 79 | 101 | public void setDueDateStart(String dueDateStart) { | 
| 80 | - this.dueDateStart =dueDateStart; | |
| 102 | + this.dueDateStart = dueDateStart; | |
| 81 | 103 | } | 
| 82 | 104 | |
| 83 | 105 | public String getDueDateEnd() { | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/VisitAddRequest.java
View file @
87d8c86
| ... | ... | @@ -129,7 +129,7 @@ | 
| 129 | 129 | /** | 
| 130 | 130 | * 检查时间 | 
| 131 | 131 | */ | 
| 132 | - private String checktime; | |
| 132 | + private String checkTime; | |
| 133 | 133 | |
| 134 | 134 | /** | 
| 135 | 135 | * 分娩后的天数 | 
| ... | ... | @@ -165,7 +165,7 @@ | 
| 165 | 165 | /** | 
| 166 | 166 | * 下次访问时间 | 
| 167 | 167 | */ | 
| 168 | - private String nextvisit; | |
| 168 | + private String nextVisit; | |
| 169 | 169 | |
| 170 | 170 | /** | 
| 171 | 171 | * 其他 | 
| 172 | 172 | |
| ... | ... | @@ -298,13 +298,7 @@ | 
| 298 | 298 | this.breast = breast; | 
| 299 | 299 | } | 
| 300 | 300 | |
| 301 | - public String getChecktime() { | |
| 302 | - return checktime; | |
| 303 | - } | |
| 304 | 301 | |
| 305 | - public void setChecktime(String checktime) { | |
| 306 | - this.checktime = checktime; | |
| 307 | - } | |
| 308 | 302 | |
| 309 | 303 | /* public String getDays() { | 
| 310 | 304 | return days;*/ | 
| 311 | 305 | |
| 312 | 306 | |
| ... | ... | @@ -370,14 +364,22 @@ | 
| 370 | 364 | this.mentality = mentality; | 
| 371 | 365 | } | 
| 372 | 366 | |
| 373 | - public String getNextvisit() { | |
| 374 | - return nextvisit; | |
| 367 | + public String getCheckTime() { | |
| 368 | + return checkTime; | |
| 375 | 369 | } | 
| 376 | 370 | |
| 377 | - public void setNextvisit(String nextvisit) { | |
| 378 | - this.nextvisit = nextvisit; | |
| 371 | + public void setCheckTime(String checkTime) { | |
| 372 | + this.checkTime = checkTime; | |
| 379 | 373 | } | 
| 380 | 374 | |
| 375 | + public String getNextVisit() { | |
| 376 | + return nextVisit; | |
| 377 | + } | |
| 378 | + | |
| 379 | + public void setNextVisit(String nextVisit) { | |
| 380 | + this.nextVisit = nextVisit; | |
| 381 | + } | |
| 382 | + | |
| 381 | 383 | public String getOther() { | 
| 382 | 384 | return other; | 
| 383 | 385 | } | 
| 384 | 386 | |
| ... | ... | @@ -514,15 +516,15 @@ | 
| 514 | 516 | } | 
| 515 | 517 | |
| 516 | 518 | visit.setBreast(breast); | 
| 517 | - visit.setChecktime(checktime); | |
| 518 | - visit.setDays((DateUtil.getDays(DateUtil.parseYMD(dueDate), DateUtil.parseYMD(checktime)) + 1) + ""); | |
| 519 | + visit.setChecktime(checkTime); | |
| 520 | + visit.setDays((DateUtil.getDays(DateUtil.parseYMD(dueDate), DateUtil.parseYMD(checkTime)) + 1) + ""); | |
| 519 | 521 | visit.setDoctorsign(doctorsign); | 
| 520 | 522 | visit.setDue(due); | 
| 521 | 523 | visit.setHealth(health); | 
| 522 | 524 | visit.setLochia(lochia); | 
| 523 | 525 | visit.setMatrix(matrix); | 
| 524 | 526 | visit.setMentality(mentality); | 
| 525 | - visit.setNextvisit(nextvisit); | |
| 527 | + visit.setNextvisit(nextVisit); | |
| 526 | 528 | visit.setNumOfLive(numOfLive); | 
| 527 | 529 | visit.setOther(other); | 
| 528 | 530 | 
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/VisitResult.java
View file @
87d8c86
| ... | ... | @@ -13,7 +13,7 @@ | 
| 13 | 13 | public class VisitResult { | 
| 14 | 14 | private String name; | 
| 15 | 15 | |
| 16 | - private int age; | |
| 16 | + private String age; | |
| 17 | 17 | |
| 18 | 18 | private String cardNo; | 
| 19 | 19 | |
| ... | ... | @@ -27,6 +27,8 @@ | 
| 27 | 27 | |
| 28 | 28 | private List<SimpleVisit> data; | 
| 29 | 29 | |
| 30 | + private String phone; | |
| 31 | + | |
| 30 | 32 | private String id; | 
| 31 | 33 | |
| 32 | 34 | public String getId() { | 
| 33 | 35 | |
| ... | ... | @@ -45,11 +47,11 @@ | 
| 45 | 47 | this.name = name; | 
| 46 | 48 | } | 
| 47 | 49 | |
| 48 | - public int getAge() { | |
| 50 | + public String getAge() { | |
| 49 | 51 | return age; | 
| 50 | 52 | } | 
| 51 | 53 | |
| 52 | - public void setAge(int age) { | |
| 54 | + public void setAge(String age) { | |
| 53 | 55 | this.age = age; | 
| 54 | 56 | } | 
| 55 | 57 | |
| 56 | 58 | |
| 57 | 59 | |
| 58 | 60 | |
| ... | ... | @@ -101,16 +103,24 @@ | 
| 101 | 103 | this.data = data; | 
| 102 | 104 | } | 
| 103 | 105 | |
| 106 | + public String getPhone() { | |
| 107 | + return phone; | |
| 108 | + } | |
| 104 | 109 | |
| 110 | + public void setPhone(String phone) { | |
| 111 | + this.phone = phone; | |
| 112 | + } | |
| 113 | + | |
| 105 | 114 | public void convertToResult1(Patients model,Address address) { | 
| 106 | 115 | try { | 
| 107 | 116 | setAddress(address); | 
| 108 | 117 | } catch (Exception e) { | 
| 109 | 118 | } | 
| 110 | 119 | try { | 
| 111 | - setAge(model.getAge()); | |
| 120 | + setAge(DateUtil.getyyyy_MM_dd(model.getBirth())); | |
| 112 | 121 | }catch (Exception e){ | 
| 113 | 122 | } | 
| 123 | + setPhone(model.getPhone()); | |
| 114 | 124 | setId(model.getId()); | 
| 115 | 125 | // setCardNo(null==model.getCardNo()?"":model.getCardNo()); | 
| 116 | 126 | setCardNo(null==model.getPhone()?"":model.getPhone()); | 
platform-operate-api/src/main/webapp/WEB-INF/web.xml
View file @
87d8c86
| 1 | 1 | <?xml version="1.0" encoding="UTF-8"?> | 
| 2 | -<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor | |
| 3 | - license agreements. See the NOTICE file distributed with this work for additional | |
| 4 | - information regarding copyright ownership. The ASF licenses this file to | |
| 5 | - you under the Apache License, Version 2.0 (the "License"); you may not use | |
| 6 | - this file except in compliance with the License. You may obtain a copy of | |
| 7 | - the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required | |
| 8 | - by applicable law or agreed to in writing, software distributed under the | |
| 9 | - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS | |
| 10 | - OF ANY KIND, either express or implied. See the License for the specific | |
| 2 | +<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor | |
| 3 | + license agreements. See the NOTICE file distributed with this work for additional | |
| 4 | + information regarding copyright ownership. The ASF licenses this file to | |
| 5 | + you under the Apache License, Version 2.0 (the "License"); you may not use | |
| 6 | + this file except in compliance with the License. You may obtain a copy of | |
| 7 | + the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required | |
| 8 | + by applicable law or agreed to in writing, software distributed under the | |
| 9 | + License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS | |
| 10 | + OF ANY KIND, either express or implied. See the License for the specific | |
| 11 | 11 | language governing permissions and limitations under the License. --> | 
| 12 | 12 | <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | 
| 13 | - version="2.5" | |
| 14 | - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> | |
| 13 | + version="2.5" | |
| 14 | + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> | |
| 15 | 15 | |
| 16 | -<!-- | |
| 17 | -<filter> | |
| 18 | - <filter-name>CorsFilter</filter-name> | |
| 19 | - <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> | |
| 20 | - <init-param> | |
| 21 | - <param-name>cors.allowed.origins</param-name> | |
| 22 | - <param-value>*</param-value> | |
| 23 | - </init-param> | |
| 24 | - <init-param> | |
| 25 | - <param-name>cors.allowed.methods</param-name> | |
| 26 | - <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value> | |
| 27 | - </init-param> | |
| 28 | - <init-param> | |
| 29 | - <param-name>cors.allowed.headers</param-name> | |
| 30 | - <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers,authorization</param-value> | |
| 31 | - </init-param> | |
| 32 | - <init-param> | |
| 33 | - <param-name>cors.exposed.headers</param-name> | |
| 34 | - <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value> | |
| 35 | - </init-param> | |
| 36 | - <init-param> | |
| 37 | - <param-name>cors.support.credentials</param-name> | |
| 38 | - <param-value>true</param-value> | |
| 39 | - </init-param> | |
| 40 | - <init-param> | |
| 41 | - <param-name>cors.preflight.maxage</param-name> | |
| 42 | - <param-value>10</param-value> | |
| 43 | - </init-param> | |
| 44 | -</filter> | |
| 45 | -<filter-mapping> | |
| 46 | - <filter-name>CorsFilter</filter-name> | |
| 47 | - <url-pattern>/*</url-pattern> | |
| 48 | -</filter-mapping> | |
| 16 | + <!-- | |
| 17 | + <filter> | |
| 18 | + <filter-name>CorsFilter</filter-name> | |
| 19 | + <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> | |
| 20 | + <init-param> | |
| 21 | + <param-name>cors.allowed.origins</param-name> | |
| 22 | + <param-value>*</param-value> | |
| 23 | + </init-param> | |
| 24 | + <init-param> | |
| 25 | + <param-name>cors.allowed.methods</param-name> | |
| 26 | + <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value> | |
| 27 | + </init-param> | |
| 28 | + <init-param> | |
| 29 | + <param-name>cors.allowed.headers</param-name> | |
| 30 | + <param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers,authorization</param-value> | |
| 31 | + </init-param> | |
| 32 | + <init-param> | |
| 33 | + <param-name>cors.exposed.headers</param-name> | |
| 34 | + <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials</param-value> | |
| 35 | + </init-param> | |
| 36 | + <init-param> | |
| 37 | + <param-name>cors.support.credentials</param-name> | |
| 38 | + <param-value>true</param-value> | |
| 39 | + </init-param> | |
| 40 | + <init-param> | |
| 41 | + <param-name>cors.preflight.maxage</param-name> | |
| 42 | + <param-value>10</param-value> | |
| 43 | + </init-param> | |
| 44 | + </filter> | |
| 45 | + <filter-mapping> | |
| 46 | + <filter-name>CorsFilter</filter-name> | |
| 47 | + <url-pattern>/*</url-pattern> | |
| 48 | + </filter-mapping> | |
| 49 | 49 | |
| 50 | - --> | |
| 51 | -<servlet-mapping> | |
| 52 | - <servlet-name>default</servlet-name> | |
| 53 | - <url-pattern>*.xml</url-pattern> | |
| 54 | - </servlet-mapping> | |
| 50 | + --> | |
| 51 | + <servlet-mapping> | |
| 52 | + <servlet-name>default</servlet-name> | |
| 53 | + <url-pattern>*.xml</url-pattern> | |
| 54 | + </servlet-mapping> | |
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 |