From bcae1eeb59ff2094f14043a0488b1abb25130831 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期四, 26 六月 2025 14:23:02 +0800
Subject: [PATCH] git ch
---
server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java
index be13b91..5090c9d 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/TaxesServiceImpl.java
@@ -189,6 +189,20 @@
update.setImgurl(taxes.getImgurl());
taxesMapper.updateById(update);
+ //鏌ヨ寮�绁ㄦ槑缁嗚褰�
+ List<TaxDetial> taxDetialList = taxDetialMapper.selectList(new QueryWrapper<TaxDetial>().lambda()
+ .eq(TaxDetial::getTaxId,taxes.getId())
+ .eq(TaxDetial::getType,Constants.TWO));
+ if(CollectionUtils.isNotEmpty(taxDetialList)){
+ for (TaxDetial taxDetial:taxDetialList) {
+ taxesMapper.update(null,new UpdateWrapper<Taxes>().lambda()
+ .set(Taxes::getEditDate,new Date())
+ .set(Taxes::getEditor,user.getId())
+ .set(Taxes::getStatus,3).eq(Taxes::getId,taxDetial.getDelTaxId()));
+ }
+ }
+
+
//瀛樺偍寰呭姙淇℃伅
Constants.NoticeObjectType noticeObjectType = Constants.NoticeObjectType.TAXES;
//鍒犻櫎鍏朵粬寰呭姙
@@ -359,6 +373,8 @@
Taxes queryModel = pageWrap.getModel();
if(!user.getType().equals(Constants.ONE)){
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炰紒涓氱敤鎴锋棤娉曡繘琛岃涓氬姟鏌ヨ");
+ }else{
+ queryWrapper.eq(Taxes::getCompanyId,user.getCompanyId());
}
if(!Objects.isNull(queryModel)){
queryWrapper.ge(pageWrap.getModel().getStartDate() != null,Taxes::getCreateDate, (pageWrap.getModel().getStartDate()));
@@ -460,9 +476,10 @@
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
- //鏌ヨ姣忎釜淇濆崟涓嬪彲浠ユ姇淇濈殑閲戦
+ //鏌ヨ姣忎釜淇濆崟涓嬪彲浠ユ姤閿�鐨勯噾棰�
InsuranceApply insuranceApply = insuranceApplyJoinMapper.selectJoinOne(InsuranceApply.class,new MPJLambdaWrapper<InsuranceApply>()
.selectAll(InsuranceApply.class)
+// .select(" ifnull(( select sum(td.fee) from taxes ts inner join tax_detial td on td.TAX_ID = ts.id where ts.status = 1 and td.INSURANCE_APPLY_ID = t.id ),0) as taxesMoney")
.select(" ifnull(( select sum(td.fee) from taxes ts inner join tax_detial td on td.TAX_ID = ts.id where ts.status != 2 and td.INSURANCE_APPLY_ID = t.id ),0) as taxesMoney ")
.eq(InsuranceApply::getId,taxDetial.getInsuranceApplyId())
);
@@ -470,7 +487,8 @@
throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"淇濆崟鍙枫��"+taxDetial.getApplyCode()+"銆戞湭鏌ヨ鍒颁繚鍗曚俊鎭�");
}
if(insuranceApply.getCurrentFee().subtract(insuranceApply.getTaxesMoney()).compareTo(taxDetial.getFee())!=Constants.ZERO){
- throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"淇濆崟鍙枫��"+taxDetial.getApplyCode()+"銆戝彲鎶ラ攢閲戦閿欒銆�"+insuranceApply.getCurrentFee().subtract(insuranceApply.getTaxesMoney())+"銆�");
+ //throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"淇濆崟鍙枫��"+taxDetial.getApplyCode()+"銆戝彲鎶ラ攢閲戦閿欒銆�"+insuranceApply.getCurrentFee().subtract(insuranceApply.getTaxesMoney())+"銆�");
+ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"淇濆崟鍙枫��"+taxDetial.getApplyCode()+"銆戜笉婊¤冻寮�绁ㄦ潯浠�");
}
taxDetial.setCreator(user.getId());
taxDetial.setCreateDate(new Date());
@@ -479,7 +497,7 @@
taxDetial.setTotalFee(insuranceApply.getCurrentFee());
taxDetial.setType(Constants.ZERO);
}
- taxDetailJoinMapper.insertBatchSomeColumn(taxDetialList);
+ taxDetailJoinMapper.insert(taxDetialList);
//瀛樺偍寰呭姙淇℃伅
@@ -683,7 +701,7 @@
}
}
if(CollectionUtils.isNotEmpty(taxDetailList)){
- taxDetailJoinMapper.insertBatchSomeColumn(taxDetailList);
+ taxDetailJoinMapper.insert(taxDetailList);
}else{
throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鏃犲彲寮�绁ㄦ暟鎹紝鎿嶄綔澶辫触");
}
--
Gitblit v1.9.3