|
@@ -43,8 +43,8 @@ public class DictCodingService {
|
|
|
|
|
|
DictTenantDataVo dictTenantDataVo = DictUtils.getDictDataMap(dictCode).get(dictKey);
|
|
|
List<RuleVo> ruleVoList = JSON.parseArray(dictTenantDataVo.getRuleJson(), RuleVo.class);
|
|
|
- if (ruleVoList.size() == 0) {
|
|
|
- throw new ServiceException("编码生成规则为空");
|
|
|
+ if (ObjectUtil.isEmpty(ruleVoList) && ruleVoList.size() == 0) {
|
|
|
+ throw new ServiceException("客户类型编码生成规则为空,请先前往【业务字典】-【客户类型】配置编码生成规则!");
|
|
|
}
|
|
|
|
|
|
for (RuleVo ruleVo : ruleVoList) {
|
|
@@ -59,10 +59,10 @@ public class DictCodingService {
|
|
|
String value = ruleVo.getValue();
|
|
|
|
|
|
dictTenantDataVo.setRuleNum(dictTenantDataVo.getRuleNum() + 1);
|
|
|
- if(ObjectUtil.equals(dictTenantDataVo.getType(),1)) {
|
|
|
+ if (ObjectUtil.equals(dictTenantDataVo.getType(), 1)) {
|
|
|
DictCommonData dictCommonData = BeanUtil.copyProperties(dictTenantDataVo, DictCommonData.class);
|
|
|
dictCommonDataService.updateById(dictCommonData);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
dictTenantDataService.updateById(dictTenantDataVo);
|
|
|
}
|
|
|
|