|
|
@ -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"); |
|
|
|