|
@@ -6,6 +6,8 @@ import javax.annotation.Resource;
|
|
|
|
|
|
import com.trade.client.enterprise.companyrelated.service.ImporterEntityCService;
|
|
|
import com.trade.common.utils.ConstantUtil;
|
|
|
+import com.trade.common.utils.StringUtils;
|
|
|
+import com.trade.service.DictConstants;
|
|
|
import com.trade.service.trade.salesorder.service.ISalesOrderService;
|
|
|
import com.trade.service.serialNum.service.SerialNumberGenerator;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -55,6 +57,10 @@ public class ImporterEntityCServiceImp extends ServiceImpl<ImporterEntityMapper,
|
|
|
* @param importEntity 进口商信息
|
|
|
*/
|
|
|
private void preCheckAndSetParams(ImporterEntity importEntity) {
|
|
|
+ if (DictConstants.DISTRICT_FOREIGN.equals(importEntity.getRegion())
|
|
|
+ && StringUtils.isEmpty(importEntity.getCountry())) {
|
|
|
+ throw new ServiceException("境外进口商国家不能为空", HttpStatus.BAD_REQUEST);
|
|
|
+ }
|
|
|
ImporterEntity exist = getBaseMapper().getByUserIdAndCertNo(importEntity.getCustomerUserId(),
|
|
|
importEntity.getCertNo());
|
|
|
if (null == importEntity.getId()) {
|