Search in sources :

Example 11 with SysProgVO

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

the class SystemProgramManagementAction method loadSysProgData.

/**
	 * 修改模式載入 TB_SYS_PROG 資料
	 * 
	 * @throws ServiceException
	 * @throws Exception
	 */
private void loadSysProgData() throws ServiceException, Exception {
    this.transformFields2ValueObject(this.sysProg, new String[] { "oid" });
    DefaultResult<SysProgVO> result = this.sysProgService.findObjectByOid(this.sysProg);
    if (result.getValue() == null) {
        throw new ServiceException(result.getSystemMessage().getValue());
    }
    this.sysProg = result.getValue();
    TbSysIcon sysIcon = new TbSysIcon();
    sysIcon.setIconId(sysProg.getIcon());
    sysIcon = this.sysIconService.findByEntityUK(sysIcon);
    if (sysIcon != null) {
        this.editIconValue = sysIcon.getOid();
    }
    TbSys sys = new TbSys();
    sys.setSysId(this.sysProg.getProgSystem());
    sys = this.sysService.findByEntityUK(sys);
    if (sys != null) {
        this.editProgSystemValue = sys.getOid();
    }
}
Also used : TbSys(com.netsteadfast.greenstep.po.hbm.TbSys) ServiceException(com.netsteadfast.greenstep.base.exception.ServiceException) TbSysIcon(com.netsteadfast.greenstep.po.hbm.TbSysIcon) SysProgVO(com.netsteadfast.greenstep.vo.SysProgVO)

Example 12 with SysProgVO

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

the class SystemProgramManagementSaveOrUpdateAction method update.

/**
	 * 更新 TB_SYS_PROG 資料
	 * 
	 * @throws ControllerException
	 * @throws AuthorityException
	 * @throws ServiceException
	 * @throws Exception
	 */
private void update() throws ControllerException, AuthorityException, ServiceException, Exception {
    this.checkFields("E");
    SysProgVO sysProg = new SysProgVO();
    this.transformFields2ValueObject(sysProg, new String[] { "oid", "progId", "name", "url", "itemType", "isWindow" }, new String[] { "oid", "CORE_PROG001D0002E_progId", "CORE_PROG001D0002E_name", "CORE_PROG001D0002E_url", "CORE_PROG001D0002E_itemType", "CORE_PROG001D0002E_isWindow" });
    sysProg.setEditMode(YesNo.NO);
    sysProg.setIsDialog(YesNo.NO);
    if ("true".equals(this.getFields().get("CORE_PROG001D0002E_editMode"))) {
        sysProg.setEditMode(YesNo.YES);
    }
    if ("true".equals(this.getFields().get("CORE_PROG001D0002E_isDialog"))) {
        sysProg.setIsDialog(YesNo.YES);
        sysProg.setDialogW(SimpleUtils.getInt(this.getFields().get("CORE_PROG001D0002E_dialogW"), 50));
        sysProg.setDialogH(SimpleUtils.getInt(this.getFields().get("CORE_PROG001D0002E_dialogH"), 25));
    }
    DefaultResult<SysProgVO> result = this.systemProgramLogicService.update(sysProg, this.getFields().get("CORE_PROG001D0002E_progSystem"), this.getFields().get("CORE_PROG001D0002E_icon"));
    this.message = result.getSystemMessage().getValue();
    if (result.getValue() == null) {
        return;
    }
    this.success = IS_YES;
}
Also used : SysProgVO(com.netsteadfast.greenstep.vo.SysProgVO)

Aggregations

SysProgVO (com.netsteadfast.greenstep.vo.SysProgVO)12 ServiceException (com.netsteadfast.greenstep.base.exception.ServiceException)8 ServiceMethodAuthority (com.netsteadfast.greenstep.base.model.ServiceMethodAuthority)5 HashMap (java.util.HashMap)5 Transactional (org.springframework.transaction.annotation.Transactional)4 SysMenuVO (com.netsteadfast.greenstep.vo.SysMenuVO)3 DefaultResult (com.netsteadfast.greenstep.base.model.DefaultResult)2 SystemMessage (com.netsteadfast.greenstep.base.model.SystemMessage)2 TbSysMenuRole (com.netsteadfast.greenstep.po.hbm.TbSysMenuRole)2 RoleVO (com.netsteadfast.greenstep.vo.RoleVO)2 SysMenuRoleVO (com.netsteadfast.greenstep.vo.SysMenuRoleVO)2 UserRoleVO (com.netsteadfast.greenstep.vo.UserRoleVO)2 List (java.util.List)2 TbSys (com.netsteadfast.greenstep.po.hbm.TbSys)1 TbSysIcon (com.netsteadfast.greenstep.po.hbm.TbSysIcon)1 TbSysProgMultiName (com.netsteadfast.greenstep.po.hbm.TbSysProgMultiName)1 SysVO (com.netsteadfast.greenstep.vo.SysVO)1 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1