| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.house.entity.HouseTenantEntity; |
| | | import org.springblade.modules.house.vo.HouseTenantVO; |
| | | import org.springblade.modules.place.entity.PlaceEntity; |
| | |
| | | @Autowired |
| | | private IPlacePractitionerService placePractitionerService; |
| | | |
| | | @Autowired |
| | | private IGridService gridService; |
| | | |
| | | /** |
| | | * 自定义查询 |
| | | * @param page |
| | |
| | | */ |
| | | @Override |
| | | public IPage<PlaceExtVO> selectPlaceExtPage(IPage<PlaceExtVO> page, PlaceExtVO placeExt) { |
| | | return page.setRecords(baseMapper.selectPlaceExtPage(page, placeExt)); |
| | | List<String> list = new ArrayList<>(); |
| | | if (null!=placeExt.getRoleName() && !placeExt.getRoleName().equals("")){ |
| | | if (placeExt.getRoleName().equals("网格员")){ |
| | | // 查询对应的房屋地址code |
| | | list = gridService.getAddressCodeListByUserId(AuthUtil.getUserId()); |
| | | } |
| | | if (!placeExt.getRoleName().equals("系统管理员")){ |
| | | placeExt.setCreateUser(AuthUtil.getUserId()); |
| | | } |
| | | } |
| | | return page.setRecords(baseMapper.selectPlaceExtPage(page, placeExt,list)); |
| | | } |
| | | |
| | | /** |
| | |
| | | taskEntity.setId(placeExt.getTaskId()); |
| | | taskEntity.setStatus(placeExt.getConfirmFlag()); |
| | | taskEntity.setType(1); |
| | | taskEntity.setFrequency(3); |
| | | taskEntity.setName(placeEntity.getPlaceName() + "信息完善任务" + System.currentTimeMillis()); |
| | | taskEntity.setFrequency(1); |
| | | taskEntity.setName(placeEntity.getPlaceName() + "信息完善"); |
| | | // 新增任务 |
| | | boolean save = taskService.save(taskEntity); |
| | | if (save){ |