Commit b4dd0a13 authored by huangcb's avatar huangcb

编辑货主信息时,增加货主类型字段(默认为个人)

parent fe32c604
...@@ -39,7 +39,7 @@ import java.util.ArrayList; ...@@ -39,7 +39,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* @description: 承运商帐号Controller * @description: 货主帐号Controller
* @project: freight-customer-service * @project: freight-customer-service
* @name: com.esv.freight.customer.module.goodsowner.controller.GoodsOwnerController * @name: com.esv.freight.customer.module.goodsowner.controller.GoodsOwnerController
* @author: 黄朝斌 * @author: 黄朝斌
......
...@@ -41,7 +41,7 @@ public class AccountInfoForm { ...@@ -41,7 +41,7 @@ public class AccountInfoForm {
/** /**
* 货主类型:1-个人、2-企业 * 货主类型:1-个人、2-企业
*/ */
@Range(min = 1, max = 2, message = "参数ownerType不合法", groups = {ValidatorInsert.class}) @Range(min = 1, max = 2, message = "参数ownerType不合法")
@NotNull(message = "参数ownerType不能为空", groups = {ValidatorInsert.class}) @NotNull(message = "参数ownerType不能为空", groups = {ValidatorInsert.class})
private Integer ownerType; private Integer ownerType;
/** /**
......
...@@ -187,9 +187,7 @@ public class GoodsOwnerAccountServiceImpl extends ServiceImpl<AccountDao, GoodsO ...@@ -187,9 +187,7 @@ public class GoodsOwnerAccountServiceImpl extends ServiceImpl<AccountDao, GoodsO
// 3.更新表:goods_owner_info // 3.更新表:goods_owner_info
InfoEntity infoEntity = new InfoEntity(); InfoEntity infoEntity = new InfoEntity();
BeanUtils.copyProperties(form, infoEntity); BeanUtils.copyProperties(form, infoEntity);
// 货主类型不允许修改 // 货主为个人,删除企业相关字段
infoEntity.setOwnerType(null);
// 货主为个人
if (GoodsOwnerConstants.OWNER_TYPE_PERSONAL.equals(form.getOwnerType())) { if (GoodsOwnerConstants.OWNER_TYPE_PERSONAL.equals(form.getOwnerType())) {
infoEntity.setOwnerFullName(null); infoEntity.setOwnerFullName(null);
infoEntity.setOwnerBriefName(null); infoEntity.setOwnerBriefName(null);
......
...@@ -83,7 +83,7 @@ public class VehicleController { ...@@ -83,7 +83,7 @@ public class VehicleController {
// 道路运输证号,4.5吨及以下普货车辆可以为空 // 道路运输证号,4.5吨及以下普货车辆可以为空
BigDecimal bigDecimal4_5 = new BigDecimal("4.5"); BigDecimal bigDecimal4_5 = new BigDecimal("4.5");
if (-1 == bigDecimal4_5.compareTo(form.getLoadCapacity()) && StringUtils.isBlank(form.getRoadCertificateNumber())) { if (-1 == bigDecimal4_5.compareTo(form.getLoadCapacity()) && StringUtils.isBlank(form.getRoadCertificateNumber())) {
throw new EException(ECode.PARAM_ERROR.code(), "4.5以上载重的车辆,道路运输证号不能为空"); throw new EException(ECode.PARAM_ERROR.code(), "4.5以上载重的车辆,道路运输证号不能为空");
} }
/****************************** 参数校验 ******************************/ /****************************** 参数校验 ******************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment