综合服务合同信息和变更添加印章修改

This commit is contained in:
2025-11-10 19:57:44 +08:00
parent 6d859c6a8c
commit 347bd92b69
3 changed files with 29 additions and 20 deletions

View File

@ -31,6 +31,7 @@ import org.dromara.xzd.domain.XzdContractClause;
import org.dromara.xzd.domain.XzdDeductionItems; import org.dromara.xzd.domain.XzdDeductionItems;
import org.dromara.xzd.domain.vo.XzdBusinessSealVo; import org.dromara.xzd.domain.vo.XzdBusinessSealVo;
import org.dromara.xzd.enums.XzdClassEnum; import org.dromara.xzd.enums.XzdClassEnum;
import org.dromara.xzd.enums.ZxdEnum;
import org.dromara.xzd.service.impl.XzdBusinessChangeServiceImpl; import org.dromara.xzd.service.impl.XzdBusinessChangeServiceImpl;
import org.dromara.xzd.service.impl.XzdBusinessSealServiceImpl; import org.dromara.xzd.service.impl.XzdBusinessSealServiceImpl;
import org.dromara.xzd.service.impl.XzdContractClauseServiceImpl; import org.dromara.xzd.service.impl.XzdContractClauseServiceImpl;
@ -176,7 +177,7 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractCha
if (byId.getHtzt().equals("已终止")){ if (byId.getHtzt().equals("已终止")){
throw new RuntimeException("该合同已终止"); throw new RuntimeException("该合同已终止");
} }
byId.setHtzt("已变更"); byId.setHtzt(ZxdEnum.HETONGZTBG.getTypeValue());
xzdCsContractInformationService.updateById(byId); xzdCsContractInformationService.updateById(byId);
} }
@ -394,9 +395,10 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractCha
//印章信息 //印章信息
LambdaQueryWrapper<XzdBusinessChange> lambdaQueryWrapper4 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<XzdBusinessChange> lambdaQueryWrapper4 = new LambdaQueryWrapper<>();
lambdaQueryWrapper4.select(XzdBusinessChange::getBusinessId);
lambdaQueryWrapper4.eq(XzdBusinessChange::getContractChangeId, vo.getId()); lambdaQueryWrapper4.eq(XzdBusinessChange::getContractChangeId, vo.getId());
lambdaQueryWrapper4.eq(XzdBusinessChange::getType, "11");
List<XzdBusinessChange> list3 = xzdBusinessChangeService.list(lambdaQueryWrapper4); List<XzdBusinessChange> list3 = xzdBusinessChangeService.list(lambdaQueryWrapper4);
if (list3 != null && !list3.isEmpty()){
for (XzdBusinessChange businessChange : list3) { for (XzdBusinessChange businessChange : list3) {
XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(businessChange.getBusinessId()); XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(businessChange.getBusinessId());
if (sealVo != null){ if (sealVo != null){
@ -405,6 +407,7 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractCha
} }
vo.setSealInfo(list3); vo.setSealInfo(list3);
} }
}
/** /**

View File

@ -34,6 +34,7 @@ import org.dromara.xzd.domain.XzdContractClause;
import org.dromara.xzd.domain.XzdDeductionItems; import org.dromara.xzd.domain.XzdDeductionItems;
import org.dromara.xzd.domain.vo.XzdBusinessSealVo; import org.dromara.xzd.domain.vo.XzdBusinessSealVo;
import org.dromara.xzd.enums.XzdClassEnum; import org.dromara.xzd.enums.XzdClassEnum;
import org.dromara.xzd.enums.ZxdEnum;
import org.dromara.xzd.service.impl.XzdBusinessChangeServiceImpl; import org.dromara.xzd.service.impl.XzdBusinessChangeServiceImpl;
import org.dromara.xzd.service.impl.XzdBusinessSealServiceImpl; import org.dromara.xzd.service.impl.XzdBusinessSealServiceImpl;
import org.dromara.xzd.service.impl.XzdContractClauseServiceImpl; import org.dromara.xzd.service.impl.XzdContractClauseServiceImpl;
@ -119,9 +120,10 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
//印章信息 //印章信息
LambdaQueryWrapper<XzdBusinessChange> lambdaQueryWrapper4 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<XzdBusinessChange> lambdaQueryWrapper4 = new LambdaQueryWrapper<>();
lambdaQueryWrapper4.select(XzdBusinessChange::getBusinessId);
lambdaQueryWrapper4.eq(XzdBusinessChange::getContractChangeId, vo.getId()); lambdaQueryWrapper4.eq(XzdBusinessChange::getContractChangeId, vo.getId());
lambdaQueryWrapper4.eq(XzdBusinessChange::getType, "10");
List<XzdBusinessChange> list3 = xzdBusinessChangeService.list(lambdaQueryWrapper4); List<XzdBusinessChange> list3 = xzdBusinessChangeService.list(lambdaQueryWrapper4);
if (list3 != null && !list3.isEmpty()){
for (XzdBusinessChange businessChange : list3) { for (XzdBusinessChange businessChange : list3) {
XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(businessChange.getBusinessId()); XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(businessChange.getBusinessId());
if (sealVo != null){ if (sealVo != null){
@ -130,6 +132,7 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
} }
vo.setSealInfo(list3); vo.setSealInfo(list3);
} }
}
/** /**
* 分页查询综合服务合同信息列表 * 分页查询综合服务合同信息列表
@ -219,7 +222,7 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
validEntityBeforeSave(add); validEntityBeforeSave(add);
String banBen = BatchNumberGenerator.generateBatchNumber("ZHFWHT-"); String banBen = BatchNumberGenerator.generateBatchNumber("ZHFWHT-");
add.setContractCode(banBen); add.setContractCode(banBen);
add.setHtzt("正常"); add.setHtzt(ZxdEnum.HETONGZTYS.getTypeValue());
boolean flag = baseMapper.insert(add) > 0; boolean flag = baseMapper.insert(add) > 0;
if (flag) { if (flag) {
bo.setId(add.getId()); bo.setId(add.getId());
@ -285,7 +288,7 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
throw new ServiceException("找不到要修改数据!!!"); throw new ServiceException("找不到要修改数据!!!");
} }
if (old.getHtzt().equals("已终止")){ if (old.getHtzt().equals(ZxdEnum.HETONGZTZZ.getTypeValue())){
throw new RuntimeException("该合同已被终止"); throw new RuntimeException("该合同已被终止");
} }
@ -344,11 +347,13 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
} }
//印章信息 //印章信息
if (bo.getSealInfo() != null && !bo.getSealInfo().isEmpty()) {
for (XzdBusinessChange xzdBusinessChange : bo.getSealInfo()) { for (XzdBusinessChange xzdBusinessChange : bo.getSealInfo()) {
xzdBusinessChange.setContractChangeId(update.getId()); xzdBusinessChange.setContractChangeId(update.getId());
xzdBusinessChange.setType("10"); xzdBusinessChange.setType("10");
} }
xzdBusinessChangeService.saveBatch(bo.getSealInfo()); xzdBusinessChangeService.saveBatch(bo.getSealInfo());
}
return baseMapper.updateById(update) > 0; return baseMapper.updateById(update) > 0;
} }

View File

@ -21,6 +21,7 @@ import org.dromara.xzd.comprehensive.domain.bo.XzdCsContractSuspendBo;
import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractSuspendVo; import org.dromara.xzd.comprehensive.domain.vo.XzdCsContractSuspendVo;
import org.dromara.xzd.comprehensive.mapper.XzdCsContractSuspendMapper; import org.dromara.xzd.comprehensive.mapper.XzdCsContractSuspendMapper;
import org.dromara.xzd.comprehensive.service.IXzdCsContractSuspendService; import org.dromara.xzd.comprehensive.service.IXzdCsContractSuspendService;
import org.dromara.xzd.enums.ZxdEnum;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener; import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -127,7 +128,7 @@ public class XzdCsContractSuspendServiceImpl extends ServiceImpl<XzdCsContractSu
XzdCsContractInformation byId = xzdCsContractInformationService.getById(bo.getContractInformationId()); XzdCsContractInformation byId = xzdCsContractInformationService.getById(bo.getContractInformationId());
if (byId != null){ if (byId != null){
byId.setHtzt("已终止"); byId.setHtzt(ZxdEnum.HETONGZTZZ.getTypeValue());
xzdCsContractInformationService.updateById(byId); xzdCsContractInformationService.updateById(byId);
} }