From 5792e36950d6699aa6b52122d84770051213c141 Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期三, 03 四月 2024 18:32:17 +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 | 11 +++++++----
1 files changed, 7 insertions(+), 4 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 59baf20..134d350 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
@@ -154,7 +154,7 @@
.selectAs(Company::getName,UnionChange::getShopName)
.select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 0 )",UnionChange::getAddNum)
.select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 1 )",UnionChange::getDelNum)
- .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 2 )",UnionChange::getChangeNum)
+ .select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 2 )",UnionChange::getChangeNum).select("( select ifnull(sum(ac.FEE),0) from apply_change ac where t.id = ac.UNION_CHANGE_ID )",UnionChange::getFee)
.leftJoin(UnionApply.class,UnionApply::getId,UnionChange::getUnionApplyId)
.leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId)
.leftJoin(Company.class,Company::getId,UnionChange::getShopId)
@@ -200,6 +200,7 @@
IPage<UnionChange> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity());
MPJLambdaWrapper<UnionChange> queryWrapper = new MPJLambdaWrapper<>();
queryWrapper.selectAll(UnionChange.class);
+ pageWrap.getModel().setIsdeleted(Constants.ZERO);
queryWrapper.selectAs(UnionApply::getCode,UnionChange::getApplyCode);
queryWrapper.selectAs(Solutions::getName,UnionChange::getSolutionsName)
.select("( select count(1) from apply_chagne_detail ad where t.id = ad.UNION_CHANGE_ID and ad.TYPE = 0 )",UnionChange::getAddNum)
@@ -209,7 +210,7 @@
queryWrapper.leftJoin(Solutions.class,Solutions::getId,UnionApply::getSolutionId);
LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
if(Constants.equalsInteger(user.getType(),Constants.TWO)){
- queryWrapper.eq(UnionChange::getShopId, pageWrap.getModel().getShopId());
+ queryWrapper.eq(UnionChange::getShopId, user.getCompanyId());
}
Utils.MP.blankToNull(pageWrap.getModel());
if (pageWrap.getModel().getId() != null) {
@@ -292,6 +293,7 @@
@Override
+ @Transactional(rollbackFor = {BusinessException.class,Exception.class})
public Integer merge(SaveUnionChangeDTO saveUnionChangeDTO){
LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
if(!user.getType().equals(Constants.TWO)){
@@ -312,7 +314,7 @@
.eq(ApplyChange::getIsdeleted, Constants.ZERO)
.eq(InsuranceApply::getUnionApplyId,saveUnionChangeDTO.getUnionApplyId())
.eq(ApplyChange::getStatus,Constants.ApplyChangeStatus.CHECHED_PASSED.getKey())
- .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey())
+ .eq(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.WTB_DONE.getKey())
.eq(ApplyChange::getType,saveUnionChangeDTO.getBusinessType())
.in(ApplyChange::getId,saveUnionChangeDTO.getApplyIds())
.isNull(ApplyChange::getUnionChangeId)
@@ -326,6 +328,7 @@
unionChange.setCreateDate(new Date());
unionChange.setCreator(user.getId());
unionChange.setShopId(user.getCompanyId());
+ unionChange.setIsdeleted(Constants.ZERO);
unionChange.setUnionApplyId(saveUnionChangeDTO.getUnionApplyId());
unionChange.setApplyStartTime(saveUnionChangeDTO.getApplyDate());
unionChange.setType(saveUnionChangeDTO.getBusinessType());
@@ -342,7 +345,7 @@
applyChagneDetailJoinMapper.update(null,new UpdateWrapper<ApplyChagneDetail>().lambda()
.set(ApplyChagneDetail::getUnionChangeId,unionChange.getId())
- .in(ApplyChagneDetail::getApplyId,saveUnionChangeDTO.getApplyIds()));
+ .in(ApplyChagneDetail::getApplyChangeId,saveUnionChangeDTO.getApplyIds()));
Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_HBD_UPLOAD;
--
Gitblit v1.9.3