Commit fb6de01aa4d7b20c7f1c12af898e44b7e1a5469e
1 parent
c7787395c9
Exists in
master
and in
6 other branches
产检增加流产相关字段
Showing 3 changed files with 26 additions and 7 deletions
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/BasicConfigService.java
View file @
fb6de01
| 1 | 1 | package com.lyms.platform.biz.service; |
| 2 | 2 | |
| 3 | -import com.google.common.cache.*; | |
| 3 | +import com.google.common.cache.CacheLoader; | |
| 4 | +import com.google.common.cache.LoadingCache; | |
| 4 | 5 | import com.lyms.platform.biz.dal.IBasicConfigDao; |
| 5 | 6 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 6 | 7 | import com.lyms.platform.common.dao.operator.MongoCondition; |
| 7 | 8 | |
| 8 | 9 | |
| ... | ... | @@ -11,19 +12,16 @@ |
| 11 | 12 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 12 | 13 | import com.lyms.platform.common.utils.AddressUtil; |
| 13 | 14 | import com.lyms.platform.common.utils.CacheHelper; |
| 14 | -import com.lyms.platform.common.utils.ExceptionUtils; | |
| 15 | 15 | import com.lyms.platform.pojo.BasicConfig; |
| 16 | 16 | import com.lyms.platform.query.BasicConfigQuery; |
| 17 | 17 | import org.apache.commons.collections.CollectionUtils; |
| 18 | 18 | import org.apache.commons.lang.StringUtils; |
| 19 | 19 | import org.springframework.beans.factory.InitializingBean; |
| 20 | 20 | import org.springframework.beans.factory.annotation.Autowired; |
| 21 | -import org.springframework.data.domain.Sort; | |
| 22 | 21 | import org.springframework.data.domain.Sort.Direction; |
| 23 | 22 | import org.springframework.stereotype.Service; |
| 24 | 23 | |
| 25 | 24 | import java.util.*; |
| 26 | -import java.util.concurrent.TimeUnit; | |
| 27 | 25 | |
| 28 | 26 | @Service("basicConfigService") |
| 29 | 27 | public class BasicConfigService implements InitializingBean { |
| ... | ... | @@ -48,8 +46,7 @@ |
| 48 | 46 | basicConfigQuery.mysqlBuild(basicConfigDao.queryBasicConfigCount(basicConfigQuery.convertToQuery())); |
| 49 | 47 | query.start(basicConfigQuery.getOffset()).end(basicConfigQuery.getLimit()); |
| 50 | 48 | } |
| 51 | - | |
| 52 | - return basicConfigDao.queryBasicConfig(query.addOrder(Direction.ASC, "createDate")); | |
| 49 | + return basicConfigDao.queryBasicConfig(query.addOrder(Direction.DESC, "createDate,weight")); | |
| 53 | 50 | } |
| 54 | 51 | |
| 55 | 52 |
platform-dal/src/main/java/com/lyms/platform/pojo/BasicConfig.java
View file @
fb6de01
| ... | ... | @@ -27,6 +27,9 @@ |
| 27 | 27 | |
| 28 | 28 | private String typeId; |
| 29 | 29 | |
| 30 | + //权重 | |
| 31 | + private Integer weight; | |
| 32 | + | |
| 30 | 33 | private String publishName; |
| 31 | 34 | private String publishId; |
| 32 | 35 | private Long createDate; |
| ... | ... | @@ -35,6 +38,14 @@ |
| 35 | 38 | private Integer score; |
| 36 | 39 | private String describe; |
| 37 | 40 | private String color; |
| 41 | + | |
| 42 | + public Integer getWeight() { | |
| 43 | + return weight; | |
| 44 | + } | |
| 45 | + | |
| 46 | + public void setWeight(Integer weight) { | |
| 47 | + this.weight = weight; | |
| 48 | + } | |
| 38 | 49 | |
| 39 | 50 | public String getColor() { |
| 40 | 51 | return color; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BasicConfigAddRequest.java
View file @
fb6de01
| ... | ... | @@ -14,14 +14,24 @@ |
| 14 | 14 | private String parentId; |
| 15 | 15 | @FormParam |
| 16 | 16 | private String name; |
| 17 | - | |
| 18 | 17 | @FormParam |
| 19 | 18 | private String code; |
| 19 | + //权重 | |
| 20 | + @FormParam | |
| 21 | + private Integer weight; | |
| 20 | 22 | |
| 21 | 23 | private String typeId; |
| 22 | 24 | private Integer score; |
| 23 | 25 | private String describe; |
| 24 | 26 | |
| 27 | + public Integer getWeight() { | |
| 28 | + return weight; | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void setWeight(Integer weight) { | |
| 32 | + this.weight = weight; | |
| 33 | + } | |
| 34 | + | |
| 25 | 35 | public String getTypeId() { |
| 26 | 36 | return typeId; |
| 27 | 37 | } |
| ... | ... | @@ -82,6 +92,7 @@ |
| 82 | 92 | if(StringUtils.isEmpty(parentId)){ |
| 83 | 93 | return null; |
| 84 | 94 | } |
| 95 | + basicConfig.setWeight(weight); | |
| 85 | 96 | basicConfig.setTypeId(typeId); |
| 86 | 97 | basicConfig.setDescribe(describe); |
| 87 | 98 | basicConfig.setScore(score); |