Commit eb7ff1de authored by huyuchen's avatar huyuchen

huych-权限修改

parent eb16fdc5
......@@ -23,7 +23,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.plugin.excel.annotation.RequestExcel;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpChangeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService;
......@@ -145,6 +144,20 @@ public class TEmpChangeInfoController {
,@RequestParam(required = false) String customerId, @RequestParam(required = false) String flag) {
return new R<>(tEmpChangeInfoService.getAllDeptPagePermission(page,departName, nameOrNo, customerId,flag));
}
/**
* 分页查询获取所有项目名称(缩小范围)
* @param page 分页对象
* @return
*/
@Operation(description = "分页查询缩小范围")
@GetMapping("/getDeptPagePermission" )
public R<IPage<TSettleDomain>> getDeptPagePermission(Page page, @RequestParam(required = false) String departName
,@RequestParam(required = false) String nameOrNo
,@RequestParam(required = false) String customerId, @RequestParam(required = false) String flag) {
return new R<>(tEmpChangeInfoService.getDeptPagePermission(page,departName, nameOrNo, customerId,flag));
}
/**
* 获取所有项目名称
* @return R
......
......@@ -22,7 +22,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCutsomerDataPermisson;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpChangeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoNewVO;
......@@ -86,7 +85,18 @@ public interface TEmpChangeInfoService extends IService<TEmpChangeInfo> {
*/
IPage<TSettleDomain> getAllDeptPagePermission(Page page, String departName, String nameOrNo, String customerId,String flag);
/**
* 分页获取项目名称缩小可见范围
*
* @author wzb
* @param page
* @param departName
* @param nameOrNo
* @param customerId
* @param flag
* @return {@link IPage< TSettleDomain>}
*/
IPage<TSettleDomain> getDeptPagePermission(Page page, String departName, String nameOrNo, String customerId,String flag);
IPage<TSettleDomain> getAllDeptPage(Page page, String deptName, String nameOrNo, String customerId,String flag);
R<Boolean> changeEmpProArcNew(TEmpChangeInfoNewVO changeVo);
......
......@@ -368,6 +368,36 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
}
/**
* 分页获取项目名称缩小可见范围
*
* @author wzb
* @param page
* @param departName
* @param nameOrNo
* @param customerId
* @param flag
* @return {@link IPage< TSettleDomain>}
*/
@Override
public IPage<TSettleDomain> getDeptPagePermission(Page page, String departName, String nameOrNo, String customerId,String flag) {
YifuUser user = SecurityUtils.getUser();
String userId=user.getId();
// SSC开发组-1668092146875969537L 超管1
long roleId = 1668092146875969537L;
boolean isSsc = this.haveRole(user, roleId);
long roleIdMan = 1839501715787390978L;
boolean isAdmin =this.haveRole(user, roleIdMan);
if (!isSsc) {
isSsc = this.haveRole(user, 1L);
}
if (isSsc || isAdmin) {
userId = "-999";
}
return tSettleDomainMapper.getPagePerMission(page, userId, departName, nameOrNo, customerId, flag);
}
/**
* @Description: 检测是否有某个角色权限
* @Author: hgw
......
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