Search in sources :

Example 1 with SysBeanHelpExprVO

use of com.netsteadfast.greenstep.vo.SysBeanHelpExprVO in project bamboobsc by billchen198318.

the class SystemBeanHelpSaveOrUpdateAction method saveExpr.

private void saveExpr() throws ControllerException, AuthorityException, ServiceException, Exception {
    this.checkExprFields();
    SysBeanHelpExprVO beanHelpExpr = new SysBeanHelpExprVO();
    this.transformFields2ValueObject(beanHelpExpr, new String[] { "exprSeq", "runType" });
    DefaultResult<SysBeanHelpExprVO> result = this.systemBeanHelpLogicService.createExpr(beanHelpExpr, this.getFields().get("helpOid"), this.getFields().get("exprOid"));
    this.message = result.getSystemMessage().getValue();
    if (result.getValue() != null) {
        this.success = IS_YES;
    }
}
Also used : SysBeanHelpExprVO(com.netsteadfast.greenstep.vo.SysBeanHelpExprVO)

Example 2 with SysBeanHelpExprVO

use of com.netsteadfast.greenstep.vo.SysBeanHelpExprVO in project bamboobsc by billchen198318.

the class SystemBeanHelpLogicServiceImpl method createExprMap.

@ServiceMethodAuthority(type = { ServiceMethodType.INSERT })
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = { RuntimeException.class, IOException.class, Exception.class })
@Override
public DefaultResult<SysBeanHelpExprMapVO> createExprMap(SysBeanHelpExprMapVO beanHelpExprMap, String helpExprOid) throws ServiceException, Exception {
    if (beanHelpExprMap == null || super.isBlank(helpExprOid)) {
        throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_BLANK));
    }
    SysBeanHelpExprVO sysBeanHelpExpr = new SysBeanHelpExprVO();
    sysBeanHelpExpr.setOid(helpExprOid);
    DefaultResult<SysBeanHelpExprVO> mResult = this.sysBeanHelpExprService.findObjectByOid(sysBeanHelpExpr);
    if (mResult.getValue() == null) {
        throw new ServiceException(mResult.getSystemMessage().getValue());
    }
    // 查看有沒有資料
    sysBeanHelpExpr = mResult.getValue();
    beanHelpExprMap.setHelpExprOid(sysBeanHelpExpr.getOid());
    return this.sysBeanHelpExprMapService.saveObject(beanHelpExprMap);
}
Also used : ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) SysBeanHelpExprVO(com.netsteadfast.greenstep.vo.SysBeanHelpExprVO) ServiceMethodAuthority(com.netsteadfast.greenstep.base.model.ServiceMethodAuthority) Transactional(org.springframework.transaction.annotation.Transactional)

Example 3 with SysBeanHelpExprVO

use of com.netsteadfast.greenstep.vo.SysBeanHelpExprVO in project bamboobsc by billchen198318.

the class SystemBeanHelpSaveOrUpdateAction method deleteExpr.

private void deleteExpr() throws ControllerException, AuthorityException, ServiceException, Exception {
    SysBeanHelpExprVO beanHelpExpr = new SysBeanHelpExprVO();
    this.transformFields2ValueObject(beanHelpExpr, new String[] { "oid" });
    DefaultResult<Boolean> result = this.systemBeanHelpLogicService.deleteExpr(beanHelpExpr);
    this.message = result.getSystemMessage().getValue();
    if (result.getValue() != null && result.getValue()) {
        this.success = IS_YES;
    }
}
Also used : SysBeanHelpExprVO(com.netsteadfast.greenstep.vo.SysBeanHelpExprVO)

Aggregations

SysBeanHelpExprVO (com.netsteadfast.greenstep.vo.SysBeanHelpExprVO)3 ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)1 ServiceMethodAuthority (com.netsteadfast.greenstep.base.model.ServiceMethodAuthority)1 Transactional (org.springframework.transaction.annotation.Transactional)1