|
|
@ -3,6 +3,8 @@ package com.ruoyi.web.controller.base;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
import java.util.stream.Stream;
|
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.common.constant.UserConstants;
|
|
|
|
import com.ruoyi.common.constant.UserConstants;
|
|
|
|
import com.ruoyi.common.core.domain.Ztree;
|
|
|
|
import com.ruoyi.common.core.domain.Ztree;
|
|
|
@ -190,7 +192,8 @@ public class BaseMonitorunitTypeController extends BaseController {
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public String checkMonitorUnitTypeIdUnique(BaseMonitorunitType baseMonitorunitType){
|
|
|
|
public String checkMonitorUnitTypeIdUnique(BaseMonitorunitType baseMonitorunitType){
|
|
|
|
List<BaseMonitorunitType> baseMonitorunitTypes = baseMonitorunitTypeService.selectBaseMonitorunitTypeList(baseMonitorunitType);
|
|
|
|
List<BaseMonitorunitType> baseMonitorunitTypes = baseMonitorunitTypeService.selectBaseMonitorunitTypeList(baseMonitorunitType);
|
|
|
|
if(baseMonitorunitTypes.size() > 0){
|
|
|
|
List<BaseMonitorunitType> collect = baseMonitorunitTypes.stream().filter(x -> x.getMonitorunittypeId().equals(baseMonitorunitType.getMonitorunittypeId())).collect(Collectors.toList());
|
|
|
|
|
|
|
|
if(collect.size() > 0){
|
|
|
|
return UserConstants.DEPT_NAME_NOT_UNIQUE;
|
|
|
|
return UserConstants.DEPT_NAME_NOT_UNIQUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return UserConstants.DEPT_NAME_UNIQUE;
|
|
|
|
return UserConstants.DEPT_NAME_UNIQUE;
|
|
|
|