| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.house.entity.HouseTenantEntity; |
| | |
| | | // 查询对应的房屋地址code |
| | | list = gridService.getAddressCodeListByUserId(AuthUtil.getUserId()); |
| | | } |
| | | if (!placeExt.getRoleName().equals("系统管理员")){ |
| | | placeExt.setCreateUser(AuthUtil.getUserId()); |
| | | } |
| | | } |
| | | placeExt.setCreateUser(AuthUtil.getUserId()); |
| | | return page.setRecords(baseMapper.selectPlaceExtPage(page, placeExt,list)); |
| | | } |
| | | |
| | |
| | | boolean removeFlag = true; |
| | | //更新自身 |
| | | boolean update = updateById(placeExt); |
| | | // 更新场所place 表信息 |
| | | updatePlaceInfo(placeExt); |
| | | // 查询对应已存在的从业人员 |
| | | QueryWrapper<PlacePractitionerEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("place_id",placeExt.getPlaceId()); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 更新场所表信息 |
| | | * @param placeExt |
| | | */ |
| | | public void updatePlaceInfo(PlaceExtVO placeExt) { |
| | | PlaceEntity placeEntity = new PlaceEntity(); |
| | | placeEntity.setId(placeExt.getPlaceId()); |
| | | placeEntity.setPlaceName(placeExt.getPlaceName()); |
| | | if (!Strings.isBlank(placeExt.getLng())) { |
| | | placeEntity.setLng(placeExt.getLng()); |
| | | } |
| | | if (!Strings.isBlank(placeExt.getLat())) { |
| | | placeEntity.setLat(placeExt.getLat()); |
| | | } |
| | | if (!Strings.isBlank(placeExt.getLocation())) { |
| | | placeEntity.setLocation(placeExt.getLocation()); |
| | | } |
| | | // 更新 |
| | | placeService.updateById(placeEntity); |
| | | } |
| | | |
| | | /** |
| | | * 场所详情表 审核 |
| | | * @param placeExt |
| | | * @return |
| | |
| | | placeExt.setConfirmTime(new Date()); |
| | | placeExt.setConfirmUserId(AuthUtil.getUserId()); |
| | | // 更新数据 |
| | | boolean b = updateById(placeExt); |
| | | if (b) { |
| | | PlaceExtEntity entity = getById(placeExt.getId()); |
| | | // 更新任务表状态 |
| | | TaskEntity taskEntity = new TaskEntity(); |
| | | taskEntity.setId(entity.getTaskId()); |
| | | taskEntity.setStatus(placeExt.getConfirmFlag()); |
| | | flag = taskService.updateById(taskEntity); |
| | | } |
| | | flag = updateById(placeExt); |
| | | // if (b) { |
| | | // PlaceExtEntity entity = getById(placeExt.getId()); |
| | | // // 更新任务表状态 |
| | | // TaskEntity taskEntity = new TaskEntity(); |
| | | // taskEntity.setId(entity.getTaskId()); |
| | | // taskEntity.setStatus(placeExt.getConfirmFlag()); |
| | | // flag = taskService.updateById(taskEntity); |
| | | // } |
| | | // 返回 |
| | | return flag; |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean savePlaceExt(PlaceExtEntity placeExt) { |
| | | PlaceEntity placeEntity = placeService.getById(placeExt.getPlaceId()); |
| | | TaskEntity taskEntity = new TaskEntity(); |
| | | taskEntity.setId(placeExt.getTaskId()); |
| | | taskEntity.setStatus(placeExt.getConfirmFlag()); |
| | | taskEntity.setType(1); |
| | | taskEntity.setFrequency(1); |
| | | taskEntity.setName(placeEntity.getPlaceName() + "信息完善"); |
| | | // 新增任务 |
| | | boolean save = taskService.save(taskEntity); |
| | | if (save){ |
| | | placeExt.setTaskId(taskEntity.getId()); |
| | | // PlaceEntity placeEntity = placeService.getById(placeExt.getPlaceId()); |
| | | // TaskEntity taskEntity = new TaskEntity(); |
| | | // taskEntity.setId(placeExt.getTaskId()); |
| | | // taskEntity.setStatus(placeExt.getConfirmFlag()); |
| | | // taskEntity.setType(1); |
| | | // taskEntity.setFrequency(1); |
| | | // taskEntity.setName(placeEntity.getPlaceName() + "信息完善"); |
| | | // // 新增任务 |
| | | // boolean save = taskService.save(taskEntity); |
| | | // if (save){ |
| | | // placeExt.setTaskId(taskEntity.getId()); |
| | | placeExt.setConfirmFlag(1); |
| | | placeExt.setCreateTime(new Date()); |
| | | placeExt.setUpdateTime(new Date()); |
| | | placeExt.setCreateUser(AuthUtil.getUserId()); |
| | | placeExt.setUpdateUser(AuthUtil.getUserId()); |
| | | // 新增场所详情 |
| | | save(placeExt); |
| | | } |
| | | return false; |
| | | boolean save = save(placeExt); |
| | | // } |
| | | return save; |
| | | } |
| | | |
| | | /** |
| | |
| | | // 返回 |
| | | return detail; |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectCount(Long userId, String neiCode, Integer confirmFlag) { |
| | | return baseMapper.selectCount(userId, neiCode, confirmFlag); |
| | | } |
| | | } |