必填校验

This commit is contained in:
2026-06-18 15:11:05 +08:00
parent 59a0bb34b0
commit 29323bf2b4
@@ -1034,6 +1034,12 @@ public class ContractLaunchServiceImpl implements ContractLaunchService {
if (contract.getIsElectron() == null || contract.getIsElectron().isBlank()) {
contract.setIsElectron("1");
}
if (contract.getIsOpenBidding() == null) {
contract.setIsOpenBidding(0);
}
if (contract.getIsYearBudget() == null) {
contract.setIsYearBudget(0);
}
if (contract.getPaymentDirection() == null || contract.getPaymentDirection().isBlank()) {
contract.setPaymentDirection("0");
}
@@ -1150,8 +1156,9 @@ public class ContractLaunchServiceImpl implements ContractLaunchService {
if (contract.getContractTypeCode() == null || contract.getContractTypeCode().isBlank()) {
throw new ServiceException("合同类型编码不能为空");
}
// contractType 是展示用中文名,从 contractTypeCode 自动推导
if (contract.getContractType() == null || contract.getContractType().isBlank()) {
throw new ServiceException("合同类型不能为空");
contract.setContractType(contract.getContractTypeCode());
}
if (contract.getValuationMode() == null || contract.getValuationMode().isBlank()) {
throw new ServiceException("计价方式不能为空");