|
@@ -814,9 +814,13 @@ public class SalesServiceImpl implements SalesService {
|
|
}
|
|
}
|
|
EnterpriseDto enterpriseDto = enterpriseService.queryMyEnterprise();
|
|
EnterpriseDto enterpriseDto = enterpriseService.queryMyEnterprise();
|
|
String exportType = enterpriseDto.getExportType();
|
|
String exportType = enterpriseDto.getExportType();
|
|
- if (DictConstants.EXPORT_TYPE_PROXY.equals(exportType)
|
|
|
|
- && StringUtils.isBlank(salesContractDto.getSalesContract().getAgencyCertNo())) {
|
|
|
|
- throw new ValidatorException(HttpStatus.BAD_REQUEST, "代理公司信息不能为空!");
|
|
|
|
|
|
+ if (DictConstants.EXPORT_TYPE_PROXY.equals(exportType)) {
|
|
|
|
+ if (StringUtils.isBlank(salesContractDto.getSalesContract().getAgencyCertNo())) {
|
|
|
|
+ throw new ValidatorException(HttpStatus.BAD_REQUEST, "代理公司信息不能为空!");
|
|
|
|
+ }
|
|
|
|
+ if (salesContractDto.getSalesContract().getExchangeRate() == null) {
|
|
|
|
+ throw new ValidatorException(HttpStatus.BAD_REQUEST, "代理出口模式下成交汇率不能为空!");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
ValidatorUtil.validator(ValidatorGroup.ValidatorType.SUBMIT, salesContractDto.getSalesContract());
|
|
ValidatorUtil.validator(ValidatorGroup.ValidatorType.SUBMIT, salesContractDto.getSalesContract());
|
|
if (CollectionUtil.isEmpty(salesContractDto.getSalesCommoditys())) {
|
|
if (CollectionUtil.isEmpty(salesContractDto.getSalesCommoditys())) {
|