Merge remote-tracking branch 'origin/master'
| | |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { |
| | | Result<IPage<SysUser>> result = new Result<IPage<SysUser>>(); |
| | | Page<SysUser> page = new Page<SysUser>(pageNo, pageSize); |
| | | String BaseFactoryId = req.getParameter("BaseFactoryId"); |
| | | String baseFactoryId = req.getParameter("factoryId"); |
| | | String username=req.getParameter("username"); |
| | | IPage<SysUser> pageList = sysUserService.getUserByworkShopDepartId(page, BaseFactoryId,username); |
| | | IPage<SysUser> pageList = sysUserService.getUserByworkShopDepartId(page, baseFactoryId,username); |
| | | result.setSuccess(true); |
| | | result.setResult(pageList); |
| | | return result; |
| | |
| | | @ApiOperation(value="设备车间管理与用户-通过id删除", notes="设备车间管理与用户-通过id删除") |
| | | //@RequiresPermissions("org.jeecg.modules.mdc:sys_work_shop_depart_user:delete") |
| | | @DeleteMapping(value = "/delete") |
| | | public Result<String> delete(String id, String BaseFactoryId) { |
| | | public Result<String> delete(String id, String factoryId) { |
| | | QueryWrapper<BaseFactoryUser> queryWrapper = new QueryWrapper<BaseFactoryUser>(); |
| | | queryWrapper.eq("work_shop_depart_id", BaseFactoryId) |
| | | queryWrapper.eq("factory_id", factoryId) |
| | | .eq("user_id", id); |
| | | BaseFactoryUserService.remove(queryWrapper); |
| | | return Result.OK("删除成功!"); |
| | |
| | | @ApiOperation(value="设备车间管理与用户-批量删除", notes="设备车间管理与用户-批量删除") |
| | | //@RequiresPermissions("org.jeecg.modules.mdc:sys_work_shop_depart_user:deleteBatch") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | public Result<String> deleteBatch(String ids,String BaseFactoryId) { |
| | | public Result<String> deleteBatch(String ids,String factoryId) { |
| | | QueryWrapper<BaseFactoryUser> queryWrapper = new QueryWrapper<BaseFactoryUser>(); |
| | | queryWrapper.eq("work_shop_depart_id", BaseFactoryId) |
| | | queryWrapper.eq("factory_id", factoryId) |
| | | .in("user_id", Arrays.asList(ids.split(","))); |
| | | BaseFactoryUserService.remove(queryWrapper); |
| | | return Result.OK("批量删除成功!"); |
| | |
| | | package org.jeecg.modules.eam.base.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveBaseFactoryData(BaseFactory BaseFactory) { |
| | | if (BaseFactory != null) { |
| | | if (BaseFactory.getParentId() == null) { |
| | | if (BaseFactory.getParentId() == null|| StrUtil.isEmpty(BaseFactory.getParentId())) { |
| | | BaseFactory.setParentId(""); |
| | | BaseFactory.setFactoryCategory("0"); |
| | | } |
| | | if (BaseFactory.getFactoryCategory() == null|| StrUtil.isEmpty(BaseFactory.getFactoryCategory())) { |
| | | BaseFactory.setFactoryCategory("1"); |
| | | } |
| | | BaseFactory.setId(IdWorker.getIdStr(BaseFactory)); |
| | | // 先判断该对象有无父级ID,有则意味着不是最高级,否则意味着是最高级 |
| | |
| | | */ |
| | | @TableField(exist = false) |
| | | private String homePath; |
| | | @Dict(dicCode = "id",dictTable = "mom_base_team",dicText = "name") |
| | | // @Dict(dicCode = "id",dictTable = "mom_base_team",dicText = "name") |
| | | private String teamId; |
| | | @Dict(dicCode = "id",dictTable = "mom_base_area",dicText = "name") |
| | | // @Dict(dicCode = "id",dictTable = "mom_base_area",dicText = "name") |
| | | private String areaId; |
| | | |
| | | /** |
| | |
| | | * @param workShopDepartId 设备车间管理Id |
| | | * @return |
| | | */ |
| | | IPage<SysUser> getUserByWorkShopDepartId(Page page, @Param("workShopDepartId") String workShopDepartId, @Param("username") String username); |
| | | IPage<SysUser> getUserByWorkShopDepartId(Page page, @Param("baseFactoryId") String baseFactoryId, @Param("username") String username); |
| | | |
| | | /** |
| | | * 根据用户名设置部门ID |
| | |
| | | </foreach> |
| | | </select> |
| | | <select id="getUserByWorkShopDepartId" resultType="org.jeecg.modules.system.entity.SysUser"> |
| | | select * from sys_user where del_flag = 0 and id in (select user_id from mom_eam_work_shop_depart_user where work_shop_depart_id = #{workShopDepartId}) |
| | | select * from sys_user where del_flag = 0 and id in (select user_id from eam_base_factory_user where factory_id = #{baseFactoryId}) |
| | | <if test="username!=null and username!=''"> |
| | | and username = #{username} |
| | | </if> |
| | |
| | | /** |
| | | * 根据设备车间管理Id查询 |
| | | * @param page |
| | | * @param workShopDepartId 设备车间管理Id |
| | | * @param baseFactoryId 设备车间管理Id |
| | | * @return |
| | | */ |
| | | public IPage<SysUser> getUserByworkShopDepartId(Page<SysUser> page,String workShopDepartId,String username); |
| | | public IPage<SysUser> getUserByworkShopDepartId(Page<SysUser> page,String baseFactoryId,String username); |
| | | |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 根据设备车间管理Id查询 |
| | | * @param page |
| | | * @param workShopDepartId 设备车间管理Id |
| | | * @param baseFactoryId 设备车间管理Id |
| | | * @return |
| | | */ |
| | | public IPage<SysUser> getUserByworkShopDepartId(Page<SysUser> page,String workShopDepartId,String username){ |
| | | return userMapper.getUserByWorkShopDepartId(page,workShopDepartId,username); |
| | | public IPage<SysUser> getUserByworkShopDepartId(Page<SysUser> page,String baseFactoryId,String username){ |
| | | return userMapper.getUserByWorkShopDepartId(page,baseFactoryId,username); |
| | | } |
| | | |
| | | |