|
|
@ -4,10 +4,13 @@ import java.util.ArrayList;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.common.constant.UserConstants;
|
|
|
|
import com.ruoyi.common.core.domain.Ztree;
|
|
|
|
import com.ruoyi.common.core.domain.Ztree;
|
|
|
|
import com.ruoyi.common.utils.ShiroUtils;
|
|
|
|
import com.ruoyi.common.utils.ShiroUtils;
|
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
|
import com.ruoyi.system.domain.BaseMonitorunitInfo;
|
|
|
|
import com.ruoyi.system.domain.BaseMonitorunitInfo;
|
|
|
|
|
|
|
|
import com.ruoyi.system.domain.BaseSensorInfo;
|
|
|
|
|
|
|
|
import com.ruoyi.system.domain.dto.BaseSensorInfoDto;
|
|
|
|
import com.ruoyi.system.service.IBaseMonitorunitInfoService;
|
|
|
|
import com.ruoyi.system.service.IBaseMonitorunitInfoService;
|
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@ -182,4 +185,14 @@ public class BaseMonitorunitTypeController extends BaseController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ztrees;
|
|
|
|
return ztrees;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/checkUnitTypeIdUnique")
|
|
|
|
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
public String checkMonitorUnitTypeIdUnique(BaseMonitorunitType baseMonitorunitType){
|
|
|
|
|
|
|
|
List<BaseMonitorunitType> baseMonitorunitTypes = baseMonitorunitTypeService.selectBaseMonitorunitTypeList(baseMonitorunitType);
|
|
|
|
|
|
|
|
if(baseMonitorunitTypes.size() > 0){
|
|
|
|
|
|
|
|
return UserConstants.DEPT_NAME_NOT_UNIQUE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return UserConstants.DEPT_NAME_UNIQUE;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|