法规清单批量删除--添加ids为空校验
This commit is contained in:
+7
-1
@@ -617,6 +617,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void deleteByIds(List<String> ids,String projectLibraryId,String cut) {
|
public void deleteByIds(List<String> ids,String projectLibraryId,String cut) {
|
||||||
|
if(ObjectUtils.isEmpty(ids)){
|
||||||
|
if(CutEnum.CN.getValue().equals(cut)){
|
||||||
|
throw new JeroBootException("请选择数据");
|
||||||
|
}else{
|
||||||
|
throw new JeroBootException("Please select data");
|
||||||
|
}
|
||||||
|
}
|
||||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
int isProjectRole = checkUserRole(projectLibraryId, currentUser.getId(),"");
|
int isProjectRole = checkUserRole(projectLibraryId, currentUser.getId(),"");
|
||||||
if(!ProjectRoleEnum.STUDIO_ENGINEER.getValue().equals(String.valueOf(isProjectRole))){
|
if(!ProjectRoleEnum.STUDIO_ENGINEER.getValue().equals(String.valueOf(isProjectRole))){
|
||||||
@@ -638,7 +645,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
|||||||
String enContentLog = username+" deleted “"+serialNumber+"” from the list";
|
String enContentLog = username+" deleted “"+serialNumber+"” from the list";
|
||||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId,CutEnum.CN.getValue());
|
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId,CutEnum.CN.getValue());
|
||||||
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId,CutEnum.EN.getValue());
|
projectLawsInventoryLogEOService.updateLog(contentLog, projectLibraryId,CutEnum.EN.getValue());
|
||||||
|
|
||||||
removeByIds(ids);
|
removeByIds(ids);
|
||||||
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(ids);
|
this.projectTaskInventoryEOService.deleteByProjectLawsInventoryIds(ids);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user