Commit 7d06be2352f7b1721128e0fdafb3aba8d8f5ea81

Authored by wtt
1 parent a553a6412d

update

Showing 2 changed files with 10 additions and 8 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ 7d06be2
... ... @@ -384,10 +384,11 @@
384 384 */
385 385 public BaseResponse updateBabyBookbuilding(BabyBookbuildingAddRequest request, Integer userId) {
386 386  
387   - BabyModel model = getBabyModel(request, true, userId);
388   -
389 387 String hid = autoMatchFacade.getHospitalId(userId);
390 388  
  389 + BabyModel model = getBabyModel(request, true, userId,hid);
  390 +
  391 +
391 392 model.setModified(new Date());
392 393 model.setOperator(userId);
393 394 if (StringUtils.isNotEmpty(request.getMommyCertificateNum())) {
... ... @@ -599,7 +600,7 @@
599 600 return br;
600 601 }
601 602 }
602   - String encodedUtil = getEncodedUtil();
  603 + String encodedUtil = getEncodedUtil(hid);
603 604 Patients patients = null;
604 605 PersonModel resperson = null;
605 606 String babyPersonId = "";
... ... @@ -767,7 +768,7 @@
767 768 }
768 769  
769 770 request.setEncoded(encodedUtil);
770   - BabyModel model = getBabyModel(request, true, userId);
  771 + BabyModel model = getBabyModel(request, true, userId,hid);
771 772 model.setmHighRiskReason(request.getmHighRiskReason());
772 773 model.setPid(babyPersonId);
773 774 model.setOperator(userId);
... ... @@ -1143,7 +1144,7 @@
1143 1144 * @param b
1144 1145 * @return
1145 1146 */
1146   - private BabyModel getBabyModel(BabyBookbuildingAddRequest b, boolean isAdd, Integer userId) {
  1147 + private BabyModel getBabyModel(BabyBookbuildingAddRequest b, boolean isAdd, Integer userId,String hospitalId) {
1147 1148 // hujiaqi添加了一个字段,判断是插入还是更新,如果是更新,就不更新birth字段
1148 1149 BabyModel bm = new BabyModel();
1149 1150  
... ... @@ -1161,7 +1162,7 @@
1161 1162 bm.setsINCard(b.getsINCard());//儿童社保卡
1162 1163 //预建档的要加上编码
1163 1164 if (b.getYn() != null && b.getYn() == 0 && StringUtils.isEmpty(b.getEncoded())) {
1164   - String encodedUtil = getEncodedUtil();
  1165 + String encodedUtil = getEncodedUtil(hospitalId);
1165 1166 bm.setEncoded(encodedUtil);
1166 1167 }
1167 1168 bm.setLiveType(b.getLiveType());
... ... @@ -1378,7 +1379,7 @@
1378 1379 * @Author: 武涛涛
1379 1380 * @Date: 2020/7/21 16:07
1380 1381 */
1381   - public String getEncodedUtil() {
  1382 + public String getEncodedUtil(String hospitalId) {
1382 1383  
1383 1384 String encodedBaby = null;
1384 1385 BabyModel babyModel = null;
... ... @@ -1388,6 +1389,7 @@
1388 1389 babyQuery.setCreatedTimeStart(DateUtil.getDayFirstSecond(new Date()));
1389 1390 babyQuery.setCreatedTimeEnd(DateUtil.getDayLastSecond(new Date()));
1390 1391 babyQuery.setEncodedNe(true);
  1392 + babyQuery.setHospitalId(hospitalId);
1391 1393 MongoQuery query = babyQuery.convertToQuery();
1392 1394 List<BabyModel> list = babyBookBuildingDao.queryBabyWithQuery(query.addOrder(Sort.Direction.DESC, "created"));
1393 1395 if (CollectionUtils.isNotEmpty(list)) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java View file @ 7d06be2
... ... @@ -470,7 +470,7 @@
470 470 babyPatientExtendEarMother = babyPatientExtendEarMotherRequest.convertToDataModel();
471 471 }
472 472 String hId = autoMatchFacade.getHospitalId(userId);
473   - String encodedUtil = babyBookbuildingFacade.getEncodedUtil();
  473 + String encodedUtil = babyBookbuildingFacade.getEncodedUtil(hId);
474 474 if (null != baby) {
475 475 String pid = null;
476 476 if (StringUtils.isNotEmpty(baby.getPid())) {//更新本院儿童信息