From 7cc2ab5c65f7ab4e0f4ccbda1fe8cb713e8cb877 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 01 四月 2024 17:03:31 +0800
Subject: [PATCH] git ch
---
server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java | 40 +++++++++++++++++++++++++++++++++-------
1 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
index d113bb0..6f9436a 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/UnionChangeServiceImpl.java
@@ -1,5 +1,6 @@
package com.doumee.service.business.impl;
+import com.alibaba.fastjson.JSONObject;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.constants.ResponseStatus;
@@ -11,10 +12,7 @@
import com.doumee.core.utils.DateUtil;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.*;
-import com.doumee.dao.business.dto.SaveUnionApplyDTO;
-import com.doumee.dao.business.dto.SaveUnionChangeDTO;
-import com.doumee.dao.business.dto.SmsCheckDTO;
-import com.doumee.dao.business.dto.UnionChangeBXDDTO;
+import com.doumee.dao.business.dto.*;
import com.doumee.dao.business.join.*;
import com.doumee.dao.business.model.*;
import com.doumee.dao.business.vo.CountCyclePriceVO;
@@ -92,6 +90,8 @@
@Autowired
private MultifileMapper multifileMapper;
+ @Autowired
+ private ApplyLogMapper applyLogMapper;
@Override
public Integer create(UnionChange unionChange) {
unionChangeMapper.insert(unionChange);
@@ -320,6 +320,13 @@
applyChagneDetailJoinMapper.update(null,new UpdateWrapper<ApplyChagneDetail>().lambda()
.set(ApplyChagneDetail::getUnionChangeId,unionChange.getId())
.in(ApplyChagneDetail::getApplyId,saveUnionChangeDTO.getApplyIds()));
+
+
+ Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_HBD_UPLOAD;
+ ApplyLog log = new ApplyLog(unionChange,applyLogType.getName(), null
+ ,unionChange.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionChange));
+ applyLogMapper.insert(log);
+
return unionChange.getId();
}
@@ -330,16 +337,21 @@
/**
* 鍙栨秷淇濆崟鍚堝苟
- * @param id
+ * @param closeDTO
*/
@Override
@Transactional(rollbackFor = {Exception.class,BusinessException.class})
- public void cancelMerge(Integer id){
+ public void cancelMerge(CloseDTO closeDTO){
+ if(Objects.isNull(closeDTO)
+ ||Objects.isNull(closeDTO.getId())
+ ||StringUtils.isBlank(closeDTO.getReason())){
+ throw new BusinessException(ResponseStatus.BAD_REQUEST);
+ }
LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
if(user.getType().equals(Constants.TWO)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炲晢鎴风敤鎴凤紝鏃犳硶杩涜璇ユ搷浣滐紒");
}
- UnionChange unionChange = unionChangeMapper.selectById(id);
+ UnionChange unionChange = unionChangeMapper.selectById(closeDTO.getId());
if(Objects.isNull(unionChange)||!Constants.equalsInteger(unionChange.getIsdeleted(),Constants.ZERO)){
throw new BusinessException(ResponseStatus.DATA_EMPTY);
}
@@ -368,6 +380,14 @@
.set(UnionChange::getStatus,Constants.UnionApplyStatus.CLOSE.getKey())
.eq(UnionChange::getId,unionChange.getId())
);
+
+ Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_HBD_UPLOAD;
+ String info =applyLogType.getInfo();
+ info = info.replace("${param}", closeDTO.getReason());
+ ApplyLog log = new ApplyLog(unionChange,applyLogType.getName(), info
+ ,unionChange.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionChange));
+ applyLogMapper.insert(log);
+
}
@@ -589,6 +609,12 @@
.set(UnionChange::getEditor,user.getId())
.eq(UnionChange::getId,unionChangeBXDDTO.getId())
);
+
+
+ Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_HBD_UPLOAD_INSURANCE;
+ ApplyLog log = new ApplyLog(unionChange,applyLogType.getName(), null
+ ,unionChange.getId(),applyLogType.getKey(),null, JSONObject.toJSONString(unionChange));
+ applyLogMapper.insert(log);
}
--
Gitblit v1.9.3