From f63e0073e96abe1e52d74749f408e3f542600a09 Mon Sep 17 00:00:00 2001 From: nidapeng <jp@doumee.com> Date: 星期三, 03 四月 2024 13:27:12 +0800 Subject: [PATCH] 提交一把 --- server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java | 42 +++++++++++++++++++++++++----------------- 1 files changed, 25 insertions(+), 17 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 cd8d8b1..d1e0c22 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,11 @@ }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())){ + if(!(applyChange.getStatus().equals(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey()) + ||applyChange.getStatus().equals(Constants.ApplyChangeStatus.CHECHED_PASSED.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())); @@ -1673,7 +1674,7 @@ applyChange.setApplyLogList(applyLogList); List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() - .eq(Multifile::getObjId,Constants.equalsInteger(applyChange.getSolutionType(),Constants.ZERO)? applyChange.getId():applyChange.getUnionChangeId()) + .eq(Multifile::getObjId, applyChange.getId() ) .in(Multifile::getObjType, Arrays.asList(new Integer[]{Constants.MultiFile.CA_APPLY_JIAJIAN_SIGN.getKey() ,Constants.MultiFile.CA_PD_PDF.getKey() ,Constants.MultiFile.CA_APPLY_CHANGEUNIT_SIGN.getKey()})) @@ -2034,7 +2035,14 @@ applyChangeMapper.updateById(update); return link; }else{ - return this.getSignLinkJiajiabao(model); + if(model.getType().equals(Constants.ONE)){ + return this.getSignLinkChangeUnit(model); + }else{ + return this.getSignLinkJiajiabao(model); + } + + + } } @@ -2069,7 +2077,7 @@ if(solutions.getType().equals(Constants.ZERO)){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鐩翠繚鍗曟嵁鏃犳硶杩涜璇ユ搷浣�"); }else{ - if(!Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.COMPANY_SIGN.getKey())){ + if(!Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.SIGNATURE.getKey())){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵"); } } @@ -2083,9 +2091,9 @@ update.setId(model.getId()); if(applyChange.getDealBackApply() ==1){ //濡傛灉鏄笉閫氳繃 - update.setStatus(Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS_NO.getKey()); + update.setStatus(Constants.ApplyChangeStatus.PLATFORM_AGREE.getKey()); }else{ - update.setStatus(Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS.getKey()); + update.setStatus(Constants.ApplyChangeStatus.CHECHED_PASSED.getKey()); } applyChangeJoinMapper.updateById(update); Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.APPLY_CHANGE; -- Gitblit v1.9.3