综合服务合同信息和变更添加印章修改
This commit is contained in:
@ -31,6 +31,7 @@ import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.domain.vo.XzdBusinessSealVo;
|
||||
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.XzdBusinessSealServiceImpl;
|
||||
import org.dromara.xzd.service.impl.XzdContractClauseServiceImpl;
|
||||
@ -176,7 +177,7 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractCha
|
||||
if (byId.getHtzt().equals("已终止")){
|
||||
throw new RuntimeException("该合同已终止");
|
||||
}
|
||||
byId.setHtzt("已变更");
|
||||
byId.setHtzt(ZxdEnum.HETONGZTBG.getTypeValue());
|
||||
xzdCsContractInformationService.updateById(byId);
|
||||
}
|
||||
|
||||
@ -394,9 +395,10 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractCha
|
||||
|
||||
//印章信息
|
||||
LambdaQueryWrapper<XzdBusinessChange> lambdaQueryWrapper4 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper4.select(XzdBusinessChange::getBusinessId);
|
||||
lambdaQueryWrapper4.eq(XzdBusinessChange::getContractChangeId, vo.getId());
|
||||
lambdaQueryWrapper4.eq(XzdBusinessChange::getType, "11");
|
||||
List<XzdBusinessChange> list3 = xzdBusinessChangeService.list(lambdaQueryWrapper4);
|
||||
if (list3 != null && !list3.isEmpty()){
|
||||
for (XzdBusinessChange businessChange : list3) {
|
||||
XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(businessChange.getBusinessId());
|
||||
if (sealVo != null){
|
||||
@ -405,6 +407,7 @@ public class XzdCsContractChangeServiceImpl extends ServiceImpl<XzdCsContractCha
|
||||
}
|
||||
vo.setSealInfo(list3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -34,6 +34,7 @@ import org.dromara.xzd.domain.XzdContractClause;
|
||||
import org.dromara.xzd.domain.XzdDeductionItems;
|
||||
import org.dromara.xzd.domain.vo.XzdBusinessSealVo;
|
||||
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.XzdBusinessSealServiceImpl;
|
||||
import org.dromara.xzd.service.impl.XzdContractClauseServiceImpl;
|
||||
@ -119,9 +120,10 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
|
||||
|
||||
//印章信息
|
||||
LambdaQueryWrapper<XzdBusinessChange> lambdaQueryWrapper4 = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper4.select(XzdBusinessChange::getBusinessId);
|
||||
lambdaQueryWrapper4.eq(XzdBusinessChange::getContractChangeId, vo.getId());
|
||||
lambdaQueryWrapper4.eq(XzdBusinessChange::getType, "10");
|
||||
List<XzdBusinessChange> list3 = xzdBusinessChangeService.list(lambdaQueryWrapper4);
|
||||
if (list3 != null && !list3.isEmpty()){
|
||||
for (XzdBusinessChange businessChange : list3) {
|
||||
XzdBusinessSealVo sealVo = xzdBusinessSealService.queryById(businessChange.getBusinessId());
|
||||
if (sealVo != null){
|
||||
@ -130,6 +132,7 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
|
||||
}
|
||||
vo.setSealInfo(list3);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询综合服务合同信息列表
|
||||
@ -219,7 +222,7 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
|
||||
validEntityBeforeSave(add);
|
||||
String banBen = BatchNumberGenerator.generateBatchNumber("ZHFWHT-");
|
||||
add.setContractCode(banBen);
|
||||
add.setHtzt("正常");
|
||||
add.setHtzt(ZxdEnum.HETONGZTYS.getTypeValue());
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
@ -285,7 +288,7 @@ public class XzdCsContractInformationServiceImpl extends ServiceImpl<XzdCsContra
|
||||
throw new ServiceException("找不到要修改数据!!!");
|
||||
}
|
||||
|
||||
if (old.getHtzt().equals("已终止")){
|
||||
if (old.getHtzt().equals(ZxdEnum.HETONGZTZZ.getTypeValue())){
|
||||
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()) {
|
||||
xzdBusinessChange.setContractChangeId(update.getId());
|
||||
xzdBusinessChange.setType("10");
|
||||
}
|
||||
xzdBusinessChangeService.saveBatch(bo.getSealInfo());
|
||||
}
|
||||
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
@ -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.mapper.XzdCsContractSuspendMapper;
|
||||
import org.dromara.xzd.comprehensive.service.IXzdCsContractSuspendService;
|
||||
import org.dromara.xzd.enums.ZxdEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -127,7 +128,7 @@ public class XzdCsContractSuspendServiceImpl extends ServiceImpl<XzdCsContractSu
|
||||
|
||||
XzdCsContractInformation byId = xzdCsContractInformationService.getById(bo.getContractInformationId());
|
||||
if (byId != null){
|
||||
byId.setHtzt("已终止");
|
||||
byId.setHtzt(ZxdEnum.HETONGZTZZ.getTypeValue());
|
||||
xzdCsContractInformationService.updateById(byId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user