|
@ -253,11 +253,8 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl<IssuePr |
|
|
logger.error(String.format("修改分类信息状态失败,客户Id->%s,分类Id->%s", formDTO.getCustomerId(), formDTO.getCategoryId())); |
|
|
logger.error(String.format("修改分类信息状态失败,客户Id->%s,分类Id->%s", formDTO.getCustomerId(), formDTO.getCategoryId())); |
|
|
throw new RuntimeException("分类信息修改失败!"); |
|
|
throw new RuntimeException("分类信息修改失败!"); |
|
|
} |
|
|
} |
|
|
//修改吧二级分类下默认的标签数据
|
|
|
//修改把二级分类下默认的标签数据
|
|
|
if (issueProjectTagDictDao.updateCustomerTag(formDTO) < NumConstant.ONE) { |
|
|
issueProjectTagDictDao.updateCustomerTag(formDTO); |
|
|
logger.error(String.format("修改标签信息状态失败,客户Id->%s,分类Id->%s", formDTO.getCustomerId(), formDTO.getCategoryId())); |
|
|
|
|
|
throw new RuntimeException("分类、标签信息修改失败!"); |
|
|
|
|
|
} |
|
|
|
|
|
//4.修改缓存中标签状态
|
|
|
//4.修改缓存中标签状态
|
|
|
dictRedis.updateTagAvailabilityBySecondCategoryIds(formDTO.getCustomerId(),formDTO.getSecondCategorylist(),formDTO.getType()); |
|
|
dictRedis.updateTagAvailabilityBySecondCategoryIds(formDTO.getCustomerId(),formDTO.getSecondCategorylist(),formDTO.getType()); |
|
|
} |
|
|
} |
|
@ -310,7 +307,7 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl<IssuePr |
|
|
// 分类名称在同一个客户下有效数据中不允许重复
|
|
|
// 分类名称在同一个客户下有效数据中不允许重复
|
|
|
Integer numCategoryName = baseDao.isCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), null,null); |
|
|
Integer numCategoryName = baseDao.isCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), null,null); |
|
|
if (NumConstant.ZERO < numCategoryName) { |
|
|
if (NumConstant.ZERO < numCategoryName) { |
|
|
throw new RenException("现添加的一级分类名称 重复"); |
|
|
throw new RenException(EpmetErrorCode.CATEGORY_NAME.getCode(), EpmetErrorCode.CATEGORY_NAME.getMsg()); |
|
|
} |
|
|
} |
|
|
IssueProjectCategoryDictEntity entity = this.packageFirstCategoryDictEntity(formDTO); |
|
|
IssueProjectCategoryDictEntity entity = this.packageFirstCategoryDictEntity(formDTO); |
|
|
baseDao.insert(entity); |
|
|
baseDao.insert(entity); |
|
@ -355,7 +352,7 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl<IssuePr |
|
|
// 分类名称在同一个客户下有效数据中不允许重复
|
|
|
// 分类名称在同一个客户下有效数据中不允许重复
|
|
|
Integer numCategoryName = baseDao.isCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), null, formDTO.getCategoryId()); |
|
|
Integer numCategoryName = baseDao.isCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), null, formDTO.getCategoryId()); |
|
|
if (NumConstant.ZERO < numCategoryName) { |
|
|
if (NumConstant.ZERO < numCategoryName) { |
|
|
throw new RenException("现添加的一级分类名称 重复"); |
|
|
throw new RenException(EpmetErrorCode.CATEGORY_NAME.getCode(), EpmetErrorCode.CATEGORY_NAME.getMsg()); |
|
|
} |
|
|
} |
|
|
IssueProjectCategoryDictEntity entity = new IssueProjectCategoryDictEntity(); |
|
|
IssueProjectCategoryDictEntity entity = new IssueProjectCategoryDictEntity(); |
|
|
entity.setCategoryName(formDTO.getCategoryName()); |
|
|
entity.setCategoryName(formDTO.getCategoryName()); |
|
@ -370,7 +367,7 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl<IssuePr |
|
|
// 分类名称在同一个客户下同一 一级分类下有效数据中不允许重复
|
|
|
// 分类名称在同一个客户下同一 一级分类下有效数据中不允许重复
|
|
|
Integer numCategoryName = baseDao.isCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), formDTO.getParentCategoryId(), null); |
|
|
Integer numCategoryName = baseDao.isCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), formDTO.getParentCategoryId(), null); |
|
|
if (NumConstant.ZERO < numCategoryName) { |
|
|
if (NumConstant.ZERO < numCategoryName) { |
|
|
throw new RenException("现添加的二级分类名称 重复"); |
|
|
throw new RenException(EpmetErrorCode.CATEGORY_NAME.getCode(), EpmetErrorCode.CATEGORY_NAME.getMsg()); |
|
|
} |
|
|
} |
|
|
IssueProjectCategoryDictEntity entity = this.packageSecondCategoryDictEntity(formDTO); |
|
|
IssueProjectCategoryDictEntity entity = this.packageSecondCategoryDictEntity(formDTO); |
|
|
baseDao.insert(entity); |
|
|
baseDao.insert(entity); |
|
@ -419,7 +416,7 @@ public class IssueProjectCategoryDictServiceImpl extends BaseServiceImpl<IssuePr |
|
|
// 分类名称在同一个客户下同一 一级分类下有效数据中不允许重复
|
|
|
// 分类名称在同一个客户下同一 一级分类下有效数据中不允许重复
|
|
|
Integer numCategoryName = baseDao.isCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), formDTO.getParentCategoryId(), formDTO.getCategoryId()); |
|
|
Integer numCategoryName = baseDao.isCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), formDTO.getParentCategoryId(), formDTO.getCategoryId()); |
|
|
if (NumConstant.ZERO < numCategoryName) { |
|
|
if (NumConstant.ZERO < numCategoryName) { |
|
|
throw new RenException("现添加的二级分类名称 重复"); |
|
|
throw new RenException(EpmetErrorCode.CATEGORY_NAME.getCode(), EpmetErrorCode.CATEGORY_NAME.getMsg()); |
|
|
} |
|
|
} |
|
|
IssueProjectCategoryDictEntity entity = new IssueProjectCategoryDictEntity(); |
|
|
IssueProjectCategoryDictEntity entity = new IssueProjectCategoryDictEntity(); |
|
|
entity.setCategoryName(formDTO.getCategoryName()); |
|
|
entity.setCategoryName(formDTO.getCategoryName()); |
|
|