diff --git a/src/main/java/com/spring/modules/change/controller/ChangeManagementController.java b/src/main/java/com/spring/modules/change/controller/ChangeManagementController.java index d0ff719b..9b1e97ff 100644 --- a/src/main/java/com/spring/modules/change/controller/ChangeManagementController.java +++ b/src/main/java/com/spring/modules/change/controller/ChangeManagementController.java @@ -14,6 +14,9 @@ import com.spring.modules.part.service.BomManagementService; import com.spring.modules.part.vo.BomHeaderVo; import com.spring.modules.project.data.PlmProjectPartData; import com.spring.modules.quotation.vo.SysOssVo; +import com.spring.modules.sys.dao.SysMenuDao; +import com.spring.modules.sys.entity.SysUserEntity; +import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.web.bind.annotation.*; @@ -30,6 +33,9 @@ public class ChangeManagementController { @Autowired private ChangeManagementService changeManagementService; + @Autowired + private SysMenuDao sysMenuDao; + /** * 获取技术参数卡列表 * @param data @@ -460,4 +466,15 @@ public class ChangeManagementController { changeManagementService.deleteTempChangeInfo(data); return R.ok(); } + + /** + * 删除临时变更单数据 + */ + @PostMapping(value="/checkSuperAdmin") + @ResponseBody + public R checkSuperAdmin() { + boolean flag = !sysMenuDao.checkSuperAdmin(((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUserId()).isEmpty(); + // 是否超级管理员 + return R.ok().put("superAdmin", flag); + } } diff --git a/src/main/java/com/spring/modules/sampleManagement/controller/TechnicalSpecificationController.java b/src/main/java/com/spring/modules/sampleManagement/controller/TechnicalSpecificationController.java index a080475c..39591bdd 100644 --- a/src/main/java/com/spring/modules/sampleManagement/controller/TechnicalSpecificationController.java +++ b/src/main/java/com/spring/modules/sampleManagement/controller/TechnicalSpecificationController.java @@ -1252,11 +1252,11 @@ public class TechnicalSpecificationController { @PostMapping(value="/getBMStatusDesc") @ResponseBody public R getBMStatusDesc(@RequestBody PlmTechnicalSpecificationSheetData data) { - String status= technicalSpecificationService.getBMStatusDesc(data); - Boolean flag=false; - //是否超级管理员 - if(sysMenuDao.checkSuperAdmin(((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUserId()).size()>0){ - flag=true; + String status = technicalSpecificationService.getBMStatusDesc(data); + Boolean flag = false; + // 是否超级管理员 + if (sysMenuDao.checkSuperAdmin(((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUserId()).size() > 0) { + flag = true; } return R.ok().put("status",status).put("superAdmin",flag); }