获取管理员

This commit is contained in:
15856 2024-09-05 16:24:36 +08:00
parent e64ea2f2ca
commit 9af5335a71
10 changed files with 48 additions and 35 deletions

View File

@ -43,12 +43,7 @@ public class MaTypeController extends BaseController {
return AjaxResult.success(maTypeList);
}
@ApiOperation(value = "查询全部库管员信息")
@GetMapping("/getMaTypeKeeper")
public AjaxResult getMaTypeKeeper(){
List<MaKeeperUser> maTypeList = iTypeService.getMaTypeKeeper();
return AjaxResult.success(maTypeList);
}
/**
* 工机具类型下拉树

View File

@ -1,15 +1,19 @@
package com.bonus.sgzb.base.controller;
import com.bonus.sgzb.base.domain.MaKeeperUser;
import com.bonus.sgzb.base.service.IMaTypeKeeperService;
import com.bonus.sgzb.common.core.web.controller.BaseController;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 库管员配置ma_type_keeper(MaTypeKeeper)表控制层
*
@ -52,5 +56,11 @@ public class MaTypeKeeperController extends BaseController {
return getDataTable(maTypeKeeperService.getListByMaType(userId, typeName));
}
@ApiOperation(value = "查询全部库管员信息")
@GetMapping("/getMaTypeKeeper")
public AjaxResult getMaTypeKeeper(){
List<MaKeeperUser> maTypeList = maTypeKeeperService.getMaTypeKeeper();
return AjaxResult.success(maTypeList);
}
}

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.base.mapper;
import com.bonus.sgzb.base.domain.MaKeeperUser;
import com.bonus.sgzb.base.vo.DeptUser;
import com.bonus.sgzb.base.vo.MaTypeKeeperVO;
import org.apache.ibatis.annotations.Mapper;
@ -29,5 +30,11 @@ public interface MaTypeKeeperMapper {
* @return
*/
List<MaTypeKeeperVO> selectListByUserId(Long userId, String typeName);
/**
* 查询全部库管员信息
* @return
*/
List<MaKeeperUser> getMaTypeKeeper();
}

View File

@ -88,9 +88,5 @@ public interface MaTypeMapper {
List<MaTypeKeeper> selectMaTypeByUserId(Long userId);
/**
* 查询全部库管员信息
* @return
*/
List<MaKeeperUser> getMaTypeKeeper();
}

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.base.service;
import com.bonus.sgzb.base.domain.MaKeeperUser;
import com.bonus.sgzb.base.vo.DeptUser;
import com.bonus.sgzb.base.vo.MaTypeKeeperVO;
@ -27,5 +28,11 @@ public interface IMaTypeKeeperService {
* @return
*/
List<MaTypeKeeperVO> getListByMaType(Long userId, String typeName);
/**
* 查询全部库管员信息
* @return
*/
List<MaKeeperUser> getMaTypeKeeper();
}

View File

@ -70,9 +70,5 @@ public interface ITypeService {
List<MaType> getEquipmentType(Long typeId, String typeName);
/**
* 查询全部库管员信息
* @return
*/
List<MaKeeperUser> getMaTypeKeeper();
}

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.base.service.impl;
import com.bonus.sgzb.base.domain.MaKeeperUser;
import com.bonus.sgzb.base.mapper.MaTypeKeeperMapper;
import com.bonus.sgzb.base.service.IMaTypeKeeperService;
import com.bonus.sgzb.base.vo.DeptUser;
@ -43,5 +44,14 @@ public class MaTypeKeeperServiceImpl implements IMaTypeKeeperService {
return maTypeKeeperMapper.selectListByUserId(userId, typeName);
}
/**
* 查询全部库管员信息
* @return
*/
@Override
public List<MaKeeperUser> getMaTypeKeeper() {
return maTypeKeeperMapper.getMaTypeKeeper();
}
}

View File

@ -341,14 +341,6 @@ public class MaTypeServiceImpl implements ITypeService {
return list;
}
/**
* 查询全部库管员信息
* @return
*/
@Override
public List<MaKeeperUser> getMaTypeKeeper() {
return maTypeMapper.getMaTypeKeeper();
}
/**
* @Author dingjie
* @Date 2023/12/14

View File

@ -422,15 +422,4 @@
<update id="updateTypeNum">
update ma_type set num = IFNULL( num, 0 ) + 1 where type_id = #{typeId}
</update>
<select id="getMaTypeKeeper" resultType="com.bonus.sgzb.base.domain.MaKeeperUser">
SELECT
mtk.user_id AS userId,
su.user_name AS userName,
su.nick_name AS nickName
FROM
ma_type_keeper mtk
LEFT JOIN sys_user su ON mtk.user_id = su.user_id
GROUP BY
mtk.user_id
</select>
</mapper>

View File

@ -26,4 +26,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_user su on mtk.user_id = su.user_id
</select>
<select id="getMaTypeKeeper" resultType="com.bonus.sgzb.base.domain.MaKeeperUser">
SELECT
mtk.user_id AS userId,
su.user_name AS userName,
su.nick_name AS nickName
FROM
ma_type_keeper mtk
LEFT JOIN sys_user su ON mtk.user_id = su.user_id
GROUP BY
mtk.user_id
</select>
</mapper>