| | |
| | | if (currentUserId < 0){ |
| | | throw new BusinessException(this.getClass(), ResultCode.BUSINESS_ERROR_NOT_ALLOWED.getCode(), "当前用户无效,请重新登录"); |
| | | } |
| | | UserInfoDomainDTO userInfoById = userDomainService.getUserInfoById(currentUserId); |
| | | if (userInfoById == null){ |
| | | throw new BusinessException(this.getClass(), ResultCode.BUSINESS_ERROR_NOT_ALLOWED.getCode(), "当前用户无效,请重新登录"); |
| | | } |
| | | String realName = userInfoById.getRealName(); |
| | | |
| | | RiskAssessPlanAppIdentificationBO identificationParam = BeanCopyUtils.copyBean(identificationReqBO, RiskAssessPlanAppIdentificationBO.class); |
| | | int tag = 1; |
| | |
| | | if (identificationParam.getIdentificationMethod() == 1){ |
| | | RiskAssessPlanIdentificationPha pha = BeanCopyUtils.copyBean(identificationParam, RiskAssessPlanIdentificationPha.class); |
| | | pha.setAssessPlanId(identificationParam.getId()); |
| | | pha.setCreateByUser(realName); |
| | | pha.setCreateByUserId(currentUserId.intValue()); |
| | | phaInsertDTO = phaService.insertPha(currentUserId, pha); |
| | | if (ObjectUtils.isEmpty(phaInsertDTO)){ |
| | | tag = 0; |
| | |
| | | }else if (identificationParam.getIdentificationMethod() == 2){ |
| | | RiskAssessPlanIdentificationJha jha = BeanCopyUtils.copyBean(identificationParam, RiskAssessPlanIdentificationJha.class); |
| | | jha.setAssessPlanId(identificationParam.getId()); |
| | | jha.setCreateByUser(realName); |
| | | jha.setCreateByUserId(currentUserId.intValue()); |
| | | jhaInsertDTO = jhaService.insertJha(currentUserId, jha); |
| | | if (ObjectUtils.isEmpty(jhaInsertDTO)){ |
| | | tag = 0; |
| | |
| | | }else if (identificationParam.getIdentificationMethod() == 3){ |
| | | RiskAssessPlanIdentificationScl scl = BeanCopyUtils.copyBean(identificationParam, RiskAssessPlanIdentificationScl.class); |
| | | scl.setAssessPlanId(identificationParam.getId()); |
| | | scl.setCreateByUser(realName); |
| | | scl.setCreateByUserId(currentUserId.intValue()); |
| | | sclInsertDTO = sclService.insertScl(currentUserId, scl); |
| | | if (ObjectUtils.isEmpty(sclInsertDTO)){ |
| | | tag = 0; |
| | |
| | | }else if (identificationParam.getIdentificationMethod() == 4){ |
| | | RiskAssessPlanIdentificationHazop hazop = BeanCopyUtils.copyBean(identificationParam, RiskAssessPlanIdentificationHazop.class); |
| | | hazop.setAssessPlanId(identificationParam.getId()); |
| | | hazop.setCreateByUser(realName); |
| | | hazop.setCreateByUserId(currentUserId.intValue()); |
| | | |
| | | hazopInsertDTO = hazopService.insertHazop(currentUserId, hazop); |
| | | if (ObjectUtils.isEmpty(hazopInsertDTO)){ |
| | | tag = 0; |
| | |
| | | }else if (identificationParam.getIdentificationMethod() == 5){ |
| | | RiskAssessPlanIdentificationAnalogy analogy = BeanCopyUtils.copyBean(identificationParam, RiskAssessPlanIdentificationAnalogy.class); |
| | | analogy.setAssessPlanId(identificationParam.getId()); |
| | | analogy.setCreateByUser(realName); |
| | | analogy.setCreateByUserId(currentUserId.intValue()); |
| | | analogyInsertDTO = analogyService.insertAnalogy(currentUserId, analogy); |
| | | if (ObjectUtils.isEmpty(analogyInsertDTO)){ |
| | | tag = 0; |
| | |
| | | if (currentUserId < 0){ |
| | | throw new BusinessException(this.getClass(), ResultCode.BUSINESS_ERROR_NOT_ALLOWED.getCode(), "当前用户无效,请重新登录"); |
| | | } |
| | | |
| | | UserInfoDomainDTO userInfoById = userDomainService.getUserInfoById(currentUserId); |
| | | if (userInfoById == null){ |
| | | throw new BusinessException(this.getClass(), ResultCode.BUSINESS_ERROR_NOT_ALLOWED.getCode(), "当前用户无效,请重新登录"); |
| | | } |
| | | String realName = userInfoById.getRealName(); |
| | | RiskAssessPlanIdentificationAppUpdateBO updateParam = BeanCopyUtils.copyBean(updateReqBO, RiskAssessPlanIdentificationAppUpdateBO.class); |
| | | int tag = 1; |
| | | FactorQueryDTO factorQueryDTO = new FactorQueryDTO(); |
| | |
| | | RiskAssessPlanIdentificationPha pha = BeanCopyUtils.copyBean(updateParam, RiskAssessPlanIdentificationPha.class); |
| | | pha.setAssessPlanId(updateParam.getId()); |
| | | pha.setId(updateParam.getPhaId()); |
| | | pha.setUpdateByUser(realName); |
| | | pha.setUpdateByUserId(currentUserId.intValue()); |
| | | PhaInsertDTO phaInsertDTO = phaService.updatePha(currentUserId, pha); |
| | | if (ObjectUtils.isEmpty(phaInsertDTO)){ |
| | | tag = 0; |
| | |
| | | RiskAssessPlanIdentificationJha jha = BeanCopyUtils.copyBean(updateParam, RiskAssessPlanIdentificationJha.class); |
| | | jha.setAssessPlanId(updateParam.getId()); |
| | | jha.setId(updateParam.getJhaId()); |
| | | jha.setUpdateByUser(realName); |
| | | jha.setUpdateByUserId(currentUserId.intValue()); |
| | | JhaInsertDTO jhaInsertDTO = jhaService.updateJha(currentUserId, jha); |
| | | if (ObjectUtils.isEmpty(jhaInsertDTO)){ |
| | | tag = 0; |
| | |
| | | RiskAssessPlanIdentificationScl scl = BeanCopyUtils.copyBean(updateParam, RiskAssessPlanIdentificationScl.class); |
| | | scl.setAssessPlanId(updateParam.getId()); |
| | | scl.setId(updateParam.getSclId()); |
| | | scl.setUpdateByUser(realName); |
| | | scl.setUpdateByUserId(currentUserId.intValue()); |
| | | SclInsertDTO sclInsertDTO = sclService.updateScl(currentUserId, scl); |
| | | if (ObjectUtils.isEmpty(sclInsertDTO)){ |
| | | tag = 0; |
| | |
| | | RiskAssessPlanIdentificationHazop hazop = BeanCopyUtils.copyBean(updateParam, RiskAssessPlanIdentificationHazop.class); |
| | | hazop.setAssessPlanId(updateParam.getId()); |
| | | hazop.setId(updateParam.getHazopId()); |
| | | hazop.setUpdateByUser(realName); |
| | | hazop.setUpdateByUserId(currentUserId.intValue()); |
| | | HazopInsertDTO hazopInsertDTO = hazopService.updateHazop(currentUserId, hazop); |
| | | if (ObjectUtils.isEmpty(hazopInsertDTO)){ |
| | | tag = 0; |
| | |
| | | RiskAssessPlanIdentificationAnalogy analogy = BeanCopyUtils.copyBean(updateParam, RiskAssessPlanIdentificationAnalogy.class); |
| | | analogy.setAssessPlanId(updateParam.getId()); |
| | | analogy.setId(updateParam.getAnalogyId()); |
| | | analogy.setUpdateByUser(realName); |
| | | analogy.setUpdateByUserId(currentUserId.intValue()); |
| | | AnalogyInsertDTO analogyInsertDTO = analogyService.updateAnalogy(currentUserId, analogy); |
| | | if (ObjectUtils.isEmpty(analogyInsertDTO)){ |
| | | tag = 0; |