| | |
| | | import com.vci.corba.framework.data.*; |
| | | import com.vci.pagemodel.ExpExcelConditionVO; |
| | | import com.vci.pagemodel.MenuVO; |
| | | import com.vci.pagemodel.OperateVO; |
| | | import com.vci.starter.poi.bo.SheetDataSet; |
| | | import com.vci.starter.poi.bo.SheetRowData; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | VciBaseUtil.alertNotNull(menuVO,"修改的模块对象"); |
| | | try { |
| | | String res = ""; |
| | | if(!menuVO.getAlias().matches("[a-z A-Z \\p{Punct}+]*")){ |
| | | throw new VciBaseException("注意:属性名只能为英文字母!"); |
| | | } |
| | | //更新数据库 |
| | | res = foDelegate.updateMod(menuVO); |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 操作对象复制 |
| | | * @param operateVO 操作传输对象 |
| | | * @param operateInfo 操作信息 |
| | | */ |
| | | private void copyOperationProperties(OperateVO operateVO, OperateInfo operateInfo){ |
| | | operateInfo.id = operateVO.getId(); |
| | | operateInfo.name = operateVO.getName(); |
| | | operateInfo.alias = operateVO.getAlias(); |
| | | operateInfo.image = operateVO.getSource(); |
| | | operateInfo.desc = operateVO.getDesc(); |
| | | operateInfo.identify = operateVO.getIdentify(); |
| | | operateInfo.seq = operateVO.getSeq(); |
| | | } |
| | | |
| | | /** |
| | | * 增加操作类型 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public OperateInfo addOperationType(OperateInfo operateInfo) throws VciBaseException { |
| | | public OperateInfo addOperationType(OperateVO operateVO) throws VciBaseException { |
| | | try { |
| | | OperateInfo operateInfo = new OperateInfo(); |
| | | copyOperationProperties(operateVO,operateInfo); |
| | | operateInfo.image = operateVO.getSource(); |
| | | //校验 |
| | | this.checkItem(operateInfo); |
| | | String s = foDelegate.saveOperate(operateInfo); |
| | |
| | | |
| | | /** |
| | | * 修改操作类型 |
| | | * @param operateInfo |
| | | * @param operateVO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public OperateInfo updateOperationType(OperateInfo operateInfo) throws VciBaseException { |
| | | public OperateInfo updateOperationType(OperateVO operateVO) throws VciBaseException { |
| | | try { |
| | | OperateInfo operateInfo = new OperateInfo(); |
| | | copyOperationProperties(operateVO, operateInfo); |
| | | this.checkItem(operateInfo); |
| | | operateInfo.image = operateVO.getSource(); |
| | | String res = foDelegate.updateOperate(operateInfo); |
| | | /**返回1表示名称有重复,返回2表示标识有重复,返回3表示顺序有重复**/ |
| | | if (res.equals("1")) { |
| | |
| | | if (operateInfo.name.length() > 128) { |
| | | throw new VciBaseException("名称长度不能超过128!"); |
| | | } |
| | | if (operateInfo.desc.length() > 255) { |
| | | if (operateInfo.desc != null &&operateInfo.desc.length() > 255) { |
| | | throw new VciBaseException("描述长度不能超过255!"); |
| | | } |
| | | if (operateInfo.alias.length() > 128) { |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取在线人员 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<OnlineUserInfo> getOnlineUsers() { |
| | | try { |
| | | OnlineUserInfo[] onlinUserInfos = platformClientUtil.getFrameworkService().getOnlineUsers(); |
| | | return Arrays.asList(onlinUserInfos); |
| | | } catch (PLException e) { |
| | | throw new VciBaseException(String.valueOf(e.code), e.messages); |
| | | } |
| | | } |
| | | } |