package com.vci.web.service.impl; import com.vci.client.portal.utility.UITools; import com.vci.corba.common.PLException; import com.vci.corba.portal.data.PLAction; import com.vci.starter.web.exception.VciBaseException; import com.vci.web.pageModel.UIActionVO; import com.vci.web.service.WebActionServiceI; import com.vci.web.util.WebUtil; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; /** * Action服务 * @author weidy * @date 2019/9/9 13:40 */ @Service public class WebActionServiceImpl implements WebActionServiceI { /** * action对象 * * @param oid 主键 * @return */ @Override public UIActionVO getActionByOid(String oid) throws VciBaseException { WebUtil.alertNotNull(oid,"action的主键"); try { PLAction action = UITools.getService() .getPLActionById(oid); if(action == null || StringUtils.isBlank(action.plOId)){ throw new VciBaseException("这个action在系统中不存在"); } return convertWebAction(action); } catch (PLException vciError) { throw WebUtil.getVciBaseException(vciError); } } private UIActionVO convertWebAction(PLAction action){ UIActionVO UIActionVO = new UIActionVO(); // UIActionVO.setPlActionCls(action.plActionCls); // UIActionVO.setPlBSUrl(action.plBSUrl); // UIActionVO.setPlCode(action.plCode); // UIActionVO.setPlCreateTime(action.plCreateTime); // UIActionVO.setPlCreateUser(action.plCreateUser); // UIActionVO.setPlCSClass(action.plCSClass); // UIActionVO.setPlDesc(action.plDesc); // UIActionVO.setPlLicensOrs(action.plLicensOrs); // UIActionVO.setPlModifyTime(action.plModifyTime); // UIActionVO.setPlModifyUser(action.plModifyUser); // UIActionVO.setPlName(action.plName); // UIActionVO.setPlOId(action.plOId); // UIActionVO.setPlTypeType(action.plTypeType); return UIActionVO; } }