From 3f44e29a7e2620bcc498f9d4bf7c454b00225ee2 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 23 一月 2024 10:20:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java | 62 +++++++++++++++++++++++++++----
1 files changed, 54 insertions(+), 8 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 4651ecc..847d831 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
@@ -74,8 +74,8 @@
private SolutionsMapper solutionsMapper;
/**
- * 骞冲彴閫�鍥炵敵璇�
- * @param insuranceApply
+ * 骞冲彴閫�鍥炴姇淇�
+ * @param param
* @return
*/
@Override
@@ -89,7 +89,9 @@
if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
throw new BusinessException(ResponseStatus.DATA_EMPTY);
}
- if(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.UPLOAD.getKey())){
+ if(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.UPLOAD.getKey())
+ ||Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.APPROVE.getKey())){
+ //宸叉彁浜ゅ拰宸插畬鎴愮姸鎬佷笉鏀寔瀹℃牳涓嶉�氳繃
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵");
}
LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
@@ -103,7 +105,47 @@
update.setId(model.getId());
applyChangeMapper.updateById(update);
- Constants.ApplyLogType applyLogType = Constants.ApplyLogType.PLATFORM_RETURN;
+ Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_PLATFORM_CHECK_PASS_NO;
+ String info =applyLogType.getInfo();
+ info = info.replace("${param}", update.getCheckInfo());
+ ApplyLog log = new ApplyLog(update,applyLogType.getName(),info,update.getId(),applyLogType.getKey(), JSONObject.toJSONString(model), JSONObject.toJSONString(update));
+ applyLogMapper.insert(log);
+ return 1;
+
+ }
+ /**
+ * 骞冲彴閫�鍥炴姇淇�
+ * @param param
+ * @return
+ */
+ @Override
+ @Transactional(rollbackFor = {Exception.class,BusinessException.class})
+ public Integer dealBackApply(ApplyChange param) {
+ if(param.getId() == null ||StringUtils.isBlank(param.getCheckInfo())){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
+ ApplyChange model = applyChangeMapper.selectById(param.getId());
+
+ if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ if(Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.UPLOAD.getKey())
+ ||Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.APPROVE.getKey())){
+ //宸叉彁浜ゅ拰宸插畬鎴愮姸鎬佷笉鏀寔瀹℃牳涓嶉�氳繃
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵");
+ }
+ LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+ ApplyChange update = new ApplyChange();
+ update.setEditDate(new Date());
+ update.setEditor(user.getId());
+ update.setStatus(Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS_NO.getKey());
+ update.setCheckDate(update.getEditDate());
+ update.setCheckInfo(param.getCheckInfo());
+ update.setCheckUserId(user.getId());
+ update.setId(model.getId());
+ applyChangeMapper.updateById(update);
+
+ Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_PLATFORM_CHECK_PASS_NO;
String info =applyLogType.getInfo();
info = info.replace("${param}", update.getCheckInfo());
ApplyLog log = new ApplyLog(update,applyLogType.getName(),info,update.getId(),applyLogType.getKey(), JSONObject.toJSONString(model), JSONObject.toJSONString(update));
@@ -533,8 +575,8 @@
throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(),"鏁版嵁宸插垹闄�,鏃犳硶杩涜璇ユ搷浣�");
}
Constants.ApplyChangeLogStatus applyChangeLogStatus = Constants.ApplyChangeLogStatus.RETURN_APPLY;
-
- if(applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.RETURN_APPLY.getKey())){
+ if(applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey())
+ ||applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())){
//鍙戣捣閫�鍥炵敵璇�
if(loginUserInfo.getType().equals(Constants.ONE)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炰紒涓氱鐢ㄦ埛鏃犳硶杩涜璇ユ搷浣�");
@@ -548,7 +590,9 @@
if(loginUserInfo.getType().equals(Constants.ZERO)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炲钩鍙扮鐢ㄦ埛鏃犳硶杩涜璇ユ搷浣�");
}
- if(!applyChange.getStatus().equals(Constants.ApplyChangeStatus.RETURN_APPLY.getKey())){
+ if(!(applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey())
+ ||applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())
+ )){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�侀敊璇棤娉曡繘琛岃鎿嶄綔!");
}
}else if(applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.UPLOAD.getKey())){
@@ -557,7 +601,9 @@
if(loginUserInfo.getType().equals(Constants.ZERO)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炲钩鍙扮鐢ㄦ埛鏃犳硶杩涜璇ユ搷浣�");
}
- if(!applyChange.getStatus().equals(Constants.ApplyChangeStatus.RETURN_APPLY.getKey())){
+ if(!(applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.RETURN_APPLY_UPLOAD.getKey())
+ ||applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.RETURN_APPLY_SIGNATURE.getKey())
+ )){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏁版嵁鐘舵�侀敊璇棤娉曡繘琛岃鎿嶄綔!");
}
}else if(applyChangeOptDTO.getOptType().equals(Constants.ApplyChangeStatus.CLOSE.getKey())){
--
Gitblit v1.9.3