From bd57081dc1bcd94e1e4043a9e0a7c6953d4bb9d4 Mon Sep 17 00:00:00 2001 From: nidapeng <jp@doumee.com> Date: 星期一, 01 四月 2024 19:19:01 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/1.0.1' into 1.0.1 --- 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