| | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.corba.framework.data.PvolumeInfo; |
| | | import com.vci.dto.*; |
| | | import com.vci.dto.OsPvolumeDTO; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | | import com.vci.starter.poi.bo.WriteExcelOption; |
| | | import com.vci.starter.poi.util.ExcelUtil; |
| | |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.WebThreadLocalUtil; |
| | | import com.vci.web.service.OsPvolumesServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.io.*; |
| | | import java.io.File; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | |
| | | /** |
| | | * 分页查询卷 |
| | | * @param pageSize 页数 |
| | | * @param pageIndex 第几页 |
| | | * @param pageSize 第几页 |
| | | * @param pageIndex 页数 |
| | | * @return 分页数据 |
| | | */ |
| | | @Override |
| | |
| | | public BaseResult savePvolume(OsPvolumeDTO dto) throws PLException { |
| | | PvolumeInfo pvoInfo = new PvolumeInfo(); |
| | | pvoInfo.service = dto.getService(); |
| | | pvoInfo.id = dto.getId(); |
| | | // pvoInfo.id = dto.getId(); |
| | | pvoInfo.name = dto.getName(); |
| | | pvoInfo.host = dto.getHost(); |
| | | pvoInfo.isvalid = dto.isIsvalid(); |
| | |
| | | * @return 删除结果 |
| | | */ |
| | | @Override |
| | | public BaseResult deletePvolume(String[] ids) throws PLException { |
| | | if ( ids.length == 0){ |
| | | public BaseResult deletePvolume(String ids) throws PLException { |
| | | if ( StringUtils.isBlank(ids)){ |
| | | throw new PLException("500", new String[]{"请选择相关数据!!"}); |
| | | } |
| | | for (String id : ids) { |
| | | for (String id : ids.split(",")) { |
| | | boolean isvalid = platformClientUtil.getFrameworkService().checkIsvalid(id); |
| | | if(isvalid) { |
| | | throw new PLException("500", new String[]{"选择数据为首选路径,不能删除!"}); |
| | |
| | | UserEntityInfo userInfo = new UserEntityInfo(); |
| | | userInfo.setUserName(WebUtil.getCurrentUserId()); |
| | | userInfo.setModules("com.vci.client.framework.systemConfig.volumn.PvolumePanel"); |
| | | boolean rs = platformClientUtil.getFrameworkService().deletePvolume(ids, userInfo); |
| | | boolean rs = platformClientUtil.getFrameworkService().deletePvolume(ids.split(","), userInfo); |
| | | if(!rs){ |
| | | return BaseResult.fail("删除失败!"); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean savePvolumeUser(String pvolumId, String[] userIds) throws PLException { |
| | | public boolean savePvolumeUser(String pvolumId ,List<String> userIds) throws PLException { |
| | | VciBaseUtil.alertNotNull(pvolumId,"文件柜主键",userIds,"用户主键集合"); |
| | | UserEntityInfo userEntityInfo = new UserEntityInfo(); |
| | | userEntityInfo.setUserName(WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId()); |
| | | boolean resBoolean = platformClientUtil.getFrameworkService().savePvolumeUser(pvolumId, userIds, userEntityInfo); |
| | | boolean resBoolean = platformClientUtil.getFrameworkService().savePvolumeUser(pvolumId, userIds.toArray(new String[userIds.size()]), userEntityInfo); |
| | | return resBoolean; |
| | | } |
| | | |