From 0a4c7c2b7a73b89c9ac3845f98cac96765a78384 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期三, 03 四月 2024 10:21:54 +0800 Subject: [PATCH] git ch --- server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java index 1ae0751..252e5f9 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java @@ -135,13 +135,17 @@ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"鏈煡璇㈠埌鏂规淇℃伅"); } - if( -// Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.UPLOAD.getKey()) -// ||Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.SIGNATURE.getKey()) -// || - Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.APPROVE.getKey())){ - //宸叉彁浜ゅ拰宸插畬鎴愮姸鎬佷笉鏀寔瀹℃牳涓嶉�氳繃 - throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵"); + if(Constants.equalsInteger(solutions.getType(),Constants.ZERO)){ + if(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.APPROVE.getKey())){ + //宸叉彁浜ゅ拰宸插畬鎴愮姸鎬佷笉鏀寔瀹℃牳涓嶉�氳繃 + throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵"); + } + }else if(Constants.equalsInteger(solutions.getType(),Constants.ZERO)){ + if(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.UPLOAD.getKey()) + || Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.SIGNATURE.getKey()) ){ + //宸叉彁浜ゅ拰宸插畬鎴愮姸鎬佷笉鏀寔瀹℃牳涓嶉�氳繃 + throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵"); + } } LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); ApplyChange update = new ApplyChange(); @@ -1606,14 +1610,10 @@ }else if(applyChangeOptDTO.getOptType().equals(6)){ //浼佷笟鍏抽棴 applyLogType = Constants.ApplyLogType.CA_COMPANY_CLOSE; - if(!loginUserInfo.getType().equals(Constants.ONE)){ - throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炰紒涓氱鐢ㄦ埛鏃犳硶杩涜璇ユ搷浣�"); - } if(!applyChange.getStatus().equals(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey())){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�侀敊璇棤娉曡繘琛岃鎿嶄綔!"); } applyChange.setStatus(Constants.ApplyChangeStatus.CLOSE.getKey()); - //瀛樺偍寰呭姙淇℃伅 //鍒犻櫎鍏朵粬寰呭姙 noticesMapper.delete(new QueryWrapper<Notices>().lambda().eq(Notices::getObjType,noticeObjectType.getKey()).eq(Notices::getObjId,applyChange.getId())); -- Gitblit v1.9.3