diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java index 142518f..d495f3e 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java @@ -228,8 +228,12 @@ public class InstrumentController extends JeecgController add(@RequestBody Instrument instrument) { LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + SysDepart sysDepart = sysDepartService.getById(loginUser.getOrgId()); + if(sysDepart.getStatus().equals("0")){ + return Result.error("该用户单位冻结,无法申请"); + } instrument.setDeclarationUnit(loginUser.getOrgId()); - if(sysDepartService.getById(loginUser.getOrgId()).getOrgCategory().equals("3")){ + if(sysDepart.getOrgCategory().equals("3")){ instrument.setFlag("1"); }else{ instrument.setFlag("0");