Merge remote-tracking branch 'origin/master'
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <Configuration status="WARN"> |
| | | <Appenders> |
| | | <Console name="Console" target="SYSTEM_OUT"> |
| | | <PatternLayout pattern="[%-5p] %d{YYYY-MM-dd HH:mm:ss} [%t] %C{1}:%L - %msg%n" /> |
| | | </Console> |
| | | |
| | | <RollingFile name="RollingFile" filename="./logs/volume_log.log" filepattern="${logPath}/volume_%d{YYYYMMddHHmmss}.log"> |
| | | <PatternLayout pattern="[%-5p] %d{YYYY-MM-dd HH:mm:ss} [%t] %C{1}:%L - %msg%n" /> |
| | | <Policies> |
| | | <SizeBasedTriggeringPolicy size="10 MB" /> |
| | | </Policies> |
| | | <DefaultRolloverStrategy max="20" /> |
| | | </RollingFile> |
| | | |
| | | </Appenders> |
| | | <Loggers> |
| | | <Logger name="VolumeLog" level="DEBUG" additivity="true"> |
| | | <AppenderRef ref="RollingFile" /> |
| | | </Logger> |
| | | <Root level="DEBUG"> |
| | | <AppenderRef ref="Console" /> |
| | | </Root> |
| | | </Loggers> |
| | | </Configuration> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| | | <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> |
| | | <hibernate-configuration> |
| | | <session-factory> |
| | | <property name="show_sql">true</property> |
| | | <property name="dialect">org.hibernate.dialect.OracleDialect</property> |
| | | <property name="connection.driver_class">oracle.jdbc.OracleDriver</property> |
| | | |
| | | <!--<property name="connection.url">jdbc:oracle:thin:@172.16.0.243:1521:orcl</property> |
| | | <property name="connection.username">vcimes</property> |
| | | <property name="connection.password">vcimes</property>--> |
| | | |
| | | <!-- <property name="connection.url">jdbc:oracle:thin:@dev.yunkeruida.top:1521:orcl</property> --> |
| | | <property name="connection.url">jdbc:oracle:thin:@192.168.0.66:1521:orcl</property> |
| | | <!-- <property name="connection.username">NMPM112</property> --> |
| | | <property name="connection.username">PLT2024</property> |
| | | <property name="connection.password">vcitest</property> |
| | | <!--<property name="connection.username">mpm112</property> |
| | | <property name="connection.password">vcitest</property>--> |
| | | |
| | | <!--property name="hibernate.connection.release_mode">auto</property --> |
| | | |
| | | <!-- 设置C3P0 --> |
| | | <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> |
| | | <property name="hibernate.c3p0.acquireRetryAttempts">30</property> |
| | | <property name="hibernate.c3p0.acquireIncrement">2</property> |
| | | <property name="hibernate.c3p0.checkoutTimeout">30000</property> |
| | | <property name="hibernate.c3p0.idleConnectionTestPeriod">120</property> |
| | | <property name="hibernate.c3p0.maxIdleTime">180</property> |
| | | <property name="hibernate.c3p0.initialPoolSize">3</property> |
| | | <property name="hibernate.c3p0.maxPoolSize">100</property> |
| | | <property name="hibernate.c3p0.minPoolSize">1</property> |
| | | <property name="hibernate.c3p0.maxStatements">100</property> |
| | | <property name="maxStatementsPerConnection">100</property> |
| | | <property name="hibernate.current_session_context_class">com.vci.server.mw.SessionContext4JBPM</property> |
| | | <property name="hibernate.connection.isolation">2</property> |
| | | |
| | | |
| | | <!-- ææ¶ç¦ç¨Hibernateçäºä»¶çå¬ |
| | | <listener type="post-insert" |
| | | class="com.vci.base.server.persistence.history.HistoryListener" /> |
| | | <listener type="post-update" |
| | | class="com.vci.base.server.persistence.history.HistoryListener" /> |
| | | <listener type="post-delete" |
| | | class="com.vci.base.server.persistence.history.HistoryListener" /> |
| | | --> |
| | | </session-factory> |
| | | </hibernate-configuration> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> |
| | | <hibernate-configuration> |
| | | <session-factory> |
| | | <property name="show_sql">true</property> |
| | | <property name="dialect">org.hibernate.dialect.OracleDialect</property> |
| | | <property name="connection.driver_class">oracle.jdbc.OracleDriver</property> |
| | | |
| | | <!--<property name="connection.url">jdbc:oracle:thin:@172.16.0.243:1521:orcl</property> |
| | | <property name="connection.username">vcimes</property> |
| | | <property name="connection.password">vcimes</property>--> |
| | | |
| | | <property name="connection.url">jdbc:oracle:thin:@192.168.0.66:1521:orcl</property> |
| | | <!-- <property name="connection.url">jdbc:oracle:thin:@dev.yunkeruida.top:1521:orcl</property> --> |
| | | <!-- <property name="connection.username">NMPM112</property> --> |
| | | <property name="connection.username">PLT2024</property> |
| | | <property name="connection.password">vcitest</property> |
| | | <!--<property name="connection.username">mpm112</property> |
| | | <property name="connection.password">vcitest</property>--> |
| | | |
| | | <!--property name="hibernate.connection.release_mode">auto</property --> |
| | | |
| | | <!-- 设置C3P0 --> |
| | | <property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> |
| | | <property name="hibernate.c3p0.acquireRetryAttempts">30</property> |
| | | <property name="hibernate.c3p0.acquireIncrement">2</property> |
| | | <property name="hibernate.c3p0.checkoutTimeout">30000</property> |
| | | <property name="hibernate.c3p0.idleConnectionTestPeriod">120</property> |
| | | <property name="hibernate.c3p0.maxIdleTime">180</property> |
| | | <property name="hibernate.c3p0.initialPoolSize">3</property> |
| | | <property name="hibernate.c3p0.maxPoolSize">100</property> |
| | | <property name="hibernate.c3p0.minPoolSize">1</property> |
| | | <property name="hibernate.c3p0.maxStatements">100</property> |
| | | <property name="maxStatementsPerConnection">100</property> |
| | | <property name="hibernate.current_session_context_class">com.vci.server.mw.SessionContext4JBPM</property> |
| | | <property name="hibernate.connection.isolation">2</property> |
| | | |
| | | |
| | | <!-- ææ¶ç¦ç¨Hibernateçäºä»¶çå¬ |
| | | <listener type="post-insert" |
| | | class="com.vci.base.server.persistence.history.HistoryListener" /> |
| | | <listener type="post-update" |
| | | class="com.vci.base.server.persistence.history.HistoryListener" /> |
| | | <listener type="post-delete" |
| | | class="com.vci.base.server.persistence.history.HistoryListener" /> |
| | | --> |
| | | </session-factory> |
| | | </hibernate-configuration> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "hasChildren": true, |
| | | "children": [ |
| | | { |
| | | "hasChildren": true, |
| | | "children": [], |
| | | "id": "systemManagmentNode", |
| | | "name": "管çåè½æ¨¡å", |
| | | "parentId": "VCIBaseTreeNode", |
| | | "code": "systemManagmentNode", |
| | | "alias": "system", |
| | | "meta": { |
| | | "keepAlive": false |
| | | }, |
| | | "sort": 2, |
| | | "soruce": "", |
| | | "path": "views/systemModel/mangeModel/index" |
| | | }, |
| | | { |
| | | "hasChildren": true, |
| | | "children": [], |
| | | "id": "modelManagmentNode", |
| | | "name": "ä¸å¡åè½æ¨¡å", |
| | | "parentId": "VCIBaseTreeNode", |
| | | "code": "modelManagmentNode", |
| | | "alias": "model", |
| | | "meta": { |
| | | "keepAlive": false |
| | | }, |
| | | "sort": 3, |
| | | "soruce": "", |
| | | "path": "views/systemModel/businessModel/index" |
| | | }, |
| | | { |
| | | "hasChildren": true, |
| | | "children": [], |
| | | "id": "operateNode", |
| | | "name": "æä½ç±»å管ç", |
| | | "parentId": "VCIBaseTreeNode", |
| | | "code": "operateNode", |
| | | "alias": "operate", |
| | | "meta": { |
| | | "keepAlive": false |
| | | }, |
| | | "sort": 4, |
| | | "soruce": "", |
| | | "path": "views/systemModel/operateType/index" |
| | | }, |
| | | { |
| | | "hasChildren": false, |
| | | "children": [], |
| | | "id": "sysOptionNode", |
| | | "name": "ç³»ç»é
ç½®", |
| | | "parentId": "VCIBaseTreeNode", |
| | | "code": "sysOptionNode", |
| | | "alias": "sysOption", |
| | | "meta": { |
| | | "keepAlive": false |
| | | }, |
| | | "sort": 5, |
| | | "soruce": "", |
| | | "path": "views/systemModel/systemConfig/index" |
| | | }, |
| | | { |
| | | "hasChildren": false, |
| | | "children": [], |
| | | "id": "sysMonitorNode", |
| | | "name": "ç³»ç»è¿è¡çæ§", |
| | | "parentId": "VCIBaseTreeNode", |
| | | "code": "sysMonitorNode", |
| | | "alias": "sysMonitor", |
| | | "meta": { |
| | | "keepAlive": false |
| | | }, |
| | | "sort": 5, |
| | | "soruce": "", |
| | | "path": "views/systemModel/systemMonitor/index" |
| | | } |
| | | ], |
| | | "id": "VCIBaseTreeNode", |
| | | "name": "ç³»ç»æ¨¡åé
ç½®", |
| | | "parentId": "systemManagmentNode", |
| | | "code": "rootNode", |
| | | "alias": "root", |
| | | "meta": { |
| | | "keepAlive": false |
| | | }, |
| | | "sort": 0, |
| | | "soruce": "", |
| | | "path": "" |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.bo; |
| | | |
| | | public class ItemSeniorQueryBO implements java.io.Serializable{ |
| | | |
| | | |
| | | private static final long serialVersionUID = 6935763791493916908L; |
| | | |
| | | /** |
| | | * é«çº§æ¥è¯¢å |
| | | */ |
| | | private String itemSeniorQueryCols = ""; |
| | | /** |
| | | * é«çº§æ¥è¯¢ååä½¿ç¨æ¬¡æ° |
| | | */ |
| | | private String itemSeniorQueryColsCounts = ""; |
| | | |
| | | /** |
| | | *é«çº§æ¥è¯¢sql |
| | | */ |
| | | private String itemQuerySql = ""; |
| | | |
| | | public ItemSeniorQueryBO(String itemSeniorQueryCols, String itemSeniorQueryColsCounts, String itemQuerySql) { |
| | | this.itemSeniorQueryCols = itemSeniorQueryCols; |
| | | this.itemSeniorQueryColsCounts = itemSeniorQueryColsCounts; |
| | | this.itemQuerySql = itemQuerySql; |
| | | } |
| | | |
| | | public String getItemSeniorQueryCols() { |
| | | return itemSeniorQueryCols; |
| | | } |
| | | |
| | | public void setItemSeniorQueryCols(String itemSeniorQueryCols) { |
| | | this.itemSeniorQueryCols = itemSeniorQueryCols; |
| | | } |
| | | |
| | | public String getItemSeniorQueryColsCounts() { |
| | | return itemSeniorQueryColsCounts; |
| | | } |
| | | |
| | | public void setItemSeniorQueryColsCounts(String itemSeniorQueryColsCounts) { |
| | | this.itemSeniorQueryColsCounts = itemSeniorQueryColsCounts; |
| | | } |
| | | |
| | | public String getItemQuerySql() { |
| | | return itemQuerySql; |
| | | } |
| | | |
| | | public void setItemQuerySql(String itemQuerySql) { |
| | | this.itemQuerySql = itemQuerySql; |
| | | } |
| | | |
| | | @Override |
| | | public String |
| | | toString() { |
| | | return "ItemSeniorQueryBO{" + |
| | | "itemSeniorQueryCols='" + itemSeniorQueryCols + '\'' + |
| | | ", itemSeniorQueryColsCounts='" + itemSeniorQueryColsCounts + '\'' + |
| | | ", itemQuerySql='" + itemQuerySql + '\'' + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Actionåç±»ä¼ è¾å¯¹è±¡ |
| | | * @author yuxc |
| | | * @date 2024/8/16 15:50 |
| | | */ |
| | | @Data |
| | | public class PLActionClsDTO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | | */ |
| | | private static final long serialVersionUID = 2009350578651813260L; |
| | | /** |
| | | *ä¸»é® |
| | | */ |
| | | public String id; |
| | | /** |
| | | *åç±»åç§° |
| | | */ |
| | | public String name; |
| | | /** |
| | | *ç¶ä¸»é® |
| | | */ |
| | | public String pid; |
| | | /** |
| | | *夿³¨ |
| | | */ |
| | | public String description; |
| | | /** |
| | | *å建人 |
| | | */ |
| | | public String creator; |
| | | /** |
| | | *å建æ¶é´ |
| | | */ |
| | | public long createTime; |
| | | /** |
| | | *åç±»åºå· |
| | | */ |
| | | public short serialno; |
| | | /** |
| | | * åèç¹ |
| | | */ |
| | | public List<PLActionClsDTO> childs = new ArrayList<>(); |
| | | |
| | | /** |
| | | * å½ååç±»ä¸çææaction |
| | | */ |
| | | public List<PLActionDTO> actionChilds = new ArrayList<>(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Actionä¼ è¾å¯¹è±¡ |
| | | * @author yuxc |
| | | * @date 2024/8/20 16:47 |
| | | */ |
| | | @Data |
| | | public class PLActionDTO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | | */ |
| | | private static final long serialVersionUID = 2009350578651813260L; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | private String plOId; |
| | | /** |
| | | * ç¼å· |
| | | */ |
| | | private String plCode; |
| | | /** |
| | | * åç§° |
| | | */ |
| | | private String plName; |
| | | /** |
| | | * B/Så°åï¼çé¢ç±»è·¯å¾ |
| | | */ |
| | | private String plBSUrl; |
| | | /** |
| | | * c/sç±»è·¯å¾ çé¢é¾æ¥å°å |
| | | */ |
| | | private String plCSClass; |
| | | /** |
| | | * æè¿° |
| | | */ |
| | | private String plDesc; |
| | | /** |
| | | * ç±»å |
| | | */ |
| | | private String plTypeType; |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | private long plCreateTime; |
| | | /** |
| | | * å建人 |
| | | */ |
| | | private String plCreateUser; |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | | */ |
| | | private long plModifyTime; |
| | | /** |
| | | * ä¿®æ¹äºº |
| | | */ |
| | | private String plModifyUser; |
| | | |
| | | private String plLicensOrs; |
| | | /** |
| | | * ç¶èç¹id |
| | | */ |
| | | private String plActionCls; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.dto; |
| | | |
| | | import lombok.Data; |
| | | /** |
| | | * Actionæ¥è¯¢ä¼ è¾å¯¹è±¡ |
| | | * @author yuxc |
| | | * @date 2024/8/20 14:45 |
| | | */ |
| | | @Data |
| | | public class PLActionQueryDTO implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | | */ |
| | | private static final long serialVersionUID = 2009350578651813260L; |
| | | /** |
| | | *ç¼å· |
| | | */ |
| | | private String plcode; |
| | | /** |
| | | *åç§° |
| | | */ |
| | | private String plname; |
| | | /** |
| | | *B/Sç±»è·¯å¾ |
| | | */ |
| | | private String plbsurl; |
| | | /** |
| | | *C/Sç±»è·¯å¾ |
| | | */ |
| | | private String plcsclass; |
| | | /** |
| | | *ä¸å¡ç±»å |
| | | */ |
| | | private String pltypetype; |
| | | /** |
| | | *æè¿° |
| | | */ |
| | | private String pldesc; |
| | | /** |
| | | *åç±»ID |
| | | */ |
| | | private String plactioncls; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.dto; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class PRMDTO implements java.io.Serializable { |
| | | |
| | | private static final long serialVersionUID = -9069714336905186990L; |
| | | /** |
| | | * æ¾ç¤ºå¤å°å,é»è®¤ä¸º3å |
| | | */ |
| | | private String showCols = "3"; |
| | | /** |
| | | * 表ååç§° |
| | | */ |
| | | private String formQtName = ""; |
| | | private List<PRMItemDTO> prmItemList; |
| | | |
| | | public String getShowCols() { |
| | | return showCols; |
| | | } |
| | | |
| | | public void setShowCols(String showCols) { |
| | | this.showCols = showCols; |
| | | } |
| | | |
| | | public String getFormQtName() { |
| | | return formQtName; |
| | | } |
| | | |
| | | public void setFormQtName(String formQtName) { |
| | | this.formQtName = formQtName; |
| | | } |
| | | |
| | | public List<PRMItemDTO> getPrmItemList() { |
| | | return prmItemList; |
| | | } |
| | | |
| | | public void setPrmItemList(List<PRMItemDTO> prmItemList) { |
| | | this.prmItemList = prmItemList; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "PRMVO{" + |
| | | "showCols='" + showCols + '\'' + |
| | | ", formQtName='" + formQtName + '\'' + |
| | | ", prmItemList=" + prmItemList + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.dto; |
| | | |
| | | import com.vci.bo.ItemSeniorQueryBO; |
| | | import com.vci.pagemodel.KeyValue; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class PRMItemDTO implements java.io.Serializable { |
| | | private static final long serialVersionUID = 2773419329512304674L; |
| | | /** |
| | | * 使ç¨å段 |
| | | */ |
| | | private String itemField = ""; |
| | | //list |
| | | private String itemOR = ""; |
| | | private String itemEQ = ""; |
| | | private String itemTrim = ""; |
| | | /** |
| | | * å¿½ç¥ |
| | | */ |
| | | private String itemDbl = ""; |
| | | /** |
| | | * å符串æªå |
| | | */ |
| | | private String itemCut = ""; |
| | | /** |
| | | *ç»å®è¡¨å |
| | | */ |
| | | private String itemInObj = ""; |
| | | /** |
| | | * formï¼åæ®µè¡¨è¾¾å¼ tableï¼éå æ¥è¯¢æ¡ä»¶ |
| | | */ |
| | | private String itemAddFilter = ""; |
| | | /** |
| | | * |
| | | */ |
| | | private String itemOutType = ""; |
| | | /** |
| | | * table æ¯é¡µå¯æ¾ç¤ºè¡æ° |
| | | */ |
| | | private String itemPageSize = ""; |
| | | /** |
| | | * å¾ç宽é«ï¼0,0 |
| | | */ |
| | | private String itemImgWH = ""; |
| | | /** |
| | | * éè¦ä½¿ç¨çåæ®µ |
| | | */ |
| | | private String itemOutFields = ""; |
| | | /** |
| | | * å¾
éæ©ç屿§å段 |
| | | */ |
| | | private List<String[]> itemSelectoutFields=new ArrayList<>(); |
| | | |
| | | |
| | | /** |
| | | * éè¦ä½¿ç¨çéå |
| | | */ |
| | | private List<String> itemOutFieldList=new ArrayList<>(); |
| | | /** |
| | | * éè¦æç´¢çåæ®µ |
| | | */ |
| | | private String itemKeyFields = ""; |
| | | /** |
| | | *å¾
æç´¢å段 |
| | | */ |
| | | private List<String> itemSearchFieldList=new ArrayList<>(); |
| | | /** |
| | | * éè¦æç´¢çåæ®µ |
| | | */ |
| | | private List<String> itemKeyFieldList=new ArrayList<>(); |
| | | |
| | | private String itemBat = ""; |
| | | /** |
| | | * 宽度 |
| | | */ |
| | | private String itemFieldWidth = ""; |
| | | /** |
| | | * åæ¾ç¤ºå®½æ®µ itemOutFieldList ç¸å¹é
|
| | | */ |
| | | private List<KeyValue> itemFieldWidthList=new ArrayList<>(); |
| | | |
| | | //form |
| | | private String itemTxf = ""; |
| | | /** |
| | | * æ¾ç¤ºåç§° |
| | | */ |
| | | private String itemName = ""; |
| | | /** |
| | | * 屿§ç±»å |
| | | * text:åè¡ææ¬æ¡ |
| | | * textbtn:ææ¬æé®æ¡: |
| | | * textarea:å¤è¡ææ¬æ¡: |
| | | * richtext:å¯ææ¬æ¡: |
| | | * number:æ°åè¾å
¥æ¡: |
| | | * password:å¯ç æ¡: |
| | | * radio:åéæé®: |
| | | * checkbox:å¤éæé®: |
| | | * select:䏿èå: |
| | | * multiselect:å¤é䏿èå: |
| | | * date:æ¥æè¾å
¥æ¡: |
| | | * time:æ¶é´è¾å
¥æ¡: |
| | | * datetime:æ¥ææ¶é´è¾å
¥æ¡: |
| | | * file:æä»¶ä¸ä¼ : |
| | | * multiFile:夿件ä¸ä¼ : |
| | | * custom:èªå®ä¹: |
| | | * customform:èªå®ä¹è¡¨å: |
| | | * hidden:éèææ®éæå: |
| | | * webeditor:Webç¼è¾å¨: |
| | | * specialCharacter:ç¹æ®å符: |
| | | */ |
| | | private String itemType = ""; |
| | | /** |
| | | * 屿§ç±»åæ¾ç¤ºå¼ |
| | | */ |
| | | private String itemTypeText = ""; |
| | | /** |
| | | * é»è®¤å¼ |
| | | */ |
| | | private String itemValue = ""; |
| | | /** |
| | | *å 使¹å¼ 1:æ¾ç¤ºï¼2:䏿¾ç¤º |
| | | */ |
| | | private String itemCols = ""; |
| | | /** |
| | | * |
| | | */ |
| | | private String itemRows = ""; |
| | | /** |
| | | * éå 屿§ï¼æ ·å¼ï¼ |
| | | */ |
| | | private String itemStyle = ""; |
| | | /** |
| | | *èæ¬éªè¯ |
| | | */ |
| | | private String itemScript = ""; |
| | | /** |
| | | * æç¤ºæå |
| | | */ |
| | | private String itemTips = ""; |
| | | /** |
| | | * æä¸¾å¼ |
| | | */ |
| | | private List<String> itemValueList = null; |
| | | /** |
| | | *ä¸çº§åç
§ |
| | | */ |
| | | private String itemListTable = ""; |
| | | /** |
| | | *äºçº§åç
§ |
| | | */ |
| | | private String itemListTxt = ""; |
| | | /** |
| | | *åç
§å¼ |
| | | */ |
| | | private String itemListVal = ""; |
| | | /** |
| | | * æ¯å¦å¯ä»¥ç¼è¾0:ç¼è¾ï¼1ï¼åªè¯» |
| | | */ |
| | | private String itemIsEditable = ""; |
| | | /** |
| | | * åªè¯»éæ©æ¡ä»¶ |
| | | */ |
| | | private String itemEditableProgram = ""; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String itemEditCondition = ""; |
| | | /** |
| | | * æ¯å¦æ¾ç¤ºå段 0ï¼ä¸æ¾ç¤ºï¼1ï¼æ¾ç¤º |
| | | */ |
| | | private String itemIsHidden = ""; |
| | | /** |
| | | * æ¥è¯¢æ¨¡æ¿åç§° |
| | | */ |
| | | private String itemQtName = ""; |
| | | /** |
| | | * æ¯å¦å¿
å¡« 0:å¦ï¼1ï¼æ¯ |
| | | */ |
| | | private String itemIsRequired = ""; |
| | | /** |
| | | *httpåå¨å¼å
³ 0ï¼å¦ï¼1ï¼æ¯ |
| | | */ |
| | | private String itemIsHttpSave = ""; |
| | | /** |
| | | * åå¨è·¯å¾ |
| | | */ |
| | | private String itemHttpVolumnPath = ""; |
| | | /** |
| | | * åå¨è·¯å¾å段 |
| | | */ |
| | | private String itemHttpPathField = ""; |
| | | /** |
| | | * æéæ§å¶ |
| | | */ |
| | | private String itemRight = ""; |
| | | /** |
| | | * é«çº§æ¥è¯¢å |
| | | */ |
| | | private String itemSeniorQueryCols = ""; |
| | | /** |
| | | * é«çº§æ¥è¯¢ååä½¿ç¨æ¬¡æ° |
| | | */ |
| | | private String itemSeniorQueryColsCounts = ""; |
| | | |
| | | /** |
| | | *é«çº§æ¥è¯¢sql |
| | | */ |
| | | private String itemQuerySql = ""; |
| | | /*** |
| | | * é«çº§æ¥è¯¢å¯¹è±¡ |
| | | */ |
| | | private List<ItemSeniorQueryBO> itemSeniorQueryBOS=new ArrayList<>(); |
| | | |
| | | /** |
| | | * è¶
龿¥å段 |
| | | */ |
| | | private String itemHrefFields = ""; |
| | | /** |
| | | * è¶
龿¥é
ç½® |
| | | */ |
| | | private String itemHrefConf = ""; |
| | | /** |
| | | * æ¥è¯¢å
³èå |
| | | */ |
| | | private String itemQueryRefFields = ""; |
| | | /*** |
| | | * èªå®ä¹ç±»è·¯å¾ |
| | | */ |
| | | private String itemCustomClass = ""; |
| | | /** |
| | | * æ§å¶æ¾ç¤ºå |
| | | */ |
| | | private String itemCtrlDisplyCol = ""; |
| | | /** |
| | | * æ§å¶æ¾ç¤ºæ¡ä»¶ |
| | | */ |
| | | private String itemCtrlDisplyCondition = ""; |
| | | /** |
| | | * æ¥è¯¢åºåæ¾ç¤ºæ§å¶ trueï¼æ¾ç¤ºï¼false 䏿¾ç¤º |
| | | */ |
| | | private String itemIsNavigatorExpand = ""; |
| | | /** |
| | | * æ¯å¦æ¾ç¤ºæä»¶å¤¹ trueï¼æ¾ç¤ºï¼false 䏿¾ç¤º |
| | | */ |
| | | private String itemIsShowFolder = ""; |
| | | /** |
| | | * ç¶æä»¶å¤¹åç§° |
| | | */ |
| | | private String itemParentFolderName = ""; |
| | | /** |
| | | * æ¾ç¤ºè¡¨è¾¾å¼ ${aa}-${bb} |
| | | */ |
| | | private String itemShowExpression = ""; |
| | | /** |
| | | * æ°æ®ä¸ºæ¥æç±»åæ¶çæ ¼å¼åå符串 å¦ yyyy-MM-dd HH:mm:ss |
| | | */ |
| | | private String itemDateFormat = ""; |
| | | |
| | | public String getItemRight() { |
| | | return itemRight; |
| | | } |
| | | public void setItemRight(String itemRight) { |
| | | this.itemRight = itemRight; |
| | | } |
| | | public String getItemQuerySql() { |
| | | return itemQuerySql; |
| | | } |
| | | public void setItemQuerySql(String itemQuerySql) { |
| | | this.itemQuerySql = itemQuerySql; |
| | | } |
| | | public String getItemFieldWidth() { |
| | | return itemFieldWidth; |
| | | } |
| | | public void setItemFieldWidth(String itemFieldWidth) { |
| | | this.itemFieldWidth = itemFieldWidth; |
| | | } |
| | | public String getItemParentFolderName() { |
| | | return itemParentFolderName; |
| | | } |
| | | public void setItemParentFolderName(String itemParentFolderName) { |
| | | this.itemParentFolderName = itemParentFolderName; |
| | | } |
| | | public String getItemIsShowFolder() { |
| | | return itemIsShowFolder; |
| | | } |
| | | public void setItemIsShowFolder(String itemIsShowFolder) { |
| | | this.itemIsShowFolder = itemIsShowFolder; |
| | | } |
| | | public String getItemIsNavigatorExpand() { |
| | | return itemIsNavigatorExpand; |
| | | } |
| | | public void setItemIsNavigatorExpand(String itemIsNavigatorExpand) { |
| | | this.itemIsNavigatorExpand = itemIsNavigatorExpand; |
| | | } |
| | | public String getItemField() { |
| | | return itemField; |
| | | } |
| | | public void setItemField(String itemField) { |
| | | this.itemField = itemField; |
| | | } |
| | | public String getItemOR() { |
| | | return itemOR; |
| | | } |
| | | public void setItemOR(String itemOR) { |
| | | this.itemOR = itemOR; |
| | | } |
| | | public String getItemEQ() { |
| | | return itemEQ; |
| | | } |
| | | public void setItemEQ(String itemEQ) { |
| | | this.itemEQ = itemEQ; |
| | | } |
| | | public String getItemTrim() { |
| | | return itemTrim; |
| | | } |
| | | public void setItemTrim(String itemTrim) { |
| | | this.itemTrim = itemTrim; |
| | | } |
| | | public String getItemDbl() { |
| | | return itemDbl; |
| | | } |
| | | public void setItemDbl(String itemDbl) { |
| | | this.itemDbl = itemDbl; |
| | | } |
| | | public String getItemCut() { |
| | | return itemCut; |
| | | } |
| | | public void setItemCut(String itemCut) { |
| | | this.itemCut = itemCut; |
| | | } |
| | | public String getItemInObj() { |
| | | return itemInObj; |
| | | } |
| | | public void setItemInObj(String itemInObj) { |
| | | this.itemInObj = itemInObj; |
| | | } |
| | | public String getItemOutType() { |
| | | return itemOutType; |
| | | } |
| | | public void setItemOutType(String itemOutType) { |
| | | this.itemOutType = itemOutType; |
| | | } |
| | | public String getItemPageSize() { |
| | | return itemPageSize; |
| | | } |
| | | public void setItemPageSize(String itemPageSize) { |
| | | this.itemPageSize = itemPageSize; |
| | | } |
| | | public String getItemImgWH() { |
| | | return itemImgWH; |
| | | } |
| | | public void setItemImgWH(String itemImgWH) { |
| | | this.itemImgWH = itemImgWH; |
| | | } |
| | | public String getItemOutFields() { |
| | | return itemOutFields; |
| | | } |
| | | public void setItemOutFields(String itemOutFields) { |
| | | this.itemOutFields = itemOutFields; |
| | | } |
| | | public String getItemKeyFields() { |
| | | return itemKeyFields; |
| | | } |
| | | public void setItemKeyFields(String itemKeyFields) { |
| | | this.itemKeyFields = itemKeyFields; |
| | | } |
| | | public String getItemBat() { |
| | | return itemBat; |
| | | } |
| | | public void setItemBat(String itemBat) { |
| | | this.itemBat = itemBat; |
| | | } |
| | | public String getItemTxf() { |
| | | return itemTxf; |
| | | } |
| | | public void setItemTxf(String itemTxf) { |
| | | this.itemTxf = itemTxf; |
| | | } |
| | | public String getItemName() { |
| | | return itemName; |
| | | } |
| | | public void setItemName(String itemName) { |
| | | this.itemName = itemName; |
| | | } |
| | | public String getItemType() { |
| | | return itemType; |
| | | } |
| | | public void setItemType(String itemType) { |
| | | this.itemType = itemType; |
| | | } |
| | | public String getItemValue() { |
| | | return itemValue; |
| | | } |
| | | public void setItemValue(String itemValue) { |
| | | this.itemValue = itemValue; |
| | | } |
| | | public String getItemCols() { |
| | | return itemCols; |
| | | } |
| | | public void setItemCols(String itemCols) { |
| | | this.itemCols = itemCols; |
| | | } |
| | | public String getItemRows() { |
| | | return itemRows; |
| | | } |
| | | public void setItemRows(String itemRows) { |
| | | this.itemRows = itemRows; |
| | | } |
| | | public List<String> getItemValueList() { |
| | | return itemValueList; |
| | | } |
| | | public void setItemValueList(List<String> itemValueList) { |
| | | this.itemValueList = itemValueList; |
| | | } |
| | | public String getItemListTable() { |
| | | return itemListTable; |
| | | } |
| | | public void setItemListTable(String itemListTable) { |
| | | this.itemListTable = itemListTable; |
| | | } |
| | | |
| | | public String getItemListTxt() { |
| | | return itemListTxt; |
| | | } |
| | | public void setItemListTxt(String itemListTxt) { |
| | | this.itemListTxt = itemListTxt; |
| | | } |
| | | public String getItemListVal() { |
| | | return itemListVal; |
| | | } |
| | | public void setItemListVal(String itemListVal) { |
| | | this.itemListVal = itemListVal; |
| | | } |
| | | public String getItemAddFilter() { |
| | | return itemAddFilter; |
| | | } |
| | | public void setItemAddFilter(String itemAddFilter) { |
| | | this.itemAddFilter = itemAddFilter; |
| | | } |
| | | public String getItemStyle() { |
| | | return itemStyle; |
| | | } |
| | | public void setItemStyle(String itemStyle) { |
| | | this.itemStyle = itemStyle; |
| | | } |
| | | public String getItemScript() { |
| | | return itemScript; |
| | | } |
| | | public void setItemScript(String itemScript) { |
| | | this.itemScript = itemScript; |
| | | } |
| | | public String getItemTips() { |
| | | return itemTips; |
| | | } |
| | | public void setItemTips(String itemTips) { |
| | | this.itemTips = itemTips; |
| | | } |
| | | public String getItemIsEditable() { |
| | | return itemIsEditable; |
| | | } |
| | | public void setItemIsEditable(String itemIsEditable) { |
| | | this.itemIsEditable = itemIsEditable; |
| | | } |
| | | public String getItemIsHidden() { |
| | | return itemIsHidden; |
| | | } |
| | | public void setItemIsHidden(String itemIsHidden) { |
| | | this.itemIsHidden = itemIsHidden; |
| | | } |
| | | public String getItemQtName() { |
| | | return itemQtName; |
| | | } |
| | | public void setItemQtName(String itemQtName) { |
| | | this.itemQtName = itemQtName; |
| | | } |
| | | public String getItemIsRequired() { |
| | | return itemIsRequired; |
| | | } |
| | | public void setItemIsRequired(String itemIsRequired) { |
| | | this.itemIsRequired = itemIsRequired; |
| | | } |
| | | public String getItemSeniorQueryCols() { |
| | | return itemSeniorQueryCols; |
| | | } |
| | | public void setItemSeniorQueryCols(String itemSeniorQueryCols) { |
| | | this.itemSeniorQueryCols = itemSeniorQueryCols; |
| | | } |
| | | public String getItemSeniorQueryColsCounts() { |
| | | return itemSeniorQueryColsCounts; |
| | | } |
| | | public void setItemSeniorQueryColsCounts(String itemSeniorQueryColsCounts) { |
| | | this.itemSeniorQueryColsCounts = itemSeniorQueryColsCounts; |
| | | } |
| | | public String getItemHrefFields() { |
| | | return itemHrefFields; |
| | | } |
| | | public void setItemHrefFields(String itemHrefFields) { |
| | | this.itemHrefFields = itemHrefFields; |
| | | } |
| | | public String getItemHrefConf() { |
| | | return itemHrefConf; |
| | | } |
| | | public void setItemHrefConf(String itemHrefConf) { |
| | | this.itemHrefConf = itemHrefConf; |
| | | } |
| | | public String getItemQueryRefFields() { |
| | | return itemQueryRefFields; |
| | | } |
| | | public void setItemQueryRefFields(String itemQueryRefFields) { |
| | | this.itemQueryRefFields = itemQueryRefFields; |
| | | } |
| | | public String getItemCustomClass() { |
| | | return itemCustomClass; |
| | | } |
| | | public void setItemCustomClass(String itemCustomClass) { |
| | | this.itemCustomClass = itemCustomClass; |
| | | } |
| | | public String getItemCtrlDisplyCol() { |
| | | return itemCtrlDisplyCol; |
| | | } |
| | | public void setItemCtrlDisplyCol(String itemCtrlDisplyCol) { |
| | | this.itemCtrlDisplyCol = itemCtrlDisplyCol; |
| | | } |
| | | public String getItemCtrlDisplyCondition() { |
| | | return itemCtrlDisplyCondition; |
| | | } |
| | | public void setItemCtrlDisplyCondition(String itemCtrlDisplyCondition) { |
| | | this.itemCtrlDisplyCondition = itemCtrlDisplyCondition; |
| | | } |
| | | public String getItemIsHttpSave() { |
| | | return itemIsHttpSave; |
| | | } |
| | | public void setItemIsHttpSave(String itemIsHttpSave) { |
| | | this.itemIsHttpSave = itemIsHttpSave; |
| | | } |
| | | public String getItemHttpVolumnPath() { |
| | | return itemHttpVolumnPath; |
| | | } |
| | | public void setItemHttpVolumnPath(String itemHttpVolumnPath) { |
| | | this.itemHttpVolumnPath = itemHttpVolumnPath; |
| | | } |
| | | public String getItemHttpPathField() { |
| | | return itemHttpPathField; |
| | | } |
| | | public void setItemHttpPathField(String itemHttpPathField) { |
| | | this.itemHttpPathField = itemHttpPathField; |
| | | } |
| | | public String getItemEditCondition() { |
| | | return itemEditCondition; |
| | | } |
| | | public void setItemEditCondition(String itemEditCondition) { |
| | | this.itemEditCondition = itemEditCondition; |
| | | } |
| | | public String getItemEditableProgram() { |
| | | return itemEditableProgram; |
| | | } |
| | | public void setItemEditableProgram(String itemEditableProgram) { |
| | | this.itemEditableProgram = itemEditableProgram; |
| | | } |
| | | |
| | | public String getItemShowExpression() { |
| | | return itemShowExpression; |
| | | } |
| | | public void setItemShowExpression(String itemShowExpression) { |
| | | this.itemShowExpression = itemShowExpression; |
| | | } |
| | | public String getItemDateFormat() { |
| | | return itemDateFormat; |
| | | } |
| | | public void setItemDateFormat(String itemDateFormat) { |
| | | this.itemDateFormat = itemDateFormat; |
| | | } |
| | | |
| | | public List<String> getItemOutFieldList() { |
| | | return itemOutFieldList; |
| | | } |
| | | |
| | | public void setItemOutFieldList(List<String> itemOutFieldList) { |
| | | this.itemOutFieldList = itemOutFieldList; |
| | | } |
| | | |
| | | public List<String> getItemKeyFieldList() { |
| | | return itemKeyFieldList; |
| | | } |
| | | |
| | | public void setItemKeyFieldList(List<String> itemKeyFieldList) { |
| | | this.itemKeyFieldList = itemKeyFieldList; |
| | | } |
| | | |
| | | public List<KeyValue> getItemFieldWidthList() { |
| | | return itemFieldWidthList; |
| | | } |
| | | |
| | | public void setItemFieldWidthList(List<KeyValue> itemFieldWidthList) { |
| | | this.itemFieldWidthList = itemFieldWidthList; |
| | | } |
| | | |
| | | public String getItemTypeText() { |
| | | return itemTypeText; |
| | | } |
| | | |
| | | public void setItemTypeText(String itemTypeText) { |
| | | this.itemTypeText = itemTypeText; |
| | | } |
| | | |
| | | public List<ItemSeniorQueryBO> getItemSeniorQueryBOS() { |
| | | return itemSeniorQueryBOS; |
| | | } |
| | | |
| | | public void setItemSeniorQueryBOS(List<ItemSeniorQueryBO> itemSeniorQueryBOS) { |
| | | this.itemSeniorQueryBOS = itemSeniorQueryBOS; |
| | | } |
| | | |
| | | public List<String[]> getItemSelectoutFields() { |
| | | return itemSelectoutFields; |
| | | } |
| | | |
| | | public void setItemSelectoutFields(List<String[]> itemSelectoutFields) { |
| | | this.itemSelectoutFields = itemSelectoutFields; |
| | | } |
| | | |
| | | public List<String> getItemSearchFieldList() { |
| | | return itemSearchFieldList; |
| | | } |
| | | |
| | | public void setItemSearchFieldList(List<String> itemSearchFieldList) { |
| | | this.itemSearchFieldList = itemSearchFieldList; |
| | | } |
| | | // /** |
| | | // * é«çº§æ¥è¯¢åä¸ä½¿ç¨æ¬¡æ° |
| | | // */ |
| | | // public Map<String, Integer> getColAndUseCountMap() { |
| | | // if(this.itemSeniorQueryCols == null || this.itemSeniorQueryColsCounts == null |
| | | // || this.itemSeniorQueryCols.equals("") || this.itemSeniorQueryColsCounts.equals("")){ |
| | | // return null; |
| | | // } |
| | | // Map<String, Integer> map = new LinkedHashMap<String, Integer>(); |
| | | // String[] cols = this.itemSeniorQueryCols.split(","); |
| | | // String[] counts = this.itemSeniorQueryColsCounts.split(","); |
| | | // for(int i = 0; i < cols.length; i++){ |
| | | // int count = Integer.valueOf(counts[i]); |
| | | // map.put(cols[i], count); |
| | | // } |
| | | // return map; |
| | | // } |
| | | // |
| | | // /** |
| | | // * é«çº§æ¥è¯¢èªå®ä¹å䏿¥è¯¢sql |
| | | // */ |
| | | // public Map<String, String> getCustomerColAndSql() { |
| | | // if(this.itemSeniorQueryCols == null || this.itemQuerySql == null |
| | | // || this.itemSeniorQueryCols.equals("") || this.itemQuerySql.equals("")){ |
| | | // return null; |
| | | // } |
| | | // Map<String, String> map = new LinkedHashMap<String, String>(); |
| | | // String[] cols = this.itemSeniorQueryCols.split(","); |
| | | // String[] sqls = this.itemQuerySql.split(";"); |
| | | // for(int i = 0; i < cols.length; i++){ |
| | | // String sql = sqls[i]; |
| | | // if(sql != null && !sql.equalsIgnoreCase("NULL")){ |
| | | // map.put(cols[i], sql); |
| | | // } |
| | | // } |
| | | // return map; |
| | | // } |
| | | // |
| | | // /** |
| | | // * è¿å PRMItem 对象æ¯å¦æ¾ç¤º |
| | | // * @return 对象æ¯å¦æ¾ç¤º (对åºè¡¨å屿§å®ä¹çå 使¹å¼çæ¾ç¤ºã䏿¾ç¤ºï¼<p>true:æ¾ç¤º false:䏿¾ç¤º</p> |
| | | // */ |
| | | // public boolean isShow(){ |
| | | // return ("1".equalsIgnoreCase(this.getItemCols().trim())); |
| | | // } |
| | | // /** |
| | | // * è¿å PRMItem 对象æ¯å¦æ¯å¿
填项 |
| | | // * @return 对象æ¯å¦æ¯å¿
å¡«<p>true:æ¾å¿
填项 false:䏿¯å¿
填项</p> |
| | | // */ |
| | | // public boolean isRequired(){ |
| | | // return ("1".equalsIgnoreCase(this.getItemIsRequired().trim())); |
| | | // } |
| | | // /** |
| | | // * è¿å PRMItem 对象 æ¯å¦å¯ä»¥ç¼è¾ |
| | | // * @return 对象æ¯å¦å¯ç¼è¾ <p>true: å¯ç¼è¾(éåªè¯») false: ä¸å¯ç¼è¾(åªè¯»)</p> |
| | | // */ |
| | | // public boolean isEditable(){ |
| | | // return ("0".equalsIgnoreCase(this.getItemIsEditable().trim())); |
| | | // } |
| | | // /** |
| | | // * è¿å PRMItem 对象 æ¯å¦å¯æ¯åªè¯» |
| | | // * @return 对象æ¯å¦å¯ç¼è¾ <p>true: åªè¯»(ä¸å¯ç¼è¾) false: éåªè¯»(å¯ç¼è¾)</p> |
| | | // */ |
| | | // public boolean isReadonly(){ |
| | | // return !(isEditable()); |
| | | // } |
| | | |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "PRMItemDTO{" + |
| | | "itemField='" + itemField + '\'' + |
| | | ", itemOR='" + itemOR + '\'' + |
| | | ", itemEQ='" + itemEQ + '\'' + |
| | | ", itemTrim='" + itemTrim + '\'' + |
| | | ", itemDbl='" + itemDbl + '\'' + |
| | | ", itemCut='" + itemCut + '\'' + |
| | | ", itemInObj='" + itemInObj + '\'' + |
| | | ", itemAddFilter='" + itemAddFilter + '\'' + |
| | | ", itemOutType='" + itemOutType + '\'' + |
| | | ", itemPageSize='" + itemPageSize + '\'' + |
| | | ", itemImgWH='" + itemImgWH + '\'' + |
| | | ", itemOutFields='" + itemOutFields + '\'' + |
| | | ", itemSelectoutFields=" + itemSelectoutFields + |
| | | ", itemOutFieldList=" + itemOutFieldList + |
| | | ", itemKeyFields='" + itemKeyFields + '\'' + |
| | | ", itemSearchFieldList=" + itemSearchFieldList + |
| | | ", itemKeyFieldList=" + itemKeyFieldList + |
| | | ", itemBat='" + itemBat + '\'' + |
| | | ", itemFieldWidth='" + itemFieldWidth + '\'' + |
| | | ", itemFieldWidthList=" + itemFieldWidthList + |
| | | ", itemTxf='" + itemTxf + '\'' + |
| | | ", itemName='" + itemName + '\'' + |
| | | ", itemType='" + itemType + '\'' + |
| | | ", itemTypeText='" + itemTypeText + '\'' + |
| | | ", itemValue='" + itemValue + '\'' + |
| | | ", itemCols='" + itemCols + '\'' + |
| | | ", itemRows='" + itemRows + '\'' + |
| | | ", itemStyle='" + itemStyle + '\'' + |
| | | ", itemScript='" + itemScript + '\'' + |
| | | ", itemTips='" + itemTips + '\'' + |
| | | ", itemValueList=" + itemValueList + |
| | | ", itemListTable='" + itemListTable + '\'' + |
| | | ", itemListTxt='" + itemListTxt + '\'' + |
| | | ", itemListVal='" + itemListVal + '\'' + |
| | | ", itemIsEditable='" + itemIsEditable + '\'' + |
| | | ", itemEditableProgram='" + itemEditableProgram + '\'' + |
| | | ", itemEditCondition='" + itemEditCondition + '\'' + |
| | | ", itemIsHidden='" + itemIsHidden + '\'' + |
| | | ", itemQtName='" + itemQtName + '\'' + |
| | | ", itemIsRequired='" + itemIsRequired + '\'' + |
| | | ", itemIsHttpSave='" + itemIsHttpSave + '\'' + |
| | | ", itemHttpVolumnPath='" + itemHttpVolumnPath + '\'' + |
| | | ", itemHttpPathField='" + itemHttpPathField + '\'' + |
| | | ", itemRight='" + itemRight + '\'' + |
| | | ", itemSeniorQueryCols='" + itemSeniorQueryCols + '\'' + |
| | | ", itemSeniorQueryColsCounts='" + itemSeniorQueryColsCounts + '\'' + |
| | | ", itemQuerySql='" + itemQuerySql + '\'' + |
| | | ", itemSeniorQueryBOS=" + itemSeniorQueryBOS + |
| | | ", itemHrefFields='" + itemHrefFields + '\'' + |
| | | ", itemHrefConf='" + itemHrefConf + '\'' + |
| | | ", itemQueryRefFields='" + itemQueryRefFields + '\'' + |
| | | ", itemCustomClass='" + itemCustomClass + '\'' + |
| | | ", itemCtrlDisplyCol='" + itemCtrlDisplyCol + '\'' + |
| | | ", itemCtrlDisplyCondition='" + itemCtrlDisplyCondition + '\'' + |
| | | ", itemIsNavigatorExpand='" + itemIsNavigatorExpand + '\'' + |
| | | ", itemIsShowFolder='" + itemIsShowFolder + '\'' + |
| | | ", itemParentFolderName='" + itemParentFolderName + '\'' + |
| | | ", itemShowExpression='" + itemShowExpression + '\'' + |
| | | ", itemDateFormat='" + itemDateFormat + '\'' + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.dto; |
| | | |
| | | /** |
| | | * |
| | | * è¡¨åæ¾ç¤ºå¯¹è±¡ |
| | | * @author xiej |
| | | * @date 2024/08/14 6:04 PM |
| | | */ |
| | | public class PortalVIDTO implements java.io.Serializable{ |
| | | |
| | | private static final long serialVersionUID = 3676954583670971638L; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | private String id; |
| | | /** |
| | | * 0: ä¸å¡ç±»å; 1: 龿¥ç±»å. é»è®¤0 |
| | | */ |
| | | private short typeFlag; |
| | | /** |
| | | * ç±»åå |
| | | */ |
| | | private String typeName; |
| | | /** |
| | | * è§å¾å |
| | | */ |
| | | private String viName; |
| | | /** |
| | | * è§å¾ç±»å: è¾å
¥è¡¨åæå页å表 |
| | | */ |
| | | private short viType; |
| | | /** |
| | | * å®ä¹è¯¦æ
|
| | | */ |
| | | private PRMDTO prm; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public short getTypeFlag() { |
| | | return typeFlag; |
| | | } |
| | | |
| | | public void setTypeFlag(short typeFlag) { |
| | | this.typeFlag = typeFlag; |
| | | } |
| | | |
| | | public String getTypeName() { |
| | | return typeName; |
| | | } |
| | | |
| | | public void setTypeName(String typeName) { |
| | | this.typeName = typeName; |
| | | } |
| | | |
| | | public String getViName() { |
| | | return viName; |
| | | } |
| | | |
| | | public void setViName(String viName) { |
| | | this.viName = viName; |
| | | } |
| | | |
| | | public short getViType() { |
| | | return viType; |
| | | } |
| | | |
| | | public void setViType(short viType) { |
| | | this.viType = viType; |
| | | } |
| | | |
| | | public PRMDTO getPrm() { |
| | | return prm; |
| | | } |
| | | |
| | | public void setPrm(PRMDTO prm) { |
| | | this.prm = prm; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "PortalVIVO{" + |
| | | "id='" + id + '\'' + |
| | | ", typeFlag=" + typeFlag + |
| | | ", typeName='" + typeName + '\'' + |
| | | ", viName='" + viName + '\'' + |
| | | ", viType=" + viType + |
| | | ", prm=" + prm + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.model; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class PRMDO implements java.io.Serializable { |
| | | |
| | | |
| | | private static final long serialVersionUID = -5898872445810489324L; |
| | | private String showCols = "3"; |
| | | private String formQtName = ""; |
| | | private List<PRMItemDO> prmItemList; |
| | | |
| | | public String getShowCols() { |
| | | return showCols; |
| | | } |
| | | |
| | | public void setShowCols(String showCols) { |
| | | this.showCols = showCols; |
| | | } |
| | | |
| | | public String getFormQtName() { |
| | | return formQtName; |
| | | } |
| | | |
| | | public void setFormQtName(String formQtName) { |
| | | this.formQtName = formQtName; |
| | | } |
| | | |
| | | public List<PRMItemDO> getPrmItemList() { |
| | | return prmItemList; |
| | | } |
| | | |
| | | public void setPrmItemList(List<PRMItemDO> prmItemList) { |
| | | this.prmItemList = prmItemList; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "PRMVO{" + |
| | | "showCols='" + showCols + '\'' + |
| | | ", formQtName='" + formQtName + '\'' + |
| | | ", prmItemList=" + prmItemList + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.model; |
| | | |
| | | import com.vci.bo.ItemSeniorQueryBO; |
| | | import com.vci.pagemodel.KeyValue; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class PRMItemDO implements java.io.Serializable { |
| | | |
| | | private static final long serialVersionUID = 4168551730739914307L; |
| | | /** |
| | | * 使ç¨å段 |
| | | */ |
| | | private String itemField = ""; |
| | | //list |
| | | private String itemOR = ""; |
| | | private String itemEQ = ""; |
| | | private String itemTrim = ""; |
| | | /** |
| | | * å¿½ç¥ |
| | | */ |
| | | private String itemDbl = ""; |
| | | /** |
| | | * å符串æªå |
| | | */ |
| | | private String itemCut = ""; |
| | | /** |
| | | *ç»å®è¡¨å |
| | | */ |
| | | private String itemInObj = ""; |
| | | /** |
| | | * formï¼åæ®µè¡¨è¾¾å¼ tableï¼éå æ¥è¯¢æ¡ä»¶ |
| | | */ |
| | | private String itemAddFilter = ""; |
| | | /** |
| | | * |
| | | */ |
| | | private String itemOutType = ""; |
| | | /** |
| | | * table æ¯é¡µå¯æ¾ç¤ºè¡æ° |
| | | */ |
| | | private String itemPageSize = ""; |
| | | /** |
| | | * å¾ç宽é«ï¼0,0 |
| | | */ |
| | | private String itemImgWH = ""; |
| | | /** |
| | | * éè¦ä½¿ç¨çåæ®µ |
| | | */ |
| | | private String itemOutFields = ""; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * éè¦æç´¢çåæ®µ |
| | | */ |
| | | private String itemKeyFields = ""; |
| | | |
| | | |
| | | private String itemBat = ""; |
| | | /** |
| | | * 宽度 |
| | | */ |
| | | private String itemFieldWidth = ""; |
| | | |
| | | //form |
| | | private String itemTxf = ""; |
| | | /** |
| | | * æ¾ç¤ºåç§° |
| | | */ |
| | | private String itemName = ""; |
| | | /** |
| | | * 屿§ç±»å |
| | | * text:åè¡ææ¬æ¡ |
| | | * textbtn:ææ¬æé®æ¡: |
| | | * textarea:å¤è¡ææ¬æ¡: |
| | | * richtext:å¯ææ¬æ¡: |
| | | * number:æ°åè¾å
¥æ¡: |
| | | * password:å¯ç æ¡: |
| | | * radio:åéæé®: |
| | | * checkbox:å¤éæé®: |
| | | * select:䏿èå: |
| | | * multiselect:å¤é䏿èå: |
| | | * date:æ¥æè¾å
¥æ¡: |
| | | * time:æ¶é´è¾å
¥æ¡: |
| | | * datetime:æ¥ææ¶é´è¾å
¥æ¡: |
| | | * file:æä»¶ä¸ä¼ : |
| | | * multiFile:夿件ä¸ä¼ : |
| | | * custom:èªå®ä¹: |
| | | * customform:èªå®ä¹è¡¨å: |
| | | * hidden:éèææ®éæå: |
| | | * webeditor:Webç¼è¾å¨: |
| | | * specialCharacter:ç¹æ®å符: |
| | | */ |
| | | private String itemType = ""; |
| | | /** |
| | | * 屿§ç±»åæ¾ç¤ºå¼ |
| | | */ |
| | | private String itemTypeText = ""; |
| | | /** |
| | | * é»è®¤å¼ |
| | | */ |
| | | private String itemValue = ""; |
| | | /** |
| | | *å 使¹å¼ 1:æ¾ç¤ºï¼2:䏿¾ç¤º |
| | | */ |
| | | private String itemCols = ""; |
| | | /** |
| | | * |
| | | */ |
| | | private String itemRows = ""; |
| | | /** |
| | | * éå 屿§ï¼æ ·å¼ï¼ |
| | | */ |
| | | private String itemStyle = ""; |
| | | /** |
| | | *èæ¬éªè¯ |
| | | */ |
| | | private String itemScript = ""; |
| | | /** |
| | | * æç¤ºæå |
| | | */ |
| | | private String itemTips = ""; |
| | | /** |
| | | * æä¸¾å¼ |
| | | */ |
| | | private List<String> itemValueList = null; |
| | | |
| | | /** |
| | | *ä¸çº§åç
§ |
| | | */ |
| | | private String itemListTable = ""; |
| | | /** |
| | | *äºçº§åç
§ |
| | | */ |
| | | private String itemListTxt = ""; |
| | | /** |
| | | *åç
§å¼ |
| | | */ |
| | | private String itemListVal = ""; |
| | | /** |
| | | * æ¯å¦å¯ä»¥ç¼è¾0:ç¼è¾ï¼1ï¼åªè¯» |
| | | */ |
| | | private String itemIsEditable = ""; |
| | | /** |
| | | * åªè¯»éæ©æ¡ä»¶ |
| | | */ |
| | | private String itemEditableProgram = ""; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String itemEditCondition = ""; |
| | | /** |
| | | * æ¯å¦æ¾ç¤ºå段 0ï¼ä¸æ¾ç¤ºï¼1ï¼æ¾ç¤º |
| | | */ |
| | | private String itemIsHidden = ""; |
| | | /** |
| | | * æ¥è¯¢æ¨¡æ¿åç§° |
| | | */ |
| | | private String itemQtName = ""; |
| | | /** |
| | | * æ¯å¦å¿
å¡« 0:å¦ï¼1ï¼æ¯ |
| | | */ |
| | | private String itemIsRequired = ""; |
| | | /** |
| | | *httpåå¨å¼å
³ 0ï¼å¦ï¼1ï¼æ¯ |
| | | */ |
| | | private String itemIsHttpSave = ""; |
| | | /** |
| | | * åå¨è·¯å¾ |
| | | */ |
| | | private String itemHttpVolumnPath = ""; |
| | | /** |
| | | * åå¨è·¯å¾å段 |
| | | */ |
| | | private String itemHttpPathField = ""; |
| | | /** |
| | | * æéæ§å¶ |
| | | */ |
| | | private String itemRight = ""; |
| | | /** |
| | | * é«çº§æ¥è¯¢å |
| | | */ |
| | | private String itemSeniorQueryCols = ""; |
| | | /** |
| | | * é«çº§æ¥è¯¢ååä½¿ç¨æ¬¡æ° |
| | | */ |
| | | private String itemSeniorQueryColsCounts = ""; |
| | | |
| | | /** |
| | | *é«çº§æ¥è¯¢sql |
| | | */ |
| | | private String itemQuerySql = ""; |
| | | |
| | | /** |
| | | * è¶
龿¥å段 |
| | | */ |
| | | private String itemHrefFields = ""; |
| | | /** |
| | | * è¶
龿¥é
ç½® |
| | | */ |
| | | private String itemHrefConf = ""; |
| | | /** |
| | | * æ¥è¯¢å
³èå |
| | | */ |
| | | private String itemQueryRefFields = ""; |
| | | /*** |
| | | * èªå®ä¹ç±»è·¯å¾ |
| | | */ |
| | | private String itemCustomClass = ""; |
| | | /** |
| | | * æ§å¶æ¾ç¤ºå |
| | | */ |
| | | private String itemCtrlDisplyCol = ""; |
| | | /** |
| | | * æ§å¶æ¾ç¤ºæ¡ä»¶ |
| | | */ |
| | | private String itemCtrlDisplyCondition = ""; |
| | | /** |
| | | * æ¥è¯¢åºåæ¾ç¤ºæ§å¶ trueï¼æ¾ç¤ºï¼false 䏿¾ç¤º |
| | | */ |
| | | private String itemIsNavigatorExpand = ""; |
| | | /** |
| | | * æ¯å¦æ¾ç¤ºæä»¶å¤¹ trueï¼æ¾ç¤ºï¼false 䏿¾ç¤º |
| | | */ |
| | | private String itemIsShowFolder = ""; |
| | | /** |
| | | * ç¶æä»¶å¤¹åç§° |
| | | */ |
| | | private String itemParentFolderName = ""; |
| | | /** |
| | | * æ¾ç¤ºè¡¨è¾¾å¼ ${aa}-${bb} |
| | | */ |
| | | private String itemShowExpression = ""; |
| | | /** |
| | | * æ°æ®ä¸ºæ¥æç±»åæ¶çæ ¼å¼åå符串 å¦ yyyy-MM-dd HH:mm:ss |
| | | */ |
| | | private String itemDateFormat = ""; |
| | | |
| | | public String getItemField() { |
| | | return itemField; |
| | | } |
| | | |
| | | public void setItemField(String itemField) { |
| | | this.itemField = itemField; |
| | | } |
| | | |
| | | public String getItemOR() { |
| | | return itemOR; |
| | | } |
| | | |
| | | public void setItemOR(String itemOR) { |
| | | this.itemOR = itemOR; |
| | | } |
| | | |
| | | public String getItemEQ() { |
| | | return itemEQ; |
| | | } |
| | | |
| | | public void setItemEQ(String itemEQ) { |
| | | this.itemEQ = itemEQ; |
| | | } |
| | | |
| | | public String getItemTrim() { |
| | | return itemTrim; |
| | | } |
| | | |
| | | public void setItemTrim(String itemTrim) { |
| | | this.itemTrim = itemTrim; |
| | | } |
| | | |
| | | public String getItemDbl() { |
| | | return itemDbl; |
| | | } |
| | | |
| | | public void setItemDbl(String itemDbl) { |
| | | this.itemDbl = itemDbl; |
| | | } |
| | | |
| | | public String getItemCut() { |
| | | return itemCut; |
| | | } |
| | | |
| | | public void setItemCut(String itemCut) { |
| | | this.itemCut = itemCut; |
| | | } |
| | | |
| | | public String getItemInObj() { |
| | | return itemInObj; |
| | | } |
| | | |
| | | public void setItemInObj(String itemInObj) { |
| | | this.itemInObj = itemInObj; |
| | | } |
| | | |
| | | public String getItemAddFilter() { |
| | | return itemAddFilter; |
| | | } |
| | | |
| | | public void setItemAddFilter(String itemAddFilter) { |
| | | this.itemAddFilter = itemAddFilter; |
| | | } |
| | | |
| | | public String getItemOutType() { |
| | | return itemOutType; |
| | | } |
| | | |
| | | public void setItemOutType(String itemOutType) { |
| | | this.itemOutType = itemOutType; |
| | | } |
| | | |
| | | public String getItemPageSize() { |
| | | return itemPageSize; |
| | | } |
| | | |
| | | public void setItemPageSize(String itemPageSize) { |
| | | this.itemPageSize = itemPageSize; |
| | | } |
| | | |
| | | public String getItemImgWH() { |
| | | return itemImgWH; |
| | | } |
| | | |
| | | public void setItemImgWH(String itemImgWH) { |
| | | this.itemImgWH = itemImgWH; |
| | | } |
| | | |
| | | public String getItemOutFields() { |
| | | return itemOutFields; |
| | | } |
| | | |
| | | public void setItemOutFields(String itemOutFields) { |
| | | this.itemOutFields = itemOutFields; |
| | | } |
| | | public String getItemKeyFields() { |
| | | return itemKeyFields; |
| | | } |
| | | |
| | | public void setItemKeyFields(String itemKeyFields) { |
| | | this.itemKeyFields = itemKeyFields; |
| | | } |
| | | |
| | | public String getItemBat() { |
| | | return itemBat; |
| | | } |
| | | |
| | | public void setItemBat(String itemBat) { |
| | | this.itemBat = itemBat; |
| | | } |
| | | |
| | | public String getItemFieldWidth() { |
| | | return itemFieldWidth; |
| | | } |
| | | |
| | | public void setItemFieldWidth(String itemFieldWidth) { |
| | | this.itemFieldWidth = itemFieldWidth; |
| | | } |
| | | |
| | | |
| | | public String getItemTxf() { |
| | | return itemTxf; |
| | | } |
| | | |
| | | public void setItemTxf(String itemTxf) { |
| | | this.itemTxf = itemTxf; |
| | | } |
| | | |
| | | public String getItemName() { |
| | | return itemName; |
| | | } |
| | | |
| | | public void setItemName(String itemName) { |
| | | this.itemName = itemName; |
| | | } |
| | | |
| | | public String getItemType() { |
| | | return itemType; |
| | | } |
| | | |
| | | public void setItemType(String itemType) { |
| | | this.itemType = itemType; |
| | | } |
| | | |
| | | public String getItemTypeText() { |
| | | return itemTypeText; |
| | | } |
| | | |
| | | public void setItemTypeText(String itemTypeText) { |
| | | this.itemTypeText = itemTypeText; |
| | | } |
| | | |
| | | public String getItemValue() { |
| | | return itemValue; |
| | | } |
| | | |
| | | public void setItemValue(String itemValue) { |
| | | this.itemValue = itemValue; |
| | | } |
| | | |
| | | public String getItemCols() { |
| | | return itemCols; |
| | | } |
| | | |
| | | public void setItemCols(String itemCols) { |
| | | this.itemCols = itemCols; |
| | | } |
| | | |
| | | public String getItemRows() { |
| | | return itemRows; |
| | | } |
| | | |
| | | public void setItemRows(String itemRows) { |
| | | this.itemRows = itemRows; |
| | | } |
| | | |
| | | public String getItemStyle() { |
| | | return itemStyle; |
| | | } |
| | | |
| | | public void setItemStyle(String itemStyle) { |
| | | this.itemStyle = itemStyle; |
| | | } |
| | | |
| | | public String getItemScript() { |
| | | return itemScript; |
| | | } |
| | | |
| | | public void setItemScript(String itemScript) { |
| | | this.itemScript = itemScript; |
| | | } |
| | | |
| | | public String getItemTips() { |
| | | return itemTips; |
| | | } |
| | | |
| | | public void setItemTips(String itemTips) { |
| | | this.itemTips = itemTips; |
| | | } |
| | | |
| | | public List<String> getItemValueList() { |
| | | return itemValueList; |
| | | } |
| | | |
| | | public void setItemValueList(List<String> itemValueList) { |
| | | this.itemValueList = itemValueList; |
| | | } |
| | | |
| | | public String getItemListTable() { |
| | | return itemListTable; |
| | | } |
| | | |
| | | public void setItemListTable(String itemListTable) { |
| | | this.itemListTable = itemListTable; |
| | | } |
| | | |
| | | public String getItemListTxt() { |
| | | return itemListTxt; |
| | | } |
| | | |
| | | public void setItemListTxt(String itemListTxt) { |
| | | this.itemListTxt = itemListTxt; |
| | | } |
| | | |
| | | public String getItemListVal() { |
| | | return itemListVal; |
| | | } |
| | | |
| | | public void setItemListVal(String itemListVal) { |
| | | this.itemListVal = itemListVal; |
| | | } |
| | | |
| | | public String getItemIsEditable() { |
| | | return itemIsEditable; |
| | | } |
| | | |
| | | public void setItemIsEditable(String itemIsEditable) { |
| | | this.itemIsEditable = itemIsEditable; |
| | | } |
| | | |
| | | public String getItemEditableProgram() { |
| | | return itemEditableProgram; |
| | | } |
| | | |
| | | public void setItemEditableProgram(String itemEditableProgram) { |
| | | this.itemEditableProgram = itemEditableProgram; |
| | | } |
| | | |
| | | public String getItemEditCondition() { |
| | | return itemEditCondition; |
| | | } |
| | | |
| | | public void setItemEditCondition(String itemEditCondition) { |
| | | this.itemEditCondition = itemEditCondition; |
| | | } |
| | | |
| | | public String getItemIsHidden() { |
| | | return itemIsHidden; |
| | | } |
| | | |
| | | public void setItemIsHidden(String itemIsHidden) { |
| | | this.itemIsHidden = itemIsHidden; |
| | | } |
| | | |
| | | public String getItemQtName() { |
| | | return itemQtName; |
| | | } |
| | | |
| | | public void setItemQtName(String itemQtName) { |
| | | this.itemQtName = itemQtName; |
| | | } |
| | | |
| | | public String getItemIsRequired() { |
| | | return itemIsRequired; |
| | | } |
| | | |
| | | public void setItemIsRequired(String itemIsRequired) { |
| | | this.itemIsRequired = itemIsRequired; |
| | | } |
| | | |
| | | public String getItemIsHttpSave() { |
| | | return itemIsHttpSave; |
| | | } |
| | | |
| | | public void setItemIsHttpSave(String itemIsHttpSave) { |
| | | this.itemIsHttpSave = itemIsHttpSave; |
| | | } |
| | | |
| | | public String getItemHttpVolumnPath() { |
| | | return itemHttpVolumnPath; |
| | | } |
| | | |
| | | public void setItemHttpVolumnPath(String itemHttpVolumnPath) { |
| | | this.itemHttpVolumnPath = itemHttpVolumnPath; |
| | | } |
| | | |
| | | public String getItemHttpPathField() { |
| | | return itemHttpPathField; |
| | | } |
| | | |
| | | public void setItemHttpPathField(String itemHttpPathField) { |
| | | this.itemHttpPathField = itemHttpPathField; |
| | | } |
| | | |
| | | public String getItemRight() { |
| | | return itemRight; |
| | | } |
| | | |
| | | public void setItemRight(String itemRight) { |
| | | this.itemRight = itemRight; |
| | | } |
| | | |
| | | public String getItemSeniorQueryCols() { |
| | | return itemSeniorQueryCols; |
| | | } |
| | | |
| | | public void setItemSeniorQueryCols(String itemSeniorQueryCols) { |
| | | this.itemSeniorQueryCols = itemSeniorQueryCols; |
| | | } |
| | | |
| | | public String getItemSeniorQueryColsCounts() { |
| | | return itemSeniorQueryColsCounts; |
| | | } |
| | | |
| | | public void setItemSeniorQueryColsCounts(String itemSeniorQueryColsCounts) { |
| | | this.itemSeniorQueryColsCounts = itemSeniorQueryColsCounts; |
| | | } |
| | | |
| | | public String getItemQuerySql() { |
| | | return itemQuerySql; |
| | | } |
| | | |
| | | public void setItemQuerySql(String itemQuerySql) { |
| | | this.itemQuerySql = itemQuerySql; |
| | | } |
| | | |
| | | |
| | | public String getItemHrefFields() { |
| | | return itemHrefFields; |
| | | } |
| | | |
| | | public void setItemHrefFields(String itemHrefFields) { |
| | | this.itemHrefFields = itemHrefFields; |
| | | } |
| | | |
| | | public String getItemHrefConf() { |
| | | return itemHrefConf; |
| | | } |
| | | |
| | | public void setItemHrefConf(String itemHrefConf) { |
| | | this.itemHrefConf = itemHrefConf; |
| | | } |
| | | |
| | | public String getItemQueryRefFields() { |
| | | return itemQueryRefFields; |
| | | } |
| | | |
| | | public void setItemQueryRefFields(String itemQueryRefFields) { |
| | | this.itemQueryRefFields = itemQueryRefFields; |
| | | } |
| | | |
| | | public String getItemCustomClass() { |
| | | return itemCustomClass; |
| | | } |
| | | |
| | | public void setItemCustomClass(String itemCustomClass) { |
| | | this.itemCustomClass = itemCustomClass; |
| | | } |
| | | |
| | | public String getItemCtrlDisplyCol() { |
| | | return itemCtrlDisplyCol; |
| | | } |
| | | |
| | | public void setItemCtrlDisplyCol(String itemCtrlDisplyCol) { |
| | | this.itemCtrlDisplyCol = itemCtrlDisplyCol; |
| | | } |
| | | |
| | | public String getItemCtrlDisplyCondition() { |
| | | return itemCtrlDisplyCondition; |
| | | } |
| | | |
| | | public void setItemCtrlDisplyCondition(String itemCtrlDisplyCondition) { |
| | | this.itemCtrlDisplyCondition = itemCtrlDisplyCondition; |
| | | } |
| | | |
| | | public String getItemIsNavigatorExpand() { |
| | | return itemIsNavigatorExpand; |
| | | } |
| | | |
| | | public void setItemIsNavigatorExpand(String itemIsNavigatorExpand) { |
| | | this.itemIsNavigatorExpand = itemIsNavigatorExpand; |
| | | } |
| | | |
| | | public String getItemIsShowFolder() { |
| | | return itemIsShowFolder; |
| | | } |
| | | |
| | | public void setItemIsShowFolder(String itemIsShowFolder) { |
| | | this.itemIsShowFolder = itemIsShowFolder; |
| | | } |
| | | |
| | | public String getItemParentFolderName() { |
| | | return itemParentFolderName; |
| | | } |
| | | |
| | | public void setItemParentFolderName(String itemParentFolderName) { |
| | | this.itemParentFolderName = itemParentFolderName; |
| | | } |
| | | |
| | | public String getItemShowExpression() { |
| | | return itemShowExpression; |
| | | } |
| | | |
| | | public void setItemShowExpression(String itemShowExpression) { |
| | | this.itemShowExpression = itemShowExpression; |
| | | } |
| | | |
| | | public String getItemDateFormat() { |
| | | return itemDateFormat; |
| | | } |
| | | |
| | | public void setItemDateFormat(String itemDateFormat) { |
| | | this.itemDateFormat = itemDateFormat; |
| | | } |
| | | @Override |
| | | public String toString() { |
| | | return "PRMItemDO{" + |
| | | "itemField='" + itemField + '\'' + |
| | | ", itemOR='" + itemOR + '\'' + |
| | | ", itemEQ='" + itemEQ + '\'' + |
| | | ", itemTrim='" + itemTrim + '\'' + |
| | | ", itemDbl='" + itemDbl + '\'' + |
| | | ", itemCut='" + itemCut + '\'' + |
| | | ", itemInObj='" + itemInObj + '\'' + |
| | | ", itemAddFilter='" + itemAddFilter + '\'' + |
| | | ", itemOutType='" + itemOutType + '\'' + |
| | | ", itemPageSize='" + itemPageSize + '\'' + |
| | | ", itemImgWH='" + itemImgWH + '\'' + |
| | | ", itemOutFields='" + itemOutFields + '\'' + |
| | | ", itemKeyFields='" + itemKeyFields + '\'' + |
| | | ", itemBat='" + itemBat + '\'' + |
| | | ", itemFieldWidth='" + itemFieldWidth + '\'' + |
| | | ", itemTxf='" + itemTxf + '\'' + |
| | | ", itemName='" + itemName + '\'' + |
| | | ", itemType='" + itemType + '\'' + |
| | | ", itemTypeText='" + itemTypeText + '\'' + |
| | | ", itemValue='" + itemValue + '\'' + |
| | | ", itemCols='" + itemCols + '\'' + |
| | | ", itemRows='" + itemRows + '\'' + |
| | | ", itemStyle='" + itemStyle + '\'' + |
| | | ", itemScript='" + itemScript + '\'' + |
| | | ", itemTips='" + itemTips + '\'' + |
| | | ", itemValueList=" + itemValueList + |
| | | ", itemListTable='" + itemListTable + '\'' + |
| | | ", itemListTxt='" + itemListTxt + '\'' + |
| | | ", itemListVal='" + itemListVal + '\'' + |
| | | ", itemIsEditable='" + itemIsEditable + '\'' + |
| | | ", itemEditableProgram='" + itemEditableProgram + '\'' + |
| | | ", itemEditCondition='" + itemEditCondition + '\'' + |
| | | ", itemIsHidden='" + itemIsHidden + '\'' + |
| | | ", itemQtName='" + itemQtName + '\'' + |
| | | ", itemIsRequired='" + itemIsRequired + '\'' + |
| | | ", itemIsHttpSave='" + itemIsHttpSave + '\'' + |
| | | ", itemHttpVolumnPath='" + itemHttpVolumnPath + '\'' + |
| | | ", itemHttpPathField='" + itemHttpPathField + '\'' + |
| | | ", itemRight='" + itemRight + '\'' + |
| | | ", itemSeniorQueryCols='" + itemSeniorQueryCols + '\'' + |
| | | ", itemSeniorQueryColsCounts='" + itemSeniorQueryColsCounts + '\'' + |
| | | ", itemQuerySql='" + itemQuerySql + '\'' + |
| | | ", itemHrefFields='" + itemHrefFields + '\'' + |
| | | ", itemHrefConf='" + itemHrefConf + '\'' + |
| | | ", itemQueryRefFields='" + itemQueryRefFields + '\'' + |
| | | ", itemCustomClass='" + itemCustomClass + '\'' + |
| | | ", itemCtrlDisplyCol='" + itemCtrlDisplyCol + '\'' + |
| | | ", itemCtrlDisplyCondition='" + itemCtrlDisplyCondition + '\'' + |
| | | ", itemIsNavigatorExpand='" + itemIsNavigatorExpand + '\'' + |
| | | ", itemIsShowFolder='" + itemIsShowFolder + '\'' + |
| | | ", itemParentFolderName='" + itemParentFolderName + '\'' + |
| | | ", itemShowExpression='" + itemShowExpression + '\'' + |
| | | ", itemDateFormat='" + itemDateFormat + '\'' + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.model; |
| | | |
| | | import com.vci.starter.web.annotation.Transient; |
| | | import com.vci.starter.web.annotation.VciBtmType; |
| | | import com.vci.starter.web.constant.FrameWorkLcStatusConstant; |
| | | |
| | | /** |
| | | * ç¶ææ± |
| | | * @author weidy |
| | | * @date 2022-2-15 |
| | | */ |
| | | @VciBtmType(name = "status",text = "表å",tableName = "portal_vi",lifeCycle = FrameWorkLcStatusConstant.EMTYPE_LIFE_CYCLE) |
| | | @Transient |
| | | public class PortalVIDO implements java.io.Serializable { |
| | | |
| | | private static final long serialVersionUID = -8378041621144542492L; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | private String id; |
| | | /** |
| | | * 0: ä¸å¡ç±»å; 1: 龿¥ç±»å. é»è®¤0 |
| | | */ |
| | | private short typeFlag; |
| | | /** |
| | | * ç±»åå |
| | | */ |
| | | private String typeName; |
| | | /** |
| | | * è§å¾å |
| | | */ |
| | | private String viName; |
| | | /** |
| | | * è§å¾ç±»å: è¾å
¥è¡¨åæå页å表 |
| | | */ |
| | | private short viType; |
| | | /** |
| | | * å®ä¹è¯¦æ
|
| | | */ |
| | | private String prm; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public short getTypeFlag() { |
| | | return typeFlag; |
| | | } |
| | | |
| | | public void setTypeFlag(short typeFlag) { |
| | | this.typeFlag = typeFlag; |
| | | } |
| | | |
| | | public String getTypeName() { |
| | | return typeName; |
| | | } |
| | | |
| | | public void setTypeName(String typeName) { |
| | | this.typeName = typeName; |
| | | } |
| | | |
| | | public String getViName() { |
| | | return viName; |
| | | } |
| | | |
| | | public void setViName(String viName) { |
| | | this.viName = viName; |
| | | } |
| | | |
| | | public short getViType() { |
| | | return viType; |
| | | } |
| | | |
| | | public void setViType(short viType) { |
| | | this.viType = viType; |
| | | } |
| | | |
| | | public String getPrm() { |
| | | return prm; |
| | | } |
| | | |
| | | public void setPrm(String prm) { |
| | | this.prm = prm; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "PortalVIVO{" + |
| | | "id='" + id + '\'' + |
| | | ", typeFlag=" + typeFlag + |
| | | ", typeName='" + typeName + '\'' + |
| | | ", viName='" + viName + '\'' + |
| | | ", viType=" + viType + |
| | | ", prm='" + prm + '\'' + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | private String plsuffixb; |
| | | |
| | | /** |
| | | * åè½ç¼å· |
| | | * åè½ç¼å· TODO:20240822确认平å°å·²ç»å»æè¿ä¸ªå段äºï¼æä»¥è¡¨ä¸ä¹å æäºè¯¥å段并å°è¿å¿æ³¨éæäº |
| | | */ |
| | | private Integer plmoduleno; |
| | | //private Integer plmoduleno; |
| | | |
| | | /** |
| | | * æè¿° |
| | |
| | | this.plsuffixb = plsuffixb == null ? null : plsuffixb.trim(); |
| | | } |
| | | |
| | | public Integer getPlmoduleno() { |
| | | /*public Integer getPlmoduleno() { |
| | | return plmoduleno; |
| | | } |
| | | |
| | | public void setPlmoduleno(Integer plmoduleno) { |
| | | this.plmoduleno = plmoduleno; |
| | | } |
| | | }*/ |
| | | |
| | | public String getPldesc() { |
| | | return pldesc; |
| | |
| | | ", plsuffixc='" + plsuffixc + '\'' + |
| | | ", plresourceb='" + plresourceb + '\'' + |
| | | ", plsuffixb='" + plsuffixb + '\'' + |
| | | ", plmoduleno=" + plmoduleno + |
| | | //", plmoduleno=" + plmoduleno + |
| | | ", pldesc='" + pldesc + '\'' + |
| | | ", plisvalid=" + plisvalid + |
| | | ", plimage='" + plimage + '\'' + |
| | |
| | | package com.vci.pagemodel; |
| | | |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | |
| | | * |
| | | * @author Chill |
| | | */ |
| | | public class MenuVO { |
| | | public class MenuVO implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | |
| | | private String alias; |
| | | |
| | | /** |
| | | * 请æ±å°å |
| | | * 请æ±å°åï¼çé¢è·¯å¾ |
| | | */ |
| | | private String path; |
| | | |
| | | /** |
| | | * 客æ·ç«¯å°å |
| | | */ |
| | | private String pathC; |
| | | |
| | | /** |
| | | * resourceDotNet |
| | | */ |
| | | private String resourceDotNet; |
| | | |
| | | /** |
| | | * resourceDotMobile |
| | | */ |
| | | private String resourceMobile; |
| | | |
| | | /** |
| | | * èåèµæº |
| | |
| | | private String modeType; |
| | | |
| | | /** |
| | | * æ¯æ¨¡åä¸åå¯¹è±¡æ¯æ¨¡åè¿æ¯æä½ï¼0表示æ åèç¹ï¼1è¡¨ç¤ºæ¯æ¨¡åï¼2è¡¨ç¤ºæ¯æä½ |
| | | */ |
| | | private Integer childType; |
| | | |
| | | /** |
| | | * 1ææ0æ æï¼æ ææ¶ï¼å¨åè½æéçé¢ä¸æ¾ç¤º |
| | | */ |
| | | private Boolean isValid; |
| | | |
| | | /** |
| | | * å端æ¯å¦éè |
| | | */ |
| | | private HashMap<String,Boolean> meta = new HashMap<>(); |
| | | |
| | | public void setPathC(String pathC) { |
| | | this.pathC = pathC; |
| | | } |
| | | |
| | | public void setResourceDotNet(String resourceDotNet) { |
| | | this.resourceDotNet = resourceDotNet; |
| | | } |
| | | |
| | | public void setResourceMobile(String resourceMobile) { |
| | | this.resourceMobile = resourceMobile; |
| | | } |
| | | |
| | | public void setValid(Boolean valid) { |
| | | isValid = valid; |
| | | } |
| | | |
| | | public String getPathC() { |
| | | return pathC; |
| | | } |
| | | |
| | | public String getResourceDotNet() { |
| | | return resourceDotNet; |
| | | } |
| | | |
| | | public String getResourceMobile() { |
| | | return resourceMobile; |
| | | } |
| | | |
| | | public Boolean getValid() { |
| | | return isValid; |
| | | } |
| | | |
| | | public void setIsValid(Boolean isValid) { |
| | | this.isValid = isValid; |
| | | } |
| | | |
| | | public Boolean getIsValid() { |
| | | return isValid; |
| | | } |
| | | |
| | | public void setChildType(Integer childType) { |
| | | this.childType = childType; |
| | | } |
| | | |
| | | public Integer getChildType() { |
| | | return childType; |
| | | } |
| | | |
| | | public String getModeType() { |
| | | return modeType; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.pagemodel; |
| | | |
| | | import com.vci.bo.ItemSeniorQueryBO; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public class PRMItemVO implements java.io.Serializable { |
| | | private static final long serialVersionUID = 8300550928400559987L; |
| | | /** |
| | | * 使ç¨å段 |
| | | */ |
| | | private String itemField = ""; |
| | | //list |
| | | private String itemOR = ""; |
| | | private String itemEQ = ""; |
| | | private String itemTrim = ""; |
| | | /** |
| | | * å¿½ç¥ |
| | | */ |
| | | private String itemDbl = ""; |
| | | /** |
| | | * å符串æªå |
| | | */ |
| | | private String itemCut = ""; |
| | | /** |
| | | *ç»å®è¡¨å |
| | | */ |
| | | private String itemInObj = ""; |
| | | /** |
| | | * formï¼åæ®µè¡¨è¾¾å¼ tableï¼éå æ¥è¯¢æ¡ä»¶ |
| | | */ |
| | | private String itemAddFilter = ""; |
| | | /** |
| | | * |
| | | */ |
| | | private String itemOutType = ""; |
| | | /** |
| | | * table æ¯é¡µå¯æ¾ç¤ºè¡æ° |
| | | */ |
| | | private String itemPageSize = ""; |
| | | /** |
| | | * å¾ç宽é«ï¼0,0 |
| | | */ |
| | | private String itemImgWH = ""; |
| | | /** |
| | | * éè¦ä½¿ç¨çåæ®µ |
| | | */ |
| | | private String itemOutFields = ""; |
| | | /** |
| | | * å¾
éæ©ç屿§å段 |
| | | */ |
| | | private List<String> itemSelectoutFieldList=new ArrayList<>(); |
| | | |
| | | |
| | | /** |
| | | * éè¦ä½¿ç¨çéå |
| | | */ |
| | | private List<String> itemOutFieldList=new ArrayList<>(); |
| | | /** |
| | | * éè¦æç´¢çåæ®µ |
| | | */ |
| | | private String itemKeyFields = ""; |
| | | |
| | | |
| | | /** |
| | | *å¾
æç´¢å段 |
| | | */ |
| | | private List<String> itemSearchFieldList=new ArrayList<>(); |
| | | /** |
| | | * éè¦æç´¢çåæ®µ |
| | | */ |
| | | private List<String> itemKeyFieldList=new ArrayList<>(); |
| | | |
| | | private String itemBat = ""; |
| | | /** |
| | | * 宽度 |
| | | */ |
| | | private String itemFieldWidth = ""; |
| | | /** |
| | | * åæ¾ç¤ºå®½æ®µ itemOutFieldList ç¸å¹é
|
| | | */ |
| | | private List<KeyValue> itemFieldWidthList=new ArrayList<>(); |
| | | |
| | | //form |
| | | private String itemTxf = ""; |
| | | /** |
| | | * æ¾ç¤ºåç§° |
| | | */ |
| | | private String itemName = ""; |
| | | /** |
| | | * 屿§ç±»å |
| | | * text:åè¡ææ¬æ¡ |
| | | * textbtn:ææ¬æé®æ¡: |
| | | * textarea:å¤è¡ææ¬æ¡: |
| | | * richtext:å¯ææ¬æ¡: |
| | | * number:æ°åè¾å
¥æ¡: |
| | | * password:å¯ç æ¡: |
| | | * radio:åéæé®: |
| | | * checkbox:å¤éæé®: |
| | | * select:䏿èå: |
| | | * multiselect:å¤é䏿èå: |
| | | * date:æ¥æè¾å
¥æ¡: |
| | | * time:æ¶é´è¾å
¥æ¡: |
| | | * datetime:æ¥ææ¶é´è¾å
¥æ¡: |
| | | * file:æä»¶ä¸ä¼ : |
| | | * multiFile:夿件ä¸ä¼ : |
| | | * custom:èªå®ä¹: |
| | | * customform:èªå®ä¹è¡¨å: |
| | | * hidden:éèææ®éæå: |
| | | * webeditor:Webç¼è¾å¨: |
| | | * specialCharacter:ç¹æ®å符: |
| | | */ |
| | | private String itemType = ""; |
| | | /** |
| | | * 屿§ç±»åæ¾ç¤ºå¼ |
| | | */ |
| | | private String itemTypeText = ""; |
| | | /** |
| | | * é»è®¤å¼ |
| | | */ |
| | | private String itemValue = ""; |
| | | /** |
| | | *å 使¹å¼ 1:æ¾ç¤ºï¼2:䏿¾ç¤º |
| | | */ |
| | | private String itemCols = ""; |
| | | /** |
| | | * |
| | | */ |
| | | private String itemRows = ""; |
| | | /** |
| | | * éå 屿§ï¼æ ·å¼ï¼ |
| | | */ |
| | | private String itemStyle = ""; |
| | | /** |
| | | *èæ¬éªè¯ |
| | | */ |
| | | private String itemScript = ""; |
| | | /** |
| | | * æç¤ºæå |
| | | */ |
| | | private String itemTips = ""; |
| | | /** |
| | | * æä¸¾å¼ |
| | | */ |
| | | private List<String> itemValueList = null; |
| | | |
| | | |
| | | /** |
| | | *ä¸çº§åç
§ |
| | | */ |
| | | private String itemListTable = ""; |
| | | /** |
| | | *äºçº§åç
§ |
| | | */ |
| | | private String itemListTxt = ""; |
| | | /** |
| | | *åç
§å¼ |
| | | */ |
| | | private String itemListVal = ""; |
| | | /** |
| | | * æ¯å¦å¯ä»¥ç¼è¾0:ç¼è¾ï¼1ï¼åªè¯» |
| | | */ |
| | | private String itemIsEditable = ""; |
| | | /** |
| | | * åªè¯»éæ©æ¡ä»¶ |
| | | */ |
| | | private String itemEditableProgram = ""; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String itemEditCondition = ""; |
| | | /** |
| | | * æ¯å¦æ¾ç¤ºå段 0ï¼ä¸æ¾ç¤ºï¼1ï¼æ¾ç¤º |
| | | */ |
| | | private String itemIsHidden = ""; |
| | | /** |
| | | * æ¥è¯¢æ¨¡æ¿åç§° |
| | | */ |
| | | private String itemQtName = ""; |
| | | /** |
| | | * æ¯å¦å¿
å¡« 0:å¦ï¼1ï¼æ¯ |
| | | */ |
| | | private String itemIsRequired = ""; |
| | | /** |
| | | *httpåå¨å¼å
³ 0ï¼å¦ï¼1ï¼æ¯ |
| | | */ |
| | | private String itemIsHttpSave = ""; |
| | | /** |
| | | * åå¨è·¯å¾ |
| | | */ |
| | | private String itemHttpVolumnPath = ""; |
| | | /** |
| | | * åå¨è·¯å¾å段 |
| | | */ |
| | | private String itemHttpPathField = ""; |
| | | /** |
| | | * æéæ§å¶ |
| | | */ |
| | | private String itemRight = ""; |
| | | /** |
| | | * é«çº§æ¥è¯¢å |
| | | */ |
| | | private String itemSeniorQueryCols = ""; |
| | | /** |
| | | * é«çº§æ¥è¯¢ååä½¿ç¨æ¬¡æ° |
| | | */ |
| | | private String itemSeniorQueryColsCounts = ""; |
| | | |
| | | /** |
| | | *é«çº§æ¥è¯¢sql |
| | | */ |
| | | private String itemQuerySql = ""; |
| | | /*** |
| | | * é«çº§æ¥è¯¢å¯¹è±¡ |
| | | */ |
| | | private List<ItemSeniorQueryBO> itemSeniorQueryBOS=new ArrayList<>(); |
| | | |
| | | /** |
| | | * è¶
龿¥å段 |
| | | */ |
| | | private String itemHrefFields = ""; |
| | | /** |
| | | * è¶
龿¥é
ç½® |
| | | */ |
| | | private String itemHrefConf = ""; |
| | | /** |
| | | * æ¥è¯¢å
³èå |
| | | */ |
| | | private String itemQueryRefFields = ""; |
| | | /*** |
| | | * èªå®ä¹ç±»è·¯å¾ |
| | | */ |
| | | private String itemCustomClass = ""; |
| | | /** |
| | | * æ§å¶æ¾ç¤ºå |
| | | */ |
| | | private String itemCtrlDisplyCol = ""; |
| | | /** |
| | | * æ§å¶æ¾ç¤ºæ¡ä»¶ |
| | | */ |
| | | private String itemCtrlDisplyCondition = ""; |
| | | /** |
| | | * æ¥è¯¢åºåæ¾ç¤ºæ§å¶ trueï¼æ¾ç¤ºï¼false 䏿¾ç¤º |
| | | */ |
| | | private String itemIsNavigatorExpand = ""; |
| | | /** |
| | | * æ¯å¦æ¾ç¤ºæä»¶å¤¹ trueï¼æ¾ç¤ºï¼false 䏿¾ç¤º |
| | | */ |
| | | private String itemIsShowFolder = ""; |
| | | /** |
| | | * ç¶æä»¶å¤¹åç§° |
| | | */ |
| | | private String itemParentFolderName = ""; |
| | | /** |
| | | * æ¾ç¤ºè¡¨è¾¾å¼ ${aa}-${bb} |
| | | */ |
| | | private String itemShowExpression = ""; |
| | | /** |
| | | * æ°æ®ä¸ºæ¥æç±»åæ¶çæ ¼å¼åå符串 å¦ yyyy-MM-dd HH:mm:ss |
| | | */ |
| | | private String itemDateFormat = ""; |
| | | |
| | | public String getItemRight() { |
| | | return itemRight; |
| | | } |
| | | public void setItemRight(String itemRight) { |
| | | this.itemRight = itemRight; |
| | | } |
| | | public String getItemQuerySql() { |
| | | return itemQuerySql; |
| | | } |
| | | public void setItemQuerySql(String itemQuerySql) { |
| | | this.itemQuerySql = itemQuerySql; |
| | | } |
| | | public String getItemFieldWidth() { |
| | | return itemFieldWidth; |
| | | } |
| | | public void setItemFieldWidth(String itemFieldWidth) { |
| | | this.itemFieldWidth = itemFieldWidth; |
| | | } |
| | | public String getItemParentFolderName() { |
| | | return itemParentFolderName; |
| | | } |
| | | public void setItemParentFolderName(String itemParentFolderName) { |
| | | this.itemParentFolderName = itemParentFolderName; |
| | | } |
| | | public String getItemIsShowFolder() { |
| | | return itemIsShowFolder; |
| | | } |
| | | public void setItemIsShowFolder(String itemIsShowFolder) { |
| | | this.itemIsShowFolder = itemIsShowFolder; |
| | | } |
| | | public String getItemIsNavigatorExpand() { |
| | | return itemIsNavigatorExpand; |
| | | } |
| | | public void setItemIsNavigatorExpand(String itemIsNavigatorExpand) { |
| | | this.itemIsNavigatorExpand = itemIsNavigatorExpand; |
| | | } |
| | | public String getItemField() { |
| | | return itemField; |
| | | } |
| | | public void setItemField(String itemField) { |
| | | this.itemField = itemField; |
| | | } |
| | | public String getItemOR() { |
| | | return itemOR; |
| | | } |
| | | public void setItemOR(String itemOR) { |
| | | this.itemOR = itemOR; |
| | | } |
| | | public String getItemEQ() { |
| | | return itemEQ; |
| | | } |
| | | public void setItemEQ(String itemEQ) { |
| | | this.itemEQ = itemEQ; |
| | | } |
| | | public String getItemTrim() { |
| | | return itemTrim; |
| | | } |
| | | public void setItemTrim(String itemTrim) { |
| | | this.itemTrim = itemTrim; |
| | | } |
| | | public String getItemDbl() { |
| | | return itemDbl; |
| | | } |
| | | public void setItemDbl(String itemDbl) { |
| | | this.itemDbl = itemDbl; |
| | | } |
| | | public String getItemCut() { |
| | | return itemCut; |
| | | } |
| | | public void setItemCut(String itemCut) { |
| | | this.itemCut = itemCut; |
| | | } |
| | | public String getItemInObj() { |
| | | return itemInObj; |
| | | } |
| | | public void setItemInObj(String itemInObj) { |
| | | this.itemInObj = itemInObj; |
| | | } |
| | | public String getItemOutType() { |
| | | return itemOutType; |
| | | } |
| | | public void setItemOutType(String itemOutType) { |
| | | this.itemOutType = itemOutType; |
| | | } |
| | | public String getItemPageSize() { |
| | | return itemPageSize; |
| | | } |
| | | public void setItemPageSize(String itemPageSize) { |
| | | this.itemPageSize = itemPageSize; |
| | | } |
| | | public String getItemImgWH() { |
| | | return itemImgWH; |
| | | } |
| | | public void setItemImgWH(String itemImgWH) { |
| | | this.itemImgWH = itemImgWH; |
| | | } |
| | | public String getItemOutFields() { |
| | | return itemOutFields; |
| | | } |
| | | public void setItemOutFields(String itemOutFields) { |
| | | this.itemOutFields = itemOutFields; |
| | | } |
| | | public String getItemKeyFields() { |
| | | return itemKeyFields; |
| | | } |
| | | public void setItemKeyFields(String itemKeyFields) { |
| | | this.itemKeyFields = itemKeyFields; |
| | | } |
| | | public String getItemBat() { |
| | | return itemBat; |
| | | } |
| | | public void setItemBat(String itemBat) { |
| | | this.itemBat = itemBat; |
| | | } |
| | | public String getItemTxf() { |
| | | return itemTxf; |
| | | } |
| | | public void setItemTxf(String itemTxf) { |
| | | this.itemTxf = itemTxf; |
| | | } |
| | | public String getItemName() { |
| | | return itemName; |
| | | } |
| | | public void setItemName(String itemName) { |
| | | this.itemName = itemName; |
| | | } |
| | | public String getItemType() { |
| | | return itemType; |
| | | } |
| | | public void setItemType(String itemType) { |
| | | this.itemType = itemType; |
| | | } |
| | | public String getItemValue() { |
| | | return itemValue; |
| | | } |
| | | public void setItemValue(String itemValue) { |
| | | this.itemValue = itemValue; |
| | | } |
| | | public String getItemCols() { |
| | | return itemCols; |
| | | } |
| | | public void setItemCols(String itemCols) { |
| | | this.itemCols = itemCols; |
| | | } |
| | | public String getItemRows() { |
| | | return itemRows; |
| | | } |
| | | public void setItemRows(String itemRows) { |
| | | this.itemRows = itemRows; |
| | | } |
| | | public List<String> getItemValueList() { |
| | | return itemValueList; |
| | | } |
| | | public void setItemValueList(List<String> itemValueList) { |
| | | this.itemValueList = itemValueList; |
| | | } |
| | | public String getItemListTable() { |
| | | return itemListTable; |
| | | } |
| | | public void setItemListTable(String itemListTable) { |
| | | this.itemListTable = itemListTable; |
| | | } |
| | | |
| | | public String getItemListTxt() { |
| | | return itemListTxt; |
| | | } |
| | | public void setItemListTxt(String itemListTxt) { |
| | | this.itemListTxt = itemListTxt; |
| | | } |
| | | public String getItemListVal() { |
| | | return itemListVal; |
| | | } |
| | | public void setItemListVal(String itemListVal) { |
| | | this.itemListVal = itemListVal; |
| | | } |
| | | public String getItemAddFilter() { |
| | | return itemAddFilter; |
| | | } |
| | | public void setItemAddFilter(String itemAddFilter) { |
| | | this.itemAddFilter = itemAddFilter; |
| | | } |
| | | public String getItemStyle() { |
| | | return itemStyle; |
| | | } |
| | | public void setItemStyle(String itemStyle) { |
| | | this.itemStyle = itemStyle; |
| | | } |
| | | public String getItemScript() { |
| | | return itemScript; |
| | | } |
| | | public void setItemScript(String itemScript) { |
| | | this.itemScript = itemScript; |
| | | } |
| | | public String getItemTips() { |
| | | return itemTips; |
| | | } |
| | | public void setItemTips(String itemTips) { |
| | | this.itemTips = itemTips; |
| | | } |
| | | public String getItemIsEditable() { |
| | | return itemIsEditable; |
| | | } |
| | | public void setItemIsEditable(String itemIsEditable) { |
| | | this.itemIsEditable = itemIsEditable; |
| | | } |
| | | public String getItemIsHidden() { |
| | | return itemIsHidden; |
| | | } |
| | | public void setItemIsHidden(String itemIsHidden) { |
| | | this.itemIsHidden = itemIsHidden; |
| | | } |
| | | public String getItemQtName() { |
| | | return itemQtName; |
| | | } |
| | | public void setItemQtName(String itemQtName) { |
| | | this.itemQtName = itemQtName; |
| | | } |
| | | public String getItemIsRequired() { |
| | | return itemIsRequired; |
| | | } |
| | | public void setItemIsRequired(String itemIsRequired) { |
| | | this.itemIsRequired = itemIsRequired; |
| | | } |
| | | public String getItemSeniorQueryCols() { |
| | | return itemSeniorQueryCols; |
| | | } |
| | | public void setItemSeniorQueryCols(String itemSeniorQueryCols) { |
| | | this.itemSeniorQueryCols = itemSeniorQueryCols; |
| | | } |
| | | public String getItemSeniorQueryColsCounts() { |
| | | return itemSeniorQueryColsCounts; |
| | | } |
| | | public void setItemSeniorQueryColsCounts(String itemSeniorQueryColsCounts) { |
| | | this.itemSeniorQueryColsCounts = itemSeniorQueryColsCounts; |
| | | } |
| | | public String getItemHrefFields() { |
| | | return itemHrefFields; |
| | | } |
| | | public void setItemHrefFields(String itemHrefFields) { |
| | | this.itemHrefFields = itemHrefFields; |
| | | } |
| | | public String getItemHrefConf() { |
| | | return itemHrefConf; |
| | | } |
| | | public void setItemHrefConf(String itemHrefConf) { |
| | | this.itemHrefConf = itemHrefConf; |
| | | } |
| | | public String getItemQueryRefFields() { |
| | | return itemQueryRefFields; |
| | | } |
| | | public void setItemQueryRefFields(String itemQueryRefFields) { |
| | | this.itemQueryRefFields = itemQueryRefFields; |
| | | } |
| | | public String getItemCustomClass() { |
| | | return itemCustomClass; |
| | | } |
| | | public void setItemCustomClass(String itemCustomClass) { |
| | | this.itemCustomClass = itemCustomClass; |
| | | } |
| | | public String getItemCtrlDisplyCol() { |
| | | return itemCtrlDisplyCol; |
| | | } |
| | | public void setItemCtrlDisplyCol(String itemCtrlDisplyCol) { |
| | | this.itemCtrlDisplyCol = itemCtrlDisplyCol; |
| | | } |
| | | public String getItemCtrlDisplyCondition() { |
| | | return itemCtrlDisplyCondition; |
| | | } |
| | | public void setItemCtrlDisplyCondition(String itemCtrlDisplyCondition) { |
| | | this.itemCtrlDisplyCondition = itemCtrlDisplyCondition; |
| | | } |
| | | public String getItemIsHttpSave() { |
| | | return itemIsHttpSave; |
| | | } |
| | | public void setItemIsHttpSave(String itemIsHttpSave) { |
| | | this.itemIsHttpSave = itemIsHttpSave; |
| | | } |
| | | public String getItemHttpVolumnPath() { |
| | | return itemHttpVolumnPath; |
| | | } |
| | | public void setItemHttpVolumnPath(String itemHttpVolumnPath) { |
| | | this.itemHttpVolumnPath = itemHttpVolumnPath; |
| | | } |
| | | public String getItemHttpPathField() { |
| | | return itemHttpPathField; |
| | | } |
| | | public void setItemHttpPathField(String itemHttpPathField) { |
| | | this.itemHttpPathField = itemHttpPathField; |
| | | } |
| | | public String getItemEditCondition() { |
| | | return itemEditCondition; |
| | | } |
| | | public void setItemEditCondition(String itemEditCondition) { |
| | | this.itemEditCondition = itemEditCondition; |
| | | } |
| | | public String getItemEditableProgram() { |
| | | return itemEditableProgram; |
| | | } |
| | | public void setItemEditableProgram(String itemEditableProgram) { |
| | | this.itemEditableProgram = itemEditableProgram; |
| | | } |
| | | |
| | | public String getItemShowExpression() { |
| | | return itemShowExpression; |
| | | } |
| | | public void setItemShowExpression(String itemShowExpression) { |
| | | this.itemShowExpression = itemShowExpression; |
| | | } |
| | | public String getItemDateFormat() { |
| | | return itemDateFormat; |
| | | } |
| | | public void setItemDateFormat(String itemDateFormat) { |
| | | this.itemDateFormat = itemDateFormat; |
| | | } |
| | | |
| | | public List<String> getItemOutFieldList() { |
| | | return itemOutFieldList; |
| | | } |
| | | |
| | | public void setItemOutFieldList(List<String> itemOutFieldList) { |
| | | this.itemOutFieldList = itemOutFieldList; |
| | | } |
| | | |
| | | public List<String> getItemKeyFieldList() { |
| | | return itemKeyFieldList; |
| | | } |
| | | |
| | | public void setItemKeyFieldList(List<String> itemKeyFieldList) { |
| | | this.itemKeyFieldList = itemKeyFieldList; |
| | | } |
| | | |
| | | public List<KeyValue> getItemFieldWidthList() { |
| | | return itemFieldWidthList; |
| | | } |
| | | |
| | | public void setItemFieldWidthList(List<KeyValue> itemFieldWidthList) { |
| | | this.itemFieldWidthList = itemFieldWidthList; |
| | | } |
| | | |
| | | public String getItemTypeText() { |
| | | return itemTypeText; |
| | | } |
| | | |
| | | public void setItemTypeText(String itemTypeText) { |
| | | this.itemTypeText = itemTypeText; |
| | | } |
| | | |
| | | public List<ItemSeniorQueryBO> getItemSeniorQueryBOS() { |
| | | return itemSeniorQueryBOS; |
| | | } |
| | | |
| | | public void setItemSeniorQueryBOS(List<ItemSeniorQueryBO> itemSeniorQueryBOS) { |
| | | this.itemSeniorQueryBOS = itemSeniorQueryBOS; |
| | | } |
| | | |
| | | public List<String> getItemSelectoutFieldList() { |
| | | return itemSelectoutFieldList; |
| | | } |
| | | |
| | | public void setItemSelectoutFieldList(List<String> itemSelectoutFieldList) { |
| | | this.itemSelectoutFieldList = itemSelectoutFieldList; |
| | | } |
| | | |
| | | public List<String> getItemSearchFieldList() { |
| | | return itemSearchFieldList; |
| | | } |
| | | |
| | | public void setItemSearchFieldList(List<String> itemSearchFieldList) { |
| | | this.itemSearchFieldList = itemSearchFieldList; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "PRMItemVO{" + |
| | | "itemField='" + itemField + '\'' + |
| | | ", itemOR='" + itemOR + '\'' + |
| | | ", itemEQ='" + itemEQ + '\'' + |
| | | ", itemTrim='" + itemTrim + '\'' + |
| | | ", itemDbl='" + itemDbl + '\'' + |
| | | ", itemCut='" + itemCut + '\'' + |
| | | ", itemInObj='" + itemInObj + '\'' + |
| | | ", itemAddFilter='" + itemAddFilter + '\'' + |
| | | ", itemOutType='" + itemOutType + '\'' + |
| | | ", itemPageSize='" + itemPageSize + '\'' + |
| | | ", itemImgWH='" + itemImgWH + '\'' + |
| | | ", itemOutFields='" + itemOutFields + '\'' + |
| | | ", itemSelectoutFieldList=" + itemSelectoutFieldList + |
| | | ", itemOutFieldList=" + itemOutFieldList + |
| | | ", itemKeyFields='" + itemKeyFields + '\'' + |
| | | ", itemSearchFieldList=" + itemSearchFieldList + |
| | | ", itemKeyFieldList=" + itemKeyFieldList + |
| | | ", itemBat='" + itemBat + '\'' + |
| | | ", itemFieldWidth='" + itemFieldWidth + '\'' + |
| | | ", itemFieldWidthList=" + itemFieldWidthList + |
| | | ", itemTxf='" + itemTxf + '\'' + |
| | | ", itemName='" + itemName + '\'' + |
| | | ", itemType='" + itemType + '\'' + |
| | | ", itemTypeText='" + itemTypeText + '\'' + |
| | | ", itemValue='" + itemValue + '\'' + |
| | | ", itemCols='" + itemCols + '\'' + |
| | | ", itemRows='" + itemRows + '\'' + |
| | | ", itemStyle='" + itemStyle + '\'' + |
| | | ", itemScript='" + itemScript + '\'' + |
| | | ", itemTips='" + itemTips + '\'' + |
| | | ", itemValueList=" + itemValueList + |
| | | ", itemListTable='" + itemListTable + '\'' + |
| | | ", itemListTxt='" + itemListTxt + '\'' + |
| | | ", itemListVal='" + itemListVal + '\'' + |
| | | ", itemIsEditable='" + itemIsEditable + '\'' + |
| | | ", itemEditableProgram='" + itemEditableProgram + '\'' + |
| | | ", itemEditCondition='" + itemEditCondition + '\'' + |
| | | ", itemIsHidden='" + itemIsHidden + '\'' + |
| | | ", itemQtName='" + itemQtName + '\'' + |
| | | ", itemIsRequired='" + itemIsRequired + '\'' + |
| | | ", itemIsHttpSave='" + itemIsHttpSave + '\'' + |
| | | ", itemHttpVolumnPath='" + itemHttpVolumnPath + '\'' + |
| | | ", itemHttpPathField='" + itemHttpPathField + '\'' + |
| | | ", itemRight='" + itemRight + '\'' + |
| | | ", itemSeniorQueryCols='" + itemSeniorQueryCols + '\'' + |
| | | ", itemSeniorQueryColsCounts='" + itemSeniorQueryColsCounts + '\'' + |
| | | ", itemQuerySql='" + itemQuerySql + '\'' + |
| | | ", itemSeniorQueryBOS=" + itemSeniorQueryBOS + |
| | | ", itemHrefFields='" + itemHrefFields + '\'' + |
| | | ", itemHrefConf='" + itemHrefConf + '\'' + |
| | | ", itemQueryRefFields='" + itemQueryRefFields + '\'' + |
| | | ", itemCustomClass='" + itemCustomClass + '\'' + |
| | | ", itemCtrlDisplyCol='" + itemCtrlDisplyCol + '\'' + |
| | | ", itemCtrlDisplyCondition='" + itemCtrlDisplyCondition + '\'' + |
| | | ", itemIsNavigatorExpand='" + itemIsNavigatorExpand + '\'' + |
| | | ", itemIsShowFolder='" + itemIsShowFolder + '\'' + |
| | | ", itemParentFolderName='" + itemParentFolderName + '\'' + |
| | | ", itemShowExpression='" + itemShowExpression + '\'' + |
| | | ", itemDateFormat='" + itemDateFormat + '\'' + |
| | | '}'; |
| | | } |
| | | // /** |
| | | // * é«çº§æ¥è¯¢åä¸ä½¿ç¨æ¬¡æ° |
| | | // */ |
| | | // public Map<String, Integer> getColAndUseCountMap() { |
| | | // if(this.itemSeniorQueryCols == null || this.itemSeniorQueryColsCounts == null |
| | | // || this.itemSeniorQueryCols.equals("") || this.itemSeniorQueryColsCounts.equals("")){ |
| | | // return null; |
| | | // } |
| | | // Map<String, Integer> map = new LinkedHashMap<String, Integer>(); |
| | | // String[] cols = this.itemSeniorQueryCols.split(","); |
| | | // String[] counts = this.itemSeniorQueryColsCounts.split(","); |
| | | // for(int i = 0; i < cols.length; i++){ |
| | | // int count = Integer.valueOf(counts[i]); |
| | | // map.put(cols[i], count); |
| | | // } |
| | | // return map; |
| | | // } |
| | | // |
| | | // /** |
| | | // * é«çº§æ¥è¯¢èªå®ä¹å䏿¥è¯¢sql |
| | | // */ |
| | | // public Map<String, String> getCustomerColAndSql() { |
| | | // if(this.itemSeniorQueryCols == null || this.itemQuerySql == null |
| | | // || this.itemSeniorQueryCols.equals("") || this.itemQuerySql.equals("")){ |
| | | // return null; |
| | | // } |
| | | // Map<String, String> map = new LinkedHashMap<String, String>(); |
| | | // String[] cols = this.itemSeniorQueryCols.split(","); |
| | | // String[] sqls = this.itemQuerySql.split(";"); |
| | | // for(int i = 0; i < cols.length; i++){ |
| | | // String sql = sqls[i]; |
| | | // if(sql != null && !sql.equalsIgnoreCase("NULL")){ |
| | | // map.put(cols[i], sql); |
| | | // } |
| | | // } |
| | | // return map; |
| | | // } |
| | | // |
| | | // /** |
| | | // * è¿å PRMItem 对象æ¯å¦æ¾ç¤º |
| | | // * @return 对象æ¯å¦æ¾ç¤º (对åºè¡¨å屿§å®ä¹çå 使¹å¼çæ¾ç¤ºã䏿¾ç¤ºï¼<p>true:æ¾ç¤º false:䏿¾ç¤º</p> |
| | | // */ |
| | | // public boolean isShow(){ |
| | | // return ("1".equalsIgnoreCase(this.getItemCols().trim())); |
| | | // } |
| | | // /** |
| | | // * è¿å PRMItem 对象æ¯å¦æ¯å¿
填项 |
| | | // * @return 对象æ¯å¦æ¯å¿
å¡«<p>true:æ¾å¿
填项 false:䏿¯å¿
填项</p> |
| | | // */ |
| | | // public boolean isRequired(){ |
| | | // return ("1".equalsIgnoreCase(this.getItemIsRequired().trim())); |
| | | // } |
| | | // /** |
| | | // * è¿å PRMItem 对象 æ¯å¦å¯ä»¥ç¼è¾ |
| | | // * @return 对象æ¯å¦å¯ç¼è¾ <p>true: å¯ç¼è¾(éåªè¯») false: ä¸å¯ç¼è¾(åªè¯»)</p> |
| | | // */ |
| | | // public boolean isEditable(){ |
| | | // return ("0".equalsIgnoreCase(this.getItemIsEditable().trim())); |
| | | // } |
| | | // /** |
| | | // * è¿å PRMItem 对象 æ¯å¦å¯æ¯åªè¯» |
| | | // * @return 对象æ¯å¦å¯ç¼è¾ <p>true: åªè¯»(ä¸å¯ç¼è¾) false: éåªè¯»(å¯ç¼è¾)</p> |
| | | // */ |
| | | // public boolean isReadonly(){ |
| | | // return !(isEditable()); |
| | | // } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.pagemodel; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class PRMVO implements java.io.Serializable { |
| | | |
| | | private static final long serialVersionUID = -7009693016048007945L; |
| | | private String showCols = "3"; |
| | | private String formQtName = ""; |
| | | private List<PRMItemVO> prmItemList; |
| | | |
| | | public String getShowCols() { |
| | | return showCols; |
| | | } |
| | | |
| | | public void setShowCols(String showCols) { |
| | | this.showCols = showCols; |
| | | } |
| | | |
| | | public String getFormQtName() { |
| | | return formQtName; |
| | | } |
| | | |
| | | public void setFormQtName(String formQtName) { |
| | | this.formQtName = formQtName; |
| | | } |
| | | |
| | | public List<PRMItemVO> getPrmItemList() { |
| | | return prmItemList; |
| | | } |
| | | |
| | | public void setPrmItemList(List<PRMItemVO> prmItemList) { |
| | | this.prmItemList = prmItemList; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "PRMVO{" + |
| | | "showCols='" + showCols + '\'' + |
| | | ", formQtName='" + formQtName + '\'' + |
| | | ", prmItemList=" + prmItemList + |
| | | '}'; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.pagemodel; |
| | | |
| | | /** |
| | | * |
| | | * è¡¨åæ¾ç¤ºå¯¹è±¡ |
| | | * @author xiej |
| | | * @date 2024/08/14 6:04 PM |
| | | */ |
| | | public class PortalVIVO implements java.io.Serializable{ |
| | | |
| | | private static final long serialVersionUID = 8929303078545288873L; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | private String id; |
| | | /** |
| | | * 0: ä¸å¡ç±»å; 1: 龿¥ç±»å. é»è®¤0 |
| | | */ |
| | | private short typeFlag; |
| | | /** |
| | | * ç±»åå |
| | | */ |
| | | private String typeName; |
| | | /** |
| | | * è§å¾å |
| | | */ |
| | | private String viName; |
| | | /** |
| | | * è§å¾ç±»å: è¾å
¥è¡¨åæå页å表 |
| | | */ |
| | | private short viType; |
| | | /** |
| | | * å®ä¹è¯¦æ
|
| | | */ |
| | | private PRMVO prm; |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public short getTypeFlag() { |
| | | return typeFlag; |
| | | } |
| | | |
| | | public void setTypeFlag(short typeFlag) { |
| | | this.typeFlag = typeFlag; |
| | | } |
| | | |
| | | public String getTypeName() { |
| | | return typeName; |
| | | } |
| | | |
| | | public void setTypeName(String typeName) { |
| | | this.typeName = typeName; |
| | | } |
| | | |
| | | public String getViName() { |
| | | return viName; |
| | | } |
| | | |
| | | public void setViName(String viName) { |
| | | this.viName = viName; |
| | | } |
| | | |
| | | public short getViType() { |
| | | return viType; |
| | | } |
| | | |
| | | public void setViType(short viType) { |
| | | this.viType = viType; |
| | | } |
| | | |
| | | public PRMVO getPrm() { |
| | | return prm; |
| | | } |
| | | |
| | | public void setPrm(PRMVO prm) { |
| | | this.prm = prm; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "PortalVIVO{" + |
| | | "id='" + id + '\'' + |
| | | ", typeFlag=" + typeFlag + |
| | | ", typeName='" + typeName + '\'' + |
| | | ", viName='" + viName + '\'' + |
| | | ", viType=" + viType + |
| | | ", prm=" + prm + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * å»é¤æåé¢çspiltFilterï¼å»é¤åé¢çspiltFilter |
| | | * @param s å符串 |
| | | * @param spiltFilter,åé符 |
| | | * @return å»é¤æ«å°¾éå· |
| | | */ |
| | | public static String removeComma(String s,String spiltFilter){ |
| | | if(s == null || s.trim().length() == 0) { |
| | | return s; |
| | | } |
| | | else{ |
| | | if(s.startsWith(spiltFilter)) { |
| | | s = s.substring(spiltFilter.length(), s.length()); |
| | | } |
| | | if(s.endsWith(spiltFilter)) { |
| | | s = s.substring(0, s.length() - spiltFilter.length()); |
| | | } |
| | | return s; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 为sqlä¸ä½¿ç¨inæ¶ï¼æä¾è½¬æ¢ï¼æ³¨æinéçå¼ä¸è½è¶
è¿1000 |
| | | * @param s å符串 |
| | | * @return è¿åsqlè¯å¥ |
| | |
| | | charMap.put(String.valueOf(c), (!charMap.containsKey(String.valueOf(c))? 1 : charMap.get(String.valueOf(c)) + 1)); |
| | | } |
| | | return charMap.get(String.valueOf(findC)); |
| | | } |
| | | |
| | | /** |
| | | * 带éå·çå符串转为list |
| | | * @param s å符串 |
| | | * @return å符串å表 |
| | | */ |
| | | public static List<String> str2List(String s,String spilter){ |
| | | if (isNull(s)) { |
| | | return null; |
| | | } else { |
| | | List<String> l = new ArrayList<String>(); |
| | | Collections.addAll(l,removeComma(s,spilter).split(spilter)); |
| | | return l; |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ°ç»è½¬æ¢ä¸ºString |
| | | * @param array æ°ç»å¯¹è±¡ |
| | | * @param spiltFiter åé符 |
| | | * @return éå·é¾æ¥çå符串 |
| | | */ |
| | | public static String array2String(String[] array,String spiltFiter) { |
| | | if(null == array || array.length == 0) { |
| | | return ""; |
| | | } else{ |
| | | String ss = ""; |
| | | for(String s : array){ |
| | | ss += s + spiltFiter; |
| | | //1.8å¯ä»¥ |
| | | } |
| | | return removeComma(ss,spiltFiter); |
| | | } |
| | | } |
| | | /** |
| | | * æ°ç»è½¬æ¢ä¸ºString |
| | | * @param array æ°ç»å¯¹è±¡ |
| | |
| | | /** |
| | | * éè¿æ¨¡åIDè·åå级å表 |
| | | * @param parentId |
| | | * @param modeType 模åç±»å |
| | | * @param isAll æ¯å¦å
æ¬æ æç模åï¼trueåå
æ¬ |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | List<MenuVO> getSysModelTreeMenuByPID(String parentId,boolean isAll) throws VciBaseException; |
| | | List<MenuVO> getSysModelTreeMenuByPID(String parentId,String modeType,boolean isAll) throws VciBaseException; |
| | | |
| | | int checkChildObject(String moduleId) throws VciException; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.frameworkcore.compatibility; |
| | | |
| | | import com.vci.common.exception.VciException; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.pagemodel.MenuVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é¦é¡µç³»ç»æ¨¡åé
ç½®æ·»å æé®ãæ·»å æä½ç±»åçæ¥å£æå¡ |
| | | * @author ludc |
| | | * @date 2024/8/19 12:42 |
| | | */ |
| | | public interface SmHMSysModConfigServiceI { |
| | | |
| | | /** |
| | | * æ·»å æ¨¡å |
| | | * @param menuVO |
| | | * @return |
| | | */ |
| | | MenuVO addModule(MenuVO menuVO) throws VciBaseException; |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¨¡å |
| | | * @param menuVO |
| | | * @return |
| | | */ |
| | | MenuVO updateModule(MenuVO menuVO) throws VciBaseException; |
| | | |
| | | /** |
| | | * å 餿¨¡å |
| | | * @param menuVO |
| | | * @return |
| | | */ |
| | | boolean delModule(MenuVO menuVO); |
| | | |
| | | /** |
| | | * å¢å æä½ç±»å |
| | | * @return |
| | | */ |
| | | boolean addOperationType(List<MenuVO> menuVOList); |
| | | |
| | | /** |
| | | * å é¤éç³»ç»æ¨¡å |
| | | * @return |
| | | */ |
| | | boolean delNonsysModule(); |
| | | |
| | | /** |
| | | * å é¤ä¸å¡æ¨¡å |
| | | * @return |
| | | */ |
| | | boolean delBusinessModule(); |
| | | |
| | | /** |
| | | * 导åºç®¡çåè½æ¨¡åææä½ç±»åç®¡çæ¨¡åsql |
| | | * @param exportPath 导åºè·¯å¾ |
| | | * @param isFunction æ¯å¦æ¯å¯¼åºç®¡çåè½æ¨¡åsql |
| | | * @return |
| | | * @throws PLException |
| | | */ |
| | | File exportFunctionSql(HttpServletResponse response,String exportPath,boolean isFunction/*æ¯å¦æ¯å¯¼åºç®¡çåè½æ¨¡åsql*/) throws PLException; |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @return |
| | | */ |
| | | String exportModule(HttpServletResponse response) throws PLException, IOException; |
| | | |
| | | /** |
| | | * 导å
¥ |
| | | * @param files |
| | | * @return |
| | | * @throws PLException |
| | | */ |
| | | BaseResult importModule(LinkedList<File> files) throws PLException, IOException; |
| | | |
| | | /** |
| | | * 管çåè½æ¨¡åãä¸å¡åè½æ¨¡åä¸çå¶åèç¹âä¿®æ¹æä½å«åæ¥å£ |
| | | * @param menuVO |
| | | * @return |
| | | * @throws VciException |
| | | */ |
| | | boolean updateAlias(MenuVO menuVO) throws VciException; |
| | | |
| | | //ç³»ç»é
ç½®ç¸å
³æ¥å£ |
| | | /** |
| | | * æ¥è¯¢ç³»ç»é
ç½®åç±» |
| | | */ |
| | | List<Object>getSysConfTree(); |
| | | |
| | | /** |
| | | * å¢å ç³»ç»é
ç½® |
| | | * @return |
| | | */ |
| | | boolean addSysConf(); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç³»ç»é
ç½® |
| | | * @return |
| | | */ |
| | | boolean updateSysConf(); |
| | | |
| | | /** |
| | | * å é¤ç³»ç»é
ç½® |
| | | * @return |
| | | */ |
| | | boolean delSysConf(); |
| | | |
| | | /** |
| | | * 导åºç³»ç»é
ç½® |
| | | * @param response |
| | | * @return |
| | | */ |
| | | String exportSysConf(HttpServletResponse response); |
| | | |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.JSONReader; |
| | | import com.vci.client.ClientSession; |
| | | import com.vci.common.exception.VciException; |
| | | import com.vci.common.locale.LocaleDisplay; |
| | |
| | | private SmFunctionVO functionForPlatform1ToFunctionVO(SmFunctionForPlatform1 functionForPlatform1){ |
| | | SmFunctionVO functionVO = new SmFunctionVO(); |
| | | functionVO.setOid(functionForPlatform1.getPloid()); |
| | | functionVO.setId(String.valueOf(functionForPlatform1.getPlmoduleno())); |
| | | //functionVO.setId(String.valueOf(functionForPlatform1.getPlmoduleno())); |
| | | functionVO.setName(functionForPlatform1.getPlname()); |
| | | functionVO.setLogName(functionForPlatform1.getPlaliasname()); |
| | | if(StringUtils.isNotBlank(functionForPlatform1.getPlresourceb())){ |
| | |
| | | //妿æ¯å¼åæè
æµè¯ç¨æ·ï¼éåè·åç³»ç»æ¨¡åé
ç½®èå |
| | | if(adminOrDeveloperOrRoot){ |
| | | //è·åé¦é¡µç³»ç»æ¨¡åé
ç½®èå |
| | | MenuVO menuVO = JsonConfigReader.getMenuVO(); |
| | | functionVOList.add(menuVO); |
| | | MenuVO menuVO = JsonConfigReader.getSysModuleConf().getSysModuleNode(); |
| | | if(Func.isNotEmpty(menuVO)){ |
| | | functionVOList.add(menuVO); |
| | | } |
| | | } |
| | | return functionVOList.stream().sorted(Comparator.comparing(s -> s.getSort())).collect(Collectors.toList()); |
| | | } |
| | |
| | | /** |
| | | * éè¿æ¨¡åIDè·åå级å表 |
| | | * @param parentId |
| | | * @param modeType 模åç±»å |
| | | * @param isAll æ¯å¦å
æ¬æ æç模åï¼trueåå
æ¬ |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | @Override |
| | | public List<MenuVO> getSysModelTreeMenuByPID(String parentId,boolean isAll) throws VciBaseException{ |
| | | public List<MenuVO> getSysModelTreeMenuByPID(String parentId,String modeType,boolean isAll) throws VciBaseException{ |
| | | List<MenuVO> menuVOList = new ArrayList<>(); |
| | | if(Func.isBlank(parentId)){ |
| | | return menuVOList; |
| | | } |
| | | if(parentId.equals("mangeModel") || parentId.equals("businessModel")){ |
| | | if(parentId.equalsIgnoreCase("FunctionObject")){ |
| | | boolean isFunctionObject = Func.isNotBlank(modeType) && modeType.equalsIgnoreCase("FunctionObject"); |
| | | if(parentId.equals("systemManagmentNode") || parentId.equals("modelManagmentNode") || isFunctionObject){ |
| | | int childType = this.checkChildObject(parentId); |
| | | if(isFunctionObject){ |
| | | try { |
| | | /**å¤æè¯¥æ¨¡åä¸åå¯¹è±¡æ¯æ¨¡åè¿æ¯æä½ï¼0表示æ åèç¹ï¼1è¡¨ç¤ºæ¯æ¨¡åï¼2è¡¨ç¤ºæ¯æä½**/ |
| | | int childType = this.checkChildObject(parentId); |
| | | if(childType == 2){ |
| | | try{ |
| | | FuncOperationInfo[] infos = platformClientUtil.getFrameworkService().getFuncOperationByModule(parentId, "", false); |
| | | for(int i = 0;i < infos.length ;i++){ |
| | | FuncOperationInfo info = infos[i]; |
| | | MenuVO menuVO = new MenuVO(); |
| | | menuVO.setChildType(childType); |
| | | menuVO.setId(info.id); |
| | | menuVO.setCode(info.funcId); |
| | | menuVO.setId(info.operId); |
| | |
| | | menuVO.setAlias(info.operAlias); |
| | | menuVO.setRemark(info.operDesc); |
| | | menuVO.setSort((int) info.number); |
| | | //menuVO.setIsValid(info.isValid); |
| | | menuVO.setModeType("FunctionObject"); |
| | | menuVO.setIsValid(info.isValid); |
| | | menuVO.setHasChildren(false); |
| | | menuVOList.add(menuVO); |
| | | } |
| | |
| | | for(int i = 0;i < funcInfos.length; i++){ |
| | | FunctionInfo funcInfo = funcInfos[i]; |
| | | MenuVO menuVO = this.functionInfoToMenuVO(funcInfo); |
| | | menuVO.setChildType(childType); |
| | | menuVO.setModeType("FunctionObject"); |
| | | menuVOList.add(menuVO); |
| | | } |
| | | }catch (PLException e) { |
| | |
| | | } |
| | | }else{ |
| | | try{ |
| | | MenuVO parentNode; |
| | | //å°è¿åçèç¹å¤å±å¥ä¸å½åç¶èç¹ |
| | | if(parentId.equals("systemManagmentNode")){ |
| | | parentNode = JsonConfigReader.getSysModuleConf().getSystemManagmentNode(); |
| | | }else{ |
| | | parentNode = JsonConfigReader.getSysModuleConf().getModelManagmentNode(); |
| | | } |
| | | List<MenuVO> menuVOS = new ArrayList<>(); |
| | | //æ¥è¯¢çä¸çº§èç¹ |
| | | FunctionInfo[] funcInfos = platformClientUtil.getFrameworkService().getModuleListByParentId(parentId, isAll); |
| | | for(int i = 0;i < funcInfos.length; i++){ |
| | | FunctionInfo funcInfo = funcInfos[i]; |
| | | MenuVO menuVO = this.functionInfoToMenuVO(funcInfo); |
| | | menuVO.setModeType("FunctionObject"); |
| | | menuVOList.add(menuVO); |
| | | menuVO.setChildType(childType); |
| | | menuVOS.add(menuVO); |
| | | } |
| | | parentNode.setChildren(menuVOS); |
| | | menuVOList.add(parentNode); |
| | | }catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciBaseException(String.valueOf(e.code),e.messages); |
| | | } |
| | | } |
| | | }else if(parentId.equals("operateType")){ |
| | | }else if(parentId.equals("sysOptionNode")){ |
| | | //å è½½æææä½ |
| | | try{ |
| | | //å°è¿åçèç¹å¤å±å¥ä¸å½åç¶èç¹ |
| | | MenuVO parentNode = JsonConfigReader.getSysModuleConf().getOperateNode(); |
| | | List<MenuVO> menuVOS = new ArrayList<>(); |
| | | OperateInfo[] operateInfos = platformClientUtil.getFrameworkService().getOperateTreeList(parentId); |
| | | for(int i = 0; i < operateInfos.length;i++ ){ |
| | | OperateInfo operateInfo = operateInfos[i]; |
| | |
| | | menuVO.setCode(operateInfo.identify); |
| | | menuVO.setAlias(operateInfo.alias); |
| | | menuVO.setCategory(2); |
| | | menuVO.setChildType(0); |
| | | menuVO.setRemark(operateInfo.desc); |
| | | menuVO.getMeta().put("keepAlive",false); |
| | | menuVO.setSort((int) operateInfo.seq); |
| | | menuVO.setModeType("operateObject"); |
| | | menuVO.setHasChildren(false); |
| | | menuVOList.add(menuVO); |
| | | menuVOS.add(menuVO); |
| | | } |
| | | parentNode.setChildren(menuVOS); |
| | | menuVOList.add(parentNode); |
| | | }catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciBaseException(String.valueOf(e.code),new String[]{VciBaseUtil.getExceptionMessage(e)}); |
| | | } |
| | | } |
| | | return menuVOList; |
| | | return menuVOList.stream().sorted(Comparator.comparing(s -> s.getSort())).collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | |
| | | private MenuVO functionInfoToMenuVO(FunctionInfo funcInfo){ |
| | | MenuVO menuVO = new MenuVO(); |
| | | menuVO.setId(funcInfo.id); |
| | | menuVO.setValid(funcInfo.isValid); |
| | | menuVO.setSource(funcInfo.image); |
| | | //if(StringUtils.isBlank(menu.resourceB)){ |
| | | // continue; |
| | | //} |
| | | menuVO.setPathC(funcInfo.resourceC); |
| | | menuVO.setResourceDotNet(funcInfo.resourceDotNet); |
| | | menuVO.setResourceMobile(funcInfo.resourceMobile); |
| | | menuVO.setPath(funcInfo.resourceB); |
| | | menuVO.setParentId(funcInfo.parentId); |
| | | menuVO.setCode(funcInfo.aliasName); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.frameworkcore.compatibility.impl; |
| | | |
| | | import com.vci.client.common.excel.ExcelDocumentUtils; |
| | | import com.vci.common.exception.VciException; |
| | | import com.vci.common.locale.LocaleDisplay; |
| | | import com.vci.common.utility.ObjectUtility; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.corba.framework.data.FuncOperationInfo; |
| | | import com.vci.corba.framework.data.FunctionInfo; |
| | | import com.vci.corba.framework.data.OperateInfo; |
| | | import com.vci.frameworkcore.compatibility.SmHMSysModConfigServiceI; |
| | | import com.vci.pagemodel.MenuVO; |
| | | import com.vci.client.common.excel.SheetDataSet; |
| | | 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.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.SessionInfo; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.WebThreadLocalUtil; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * é¦é¡µç³»ç»æ¨¡åé
ç½®æ·»å æé®ãæ·»å æä½ç±»åçæ¥å£æå¡ |
| | | * @author ludc |
| | | * @date 2024/8/19 12:42 |
| | | */ |
| | | @Service |
| | | public class SmHMSysModConfigServiceImpl implements SmHMSysModConfigServiceI { |
| | | |
| | | @Autowired |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | private List<FunctionInfo> fileFunctionDatas = new ArrayList<FunctionInfo>(); |
| | | |
| | | private int count = 0; |
| | | |
| | | private static FunctionOperateDelegate foDelegate; |
| | | |
| | | { |
| | | if(Func.isEmpty(foDelegate)){ |
| | | foDelegate = new FunctionOperateDelegate(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * æ·»å æ¨¡å |
| | | * @param menuVO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public MenuVO addModule(MenuVO menuVO) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(menuVO,"æ°å¢ç模å对象"); |
| | | try { |
| | | //徿°æ®åºéæå
¥æ°å»ºæ¨¡åæ°æ® |
| | | String puid = foDelegate.saveModule(menuVO); |
| | | /** |
| | | * è¿åå¼ï¼1ï¼è¡¨ç¤ºæ¨¡ååç§°éå¤ |
| | | * 2ï¼è¡¨ç¤ºæ¨¡åæ è¯éå¤ |
| | | * 3, 模æ¿å«ååå¨éå¤ |
| | | */ |
| | | if(puid.equals("1")){ |
| | | throw new VciBaseException("模ååç§°éå¤ï¼è¯·ä¿®æ¹ï¼"); |
| | | }else if(puid.equals("2")){ |
| | | throw new VciBaseException("æ¨¡åæ è¯éå¤ï¼è¯·ä¿®æ¹ï¼"); |
| | | }else if(puid.equals("3")) { |
| | | throw new VciBaseException("模åå«åéå¤ï¼è¯·ä¿®æ¹ï¼"); |
| | | } |
| | | menuVO.setId(puid); |
| | | return menuVO; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | throw new VciBaseException(exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¨¡å |
| | | * @param menuVO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public MenuVO updateModule(MenuVO menuVO) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(menuVO,"ä¿®æ¹ç模å对象"); |
| | | try { |
| | | String res = ""; |
| | | //æ´æ°æ°æ®åº |
| | | res = foDelegate.updateMod(menuVO); |
| | | /** |
| | | * è¿åï¼1表示模ååéå¤ã |
| | | * 2è¡¨ç¤ºæ¨¡åæ è¯éå¤ã |
| | | * 3æ 示模åå«åéå¤ã |
| | | */ |
| | | if(res.equals("1")){ |
| | | throw new VciBaseException("模ååç§°éå¤ï¼è¯·ä¿®æ¹ï¼"); |
| | | }else if(res.equals("2")){ |
| | | throw new VciBaseException("æ¨¡åæ è¯éå¤ï¼è¯·ä¿®æ¹ï¼"); |
| | | }else if(res.equals("3")) { |
| | | throw new VciBaseException("模åå«åéå¤ï¼è¯·ä¿®æ¹ï¼"); |
| | | }/* else if (res.equals("4")) { |
| | | throw new VciBaseException("模åç¼å·éå¤ï¼è¯·ä¿®æ¹ï¼"); |
| | | }*/ |
| | | return menuVO; |
| | | } catch (VciBaseException e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | throw new VciBaseException(exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å 餿¨¡å |
| | | * @param menuVO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean delModule(MenuVO menuVO) { |
| | | VciBaseUtil.alertNotNull(menuVO,"æ·»å æä½ç±»åçå表"); |
| | | String res = ""; |
| | | try { |
| | | String puid = ""; |
| | | if("FunctionObject".equals(menuVO.getModeType())) { |
| | | puid = menuVO.getId(); |
| | | }else if("modelManagmentNode".equals(menuVO.getId())) { |
| | | puid = "modelManagmentNode"; |
| | | }else if("systemManagmentNode".equals(menuVO.getId())) { |
| | | puid = "systemManagmentNode"; |
| | | } |
| | | if(Func.isBlank(puid)){ |
| | | throw new VciBaseException("æªæ¾å°è¦å é¤ç模åï¼"); |
| | | } |
| | | res = foDelegate.deleteModule(puid); |
| | | /** |
| | | * è¿åå¼ï¼1表示模å卿鿍¡åå·²ç»æææä¿¡æ¯ï¼æ æ³å é¤ |
| | | */ |
| | | if(res.equals("1")){ |
| | | throw new VciBaseException("å½å模åï¼æä¸çº§æ¨¡åï¼å·²ç»å卿æä¿¡æ¯ï¼æ æ³å é¤ã"); |
| | | } |
| | | return true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | throw new VciBaseException(exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¢å æä½ç±»å |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean addOperationType(List<MenuVO> menuVOList) { |
| | | VciBaseUtil.alertNotNull(menuVOList,"æ·»å æä½ç±»åçå表"); |
| | | List<FuncOperationInfo> objs = new ArrayList<>(); |
| | | //å°æä½ç±»åç»è£
æéè¦åå¨ç对象 |
| | | menuVOList.stream().forEach(menuVO -> { |
| | | FuncOperationInfo info = new FuncOperationInfo(); |
| | | //info.id = menuVO.getId() == null ? "" : menuVO.getId(); |
| | | info.funcId = menuVO.getParentId() == null ? "" : menuVO.getParentId(); |
| | | info.operId = menuVO.getId() == null ? "" : menuVO.getId(); |
| | | info.operName = menuVO.getName() == null ? "" : menuVO.getName(); |
| | | //info.operIndentify = menuVO.getOperIndentify() == null ? "" : menuVO.getOperIndentify(); |
| | | info.operAlias = menuVO.getAlias() == null ? "" : menuVO.getAlias(); |
| | | info.operDesc = menuVO.getRemark() == null ? "" : menuVO.getRemark(); |
| | | info.number = -1; |
| | | info.isValid = true; |
| | | /*VCIBaseTreeNode node = (VCIBaseTreeNode)treePaths[i].getLastPathComponent(); |
| | | OperateObject operateObject = (OperateObject) node.getObj(); |
| | | obj.setFuncId(funcObj.getId()); |
| | | obj.setOperId(operateObject.getId()); |
| | | obj.setOperName(operateObject.getName()); |
| | | obj.setOperIndentify(operateObject.getIdentify()); |
| | | obj.setOperAlias(operateObject.getAlias()); |
| | | obj.setNumber(-1); |
| | | obj.setIsValid(true);*/ |
| | | objs.add(info); |
| | | }); |
| | | |
| | | //æ§è¡ä¿å |
| | | boolean res = true; |
| | | try { |
| | | res = this.saveFuncOperation(objs.toArray(new FuncOperationInfo[objs.size()])); |
| | | } catch (Exception e) { |
| | | res = false; |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "å¢å æä½ç±»å失败ï¼åå ï¼" + VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | throw new VciBaseException(exceptionMessage); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | /** |
| | | * å é¤éç³»ç»æ¨¡å |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean delNonsysModule() { |
| | | try { |
| | | if(platformClientUtil.getFrameworkService().deleteModules("nonsys")){ |
| | | return true; |
| | | } |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "å é¤éç³»ç»æ¨¡å失败,åå ï¼"+VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | throw new VciBaseException(exceptionMessage); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä¸å¡æ¨¡å |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean delBusinessModule() { |
| | | try { |
| | | if(platformClientUtil.getFrameworkService().deleteModules("business")){ |
| | | return true; |
| | | } |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "å é¤ä¸å¡æ¨¡å失败,åå ï¼"+VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | throw new VciBaseException(exceptionMessage); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 导åºsql |
| | | * @return |
| | | */ |
| | | @Override |
| | | public File exportFunctionSql(HttpServletResponse response,String exportPath,boolean isFunction) throws PLException { |
| | | String dir = Func.isBlank(exportPath) ? LocalFileUtil.getDefaultTempFolder():exportPath; |
| | | String[][] allDatas; |
| | | int size; |
| | | if(isFunction){ |
| | | size = (int)platformClientUtil.getFrameworkService().getAllModelManagementNum(); |
| | | allDatas = this.getAllDatas(size); |
| | | }else{ |
| | | size = (int)platformClientUtil.getFrameworkService().getAllOperitionsNum(); |
| | | allDatas = this.getAllOperitions(size); |
| | | } |
| | | File file = expData(dir,isFunction, allDatas); |
| | | return file; |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @return |
| | | */ |
| | | @Override |
| | | public String exportModule(HttpServletResponse response) throws IOException { |
| | | String defaultTempFolder = LocalFileUtil.getDefaultTempFolder(); |
| | | //åexcel |
| | | String excelPath = defaultTempFolder + File.separator + "module.xls"; |
| | | final List<String> columns = new ArrayList<String>(Arrays.asList("PLNAME","PLRESOURCEC","PLSUFFIXC","PLRESOURCEB", |
| | | "PLSUFFIXB","PLMODULENO","PLDESC","PLISVALID","PLIMAGE","PLMODULESEQUENCE","PLALIASNAME", |
| | | "PLMODULENAME","PLRESOURCEDOTNET","PLRESOURCEMOBIL","级å«","å«å","PLNO","PLISVALID", |
| | | "PLNAME","PLUNIQUEFLAG","PLDESC","PLALIAS","PLSEQUENCE"));// 设置表ååå |
| | | //int count = transmitTreeObject.getCurrentTreeNode().getChildCount(); |
| | | new File(excelPath).createNewFile(); |
| | | //设置å |
| | | List<WriteExcelData> excelDataList = new ArrayList<>(10000); |
| | | //设置å头 |
| | | for (int index = 0; index < columns.size(); index++) { |
| | | excelDataList.add(new WriteExcelData(0,index, columns.get(index))); |
| | | } |
| | | //æ¥è¯¢è¦å¯¼åºçæ°æ® |
| | | String[][] firstLevel = new String[3000][23]; |
| | | try { |
| | | firstLevel = this.checkLevel(); |
| | | } catch (VciBaseException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | String[][] datas = new String[10000][columns.size()]; |
| | | for(int i=0;i<firstLevel.length;i++){ |
| | | datas[i] =firstLevel[i]; |
| | | } |
| | | if(Func.isEmpty(datas)){ |
| | | excelDataList.add(new WriteExcelData(1,1, "导åºçå表为空ï¼è¯·å·æ°åå°è¯éæ°å¯¼åºï¼")); |
| | | }else{ |
| | | for (int i = 0; i < firstLevel.length; i++) { |
| | | int row = i + 1; |
| | | excelDataList.add(new WriteExcelData(row,0, ""+datas[i][0])); |
| | | excelDataList.add(new WriteExcelData(row,1, ""+datas[i][1])); |
| | | excelDataList.add(new WriteExcelData(row,2, ""+datas[i][2])); |
| | | excelDataList.add(new WriteExcelData(row,3, ""+datas[i][3])); |
| | | excelDataList.add(new WriteExcelData(row,4, ""+datas[i][4])); |
| | | excelDataList.add(new WriteExcelData(row,5, ""+datas[i][5])); |
| | | excelDataList.add(new WriteExcelData(row,6, ""+datas[i][6])); |
| | | excelDataList.add(new WriteExcelData(row,7, ""+datas[i][7])); |
| | | excelDataList.add(new WriteExcelData(row,8, ""+datas[i][8])); |
| | | excelDataList.add(new WriteExcelData(row,9, ""+datas[i][9])); |
| | | excelDataList.add(new WriteExcelData(row,10,""+datas[i][10])); |
| | | excelDataList.add(new WriteExcelData(row,11,""+datas[i][11])); |
| | | excelDataList.add(new WriteExcelData(row,12,""+datas[i][12])); |
| | | excelDataList.add(new WriteExcelData(row,13,""+datas[i][13])); |
| | | excelDataList.add(new WriteExcelData(row,14,""+datas[i][14])); |
| | | excelDataList.add(new WriteExcelData(row,15,""+datas[i][15])); |
| | | excelDataList.add(new WriteExcelData(row,16,""+datas[i][16])); |
| | | excelDataList.add(new WriteExcelData(row,17,""+datas[i][17])); |
| | | excelDataList.add(new WriteExcelData(row,18,""+datas[i][18])); |
| | | excelDataList.add(new WriteExcelData(row,19,""+datas[i][19])); |
| | | excelDataList.add(new WriteExcelData(row,20,""+datas[i][20])); |
| | | excelDataList.add(new WriteExcelData(row,21,""+datas[i][21])); |
| | | excelDataList.add(new WriteExcelData(row,22,""+datas[i][22])); |
| | | } |
| | | } |
| | | WriteExcelOption excelOption = new WriteExcelOption(excelDataList); |
| | | ExcelUtil.writeDataToFile(excelPath, excelOption); |
| | | return excelPath; |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥ |
| | | * @param files |
| | | * @return |
| | | * @throws PLException |
| | | */ |
| | | @Override |
| | | public BaseResult importModule(LinkedList<File> files) throws PLException, IOException { |
| | | logger.info("æ£å¨æ¶éè¡¨åæ°æ®......"); |
| | | boolean isSuccess = collectionDatas(files); |
| | | logger.info("æ£å¨å¯¼å
¥è¡¨å人åä¿¡æ¯......"); |
| | | logger.info("count==="+count); |
| | | boolean resBoolean = false; |
| | | if(isSuccess == false){ |
| | | resBoolean = importExcelData(count); |
| | | } |
| | | return resBoolean ? BaseResult.success("导å
¥æåï¼"):BaseResult.fail("导å
¥å¤±è´¥ï¼"); |
| | | } |
| | | |
| | | /** |
| | | * 管çåè½æ¨¡åãä¸å¡åè½æ¨¡åä¸çå¶åèç¹âä¿®æ¹æä½å«åæ¥å£ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateAlias(MenuVO menuVO) throws VciException { |
| | | String alias = menuVO.getAlias(); |
| | | if ("".equals(alias)){ |
| | | throw new VciBaseException("请填åæä½å«å!"); |
| | | } |
| | | boolean isValid = menuVO.getIsValid(); |
| | | String id = menuVO.getId(); |
| | | return foDelegate.updateFuncOperation(id , alias, isValid); |
| | | } |
| | | |
| | | @Override |
| | | public List<Object> getSysConfTree() { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public boolean addSysConf() { |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateSysConf() { |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public boolean delSysConf() { |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public String exportSysConf(HttpServletResponse response) { |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * æ¶é表åä¿¡æ¯ã |
| | | * @param files |
| | | * @return |
| | | * @throws PLException |
| | | * @throws IOException |
| | | */ |
| | | private boolean collectionDatas(LinkedList<File> files) throws PLException, IOException{ |
| | | boolean b=false; |
| | | for (File f : files) { |
| | | List<SheetDataSet> sheetDataSets = this.getFileList(f); |
| | | if (sheetDataSets != null && !sheetDataSets.isEmpty()) { |
| | | for (SheetDataSet sheet : sheetDataSets) { |
| | | // sheetä¸è½ä¸ºç©ºå¹¶ä¸å¿
é¡»æåºè¡¨å¤´å¤ç䏿¡æ°æ® |
| | | if (sheet != null && sheet.getDataSet() != null && sheet.getDataSet().size() > 1) { |
| | | List<String[]> dataSet = sheet.getDataSet(); |
| | | String fParentId=""; //第ä¸çº§çid(第äºçº§çparentid) |
| | | boolean boo=true; |
| | | boolean first=false; |
| | | String[] pd=new String[100]; |
| | | int jibie=2; |
| | | for (int i = 1; i < dataSet.size(); i++) { |
| | | //fileDatas = new ArrayList<FunctionObject>(); |
| | | String[] oneData = dataSet.get(i); |
| | | String id = ObjectUtility.getNewObjectID36(); |
| | | |
| | | FunctionInfo funObj=new FunctionInfo(); |
| | | boolean onebl=false; |
| | | boolean twobl=false; |
| | | boolean same=false; |
| | | String plName=oneData[0]; |
| | | //TODO: è¿éç»å¯¹ä¼åºé®é¢ï¼å¯¼åºç第ä¸å±ç级å«é½æ¯0ï¼é½ä¸ä¼åå¨çäº1çï¼æä»¥å¹³å°è¿å¿çäº1åºè¯¥æ¯ä¸å¯¹ç |
| | | if(oneData[14].equals("0")) { |
| | | try { |
| | | onebl = foDelegate.firstLevel(plName); |
| | | } catch (VciException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | //å¦æç¬¬ä¸çº§éå |
| | | if(onebl == true) {//第ä¸çº§éååè¦ç第ä¸çº§ |
| | | fuzhi(funObj,oneData); |
| | | try { |
| | | fParentId = foDelegate.changeFirstLevel(funObj,plName); |
| | | pd[2]=fParentId; |
| | | } catch (VciException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | funObj.id = fParentId; |
| | | fileFunctionDatas.add(funObj); |
| | | first=true; |
| | | |
| | | |
| | | } else { |
| | | funObj.id = id; |
| | | funObj.parentId = "modelManagmentNode"; |
| | | fuzhi(funObj,oneData); |
| | | fileFunctionDatas.add(funObj); |
| | | first=false; |
| | | } |
| | | |
| | | b=false; |
| | | } |
| | | //######################### åå¹¶ ######################### |
| | | for(jibie=2;jibie<100;jibie++){ |
| | | if(oneData[14].equals(String.valueOf(jibie))){ |
| | | if(first == true && boo == true){ |
| | | try { |
| | | if(pd[jibie]==null){ |
| | | pd[jibie]=""; |
| | | } |
| | | twobl=foDelegate.secondLevel(plName,pd[jibie]); |
| | | } catch (VciException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | if(twobl==true) {//éååè¦ç |
| | | fuzhi(funObj,oneData); |
| | | try { |
| | | fParentId=foDelegate.changeSecondLevel(funObj,plName,pd[jibie]); |
| | | pd[jibie+1]=fParentId; |
| | | } catch (VciException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | //funObj.setId(fParentId); |
| | | funObj.id = pd[jibie+1]; |
| | | fileFunctionDatas.add(funObj); |
| | | boo = true; |
| | | |
| | | } |
| | | } else { |
| | | funObj.id = id; |
| | | b = false; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(oneData[14].equals("-1")) { |
| | | importExcelData(count); |
| | | FuncOperationInfo foObj = new FuncOperationInfo(); |
| | | int len=fileFunctionDatas.size(); |
| | | //**************åä¸èç¹ä¸ä¸è½æç¸åçæä½ç±»å******************** |
| | | String dataOperName=oneData[18]; |
| | | String plFuncOid=fileFunctionDatas.get(len-1).id; |
| | | try { |
| | | same = foDelegate.selSameOper(dataOperName,plFuncOid); |
| | | } catch (VciBaseException e1) { |
| | | // TODO Auto-generated catch block |
| | | e1.printStackTrace(); |
| | | } |
| | | //****************************************************** |
| | | if(same == false) { |
| | | foObj.id = id; |
| | | foObj.funcId = fileFunctionDatas.get(len-1).id; |
| | | try { |
| | | OperateInfo operObj = foDelegate.fetchOperateTypeByName(oneData[18]); |
| | | foObj.operId = operObj.id; |
| | | } catch (VciException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | foObj.number = Integer.parseInt(oneData[16]); |
| | | foObj.operAlias = oneData[15]; |
| | | foObj.isValid = Integer.parseInt(oneData[17]) != 0; |
| | | try { |
| | | foDelegate.saveFuncOperation2(foObj); |
| | | } catch (VciException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } else { |
| | | foObj.number = Integer.parseInt(oneData[16]); |
| | | foObj.operAlias = oneData[15]; |
| | | foObj.isValid = Integer.parseInt(oneData[17]) != 0; |
| | | try { |
| | | foDelegate.updateOperation(foObj,dataOperName,plFuncOid); |
| | | } catch (VciException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | count=fileFunctionDatas.size(); |
| | | b=true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return b; |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥è¡¨åæ°æ® |
| | | * @throws VciException |
| | | */ |
| | | private boolean importExcelData(int count) throws PLException { |
| | | boolean b=false; |
| | | try { |
| | | b= foDelegate.importModules(fileFunctionDatas.toArray(new FunctionInfo[]{}),count); |
| | | } catch (VciBaseException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | return b; |
| | | } |
| | | |
| | | /** |
| | | * è·åè¡¨åæ°æ® |
| | | * @param f |
| | | * @return |
| | | * @throws IOException |
| | | * @throws PLException |
| | | * @autor caicong |
| | | * @data 2014-3-11 |
| | | */ |
| | | private List<SheetDataSet> getFileList(File f) throws PLException, IOException { |
| | | // è·åæµ |
| | | BufferedInputStream fileInputStream = new BufferedInputStream( |
| | | new FileInputStream(f)); |
| | | String name = f.getName(); |
| | | // è·å表list |
| | | List<SheetDataSet> sheetDataSets = ExcelDocumentUtils |
| | | .readExcelDocument(name, fileInputStream); |
| | | return sheetDataSets; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢"åè½æ¨¡å管ç"æ´ä¸ªæ ç»æå¹¶å¯¼åº |
| | | * add by caill start |
| | | * */ |
| | | private String[][] checkLevel() throws VciBaseException{ |
| | | String[][] res = new String[3000][23]; |
| | | try{ |
| | | res = platformClientUtil.getFrameworkService().checkLevel(); |
| | | }catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciBaseException(String.valueOf(e.code), e.messages); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | /** |
| | | * å°æ¥è¯¢åºçæ°æ®è½¬æ¢æsqlå¹¶åå
¥æå®è·¯å¾ä¸ |
| | | * @param dir |
| | | * @param plDatas |
| | | * @return |
| | | */ |
| | | private File expData(String dir,boolean isFunction/*æ¯å¦æ¯å¯¼åºç®¡çåè½æ¨¡åsql*/, String[][] plDatas){ |
| | | new File(dir).mkdir(); |
| | | File file = new File(dir + (isFunction ? "/plfuncoperation.sql":"/ploperation.sql")); |
| | | try { |
| | | FileWriter w = new FileWriter(file); |
| | | BufferedWriter bw = new BufferedWriter(w); |
| | | System.out.println("é¿åº¦ä¸ºï¼"+plDatas.length); |
| | | for(int i=0;i<plDatas.length;i++){ |
| | | if(isFunction){ |
| | | if(!plDatas[i][16].trim().equals("") && plDatas[i][16]!=null && !plDatas[i][16].equals("-1")){ |
| | | bw.write("insert into plfunction values('"+plDatas[i][0]+"','"+plDatas[i][1]+"',"+"'"+plDatas[i][2]+"',"+"'"+plDatas[i][3]+"',"+"'"+plDatas[i][4]+"'," |
| | | +"'"+plDatas[i][5]+"',"+"'"+plDatas[i][6]+"',"+"'"+plDatas[i][7]+"',"+"'"+plDatas[i][8]+"',"+"'"+plDatas[i][9]+"',"+"'"+plDatas[i][10]+"',"+"'"+plDatas[i][11]+"'," |
| | | +"'"+plDatas[i][12]+"',"+"'"+plDatas[i][13]+"',"+"'"+plDatas[i][14]+"',"+"'"+plDatas[i][15]+"');"); |
| | | bw.write("\r\n"); |
| | | } |
| | | if(!plDatas[i][16].trim().equals("") && plDatas[i][16]!=null && plDatas[i][16].equals("-1")){ |
| | | bw.write("insert into plfuncoperation values('"+plDatas[i][17]+"','"+plDatas[i][18]+"',"+"'"+plDatas[i][19]+"',"+"'"+plDatas[i][20]+"',"+"'"+plDatas[i][21]+"'," |
| | | +"'"+plDatas[i][22]+"');"); |
| | | bw.write("\r\n"); |
| | | } |
| | | }else{ |
| | | bw.write("insert into ploperation values('"+plDatas[i][0]+"','"+plDatas[i][1]+"',"+"'"+plDatas[i][2]+"',"+"'"+plDatas[i][3]+"',"+"'"+plDatas[i][4]+"'," |
| | | +"'"+plDatas[i][5]+"');"); |
| | | bw.write("\r\n"); |
| | | } |
| | | } |
| | | |
| | | bw.flush(); |
| | | bw.close(); |
| | | return file; |
| | | } catch (IOException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * ä¿å模åä¸çæä½ |
| | | * @param funcOperationObjs |
| | | * @return |
| | | * @throws VciException |
| | | */ |
| | | public boolean saveFuncOperation(FuncOperationInfo[] funcOperationObjs) throws VciException { |
| | | if(funcOperationObjs == null || funcOperationObjs.length < 0){ |
| | | return false; |
| | | } |
| | | boolean res = true; |
| | | try{ |
| | | res = platformClientUtil.getFrameworkService().saveFuncOperation(funcOperationObjs, foDelegate.getUserEntityInfo()); |
| | | }catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciException(String.valueOf(e.code),e.messages); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢"åè½æ¨¡å管ç"æ´ä¸ªæ ç»æå¹¶å¯¼åºsql |
| | | * @return |
| | | * @throws PLException |
| | | */ |
| | | public String[][] getAllDatas(int size) throws PLException { |
| | | String[][] res = new String[size][23]; |
| | | try{ |
| | | res = platformClientUtil.getFrameworkService().getAllDatas(size); |
| | | }catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new PLException(String.valueOf(e.code), e.messages); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | /** |
| | | * è·å¾ææçæä½ç±»å并导åºå°.sqlæä»¶ä¸ |
| | | * add by caill start 2015.12.11 |
| | | * */ |
| | | private String[][] getAllOperitions(int size) throws VciBaseException{ |
| | | String[][] res = new String[size][6]; |
| | | try{ |
| | | res = platformClientUtil.getFrameworkService().getAllOperitions(size); |
| | | }catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciBaseException(String.valueOf(e.code), e.messages); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | public void fuzhi(FunctionInfo functionInfo,String[] oneData){ |
| | | functionInfo.name = oneData[0]; |
| | | functionInfo.resourceC = oneData[1]; |
| | | functionInfo.suffixC = oneData[2]; |
| | | functionInfo.desc = oneData[6]; |
| | | functionInfo.resourceB = oneData[3]; |
| | | functionInfo.suffixB = oneData[4]; |
| | | functionInfo.seq = Integer.parseInt(oneData[9]); |
| | | //funObj.setModuleNo(Integer.parseInt(oneData[5])); |
| | | functionInfo.image = oneData[8]; |
| | | functionInfo.isValid = Integer.parseInt(oneData[7]) != 0; |
| | | functionInfo.aliasName = oneData[10]; |
| | | functionInfo.resourceDotNet = oneData[12]; |
| | | functionInfo.resourceMobile = oneData[13]; |
| | | } |
| | | |
| | | /** |
| | | * å
å«ä¿åæ¨¡åæ¹æ³çæä½ç±» |
| | | */ |
| | | private class FunctionOperateDelegate { |
| | | |
| | | /** |
| | | * å¤æç¬¬ä¸çº§æ°æ®ææ²¡æéåç |
| | | * @param plName |
| | | * @return |
| | | * @throws VciException |
| | | */ |
| | | public boolean firstLevel(String plName) throws VciException{ |
| | | try{ |
| | | return platformClientUtil.getFrameworkService().firstLevel(plName); |
| | | }catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciException(String.valueOf(e.code), e.messages); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è¦çéåç第ä¸çº§æ°æ® |
| | | * add by caill |
| | | * */ |
| | | public String changeFirstLevel(FunctionInfo functionInfo,String plName) throws VciException{ |
| | | String fParentId=""; |
| | | try { |
| | | fParentId= platformClientUtil.getFrameworkService().changeFirstLevel(functionInfo, plName); |
| | | } catch (PLException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | return fParentId; |
| | | } |
| | | |
| | | /** |
| | | * å¤æç¬¬äºçº§æ°æ®ææ²¡æéåç |
| | | * add by caill |
| | | * */ |
| | | public boolean secondLevel(String plName,String fParentId) throws VciException{ |
| | | try{ |
| | | return platformClientUtil.getFrameworkService().secondLevel(plName,fParentId); |
| | | }catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciException(String.valueOf(e.code), e.messages); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è¦çéåç第äºçº§æ°æ® |
| | | * add by caill |
| | | * */ |
| | | public String changeSecondLevel(FunctionInfo functionInfo,String plName,String fParentId) throws VciException{ |
| | | String sParentId=""; |
| | | try { |
| | | sParentId= platformClientUtil.getFrameworkService().changeSecondLevel(functionInfo, plName,fParentId); |
| | | } catch (PLException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | return sParentId; |
| | | } |
| | | |
| | | /** |
| | | * ä¿å模å |
| | | * @param object |
| | | * @return |
| | | * @throws VciException |
| | | */ |
| | | public String saveModule(MenuVO object) throws VciBaseException { |
| | | String res = ""; |
| | | try{ |
| | | res = platformClientUtil.getFrameworkService().saveModule(this.check(object,"add"),this.getUserEntityInfo()); |
| | | }catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciBaseException(String.valueOf(e.code), e.messages); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¨¡å |
| | | * @param object |
| | | * @return |
| | | * @throws VciException |
| | | */ |
| | | public String updateMod(MenuVO object) throws VciBaseException { |
| | | String res = ""; |
| | | try{ |
| | | res = platformClientUtil.getFrameworkService().updateModule(this.check(object,"update"),this.getUserEntityInfo()); |
| | | }catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciBaseException(String.valueOf(e.code), e.messages); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | /** |
| | | * å 餿¨¡å |
| | | * @param puid |
| | | * @return |
| | | * @throws VciException |
| | | */ |
| | | public String deleteModule(String puid) throws VciBaseException{ |
| | | String res = ""; |
| | | try{ |
| | | res = platformClientUtil.getFrameworkService().deleteModule(puid,this.getUserEntityInfo()); |
| | | }catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciBaseException(String.valueOf(e.code), e.messages); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | /** |
| | | * VO转DO对象 |
| | | * @return |
| | | */ |
| | | public FunctionInfo menuVO2FunctionInfo(MenuVO object){ |
| | | FunctionInfo info = new FunctionInfo(); |
| | | info.id = object.getId() == null ? "" : object.getId(); |
| | | //info.layer = object.getLayer(); |
| | | info.name = object.getName() == null ? "" : object.getName(); |
| | | info.parentId = object.getParentId() == null ? "" : object.getParentId(); |
| | | info.resourceC = object.getPathC() == null ? "" : object.getPathC(); |
| | | //info.suffixC = object.getSuffixC() == null ? "" : object.getSuffixC(); |
| | | info.resourceB = object.getPath() == null ? "" : object.getPath(); |
| | | //info.suffixB = object.getSuffixB() == null ? "" : object.getSuffixB(); |
| | | info.desc = object.getRemark() == null ? "" : object.getRemark(); |
| | | info.seq = object.getSort(); |
| | | //info.moduleNo = object.getModuleNo(); |
| | | info.image = object.getSource() == null ? "" : object.getSource(); |
| | | info.isValid = object.getIsValid(); |
| | | info.aliasName = object.getAlias() == null ? "" : object.getAlias(); |
| | | info.resourceDotNet = object.getResourceDotNet() == null ? "" : object.getResourceDotNet(); |
| | | info.resourceMobile = object.getResourceMobile() == null ? "" : object.getResourceMobile(); |
| | | info.desc = object.getRemark(); |
| | | return info; |
| | | } |
| | | |
| | | /** |
| | | * <p>Description: 页é¢è¾å
¥çæ ¡éª</p> |
| | | * |
| | | *@author xf |
| | | *@time 2012-5-15 |
| | | *@return FunctionObject |
| | | * @return |
| | | */ |
| | | private FunctionInfo check(MenuVO menuVO,String type) { |
| | | FunctionInfo obj = new FunctionInfo(); |
| | | |
| | | //è·å表åè¾å
¥çå¼ |
| | | String modelName = menuVO.getName(); |
| | | String csIdentity = menuVO.getPathC(); |
| | | String bsIdentity = menuVO.getPath(); |
| | | String aliasName = menuVO.getAlias(); |
| | | String resDotNet = menuVO.getResourceDotNet(); |
| | | String resMobile = menuVO.getResourceMobile(); |
| | | |
| | | //int moduleNo = transferStringToNum(moduleNoTxt.getText()); |
| | | int sequence = menuVO.getSort(); |
| | | String description = menuVO.getRemark(); |
| | | |
| | | if("".equals(modelName) || "null".equals(modelName) || modelName == null) { |
| | | throw new VciBaseException("模ååä¸è½ä¸ºç©ºï¼"); |
| | | }else if(modelName.length() > 128) { |
| | | throw new VciBaseException("模ååé¿åº¦ä¸è½è¶
è¿128ï¼"); |
| | | }else if(description.length() > 255) { |
| | | throw new VciBaseException("æè¿°é¿åº¦ä¸è½è¶
è¿255ï¼"); |
| | | }else if(csIdentity != null && !"".equals(csIdentity) && csIdentity.length() > 255) { |
| | | throw new VciBaseException("C/Sæ è¯é¿åº¦ä¸è½è¶
è¿255ï¼"); |
| | | } else if(resDotNet != null && !"".equals(resDotNet) && resDotNet.length() > 255) { |
| | | throw new VciBaseException(".NETæ è¯é¿åº¦ä¸è½è¶
è¿255ï¼"); |
| | | }else if(resMobile != null && !"".equals(resMobile) && resMobile.length() > 255) { |
| | | throw new VciBaseException("Mobileæ è¯é¿åº¦ä¸è½è¶
è¿255ï¼"); |
| | | } else if (sequence < 0) { |
| | | throw new VciBaseException("åºå·ä¸è½å°äº0ï¼"); |
| | | } |
| | | if(type.equals("add")){ |
| | | //ç»object对象èµå¼ |
| | | String parentId = ""; |
| | | if(menuVO.getModeType().equals("FunctionObject")) { |
| | | parentId = menuVO.getParentId(); |
| | | }else if("modelManagmentNode".equals(menuVO.getParentId())) { |
| | | parentId = "modelManagmentNode"; |
| | | }else if("systemManagmentNode".equals(menuVO.getParentId())) { |
| | | parentId = "systemManagmentNode"; |
| | | } |
| | | obj.parentId = parentId; |
| | | }else{ |
| | | obj.id = menuVO.getId(); |
| | | obj.parentId = menuVO.getParentId(); |
| | | } |
| | | obj.name = modelName; |
| | | obj.resourceC = csIdentity; |
| | | obj.desc = description; |
| | | obj.resourceB = bsIdentity; |
| | | obj.suffixC = ""; |
| | | obj.suffixB = ""; |
| | | obj.seq = sequence; |
| | | obj.image = menuVO.getSource(); |
| | | obj.isValid = menuVO.getValid();//1ææ0æ æ |
| | | obj.aliasName = aliasName; |
| | | obj.resourceDotNet = resDotNet; |
| | | obj.resourceMobile = resMobile; |
| | | return obj; |
| | | } |
| | | |
| | | /** |
| | | * è·åUserEntityInfo对象 |
| | | * @return |
| | | */ |
| | | public UserEntityInfo getUserEntityInfo(){ |
| | | SessionInfo sessionInfo = WebThreadLocalUtil.getCurrentUserSessionInfoInThread(); |
| | | UserEntityInfo userEntityInfo = new UserEntityInfo(sessionInfo.getUserId(), ""); |
| | | return userEntityInfo; |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥æ¨¡å对象 |
| | | * add by caill |
| | | * */ |
| | | public boolean importModules(FunctionInfo[] funObject,int count) throws VciBaseException{ |
| | | boolean b=false; |
| | | int len = funObject.length; |
| | | List<FunctionInfo> funInfoList = new ArrayList<FunctionInfo>(); |
| | | for(int i = count ; i<len ; i++){ |
| | | if(funObject[i].parentId!=null){ |
| | | FunctionInfo funInfo = funObject[i]; |
| | | funInfoList.add(funInfo); |
| | | } |
| | | } |
| | | FunctionInfo[] funInfos = new FunctionInfo[funInfoList.size()]; |
| | | for(int j=0;j<funInfoList.size();j++){ |
| | | funInfos[j] = funInfoList.get(j); |
| | | } |
| | | |
| | | try { |
| | | b = platformClientUtil.getFrameworkService().importModules(funInfos,this.getUserEntityInfo()); |
| | | } catch (PLException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | return b; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å䏿¨¡å䏿¯å¦å·²ç»åå¨ç¸åçæä½ç±»å |
| | | * add by caill |
| | | * */ |
| | | public boolean selSameOper(String dataOperName,String plFuncOid) throws VciBaseException{ |
| | | boolean same=false; |
| | | try { |
| | | same = platformClientUtil.getFrameworkService().selSameOper(dataOperName,plFuncOid); |
| | | } catch (PLException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | return same; |
| | | } |
| | | |
| | | public OperateInfo fetchOperateTypeByName(String name) throws VciException { |
| | | try{ |
| | | OperateInfo info = platformClientUtil.getFrameworkService().fetchOperateTypeByName(name); |
| | | return info; |
| | | }catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciBaseException(String.valueOf(e.code),e.messages); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä¿åæä½ç±»å |
| | | * add by caill |
| | | * */ |
| | | public boolean saveFuncOperation2(FuncOperationInfo funcOperationInfo) throws VciException{ |
| | | try { |
| | | platformClientUtil.getFrameworkService().saveFuncOperation2(funcOperationInfo,this.getUserEntityInfo()); |
| | | } catch (PLException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | /** |
| | | * è¦çæä½ç±»å |
| | | * add by caill |
| | | * */ |
| | | public String updateOperation(FuncOperationInfo funcOperationInfo,String dataOperName,String plFuncOid) throws VciException{ |
| | | try { |
| | | platformClientUtil.getFrameworkService().updateOperation(funcOperationInfo,this.getUserEntityInfo(),dataOperName,plFuncOid); |
| | | } catch (PLException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public boolean updateFuncOperation(String id , String alias, boolean isSelected) throws VciException { |
| | | boolean res = false; |
| | | try{ |
| | | res = platformClientUtil.getFrameworkService().updateFuncOperation(id, alias, isSelected, this.getUserEntityInfo()); |
| | | }catch(PLException e){ |
| | | throw new VciException(String.valueOf(e.code), e.messages); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.frameworkcore.compatibility.ISmFunctionQueryService; |
| | | import com.vci.frameworkcore.compatibility.SmHMSysModConfigServiceI; |
| | | import com.vci.pagemodel.MenuVO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.util.ControllerUtil; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.util.Func; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * é¦é¡µç³»ç»æ¨¡åé
ç½®æ§å¶å¨ |
| | | * @author ludc |
| | | * @date 2024/8/19 10:55 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/hmSysModConfigController") |
| | | @VciUnCheckRight |
| | | public class HMSysModConfigController { |
| | | |
| | | /** |
| | | * åè½æ¥è¯¢æå¡ |
| | | */ |
| | | @Resource |
| | | private ISmFunctionQueryService functionQueryService; |
| | | |
| | | /** |
| | | * é¦é¡µç³»ç»é
ç½®æå¡ |
| | | */ |
| | | @Resource |
| | | private SmHMSysModConfigServiceI hmSysModConfigService; |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * è·åå½å模åä¸ç忍¡å |
| | | * @param parentId |
| | | * @param modeType |
| | | * @return |
| | | */ |
| | | @GetMapping("/getSysModelTreeMenuByPID") |
| | | public BaseResult<List<MenuVO>> getSysModelTreeMenuByPID(String parentId, String modeType) { |
| | | try { |
| | | return BaseResult.dataList(functionQueryService.getSysModelTreeMenuByPID(parentId,modeType,true)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String errorMsg = "æ¥è¯¢åæ¨¡åæ¶åºç°é误ï¼åå ï¼"+ VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(errorMsg); |
| | | throw new VciBaseException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ·»å æ¨¡å |
| | | * @param menuVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/addModel") |
| | | public BaseResult addModel(@RequestBody MenuVO menuVO) { |
| | | try { |
| | | return BaseResult.success(hmSysModConfigService.addModule(menuVO),"模åå¢å æå"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String errorMsg = "å¢å æ¨¡åæ¶åºç°é误ï¼åå ï¼"+ VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(errorMsg); |
| | | throw new VciBaseException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹æ¨¡å |
| | | * @param menuVO |
| | | * @return |
| | | */ |
| | | @PutMapping("/updateModel") |
| | | public BaseResult updateModel(@RequestBody MenuVO menuVO) { |
| | | try { |
| | | return BaseResult.success(hmSysModConfigService.updateModule(menuVO),"模åä¿®æ¹æå"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String errorMsg = "ä¿®æ¹æ¨¡åæ¶åºç°é误ï¼åå ï¼"+ VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(errorMsg); |
| | | throw new VciBaseException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å 餿¨¡å |
| | | * @param menuVO |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/delModule") |
| | | public BaseResult delModule(@RequestBody MenuVO menuVO) { |
| | | try { |
| | | return BaseResult.success(hmSysModConfigService.delModule(menuVO),"模åå 餿å"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String errorMsg = "å 餿¨¡åæ¶åºç°é误ï¼åå ï¼"+ VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(errorMsg); |
| | | throw new VciBaseException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 管çåè½æ¨¡åãä¸å¡åè½æ¨¡åä¸çå¶åèç¹âä¿®æ¹æä½å«åæ¥å£ |
| | | * @param menuVO |
| | | * @return |
| | | */ |
| | | @PutMapping("/updateAlias") |
| | | public BaseResult updateAlias(@RequestBody MenuVO menuVO) { |
| | | try { |
| | | return BaseResult.success(hmSysModConfigService.updateAlias(menuVO),"æä½å«åä¿®æ¹æå"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String errorMsg = "æä½å«åä¿®æ¹æ¶åºç°é误ï¼åå ï¼"+ VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(errorMsg); |
| | | throw new VciBaseException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ·»å æä½ç±»å |
| | | * @param menuVOList |
| | | * @return |
| | | */ |
| | | @PostMapping("/addOperationType") |
| | | public BaseResult addOperationType(@RequestBody List<MenuVO> menuVOList) { |
| | | try { |
| | | return BaseResult.success(hmSysModConfigService.addOperationType(menuVOList),"æä½ç±»åæ·»å æå"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String errorMsg = "å 餿¨¡åæ¶åºç°é误ï¼åå ï¼"+ VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(errorMsg); |
| | | throw new VciBaseException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å é¤éç³»ç»æ¨¡å |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/delNonsysModule") |
| | | public BaseResult delNonsysModule() { |
| | | try { |
| | | return BaseResult.success(hmSysModConfigService.delNonsysModule(),"å é¤éç³»ç»æ¨¡åæå"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String errorMsg = "å é¤éç³»ç»æ¨¡åæ¶åºç°é误ï¼åå ï¼"+ VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(errorMsg); |
| | | throw new VciBaseException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å é¤ä¸å¡æ¨¡å |
| | | * @return |
| | | */ |
| | | @PostMapping("/delBusinessModule") |
| | | public BaseResult delBusinessModule() { |
| | | try { |
| | | return BaseResult.success(hmSysModConfigService.delBusinessModule(),"å é¤ä¸å¡æ¨¡å"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String errorMsg = "å é¤ä¸å¡æ¨¡åæ¶åºç°é误ï¼åå ï¼"+ VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(errorMsg); |
| | | throw new VciBaseException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 导åºç®¡çåè½æ¨¡åææä½ç±»åç®¡çæ¨¡åsql |
| | | * @return |
| | | */ |
| | | @GetMapping("/exportFunctionSql") |
| | | public void exportFunctionSql(HttpServletResponse response,String exportPath,boolean isFunction) { |
| | | try { |
| | | File file = hmSysModConfigService.exportFunctionSql(response,exportPath,isFunction); |
| | | ControllerUtil.writeFileToResponse(response,file,true); |
| | | } catch (Exception e) { |
| | | String msg = "导åºsqlæ¶åºç°é误ï¼åå ï¼" + VciBaseUtil.getExceptionMessage(e); |
| | | try { |
| | | //åºéæ¶ |
| | | e.printStackTrace(); |
| | | ControllerUtil.writeDataToResponse(response,"error_" + Func.format(new Date(),"yyyy-MM-dd HHmmss.sss") + ".txt", StringUtils.isNotBlank(msg)?msg.getBytes():new byte[0],null); |
| | | } catch (IOException ioException) { |
| | | ioException.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åºæ¨¡å |
| | | * @return |
| | | */ |
| | | @GetMapping("/exportModule") |
| | | public void exportModule(HttpServletResponse response) { |
| | | try { |
| | | String excelPath = hmSysModConfigService.exportModule(response); |
| | | ControllerUtil.writeFileToResponse(response,excelPath); |
| | | } catch (Exception e) { |
| | | String msg = "å¯¼åºæ¨¡åæ¶åºç°é误ï¼åå ï¼" + VciBaseUtil.getExceptionMessage(e); |
| | | try { |
| | | //åºéæ¶ |
| | | e.printStackTrace(); |
| | | ControllerUtil.writeDataToResponse(response,"error_" + Func.format(new Date(),"yyyy-MM-dd HHmmss.sss") + ".txt", StringUtils.isNotBlank(msg)?msg.getBytes():new byte[0],null); |
| | | } catch (IOException ioException) { |
| | | ioException.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥æ¨¡å |
| | | * @return |
| | | */ |
| | | @GetMapping("/importModule") |
| | | public BaseResult importModule(@RequestParam("files") List<MultipartFile> files) { |
| | | LinkedList<File> fileList = new LinkedList<>(); |
| | | try { |
| | | for (MultipartFile file : files) { |
| | | String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename()); |
| | | File file1 = new File(excelFileName); |
| | | file.transferTo(file1); |
| | | fileList.add(file1); |
| | | } |
| | | if(Func.isEmpty(fileList)){ |
| | | return hmSysModConfigService.importModule(fileList); |
| | | } else { |
| | | return BaseResult.fail(FrameWorkLangCodeConstant.IMPORT_FAIL, new String[]{"æ 导å
¥çæä»¶"}); |
| | | } |
| | | }catch (Throwable e) { |
| | | throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e); |
| | | }finally { |
| | | fileList.stream().forEach(file -> file.delete()); |
| | | } |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.dto.PLActionClsDTO; |
| | | import com.vci.dto.PLActionDTO; |
| | | import com.vci.dto.PLActionQueryDTO; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.web.service.OsActionServiceI; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Action管ççæ§å¶å¨ |
| | | * @author yuxc |
| | | * @date 2024-8-16 |
| | | */ |
| | | @RequestMapping("/actionController") |
| | | @RestController |
| | | public class OsActionController { |
| | | |
| | | /** |
| | | * Actionæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsActionServiceI osActionServiceI; |
| | | |
| | | /** |
| | | * ä¿åActionåç±»ä¿¡æ¯ |
| | | * @param pLActionCls Actionåç±»ä¿¡æ¯ |
| | | * @return ä¿åç»æ |
| | | */ |
| | | @PostMapping("/saveActionCls") |
| | | public BaseResult saveActionCls(@RequestBody PLActionClsDTO pLActionCls){ |
| | | try { |
| | | return osActionServiceI.saveActionCls(pLActionCls); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹Actionåç±»ä¿¡æ¯ |
| | | * @param pLActionCls Actionåç±»ä¿¡æ¯ |
| | | * @return ä¿®æ¹ç»æ |
| | | */ |
| | | @PostMapping("/updateActionCls") |
| | | public BaseResult updateActionCls(@RequestBody PLActionClsDTO pLActionCls){ |
| | | try { |
| | | return osActionServiceI.updateActionCls(pLActionCls); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åActionåç±»æ |
| | | * isExp æ¯å¦ç¨æ·å¯¼åº trueæ¯ï¼falseå¦ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @GetMapping("/getActionTree") |
| | | public BaseResult getActionTree(boolean isExp){ |
| | | try { |
| | | return osActionServiceI.getActionTree(isExp); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åActionè¡¨æ ¼æ°æ® |
| | | * dto æ¥è¯¢æ¡ä»¶ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @PostMapping("/getActionTableData") |
| | | public BaseResult getActionTableData(@RequestBody PLActionQueryDTO dto){ |
| | | try { |
| | | return osActionServiceI.getActionTableData(dto); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä¿åActionæ°æ® |
| | | * dto actionä¼ è¾å¯¹è±¡ |
| | | * @return ä¿åç»æ |
| | | */ |
| | | @PostMapping("/saveAction") |
| | | public BaseResult saveAction(@RequestBody PLActionDTO dto){ |
| | | try { |
| | | return osActionServiceI.saveAction(dto); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹Actionæ°æ® |
| | | * dto actionä¼ è¾å¯¹è±¡ |
| | | * @return ä¿®æ¹ç»æ |
| | | */ |
| | | @PostMapping("/updateAction") |
| | | public BaseResult updateAction(@RequestBody PLActionDTO dto){ |
| | | try { |
| | | return osActionServiceI.updateAction(dto); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å é¤Actionæ°æ® |
| | | * dto actionä¼ è¾å¯¹è±¡ |
| | | * @return å é¤ç»æ |
| | | */ |
| | | @DeleteMapping("/deleteAction") |
| | | public BaseResult deleteAction(@RequestBody PLActionDTO dto){ |
| | | try { |
| | | return osActionServiceI.deleteAction(dto); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 导åºAction |
| | | * @return |
| | | */ |
| | | @PostMapping("/exportBeans") |
| | | public void exportBeans(@RequestBody List<String> actionOid, HttpServletResponse response) throws PLException, IOException { |
| | | osActionServiceI.exportBeans(actionOid, response); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * è·åå½å模åä¸ç忍¡å |
| | | * @param parentId |
| | | * @return |
| | | * @throws PLException |
| | | */ |
| | | @GetMapping("/getSysModelTreeMenuByPID") |
| | | @VciUnCheckRight |
| | | public List<MenuVO> getSysModelTreeMenuByPID(String parentId) { |
| | | try { |
| | | return functionQueryService.getSysModelTreeMenuByPID(parentId,true); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String errorMsg = "æ¥è¯¢åæ¨¡åæ¶åºç°é误ï¼åå ï¼"+VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(errorMsg); |
| | | throw new VciBaseException(errorMsg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åå½åç¨æ·çèå |
| | | * @param treeQueryObject æ æ¥è¯¢å¯¹è±¡ |
| | | * @return æ èç¹ï¼åºç°é误ä¼å¨å¼å¸¸å¤çå¨ä¸ç»ä¸è¿åJson |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.dto.PortalVIDTO; |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.pagemodel.PortalVIVO; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.web.enumpck.ItemDblEnum; |
| | | import com.vci.web.enumpck.ItemTypeEnum; |
| | | import com.vci.web.service.OsPortalVIServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å
¬å¼æ§å¶å¨ |
| | | * @author weidy |
| | | * @date 2022-2-11 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/portalVIController") |
| | | public class WebPortalVIController { |
| | | private OsPortalVIServiceI portalVIServiceI; |
| | | /** |
| | | * 表åå表 |
| | | * viType:表åç±»å;Form("Form", "表å", (short)1), Table("Table", "è¡¨æ ¼", (short)0); |
| | | * viTypeFlag: LinkType("LinkType", "龿¥ç±»åç表å", (short)1), BtmType("BtmType", "ä¸å¡ç±»åç表å", (short)0); |
| | | * @param baseQueryObject æ¥è¯¢æ¡ä»¶ |
| | | * @return å表çå
容 |
| | | */ |
| | | @GetMapping( "/referDataGrid") |
| | | @VciBusinessLog(operateName = "表å/è¡¨æ ¼å表") |
| | | public DataGrid<PortalVIVO> referDataGrid(BaseQueryObject baseQueryObject){ |
| | | return portalVIServiceI.gridPortalVIVOs(baseQueryObject); |
| | | } |
| | | |
| | | /** |
| | | * 表å/tableä¿å |
| | | * @param portalVIDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/savePortalVI") |
| | | @VciBusinessLog(operateName = "æ·»å 表å/è¡¨æ ¼") |
| | | public BaseResult savePortalVI(@RequestBody PortalVIDTO portalVIDTO){ |
| | | if(StringUtils.isNotBlank(portalVIDTO.getId())){ |
| | | return portalVIServiceI.edit(portalVIDTO); |
| | | }else{ |
| | | return portalVIServiceI.add(portalVIDTO); |
| | | } |
| | | |
| | | } |
| | | /** |
| | | * è·å屿§å段类å |
| | | */ |
| | | @GetMapping("/getItemTypeList") |
| | | @VciBusinessLog(operateName = "屿§å段类å") |
| | | public BaseResult<List<KeyValue>> getItemTypeList(){ |
| | | return BaseResult.dataList(ItemTypeEnum.getEnumAll()); |
| | | } |
| | | /** |
| | | * è·åè¶
龿¥å¼¹åºæ¹æ³ |
| | | */ |
| | | @GetMapping("/getItemDblList") |
| | | @VciBusinessLog(operateName = "屿§å段类å") |
| | | public BaseResult<List<KeyValue>> getItemDblList(){ |
| | | return BaseResult.dataList(ItemDblEnum.getEnumAll()); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.enumpck; |
| | | |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public enum ItemDblEnum implements BaseEnum { |
| | | EDIT_PANEL("0","ä¿®æ¹é¡µé¢"), |
| | | CUSTOM_PANEL("1","èªå®ä¹é¡µé¢"), |
| | | DIALOG("2","å¼¹åºå°çªå£"), |
| | | OVERLOOK("3", "忽ç¥"); |
| | | /** |
| | | * æä¸¾çå¼ |
| | | */ |
| | | private String value; |
| | | |
| | | /** |
| | | * æä¸¾æ¾ç¤ºææ¬ |
| | | */ |
| | | private String text; |
| | | |
| | | /** |
| | | * è·åæä¸¾å¼ |
| | | * |
| | | * @return æä¸¾å¼ |
| | | */ |
| | | @Override |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | /** |
| | | * 设置æä¸¾å¼ |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | */ |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾æ¾ç¤ºææ¬ |
| | | * |
| | | * @return æ¾ç¤ºææ¬ |
| | | */ |
| | | @Override |
| | | public String getText() { |
| | | return text; |
| | | } |
| | | |
| | | /** |
| | | * 设置æ¾ç¤ºææ¬ |
| | | * |
| | | * @param text æ¾ç¤ºææ¬ |
| | | */ |
| | | public void setText(String text) { |
| | | this.text = text; |
| | | } |
| | | ItemDblEnum(String value, String text) { |
| | | this.value = value; |
| | | this.text = text; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®åç§°è·å对åºçæä¸¾å¼ |
| | | * |
| | | * @param text åç§° |
| | | * @return æä¸¾å¼ |
| | | */ |
| | | public static String getValueByText(String text) { |
| | | for (ItemDblEnum wenum : ItemDblEnum.values()) { |
| | | if (wenum.getText().equalsIgnoreCase(text)) { |
| | | return wenum.getValue(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æä¸¾å¼è·ååç§° |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | * @return åç§° |
| | | */ |
| | | public static String getTextByValue(String value) { |
| | | for (ItemDblEnum wenum : ItemDblEnum.values()) { |
| | | if (wenum.getValue().equalsIgnoreCase(value)) { |
| | | return wenum.getText(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | /** |
| | | * æ ¹æ®æä¸¾å¼è·åæä¸¾å¯¹è±¡ |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | * @return æä¸¾å¯¹è±¡ï¼ä¸å卿¶åè¿ånull |
| | | */ |
| | | public static ItemDblEnum forValue(String value) { |
| | | for (ItemDblEnum wenum : ItemDblEnum.values()) { |
| | | if (wenum.getValue().equalsIgnoreCase(value)) { |
| | | return wenum; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | * æ ¹æ®æä¸¾å¼è·ååç§° |
| | | * |
| | | * @return åç§° |
| | | */ |
| | | public static List<KeyValue> getEnumAll() { |
| | | List<KeyValue> enumDataList=new ArrayList<>(); |
| | | for (ItemDblEnum wenum : ItemDblEnum.values()) { |
| | | KeyValue enumData=new KeyValue(); |
| | | enumData.setKey(wenum.value); |
| | | enumData.setValue(wenum.text); |
| | | enumDataList.add(enumData); |
| | | } |
| | | return enumDataList; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.enumpck; |
| | | |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | public enum ItemTypeEnum implements BaseEnum { |
| | | TEXT("text","åè¡ææ¬æ¡"), |
| | | TEXTBTN("textbtn","ææ¬æé®æ¡"), |
| | | TEXTAREA("textarea","å¤è¡ææ¬æ¡"), |
| | | RICHTEXT("richtext","å¯ææ¬æ¡"), |
| | | NUMBER("number","æ°åè¾å
¥æ¡"), |
| | | PASSWORD("password","å¯ç æ¡"), |
| | | RADIO("radio","åéæé®"), |
| | | CHECKBOX("checkbox","å¤éæé®"), |
| | | SELECT("select","䏿èå"), |
| | | MULTISELECT("multiselect","å¤é䏿èå"), |
| | | DATE("date","æ¥æè¾å
¥æ¡"), |
| | | TIME("time","æ¶é´è¾å
¥æ¡"), |
| | | DATETIME("datetime","æ¥ææ¶é´è¾å
¥æ¡"), |
| | | FILE("file","æä»¶ä¸ä¼ "), |
| | | MULTIFILE("multiFile","夿件ä¸ä¼ "), |
| | | CUSTOM("custom","èªå®ä¹"), |
| | | CUSTOMFORM("customform","èªå®ä¹è¡¨å"), |
| | | HIDDEN("hidden","éèææ®éæå"), |
| | | WEBEDITOR("webeditor","Webç¼è¾å¨"), |
| | | SPECIALCHARACTER("specialCharacter","ç¹æ®å符"); |
| | | |
| | | |
| | | |
| | | /** |
| | | * æä¸¾çå¼ |
| | | */ |
| | | private String value; |
| | | |
| | | /** |
| | | * æä¸¾æ¾ç¤ºææ¬ |
| | | */ |
| | | private String text; |
| | | |
| | | /** |
| | | * è·åæä¸¾å¼ |
| | | * |
| | | * @return æä¸¾å¼ |
| | | */ |
| | | @Override |
| | | public String getValue() { |
| | | return value; |
| | | } |
| | | |
| | | /** |
| | | * 设置æä¸¾å¼ |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | */ |
| | | public void setValue(String value) { |
| | | this.value = value; |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾æ¾ç¤ºææ¬ |
| | | * |
| | | * @return æ¾ç¤ºææ¬ |
| | | */ |
| | | @Override |
| | | public String getText() { |
| | | return text; |
| | | } |
| | | |
| | | /** |
| | | * 设置æ¾ç¤ºææ¬ |
| | | * |
| | | * @param text æ¾ç¤ºææ¬ |
| | | */ |
| | | public void setText(String text) { |
| | | this.text = text; |
| | | } |
| | | ItemTypeEnum(String value, String text) { |
| | | this.value = value; |
| | | this.text = text; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®åç§°è·å对åºçæä¸¾å¼ |
| | | * |
| | | * @param text åç§° |
| | | * @return æä¸¾å¼ |
| | | */ |
| | | public static String getValueByText(String text) { |
| | | for (ItemTypeEnum wenum : ItemTypeEnum.values()) { |
| | | if (wenum.getText().equalsIgnoreCase(text)) { |
| | | return wenum.getValue(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æä¸¾å¼è·ååç§° |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | * @return åç§° |
| | | */ |
| | | public static String getTextByValue(String value) { |
| | | for (ItemTypeEnum wenum : ItemTypeEnum.values()) { |
| | | if (wenum.getValue().equalsIgnoreCase(value)) { |
| | | return wenum.getText(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | /** |
| | | * æ ¹æ®æä¸¾å¼è·åæä¸¾å¯¹è±¡ |
| | | * |
| | | * @param value æä¸¾å¼ |
| | | * @return æä¸¾å¯¹è±¡ï¼ä¸å卿¶åè¿ånull |
| | | */ |
| | | public static ItemTypeEnum forValue(String value) { |
| | | for (ItemTypeEnum wenum : ItemTypeEnum.values()) { |
| | | if (wenum.getValue().equalsIgnoreCase(value)) { |
| | | return wenum; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | * æ ¹æ®æä¸¾å¼è·ååç§° |
| | | * |
| | | * @return åç§° |
| | | */ |
| | | public static List<KeyValue> getEnumAll() { |
| | | List<KeyValue> enumDataList=new ArrayList<>(); |
| | | for (ItemTypeEnum wenum : ItemTypeEnum.values()) { |
| | | KeyValue enumData=new KeyValue(); |
| | | enumData.setKey(wenum.value); |
| | | enumData.setValue(wenum.text); |
| | | enumDataList.add(enumData); |
| | | } |
| | | return enumDataList; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.enumpck; |
| | | |
| | | import com.vci.common.portal.enums.GetByType; |
| | | |
| | | /** |
| | | * 表åç±»å |
| | | * @author xiej |
| | | * |
| | | */ |
| | | public enum PortalVIType { |
| | | Form("Form", "表å", (short)1), |
| | | Table("Table", "è¡¨æ ¼", (short)0); |
| | | |
| | | private String name = ""; |
| | | private String label = ""; |
| | | private short intVal = 1; |
| | | |
| | | private PortalVIType(String name, String label, short intVal){ |
| | | this.name = name; |
| | | this.label = label; |
| | | this.intVal = intVal; |
| | | } |
| | | |
| | | public static PortalVIType getByName(String name){ |
| | | PortalVIType res = getByType(GetByType.Name, name); |
| | | return res; |
| | | } |
| | | |
| | | public static PortalVIType getByLabel(String label){ |
| | | PortalVIType res = getByType(GetByType.Label, label); |
| | | return res; |
| | | } |
| | | |
| | | public static PortalVIType getByIntVal(int intVal){ |
| | | PortalVIType res = getByType(GetByType.IntVal, String.valueOf(intVal)); |
| | | return res; |
| | | } |
| | | |
| | | public static PortalVIType getByType(GetByType type, String val){ |
| | | PortalVIType[] alls = getAll(); |
| | | PortalVIType res = null; |
| | | for(PortalVIType obj : alls){ |
| | | if(type == GetByType.Name && obj.getName().equalsIgnoreCase(val)){ |
| | | res = obj; |
| | | break; |
| | | } else if(type == GetByType.Label && obj.getLabel().equalsIgnoreCase(val)){ |
| | | res = obj; |
| | | break; |
| | | } else if(type == GetByType.IntVal && String.valueOf(obj.getIntVal()).equalsIgnoreCase(val)){ |
| | | res = obj; |
| | | break; |
| | | } |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | public static PortalVIType[] getAll(){ |
| | | return PortalVIType.values(); |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getLabel() { |
| | | return label; |
| | | } |
| | | |
| | | public void setLabel(String label) { |
| | | this.label = label; |
| | | } |
| | | |
| | | public short getIntVal() { |
| | | return intVal; |
| | | } |
| | | |
| | | public void setIntVal(short intVal) { |
| | | this.intVal = intVal; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.enumpck; |
| | | |
| | | import com.vci.common.portal.enums.GetByType; |
| | | |
| | | /** |
| | | * è¡¨åæ è®°ç±»å |
| | | * @author xiej |
| | | * |
| | | */ |
| | | public enum PortalVITypeFlag { |
| | | LinkType("LinkType", "龿¥ç±»åç表å", (short)1), |
| | | BtmType("BtmType", "ä¸å¡ç±»åç表å", (short)0); |
| | | |
| | | private String name = ""; |
| | | private String label = ""; |
| | | private short intVal = 1; |
| | | |
| | | private PortalVITypeFlag(String name, String label, short intVal){ |
| | | this.name = name; |
| | | this.label = label; |
| | | this.intVal = intVal; |
| | | } |
| | | |
| | | public static PortalVITypeFlag getByName(String name){ |
| | | PortalVITypeFlag res = getByType(GetByType.Name, name); |
| | | return res; |
| | | } |
| | | |
| | | public static PortalVITypeFlag getByLabel(String label){ |
| | | PortalVITypeFlag res = getByType(GetByType.Label, label); |
| | | return res; |
| | | } |
| | | |
| | | public static PortalVITypeFlag getByIntVal(int intVal){ |
| | | PortalVITypeFlag res = getByType(GetByType.IntVal, String.valueOf(intVal)); |
| | | return res; |
| | | } |
| | | |
| | | public static PortalVITypeFlag getByType(GetByType type, String val){ |
| | | PortalVITypeFlag[] alls = getAll(); |
| | | PortalVITypeFlag res = null; |
| | | for(PortalVITypeFlag obj : alls){ |
| | | if(type == GetByType.Name && obj.getName().equalsIgnoreCase(val)){ |
| | | res = obj; |
| | | break; |
| | | } else if(type == GetByType.Label && obj.getLabel().equalsIgnoreCase(val)){ |
| | | res = obj; |
| | | break; |
| | | } else if(type == GetByType.IntVal && String.valueOf(obj.getIntVal()).equalsIgnoreCase(val)){ |
| | | res = obj; |
| | | break; |
| | | } |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | public static PortalVITypeFlag[] getAll(){ |
| | | return PortalVITypeFlag.values(); |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getLabel() { |
| | | return label; |
| | | } |
| | | |
| | | public void setLabel(String label) { |
| | | this.label = label; |
| | | } |
| | | |
| | | public short getIntVal() { |
| | | return intVal; |
| | | } |
| | | |
| | | public void setIntVal(short intVal) { |
| | | this.intVal = intVal; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.other; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | public class ExportActionLogBean implements IExportLogBean { |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 10086L; |
| | | private String no = "1"; |
| | | private static int index = 1; |
| | | private String exportState = "æ£å¸¸"; |
| | | private String coding = ""; |
| | | private String name =""; |
| | | private String CSRegister = ""; |
| | | private String BSRegister = ""; |
| | | private String type = ""; |
| | | private String description = ""; |
| | | private String category = ""; |
| | | private Date date = null; |
| | | private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss "); |
| | | |
| | | public ExportActionLogBean() { |
| | | |
| | | this( "-1", "ExportActionLogBean 对象æå»º 使ªè®¾ç½®å¼", "null", |
| | | "null", "null", "null", "null", |
| | | "null", "null" ); |
| | | index = 1; |
| | | |
| | | } |
| | | public ExportActionLogBean(String exportState, String coding, |
| | | String name, String cSRegister, String bSRegister, String type, |
| | | String description, String category) { |
| | | this( ""+index++, exportState, coding, |
| | | name, cSRegister, bSRegister,type, |
| | | description,category); |
| | | } |
| | | public ExportActionLogBean(String no, String exportState, String coding, |
| | | String name, String cSRegister, String bSRegister, String type, |
| | | String description, String category) { |
| | | super(); |
| | | this.no = no; |
| | | if( exportState!=null || !no.equals("-1")){//é»è®¤ç¶æä¸ºæ£å¸¸ |
| | | this.exportState = exportState; |
| | | } |
| | | |
| | | this.coding = coding; |
| | | this.name = name; |
| | | CSRegister = cSRegister; |
| | | BSRegister = bSRegister; |
| | | this.type = type; |
| | | this.description = description; |
| | | this.category = category; |
| | | } |
| | | |
| | | @Override |
| | | public Object[] getLogRowObjcets() { |
| | | Object obj []= {no,exportState,coding,name,CSRegister,BSRegister,type,description,category}; |
| | | return obj; |
| | | } |
| | | |
| | | public Object[] getInportLogRowObjcets() { |
| | | Object obj []= {no,exportState,coding,name,CSRegister,BSRegister,type,description}; |
| | | return obj; |
| | | } |
| | | |
| | | public String getNo() { |
| | | return no; |
| | | } |
| | | |
| | | public String getExportState() { |
| | | return exportState; |
| | | } |
| | | |
| | | |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public String getCSRegister() { |
| | | return CSRegister; |
| | | } |
| | | |
| | | public String getBSRegister() { |
| | | return BSRegister; |
| | | } |
| | | |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | |
| | | public String getDescription() { |
| | | return description; |
| | | } |
| | | |
| | | public String getCategory() { |
| | | return category; |
| | | } |
| | | |
| | | public void setNo(String no) { |
| | | this.no = no; |
| | | } |
| | | |
| | | public void setExportState(String exportState) { |
| | | this.exportState = exportState; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public void setCSRegister(String cSRegister) { |
| | | CSRegister = cSRegister; |
| | | } |
| | | |
| | | public void setBSRegister(String bSRegister) { |
| | | BSRegister = bSRegister; |
| | | } |
| | | |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public void setDescription(String description) { |
| | | this.description = description; |
| | | } |
| | | |
| | | public void setCategory(String category) { |
| | | this.category = category; |
| | | } |
| | | |
| | | @Override |
| | | public String getLogRowContent() { |
| | | date = new Date(); |
| | | String info =format.format(date)+"---------"; |
| | | return info+" [åºå·=" + no + ", 导åºç¶æ=" + exportState |
| | | + ", ç¼å·=" + coding + ", åç§°=" + name + ", CS注å=" |
| | | + CSRegister + ", BS注å=" + BSRegister + ", ç±»å=" + type |
| | | + ", æè¿°=" + description + ", æå±åç±»=" + category |
| | | + "]"; |
| | | |
| | | } |
| | | |
| | | public String getCoding() { |
| | | return coding; |
| | | } |
| | | |
| | | public void setCoding(String coding) { |
| | | this.coding = coding; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.other; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.Map.Entry; |
| | | import com.vci.corba.portal.data.PLAction; |
| | | import com.vci.corba.portal.data.PLActionCls; |
| | | import com.vci.corba.portal.data.PLActionParam; |
| | | |
| | | |
| | | public class ExportBeans implements Serializable{ |
| | | private static final long serialVersionUID = 10086L; |
| | | private HashMap<String/*ActionId*/,PLAction> PLActionBeans = new HashMap<String,PLAction>(); |
| | | private HashMap<String/*åç±»åç§°*/,String/*id*/> PLActionClsExt = new HashMap<String,String>(); |
| | | private HashMap<String/*id*/,PLActionCls> PLActionClsBeans = new HashMap<String,PLActionCls>(); |
| | | private HashMap<String/*Actionç¼ç */, ArrayList<PLActionParam> > PLActionParamBeans = new HashMap<String, ArrayList<PLActionParam> >(); |
| | | private HashMap<String/*ActionClsç¼ç */, ArrayList<PLAction> > PLActionListsMap = null; |
| | | private ExportActionLogBean logBean = null;//æ¥å¿æä»¶ |
| | | |
| | | public ExportBeans() { |
| | | |
| | | logBean = new ExportActionLogBean(); |
| | | } |
| | | public HashMap<String, PLActionCls> getPLActionClsBeans() { |
| | | return PLActionClsBeans; |
| | | } |
| | | public HashMap<String, PLAction> getPLActions() { |
| | | return PLActionBeans; |
| | | } |
| | | |
| | | public void addPLActionClsBean(PLActionCls pLActionCls){ |
| | | PLActionClsBeans.put(pLActionCls.id, pLActionCls); |
| | | PLActionClsExt.put(pLActionCls.name,pLActionCls.id); |
| | | |
| | | } |
| | | public PLActionCls getPLActionClsBeanById(String id){ |
| | | return PLActionClsBeans.get(id); |
| | | } |
| | | public PLActionCls getPLActionClsBeanByName(String name){ |
| | | if(PLActionClsExt.get(name) == null){ |
| | | return null; |
| | | } |
| | | return PLActionClsBeans.get(PLActionClsExt.get(name)); |
| | | } |
| | | /** |
| | | * æ·»å PLActionBeanå¹¶åæ¶æ·»å PLActionBean对åºåæ°è¿è¡è®°å½ |
| | | * @param pLAction |
| | | */ |
| | | // public void addPLActionBean(PLAction pLAction){ |
| | | // this.addPLActionBean(pLAction,null); |
| | | // } |
| | | /** |
| | | * æ·»å PLActionBeanå logBeanåå
¥å¼ |
| | | * |
| | | */ |
| | | public void setLogBean(ExportActionLogBean logBean) { |
| | | this.logBean = logBean; |
| | | } |
| | | /** |
| | | * æ·»å PLActionBeanå logBeanåå
¥å¼ |
| | | * |
| | | */ |
| | | public ExportActionLogBean getLogBean() { |
| | | return logBean; |
| | | } |
| | | |
| | | public PLAction getPLActionById(String pLActionId){ |
| | | return PLActionBeans.get(pLActionId); |
| | | } |
| | | public ArrayList<PLAction> getPLActionByPlActionClsId(String plActionClsId){ |
| | | if( PLActionListsMap == null){ |
| | | PLActionListsMap = new HashMap<String/*ActionClsç¼ç */,ArrayList<PLAction>>(); |
| | | for (Entry<String, PLAction> PLActionEntry : PLActionBeans.entrySet()) { |
| | | String PLActionListsMapKey = PLActionEntry.getValue().plActionCls ; |
| | | if(PLActionListsMapKey.equals("")){ |
| | | PLActionListsMapKey = "when key is null ,change the key to this"; |
| | | } |
| | | ArrayList<PLAction> actionList = PLActionListsMap.get(PLActionListsMapKey); |
| | | if( actionList == null){ |
| | | actionList = new ArrayList<PLAction>(); |
| | | actionList.add(PLActionEntry.getValue()); |
| | | PLActionListsMap.put(PLActionListsMapKey,actionList); |
| | | }else{ |
| | | actionList.add(PLActionEntry.getValue()); |
| | | } |
| | | |
| | | } |
| | | }; |
| | | |
| | | if(plActionClsId.equals("")){ |
| | | plActionClsId = "when key is null ,change the key to this"; |
| | | } |
| | | return PLActionListsMap.get(plActionClsId); |
| | | } |
| | | public void addPLActionParamBean(PLActionParam pLActionParam){ |
| | | if(pLActionParam.action!=null && pLActionParam.action!=""){ |
| | | if(PLActionParamBeans.get(pLActionParam.action) == null){ |
| | | ArrayList<PLActionParam> arraylist = new ArrayList<PLActionParam>(); |
| | | PLActionParamBeans.put(pLActionParam.action, arraylist); |
| | | } |
| | | PLActionParamBeans.get(pLActionParam.action).add(pLActionParam); |
| | | } |
| | | |
| | | } |
| | | public PLActionParam[] getPLActionParamArrayByActionId(String paramString){ |
| | | ArrayList<PLActionParam> pLActionParams = PLActionParamBeans.get(paramString); |
| | | |
| | | if(pLActionParams != null && pLActionParams.size() > 0 ){ |
| | | PLActionParam[] actionParams = new PLActionParam[pLActionParams.size()]; |
| | | for (int i = 0; i < pLActionParams.size(); i++) { |
| | | actionParams[i] = pLActionParams.get(i); |
| | | } |
| | | return actionParams; |
| | | } |
| | | return null; |
| | | } |
| | | // /** |
| | | // * æ·»å PLActionBeanå¹¶åæ¶æ·»å PLActionBean对åºåæ°è¿è¡è®°å½ |
| | | // * è½è¿æ¹ä¾¿è·å¾categoryæ¶ç¨æ¤æ¹æ³. å¯ä»¥éä½ç³»ç»æ¶è |
| | | // * @param pLAction |
| | | // */ |
| | | // public void addPLActionBean(PLAction plAction, String category) { |
| | | // PLActionBeans.put(plAction.plOId, plAction); |
| | | // PLActionCls[] plActionCls = null; |
| | | // |
| | | // try { |
| | | // if(category == null ){ |
| | | // plActionCls = UITools.getService().getPLActionClsArray(); |
| | | // for (PLActionCls plActionCls2 : plActionCls) {//è·å¾åç±»åç§° |
| | | // if(plActionCls2.id.equals(plAction.plActionCls)){ |
| | | // category = plActionCls2.name ; |
| | | // } |
| | | // } |
| | | // } |
| | | // PLActionParam[] params = UITools.getService().getPLActionParamArrayByActionId(plAction.plOId); |
| | | // if(params != null && params.length > 0){//妿忰åå¨ |
| | | // for (PLActionParam plActionParam : params) {//æ·»å actionåæ° |
| | | // this.addPLActionParamBean(plActionParam); |
| | | // } |
| | | // } |
| | | // logBean = new ExportActionLogBean(ExportActionLogBean.RIGHT_STATE, |
| | | // plAction.plCode,plAction.plName,plAction.plCSClass,plAction.plBSUrl, |
| | | // plAction.plTypeType,plAction.plDesc,category); |
| | | // |
| | | // } catch (PLException e) { |
| | | // logBean = new ExportActionLogBean(e.getMessage(), |
| | | // plAction.plCode,plAction.plName,plAction.plCSClass,plAction.plBSUrl, |
| | | // plAction.plTypeType,plAction.plDesc,category); e.printStackTrace(); |
| | | // } |
| | | // } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.other; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public interface IExportLogBean extends Serializable{ |
| | | static final long serialVersionUID = 1L; |
| | | static String RIGHT_STATE = "æ£å¸¸"; |
| | | /** |
| | | * è¿åå符串æ°ç»å°å
容åå
¥å°JTableæä»¶ä¸ |
| | | * @return |
| | | */ |
| | | public abstract Object[] getLogRowObjcets(); |
| | | /** |
| | | * è¿åå符串å°å
容åå
¥å°logæä»¶ä¸ |
| | | * @return |
| | | */ |
| | | public abstract String getLogRowContent(); |
| | | |
| | | } |
| | |
| | | /** |
| | | * èåjsoné
ç½®æä»¶ï¼å¦æå
¶ä»éè¦è¯»åçï¼å¯ä»¥ä»¿ç
§å½åé»è¾ç¼å |
| | | */ |
| | | private static MenuVO menuVO; |
| | | private static sysModuleConf sysModuleConf; |
| | | |
| | | static{ |
| | | try { |
| | | File file = ResourceUtils.getFile("classpath:menuConfig.json"); |
| | | String json = FileUtils.readFileToString(file, "UTF-8"); |
| | | menuVO = JSON.parseObject(json, MenuVO.class); |
| | | sysModuleConf = JSON.parseObject(json, sysModuleConf.class); |
| | | }catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | public static MenuVO getMenuVO() { |
| | | return menuVO; |
| | | public static sysModuleConf getSysModuleConf() { |
| | | return sysModuleConf; |
| | | } |
| | | |
| | | public static class sysModuleConf { |
| | | |
| | | /** |
| | | * ç³»ç»æ¨¡åé
ç½® |
| | | */ |
| | | private MenuVO sysModuleNode; |
| | | |
| | | /** |
| | | * 管çåè½æ¨¡å |
| | | */ |
| | | private MenuVO systemManagmentNode; |
| | | |
| | | /** |
| | | * ä¸å¡åè½æ¨¡å |
| | | */ |
| | | private MenuVO modelManagmentNode; |
| | | |
| | | /** |
| | | * æä½ç±»å模å |
| | | */ |
| | | private MenuVO operateNode; |
| | | |
| | | public void setSysModuleNode(MenuVO sysModuleNode) { |
| | | this.sysModuleNode = sysModuleNode; |
| | | } |
| | | |
| | | public void setSystemManagmentNode(MenuVO systemManagmentNode) { |
| | | this.systemManagmentNode = systemManagmentNode; |
| | | } |
| | | |
| | | public void setModelManagmentNode(MenuVO modelManagmentNode) { |
| | | this.modelManagmentNode = modelManagmentNode; |
| | | } |
| | | |
| | | public MenuVO getSysModuleNode() { |
| | | return sysModuleNode; |
| | | } |
| | | |
| | | public MenuVO getSystemManagmentNode() { |
| | | return systemManagmentNode; |
| | | } |
| | | |
| | | public MenuVO getModelManagmentNode() { |
| | | return modelManagmentNode; |
| | | } |
| | | |
| | | public void setOperateNode(MenuVO operateNode) { |
| | | this.operateNode = operateNode; |
| | | } |
| | | |
| | | public MenuVO getOperateNode() { |
| | | return operateNode; |
| | | } |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.dto.PLActionClsDTO; |
| | | import com.vci.dto.PLActionDTO; |
| | | import com.vci.dto.PLActionQueryDTO; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Action管ççæå¡ |
| | | * @author yuxc |
| | | * @date 2024-8-16 |
| | | */ |
| | | public interface OsActionServiceI { |
| | | /** |
| | | * ä¿åActionåç±»ä¿¡æ¯ |
| | | * @param pLActionCls Actionåç±»ä¿¡æ¯ |
| | | * @return ä¿åç»æ |
| | | */ |
| | | BaseResult saveActionCls(PLActionClsDTO pLActionCls) throws PLException; |
| | | /** |
| | | * ä¿®æ¹Actionåç±»ä¿¡æ¯ |
| | | * @param pLActionCls Actionåç±»ä¿¡æ¯ |
| | | * @return ä¿®æ¹ç»æ |
| | | */ |
| | | BaseResult updateActionCls(PLActionClsDTO pLActionCls) throws PLException; |
| | | /** |
| | | * è·åActionåç±»æ |
| | | * isExp æ¯å¦ç¨æ·å¯¼åº trueæ¯ï¼falseå¦ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | BaseResult getActionTree(boolean isExp) throws PLException; |
| | | /** |
| | | * è·åActionè¡¨æ ¼æ°æ® |
| | | * dto æ¥è¯¢æ¡ä»¶ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | BaseResult getActionTableData(PLActionQueryDTO dto) throws PLException; |
| | | /** |
| | | * ä¿åActionæ°æ® |
| | | * dto actionä¼ è¾å¯¹è±¡ |
| | | * @return ä¿åç»æ |
| | | */ |
| | | BaseResult saveAction(PLActionDTO dto) throws PLException; |
| | | /** |
| | | * ä¿®æ¹Actionæ°æ® |
| | | * dto actionä¼ è¾å¯¹è±¡ |
| | | * @return ä¿®æ¹ç»æ |
| | | */ |
| | | BaseResult updateAction(PLActionDTO dto) throws PLException; |
| | | /** |
| | | * å é¤Actionæ°æ® |
| | | * dto actionä¼ è¾å¯¹è±¡ |
| | | * @return å é¤ç»æ |
| | | */ |
| | | BaseResult deleteAction(PLActionDTO dto) throws PLException; |
| | | /** |
| | | * 导åºAction |
| | | * @return |
| | | */ |
| | | void exportBeans(List<String> actionOid, HttpServletResponse response) throws PLException, IOException; |
| | | } |
| | |
| | | pageHelper = new PageHelper(-1); |
| | | } |
| | | //æéè¦è½¬æ¢ç屿§ |
| | | pageHelper.addDefaultAsc("name"); |
| | | if(StringUtils.isBlank(pageHelper.getSort()) && StringUtils.isBlank(pageHelper.getOrder())) {//å¦ææ²¡æè®¾ç½®æåºå段ï¼åé»è®¤ä¸ä¸ª |
| | | pageHelper.addDefaultAsc("name"); |
| | | } |
| | | VciQueryWrapperForDO queryWrapperForDO = new VciQueryWrapperForDO(baseQueryObject.getConditionMap(), tClass,pageHelper); |
| | | queryWrapperForDO.setConditionMap(queryWrapperForDO.switchConditionMap()); |
| | | queryWrapperForDO.wrapperSql(); |
| | |
| | | |
| | | /** |
| | | * 导åºä¸å¡ç±»å |
| | | * name ä¸å¡ç±»ååç§° |
| | | * oid ä¸å¡ç±»ååç§° |
| | | * @return åå»ºç»æ |
| | | */ |
| | | void expData(String oid, HttpServletResponse response) throws PLException, IOException; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service; |
| | | import com.vci.corba.portal.data.PortalVI; |
| | | import com.vci.dto.PortalVIDTO; |
| | | import com.vci.pagemodel.PortalVIVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 表å/è¡¨æ ¼æå¡ |
| | | * @author weidy |
| | | * @date 2021-2-14 |
| | | */ |
| | | public interface OsPortalVIServiceI extends OsBaseServiceI{ |
| | | |
| | | /** |
| | | * 表å/è¡¨æ ¼çå表 |
| | | * @param baseQueryObject æ¥è¯¢å¯¹è±¡ |
| | | * @return 龿¥ç±»åçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | DataGrid<PortalVIVO> gridPortalVIVOs(BaseQueryObject baseQueryObject); |
| | | |
| | | /*** |
| | | * æ·»å 表å/è¡¨æ ¼ |
| | | * @param portalVIDTO |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | BaseResult add(PortalVIDTO portalVIDTO) throws VciBaseException; |
| | | |
| | | /*** |
| | | * æ´æ¹è¡¨å/è¡¨æ ¼ |
| | | * @param portalVIDTO |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | BaseResult edit(PortalVIDTO portalVIDTO) throws VciBaseException; |
| | | |
| | | /** |
| | | *æ¥è¯¢ææè¡¨åæè
è¡¨æ ¼ |
| | | * @return key æ¯çå½å¨æçç¼å·çè±æå°å |
| | | * @throws VciBaseException æ¥è¯¢çæ¶ååºé伿åºå¼å¸¸ |
| | | */ |
| | | Map<String, PortalVIVO> selectAllPortalVIMap() throws VciBaseException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 表åçæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param portalVIS æä¸¾ç对象 |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<PortalVIVO> portalVIDOO2VOS(Collection<PortalVI> portalVIS); |
| | | |
| | | /** |
| | | * 表åçæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param portalVI æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | PortalVIVO portalVIDOO2VO(PortalVI portalVI); |
| | | |
| | | /*** |
| | | * DTO转æPortalVI |
| | | * @param portalVIDTOS |
| | | * @return |
| | | */ |
| | | public List<PortalVI> portalVIDTOO2VIS(Collection<PortalVIDTO> portalVIDTOS); |
| | | /*** |
| | | * DTO转æPortalVI |
| | | * @param portalVIDTO |
| | | * @return |
| | | */ |
| | | public PortalVI portalVIDTOO2VI(PortalVIDTO portalVIDTO); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service.impl; |
| | | import cn.hutool.core.io.FileUtil; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.corba.omd.qtm.QTInfo; |
| | | import com.vci.corba.portal.data.Constraint; |
| | | import com.vci.corba.portal.data.PLAction; |
| | | import com.vci.corba.portal.data.PLActionCls; |
| | | import com.vci.corba.portal.data.PLActionParam; |
| | | import com.vci.dto.PLActionClsDTO; |
| | | import com.vci.dto.PLActionDTO; |
| | | import com.vci.dto.PLActionQueryDTO; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.util.ControllerUtil; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.web.other.ExportActionLogBean; |
| | | import com.vci.web.other.ExportBeans; |
| | | import com.vci.web.other.LinkQTExportData; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.*; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * Action管ççæå¡å®ç°ç±» |
| | | * @author yuxc |
| | | * @date 2024-8-16 |
| | | */ |
| | | @Service |
| | | public class OsActionServiceImpl implements OsActionServiceI { |
| | | |
| | | @Autowired |
| | | private PlatformClientUtil platformClientUtil; |
| | | /** |
| | | * ä¿åActionåç±»ä¿¡æ¯ |
| | | * @param pLActionCls Actionåç±»ä¿¡æ¯ |
| | | * @return ä¿åç»æ |
| | | */ |
| | | @Override |
| | | public BaseResult saveActionCls(PLActionClsDTO pLActionCls) throws PLException { |
| | | |
| | | if (pLActionCls.getName() == null || pLActionCls.getName().trim().equals("")) { |
| | | throw new PLException("500", new String[]{"åç±»åç§°ä¸è½ä¸ºç©º!"}); |
| | | } |
| | | if (pLActionCls.getName().equals("æªåç±»")) { |
| | | throw new PLException("500", new String[]{"æªåç±»èç¹å·²ç»åå¨!"}); |
| | | } |
| | | PLActionCls pac = new PLActionCls(); |
| | | pac.id = WebUtil.getSnowflakePk(); |
| | | pac.name = pLActionCls.getName(); |
| | | pac.pid = pLActionCls.getPid(); |
| | | pac.description = pLActionCls.getDescription() == null ? "" : pLActionCls.getDescription(); |
| | | pac.creator = WebUtil.getCurrentUserId(); |
| | | pac.createTime = System.currentTimeMillis(); |
| | | pac.serialno = pLActionCls.getSerialno(); |
| | | // ä¿ååç±»ä¿¡æ¯ |
| | | String message = platformClientUtil.getUIService().creaetePLActionCls(pac); |
| | | if (message.startsWith("0")) { |
| | | if (message.equals("01")) { |
| | | message = "åç±»" + pac.name + "å·²ç»åå¨ï¼"; |
| | | } else if (message.equals("02")) { |
| | | message = "åä¸åç±»ä¸åºå·ä¸è½éå¤ï¼"; |
| | | } else { |
| | | message = "ä¿ååç±»æ¶åçå¼å¸¸ï¼" + message.substring(1); |
| | | } |
| | | throw new PLException("500", new String[]{message}); |
| | | } |
| | | return BaseResult.success("åç±»å建æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹Actionåç±»ä¿¡æ¯ |
| | | * @param pLActionCls Actionåç±»ä¿¡æ¯ |
| | | * @return ä¿åç»æ |
| | | */ |
| | | @Override |
| | | public BaseResult updateActionCls(PLActionClsDTO pLActionCls) throws PLException { |
| | | |
| | | if (pLActionCls.getName() == null || pLActionCls.getName().trim().equals("")) { |
| | | throw new PLException("500", new String[]{"åç±»åç§°ä¸è½ä¸ºç©º!"}); |
| | | } |
| | | if (pLActionCls.getName().equals("æªåç±»")) { |
| | | throw new PLException("500", new String[]{"æªåç±»èç¹å·²ç»åå¨!"}); |
| | | } |
| | | if (pLActionCls.getId() == null || pLActionCls.getId().trim().equals("")) { |
| | | throw new PLException("500", new String[]{"主é®ä¸è½ä¸ºç©º!"}); |
| | | } |
| | | PLActionCls pac = new PLActionCls(); |
| | | pac.name = pLActionCls.getName(); |
| | | pac.pid = pLActionCls.getPid(); |
| | | pac.description = pLActionCls.getDescription() == null ? "" : pLActionCls.getDescription(); |
| | | pac.creator = WebUtil.getCurrentUserId(); |
| | | pac.createTime = System.currentTimeMillis(); |
| | | pac.serialno = pLActionCls.getSerialno(); |
| | | // ä¿®æ¹åç±»ä¿¡æ¯ |
| | | String message = platformClientUtil.getUIService().editPLActionCls(pac); |
| | | if (message.startsWith("0")) { |
| | | if (message.equals("01")) { |
| | | message = "åç±»" + pac.name + "å·²ç»åå¨ï¼"; |
| | | } else if (message.equals("02")) { |
| | | message = "åä¸åç±»ä¸åºå·ä¸è½éå¤ï¼"; |
| | | } else { |
| | | message = "ä¿®æ¹åç±»æ¶åçå¼å¸¸ï¼" + message.substring(1); |
| | | } |
| | | throw new PLException("500", new String[]{message}); |
| | | } |
| | | return BaseResult.success("åç±»ä¿®æ¹æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * è·åActionåç±»æ |
| | | * isExp æ¯å¦ç¨æ·å¯¼åº trueæ¯ï¼falseå¦ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public BaseResult getActionTree(boolean isExp) throws PLException { |
| | | PLActionCls[] clses = platformClientUtil.getUIService().getPLActionClsArray(); |
| | | PLActionClsDTO treDto = new PLActionClsDTO(); |
| | | treDto.setName("Actionåç±»"); |
| | | Map<String, List<PLActionCls>> allDataMap = Arrays.stream(clses).collect(Collectors.groupingBy(pl -> pl.pid)); |
| | | |
| | | for (PLActionCls cls : clses) { |
| | | if (StringUtils.isBlank(cls.pid)) { |
| | | PLActionClsDTO parentDto = new PLActionClsDTO(); |
| | | parentDto.setId(cls.id); |
| | | parentDto.setName(cls.name); |
| | | parentDto.setPid(cls.pid); |
| | | parentDto.setDescription(cls.description); |
| | | parentDto.setCreator(cls.creator); |
| | | parentDto.setCreateTime(cls.createTime); |
| | | parentDto.setSerialno(cls.serialno); |
| | | //è¿éå¤çå¯¼åºæ çé»è¾ |
| | | if(isExp){ |
| | | Constraint[] consArray = new Constraint[1]; |
| | | consArray[0] = new Constraint("plactioncls", cls.id); |
| | | PLAction[] plActionsByConsArray = platformClientUtil.getUIService().getPLActionsByConsArray(consArray); |
| | | if(parentDto.getChilds().isEmpty() && plActionsByConsArray.length == 0){ |
| | | continue; |
| | | } |
| | | for (PLAction plAction : plActionsByConsArray) { |
| | | PLActionDTO plActionDTO = new PLActionDTO(); |
| | | plActionDTO.setPlName(plAction.plCode + "/" + plAction.plName); |
| | | plActionDTO.setPlCode(plAction.plCode); |
| | | plActionDTO.setPlOId(plAction.plOId); |
| | | parentDto.getActionChilds().add(plActionDTO); |
| | | } |
| | | } |
| | | addClsTreeNode(parentDto, allDataMap, isExp); |
| | | treDto.getChilds().add(parentDto); |
| | | } |
| | | } |
| | | PLActionClsDTO plac = new PLActionClsDTO(); |
| | | plac.setName("æªåç±»"); |
| | | if(isExp){ |
| | | Constraint[] consArray = new Constraint[1]; |
| | | consArray[0] = new Constraint("plactioncls", ""); |
| | | PLAction[] plActionsByConsArray = platformClientUtil.getUIService().getPLActionsByConsArray(consArray); |
| | | for (PLAction plAction : plActionsByConsArray) { |
| | | PLActionDTO plActionDTO = new PLActionDTO(); |
| | | plActionDTO.setPlName(plAction.plCode + "/" + plAction.plName); |
| | | plActionDTO.setPlCode(plAction.plCode); |
| | | plActionDTO.setPlOId(plAction.plOId); |
| | | plac.getActionChilds().add(plActionDTO); |
| | | } |
| | | } |
| | | treDto.getChilds().add(plac); |
| | | return BaseResult.success(treDto); |
| | | } |
| | | /** |
| | | * è·åActionè¡¨æ ¼æ°æ® |
| | | * dto æ¥è¯¢æ¡ä»¶ |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public BaseResult getActionTableData(PLActionQueryDTO dto) throws PLException { |
| | | Constraint[] consArray ; |
| | | if(StringUtils.isNotBlank(dto.getPlactioncls())){ |
| | | consArray = new Constraint[7]; |
| | | consArray[6] = new Constraint("plactioncls", dto.getPlactioncls()); |
| | | }else { |
| | | consArray = new Constraint[6]; |
| | | } |
| | | consArray[0] = new Constraint("plcode", dto.getPlcode()); |
| | | consArray[1] = new Constraint("plname", dto.getPlname()); |
| | | consArray[2] = new Constraint("plbsurl", dto.getPlbsurl()); |
| | | consArray[3] = new Constraint("plcsclass", dto.getPlcsclass()); |
| | | consArray[4] = new Constraint("pltypetype", dto.getPltypetype()); |
| | | consArray[5] = new Constraint("pldesc", dto.getPldesc()); |
| | | PLAction[] plActionsByConsArray = platformClientUtil.getUIService().getPLActionsByConsArray(consArray); |
| | | Arrays.sort(plActionsByConsArray, new Comparator<PLAction>() { |
| | | @Override |
| | | public int compare(PLAction o1, PLAction o2) { |
| | | String py1 = PinyinCommon.getPingYin(o1.plCode); |
| | | String py2 = PinyinCommon.getPingYin(o2.plCode); |
| | | return py1.compareTo(py2); |
| | | } |
| | | }); |
| | | return BaseResult.dataList(Arrays.asList(plActionsByConsArray)); |
| | | } |
| | | /** |
| | | * ä¿åActionæ°æ® |
| | | * dto actionä¼ è¾å¯¹è±¡ |
| | | * @return ä¿åç»æ |
| | | */ |
| | | @Override |
| | | public BaseResult saveAction(PLActionDTO dto) throws PLException { |
| | | if(StringUtils.isBlank(dto.getPlCode())){ |
| | | throw new PLException("500", new String[]{"请è¾å
¥ç¼å·"}); |
| | | } |
| | | PLAction[] actionsInDB= platformClientUtil.getUIService().getAllPLAction(); |
| | | for(int i =0;i<actionsInDB.length;i++){ |
| | | if (dto.getPlCode().equals(actionsInDB[i].plCode)) { |
| | | throw new PLException("500", new String[]{"æ°å»ºActionç¼å·éå¤ï¼è¯·éæ°è¾å
¥ç¼å·"}); |
| | | } |
| | | } |
| | | PLAction plAction = new PLAction(); |
| | | plAction.plOId = WebUtil.getSnowflakePk(); |
| | | plAction.plCode = StringUtils.defaultString(dto.getPlCode()); |
| | | plAction.plName = StringUtils.defaultString(dto.getPlName()); |
| | | plAction.plCSClass = StringUtils.defaultString(dto.getPlCSClass()); |
| | | plAction.plBSUrl = StringUtils.defaultString(dto.getPlBSUrl()); |
| | | plAction.plDesc = StringUtils.defaultString(dto.getPlDesc()); |
| | | plAction.plCreateUser = WebUtil.getCurrentUserId(); |
| | | plAction.plModifyUser = WebUtil.getCurrentUserId(); |
| | | plAction.plActionCls = StringUtils.defaultString(dto.getPlActionCls()); |
| | | plAction.plTypeType = StringUtils.defaultString(dto.getPlTypeType()); |
| | | boolean b = platformClientUtil.getUIService().savePLAction(plAction); |
| | | if(!b){ |
| | | throw new PLException("500", new String[]{"ä¿å失败ï¼ï¼"}); |
| | | } |
| | | return BaseResult.success("æä½æåï¼"); |
| | | } |
| | | /** |
| | | * ä¿®æ¹Actionæ°æ® |
| | | * dto actionä¼ è¾å¯¹è±¡ |
| | | * @return ä¿®æ¹ç»æ |
| | | */ |
| | | @Override |
| | | public BaseResult updateAction(PLActionDTO dto) throws PLException { |
| | | if(StringUtils.isBlank(dto.getPlCode())){ |
| | | throw new PLException("500", new String[]{"ç¼å·ä¸è½ä¸ºç©º"}); |
| | | } |
| | | PLAction[] actionsInDB= platformClientUtil.getUIService().getAllPLAction(); |
| | | for(int i =0;i<actionsInDB.length;i++){ |
| | | if (dto.getPlCode().equals(actionsInDB[i].plCode) && !dto.getPlOId().equals(actionsInDB[i].plOId)) { |
| | | throw new PLException("500", new String[]{"ä¿®æ¹Actionç¼å·éå¤ï¼è¯·ç¡®è®¤ç¼å·"}); |
| | | } |
| | | } |
| | | PLAction plAction = new PLAction(); |
| | | plAction.plOId = StringUtils.defaultString(dto.getPlOId()); |
| | | plAction.plCode = StringUtils.defaultString(dto.getPlCode()); |
| | | plAction.plName = StringUtils.defaultString(dto.getPlName()); |
| | | plAction.plCSClass = StringUtils.defaultString(dto.getPlCSClass()); |
| | | plAction.plBSUrl = StringUtils.defaultString(dto.getPlBSUrl()); |
| | | plAction.plDesc = StringUtils.defaultString(dto.getPlDesc()); |
| | | plAction.plCreateUser = dto.getPlCreateUser(); |
| | | plAction.plModifyUser = WebUtil.getCurrentUserId(); |
| | | plAction.plActionCls = StringUtils.defaultString(dto.getPlActionCls()); |
| | | plAction.plTypeType = StringUtils.defaultString(dto.getPlTypeType()); |
| | | boolean b = platformClientUtil.getUIService().updatePLAction(plAction); |
| | | if(!b){ |
| | | throw new PLException("500", new String[]{"ä¿®æ¹å¤±è´¥ï¼ï¼"}); |
| | | } |
| | | return BaseResult.success("ä¿®æ¹æåï¼"); |
| | | } |
| | | |
| | | /** |
| | | * å é¤Actionæ°æ® |
| | | * dto actionä¼ è¾å¯¹è±¡ |
| | | * @return å é¤ç»æ |
| | | */ |
| | | @Override |
| | | public BaseResult deleteAction(PLActionDTO dto) throws PLException { |
| | | PLAction plAction = new PLAction(); |
| | | plAction.plOId = StringUtils.defaultString(dto.getPlOId()); |
| | | plAction.plCode = StringUtils.defaultString(dto.getPlCode()); |
| | | plAction.plName = StringUtils.defaultString(dto.getPlName()); |
| | | plAction.plCSClass = StringUtils.defaultString(dto.getPlCSClass()); |
| | | plAction.plBSUrl = StringUtils.defaultString(dto.getPlBSUrl()); |
| | | plAction.plDesc = StringUtils.defaultString(dto.getPlDesc()); |
| | | plAction.plCreateUser = dto.getPlCreateUser(); |
| | | plAction.plModifyUser = WebUtil.getCurrentUserId(); |
| | | plAction.plActionCls = StringUtils.defaultString(dto.getPlActionCls()); |
| | | plAction.plTypeType = StringUtils.defaultString(dto.getPlTypeType()); |
| | | boolean b = platformClientUtil.getUIService().deletePLAction(plAction); |
| | | if(!b){ |
| | | throw new PLException("500", new String[]{"å é¤å¤±è´¥ï¼ï¼"}); |
| | | } |
| | | return BaseResult.success("å 餿åï¼"); |
| | | } |
| | | /** |
| | | * 导åºAction |
| | | * @return |
| | | */ |
| | | @Override |
| | | public void exportBeans(List<String> actionOid, HttpServletResponse response) throws PLException, IOException { |
| | | String defaultTempFolder = LocalFileUtil.getDefaultTempFolder(); |
| | | String vciqtmfFileName = defaultTempFolder + File.separator + "actionTemplateExp" + new Date().getTime() + ".vciamf"; |
| | | HashMap exportBeans = new HashMap<String, Object>(); |
| | | getExportBeans(actionOid, exportBeans);// è·å¾å¯¼åºBeanåæ¶ï¼è®°å½log |
| | | |
| | | ObjectOutputStream vciamfFileStream = null; |
| | | try { |
| | | File vciqtmfFile = new File(vciqtmfFileName); |
| | | vciamfFileStream = new ObjectOutputStream(new FileOutputStream(vciqtmfFile)); |
| | | vciamfFileStream.writeObject(exportBeans); |
| | | }finally { |
| | | try { |
| | | if (vciamfFileStream != null) { |
| | | vciamfFileStream.flush(); |
| | | vciamfFileStream.close(); |
| | | } |
| | | } catch (Exception e) { |
| | | throw new PLException("500",new String[]{"å¯¼åºæµå
³éå¼å¸¸ï¼"}); |
| | | } |
| | | } |
| | | ControllerUtil.writeFileToResponse(response,vciqtmfFileName); |
| | | FileUtil.del(defaultTempFolder + File.separator); |
| | | } |
| | | |
| | | /** |
| | | * å¤ç导åºç对象 |
| | | * @param actionOid çé¢éæ©çactionåè¡¨æ°æ® |
| | | * @param exportBeansMap 导åºå¯¹è±¡ |
| | | * @return |
| | | * @throws PLException |
| | | */ |
| | | private void getExportBeans(List<String> actionOid, HashMap exportBeansMap) throws PLException { |
| | | PLActionCls[] plActionClsArray = platformClientUtil.getUIService().getPLActionClsArray(); |
| | | Map<String, PLActionCls> clsMap = Arrays.stream(plActionClsArray).collect(Collectors.toMap(e -> e.id, e -> e)); |
| | | ExportBeans exportBeans = new ExportBeans(); |
| | | for (String oid : actionOid) { |
| | | PLAction plAction = platformClientUtil.getUIService().getPLActionById(oid); |
| | | //æç¶èç¹åè¿è¡å¤ç |
| | | if(StringUtils.isNotBlank(plAction.plActionCls)){ |
| | | allPLActionClsParent(exportBeans, clsMap.get(plAction.plActionCls), clsMap); |
| | | } |
| | | exportBeans.getPLActions().put(plAction.plOId, plAction); |
| | | PLActionParam[] params = platformClientUtil.getUIService().getPLActionParamArrayByActionId(plAction.plOId); |
| | | if(params != null && params.length > 0){//妿忰åå¨ |
| | | for (PLActionParam plActionParam : params) {//æ·»å actionåæ° |
| | | exportBeans.addPLActionParamBean(plActionParam); |
| | | } |
| | | } |
| | | String category = clsMap.containsKey(plAction.plActionCls) ? clsMap.get(plAction.plActionCls).name : ""; |
| | | exportBeans.setLogBean(new ExportActionLogBean(ExportActionLogBean.RIGHT_STATE, |
| | | plAction.plCode,plAction.plName,plAction.plCSClass,plAction.plBSUrl, |
| | | plAction.plTypeType,plAction.plDesc,category)); |
| | | } |
| | | exportBeansMap.put("exportBeans", exportBeans); |
| | | } |
| | | //å¢å ç¶ç±»æ°æ® |
| | | private void allPLActionClsParent(ExportBeans exportBeans, PLActionCls cls, Map<String, PLActionCls> clsMap) { |
| | | if(cls.pid != ""){ |
| | | allPLActionClsParent(exportBeans, clsMap.get(cls.pid), clsMap); |
| | | } |
| | | exportBeans.addPLActionClsBean(cls); |
| | | } |
| | | |
| | | /** |
| | | * æ·»å åèç¹ |
| | | * @param parentDto ç¶èç¹å¯¹è±¡ |
| | | * @param allDataMap ææåç»å¯¹è±¡ |
| | | * @param isExp true为导åºåè½çæ ï¼false为çé¢åç±»æ |
| | | */ |
| | | private void addClsTreeNode(PLActionClsDTO parentDto, Map<String, List<PLActionCls>> allDataMap, Boolean isExp) throws PLException { |
| | | if(allDataMap.containsKey(parentDto.id)){ |
| | | for (PLActionCls cls : allDataMap.get(parentDto.id)) { |
| | | PLActionClsDTO childDto = new PLActionClsDTO(); |
| | | childDto.setId(cls.id); |
| | | childDto.setName(cls.name); |
| | | childDto.setPid(cls.pid); |
| | | childDto.setDescription(cls.description); |
| | | childDto.setCreator(cls.creator); |
| | | childDto.setCreateTime(cls.createTime); |
| | | childDto.setSerialno(cls.serialno); |
| | | if(isExp){ |
| | | Constraint[] consArray = new Constraint[1]; |
| | | consArray[0] = new Constraint("plactioncls", cls.id); |
| | | PLAction[] plActionsByConsArray = platformClientUtil.getUIService().getPLActionsByConsArray(consArray); |
| | | if(parentDto.getChilds().isEmpty() && plActionsByConsArray.length == 0){ |
| | | continue; |
| | | } |
| | | for (PLAction plAction : plActionsByConsArray) { |
| | | PLActionDTO plActionDTO = new PLActionDTO(); |
| | | plActionDTO.setPlName(plAction.plCode + "/" + plAction.plName); |
| | | plActionDTO.setPlCode(plAction.plCode); |
| | | plActionDTO.setPlOId(plAction.plOId); |
| | | parentDto.getActionChilds().add(plActionDTO); |
| | | } |
| | | } |
| | | addClsTreeNode(childDto, allDataMap, isExp); |
| | | parentDto.getChilds().add(childDto); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * 导åºä¸å¡ç±»å |
| | | * name ä¸å¡ç±»ååç§° |
| | | * oid ä¸å¡ç±»ååç§° |
| | | * @return åå»ºç»æ |
| | | */ |
| | | @Override |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.bo.ItemSeniorQueryBO; |
| | | import com.vci.common.utility.ObjectUtility; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.portal.PortalService.GetPagePortalVIArrayByPageInfoResult; |
| | | import com.vci.corba.portal.data.PortalVI; |
| | | import com.vci.dto.PRMDTO; |
| | | import com.vci.dto.PRMItemDTO; |
| | | import com.vci.dto.PortalVIDTO; |
| | | import com.vci.model.*; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.enumpck.ItemTypeEnum; |
| | | import com.vci.web.enumpck.PortalVIType; |
| | | import com.vci.web.enumpck.PortalVITypeFlag; |
| | | import com.vci.web.service.OsPortalVIServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.UITools; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /* |
| | | * 龿¥ç±»åæå¡ |
| | | * @author xiej |
| | | * @date 2024-08-14 |
| | | */ |
| | | @Service |
| | | public class OsPortalVIServiceImpl implements OsPortalVIServiceI { |
| | | /** |
| | | * å è½½èªèº« |
| | | */ |
| | | @Autowired(required = false) |
| | | @Lazy |
| | | private OsPortalVIServiceI self; |
| | | |
| | | /** |
| | | * å¹³å°çè°ç¨å·¥å
·ç±» |
| | | */ |
| | | @Autowired |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | @Override |
| | | public void clearCache() { |
| | | |
| | | } |
| | | /** |
| | | * viType :Form("Form", "表å", (short)1), Table("Table", "è¡¨æ ¼", (short)0); |
| | | * viTypeFlag: LinkType("LinkType", "龿¥ç±»åç表å", (short)1), BtmType("BtmType", "ä¸å¡ç±»åç表å", (short)0); |
| | | * @param baseQueryObject æ¥è¯¢å¯¹è±¡ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public DataGrid<PortalVIVO> gridPortalVIVOs(BaseQueryObject baseQueryObject) { |
| | | Map<String, String> conditionMap= baseQueryObject.getConditionMap(); |
| | | if(conditionMap==null){ |
| | | conditionMap=new HashMap<>(); |
| | | } |
| | | String typeName=StringUtils.isBlank(conditionMap.get("typeName"))?"":conditionMap.get("typeName"); |
| | | if(StringUtils.isBlank(typeName)){ |
| | | return new DataGrid<>("没æéæ©ä¸å¡ç±»å"); |
| | | } |
| | | String viName=StringUtils.isBlank(conditionMap.get("viName"))?"":conditionMap.get("viName"); |
| | | String viTypeLabel=StringUtils.isBlank(conditionMap.get("viType"))?"":conditionMap.get("viType"); |
| | | PortalVIType portalVIType= PortalVIType.getByLabel(viTypeLabel); |
| | | Short viType=-1; |
| | | if(portalVIType!=null){ |
| | | viType=portalVIType.getIntVal(); |
| | | } |
| | | String viTypeFlagLabel=StringUtils.isBlank(conditionMap.get("viTypeFlag"))?"":conditionMap.get("viTypeFlag"); |
| | | PortalVITypeFlag portalVITypeFlag= PortalVITypeFlag.getByLabel(viTypeFlagLabel); |
| | | Short viTypeFlag=-1; |
| | | if(portalVITypeFlag!=null){ |
| | | viTypeFlag=portalVITypeFlag.getIntVal(); |
| | | } |
| | | long pageIndex=baseQueryObject.getPage(); |
| | | long pageSize=baseQueryObject.getLimit(); |
| | | DataGrid<PortalVIVO> dataGrid = new DataGrid<>(); |
| | | try { |
| | | GetPagePortalVIArrayByPageInfoResult pagePortalVIArrayByPageInfoResult= platformClientUtil.getPortalService().getPagePortalVIArrayByPageInfo(typeName,viName,viType,viTypeFlag,pageIndex,pageSize); |
| | | if(pagePortalVIArrayByPageInfoResult.total>0) { |
| | | PortalVI[] portalVIS = pagePortalVIArrayByPageInfoResult.returnValue; |
| | | List<PortalVIVO> portalVIVOS= portalVIDOO2VOS(Arrays.asList(portalVIS)); |
| | | dataGrid.setData(portalVIVOS); |
| | | dataGrid.setTotal(pagePortalVIArrayByPageInfoResult.total); |
| | | }else{ |
| | | dataGrid = new DataGrid<>("æ²ææ¥è¯¢å°æ°æ®"); |
| | | } |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | dataGrid = new DataGrid<>("æ²æè¡¨ååºç°å¼å¸¸:"+e.getMessage()); |
| | | } |
| | | return dataGrid; |
| | | } |
| | | |
| | | /*** |
| | | * 表å/è¡¨æ ¼æ·»å |
| | | * @param portalVIDTO |
| | | * @return |
| | | * @throws PLException |
| | | */ |
| | | @Override |
| | | public BaseResult add(PortalVIDTO portalVIDTO) throws VciBaseException { |
| | | return savePortalVIDTO(portalVIDTO,false); |
| | | } |
| | | /*** |
| | | * 表å/è¡¨æ ¼æ´æ¹ |
| | | * @param portalVIDTO |
| | | * @return |
| | | * @throws PLException |
| | | */ |
| | | @Override |
| | | public BaseResult edit(PortalVIDTO portalVIDTO) throws VciBaseException { |
| | | return savePortalVIDTO(portalVIDTO,true); |
| | | } |
| | | private BaseResult savePortalVIDTO(PortalVIDTO portalVIDTO,boolean isEdit) { |
| | | |
| | | boolean _isBtm=false; |
| | | boolean flag = false; |
| | | String labelName=PortalVIType.Form.getName(); |
| | | try { |
| | | VciBaseUtil.alertNotNull(portalVIDTO.getViName(),"åç§°ä¸è½ä¸ºç©ºï¼"); |
| | | if(portalVIDTO.getPrm()==null||portalVIDTO.getPrm().getPrmItemList()==null||portalVIDTO.getPrm().getPrmItemList().size()==0){ |
| | | throw new Throwable(labelName+"ï¼æªè®¾ç½®"); |
| | | } |
| | | if(PortalVIType.Table.getIntVal()==portalVIDTO.getViType()){//妿æ¯è¡¨æ ¼ççæ ¡éª |
| | | labelName=PortalVIType.Table.getName(); |
| | | PRMItemDTO prmItemDTO= portalVIDTO.getPrm().getPrmItemList().get(0); |
| | | //æ¯é¡µæ¾ç¤ºæ ¡éª |
| | | String rtnContent = isCorrectPageNums(prmItemDTO.getItemPageSize()); |
| | | if (StringUtils.isNotBlank(rtnContent)) { |
| | | throw new VciBaseException(rtnContent); |
| | | } |
| | | }else{ |
| | | |
| | | } |
| | | labelName= PortalVIType.getByIntVal(portalVIDTO.getViType()).getLabel(); |
| | | if(!_isBtm){ |
| | | PortalVI[] portalVIS= platformClientUtil.getPortalService().getPortalVIArrayByTypeName(portalVIDTO.getTypeName()); |
| | | for (int i = 0; i < portalVIS.length; i++) { |
| | | PortalVI portalVI= portalVIS[i]; |
| | | String viName= portalVI.viName; |
| | | if(isEdit){//å¦æä¸ºä¿®æ¹ |
| | | try { |
| | | PortalVI oldPortalVI= platformClientUtil.getPortalService().getPortalVIById(portalVIDTO.getId()); |
| | | flag=platformClientUtil.getPortalService().judgeUpdateButton(oldPortalVI.typeFlag, oldPortalVI.viName, oldPortalVI.typeName); |
| | | if (flag && (StringUtils.isNotBlank(portalVIDTO.getViName()))&&(!oldPortalVI.viName.equals(portalVIDTO.getViName()))) { |
| | | throw new Throwable("该"+labelName+"å·²ç»è¢«å¼ç¨ï¼ä¸è½ä¿®æ¹åç§°!"); |
| | | } |
| | | } catch (PLException e) { |
| | | throw new Throwable("æ¥è¯¢"); |
| | | } |
| | | if (!portalVI.id.equals(portalVIDTO.getId())) { |
| | | if (portalVI.viName.equals(portalVIDTO.getViName())) { |
| | | throw new Throwable("åç§°å·²ç»åå¨!"); |
| | | } |
| | | } |
| | | } else { |
| | | portalVIDTO.setId(ObjectUtility.getNewObjectID36()); |
| | | if (portalVI.viName.equals(portalVIDTO.getViName())) { |
| | | throw new Throwable("åç§°å·²ç»åå¨!"); |
| | | } |
| | | } |
| | | } |
| | | }else{ |
| | | flag=platformClientUtil.getPortalService().judgeUpdateButton(portalVIDTO.getTypeFlag(), portalVIDTO.getViName(), portalVIDTO.getTypeName()); |
| | | } |
| | | flag= saveForm(portalVIDTO,isEdit); |
| | | if(flag){ |
| | | return BaseResult.success("ä¿å"+labelName+"æå!"); |
| | | }else{ |
| | | new Throwable("ä¿å"+labelName+"失败!"); |
| | | } |
| | | } catch (Throwable e) { |
| | | // throw new VciBaseException("ä¿å表ååºç°å¼å¸¸ï¼"+e.getMessage()); |
| | | return BaseResult.fail("ä¿å"+labelName+"åºç°å¼å¸¸ï¼"+e.getMessage()); |
| | | } |
| | | return BaseResult.success("ä¿å"+labelName+"æå!"); |
| | | } |
| | | |
| | | /** |
| | | * 表å/è¡¨æ ¼ |
| | | * @param portalVIDTO |
| | | * @param isEdit |
| | | * @return |
| | | */ |
| | | private boolean saveForm(PortalVIDTO portalVIDTO,boolean isEdit) { |
| | | List<PRMItemDO> prmItemList = new ArrayList<PRMItemDO>(); |
| | | try { |
| | | PortalVI pvi=portalVIDTOO2VI(portalVIDTO); |
| | | boolean res=false; |
| | | if (!isEdit) { |
| | | res= platformClientUtil.getPortalService().savePortalVI(pvi); |
| | | } else { |
| | | res= platformClientUtil.getPortalService().updatePortalVI(pvi); |
| | | } |
| | | return res; |
| | | } catch (Throwable e) { |
| | | e.printStackTrace(); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, PortalVIVO> selectAllPortalVIMap() throws VciBaseException { |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 夿æ¯é¡µè¡æ°å®ä¹æ¯å¦æ£ç¡® |
| | | * @Title :isCorrectPageNums |
| | | * @Description : |
| | | * @param pageText |
| | | * @return |
| | | */ |
| | | protected String isCorrectPageNums(String pageText) { |
| | | if (pageText == null || pageText.trim().equals("")) { |
| | | return ""; |
| | | } |
| | | //edit by guo彿¯é¡µè¡æ°ä¸ä¸æ¢ä¸ä¸ªé项æ¶ï¼éè¦å¡«åé»è®¤çæ¾ç¤ºæ¡æ°ï¼ä¸é»è®¤çåºè¯¥åå¨äºé项ä¸ã |
| | | if(pageText.indexOf(",")!=-1){ |
| | | try { |
| | | String[] pages = pageText.split(","); |
| | | int index = pageText.indexOf("#"); |
| | | String subpageText1 = pageText.substring(0, index); |
| | | String subpageText2 = pageText.substring(index+1); |
| | | if(subpageText1.contains(subpageText2)){ |
| | | for (String page : pages) { |
| | | //if(!page.equalsIgnoreCase("all")){ |
| | | if(page.contains("#")){ |
| | | index = page.indexOf("#"); |
| | | page = page.substring(0, index); |
| | | } |
| | | Integer.parseInt(page); |
| | | //} |
| | | } |
| | | } else { |
| | | return "è¾å
¥é¡µæ°ä¸ç¬¦åè§èï¼è¯·åç
§ææ¬æ¡æç¤ºåéæ°å¡«åï¼"; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) { |
| | | return "è¾å
¥é¡µæ°ä¸ç¬¦åè§èï¼è¯·åç
§ææ¬æ¡æç¤ºåéæ°å¡«åï¼"; |
| | | } |
| | | }else { |
| | | try { |
| | | Integer.parseInt(pageText); |
| | | } catch (Exception e) { |
| | | return "è¾å
¥é¡µæ°ä¸ç¬¦åè§èï¼è¯·åç
§ææ¬æ¡æç¤ºéæ°å¡«åï¼"; |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æä¸¾çæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param portalVIS æä¸¾ç对象 |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<PortalVIVO> portalVIDOO2VOS(Collection<PortalVI> portalVIS) { |
| | | List<PortalVIVO> portalVIVOS = new ArrayList<>(); |
| | | Optional.ofNullable(portalVIS).orElseGet(()->new ArrayList<>()).stream().forEach(portalVI -> { |
| | | PortalVIVO portalVIVO = portalVIDOO2VO(portalVI); |
| | | portalVIVOS.add(portalVIVO); |
| | | }); |
| | | return portalVIVOS; |
| | | } |
| | | /** |
| | | * 表åçæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param portalVIDTOS 表åç对象 |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<PortalVI> portalVIDTOO2VIS(Collection<PortalVIDTO> portalVIDTOS) { |
| | | List<PortalVI> portalVIS = new ArrayList<>(); |
| | | Optional.ofNullable(portalVIDTOS).orElseGet(()->new ArrayList<>()).stream().forEach(portalVIDTO -> { |
| | | PortalVI portalVI = portalVIDTOO2VI(portalVIDTO); |
| | | portalVIS.add(portalVI); |
| | | }); |
| | | return portalVIS; |
| | | } |
| | | |
| | | /** |
| | | * 表åçæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param portalVIDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PortalVI portalVIDTOO2VI(PortalVIDTO portalVIDTO) { |
| | | PortalVI portalVI=new PortalVI(); |
| | | portalVI.id=portalVIDTO.getId(); |
| | | portalVI.typeFlag= portalVIDTO.getTypeFlag(); |
| | | portalVI.typeName=portalVIDTO.getTypeName(); |
| | | portalVI.viName=portalVIDTO.getViName(); |
| | | portalVI.viType=portalVIDTO.getViType(); |
| | | short viType =portalVIDTO.getViType(); |
| | | PRMDO prmdo = prmDOO2VIS(portalVIDTO.getPrm(),viType); |
| | | try { |
| | | portalVI.prm=UITools.getPRMText(prmdo); |
| | | } catch (Throwable e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return portalVI; |
| | | } |
| | | |
| | | /** |
| | | * è¡¨åæ°æ®å¯¹è±¡è½¬æ¢ |
| | | * @param prmdto |
| | | * @param viType |
| | | * @return |
| | | */ |
| | | private PRMDO prmDOO2VIS(PRMDTO prmdto, short viType) { |
| | | PRMDO prmdo=new PRMDO(); |
| | | prmdo.setShowCols(prmdto.getShowCols()); |
| | | prmdo.setFormQtName(prmdto.getFormQtName()); |
| | | prmdo.setPrmItemList(pRMItemDTOO2DOS(prmdto.getPrmItemList(),viType)); |
| | | return prmdo; |
| | | } |
| | | |
| | | @Override |
| | | public PortalVIVO portalVIDOO2VO(PortalVI portalVI) { |
| | | PortalVIVO portalVIVO=new PortalVIVO(); |
| | | portalVIVO.setId(portalVI.id); |
| | | portalVIVO.setTypeFlag(portalVI.typeFlag); |
| | | portalVIVO.setTypeName(portalVI.typeName); |
| | | portalVIVO.setViName(portalVI.viName); |
| | | portalVIVO.setViType(portalVI.viType); |
| | | String prm= portalVI.prm; |
| | | PRMDO prmdo= UITools.getPRM(prm); |
| | | portalVIVO.setPrm(prmDOO2VOS(prmdo,portalVI.viType)); |
| | | return portalVIVO; |
| | | } |
| | | private PRMVO prmDOO2VOS(PRMDO prmdo,short viType){ |
| | | PRMVO prmvo=new PRMVO(); |
| | | prmvo.setFormQtName(prmdo.getFormQtName()); |
| | | prmvo.setShowCols(prmdo.getShowCols()); |
| | | List<PRMItemDO> prmItemDOS= prmdo.getPrmItemList(); |
| | | prmvo.setPrmItemList(pRMItemDOO2VOS(prmItemDOS,viType)); |
| | | return prmvo; |
| | | } |
| | | public List<PRMItemVO> pRMItemDOO2VOS(Collection<PRMItemDO> prmItemDOS,short viType) { |
| | | List<PRMItemVO> portalVIVOS = new ArrayList<>(); |
| | | Optional.ofNullable(prmItemDOS).orElseGet(()->new ArrayList<>()).stream().forEach(prmItemDO -> { |
| | | PRMItemVO prmItemVO = pRMItemDOO2VO(prmItemDO,viType); |
| | | portalVIVOS.add(prmItemVO); |
| | | }); |
| | | return portalVIVOS; |
| | | } |
| | | public List<PRMItemDO> pRMItemDTOO2DOS(Collection<PRMItemDTO> prmItemDTOS,short viType) { |
| | | List<PRMItemDO> portalVIVOS = new ArrayList<>(); |
| | | Optional.ofNullable(prmItemDTOS).orElseGet(()->new ArrayList<>()).stream().forEach(PRMItemDTO -> { |
| | | PRMItemDO PRMItemDO = pRMItemDTOO2DO(PRMItemDTO,viType); |
| | | portalVIVOS.add(PRMItemDO); |
| | | }); |
| | | return portalVIVOS; |
| | | } |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ |
| | | * @param prmItemDTO æ°æ®å¯¹è±¡ |
| | | * @param viType 表åç±»å |
| | | * @return |
| | | */ |
| | | private PRMItemDO pRMItemDTOO2DO(PRMItemDTO prmItemDTO,short viType) { |
| | | PRMItemDO prmItemDO=new PRMItemDO(); |
| | | prmItemDO.setItemBat(prmItemDTO.getItemBat()); |
| | | prmItemDO.setItemCols(prmItemDTO.getItemCols()); |
| | | prmItemDO.setItemEQ(prmItemDTO.getItemEQ()); |
| | | prmItemDO.setItemDbl(prmItemDTO.getItemDbl()); |
| | | prmItemDO.setItemCut(prmItemDTO.getItemCut()); |
| | | prmItemDO.setItemOR(prmItemDTO.getItemOR()); |
| | | prmItemDO.setItemAddFilter(prmItemDTO.getItemAddFilter()); |
| | | prmItemDO.setItemField(prmItemDTO.getItemField()); |
| | | prmItemDO.setItemImgWH(prmItemDTO.getItemImgWH()); |
| | | prmItemDO.setItemCtrlDisplyCol(prmItemDTO.getItemCtrlDisplyCol());//æ§å¶æ¾ç¤ºå |
| | | prmItemDO.setItemDateFormat(prmItemDTO.getItemDateFormat());// æ°æ®ä¸ºæ¥æç±»åæ¶çæ ¼å¼åå符串 å¦ yyyy-MM-dd HH:mm:ss |
| | | prmItemDO.setItemInObj(prmItemDTO.getItemInObj()); |
| | | prmItemDO.setItemName(prmItemDTO.getItemName()); |
| | | prmItemDO.setItemCustomClass(prmItemDTO.getItemCustomClass());//èªå®ä¹ç±»è·¯å¾ |
| | | prmItemDO.setItemIsHidden(prmItemDTO.getItemIsHidden()); |
| | | prmItemDO.setItemIsEditable(prmItemDTO.getItemIsEditable()); |
| | | prmItemDO.setItemIsRequired(prmItemDTO.getItemIsRequired()); |
| | | prmItemDO.setItemFieldWidth(prmItemDTO.getItemFieldWidth()); |
| | | prmItemDO.setItemTxf(prmItemDTO.getItemTxf()); |
| | | prmItemDO.setItemRows(prmItemDTO.getItemRows()); |
| | | prmItemDO.setItemHrefConf(prmItemDO.getItemHrefConf());//è¶
龿¥é
ç½® |
| | | prmItemDO.setItemTips(prmItemDTO.getItemTips()); |
| | | prmItemDO.setItemTrim(prmItemDTO.getItemTrim()); |
| | | prmItemDO.setItemDateFormat(prmItemDTO.getItemDateFormat()); |
| | | prmItemDO.setItemCtrlDisplyCondition(prmItemDTO.getItemCtrlDisplyCondition());////æ§å¶æ¾ç¤ºæ¡ä»¶ |
| | | prmItemDO.setItemEditableProgram(prmItemDTO.getItemEditableProgram()); |
| | | prmItemDO.setItemEditCondition(prmItemDTO.getItemEditCondition()); |
| | | prmItemDO.setItemHrefFields(prmItemDTO.getItemHrefFields());//è¶
龿¥å段 |
| | | prmItemDO.setItemValueList(prmItemDTO.getItemValueList()); |
| | | prmItemDO.setItemValue(prmItemDTO.getItemValue()); |
| | | prmItemDO.setItemStyle(prmItemDTO.getItemStyle()); |
| | | prmItemDO.setItemShowExpression(prmItemDTO.getItemShowExpression());// æ¾ç¤ºè¡¨è¾¾å¼ ${aa}-${bb} |
| | | prmItemDO.setItemSeniorQueryColsCounts(prmItemDTO.getItemSeniorQueryColsCounts());//é«çº§æ¥è¯¢ååä½¿ç¨æ¬¡æ° |
| | | prmItemDO.setItemType(prmItemDTO.getItemType()); |
| | | prmItemDO.setItemScript(prmItemDTO.getItemScript()); |
| | | prmItemDO.setItemRight(prmItemDTO.getItemRight()); |
| | | prmItemDO.setItemQuerySql(prmItemDTO.getItemQuerySql()); |
| | | prmItemDO.setItemQueryRefFields(prmItemDTO.getItemQueryRefFields());//æ¥è¯¢å
³èå |
| | | prmItemDO.setItemQtName(prmItemDTO.getItemQtName());//æ«çåç§° |
| | | prmItemDO.setItemParentFolderName(prmItemDTO.getItemParentFolderName());//ç¶æä»¶å¤¹åç§° |
| | | prmItemDO.setItemPageSize(prmItemDTO.getItemPageSize()); |
| | | prmItemDO.setItemOutType(prmItemDTO.getItemOutType()); |
| | | prmItemDO.setItemOutFields(prmItemDTO.getItemOutFields()); |
| | | prmItemDO.setItemListVal(prmItemDTO.getItemListVal()); |
| | | prmItemDO.setItemListTxt(prmItemDTO.getItemListTxt()); |
| | | prmItemDO.setItemListTable(prmItemDTO.getItemListTable()); |
| | | prmItemDO.setItemKeyFields(prmItemDTO.getItemKeyFields()); |
| | | prmItemDO.setItemIsShowFolder(prmItemDTO.getItemIsShowFolder());//æ¯å¦æ¾ç¤ºæä»¶å¤¹ |
| | | prmItemDO.setItemIsNavigatorExpand(prmItemDTO.getItemIsNavigatorExpand());////æ¥è¯¢åºåæ¾ç¤ºæ§å¶ |
| | | prmItemDO.setItemIsHttpSave(prmItemDTO.getItemIsHttpSave()); |
| | | prmItemDO.setItemHttpVolumnPath(prmItemDTO.getItemHttpVolumnPath()); |
| | | prmItemDO.setItemHttpPathField(prmItemDTO.getItemHttpPathField()); |
| | | if(viType==PortalVIType.Table.getIntVal()) {//妿æ¯è¡¨æ ¼ |
| | | initTableConfigDTOO2DOData(prmItemDO,prmItemDTO); |
| | | } |
| | | return prmItemDO; |
| | | } |
| | | /** |
| | | * PRMItemDO 转 PRMItemVO |
| | | * @param prmItemDO |
| | | * @param viType |
| | | * @return |
| | | */ |
| | | private PRMItemVO pRMItemDOO2VO(PRMItemDO prmItemDO,short viType) { |
| | | PRMItemVO prmItemVO=new PRMItemVO(); |
| | | prmItemVO.setItemBat(prmItemDO.getItemBat()); |
| | | prmItemVO.setItemCols(prmItemDO.getItemCols()); |
| | | prmItemVO.setItemEQ(prmItemDO.getItemEQ()); |
| | | prmItemVO.setItemDbl(prmItemDO.getItemDbl()); |
| | | prmItemVO.setItemCut(prmItemDO.getItemCut()); |
| | | prmItemVO.setItemOR(prmItemDO.getItemOR()); |
| | | prmItemVO.setItemAddFilter(prmItemDO.getItemAddFilter()); |
| | | prmItemVO.setItemField(prmItemDO.getItemField()); |
| | | prmItemVO.setItemImgWH(prmItemDO.getItemImgWH()); |
| | | prmItemVO.setItemCtrlDisplyCol(prmItemDO.getItemCtrlDisplyCol());//æ§å¶æ¾ç¤ºå |
| | | prmItemVO.setItemDateFormat(prmItemDO.getItemDateFormat());// æ°æ®ä¸ºæ¥æç±»åæ¶çæ ¼å¼åå符串 å¦ yyyy-MM-dd HH:mm:ss |
| | | prmItemVO.setItemInObj(prmItemDO.getItemInObj()); |
| | | prmItemVO.setItemName(prmItemDO.getItemName()); |
| | | prmItemVO.setItemCustomClass(prmItemDO.getItemCustomClass());//èªå®ä¹ç±»è·¯å¾ |
| | | prmItemVO.setItemIsHidden(prmItemDO.getItemIsHidden()); |
| | | prmItemVO.setItemIsEditable(prmItemDO.getItemIsEditable()); |
| | | prmItemVO.setItemIsRequired(prmItemDO.getItemIsRequired()); |
| | | prmItemVO.setItemFieldWidth(prmItemDO.getItemFieldWidth()); |
| | | prmItemVO.setItemTxf(prmItemDO.getItemTxf()); |
| | | prmItemVO.setItemRows(prmItemDO.getItemRows()); |
| | | prmItemVO.setItemHrefConf(prmItemDO.getItemHrefConf());//è¶
龿¥é
ç½® |
| | | prmItemVO.setItemTips(prmItemDO.getItemTips()); |
| | | prmItemVO.setItemTrim(prmItemDO.getItemTrim()); |
| | | prmItemVO.setItemDateFormat(prmItemDO.getItemDateFormat()); |
| | | prmItemVO.setItemCtrlDisplyCondition(prmItemDO.getItemCtrlDisplyCondition());////æ§å¶æ¾ç¤ºæ¡ä»¶ |
| | | prmItemVO.setItemEditableProgram(prmItemDO.getItemEditableProgram()); |
| | | prmItemVO.setItemEditCondition(prmItemDO.getItemEditCondition()); |
| | | prmItemVO.setItemHrefFields(prmItemDO.getItemHrefFields());//è¶
龿¥å段 |
| | | prmItemVO.setItemValueList(prmItemDO.getItemValueList()); |
| | | prmItemVO.setItemValue(prmItemDO.getItemValue()); |
| | | prmItemVO.setItemStyle(prmItemDO.getItemStyle()); |
| | | prmItemVO.setItemShowExpression(prmItemDO.getItemShowExpression());// æ¾ç¤ºè¡¨è¾¾å¼ ${aa}-${bb} |
| | | prmItemVO.setItemSeniorQueryColsCounts(prmItemDO.getItemSeniorQueryColsCounts());//é«çº§æ¥è¯¢ååä½¿ç¨æ¬¡æ° |
| | | prmItemVO.setItemQuerySql(prmItemDO.getItemQuerySql());//é«çº§æ¥è¯¢sql |
| | | prmItemVO.setItemType(prmItemDO.getItemType());//屿§åºæ¬ç±»å |
| | | prmItemVO.setItemTypeText(ItemTypeEnum.getTextByValue(prmItemDO.getItemType()));//屿§åºæ¬ç±»åæ¾ç¤ºå¼ |
| | | prmItemVO.setItemScript(prmItemDO.getItemScript()); |
| | | prmItemVO.setItemRight(prmItemDO.getItemRight()); |
| | | prmItemVO.setItemQueryRefFields(prmItemDO.getItemQueryRefFields());//æ¥è¯¢å
³èå |
| | | prmItemVO.setItemQtName(prmItemDO.getItemQtName()); |
| | | prmItemVO.setItemParentFolderName(prmItemDO.getItemParentFolderName());//ç¶æä»¶å¤¹åç§° |
| | | prmItemVO.setItemPageSize(prmItemDO.getItemPageSize()); |
| | | prmItemVO.setItemOutType(prmItemDO.getItemOutType()); |
| | | prmItemVO.setItemOutFields(prmItemDO.getItemOutFields()); |
| | | prmItemVO.setItemListVal(prmItemDO.getItemListVal());//åç
§å¼ |
| | | prmItemVO.setItemListTxt(prmItemDO.getItemListTxt()); |
| | | prmItemVO.setItemListTable(prmItemDO.getItemListTable()); |
| | | prmItemVO.setItemKeyFields(prmItemDO.getItemKeyFields()); |
| | | prmItemVO.setItemIsShowFolder(prmItemDO.getItemIsShowFolder());//æ¯å¦æ¾ç¤ºæä»¶å¤¹ |
| | | prmItemVO.setItemIsNavigatorExpand(prmItemDO.getItemIsNavigatorExpand());////æ¥è¯¢åºåæ¾ç¤ºæ§å¶ |
| | | prmItemVO.setItemIsHttpSave(prmItemDO.getItemIsHttpSave()); |
| | | prmItemVO.setItemHttpVolumnPath(prmItemDO.getItemHttpVolumnPath()); |
| | | prmItemVO.setItemHttpPathField(prmItemDO.getItemHttpPathField()); |
| | | if(viType==PortalVIType.Table.getIntVal()) {//妿æ¯è¡¨æ ¼ |
| | | initTableConfigDOO2VOData(prmItemVO,prmItemDO); |
| | | } |
| | | return prmItemVO; |
| | | } |
| | | |
| | | /** |
| | | * åå§åè¡¨æ ¼æç¨ç¹æ®å段é
ç½® |
| | | * @param prmItemVO |
| | | * @param prmItemDO |
| | | */ |
| | | private void initTableConfigDOO2VOData(PRMItemVO prmItemVO,PRMItemDO prmItemDO){ |
| | | prmItemVO.setItemFieldWidthList(initItemFieldWidthList(prmItemDO.getItemOutFields(),prmItemDO.getItemFieldWidth()));//åæ¾ç¤ºå®½æ®µ itemOutFieldList ç¸å¹é
|
| | | prmItemVO.setItemSeniorQueryBOS(initItemSeniorQueryBOData(prmItemDO.getItemSeniorQueryCols(),prmItemDO.getItemSeniorQueryColsCounts(),prmItemDO.getItemQuerySql()));//é«çº§æ¥è¯¢å¯¹è±¡ |
| | | List<String> allKeyList= getRefFormVIName(prmItemVO.getItemInObj()); |
| | | List<String> itemOutFieldList =VciBaseUtil.str2List(prmItemVO.getItemOutFields()); |
| | | List<String> itemKeyFieldList =VciBaseUtil.str2List(prmItemVO.getItemKeyFields()); |
| | | List<String> itemSelectoutFieldList= allKeyList.stream().filter(s ->!itemOutFieldList.stream().map(s1 -> s1).collect(Collectors.toList()).contains(s) ).collect(Collectors.toList()); |
| | | prmItemVO.setItemSelectoutFieldList(itemSelectoutFieldList);//å¾
éæ©ç屿§å段 |
| | | prmItemVO.setItemOutFieldList(itemOutFieldList);//éè¦ä½¿ç¨çéå |
| | | List<String> itemSearchFieldList= itemOutFieldList.stream().filter(s ->!itemKeyFieldList.stream().map(s1 -> s1).collect(Collectors.toList()).contains(s) ).collect(Collectors.toList()); |
| | | prmItemVO.setItemSearchFieldList(itemSearchFieldList);//å¾
æç´¢å段 |
| | | prmItemVO.setItemKeyFieldList(itemKeyFieldList);//æç´¢å段 |
| | | } |
| | | /** |
| | | * åå§åè¡¨æ ¼æç¨ç¹æ®å段é
ç½® |
| | | * @param prmItemDTO |
| | | * @param prmItemDO |
| | | */ |
| | | private void initTableConfigDTOO2DOData(PRMItemDO prmItemDO,PRMItemDTO prmItemDTO){ |
| | | |
| | | prmItemDO.setItemOutFields(VciBaseUtil.array2String(prmItemDTO.getItemOutFieldList().toArray(new String[]{})));//éè¦ä½¿ç¨çåæ®µ |
| | | prmItemDO.setItemKeyFields(VciBaseUtil.array2String(prmItemDTO.getItemKeyFieldList().toArray(new String[]{})));//éè¦æç´¢çåæ®µ |
| | | List<String> newItemFieldWidthList=prmItemDTO.getItemFieldWidthList().stream().map(KeyValue::getValue).distinct().collect(Collectors.toList()); |
| | | prmItemDO.setItemFieldWidth(VciBaseUtil.array2String(newItemFieldWidthList.toArray(new String[]{}),":"));//åæ®µå®½åº¦ |
| | | List<ItemSeniorQueryBO> itemSeniorQueryBOS= prmItemDTO.getItemSeniorQueryBOS(); |
| | | List<String> itemSeniorQueryColsList=new ArrayList<>(); |
| | | List<String> itemSeniorQueryColsCountsList=new ArrayList<>(); |
| | | List<String> itemQuerySqlList=new ArrayList<>(); |
| | | itemSeniorQueryBOS.stream().forEach(itemSeniorQueryBO -> { |
| | | String itemSeniorQueryCols= itemSeniorQueryBO.getItemSeniorQueryCols(); |
| | | String itemSeniorQueryColsCounts=itemSeniorQueryBO.getItemSeniorQueryColsCounts(); |
| | | String itemQuerySql=itemSeniorQueryBO.getItemQuerySql(); |
| | | if(StringUtils.isNotBlank(itemSeniorQueryCols)) { |
| | | itemSeniorQueryColsList.add(itemSeniorQueryCols); |
| | | } |
| | | if(StringUtils.isNotBlank(itemSeniorQueryColsCounts)) { |
| | | itemSeniorQueryColsCountsList.add(itemSeniorQueryColsCounts); |
| | | } |
| | | if(StringUtils.isNotBlank(itemQuerySql)){ |
| | | itemQuerySqlList.add(itemQuerySql); |
| | | } |
| | | }); |
| | | prmItemDO.setItemSeniorQueryCols(VciBaseUtil.array2String(itemSeniorQueryColsList.toArray(new String[]{}))); |
| | | prmItemDO.setItemSeniorQueryColsCounts(VciBaseUtil.array2String(itemSeniorQueryColsCountsList.toArray(new String[]{}))); |
| | | prmItemDO.setItemQuerySql(VciBaseUtil.array2String(itemQuerySqlList.toArray(new String[]{}),";")); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * åå§åè¡¨æ ¼å宽度éå |
| | | */ |
| | | private List<KeyValue> initItemFieldWidthList(String itemOutFields,String itemFieldWidth){ |
| | | List<KeyValue> keyValueList=new ArrayList<>(); |
| | | List<String>itemOutFieldList= VciBaseUtil.str2List(itemOutFields); |
| | | List<String>itemFieldWidthList= VciBaseUtil.str2List(itemFieldWidth); |
| | | if(itemOutFieldList.size()>0) { |
| | | for (int i = 0; i < itemOutFieldList.size(); i++) { |
| | | KeyValue keyValue = new KeyValue(); |
| | | String with = itemFieldWidthList.get(i); |
| | | keyValue.setKey(itemOutFieldList.get(i)); |
| | | keyValue.setValue(StringUtils.isBlank(with) ? "250" : with); |
| | | keyValueList.add(keyValue); |
| | | } |
| | | } |
| | | return keyValueList; |
| | | } |
| | | /** |
| | | * é«çº§æ¥è¯¢é
ç½®åå§å |
| | | * @param itemSeniorQueryCols |
| | | * @param itemSeniorQueryColsCounts |
| | | * @param itemQuerySql |
| | | * @return |
| | | */ |
| | | private List<ItemSeniorQueryBO> initItemSeniorQueryBOData(String itemSeniorQueryCols,String itemSeniorQueryColsCounts,String itemQuerySql){ |
| | | List<ItemSeniorQueryBO> itemSeniorQueryBOList=new ArrayList<>(); |
| | | List<String> itemSeniorQueryColList= VciBaseUtil.str2List(itemSeniorQueryCols); |
| | | List<String> itemSeniorQueryColsCountList= VciBaseUtil.str2List(itemSeniorQueryColsCounts); |
| | | List<String> itemQuerySqlList= VciBaseUtil.str2List(itemQuerySql,";"); |
| | | if (itemSeniorQueryColList!=null&&itemSeniorQueryColList.size()>0){ |
| | | for (int i=0;i<itemSeniorQueryColList.size();i++){ |
| | | String itemSeniorQueryCol= itemSeniorQueryColList.get(i); |
| | | String itemSeniorQueryColsCount= itemSeniorQueryColsCountList.get(i); |
| | | if(StringUtils.isNotBlank(itemSeniorQueryCol)){ |
| | | String querysql = ""; |
| | | if(itemQuerySqlList!=null){ |
| | | querysql = itemQuerySqlList.get(i); |
| | | } |
| | | ItemSeniorQueryBO itemSeniorQueryBO=null; |
| | | if("null".equals(querysql) ){ |
| | | itemSeniorQueryBO= new ItemSeniorQueryBO(itemSeniorQueryCol,itemSeniorQueryColsCount,""); |
| | | }else{ |
| | | itemSeniorQueryBO= new ItemSeniorQueryBO(itemSeniorQueryCol,itemSeniorQueryColsCount,querysql); |
| | | } |
| | | itemSeniorQueryBOList.add(itemSeniorQueryBO); |
| | | } |
| | | } |
| | | } |
| | | return itemSeniorQueryBOList; |
| | | } |
| | | private List<String> getRefFormVIName(String refFormOid){ |
| | | List<String> keyList=new ArrayList<>(); |
| | | try { |
| | | |
| | | PortalVI refFormVI = UITools.getService().getPortalVIById(refFormOid); |
| | | PortalVIVO portalVIVO= portalVIDOO2VO(refFormVI); |
| | | if(portalVIVO!=null&&portalVIVO.getPrm().getPrmItemList().size()>0){ |
| | | portalVIVO.getPrm().getPrmItemList().stream().forEach(k->{ |
| | | keyList.add(k.getItemField()); |
| | | }); |
| | | } |
| | | } catch (PLException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | return keyList; |
| | | } |
| | | return keyList; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.util; |
| | | |
| | | import net.sourceforge.pinyin4j.PinyinHelper; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType; |
| | | import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; |
| | | |
| | | /** |
| | | * |
| | | |
| | | * @author: ligang |
| | | |
| | | * @createtime: 2012-12-26 |
| | | |
| | | * @version: |
| | | |
| | | */ |
| | | public class PinyinCommon { |
| | | |
| | | /** |
| | | * å¾å° å
¨æ¼ |
| | | * @param src |
| | | * @return |
| | | */ |
| | | public static String getPingYin(String src){ |
| | | char[] t1 = null; |
| | | t1=src.toCharArray(); |
| | | String[] t2 = new String[t1.length]; |
| | | HanyuPinyinOutputFormat t3 = new HanyuPinyinOutputFormat(); |
| | | t3.setCaseType(HanyuPinyinCaseType.LOWERCASE); |
| | | t3.setToneType(HanyuPinyinToneType.WITHOUT_TONE); |
| | | t3.setVCharType(HanyuPinyinVCharType.WITH_V); |
| | | String t4=""; |
| | | int t0=t1.length; |
| | | try { |
| | | for (int i=0;i<t0;i++) { |
| | | //夿æ¯å¦ä¸ºæ±åå符 |
| | | if(Character.toString(t1[i]).matches("[\\u4E00-\\u9FA5]+")) { |
| | | t2 = PinyinHelper.toHanyuPinyinStringArray(t1[i], t3); |
| | | t4+=t2[0]; |
| | | } else { |
| | | t4+= Character.toString(t1[i]); |
| | | } |
| | | } |
| | | return t4; |
| | | } |
| | | catch (BadHanyuPinyinOutputFormatCombination e1) { |
| | | e1.printStackTrace(); |
| | | } |
| | | return t4; |
| | | } |
| | | |
| | | /** |
| | | * å¾å°ä¸æé¦åæ¯ |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static String getPinYinHeadChar(String str) { |
| | | |
| | | String convert = ""; |
| | | for (int j = 0; j < str.length(); j++) { |
| | | char word = str.charAt(j); |
| | | String[] pinyinArray = PinyinHelper.toHanyuPinyinStringArray(word); |
| | | if (pinyinArray != null) { |
| | | convert += pinyinArray[0].charAt(0); |
| | | }else { |
| | | convert += word; |
| | | } |
| | | } |
| | | return convert; |
| | | } |
| | | /** |
| | | * å°å符串转移为ASCIIç |
| | | * @param cnStr |
| | | * @return |
| | | */ |
| | | public static String getCnASCII(String cnStr) { |
| | | StringBuffer strBuf = new StringBuffer(); |
| | | byte[] bGBK = cnStr.getBytes(); |
| | | for(int i=0;i <bGBK.length;i++){ |
| | | //System.out.println(Integer.toHexString(bGBK[i]&0xff)); |
| | | strBuf.append(Integer.toHexString(bGBK[i]&0xff)); |
| | | } |
| | | return strBuf.toString(); |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.util; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | import com.vci.model.PRMDO; |
| | | import com.vci.model.PRMItemDO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.dom4j.Document; |
| | | import org.dom4j.DocumentException; |
| | | import org.dom4j.DocumentHelper; |
| | | import org.dom4j.Element; |
| | | |
| | | import com.vci.client.common.providers.ClientServiceProvider; |
| | | import com.vci.common.portal.constants.PLDefinationConstants; |
| | | import com.vci.common.portal.constants.PRMConstants; |
| | | import com.vci.corba.portal.PortalServicePrx; |
| | | |
| | | |
| | | /** |
| | | * UIService 模å Util å·¥å
·ç±» |
| | | * <p>Title: </p> |
| | | * <p>Description: </p> |
| | | * <p>Copyright: Copyright (c) 2017</p> |
| | | * <p>Company: VCI</p> |
| | | * @author xiongchao |
| | | * @time 2017-12-21 |
| | | * @version 1.0 |
| | | */ |
| | | public class UITools { |
| | | private static PortalServicePrx portalService = null; |
| | | |
| | | public static PortalServicePrx getService(){ |
| | | if(portalService != null){ |
| | | return portalService; |
| | | } |
| | | try { |
| | | portalService = ClientServiceProvider.getUIService(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return portalService; |
| | | } |
| | | |
| | | /** |
| | | * å°xmlææ¬è½¬åæPRM对象 |
| | | * @param text |
| | | * @return |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | public static PRMDO getPRM(String text){ |
| | | |
| | | if (StringUtils.isEmpty(text)) |
| | | return null; |
| | | |
| | | Document document = null; |
| | | try { |
| | | document = DocumentHelper.parseText(text); |
| | | } catch (DocumentException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | if(document == null){ |
| | | return null; |
| | | } |
| | | PRMDO prm = new PRMDO(); |
| | | try{ |
| | | Element root = document.getRootElement(); |
| | | String showCols = root.elementText(PRMConstants.JD_SHOWCOLS); |
| | | if(showCols == null || showCols.equals("")){ |
| | | showCols = "3"; |
| | | } |
| | | prm.setShowCols(showCols); |
| | | String formQtName = root.elementText(PRMConstants.JD_FORMQTNAME); |
| | | if(formQtName == null){ |
| | | formQtName = ""; |
| | | } |
| | | prm.setFormQtName(formQtName); |
| | | List<Element> items = root.elements(PRMConstants.JD_ITEM); |
| | | List<PRMItemDO> prmItemList = new ArrayList<PRMItemDO>(); |
| | | prm.setPrmItemList(prmItemList); |
| | | for(Iterator<Element> i = items.iterator(); i.hasNext();){ |
| | | Element item = i.next(); |
| | | PRMItemDO prmItem = new PRMItemDO(); |
| | | prmItemList.add(prmItem); |
| | | |
| | | String elementText = item.elementText(PRMConstants.JD_field); |
| | | prmItem.setItemField(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_or); |
| | | prmItem.setItemOR(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_eq); |
| | | prmItem.setItemEQ(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_trim); |
| | | prmItem.setItemTrim(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_dbl); |
| | | prmItem.setItemDbl(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_cut); |
| | | prmItem.setItemCut(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_inObj); |
| | | prmItem.setItemInObj(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_addFilter); |
| | | prmItem.setItemAddFilter(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_outType); |
| | | prmItem.setItemOutType(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_pageSize); |
| | | prmItem.setItemPageSize(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_imgWH); |
| | | prmItem.setItemImgWH(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_outFields); |
| | | prmItem.setItemOutFields(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_keyFields); |
| | | prmItem.setItemKeyFields(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_bat); |
| | | prmItem.setItemBat(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_txf); |
| | | prmItem.setItemTxf(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_name); |
| | | prmItem.setItemName(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_type); |
| | | prmItem.setItemType(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_value); |
| | | prmItem.setItemValue(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_cols); |
| | | prmItem.setItemCols(elementText == null ? "" : elementText); |
| | | // add by xchao 2017.11.23 begin |
| | | // prmItem ç itemIsHidden å¼çäº itemCols |
| | | // è¯¥å¼æ§å¶å
ç´ æ¯å¦æ¾ç¤º 1ï¼æ¾ç¤º 0ï¼ä¸æ¾ç¤ºï¼å½ä¸ä»
å½çäº1æ¶æ¾ç¤ºï¼å¦åæä¸æ¾ç¤º |
| | | prmItem.setItemIsHidden(elementText == null ? "" : elementText); |
| | | // add by xchao 2017.11.23 end |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_rows); |
| | | prmItem.setItemRows(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_style); |
| | | prmItem.setItemStyle(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_script); |
| | | prmItem.setItemScript(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_tips); |
| | | prmItem.setItemTips(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_valuelist); |
| | | if(elementText == null || elementText.equals("")){ |
| | | prmItem.setItemValueList(new ArrayList<String>()); |
| | | }else{ |
| | | prmItem.setItemValueList(arrayToList(elementText.split(";"))); |
| | | } |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_listTable); |
| | | prmItem.setItemListTable(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_listTxt); |
| | | prmItem.setItemListTxt(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_listVal); |
| | | prmItem.setItemListVal(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_showExpression); |
| | | prmItem.setItemShowExpression(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_dateFormat); |
| | | prmItem.setItemDateFormat(elementText == null ? "" : elementText); |
| | | |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_isEditable); |
| | | prmItem.setItemIsEditable(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_EditableProgram); |
| | | prmItem.setItemEditableProgram(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_qtName); |
| | | prmItem.setItemQtName(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_isRequired); |
| | | prmItem.setItemIsRequired(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_seniorQueryCols); |
| | | prmItem.setItemSeniorQueryCols(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_seniorQueryColsCounts); |
| | | prmItem.setItemSeniorQueryColsCounts(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_hrefFields); |
| | | prmItem.setItemHrefFields(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_hrefConf); |
| | | prmItem.setItemHrefConf(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_queryRefFields); |
| | | prmItem.setItemQueryRefFields(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_customClass); |
| | | prmItem.setItemCustomClass(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_ctrlDisplyCol); |
| | | prmItem.setItemCtrlDisplyCol(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_ctrlDisplyCondition); |
| | | prmItem.setItemCtrlDisplyCondition(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_isHttpSave); |
| | | prmItem.setItemIsHttpSave(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_httpVolumnPath); |
| | | prmItem.setItemHttpVolumnPath(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_httpPathField); |
| | | prmItem.setItemHttpPathField(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_editCondition); |
| | | prmItem.setItemEditCondition(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_isNavigatorExpand); |
| | | prmItem.setItemIsNavigatorExpand(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_isShowFolder); |
| | | prmItem.setItemIsShowFolder(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_parentFolderName); |
| | | prmItem.setItemParentFolderName(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_filterColWidth); |
| | | prmItem.setItemFieldWidth(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_QuerySql); |
| | | prmItem.setItemQuerySql(elementText == null ? "" : elementText); |
| | | |
| | | elementText = item.elementText(PRMConstants.JD_right); |
| | | prmItem.setItemRight(elementText == null ? "" : elementText); |
| | | |
| | | } |
| | | }catch(Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | return prm; |
| | | } |
| | | |
| | | /** |
| | | * å°PRM对象转åæxmlææ¬ |
| | | * @param prm |
| | | * @return |
| | | * @throws Throwable |
| | | */ |
| | | public static String getPRMText(PRMDO prm) throws Throwable{ |
| | | try { |
| | | if (prm == null) { |
| | | return ""; |
| | | } |
| | | Document document = DocumentHelper.createDocument(); |
| | | Element rootNode = document.addElement(PRMConstants.JD_DATASET); |
| | | Element showColsNode = rootNode.addElement(PRMConstants.JD_SHOWCOLS); |
| | | showColsNode.setText(prm.getShowCols()); |
| | | Element formQtNameNode = rootNode.addElement(PRMConstants.JD_FORMQTNAME); |
| | | formQtNameNode.setText(prm.getFormQtName()); |
| | | List<PRMItemDO> prmItemList = prm.getPrmItemList(); |
| | | if (prmItemList != null && prmItemList.size() > 0) { |
| | | for (Iterator<PRMItemDO> i = prmItemList.iterator(); i.hasNext();) { |
| | | Element itemNode = rootNode.addElement(PRMConstants.JD_ITEM); |
| | | PRMItemDO item = i.next(); |
| | | |
| | | Element itemChildNode = itemNode.addElement(PRMConstants.JD_field); |
| | | itemChildNode.setText(item.getItemField()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_or); |
| | | itemChildNode.setText(item.getItemOR()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_eq); |
| | | itemChildNode.setText(item.getItemEQ()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_trim); |
| | | itemChildNode.setText(item.getItemTrim()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_dbl); |
| | | itemChildNode.setText(item.getItemDbl()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_cut); |
| | | itemChildNode.setText(item.getItemCut()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_inObj); |
| | | itemChildNode.setText(item.getItemInObj()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_addFilter); |
| | | itemChildNode.setText(item.getItemAddFilter()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_outType); |
| | | itemChildNode.setText(item.getItemOutType()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_pageSize); |
| | | itemChildNode.setText(item.getItemPageSize()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_imgWH); |
| | | itemChildNode.setText(item.getItemImgWH()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_outFields); |
| | | itemChildNode.setText(item.getItemOutFields()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_keyFields); |
| | | itemChildNode.setText(item.getItemKeyFields()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_bat); |
| | | itemChildNode.setText(item.getItemBat()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_txf); |
| | | itemChildNode.setText(item.getItemTxf()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_name); |
| | | itemChildNode.setText(item.getItemName()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_type); |
| | | itemChildNode.setText(item.getItemType()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_value); |
| | | itemChildNode.setText(item.getItemValue()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_showExpression); |
| | | itemChildNode.setText(item.getItemShowExpression()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_dateFormat); |
| | | itemChildNode.setText(item.getItemDateFormat()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_cols); |
| | | itemChildNode.setText(item.getItemCols()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_rows); |
| | | itemChildNode.setText(item.getItemRows()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_style); |
| | | itemChildNode.setText(item.getItemStyle()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_script); |
| | | itemChildNode.setText(item.getItemScript()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_tips); |
| | | itemChildNode.setText(item.getItemTips()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_valuelist); |
| | | itemChildNode.setText(listToString(item.getItemValueList())); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_listTable); |
| | | itemChildNode.setText(item.getItemListTable()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_listTxt); |
| | | itemChildNode.setText(item.getItemListTxt()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_listVal); |
| | | itemChildNode.setText(item.getItemListVal()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_isEditable); |
| | | itemChildNode.setText(item.getItemIsEditable()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_EditableProgram); |
| | | itemChildNode.setText(item.getItemEditableProgram()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_qtName); |
| | | itemChildNode.setText(item.getItemQtName()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_isRequired); |
| | | itemChildNode.setText(item.getItemIsRequired()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_seniorQueryCols); |
| | | itemChildNode.setText(item.getItemSeniorQueryCols()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_seniorQueryColsCounts); |
| | | itemChildNode.setText(item.getItemSeniorQueryColsCounts()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_hrefFields); |
| | | itemChildNode.setText(item.getItemHrefFields()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_hrefConf); |
| | | itemChildNode.setText(item.getItemHrefConf()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_queryRefFields); |
| | | itemChildNode.setText(item.getItemQueryRefFields()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_customClass); |
| | | itemChildNode.setText(item.getItemCustomClass()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_ctrlDisplyCol); |
| | | itemChildNode.setText(item.getItemCtrlDisplyCol()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_ctrlDisplyCondition); |
| | | itemChildNode.setText(item.getItemCtrlDisplyCondition()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_isHttpSave); |
| | | itemChildNode.setText(item.getItemIsHttpSave()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_httpVolumnPath); |
| | | itemChildNode.setText(item.getItemHttpVolumnPath()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_httpPathField); |
| | | itemChildNode.setText(item.getItemHttpPathField()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_editCondition); |
| | | itemChildNode.setText(item.getItemEditCondition()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_isNavigatorExpand); |
| | | itemChildNode.setText(item.getItemIsNavigatorExpand()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_isShowFolder); |
| | | itemChildNode.setText(item.getItemIsShowFolder()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_parentFolderName); |
| | | itemChildNode.setText(item.getItemParentFolderName()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_filterColWidth); |
| | | itemChildNode.setText(item.getItemFieldWidth()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_QuerySql); |
| | | itemChildNode.setText(item.getItemQuerySql()); |
| | | |
| | | itemChildNode = itemNode.addElement(PRMConstants.JD_right); |
| | | itemChildNode.setText(item.getItemRight()); |
| | | } |
| | | } |
| | | return document.asXML(); |
| | | } catch (Throwable e) { |
| | | e.printStackTrace(); |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | // /** |
| | | // * å°ä»æ°æ®åºä¸è¯»åçxmlææ¬è½¬åæå¯¹åºçPLDefination对象 |
| | | // * @param text |
| | | // * @return |
| | | // * @throws Throwable |
| | | // */ |
| | | // public static PLDefination getPLDefination(String text) throws Throwable{ |
| | | // try{ |
| | | // Document document = null; |
| | | // document = DocumentHelper.parseText(text); |
| | | // if(document == null){ |
| | | // return null; |
| | | // } |
| | | // PLDefination obj = new PLDefination(); |
| | | // Element root = document.getRootElement(); |
| | | // if(root != null){ |
| | | // String elementText = root.elementText(PLDefinationConstants.TYPE); |
| | | // if(elementText == null || elementText.equals("")){ |
| | | // elementText = "0"; |
| | | // } |
| | | // obj.setType(Integer.parseInt(elementText)); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.SHOWABS); |
| | | // obj.setShowAbs(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.SEPARATOR); |
| | | // obj.setSeparator(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.SHOWLINKABS); |
| | | // obj.setShowLinkAbs(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.SEARCHTARGET); |
| | | // obj.setSearchTarger(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.TEMPLATETYPE); |
| | | // obj.setTemplateType(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.SHOWTYPE); |
| | | // obj.setShowType(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.TEMPLATEID); |
| | | // obj.setTemplateId(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.ORIENTATION); |
| | | // obj.setOrientation(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.VALIDITY); |
| | | // obj.setValidity(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.ORDERFIELD); |
| | | // obj.setOrderField(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.ORDERMODE); |
| | | // obj.setOrderMode(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.RETURNROWS); |
| | | // obj.setReturnRows(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.CONTROLPATH); |
| | | // obj.setControlPath(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.EXPANDMODE); |
| | | // obj.setExpandMode(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.LINKTYPE); |
| | | // obj.setLinkType(elementText == null ? "" : elementText); |
| | | // |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.ISSHOWIMAGE); |
| | | // obj.setIsShowImage(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.EXPANDCOLS); |
| | | // obj.setExpandCols(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.SHOWCONTENT); |
| | | // obj.setShowContent(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.SHOWCONTENTTYPE); |
| | | // obj.setShowContentType(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.SHOWCONTENTRELATION); |
| | | // obj.setShowContentRelation(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.SHOWCONTENTTABLE); |
| | | // obj.setShowContentTable(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.NAVIGATORTYPE); |
| | | // obj.setNavigatorType(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.EVENTKEY); |
| | | // obj.setEventKey(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.EVENTVALUE); |
| | | // obj.setEventValue(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.ROOTCONTENT); |
| | | // obj.setRootContent(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.UIPARSER); |
| | | // obj.setUiParser(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.EXTATTR); |
| | | // obj.setExtAttr(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.QUERYTEMPLATENAME); |
| | | // obj.setQueryTemplateName(elementText == null ? "" : elementText); |
| | | // |
| | | // elementText = root.elementText(PLDefinationConstants.SUBUILAYOUT); |
| | | // obj.setSubUILayout(elementText == null ? "" : elementText); |
| | | // } |
| | | // return obj; |
| | | // }catch(Throwable e){ |
| | | // e.printStackTrace(); |
| | | // throw e; |
| | | // } |
| | | // } |
| | | // |
| | | // /** |
| | | // * å°PLDefination对象转åæxmlææ¬ |
| | | // * @param obj |
| | | // * @return |
| | | // * @throws Throwable |
| | | // */ |
| | | // public static String getPLDefinationText(PLDefination obj) throws Throwable{ |
| | | // try{ |
| | | // if(obj == null){ |
| | | // return ""; |
| | | // } |
| | | // |
| | | // Document doc = DocumentHelper.createDocument(); |
| | | // Element rootNode = doc.addElement(PLDefinationConstants.PLDEFINATION); |
| | | // |
| | | // Element node = rootNode.addElement(PLDefinationConstants.TYPE); |
| | | // node.setText(String.valueOf(obj.getType())); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.SHOWABS); |
| | | // node.setText(obj.getShowAbs()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.SEPARATOR); |
| | | // node.setText(obj.getSeparator()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.SHOWLINKABS); |
| | | // node.setText(obj.getShowLinkAbs()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.SEARCHTARGET); |
| | | // node.setText(obj.getSearchTarger()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.TEMPLATETYPE); |
| | | // node.setText(obj.getTemplateType()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.SHOWTYPE); |
| | | // node.setText(obj.getShowType()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.TEMPLATEID); |
| | | // node.setText(obj.getTemplateId()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.ORIENTATION); |
| | | // node.setText(obj.getOrientation()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.VALIDITY); |
| | | // node.setText(obj.getValidity()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.ORDERFIELD); |
| | | // node.setText(obj.getOrderField()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.ORDERMODE); |
| | | // node.setText(obj.getOrderMode()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.RETURNROWS); |
| | | // node.setText(obj.getReturnRows()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.CONTROLPATH); |
| | | // node.setText(obj.getControlPath()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.EXPANDMODE); |
| | | // node.setText(obj.getExpandMode()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.LINKTYPE); |
| | | // node.setText(obj.getLinkType()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.ISSHOWIMAGE); |
| | | // node.setText(obj.getIsShowImage()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.EXPANDCOLS); |
| | | // node.setText(obj.getExpandCols()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.SHOWCONTENT); |
| | | // node.setText(obj.getShowContent()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.SHOWCONTENTTYPE); |
| | | // node.setText(obj.getShowContentType()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.SHOWCONTENTRELATION); |
| | | // node.setText(obj.getShowContentRelation()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.SHOWCONTENTTABLE); |
| | | // node.setText(obj.getShowContentTable()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.NAVIGATORTYPE); |
| | | // node.setText(obj.getNavigatorType()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.EVENTKEY); |
| | | // node.setText(obj.getEventKey()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.EVENTVALUE); |
| | | // node.setText(obj.getEventValue()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.ROOTCONTENT); |
| | | // node.setText(obj.getRootContent()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.UIPARSER); |
| | | // node.setText(obj.getUiParser()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.EXTATTR); |
| | | // node.setText(obj.getExtAttr()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.QUERYTEMPLATENAME); |
| | | // node.setText(obj.getQueryTemplateName()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.SUBUIOBJTYPE); |
| | | // node.setText(obj.getSubUiObjType()); |
| | | // |
| | | // node = rootNode.addElement(PLDefinationConstants.SUBUILAYOUT); |
| | | // node.setText(obj.getSubUILayout()); |
| | | // |
| | | // return doc.asXML(); |
| | | // }catch(Throwable e){ |
| | | // throw e; |
| | | // } |
| | | // |
| | | // } |
| | | |
| | | /** |
| | | * å°ARRAY转åæLIST |
| | | * @param array |
| | | * @return |
| | | */ |
| | | public static List<String> arrayToList(String[] array){ |
| | | if(array == null || array.length == 0){ |
| | | return null; |
| | | } |
| | | List<String> list = new ArrayList<String>(); |
| | | for(int i = 0; i < array.length; i++){ |
| | | list.add(array[i]); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * å°LISTå ä¸';'æ¼æå符串 |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public static String listToString(List<String> list){ |
| | | StringBuilder strb = new StringBuilder(); |
| | | if(list != null && list.size() > 0){ |
| | | for(int i = 0; i < list.size(); i++){ |
| | | strb.append(list.get(i)); |
| | | if(i < list.size() - 1){ |
| | | strb.append(";"); |
| | | } |
| | | } |
| | | } |
| | | return strb.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // å表æ¥è¯¢ |
| | | // ä¸å¡ç±»åæ æ¥è¯¢ |
| | | export function getBizTypes(params) { |
| | | return request({ |
| | | url: "/api/btmTypeController/getTreeBizTypes", |
| | |
| | | params |
| | | }); |
| | | } |
| | | // æ¥è¯¢ææç屿§ï¼åæ°btmId(ä¸å¡ç±»ååç§°ï¼ |
| | | export function getAllAttributesByBtmId(params) { |
| | | return request({ |
| | | url: "/api/btmTypeController/getAllAttributesByBtmId", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | |
| | | // å建 |
| | | export function addLifeCycle(params) { |
| | |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢ææç屿§ï¼åæ°name(龿¥ç±»å模æ¿åç§°ï¼ |
| | | export function getAllAttributeByLink(params) { |
| | | return request({ |
| | | url: "/api/linkTypeController/getAllAttributeByLink", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | // éè¿å±æ§æ± è¿åç attributes è·å宿´çä¿¡æ¯ |
| | | export function getByAttributeNames(params) { |
| | | return request({ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | //ä¸å¡ç±»åæ¥è¯¢æ¨¡æ¿ |
| | | // 模æ¿å表æ¥è¯¢ |
| | | export function gridTemplate(params) { |
| | | return request({ |
| | | url: "/api/templateController/queryTemplateList", |
| | | method: "get", |
| | | params:{ |
| | | ...params |
| | | } |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | //龿¥ç±»åæ¥è¯¢æ¨¡æ¿ |
| | | // å é¤ |
| | | export function deleteLinkTemplate(params) { |
| | | return request({ |
| | | url: "/api/templateController/deleteLinkTemplate", |
| | | method: "delete", |
| | | data:params |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | //æ¥è¯¢æ¨¡æ¿å®ä¹ |
| | | // 模æ¿å表å®ä¹ä¸ææ¡æ¥è¯¢ |
| | | export function gridTemplate(params) { |
| | | return request({ |
| | | url: "/api/templateController/queryTemplateList", |
| | | method: "get", |
| | | params:{ |
| | | ...params |
| | | } |
| | | }); |
| | | } |
| | | |
| | | export function getObjTypeQTs(params) { |
| | | return request({ |
| | | url: "/api/templateController/getObjTypeQTs", |
| | | method: "get", |
| | | params:{ |
| | | ...params |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateTemplate(params) { |
| | | return request({ |
| | | url: "/api/templateController/updateTemplate", |
| | | method: "post", |
| | | data:params |
| | | }); |
| | | } |
| | | |
| | | // å建 |
| | | export function saveTemplate(params) { |
| | | return request({ |
| | | url: "/api/templateController/saveTemplate", |
| | | method: "post", |
| | | data:params |
| | | }); |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteTemplate(params) { |
| | | return request({ |
| | | url: "/api/templateController/deleteTemplate", |
| | | method: "delete", |
| | | data:params |
| | | }); |
| | | } |
| | | |
| | |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 300px);"> |
| | | <div style="height: calc(100vh - 260px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <div ref="TreeBox" style="height: calc(100vh - 154px);!important;"> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <div style="height: calc(100vh - 190px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | <avue-crud ref="crud" |
| | | :data="crudData" :option="crudOption" :table-loading="tableLoading" style="margin-top: 10px"> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">å建</el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">ä¿®æ¹</el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">å é¤</el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">导åº</el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">导å
¥</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getBizTypes} from "@/api/modeling/businessType/api"; |
| | | import {gridTemplate,saveTemplate,updateTemplate,deleteTemplate} from "@/api/queryTemplate/queryDefine"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import func from "@/util/func"; |
| | | import {dateFormat} from "@/util/date"; |
| | | export default { |
| | | name: "index" |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | treeOption: { |
| | | height: 'auto', |
| | | defaultExpandedKeys: ['topNode'], |
| | | menu: false, |
| | | addBtn: false, |
| | | props: { |
| | | label: 'label', |
| | | value: 'oid', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | nodeRow: {}, |
| | | treeData: [ { |
| | | label: 'ä¸å¡ç±»åæ ', |
| | | oid: 'topNode', |
| | | children: [] |
| | | }], |
| | | templateForm: '', |
| | | templateData: [], |
| | | form: { |
| | | name: '' |
| | | }, |
| | | rules: { |
| | | name: [ |
| | | {required: true, message: '请è¾å
¥æ¥è¯¢æ¨¡æ¿åç§°', trigger: 'blur'} |
| | | ] |
| | | }, |
| | | title: '', |
| | | visible: false, |
| | | tableLoading: false, |
| | | crudData: [], |
| | | crudOption: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | selection: true, |
| | | menu: false, |
| | | height: "auto", |
| | | calcHeight: -40, |
| | | tip: false, |
| | | column: [{ |
| | | label: 'æ¥è¯¢æ¨¡æ¿åç§°', |
| | | prop: 'name' |
| | | }, { |
| | | label: 'å建人', |
| | | prop: 'creator' |
| | | }, { |
| | | label: 'å建æ¶é´', |
| | | prop: 'createTime', |
| | | formatter:function (row, value) { |
| | | return dateFormat(new Date(value)) |
| | | } |
| | | }] |
| | | }, |
| | | selectionRow: [], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTreeList(); |
| | | }, |
| | | methods: { |
| | | //æ 表æ¥è¯¢ |
| | | getTreeList() { |
| | | const loading = this.$loading({}); |
| | | getBizTypes().then(res => { |
| | | const data = res.data.data.map(item => { |
| | | item.label = item.attributes.id; |
| | | return item; |
| | | }); |
| | | this.treeData[0].children = data; |
| | | loading.close(); |
| | | }) |
| | | }, |
| | | |
| | | // æ ç¹å» |
| | | nodeClick(row) { |
| | | this.nodeRow = row; |
| | | this.tableLoading = true; |
| | | this.getTemp(); |
| | | }, |
| | | getTemp() { |
| | | gridTemplate({btmName: this.nodeRow.label, linkFlag: false}).then(res => { |
| | | this.crudData = res.data.data; |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | selectHandler(selection, row) { |
| | | |
| | | }, |
| | | changeTemp(data) { |
| | | this.$refs.queryCrud.clearSelection(); |
| | | if (data.value != '') { |
| | | let abNames = data.item.abNames.join(',').toLowerCase().split(',') |
| | | |
| | | } |
| | | }, |
| | | //å建 |
| | | addHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('è¯·éæ©è¦æ·»å çèç¹'); |
| | | return; |
| | | } |
| | | this.title = 'add'; |
| | | this.visible = true; |
| | | this.$nextTick(() => { |
| | | }); |
| | | }, |
| | | //ä¿®æ¹ |
| | | editHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | this.form.name = this.templateForm; |
| | | this.title = 'edit'; |
| | | this.visible = true; |
| | | this.$nextTick(() => { |
| | | }); |
| | | }, |
| | | // æ°å¢ç¼è¾ä¿å |
| | | addDialogSavaHandler() { |
| | | this.$refs.form.validate((valid) => { |
| | | const saveFunction = this.title === 'add' ? saveTemplate : updateTemplate; |
| | | if (valid) { |
| | | saveFunction(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.addDialogClose(); |
| | | } |
| | | }) |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | // æ°å¢ç¼è¾å¯¹è¯æ¡åæ¶ |
| | | addDialogClose() { |
| | | this.form = { |
| | | name: '' |
| | | }; |
| | | this.$refs.form.clearValidate(); |
| | | this.visible = false; |
| | | }, |
| | | //å é¤ |
| | | delHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('è¯·éæ©æ°æ®'); |
| | | return; |
| | | } |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤æéæ©çæ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteTemplate({ |
| | | name: this.templateForm, |
| | | btmName: this.nodeRow.label, |
| | | linkFlag: false |
| | | }).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <div ref="TreeBox" style="height: calc(100vh - 154px);!important;"> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <div style="height: calc(100vh - 190px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | <avue-crud ref="crud" |
| | | :data="crudData" :option="crudOption" :table-loading="tableLoading" style="margin-top: 10px"> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">å建</el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">ä¿®æ¹</el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">å é¤</el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">导åº</el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">导å
¥</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {gridLink} from "@/api/modeling/linkType/api"; |
| | | import { gridTemplate, saveTemplate, updateTemplate} from "@/api/queryTemplate/queryDefine"; |
| | | import {deleteLinkTemplate} from "@/api/queryTemplate/linkTypeQuery"; |
| | | import func from "@/util/func"; |
| | | import {dateFormat} from "@/util/date"; |
| | | import basicOption from "@/util/basic-option"; |
| | | |
| | | export default { |
| | | name: "index" |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | treeOption: { |
| | | height: 'auto', |
| | | defaultExpandedKeys: ['topNode'], |
| | | menu: false, |
| | | addBtn: false, |
| | | props: { |
| | | label: 'label', |
| | | value: 'oid', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | nodeRow: {}, |
| | | treeData: [{ |
| | | label: '龿¥ç±»å', |
| | | oid: 'topNode', |
| | | children: [] |
| | | }], |
| | | templateForm: '', |
| | | templateData: [], |
| | | form: { |
| | | name: '' |
| | | }, |
| | | rules: { |
| | | name: [ |
| | | {required: true, message: '请è¾å
¥æ¥è¯¢æ¨¡æ¿åç§°', trigger: 'blur'} |
| | | ] |
| | | }, |
| | | title: '', |
| | | visible: false, |
| | | tableLoading: false, |
| | | crudData: [], |
| | | crudOption: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | selection: true, |
| | | menu: false, |
| | | height: "auto", |
| | | calcHeight: -40, |
| | | tip: false, |
| | | column: [{ |
| | | label: 'æ¥è¯¢æ¨¡æ¿åç§°', |
| | | prop: 'name' |
| | | }, { |
| | | label: 'å建人', |
| | | prop: 'creator' |
| | | }, { |
| | | label: 'å建æ¶é´', |
| | | prop: 'createTime', |
| | | formatter:function (row, value) { |
| | | return dateFormat(new Date(value)) |
| | | } |
| | | }] |
| | | }, |
| | | selectionRow: [], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTreeList(); |
| | | }, |
| | | methods: { |
| | | //æ 表æ¥è¯¢ |
| | | getTreeList() { |
| | | const loading = this.$loading({}); |
| | | gridLink().then(res => { |
| | | const data = res.data.data.map(item => { |
| | | item.label=item.name; |
| | | return item; |
| | | }); |
| | | this.treeData[0].children = data; |
| | | loading.close(); |
| | | }) |
| | | }, |
| | | |
| | | // æ ç¹å» |
| | | nodeClick(row) { |
| | | this.nodeRow = row; |
| | | this.tableLoading = true; |
| | | this.getTemp(); |
| | | }, |
| | | getTemp() { |
| | | gridTemplate({btmName: this.nodeRow.label, linkFlag: true}).then(res => { |
| | | this.crudData = res.data.data; |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | selectHandler(selection, row) { |
| | | |
| | | }, |
| | | changeTemp(data) { |
| | | this.$refs.queryCrud.clearSelection(); |
| | | if (data.value != '') { |
| | | let abNames = data.item.abNames.join(',').toLowerCase().split(',') |
| | | |
| | | } |
| | | }, |
| | | //å建 |
| | | addHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('è¯·éæ©è¦æ·»å çèç¹'); |
| | | return; |
| | | } |
| | | this.title = 'add'; |
| | | this.visible = true; |
| | | this.$nextTick(() => { |
| | | }); |
| | | }, |
| | | //ä¿®æ¹ |
| | | editHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | this.form.name = this.templateForm; |
| | | this.title = 'edit'; |
| | | this.visible = true; |
| | | this.$nextTick(() => { |
| | | }); |
| | | }, |
| | | // æ°å¢ç¼è¾ä¿å |
| | | addDialogSavaHandler() { |
| | | this.$refs.form.validate((valid) => { |
| | | const saveFunction = this.title === 'add' ? saveTemplate : updateTemplate; |
| | | if (valid) { |
| | | saveFunction(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.addDialogClose(); |
| | | } |
| | | }) |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | // æ°å¢ç¼è¾å¯¹è¯æ¡åæ¶ |
| | | addDialogClose() { |
| | | this.form = { |
| | | name: '' |
| | | }; |
| | | this.$refs.form.clearValidate(); |
| | | this.visible = false; |
| | | }, |
| | | //å é¤ |
| | | delHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('è¯·éæ©æ°æ®'); |
| | | return; |
| | | } |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤æéæ©çæ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteLinkTemplate({ |
| | | name: this.templateForm, |
| | | btmName: this.nodeRow.label, |
| | | linkFlag: false |
| | | }).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | <template> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div ref="TreeBox" style="height: calc(100vh - 154px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | <avue-radio v-model="radioForm" :dic="radioDic" style="margin: 10px 0 5px"></avue-radio> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <div style="height: calc(100vh - 230px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | 模æ¿å表ï¼<avue-select v-model="templateForm" placeholder="è¯·éæ©æ¨¡æ¿" type="tree" :dic="templateData" @change="changeTemp"></avue-select> |
| | | <h3>æ¥è¯¢å±æ§</h3> |
| | | <avue-crud ref="queryCrud" |
| | | :data="attrData" :option="attrOption" :table-loading="tableLoading" style="margin-top: 10px"> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">å建</el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">ä¿®æ¹</el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">å é¤</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | <!-- æ°å¢ && ç¼è¾ --> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :title="title === 'add' ? 'å建' : 'ä¿®æ¹'" |
| | | :visible.sync="visible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | width="75%" |
| | | @close="addDialogClose"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="95px"> |
| | | <el-form-item label="模æ¿åç§°ï¼" prop="name"> |
| | | <el-input v-model="form.name"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <avue-crud |
| | | ref="dialogCrud" |
| | | :data="attrData" |
| | | :option="dialogAttrOption" |
| | | @select="selectHandler"> |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogClose">å æ¶</el-button> |
| | | <el-button type="primary" @click="addDialogSavaHandler">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getBizTypes, getAllAttributesByBtmId} from "@/api/modeling/businessType/api"; |
| | | import {gridLink,getAllAttributeByLink} from "@/api/modeling/linkType/api"; |
| | | import {gridTemplate,saveTemplate,updateTemplate,deleteTemplate} from "@/api/queryTemplate/queryDefine"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import func from "@/util/func"; |
| | | |
| | | export default { |
| | | name: "index" |
| | | name: "index", |
| | | data() { |
| | | return{ |
| | | treeOption: { |
| | | height: 'auto', |
| | | defaultExpandAll: false, |
| | | menu: false, |
| | | addBtn: false, |
| | | props: { |
| | | label: 'label', |
| | | value: 'oid', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | nodeRow:{}, |
| | | treeData: [], |
| | | radioForm:0, |
| | | radioDic:[{ |
| | | label:'ä¸å¡ç±»å', |
| | | value:0 |
| | | },{ |
| | | label:'龿¥ç±»å', |
| | | value:1 |
| | | }], |
| | | templateForm:'', |
| | | templateData:[], |
| | | form :{ |
| | | abNames:[], |
| | | linkTypeName: "",//左侧éç龿¥ç±»ååç§° |
| | | btmName:'',//左侧鿩çä¸å¡ç±»ååç§° |
| | | name:'' |
| | | }, |
| | | rules: { |
| | | name: [ |
| | | {required: true, message: '请è¾å
¥æ¨¡æ¿åç§°', trigger: 'blur'} |
| | | ] |
| | | }, |
| | | attrData: [], |
| | | title: '', |
| | | visible: false, |
| | | tableLoading: false, |
| | | attrOption: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | selection: true, |
| | | selectable:function (){ |
| | | return false; |
| | | }, |
| | | menu:false, |
| | | height: "auto", |
| | | calcHeight: -40, |
| | | tip:false, |
| | | column: [{ |
| | | label: 'åæ®µç¼ç ', |
| | | prop: 'id' |
| | | }, |
| | | { |
| | | label: 'åæ®µåç§°', |
| | | prop: 'name' |
| | | }] |
| | | }, |
| | | selectionRow:[], |
| | | dialogAttrOption: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | selection: true, |
| | | menu:false, |
| | | height: "auto", |
| | | calcHeight: 140, |
| | | title:'æ¥è¯¢å±æ§', |
| | | tip:false, |
| | | header:false, |
| | | column: [{ |
| | | label: 'åæ®µç¼ç ', |
| | | prop: 'id' |
| | | }, |
| | | { |
| | | label: 'åæ®µåç§°', |
| | | prop: 'name' |
| | | }] |
| | | }, |
| | | dialogSelectionRow:[] |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTreeList(); |
| | | }, |
| | | watch: { |
| | | radioForm: { |
| | | handler(newval) { |
| | | const loading = this.$loading({}); |
| | | if (newval ==0) { |
| | | getBizTypes().then(res => { |
| | | const data = res.data.data.map(item => { |
| | | item.label=item.attributes.id; |
| | | return item; |
| | | }); |
| | | this.treeData = data; |
| | | loading.close(); |
| | | }) |
| | | }else { |
| | | gridLink().then(res => { |
| | | const data = res.data.data.map(item => { |
| | | item.label=item.name; |
| | | return item; |
| | | }); |
| | | this.treeData = data; |
| | | loading.close(); |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | //æ 表æ¥è¯¢ |
| | | getTreeList() { |
| | | const loading = this.$loading({}); |
| | | getBizTypes().then(res => { |
| | | const data = res.data.data.map(item => { |
| | | item.label=item.attributes.id; |
| | | return item; |
| | | }); |
| | | this.treeData = data; |
| | | loading.close(); |
| | | }) |
| | | }, |
| | | |
| | | // æ ç¹å» |
| | | nodeClick(row) { |
| | | this.nodeRow = row; |
| | | this.tableLoading = true; |
| | | if(this.radioForm==1){ |
| | | //龿¥ç±»å |
| | | getAllAttributeByLink({name:row.label,linkFlag:true}).then(res => { |
| | | this.attrData = res.data.data; |
| | | this.getTemp(); |
| | | }) |
| | | }else { |
| | | //ä¸å¡ç±»å |
| | | getAllAttributesByBtmId({btmId:row.label,linkFlag:false}).then(res => { |
| | | this.attrData = res.data.data; |
| | | this.getTemp(); |
| | | }) |
| | | } |
| | | }, |
| | | getTemp() { |
| | | gridTemplate({btmName: this.nodeRow.label, linkFlag: this.radioForm == 1}).then(res => { |
| | | const data = res.data.data.map(item => { |
| | | item.label = item.name; |
| | | item.value = item.name; |
| | | return item; |
| | | }); |
| | | this.templateData = data; |
| | | if (res.data.data.length > 0) { |
| | | this.templateForm = this.templateData[0].value; |
| | | } else { |
| | | this.templateForm = ''; |
| | | this.$refs.queryCrud.clearSelection(); |
| | | } |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | selectHandler(selection, row){debugger; |
| | | this.dialogSelectionRow=selection |
| | | }, |
| | | changeTemp(data) { |
| | | this.$refs.queryCrud.clearSelection(); |
| | | if (data.value != '') { |
| | | let abNames = data.item.abNames.join(',').toLowerCase().split(',') |
| | | this.selectionRow = this.attrData.filter(item => { |
| | | return abNames.includes(item.id.toLowerCase()) |
| | | }) |
| | | this.$refs.queryCrud.toggleSelection(this.selectionRow); |
| | | } |
| | | }, |
| | | //å建 |
| | | addHandler(){ |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('è¯·éæ©è¦æ·»å çèç¹'); |
| | | return; |
| | | } |
| | | this.title = 'add'; |
| | | this.visible = true; |
| | | this.$nextTick(()=>{ |
| | | this.$refs.dialogCrud.clearSelection(); |
| | | }); |
| | | }, |
| | | //ä¿®æ¹ |
| | | editHandler(){ |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | this.form.name = this.templateForm; |
| | | this.title = 'edit'; |
| | | this.visible = true; |
| | | this.$nextTick(()=>{ |
| | | this.dialogSelectionRow=this.selectionRow; |
| | | this.$refs.dialogCrud.clearSelection(); |
| | | this.$refs.dialogCrud.toggleSelection(this.dialogSelectionRow ); |
| | | }); |
| | | }, |
| | | // æ°å¢ç¼è¾ä¿å |
| | | addDialogSavaHandler() { |
| | | this.$refs.form.validate((valid) => { |
| | | const saveFunction = this.title === 'add' ? saveTemplate : updateTemplate; |
| | | if (valid) { |
| | | if(this.radioForm == 0){ |
| | | this.form.btmName=this.nodeRow.label; |
| | | delete this.form.linkTypeName |
| | | }else { |
| | | this.form.linkTypeName=this.nodeRow.label; |
| | | delete this.form.btmName |
| | | } |
| | | let abNames=this.dialogSelectionRow.map(item => { |
| | | return item.id |
| | | }) |
| | | if(abNames.length==0){ |
| | | this.$message.error('è¯·éæ©æ¥è¯¢å±æ§'); |
| | | return false; |
| | | } |
| | | this.form.abNames=abNames; |
| | | saveFunction(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | if(this.title === 'edit'){ |
| | | this.templateForm=''; |
| | | } |
| | | this.getTemp(); |
| | | this.addDialogClose(); |
| | | } |
| | | }) |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | // æ°å¢ç¼è¾å¯¹è¯æ¡åæ¶ |
| | | addDialogClose() { |
| | | this.form = { |
| | | abNames:[], |
| | | linkTypeName: "",//左侧éç龿¥ç±»ååç§° |
| | | btmName:'',//左侧鿩çä¸å¡ç±»ååç§° |
| | | name:'' |
| | | }; |
| | | this.$refs.form.clearValidate(); |
| | | this.visible = false; |
| | | }, |
| | | //å é¤ |
| | | delHandler(){ |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('è¯·éæ©æ°æ®'); |
| | | return; |
| | | } |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤æéæ©çæ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteTemplate({name:this.templateForm,btmName: this.nodeRow.label, linkFlag: this.radioForm == 1}).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTemp(); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |