fix(自定义对比): 80791
This commit is contained in:
+2
@@ -231,6 +231,8 @@ public class LawsCustomCompareInfoController {
|
||||
if (StringUtils.isNotBlank(lawsCustomCompareInfo.getId())){
|
||||
lawsCustomCompareInfoService.isHorizontalOverstep(lawsCustomCompareInfo.getId());
|
||||
}
|
||||
// 清单名称唯一性校验
|
||||
lawsCustomCompareInfoService.uniqueVerify(lawsCustomCompareInfo.getId(), lawsCustomCompareInfo.getListName());
|
||||
lawsCustomCompareInfoService.saveOrUpdate(lawsCustomCompareInfo);
|
||||
lawsCustomCompareInfoService.editCompareCreateTime(lawsCustomCompareInfo.getId());
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
|
||||
+7
@@ -118,5 +118,12 @@ public interface ILawsCustomCompareInfoService extends IService<LawsCustomCompar
|
||||
* 自定义对比-是否水平越权
|
||||
*/
|
||||
void isHorizontalOverstep(String ids);
|
||||
|
||||
/**
|
||||
* 自定义对比-清单名称唯一性校验
|
||||
* @param id
|
||||
* @param listName
|
||||
*/
|
||||
void uniqueVerify(String id, String listName);
|
||||
}
|
||||
|
||||
|
||||
+13
@@ -187,6 +187,7 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl<LawsCustomComp
|
||||
if (StringUtils.isBlank(lawsCustomCompareInfo.getId())){
|
||||
lawsCustomCompareInfo.setId(id);
|
||||
}
|
||||
uniqueVerify(lawsCustomCompareInfo.getId(), lawsCustomCompareInfo.getListName());
|
||||
saveOrUpdate(lawsCustomCompareInfo);
|
||||
|
||||
// 自定义对比_标准 旧数据
|
||||
@@ -485,6 +486,18 @@ public class LawsCustomCompareInfoServiceImpl extends ServiceImpl<LawsCustomComp
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uniqueVerify(String id, String listName) {
|
||||
if (StringUtils.isNotBlank(listName)){
|
||||
int count = count(new LambdaQueryWrapper<LawsCustomCompareInfo>()
|
||||
.eq(LawsCustomCompareInfo::getListName, listName)
|
||||
.ne(StringUtils.isNotBlank(id), LawsCustomCompareInfo::getId, id));
|
||||
if (count > 0){
|
||||
throw new JeroBootException("清单名称已存在!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void createTableCellContent(HSSFSheet sheet, List<StandardVO> standardVOS, List<LawsCustomCompareInventory> featureList, List<LawsCustomCompareInventory> compareList, List<LawsCustomCompareCell> list, CellStyle cellStyle) {
|
||||
for (int i = 2; i <= compareList.size() + 2; i++) {
|
||||
// 创建行
|
||||
|
||||
Reference in New Issue
Block a user