From d6a6513dd8ff55449844264b24a3051c683febb7 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 22 一月 2024 10:03:34 +0800
Subject: [PATCH] 开发业务接口

---
 server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java |   62 ++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 1 deletions(-)

diff --git a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
index 3dbe7b2..115644b 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java
@@ -68,6 +68,66 @@
 
     @Override
     @Transactional(rollbackFor = {Exception.class,BusinessException.class})
+    public Integer back(InsuranceApply insuranceApply) {
+        if(insuranceApply.getId() == null ||StringUtils.isBlank(insuranceApply.getCheckInfo())){
+            throw  new BusinessException(ResponseStatus.BAD_REQUEST);
+        }
+        InsuranceApply model = insuranceApplyMapper.selectById(insuranceApply.getId());
+
+        if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
+            throw  new BusinessException(ResponseStatus.DATA_EMPTY);
+        }
+        if(Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.UPLOAD.getKey())){
+            throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵");
+        }
+        LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
+        InsuranceApply update = new InsuranceApply();
+        update.setEditDate(new Date());
+        update.setEditor(user.getId());
+        update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey());
+        update.setCheckDate(update.getEditDate());
+        update.setCheckInfo(insuranceApply.getCheckInfo());
+        update.setCheckUserId(user.getId());
+        update.setId(model.getId());
+        insuranceApplyMapper.updateById(update);
+
+        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.PLATFORM_RETURN;
+        String info =applyLogType.getInfo();
+        info = info.replace("${param}", update.getCheckInfo());
+        ApplyLog log = new ApplyLog(update,applyLogType.getName(),info,update.getId(),applyLogType.getKey(),null,null);
+        applyLogMapper.insert(log);
+        return  null;
+
+    }
+
+    @Override
+    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
+    public Integer uploadBaoxiandan(InsuranceApply insuranceApply) {
+        return  null;
+
+    }
+    @Override
+    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
+    public Integer refuseBackApply(InsuranceApply insuranceApply) {
+        return  null;
+
+    }
+    @Override
+    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
+    public Integer uploadToubaodan(InsuranceApply insuranceApply) {
+        return  null;
+
+    }
+    @Override
+    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
+    public Integer check(InsuranceApply insuranceApply) {
+        return  null;
+
+    }
+
+
+    @Override
+    @Transactional(rollbackFor = {Exception.class,BusinessException.class})
     public Integer create(InsuranceApply insuranceApply) {
         if (Objects.isNull(insuranceApply)
             || Objects.isNull(insuranceApply.getSolutionId())
@@ -169,7 +229,7 @@
         applyLog.setTitle(insuranceApplyStatus.getName());
         applyLog.setContent(content);
         applyLog.setObjType(insuranceApplyStatus.getKey());
-        applyLog.setObjId(Integer.toString(insuranceApply.getId()));
+        applyLog.setObjId( insuranceApply.getId());
         applyLog.setStatus(insuranceApply.getStatus());
         applyLogMapper.insert(applyLog);
     }

--
Gitblit v1.9.3