Commit c180fa373689585b59828d2c7d9ec4911f79f6d8

Authored by jiangjiazhi
1 parent 19d2aeb315

儿童增加字段

Showing 4 changed files with 57 additions and 1 deletions

platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java View file @ c180fa3
... ... @@ -41,6 +41,26 @@
41 41 //大于创建时间
42 42 private Date gteCreated;
43 43  
  44 + private Date buildDateStart;
  45 +
  46 + private Date buildDateEnd;
  47 +
  48 + public Date getBuildDateStart() {
  49 + return buildDateStart;
  50 + }
  51 +
  52 + public void setBuildDateStart(Date buildDateStart) {
  53 + this.buildDateStart = buildDateStart;
  54 + }
  55 +
  56 + public Date getBuildDateEnd() {
  57 + return buildDateEnd;
  58 + }
  59 +
  60 + public void setBuildDateEnd(Date buildDateEnd) {
  61 + this.buildDateEnd = buildDateEnd;
  62 + }
  63 +
44 64 public Date getGteModified() {
45 65 return gteModified;
46 66 }
... ... @@ -496,6 +516,24 @@
496 516 }
497 517 isAddStart = Boolean.TRUE;
498 518 }
  519 +
  520 +
  521 + if(null!=buildDateStart){
  522 + if (null != c) {
  523 + c = c.and("buildDate").gte(buildDateStart);
  524 + } else {
  525 + c = Criteria.where("buildDate").gte(buildDateStart);
  526 + }
  527 + }
  528 +
  529 + if(null!=buildDateEnd){
  530 + if (null != c) {
  531 + c = c.lte(buildDateEnd);
  532 + } else {
  533 + c = Criteria.where("buildDate").lte(buildDateEnd);
  534 + }
  535 + }
  536 +
499 537 if (isAddStart) {
500 538 return new MongoCondition(c.andOperator(condition.getCriteria())).toMongoQuery();
501 539 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBookbuildingController.java View file @ c180fa3
... ... @@ -177,6 +177,7 @@
177 177 @RequestParam(value = "name", required = false) String name,
178 178 @RequestParam(value = "highRiskType", required = false) Integer highRiskType,
179 179 @RequestParam(value = "diagnose", required = false) String diagnose,
  180 + @RequestParam(value = "dateRange", required = false) String dateRange,
180 181 @RequestParam("page") Integer page,
181 182 @RequestParam("limit") Integer limit){
182 183 LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext");
... ... @@ -196,7 +197,7 @@
196 197 request.setLimit(limit);
197 198 request.setPage(page);
198 199 request.setServiceStatus(serviceStatus);
199   -
  200 + request.setDateRange(dateRange);
200 201 return babyBookbuildingFacade.queryBabyList(request,loginState.getId());
201 202 }
202 203  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ c180fa3
... ... @@ -9,6 +9,7 @@
9 9 import com.lyms.platform.common.result.BaseObjectResponse;
10 10 import com.lyms.platform.common.result.BaseResponse;
11 11 import com.lyms.platform.common.utils.*;
  12 +import com.lyms.platform.common.utils.StringUtils;
12 13 import com.lyms.platform.operate.web.request.*;
13 14 import com.lyms.platform.operate.web.result.*;
14 15 import com.lyms.platform.operate.web.utils.MessageCenterService;
... ... @@ -20,6 +21,7 @@
20 21 import com.lyms.platform.pojo.*;
21 22 import com.lyms.platform.query.*;
22 23 import org.apache.commons.collections.CollectionUtils;
  24 +import org.apache.commons.lang.*;
23 25 import org.springframework.beans.factory.annotation.Autowired;
24 26 import org.springframework.data.domain.Sort;
25 27 import org.springframework.stereotype.Component;
... ... @@ -1579,6 +1581,11 @@
1579 1581 //0 非高危 1 高危 2 全部
1580 1582 if (request.getHighRiskType() != null && request.getHighRiskType() != 2) {
1581 1583 babyQuery.setLastHighRisk(request.getHighRiskType());
  1584 + }
  1585 + if(org.apache.commons.lang.StringUtils.isNotEmpty(request.getDateRange())){
  1586 + String[] dates = request.getDateRange().split(" - ");
  1587 + babyQuery.setBuildDateStart(DateUtil.parseYMD(dates[0]));
  1588 + babyQuery.setBuildDateEnd(DateUtil.parseYMD(dates[1]));
1582 1589 }
1583 1590  
1584 1591 List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyManageRequest.java View file @ c180fa3
... ... @@ -56,6 +56,16 @@
56 56 //诊断
57 57 private String diagnose;
58 58  
  59 + private String dateRange;
  60 +
  61 + public String getDateRange() {
  62 + return dateRange;
  63 + }
  64 +
  65 + public void setDateRange(String dateRange) {
  66 + this.dateRange = dateRange;
  67 + }
  68 +
59 69 public Integer getServiceType() {
60 70 return serviceType;
61 71 }