Commit 0ab00108f3b10613de90ea83d8754072ff29e5d9

Authored by liquanyu
1 parent c81a5c02b4

产筛

Showing 2 changed files with 27 additions and 6 deletions

platform-dal/src/main/java/com/lyms/platform/query/SieveQuery.java View file @ 0ab0010
... ... @@ -9,6 +9,7 @@
9 9 import org.springframework.data.mongodb.core.query.Criteria;
10 10  
11 11 import java.util.Date;
  12 +import java.util.List;
12 13  
13 14 /**
14 15 * 产前筛查
15 16  
... ... @@ -81,7 +82,16 @@
81 82  
82 83 //申请医院
83 84 private String applyHospitalId;
  85 + private List<String> parentIds;
84 86  
  87 + public List<String> getParentIds() {
  88 + return parentIds;
  89 + }
  90 +
  91 + public void setParentIds(List<String> parentIds) {
  92 + this.parentIds = parentIds;
  93 + }
  94 +
85 95 public String getSieveHospitalId() {
86 96 return sieveHospitalId;
87 97 }
... ... @@ -259,6 +269,11 @@
259 269 if (null != parentId) {
260 270 condition = condition.and("parentId", parentId, MongoOper.IS);
261 271 }
  272 +
  273 + if (null != parentIds && parentIds.size() > 0) {
  274 + condition = condition.and("parentId", parentIds, MongoOper.IN);
  275 + }
  276 +
262 277 if (StringUtils.isNotEmpty(name)) {
263 278 condition = condition.and("name", name, MongoOper.LIKE);
264 279 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java View file @ 0ab0010
... ... @@ -843,15 +843,21 @@
843 843  
844 844 public BaseResponse reviceSieve(List<String> parentIds, Integer userId) {
845 845 String hospitalId = autoMatchFacade.getHospitalId(userId);
846   - SieveModel sieve = new SieveModel();
847   - sieve.setHospitalId(hospitalId);
848   - sieve.setReviceStatus(2);
849 846 if (CollectionUtils.isNotEmpty(parentIds))
850 847 {
851   - for (String parentId : parentIds)
  848 + SieveQuery query = new SieveQuery();
  849 + query.setParentIds(parentIds);
  850 + query.setYn(YnEnums.YES.getId());
  851 + query.setHospitalId(hospitalId);
  852 + List<SieveModel> list = sieveService.queryList(query);
  853 +
  854 + if (CollectionUtils.isNotEmpty(list))
852 855 {
853   - sieve.setParentId(parentId);
854   - sieveService.updateOneChanQianDiaSieve(sieve);
  856 + for (SieveModel sieve : list)
  857 + {
  858 + sieve.setReviceStatus(2);
  859 + sieveService.updateOneChanQianDiaSieve(sieve);
  860 + }
855 861 }
856 862 }
857 863 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");