|
|
|
@ -39,7 +39,7 @@ public class SysDictionaryService implements ISysDictionaryService {
|
|
|
|
|
public void insertSysDictionary(SysDictionary sysDictionary) {
|
|
|
|
|
long repeatCodeCount = sysDictionaryRDao.findByPropertyCount(new String[]{"dictionaryCode", "dictionarySoftType"},
|
|
|
|
|
new Object[]{sysDictionary.getDictionaryCode(), sysDictionary.getDictionarySoftType()});
|
|
|
|
|
if (repeatCodeCount > 0) {
|
|
|
|
|
if (sysDictionary.getParentIdVal() == CommonEnumUtil.PARENT.DEFAULT.getValue() &&repeatCodeCount > 0) {
|
|
|
|
|
throw ImppExceptionBuilder.newInstance()
|
|
|
|
|
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
|
|
|
|
|
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION_DATA_EXIT.getCode())
|
|
|
|
@ -87,7 +87,7 @@ public class SysDictionaryService implements ISysDictionaryService {
|
|
|
|
|
// 校验唯一
|
|
|
|
|
String hqlPack = CoreHqlPack.packHqlSysDictionaryCode(sysDictionary);
|
|
|
|
|
long repeatCodeCount = sysDictionaryRDao.findByHqlWhereCount(hqlPack);
|
|
|
|
|
if (repeatCodeCount > 0) {
|
|
|
|
|
if (sysDictionary.getParentIdVal() == CommonEnumUtil.PARENT.DEFAULT.getValue() &&repeatCodeCount > 0) {
|
|
|
|
|
throw ImppExceptionBuilder.newInstance()
|
|
|
|
|
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
|
|
|
|
|
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION_DATA_EXIT.getCode())
|
|
|
|
|