feat: 外标引用标准单独查询权限-支持传标准号不传Id
This commit is contained in:
+1
-1
@@ -109,5 +109,5 @@ public interface EnterpriseStandardAuthUserService extends IService<EnterpriseSt
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
boolean fbDetailPermission(String standardId, String userId);
|
||||
boolean fbDetailPermission(String standardId, String standardNumber, String userId);
|
||||
}
|
||||
|
||||
+12
-1
@@ -11,6 +11,7 @@ import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.util.MessageUtils;
|
||||
import com.jero.modules.laws.common.constant.FieldCommon;
|
||||
import com.jero.modules.laws.common.vo.ManyStandardSelectionBox;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardAuthDept;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardAuthUser;
|
||||
import com.jero.modules.laws.enterprise.mapper.EnterpriseStandardAuthUserMapper;
|
||||
@@ -18,6 +19,7 @@ import com.jero.modules.laws.enterprise.service.EnterpriseStandardAuthDeptServic
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardAuthUserService;
|
||||
import com.jero.modules.laws.standard.controller.TempAuthRecordQueryDto;
|
||||
import com.jero.modules.laws.standard.entity.LawsEnterpriseStandard;
|
||||
import com.jero.modules.laws.standard.entity.LawsOverseasStandard;
|
||||
import com.jero.modules.laws.standard.entity.LawsStandardTempPermission;
|
||||
import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
|
||||
import com.jero.modules.laws.standard.service.ILawsOverseasStandardService;
|
||||
@@ -504,7 +506,16 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean fbDetailPermission(String standardId, String userId) {
|
||||
public boolean fbDetailPermission(String standardId, String standardNumber,String userId) {
|
||||
if (StrUtil.isBlank(standardId) && StrUtil.isBlank(standardNumber)) {
|
||||
throw new JeroBootException("标准id和标准编号不能同时为空");
|
||||
}
|
||||
if (StrUtil.isBlank(standardId)) {
|
||||
LambdaQueryWrapper<LawsOverseasStandard> fbWrapper = new LambdaQueryWrapper<>();
|
||||
fbWrapper.eq(LawsOverseasStandard::getStandardNumber, standardNumber);
|
||||
LawsOverseasStandard fb = fbService.getOne(fbWrapper);
|
||||
standardId = fb.getId();
|
||||
}
|
||||
// 管理员有所有企标的权限
|
||||
SysUser currentUser = sysUserService.getById(userId);
|
||||
// 管理员有所有企标的权限
|
||||
|
||||
+1
-1
@@ -146,7 +146,7 @@ public class LawsOverseasController {
|
||||
public Result<Map<String,Object>> getByIdAndModule(@RequestParam(name="id", required = false) @ApiParam("主键") String id,
|
||||
@RequestParam(name="type") @ApiParam("类型(1详情,2新增编辑)") String type,
|
||||
@RequestParam(name="standardNumber", required = false) @ApiParam("标准编号") String standardNumber) {
|
||||
if (!authUserService.fbDetailPermission(id, UserUtils.getUserId())) {
|
||||
if (!authUserService.fbDetailPermission(id, standardNumber, UserUtils.getUserId())) {
|
||||
throw new JeroBootException("暂无该外标查看权限");
|
||||
}
|
||||
lawsCommonService.addLookHistory(id, type, MODULE_VALUE, standardNumber);
|
||||
|
||||
Reference in New Issue
Block a user