Commit 84b8d158eb4248b2fa65facc783111a56277ae83

Authored by yangfei

Merge remote-tracking branch 'origin/master'

Showing 4 changed files

platform-dal/src/main/java/com/lyms/platform/pojo/BabyEyeCheck.java View file @ 84b8d15
... ... @@ -15,6 +15,8 @@
15 15 // 异常的备注
16 16 private String errorRemark;
17 17  
  18 + private Date birth;
  19 +
18 20 private String id;
19 21  
20 22 private Date created;
... ... @@ -224,6 +226,14 @@
224 226 * 选择性注视卡检查
225 227 */
226 228 private String fixationCard;
  229 +
  230 + public Date getBirth() {
  231 + return birth;
  232 + }
  233 +
  234 + public void setBirth(Date birth) {
  235 + this.birth = birth;
  236 + }
227 237  
228 238 public String getErrorRemark() {
229 239 return errorRemark;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java View file @ 84b8d15
... ... @@ -81,6 +81,7 @@
81 81 BabyModel babyModel = mongoTemplate.findById(babyEyeCheck.getBabyId(), BabyModel.class);
82 82 if(babyModel != null) {
83 83 babyEyeCheck.setPid(babyModel.getPid());
  84 + babyEyeCheck.setBirth(babyModel.getBirth());
84 85 }
85 86 mongoTemplate.save(babyEyeCheck);
86 87 if(CollectionUtils.isNotEmpty(babyEyeCheck.getRiskFactorId())) {
... ... @@ -203,6 +204,12 @@
203 204 if(StringUtils.isNotEmpty(chechMonth)) {
204 205 criteria.and("checkMonthId").is(chechMonth);
205 206 }
  207 + if(StringUtils.isNotEmpty(currentMonth)) {
  208 +// Date start = DateUtil.getBeforMonth()
  209 +
  210 +// criteria.and("checkTime").gte(startDate).lt(DateUtil.addDay(endDate, 1));
  211 + }
  212 +
206 213 if(org.apache.commons.lang.StringUtils.isNotBlank(key)) {
207 214 Criteria c = new Criteria();
208 215 c.orOperator(Criteria.where("mphone").is(key), Criteria.where("name").regex(key), Criteria.where("mcertNo").is(key)).and("yn").ne(0);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PlantformConfigServiceImpl.java View file @ 84b8d15
... ... @@ -36,6 +36,9 @@
36 36 @Autowired
37 37 private MongoTemplate mongoTemplate;
38 38  
  39 + @Autowired
  40 + MongoUtil mongoUtil;
  41 +
39 42 @Override
40 43 public BaseResponse listCustomType(String key, Integer page, Integer limit, Integer userId) {
41 44 String hospitalId = autoMatchFacade.getHospitalId(userId);
... ... @@ -43,7 +46,7 @@
43 46 if(StringUtils.isNotEmpty(key)) {
44 47 query.addCriteria(Criteria.where("value").regex(key));
45 48 }
46   - query.addCriteria(Criteria.where("key").is(hospitalId)).with(new Sort(Sort.Direction.DESC,"createDate"));
  49 + query.addCriteria(Criteria.where("key").is(hospitalId).and("type").is(SequenceConstant.CUSTOM_TYPE)).with(new Sort(Sort.Direction.DESC,"createDate"));
47 50 PageResult pageResult = findMongoPage(PlantformConfigModel.class, query, page, limit);
48 51  
49 52 List<PlantformConfigModel> configModels = (List<PlantformConfigModel>) pageResult.getGrid();
... ... @@ -106,7 +109,7 @@
106 109 if(StringUtils.isNotEmpty(parentId)) {
107 110 query.addCriteria(Criteria.where("parentId").is(parentId));
108 111 }
109   - query.addCriteria(Criteria.where("key").is(hospitalId)).with(new Sort(Sort.Direction.DESC,"createDate"));
  112 + query.addCriteria(Criteria.where("key").is(hospitalId).and("type").is(SequenceConstant.CUSTOM_CONTENT)).with(new Sort(Sort.Direction.DESC,"createDate"));
110 113 PageResult pageResult = findMongoPage(PlantformConfigModel.class, query, page, limit);
111 114  
112 115 List<PlantformConfigModel> configModels = (List<PlantformConfigModel>) pageResult.getGrid();
... ... @@ -114,7 +117,10 @@
114 117 for (PlantformConfigModel configModel : configModels) {
115 118 Map<String, Object> map = ReflectionUtils.beanToMap(configModel);
116 119 map.put("id", configModel.getId().toString());
117   - map.put("date", DateUtil.getyyyy_MM_dd_hms(configModel.getCreateDate()));
  120 + map.put("typeName", mongoUtil.getPlatformValue(configModel.getParentId()));
  121 + map.put("serchKey", configModel.getSerchKey());
  122 + map.put("content", configModel.getValue());
  123 + map.put("createDate", DateUtil.getyyyy_MM_dd_hms(configModel.getCreateDate()));
118 124 restList.add(map);
119 125 }
120 126 pageResult.setGrid(restList);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MongoUtil.java View file @ 84b8d15
... ... @@ -7,6 +7,7 @@
7 7 import com.lyms.platform.pojo.BabyModel;
8 8 import com.lyms.platform.pojo.BasicConfig;
9 9 import com.lyms.platform.pojo.Patients;
  10 +import com.lyms.platform.pojo.PlantformConfigModel;
10 11 import com.mongodb.BasicDBObject;
11 12 import com.mongodb.DBObject;
12 13 import org.apache.commons.collections.map.HashedMap;
... ... @@ -35,6 +36,15 @@
35 36  
36 37 @Autowired
37 38 private OrganizationGroupsFacade organizationGroupsFacade;
  39 +
  40 + public PlantformConfigModel getPlatformConfig(String id) {
  41 + return mongoTemplate.findById(id, PlantformConfigModel.class);
  42 + }
  43 +
  44 + public String getPlatformValue(String id) {
  45 + PlantformConfigModel platformConfig = getPlatformConfig(id);
  46 + return platformConfig == null ? null : platformConfig.getValue();
  47 + }
38 48  
39 49 /**
40 50 * 隐藏建档