Search in sources :

Example 6 with SysJreportVO

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

the class SysJreportServiceImpl method findForSimple.

@Override
public DefaultResult<SysJreportVO> findForSimple(String oid) throws ServiceException, Exception {
    if (StringUtils.isBlank(oid)) {
        throw new ServiceException(SysMessageUtil.get(GreenStepSysMsgConstants.PARAMS_BLANK));
    }
    SysJreportVO searchObj = this.sysJreportDAO.findForSimple(oid);
    DefaultResult<SysJreportVO> result = new DefaultResult<SysJreportVO>();
    if (null != searchObj && !StringUtils.isBlank(searchObj.getOid())) {
        result.setValue(searchObj);
    } else {
        result.setSystemMessage(new SystemMessage(SysMessageUtil.get(GreenStepSysMsgConstants.DATA_NO_EXIST)));
    }
    return result;
}
Also used : SystemMessage(com.netsteadfast.greenstep.base.model.SystemMessage) ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) SysJreportVO(com.netsteadfast.greenstep.vo.SysJreportVO) DefaultResult(com.netsteadfast.greenstep.base.model.DefaultResult)

Example 7 with SysJreportVO

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

the class SystemJreportSaveOrUpdateAction method save.

private void save() throws ControllerException, AuthorityException, ServiceException, Exception {
    this.checkFields();
    if (StringUtils.isBlank(this.getFields().get("uploadOid"))) {
        super.throwMessage("Please upload Report(zip) file!");
    }
    this.selfTestUploadReportData();
    SysJreportVO report = new SysJreportVO();
    this.transformFields2ValueObject(report, new String[] { "reportId", "description" });
    report.setIsCompile(YesNo.NO);
    if ("true".equals(this.getFields().get("isCompile"))) {
        report.setIsCompile(YesNo.YES);
    }
    this.fillContent(report);
    DefaultResult<SysJreportVO> result = this.systemJreportLogicService.create(report);
    this.message = result.getSystemMessage().getValue();
    if (result.getValue() != null) {
        this.success = IS_YES;
        this.deployReport(result.getValue());
    }
}
Also used : SysJreportVO(com.netsteadfast.greenstep.vo.SysJreportVO)

Aggregations

SysJreportVO (com.netsteadfast.greenstep.vo.SysJreportVO)7 ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)4 DefaultResult (com.netsteadfast.greenstep.base.model.DefaultResult)2 SystemMessage (com.netsteadfast.greenstep.base.model.SystemMessage)2 ControllerException (com.netsteadfast.greenstep.base.exception.ControllerException)1 ServiceMethodAuthority (com.netsteadfast.greenstep.base.model.ServiceMethodAuthority)1 HashMap (java.util.HashMap)1 Transactional (org.springframework.transaction.annotation.Transactional)1