仪器问题修复

master
Gitea 2 weeks ago
parent b55040c4f9
commit 41e29e26f0
  1. 6
      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<Instrument, IInstrumen
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<String> add(@RequestBody Instrument instrument) { public Result<String> add(@RequestBody Instrument instrument) {
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
SysDepart sysDepart = sysDepartService.getById(loginUser.getOrgId());
if(sysDepart.getStatus().equals("0")){
return Result.error("该用户单位冻结,无法申请");
}
instrument.setDeclarationUnit(loginUser.getOrgId()); instrument.setDeclarationUnit(loginUser.getOrgId());
if(sysDepartService.getById(loginUser.getOrgId()).getOrgCategory().equals("3")){ if(sysDepart.getOrgCategory().equals("3")){
instrument.setFlag("1"); instrument.setFlag("1");
}else{ }else{
instrument.setFlag("0"); instrument.setFlag("0");

Loading…
Cancel
Save