Showing
5 changed files
with
27 additions
and
27 deletions
| @@ -54,22 +54,22 @@ public class CustomerImportListener extends ExcelImportListener<CustomerImportMo | @@ -54,22 +54,22 @@ public class CustomerImportListener extends ExcelImportListener<CustomerImportMo | ||
| 54 | throw new DefaultClientException( | 54 | throw new DefaultClientException( |
| 55 | "第" + context.readRowHolder().getRowIndex() + "行“名称”不能为空"); | 55 | "第" + context.readRowHolder().getRowIndex() + "行“名称”不能为空"); |
| 56 | } | 56 | } |
| 57 | - if (StringUtil.isBlank(data.getMnemonicCode())) { | ||
| 58 | - throw new DefaultClientException( | ||
| 59 | - "第" + context.readRowHolder().getRowIndex() + "行“简码”不能为空"); | ||
| 60 | - } | ||
| 61 | - if (StringUtil.isBlank(data.getSettleType())) { | ||
| 62 | - throw new DefaultClientException( | ||
| 63 | - "第" + context.readRowHolder().getRowIndex() + "行“结算方式”不能为空"); | ||
| 64 | - } | ||
| 65 | - SettleType settleType = EnumUtil.getByDesc(SettleType.class, data.getSettleType()); | ||
| 66 | - if (settleType == null) { | ||
| 67 | - throw new DefaultClientException( | ||
| 68 | - "第" + context.readRowHolder().getRowIndex() + "行“结算方式”只能填写“" | ||
| 69 | - + CollectionUtil.join( | ||
| 70 | - EnumUtil.getDescs(SettleType.class), "、") + "”"); | ||
| 71 | - } | ||
| 72 | - data.setSettleTypeEnum(settleType); | 57 | +// if (StringUtil.isBlank(data.getMnemonicCode())) { |
| 58 | +// throw new DefaultClientException( | ||
| 59 | +// "第" + context.readRowHolder().getRowIndex() + "行“简码”不能为空"); | ||
| 60 | +// } | ||
| 61 | +// if (StringUtil.isBlank(data.getSettleType())) { | ||
| 62 | +// throw new DefaultClientException( | ||
| 63 | +// "第" + context.readRowHolder().getRowIndex() + "行“结算方式”不能为空"); | ||
| 64 | +// } | ||
| 65 | +// SettleType settleType = EnumUtil.getByDesc(SettleType.class, data.getSettleType()); | ||
| 66 | +// if (settleType == null) { | ||
| 67 | +// throw new DefaultClientException( | ||
| 68 | +// "第" + context.readRowHolder().getRowIndex() + "行“结算方式”只能填写“" | ||
| 69 | +// + CollectionUtil.join( | ||
| 70 | +// EnumUtil.getDescs(SettleType.class), "、") + "”"); | ||
| 71 | +// } | ||
| 72 | +// data.setSettleTypeEnum(settleType); | ||
| 73 | 73 | ||
| 74 | if (!StringUtil.isBlank(data.getCity())) { | 74 | if (!StringUtil.isBlank(data.getCity())) { |
| 75 | String[] arr = data.getCity().split("/"); | 75 | String[] arr = data.getCity().split("/"); |
| @@ -128,7 +128,7 @@ public class CustomerImportListener extends ExcelImportListener<CustomerImportMo | @@ -128,7 +128,7 @@ public class CustomerImportListener extends ExcelImportListener<CustomerImportMo | ||
| 128 | 128 | ||
| 129 | record.setCode(data.getCode()); | 129 | record.setCode(data.getCode()); |
| 130 | record.setName(data.getName()); | 130 | record.setName(data.getName()); |
| 131 | - record.setMnemonicCode(data.getMnemonicCode()); | 131 | +// record.setMnemonicCode(data.getMnemonicCode()); |
| 132 | record.setContact(data.getContact()); | 132 | record.setContact(data.getContact()); |
| 133 | record.setTelephone(data.getTelephone()); | 133 | record.setTelephone(data.getTelephone()); |
| 134 | record.setEmail(data.getEmail()); | 134 | record.setEmail(data.getEmail()); |
| @@ -33,9 +33,9 @@ public class CustomerImportModel implements ExcelModel { | @@ -33,9 +33,9 @@ public class CustomerImportModel implements ExcelModel { | ||
| 33 | /** | 33 | /** |
| 34 | * 简码 | 34 | * 简码 |
| 35 | */ | 35 | */ |
| 36 | - @ExcelRequired | ||
| 37 | - @ExcelProperty("简码") | ||
| 38 | - private String mnemonicCode; | 36 | +// @ExcelRequired |
| 37 | +// @ExcelProperty("简码") | ||
| 38 | +// private String mnemonicCode; | ||
| 39 | 39 | ||
| 40 | /** | 40 | /** |
| 41 | * 联系人 | 41 | * 联系人 |
| @@ -88,9 +88,9 @@ public class CustomerImportModel implements ExcelModel { | @@ -88,9 +88,9 @@ public class CustomerImportModel implements ExcelModel { | ||
| 88 | /** | 88 | /** |
| 89 | * 结算方式 | 89 | * 结算方式 |
| 90 | */ | 90 | */ |
| 91 | - @ExcelRequired | ||
| 92 | - @ExcelProperty("结算方式") | ||
| 93 | - private String settleType; | 91 | +// @ExcelRequired |
| 92 | +// @ExcelProperty("结算方式") | ||
| 93 | +// private String settleType; | ||
| 94 | 94 | ||
| 95 | /** | 95 | /** |
| 96 | * 结算方式枚举 | 96 | * 结算方式枚举 |
| @@ -145,7 +145,7 @@ public class CustomerServiceImpl extends BaseMpServiceImpl<CustomerMapper, Custo | @@ -145,7 +145,7 @@ public class CustomerServiceImpl extends BaseMpServiceImpl<CustomerMapper, Custo | ||
| 145 | if (!StringUtil.isBlank(vo.getAddress())) { | 145 | if (!StringUtil.isBlank(vo.getAddress())) { |
| 146 | data.setAddress(vo.getAddress()); | 146 | data.setAddress(vo.getAddress()); |
| 147 | } | 147 | } |
| 148 | - data.setSettleType(EnumUtil.getByCode(SettleType.class, vo.getSettleType())); | 148 | +// data.setSettleType(EnumUtil.getByCode(SettleType.class, vo.getSettleType())); |
| 149 | if (!StringUtil.isBlank(vo.getCreditCode())) { | 149 | if (!StringUtil.isBlank(vo.getCreditCode())) { |
| 150 | data.setCreditCode(vo.getCreditCode()); | 150 | data.setCreditCode(vo.getCreditCode()); |
| 151 | } | 151 | } |
| @@ -35,7 +35,7 @@ public class CreateCustomerVo implements BaseVo, Serializable { | @@ -35,7 +35,7 @@ public class CreateCustomerVo implements BaseVo, Serializable { | ||
| 35 | * 简码 | 35 | * 简码 |
| 36 | */ | 36 | */ |
| 37 | @ApiModelProperty(value = "简码", required = true) | 37 | @ApiModelProperty(value = "简码", required = true) |
| 38 | - @NotBlank(message = "请输入简码!") | 38 | +// @NotBlank(message = "请输入简码!") |
| 39 | private String mnemonicCode; | 39 | private String mnemonicCode; |
| 40 | 40 | ||
| 41 | /** | 41 | /** |
| @@ -85,7 +85,7 @@ public class CreateCustomerVo implements BaseVo, Serializable { | @@ -85,7 +85,7 @@ public class CreateCustomerVo implements BaseVo, Serializable { | ||
| 85 | * 结算方式 | 85 | * 结算方式 |
| 86 | */ | 86 | */ |
| 87 | @ApiModelProperty(value = "结算方式", required = true) | 87 | @ApiModelProperty(value = "结算方式", required = true) |
| 88 | - @NotNull(message = "请选择结算方式!") | 88 | +// @NotNull(message = "请选择结算方式!") |
| 89 | @IsEnum(message = "请选择结算方式!", enumClass = SettleType.class) | 89 | @IsEnum(message = "请选择结算方式!", enumClass = SettleType.class) |
| 90 | private Integer settleType; | 90 | private Integer settleType; |
| 91 | 91 |
| @@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
| 61 | <where> | 61 | <where> |
| 62 | <if test="vo != null"> | 62 | <if test="vo != null"> |
| 63 | <if test="vo.code != null and vo.code != ''"> | 63 | <if test="vo.code != null and vo.code != ''"> |
| 64 | - AND code = #{vo.code} | 64 | + AND code like CONCAT('%', #{vo.code}, '%') |
| 65 | </if> | 65 | </if> |
| 66 | <if test="vo.name != null and vo.name != ''"> | 66 | <if test="vo.name != null and vo.name != ''"> |
| 67 | AND name LIKE CONCAT('%', #{vo.name}, '%') | 67 | AND name LIKE CONCAT('%', #{vo.name}, '%') |