From 5b4b0b5b6462ca6da4dc8811663839b3045128f2 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期六, 27 一月 2024 09:22:21 +0800 Subject: [PATCH] 开发业务接口 --- server/service/src/main/java/com/doumee/service/business/impl/InsuranceApplyServiceImpl.java | 27 +++++++++++++++++---------- 1 files changed, 17 insertions(+), 10 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 5a8288e..e13e60a 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 @@ -100,7 +100,7 @@ InsuranceApply update = new InsuranceApply(); update.setEditDate(new Date()); update.setEditor(user.getId()); - update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey()); + update.setStatus(Constants.InsuranceApplyStatus.FAIL_RETURN.getKey()); update.setCheckDate(update.getEditDate()); update.setCheckInfo(insuranceApply.getCheckInfo()); update.setCheckUserId(user.getId()); @@ -530,14 +530,14 @@ } /** - * 瀹℃牳閫氳繃 + * 瀹℃牳閫氳繃鎴栬�呬笉閫氳繃 * @param insuranceApply * @return */ @Override @Transactional(rollbackFor = {Exception.class,BusinessException.class}) public Integer check(InsuranceApply insuranceApply) { - if(insuranceApply.getId() == null ||StringUtils.isBlank(insuranceApply.getCheckInfo())){ + if(insuranceApply.getId() == null || StringUtils.isBlank(insuranceApply.getCheckInfo())){ throw new BusinessException(ResponseStatus.BAD_REQUEST); } InsuranceApply model = insuranceApplyMapper.selectById(insuranceApply.getId()); @@ -548,19 +548,28 @@ if(!Constants.equalsInteger(model.getStatus(),Constants.InsuranceApplyStatus.UPLOAD.getKey())){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵"); } + + Constants.ApplyLogType applyLogType = null; LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); InsuranceApply update = new InsuranceApply(); update.setEditDate(new Date()); update.setEditor(user.getId()); - update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey()); update.setCheckDate(update.getEditDate()); update.setCheckInfo(insuranceApply.getCheckInfo()); update.setCheckUserId(user.getId()); update.setId(model.getId()); + if(insuranceApply.getDealBackApply() ==1){ + //濡傛灉鏄笉閫氳繃 + applyLogType = Constants.ApplyLogType.PLATFORM_RETURN ; + update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_RETURN.getKey()); + }else{ + applyLogType = Constants.ApplyLogType.PLATFORM_CHECK_PASS; + update.setStatus(Constants.InsuranceApplyStatus.PLATFORM_CHECK_PASS.getKey()); + } insuranceApplyMapper.updateById(update); - - Constants.ApplyLogType applyLogType = Constants.ApplyLogType.PLATFORM_CHECK_PASS; - ApplyLog log = new ApplyLog(update,applyLogType.getName(),null,update.getId(),applyLogType.getKey(),JSONObject.toJSONString(model), JSONObject.toJSONString(update)); + 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; @@ -919,8 +928,6 @@ throw new BusinessException(ResponseStatus.DATA_EMPTY); } - insuranceApply.setInsureNum(applyDetailMapper.selectCount(new QueryWrapper<ApplyDetail>().lambda().eq(ApplyDetail::getApplyId,insuranceApply.getId()) - .eq(ApplyDetail::getIsdeleted,Constants.ZERO))); initApplyStatus(insuranceApply); //鏌ヨ闄勪欢鏁版嵁 @@ -1007,7 +1014,7 @@ .selectAs(DispatchUnit::getName,ApplyDetail::getDuName) .leftJoin(Worktype.class,Worktype::getId,ApplyDetail::getWorktypeId) .leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyDetail::getDuId) - .eq(InsuranceApply::getId,model.getId()); + .eq(ApplyDetail::getApplyId,model.getId()); //鏌ヨ鏄庣粏 List<ApplyDetail> detailList =applyDetailJoinMapper.selectJoinList(ApplyDetail.class,wrapper1); if(detailList!=null){ -- Gitblit v1.9.3