From 438d8954dfb9d9f262d3e11594266a51e9f0dd5b Mon Sep 17 00:00:00 2001 From: ludc Date: 星期二, 09 四月 2024 10:03:27 +0800 Subject: [PATCH] Func中添加时间戳转Date方法parse(查询数据库取到的是时间戳)。 --- Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java | 49 ++++++++++++++++++++++++------------------------- 1 files changed, 24 insertions(+), 25 deletions(-) diff --git a/Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java b/Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java index 47b838d..dfe9ef3 100644 --- a/Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java +++ b/Source/platformProject/vci-platform-web/src/main/java/com/vci/web/service/impl/UIEngineServiceImpl.java @@ -6,7 +6,7 @@ import com.thoughtworks.xstream.io.xml.XppDriver; import com.vci.client.common.providers.ServiceProvider; import com.vci.corba.common.VCIError; -import com.vci.corba.portal.data.PLPageDefination; +import com.vci.corba.portal.data.PLTabButton; import com.vci.corba.portal.data.PLUILayout; import com.vci.starter.web.annotation.log.VciUnLog; import com.vci.starter.web.exception.VciBaseException; @@ -25,6 +25,7 @@ import com.vci.web.service.OsBtmServiceI; import com.vci.web.service.UIEngineServiceI; import com.vci.web.service.WebBoServiceI; +import com.vci.web.util.Func; import com.vci.web.util.PlatformClientUtil; import com.vci.web.util.WebUtil; import com.vci.web.xmlmodel.UIComponentDefineXO; @@ -41,9 +42,10 @@ import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import com.vci.corba.portal.data.PortalVI; -import com.vci.corba.portal.data.PLAction; import com.vci.corba.portal.data.PLTabPage; -import com.vci.corba.portal.data.PLTabButton; +import com.vci.corba.portal.data.PLAction; +import com.vci.corba.portal.data.PLPageDefination; +import com.vci.corba.portal.data.PLCommandParameter; import plm.corba.portal.*; import java.util.*; @@ -58,7 +60,7 @@ * */ @Service -public class UIEngineServiceImpl implements UIEngineServiceI { +public class UIEngineServiceImpl implements UIEngineServiceI { /** * 鏄惁浠庣紦瀛樹腑鏌ヨ @@ -165,13 +167,13 @@ @Override @VciUnLog public List<UIFormDefineVO> selectAllForm() { - com.vci.corba.portal.data.PortalVI[] portalVIS = null; + PortalVI[] portalVIS = null; try { portalVIS = ServiceProvider.getUIService().getAllPortalVI(); } catch (VCIError vciError) { throw WebUtil.getVciBaseException(vciError); } - List<com.vci.corba.portal.data.PortalVI> portalVIList = Arrays.stream(portalVIS).filter(portal -> 1 == portal.viType).collect(Collectors.toList()); + List<PortalVI> portalVIList = Arrays.stream(portalVIS).filter(portal -> 1 == portal.viType).collect(Collectors.toList()); return formDO2VOs(portalVIList); } @@ -193,9 +195,9 @@ * @return 鏄剧ず瀵硅薄 */ @Override - public List<UIFormDefineVO> formDO2VOs(Collection<com.vci.corba.portal.data.PortalVI> portalVIS) { + public List<UIFormDefineVO> formDO2VOs(Collection<PortalVI> portalVIS) { List<UIFormDefineVO> formDefineVOList = new ArrayList<>(); - Optional.ofNullable(portalVIS).orElseGet(()->new ArrayList<com.vci.corba.portal.data.PortalVI>()).stream().forEach(portal->{ + Optional.ofNullable(portalVIS).orElseGet(()->new ArrayList<PortalVI>()).stream().forEach(portal->{ try { UIFormDefineVO defineVO = formDO2VO(portal); formDefineVOList.add(defineVO); @@ -216,7 +218,7 @@ */ @Override @VciUnLog - public UIFormDefineVO formDO2VO(com.vci.corba.portal.data.PortalVI portal) { + public UIFormDefineVO formDO2VO(PortalVI portal) { if(portal == null ||StringUtils.isBlank(portal.prm)){ throw new VciBaseException("琛ㄥ崟鍙兘涓嶅瓨鍦紝鍥犱负鏈兘鑾峰彇鍒板畠鐨勪俊鎭�"); } @@ -416,7 +418,7 @@ return null; } if(!QUERY_BY_CACHE){ - com.vci.corba.portal.data.PortalVI portalVI = null; + PortalVI portalVI = null; try { portalVI = ServiceProvider.getUIService().getPortalVIByTypeNameAndVIName(btmId, id); } catch (VCIError vciError) { @@ -459,13 +461,13 @@ @Cacheable(value = VCI_OBJECT_SERVICE,key = CacheKeyConstant.ALL_TABLE,unless = "#result == null") @VciUnLog public List<UITableDefineVO> selectAllTable() { - com.vci.corba.portal.data.PortalVI[] portalVIS = null; + PortalVI[] portalVIS = null; try { portalVIS = ServiceProvider.getUIService().getAllPortalVI(); } catch (VCIError vciError) { throw WebUtil.getVciBaseException(vciError); } - List<com.vci.corba.portal.data.PortalVI> portalVIList = Arrays.stream(portalVIS).filter(portal -> 0 == portal.viType).collect(Collectors.toList()); + List<PortalVI> portalVIList = Arrays.stream(portalVIS).filter(portal -> 0 == portal.viType).collect(Collectors.toList()); return tableDO2VOs(portalVIList,false); } @@ -490,7 +492,7 @@ @VciUnLog public List<UITableDefineVO> tableDO2VOs(Collection<PortalVI> prms, boolean queryDetail) { List<UITableDefineVO> tableDefineVOList = new ArrayList<>(); - Optional.ofNullable(prms).orElseGet(()->new ArrayList<com.vci.corba.portal.data.PortalVI>()).stream().forEach(portal->{ + Optional.ofNullable(prms).orElseGet(()->new ArrayList<PortalVI>()).stream().forEach(portal->{ UITableDefineVO defineVO = tableDO2VO(portal,queryDetail); tableDefineVOList.add(defineVO); }); @@ -507,7 +509,6 @@ @Override @VciUnLog public UITableDefineVO tableDO2VO(PortalVI portal, boolean queryDetail) { - UITableDefineVO tableDefineVO = new UITableDefineVO(); tableDefineVO.setOid(portal.id); tableDefineVO.setId(portal.viName); @@ -737,7 +738,7 @@ return null; } if(!QUERY_BY_CACHE){ - com.vci.corba.portal.data.PortalVI portalVI = null; + PortalVI portalVI = null; try { portalVI = ServiceProvider.getUIService().getPortalVIByTypeNameAndVIName(btmId, id); } catch (VCIError vciError) { @@ -1203,9 +1204,7 @@ } if(!QUERY_BY_CACHE){ try { - PLPageDefination plPageDefination = ServiceProvider.getUIService().getPLPageDefinationById(componentOid); - // PLPageDefination plPageDefination = platformClientUtil.getPortalService().getPLPageDefinationById(componentOid); - return uiComponentDO2VO(plPageDefination,true); + return uiComponentDO2VO(ServiceProvider.getUIService().getPLPageDefinationById(componentOid),true); } catch (VCIError vciError) { throw WebUtil.getVciBaseException(vciError); } @@ -1441,7 +1440,7 @@ * @return 鏄剧ず瀵硅薄 */ @Override - public List<UIButtonDefineVO> buttonDO2VOs(Collection<PLTabButton> buttons){ + public List<UIButtonDefineVO> buttonDO2VOs(Collection<com.vci.corba.portal.data.PLTabButton> buttons){ List<UIButtonDefineVO> buttonDefineVOS = new ArrayList<>(); Optional.ofNullable(buttons).orElseGet(()->new ArrayList<>()).stream().forEach(button->{ buttonDefineVOS.add(buttonDO2VO(button)); @@ -1455,10 +1454,10 @@ * @return 鏄剧ず瀵硅薄 */ @Override - public UIButtonDefineVO buttonDO2VO(com.vci.corba.portal.data.PLTabButton button) { + public UIButtonDefineVO buttonDO2VO(PLTabButton button) { UIButtonDefineVO buttonVO = new UIButtonDefineVO(); Map<String, UIActionVO> actionVOMap = self.selectAllActionMap(); -// Map<String, UIActionVO> actionVOMap = ServiceProvider.getUIService().getAllPLAction(); + //Map<String, UIActionVO> actionVOMap = ServiceProvider.getUIService().getAllPLAction(); if(button !=null){ buttonVO.setOid(button.plOId); buttonVO.setPkComponent(button.plTableOId); @@ -1489,10 +1488,10 @@ //鏌ユ壘鍙傛暟 Map<String,String> params = new HashMap<>(); try { -// PLCommandParameter[] parameters = platformClientUtil.getPortalService().getPLCommandParametersByCommandOId(buttonVO.getOid()); - com.vci.corba.portal.data.PLCommandParameter[] parameters = ServiceProvider.getUIService().getPLCommandParametersByCommandOId(buttonVO.getOid()); + //PLCommandParameter[] parameters = platformClientUtil.getPortalService().getPLCommandParametersByCommandOId(buttonVO.getOid()); + PLCommandParameter[] parameters = ServiceProvider.getUIService().getPLCommandParametersByCommandOId(buttonVO.getOid()); if(parameters!=null && parameters.length > 0){ - for(com.vci.corba.portal.data.PLCommandParameter parameter: parameters){ + for(PLCommandParameter parameter: parameters){ params.put(parameter.plKey,parameter.plValue); } } @@ -1567,7 +1566,7 @@ break; } } -// return UIContentDO2VO(context,true); + //return UIContentDO2VO(context,true); return UIContentDO2VO(null,true); } -- Gitblit v1.9.3