From 02bc3bfe47e3d5311a0bb041c94e70a34b1ca73c Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期二, 09 四月 2024 09:03:01 +0800 Subject: [PATCH] git ch --- server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java | 26 ++++++++++++++++++++++---- 1 files changed, 22 insertions(+), 4 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 e07c92f..75cef66 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 @@ -1096,6 +1096,8 @@ if (applyChange.getValidTime().compareTo(applyDetail.getEndTime()) > 0) { throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "鍑忎繚浜哄憳銆�" + applyChagneDetail.getMemberName() + "銆戜繚鍗曚繚闅滄棩鏈熻嚦锛氥��" + applyDetail.getEndTime() + "銆戞棤娉曢�氳繃鏈鐢宠"); } + + applyChagneDetail.setPrice(applyDetail.getPrice()); applyChagneDetail.setCreateDate(new Date()); applyChagneDetail.setCreator(loginUserInfo.getId()); applyChagneDetail.setIsdeleted(Constants.ZERO); @@ -1149,6 +1151,13 @@ throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "褰撳墠淇濆崟涓嬶紝鍔犱繚浜哄憳銆�" + applyChagneDetail.getMemberName() + "銆戝瓨鍦ㄦ棩鏈熷啿绐佺殑鏁版嵁"); } + ApplyDetail applyDetail = applyDetailJoinMapper.selectOne(new QueryWrapper<ApplyDetail>() + .lambda() + .eq(ApplyDetail::getApplyId,applyChange.getApplyId()).last("limit 1")); + if(Objects.isNull(applyDetail)){ + throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "淇濆崟涓湭瀛樺湪鏄庣粏璁板綍"); + } + applyChagneDetail.setPrice(applyDetail.getPrice()); applyChagneDetail.setCreateDate(new Date()); applyChagneDetail.setCreator(loginUserInfo.getId()); applyChagneDetail.setIsdeleted(Constants.ZERO); @@ -1318,6 +1327,7 @@ && applyChagneDetail.getOldWorktypeId().equals(applyChagneDetail.getWorktypeId())){ throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(), "鎹㈠巶浜哄憳銆�" + applyChagneDetail.getMemberName() + "銆戞崲鍘傛暟鎹浉鍚岋紒"); } + applyChagneDetail.setPrice(applyDetail.getPrice()); applyChagneDetail.setCreateDate(new Date()); applyChagneDetail.setCreator(loginUserInfo.getId()); applyChagneDetail.setIsdeleted(Constants.ZERO); @@ -1517,6 +1527,9 @@ queryWrapper .selectAll(ApplyChange.class) .selectAs(InsuranceApply::getCode,ApplyChange::getApplyCode) + .selectAs(InsuranceApply::getStartTime,ApplyChange::getStartTime) + .selectAs(InsuranceApply::getCode,ApplyChange::getValidCode) + .selectAs(InsuranceApply::getEndTime,ApplyChange::getEndTime) .selectAs(Solutions::getName,ApplyChange::getSolutionsName) .selectAs(Solutions::getType,ApplyChange::getSolutionType) .selectAs(Company::getName,ApplyChange::getCompanyName) @@ -1767,9 +1780,9 @@ List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() .eq(Multifile::getObjId, applyChange.getId() ) - .in(Multifile::getObjType, Arrays.asList(new Integer[]{Constants.MultiFile.CA_APPLY_JIAJIAN_SIGN.getKey() - ,Constants.MultiFile.CA_PD_PDF.getKey() - ,Constants.MultiFile.CA_APPLY_CHANGEUNIT_SIGN.getKey()})) +// .in(Multifile::getObjType, Arrays.asList(new Integer[]{Constants.MultiFile.CA_APPLY_JIAJIAN_SIGN.getKey() +// ,Constants.MultiFile.CA_PD_PDF.getKey() +// ,Constants.MultiFile.CA_APPLY_CHANGEUNIT_SIGN.getKey()})) .eq(Multifile::getIsdeleted,Constants.ZERO)); if(multifiles!=null){ String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode() @@ -1992,6 +2005,10 @@ if(Objects.isNull(solutions)){ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈡柟妗堜俊鎭�"); } + ApplyDetail applyDetail = applyDetailJoinMapper.selectOne(new QueryWrapper<ApplyDetail>().lambda().eq(ApplyDetail::getIsdeleted,Constants.ZERO).eq(ApplyDetail::getApplyId,insuranceApply.getId()).last("limit 1")); + if(Objects.isNull(applyDetail)){ + throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌淇濆崟鏄庣粏璁板綍"); + } //鏍规嵁鎵瑰崟鏃ユ湡 鍜� 缁撴潫鏃ユ湡 璁$畻閲戦 //楠岃瘉鎵瑰崟鏃ユ湡鏄惁鍦ㄥ綋鍓嶆棩鏈熷悗 涓� 鍦ㄤ繚鍗曠粨鏉熸棩鏈熷墠 鐢宠鏃堕棿蹇呴』澶勪簬淇濆崟鐨勬椂闂磋寖鍥村唴 if (!(DateUtil.compareDate( insuranceApply.getStartTime(),applyChangeCyclePriceDTO.getValidTime()) >= Constants.ZERO @@ -2008,7 +2025,8 @@ BigDecimal sumPrice = countCyclePriceVO.getCyclePrice(); CountCyclePriceVO returnCountCyclePriceVO = new CountCyclePriceVO(); //鍔犲噺淇濋噾棰� - returnCountCyclePriceVO.setCyclePrice(sumPrice.multiply(new BigDecimal(optDays)).divide(new BigDecimal(sumDays),2, RoundingMode.HALF_UP)); +// returnCountCyclePriceVO.setCyclePrice(sumPrice.multiply(new BigDecimal(optDays)).divide(new BigDecimal(sumDays),2, RoundingMode.HALF_UP)); + returnCountCyclePriceVO.setCyclePrice(applyDetail.getPrice().multiply(new BigDecimal(optDays))); return returnCountCyclePriceVO; } -- Gitblit v1.9.3