| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | /** |
| | | * 角色 |
| | | */ |
| | | @Resource |
| | | private SmRoleQueryServiceI smRoleQueryServiceI; |
| | | |
| | | /** |
| | | * 业务类型 |
| | | */ |
| | | @Resource |
| | |
| | | @Override |
| | | public int compare(PLUILayout o1, PLUILayout o2) { |
| | | return o1.plCode.compareTo(o2.plCode); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 排序比较器 |
| | | */ |
| | | private Comparator<PLPageDefination> pageDefinationComparator = new Comparator<PLPageDefination>() { |
| | | @Override |
| | | public int compare(PLPageDefination o1, PLPageDefination o2) { |
| | | return new Integer(o1.seq).compareTo(new Integer(o2.seq)); |
| | | } |
| | | }; |
| | | |
| | |
| | | * 根据上下文ID和区域类型,按顺序获取当前区域的tab页 |
| | | */ |
| | | @Override |
| | | public List<PLTabPage> getTabByContextIdAndType(String contextId, int areaType) throws PLException { |
| | | public DataGrid getTabByContextIdAndType(String contextId, int areaType) throws PLException { |
| | | VciBaseUtil.alertNotNull(contextId,"上下文主键",areaType,"区域类型"); |
| | | PLTabPage[] plTabPages = platformClientUtil.getUIService().getTabPagesByContextIdAndType(contextId, (short) areaType); |
| | | return Arrays.asList(plTabPages); |
| | | DataGrid dataGrid = new DataGrid(); |
| | | dataGrid.setTotal(plTabPages.length); |
| | | dataGrid.setData(Arrays.asList(plTabPages)); |
| | | return dataGrid; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<PLPageDefination> getPLPageDefinations(String plPageContextOId) { |
| | | public DataGrid getPLPageDefinations(String plPageContextOId) throws PLException { |
| | | DataGrid dataGrid = new DataGrid(); |
| | | if(Func.isBlank(plPageContextOId)) return dataGrid; |
| | | PLPageDefination[] plPageDefinations = platformClientUtil.getUIService().getPLPageDefinationsByPageContextOId(plPageContextOId); |
| | | |
| | | return null; |
| | | dataGrid.setTotal(plPageDefinations.length); |
| | | Arrays.sort(plPageDefinations, pageDefinationComparator); |
| | | dataGrid.setData(Arrays.asList(plPageDefinations)); |
| | | return dataGrid; |
| | | } |
| | | |
| | | /** |