Commit 8eb82909ceabd4f205cee7d99243427444eb3a2d
1 parent
d6399c652f
Exists in
master
and in
6 other branches
肌萎缩
Showing 2 changed files with 33 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java
View file @
8eb8290
... | ... | @@ -5281,5 +5281,32 @@ |
5281 | 5281 | } |
5282 | 5282 | return "success"; |
5283 | 5283 | } |
5284 | + @RequestMapping(value = "/handleFmData", method = RequestMethod.GET) | |
5285 | + @ResponseBody | |
5286 | + public String handleFmData(String start,String end) | |
5287 | + { | |
5288 | + StringBuffer sb = new StringBuffer(); | |
5289 | + MatDeliverQuery matDeliverQuery = new MatDeliverQuery(); | |
5290 | + matDeliverQuery.setYn(YnEnums.YES.getId()); | |
5291 | + Date startDate1 = DateUtil.parseYMD(start); | |
5292 | + Date endDate1 = DateUtil.getDayLastSecond(DateUtil.parseYMD(end)); | |
5293 | + matDeliverQuery.setCreatedTimeStart(startDate1); | |
5294 | + matDeliverQuery.setCreatedTimeEnd(endDate1); | |
5295 | + List<MaternalDeliverModel> maternalDeliverModels = matDeliverService.query(matDeliverQuery); | |
5296 | + if (CollectionUtils.isNotEmpty(maternalDeliverModels)) | |
5297 | + { | |
5298 | + for (MaternalDeliverModel maternalDeliverModel : maternalDeliverModels) | |
5299 | + { | |
5300 | + Patients patients = patientsService.findOnePatientById(maternalDeliverModel.getParentId()); | |
5301 | + if (patients != null && patients.getCardNo() != null) | |
5302 | + { | |
5303 | + sb.append(patients.getCardNo()); | |
5304 | + sb.append(","); | |
5305 | + } | |
5306 | + } | |
5307 | + } | |
5308 | + return sb.toString(); | |
5309 | + } | |
5310 | + | |
5284 | 5311 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SmnFacade.java
View file @
8eb8290
... | ... | @@ -521,11 +521,11 @@ |
521 | 521 | public BaseResponse editCqsfRecord(SmnRequest param, Integer userId) { |
522 | 522 | Query query = Query.query(Criteria.where("id").is(param.getId())); |
523 | 523 | SmnModel smnModel = mongoTemplate.findOne(query, SmnModel.class); |
524 | - BeanUtils.copyProperties(smnModel,param, com.lyms.platform.common.utils.BeanUtils.getNullPropertyNames(smnModel)); | |
525 | - smnModel.setSfStatus(6); | |
524 | + BeanUtils.copyProperties(param,smnModel, com.lyms.platform.common.utils.BeanUtils.getNullPropertyNames(param)); | |
525 | + | |
526 | 526 | Query query1 = Query.query(Criteria.where("id").is(smnModel.getId())); |
527 | 527 | Update update = MongoConvertHelper |
528 | - .convertToNativeUpdate(ReflectionUtils.getUpdateField(param)); | |
528 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(smnModel)); | |
529 | 529 | mongoTemplate.updateFirst(query1, update, SmnModel.class); |
530 | 530 | return new BaseResponse(); |
531 | 531 | } |
... | ... | @@ -535,6 +535,7 @@ |
535 | 535 | SmnModel smnModel = mongoTemplate.findOne(query, SmnModel.class); |
536 | 536 | BeanUtils.copyProperties(smnModel,param, com.lyms.platform.common.utils.BeanUtils.getNullPropertyNames(smnModel)); |
537 | 537 | param.setSfDate(new Date()); |
538 | + smnModel.setSfStatus(6); | |
538 | 539 | Query query1 = Query.query(Criteria.where("id").is(smnModel.getId())); |
539 | 540 | Update update = MongoConvertHelper |
540 | 541 | .convertToNativeUpdate(ReflectionUtils.getUpdateField(param)); |
541 | 542 | |
... | ... | @@ -545,10 +546,10 @@ |
545 | 546 | public BaseResponse editBabyInfoRecord(SmnRequest param, Integer userId) { |
546 | 547 | Query query = Query.query(Criteria.where("id").is(param.getId())); |
547 | 548 | SmnModel smnModel = mongoTemplate.findOne(query, SmnModel.class); |
548 | - BeanUtils.copyProperties(smnModel,param, com.lyms.platform.common.utils.BeanUtils.getNullPropertyNames(smnModel)); | |
549 | + BeanUtils.copyProperties(param,smnModel, com.lyms.platform.common.utils.BeanUtils.getNullPropertyNames(param)); | |
549 | 550 | Query query1 = Query.query(Criteria.where("id").is(smnModel.getId())); |
550 | 551 | Update update = MongoConvertHelper |
551 | - .convertToNativeUpdate(ReflectionUtils.getUpdateField(param)); | |
552 | + .convertToNativeUpdate(ReflectionUtils.getUpdateField(smnModel)); | |
552 | 553 | mongoTemplate.updateFirst(query1, update, SmnModel.class); |
553 | 554 | return new BaseResponse(); |
554 | 555 | } |