Commit ddea7bfda0b2884a9a59134bcc2cb2c9f3d92e43
1 parent
55f03c930e
Exists in
master
and in
6 other branches
操作日志
Showing 2 changed files with 35 additions and 10 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
ddea7bf
... | ... | @@ -89,6 +89,10 @@ |
89 | 89 | @Autowired |
90 | 90 | private MongoTemplate mongoTemplate; |
91 | 91 | |
92 | + | |
93 | + @Autowired | |
94 | + private OperateLogFacade operateLogFacade; | |
95 | + | |
92 | 96 | /** |
93 | 97 | * 处理区域隐藏建档 |
94 | 98 | * |
... | ... | @@ -278,6 +282,12 @@ |
278 | 282 | |
279 | 283 | //复诊,修改产检管理 |
280 | 284 | antenatalExaminationService.updateAntExRecord(antExAddRequest.getId(), 2); |
285 | + | |
286 | + | |
287 | + AntExQuery antExQuery = new AntExQuery(); | |
288 | + antExQuery.setId(antExAddRequest.getId()); | |
289 | + List<AntenatalExaminationModel> list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); | |
290 | + operateLogFacade.addModifyOptLog(userId, Integer.parseInt(hospitalId), list.get(0), model, OptActionEnums.UPDATE.getId(), "修改复诊"); | |
281 | 291 | } else { |
282 | 292 | model.setOperator(userId); |
283 | 293 | model.setYn(YnEnums.YES.getId()); |
... | ... | @@ -320,6 +330,9 @@ |
320 | 330 | |
321 | 331 | antenatalExaminationService.addOneBabyAnt(model); |
322 | 332 | |
333 | + | |
334 | + operateLogFacade.addAddOptLog(userId, Integer.parseInt(hospitalId), model, OptActionEnums.ADD.getId(), "添加复诊"); | |
335 | + | |
323 | 336 | /** 验证产检券是否可用 可用就改为已使用状态 */ |
324 | 337 | if(StringUtils.isNotBlank(antExAddRequest.getCouponCode()) && antExAddRequest.getCouponType() != null) { |
325 | 338 | BaseObjectResponse resp = couponService.validate(antExAddRequest.getCouponCode(), antExAddRequest.getCouponType(), autoMatchFacade.getHospitalId(userId)); |
... | ... | @@ -460,6 +473,14 @@ |
460 | 473 | setLashCTimes(antExChuModel.getParentId()); |
461 | 474 | |
462 | 475 | antenatalExaminationService.updateAntExRecord(antExChuModel.getId(), 1); |
476 | + | |
477 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
478 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
479 | + antExChuQuery.setId(antExChuModel.getId()); | |
480 | + List<AntExChuModel> list = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
481 | + | |
482 | + operateLogFacade.addModifyOptLog(userId, Integer.parseInt(hospitalId), list.get(0), antExChuModel, OptActionEnums.UPDATE.getId(), "修改初诊"); | |
483 | + | |
463 | 484 | //修改数据 |
464 | 485 | syncMaster(excAddRequest.getParentId(),excAddRequest.getNextCheckTime()); |
465 | 486 | } else { |
... | ... | @@ -513,6 +534,10 @@ |
513 | 534 | antExChuModel.setHospitalId(hospitalId); |
514 | 535 | stopWatch.start("queryAntExChu"); |
515 | 536 | antenatalExaminationService.addOneAntEx(antExChuModel); |
537 | + | |
538 | + | |
539 | + operateLogFacade.addAddOptLog(userId,Integer.parseInt(hospitalId),antExChuModel,OptActionEnums.ADD.getId(),"添加初诊"); | |
540 | + | |
516 | 541 | stopWatch.stop(); |
517 | 542 | /** 把优惠券设置为已使用状态 */ |
518 | 543 | stopWatch.start("couponService.use"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
ddea7bf
... | ... | @@ -32,6 +32,7 @@ |
32 | 32 | import com.lyms.platform.pojo.*; |
33 | 33 | import com.lyms.platform.query.*; |
34 | 34 | import org.apache.commons.collections.CollectionUtils; |
35 | +import org.apache.lucene.util.BytesRefHash; | |
35 | 36 | import org.springframework.beans.factory.annotation.Autowired; |
36 | 37 | import org.springframework.beans.factory.annotation.Qualifier; |
37 | 38 | import org.springframework.data.domain.Sort; |
... | ... | @@ -672,7 +673,7 @@ |
672 | 673 | // String hospitalName = organizationService.getOrganization(Integer.valueOf(request.getHospitalId())).getName(); |
673 | 674 | model = babyBookbuildingService.addBabyBookbuilding(model); |
674 | 675 | |
675 | - operateLogFacade.addAddOptLog(userId,Integer.valueOf(request.getHospitalId()),model,OptActionEnums.ADD.getId(),"儿童建档"); | |
676 | + operateLogFacade.addAddOptLog(userId, Integer.valueOf(request.getHospitalId()), model, OptActionEnums.ADD.getId(), "儿童建档"); | |
676 | 677 | |
677 | 678 | if (model == null || model.getId() == null) { |
678 | 679 | br.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR); |
... | ... | @@ -1932,7 +1933,6 @@ |
1932 | 1933 | list.add("2"); |
1933 | 1934 | babyQuery.setEnableListNot(list); |
1934 | 1935 | OrganizationQuery organizationQuery = new OrganizationQuery(); |
1935 | - | |
1936 | 1936 | if(!StringUtils.isEmpty(request.getHospitalId())){ |
1937 | 1937 | hospitalIdList.add(request.getHospitalId()); |
1938 | 1938 | }else if(!StringUtils.isEmpty(request.getHospitalAreaId())){ |
... | ... | @@ -1955,11 +1955,6 @@ |
1955 | 1955 | } |
1956 | 1956 | } |
1957 | 1957 | |
1958 | -// String hospital = autoMatchFacade.getHospitalId(userId); | |
1959 | -// if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(hospital) && !hospitalIdList.contains(hospital)) { | |
1960 | -// hospitalIdList.add(hospital); | |
1961 | -// } | |
1962 | - | |
1963 | 1958 | List<String> permissions = new ArrayList<>(); |
1964 | 1959 | DataPermissionsModelQuery dataPermissionsModelQuery = new DataPermissionsModelQuery(); |
1965 | 1960 | dataPermissionsModelQuery.setUserId(userId); |
... | ... | @@ -1973,9 +1968,14 @@ |
1973 | 1968 | } |
1974 | 1969 | } |
1975 | 1970 | |
1976 | - hospitalIdList.retainAll(permissions); | |
1977 | - | |
1978 | - | |
1971 | + if (CollectionUtils.isNotEmpty(hospitalIdList)) | |
1972 | + { | |
1973 | + hospitalIdList.retainAll(permissions); | |
1974 | + } | |
1975 | + else | |
1976 | + { | |
1977 | + hospitalIdList.addAll(permissions); | |
1978 | + } | |
1979 | 1979 | }else{ |
1980 | 1980 | String hospitalId = ""; |
1981 | 1981 | //得到当前登录的医院id |