Commit 20f87916 by 林冲

feat:导入校验

1 parent 4162f3a5
......@@ -354,7 +354,7 @@ public class EvalElectronicContractService {
return;
}
if (StringUtils.isBlank(row.getMerchantNo())) {
errors.add("4s店编号必填");
errors.add("商户号必填");
}
if (StringUtils.isBlank(row.getPlateNo())) {
errors.add("车牌号必填");
......@@ -391,6 +391,9 @@ public class EvalElectronicContractService {
if (!NumberUtil.isAllDigits(row.getMerchantNo())) {
errors.add("商户号必须都是数字");
}
if (row.getMerchantNo().length() > 8) {
errors.add("商户号不能超过8位数字");
}
// 车牌号不能超过10位,否则提示“车牌号不能超过10位”
if (row.getPlateNo().length() > 10) {
......@@ -400,6 +403,16 @@ public class EvalElectronicContractService {
if (row.getVin().length() != 17) {
errors.add("车架号必须是17位");
}
if (row.getBrand().length() > 20) {
errors.add("品牌不能超过20个字符");
}
if (row.getCarCategory().length() > 20) {
errors.add("车辆类别不能超过20个字符");
}
if (row.getPayType().length() > 20) {
errors.add("支付方式不能超过20个字符");
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!