Commit c462d75e authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.5.8' into MVP1.5.8

parents 66a207a2 5b2ee3b5
......@@ -52,7 +52,7 @@ public class SysUserPermission extends BaseEntity {
private String empDept;
/**
* 权限类型
* 权限类型 客户、商机、报价单、
* 1客户权限;2商机;3报价单;4合同;5项目;6BU;7条线;8部门;9收入归属
*/
@Schema(description = "权限类型")
......
......@@ -154,4 +154,16 @@ public class SysUserInfoController {
return R.ok(sysUserInfoService.testPermission(menuId, userId));
}
/**
* 简单分页查询
*
* @param page 分页对象
* @param code 新权限-账号管理表
* @return
*/
@Operation(description = "根据编码或者登录名简单分页查询")
@GetMapping("/getUserByCodeOrLoginName")
public R<IPage<SysUserInfo>> getUserByCodeOrLoginName(Page<SysUserInfo> page, String code) {
return new R<>(sysUserInfoService.getUserByCodeOrLoginName(page, code));
}
}
......@@ -42,7 +42,7 @@ public class SysUserPermissionController {
* @param sysUserPermission 新权限-用户权限表
* @return
*/
@Operation(description = "简单分页查询")
@Operation(summary = "简单分页查询",description = "简单分页查询")
@GetMapping("/page")
public R<IPage<SysUserPermission>> getSysUserPermissionPage(Page<SysUserPermission> page, SysUserPermissionSearchVo sysUserPermission) {
return new R<>(sysUserPermissionService.getSysUserPermissionPage(page, sysUserPermission));
......@@ -66,7 +66,7 @@ public class SysUserPermissionController {
* @param sysUserPermission 新权限-用户权限表
* @return R
*/
@Operation(description = "新增用户权限表:hasPermission('permission_sysuserpermission_add')")
@Operation(summary = "新增用户权限表",description = "新增用户权限表:hasPermission('permission_sysuserpermission_add')")
@SysLog("新增用户权限表")
@PostMapping("/savePermission")
@PreAuthorize("@pms.hasPermission('permission_sysuserpermission_add')")
......@@ -80,7 +80,7 @@ public class SysUserPermissionController {
* @param sysUserPermissionList 用户权限表list
* @return R
*/
@Operation(description = "修改用户权限表:hasPermission('permission_sysuserpermission_edit')")
@Operation(summary = "修改用户权限表",description = "修改用户权限表:hasPermission('permission_sysuserpermission_edit')")
@SysLog("修改用户权限表")
@PostMapping("/updatePermission")
@PreAuthorize("@pms.hasPermission('permission_sysuserpermission_edit')")
......@@ -97,7 +97,7 @@ public class SysUserPermissionController {
* @param idList
* @return R
*/
@Operation(description = "通过id删除用户权限表:hasPermission('permission_sysuserpermission_del')")
@Operation(summary = "通过id删除用户权限表",description = "通过id删除用户权限表:hasPermission('permission_sysuserpermission_del')")
@SysLog("通过id删除用户权限表")
@PostMapping("/deleteByIds")
@PreAuthorize("@pms.hasPermission('permission_sysuserpermission_del')")
......@@ -112,7 +112,7 @@ public class SysUserPermissionController {
* @date 2023-08-29 14:49:40
**/
@SneakyThrows
@Operation(description = "批量新增用户权限表 hasPermission('permission_sysuserpermission-batch-import')")
@Operation(summary = "批量新增用户权限表",description = "批量新增用户权限表 hasPermission('permission_sysuserpermission-batch-import')")
@SysLog("批量新增用户权限表")
@PostMapping("/importListAdd")
@PreAuthorize("@pms.hasPermission('permission_sysuserpermission-batch-import')")
......@@ -126,7 +126,7 @@ public class SysUserPermissionController {
* @author hyc
* @date 2023-08-29 14:49:40
**/
@Operation(description = "导出用户权限表")
@Operation(summary = "导出用户权限表",description = "导出用户权限表")
@PostMapping("/export")
@SysLog("批量导出用户权限表")
public void export(HttpServletResponse response, @RequestBody SysUserPermissionSearchVo searchVo) {
......@@ -140,7 +140,7 @@ public class SysUserPermissionController {
* @param searchVo 新权限-用户权限表
* @return
*/
@Operation(description = "根据名称,编码模糊搜索")
@Operation(summary = "根据名称,编码模糊搜索",description = "根据名称,编码模糊搜索")
@GetMapping("/customerPage")
public R<IPage<SysUserDeptVo>> getNameCodePage(Page<SysUserDeptVo> page, SysUserDeptVo searchVo) {
return new R<>(sysUserPermissionService.getNameCodePage(page,searchVo));
......@@ -152,7 +152,7 @@ public class SysUserPermissionController {
* @param type 字典类型
* @return
*/
@Operation(description = "根据类型查询字典值")
@Operation(summary = "根据类型查询字典值",description = "根据类型查询字典值")
@PostMapping("/selectDictByType")
public R<List<SysDictVo>> selectDictByType(@RequestParam String type) {
return new R<>(sysUserPermissionService.selectDictByType(type));
......
......@@ -62,6 +62,11 @@ public interface SysUserInfoMapper extends BaseMapper<SysUserInfo> {
**/
int getAuthByUserIdAndMenuId(@Param("menuId") String menuId, @Param("userId") String userId);
/**
* @Description: 根据编码或者登录名简单分页查询
* @Author: huyc
* @Date: 2023/9/11 10:00
* @return:
**/
IPage<SysUserInfo> getUserByCodeOrLoginName(Page<SysUserInfo> page, @Param("code") String code);
}
......@@ -109,6 +109,14 @@ public interface SysUserPermissionMapper extends BaseMapper<SysUserPermission> {
*/
List<SysDictVo> selectDictByType(@Param("type") String type);
/**
* 根据类型查询字典值
*
* @param type 类型
* @return
*/
List<SysDictVo> selectDictByTypeOne(@Param("type") String type,@Param("userId") String userId);
/**
* 根据类型和名称判断字典值是否存在
*
......
......@@ -77,4 +77,6 @@ public interface SysUserInfoService extends IService<SysUserInfo> {
**/
String testPermission(String menuId, String userId);
IPage<SysUserInfo> getUserByCodeOrLoginName(Page<SysUserInfo> page, String code);
}
......@@ -34,7 +34,6 @@ import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserInfo;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserInfoSaveVo;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserInfoSearchVo;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserRoleResSearchVo;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
......@@ -222,4 +221,15 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
return "";
}
/**
* 新权限-账号管理表简单分页查询
*
* @param code
* @return
*/
@Override
public IPage<SysUserInfo> getUserByCodeOrLoginName(Page<SysUserInfo> page, String code) {
return baseMapper.getUserByCodeOrLoginName(page, code);
}
}
......@@ -181,7 +181,12 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
@Override
public List<SysDictVo> selectDictByType(String type) {
return baseMapper.selectDictByType(type);
YifuUser user = SecurityUtils.getUser();
if ("permission".equals(type) && !CommonConstants.ONE_STRING.equals(user.getId())) {
return baseMapper.selectDictByTypeOne(type,CommonConstants.ZERO_STRING);
} else {
return baseMapper.selectDictByType(type);
}
}
@Override
......
......@@ -193,4 +193,19 @@
) a
</select>
<select id="getUserByCodeOrLoginName" resultMap="sysUserInfoMap">
SELECT
a.fd_id,
a.fd_name,
a.fd_login_name,
a.fd_dept_name
FROM sys_user_info a
<where>
1=1
<if test="code != null and code != ''">
AND (a.fd_login_name like concat('%',#{code},'%') or a.fd_name like concat('%',#{code},'%'))
</if>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
......@@ -212,6 +212,13 @@
where a.dict_type = #{type}
</select>
<select id="selectDictByTypeOne" resultMap="dictMap">
SELECT
a.dict_id as id,a.name
from permission_type a
where a.dict_type = #{type} and a.user_id = #{userId}
</select>
<!--针对BU归属和条线类型时的存在判断-->
<select id="selectDictByName" resultType="java.lang.Integer">
SELECT
......
......@@ -26,7 +26,7 @@ mybatis-plus:
logic-not-delete-value: 0
configuration:
map-underscore-to-camel-case: true
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# spring security 配置
security:
......
......@@ -1948,9 +1948,15 @@
<sql id="where_getFundDisRecord">
a.DELETE_FLAG = 0
AND a.fund_id is not null
AND a.STATUS in ('2','4')
AND a.DISPATCH_ITEM like concat('%','公积金','%')
<if test="tDispatchInfo != null">
<!-- dispatch-status 未提交1待审核2审核通过3审核不通过4办理完成5待SSC审核 -->
<if test='tDispatchInfo.auditStatus != null and tDispatchInfo.auditStatus.trim() == "0" '>
AND a.STATUS in ('2','4')
</if>
<if test='tDispatchInfo.auditStatus != null and tDispatchInfo.auditStatus.trim() == "1" '>
AND a.STATUS in ('1','5')
</if>
<if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD_NAME = #{tDispatchInfo.providentHouseholdName}
</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment