From 247aa6397ebdb5249a1213af11aaaf560568b0c3 Mon Sep 17 00:00:00 2001 From: yuxc <yuxc@vci-tech.com> Date: 星期五, 02 八月 2024 15:43:50 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsStatusServiceImpl.java | 32 ++++++++++++-------------------- 1 files changed, 12 insertions(+), 20 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsStatusServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsStatusServiceImpl.java index 13dfada..52e0be9 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsStatusServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsStatusServiceImpl.java @@ -1,11 +1,7 @@ package com.vci.web.service.impl; import com.vci.corba.common.PLException; -import com.vci.corba.omd.atm.AttributeDef; import com.vci.corba.omd.stm.StatePool; -import com.vci.dto.OsAttributeDTO; -import com.vci.pagemodel.OsEnumVO; -import com.vci.po.OsAttributePO; import com.vci.po.OsStatusPO; import com.vci.starter.poi.bo.ReadExcelOption; import com.vci.starter.poi.bo.WriteExcelData; @@ -365,14 +361,11 @@ statePool.name = id; statePool.ts = Func.format(ts,VciDateUtil.DateTimeMillFormat); statePoolList.add(statePool); - boolean res = platformClientUtil.getStatePoolService().deleteStatePool(statePool); - if(!res){ - throw new PLException("500",new String[]{"鍒犻櫎鐘舵�佸悕绉颁负銆�" + id + "銆戠殑鏁版嵁鏃跺嚭鐜伴敊璇�!"}); - } } + boolean res = platformClientUtil.getStatePoolService().deleteStatePools(statePoolList.toArray(new StatePool[statePoolList.size()])); //clearCache(); self.selectAllStatusMap(); - return true; + return res; } /** @@ -386,7 +379,7 @@ statePool.oid = statusDTO.getOid(); statePool.id = ""; statePool.name = statusDTO.getId(); - statePool.imagePath = statusDTO.getImagePath(); + //statePool.imagePath = statusDTO.getImagePath(); statePool.description = statusDTO.getDescription()==null?"":statusDTO.getDescription(); String userId = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(); long now = VciDateUtil.getNowTime(); @@ -435,7 +428,7 @@ OsStatusVO osStatusVO = this.getObjectByOid(oid); excelDataList.add(new WriteExcelData(i.get(),0, osStatusVO.getId())); excelDataList.add(new WriteExcelData(i.get(),1, osStatusVO.getName())); - excelDataList.add(new WriteExcelData(i.get(),2, osStatusVO.getImagePath())); + //excelDataList.add(new WriteExcelData(i.get(),2, osStatusVO.getImagePath())); excelDataList.add(new WriteExcelData(i.get(),3, osStatusVO.getDescription())); i.getAndIncrement(); }); @@ -493,10 +486,10 @@ private List<String> getCloumns(boolean flag){ if(flag){ return new ArrayList<>( - Arrays.asList("鍚嶇О(涓嶈兘涓虹┖)", "鏍囩(瀵瑰悕绉扮殑瑙i噴)","鍥剧墖(璺緞)", "鎻忚堪(鍙互涓虹┖)") + Arrays.asList("鍚嶇О(涓嶈兘涓虹┖)", "鏍囩(瀵瑰悕绉扮殑瑙i噴)"/*,"鍥剧墖(璺緞)"*/, "鎻忚堪(鍙互涓虹┖)") ); } - return new ArrayList<>(Arrays.asList("鍚嶇О", "鏍囩", "鍥剧墖", "鎻忚堪")); + return new ArrayList<>(Arrays.asList("鍚嶇О", "鏍囩"/*, "鍥剧墖"*/, "鎻忚堪")); } /** @@ -522,7 +515,6 @@ List<StatePool> statePoolList = new ArrayList<>(); //褰撳墠excel涓槸鍚﹂噸澶嶇敤鐨勫垽閲峂ap:锛坘ey锛氬垽閲嶅睘鎬э紝value锛氳鍙凤級 Map<String, String> excelReapeat = new HashMap<>(); - //鍒ゆ柇蹇呭~灞炴�ф槸鍚︿负绌猴紝鐢ㄦ埛鏄惁宸插瓨鍦紝浠ュ強閮ㄩ棬鏄惁濉敊绛夋牎楠岄�昏緫 poList.stream().forEach(osStatusPO -> { try { StatePool dbStatePool = platformClientUtil.getStatePoolService().getStatePool(osStatusPO.getId()); @@ -532,14 +524,14 @@ } catch (PLException e) { e.printStackTrace(); logger.error(e.getMessage()); - throw new VciBaseException(e.getMessage()); + throw new VciBaseException(VciBaseUtil.getExceptionMessage(e)); } - if(Func.isBlank(osStatusPO.getId())){//灞炴�у悕鍒ょ┖ - throw new VciBaseException("绗��"+osStatusPO.getRowIndex()+"銆戣锛宔numnameerror"); + if(Func.isBlank(osStatusPO.getId())){//鐘舵�佸悕鍒ょ┖ + throw new VciBaseException("绗��"+osStatusPO.getRowIndex()+"銆戣锛宻tatusnameerror"); }else if(!osStatusPO.getId().matches("[a-z A-Z]*")){ // 鐘舵�佹睜鍚嶇О鍙兘涓鸿嫳鏂囧瓧姣� throw new VciBaseException("鍚嶇О鍙兘涓鸿嫳鏂囷紒"); - }else if(excelReapeat.containsKey(osStatusPO.getId())){//灞炴�у悕琛ㄦ牸涓垽閲� + }else if(excelReapeat.containsKey(osStatusPO.getId())){//鐘舵�佸悕琛ㄦ牸涓垽閲� throw new VciBaseException("绗��"+excelReapeat.get(osStatusPO.getId())+"銆戣鍜岀銆�"+osStatusPO.getRowIndex()+"銆戣鏁版嵁锛屽悕绉伴噸澶�"); } //鐘舵�佸悕excel涓垽閲嶅鐞� @@ -548,7 +540,7 @@ osStatusDTO.setOid(VciBaseUtil.getPk().toUpperCase(Locale.ROOT)); osStatusDTO.setId(osStatusPO.getId()); osStatusDTO.setName(osStatusPO.getName()); - osStatusDTO.setImagePath(osStatusPO.getImagePath()); + //osStatusDTO.setImagePath(osStatusPO.getImagePath()); osStatusDTO.setDescription(osStatusPO.getDescription()); statePoolList.add(statusDTO2DO(osStatusDTO)); @@ -562,7 +554,7 @@ e.printStackTrace(); return BaseResult.fail(VciBaseUtil.getExceptionMessage(e),new String[]{},e); } - return BaseResult.success("鏋氫妇瀵煎叆鎴愬姛锛�"); + return BaseResult.success("鐘舵�佸鍏ユ垚鍔燂紒"); } /** -- Gitblit v1.9.3