qianxb пре 2 година
родитељ
комит
064b79b180

+ 2 - 2
blade-service/blade-archive/src/main/java/org/springblade/archive/controller/ArchivesAutoController.java

@@ -166,9 +166,9 @@ public class ArchivesAutoController extends BladeController {
 	@ApiImplicitParams({
 			@ApiImplicitParam(name = "archiveType", value = "1业主2施工3监理", required = true),
 	})
-	public void getArchivesAuthByUser(Long projectId,Long contractId,Integer archiveType) {
+	public R getArchivesAuthByUser(Long projectId,Long contractId,Integer archiveType) {
 		archivesAutoService.getArchivesAuthByUser(projectId,contractId,archiveType);
-
+		return R.success("切换成功");
 	}
 
 	/**

+ 7 - 0
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchivesAutoServiceImpl.java

@@ -259,6 +259,13 @@ public class ArchivesAutoServiceImpl extends BaseServiceImpl<ArchivesAutoMapper,
 		BladeUser user = AuthUtil.getUser();
 		String name = baseMapper.getUserRoleName(projectId,contractId,user.getUserId());
 		if (!(name.contains("超级管理员") || (contractType == 3))) {
+			if (contractType == 1){
+				contractType = 2;
+			}else if (contractType == 2){
+				contractType = 3;
+			}else {
+				contractType = 1;
+			}
 			if (contractType != archiveType){
 				throw new ServiceException("无权限查看");
 			}