| | |
| | | gridBind(placeVO); |
| | | // 警务网格绑定 |
| | | jwGridCodeBind(placeVO); |
| | | // 保存从业人员 |
| | | savePlacePractitioner(placeVO); |
| | | // 返回结果 |
| | | return flag; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 保存从业人员 |
| | | * |
| | | * @param placeVO |
| | | */ |
| | | private void savePlacePractitioner(PlaceVO placeVO) { |
| | | if (placeVO.getPlacePractitioner() != null) { |
| | | IPlacePractitionerService practitionerService = SpringUtil.getBean(IPlacePractitionerService.class); |
| | | List<PlacePractitionerEntity> placePractitioner = placeVO.getPlacePractitioner(); |
| | | for (PlacePractitionerEntity placePractitionerEntity : placePractitioner) { |
| | | placePractitionerEntity.setPlaceId(placeVO.getId()); |
| | | } |
| | | practitionerService.saveOrUpdateBatch(placeVO.getPlacePractitioner()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void savePlaceExtAndTaskInfo(PlaceVO placeVO) { |
| | | PlaceExtEntity placeExtEntity = new PlaceExtEntity(); |
| | | placeExtEntity.setPlaceId(placeVO.getId()); |
| | | // 判断是否已存在,已存在则不新增 |
| | | QueryWrapper<PlaceExtEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("is_deleted", 0) |
| | | .eq("place_id", placeVO.getId()); |
| | | PlaceExtEntity one = placeExtService.getOne(wrapper); |
| | | if (null == one) { |
| | | PlaceExtEntity extServiceOne = placeExtService.getOne(wrapper); |
| | | if (null == extServiceOne) { |
| | | // 判断是否有传 |
| | | if (placeVO.getPlaceExtEntity() != null) { |
| | | placeExtEntity = placeVO.getPlaceExtEntity(); |
| | | } |
| | | placeExtEntity.setPlaceId(placeVO.getId()); |
| | | // 默认给待完善状态 |
| | | placeExtEntity.setConfirmFlag(4); |
| | |
| | | // 新增场所详情 |
| | | placeExtService.save(placeExtEntity); |
| | | } else { |
| | | placeExtService.updateById(placeVO.getPlaceExtEntity()); |
| | | if (placeVO.getPlaceExtEntity() != null) { |
| | | placeExtService.updateById(placeVO.getPlaceExtEntity()); |
| | | } |
| | | } |
| | | } |
| | | |