功能优化

This commit is contained in:
hayu 2024-04-11 10:40:04 +08:00
parent 0f1474569f
commit 1784251cf3
3 changed files with 53 additions and 7 deletions

View File

@ -11,13 +11,43 @@ import java.util.List;
*/
@Mapper
public interface WarehouseKeeperMapper {
/**
* 查询库管员配置列表
*
* @param bean
* @return
*/
List<WarehouseKeeper> getWarehouseKeeperInfoAll(WarehouseKeeper bean);
/**
* 根据人员名称查询左侧列表
*
* @param userName
* @return
*/
List<WarehouseKeeper> getMaUserList(String userName);
/**
* 保存
*
* @param list
* @return
*/
int add(List<WarehouseKeeper> list);
/**
* 删除
*
* @param typeId
* @return
*/
int deleteByIds(String typeId);
/**
* 批量删除
*
* @param typeIds
* @return
*/
int deleteByIdsAll(String[] typeIds);
}

View File

@ -8,11 +8,31 @@ import java.util.List;
* @author lsun
*/
public interface WarehouseKeeperService {
/**
* 获取库管员配置列表
* @param bean
* @return List<WarehouseKeeper>
*/
List<WarehouseKeeper> getWarehouseKeeperInfoAll(WarehouseKeeper bean);
/**
* 根据人员名称查询左侧列表
* @param userName
* @return List<WarehouseKeeper>
*/
List<WarehouseKeeper> getMaUserList (String userName);
/**
* 保存
* @param bean
* @return int
*/
int add(WarehouseKeeper bean);
/**
* 删除库管员配置
* @param bean
* @return int
*/
int deleteByIds(WarehouseKeeper bean);
}

View File

@ -23,9 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getWarehouseKeeperInfoAll" resultType="com.bonus.sgzb.base.domain.WarehouseKeeper">
SELECT mt.type_id as modelId ,mt.type_name as modelName,
mt2.type_id, mt2.type_name as typeName,
mt3.type_id as typeId,
mt3.type_id as kindId,mt4.type_name as kindName,
mt2.type_name as typeName,
mt4.type_name as kindName,
su.user_id as userId, su.nick_name as userName
FROM ma_type mt
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
@ -34,9 +33,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type_keeper mtk ON mtk.type_id = mt.type_id
LEFT JOIN sys_user su ON su.user_id = mtk.user_id
WHERE mt.`level` = '4' AND mt.`del_flag` = '0'
<if test="userId != null and userId != ''">
AND su.user_id =#{userId}
</if>
<if test="typeName != null and typeName != ''">
AND mt2.type_name like concat('%', #{typeName}, '%')
</if>