diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/innovationvoucher/controller/InnovationVoucherController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/innovationvoucher/controller/InnovationVoucherController.java index d52cd13..27ed968 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/innovationvoucher/controller/InnovationVoucherController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/innovationvoucher/controller/InnovationVoucherController.java @@ -297,9 +297,13 @@ public class InnovationVoucherController extends JeecgController add(@RequestBody InnovationVoucher innovationVoucher) { LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + SysDepart sysDepart = sysDepartService.getById(loginUser.getOrgId()); + if(sysDepart.getStatus().equals("0")){ + return Result.error("该用户单位冻结,无法申请"); + } innovationVoucher.setProDept(loginUser.getOrgId()); String uuid = IdUtil.randomUUID().replaceAll("-", ""); - if(sysDepartService.getById(loginUser.getOrgId()).getOrgCategory().equals("3")){ + if(sysDepart.getOrgCategory().equals("3")){ innovationVoucher.setFlag("1"); String cxqCode = "XQ"; cxqCode += uuid.substring(0, 18);