| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.flowable.idm.engine.impl.persistence.entity.UserEntity; |
| | | import org.springblade.common.cache.SysCache; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.core.tool.utils.SpringUtil; |
| | | import org.springblade.modules.grid.entity.GridEntity; |
| | | import org.springblade.modules.grid.entity.GridmanEntity; |
| | | import org.springblade.modules.grid.excel.GridmanExcel; |
| | |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.grid.service.IGridmanService; |
| | | import org.springblade.modules.grid.vo.GridmanVO; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.entity.Region; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IRegionService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | /** |
| | | * 网格员表 自定义新增或修改 |
| | | * |
| | | * @param gridman |
| | | * @return |
| | | */ |
| | |
| | | wrapper.eq("is_deleted", 0).eq("account", gridman.getMobile()); |
| | | List<User> list = userService.list(wrapper); |
| | | // 更新用户,查询是否需要更新角色 |
| | | // 查询网格id |
| | | IGridService bean = SpringUtil.getBean(IGridService.class); |
| | | GridEntity gridEntity = bean.getOne(Wrappers.<GridEntity>lambdaQuery().eq(GridEntity::getGridCode, gridman.getGridCode())); |
| | | gridman.setGridId(gridEntity.getId()); |
| | | if (list.size() > 0) { |
| | | // 默认取出第一个 |
| | | User user = list.get(0); |
| | |
| | | |
| | | /** |
| | | * 用户新增 |
| | | * |
| | | * @param gridman |
| | | */ |
| | | public void saveUser(GridmanEntity gridman) { |
| | |
| | | |
| | | /** |
| | | * 网格员导入 |
| | | * |
| | | * @param data |
| | | * @param isCovered |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询网格id |
| | | * |
| | | * @param userId |
| | | * @return |
| | | */ |