From 41e29e26f061ea8942457e86319d200059a8b54e Mon Sep 17 00:00:00 2001 From: Gitea Date: Mon, 11 Nov 2024 11:15:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=AA=E5=99=A8=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/instrument/controller/InstrumentController.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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");