Merge remote-tracking branch 'origin/master'
已修改101个文件
已删除9个文件
已重命名199个文件
已添加25个文件
| | |
| | | </properties> |
| | | <dependencies> |
| | | <!-- æ°å¹³å°æéè¦çå
--> |
| | | <!--client--> |
| | | <!--å¹³å°clientå
--> |
| | | <dependency> |
| | | <groupId>com.vci.client</groupId> |
| | | <groupId>com.vci.plt</groupId> |
| | | <artifactId>plt-clientbase</artifactId> |
| | | <version>${plt.version}</version> |
| | | </dependency> |
| | | <!--å¹³å°commonå
--> |
| | | <dependency> |
| | | <groupId>com.vci.plt</groupId> |
| | | <artifactId>plt-common</artifactId> |
| | | <version>${plt.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.plt</groupId> |
| | | <artifactId>plt-slice</artifactId> |
| | | <version>${plt.version}</version> |
| | | </dependency> |
| | | |
| | | <!--clientçä¾èµ--> |
| | | <dependency> |
| | | <groupId>com.formdev</groupId> |
| | |
| | | <groupId>com.uitheme</groupId> |
| | | <artifactId>uitheme</artifactId> |
| | | <version>1.3.1</version> |
| | | </dependency> |
| | | |
| | | <!--common--> |
| | | <dependency> |
| | | <groupId>com.vci.common</groupId> |
| | | <artifactId>plt-common</artifactId> |
| | | <version>${plt.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.corba</groupId> |
| | | <artifactId>plt-slice</artifactId> |
| | | <version>${plt.version}</version> |
| | | </dependency> |
| | | <!--commonçä¾èµ--> |
| | | <dependency> |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/plugins/dto/AuditTaskDTO.java ÐÞ¸Ä |
| | |
| | | package com.vci.plugins.dto; |
| | | package com.vci.dto; |
| | | |
| | | import com.vci.dto.BaseModelDTO; |
| | | |
| | |
| | | package com.vci.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/OsCodeDateValueTypeEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.enumpck; |
| | | package com.vci.enumpck; |
| | | |
| | | import com.vci.starter.web.annotation.VciEnum; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/OsCodeElementTypeEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.enumpck; |
| | | package com.vci.enumpck; |
| | | |
| | | |
| | | import com.vci.starter.web.annotation.VciEnum; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/OsCodeFillTypeEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.enumpck; |
| | | package com.vci.enumpck; |
| | | |
| | | |
| | | import com.vci.starter.web.annotation.VciEnum; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/OsCodeGenJsPanelTypeEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.enumpck; |
| | | package com.vci.enumpck; |
| | | |
| | | import com.vci.starter.web.annotation.VciEnum; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/OsCodeProductTypeEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.enumpck; |
| | | package com.vci.enumpck; |
| | | |
| | | |
| | | import com.vci.starter.web.annotation.VciEnum; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/ControlAttributeType.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.enumpck; |
| | | package com.vci.enumpck.UI; |
| | | |
| | | import com.vci.common.portal.enums.ControlType; |
| | | |
| | | /** |
| | | * 屿§ç±»åæä¸¾ |
| | | */ |
| | | public enum ControlAttributeType { |
| | | |
| | | VTString, |
| | | VTInteger, |
| | | VTLong, |
| | |
| | | VTNote, |
| | | VTFilePath, |
| | | VTClob, |
| | | canzhao; |
| | | VTRefer; |
| | | public static ControlType Parse(String value) { |
| | | for (ControlType ct : ControlType.values()) { |
| | | if (ct.name().equalsIgnoreCase(value)) { |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/ItemTypeEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.enumpck; |
| | | package com.vci.enumpck.UI; |
| | | |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
| | | import com.vci.starter.web.enumpck.VciFieldTypeEnum; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¾å
¥æ¡ç±»åæä¸¾ |
| | | */ |
| | | public enum ItemTypeEnum implements BaseEnum { |
| | | TEXT("text","åè¡ææ¬æ¡"), |
| | | TEXTBTN("textbtn","ææ¬æé®æ¡"), |
| | |
| | | }else if( ControlAttributeType.VTTime.equals(key)){//æ¶é´ |
| | | value = ItemTypeEnum.TIME.getValue(); |
| | | } |
| | | else if( ControlAttributeType.canzhao.equals(key)){//åç
§ |
| | | else if( ControlAttributeType.VTRefer.equals(key)){//åç
§ |
| | | value = ItemTypeEnum.TEXT.getValue(); |
| | | } |
| | | else if( ControlAttributeType.VTBoolean.equals(key)){//boolean |
| | |
| | | }else if( ControlAttributeType.VTTime.equals(key)){//æ¶é´ |
| | | value = ItemTypeEnum.TIME.getValue(); |
| | | } |
| | | else if( ControlAttributeType.canzhao.equals(key)){//åç
§ |
| | | else if( ControlAttributeType.VTRefer.equals(key)){//åç
§ |
| | | value = ItemTypeEnum.TEXT.getValue(); |
| | | } |
| | | else if( ControlAttributeType.VTBoolean.equals(key)){//boolean |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/enumpck/OrgTypeEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.enumpck; |
| | | package com.vci.enumpck.UI; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
| | | |
| | | /** |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/enumpck/RoleClassifyEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.enumpck; |
| | | package com.vci.enumpck.UI; |
| | | import com.vci.starter.web.annotation.VciEnum; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/enumpck/RoleControlAreaEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.enumpck; |
| | | package com.vci.enumpck.UI; |
| | | |
| | | //import com.vci.frameworkcore.constant.FrameWorkEnumConstant; |
| | | |
| | | import com.vci.constant.FrameWorkEnumConstant; |
| | | import com.vci.starter.web.annotation.VciEnum; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
| | | |
| | | /** |
| | |
| | | * @author weidy |
| | | * @date 2019/9/25 |
| | | */ |
| | | //@VciEnum(name = FrameWorkEnumConstant.ROLE_CONTROL_AREA,text = "è§è²æ§å¶åºå",description = "çµè端BS,CS,ç§»å¨ç«¯,éæ,å¾®æå¡") |
| | | @VciEnum(name = FrameWorkEnumConstant.ROLE_CONTROL_AREA,text = "è§è²æ§å¶åºå",description = "çµè端BS,CS,ç§»å¨ç«¯,éæ,å¾®æå¡") |
| | | public enum RoleControlAreaEnum implements BaseEnum { |
| | | /** |
| | | * çµè端B/S |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/enumpck/VciFileServiceOsTypeEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.enumpck; |
| | | package com.vci.enumpck.UI; |
| | | |
| | | import com.vci.starter.web.annotation.VciEnum; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/enumpck/VciFileTransProtocolEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.enumpck; |
| | | package com.vci.enumpck.UI; |
| | | |
| | | import com.vci.starter.web.annotation.VciEnum; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/enumpck/UserTypeEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.enumpck; |
| | | package com.vci.enumpck; |
| | | |
| | | import com.vci.starter.web.annotation.VciEnum; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/lifeCycle/FileObjectLCStatus.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.lifeCycle; |
| | | package com.vci.lcstatuspck; |
| | | |
| | | import com.vci.constant.FrameWorkDefaultValueConstant; |
| | | import com.vci.constant.VciFileLifeConstant; |
| | | import com.vci.constant.FrameWorkDefaultValueConstant; |
| | | import com.vci.starter.web.annotation.Transient; |
| | | import com.vci.starter.web.annotation.VciLifeCycle; |
| | | import com.vci.starter.web.annotation.VciLifeCycleTrans; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/lcstatuspck/FrameworkDataLCStatus.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.lcstatuspck; |
| | | package com.vci.lcstatuspck; |
| | | |
| | | |
| | | import com.vci.starter.web.annotation.VciLifeCycle; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/lcstatuspck/ReleaseDataLCStatus.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.lcstatuspck; |
| | | package com.vci.lcstatuspck; |
| | | |
| | | |
| | | import com.vci.starter.web.annotation.VciLifeCycle; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.properties; |
| | | |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | /** |
| | | * @Description |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 17:40 |
| | | */ |
| | | @Configuration |
| | | @ConfigurationProperties(prefix = "plt") |
| | | public class OsConfig { |
| | | |
| | | private boolean exportSecretGrade; |
| | | |
| | | public boolean isExportSecretGrade() { |
| | | return exportSecretGrade; |
| | | } |
| | | |
| | | public void setExportSecretGrade(boolean exportSecretGrade) { |
| | | this.exportSecretGrade = exportSecretGrade; |
| | | } |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/config/TomcatConfig.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.config; |
| | | package com.vci.properties; |
| | | |
| | | import org.apache.catalina.connector.Connector; |
| | | import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer; |
| | | import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | |
| | | package com.vci.properties; |
| | | |
| | | import com.vci.enumpck.VciFileTransProtocolEnum; |
| | | import com.vci.enumpck.UI.VciFileTransProtocolEnum; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | |
| | | */ |
| | | @FeignClient( |
| | | name = "vciFileDocClassifyProvider", |
| | | url = "${vciPlatform.fileServiceUrl:http://localhost:19000/fileService}", |
| | | url = "${feign.fileServiceUrl:http://localhost:19000/fileService}", |
| | | path = "vciFileDocClassifyController" |
| | | ) |
| | | public interface VciFileDocClassifyProvider { |
| | |
| | | */ |
| | | @FeignClient( |
| | | name = "VciFileDownloadProvider", |
| | | url = "${vciPlatform.fileServiceUrl:http://localhost:19000/fileService}", |
| | | url = "${feign.fileServiceUrl:http://localhost:19000/fileService}", |
| | | path = "vciFileDownloadController" |
| | | ) |
| | | public interface VciFileDownloadProvider { |
| | |
| | | */ |
| | | @FeignClient( |
| | | name = "vciFileQueryProvider", |
| | | url = "${vciPlatform.fileServiceUrl:http://localhost:19000/fileService}", |
| | | url = "${feign.fileServiceUrl:http://localhost:19000/fileService}", |
| | | path = "vciFileQueryController" |
| | | ) |
| | | public interface VciFileQueryProvider { |
| | |
| | | */ |
| | | @FeignClient( |
| | | name = "vciFileUploadProvider", |
| | | url = "${vciPlatform.fileServiceUrl:http://localhost:19000/fileService}", |
| | | url = "${feign.fileServiceUrl:http://localhost:19000/fileService}", |
| | | path = "vciFileUploadController" |
| | | ) |
| | | public interface VciFileUploadProvider { |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/query/FileImageViewerQuery.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.query; |
| | | package com.vci.query; |
| | | |
| | | /** |
| | | * å¾çç»ä»¶çæ¥è¯¢å¯¹è±¡ |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/query/UIBaseQuery.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.query; |
| | | package com.vci.query; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/query/UIDataGridQuery.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.query; |
| | | package com.vci.query; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/query/UIFormQuery.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.query; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | package com.vci.query; |
| | | |
| | | /** |
| | | * 表åçæ¥è¯¢ |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/query/UILinkTypeDataQuery.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.query; |
| | | package com.vci.query; |
| | | |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/query/UITreeQuery.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.query; |
| | | package com.vci.query; |
| | | |
| | | import com.vci.starter.web.pagemodel.TreeQueryObject; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/query/UITreeRootQuery.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.query; |
| | | package com.vci.query; |
| | | |
| | | /** |
| | | * æ çæ ¹èç¹ |
| | |
| | | </properties> |
| | | |
| | | <dependencies> |
| | | <!--å¹³å°çå
--> |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-starter</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-thymeleaf</artifactId> |
| | |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>transmittable-thread-local</artifactId> |
| | | <version>2.12.6</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.common</groupId> |
| | | <artifactId>plt-common</artifactId> |
| | | <version>1.0.RELEASE</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci.corba</groupId> |
| | | <artifactId>plt-slice</artifactId> |
| | | <version>1.0.RELEASE</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.zeroc</groupId> |
| | |
| | | * @author weidy |
| | | * @date 2020/4/17 |
| | | */ |
| | | @FeignClient(name="commonAnnotationProvider",url="${vciPlatform.objectServiceUrl}",path = "annotationController") |
| | | @FeignClient(name="commonAnnotationProvider",url="${feign.scanServiceUrl}",path = "annotationController") |
| | | public interface CommonAnnotationProvider { |
| | | |
| | | /** |
| | |
| | | * @author weidy |
| | | * @date 2020/4/15 |
| | | */ |
| | | @FeignClient(name="commonLifeCycleProvider",url="${vciPlatform.objectServiceUrl}",path = "lifeCycleController") |
| | | @FeignClient(name="commonLifeCycleProvider",url="${feign.pltServiceUrl}",path = "lifeCycleController") |
| | | public interface CommonLifeCycleProvider { |
| | | |
| | | /** |
| | |
| | | * @author weidy |
| | | * @date 2020/4/15 |
| | | */ |
| | | @FeignClient(name="commonRevisionRuleProvider",url="${vciPlatform.objectServiceUrl}",path = "revisionRuleController") |
| | | @FeignClient(name="commonRevisionRuleProvider",url="${feign.pltServiceUrl}",path = "revisionRuleController") |
| | | public interface CommonRevisionRuleProvider { |
| | | |
| | | /** |
| | |
| | | package com.vci.starter.revision.service; |
| | | |
| | | import com.vci.starter.revision.bo.TreeWrapperOptions; |
| | | import com.vci.starter.revision.model.*; |
| | | import com.vci.starter.revision.provider.*; |
| | | import com.vci.starter.revision.model.ReleasedObjDO; |
| | | import com.vci.starter.revision.model.RevisionInfo; |
| | | import com.vci.starter.revision.provider.CommonAnnotationProvider; |
| | | import com.vci.starter.revision.provider.CommonLifeCycleProvider; |
| | | import com.vci.starter.revision.provider.CommonRevisionRuleProvider; |
| | | import com.vci.starter.web.annotation.Column; |
| | | import com.vci.starter.web.annotation.VciBtmType; |
| | | import com.vci.starter.web.annotation.VciColumnDefinition; |
| | | import com.vci.starter.web.constant.RevisionConstant; |
| | | import com.vci.starter.web.constant.RegExpConstant; |
| | | import com.vci.starter.web.constant.RevisionConstant; |
| | | import com.vci.starter.web.enumpck.DataSecretEnum; |
| | | import com.vci.starter.web.enumpck.UserSecretEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | |
| | | import com.vci.starter.web.pagemodel.Tree; |
| | | import com.vci.starter.web.pagemodel.TreeQueryObject; |
| | | import com.vci.starter.web.service.VciSecretServiceI; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | |
| | | baseModel.setLastModifyTime(currentDate); |
| | | // |
| | | VciBtmType vciBtmType = getBtmTypeAnnotation(baseModel); |
| | | if(StringUtils.isBlank(baseModel.getBtmname()) && vciBtmType!=null){ |
| | | baseModel.setBtmname(vciBtmType.name()); |
| | | if(StringUtils.isBlank(baseModel.getBtmName()) && vciBtmType!=null){ |
| | | baseModel.setBtmName(vciBtmType.name()); |
| | | } |
| | | //è·åå
å«äºcolumn注解ç屿§ï¼å 为ä¸å
å«è¿ä¸ªæ³¨è§£çæ¶åæ¯é»è®¤nullable为trueï¼unique为false |
| | | List<Field> hasColumnAnnoFields = filterHasColumnAnnoFields(baseModel); |
| | |
| | | VciBaseUtil.alertNotNull(dto,"æ°æ®ä¼ è¾å¯¹è±¡",baseModel,"æ°æ®åºä¸çæ°æ®å¯¹è±¡"); |
| | | //å端å¯è½ä¸ä¼æé»è®¤çææå±æ§ä¼ éè¿æ¥ï¼æä»¥å
仿°æ®åºä¸çæ°æ®å¯¹è±¡æ·è´å°ä¸´æ¶çå¯¹è±¡ä¸ |
| | | BaseModel tempModel = new BaseModel(); |
| | | BeanUtil.convert(baseModel,tempModel); |
| | | BeanUtil.convert(dto,baseModel); |
| | | //BeanUtil.convert(tempModel,baseModel); |
| | | BeanUtilForVCI.convert(baseModel,tempModel); |
| | | BeanUtilForVCI.convert(dto,baseModel); |
| | | //BeanUtilForVCI.convert(tempModel,baseModel); |
| | | //ä¸ç¥é为å¥ï¼çªç¶BeanUtil.convert(tempModel,baseModel);ä¸å¥½ä½¿äº |
| | | BeanUtilForVCI.copyPropertiesIgnoreCase(tempModel,baseModel); |
| | | //为äºé²æ¢å端没æä¼ éé»è®¤ç屿§ï¼æä»¥å¾å
æ·è´å°baseModelä¸ï¼ç¶ådtoæ·è´ä¸æ¬¡åï¼åææ°æ®åºä¸æ·è´åæ¥ã |
| | |
| | | wrapperForAddLink(linkModel); |
| | | VciBaseUtil.alertNotNull(fromModel,"龿¥ç±»åfrom端",toModel,"龿¥ç±»åto端"); |
| | | linkModel.setFoid(fromModel.getOid()); |
| | | linkModel.setFbtmname(fromModel.getBtmname()); |
| | | linkModel.setFbtmname(fromModel.getBtmName()); |
| | | linkModel.setFnameoid(fromModel.getNameOid()); |
| | | |
| | | linkModel.setToid(toModel.getOid()); |
| | | linkModel.setTbtmname(toModel.getBtmname()); |
| | | linkModel.setTbtmname(toModel.getBtmName()); |
| | | linkModel.setTnameoid(toModel.getNameOid()); |
| | | linkModel.setTrevisionoid(toModel.getRevisionOid()); |
| | | } |
| | |
| | | //å¿
须管ççæ¬æä¼æ§è¡åå¸ |
| | | VciBaseUtil.alertNotNull( baseModel.getOid(), "æ°æ®å¯¹è±¡ç主é®", baseModel.getNameOid(), "对象ç主é®",baseModel.getRevisionOid(),"çæ¬ç主é®"); |
| | | ReleasedObjDO releasedObjDO = new ReleasedObjDO(); |
| | | BeanUtil.convert(baseModel,releasedObjDO); |
| | | BeanUtilForVCI.convert(baseModel,releasedObjDO); |
| | | if(StringUtils.isBlank(releasedObjDO.getBtmName())){ |
| | | releasedObjDO.setBtmName(btmType.name()); |
| | | } |
| | |
| | | if(StringUtils.isBlank(baseModel.getOwner())) { |
| | | baseModel.setOwner(baseModel.getCreator()); |
| | | } |
| | | baseModel.setBtmname(btmName); |
| | | baseModel.setBtmName(btmName); |
| | | } |
| | | |
| | | /** |
| | |
| | | setBtmName(newModel); |
| | | VciBaseUtil.alertNotNull(newModel.getCopyFromVersion(),"å¼ç¨èçæ¬ç主é®"); |
| | | if (revisionMapper != null) { |
| | | RevisionInfo oldRevision = revisionMapper.selectByOid(newModel.getCopyFromVersion(),VciBaseUtil.getTableName(newModel.getBtmname())); |
| | | RevisionInfo oldRevision = revisionMapper.selectByOid(newModel.getCopyFromVersion(),VciBaseUtil.getTableName(newModel.getBtmName())); |
| | | if(oldRevision == null || StringUtils.isBlank(oldRevision.getOid()) ){ |
| | | throw new VciBaseException("èçæ¬å¨æ°æ®åºä¸ä¸åå¨"); |
| | | } |
| | | BaseModel oldModel = new BaseModel(); |
| | | BeanUtil.convert(oldRevision,oldModel); |
| | | BeanUtilForVCI.convert(oldRevision,oldModel); |
| | | wrapperRevisionModel(oldModel,newModel); |
| | | }else{ |
| | | throw new VciBaseException("没æåå§åçæ¬è§åçæ°æ®æä½å±,请å¼åäººåæ£æ¥Mavenæ¯å¦å¼ç¨"); |
| | |
| | | public void wrapperVersionModel(BaseModel newModel) throws VciBaseException{ |
| | | VciBaseUtil.alertNotNull(newModel,"æ°çæ¬¡çæ°æ®å¯¹è±¡",newModel.getCopyFromVersion(),"å¼ç¨èçæ¬¡ç主é®"); |
| | | if (revisionMapper != null) { |
| | | RevisionInfo oldRevision = revisionMapper.selectByOid(newModel.getCopyFromVersion(),VciBaseUtil.getTableName(newModel.getBtmname())); |
| | | RevisionInfo oldRevision = revisionMapper.selectByOid(newModel.getCopyFromVersion(),VciBaseUtil.getTableName(newModel.getBtmName())); |
| | | if(oldRevision == null || StringUtils.isBlank(oldRevision.getOid()) ){ |
| | | throw new VciBaseException("èçæ¬¡æ°æ®å¨æ°æ®åºä¸ä¸åå¨"); |
| | | } |
| | | BaseModel oldModel = new BaseModel(); |
| | | BeanUtil.convert(oldRevision,oldModel); |
| | | BeanUtilForVCI.convert(oldRevision,oldModel); |
| | | wrapperVersionModel(oldModel,newModel); |
| | | }else{ |
| | | throw new VciBaseException("没æåå§åçæ¬è§åçæ°æ®æä½å±,请å¼åäººåæ£æ¥Mavenæ¯å¦å¼ç¨"); |
| | |
| | | } else { |
| | | //没æè¿ä¸ªï¼é£å°±ç´æ¥ç¨oldModelå»è·åçæ¬å· |
| | | lastRevision = new RevisionInfo(); |
| | | BeanUtil.convert(oldModel, lastRevision); |
| | | BeanUtilForVCI.convert(oldModel, lastRevision); |
| | | } |
| | | newModel.setRevisionRule(lastRevision.getRevisionRule()); |
| | | newModel.setVersionRule(lastRevision.getVersionRule()); |
| | |
| | | } else { |
| | | //没æè¿ä¸ªï¼é£å°±ç´æ¥ç¨oldModelå»è·åçæ¬å· |
| | | lastRevision = new RevisionInfo(); |
| | | BeanUtil.convert(oldModel, lastRevision); |
| | | BeanUtilForVCI.convert(oldModel, lastRevision); |
| | | } |
| | | //çæ¬¡å·,å°±æ°åååæ¯ä¸¤ç§ |
| | | if(oldModel.getVersionValue().matches(RegExpConstant.LETTER)){ |
| | |
| | | */ |
| | | private void setBtmName(BaseModel baseModel){ |
| | | VciBaseUtil.alertNotNull(baseModel,"æ°æ®å¯¹è±¡"); |
| | | if(StringUtils.isBlank(baseModel.getBtmname())){ |
| | | if(StringUtils.isBlank(baseModel.getBtmName())){ |
| | | VciBtmType btmType = getBtmTypeAnnotation(baseModel); |
| | | if(btmType == null){ |
| | | throw new VciBaseException("没æVciBtmTypeæ³¨è§£ï¼æ æ³å¤æä¸å¡ç±»å"); |
| | | } |
| | | baseModel.setBtmname(btmType.name()); |
| | | baseModel.setBtmName(btmType.name()); |
| | | } |
| | | } |
| | | |
| | |
| | | public void saveOldModel(BaseModel oldModel){ |
| | | setBtmName(oldModel); |
| | | if (revisionMapper != null) { |
| | | revisionMapper.resetLastRevision(oldModel.getNameOid(),VciBaseUtil.getTableName(oldModel.getBtmname())); |
| | | revisionMapper.resetOldRevision(oldModel.getOid(),VciBaseUtil.getTableName(oldModel.getBtmname())); |
| | | revisionMapper.resetLastRevision(oldModel.getNameOid(),VciBaseUtil.getTableName(oldModel.getBtmName())); |
| | | revisionMapper.resetOldRevision(oldModel.getOid(),VciBaseUtil.getTableName(oldModel.getBtmName())); |
| | | }else{ |
| | | throw new VciBaseException("没æåå§åçæ¬è§åçæ°æ®æä½å±ï¼è¯·å¼åäººåæ£æ¥mavenæ¯å¦å¼ç¨"); |
| | | } |
| | |
| | | public void saveOldModelVersion(BaseModel oldModel){ |
| | | setBtmName(oldModel); |
| | | if (revisionMapper != null) { |
| | | revisionMapper.resetLastVersion(oldModel.getNameOid(),oldModel.getRevisionOid(),VciBaseUtil.getTableName(oldModel.getBtmname())); |
| | | revisionMapper.resetOldVersion(oldModel.getOid(),VciBaseUtil.getTableName(oldModel.getBtmname())); |
| | | revisionMapper.resetLastVersion(oldModel.getNameOid(),oldModel.getRevisionOid(),VciBaseUtil.getTableName(oldModel.getBtmName())); |
| | | revisionMapper.resetOldVersion(oldModel.getOid(),VciBaseUtil.getTableName(oldModel.getBtmName())); |
| | | }else{ |
| | | throw new VciBaseException("没æåå§åçæ¬è§åçæ°æ®æä½å±ï¼è¯·å¼åäººåæ£æ¥mavenæ¯å¦å¼ç¨"); |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/annotation/BdSelectInput.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.annotation; |
| | | package com.vci.starter.web.annotation; |
| | | |
| | | import java.lang.annotation.ElementType; |
| | | import java.lang.annotation.Retention; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/beans/CopyProperty.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util.beans; |
| | | package com.vci.starter.web.annotation; |
| | | |
| | | import java.lang.annotation.*; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/annotation/FlowNotifyAfter.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.annotation; |
| | | package com.vci.starter.web.annotation; |
| | | |
| | | import java.lang.annotation.ElementType; |
| | | import java.lang.annotation.Retention; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/annotation/FlowNotifyBefore.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.annotation; |
| | | package com.vci.starter.web.annotation; |
| | | |
| | | import java.lang.annotation.ElementType; |
| | | import java.lang.annotation.Retention; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/annotation/FlowNotifyWeb.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.annotation; |
| | | package com.vci.starter.web.annotation; |
| | | |
| | | import org.springframework.core.annotation.AliasFor; |
| | | import org.springframework.stereotype.Component; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/annotation/VciTransactional.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.annotation; |
| | | package com.vci.starter.web.annotation; |
| | | |
| | | /** |
| | | * å 为web端çæå¡ä¸è®©è¿æ°æ®åºï¼æä»¥æ¶åå°äºå¡çé®é¢ä¸è½è§£å³ï¼åªè½åºäºäºå¡çæè·¯æ¥å¤ç |
| | |
| | | */ |
| | | private Logger log = LoggerFactory.getLogger(SpringMVCConfig.class); |
| | | |
| | | private boolean enabled; |
| | | |
| | | /** |
| | | * å¤é¨æä»¶å¤¹çæ å°å°å |
| | | */ |
| | |
| | | * é»è®¤æ¯å¦å
许è¯ä¹¦ |
| | | */ |
| | | private boolean DEFAULT_ALLOW_CREDENTIALS = true; |
| | | |
| | | /** |
| | | * é»è®¤çæå¤§å¼ |
| | | */ |
| | | private long DEFAULT_MAX_AGE = 1800; |
| | | |
| | | public boolean isEnabled() { |
| | | return enabled; |
| | | } |
| | | |
| | | public void setEnabled(boolean enabled) { |
| | | this.enabled = enabled; |
| | | } |
| | | |
| | | public Map<String, String> getResourceFolderMap() { |
| | | return resourceFolderMap; |
| | |
| | | public void setUnStorageRequestTimeUrls(List<String> unStorageRequestTimeUrls) { |
| | | this.unStorageRequestTimeUrls = unStorageRequestTimeUrls; |
| | | } |
| | | |
| | | public String[] getDEFAULT_EXPOSEDHEADERS() { |
| | | return DEFAULT_EXPOSEDHEADERS; |
| | | } |
| | | |
| | | public void setDEFAULT_EXPOSEDHEADERS(String[] DEFAULT_EXPOSEDHEADERS) { |
| | | this.DEFAULT_EXPOSEDHEADERS = DEFAULT_EXPOSEDHEADERS; |
| | | } |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/CharPool.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.constant; |
| | | |
| | | /** |
| | | * char 叏鿱 |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/StringPool.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.constant; |
| | | |
| | | /** |
| | | * éæ String æ± |
| | |
| | | /** |
| | | * 主é®ï¼å¦æèªå·±ç对象ï¼ä¸æ¯oidä½ä¸ºä¸»é®çè¯ï¼éè¦ç¨idè¿ä¸ªæ³¨è§£ |
| | | */ |
| | | @Column(nullable = false,length = 50) |
| | | @Column(nullable = false) |
| | | private String oid; |
| | | |
| | | /** |
| | | * 代å·ï¼å¯ä»¥è®¾ç½®å±æ§çæ å°ï¼name表示å¨å¹³å°çä¸å¡ç±»åä¸ç屿§åç§°ï¼å¿
须为å°åï¼ |
| | | */ |
| | | @Column(length = 50) |
| | | @Column() |
| | | private String id; |
| | | |
| | | /** |
| | | * åç§°ï¼ä¹å¯ä»¥ä¸è®¾ç½®å±æ§æ å°ï¼é»è®¤æ¯å段åçå°å |
| | | */ |
| | | @Column(length = 50) |
| | | @Column() |
| | | private String name; |
| | | |
| | | /** |
| | | * æè¿° |
| | | */ |
| | | @Column(length = 250) |
| | | @Column() |
| | | private String description; |
| | | |
| | | /** |
| | | * çæ¬çä¸»é® |
| | | */ |
| | | @Column(length = 50) |
| | | @Column() |
| | | private String revisionOid; |
| | | |
| | | /** |
| | | * 对象çä¸»é® |
| | | */ |
| | | @Column(length = 50) |
| | | @Column() |
| | | private String nameOid; |
| | | |
| | | /** |
| | | * ä¸å¡ç±»åçåç§° |
| | | */ |
| | | @Column(length = 30) |
| | | private String btmname; |
| | | @Column() |
| | | private String btmName; |
| | | |
| | | /** |
| | | * æ¯å¦æåçæ¬ |
| | |
| | | /** |
| | | * å建人 |
| | | */ |
| | | @Column(length = 50,nullable = false) |
| | | @Column(nullable = false) |
| | | private String creator; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * æåä¿®æ¹äºº |
| | | */ |
| | | @Column(length = 50,nullable = false) |
| | | @Column(nullable = false) |
| | | private String lastModifier; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * çæ¬è§å |
| | | */ |
| | | @Column(length = 50) |
| | | @Column() |
| | | private String revisionRule; |
| | | |
| | | |
| | |
| | | /** |
| | | * çæ¬å¼ |
| | | */ |
| | | @Column(length = 50) |
| | | @Column() |
| | | private String revisionValue; |
| | | |
| | | |
| | | /** |
| | | * çæ¬¡è§å |
| | | */ |
| | | @Column(length = 50) |
| | | @Column() |
| | | private String versionRule; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * çæ¬¡å¼ |
| | | */ |
| | | @Column(length = 50) |
| | | @Column() |
| | | private String versionValue; |
| | | |
| | | /** |
| | | * çå½å¨æçç¼å· |
| | | */ |
| | | @Transient() |
| | | private String lctid; |
| | | private String lctId; |
| | | |
| | | /** |
| | | * çå½å¨æå¼ |
| | | */ |
| | | @Column(length = 50) |
| | | @Column() |
| | | private String lcStatus; |
| | | |
| | | /** |
| | |
| | | this.nameOid = nameOid; |
| | | } |
| | | |
| | | public String getBtmname() { |
| | | return btmname; |
| | | public String getBtmName() { |
| | | return btmName; |
| | | } |
| | | |
| | | public void setBtmname(String btmname) { |
| | | this.btmname = btmname; |
| | | public void setBtmName(String btmName) { |
| | | this.btmName = btmName; |
| | | } |
| | | |
| | | |
| | | public String getLastR() { |
| | | return lastR; |
| | |
| | | this.creator = creator; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getLastModifier() { |
| | | return lastModifier; |
| | | } |
| | |
| | | this.revisionRule = revisionRule; |
| | | } |
| | | |
| | | public String getVersionRule() { |
| | | return versionRule; |
| | | } |
| | | |
| | | public void setVersionRule(String versionRule) { |
| | | this.versionRule = versionRule; |
| | | } |
| | | |
| | | public int getRevisionSeq() { |
| | | return revisionSeq; |
| | | } |
| | |
| | | |
| | | public void setRevisionValue(String revisionValue) { |
| | | this.revisionValue = revisionValue; |
| | | } |
| | | |
| | | public String getVersionRule() { |
| | | return versionRule; |
| | | } |
| | | |
| | | public void setVersionRule(String versionRule) { |
| | | this.versionRule = versionRule; |
| | | } |
| | | |
| | | public int getVersionSeq() { |
| | |
| | | this.versionValue = versionValue; |
| | | } |
| | | |
| | | public String getLctId() { |
| | | return lctId; |
| | | } |
| | | |
| | | public void setLctId(String lctId) { |
| | | this.lctId = lctId; |
| | | } |
| | | |
| | | public String getLcStatus() { |
| | | return lcStatus; |
| | | } |
| | | |
| | | public void setLcStatus(String lcStatus) { |
| | | this.lcStatus = lcStatus; |
| | | } |
| | | |
| | | public String getLcStatusText() { |
| | | return lcStatusText; |
| | | } |
| | | |
| | | public void setLcStatusText(String lcStatusText) { |
| | | this.lcStatusText = lcStatusText; |
| | | } |
| | | |
| | | public Date getTs() { |
| | |
| | | this.copyFromVersion = copyFromVersion; |
| | | } |
| | | |
| | | public String getLcStatusText() { |
| | | return lcStatusText; |
| | | } |
| | | |
| | | public void setLcStatusText(String lcStatusText) { |
| | | this.lcStatusText = lcStatusText; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Integer getSecretGrade() { |
| | | return secretGrade; |
| | | } |
| | |
| | | this.secretGradeText = secretGradeText; |
| | | } |
| | | |
| | | public String getLctid() { |
| | | return lctid; |
| | | } |
| | | |
| | | public void setLctid(String lctid) { |
| | | this.lctid = lctid; |
| | | } |
| | | |
| | | |
| | | public Map<String, String> getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setData(Map<String, String> data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "BaseModel{" + |
| | | "oid='" + oid + '\'' + |
| | | ", id='" + id + '\'' + |
| | | ", name='" + name + '\'' + |
| | | ", description='" + description + '\'' + |
| | | ", revisionOid='" + revisionOid + '\'' + |
| | | ", nameOid='" + nameOid + '\'' + |
| | | ", btmname='" + btmname + '\'' + |
| | | ", lastR='" + lastR + '\'' + |
| | | ", firstR='" + firstR + '\'' + |
| | | ", lastV='" + lastV + '\'' + |
| | | ", firstV='" + firstV + '\'' + |
| | | ", creator='" + creator + '\'' + |
| | | ", createTime=" + createTime + |
| | | ", lastModifier='" + lastModifier + '\'' + |
| | | ", lastModifyTime=" + lastModifyTime + |
| | | ", revisionRule='" + revisionRule + '\'' + |
| | | ", revisionSeq=" + revisionSeq + |
| | | ", revisionValue='" + revisionValue + '\'' + |
| | | ", versionRule='" + versionRule + '\'' + |
| | | ", versionSeq=" + versionSeq + |
| | | ", versionValue='" + versionValue + '\'' + |
| | | ", lctid='" + lctid + '\'' + |
| | | ", lcStatus='" + lcStatus + '\'' + |
| | | ", lcStatusText='" + lcStatusText + '\'' + |
| | | ", ts=" + ts + |
| | | ", owner='" + owner + '\'' + |
| | | ", checkInBy='" + checkInBy + '\'' + |
| | | ", checkInTime=" + checkInTime + |
| | | ", checkOutBy='" + checkOutBy + '\'' + |
| | | ", checkOutTime=" + checkOutTime + |
| | | ", copyFromVersion='" + copyFromVersion + '\'' + |
| | | ", secretGrade=" + secretGrade + |
| | | ", secretGradeText='" + secretGradeText + '\'' + |
| | | ", data=" + data + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | package com.vci.starter.web.pagemodel; |
| | | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author ludc |
| | | * @date 2024/11/27 16:53 |
| | |
| | | package com.vci.starter.web.util; |
| | | |
| | | import com.vci.starter.web.toolmodel.DateConverter; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.cglib.beans.BeanCopier; |
| | | import org.springframework.cglib.core.Converter; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.concurrent.ConcurrentMap; |
| | | |
| | | /** |
| | | * ä¸å¡ç±»åä¸ç¨çæ·è´å·¥å
·ï¼è¿ä¸ªæ¯æµ
æ·è´ï¼ |
| | |
| | | * æ¥å¿ |
| | | */ |
| | | private static Logger logger = LoggerFactory.getLogger(BeanUtilForVCI.class); |
| | | |
| | | /** |
| | | * åæ¾æ·è´å¯¹è±¡çç¼å |
| | | */ |
| | | private static final ConcurrentMap<String, BeanCopier> beanCopierMap = new ConcurrentHashMap<>(); |
| | | |
| | | /** |
| | | * æ·è´æ°æ® |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åç±»æ·è´ç对象 |
| | | * @param source æºå¯¹è±¡ç±» |
| | | * @param target ç®æ 对象类 |
| | | * @param useConverter æ¯å¦ä½¿ç¨è½¬æ¢å¨ |
| | | * @return æ·è´å¯¹è±¡ |
| | | */ |
| | | public static BeanCopier getBeanCopier(Class<?> source, Class<?> target,boolean useConverter) { |
| | | String beanCopierKey = generateBeanKey(source, target); |
| | | if (beanCopierMap.containsKey(beanCopierKey)) { |
| | | return beanCopierMap.get(beanCopierKey); |
| | | } else { |
| | | BeanCopier beanCopier = BeanCopier.create(source, target, useConverter); |
| | | beanCopierMap.putIfAbsent(beanCopierKey, beanCopier); |
| | | } |
| | | return beanCopierMap.get(beanCopierKey); |
| | | } |
| | | |
| | | /** |
| | | * çæä¸¤ä¸ªç±»çkey,ç¨äºåæ¾å°ç¼åä¹ä¸ |
| | | * @param source æºå¯¹è±¡ç±»å |
| | | * @param target ç®æ 对象类 |
| | | * @return 两个类çåç§°è¿æ¥å°ä¸èµ·åçåå |
| | | */ |
| | | public static String generateBeanKey(Class<?> source, Class<?> target) { |
| | | return source.getName() + "@" + target.getName(); |
| | | } |
| | | |
| | | /** |
| | | * 两个对象ä¹é´è½¬æ¢ |
| | | * @param source æºå¯¹è±¡ |
| | | * @param target ç®æ 对象 |
| | | * @param useConvert æ¯å¦ä½¿ç¨é»è®¤ç转æ¢å¨ï¼è¯·å¨åºç°å±æ§åç§°ç¸åèç±»åä¸åï¼æè
æå¯¹è±¡ç±»åï¼éå屿§æ¶æè½¬æ¢ |
| | | */ |
| | | public static void convert(Object source,Object target,boolean useConvert){ |
| | | if(source != null && target !=null){ |
| | | BeanCopier beanCopier = getBeanCopier(source.getClass(),target.getClass(),useConvert); |
| | | beanCopier.copy(source,target,useConvert?new DeepCopyConverter(target):null); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 两个对象ä¹é´è½¬æ¢ |
| | | * @param source æºå¯¹è±¡ |
| | | * @param target ç®æ 对象 |
| | | * @return ç®æ 对象 |
| | | */ |
| | | public static void convert(Object source,Object target){ |
| | | convert(source,target,true); |
| | | } |
| | | |
| | | /** |
| | | * 深度æ·è´è½¬æ¢å¨ |
| | | */ |
| | | public static class DeepCopyConverter implements Converter { |
| | | |
| | | /** |
| | | * ç®æ 对象 |
| | | */ |
| | | private Object target; |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * @param target ç®æ 对象 |
| | | */ |
| | | public DeepCopyConverter(Object target) { |
| | | this.target = target; |
| | | } |
| | | |
| | | /** |
| | | * æ§è¡æ·è´ |
| | | * @param value æºå¯¹è±¡ç屿§çå¼ |
| | | * @param targetClazz ç®æ 对象ç屿§çç±» |
| | | * @param methodName setæ¹æ³çåå |
| | | * @return 转æ¢åçå¼ |
| | | */ |
| | | @Override |
| | | public Object convert(Object value, Class targetClazz, Object methodName) { |
| | | if (value instanceof List) { |
| | | List values = (List) value; |
| | | List retList = new ArrayList<>(values.size()); |
| | | copyForCollection(values,retList,methodName); |
| | | return retList; |
| | | } else if(value instanceof Set){ |
| | | Set values = (Set) value; |
| | | Set retSet = new HashSet<>(); |
| | | copyForCollection(values,retSet,methodName); |
| | | } else if(value instanceof Vector){ |
| | | Vector values = (Vector)value; |
| | | Vector retVector = new Vector(); |
| | | copyForCollection(values,retVector,methodName); |
| | | }else if (value instanceof Map) { |
| | | Map values = (Map)value; |
| | | Map retMap = new HashMap(); |
| | | for (final Object key : values.keySet()) { |
| | | Object mapValue = values.get(key); |
| | | String tempFieldName = methodName.toString().replace("set", |
| | | ""); |
| | | String fieldName = tempFieldName.substring(0, 1) |
| | | .toLowerCase() + tempFieldName.substring(1); |
| | | Class clazz = ClassUtilForVCI.getElementType(target.getClass(), fieldName); |
| | | Object targetAttr = null; |
| | | try{ |
| | | targetAttr = clazz.newInstance(); |
| | | }catch (Throwable e){ |
| | | //æ°ç对象ç屿§åå§ååºé |
| | | } |
| | | BeanUtilForVCI.convert(mapValue, targetAttr); |
| | | retMap.put(key,targetAttr); |
| | | } |
| | | } else if (!ClassUtilForVCI.isPrimitive(targetClazz)) { |
| | | //è¿ä¸ªæ¯å¯¹è±¡ç±»å |
| | | Object targetAttr = null; |
| | | try{ |
| | | targetAttr = targetClazz.newInstance(); |
| | | }catch (Throwable e){ |
| | | //æ°çå¯¹è±¡å±æ§åå§ååºé |
| | | } |
| | | BeanUtilForVCI.convert(value, targetAttr); |
| | | return targetAttr; |
| | | } |
| | | if(value instanceof Boolean && targetClazz.equals(String.class)){ |
| | | //ä»booleanæ·è´å°string |
| | | return String.valueOf(value); |
| | | } |
| | | if(value instanceof String && (targetClazz.equals(Boolean.class) |
| | | || targetClazz.equals(boolean.class))){ |
| | | //ä»Stringæ·è´å°boolean |
| | | if("true".equalsIgnoreCase((String)value)){ |
| | | return true; |
| | | }else{ |
| | | return false; |
| | | } |
| | | } |
| | | if(value instanceof Date && targetClazz.equals(String.class)){ |
| | | //æ¶é´æ ¼å¼ |
| | | return VciDateUtil.date2Str((Date)value,VciDateUtil.DateTimeMillFormat); |
| | | } |
| | | if(value instanceof String && targetClazz.equals(Date.class)){ |
| | | //è½¬æ¢ |
| | | DateConverter dateConverter = new DateConverter(); |
| | | dateConverter.setAsText((String)value); |
| | | return dateConverter.getValue(); |
| | | } |
| | | return value; |
| | | } |
| | | |
| | | /** |
| | | * å¤çéå屿§ |
| | | * @param sourceCollection æºå¯¹è±¡ä¸éå屿§ççå¼ |
| | | * @param targetCollection ç®æ 对象çéå屿§çå¼ |
| | | * @param methodName setteræ¹æ³ |
| | | */ |
| | | private void copyForCollection(Collection<?> sourceCollection,Collection targetCollection,Object methodName){ |
| | | for (final Object source : sourceCollection) { |
| | | if(source instanceof Collection){ |
| | | List<Object> targetValues = new ArrayList<>(); |
| | | copyForCollection((Collection<?>)source,targetValues,methodName); |
| | | targetCollection.add(targetValues); |
| | | }else if(source instanceof Map){ |
| | | String tempFieldName = methodName.toString().replace("set", |
| | | ""); |
| | | String fieldName = tempFieldName.substring(0, 1) |
| | | .toLowerCase() + tempFieldName.substring(1); |
| | | Class clazz = ClassUtilForVCI.getElementType(target.getClass(), fieldName); |
| | | Object targetAttr = null; |
| | | try { |
| | | targetAttr = clazz.newInstance(); |
| | | } catch (Throwable e) { |
| | | //æ°ç对象ç屿§åå§ååºé |
| | | } |
| | | Map map = (Map) source; |
| | | for(Object key : map.keySet()){ |
| | | VciBaseUtil.setValueForField(key.toString(),targetAttr,VciBaseUtil.getStringValueFromObject(map.get(key))); |
| | | } |
| | | targetCollection.add(targetAttr); |
| | | }else { |
| | | String tempFieldName = methodName.toString().replace("set", |
| | | ""); |
| | | String fieldName = tempFieldName.substring(0, 1) |
| | | .toLowerCase() + tempFieldName.substring(1); |
| | | Class clazz = ClassUtilForVCI.getElementType(target.getClass(), fieldName); |
| | | Object targetAttr = null; |
| | | try { |
| | | targetAttr = clazz.newInstance(); |
| | | } catch (Throwable e) { |
| | | //æ°ç对象ç屿§åå§ååºé |
| | | } |
| | | BeanUtilForVCI.convert(source, targetAttr); |
| | | targetCollection.add(targetAttr); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web-base/src/main/java/com/vci/starter/web/util/ClassUtil.java ÐÞ¸Ä |
| | |
| | | * @author weidy |
| | | * @date 2019/11/23 10:18 AM |
| | | */ |
| | | public class ClassUtil { |
| | | public class ClassUtilForVCI { |
| | | /** |
| | | * åºæ¬ç±»åçæ å° |
| | | */ |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/Base64Util.java ÐÞ¸Ä |
| | |
| | | * this software without specific prior written permission. |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | /** |
| | | * Base64å·¥å
· |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/BeanUtil.java ÐÞ¸Ä |
| | |
| | | * this software without specific prior written permission. |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | |
| | | import com.vci.starter.web.annotation.*; |
| | | import com.vci.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciReferFieldInfo; |
| | | import com.vci.web.util.beans.BeanProperty; |
| | | import com.vci.web.util.beans.BladeBeanCopier; |
| | | import com.vci.web.util.convert.BladeConverter; |
| | | import com.vci.web.util.beans.BladeBeanMap; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import com.vci.starter.web.util.Lcm.beans.BeanProperty; |
| | | import com.vci.starter.web.util.Lcm.beans.BladeBeanCopier; |
| | | import com.vci.starter.web.util.Lcm.beans.BladeBeanMap; |
| | | import com.vci.starter.web.util.Lcm.convert.BladeConverter; |
| | | import org.springframework.beans.BeanWrapper; |
| | | import org.springframework.beans.BeansException; |
| | | import org.springframework.beans.PropertyAccessorFactory; |
| | | import org.springframework.cglib.beans.BeanGenerator; |
| | | import org.springframework.lang.Nullable; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.*; |
| | | |
| | | import static com.vci.starter.web.wrapper.VciQueryWrapperForDO.BASE_MODEL_COMPATIBILITY_MAP; |
| | | import static com.vci.starter.web.wrapper.VciQueryWrapperForDO.USER_TABLE_COMPATIBILITY; |
| | | |
| | | /** |
| | | * å®ä½å·¥å
·ç±» |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/Charsets.java ÐÞ¸Ä |
| | |
| | | * this software without specific prior written permission. |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | |
| | | import com.vci.starter.web.constant.StringPool; |
| | | |
| | | import java.nio.charset.Charset; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.nio.charset.UnsupportedCharsetException; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/ClassUtil.java ÐÞ¸Ä |
| | |
| | | * this software without specific prior written permission. |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import org.springframework.core.BridgeMethodResolver; |
| | | import org.springframework.core.DefaultParameterNameDiscoverer; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/CollectionUtil.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import org.springframework.lang.Nullable; |
| | | import org.springframework.util.CollectionUtils; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/ConcurrentDateFormat.java ÐÞ¸Ä |
| | |
| | | * this software without specific prior written permission. |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/ConvertUtil.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import com.vci.web.util.convert.BladeConversionService; |
| | | import com.vci.starter.web.util.ClassUtilForVCI; |
| | | import com.vci.starter.web.util.Lcm.convert.BladeConversionService; |
| | | import org.springframework.core.convert.TypeDescriptor; |
| | | import org.springframework.core.convert.support.GenericConversionService; |
| | | import org.springframework.lang.Nullable; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/DatatypeConverterUtil.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | /** |
| | | * æ°æ®ç±»å转æ¢å·¥å
·ç±» |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/DateTimeUtil.java ÐÞ¸Ä |
| | |
| | | * this software without specific prior written permission. |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import java.time.*; |
| | | import java.time.format.DateTimeFormatter; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/DateUtil.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import com.vci.starter.web.constant.StringPool; |
| | | import org.springframework.util.Assert; |
| | | |
| | | import java.text.ParseException; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/DigestUtil.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import org.apache.commons.codec.binary.Hex; |
| | | import com.vci.starter.web.constant.StringPool; |
| | | import org.springframework.lang.Nullable; |
| | | import org.springframework.util.DigestUtils; |
| | | |
| | | import javax.crypto.*; |
| | | import javax.crypto.Cipher; |
| | | import javax.crypto.Mac; |
| | | import javax.crypto.SecretKey; |
| | | import javax.crypto.spec.IvParameterSpec; |
| | | import javax.crypto.spec.SecretKeySpec; |
| | | import java.security.*; |
| | | import java.security.spec.InvalidKeySpecException; |
| | | import java.security.spec.PKCS8EncodedKeySpec; |
| | | import java.security.InvalidKeyException; |
| | | import java.security.MessageDigest; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.Base64; |
| | | |
| | | /** |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/Exceptions.java ÐÞ¸Ä |
| | |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import cn.hutool.core.io.FastStringWriter; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/FileUtil.java ÐÞ¸Ä |
| | |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import com.vci.starter.web.constant.CharPool; |
| | | import com.vci.starter.web.constant.StringPool; |
| | | import org.springframework.lang.Nullable; |
| | | import org.springframework.util.Assert; |
| | | import org.springframework.util.FileSystemUtils; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/Func.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import com.fasterxml.jackson.core.JsonParser; |
| | | import com.fasterxml.jackson.core.type.TypeReference; |
| | | import com.fasterxml.jackson.databind.JsonNode; |
| | | import com.vci.web.util.jackson.JsonUtil; |
| | | import org.springframework.util.StringUtils; |
| | | import com.vci.starter.web.constant.StringPool; |
| | | import com.vci.starter.web.util.Lcm.jackson.JsonUtil; |
| | | import org.springframework.beans.BeansException; |
| | | import org.springframework.core.MethodParameter; |
| | | import org.springframework.core.annotation.AnnotatedElementUtils; |
| | | import org.springframework.core.convert.TypeDescriptor; |
| | | import org.springframework.lang.Nullable; |
| | | import org.springframework.util.PatternMatchUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.method.HandlerMethod; |
| | | |
| | | import java.io.Closeable; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/Holder.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import java.security.SecureRandom; |
| | | import java.util.Random; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/IoUtil.java ÐÞ¸Ä |
| | |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import org.springframework.lang.Nullable; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/NumberUtil.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | |
| | | import org.springframework.lang.Nullable; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/ObjectUtil.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import org.springframework.lang.Nullable; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/RandomType.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | |
| | | import lombok.Getter; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/ReflectUtil.java ÐÞ¸Ä |
| | |
| | | * this software without specific prior written permission. |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import org.springframework.beans.BeansException; |
| | | import org.springframework.cglib.core.CodeGenerationException; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/StringUtil.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.vci.starter.web.constant.CharPool; |
| | | import com.vci.starter.web.constant.StringPool; |
| | | import com.vci.starter.web.util.Lcm.support.StrSpliter; |
| | | import org.springframework.lang.Nullable; |
| | | import org.springframework.util.Assert; |
| | | import org.springframework.util.PatternMatchUtils; |
| | | import org.springframework.web.util.HtmlUtils; |
| | | import com.vci.web.support.StrSpliter; |
| | | |
| | | import java.io.StringReader; |
| | | import java.io.StringWriter; |
| | | import java.text.MessageFormat; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/Unchecked.java ÐÞ¸Ä |
| | |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import com.vci.web.util.function.*; |
| | | import com.vci.starter.web.util.Lcm.function.*; |
| | | |
| | | import java.util.Comparator; |
| | | import java.util.Objects; |
| | | import java.util.concurrent.Callable; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/UrlUtil.java ÐÞ¸Ä |
| | |
| | | * this software without specific prior written permission. |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | package com.vci.web.util; |
| | | package com.vci.starter.web.util.Lcm; |
| | | |
| | | import java.net.URI; |
| | | import java.net.URISyntaxException; |
| | |
| | | * @return sourced String |
| | | */ |
| | | public static String encode(String source) { |
| | | return UrlUtil.encode(source, Charsets.UTF_8); |
| | | return encode(source, Charsets.UTF_8); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return decoded String |
| | | */ |
| | | public static String decode(String source) { |
| | | return UrlUtil.decode(source, Charsets.UTF_8); |
| | | return decode(source, Charsets.UTF_8); |
| | | } |
| | | |
| | | /** |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/beans/BeanProperty.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util.beans; |
| | | package com.vci.starter.web.util.Lcm.beans; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Getter; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/beans/BladeBeanCopier.java ÐÞ¸Ä |
| | |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | |
| | | package com.vci.web.util.beans; |
| | | package com.vci.starter.web.util.Lcm.beans; |
| | | |
| | | import com.vci.web.util.BeanUtil; |
| | | import com.vci.web.util.ClassUtil; |
| | | import com.vci.web.util.ReflectUtil; |
| | | import com.vci.web.util.StringUtil; |
| | | import com.vci.starter.web.annotation.CopyProperty; |
| | | import com.vci.starter.web.util.Lcm.BeanUtil; |
| | | import com.vci.starter.web.util.Lcm.ClassUtil; |
| | | import com.vci.starter.web.util.Lcm.ReflectUtil; |
| | | import com.vci.starter.web.util.Lcm.StringUtil; |
| | | import org.springframework.asm.ClassVisitor; |
| | | import org.springframework.asm.Label; |
| | | import org.springframework.asm.Opcodes; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/beans/BladeBeanCopierKey.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util.beans; |
| | | package com.vci.starter.web.util.Lcm.beans; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.EqualsAndHashCode; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/beans/BladeBeanMap.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util.beans; |
| | | package com.vci.starter.web.util.Lcm.beans; |
| | | |
| | | import org.springframework.asm.ClassVisitor; |
| | | import org.springframework.cglib.beans.BeanMap; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/beans/BladeBeanMapEmitter.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util.beans; |
| | | package com.vci.starter.web.util.Lcm.beans; |
| | | |
| | | import com.vci.web.util.ReflectUtil; |
| | | |
| | | import com.vci.starter.web.util.Lcm.ReflectUtil; |
| | | import org.springframework.asm.ClassVisitor; |
| | | import org.springframework.asm.Label; |
| | | import org.springframework.asm.Type; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/beans/BladeBeanMapKey.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util.beans; |
| | | package com.vci.starter.web.util.Lcm.beans; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.EqualsAndHashCode; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/convert/BladeConversionService.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util.convert; |
| | | package com.vci.starter.web.util.Lcm.convert; |
| | | |
| | | import com.vci.web.util.convert.EnumToStringConverter; |
| | | import org.springframework.boot.convert.ApplicationConversionService; |
| | | import org.springframework.core.convert.support.GenericConversionService; |
| | | import org.springframework.lang.Nullable; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/convert/BladeConverter.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util.convert; |
| | | package com.vci.starter.web.util.Lcm.convert; |
| | | |
| | | import com.vci.web.util.ClassUtil; |
| | | import com.vci.web.util.ConvertUtil; |
| | | import com.vci.web.util.ReflectUtil; |
| | | import com.vci.web.util.Unchecked; |
| | | import com.vci.web.util.function.CheckedFunction; |
| | | import com.vci.starter.web.util.Lcm.ClassUtil; |
| | | import com.vci.starter.web.util.Lcm.ConvertUtil; |
| | | import com.vci.starter.web.util.Lcm.ReflectUtil; |
| | | import com.vci.starter.web.util.Lcm.Unchecked; |
| | | import com.vci.starter.web.util.Lcm.function.CheckedFunction; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.cglib.core.Converter; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/convert/EnumToStringConverter.java ÐÞ¸Ä |
| | |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | |
| | | package com.vci.web.util.convert; |
| | | package com.vci.starter.web.util.Lcm.convert; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonValue; |
| | | import com.vci.web.util.ConvertUtil; |
| | | import com.vci.starter.web.util.Lcm.ConvertUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.core.convert.TypeDescriptor; |
| | | import org.springframework.core.convert.converter.ConditionalGenericConverter; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/convert/StringToEnumConverter.java ÐÞ¸Ä |
| | |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | |
| | | package com.vci.web.util.convert; |
| | | package com.vci.starter.web.util.Lcm.convert; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonCreator; |
| | | import com.vci.web.util.ConvertUtil; |
| | | import com.vci.web.util.StringUtil; |
| | | import com.vci.starter.web.util.Lcm.ConvertUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.core.convert.TypeDescriptor; |
| | | import org.springframework.core.convert.converter.ConditionalGenericConverter; |
| | | import org.springframework.lang.Nullable; |
| | |
| | | @Nullable |
| | | @Override |
| | | public Object convert(@Nullable Object source, TypeDescriptor sourceType, TypeDescriptor targetType) { |
| | | if (StringUtil.isBlank((String) source)) { |
| | | if (StringUtils.isBlank((String) source)) { |
| | | return null; |
| | | } |
| | | Class<?> clazz = targetType.getType(); |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/function/CheckedCallable.java ÐÞ¸Ä |
| | |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | |
| | | package com.vci.web.util.function; |
| | | package com.vci.starter.web.util.Lcm.function; |
| | | |
| | | import org.springframework.lang.Nullable; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/function/CheckedComparator.java ÐÞ¸Ä |
| | |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | |
| | | package com.vci.web.util.function; |
| | | package com.vci.starter.web.util.Lcm.function; |
| | | |
| | | /** |
| | | * 忣ç Comparator |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/function/CheckedConsumer.java ÐÞ¸Ä |
| | |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | |
| | | package com.vci.web.util.function; |
| | | package com.vci.starter.web.util.Lcm.function; |
| | | |
| | | import org.springframework.lang.Nullable; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/function/CheckedFunction.java ÐÞ¸Ä |
| | |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | |
| | | package com.vci.web.util.function; |
| | | package com.vci.starter.web.util.Lcm.function; |
| | | |
| | | import org.springframework.lang.Nullable; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/function/CheckedRunnable.java ÐÞ¸Ä |
| | |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | |
| | | package com.vci.web.util.function; |
| | | package com.vci.starter.web.util.Lcm.function; |
| | | |
| | | /** |
| | | * 忣ç runnable |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/function/CheckedSupplier.java ÐÞ¸Ä |
| | |
| | | * Author: DreamLu 墿¥æ¢¦ (596392912@qq.com) |
| | | */ |
| | | |
| | | package com.vci.web.util.function; |
| | | package com.vci.starter.web.util.Lcm.function; |
| | | |
| | | import org.springframework.lang.Nullable; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/jackson/BladeJavaTimeModule.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util.jackson; |
| | | package com.vci.starter.web.util.Lcm.jackson; |
| | | |
| | | import com.fasterxml.jackson.databind.module.SimpleModule; |
| | | import com.fasterxml.jackson.datatype.jsr310.PackageVersion; |
| | |
| | | import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; |
| | | import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; |
| | | import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer; |
| | | import com.vci.web.util.DateTimeUtil; |
| | | import com.vci.starter.web.util.Lcm.DateTimeUtil; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/jackson/JsonUtil.java ÐÞ¸Ä |
| | |
| | | * this software without specific prior written permission. |
| | | * Author: Chill åºéª (smallchill@163.com) |
| | | */ |
| | | package com.vci.web.util.jackson; |
| | | package com.vci.starter.web.util.Lcm.jackson; |
| | | |
| | | import com.fasterxml.jackson.core.JsonParser; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | |
| | | import com.fasterxml.jackson.databind.*; |
| | | import com.fasterxml.jackson.databind.type.CollectionLikeType; |
| | | import com.fasterxml.jackson.databind.type.MapType; |
| | | import com.vci.web.util.*; |
| | | import com.vci.starter.web.constant.StringPool; |
| | | import com.vci.starter.web.util.Lcm.DateUtil; |
| | | import com.vci.starter.web.util.Lcm.Exceptions; |
| | | import com.vci.starter.web.util.Lcm.ObjectUtil; |
| | | import com.vci.starter.web.util.Lcm.StringUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.lang.Nullable; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/support/StrSpliter.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.support; |
| | | package com.vci.starter.web.util.Lcm.support; |
| | | |
| | | import com.vci.web.util.StringUtil; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.util.StringPool; |
| | | import com.vci.starter.web.util.Lcm.StringUtil; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.starter.web.constant.StringPool; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | if(c.isArray()){ |
| | | return isBasicType(c.getComponentType()); |
| | | } |
| | | return ClassUtil.isPrimitive(c); |
| | | return ClassUtilForVCI.isPrimitive(c); |
| | | } |
| | | |
| | | /** |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | <parent> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-web-parent</artifactId> |
| | | <version>2024.1-SNAPSHOT</version> |
| | | </parent> |
| | | |
| | | <artifactId>plt-web-permission</artifactId> |
| | | |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| | | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| | | <poi.version>4.1.0</poi.version> |
| | | </properties> |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-web-api</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-starter</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-web-base</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.github.jsqlparser</groupId> |
| | | <artifactId>jsqlparser</artifactId> |
| | | <version>4.9</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.reflections</groupId> |
| | | <artifactId>reflections</artifactId> |
| | | <version>0.9.11</version> |
| | | </dependency> |
| | | <dependency><!--代ç çæå¨æé模æ¿--> |
| | | <artifactId>velocity</artifactId> |
| | | <groupId>org.apache.velocity</groupId> |
| | | <version>1.7</version> |
| | | </dependency> |
| | | |
| | | <!--éè¦è¯»åexcel--> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi</artifactId> |
| | | <version>${poi.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-excelant</artifactId> |
| | | <version>${poi.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml-schemas</artifactId> |
| | | <version>${poi.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml</artifactId> |
| | | <version>${poi.version}</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/ajaxTask/SmUserUnLockTask.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.ajaxTask; |
| | | package com.vci.web.ajaxTask; |
| | | |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.web.service.SmUserQueryServiceI; |
| | | |
| | | import java.util.concurrent.Delayed; |
| | | import java.util.concurrent.TimeUnit; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/ajaxTask/SmUserUnLockTaskManager.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.ajaxTask; |
| | | package com.vci.web.ajaxTask; |
| | | |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.VciDateUtil; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/properties/ConfigCorbaReader.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.properties; |
| | | package com.vci.web.config; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/config/WebFilePreviewAutoConfig.java ÐÞ¸Ä |
| | |
| | | public class WebFilePreviewAutoConfig { |
| | | |
| | | /** |
| | | * æ¯å¦å¯ç¨ |
| | | */ |
| | | private boolean enabled; |
| | | |
| | | /** |
| | | * é¢è§æå¡çè·¯å¾ |
| | | */ |
| | | private String previewServiceUrl; |
| | | |
| | | /** |
| | | * é¢è§çå
é¨key,ä¸é¢è§æå¡å¨éå¯¹åº |
| | | * appéé
ç½®ç private-token-keyå°ä¼ç¨äºé
ç½® previewSystemKeyã éè¦åæ¶å¨é¢è§æå¡éé
ç½® |
| | | */ |
| | | private String previewSystemKey; |
| | | |
| | |
| | | */ |
| | | private Long invalidTime = 5L; |
| | | |
| | | /*** |
| | | * appéé
ç½®ç private-token-keyå°ä¼ç¨äºé
ç½® previewSystemKeyã éè¦åæ¶å¨é¢è§æå¡éé
ç½® |
| | | */ |
| | | public boolean isEnabled() { |
| | | return enabled; |
| | | } |
| | | |
| | | public void setEnabled(boolean enabled) { |
| | | this.enabled = enabled; |
| | | } |
| | | |
| | | public String getPreviewServiceUrl() { |
| | | return previewServiceUrl; |
| | |
| | | @Override |
| | | public String toString() { |
| | | return "WebFilePreviewAutoConfig{" + |
| | | "previewServiceUrl='" + previewServiceUrl + '\'' + |
| | | "enabled=" + enabled + |
| | | ", previewServiceUrl='" + previewServiceUrl + '\'' + |
| | | ", previewSystemKey='" + previewSystemKey + '\'' + |
| | | ", invalidTime=" + invalidTime + |
| | | '}'; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/plugins/controller/AuditTaskController.java ÐÞ¸Ä |
| | |
| | | package com.vci.plugins.controller; |
| | | package com.vci.web.controller; |
| | | |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.corba.query.data.KV; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.plugins.dto.AuditTaskDTO; |
| | | import com.vci.dto.AuditTaskDTO; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/plugins/controller/ImageViewerController.java ÐÞ¸Ä |
| | |
| | | package com.vci.plugins.controller; |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.constant.VciFileBtmTypeConstant; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.ControllerUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.query.FileImageViewerQuery; |
| | | import com.vci.query.FileImageViewerQuery; |
| | | import com.vci.web.service.VciFileDownloadServiceI; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/OrgDepartmentQueryController.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.controller; |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.dto.OrgDepartmentDTO; |
| | | import com.vci.frameworkcore.compatibility.OrgDeptQueryServiceI; |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.pagemodel.OrgDepartmentVO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.service.OrgDeptQueryServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/OrgDutyQueryController.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.controller; |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.frameworkcore.compatibility.OrgDutyQueryServiceI; |
| | | import com.vci.pagemodel.OrgDutyVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.web.service.OrgDutyQueryServiceI; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmRoleQueryController.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.controller; |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.frameworkcore.compatibility.SmRoleQueryServiceI; |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.dto.SmRoleDTO; |
| | | import com.vci.enumpck.UserTypeEnum; |
| | | import com.vci.pagemodel.SmRoleVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | 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.enumpck.UserTypeEnum; |
| | | import com.vci.web.service.SmRoleQueryServiceI; |
| | | 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.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmUserQueryController.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.controller; |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.dto.SmUserDTO; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.pagemodel.SmUserVO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.service.SmUserQueryServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ï¼å¦ææ¯èç项ç®é䏿åºå¼å¸¸ |
| | | */ |
| | | @RequestMapping(value = "/getDataGridUsers",method = RequestMethod.GET) |
| | | public BaseResult<SmUserVO> getDataGridUsers(BaseQueryObject queryObject) throws VciBaseException { |
| | | public BaseResult<SmUserVO> getDataGridUsers(BaseQueryObject queryObject) { |
| | | try { |
| | | DataGrid<SmUserVO> userVODataGrid = userQueryService.getDataGridUsers(queryObject.getConditionMap(),queryObject.getPageHelper()); |
| | | return BaseResult.dataGrid(userVODataGrid); |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/plugins/controller/Sql2TableController.java ÐÞ¸Ä |
| | |
| | | package com.vci.plugins.controller; |
| | | package com.vci.web.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.vci.corba.common.PLException; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/VciFileUploadController.java ÐÞ¸Ä |
| | |
| | | |
| | | import java.io.IOException; |
| | | |
| | | import static org.apache.commons.compress.utils.Charsets.UTF_8; |
| | | import static com.vci.starter.web.util.Lcm.Charsets.UTF_8; |
| | | |
| | | /** |
| | | * ææ¡£ä¸ä¼ æ§å¶å¨ |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebScanAnnotationController.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.controller; |
| | | |
| | | |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import com.vci.web.service.impl.WebInitServiceImpl; |
| | | import com.vci.web.util.OsScanAnnotationTool; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private OsScanAnnotationTool scanAnnotationTool; |
| | | |
| | | /** |
| | | * åå§åæå¡ |
| | | */ |
| | | @Autowired |
| | | private WebInitServiceImpl initService; |
| | | |
| | | /** |
| | | * 使ç¨å
åæ«ææ³¨è§£ |
| | | * @param packName å
å |
| | | * @return æ§è¡ç»æ |
| | |
| | | @PostMapping(value = "/scanAnnotation") |
| | | public synchronized BaseResult scanAnnotation(String packName){ |
| | | try { |
| | | initService.clearAllCache(); |
| | | initService.initServerCache(); |
| | | List<String> packageList = WebUtil.str2List(packName); |
| | | List<String> entityList = new ArrayList(); |
| | | List<String> unScanEntityList = new ArrayList<String>(); |
| | | scanAnnotationTool.doScanAnnotation2OSServer(packageList, entityList,unScanEntityList); |
| | | initService.clearAllCache(); |
| | | initService.initServerCache(); |
| | | }catch (Throwable e){ |
| | | return BaseResult.fail(LangBaseUtil.getErrorMsg(e)); |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/BdSelectInputCharDaoI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao; |
| | | |
| | | import com.vci.model.BdSelectInputCharDO; |
| | | |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.*; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * å¯è¾å¯éå
å®¹æ°æ®æä½å± |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/OsCodeBreakCodeDaoI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao; |
| | | |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.model.OsCodeBreakCodeDO; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/OsCodeEnumDaoI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | |
| | | import com.vci.model.OsCodeEnumDO; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/OsCodeGenSchemaDaoI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao; |
| | | |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.model.OsCodeGenSchemaDO; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/OsCodeRuleDaoI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao; |
| | | |
| | | |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.model.OsCodeRuleDO; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/OsCodeRuleElementDaoI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao; |
| | | |
| | | |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.model.OsCodeRuleElementDO; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/OsCodeSerialNumberDaoI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao; |
| | | |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.model.OsCodeSerialNumberDO; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/VciFileDocClassifyDaoI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao; |
| | | |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.model.VciFileDocClassifyDO; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/VciFileObjectDaoI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao; |
| | | |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.model.VciFileObjectDO; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/VciFileVolumeDaoI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao; |
| | | |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.model.VciFileVolumeDO; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/WFWorkflowNodeFavDaoI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao; |
| | | |
| | | |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.model.WFWorkflowNodeFavDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/WFWorkflowNodeFavItemDaoI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao; |
| | | |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.model.WFWorkflowNodeFavItemDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/WebProcessDaoI.java ÐÞ¸Ä |
| | |
| | | import com.vci.corba.workflow.WorkflowServicePrx; |
| | | import com.vci.corba.workflow.data.TasksAssignedInfo; |
| | | import com.vci.dto.ProcessTemplateVO; |
| | | import com.vci.model.WFProcessClassifyDO; |
| | | import com.vci.model.WFProcessTemplateDO; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.model.WFProcessClassifyDO; |
| | | import com.vci.model.WFProcessTemplateDO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Date; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/BdSelectInputCharDaoImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.model.BdSelectInputCharDO; |
| | | |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.web.dao.BdSelectInputCharDaoI; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.service.OsLifeCycleServiceI; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.dao.BdSelectInputCharDaoI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | */ |
| | | @Autowired |
| | | private WebBoServiceI boService; |
| | | |
| | | /** |
| | | * çå½å¨æçæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsLifeCycleServiceI lifeCycleService; |
| | | |
| | | /** |
| | | * 使ç¨ä¸»é®å é¤ |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/OsCodeBreakCodeDaoImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.model.OsCodeBreakCodeDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.dao.OsCodeBreakCodeDaoI; |
| | | import com.vci.model.OsCodeBreakCodeDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/OsCodeEnumDaoImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.model.OsCodeEnumDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.dao.OsCodeEnumDaoI; |
| | | import com.vci.model.OsCodeEnumDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/OsCodeGenSchemaDaoImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.model.OsCodeGenSchemaDO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.dao.OsCodeGenSchemaDaoI; |
| | | import com.vci.model.OsCodeGenSchemaDO; |
| | | import com.vci.web.service.OsLinkTypeServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Autowired |
| | | private WebBoServiceI boService; |
| | | |
| | | /** |
| | | * çå½å¨æçæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsLinkTypeServiceI lifeCycleService; |
| | | /** |
| | | * 使ç¨ä¸»é®å é¤ |
| | | * |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/OsCodeRuleDaoImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.model.OsCodeRuleDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.dao.OsCodeRuleDaoI; |
| | | import com.vci.model.OsCodeRuleDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.web.service.OsLifeCycleServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.service.WebLifeCycleServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | * çå½å¨æçæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsLifeCycleServiceI lifeCycleService; |
| | | private WebLifeCycleServiceI lifeCycleService; |
| | | |
| | | /** |
| | | * 使ç¨ä¸»é®å é¤ |
| | |
| | | if(CollectionUtils.isEmpty(cbos)){ |
| | | return 0; |
| | | } |
| | | lifeCycleService.transCboStatus(cbos,lcStatus); |
| | | try { |
| | | lifeCycleService.transCboStatus(cbos,lcStatus); |
| | | } catch (Exception e) { |
| | | throw new VciBaseException("æ¹éä¿®æ¹çå½å¨æçç¶æï¼", new Object[]{}, e); |
| | | } |
| | | return cbos.size(); |
| | | } |
| | | |
| | |
| | | if(cbo == null || StringUtils.isBlank(cbo.oid)){ |
| | | return 0; |
| | | } |
| | | lifeCycleService.transStatus(cbo,lcStatus); |
| | | try { |
| | | lifeCycleService.transStatus(cbo,lcStatus); |
| | | } catch (Exception e) { |
| | | throw new VciBaseException("ä¿®æ¹çå½å¨æçç¶æå¤±è´¥ï¼", new Object[]{}, e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/OsCodeRuleElementDaoImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.model.OsCodeRuleElementDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.dao.OsCodeRuleElementDaoI; |
| | | import com.vci.model.OsCodeRuleElementDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/OsCodeSerialNumberDaoImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.model.OsCodeSerialNumberDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.dao.OsCodeSerialNumberDaoI; |
| | | import com.vci.model.OsCodeSerialNumberDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/VciFileDocClassifyDaoImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.constant.VciFileBtmTypeConstant; |
| | | import com.vci.model.VciFileDocClassifyDO; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.dao.VciFileDocClassifyDaoI; |
| | | import com.vci.model.VciFileDocClassifyDO; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/VciFileDocClassifyServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.dto.VciFileDocClassifyDTO; |
| | | import com.vci.dto.VciFileDocClassifyDTOList; |
| | | import com.vci.pagemodel.VciFileDocClassifyVO; |
| | | import com.vci.model.VciFileDocClassifyDO; |
| | | import com.vci.pagemodel.VciFileDocClassifyVO; |
| | | import com.vci.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.starter.web.annotation.bus.VciChangeDocument; |
| | |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.KeyValue; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.dao.VciFileDocClassifyDaoI; |
| | | import com.vci.model.VciFileDocClassifyDO; |
| | | import com.vci.web.service.VciFileDocClassifyServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | |
| | | public VciFileDocClassifyVO vciFileDocClassifyDO2VO(VciFileDocClassifyDO vciFileDocClassifyDO) throws VciBaseException { |
| | | VciFileDocClassifyVO vo = new VciFileDocClassifyVO(); |
| | | if(vciFileDocClassifyDO != null){ |
| | | BeanUtil.convert(vciFileDocClassifyDO,vo); |
| | | BeanUtilForVCI.convert(vciFileDocClassifyDO,vo); |
| | | //è¿éè¦å¤çæä¸¾çå
¶ä»çå
容 |
| | | } |
| | | return vo; |
| | |
| | | VciBaseUtil.alertNotNull(vciFileDocClassifyDTO,"éè¦æ·»å çæ°æ®å¯¹è±¡"); |
| | | //å°DTO转æ¢ä¸ºDO |
| | | VciFileDocClassifyDO vciFileDocClassifyDO = new VciFileDocClassifyDO(); |
| | | BeanUtil.convert(vciFileDocClassifyDTO,vciFileDocClassifyDO); |
| | | BeanUtilForVCI.convert(vciFileDocClassifyDTO,vciFileDocClassifyDO); |
| | | |
| | | revisionModelUtil.wrapperForAdd(vciFileDocClassifyDO); |
| | | int insert = vciFileDocClassifyMapper.insert(vciFileDocClassifyDO); |
| | |
| | | //循ç¯å¤ç |
| | | dtoList.stream().forEach(dto->{ |
| | | VciFileDocClassifyDO classifyDO = new VciFileDocClassifyDO(); |
| | | BeanUtil.convert(dto,classifyDO); |
| | | BeanUtilForVCI.convert(dto,classifyDO); |
| | | VciBaseUtil.alertNotNull(classifyDO.getId(),"æä»¶ç±»åç¼å·",classifyDO.getName(),"æä»¶ç±»ååç§°"); |
| | | doList.add(classifyDO); |
| | | }); |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/VciFileDownloadServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.volume.VolumeServicePrx; |
| | | import com.vci.enumpck.VciFileTransProtocolEnum; |
| | | import com.vci.pagemodel.VciFileVolumeVO; |
| | | import com.vci.enumpck.UI.VciFileTransProtocolEnum; |
| | | import com.vci.model.VciFileObjectDO; |
| | | import com.vci.pagemodel.VciFileObjectVO; |
| | | import com.vci.pagemodel.VciFileVolumeVO; |
| | | import com.vci.starter.web.annotation.bus.VciChangeDocument; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.util.file.clientutil.VciFileServerClientUtil; |
| | | import com.vci.web.dao.VciFileObjectDaoI; |
| | | import com.vci.model.VciFileObjectDO; |
| | | import com.vci.web.properties.WebProperties; |
| | | import com.vci.web.service.VciFileDownloadServiceI; |
| | | import com.vci.web.service.VciFileObjectServiceI; |
| | | import com.vci.web.service.VciFileVolumeServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.file.VciZipUtil; |
| | | import com.vci.web.util.file.clientutil.VciFileServerClientUtil; |
| | | import net.lingala.zip4j.core.ZipFile; |
| | | import net.lingala.zip4j.io.ZipOutputStream; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import static com.vci.constant.FrameWorkLangCodeConstant.*; |
| | | import static com.vci.constant.VciFileLangCodeConstant.FILE_NOT_FOUND; |
| | | import static com.vci.constant.VciFileLangCodeConstant.FILE_READ_FAIL; |
| | | import static com.vci.constant.FrameWorkLangCodeConstant.*; |
| | | |
| | | /** |
| | | * æä»¶çä¸è½½æå¡ |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/VciFileObjectDaoImpl.java ÐÞ¸Ä |
| | |
| | | |
| | | import com.vci.constant.VciFileBtmTypeConstant; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.model.VciFileObjectDO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.dao.VciFileObjectDaoI; |
| | | import com.vci.model.VciFileObjectDO; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/VciFileObjectServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.volume.VolumeServicePrx; |
| | | import com.vci.dto.VciFileObjectDTO; |
| | | import com.vci.lcstatuspck.FileLCStatus; |
| | | import com.vci.model.VciFileObjectDO; |
| | | import com.vci.model.VciFileVolumeDO; |
| | | import com.vci.pagemodel.VciFileObjectVO; |
| | | import com.vci.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.starter.web.annotation.bus.VciChangeDocument; |
| | |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.dao.VciFileObjectDaoI; |
| | | import com.vci.model.VciFileObjectDO; |
| | | import com.vci.model.VciFileVolumeDO; |
| | | import com.vci.web.service.VciFileObjectServiceI; |
| | | import com.vci.web.service.VciFileVolumeServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.constant.VciFileLangCodeConstant.FILE_RELEASED; |
| | | import static com.vci.constant.FrameWorkLangCodeConstant.*; |
| | | import static com.vci.constant.VciFileLangCodeConstant.FILE_RELEASED; |
| | | |
| | | /** |
| | | * æä»¶å¯¹è±¡æå¡ |
| | |
| | | public VciFileObjectVO vciFileObjectDO2VO(VciFileObjectDO vciFileObjectDO) throws VciBaseException { |
| | | VciFileObjectVO vo = new VciFileObjectVO(); |
| | | if(vciFileObjectDO != null){ |
| | | BeanUtil.convert(vciFileObjectDO,vo); |
| | | BeanUtilForVCI.convert(vciFileObjectDO,vo); |
| | | //è¿éè¦å¤çæä¸¾çå
¶ä»çå
容 |
| | | } |
| | | return vo; |
| | |
| | | VciBaseUtil.alertNotNull(vciFileObjectDTO,"éè¦æ·»å çæ°æ®å¯¹è±¡"); |
| | | //å°DTO转æ¢ä¸ºDO |
| | | VciFileObjectDO vciFileObjectDO = new VciFileObjectDO(); |
| | | BeanUtil.convert(vciFileObjectDTO,vciFileObjectDO); |
| | | BeanUtilForVCI.convert(vciFileObjectDTO,vciFileObjectDO); |
| | | |
| | | revisionModelUtil.wrapperForAdd(vciFileObjectDO); |
| | | int insert = vciFileObjectMapper.insert(vciFileObjectDO); |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/VciFileUploadServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.constant.VciFileDefaultValueConstant; |
| | | import com.vci.constant.VciFileLangCodeConstant; |
| | | import com.vci.constant.WebLangCodeConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.volume.VolumeServicePrx; |
| | | import com.vci.dto.VciFileObjectDTO; |
| | | import com.vci.enumpck.VciFileTransProtocolEnum; |
| | | import com.vci.enumpck.UI.VciFileTransProtocolEnum; |
| | | import com.vci.lcstatuspck.FileLCStatus; |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.model.VciFileDocClassifyDO; |
| | | import com.vci.model.VciFileObjectDO; |
| | | import com.vci.model.VciFileVolumeDO; |
| | | import com.vci.pagemodel.VciFileObjectVO; |
| | | import com.vci.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.starter.web.annotation.bus.VciChangeDocument; |
| | |
| | | import com.vci.starter.web.enumpck.UserSecretEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.constant.WebLangCodeConstant; |
| | | import com.vci.web.dao.VciFileDocClassifyDaoI; |
| | | import com.vci.web.dao.VciFileObjectDaoI; |
| | | import com.vci.web.dao.VciFileVolumeDaoI; |
| | | import com.vci.model.VciFileDocClassifyDO; |
| | | import com.vci.model.VciFileObjectDO; |
| | | import com.vci.model.VciFileVolumeDO; |
| | | import com.vci.web.properties.WebProperties; |
| | | import com.vci.web.service.VciFileUploadServiceI; |
| | | import com.vci.web.service.VciFileVolumeServiceI; |
| | |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | |
| | | import static com.vci.constant.FrameWorkLangCodeConstant.UPLOAD_FAIL; |
| | | import static com.vci.constant.FrameWorkLangCodeConstant.UPLOAD_SUCCESS; |
| | | import static com.vci.constant.VciFileLangCodeConstant.*; |
| | | import static com.vci.constant.FrameWorkLangCodeConstant.*; |
| | | |
| | | @Service |
| | | @VciChangeDocument(btmType = "fileUpload") |
| | |
| | | baseResult.setMsg(FrameWorkLangCodeConstant.UPLOAD_SUCCESS); |
| | | |
| | | VciFileObjectVO vciFileObjectVO = new VciFileObjectVO(); |
| | | BeanUtil.convert(vciFileObjectDO, vciFileObjectVO); |
| | | BeanUtilForVCI.convert(vciFileObjectDO, vciFileObjectVO); |
| | | vciFileObjectVO.setFileDocClassifyName("22222"); |
| | | baseResult.setObj(vciFileObjectVO); |
| | | |
| | |
| | | List<VciFileObjectVO> voList = new ArrayList<VciFileObjectVO>(); |
| | | for(VciFileObjectDO vciFileObjectDO : resultList){ |
| | | VciFileObjectVO vciFileObjectVO = new VciFileObjectVO(); |
| | | BeanUtil.convert(vciFileObjectDO,vciFileObjectVO); |
| | | BeanUtilForVCI.convert(vciFileObjectDO,vciFileObjectVO); |
| | | voList.add(vciFileObjectVO); |
| | | } |
| | | |
| | |
| | | |
| | | for(VciFileObjectDO sourceDO : sourceFileObjectList){ |
| | | VciFileObjectDO targetDO = new VciFileObjectDO(); |
| | | BeanUtil.convert(sourceDO, targetDO); |
| | | BeanUtilForVCI.convert(sourceDO, targetDO); |
| | | targetDO.setOid(VciBaseUtil.getPk()); |
| | | targetDO.setCreator(currentUserId); |
| | | targetDO.setCreateTime(currentDate); |
| | |
| | | } |
| | | |
| | | VciFileObjectVO vciFileObjectVO = new VciFileObjectVO(); |
| | | BeanUtil.convert(vciFileObjectDO,vciFileObjectVO); |
| | | BeanUtilForVCI.convert(vciFileObjectDO,vciFileObjectVO); |
| | | baseResult.setObj(vciFileObjectVO); |
| | | |
| | | threadFileObjectMap.remove(fileOid); |
| | |
| | | List<VciFileObjectVO> vciFileObjectVOS = new ArrayList<VciFileObjectVO>(); |
| | | for(VciFileObjectDTO vciFileObjectDTO : vciFileObjectDTOS){ |
| | | VciFileObjectDO vciFileObjectDO = new VciFileObjectDO(); |
| | | BeanUtil.convert(vciFileObjectDTO, vciFileObjectDO); |
| | | BeanUtilForVCI.convert(vciFileObjectDTO, vciFileObjectDO); |
| | | vciFileObjectDO.setPkFileVolume(vciFileVolumeDO.getOid()); |
| | | if(StringUtils.isBlank(vciFileObjectDO.getId())){ |
| | | vciFileObjectDO.setName(vciFileObjectDO.getId()); |
| | |
| | | vciFileObjectDOS.add(vciFileObjectDO); |
| | | |
| | | VciFileObjectVO vciFileObjectVO = new VciFileObjectVO(); |
| | | BeanUtil.convert(vciFileObjectDO, vciFileObjectVO); |
| | | BeanUtilForVCI.convert(vciFileObjectDO, vciFileObjectVO); |
| | | vciFileObjectVOS.add(vciFileObjectVO); |
| | | |
| | | threadFileObjectMap.put(vciFileObjectDO.getOid(),vciFileObjectDTO); |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/VciFileVolumeDaoImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.constant.VciFileBtmTypeConstant; |
| | | import com.vci.model.VciFileVolumeDO; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.dao.VciFileVolumeDaoI; |
| | | import com.vci.model.VciFileVolumeDO; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/VciFileVolumeServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.framework.data.PvolumeInfo; |
| | | import com.vci.dto.VciFileVolumeDTO; |
| | | import com.vci.enumpck.VciFileServiceOsTypeEnum; |
| | | import com.vci.enumpck.VciFileTransProtocolEnum; |
| | | import com.vci.enumpck.UI.VciFileServiceOsTypeEnum; |
| | | import com.vci.enumpck.UI.VciFileTransProtocolEnum; |
| | | import com.vci.model.VciFileVolumeDO; |
| | | import com.vci.pagemodel.VciFileVolumeVO; |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.starter.web.annotation.bus.VciChangeDocument; |
| | | import com.vci.starter.web.enumpck.VciChangeDocumentTypeEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.dao.VciFileVolumeDaoI; |
| | | import com.vci.model.VciFileVolumeDO; |
| | | import com.vci.web.service.VciFileVolumeServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | public VciFileVolumeVO vciFileVolumeDO2VO(VciFileVolumeDO vciFileVolumeDO) throws VciBaseException { |
| | | VciFileVolumeVO vo = new VciFileVolumeVO(); |
| | | if(vciFileVolumeDO != null){ |
| | | BeanUtil.convert(vciFileVolumeDO,vo); |
| | | BeanUtilForVCI.convert(vciFileVolumeDO,vo); |
| | | |
| | | //è¿éè¦å¤çæä¸¾çå
¶ä»çå
容 |
| | | vo.setServiceOsTypeText(VciFileServiceOsTypeEnum.getTextByValue(vo.getServiceOsType())); |
| | |
| | | VciBaseUtil.alertNotNull(vciFileVolumeDTO,"éè¦æ·»å çæ°æ®å¯¹è±¡"); |
| | | //å°DTO转æ¢ä¸ºDO |
| | | VciFileVolumeDO vciFileVolumeDO = new VciFileVolumeDO(); |
| | | BeanUtil.convert(vciFileVolumeDTO,vciFileVolumeDO); |
| | | BeanUtilForVCI.convert(vciFileVolumeDTO,vciFileVolumeDO); |
| | | vciFileVolumeDO.setCurrentVolume("0"); |
| | | int insert = vciFileVolumeMapper.insert(vciFileVolumeDO); |
| | | if(insert>0){ |
| | |
| | | VciBaseUtil.alertNotNull(vciFileVolumeDTO,"æ°æ®å¯¹è±¡",vciFileVolumeDTO.getOid(),"æä»ç®¡ç主é®"); |
| | | //å°DTO转æ¢ä¸ºDO |
| | | VciFileVolumeDO vciFileVolumeDO = selectByOid(vciFileVolumeDTO.getOid()); |
| | | BeanUtil.convert(vciFileVolumeDTO,vciFileVolumeDO); |
| | | BeanUtilForVCI.convert(vciFileVolumeDTO,vciFileVolumeDO); |
| | | int update = vciFileVolumeMapper.updateByPrimaryKey(vciFileVolumeDO); |
| | | if(update>0){ |
| | | return vciFileVolumeDO2VO(vciFileVolumeDO); |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/WFWorkflowNodeFavDaoImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.constant.FrameWorkBusLangCodeConstant; |
| | | import com.vci.model.WFWorkflowNodeFavDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.web.dao.WFWorkflowNodeFavDaoI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.dao.WFWorkflowNodeFavDaoI; |
| | | import com.vci.model.WFWorkflowNodeFavDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.web.service.OsLifeCycleServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | */ |
| | | @Autowired |
| | | private WebBoServiceI boService; |
| | | |
| | | /** |
| | | * çå½å¨æçæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsLifeCycleServiceI lifeCycleService; |
| | | |
| | | /** |
| | | * å¹³å°ç客æ·ç«¯ |
| | | */ |
| | | @Autowired |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | |
| | | /** |
| | | * 使ç¨ä¸»é®å é¤ |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/WFWorkflowNodeFavItemDaoImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.constant.FrameWorkBusLangCodeConstant; |
| | | import com.vci.model.WFWorkflowNodeFavItemDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.dao.WFWorkflowNodeFavItemDaoI; |
| | | import com.vci.model.WFWorkflowNodeFavItemDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.web.service.OsLifeCycleServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | */ |
| | | @Autowired |
| | | private WebBoServiceI boService; |
| | | |
| | | /** |
| | | * çå½å¨æçæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsLifeCycleServiceI lifeCycleService; |
| | | |
| | | /** |
| | | * å¹³å°ç客æ·ç«¯ |
| | | */ |
| | | @Autowired |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | /** |
| | | * 使ç¨ä¸»é®å é¤ |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/WebProcessDaoImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.common.utility.ObjectUtility; |
| | | import com.vci.constant.WFVariablesKeyConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | |
| | | import com.vci.corba.workflow.WorkflowServicePrx; |
| | | import com.vci.corba.workflow.data.*; |
| | | import com.vci.dto.ProcessTemplateVO; |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.model.ProcessInstance; |
| | | import com.vci.model.ProcessTask; |
| | | import com.vci.model.WFProcessClassifyDO; |
| | | import com.vci.model.WFProcessTemplateDO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.pagemodel.SessionInfo; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.constant.WFVariablesKeyConstant; |
| | | import com.vci.web.dao.WebProcessDaoI; |
| | | import com.vci.model.ProcessInstance; |
| | | import com.vci.model.ProcessTask; |
| | | import com.vci.model.WFProcessClassifyDO; |
| | | import com.vci.model.WFProcessTemplateDO; |
| | | import com.vci.web.service.OsLifeCycleServiceI; |
| | | import com.vci.web.service.SmUserQueryServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.service.WebLifeCycleServiceI; |
| | | import com.vci.web.service.WebLoServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | |
| | | import org.springframework.stereotype.Repository; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | */ |
| | | @Repository |
| | | public class WebProcessDaoImpl implements WebProcessDaoI { |
| | | |
| | | @Autowired |
| | | private WebBoServiceI boService; |
| | | |
| | | @Autowired |
| | | private WebLoServiceI loService; |
| | | |
| | | @Autowired |
| | | private OsLifeCycleServiceI lifeCycleService; |
| | | |
| | | /** |
| | | * ç¨æ·æ¥è¯¢æå¡ |
| | | */ |
| | | @Autowired |
| | | private SmUserQueryServiceI userQueryService; |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * æé æ¹æ³ï¼åå§åå¹³å°çæµç¨æå¡ |
| | | */ |
| | | |
| | | /** |
| | | * å¤è¯è¨çåç¼ |
| | | */ |
| | | private final String msgCodePrefix = "com.vci.web.flow."; |
| | | |
| | | @Resource |
| | | private WebBoServiceI boService; |
| | | |
| | | @Resource |
| | | private WebLoServiceI loService; |
| | | |
| | | @Resource |
| | | private WebLifeCycleServiceI lifeCycleService; |
| | | |
| | | /** |
| | | * ç¨æ·æ¥è¯¢æå¡ |
| | | */ |
| | | @Autowired |
| | | private SmUserQueryServiceI userQueryService; |
| | | |
| | | /** |
| | | * å¹³å°çæµç¨æå¡ |
| | |
| | | conditionMap.put("lcstatus", "Executing"); |
| | | btmType = workitemBtmType; |
| | | }else{ |
| | | throw new VciBaseException("msgCodePrefix",new String[]{doTaskType+""}); |
| | | throw new VciBaseException(msgCodePrefix+"doTaskTypeError",new String[]{doTaskType+""}); |
| | | } |
| | | List<String> causeList = new ArrayList<String>(); |
| | | causeList.add("*"); |
| | |
| | | List<ProcessTaskVO> taskVOList = new ArrayList<>(); |
| | | Optional.ofNullable(tasks).orElseGet(()->new ArrayList<>()).stream().forEach(task->{ |
| | | ProcessTaskVO taskVO = new ProcessTaskVO(); |
| | | BeanUtil.convert(task,taskVO); |
| | | BeanUtilForVCI.convert(task,taskVO); |
| | | taskVOList.add(taskVO); |
| | | }); |
| | | return taskVOList; |
| | |
| | | if(process == null || StringUtils.isBlank(process.getOid())){ |
| | | throw new VciBaseException(DATA_OID_NOT_EXIST); |
| | | } |
| | | BeanUtil.convert(process,processInstanceVO); |
| | | BeanUtilForVCI.convert(process,processInstanceVO); |
| | | return processInstanceVO; |
| | | } |
| | | |
| | |
| | | * @throws VciBaseException |
| | | */ |
| | | @Override |
| | | public void endProcess(String executionId) throws VciBaseException { |
| | | public void endProcess(String executionId) { |
| | | try { |
| | | DataGrid dataGrid = getDataByProcess(executionId,null); |
| | | //å
è·åä¸ä¸ |
| | |
| | | } |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | throw new VciBaseException("ç»ææµç¨å¤±è´¥ï¼", new Object[]{}, e); |
| | | } |
| | | } |
| | | |
| | | private void resetLcStatusForBusinessData(List<Map> bussinesDataList,String resetStatus) throws VciBaseException{ |
| | | private void resetLcStatusForBusinessData(List<Map> bussinesDataList,String resetStatus) throws Exception{ |
| | | if(bussinesDataList!=null && bussinesDataList.size() > 0){ |
| | | String btmType = ""; |
| | | String lctId = ""; |
| | |
| | | List<ProcessInstanceVO> instanceVOS = new ArrayList<>(); |
| | | Optional.ofNullable(processInstances).orElseGet(()->new ArrayList<>()).stream().forEach(instance->{ |
| | | ProcessInstanceVO instanceVO = new ProcessInstanceVO(); |
| | | BeanUtil.convert(instance,instanceVO); |
| | | BeanUtilForVCI.convert(instance,instanceVO); |
| | | instanceVOS.add(instanceVO); |
| | | }); |
| | | return instanceVOS; |
| | |
| | | public ProcessClassifyVO processClassifyDO2VO(WFProcessClassifyDO classifyDO){ |
| | | ProcessClassifyVO classifyVO = new ProcessClassifyVO(); |
| | | if(classifyVO!=null){ |
| | | BeanUtil.convert(classifyDO,classifyVO); |
| | | BeanUtilForVCI.convert(classifyDO,classifyVO); |
| | | } |
| | | return classifyVO; |
| | | } |
| | |
| | | public ProcessTemplateVO processTemplateDO2VO(WFProcessTemplateDO templateDO){ |
| | | ProcessTemplateVO templateVO = new ProcessTemplateVO(); |
| | | if(templateVO!=null){ |
| | | BeanUtil.convert(templateDO,templateVO); |
| | | BeanUtilForVCI.convert(templateDO,templateVO); |
| | | } |
| | | return templateVO; |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/initTask/VciWebInitTaskComponent.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.initTask; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.vci.client.mw.ClientContextVariable; |
| | | import com.vci.client.mw.LaunchModeEnum; |
| | | import com.vci.constant.FrameWorkBtmTypeConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.framework.FrameworkServicePrx; |
| | | import com.vci.corba.omd.data.AttributeValue; |
| | | import com.vci.constant.FrameWorkBtmTypeConstant; |
| | | import com.vci.frameworkcore.properties.VciFramworkCompatibilityProperties; |
| | | import com.vci.starter.web.annotation.config.VciConfigField; |
| | | import com.vci.starter.web.annotation.config.VciConfigModule; |
| | | import com.vci.starter.web.enumpck.SessionStorageTypeEnum; |
| | |
| | | import com.vci.starter.web.pagemodel.SessionInfo; |
| | | import com.vci.starter.web.properties.VciSessionProperties; |
| | | import com.vci.starter.web.util.ApplicationContextProvider; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.pagemodel.OsAttributeVO; |
| | | import com.vci.web.properties.VciFramworkCompatibilityProperties; |
| | | import com.vci.web.properties.WebProperties; |
| | | import com.vci.web.service.OsAttributeServiceI; |
| | | import com.vci.web.service.VciMdServiceI; |
| | | import com.vci.web.service.impl.UIEngineServiceImpl; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | import java.lang.reflect.Method; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | * æ¥å¿å¯¹è±¡ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * æ¯å¦å
¼å®¹ |
| | | */ |
| | | @Value("${user-table-compatibility:}") |
| | | private String compatibility; |
| | | |
| | | /** |
| | | * é
置对象 |
| | |
| | | private VciFramworkCompatibilityProperties compatibilityProperties; |
| | | |
| | | /** |
| | | * 屿§çæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsAttributeServiceI attributeService; |
| | | |
| | | /** |
| | | * markdownçæå¡ |
| | | */ |
| | | @Autowired |
| | | private VciMdServiceI mdService; |
| | | |
| | | |
| | | /** |
| | | * æ§è¡åå§å |
| | | * @param args å¯å¨çåæ° |
| | | */ |
| | |
| | | initSysadmin(); |
| | | initClearSession(); |
| | | initSetting(); |
| | | // secretService.getMinDataSecret(); |
| | | // secretService.getMinIpSecret(); |
| | | // secretService.getMinUserSecret(); |
| | | // initService.clearAllCache(); |
| | | // initService.initServerCache(); |
| | | mdService.scanAllMdFile(); |
| | | initDefaultAttribute(); |
| | | } |
| | | |
| | | /** |
| | | * åå§åé»è®¤ç屿§ |
| | | */ |
| | | private void initDefaultAttribute() { |
| | | try { |
| | | String attrJson = LocalFileUtil.readContentForFileInJar("DefaultAttribute.json"); |
| | | if (StringUtils.isBlank(attrJson)) { |
| | | logger.info("没æè¯»åå°classpath*:DefaultAttribute.jsonæä»¶çå
容"); |
| | | return; |
| | | } |
| | | List<OsAttributeVO> attributeVOS = JSONObject.parseArray(attrJson, OsAttributeVO.class); |
| | | if(!CollectionUtils.isEmpty(attributeVOS)){ |
| | | attributeService.setDefaultAttributeVOs(attributeVOS.stream().sorted(((o1, o2) -> o1.getId().compareTo(o2.getId()))).collect(Collectors.toList())); |
| | | attributeService.setDefaultAttributeVOMap(attributeVOS.stream().collect(Collectors.toMap(s->s.getId().toLowerCase(Locale.ROOT), t->t))); |
| | | } |
| | | logger.info("读åé»è®¤å±æ§å®æ"); |
| | | }catch (Throwable e){ |
| | | logger.error("读åclasspath*:DefaultAttribute.jsonçå
容并转æ¢çæ¶ååºéäº",e); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¸
é¤ä¼è¯çä¿¡æ¯å
容 |
| | |
| | | } |
| | | //åªæå½æ°æ®å¯çº§æ§å¶å¼å¯çæ
åµä¸ï¼æä¼æ§å¶æµç¨åèµ·æ¶çå¯çº§ |
| | | webProperties.setCheckSecretOnProcessStart(webProperties.isCheckClientSessionTimeout()&&webProperties.isSecretRight()); |
| | | if(webProperties.isDebug()){ |
| | | UIEngineServiceImpl.QUERY_BY_CACHE = false; |
| | | } |
| | | System.out.println("---读åæå¡ç«¯çé
ç½®æä»¶å®æ---"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public String getCompatibility() { |
| | | return compatibility; |
| | | } |
| | | |
| | | public void setCompatibility(String compatibility) { |
| | | this.compatibility = compatibility; |
| | | } |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/interceptor/MyMVCConfig.java ÐÞ¸Ä |
| | |
| | | |
| | | @Configuration |
| | | @EnableWebMvc |
| | | //@Order(100) |
| | | public class MyMVCConfig implements WebMvcConfigurer { |
| | | |
| | | @Override |
| | | public void addInterceptors(InterceptorRegistry registry) { |
| | | //é
ç½®ç½åå |
| | | //é
ç½®ç½åå |
| | | List<String> patterns = new ArrayList<>(); |
| | | patterns.add("/stmFunctionController/**"); |
| | | // patterns.add("/smFunctionController/**"); |
| | | registry.addInterceptor(new VciSecurityInterceptor()).excludePathPatterns(patterns); |
| | | } |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/BatchRedeployJar2Maven.java ÐÞ¸Ä |
| | |
| | | package com.vci; |
| | | package com.vci.web.maven; |
| | | |
| | | import java.io.*; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/properties/VciFramworkCompatibilityProperties.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.properties; |
| | | package com.vci.web.properties; |
| | | |
| | | import com.vci.starter.web.yml.YamlPropertySourceFactory; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/properties/VciSecurityManageProperties.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.properties; |
| | | package com.vci.web.properties; |
| | | |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/OrgDeptQueryServiceI.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility; |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.dto.OrgDepartmentDTO; |
| | | import com.vci.corba.common.PLException; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/OrgDutyQueryServiceI.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility; |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.pagemodel.OrgDutyVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsCodeRuleServiceI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.dto.OsCodeRuleDTO; |
| | | import com.vci.dto.OsCodeRuleProduceDTO; |
| | | import com.vci.model.OsCodeRuleDO; |
| | |
| | | import com.vci.pagemodel.OsCodeResultVO; |
| | | import com.vci.pagemodel.OsCodeRuleElementVO; |
| | | import com.vci.pagemodel.OsCodeRuleVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmRoleQueryServiceI.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility; |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.dto.SmRoleDTO; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmUserQueryServiceI.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility; |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.dto.SmUserDTO; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.dto.SmUserDTO; |
| | | import com.vci.pagemodel.SmUserVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | |
| | | * @return ç¨æ·çæ¾ç¤ºå¯¹è±¡ï¼å¦æç¨æ·ä¸åå¨åè¿ånullï¼ä¸ä¼æåºå¼å¸¸ |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ°æ®åºåå¨é®é¢çæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | SmUserVO getUserByUserId(String userId) throws VciBaseException; |
| | | SmUserVO getUserByUserId(String userId); |
| | | |
| | | /** |
| | | * æ¹éè·åç¨æ·çä¿¡æ¯ï¼æ ¹æ®ç¨æ·åï¼ |
| | |
| | | * @return ç¨æ·çæ¾ç¤ºå¯¹è±¡ï¼å¦æç¨æ·ä¸åå¨åè¿å空çå表ï¼ä¸ä¼æåºå¼å¸¸ |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ°æ®åºåå¨é®é¢çæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | List<SmUserVO> listUserByUserIds(Collection<String> userIdCollections) throws VciBaseException; |
| | | List<SmUserVO> listUserByUserIds(Collection<String> userIdCollections); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·ä¸»é®è·åç¨æ·çä¿¡æ¯ |
| | |
| | | * @return ç¨æ·çæ¾ç¤ºå¯¹è±¡ï¼å¦æç¨æ·ä¸åå¨åè¿ånullï¼ä¸ä¼æåºå¼å¸¸ |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ°æ®åºåå¨é®é¢çæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | SmUserVO getUserByUserOid(String userOid) throws VciBaseException; |
| | | SmUserVO getUserByUserOid(String userOid); |
| | | |
| | | /** |
| | | * æ¹éè·åç¨æ·çä¿¡æ¯ ï¼æ ¹æ®ç¨æ·ä¸»é®ï¼ |
| | |
| | | * @return ç¨æ·çæ¾ç¤ºå¯¹è±¡ï¼å¦æç¨æ·ä¸åå¨åè¿å空çå表ï¼ä¸ä¼æåºå¼å¸¸ |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ°æ®åºåå¨é®é¢çæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | List<SmUserVO> listUserByUserOids(Collection<String> userOidCollections) throws VciBaseException; |
| | | List<SmUserVO> listUserByUserOids(Collection<String> userOidCollections); |
| | | |
| | | /** |
| | | * ç¨æ·ç®¡ççé¢å页æ¥è¯¢ |
| | |
| | | * @param pageHelper å页忰 |
| | | * @return |
| | | */ |
| | | DataGrid<SmUserVO> getDataGridUsers(Map<String, String> conditionMap, PageHelper pageHelper) throws PLException; |
| | | DataGrid<SmUserVO> getDataGridUsers(Map<String, String> conditionMap, PageHelper pageHelper); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·åè·åç¨æ·çå§å |
| | |
| | | * @return é¨é¨ä¸»é®å对åºçç¨æ·æ¾ç¤ºå¯¹è±¡åè¡¨çæ å°ï¼keyé¨é¨ç主é®ï¼valueæ¯è¿ä¸ªé¨é¨ä¸çç¨æ· |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | Map<String,List<SmUserVO>> batchListUserByDeptOids(Collection<String> deptOidCollection) throws VciBaseException; |
| | | Map<String,List<SmUserVO>> batchListUserByDeptOids(Collection<String> deptOidCollection); |
| | | |
| | | /** |
| | | * ç»è®¡é¨é¨ä¸çç¨æ·ï¼å
å«åé¨é¨ä¸çç¨æ· |
| | |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | List<SmUserVO> countSmUserByDeptOid(String deptOid, Map<String, String> queryMap) throws VciBaseException; |
| | | List<SmUserVO> countSmUserByDeptOid(String deptOid, Map<String, String> queryMap); |
| | | |
| | | /** |
| | | * æ¥è¯¢æä¸ªé¨é¨ä¸çç¨æ·å¯¹è±¡ |
| | |
| | | * @return ç¨æ·çæ¾ç¤ºå¯¹è±¡å表 |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | List<SmUserVO> listUserByDeptOid(String deptOid, Map<String, String> queryMap) throws VciBaseException; |
| | | List<SmUserVO> listUserByDeptOid(String deptOid, Map<String, String> queryMap); |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¸å¨æä¸ªé¨é¨ä¸çç¨æ·å¯¹è±¡å表 |
| | |
| | | * @return ç¨æ·çæ¾ç¤ºå¯¹è±¡å表ï¼é»è®¤ä½¿ç¨ç¨æ·åååºæå |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | List<SmUserVO> listUserUnInDeptOid(String deptOid, Map<String, String> queryMap) throws VciBaseException; |
| | | List<SmUserVO> listUserUnInDeptOid(String deptOid, Map<String, String> queryMap); |
| | | |
| | | /** |
| | | * æ¥è¯¢æä¸ªè§è²ä¸çç¨æ·å¯¹è±¡å表 |
| | |
| | | * @return ç¨æ·çæ¾ç¤ºå¯¹è±¡å表 |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | List<SmUserVO> listUserByRoleOid(String roleOid, Map<String, String> queryMap) throws VciBaseException; |
| | | List<SmUserVO> listUserByRoleOid(String roleOid, Map<String, String> queryMap); |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¸å¨æä¸ªè§è²ä¸çç¨æ·å¯¹è±¡å表 |
| | |
| | | * @return ç¨æ·çæ¾ç¤ºå¯¹è±¡å表ï¼é»è®¤ä½¿ç¨ç¨æ·åååºæå |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | List<SmUserVO> listUserUnInRoleOid(String roleOid, Map<String, String> queryMap) throws VciBaseException; |
| | | List<SmUserVO> listUserUnInRoleOid(String roleOid, Map<String, String> queryMap); |
| | | |
| | | /** |
| | | * æ¹éæ ¹æ®è§è²ç主é®è·åç¨æ· |
| | |
| | | * @return è§è²ä¸»é®å对åºçç¨æ·æ¾ç¤ºå¯¹è±¡åè¡¨çæ å°ï¼keyè§è²ç主é®ï¼valueæ¯è¿ä¸ªè§è²ä¸çç¨æ· |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | Map<String,List<SmUserVO>> batchListUserByRoleOids(Collection<String> roleOidCollection) throws VciBaseException; |
| | | Map<String,List<SmUserVO>> batchListUserByRoleOids(Collection<String> roleOidCollection); |
| | | |
| | | /** |
| | | * åç
§çæçç¨æ· |
| | |
| | | * @return ç¨æ·çæ¾ç¤ºå¯¹è±¡ï¼é»è®¤ä½¿ç¨ç¨æ·åååºæå |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | DataGrid<SmUserVO> refGridUsers(Map<String, String> queryMap, PageHelper pageHelper) throws VciBaseException; |
| | | DataGrid<SmUserVO> refGridUsers(Map<String, String> queryMap, PageHelper pageHelper); |
| | | |
| | | /** |
| | | * åç
§ç¨æ·çæ å½¢æ¾ç¤º |
| | |
| | | * @return ç¨æ·çæ 形信æ¯ï¼éé¢ä¼å
å«ç¨æ·å¯¹è±¡éçææå±æ§ |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | List<Tree> refTreeUsers(TreeQueryObject treeQueryObject) throws VciBaseException; |
| | | List<Tree> refTreeUsers(TreeQueryObject treeQueryObject); |
| | | |
| | | /** |
| | | * 人åæééæ©æ |
| | |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | List<Tree> refPersonOrgTree(TreeQueryObject treeQueryObject) throws VciBaseException; |
| | | List<Tree> refPersonOrgTree(TreeQueryObject treeQueryObject); |
| | | |
| | | /** |
| | | * æ ¡éªå¯ç æ¯å¦ç¸åï¼å¨æ°å¹³å°ä¸åå¨çå¯ç æ¯ä¸¤æ¬¡md5 |
| | |
| | | * @param wrongCount å¯ç çéè¯¯æ¬¡æ° |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
åå¨å°æ°æ®åºä¸åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | void updateUserPwdWrongCount(String userOid, int wrongCount) throws VciBaseException; |
| | | void updateUserPwdWrongCount(String userOid, int wrongCount); |
| | | |
| | | /** |
| | | * æ´æ°ç¨æ·çæåç»å½æ¶é´ |
| | | * @param userOid ç¨æ·çä¸»é® |
| | | * @throws VciBaseException åæ°ä¸ºç©ºçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | void updateUserLoginTime(String userOid) throws VciBaseException; |
| | | void updateUserLoginTime(String userOid); |
| | | |
| | | /** |
| | | * æ·»å ç¨æ· |
| | |
| | | * @param roleType |
| | | * @return |
| | | */ |
| | | List<String> queryUserNameByRoleType(String roleType) throws PLException; |
| | | List<String> queryUserNameByRoleType(String roleType); |
| | | |
| | | /** |
| | | * 使ç¨å½åç¨æ·çç±»åæ¥è¯¢ç¨æ· |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.omd.atm.AttributeDef; |
| | | import com.vci.pagemodel.OsAttributeVO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description 屿§æå¡æ¥å£ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 14:25 |
| | | */ |
| | | public interface WebAttributeServiceI { |
| | | /** |
| | | * 使ç¨å±æ§ç¼å·è·å对象--æ¹é |
| | | * @param attrCodes 屿§çè±æåç§° |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsAttributeVO> listAttrByIds(Collection<String> attrCodes); |
| | | |
| | | /** |
| | | * 使ç¨å±æ§ç¼å·è·å对象--æ¹é |
| | | * @param attrCodes 屿§çè±æåç§° |
| | | * @param attributeVOMap 屿§å¯¹è±¡ |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsAttributeVO> listAttrByIds(Collection<String> attrCodes, Map<String, OsAttributeVO> attributeVOMap); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææç屿§ |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsAttributeVO> selectAllAttribute(); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææç屿§æ å° |
| | | * @return keyæ¯å±æ§çè±æåç§°å°åï¼valueæ¯å±æ§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | Map<String,OsAttributeVO> selectAllAttributeMap(); |
| | | |
| | | /** |
| | | * 屿§çæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param attribItems æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsAttributeVO> attributeDO2VOs(Collection<AttributeDef> attribItems); |
| | | |
| | | /** |
| | | * 屿§çæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param attribItem æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | OsAttributeVO attributeDO2VO(AttributeDef attribItem); |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/WebBoServiceI.java ÐÞ¸Ä |
| | |
| | | import com.vci.common.qt.object.QueryTemplate; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.corba.omd.data.LinkObject; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.btm.BizType; |
| | | import com.vci.pagemodel.OsAttributeVO; |
| | | import com.vci.pagemodel.OsBtmTypeAttributeVO; |
| | | import com.vci.pagemodel.OsBtmTypeVO; |
| | | import com.vci.pagemodel.OsUsedAttributeVO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description ä¸å¡ç±»åæå¡æ¥å£ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 11:32 |
| | | */ |
| | | public interface WebBtmServiceI { |
| | | |
| | | /** |
| | | * TODO:å°½éå«ç¨è¿ä¸ªæ¹æ³å¾æ
¢ï¼åäºä¸æ¬¡å
¨æ¥å转æ¥è½¬å» |
| | | * 使ç¨ç¼å·è·åä¸å¡ç±»å |
| | | * @param id ç¼å· |
| | | * @return ä¸å¡ç±»å |
| | | */ |
| | | OsBtmTypeVO getBtmById(String id) throws PLException; |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param btmItem æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | OsBtmTypeVO btmDO2VO(BizType btmItem, Map<String, OsAttributeVO> attributeVOMap); |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åçå¨åªä¸ªå±æ§ä¸ä½¿ç¨ |
| | | * @param btmName ä¸å¡ç±»å |
| | | * @return å¼ç¨çä¿¡æ¯ |
| | | */ |
| | | List<OsUsedAttributeVO> listBtmUsedInfo(String btmName); |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åçå¨åªä¸ªå±æ§ä¸ä½¿ç¨ |
| | | * |
| | | * @param btmId ä¸å¡ç±»å |
| | | * @param hasLink æ¯å¦å
å«é¾æ¥ç±»åä¸ |
| | | * @return å¼ç¨çä¿¡æ¯ |
| | | */ |
| | | List<OsUsedAttributeVO> listBtmUsedInfo(String btmId, boolean hasLink); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçä¸å¡ç±»åæ å° |
| | | * @return key æ¯ä¸å¡çè±æåç§°çå°å |
| | | */ |
| | | Map<String,OsBtmTypeVO> selectAllBtmMap(); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçä¸å¡ç±»åæ å° |
| | | * @return key æ¯ä¸å¡çè±æåç§°çå°å |
| | | */ |
| | | Map<String,OsBtmTypeVO> selectAllBtmMap(Map<String, OsAttributeVO> attributeVOMap); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçä¸å¡ç±»å |
| | | * @return ä¸å¡ç±»å对象 |
| | | */ |
| | | List<OsBtmTypeVO> selectAllBtm(); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçä¸å¡ç±»å |
| | | * @return ä¸å¡ç±»å对象 |
| | | */ |
| | | List<OsBtmTypeVO> selectAllBtm(Map<String, OsAttributeVO> attributeVOMap); |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param btmItems æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsBtmTypeVO> btmDO2VOs(Collection<BizType> btmItems, Map<String, OsAttributeVO> attributeVOMap); |
| | | |
| | | /** |
| | | * 使ç¨ç¼å·è·åä¸å¡ç±»å |
| | | * @param btmIds ç¼å· |
| | | * @return ä¸å¡ç±»å |
| | | */ |
| | | List<OsBtmTypeVO> listBtmByIds(Collection<String> btmIds); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸å¡ç±»åè·åå
å«ç屿§--ä¸å
å«åºç¡å±æ§ |
| | | * @param btmId ä¸å¡ç±»åçç¼å· |
| | | * @return 屿§çå
容 |
| | | */ |
| | | List<OsBtmTypeAttributeVO> listAttributeByBtmId(String btmId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.omd.etm.EnumType; |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.pagemodel.OsEnumItemVO; |
| | | import com.vci.pagemodel.OsEnumVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description æä¸¾æå¡æ¥å£ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 11:18 |
| | | */ |
| | | public interface WebEnumServiceI { |
| | | |
| | | /** |
| | | * æ ¹æ®æä¸¾çkeyè·åæä¸¾ç对象 |
| | | * @param enumCode æä¸¾çç¼å· |
| | | * @return æä¸¾å
å«çå¼ |
| | | * @throws VciBaseException è·åæä¸¾åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | List<KeyValue> getEnum(String enumCode) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ ¹æ®æä¸¾çå¼ï¼è·å对åºçæ¾ç¤ºææ¬ |
| | | * @param enumCode æä¸¾çç¼å· |
| | | * @param enumKey æä¸¾çå¼ |
| | | * @return æä¸¾çææ¬ |
| | | * @throws VciBaseException è·åæä¸¾åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | String getValue(String enumCode, String enumKey); |
| | | |
| | | /** |
| | | * æä¸¾çæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param enumType æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | OsEnumVO enumDO2VO(EnumType enumType); |
| | | |
| | | /** |
| | | * æä¸¾æç»è½¬æ¢ä¸ºKV |
| | | * @param enumItemVOS æä¸¾æç»æ¾ç¤ºå¯¹è±¡ |
| | | * @return KV |
| | | */ |
| | | List<KeyValue> enumItem2KV(Collection<OsEnumItemVO> enumItemVOS); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçæä¸¾æ å° |
| | | * @return keyæ¯æä¸¾çè±æåç§° |
| | | */ |
| | | Map<String,OsEnumVO> selectAllEnumMap(); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçæä¸¾ |
| | | * @return æä¸¾çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsEnumVO> selectAllEnum(); |
| | | |
| | | /** |
| | | * æä¸¾çæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param enumItems æä¸¾ç对象 |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsEnumVO> enumDO2VOs(Collection<EnumType> enumItems); |
| | | |
| | | /** |
| | | * è·åæä¸¾çæ å° |
| | | * @param enumCode æä¸¾çç¼å· |
| | | * @return æä¸¾çå¼ |
| | | * @throws VciBaseException è·åæä¸¾åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | Map<String,String> getEnumValueMap(String enumCode); |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/WebHomeTaskServiceI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service; |
| | | |
| | | |
| | | import com.vci.dto.WebHomeTaskActionDTO; |
| | | import com.vci.pagemodel.WebHomeTaskActionVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.dto.WebHomeTaskActionDTO; |
| | | import com.vci.pagemodel.WebHomeTaskActionVO; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.corba.omd.lcm.LifeCycle; |
| | | import com.vci.pagemodel.OsLifeCycleLineVO; |
| | | import com.vci.pagemodel.OsLifeCycleVO; |
| | | import com.vci.pagemodel.OsStatusVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description çå½å¨ææå¡æ¥å£ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 10:38 |
| | | */ |
| | | public interface WebLifeCycleServiceI { |
| | | |
| | | /** |
| | | * è·è¿çå½å¨æç¶æï¼æ³¨æè°ç¨æ¤æ¹æ³å°±ä¼è¢«æä¹
åï¼ä¸åäºå¡æ§å¶ |
| | | * @param bo ä¸å¡ç±»åçæ°æ®å¯¹è±¡ |
| | | * @param targetStatus ç®æ ççå½å¨æç¶æï¼ä¸åºåå¤§å° |
| | | * @throws VciBaseException å¦æç®æ çå½å¨æåå½åçå½å¨æç¶ææ²¡æè¿æ¥çº¿æ¶æåºå¼å¸¸ |
| | | */ |
| | | void transStatus(BusinessObject bo, String targetStatus); |
| | | |
| | | /** |
| | | * æ¹éè·è¿çå½å¨æç¶æï¼è¿äºæ°æ®ä¸çå½åç¶æå¿
须齿¯ä¸æ ·ï¼æè
æ¯å½åç¶æé½å¯ä»¥è¿æ¥å°ç®æ ç¶æ |
| | | * @param bos ä¸å¡ç±»åå¯¹è±¡æ°æ® |
| | | * @param targetStatus ç®æ ç¶æï¼ä¸åºå大å°å |
| | | * @throws VciBaseException 转æ¢çå½å¨æåºéçæ¶åæåºå¼å¸¸ |
| | | */ |
| | | void transStatus(BusinessObject[] bos, String targetStatus); |
| | | |
| | | /** |
| | | * æ¹éè·è¿çå½å¨æç¶æï¼è¿äºæ°æ®ä¸çå½åç¶æå¿
须齿¯ä¸æ ·ï¼æè
æ¯å½åç¶æé½å¯ä»¥è¿æ¥å°ç®æ ç¶æ |
| | | * @param cboList ä¸å¡ç±»åå¯¹è±¡æ°æ® |
| | | * @param targetStatus ç®æ ç¶æï¼ä¸åºå大å°å |
| | | * @throws VciBaseException 转æ¢çå½å¨æåºéçæ¶åæåºå¼å¸¸ |
| | | */ |
| | | void transCboStatus(List<BusinessObject> cboList, String targetStatus); |
| | | |
| | | /** |
| | | * è·åè¿æ¥çº¿ |
| | | * @param lcid çå½å¨æçç¼å· |
| | | * @param currentStatus å½åçç¶æ |
| | | * @param targetStatus ç®æ çç¶æ |
| | | * @return è¿æ¥çº¿ |
| | | * @throws VciBaseException 读ååºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | OsLifeCycleLineVO getTransVO(String lcid, String currentStatus, String targetStatus); |
| | | |
| | | /** |
| | | * è·è¿ä¸å¡ç±»åççå½å¨æç¶æ |
| | | * @param obj ä¸å¡ç±»åæ°æ®å¯¹è±¡ |
| | | * @param lineVO è·è¿è·¯ç± |
| | | * @throws VciBaseException è·è¿åºéçæ¯ä¼æåºå¼å¸¸ |
| | | */ |
| | | void doTransVO(BusinessObject obj, OsLifeCycleLineVO lineVO); |
| | | |
| | | /** |
| | | * æ¹éæ§è¡è·è¿æä½ |
| | | * @param bos ä¸å¡ç±»åæ°æ® |
| | | * @param vos è·è¿å¯¹è±¡ |
| | | * @throws VciBaseException è·è¿åºéçæ¯ä¼æåºå¼å¸¸ |
| | | */ |
| | | void batchTransVo(BusinessObject[] bos, OsLifeCycleLineVO[] vos); |
| | | |
| | | /** |
| | | * æ¹éæ§è¡è·è¿æä½ï¼è¦æ±å¿
é¡»æ¯åä¸ä¸ªä¸å¡ç±»åä¸ç |
| | | * @param bos ä¸å¡ç±»åæ°æ®å¯¹è±¡ |
| | | * @param lineVOs è·è¿å¯¹è±¡ |
| | | * @param releaseStatus åå¸ç¶æï¼å¦æç®æ ç¶ææ¯åå¸ç¶ææ¶ä¼ éè¿ä¸ªå¼ |
| | | * @throws VciBaseException è·è¿åºéçæ¯ä¼æåºå¼å¸¸ |
| | | */ |
| | | void batchTransVo(BusinessObject[] bos, OsLifeCycleLineVO[] lineVOs, String[] releaseStatus); |
| | | |
| | | /** |
| | | * éè¿ç¼å·è·åçå½å¨æç¶æå¯¹è±¡ï¼ |
| | | * @param lctId çå½å¨æç¼å· |
| | | * @return çå½å¨æçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | OsLifeCycleVO getLifeCycleById(String lctId); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçå½å¨æç¶æçæ å° |
| | | * @return key æ¯çå½å¨æçç¼å·çè±æå°å |
| | | * @throws VciBaseException æ¥è¯¢çæ¶ååºé伿åºå¼å¸¸ |
| | | */ |
| | | Map<String,OsLifeCycleVO> selectAllLifeCycleMap(); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçå½å¨æç¶æ |
| | | * @return çå½å¨æç¶æç对象 |
| | | * @throws VciBaseException æ¥è¯¢çæ¶ååºé伿åºå¼å¸¸ |
| | | */ |
| | | List<OsLifeCycleVO> selectAllLifeCycle(); |
| | | |
| | | /** |
| | | * çå½å¨æçæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param lifeCycles æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsLifeCycleVO> lifeCycleDO2VOs(Collection<LifeCycle> lifeCycles); |
| | | |
| | | /** |
| | | * çå½å¨æçæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param lifeCyle æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | OsLifeCycleVO lifeCycleDO2VO(LifeCycle lifeCyle); |
| | | |
| | | /** |
| | | * 使ç¨çå½å¨æçç¼å·è·åå
å«çç¶ææ¾ç¤ºå¯¹è±¡ |
| | | * @param lifeCycleId çå½å¨æçç¼å· |
| | | * @return ç¶æçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsStatusVO> listStatusById(String lifeCycleId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.pagemodel.OsLinkTypeVO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description 龿¥ç±»åæå¡æ¥å£ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 11:41 |
| | | */ |
| | | public interface WebLinkTypeServiceI { |
| | | |
| | | /** |
| | | * æ¥è¯¢ææç龿¥ç±»å |
| | | * @return 龿¥ç±»å对象 |
| | | */ |
| | | List<OsLinkTypeVO> selectAllLink(); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææç龿¥ç±»åæ å° |
| | | * @return key æ¯é¾æ¥çè±æåç§°çå°å |
| | | */ |
| | | Map<String,OsLinkTypeVO> selectAllLinkMap(); |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param linkTypes æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsLinkTypeVO> linkTypeDO2VOs(Collection<LinkType> linkTypes); |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param linkType æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | OsLinkTypeVO linkTypeDO2VO(LinkType linkType); |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/WebLoServiceI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.omd.data.AttributeValue; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.corba.omd.data.LinkObject; |
| | | import com.vci.corba.query.data.BOAndLO; |
| | | import com.vci.query.UILinkTypeDataQuery; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.web.query.UILinkTypeDataQuery; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | * @throws VciBaseException |
| | | */ |
| | | Map<String,BusinessObject> queryLinkedCbo(List los, boolean isDirection) throws VciBaseException; |
| | | |
| | | // /** |
| | | // *æ¥è¯¢é¾æ¥ç±»åæç«¯çä¸å¡ç±»å |
| | | // * @param clo 龿¥ç±»å对象 |
| | | // * @param isDirection æ¯å¦åå |
| | | // * @return |
| | | // * @throws VciBaseException |
| | | // */ |
| | | // Map<String,BusinessObject> queryLinkedCbo(LinkObject[] clo, boolean isDirection) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ¥è¯¢é¾æ¥ç±»åæç«¯çä¸å¡ç±»å |
| | |
| | | * @param attributeName 屿§åç§° |
| | | * @param attributeValue 屿§çå¼ |
| | | */ |
| | | public default void setAttribute(LinkObject clo,String attributeName,String attributeValue){ |
| | | com.vci.corba.omd.data.AttributeValue[] attrValues =clo.newAttrValList; |
| | | ArrayList<com.vci.corba.omd.data.AttributeValue> attrValList = new ArrayList(); |
| | | com.vci.corba.omd.data.AttributeValue attrVal; |
| | | int i; |
| | | if (attrValues != null && attrValues.length > 0) { |
| | | com.vci.corba.omd.data.AttributeValue[] var9 = attrValues; |
| | | i = attrValues.length; |
| | | |
| | | for(int var7 = 0; var7 < i; ++var7) { |
| | | attrVal = var9[var7]; |
| | | attrValList.add(attrVal); |
| | | } |
| | | } |
| | | |
| | | attrVal = null; |
| | | boolean isExist = false; |
| | | |
| | | for(i = 0; i < attrValList.size(); ++i) { |
| | | attrVal = (com.vci.corba.omd.data.AttributeValue)attrValList.get(i); |
| | | if (attrVal.attrName.toUpperCase().equals(attributeName.toUpperCase())) { |
| | | attrVal.attrVal = attributeValue; |
| | | isExist = true; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (!isExist) { |
| | | attrVal = new com.vci.corba.omd.data.AttributeValue(); |
| | | attrVal.attrName = attributeName.toUpperCase(); |
| | | attrVal.attrVal = attributeValue; |
| | | attrValList.add(attrVal); |
| | | } |
| | | |
| | | clo.newAttrValList = attrValList.toArray(new AttributeValue[attrValList.size()]); |
| | | }; |
| | | void setAttribute(LinkObject clo,String attributeName,String attributeValue); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.pagemodel.SmPasswordStrategyVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description å¯ç çç¥æ¥è¯¢ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 16:16 |
| | | */ |
| | | public interface WebPwdStrategyQueryServiceI { |
| | | |
| | | /** |
| | | * è·åé»è®¤å¯ç çç¥ |
| | | * @return |
| | | */ |
| | | SmPasswordStrategyVO getPasswordStrategyVOByDefault(); |
| | | |
| | | /** |
| | | * æ ¹æ®åæ¡ç¨æ·ç主é®ï¼è·åç¨æ·çå¯ç å®å
¨çç¥ |
| | | * @param userOid ç¨æ·çä¸»é® |
| | | * @return å¯ç å®å
¨çç¥çæ¾ç¤ºå¯¹è±¡ï¼å¦æä¸åå¨åä¼è¿åNull |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ°æ®åºæ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | SmPasswordStrategyVO getPasswordStrategyVOByUserOid(String userOid) throws PLException; |
| | | |
| | | /** |
| | | * æ¹éæ ¹æ®ç¨æ·ç䏻鮿¥è·åå¯ç çç¥ |
| | | * @param userOidCollection ç¨æ·ä¸»é®éå |
| | | * @return å¯ç çç¥çæ¾ç¤ºå¯¹è±¡ï¼keyæ¯ç¨æ·ä¸»é®,valueæ¯è¿ä¸ªç¨æ·å
³èçå¯ç çç¥ |
| | | */ |
| | | Map<String, SmPasswordStrategyVO> batchSmPwdStrategyByUserOids(Collection<String> userOidCollection); |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»é®æ¥è¯¢å¯ç çç¥map对象 |
| | | * @param oidList |
| | | * @return key为å¯ç çç¥ä¸»é® value为å¯ç çç¥ |
| | | */ |
| | | Map<String,SmPasswordStrategyVO> mapPasswordStrategyVOMapByOid(Collection<String> oidList); |
| | | |
| | | /** |
| | | * 使ç¨ä¸»é®è·åå¯ç çç¥ |
| | | * @param oid ä¸»é® |
| | | * @return å¯ç çç¥æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | SmPasswordStrategyVO getPasswordStrategyVOByOid(String oid); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.omd.vrm.VersionRule; |
| | | import com.vci.pagemodel.OsRevisionRuleVO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description çæ¬è§åæå¡æ¥å£ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 14:19 |
| | | */ |
| | | public interface WebRevisionRuleServiceI { |
| | | |
| | | /** |
| | | * æ¥è¯¢ææççæ¬è§å |
| | | * @return çæ¬å¯¹è±¡ |
| | | */ |
| | | List<OsRevisionRuleVO> selectAllRevision(); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææççæ¬è§åæ å° |
| | | * @return key æ¯çæ¬çè±æåç§° |
| | | */ |
| | | Map<String,OsRevisionRuleVO> selectAllRevisionMap(); |
| | | |
| | | /** |
| | | * 使ç¨ç¼å·è·åè§åçå¼ |
| | | * @param id ç¼å· |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | OsRevisionRuleVO getRevisionRuleById(String id); |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param versionRules æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsRevisionRuleVO> revisionRuleDO2VOs(Collection<VersionRule> versionRules); |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param versionRule æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | OsRevisionRuleVO revisionRuleDO2VO(VersionRule versionRule); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.omd.stm.StatePool; |
| | | import com.vci.pagemodel.OsStatusVO; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Description ç¶ææ± æå¡æ¥å£ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 10:51 |
| | | */ |
| | | public interface WebStatusServiceI { |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçç¶æ |
| | | * @return ç¶æçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsStatusVO> selectAllStatus(); |
| | | |
| | | /** |
| | | * æ¥è¯¢å
¨é¨çç¶ææ å° |
| | | * @return keyæ¯ç¶æçè±æåç§° |
| | | */ |
| | | Map<String, OsStatusVO> selectAllStatusMap(); |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param statePool ç¶ææ± çæ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | OsStatusVO statusDO2VO(StatePool statePool); |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param statePools ç¶ææ± çæ°æ®å¯¹è±¡ éå |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsStatusVO> statusDO2VOs(Collection<StatePool> statePools); |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/OrgDeptQueryServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility.impl; |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.dto.OrgDepartmentDTO; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.corba.framework.data.DeptInfo; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.frameworkcore.compatibility.OrgDeptQueryServiceI; |
| | | import com.vci.frameworkcore.lcstatuspck.FrameworkDataLCStatus; |
| | | import com.vci.web.service.OrgDeptQueryServiceI; |
| | | import com.vci.lcstatuspck.FrameworkDataLCStatus; |
| | | import com.vci.model.OrgDeptForPlatform1; |
| | | import com.vci.po.OrgDeptPO; |
| | | import com.vci.pagemodel.OrgDepartmentVO; |
| | |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.io.File; |
| | |
| | | orgDepartmentVOList = deptDO2VOs(boService.selectByQueryWrapper(queryWrapperForDO,OrgDeptForPlatform1.class)); |
| | | } |
| | | TreeWrapperOptions treeWrapperOptions = new TreeWrapperOptions(); |
| | | BeanUtil.convert(treeQueryObject,treeWrapperOptions); |
| | | BeanUtilForVCI.convert(treeQueryObject,treeWrapperOptions); |
| | | treeWrapperOptions.setParentFieldName("pkFatherDepartment"); |
| | | List<Tree> trees = revisionModelUtil.doList2Trees(orgDepartmentVOList, treeWrapperOptions, dept -> { |
| | | return dept.getId() + " " + dept.getName() + (FrameworkDataLCStatus.DISABLED.getValue().equals(dept.getLcStatus()) ? "ãåç¨ã" : ""); |
| | |
| | | throw new VciBaseException("åä¸ç¶èç¹ä¸è¯¥é¨é¨åç§°æç¼å·å·²ç»åå¨,请修æ¹!"); |
| | | } |
| | | OrgDepartmentDTO departmentDTO = new OrgDepartmentDTO(); |
| | | BeanUtil.convert(dbDepartmentVO,departmentDTO); |
| | | BeanUtilForVCI.convert(dbDepartmentVO,departmentDTO); |
| | | departmentDTO.setCode(orgDepartmentDTO.getCode()); |
| | | departmentDTO.setId(orgDepartmentDTO.getId()); |
| | | departmentDTO.setSpecialties(orgDepartmentDTO.getSpecialties()); |
| | |
| | | indexMap.put(po.getName(),po.getRowIndex()); |
| | | //æ ¡éªæ°æ®å°±è¯¥ç»è£
æDTOæ°æ®å¯¹è±¡äº |
| | | OrgDepartmentDTO dto = new OrgDepartmentDTO(); |
| | | BeanUtil.convert(po,dto); |
| | | BeanUtilForVCI.convert(po,dto); |
| | | dto.setOid(po.getId()); |
| | | dto.setId(po.getNum()); |
| | | dto.setDescription(po.getDesc()); |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/OrgDutyQueryServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility.impl; |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.frameworkcore.compatibility.OrgDutyQueryServiceI; |
| | | import com.vci.web.service.OrgDutyQueryServiceI; |
| | | import com.vci.pagemodel.OrgDutyVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsCodeGenSchemaServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.vci.bo.OsCodeGenAttributeBO; |
| | | import com.vci.bo.OsCodeGenButtonBO; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.dto.OsCodeGenSchemaDTO; |
| | | import com.vci.enumpck.OsCodeGenJsPanelTypeEnum; |
| | | import com.vci.model.OsCodeGenSchemaDO; |
| | | import com.vci.pagemodel.OsBtmTypeAttributeVO; |
| | | import com.vci.pagemodel.OsBtmTypeVO; |
| | | import com.vci.pagemodel.OsCodeGenSchemaVO; |
| | | import com.vci.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.starter.web.annotation.Column; |
| | | import com.vci.starter.web.constant.FrameWorkLcStatusConstant; |
| | |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.bo.OsCodeGenAttributeBO; |
| | | import com.vci.bo.OsCodeGenButtonBO; |
| | | import com.vci.web.dao.OsCodeGenSchemaDaoI; |
| | | import com.vci.dto.OsCodeGenSchemaDTO; |
| | | import com.vci.web.enumpck.OsCodeGenJsPanelTypeEnum; |
| | | import com.vci.model.OsCodeGenSchemaDO; |
| | | import com.vci.pagemodel.OsBtmTypeAttributeVO; |
| | | import com.vci.pagemodel.OsBtmTypeVO; |
| | | import com.vci.pagemodel.OsCodeGenSchemaVO; |
| | | import com.vci.web.service.OsAttributeServiceI; |
| | | import com.vci.web.service.OsBtmServiceI; |
| | | import com.vci.web.service.OsCodeGenSchemaServiceI; |
| | | import com.vci.web.service.WebBtmIOServiceI; |
| | | import com.vci.web.service.WebBtmServiceI; |
| | | import com.vci.web.util.WebUtil; |
| | | import com.vci.web.util.file.VciZipUtil; |
| | | import org.apache.commons.io.IOUtils; |
| | |
| | | private OsCodeGenSchemaDaoI codeGenSchemaDOMapper; |
| | | |
| | | /** |
| | | * ä¸å¡ç±»å |
| | | */ |
| | | @Autowired |
| | | private WebBtmIOServiceI btmIOService; |
| | | |
| | | /** |
| | | * ä¸å¡ç±»åç¸å
³çæä½ |
| | | */ |
| | | @Autowired |
| | | private OsBtmServiceI btmService; |
| | | |
| | | /** |
| | | * 屿§çæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsAttributeServiceI attrServiceI; |
| | | @Resource |
| | | private WebBtmServiceI btmService; |
| | | |
| | | /** |
| | | * 代ç çæçæä»¶å¤¹ |
| | |
| | | public OsCodeGenSchemaVO codeGenSchemaDO2VO(OsCodeGenSchemaDO schemaDO) { |
| | | OsCodeGenSchemaVO schemaVO = new OsCodeGenSchemaVO(); |
| | | if(schemaDO!=null){ |
| | | BeanUtil.convert(schemaDO,schemaVO); |
| | | BeanUtilForVCI.convert(schemaDO,schemaVO); |
| | | schemaVO.setWestLayoutPanelTypeText(OsCodeGenJsPanelTypeEnum.getTextByValue(schemaVO.getWestLayoutPanelType())); |
| | | schemaVO.setCenterLayoutPanelTypeText(OsCodeGenJsPanelTypeEnum.getTextByValue(schemaVO.getCenterLayoutPanelType())); |
| | | schemaVO.setSouthLayoutPanelTypeText(OsCodeGenJsPanelTypeEnum.getTextByValue(schemaVO.getSouthLayoutPanelType())); |
| | |
| | | public OsCodeGenSchemaVO addSchema(OsCodeGenSchemaDTO codeGenSchemaDTO) throws VciBaseException { |
| | | VciBaseUtil.alertNotNull(codeGenSchemaDTO,"è¦æ·»å çæ¹æ¡"); |
| | | OsCodeGenSchemaDO codeGenSchemaDO = new OsCodeGenSchemaDO(); |
| | | BeanUtil.convert(codeGenSchemaDTO,codeGenSchemaDO); |
| | | BeanUtilForVCI.convert(codeGenSchemaDTO,codeGenSchemaDO); |
| | | checkJsonFormate(codeGenSchemaDO); |
| | | //å®ç°ç±»æ¯åç«¯ç´æ¥å¡«å |
| | | codeGenSchemaDOMapper.insert(codeGenSchemaDO); |
| | |
| | | } |
| | | OsBtmTypeAttributeVO idAttr = new OsBtmTypeAttributeVO(); |
| | | if(defaultAttrMap.containsKey("id")){ |
| | | BeanUtil.convert(defaultAttrMap.get("id"),idAttr); |
| | | BeanUtilForVCI.convert(defaultAttrMap.get("id"),idAttr); |
| | | idAttr.setId("id"); |
| | | if(StringUtils.isBlank(idAttr.getName())){ |
| | | idAttr.setName("ç¼å·"); |
| | |
| | | |
| | | OsBtmTypeAttributeVO nameAttr = new OsBtmTypeAttributeVO(); |
| | | if(defaultAttrMap.containsKey("name")){ |
| | | BeanUtil.convert(defaultAttrMap.get("name"),nameAttr); |
| | | BeanUtilForVCI.convert(defaultAttrMap.get("name"),nameAttr); |
| | | nameAttr.setId("name"); |
| | | if(StringUtils.isBlank(nameAttr.getName())){ |
| | | nameAttr.setName("åç§°"); |
| | |
| | | |
| | | OsBtmTypeAttributeVO descAttr = new OsBtmTypeAttributeVO(); |
| | | if(defaultAttrMap.containsKey("desc")){ |
| | | BeanUtil.convert(defaultAttrMap.get("desc"),descAttr); |
| | | BeanUtilForVCI.convert(defaultAttrMap.get("desc"),descAttr); |
| | | descAttr.setId("description"); |
| | | if(StringUtils.isBlank(descAttr.getName())){ |
| | | descAttr.setName("æè¿°"); |
| | |
| | | if(!CollectionUtils.isEmpty(attributeVOS)){ |
| | | attributeVOS.stream().forEach(attr->{ |
| | | OsCodeGenAttributeBO attributeBO = new OsCodeGenAttributeBO(); |
| | | BeanUtil.convert(attr, attributeBO); |
| | | BeanUtilForVCI.convert(attr, attributeBO); |
| | | attributeBO.setIdUpper(attr.getId().toUpperCase()); |
| | | if(VciQueryWrapperForDO.LC_STATUS_FIELD.equalsIgnoreCase(attributeBO.getId())){ |
| | | attributeBO.setName("ç¶æ"); |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsCodeRuleServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.constant.FrameWorkDefaultValueConstant; |
| | | import com.vci.constant.FrameWorkDefaultValueConstant; |
| | | import com.vci.frameworkcore.lcstatuspck.FrameworkDataLCStatus; |
| | | import com.vci.model.*; |
| | | import com.vci.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.bo.OsCodeSerialBuildBO; |
| | | import com.vci.web.dao.*; |
| | | import com.vci.constant.FrameWorkDefaultValueConstant; |
| | | import com.vci.dto.OsCodeEnumDTO; |
| | | import com.vci.dto.OsCodeRuleDTO; |
| | | import com.vci.dto.OsCodeRuleElementDTO; |
| | | import com.vci.dto.OsCodeRuleProduceDTO; |
| | | import com.vci.web.enumpck.OsCodeDateValueTypeEnum; |
| | | import com.vci.web.enumpck.OsCodeElementTypeEnum; |
| | | import com.vci.web.enumpck.OsCodeFillTypeEnum; |
| | | import com.vci.web.enumpck.OsCodeProductTypeEnum; |
| | | import com.vci.enumpck.OsCodeDateValueTypeEnum; |
| | | import com.vci.enumpck.OsCodeElementTypeEnum; |
| | | import com.vci.enumpck.OsCodeFillTypeEnum; |
| | | import com.vci.enumpck.OsCodeProductTypeEnum; |
| | | import com.vci.lcstatuspck.FrameworkDataLCStatus; |
| | | import com.vci.model.*; |
| | | import com.vci.pagemodel.OsCodeEnumVO; |
| | | import com.vci.pagemodel.OsCodeResultVO; |
| | | import com.vci.pagemodel.OsCodeRuleElementVO; |
| | | import com.vci.pagemodel.OsCodeRuleVO; |
| | | import com.vci.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.web.dao.*; |
| | | import com.vci.web.service.OsCodeRuleServiceI; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | Map<String,List<OsCodeEnumVO>> enumVOMap = new HashMap<String, List<OsCodeEnumVO>>(); |
| | | for(OsCodeEnumDO enumDO : existEnumDOs){ |
| | | OsCodeEnumVO enumVO = new OsCodeEnumVO(); |
| | | BeanUtil.convert(enumDO,enumVO); |
| | | BeanUtilForVCI.convert(enumDO,enumVO); |
| | | String pkCodeRuleElement = enumVO.getPkCodeRuleElement(); |
| | | List<OsCodeEnumVO> enumVOS = enumVOMap.containsKey(pkCodeRuleElement) ? enumVOMap.get(pkCodeRuleElement) : new ArrayList<OsCodeEnumVO>(); |
| | | enumVOS.add(enumVO); |
| | |
| | | public OsCodeRuleVO codeRuleDO2VO(OsCodeRuleDO ruleDO) { |
| | | OsCodeRuleVO ruleVO = new OsCodeRuleVO(); |
| | | if (ruleDO != null) { |
| | | BeanUtil.convert(ruleDO, ruleVO); |
| | | BeanUtilForVCI.convert(ruleDO, ruleVO); |
| | | ruleVO.setLcStatusText(FrameworkDataLCStatus.getTextByValue(ruleVO.getLcStatus())); |
| | | ruleVO.setCodeProductTypeText(OsCodeProductTypeEnum.getTextByValue(ruleVO.getCodeProductType())); |
| | | } |
| | |
| | | public OsCodeRuleElementVO codeRuleElementDO2VO(OsCodeRuleElementDO elementDO) { |
| | | OsCodeRuleElementVO elementVO = new OsCodeRuleElementVO(); |
| | | if (elementDO != null) { |
| | | BeanUtil.convert(elementDO, elementVO); |
| | | BeanUtilForVCI.convert(elementDO, elementVO); |
| | | elementVO.setCodeElementTypeText(OsCodeElementTypeEnum.getTextByValue(elementVO.getCodeElementType())); |
| | | elementVO.setCodeFillTypeText(OsCodeFillTypeEnum.getTextByValue(elementVO.getCodeFillType())); |
| | | elementVO.setCodeDateValueTypeText(OsCodeDateValueTypeEnum.getTextByValue(elementVO.getCodeDateValueType())); |
| | |
| | | public OsCodeRuleVO addRule(OsCodeRuleDTO ruleDTO) { |
| | | VciBaseUtil.alertNotNull(ruleDTO, "æ°æ®ä¼ è¾å¯¹è±¡", ruleDTO.getElements(), "è§åçå
ç´ "); |
| | | OsCodeRuleDO ruleDO = new OsCodeRuleDO(); |
| | | BeanUtil.convert(ruleDTO, ruleDO); |
| | | BeanUtilForVCI.convert(ruleDTO, ruleDO); |
| | | ruleDO.setOid(VciBaseUtil.getPk()); |
| | | List<OsCodeRuleElementDO> elementDOS = new ArrayList<OsCodeRuleElementDO>(); |
| | | List<OsCodeEnumDO> enumMapDOs = new ArrayList<OsCodeEnumDO>(); |
| | |
| | | if (elementDTOS != null) { |
| | | for (OsCodeRuleElementDTO elementDTO : elementDTOS) { |
| | | OsCodeRuleElementDO elementDO = new OsCodeRuleElementDO(); |
| | | BeanUtil.convert(elementDTO, elementDO); |
| | | BeanUtilForVCI.convert(elementDTO, elementDO); |
| | | elementDO.setPkCodeRule(pkRule); |
| | | elementDO.setOid(VciBaseUtil.getPk()); |
| | | //éè¦æ¯ä¸ªç±»ååå¤ç |
| | |
| | | for(OsCodeEnumDTO enumDTO : enumMaps){ |
| | | VciBaseUtil.alertNotNull(enumDTO.getEnumItemKey(),"æä¸¾æ å°ä¸æä¸¾çå¼",enumDTO.getCodeMapValue(),"æä¸¾æ å°çæä¸¾å¯¹åºçæ å°å¼"); |
| | | OsCodeEnumDO enumDO = new OsCodeEnumDO(); |
| | | BeanUtil.convert(enumDTO,enumDO); |
| | | BeanUtilForVCI.convert(enumDTO,enumDO); |
| | | enumDO.setPkCodeRuleElement(elementDO.getOid()); |
| | | enumMapDOs.add(enumDO); |
| | | } |
| | |
| | | public OsCodeRuleVO editRule(OsCodeRuleDTO ruleDTO) { |
| | | VciBaseUtil.alertNotNull(ruleDTO, "æ°æ®ä¼ è¾å¯¹è±¡", ruleDTO.getElements(), "è§åçå
ç´ ", ruleDTO.getOid(), "è§åç主é®"); |
| | | OsCodeRuleDO ruleDO = selectByOid(ruleDTO.getOid()); |
| | | BeanUtil.convert(ruleDTO,ruleDO); |
| | | BeanUtilForVCI.convert(ruleDTO,ruleDO); |
| | | List<OsCodeRuleElementDO> existElementDOs = codeRuleElementDao.selectByRuleOid(ruleDO.getOid()); |
| | | //æ¾enumçæç»å
容ï¼ä¹æ¯è¦å é¤ç |
| | | List<OsCodeEnumDO> existEnumDOs = codeEnumDao.selectByRuleOid(ruleDO.getOid()); |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmRoleQueryServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility.impl; |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.constant.FrameWorkBtmTypeConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.corba.framework.data.RoleInfo; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.frameworkcore.compatibility.SmRoleQueryServiceI; |
| | | import com.vci.constant.FrameWorkBtmTypeConstant; |
| | | import com.vci.web.service.SmRoleQueryServiceI; |
| | | import com.vci.dto.SmRoleDTO; |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.frameworkcore.enumpck.RoleClassifyEnum; |
| | | import com.vci.frameworkcore.enumpck.RoleControlAreaEnum; |
| | | import com.vci.web.service.SmUserQueryServiceI; |
| | | import com.vci.enumpck.UI.RoleClassifyEnum; |
| | | import com.vci.enumpck.UI.RoleControlAreaEnum; |
| | | import com.vci.model.SmRoleForPlatform1; |
| | | import com.vci.pagemodel.SmUserVO; |
| | | import com.vci.po.SmRolePO; |
| | |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import com.vci.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.Lcm.BeanUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.WebThreadLocalUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.enumpck.UserTypeEnum; |
| | | import com.vci.enumpck.UserTypeEnum; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility.impl; |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.common.util.ThreeDES; |
| | | 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.DeptInfo; |
| | | import com.vci.corba.framework.data.RoleInfo; |
| | | import com.vci.corba.framework.data.UserInfo; |
| | | import com.vci.corba.framework.data.UserLogonInfo; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.corba.omd.etm.EnumItem; |
| | | import com.vci.corba.omd.etm.EnumType; |
| | | import com.vci.dto.SmUserDTO; |
| | | import com.vci.common.util.ThreeDES; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.corba.framework.data.UserInfo; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.frameworkcore.compatibility.OrgDeptQueryServiceI; |
| | | import com.vci.frameworkcore.compatibility.SmPwdStrategyQueryServiceI; |
| | | import com.vci.frameworkcore.compatibility.SmRoleQueryServiceI; |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.frameworkcore.enumpck.OrgTypeEnum; |
| | | import com.vci.enumpck.UI.OrgTypeEnum; |
| | | import com.vci.enumpck.UserTypeEnum; |
| | | import com.vci.model.SmUserDO; |
| | | import com.vci.pagemodel.SmUserVO; |
| | | import com.vci.po.SmUserPO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.OrgDepartmentVO; |
| | | import com.vci.pagemodel.SmPasswordStrategyVO; |
| | | import com.vci.pagemodel.SmRoleVO; |
| | | import com.vci.frameworkcore.properties.ConfigCorbaReader; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.SmUserVO; |
| | | import com.vci.po.SmUserPO; |
| | | import com.vci.properties.OsConfig; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | | import com.vci.starter.poi.bo.WriteExcelOption; |
| | |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.enumpck.UserTypeEnum; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import java.io.File; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.web.util.WebUtil.arryAndSqlToBusinessObject; |
| | | |
| | | /** |
| | | * ç¨æ·çæ¥è¯¢ç¸å
³çæå¡ï¼å¯ä»¥å
¼å®¹èå¹³å°åèçpdm |
| | |
| | | * å¯ç çç¥æ¥è¯¢æå¡ |
| | | */ |
| | | @Autowired |
| | | private SmPwdStrategyQueryServiceI smPwdStrategyQueryService; |
| | | private WebPwdStrategyQueryServiceI smPwdStrategyQueryService; |
| | | |
| | | /** |
| | | * 使ç¨è§è²ç屿§æ¥è¯¢ç¨æ·æ¶ |
| | |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * å¹³å°é
ç½® |
| | | */ |
| | | private OsConfig osConfig; |
| | | |
| | | /** |
| | | * æ£æ¥ç¨æ·æ¯å¦åå¨ï¼å¯ä»¥æ ¹æ®ç¨æ·åï¼ä¹å¯ä»¥æ ¹æ®ç¨æ·oid |
| | |
| | | try{ |
| | | String[][] sqlQueryResult = platformClientUtil.getBOFService().getSqlQueryResult(sql + fromSql, null); |
| | | if(sqlQueryResult.length>0){ |
| | | BusinessObject cbo = arryAndSqlToBusinessObject(queryWrapper.getSelectFieldSql(),sqlQueryResult[0]); |
| | | BusinessObject cbo = WebUtil.arryAndSqlToBusinessObject(queryWrapper.getSelectFieldSql(),sqlQueryResult[0]); |
| | | return cbo2VO(cbo); |
| | | } |
| | | }catch (Exception e){ |
| | |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ°æ®åºåå¨é®é¢çæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public List<SmUserVO> listUserByUserIds(Collection<String> userIdCollections)throws VciBaseException { |
| | | public List<SmUserVO> listUserByUserIds(Collection<String> userIdCollections) { |
| | | WebUtil.alertNotNull(userIdCollections,"ç¨æ·åéå"); |
| | | try { |
| | | UserInfo[] userInfo = platformClientUtil.getFrameworkService().fetchUserInfoByNames(VciBaseUtil.collection2StrArr(userIdCollections)); |
| | |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ°æ®åºåå¨é®é¢çæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public SmUserVO getUserByUserOid(String userOid) throws VciBaseException { |
| | | public SmUserVO getUserByUserOid(String userOid) { |
| | | WebUtil.alertNotNull(userOid,"ç¨æ·ä¸»é®"); |
| | | try { |
| | | UserInfo userInfo = platformClientUtil.getFrameworkService().getUserObjectByoid(userOid); |
| | |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ°æ®åºåå¨é®é¢çæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public List<SmUserVO> listUserByUserOids(Collection<String> userOidCollections) throws VciBaseException { |
| | | public List<SmUserVO> listUserByUserOids(Collection<String> userOidCollections) { |
| | | WebUtil.alertNotNull(userOidCollections,"ç¨æ·ä¸»é®éå"); |
| | | try { |
| | | UserInfo[] userInfoArr = platformClientUtil.getFrameworkService().getUserObjectByoids(VciBaseUtil.collection2StrArr(userOidCollections)); |
| | |
| | | */ |
| | | private SmUserVO smUserDO2VO(SmUserDO smUserDO){ |
| | | SmUserVO smUserVO = new SmUserVO(); |
| | | BeanUtil.convert(smUserDO,smUserVO); |
| | | BeanUtilForVCI.convert(smUserDO,smUserVO); |
| | | return smUserVO; |
| | | } |
| | | |
| | |
| | | }else{ |
| | | userDO.setLockFlag(BooleanEnum.TRUE.getValue()); |
| | | } |
| | | BeanUtil.convert(userDO,userVO); |
| | | BeanUtilForVCI.convert(userDO,userVO); |
| | | return userVO; |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public DataGrid<SmUserVO> getDataGridUsers(Map<String, String> conditionMap, PageHelper pageHelper) throws PLException { |
| | | public DataGrid<SmUserVO> getDataGridUsers(Map<String, String> conditionMap, PageHelper pageHelper) { |
| | | if(pageHelper == null){ |
| | | pageHelper = new PageHelper(-1); |
| | | } |
| | | pageHelper.addDefaultAsc("PLTRUENAME"); |
| | | String loginUserId = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(); |
| | | //String loginUserId = "Ludc"; |
| | | //å页æ¥è¯¢ |
| | | UserInfo[] userInfos = platformClientUtil.getFrameworkService().fetchUserInfoByCondition( |
| | | conditionMap.get("name"), |
| | | conditionMap.get("id"), |
| | | conditionMap.get("pkDepartment"), |
| | | conditionMap.get("pkPerson"), |
| | | loginUserId, //å½åç»å½çç¨æ·å |
| | | pageHelper.getPage(), |
| | | pageHelper.getLimit() |
| | | ); |
| | | DataGrid<SmUserVO> dataGrid = new DataGrid<>(); |
| | | if(Func.isNotEmpty(userInfos)){ |
| | | List<String> idList = Arrays.stream(userInfos).map(item -> item.id).collect(Collectors.toList()); |
| | | orgDepartmentVOMap = orgDeptQueryService.batchMapDeptNameByUserOids(idList, null); |
| | | smRoleVOMap = smRoleQueryService.batchListRoleByUserOids(idList,null); |
| | | smPwdStrategyVOMap = smPwdStrategyQueryService.batchSmPwdStrategyByUserOids(idList); |
| | | dataGrid.setData(userInfoArr2VO(userInfos)); |
| | | //ç¨å®äºæ¸
空 |
| | | orgDepartmentVOMap = null; |
| | | smRoleVOMap = null; |
| | | smPwdStrategyVOMap = null; |
| | | //TODO: è¿ä¸ªç»è®¡æ»æ°æé®é¢ï¼å¸¦è¿å»çåæ°ä¸è½åä¸é¢é£ä¸ªfetchUserInfoByConditionæ¥è¯¢ä¸æ ·ç»è®¡çå´çæ»æ° |
| | | dataGrid.setTotal( |
| | | platformClientUtil.getFrameworkService().getUserTotalByCondition( |
| | | conditionMap.get("name"), |
| | | conditionMap.get("id"), |
| | | conditionMap.get("pkDepartment"), |
| | | conditionMap.get("pkPerson"), |
| | | loginUserId //å½åç»å½çç¨æ·å |
| | | ) |
| | | DataGrid<SmUserVO> dataGrid = null; |
| | | try { |
| | | //String loginUserId = "Ludc"; |
| | | //å页æ¥è¯¢ |
| | | UserInfo[] userInfos = platformClientUtil.getFrameworkService().fetchUserInfoByCondition( |
| | | conditionMap.get("name"), |
| | | conditionMap.get("id"), |
| | | conditionMap.get("pkDepartment"), |
| | | conditionMap.get("pkPerson"), |
| | | loginUserId, //å½åç»å½çç¨æ·å |
| | | pageHelper.getPage(), |
| | | pageHelper.getLimit() |
| | | ); |
| | | dataGrid = new DataGrid<>(); |
| | | if(Func.isNotEmpty(userInfos)){ |
| | | List<String> idList = Arrays.stream(userInfos).map(item -> item.id).collect(Collectors.toList()); |
| | | orgDepartmentVOMap = orgDeptQueryService.batchMapDeptNameByUserOids(idList, null); |
| | | smRoleVOMap = smRoleQueryService.batchListRoleByUserOids(idList,null); |
| | | smPwdStrategyVOMap = smPwdStrategyQueryService.batchSmPwdStrategyByUserOids(idList); |
| | | dataGrid.setData(userInfoArr2VO(userInfos)); |
| | | //ç¨å®äºæ¸
空 |
| | | orgDepartmentVOMap = null; |
| | | smRoleVOMap = null; |
| | | smPwdStrategyVOMap = null; |
| | | //TODO: è¿ä¸ªç»è®¡æ»æ°æé®é¢ï¼å¸¦è¿å»çåæ°ä¸è½åä¸é¢é£ä¸ªfetchUserInfoByConditionæ¥è¯¢ä¸æ ·ç»è®¡çå´çæ»æ° |
| | | dataGrid.setTotal( |
| | | platformClientUtil.getFrameworkService().getUserTotalByCondition( |
| | | conditionMap.get("name"), |
| | | conditionMap.get("id"), |
| | | conditionMap.get("pkDepartment"), |
| | | conditionMap.get("pkPerson"), |
| | | loginUserId //å½åç»å½çç¨æ·å |
| | | ) |
| | | ); |
| | | } |
| | | } catch (Exception e) { |
| | | throw new VciBaseException("è·åç¨æ·å表失败ï¼", new Object[]{}, e); |
| | | } |
| | | return dataGrid; |
| | | } |
| | |
| | | * @throws VciBaseException |
| | | */ |
| | | @Override |
| | | public List<SmUserVO> countSmUserByDeptOid(String deptOid, Map<String, String> queryMap) throws VciBaseException { |
| | | public List<SmUserVO> countSmUserByDeptOid(String deptOid, Map<String, String> queryMap) { |
| | | //æ¯å¦æ¥è¯¢åé¨é¨ä¸å
³èçç¨æ· |
| | | List<OrgDepartmentVO> orgDepartmentVOList = orgDeptQueryService.listAllLevelChildrenDeptByParentOid(deptOid, null); |
| | | List<String> deptOidCollection = orgDepartmentVOList.stream().map(OrgDepartmentVO::getOid).collect(Collectors.toList()); |
| | |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public List<SmUserVO> listUserByDeptOid(String deptOid, Map<String, String> queryMap) throws VciBaseException { |
| | | public List<SmUserVO> listUserByDeptOid(String deptOid, Map<String, String> queryMap) { |
| | | //æ¥è¯¢å½åéä¸çé¨é¨ä¸çç¨æ· |
| | | return listUserVOByDeptOid(queryMap,Arrays.asList(deptOid),false ); |
| | | } |
| | |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public List<SmUserVO> listUserUnInDeptOid(String deptOid, Map<String, String> queryMap) throws VciBaseException { |
| | | public List<SmUserVO> listUserUnInDeptOid(String deptOid, Map<String, String> queryMap) { |
| | | // TODO:æ ¹æ®å½åç»å½çç¨æ·å³å®è½æ¥é£äºç¨æ· |
| | | String userType = "0";//WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUsertype(); |
| | | //æ ¹æ®å½åç»å½çç¨æ·ç±»åä¸åï¼æ¥è¯¢ä¸åçç¨æ· |
| | |
| | | */ |
| | | @Override |
| | | public Map<String, List<SmUserVO>> batchListUserByDeptOids( |
| | | Collection<String> deptOidCollection) throws VciBaseException { |
| | | Collection<String> deptOidCollection) { |
| | | if(CollectionUtils.isEmpty(deptOidCollection)){ |
| | | return new HashMap<>(); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public List<SmUserVO> listUserByRoleOid(String roleOid, |
| | | Map<String, String> queryMap) throws VciBaseException { |
| | | Map<String, String> queryMap) { |
| | | return listUserVOByRoleOid(queryMap,roleOid,false); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public List<SmUserVO> listUserUnInRoleOid(String roleOid, |
| | | Map<String, String> queryMap) throws VciBaseException { |
| | | Map<String, String> queryMap) { |
| | | // TODO:æ ¹æ®å½åç»å½çç¨æ·å³å®è½æ¥é£äºç¨æ· |
| | | String usertype = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUsertype(); |
| | | //æ ¹æ®å½åç»å½çç¨æ·ç±»åä¸åï¼æ¥è¯¢ä¸åçç¨æ· |
| | |
| | | */ |
| | | @Override |
| | | public Map<String, List<SmUserVO>> batchListUserByRoleOids( |
| | | Collection<String> roleOidCollection) throws VciBaseException { |
| | | Collection<String> roleOidCollection) { |
| | | if(CollectionUtils.isEmpty(roleOidCollection)){ |
| | | return new HashMap<>(); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public DataGrid<SmUserVO> refGridUsers(Map<String, String> queryMap, |
| | | PageHelper pageHelper) throws VciBaseException { |
| | | PageHelper pageHelper) { |
| | | return gridUserByQueryField(null,null,queryMap,pageHelper,false); |
| | | } |
| | | |
| | |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public List<Tree> refTreeUsers(TreeQueryObject treeQueryObject) |
| | | throws VciBaseException { |
| | | public List<Tree> refTreeUsers(TreeQueryObject treeQueryObject) { |
| | | VciQueryWrapperForDO queryWrapper = getQueryWrapper(null, null, treeQueryObject.getConditionMap(), null, false); |
| | | queryWrapper.wrapperSql(); |
| | | String sql = queryWrapper.getSelectFieldSql(); |
| | |
| | | * @throws VciBaseException |
| | | */ |
| | | @Override |
| | | public List<Tree> refPersonOrgTree(TreeQueryObject treeQueryObject) throws VciBaseException { |
| | | public List<Tree> refPersonOrgTree(TreeQueryObject treeQueryObject) { |
| | | List<Tree> rootTreeList=new ArrayList<>(); |
| | | Map<String,String> conditionMap=treeQueryObject.getConditionMap(); |
| | | if(CollectionUtils.isEmpty(conditionMap)) { |
| | |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
åå¨å°æ°æ®åºä¸åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void updateUserPwdWrongCount(String userOid, int wrongCount) |
| | | throws VciBaseException { |
| | | public void updateUserPwdWrongCount(String userOid, int wrongCount){ |
| | | WebUtil.alertNotNull(userOid,"ç¨æ·ä¸»é®"); |
| | | String sql = "update pllogoninfo set plwrongnum = " + wrongCount +" where pluserid ='" + userOid + "'"; |
| | | try { |
| | |
| | | * @throws VciBaseException åæ°ä¸ºç©ºçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void updateUserLoginTime(String userOid) throws VciBaseException { |
| | | public void updateUserLoginTime(String userOid) { |
| | | WebUtil.alertNotNull(userOid,"ç¨æ·ä¸»é®"); |
| | | String sql = "update pllogoninfo set pllogontime = sysdate where pluserid ='" + userOid + "'"; |
| | | try { |
| | |
| | | // 设置表ååå |
| | | List<String> columns = new ArrayList<>(Arrays.asList("è´¦å·", "å¯ç ", "å§å", "çµåé®ç®±", "ä¸ä¸", "æè¿°", "é¨é¨(ä¸ä¸çº§é¨é¨ä¹é´ä»¥åææ éå¼(/))")); |
| | | //è·åæ¯å¦å¯¼åºå¯çº§é
置项 |
| | | String flag = ConfigCorbaReader.getConfigValue("exportSecretGrade"); |
| | | if (flag != null && flag.equalsIgnoreCase("true")) { |
| | | if (osConfig.isExportSecretGrade()) { |
| | | columns = new ArrayList<>(Arrays.asList("è´¦å·", "å¯ç ", "å§å", "çµåé®ç®±", "ä¸ä¸", "æè¿°", "é¨é¨(ä¸ä¸çº§é¨é¨ä¹é´ä»¥åææ éå¼(/))" ,"å¯çº§")); |
| | | } |
| | | //设置å¿
å¡«å |
| | |
| | | String loginUserId = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(); |
| | | UserEntityInfo userEntityInfo = new UserEntityInfo(loginUserId,null); |
| | | //æ¯å¦å¯¼å
¥å¯çº§é
ç½® |
| | | boolean exportSecretGrade = Boolean.parseBoolean(ConfigCorbaReader.getConfigValue("exportSecretGrade")); |
| | | boolean exportSecretGrade = osConfig.isExportSecretGrade(); |
| | | List<SmUserPO> poList = ExcelUtil.readDataObjectFromExcel(file, SmUserPO.class,excelOption,(value, po, fieldName)->{ |
| | | Integer secretValue = UserSecretEnum.getSecretValueByText(po.getSecretGradeText()); |
| | | //æ¯å¦å¿
须导å
¥å¯çº§ |
| | |
| | | //ä¿åé»è¾ |
| | | poList.stream().forEach(smUserPO->{ |
| | | SmUserDTO smUserDTO = new SmUserDTO(); |
| | | BeanUtil.convert(smUserPO,smUserDTO); |
| | | BeanUtilForVCI.convert(smUserPO,smUserDTO); |
| | | //ç¨æ·ä¿¡æ¯æ¯å¦è§èæ£æ¥ |
| | | this.check(smUserDTO,true,true); |
| | | //çæåå¨çDO对象 |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<String> queryUserNameByRoleType(String roleType) throws PLException { |
| | | public List<String> queryUserNameByRoleType(String roleType) { |
| | | List<String> userNameList = new ArrayList<>(); |
| | | if(Func.isBlank(roleType)){ |
| | | return userNameList; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WFWorkflowNodeFavItemServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.dto.WFWorkflowNodeFavItemDTO; |
| | | import com.vci.model.WFWorkflowNodeFavItemDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.pagemodel.WFWorkflowNodeFavItemVO; |
| | | import com.vci.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.starter.web.annotation.bus.VciChangeDocument; |
| | | import com.vci.starter.web.enumpck.VciChangeDocumentTypeEnum; |
| | |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.dao.WFWorkflowNodeFavItemDaoI; |
| | | import com.vci.dto.WFWorkflowNodeFavItemDTO; |
| | | import com.vci.model.WFWorkflowNodeFavItemDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.pagemodel.WFWorkflowNodeFavItemVO; |
| | | import com.vci.web.service.WFWorkflowNodeFavItemServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | |
| | | public WFWorkflowNodeFavItemVO wFWorkflowNodeFavItemDO2VO(WFWorkflowNodeFavItemDO wFWorkflowNodeFavItemDO) throws VciBaseException{ |
| | | WFWorkflowNodeFavItemVO vo = new WFWorkflowNodeFavItemVO(); |
| | | if(wFWorkflowNodeFavItemDO != null){ |
| | | BeanUtil.convert(wFWorkflowNodeFavItemDO,vo); |
| | | BeanUtilForVCI.convert(wFWorkflowNodeFavItemDO,vo); |
| | | //è¿éè¦å¤çæä¸¾çå
¶ä»çå
容 |
| | | } |
| | | return vo; |
| | |
| | | VciBaseUtil.alertNotNull(wFWorkflowNodeFavItemDTO,"éè¦æ·»å çæ°æ®å¯¹è±¡"); |
| | | //å°DTO转æ¢ä¸ºDO |
| | | WFWorkflowNodeFavItemDO wFWorkflowNodeFavItemDO = new WFWorkflowNodeFavItemDO(); |
| | | BeanUtil.convert(wFWorkflowNodeFavItemDTO,wFWorkflowNodeFavItemDO); |
| | | BeanUtilForVCI.convert(wFWorkflowNodeFavItemDTO,wFWorkflowNodeFavItemDO); |
| | | |
| | | revisionModelUtil.wrapperForAdd(wFWorkflowNodeFavItemDO); |
| | | BatchCBO batchCBO = wFWorkflowNodeFavItemMapper.insert(wFWorkflowNodeFavItemDO); |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WFWorkflowNodeFavServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.dto.WFWorkflowNodeFavDTO; |
| | | import com.vci.model.WFWorkflowNodeFavDO; |
| | | import com.vci.model.WFWorkflowNodeFavItemDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.pagemodel.WFWorkflowNodeFavItemVO; |
| | | import com.vci.pagemodel.WFWorkflowNodeFavVO; |
| | | import com.vci.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.starter.web.annotation.bus.VciChangeDocument; |
| | | import com.vci.starter.web.enumpck.VciChangeDocumentTypeEnum; |
| | |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.dao.WFWorkflowNodeFavDaoI; |
| | | import com.vci.web.dao.WFWorkflowNodeFavItemDaoI; |
| | | import com.vci.dto.WFWorkflowNodeFavDTO; |
| | | import com.vci.model.WFWorkflowNodeFavDO; |
| | | import com.vci.model.WFWorkflowNodeFavItemDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.pagemodel.WFWorkflowNodeFavItemVO; |
| | | import com.vci.pagemodel.WFWorkflowNodeFavVO; |
| | | import com.vci.web.service.WFWorkflowNodeFavItemServiceI; |
| | | import com.vci.web.service.WFWorkflowNodeFavServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | public WFWorkflowNodeFavVO wFWorkflowNodeFavDO2VO(WFWorkflowNodeFavDO wFWorkflowNodeFavDO) throws VciBaseException{ |
| | | WFWorkflowNodeFavVO vo = new WFWorkflowNodeFavVO(); |
| | | if(wFWorkflowNodeFavDO != null){ |
| | | BeanUtil.convert(wFWorkflowNodeFavDO,vo); |
| | | BeanUtilForVCI.convert(wFWorkflowNodeFavDO,vo); |
| | | //è¿éè¦å¤çæä¸¾çå
¶ä»çå
容 |
| | | } |
| | | return vo; |
| | |
| | | }else{ |
| | | //å°DTO转æ¢ä¸ºDO |
| | | WFWorkflowNodeFavDO wFWorkflowNodeFavDO = new WFWorkflowNodeFavDO(); |
| | | BeanUtil.convert(wFWorkflowNodeFavDTO,wFWorkflowNodeFavDO); |
| | | BeanUtilForVCI.convert(wFWorkflowNodeFavDTO,wFWorkflowNodeFavDO); |
| | | wFWorkflowNodeFavDO.setUserId(userId); |
| | | revisionModelUtil.wrapperForAdd(wFWorkflowNodeFavDO); |
| | | wFWorkflowNodeFavMapper.insert(wFWorkflowNodeFavDO); |
| | |
| | | String schemaOid = favDO.getOid(); |
| | | wFWorkflowNodeFavDTO.getItems().stream().forEach(item->{ |
| | | WFWorkflowNodeFavItemDO itemDO = new WFWorkflowNodeFavItemDO(); |
| | | BeanUtil.convert(item,itemDO); |
| | | BeanUtilForVCI.convert(item,itemDO); |
| | | itemDO.setWorkflowNodeFavOid(schemaOid); |
| | | newItems.add(itemDO); |
| | | }); |
| | |
| | | List<WFWorkflowNodeFavItemDO> newItems = new ArrayList<>(); |
| | | wFWorkflowNodeFavDTO.getItems().stream().forEach(item -> { |
| | | WFWorkflowNodeFavItemDO itemDO = new WFWorkflowNodeFavItemDO(); |
| | | BeanUtil.convert(item, itemDO); |
| | | BeanUtilForVCI.convert(item, itemDO); |
| | | itemDO.setWorkflowNodeFavOid(wFWorkflowNodeFavDO.getOid()); |
| | | newItems.add(itemDO); |
| | | }); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.atm.AttributeDef; |
| | | import com.vci.enumpck.UI.ItemTypeEnum; |
| | | import com.vci.pagemodel.OsAttributeVO; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.web.service.WebAttributeServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description 屿§æå¡ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 14:26 |
| | | */ |
| | | @Service |
| | | public class WebAttributeServiceImpl implements WebAttributeServiceI { |
| | | /** |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * å¹³å°çè°ç¨å·¥å
·ç±» |
| | | */ |
| | | @Autowired |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | /** |
| | | * 使ç¨å±æ§ç¼å·è·å对象--æ¹é |
| | | * |
| | | * @param attrCodes 屿§çè±æåç§° |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OsAttributeVO> listAttrByIds(Collection<String> attrCodes) { |
| | | if(CollectionUtils.isEmpty(attrCodes)){ |
| | | return null; |
| | | } |
| | | Map<String, OsAttributeVO> attributeVOMap = selectAllAttributeMap(); |
| | | List<OsAttributeVO> attributeVOS = new ArrayList<>(); |
| | | attrCodes.stream().forEach(attrCode->{ |
| | | OsAttributeVO attributeVO = attributeVOMap.getOrDefault(attrCode.toLowerCase(),null); |
| | | if(attributeVO!=null){ |
| | | attributeVOS.add(attributeVO); |
| | | } |
| | | }); |
| | | return attributeVOS; |
| | | } |
| | | |
| | | /** |
| | | * 使ç¨å±æ§ç¼å·è·å对象--æ¹é |
| | | * |
| | | * @param attrCodes 屿§çè±æåç§° |
| | | * @param attributeVOMap 屿§å¯¹è±¡ |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OsAttributeVO> listAttrByIds(Collection<String> attrCodes,Map<String, OsAttributeVO> attributeVOMap) { |
| | | if(CollectionUtils.isEmpty(attrCodes)){ |
| | | return null; |
| | | } |
| | | if(attributeVOMap == null){ |
| | | attributeVOMap = selectAllAttributeMap(); |
| | | } |
| | | List<OsAttributeVO> attributeVOS = new ArrayList<>(); |
| | | Map<String, OsAttributeVO> finalAttributeVOMap = attributeVOMap; |
| | | attrCodes.stream().forEach(attrCode->{ |
| | | OsAttributeVO attributeVO = finalAttributeVOMap.getOrDefault(attrCode.toLowerCase(),null); |
| | | if(attributeVO!=null){ |
| | | attributeVOS.add(attributeVO); |
| | | } |
| | | }); |
| | | return attributeVOS; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ææç屿§ |
| | | * |
| | | * @return 屿§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OsAttributeVO> selectAllAttribute() { |
| | | //åé¢ä¸¤ä¸ªå页æ°ï¼å®å
¨æ²¡æç¨ |
| | | try { |
| | | return attributeDO2VOs(Arrays.stream(platformClientUtil.getAttributeService().getAttributeDefs("",1,1)).collect(Collectors.toList())); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ææç屿§æ å° |
| | | * |
| | | * @return keyæ¯å±æ§çè±æåç§°å°åï¼valueæ¯å±æ§çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public Map<String, OsAttributeVO> selectAllAttributeMap() { |
| | | return Optional.ofNullable(selectAllAttribute()).orElseGet(()->new ArrayList<>()).stream().collect(Collectors.toMap(s->s.getId().toLowerCase(),t->t,(o1,o2)->o1)); |
| | | } |
| | | |
| | | /** |
| | | * 屿§çæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param attribItems æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OsAttributeVO> attributeDO2VOs(Collection<AttributeDef> attribItems) { |
| | | List<OsAttributeVO> vos = new ArrayList<>(); |
| | | Optional.ofNullable(attribItems).orElseGet(()->new ArrayList<>()).stream().forEach(attribItem -> { |
| | | vos.add(attributeDO2VO(attribItem)); |
| | | }); |
| | | return vos; |
| | | } |
| | | |
| | | /** |
| | | * 屿§çæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param attribItem æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public OsAttributeVO attributeDO2VO(AttributeDef attribItem) { |
| | | OsAttributeVO attributeVO = new OsAttributeVO(); |
| | | if(attribItem!=null){ |
| | | attributeVO.setOid(attribItem.oid); |
| | | attributeVO.setId(attribItem.name); |
| | | attributeVO.setCreator(attribItem.creator); |
| | | try { |
| | | attributeVO.setCreateTime(new Date(attribItem.createTime)); |
| | | attributeVO.setLastModifyTime(new Date(attribItem.modifyTime)); |
| | | attributeVO.setTs(VciDateUtil.str2Date(attribItem.ts,VciDateUtil.DateTimeMillFormat)); |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | String errorLog = "屿§DO转VOæ¶åºéï¼åå ï¼"+ VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(errorLog); |
| | | throw new VciBaseException(errorLog); |
| | | } |
| | | attributeVO.setLastModifier(attribItem.modifier); |
| | | attributeVO.setName(attribItem.label); |
| | | attributeVO.setDescription(attribItem.description); |
| | | attributeVO.setAttributeDataType(attribItem.vtDataType); |
| | | attributeVO.setAttributeDataTypeText(VciFieldTypeEnum.getTextByValue(attribItem.vtDataType)); |
| | | //è·åUI屿§ç±»å |
| | | attributeVO.setAttributeUIType(ItemTypeEnum.convertAttributeTypeTOUITypeTextByValue(attribItem.vtDataType,false)); |
| | | //è·åUI屿§ç±»åææ¬ |
| | | attributeVO.setAttributeUITypeText(ItemTypeEnum.convertAttributeTypeTOUITypeTextByValue(attribItem.vtDataType,true)); |
| | | attributeVO.setDefaultValue(attribItem.defValue); |
| | | if(Func.isNotBlank(attribItem.rage)){ |
| | | attributeVO.setRange(attribItem.rage.replace("<","<")); |
| | | }else{ |
| | | attributeVO.setRange(attribItem.rage); |
| | | } |
| | | attributeVO.setOther(attribItem.other); |
| | | //å¤çåç
§ç¸å
³å±æ§ |
| | | if(StringUtils.isNotBlank(attribItem.other)) { |
| | | if (isReferAttr(attribItem.other)) { |
| | | //说æè¿ä¸ªçç¡®æ¯åç
§å段 |
| | | String[] others = attribItem.other.split(";"); |
| | | for (String s : others) { |
| | | if (s.toLowerCase().contains("btm") && s.split("=").length > 1) {//å¿
é¡»è¦å¤æé¿åº¦ï¼å 为æä¸¾çæ¶å乿¯å
å«è¿ä¸ªbtmç |
| | | attributeVO.setBtmTypeId(s.split("=")[1].trim()); |
| | | } |
| | | //龿¥ç±»å䏿¯æ |
| | | if (s.toLowerCase().contains("link") && s.split("=").length > 1) {//å¿
é¡»è¦å¤æé¿åº¦ï¼å 为æä¸¾çæ¶å乿¯å
å«è¿ä¸ªbtmç |
| | | attributeVO.setLinkTypeName(s.split("=")[1].trim()); |
| | | } |
| | | if (s.toLowerCase().contains("version") && s.split("=").length > 1) {//å¿
é¡»è¦å¤æé¿åº¦ï¼å 为æä¸¾çæ¶å乿¯å
å«è¿ä¸ªbtmç |
| | | attributeVO.setVersion(WebUtil.getInt(s.split("=")[1].trim())); |
| | | } |
| | | } |
| | | } |
| | | //å¿
è¾åé¿åº¦ |
| | | String[] others = attribItem.other.split(";"); |
| | | for (String s : others) { |
| | | if (s.toLowerCase().contains("allownull") && s.split("=").length > 1) {//å¿
é¡»è¦å¤æé¿åº¦ï¼å 为æä¸¾çæ¶å乿¯å
å«è¿ä¸ªbtmç |
| | | boolean allownull = false; |
| | | if (s.split("=")[1].trim().toLowerCase().equals("yes")) { |
| | | allownull = true; |
| | | } |
| | | attributeVO.setNullableFlag(allownull); |
| | | } |
| | | if (s.toLowerCase().indexOf("length") > -1 && s.split("=").length > 1) { |
| | | int length = WebUtil.getInt(s.split("=")[1].trim()); |
| | | if (length > 0) { |
| | | attributeVO.setAttrLength(length); |
| | | } |
| | | } |
| | | } |
| | | //æä¸¾ |
| | | if(isEnumAttr(attribItem.other)){ |
| | | for (String s : others) { |
| | | if(s.contains("enumName") && s.split("=").length>1) { |
| | | attributeVO.setEnumId(s.split("=")[1].trim()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return attributeVO; |
| | | } |
| | | |
| | | /** |
| | | * æ¯å¦ä¸ºåç
§å±æ§ |
| | | * @param other é
ç½®çå
¶ä» |
| | | * @return true æ¯åç
§ |
| | | */ |
| | | private boolean isReferAttr(String other){ |
| | | if(StringUtils.isNotBlank(other) |
| | | && (other.toLowerCase().contains("btm") || other.toLowerCase().contains("link"))){ |
| | | //è¿ä¸è½ç¡®å®ï¼å 为æä¸¾çæ¶åä¹ä¼è®¾ç½®btm |
| | | String[] temp = other.split(";"); |
| | | for(String s : temp){ |
| | | if((s.contains("btm") || s.contains("link")) && s.split("=").length>1){ |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * æ¯å¦ä¸ºæä¸¾ç屿§ |
| | | * @param other é
ç½®çå
容 |
| | | * @return true æ¯æä¸¾ |
| | | */ |
| | | private boolean isEnumAttr(String other){ |
| | | if(StringUtils.isNotBlank(other) |
| | | && other.contains("enumName")){ |
| | | //è¿ä¸è½ç¡®å®ï¼å 为æä¸¾çæ¶åä¹ä¼è®¾ç½®btm |
| | | String[] temp = other.split(";"); |
| | | for(String s : temp){ |
| | | if(s.contains("enumName")&& s.split("=").length>1){ |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebBoServiceImpl.java ÐÞ¸Ä |
| | |
| | | import com.vci.corba.query.ObjectQueryServicePrx; |
| | | import com.vci.corba.query.data.BtmRefQueryOption; |
| | | import com.vci.corba.query.data.KV; |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.starter.web.annotation.Column; |
| | |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.properties.WebProperties; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.dom4j.DocumentHelper; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.Field; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | * @author weidy |
| | | */ |
| | | @Service |
| | | public class WebBoServiceImpl implements WebBoServiceI{ |
| | | |
| | | /** |
| | | * æä¸¾æå¡ |
| | | */ |
| | | @Autowired |
| | | private OsEnumServiceI enumService;//æä¸¾æå¡ |
| | | |
| | | /** |
| | | * 屿§æå¡ |
| | | */ |
| | | @Autowired |
| | | private OsAttributeServiceI attrService;//屿§æå¡ |
| | | public class WebBoServiceImpl implements WebBoServiceI { |
| | | |
| | | /** |
| | | * çå½å¨æçæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsLifeCycleServiceI lifeService;//çå½å¨ææå¡ |
| | | |
| | | /** |
| | | * ç¶æçæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsStatusServiceI statusService; |
| | | |
| | | /** |
| | | * ç¨æ·æ¥è¯¢æå¡ |
| | | */ |
| | | @Autowired |
| | | private SmUserQueryServiceI userQueryService; |
| | | |
| | | /** |
| | | * 龿¥ç±»åæå¡ |
| | | */ |
| | | @Autowired |
| | | private WebLoServiceI loService; |
| | | |
| | | /** |
| | | * é
ç½®ä¿¡æ¯ |
| | | */ |
| | | @Autowired |
| | | private WebProperties webProperties; |
| | | |
| | | /** |
| | | * å¤è¯è¨åç¼ |
| | | */ |
| | | private final String msgCodePrefix = "com.vci.web.boService."; |
| | | |
| | | /** |
| | | * æ¥å¿å¯¹è±¡ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * å¤è¯è¨åç¼ |
| | | */ |
| | | private final String msgCodePrefix = "com.vci.web.boService."; |
| | | |
| | | /** |
| | | * æä¸¾æå¡ |
| | | */ |
| | | @Resource |
| | | private WebEnumServiceI enumService;//æä¸¾æå¡ |
| | | |
| | | /** |
| | | * çå½å¨æçæå¡ |
| | | */ |
| | | @Resource |
| | | private WebLifeCycleServiceI lifeService;//çå½å¨ææå¡ |
| | | |
| | | /** |
| | | * ç¶æçæå¡ |
| | | */ |
| | | @Resource |
| | | private WebStatusServiceI statusService; |
| | | |
| | | /** |
| | | * ç¨æ·æ¥è¯¢æå¡ |
| | | */ |
| | | @Resource |
| | | private SmUserQueryServiceI userQueryService; |
| | | |
| | | /** |
| | | * é
ç½®ä¿¡æ¯ |
| | | */ |
| | | @Resource |
| | | private WebProperties webProperties; |
| | | |
| | | /** |
| | | * ä¸å¡ç±»åçæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsBtmServiceI btmService; |
| | | @Resource |
| | | private WebBtmServiceI btmService; |
| | | |
| | | /** |
| | | * çæ¬è§åçæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsRevisionRuleServiceI revisionRuleService; |
| | | @Resource |
| | | private WebRevisionRuleServiceI revisionRuleService; |
| | | |
| | | /** |
| | | * å¹³å°è°ç¨å®¢æ·ç«¯ |
| | | */ |
| | | @Autowired |
| | | @Resource |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public <T> int countByQueryWrapper(VciQueryWrapperForDO queryWrapper, Class<T> doClass) throws VciBaseException { |
| | | VciQueryWrapperForDO queryWrapperForDO = new VciQueryWrapperForDO(null,doClass); |
| | | BeanUtil.convert(queryWrapper,queryWrapperForDO); |
| | | BeanUtilForVCI.convert(queryWrapper,queryWrapperForDO); |
| | | queryWrapperForDO.clearPage(); |
| | | queryWrapperForDO.wrapperSql(); |
| | | String sql= queryWrapperForDO.getSelectFieldSql() + " from " + queryWrapperForDO.getTableName() + " " + queryWrapperForDO.getTableNick() + queryWrapperForDO.getLinkTableSql() ; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.btm.BizType; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.Lcm.ConcurrentDateFormat; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.web.service.WebAttributeServiceI; |
| | | import com.vci.web.service.WebBtmServiceI; |
| | | import com.vci.web.service.WebEnumServiceI; |
| | | import com.vci.web.service.WebLinkTypeServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description ä¸å¡ç±»åæå¡ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 11:32 |
| | | */ |
| | | @Service |
| | | public class WebBtmServiceImpl implements WebBtmServiceI { |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * å¹³å°çè°ç¨å·¥å
·ç±» |
| | | */ |
| | | @Resource |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | /** |
| | | * æä¸¾çæå¡ |
| | | */ |
| | | @Resource |
| | | private WebEnumServiceI enumService; |
| | | |
| | | /** |
| | | * 龿¥ç±»åçæå¡ |
| | | */ |
| | | @Resource |
| | | private WebLinkTypeServiceI linkTypeService; |
| | | |
| | | /** |
| | | * 屿§çæå¡ |
| | | */ |
| | | @Resource |
| | | private WebAttributeServiceI attributeService; |
| | | |
| | | /** |
| | | * 使ç¨ç¼å·è·åä¸å¡ç±»å |
| | | * |
| | | * @param id ç¼å· |
| | | * @return ä¸å¡ç±»å |
| | | */ |
| | | @Override |
| | | public OsBtmTypeVO getBtmById(String id) throws PLException { |
| | | if (StringUtils.isBlank(id)) { |
| | | return null; |
| | | } |
| | | BizType bizType = platformClientUtil.getBtmService().getBizTypeByName(id); |
| | | return btmDO2VO(bizType,null); |
| | | } |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param btmItem æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public OsBtmTypeVO btmDO2VO(BizType btmItem, Map<String, OsAttributeVO> attributeVOMap) { |
| | | OsBtmTypeVO vo = new OsBtmTypeVO(); |
| | | if (btmItem != null) { |
| | | vo.setOid(btmItem.oid); |
| | | vo.setCreator(btmItem.creator); |
| | | vo.setLastModifier(btmItem.modifier); |
| | | try { |
| | | // btmItem.createTimeæ¿å°çæ¯æ¶é´æ³ï¼ä½æ¯è¿å¿è¦çæ¯ä¾å¦2017-12-27 09:32:20.034è¿æ ·çæ ¼å¼ï¼æä»¥ä¸è°ç¨è¿ä¸ªæ¹æ³ï¼æ¹è°ç¨å
¶ä»æ¹æ³ |
| | | //vo.setCreateTime(VciDateUtil.str2Date(String.valueOf(btmItem.createTime),VciDateUtil.DateTimeFormat)); |
| | | vo.setCreateTime(Func.parse(btmItem.createTime, ConcurrentDateFormat.of(VciDateUtil.DateTimeFormat))); |
| | | vo.setLastModifyTime(Func.parse(btmItem.modifyTime, ConcurrentDateFormat.of(VciDateUtil.DateTimeFormat))); |
| | | vo.setTs(Func.parse(btmItem.ts, ConcurrentDateFormat.of(VciDateUtil.DateTimeMillFormat))); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | vo.setDescription(btmItem.description); |
| | | vo.setId(btmItem.name); |
| | | vo.setName(btmItem.label); |
| | | vo.setLifeCycleId(btmItem.lifeCycle); |
| | | vo.setAbstractFlag(btmItem.isAbstract); |
| | | vo.setImplClass(btmItem.implClass); |
| | | vo.setShape(btmItem.shape); |
| | | vo.setRevLevel(btmItem.revLevel); |
| | | vo.setRevisionRuleId(btmItem.revRuleName); |
| | | vo.setTableName(VciBaseUtil.getTableName(vo.getId())); |
| | | vo.setInputRevisionFlag(btmItem.revInput); |
| | | vo.setDelimiter(btmItem.delimiter); |
| | | vo.setfName(btmItem.fName); |
| | | vo.setVersionRule(String.valueOf(btmItem.verRuleName)); |
| | | if (StringUtils.isNotBlank(vo.getRevisionRuleId()) || vo.isInputRevisionFlag()) { |
| | | vo.setRevisionFlag(true); |
| | | } |
| | | vo.setLifeCycleIds(Arrays.stream(btmItem.lifeCycles).collect(Collectors.joining(","))); |
| | | vo.setApNameArray(btmItem.apNameArray); |
| | | List<OsAttributeVO> attributeVOS = attributeService.listAttrByIds(Arrays.stream(btmItem.apNameArray).collect(Collectors.toList()),attributeVOMap); |
| | | List<OsBtmTypeAttributeVO> btmTypeAttributeVOS = new ArrayList<>(); |
| | | Optional.ofNullable(attributeVOS).orElseGet(() -> new ArrayList<>()).stream().forEach(attributeVO -> { |
| | | OsBtmTypeAttributeVO btmTypeAttributeVO = new OsBtmTypeAttributeVO(); |
| | | BeanUtilForVCI.convert(attributeVO, btmTypeAttributeVO); |
| | | btmTypeAttributeVO.setPkBtmType(vo.getOid()); |
| | | btmTypeAttributeVO.setBtmTypeId(vo.getId()); |
| | | btmTypeAttributeVO.setAttributeDataType(attributeVO.getAttributeDataType()); |
| | | btmTypeAttributeVO.setAttributeLength(attributeVO.getAttrLength()); |
| | | btmTypeAttributeVO.setDefaultValue(attributeVO.getDefaultValue()); |
| | | if ("secretgrade".equalsIgnoreCase(attributeVO.getId())) { |
| | | vo.setSecretFlag(true); |
| | | } |
| | | if (StringUtils.isNotBlank(attributeVO.getBtmTypeId())) { |
| | | btmTypeAttributeVO.setReferFlag(true); |
| | | btmTypeAttributeVO.setReferBtmTypeId(attributeVO.getBtmTypeId()); |
| | | } |
| | | if (StringUtils.isNotBlank(attributeVO.getEnumId())) { |
| | | btmTypeAttributeVO.setEnumFlag(true); |
| | | btmTypeAttributeVO.setEnumItemMap(enumService.getEnumValueMap(btmTypeAttributeVO.getEnumId())); |
| | | } |
| | | btmTypeAttributeVOS.add(btmTypeAttributeVO); |
| | | }); |
| | | vo.setAttributes(btmTypeAttributeVOS); |
| | | } |
| | | return vo; |
| | | } |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åçå¨åªä¸ªå±æ§ä¸ä½¿ç¨ |
| | | * |
| | | * @param btmName ä¸å¡ç±»å |
| | | * @return å¼ç¨çä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<OsUsedAttributeVO> listBtmUsedInfo(String btmName) { |
| | | return listBtmUsedInfo(btmName, false); |
| | | } |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»åçå¨åªä¸ªå±æ§ä¸ä½¿ç¨ |
| | | * |
| | | * @param btmId ä¸å¡ç±»å |
| | | * @param hasLink æ¯å¦å
å«é¾æ¥ç±»åä¸ |
| | | * @return å¼ç¨çä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<OsUsedAttributeVO> listBtmUsedInfo(String btmId, boolean hasLink) { |
| | | VciBaseUtil.alertNotNull(btmId, "ä¸å¡ç±»åçåç§°"); |
| | | List<OsAttributeVO> allReferThisBtmAttributes = Optional.ofNullable(attributeService.selectAllAttribute()).orElseGet(() -> new ArrayList<>()).stream().filter(s -> btmId.equalsIgnoreCase(s.getBtmTypeId())).collect(Collectors.toList()); |
| | | if (CollectionUtils.isEmpty(allReferThisBtmAttributes)) { |
| | | return null; |
| | | } |
| | | //æ ¹æ®è¿äºå±æ§ï¼æ¾å®ä½¿ç¨çä¸å¡ç±»å |
| | | List<OsUsedAttributeVO> usedInfos = new ArrayList<>(); |
| | | List<OsBtmTypeVO> btmTypeVOMap = selectAllBtmMap().values().stream().collect(Collectors.toList()); |
| | | List<OsLinkTypeVO> linkTypeVOS = linkTypeService.selectAllLinkMap().values().stream().collect(Collectors.toList()); |
| | | allReferThisBtmAttributes.stream().forEach(attribute -> { |
| | | //å
¶ä»çä¸å¡ç±»åå
å«äºè¿ä¸ªå±æ§ç |
| | | List<OsBtmTypeVO> usedBtms = btmTypeVOMap.stream().filter(btmTypeVO -> !CollectionUtils.isEmpty(btmTypeVO.getAttributes()) && btmTypeVO.getAttributes().stream().anyMatch(s -> attribute.getId().equalsIgnoreCase(s.getId()))).collect(Collectors.toList()); |
| | | if (!CollectionUtils.isEmpty(usedBtms)) { |
| | | usedBtms.stream().forEach(btm -> { |
| | | btm.getAttributes().stream().filter(s -> attribute.getId().equalsIgnoreCase(s.getId())).forEach(attrInBtm -> { |
| | | OsUsedAttributeVO usedAttributeVO = new OsUsedAttributeVO(); |
| | | usedAttributeVO.setId(attrInBtm.getId()); |
| | | usedAttributeVO.setName(attrInBtm.getName()); |
| | | usedAttributeVO.setPkBtmType(btm.getId()); |
| | | usedAttributeVO.setBusinessType(BooleanEnum.TRUE.getValue()); |
| | | usedInfos.add(usedAttributeVO); |
| | | }); |
| | | }); |
| | | } |
| | | if (hasLink) { |
| | | List<OsLinkTypeVO> usedLinks = linkTypeVOS.stream().filter(linkTypeVO -> !CollectionUtils.isEmpty(linkTypeVO.getAttributes()) && linkTypeVO.getAttributes().stream().anyMatch(s -> attribute.getId().equalsIgnoreCase(s.getId()))).collect(Collectors.toList()); |
| | | if (!CollectionUtils.isEmpty(usedLinks)) { |
| | | usedLinks.stream().forEach(link -> { |
| | | link.getAttributes().stream().filter(s -> attribute.getId().equalsIgnoreCase(s.getId())).forEach(attrInBtm -> { |
| | | OsUsedAttributeVO usedAttributeVO = new OsUsedAttributeVO(); |
| | | usedAttributeVO.setId(attrInBtm.getId()); |
| | | usedAttributeVO.setName(attrInBtm.getName()); |
| | | usedAttributeVO.setPkBtmType(link.getId()); |
| | | usedAttributeVO.setBusinessType(BooleanEnum.FASLE.getValue()); |
| | | usedInfos.add(usedAttributeVO); |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | return usedInfos; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçä¸å¡ç±»åæ å° |
| | | * |
| | | * @return key æ¯ä¸å¡çè±æåç§°çå°å |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public Map<String, OsBtmTypeVO> selectAllBtmMap() { |
| | | return Optional.ofNullable(selectAllBtm()).orElseGet(() -> new ArrayList<OsBtmTypeVO>()).stream().collect(Collectors.toMap(s -> s.getId().toLowerCase(), t -> t, (o1, o2) -> o1)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçä¸å¡ç±»åæ å° |
| | | * |
| | | * @return key æ¯ä¸å¡çè±æåç§°çå°å |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public Map<String, OsBtmTypeVO> selectAllBtmMap(Map<String, OsAttributeVO> attributeVOMap) { |
| | | return Optional.ofNullable(selectAllBtm(attributeVOMap)).orElseGet(() -> new ArrayList<OsBtmTypeVO>()).stream().collect(Collectors.toMap(s -> s.getId().toLowerCase(), t -> t, (o1, o2) -> o1)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçä¸å¡ç±»å |
| | | * |
| | | * @return ä¸å¡ç±»å对象 |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public List<OsBtmTypeVO> selectAllBtm() { |
| | | try { |
| | | return btmDO2VOs(Arrays.stream(platformClientUtil.getBtmService().getBizTypes("")).collect(Collectors.toList()),null); |
| | | } catch (PLException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçä¸å¡ç±»å |
| | | * |
| | | * @return ä¸å¡ç±»å对象 |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public List<OsBtmTypeVO> selectAllBtm(Map<String, OsAttributeVO> attributeVOMap) { |
| | | try { |
| | | return btmDO2VOs(Arrays.stream(platformClientUtil.getBtmService().getBizTypes("")).collect(Collectors.toList()),attributeVOMap); |
| | | } catch (PLException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param btmItems æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OsBtmTypeVO> btmDO2VOs(Collection<BizType> btmItems,Map<String, OsAttributeVO> attributeVOMap) { |
| | | List<OsBtmTypeVO> VOS = new ArrayList<>(); |
| | | Optional.ofNullable(btmItems).orElseGet(() -> new ArrayList<>()).parallelStream().forEach(btmItem -> { |
| | | OsBtmTypeVO vo = btmDO2VO(btmItem,attributeVOMap); |
| | | VOS.add(vo); |
| | | }); |
| | | return VOS; |
| | | } |
| | | |
| | | /** |
| | | * 使ç¨ç¼å·è·åä¸å¡ç±»å |
| | | * |
| | | * @param btmIds ç¼å· |
| | | * @return ä¸å¡ç±»å |
| | | */ |
| | | @Override |
| | | public List<OsBtmTypeVO> listBtmByIds(Collection<String> btmIds) { |
| | | if (CollectionUtils.isEmpty(btmIds)) { |
| | | return null; |
| | | } |
| | | BtmDataFetcher btmDataFetcher = new BtmDataFetcher(); |
| | | List<OsBtmTypeVO> btmTypeVOS = new ArrayList<>(); |
| | | btmIds.stream().forEach(id -> { |
| | | OsBtmTypeVO btmType = btmDataFetcher.getBtmType(id); |
| | | btmTypeVOS.add(btmType); |
| | | }); |
| | | return btmTypeVOS; |
| | | } |
| | | |
| | | private class BtmDataFetcher { |
| | | |
| | | //ä¸å¡ç±»å |
| | | private Map<String, BizType> btmTypeVOMap = new HashMap<String, BizType>(); |
| | | |
| | | public BtmDataFetcher() { |
| | | initBtmDataFetcher(); |
| | | } |
| | | |
| | | private void initBtmDataFetcher(){ |
| | | try { |
| | | BizType[] bizTypes = platformClientUtil.getBtmService().getBizTypes(""); |
| | | //List<OsBtmTypeVO> osBtmTypeVOS = btmDO2VOs(Arrays.asList(bizTypes), null); |
| | | if(Func.isNotEmpty(bizTypes)){ |
| | | btmTypeVOMap = Arrays.stream(bizTypes).collect(Collectors.toMap(btm -> btm.name, btm -> btm)); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åä¸å¡ç±»å |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public OsBtmTypeVO getBtmType(String id) { |
| | | BizType bizType = btmTypeVOMap.get(id); |
| | | if(Func.isEmpty(bizType)){ |
| | | return null; |
| | | } |
| | | //è·åçæ¶åæèµVO对象ï¼è¿æ ·é¿å
䏿¬¡æ§å
¨é¨Btm转VO太æ
¢çé®é¢ |
| | | return btmDO2VO(bizType,null); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸å¡ç±»åè·åå
å«ç屿§--ä¸å
å«åºç¡å±æ§ |
| | | * |
| | | * @param btmId ä¸å¡ç±»åçç¼å· |
| | | * @return 屿§çå
容 |
| | | */ |
| | | @Override |
| | | public List<OsBtmTypeAttributeVO> listAttributeByBtmId(String btmId) { |
| | | VciBaseUtil.alertNotNull(btmId, "ä¸å¡ç±»åçç¼å·"); |
| | | BizType[] bizTypes = new BizType[0]; |
| | | try { |
| | | bizTypes = platformClientUtil.getBtmService().getBizTypes(btmId); |
| | | } catch (PLException e) { |
| | | throw WebUtil.getVciBaseException(e); |
| | | } |
| | | if (Func.isEmpty(bizTypes)) { |
| | | return new ArrayList<>(); |
| | | } |
| | | BizType bizType = bizTypes[0]; |
| | | OsBtmTypeVO btmTypeVO = btmDO2VO(bizType,null); |
| | | List<OsBtmTypeAttributeVO> attributes = btmTypeVO.getAttributes(); |
| | | if (attributes == null) { |
| | | attributes = new ArrayList<>(); |
| | | } |
| | | return attributes.stream().sorted(((o1, o2) -> o1.getId().toLowerCase(Locale.ROOT).compareTo(o2.getId().toLowerCase(Locale.ROOT)))).collect(Collectors.toList()); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.constant.EnumIdConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.etm.EnumItem; |
| | | import com.vci.corba.omd.etm.EnumType; |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.pagemodel.OsEnumItemVO; |
| | | import com.vci.pagemodel.OsEnumVO; |
| | | import com.vci.pagemodel.OsStatusVO; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.web.service.WebEnumServiceI; |
| | | import com.vci.web.service.WebLifeCycleServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.util.HtmlUtils; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.constant.EnumIdConstant.LC_STATUS_SUBFIX; |
| | | |
| | | /** |
| | | * @Description æä¸¾æå¡ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 11:18 |
| | | */ |
| | | @Service |
| | | public class WebEnumServiceImpl implements WebEnumServiceI { |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * ç¨æ·æ°å¢æ°æ®çæ¶åå¯ä»¥æ¥ççå¯çº§ |
| | | */ |
| | | public static final String MY_DATA_SECRET = "myDataSecret"; |
| | | |
| | | /** |
| | | * å¹³å°è°ç¨å®¢æ·ç«¯ |
| | | */ |
| | | @Autowired |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | /** |
| | | * çå½å¨æ |
| | | */ |
| | | @Autowired |
| | | private WebLifeCycleServiceI lifeCycleService; |
| | | |
| | | /** |
| | | * è·åæä¸¾çå
容 |
| | | * @param enumCode æä¸¾çç¼å·ï¼è±æåç§°ï¼ |
| | | * @return keyæ¯è±æå¼ï¼valueæ¯ä¸æææ¬ |
| | | */ |
| | | @Override |
| | | public List<KeyValue> getEnum(String enumCode) throws VciBaseException { |
| | | if(StringUtils.isEmpty(enumCode)){ |
| | | return null; |
| | | } |
| | | enumCode = HtmlUtils.htmlUnescape(enumCode); |
| | | if(enumCode.endsWith(LC_STATUS_SUBFIX)){ |
| | | List<OsStatusVO> statusVOS = lifeCycleService.listStatusById(enumCode.replace(LC_STATUS_SUBFIX, "")); |
| | | if(CollectionUtils.isEmpty(statusVOS)){ |
| | | return new ArrayList<>(); |
| | | } |
| | | List<KeyValue> keyValueList = new ArrayList<>(); |
| | | statusVOS.stream().forEach(statusVO->{ |
| | | KeyValue kv = new KeyValue(); |
| | | kv.setKey(statusVO.getId()); |
| | | kv.setValue(statusVO.getName()); |
| | | kv.setAttributes(VciBaseUtil.objectToMap(statusVO)); |
| | | keyValueList.add(kv); |
| | | }); |
| | | return keyValueList; |
| | | } |
| | | return enumItem2KV(getEnumItemById(enumCode)); |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾çä¸æææ¬ |
| | | * @param enumCode æä¸¾çç¼å·ï¼è±æåç§°ï¼ |
| | | * @param enumKey æä¸¾çè±æå¼ï¼åºå大å°å |
| | | */ |
| | | @Override |
| | | public String getValue(String enumCode, String enumKey){ |
| | | List<KeyValue> allKV = getEnum(enumCode); |
| | | if(allKV.size()>0){ |
| | | for(KeyValue kv : allKV){ |
| | | if(kv.getKey().equalsIgnoreCase(enumKey)){ |
| | | return kv.getValue(); |
| | | } |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * æä¸¾çæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param enumType æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public OsEnumVO enumDO2VO(EnumType enumType) { |
| | | OsEnumVO enumVO = new OsEnumVO(); |
| | | if(enumType!=null){ |
| | | enumVO.setOid(enumType.oid); |
| | | enumVO.setCreator(enumType.creator); |
| | | enumVO.setLastModifier(enumType.modifier); |
| | | enumVO.setId(enumType.name); |
| | | enumVO.setName(enumType.label); |
| | | enumVO.setEnumValueDataType(enumType.type); |
| | | enumVO.setEnumValueDataTypeText("String".equalsIgnoreCase(enumType.type) ? "å符串":"æ´å"); |
| | | enumVO.setLength((int) enumType.length); |
| | | |
| | | try { |
| | | enumVO.setLastModifyTime(new Date(enumType.createTime)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | try { |
| | | enumVO.setCreateTime(new Date(enumType.createTime)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | try { |
| | | enumVO.setTs(VciDateUtil.str2Date(enumType.ts,VciDateUtil.DateTimeMillFormat)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | //æä¸¾é¡¹å¤ç |
| | | List<OsEnumItemVO> itemVOS = new ArrayList<>(); |
| | | Map<String,String> itemVOMap = new HashMap<>(); |
| | | if(enumType.items!=null && enumType.items.length > 0){ |
| | | for(int i = 0 ; i < enumType.items.length ; i ++){ |
| | | OsEnumItemVO enumItemVO = new OsEnumItemVO(); |
| | | EnumItem enumChild = enumType.items[i]; |
| | | enumItemVO.setValue(enumChild.value); |
| | | enumItemVO.setName(enumChild.name); |
| | | enumItemVO.setDescription(enumChild.description); |
| | | itemVOS.add(enumItemVO); |
| | | itemVOMap.put(enumChild.value,enumChild.name); |
| | | } |
| | | } |
| | | enumVO.setItems(itemVOS); |
| | | enumVO.setItemMaps(itemVOMap); |
| | | } |
| | | return enumVO; |
| | | } |
| | | |
| | | /** |
| | | * æä¸¾æç»è½¬æ¢ä¸ºKV |
| | | * |
| | | * @param enumItemVO æä¸¾æç»æ¾ç¤ºå¯¹è±¡ |
| | | * @return KV |
| | | */ |
| | | @Override |
| | | public List<KeyValue> enumItem2KV(Collection<OsEnumItemVO> enumItemVO) { |
| | | List<KeyValue> keyValueList = new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(enumItemVO)){ |
| | | enumItemVO.forEach(itemVO->{ |
| | | KeyValue keyValue = new KeyValue(); |
| | | keyValue.setKey(itemVO.getValue()); |
| | | keyValue.setValue(itemVO.getName()); |
| | | keyValueList.add(keyValue); |
| | | }); |
| | | } |
| | | return keyValueList; |
| | | } |
| | | |
| | | /** |
| | | * 使ç¨ç¼å·è·åæä¸¾æç» |
| | | * @param enumCode ç¼å· |
| | | * @return æç» |
| | | * @throws VciBaseException è°ç¨æå¡ç«¯åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | private List<OsEnumItemVO> getEnumItemById(String enumCode) throws VciBaseException{ |
| | | if(StringUtils.isBlank(enumCode)){ |
| | | return null; |
| | | } |
| | | Map<String, OsEnumVO> enumVOMap = selectAllEnumMap(); |
| | | if(MY_DATA_SECRET.equalsIgnoreCase(enumCode)){ |
| | | //å½åç¨æ· |
| | | OsEnumVO enumVO = enumVOMap.getOrDefault(EnumIdConstant.DATASECRET_ENUMNAME, null); |
| | | int userSecret = WebUtil.getInt(WebUtil.getCurrentUserSessionInfoNotException().getUserSecret()); |
| | | List<OsEnumItemVO> itemVOS = new ArrayList<>(); |
| | | if(enumVO!=null && !CollectionUtils.isEmpty(enumVO.getItems())){ |
| | | itemVOS = enumVO.getItems().stream().filter(item->WebUtil.getInt(item.getValue()) <= userSecret).collect(Collectors.toList()); |
| | | } |
| | | return itemVOS; |
| | | }else{ |
| | | return enumVOMap.getOrDefault(enumCode.toLowerCase(),new OsEnumVO()).getItems(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçæä¸¾æ å° |
| | | * |
| | | * @return keyæ¯æä¸¾çè±æåç§° |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public Map<String, OsEnumVO> selectAllEnumMap() { |
| | | return Optional.ofNullable(selectAllEnum()).orElseGet(()->new ArrayList<>()).stream().collect(Collectors.toMap(s->s.getId().toLowerCase(),t->t,(o1,o2)->o1)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçæä¸¾ |
| | | * |
| | | * @return æä¸¾çæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public List<OsEnumVO> selectAllEnum() { |
| | | //åé¢ä¸¤ä¸ªåæ°å±
ç¶å®å
¨æ²¡æä½ç¨ |
| | | try { |
| | | return enumDO2VOs(Arrays.stream(platformClientUtil.getEnumService().getEnumTypes("",1,1)).collect(Collectors.toList())); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æä¸¾çæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param enumItems æä¸¾ç对象 |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OsEnumVO> enumDO2VOs(Collection<EnumType> enumItems) { |
| | | List<OsEnumVO> enumVOS = new ArrayList<>(); |
| | | Optional.ofNullable(enumItems).orElseGet(()->new ArrayList<>()).stream().forEach(enumItem -> { |
| | | OsEnumVO enumVO = enumDO2VO(enumItem); |
| | | enumVOS.add(enumVO); |
| | | }); |
| | | return enumVOS; |
| | | } |
| | | |
| | | /** |
| | | * è·åæä¸¾çæ å° |
| | | * |
| | | * @param enumCode æä¸¾ç=ç¼å· |
| | | * @return æä¸¾ç弿 å° |
| | | */ |
| | | @Override |
| | | public Map<String, String> getEnumValueMap(String enumCode) { |
| | | if(StringUtils.isBlank(enumCode)){ |
| | | return null; |
| | | } |
| | | Map<String, OsEnumVO> enumVOMap = selectAllEnumMap(); |
| | | if(MY_DATA_SECRET.equalsIgnoreCase(enumCode)){ |
| | | //å½åç¨æ· |
| | | OsEnumVO enumVO = enumVOMap.getOrDefault(EnumIdConstant.DATASECRET_ENUMNAME, null); |
| | | int userSecret = WebUtil.getInt(WebUtil.getCurrentUserSessionInfoNotException().getUserSecret()); |
| | | Map<String,String> itemVOMap = new HashMap<>(); |
| | | if(enumVO!=null && !CollectionUtils.isEmpty(enumVO.getItemMaps())){ |
| | | enumVO.getItemMaps().forEach((key,value)->{ |
| | | if(WebUtil.getInt(key) <= userSecret){ |
| | | itemVOMap.put(key,value); |
| | | } |
| | | }); |
| | | } |
| | | return itemVOMap; |
| | | }else{ |
| | | return enumVOMap.getOrDefault(enumCode.toLowerCase(),new OsEnumVO()).getItemMaps(); |
| | | } |
| | | } |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebHomeTaskServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | |
| | | import com.vci.dto.WebHomeTaskActionDTO; |
| | | import com.vci.model.WebHomeTaskActionDO; |
| | | import com.vci.pagemodel.WebHomeTaskActionVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.pagemodel.SessionInfo; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.dto.WebHomeTaskActionDTO; |
| | | import com.vci.model.WebHomeTaskActionDO; |
| | | import com.vci.pagemodel.WebHomeTaskActionVO; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.service.WebHomeTaskServiceI; |
| | | import com.vci.web.util.WebUtil; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | if(!CollectionUtils.isEmpty(allActions)){ |
| | | allActions.stream().forEach(action->{ |
| | | WebHomeTaskActionVO taskActionVO = new WebHomeTaskActionVO(); |
| | | BeanUtil.convert(action,taskActionVO); |
| | | BeanUtilForVCI.convert(action,taskActionVO); |
| | | actionVOS.add(taskActionVO); |
| | | }); |
| | | } |
| | |
| | | public void addAction(WebHomeTaskActionDTO action){ |
| | | WebUtil.alertNotNull(action,"è¦æ·»å çä¿¡æ¯ä¸ºç©º",action.getId(),"èåç主é®",action.getName(),"èåçåç§°",action.getCountUrl(),"è°ç¨çå°å"); |
| | | WebHomeTaskActionDO actionDO = new WebHomeTaskActionDO(); |
| | | BeanUtil.convert(action,actionDO); |
| | | BeanUtilForVCI.convert(action,actionDO); |
| | | actionDO.setOid(VciBaseUtil.getPk()); |
| | | boService.addSave(actionDO); |
| | | } |
| | |
| | | public void editAction(WebHomeTaskActionDTO action) { |
| | | WebUtil.alertNotNull(action,"è¦ä¿®æ¹çä¿¡æ¯ä¸ºç©º",action.getOid(),"主é®",action.getTs(),"æ¶é´æ³"); |
| | | WebHomeTaskActionDO actionDO = boService.selectByOid(action.getOid(),WebHomeTaskActionDO.class); |
| | | BeanUtil.convert(action,actionDO); |
| | | BeanUtilForVCI.convert(action,actionDO); |
| | | boService.editSave(actionDO); |
| | | } |
| | | |
| | |
| | | List<WebHomeTaskActionVO> taskActionVOS = new ArrayList<>(); |
| | | dataGrid.getData().forEach(action->{ |
| | | WebHomeTaskActionVO taskActionVO = new WebHomeTaskActionVO(); |
| | | BeanUtil.convert((WebHomeTaskActionDO)action,taskActionVO); |
| | | BeanUtilForVCI.convert(action,taskActionVO); |
| | | taskActionVOS.add(taskActionVO); |
| | | }); |
| | | dataGrid.setData(taskActionVOS); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.corba.omd.lcm.Bound; |
| | | import com.vci.corba.omd.lcm.LifeCycle; |
| | | import com.vci.corba.omd.lcm.TransitionVO; |
| | | import com.vci.corba.omd.lcm.TransitionVOEvent; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.web.service.WebLifeCycleServiceI; |
| | | import com.vci.web.service.WebStatusServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.constant.FrameWorkBusLangCodeConstant.DATA_ID_NOT_EXIST; |
| | | import static com.vci.constant.WebLangCodeConstant.LIFE_CYCLE_ROUTER_NULL; |
| | | import static com.vci.constant.WebLangCodeConstant.LIFE_CYCLE_TRANS_ERROR; |
| | | |
| | | /** |
| | | * @Description çå½å¨ææå¡ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 10:39 |
| | | */ |
| | | @Service |
| | | public class WebLifeCycleServiceImpl implements WebLifeCycleServiceI { |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * å¹³å°å®¢æ·ç«¯ |
| | | */ |
| | | @Resource |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | /** |
| | | * çå½å¨ææå¡ |
| | | */ |
| | | @Resource |
| | | private WebStatusServiceI statusServiceI; |
| | | |
| | | /** |
| | | * è·è¿çå½å¨æç¶æï¼æ³¨æè°ç¨æ¤æ¹æ³å°±ä¼è¢«æä¹
åï¼ä¸åäºå¡æ§å¶ |
| | | * @param bo ä¸å¡ç±»åçæ°æ®å¯¹è±¡ |
| | | * @param targetStatus ç®æ ççå½å¨æç¶æï¼ä¸åºåå¤§å° |
| | | * @throws VciBaseException å¦æç®æ çå½å¨æåå½åçå½å¨æç¶ææ²¡æè¿æ¥çº¿æ¶æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void transStatus(BusinessObject bo, String targetStatus) { |
| | | WebUtil.alertNotNull(bo,"ä¸å¡æ°æ®å¯¹è±¡",bo.lctId,"çå½å¨æç¼ç ",bo.lcStatus,"å½åçå½å¨æç¶æ",targetStatus,"ç®æ çå½å¨æç¶æ"); |
| | | try { |
| | | OsLifeCycleLineVO transVO = getTransVO(bo.lctId, bo.lcStatus, targetStatus); |
| | | if(transVO!=null) { |
| | | doTransVO(bo, transVO); |
| | | }else{ |
| | | if(!targetStatus.equalsIgnoreCase(bo.lcStatus)){ |
| | | //ç¶æç¸åçæ¶åãï¼ä¸æåºå¼å¸¸ |
| | | throw new VciBaseException(LIFE_CYCLE_ROUTER_NULL,new String[]{bo.lcStatus,targetStatus}); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | throw new VciBaseException("è·è¿çå½å¨æç¶æå¤±è´¥ï¼", new Object[]{}, e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¹éè·è¿çå½å¨æç¶æï¼è¿äºæ°æ®ä¸çå½åç¶æå¿
须齿¯ä¸æ ·ï¼æè
æ¯å½åç¶æé½å¯ä»¥è¿æ¥å°ç®æ ç¶æ |
| | | * @param cboList ä¸å¡ç±»åå¯¹è±¡æ°æ® |
| | | * @param targetStatus ç®æ ç¶æï¼ä¸åºå大å°å |
| | | * @throws VciBaseException 转æ¢çå½å¨æåºéçæ¶åæåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void transCboStatus(List<BusinessObject> cboList,String targetStatus){ |
| | | WebUtil.alertNotNull(cboList,"ä¸å¡æ°æ®å¯¹è±¡",targetStatus,"ç®æ 对象"); |
| | | BusinessObject[] bos = new BusinessObject[cboList.size()]; |
| | | for(int i = 0 ; i < cboList.size() ; i ++){ |
| | | bos[i] = cboList.get(i); |
| | | } |
| | | transStatus(bos, targetStatus); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éè·è¿çå½å¨æç¶æï¼è¿äºæ°æ®ä¸çå½åç¶æå¿
须齿¯ä¸æ ·ï¼æè
æ¯å½åç¶æé½å¯ä»¥è¿æ¥å°ç®æ ç¶æ |
| | | * @param bos ä¸å¡ç±»åå¯¹è±¡æ°æ® |
| | | * @param targetStatus ç®æ ç¶æï¼ä¸åºå大å°å |
| | | * @throws VciBaseException 转æ¢çå½å¨æåºéçæ¶åæåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void transStatus(BusinessObject[] bos, String targetStatus){ |
| | | WebUtil.alertNotNull(bos,"ä¸å¡æ°æ®å¯¹è±¡",targetStatus,"ç®æ 对象"); |
| | | List<OsLifeCycleLineVO> transVOList = new ArrayList<>(); |
| | | List<BusinessObject> transBOs = new ArrayList<>(); |
| | | for(int i = 0 ; i < bos.length ; i ++){ |
| | | BusinessObject bo = bos[i]; |
| | | WebUtil.alertNotNull(bo,"ä¸å¡æ°æ®å¯¹è±¡",bo.lctId,"çå½å¨æç¼ç ",bo.lcStatus,"å½åçå½å¨æç¶æ"); |
| | | OsLifeCycleLineVO transVO = getTransVO(bo.lctId, bo.lcStatus, targetStatus); |
| | | if(transVO!=null){ |
| | | transVOList.add(transVO); |
| | | transBOs.add(bo); |
| | | }else{ |
| | | if(!targetStatus.equalsIgnoreCase(bo.lcStatus)){ |
| | | throw new VciBaseException("ä¸åå¨ä»ã{0}ãç¶æå°ã{1}ãç¶æççå½å¨æè¿æ¥çº¿ï¼è¯·è系管çåè¿è¡é
ç½®",new String[]{bo.lcStatus, targetStatus} ); |
| | | } |
| | | } |
| | | } |
| | | if(!CollectionUtils.isEmpty(transBOs)) { |
| | | batchTransVo(transBOs.toArray(new BusinessObject[0]), transVOList.toArray(new OsLifeCycleLineVO[0])); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åè¿æ¥çº¿ |
| | | * @param lcid çå½å¨æçç¼å· |
| | | * @param currentStatus å½åçç¶æ |
| | | * @param targetStatus ç®æ çç¶æ |
| | | * @return è¿æ¥çº¿ |
| | | * @throws VciBaseException 读ååºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public OsLifeCycleLineVO getTransVO(String lcid, String currentStatus,String targetStatus){ |
| | | WebUtil.alertNotNull(lcid,"çå½å¨æç¼ç ",currentStatus,"å½åç¶æ",targetStatus,"ç®æ ç¶æ"); |
| | | OsLifeCycleVO life = getLifeCycleById(lcid); |
| | | if(life == null ){ |
| | | throw new VciBaseException(DATA_ID_NOT_EXIST,new String[]{lcid}); |
| | | } |
| | | if(CollectionUtils.isEmpty(life.getLines())){ |
| | | throw new VciBaseException(LIFE_CYCLE_ROUTER_NULL,new String[]{lcid}); |
| | | } |
| | | return Optional.ofNullable(life.getLines()).orElseGet(()->new ArrayList<>()).stream().filter(s->s.getSourceLifeStatus().equalsIgnoreCase(currentStatus) && s.getTargetLifeStatus().equalsIgnoreCase(targetStatus)).findFirst().orElseGet(()->null); |
| | | } |
| | | |
| | | /** |
| | | * è·è¿ä¸å¡ç±»åççå½å¨æç¶æ |
| | | * @param obj ä¸å¡ç±»åæ°æ®å¯¹è±¡ |
| | | * @param lineVO è·è¿è·¯ç± |
| | | * @throws VciBaseException è·è¿åºéçæ¯ä¼æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void doTransVO(BusinessObject obj,OsLifeCycleLineVO lineVO) throws VciBaseException { |
| | | if(lineVO!=null){ |
| | | try { |
| | | TransitionVO transitionVO = lifeCycleLineVO2DO(lineVO); |
| | | platformClientUtil.getBOFService().transferBusinessObject(obj, transitionVO.destination); |
| | | } catch (PLException e) { |
| | | throw WebUtil.getVciBaseException(e); |
| | | } |
| | | }else{ |
| | | throw new VciBaseException(LIFE_CYCLE_ROUTER_NULL); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¹éæ§è¡è·è¿æä½ |
| | | * @param bos ä¸å¡ç±»åæ°æ® |
| | | * @param vos è·è¿å¯¹è±¡ |
| | | * @throws VciBaseException è·è¿åºéçæ¯ä¼æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void batchTransVo(BusinessObject[] bos,OsLifeCycleLineVO[] vos){ |
| | | batchTransVo(bos,vos,null); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éæ§è¡è·è¿æä½ï¼è¦æ±å¿
é¡»æ¯åä¸ä¸ªä¸å¡ç±»åä¸ç |
| | | * @param bos ä¸å¡ç±»åæ°æ®å¯¹è±¡ |
| | | * @param lineVOs è·è¿å¯¹è±¡ |
| | | * @param releaseStatus åå¸ç¶æï¼å¦æç®æ ç¶ææ¯åå¸ç¶ææ¶ä¼ éè¿ä¸ªå¼ |
| | | * @throws VciBaseException è·è¿åºéçæ¯ä¼æåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public void batchTransVo(BusinessObject[] bos,OsLifeCycleLineVO[] lineVOs,String[] releaseStatus){ |
| | | if(bos!=null && lineVOs != null && lineVOs.length == bos.length){ |
| | | try { |
| | | if(releaseStatus == null){ |
| | | releaseStatus = new String[lineVOs.length]; |
| | | for(int i = 0 ; i < lineVOs.length ; i ++ ){ |
| | | releaseStatus[i] = ""; |
| | | } |
| | | } |
| | | TransitionVO[] vos = new TransitionVO[lineVOs.length]; |
| | | for(int i = 0 ; i < lineVOs.length; i ++){ |
| | | vos[i] = lifeCycleLineVO2DO(lineVOs[i]); |
| | | } |
| | | platformClientUtil.getBOFService().batchTransferBusinessObjectAndRelease( |
| | | bos, vos, releaseStatus); |
| | | } catch (PLException e) { |
| | | throw WebUtil.getVciBaseException(e); |
| | | } |
| | | }else{ |
| | | if(bos == null){ |
| | | throw new VciBaseException(LIFE_CYCLE_TRANS_ERROR,new String[]{"ä¸å¡ç±»åæ°æ®ä¸ºç©º"}); |
| | | }else if(lineVOs ==null){ |
| | | throw new VciBaseException(LIFE_CYCLE_TRANS_ERROR,new String[]{"è·è¿è·¯ç±ä¸ºç©º"}); |
| | | }else{ |
| | | throw new VciBaseException(LIFE_CYCLE_TRANS_ERROR,new String[]{"è·è¿è·¯ç±åä¸å¡ç±»åæ°æ®é¿åº¦ä¸ç¸å"}); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è¿æ¥çº¿è½¬æ¢ä¸ºå¹³å°ç对象 |
| | | * @param lineVO è¿æ¥çº¿å¯¹è±¡ |
| | | * @return å¹³å°çè¿æ¥çº¿å¯¹è±¡ |
| | | */ |
| | | private TransitionVO lifeCycleLineVO2DO(OsLifeCycleLineVO lineVO) throws PLException { |
| | | TransitionVO transitionVO = new TransitionVO(); |
| | | transitionVO.id = lineVO.getOid(); |
| | | transitionVO.source = lineVO.getSourceLifeStatus(); |
| | | transitionVO.destination = lineVO.getTargetLifeStatus(); |
| | | transitionVO.connect = lineVO.getName() == null?"":lineVO.getName(); |
| | | //å äºä»¶ |
| | | TransitionVOEvent[] events; |
| | | if(lineVO.getEvents() == null || lineVO.getEvents().length == 0){ |
| | | events = new TransitionVOEvent[0]; |
| | | }else{ |
| | | events = new TransitionVOEvent[lineVO.getEvents().length]; |
| | | for (int j = 0; j < lineVO.getEvents().length; j++) { |
| | | OsLifeCycleLineEventVO eventVO = lineVO.getEvents()[j]; |
| | | TransitionVOEvent event = new TransitionVOEvent(); |
| | | event.id = eventVO.getOid(); |
| | | event.name = Func.isBlank(eventVO.getEventFullName()) ? |
| | | platformClientUtil.getLifeCycleService().getLCEventValueByKey(eventVO.getOid()):eventVO.getEventFullName(); |
| | | events[j] = event; |
| | | } |
| | | } |
| | | transitionVO.transitionVOEvents = events; |
| | | return transitionVO; |
| | | } |
| | | |
| | | /** |
| | | * éè¿ç¼å·è·åçå½å¨æç¶æå¯¹è±¡ï¼ |
| | | * |
| | | * @param lctId çå½å¨æç¼å· |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public OsLifeCycleVO getLifeCycleById(String lctId){ |
| | | WebUtil.alertNotNull(lctId,"ä¸å¡ç±»åç¼å·"); |
| | | return selectAllLifeCycleMap().getOrDefault(lctId,null); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢çå½å¨æçæ å° |
| | | * @return keyæ¯çå½å¨æçç¼å·ï¼ valueæ¯çå½å¨æç对象 |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public Map<String,OsLifeCycleVO> selectAllLifeCycleMap(){ |
| | | return Optional.ofNullable(selectAllLifeCycle()).orElseGet(()->new ArrayList<>()).stream().collect(Collectors.toMap(s->s.getId(), t->t,(o1, o2)->o1)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçå½å¨æç¶æ |
| | | * |
| | | * @return çå½å¨æç¶æç对象 |
| | | * @throws VciBaseException æ¥è¯¢çæ¶ååºéçæ¶å |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public List<OsLifeCycleVO> selectAllLifeCycle(){ |
| | | try { |
| | | LifeCycle[] lifeCyles = platformClientUtil.getLifeCycleService().getLifeCycles(); |
| | | return lifeCycleDO2VOs(Arrays.stream(lifeCyles).collect(Collectors.toList())); |
| | | } catch (PLException vciError) { |
| | | if(logger.isErrorEnabled()){ |
| | | logger.error(vciError.code,vciError); |
| | | } |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * çå½å¨æçæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param lifeCycles æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OsLifeCycleVO> lifeCycleDO2VOs(Collection<LifeCycle> lifeCycles){ |
| | | List<OsLifeCycleVO> lifeCycleVOS = new ArrayList<>(); |
| | | Optional.ofNullable(lifeCycles).orElseGet(()->new ArrayList<>()).stream().forEach(lifeCyle -> { |
| | | OsLifeCycleVO lifeCycleVO = lifeCycleDO2VO(lifeCyle); |
| | | lifeCycleVOS.add(lifeCycleVO); |
| | | }); |
| | | return lifeCycleVOS; |
| | | } |
| | | |
| | | /** |
| | | * çå½å¨æçæ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param lifeCycle æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public OsLifeCycleVO lifeCycleDO2VO(LifeCycle lifeCycle){ |
| | | OsLifeCycleVO life = new OsLifeCycleVO(); |
| | | Map<String, OsStatusVO> statusVOMap = statusServiceI.selectAllStatusMap(); |
| | | if(lifeCycle !=null) { |
| | | try { |
| | | life.setCreateTime(new Date(lifeCycle.createTime)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | life.setCreator(lifeCycle.creator); |
| | | life.setDescription(lifeCycle.description); |
| | | life.setId(lifeCycle.name); |
| | | life.setLastModifier(lifeCycle.modifier); |
| | | try { |
| | | life.setLastModifyTime(new Date(lifeCycle.modifyTime)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | life.setOid(lifeCycle.oid); |
| | | Bound[] bounds = lifeCycle.bounds; |
| | | if(bounds != null && bounds.length>0){ |
| | | List<OsLifeCycleLineBoundVO> boundVOList = new ArrayList<>(); |
| | | Arrays.stream(bounds).forEach(bound->{ |
| | | OsLifeCycleLineBoundVO boundVO = new OsLifeCycleLineBoundVO(); |
| | | boundVO.setId(bound.id); |
| | | boundVO.setName(bound.name); |
| | | boundVO.setCellx(bound.cellx); |
| | | boundVO.setCelly(bound.celly); |
| | | boundVO.setCellh(bound.cellh); |
| | | boundVO.setCellw(bound.cellw); |
| | | boundVO.setCellicon(bound.cellicon); |
| | | boundVOList.add(boundVO); |
| | | }); |
| | | life.setBounds(boundVOList.toArray(new OsLifeCycleLineBoundVO[boundVOList.size()])); |
| | | }else{ |
| | | life.setBounds(new OsLifeCycleLineBoundVO[0]); |
| | | } |
| | | List<OsLifeCycleLineVO> lineVOS = new ArrayList<>(); |
| | | if(lifeCycle.routes!=null && lifeCycle.routes.length>0){ |
| | | Arrays.stream(lifeCycle.routes).forEach(route->{ |
| | | OsLifeCycleLineVO lineVO = new OsLifeCycleLineVO(); |
| | | lineVO.setSourceLifeStatus(route.source); |
| | | lineVO.setSourceLifeStatusName(statusVOMap.getOrDefault(route.source,new OsStatusVO()).getName()); |
| | | lineVO.setTargetLifeStatus(route.destination); |
| | | lineVO.setTargetLifeStatusName(statusVOMap.getOrDefault(route.destination,new OsStatusVO()).getName()); |
| | | lineVO.setOid(route.id); |
| | | lineVO.setName(route.connect); |
| | | if(route.transitionVOEvents ==null || route.transitionVOEvents.length == 0){ |
| | | lineVO.setEvents(new OsLifeCycleLineEventVO[0]); |
| | | }else { |
| | | OsLifeCycleLineEventVO[] eventVOs = new OsLifeCycleLineEventVO[route.transitionVOEvents.length]; |
| | | for (int i = 0; i < route.transitionVOEvents.length; i++) { |
| | | com.vci.corba.omd.lcm.TransitionVOEvent event = route.transitionVOEvents[i]; |
| | | OsLifeCycleLineEventVO eventVO = new OsLifeCycleLineEventVO(); |
| | | eventVO.setOid(event.id); |
| | | eventVO.setEventFullName(event.name); |
| | | eventVOs[i] = eventVO; |
| | | } |
| | | lineVO.setEvents(eventVOs); |
| | | } |
| | | lineVOS.add(lineVO); |
| | | }); |
| | | } |
| | | life.setLines(lineVOS); |
| | | life.setStartStatus(lifeCycle.startState); |
| | | life.setStartStatusName(statusVOMap.getOrDefault(lifeCycle.startState,new OsStatusVO()).getName()); |
| | | life.setName(lifeCycle.tag); |
| | | try { |
| | | life.setTs(VciDateUtil.str2Date(lifeCycle.ts,VciDateUtil.DateTimeMillFormat)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return life; |
| | | } |
| | | |
| | | /** |
| | | * 使ç¨çå½å¨æçç¼å·è·åå
å«çç¶ææ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param lifeCycleId çå½å¨æçç¼å· |
| | | * @return ç¶æçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OsStatusVO> listStatusById(String lifeCycleId) { |
| | | OsLifeCycleVO lifeCycleVO = getLifeCycleById(lifeCycleId); |
| | | if(lifeCycleVO == null || StringUtils.isBlank(lifeCycleVO.getOid())){ |
| | | return new ArrayList<>(); |
| | | } |
| | | Set<String> hasStatusIdSet = new HashSet<>(); |
| | | lifeCycleVO.getLines().stream().forEach(lineVO->{ |
| | | hasStatusIdSet.add(lineVO.getSourceLifeStatus()); |
| | | hasStatusIdSet.add(lineVO.getTargetLifeStatus()); |
| | | }); |
| | | Map<String, OsStatusVO> statusVOMap = statusServiceI.selectAllStatusMap(); |
| | | List<OsStatusVO> statusVOList = new ArrayList<>(); |
| | | hasStatusIdSet.stream().forEach(statusId->{ |
| | | statusVOList.add(statusVOMap.getOrDefault(statusId,new OsStatusVO())); |
| | | }); |
| | | return statusVOList; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.pagemodel.OsAttributeVO; |
| | | import com.vci.pagemodel.OsBtmTypeVO; |
| | | import com.vci.pagemodel.OsLinkTypeAttributeVO; |
| | | import com.vci.pagemodel.OsLinkTypeVO; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.web.service.WebAttributeServiceI; |
| | | import com.vci.web.service.WebBtmServiceI; |
| | | import com.vci.web.service.WebEnumServiceI; |
| | | import com.vci.web.service.WebLinkTypeServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description 龿¥ç±»åæå¡ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 11:42 |
| | | */ |
| | | @Service |
| | | public class WebLinkTypeServiceImpl implements WebLinkTypeServiceI { |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | |
| | | /** |
| | | * å¹³å°çè°ç¨å·¥å
·ç±» |
| | | */ |
| | | @Resource |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | /** |
| | | * ä¸å¡ç±»åæå¡ |
| | | */ |
| | | @Resource |
| | | private WebBtmServiceI btmService; |
| | | |
| | | /** |
| | | * æä¸¾çæå¡ |
| | | */ |
| | | @Resource |
| | | private WebEnumServiceI enumService; |
| | | |
| | | /** |
| | | * 屿§çæå¡ |
| | | */ |
| | | @Resource |
| | | private WebAttributeServiceI attributeService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ææç龿¥ç±»å |
| | | * |
| | | * @return 龿¥ç±»å对象 |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public List<OsLinkTypeVO> selectAllLink() { |
| | | try { |
| | | return linkTypeDO2VOs(Arrays.stream(platformClientUtil.getLinkTypeService().getLinkTypes()).collect(Collectors.toList())); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçä¸å¡ç±»åæ å° |
| | | * |
| | | * @return key æ¯ä¸å¡çè±æåç§°çå°å |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public Map<String, OsLinkTypeVO> selectAllLinkMap() { |
| | | return Optional.ofNullable(selectAllLink()).orElseGet(()->new ArrayList<>()).stream().collect(Collectors.toMap(s->s.getId().toLowerCase(), t->t,(o1, o2)->o1)); |
| | | } |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param linkTypes æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OsLinkTypeVO> linkTypeDO2VOs(Collection<LinkType> linkTypes) { |
| | | List<OsLinkTypeVO> VOS = new ArrayList<>(); |
| | | Optional.ofNullable(linkTypes).orElseGet(()->new ArrayList<>()).stream().forEach(linkType -> { |
| | | OsLinkTypeVO vo = linkTypeDO2VO(linkType); |
| | | VOS.add(vo); |
| | | }); |
| | | return VOS; |
| | | } |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param linkType æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public OsLinkTypeVO linkTypeDO2VO(LinkType linkType) { |
| | | OsLinkTypeVO vo = new OsLinkTypeVO(); |
| | | if(linkType !=null){ |
| | | vo.setOid(linkType.oid); |
| | | vo.setCreator(linkType.creator); |
| | | vo.setLastModifier(linkType.modifier); |
| | | try { |
| | | vo.setCreateTime(VciDateUtil.long2Date(linkType.createTime)); |
| | | vo.setLastModifyTime(VciDateUtil.long2Date(linkType.modifyTime)); |
| | | vo.setTs(VciDateUtil.long2Date(linkType.ts)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | vo.setDescription(linkType.description); |
| | | vo.setId(linkType.name); |
| | | vo.setName(linkType.tag); |
| | | vo.setFromBtmTypeVOS(btmService.listBtmByIds(Arrays.stream(linkType.btmItemsFrom).collect(Collectors.toSet()))); |
| | | if(!CollectionUtils.isEmpty(vo.getFromBtmTypeVOS())){ |
| | | vo.setFromBtmType(Arrays.stream(linkType.btmItemsFrom).collect(Collectors.joining(","))); |
| | | vo.setFromBtmTypeName(vo.getFromBtmTypeVOS().stream().map(OsBtmTypeVO::getName).collect(Collectors.joining(","))); |
| | | } |
| | | vo.setToBtmTypeVOS(btmService.listBtmByIds(Arrays.stream(linkType.btmItemsTo).collect(Collectors.toSet()))); |
| | | if(!CollectionUtils.isEmpty(vo.getToBtmTypeVOS())){ |
| | | vo.setToBtmType(Arrays.stream(linkType.btmItemsTo).collect(Collectors.joining(","))); |
| | | vo.setToBtmTypeName(vo.getToBtmTypeVOS().stream().map(OsBtmTypeVO::getName).collect(Collectors.joining(","))); |
| | | } |
| | | vo.setImplClass(linkType.implClass); |
| | | vo.setShape(linkType.shape); |
| | | List<OsAttributeVO> attributeVOS = attributeService.listAttrByIds(Arrays.stream(linkType.attributes).collect(Collectors.toList())); |
| | | List<OsLinkTypeAttributeVO> linkTypeAttributeVOS = new ArrayList<>(); |
| | | Optional.ofNullable(attributeVOS).orElseGet(()->new ArrayList<>()).stream().forEach(attributeVO->{ |
| | | OsLinkTypeAttributeVO linkTypeAttributeVO = new OsLinkTypeAttributeVO(); |
| | | BeanUtilForVCI.convert(attributeVO,linkTypeAttributeVO); |
| | | linkTypeAttributeVO.setPkLinkType(vo.getOid()); |
| | | if(StringUtils.isNotBlank(attributeVO.getBtmTypeId())){ |
| | | linkTypeAttributeVO.setReferFlag(true); |
| | | linkTypeAttributeVO.setReferBtmTypeId(attributeVO.getBtmTypeId()); |
| | | } |
| | | if(StringUtils.isNotBlank(attributeVO.getEnumId())){ |
| | | linkTypeAttributeVO.setEnumFlag(true); |
| | | linkTypeAttributeVO.setEnumItemMap(enumService.getEnumValueMap(linkTypeAttributeVO.getEnumId())); |
| | | } |
| | | linkTypeAttributeVOS.add(linkTypeAttributeVO); |
| | | }); |
| | | vo.setAttributes(linkTypeAttributeVOS); |
| | | } |
| | | return vo; |
| | | } |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebLoServiceImpl.java ÐÞ¸Ä |
| | |
| | | import com.vci.corba.query.ObjectQueryService; |
| | | import com.vci.corba.query.data.BOAndLO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.query.UILinkTypeDataQuery; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.web.properties.WebProperties; |
| | | import com.vci.web.query.UILinkTypeDataQuery; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.service.WebLoServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | |
| | | */ |
| | | @Service |
| | | public class WebLoServiceImpl implements WebLoServiceI { |
| | | /** |
| | | * æ¥å¿å¯¹è±¡ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * å¤è¯è¨åç¼ |
| | | */ |
| | | private final String msgCodePrefix = "com.vci.web.loService."; |
| | | |
| | | /** |
| | | * æ¥å¿å¯¹è±¡ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | |
| | | @Autowired |
| | | private WebBoServiceI boService; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @Autowired |
| | | private WebProperties webProperties; |
| | | |
| | |
| | | LO_BASE_FIELD_MAP.put("oid","oid"); |
| | | LO_BASE_FIELD_MAP.put("creator","creator"); |
| | | LO_BASE_FIELD_MAP.put("createTime","createTime"); |
| | | //LO_BASE_FIELD_MAP.put("lastModifier","lastModifier"); |
| | | //LO_BASE_FIELD_MAP.put("lastModifyTime","lastModifyTime"); |
| | | LO_BASE_FIELD_MAP.put("modifier","lastModifier"); |
| | | LO_BASE_FIELD_MAP.put("modifyTime","lastModifyTime"); |
| | | LO_BASE_FIELD_MAP.put("fromOid","f_oid"); |
| | | //LO_BASE_FIELD_MAP.put("fromRevisionOid","f_revisionoid"); |
| | | LO_BASE_FIELD_MAP.put("fromRevOid","f_revisionoid"); |
| | | LO_BASE_FIELD_MAP.put("fromNameOid","f_nameoid"); |
| | | //LO_BASE_FIELD_MAP.put("fromBTMName","f_btwname"); |
| | | LO_BASE_FIELD_MAP.put("fromBTName","f_btwname"); |
| | | //LO_BASE_FIELD_MAP.put("toRevisionOid","t_revisionoid"); |
| | | LO_BASE_FIELD_MAP.put("toRevOid","t_revisionoid"); |
| | | LO_BASE_FIELD_MAP.put("toNameOid","t_nameoid"); |
| | | //LO_BASE_FIELD_MAP.put("toBTMName","t_btwname"); |
| | | LO_BASE_FIELD_MAP.put("toBTName","t_btwname"); |
| | | LO_BASE_FIELD_MAP.put("toOid","t_oid"); |
| | | LO_BASE_FIELD_MAP.put("ts","ts"); |
| | | //LO_BASE_FIELD_MAP.put("linkTypeName","linkTypeName"); |
| | | LO_BASE_FIELD_MAP.put("ltName","linkTypeName"); |
| | | } |
| | | |
| | |
| | | String[] sort = ph.getSort().split(","); |
| | | String[] order = ph.getOrder().split(","); |
| | | if(sort.length != order.length){ |
| | | throw new VciBaseException(msgCodePrefix + ".sortlengtherror",new Object[]{sort.length,order.length}); |
| | | throw new VciBaseException(msgCodePrefix + "sortLengthError",new Object[]{sort.length,order.length}); |
| | | } |
| | | List<OrderInfo> orderInfoList = new ArrayList<OrderInfo>(); |
| | | for(int i = 0 ; i < sort.length ;i++){ |
| | |
| | | } |
| | | return rtnOBJs; |
| | | } |
| | | } catch (PLException e) { |
| | | // logger.error(e.error_code,e); |
| | | // throw WebUtil.getVciBaseException(e); |
| | | } catch (Exception e) { |
| | | logger.error("æ¥è¯¢è¿æ¥ç±»å失败ï¼",e); |
| | | throw new VciBaseException("æ¥è¯¢é¾æ¥ç±»å失败ï¼", new Object[]{}, e); |
| | | } |
| | | return rtnOBJs; |
| | | } |
| | | // |
| | | // @Override |
| | | // public Map<String, BusinessObject> queryLinkedCbo(LinkObject[] lo, |
| | | // boolean isDirection) throws VciBaseException { |
| | | // LinkObject[] clos = new LinkObject[lo.length]; |
| | | // for(int i =0 ; i < lo.length; i ++){ |
| | | // LinkObject clo = new LinkObject(); |
| | | // clo = lo[i]; |
| | | // clos[i] = clo; |
| | | // } |
| | | // return queryLinkedCbo(clos,isDirection); |
| | | // } |
| | | |
| | | @Override |
| | | public Map<String, BusinessObject> queryLinkedCbo(List los, |
| | |
| | | WebUtil.alertNotNull(loName,"龿¥"); |
| | | return null; |
| | | //todo å¨å¹³å°éé¢éè¦ä¼ å
¥å¯¹è±¡ï¼ç°å¨æ¯å符串ï¼éè¦çå¹³å°å¦ä½å¤ç |
| | | // return loOperation.createLinkObject(loName,WebUtil.getCurrentUserId()); |
| | | //return loOperation.createLinkObject(loName,WebUtil.getCurrentUserId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 龿¥ç±»ååå
³èçto端 |
| | | */ |
| | | @Override |
| | | public List<com.vci.corba.query.data.BOAndLO> queryCLOAndBOBySchema(UILinkTypeDataQuery linkTypeDataQuery) { |
| | | public List<BOAndLO> queryCLOAndBOBySchema(UILinkTypeDataQuery linkTypeDataQuery) { |
| | | VciBaseUtil.alertNotNull(linkTypeDataQuery,"龿¥ç±»åæ¥è¯¢å¯¹è±¡",linkTypeDataQuery.getQueryTemplateName(),"æ¥è¯¢æ¨¡æ¿çåç§°"); |
| | | QueryTemplate qt = boService.getQtByName(linkTypeDataQuery.getQueryTemplateName(),linkTypeDataQuery.getReplaceMap()); |
| | | return queryCLOAndBOByQueryTemplate(qt,linkTypeDataQuery); |
| | |
| | | * @param linkTypeDataQuery 龿¥ç±»åçæ¥è¯¢å¯¹è±¡ |
| | | * @return 龿¥ç±»ååä¸å¡ç±»å |
| | | */ |
| | | private List<com.vci.corba.query.data.BOAndLO> queryCLOAndBOByQueryTemplate(QueryTemplate qt,UILinkTypeDataQuery linkTypeDataQuery){ |
| | | private List<BOAndLO> queryCLOAndBOByQueryTemplate(QueryTemplate qt,UILinkTypeDataQuery linkTypeDataQuery){ |
| | | if(StringUtils.isNotBlank(linkTypeDataQuery.getToBtmType()) && StringUtils.isBlank(qt.getBtmType())) { |
| | | qt.setBtmType(linkTypeDataQuery.getToBtmType()); |
| | | } |
| | |
| | | } |
| | | boService.setPageAndOrderToQT(qt,linkTypeDataQuery.getPageHelper()); |
| | | try { |
| | | com.vci.corba.query.data.BOAndLO[] bos = platformClientUtil.getQueryService().getBOAndLOS(qt.getId(), OQTool.qtTOXMl(qt).asXML(),linkTypeDataQuery.getParentOid()==null?"":linkTypeDataQuery.getParentOid()); |
| | | BOAndLO[] bos = platformClientUtil.getQueryService().getBOAndLOS(qt.getId(), OQTool.qtTOXMl(qt).asXML(),linkTypeDataQuery.getParentOid()==null?"":linkTypeDataQuery.getParentOid()); |
| | | return Arrays.stream(bos).collect(Collectors.toList()); |
| | | } catch (PLException e) { |
| | | // logger.error(e.error_code,e); |
| | |
| | | * @return 龿¥å¯¹è±¡åto端ä¸å¡å¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<com.vci.corba.query.data.BOAndLO> queryCLOAndBoByLinkType(UILinkTypeDataQuery linkTypeDataQuery){ |
| | | public List<BOAndLO> queryCLOAndBoByLinkType(UILinkTypeDataQuery linkTypeDataQuery){ |
| | | VciBaseUtil.alertNotNull(linkTypeDataQuery,"龿¥ç±»åæ¥è¯¢å¯¹è±¡",linkTypeDataQuery.getLinkType(),"龿¥ç±»åçåç§°"); |
| | | QueryTemplate qt = null; |
| | | if(StringUtils.isBlank(linkTypeDataQuery.getQueryTemplateName())){ |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 龿¥ç±»å |
| | | * |
| | | * @param clo 龿¥ç±»å |
| | | * @param attributeName 屿§åç§° |
| | | * @param attributeValue 屿§çå¼ |
| | | */ |
| | | @Override |
| | | public void setAttribute(LinkObject clo, String attributeName, String attributeValue) { |
| | | AttributeValue[] attrValues = clo.newAttrValList; |
| | | ArrayList<AttributeValue> attrValList = new ArrayList(); |
| | | AttributeValue attrVal; |
| | | int i; |
| | | if (attrValues != null && attrValues.length > 0) { |
| | | AttributeValue[] var9 = attrValues; |
| | | i = attrValues.length; |
| | | |
| | | for(int var7 = 0; var7 < i; ++var7) { |
| | | attrVal = var9[var7]; |
| | | attrValList.add(attrVal); |
| | | } |
| | | } |
| | | |
| | | attrVal = null; |
| | | boolean isExist = false; |
| | | |
| | | for(i = 0; i < attrValList.size(); ++i) { |
| | | attrVal = attrValList.get(i); |
| | | if (attrVal.attrName.toUpperCase().equals(attributeName.toUpperCase())) { |
| | | attrVal.attrVal = attributeValue; |
| | | isExist = true; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (!isExist) { |
| | | attrVal = new AttributeValue(); |
| | | attrVal.attrName = attributeName.toUpperCase(); |
| | | attrVal.attrVal = attributeValue; |
| | | attrValList.add(attrVal); |
| | | } |
| | | |
| | | clo.newAttrValList = attrValList.toArray(new AttributeValue[attrValList.size()]); |
| | | } |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessCommandServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.bo.FlowNoticeInfo; |
| | | import com.vci.constant.WFVariablesKeyConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | |
| | | import com.vci.corba.workflow.data.FlowInstanceInfo; |
| | | import com.vci.corba.workflow.data.MapTransfersInfo; |
| | | import com.vci.corba.workflow.data.TasksAssignedInfo; |
| | | import com.vci.dto.ProcessStartConfigDTO; |
| | | import com.vci.dto.ProcessTemplateVO; |
| | | import com.vci.dto.VciFileObjectDTO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | |
| | | import com.vci.pagemodel.ProcessOutcomeVO; |
| | | import com.vci.pagemodel.ProcessTaskVO; |
| | | import com.vci.pagemodel.ProcessUserVO; |
| | | import com.vci.starter.web.annotation.FlowNotifyAfter; |
| | | import com.vci.starter.web.annotation.FlowNotifyBefore; |
| | | import com.vci.starter.web.annotation.FlowNotifyWeb; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.enumpck.DataSecretEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.SessionInfo; |
| | | import com.vci.starter.web.util.BusAnnotationUtil; |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.web.annotation.FlowNotifyAfter; |
| | | import com.vci.web.annotation.FlowNotifyBefore; |
| | | import com.vci.web.annotation.FlowNotifyWeb; |
| | | import com.vci.bo.FlowNoticeInfo; |
| | | import com.vci.constant.WFVariablesKeyConstant; |
| | | import com.vci.web.dao.WebProcessDaoI; |
| | | import com.vci.dto.ProcessStartConfigDTO; |
| | | import com.vci.web.properties.WebProperties; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.BusAnnotationUtil; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | private WebProcessDaoI processDao; |
| | | |
| | | @Autowired |
| | | private OsLifeCycleServiceI lifeCycleService; |
| | | |
| | | |
| | | @Autowired |
| | | private WebProperties webProperties; |
| | | private WebLifeCycleServiceI lifeCycleService; |
| | | |
| | | /** |
| | | * æä»¶ä¸ä¼ æå¡ |
| | |
| | | throw WebUtil.getVciBaseException(e); |
| | | } |
| | | if (StringUtils.isNotBlank(config.getStartStatus())) { |
| | | lifeCycleService.transCboStatus(allCbo, config.getStartStatus()); |
| | | try { |
| | | lifeCycleService.transCboStatus(allCbo, config.getStartStatus()); |
| | | } catch (Exception e) { |
| | | throw new VciBaseException("å¯å¨æµç¨æ¶ï¼æ¹éè·è¿çå½å¨æç¶æå¤±è´¥ï¼", new Object[]{}, e); |
| | | } |
| | | } |
| | | callAfter(processInstanceId,null,null,currentTime); |
| | | } |
| | |
| | | } |
| | | List<Map> mapList = boService.cbos2Map(workItemCbos); |
| | | callBefore(mapList,"suspend",note,currentTime); |
| | | lifeCycleService.transCboStatus(needUpdateCbos, "Suspended"); |
| | | try { |
| | | lifeCycleService.transCboStatus(needUpdateCbos, "Suspended"); |
| | | } catch (Exception e) { |
| | | throw new VciBaseException("æèµ·æµç¨æ¶ï¼æ¹éè·è¿çå½å¨æç¶æå¤±è´¥ï¼", new Object[]{}, e); |
| | | } |
| | | callAfter(null,null,mapList,currentTime); |
| | | } |
| | | |
| | | /** |
| | | * æ¢å¤æµç¨ |
| | | * @param executionId æµç¨ä¸»é® |
| | | * @throws VciBaseException |
| | | */ |
| | | @Override |
| | | public void resumeProcess(String executionId) throws VciBaseException { |
| | | WebUtil.alertNotNull(executionId, "æµç¨æ§è¡å®ä¾ç主é®"); |
| | |
| | | } |
| | | |
| | | callBefore(null,"resume","",currentTime); |
| | | lifeCycleService.transCboStatus(needUpdateCbos, "Executing"); |
| | | try { |
| | | lifeCycleService.transCboStatus(needUpdateCbos, "Executing"); |
| | | } catch (Exception e) { |
| | | throw new VciBaseException("æ¢å¤æµç¨æ¶ï¼æ¹éè·è¿çå½å¨æç¶æå¤±è´¥ï¼", new Object[]{}, e); |
| | | } |
| | | callAfter(null,boService.cbos2Map(workItemCbos),null,currentTime); |
| | | } |
| | | |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebProcessDefineServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.constant.FileTypeConstants; |
| | | import com.vci.constant.WFVariablesKeyConstant; |
| | | import com.vci.corba.omd.data.LinkObject; |
| | | import com.vci.dto.ProcessTemplateVO; |
| | | import com.vci.frameworkcore.compatibility.OrgDeptQueryServiceI; |
| | | import com.vci.frameworkcore.compatibility.SmRoleQueryServiceI; |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.model.WFProcessClassifyDO; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.starter.web.enumpck.DataSecretEnum; |
| | | import com.vci.starter.web.enumpck.UserSecretEnum; |
| | |
| | | import com.vci.starter.web.util.Md5; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.constant.FileTypeConstants; |
| | | import com.vci.constant.WFVariablesKeyConstant; |
| | | import com.vci.web.dao.WebProcessDaoI; |
| | | import com.vci.model.WFProcessClassifyDO; |
| | | import com.vci.web.properties.WebProperties; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.dom4j.Document; |
| | |
| | | |
| | | @Autowired |
| | | private WebProcessDaoI processDao; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private WebProperties webProperties; |
| | | |
| | | @Autowired |
| | | private WebProcessCommandServiceI proCmdService; |
| | | |
| | | @Autowired |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | /** |
| | | * ä¸å¡æ°æ®æå¡ |
| | |
| | | @Autowired |
| | | private WebBoServiceI boService; |
| | | |
| | | |
| | | /** |
| | | * è§è²æå¡ |
| | | */ |
| | | @Autowired |
| | | private SmRoleQueryServiceI roleQueryService; |
| | | |
| | | @Autowired |
| | | private OrgDeptQueryServiceI deptQueryServiceI; |
| | | |
| | | @Autowired |
| | | private SmUserQueryServiceI userQueryServiceI; |
| | | |
| | | @Autowired |
| | | private WebSecretServiceI secretService; |
| | | |
| | |
| | | */ |
| | | @Autowired |
| | | private VciFileObjectServiceI fileObjectService; |
| | | |
| | | |
| | | @Autowired |
| | | private OsEnumServiceI enumService; |
| | | |
| | | |
| | | private final String msgCodePrefix = "com.vci.web.flow."; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.model.SmPasswordStrategyDO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.SmPasswordStrategyVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.service.SmUserQueryServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.service.WebPwdStrategyQueryServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.constant.FrameWorkBusLangCodeConstant.DATA_OID_NOT_EXIST; |
| | | |
| | | /** |
| | | * @Description å¯ç çç¥æ¥è¯¢ |
| | | * @Author dangsn |
| | | * @Date 2024/11/29 11:23 |
| | | */ |
| | | @Service |
| | | public class WebPwdStrategyQueryServiceImpl implements WebPwdStrategyQueryServiceI { |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * å¹³å°è°ç¨å®¢æ·ç«¯ |
| | | */ |
| | | @Autowired |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | /** |
| | | * ä¸å¡æ°æ®æå¡ |
| | | */ |
| | | @Autowired |
| | | private WebBoServiceI boService; |
| | | |
| | | /** |
| | | * ç¨æ·æ¥è¯¢æå¡ |
| | | */ |
| | | @Autowired |
| | | private SmUserQueryServiceI smUserQueryService; |
| | | |
| | | /** |
| | | * è·åé»è®¤å¯ç çç¥ |
| | | * @return |
| | | */ |
| | | public SmPasswordStrategyVO getPasswordStrategyVOByDefault(){ |
| | | //è·åé»è®¤ç |
| | | VciQueryWrapperForDO queryWrapperForDO = new VciQueryWrapperForDO(null, SmPasswordStrategyDO.class); |
| | | queryWrapperForDO.eq("plisdefault","1"); |
| | | List<BusinessObject> cboList = boService.queryBySql(queryWrapperForDO.getSelectFieldSql() + " from plpasswordstrategy " + |
| | | queryWrapperForDO.getTableNick() + queryWrapperForDO.getLinkTableSql() + |
| | | (StringUtils.isBlank(queryWrapperForDO.getWhereSql()) ? "" : (" where " + queryWrapperForDO.getWhereSql())), null); |
| | | if(!CollectionUtils.isEmpty(cboList)){ |
| | | SmPasswordStrategyDO passwordStrategyDO = new SmPasswordStrategyDO(); |
| | | WebUtil.copyValueToObjectFromCbos(cboList.get(0),passwordStrategyDO); |
| | | return pwdStrategyDO2VO(passwordStrategyDO); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * å¯ç çç¥do对象转vo对象 |
| | | * @param smPasswordStrategyDO |
| | | * @return |
| | | */ |
| | | private SmPasswordStrategyVO pwdStrategyDO2VO(SmPasswordStrategyDO smPasswordStrategyDO){ |
| | | SmPasswordStrategyVO passwordStrategyVO = new SmPasswordStrategyVO(); |
| | | BeanUtilForVCI.convert(smPasswordStrategyDO,passwordStrategyVO); |
| | | return passwordStrategyVO; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·ç主é®ï¼è·åç¨æ·çå¯ç å®å
¨çç¥ |
| | | * @param userOid ç¨æ·çä¸»é® |
| | | * @return å¯ç å®å
¨çç¥çæ¾ç¤ºå¯¹è±¡ï¼å¦æä¸åå¨åä¼è¿åNull |
| | | * @throws VciBaseException åæ°ä¸ºç©ºæè
æ°æ®åºæ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public SmPasswordStrategyVO getPasswordStrategyVOByUserOid(String userOid) throws PLException { |
| | | WebUtil.alertNotNull(userOid,"ç¨æ·ç主é®"); |
| | | if(!smUserQueryService.checkUserExist(null,userOid)){ |
| | | throw new VciBaseException(DATA_OID_NOT_EXIST); |
| | | } |
| | | String sql = "select plpasswordstrategyuid,pluseruid from pluserpasswordstrategy where pluseruid = '"+ userOid +"'"; |
| | | List<BusinessObject> cbos = boService.queryBySql(sql, null); |
| | | if(Func.isNotEmpty(cbos)){ |
| | | return getPasswordStrategyVOByOid(ObjectTool.getNewBOAttributeValue(cbos.get(0), "plpasswordstrategyuid")); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * æ¹éæ ¹æ®ç¨æ·ç䏻鮿¥è·åå¯ç çç¥ |
| | | * @param userOidCollection ç¨æ·ä¸»é®éå |
| | | * @return å¯ç çç¥çæ¾ç¤ºå¯¹è±¡ï¼keyæ¯ç¨æ·ä¸»é®,valueæ¯è¿ä¸ªç¨æ·å
³èçå¯ç çç¥ |
| | | */ |
| | | @Override |
| | | public Map<String, SmPasswordStrategyVO> batchSmPwdStrategyByUserOids(Collection<String> userOidCollection) { |
| | | if(CollectionUtils.isEmpty(userOidCollection)){ |
| | | return new HashMap<>(); |
| | | } |
| | | Map<String,SmPasswordStrategyVO> smPasswordStrategyVOMap = new HashMap<>(); |
| | | Map<String,String> userPasswordStrategyVOMap = new HashMap<>(); |
| | | |
| | | Map<String/*ç¨æ·id*/, SmPasswordStrategyVO/*å¯ç çç¥*/> returnMap = new HashMap<>(); |
| | | WebUtil.switchCollectionForOracleIn(userOidCollection).stream().forEach(userOids->{ |
| | | //æ¥è¯¢å¯ç çç¥å
³èä¿¡æ¯ï¼keyä¸ºç¨æ·oidï¼value为å¯ç çç¥oid |
| | | Map<String, String> userPwdStrategyMap = mapUserPwdStrategy(userOids); |
| | | userPasswordStrategyVOMap.putAll(userPwdStrategyMap); |
| | | //æ¥è¯¢å¯ç çç¥ï¼key为å¯ç çç¥ä¸»é®ï¼value为å¯ç çç¥ |
| | | smPasswordStrategyVOMap.putAll(mapPasswordStrategyVOMapByOid(userPwdStrategyMap.values())); |
| | | }); |
| | | //æ¥è¯¢é»è®¤çå¯ç çç¥ |
| | | SmPasswordStrategyVO passwordStrategyVOByDefault = getPasswordStrategyVOByDefault(); |
| | | //循ç¯ç¨æ·idï¼æ¥è¯¢æ¯å¦æç¬¦åæ¡ä»¶çoid |
| | | userOidCollection.stream().forEach(oid->{ |
| | | SmPasswordStrategyVO smPasswordStrategyVO; |
| | | //éè¿ç¨æ·oid没è·åå°å¯ç çç¥oidï¼è¯´ææ²¡æç»å½åç¨æ·è®¾ç½®çç¥ï¼ç´æ¥è¿é»è®¤çå¯ç çç¥ |
| | | String pwdStrategyId = userPasswordStrategyVOMap.get(oid); |
| | | if(Func.isNotBlank(pwdStrategyId)){ |
| | | //éè¿å¯ç çç¥oidå»mapä¸åå¯ç çç¥ |
| | | smPasswordStrategyVO = smPasswordStrategyVOMap.get(pwdStrategyId); |
| | | }else { |
| | | smPasswordStrategyVO = passwordStrategyVOByDefault; |
| | | } |
| | | returnMap.put(oid,smPasswordStrategyVO); |
| | | }); |
| | | return returnMap; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·ä¸»é®æ¥è¯¢å¯ç çç¥å
³è表ä¸çå¯ç çç¥ä¸»é® |
| | | * @param userOids |
| | | * @return keyä¸ºç¨æ·oidï¼value为å¯ç çç¥oid |
| | | */ |
| | | private Map<String,String> mapUserPwdStrategy(Collection<String> userOids){ |
| | | Map<String,String> userPwdStrategyMap = new HashMap<>(); |
| | | WebUtil.switchCollectionForOracleIn(userOids).stream().forEach(userOidSplit->{ |
| | | //æ¥å
³è表sql |
| | | String sql = "select plpasswordstrategyuid,pluseruid from pluserpasswordstrategy where pluseruid in (" + WebUtil.toInSql(userOidSplit.toArray(new String[0])) + ")"; |
| | | List<BusinessObject> cbos = boService.queryBySql(sql, null); |
| | | cbos.stream().forEach(cbo->{ |
| | | String pluseruid = ObjectTool.getNewBOAttributeValue(cbo, "pluseruid"); |
| | | String plpasswordstrategyuid = ObjectTool.getNewBOAttributeValue(cbo, "plpasswordstrategyuid"); |
| | | userPwdStrategyMap.put(pluseruid,plpasswordstrategyuid); |
| | | }); |
| | | }); |
| | | return userPwdStrategyMap; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»é®æ¥è¯¢å¯ç çç¥map对象 |
| | | * @param oidList |
| | | * @return key为å¯ç çç¥ä¸»é® value为å¯ç çç¥ |
| | | */ |
| | | @Override |
| | | public Map<String, SmPasswordStrategyVO> mapPasswordStrategyVOMapByOid(Collection<String> oidList) { |
| | | VciQueryWrapperForDO queryWrapperForDO = new VciQueryWrapperForDO(null, SmPasswordStrategyDO.class); |
| | | queryWrapperForDO.in("oid",oidList.stream().collect(Collectors.joining(","))); |
| | | List<BusinessObject> cboList = boService.queryBySql(queryWrapperForDO.getSelectFieldSql() + " from plpasswordstrategy " + |
| | | queryWrapperForDO.getTableNick() + queryWrapperForDO.getLinkTableSql() + |
| | | (StringUtils.isBlank(queryWrapperForDO.getWhereSql()) ? "" : (" where " + queryWrapperForDO.getWhereSql())), null); |
| | | Map<String,SmPasswordStrategyVO> smPasswordStrategyVOMap = new HashMap<>(); |
| | | if(Func.isEmpty(cboList)){ |
| | | return new HashMap<>(); |
| | | } |
| | | cboList.stream().forEach(item->{ |
| | | SmPasswordStrategyDO passwordStrategyDO = new SmPasswordStrategyDO(); |
| | | WebUtil.copyValueToObjectFromCbos(item,passwordStrategyDO); |
| | | SmPasswordStrategyVO passwordStrategyVO = new SmPasswordStrategyVO(); |
| | | BeanUtilForVCI.convert(passwordStrategyDO,passwordStrategyVO); |
| | | smPasswordStrategyVOMap.put(passwordStrategyVO.getOid(),passwordStrategyVO); |
| | | }); |
| | | return smPasswordStrategyVOMap; |
| | | } |
| | | |
| | | /** |
| | | * 使ç¨ä¸»é®è·åå¯ç çç¥ |
| | | * @param oid ä¸»é® |
| | | * @return å¯ç çç¥æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | public SmPasswordStrategyVO getPasswordStrategyVOByOid(String oid){ |
| | | VciQueryWrapperForDO queryWrapperForDO = new VciQueryWrapperForDO(null, SmPasswordStrategyDO.class); |
| | | queryWrapperForDO.eq("oid",oid.trim()); |
| | | List<BusinessObject> cboList = boService.queryBySql(queryWrapperForDO.getSelectFieldSql() + " from plpasswordstrategy " + |
| | | queryWrapperForDO.getTableNick() + queryWrapperForDO.getLinkTableSql() + |
| | | (StringUtils.isBlank(queryWrapperForDO.getWhereSql()) ? "" : (" where " + queryWrapperForDO.getWhereSql())), null); |
| | | if(!CollectionUtils.isEmpty(cboList)){ |
| | | SmPasswordStrategyDO passwordStrategyDO = new SmPasswordStrategyDO(); |
| | | WebUtil.copyValueToObjectFromCbos(cboList.get(0),passwordStrategyDO); |
| | | SmPasswordStrategyVO passwordStrategyVO = new SmPasswordStrategyVO(); |
| | | BeanUtilForVCI.convert(passwordStrategyDO,passwordStrategyVO); |
| | | return passwordStrategyVO; |
| | | }else{ |
| | | //è·åé»è®¤ç |
| | | queryWrapperForDO = new VciQueryWrapperForDO(null, SmPasswordStrategyDO.class); |
| | | queryWrapperForDO.eq("plisdefault","1"); |
| | | cboList = boService.queryBySql(queryWrapperForDO.getSelectFieldSql() + " from plpasswordstrategy " + |
| | | queryWrapperForDO.getTableNick() + queryWrapperForDO.getLinkTableSql() + |
| | | (StringUtils.isBlank(queryWrapperForDO.getWhereSql()) ? "" : (" where " + queryWrapperForDO.getWhereSql())), null); |
| | | if(!CollectionUtils.isEmpty(cboList)){ |
| | | SmPasswordStrategyDO passwordStrategyDO = new SmPasswordStrategyDO(); |
| | | WebUtil.copyValueToObjectFromCbos(cboList.get(0),passwordStrategyDO); |
| | | return pwdStrategyDO2VO(passwordStrategyDO); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.vrm.VersionRule; |
| | | import com.vci.pagemodel.OsRevisionRuleVO; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.web.service.WebRevisionRuleServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description çæ¬è§åæå¡ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 14:20 |
| | | */ |
| | | @Service |
| | | public class WebRevisionRuleServiceImpl implements WebRevisionRuleServiceI { |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * å¹³å°è°ç¨å®¢æ·ç«¯ |
| | | */ |
| | | @Autowired |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | /** |
| | | * æ¥è¯¢ææççæ¬è§å |
| | | * |
| | | * @return çæ¬å¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OsRevisionRuleVO> selectAllRevision() { |
| | | try { |
| | | return revisionRuleDO2VOs(Arrays.stream(platformClientUtil.getVersionService().getVersionRules()).collect(Collectors.toList())); |
| | | } catch (PLException e) { |
| | | throw WebUtil.getVciBaseException(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ææççæ¬è§åæ å° |
| | | * |
| | | * @return key æ¯çæ¬çè±æåç§° |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public Map<String, OsRevisionRuleVO> selectAllRevisionMap() { |
| | | return Optional.ofNullable(selectAllRevision()).orElseGet(()->new ArrayList<>()).stream().collect(Collectors.toMap(s->s.getId().toLowerCase(), t->t,(o1, o2)->o1)); |
| | | } |
| | | |
| | | /** |
| | | * 使ç¨ç¼å·è·åè§åçå¼ |
| | | * |
| | | * @param id ç¼å· |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public OsRevisionRuleVO getRevisionRuleById(String id) { |
| | | if(StringUtils.isNotBlank(id)){ |
| | | return selectAllRevisionMap().getOrDefault(id.toLowerCase().trim(),null); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param versionRules æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OsRevisionRuleVO> revisionRuleDO2VOs(Collection<VersionRule> versionRules) { |
| | | List<OsRevisionRuleVO> ruleVOS = new ArrayList<>(); |
| | | Optional.ofNullable(versionRules).orElseGet(()->new ArrayList<>()).stream().forEach(versionRule -> { |
| | | OsRevisionRuleVO ruleVO = revisionRuleDO2VO(versionRule); |
| | | ruleVOS.add(ruleVO); |
| | | }); |
| | | return ruleVOS; |
| | | } |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param versionRule æ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public OsRevisionRuleVO revisionRuleDO2VO(VersionRule versionRule) { |
| | | OsRevisionRuleVO ruleVO = new OsRevisionRuleVO(); |
| | | if(versionRule !=null){ |
| | | ruleVO.setOid(versionRule.oid); |
| | | ruleVO.setCreator(versionRule.creator); |
| | | ruleVO.setLastModifier(versionRule.modifier); |
| | | try { |
| | | ruleVO.setCreateTime(VciDateUtil.long2Date(versionRule.createTime)); |
| | | ruleVO.setLastModifyTime(VciDateUtil.long2Date(versionRule.modifyTime)); |
| | | ruleVO.setTs(VciDateUtil.str2Date(versionRule.ts,VciDateUtil.DateTimeMillFormat)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | ruleVO.setDescription(versionRule.description); |
| | | ruleVO.setId(versionRule.name); |
| | | ruleVO.setName(versionRule.tag); |
| | | ruleVO.setStepLength(WebUtil.getInt(versionRule.stepLength)); |
| | | ruleVO.setJumpCharacter(versionRule.jumpCharacter); |
| | | ruleVO.setPrefixion(versionRule.prefixion); |
| | | ruleVO.setSuffix(versionRule.suffix); |
| | | ruleVO.setInitialValue(versionRule.initialValue); |
| | | //associatedææ¶æ²¡æä½¿ç¨ |
| | | } |
| | | return ruleVO; |
| | | } |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/WebSecretServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.constant.EnumIdConstant; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.pagemodel.SmUserVO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.pagemodel.SmUserVO; |
| | | import com.vci.starter.web.enumpck.DataSecretEnum; |
| | | import com.vci.starter.web.enumpck.UserSecretEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.constant.EnumIdConstant; |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.web.properties.WebProperties; |
| | | import com.vci.web.service.OsEnumServiceI; |
| | | import com.vci.web.service.SmUserQueryServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.service.WebEnumServiceI; |
| | | import com.vci.web.service.WebSecretServiceI; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | */ |
| | | @Autowired(required = false) |
| | | @Lazy |
| | | private OsEnumServiceI enumService; |
| | | private WebEnumServiceI enumService; |
| | | |
| | | /** |
| | | * ç¨æ·æ¥è¯¢æå¡ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.stm.StatePool; |
| | | import com.vci.pagemodel.OsStatusVO; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.web.service.WebStatusServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description ç¶ææ± æå¡ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 10:52 |
| | | */ |
| | | @Service |
| | | public class WebStatusServiceImpl implements WebStatusServiceI { |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * å¹³å°å®¢æ·ç«¯ |
| | | */ |
| | | @Resource |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçç¶æ |
| | | * |
| | | * @return ç¶æçæ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public List<OsStatusVO> selectAllStatus() { |
| | | try { |
| | | return statusDO2VOs(Arrays.stream(platformClientUtil.getStatePoolService().getStatePools()).collect(Collectors.toList())); |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å
¨é¨çç¶ææ å° |
| | | * @return keyæ¯ç¶æçè±æåç§° |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public Map<String, OsStatusVO> selectAllStatusMap(){ |
| | | return Optional.ofNullable(selectAllStatus()).orElseGet(()->new ArrayList<>()).stream().collect(Collectors.toMap(s->s.getId(), t->t,(o1, o2)->o1)); |
| | | } |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param statePool ç¶ææ± çæ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public OsStatusVO statusDO2VO(StatePool statePool) { |
| | | OsStatusVO statusVO = new OsStatusVO(); |
| | | if(statePool!=null){ |
| | | statusVO.setOid(statePool.oid); |
| | | statusVO.setCreator(statePool.creator); |
| | | statusVO.setImagePath(statePool.imagePath); |
| | | statusVO.setLastModifier(statePool.modifier); |
| | | try { |
| | | statusVO.setCreateTime(new Date(statePool.createTime)); |
| | | statusVO.setLastModifyTime(new Date(statePool.modifyTime)); |
| | | statusVO.setTs(VciDateUtil.str2Date(statePool.ts,VciDateUtil.DateTimeMillFormat)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | statusVO.setDescription(statePool.description); |
| | | statusVO.setId(statePool.name); |
| | | statusVO.setName(statePool.tag); |
| | | } |
| | | return statusVO; |
| | | } |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * |
| | | * @param statePools ç¶ææ± çæ°æ®å¯¹è±¡ éå |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | @Override |
| | | public List<OsStatusVO> statusDO2VOs(Collection<StatePool> statePools) { |
| | | List<OsStatusVO> statusVOS = new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(statePools)){ |
| | | statePools.stream().forEach(statePool -> { |
| | | OsStatusVO statusVO = statusDO2VO(statePool); |
| | | statusVOS.add(statusVO); |
| | | }); |
| | | } |
| | | return statusVOS; |
| | | } |
| | | } |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/OsScanAnnotationTool.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.util; |
| | | |
| | | import com.vci.bo.BtmOrLinkProcessAttributeInfo; |
| | | import com.vci.constant.FieldConstant; |
| | | import com.vci.dto.*; |
| | | import com.vci.starter.web.annotation.*; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
| | |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.ApplicationContextProvider; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.bo.BtmOrLinkProcessAttributeInfo; |
| | | import com.vci.constant.FieldConstant; |
| | | import com.vci.web.service.WebBtmIOServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.reflections.Reflections; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | |
| | | */ |
| | | @Component |
| | | public class OsScanAnnotationTool { |
| | | |
| | | |
| | | /** |
| | | * 导å
¥çæå¡ |
| | | */ |
| | | @Autowired |
| | | private WebBtmIOServiceI btmIOService; |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | |
| | | //龿¥ç±»å |
| | | btmTypeExportDTO.setLinkTypeDTOList(linkTypeDTOMap.values()); |
| | | //æ§è¡å¯¼å
¥ç |
| | | btmIOService.importBtmTypes(btmTypeExportDTO); |
| | | //å
ææ¶ç»æ³¨éæï¼çéè¦æ¶ï¼åæ¾å¼ |
| | | //btmIOService.importBtmTypes(btmTypeExportDTO); |
| | | } |
| | | |
| | | /** |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/PinyinCommon.java ÐÞ¸Ä |
| | |
| | | * @version: |
| | | |
| | | */ |
| | | public class PinyinCommon { |
| | | public class PinyinCommon { |
| | | |
| | | /** |
| | | * å¾å° å
¨æ¼ |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/WebUtil.java ÐÞ¸Ä |
| | |
| | | return errContent; |
| | | } |
| | | if (e instanceof PLException ) { |
| | | // String error_code = ((VCIError) e).error_code; |
| | | // String[] error_message = ((VCIError) e).error_message; |
| | | // return MessageUtils.get(error_code, error_message); |
| | | return null; |
| | | String error_code = ((PLException) e).code; |
| | | String[] error_message = ((PLException) e).messages; |
| | | return MessageUtils.get(error_code, error_message); |
| | | } else if(e instanceof VciBaseException || e.getClass().getSuperclass().equals(VciBaseException.class)){ |
| | | return LangBaseUtil.getErrorMsg(e); |
| | | }else if (e instanceof VciException){ |
| | |
| | | * @param lo 龿¥ç±»å |
| | | * @param map map |
| | | */ |
| | | public static void copyValueToMapFromLos(com.vci.corba.omd.data.LinkObject lo,Map<String,String> map){ |
| | | public static void copyValueToMapFromLos(LinkObject lo,Map<String,String> map){ |
| | | if(lo!=null){ |
| | | WebLoServiceImpl.LO_BASE_FIELD_MAP.forEach((field,attr)->{ |
| | | WebLoServiceImpl.LO_BASE_FIELD_MAP.forEach((field, attr)->{ |
| | | map.put(attr.toLowerCase(),getValueFromFieldForCbo(getFieldForObject(field,lo),lo)); |
| | | }); |
| | | //å
æææçåæ®µæ å°æ¾å° |
| | | com.vci.corba.omd.data.AttributeValue[] newAList = lo.newAttrValList; |
| | | com.vci.corba.omd.data.AttributeValue[] hisAList = lo.hisAttrValList; |
| | | AttributeValue[] newAList = lo.newAttrValList; |
| | | AttributeValue[] hisAList = lo.hisAttrValList; |
| | | if(hisAList!=null&&hisAList.length>0){ |
| | | for(int i = 0 ; i < hisAList.length;i++){ |
| | | com.vci.corba.omd.data.AttributeValue av = hisAList[i]; |
| | | AttributeValue av = hisAList[i]; |
| | | String attrName = av.attrName.toLowerCase(); |
| | | map.put(attrName, av.attrVal); |
| | | } |
| | | } |
| | | if(newAList!=null&&newAList.length>0){ |
| | | for(int i = 0 ; i < newAList.length;i++){ |
| | | com.vci.corba.omd.data.AttributeValue av = newAList[i]; |
| | | AttributeValue av = newAList[i]; |
| | | String attrName = av.attrName.toLowerCase(); |
| | | map.put(attrName, av.attrVal); |
| | | } |
| | |
| | | * @param e å¼å¸¸å¯¹è±¡ |
| | | * @return baseå¼å¸¸å¯¹è±¡ |
| | | */ |
| | | // public static VciBaseException getVciBaseException(PLException e){ |
| | | //// return new VciBaseException(e.error_code, e.error_message); |
| | | // return null; |
| | | // } |
| | | |
| | | /** |
| | | * 转æ¢å¼å¸¸ |
| | | * @param e å¼å¸¸å¯¹è±¡ |
| | | * @return baseå¼å¸¸å¯¹è±¡ |
| | | */ |
| | | public static VciBaseException getVciBaseException(PLException e){ |
| | | return new VciBaseException(e.code, new java.lang.String[]{e.getMessage()}); |
| | | // return null; |
| | | } |
| | | |
| | | /** |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/file/VciZipUtil.java ÐÞ¸Ä |
| | |
| | | import com.vci.properties.VciFileTransProperties; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileOutputStream; |
| | | |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.tools.zip.ZipEntry; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileOutputStream; |
| | | |
| | | /** |
| | | * @author ludc |
| | | * @date 2024/7/16 14:27 |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/util/file/clientutil/VciFileServerClientUtil.java ÐÞ¸Ä |
| | |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseModelVO; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | |
| | | while(var11.hasNext()) { |
| | | File file = (File)var11.next(); |
| | | VciFileObjectDTO tempDTO = new VciFileObjectDTO(); |
| | | BeanUtil.convert(fileObjectDTO, tempDTO); |
| | | BeanUtilForVCI.convert(fileObjectDTO, tempDTO); |
| | | tempDTO.setFileExtension(this.getFileExtension(file.getName())); |
| | | tempDTO.setName(this.getFileNameNoExtension(file.getName())); |
| | | tempDTO.setId(this.getFileNameNoExtension(file.getName())); |
| | |
| | | |
| | | public VciFileObjectDTO fileObjectVO2DTO(VciFileObjectVO fileObjectVO) { |
| | | VciFileObjectDTO fileObjectDTO = new VciFileObjectDTO(); |
| | | BeanUtil.convert(fileObjectVO, fileObjectDTO); |
| | | BeanUtilForVCI.convert(fileObjectVO, fileObjectDTO); |
| | | return fileObjectDTO; |
| | | } |
| | | |
| | | public VciFileObjectDTO fileObjectVO2DTOForUpdate(VciFileObjectVO fileObjectVO) { |
| | | VciFileObjectDTO fileObjectDTO = new VciFileObjectDTO(); |
| | | BeanUtil.convert(fileObjectVO, fileObjectDTO); |
| | | BeanUtilForVCI.convert(fileObjectVO, fileObjectDTO); |
| | | fileObjectDTO.setFileOid(fileObjectVO.getOid()); |
| | | fileObjectDTO.setUpdateFileFlag(true); |
| | | return fileObjectDTO; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | #####åºç¨åºæ¬é
ç½® |
| | | app: |
| | | name: web |
| | | group: å京å®åè¿è¾¾ç§ææéå
¬å¸ |
| | | description: å¹³å°B/S客æ·ç«¯ |
| | | private-token-key: vciweb20210212 |
| | | ###tomcatç¸å
³çé
ç½® |
| | | server: |
| | | port: 12000 |
| | | servlet: |
| | | context-path: /web |
| | | tomcat: |
| | | uri-encoding: UTF-8 |
| | | ###log4j2çé
ç½®ï¼éè¦åªä¸ªå
ä¸çæä»¶å¼å¯æä¸ªç级ï¼å°±ç´æ¥xxxxx: yyè¿æ ·æ¹å¼ |
| | | logging: |
| | | config: "classpath:log4j2-spring-dev.xml" |
| | | level: |
| | | com.vci: debug |
| | | root: info |
| | | #ç¼å |
| | | spring: |
| | | # redisé
ç½® |
| | | redis: ###### redis é
ç½® |
| | | enabled: true #trueï¼å¯ç¨rediï¼falseä¸å¯ç¨ï¼é»è®¤false,é
ç½®æä»¶æ²¡æè¿äºé»è®¤ä¸å¯ç¨redis |
| | | host: localhost # ipå°å |
| | | database: 2 # redisæ°æ®åº 0-15 |
| | | port: 6379 # 端å£å· |
| | | password: foobared # æ å¯ç ä¸å¡« |
| | | timeout: 30000s # è¿æ¥è¶
æ¶æ¶é´ ï¼é»è®¤1å¤©ï¼ |
| | | lettuce: |
| | | shutdown-timeout: 100ms # å
³éè¶
æ¶æ¶é´ é»è®¤ 100ms |
| | | pool: # lettuce è¿æ¥æ± |
| | | max-active: 8 # è¿æ¥æ± æå¤§è¿æ¥æ° é»è®¤ 8ï¼-1 ï¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: 60000ms # è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ é»è®¤-1ms ï¼-1 :表示没æéå¶ï¼ è¿é设置1åé |
| | | max-idle: 8 # æå¤§ç©ºé²è¿æ¥ é»è®¤ 8 |
| | | min-idle: 0 # æå°ç©ºé²è¿æ¥ é»è®¤ 0 |
| | | resources: |
| | | chain: |
| | | cache: false |
| | | strategy: |
| | | content: |
| | | enabled: true |
| | | paths: /** |
| | | cache: |
| | | type: ehcache |
| | | servlet: |
| | | multipart: |
| | | enabled: true |
| | | ###å个æä»¶å¤§å°ï¼50M |
| | | max-file-size: 52428800 |
| | | ###æ»ä¸ä¼ çæä»¶å¤§å°ï¼50M |
| | | max-request-size: 52428800 |
| | | mvc: |
| | | view: |
| | | suffix: .html |
| | | |
| | | #å¹³å°ç¸å
³é
ç½® |
| | | plt: |
| | | #人åä¿¡æ¯å½å
¥æ¶,æ¯å¦éè¦å¯çº§å段 |
| | | export-secret-grade: false |
| | | |
| | | ###ä¸å¡é¡¹ç®çé
ç½®ï¼æ³¨æspringå®¶æè¯»åé
ç½®æ¶ï¼å¤§å忝éè¦è½¬æ¢ä¸º-çæ¹å¼ï¼èfeignéè¦å¤§å°åå®å
¨ç¸å |
| | | session: |
| | | session-info-storage-type: "database" |
| | | database-platform: oracle |
| | | clear-session-on-start: false |
| | | ###æ¯å¦å¼å¯ç¨æ·å¨çº¿æ£æ¥ |
| | | checkSessionTimeout: false |
| | | ###客æ·ç«¯å¤æè¶
æ¶è½®è¯¢æ¶é´ï¼åä½ä¸ºç§ |
| | | sessionInterval: 10 |
| | | ###客æ·ç«¯æå¤§å卿¶é´ï¼åä½ä¸ºåé |
| | | sessionIdlTime: 30 |
| | | ###è¶
æ¶æéæ¶é´ï¼åä½ä¸ºåé |
| | | sessionRemind: 3 |
| | | |
| | | ##webé
ç½® |
| | | vciweb: |
| | | debug: true |
| | | |
| | | #æä»¶é¢è§é
ç½® |
| | | file-preview: |
| | | enabled: true |
| | | preview-service-url: "http://dev.yunkeruida.top:28090/vciFilePreview/ajaxPreview.html" |
| | | preview-system-key: plt2020 |
| | | |
| | | #feignå°å |
| | | feign: |
| | | #æ«æå·¥å
·æå¡ |
| | | scanServiceUrl: "" |
| | | #å¹³å°æå¡ |
| | | pltServiceUrl: "" |
| | | #æä»¶æå¡ |
| | | fileServiceUrl: "" |
| | | |
| | | #springmvcé
ç½® |
| | | vcispringmvc: |
| | | enabled: true |
| | | #䏿 ¡éªå®å
¨ç龿¥å°å |
| | | un-check-urls: |
| | | #䏿´æ°è¯·æ±æ¶é´ç龿¥å°å |
| | | un-storage-request-time-urls: |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | #####åºç¨åºæ¬é
ç½® |
| | | app: |
| | | name: web |
| | | group: å京å®åè¿è¾¾ç§ææéå
¬å¸ |
| | | description: å¹³å°B/S客æ·ç«¯ |
| | | private-token-key: vciweb20210212 |
| | | ###tomcatç¸å
³çé
ç½® |
| | | server: |
| | | port: 12000 |
| | | servlet: |
| | | context-path: /web |
| | | tomcat: |
| | | uri-encoding: UTF-8 |
| | | ###log4j2çé
ç½®ï¼éè¦åªä¸ªå
ä¸çæä»¶å¼å¯æä¸ªç级ï¼å°±ç´æ¥xxxxx: yyè¿æ ·æ¹å¼ |
| | | logging: |
| | | config: "classpath:log4j2-spring-prod.xml" |
| | | level: |
| | | com.vci: debug |
| | | root: info |
| | | #ç¼å |
| | | spring: |
| | | # redisé
ç½® |
| | | redis: ###### redis é
ç½® |
| | | enabled: true #trueï¼å¯ç¨rediï¼falseä¸å¯ç¨ï¼é»è®¤false,é
ç½®æä»¶æ²¡æè¿äºé»è®¤ä¸å¯ç¨redis |
| | | host: localhost # ipå°å |
| | | database: 2 # redisæ°æ®åº 0-15 |
| | | port: 6379 # 端å£å· |
| | | password: foobared # æ å¯ç ä¸å¡« |
| | | timeout: 30000s # è¿æ¥è¶
æ¶æ¶é´ ï¼é»è®¤1å¤©ï¼ |
| | | lettuce: |
| | | shutdown-timeout: 100ms # å
³éè¶
æ¶æ¶é´ é»è®¤ 100ms |
| | | pool: # lettuce è¿æ¥æ± |
| | | max-active: 8 # è¿æ¥æ± æå¤§è¿æ¥æ° é»è®¤ 8ï¼-1 ï¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: 60000ms # è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ é»è®¤-1ms ï¼-1 :表示没æéå¶ï¼ è¿é设置1åé |
| | | max-idle: 8 # æå¤§ç©ºé²è¿æ¥ é»è®¤ 8 |
| | | min-idle: 0 # æå°ç©ºé²è¿æ¥ é»è®¤ 0 |
| | | resources: |
| | | chain: |
| | | cache: false |
| | | strategy: |
| | | content: |
| | | enabled: true |
| | | paths: /** |
| | | cache: |
| | | type: ehcache |
| | | servlet: |
| | | multipart: |
| | | enabled: true |
| | | ###å个æä»¶å¤§å°ï¼50M |
| | | max-file-size: 52428800 |
| | | ###æ»ä¸ä¼ çæä»¶å¤§å°ï¼50M |
| | | max-request-size: 52428800 |
| | | mvc: |
| | | view: |
| | | suffix: .html |
| | | |
| | | #å¹³å°ç¸å
³é
ç½® |
| | | plt: |
| | | #人åä¿¡æ¯å½å
¥æ¶,æ¯å¦éè¦å¯çº§å段 |
| | | export-secret-grade: false |
| | | |
| | | ###ä¸å¡é¡¹ç®çé
ç½®ï¼æ³¨æspringå®¶æè¯»åé
ç½®æ¶ï¼å¤§å忝éè¦è½¬æ¢ä¸º-çæ¹å¼ï¼èfeignéè¦å¤§å°åå®å
¨ç¸å |
| | | session: |
| | | session-info-storage-type: "database" |
| | | database-platform: oracle |
| | | clear-session-on-start: false |
| | | ###æ¯å¦å¼å¯ç¨æ·å¨çº¿æ£æ¥ |
| | | checkSessionTimeout: false |
| | | ###客æ·ç«¯å¤æè¶
æ¶è½®è¯¢æ¶é´ï¼åä½ä¸ºç§ |
| | | sessionInterval: 10 |
| | | ###客æ·ç«¯æå¤§å卿¶é´ï¼åä½ä¸ºåé |
| | | sessionIdlTime: 30 |
| | | ###è¶
æ¶æéæ¶é´ï¼åä½ä¸ºåé |
| | | sessionRemind: 3 |
| | | |
| | | ##webé
ç½® |
| | | vciweb: |
| | | debug: true |
| | | |
| | | #æä»¶é¢è§é
ç½® |
| | | file-preview: |
| | | enabled: true |
| | | preview-service-url: "http://dev.yunkeruida.top:28090/vciFilePreview/ajaxPreview.html" |
| | | preview-system-key: plt2020 |
| | | |
| | | #feignå°å |
| | | feign: |
| | | #æ«æå·¥å
·æå¡ |
| | | scanServiceUrl: "" |
| | | #å¹³å°æå¡ |
| | | pltServiceUrl: "" |
| | | #æä»¶æå¡ |
| | | fileServiceUrl: "" |
| | | |
| | | #springmvcé
ç½® |
| | | vcispringmvc: |
| | | enabled: true |
| | | #䏿 ¡éªå®å
¨ç龿¥å°å |
| | | un-check-urls: |
| | | #䏿´æ°è¯·æ±æ¶é´ç龿¥å°å |
| | | un-storage-request-time-urls: |
¶Ô±ÈÐÂÎļþ |
| | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | include: web |
| | | messages: |
| | | encoding: UTF-8 |
| | | basename: i18n/messages |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/resources/codeTemplate/Service.impl.java.vm ÐÞ¸Ä |
| | |
| | | #if(${lcStatusFullClassName} !="") |
| | | import ${lcStatusFullClassName}; |
| | | #end |
| | | import com.vci.lcstatuspck.FrameworkDataLCStatus; |
| | | import com.vci.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | |
| | | |
| | | import java.util.*; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.frameworkcore.lcstatuspck.*; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import static com.vci.constant.FrameWorkLangCodeConstant.*; |
| | | import static com.vci.frameworkcore.constant.FrameWorkDefaultValueConstant.*; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/resources/compatibility_field_map.yml ÐÞ¸Ä |
| | |
| | | compatibility: |
| | | user-table-field-map: {"oid":"pluid","id":"plusername","name":"pltruename","password":"plpassword","usertype":"plusertype","email":"plemail","description":"pldesc","creator":"plcreateuser","createtime":"plcreatetime","lastmodifier":"plupdateuser","lastmodifytime":"plupdatetime",secretgrade":"plsecretgrade"} |
| | | user-table-field-map: {"oid":"pluid","id":"plusername","name":"pltruename","password":"plpassword","usertype":"plusertype","email":"plemail","description":"pldesc","creator":"plcreateuser","createtime":"plcreatetime","lastmodifier":"plupdateuser","lastmodifytime":"plupdatetime","secretgrade":"plsecretgrade"} |
| | | role-table-field-map: {"oid:":"pluid","name":"plname","description":"pldesc","creator":"plcreateuser","createtime":"plcreatetime","lastmodifier":"plupdateuser","lastmodifytime":"plupdatetime"} |
| | | dept-table-field-map: {"oid":"pluid","id":"plnum","name":"plname","pkfatherdepartment":"plparentuid","description":"pldesc","creator":"plcreateuser","createtime":"plcreatetime","lastmodifier":"plupdateuser","lastmodifytime":"plupdatetime"} |
| | | function-table-field-map: {"oid":"ploid","id":"plmoduleno","name":"plname","logname":"plaliasname","parentfunctionid":"plparentid"} |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!--Configurationåé¢çstatusï¼è¿ä¸ªç¨äºè®¾ç½®log4j2èªèº«å
é¨çä¿¡æ¯è¾åºï¼å¯ä»¥ä¸è®¾ç½®ï¼å½è®¾ç½®ætraceæ¶ï¼ä½ ä¼çå°log4j2å
é¨åç§è¯¦ç»è¾åº--> |
| | | <!--monitorIntervalï¼Log4j2 èªå¨æ£æµä¿®æ¹é
ç½®æä»¶åéæ°é
ç½®æ¬èº«ï¼è®¾ç½®é´éç§æ°--> |
| | | <configuration monitorInterval="5" status="debug"> |
| | | <!--æ¥å¿çº§å«ä»¥åä¼å
级æåº: OFF > FATAL > ERROR > WARN > INFO > DEBUG > TRACE > ALL --> |
| | | <!--åéé
ç½®--> |
| | | <Properties> |
| | | <!-- æ ¼å¼åè¾åºï¼%dateè¡¨ç¤ºæ¥æï¼%thread表示线ç¨åï¼%-5levelï¼çº§å«ä»å·¦æ¾ç¤º5个å符宽度 %msgï¼æ¥å¿æ¶æ¯ï¼%næ¯æ¢è¡ç¬¦--> |
| | | <!-- %logger{36} 表示 Logger ååæé¿36个å符 --> |
| | | <!-- <property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n" />--> |
| | | <property name="LOG_PATTERN" value="[TRACEID:%X{logTraceId}] %d{HH:mm:ss.SSS} %-5level %logger{-1} - %msg%xEx%n"/> |
| | | <!-- å®ä¹æ¥å¿åå¨çè·¯å¾ï¼ä¸è¦é
ç½®ç¸å¯¹è·¯å¾ --> |
| | | <property name="FILE_PATH" value="./logs/web" /> |
| | | <property name="FILE_NAME" value="web" /> |
| | | </Properties> |
| | | |
| | | <appenders> |
| | | <console name="Console" target="SYSTEM_OUT"> |
| | | <!--è¾åºæ¥å¿çæ ¼å¼--> |
| | | <PatternLayout pattern="${LOG_PATTERN}"/> |
| | | <!--æ§å¶å°åªè¾åºlevelåå
¶ä»¥ä¸çº§å«çä¿¡æ¯ï¼onMatchï¼ï¼å
¶ä»çç´æ¥æç»ï¼onMismatchï¼--> |
| | | <ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/> |
| | | </console> |
| | | |
| | | <!--æä»¶ä¼æå°åºææä¿¡æ¯ï¼è¿ä¸ªlogæ¯æ¬¡è¿è¡ç¨åºä¼èªå¨æ¸
空ï¼ç±append屿§å³å®ï¼éåä¸´æ¶æµè¯ç¨--> |
| | | <File name="Filelog" fileName="${FILE_PATH}/web.log" append="false"> |
| | | <PatternLayout pattern="${LOG_PATTERN}"/> |
| | | </File> |
| | | |
| | | <!-- è¿ä¸ªä¼æå°åºææçinfoå以ä¸çº§å«çä¿¡æ¯ï¼æ¯æ¬¡å¤§å°è¶
è¿sizeï¼åè¿size大å°çæ¥å¿ä¼èªå¨åå
¥æå¹´ä»½-æä»½å»ºç«çæä»¶å¤¹ä¸é¢å¹¶è¿è¡å缩ï¼ä½ä¸ºåæ¡£--> |
| | | <RollingFile name="RollingFileInfo" fileName="${FILE_PATH}/info.log" filePattern="${FILE_PATH}/${FILE_NAME}-INFO-%d{yyyy-MM-dd HH-mm}_%i.log.gz"> |
| | | <!--æ§å¶å°åªè¾åºlevelå以ä¸çº§å«çä¿¡æ¯ï¼onMatchï¼ï¼å
¶ä»çç´æ¥æç»ï¼onMismatchï¼--> |
| | | <ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/> |
| | | <PatternLayout pattern="${LOG_PATTERN}"/> |
| | | <Policies> |
| | | <!--interval屿§ç¨æ¥æå®å¤ä¹
æ»å¨ä¸æ¬¡ï¼é»è®¤æ¯1 hour--> |
| | | <TimeBasedTriggeringPolicy interval="1"/> |
| | | <SizeBasedTriggeringPolicy size="10MB"/> |
| | | </Policies> |
| | | <!-- DefaultRolloverStrategyå䏿件夹ä¸15个æä»¶å¼å§è¦ç ä¸è®¾ç½®ï¼åé»è®¤ä¸ºæå¤å䏿件夹ä¸7个æä»¶å¼å§è¦ç--> |
| | | <DefaultRolloverStrategy max="15"/> |
| | | </RollingFile> |
| | | |
| | | <!-- è¿ä¸ªä¼æå°åºææçwarnå以ä¸çº§å«çä¿¡æ¯ï¼æ¯æ¬¡å¤§å°è¶
è¿sizeï¼åè¿size大å°çæ¥å¿ä¼èªå¨åå
¥æå¹´ä»½-æä»½å»ºç«çæä»¶å¤¹ä¸é¢å¹¶è¿è¡å缩ï¼ä½ä¸ºåæ¡£--> |
| | | <RollingFile name="RollingFileWarn" fileName="${FILE_PATH}/warn.log" filePattern="${FILE_PATH}/${FILE_NAME}-WARN-%d{yyyy-MM-dd HH-mm}_%i.log.gz"> |
| | | <!--æ§å¶å°åªè¾åºlevelå以ä¸çº§å«çä¿¡æ¯ï¼onMatchï¼ï¼å
¶ä»çç´æ¥æç»ï¼onMismatchï¼--> |
| | | <ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/> |
| | | <PatternLayout pattern="${LOG_PATTERN}"/> |
| | | <Policies> |
| | | <!--interval屿§ç¨æ¥æå®å¤ä¹
æ»å¨ä¸æ¬¡ï¼é»è®¤æ¯1 hour--> |
| | | <TimeBasedTriggeringPolicy interval="1"/> |
| | | <SizeBasedTriggeringPolicy size="10MB"/> |
| | | </Policies> |
| | | <!-- DefaultRolloverStrategyå䏿件夹ä¸15个æä»¶å¼å§è¦ç ä¸è®¾ç½®ï¼åé»è®¤ä¸ºæå¤å䏿件夹ä¸7个æä»¶å¼å§è¦ç--> |
| | | <DefaultRolloverStrategy max="15"/> |
| | | </RollingFile> |
| | | |
| | | <!-- è¿ä¸ªä¼æå°åºææçerrorå以ä¸çº§å«çä¿¡æ¯ï¼æ¯æ¬¡å¤§å°è¶
è¿sizeï¼åè¿size大å°çæ¥å¿ä¼èªå¨åå
¥æå¹´ä»½-æä»½å»ºç«çæä»¶å¤¹ä¸é¢å¹¶è¿è¡å缩ï¼ä½ä¸ºåæ¡£--> |
| | | <RollingFile name="RollingFileError" fileName="${FILE_PATH}/error.log" filePattern="${FILE_PATH}/${FILE_NAME}-ERROR-%d{yyyy-MM-dd HH-mm}_%i.log.gz"> |
| | | <!--æ§å¶å°åªè¾åºlevelå以ä¸çº§å«çä¿¡æ¯ï¼onMatchï¼ï¼å
¶ä»çç´æ¥æç»ï¼onMismatchï¼--> |
| | | <ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/> |
| | | <PatternLayout pattern="${LOG_PATTERN}"/> |
| | | <Policies> |
| | | <!--interval屿§ç¨æ¥æå®å¤ä¹
æ»å¨ä¸æ¬¡ï¼é»è®¤æ¯1 hour--> |
| | | <TimeBasedTriggeringPolicy interval="1"/> |
| | | <SizeBasedTriggeringPolicy size="10MB"/> |
| | | </Policies> |
| | | <!-- DefaultRolloverStrategyå䏿件夹ä¸15个æä»¶å¼å§è¦ç ä¸è®¾ç½®ï¼åé»è®¤ä¸ºæå¤å䏿件夹ä¸7个æä»¶å¼å§è¦ç--> |
| | | <DefaultRolloverStrategy max="15"/> |
| | | </RollingFile> |
| | | </appenders> |
| | | |
| | | <!--Loggerèç¹ç¨æ¥åç¬æå®æ¥å¿çå½¢å¼ï¼æ¯å¦è¦ä¸ºæå®å
ä¸çclassæå®ä¸åçæ¥å¿çº§å«çã--> |
| | | <!--ç¶åå®ä¹loggersï¼åªæå®ä¹äºloggerå¹¶å¼å
¥çappenderï¼appenderæä¼çæ--> |
| | | <loggers> |
| | | <!--çæ§ç³»ç»ä¿¡æ¯--> |
| | | <!--è¥æ¯additivity设为falseï¼å åLogger åªä¼å¨èªå·±çappenderéè¾åºï¼èä¸ä¼å¨ ç¶Logger çappenderéè¾åºã--> |
| | | <Logger name="org.springframework" level="debug" additivity="false"> |
| | | <AppenderRef ref="Console"/> |
| | | </Logger> |
| | | <!--æ¥å¿çº§å«--> |
| | | <root level="info"> |
| | | <appender-ref ref="Console"/> |
| | | <appender-ref ref="Filelog"/> |
| | | <appender-ref ref="RollingFileInfo"/> |
| | | <appender-ref ref="RollingFileWarn"/> |
| | | <appender-ref ref="RollingFileError"/> |
| | | </root> |
| | | </loggers> |
| | | |
| | | </configuration> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!--Configurationåé¢çstatusï¼è¿ä¸ªç¨äºè®¾ç½®log4j2èªèº«å
é¨çä¿¡æ¯è¾åºï¼å¯ä»¥ä¸è®¾ç½®ï¼å½è®¾ç½®ætraceæ¶ï¼ä½ ä¼çå°log4j2å
é¨åç§è¯¦ç»è¾åº--> |
| | | <!--monitorIntervalï¼Log4j2 èªå¨æ£æµä¿®æ¹é
ç½®æä»¶åéæ°é
ç½®æ¬èº«ï¼è®¾ç½®é´éç§æ°--> |
| | | <configuration monitorInterval="5" status="debug"> |
| | | <!--æ¥å¿çº§å«ä»¥åä¼å
级æåº: OFF > FATAL > ERROR > WARN > INFO > DEBUG > TRACE > ALL --> |
| | | <!--åéé
ç½®--> |
| | | <Properties> |
| | | <!-- æ ¼å¼åè¾åºï¼%dateè¡¨ç¤ºæ¥æï¼%thread表示线ç¨åï¼%-5levelï¼çº§å«ä»å·¦æ¾ç¤º5个å符宽度 %msgï¼æ¥å¿æ¶æ¯ï¼%næ¯æ¢è¡ç¬¦--> |
| | | <!-- %logger{36} 表示 Logger ååæé¿36个å符 --> |
| | | <!-- <property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n" />--> |
| | | <property name="LOG_PATTERN" value="[TRACEID:%X{logTraceId}] %d{HH:mm:ss.SSS} %-5level %class{-1}.%M()/%L - %msg%xEx%n"/> |
| | | <!-- å®ä¹æ¥å¿åå¨çè·¯å¾ï¼ä¸è¦é
ç½®ç¸å¯¹è·¯å¾ --> |
| | | <property name="FILE_PATH" value="./../logs/web" /> |
| | | <property name="FILE_NAME" value="web" /> |
| | | </Properties> |
| | | |
| | | <appenders> |
| | | <console name="Console" target="SYSTEM_OUT"> |
| | | <!--è¾åºæ¥å¿çæ ¼å¼--> |
| | | <PatternLayout pattern="${LOG_PATTERN}"/> |
| | | <!--æ§å¶å°åªè¾åºlevelåå
¶ä»¥ä¸çº§å«çä¿¡æ¯ï¼onMatchï¼ï¼å
¶ä»çç´æ¥æç»ï¼onMismatchï¼--> |
| | | <ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/> |
| | | </console> |
| | | |
| | | <!--æä»¶ä¼æå°åºææä¿¡æ¯ï¼è¿ä¸ªlogæ¯æ¬¡è¿è¡ç¨åºä¼èªå¨æ¸
空ï¼ç±append屿§å³å®ï¼éåä¸´æ¶æµè¯ç¨--> |
| | | <File name="Filelog" fileName="${FILE_PATH}/web.log" append="false"> |
| | | <PatternLayout pattern="${LOG_PATTERN}"/> |
| | | </File> |
| | | |
| | | <!-- è¿ä¸ªä¼æå°åºææçinfoå以ä¸çº§å«çä¿¡æ¯ï¼æ¯æ¬¡å¤§å°è¶
è¿sizeï¼åè¿size大å°çæ¥å¿ä¼èªå¨åå
¥æå¹´ä»½-æä»½å»ºç«çæä»¶å¤¹ä¸é¢å¹¶è¿è¡å缩ï¼ä½ä¸ºåæ¡£--> |
| | | <RollingFile name="RollingFileInfo" fileName="${FILE_PATH}/info.log" filePattern="${FILE_PATH}/${FILE_NAME}-INFO-%d{yyyy-MM-dd}_%i.log.gz"> |
| | | <!--æ§å¶å°åªè¾åºlevelå以ä¸çº§å«çä¿¡æ¯ï¼onMatchï¼ï¼å
¶ä»çç´æ¥æç»ï¼onMismatchï¼--> |
| | | <ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/> |
| | | <PatternLayout pattern="${LOG_PATTERN}"/> |
| | | <Policies> |
| | | <!--interval屿§ç¨æ¥æå®å¤ä¹
æ»å¨ä¸æ¬¡ï¼é»è®¤æ¯1 hour--> |
| | | <TimeBasedTriggeringPolicy interval="1"/> |
| | | <SizeBasedTriggeringPolicy size="10MB"/> |
| | | </Policies> |
| | | <!-- DefaultRolloverStrategyå䏿件夹ä¸15个æä»¶å¼å§è¦ç ä¸è®¾ç½®ï¼åé»è®¤ä¸ºæå¤å䏿件夹ä¸7个æä»¶å¼å§è¦ç--> |
| | | <DefaultRolloverStrategy max="15"/> |
| | | </RollingFile> |
| | | |
| | | <!-- è¿ä¸ªä¼æå°åºææçwarnå以ä¸çº§å«çä¿¡æ¯ï¼æ¯æ¬¡å¤§å°è¶
è¿sizeï¼åè¿size大å°çæ¥å¿ä¼èªå¨åå
¥æå¹´ä»½-æä»½å»ºç«çæä»¶å¤¹ä¸é¢å¹¶è¿è¡å缩ï¼ä½ä¸ºåæ¡£--> |
| | | <RollingFile name="RollingFileWarn" fileName="${FILE_PATH}/warn.log" filePattern="${FILE_PATH}/${FILE_NAME}-WARN-%d{yyyy-MM-dd}_%i.log.gz"> |
| | | <!--æ§å¶å°åªè¾åºlevelå以ä¸çº§å«çä¿¡æ¯ï¼onMatchï¼ï¼å
¶ä»çç´æ¥æç»ï¼onMismatchï¼--> |
| | | <ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/> |
| | | <PatternLayout pattern="${LOG_PATTERN}"/> |
| | | <Policies> |
| | | <!--interval屿§ç¨æ¥æå®å¤ä¹
æ»å¨ä¸æ¬¡ï¼é»è®¤æ¯1 hour--> |
| | | <TimeBasedTriggeringPolicy interval="1"/> |
| | | <SizeBasedTriggeringPolicy size="10MB"/> |
| | | </Policies> |
| | | <!-- DefaultRolloverStrategyå䏿件夹ä¸15个æä»¶å¼å§è¦ç ä¸è®¾ç½®ï¼åé»è®¤ä¸ºæå¤å䏿件夹ä¸7个æä»¶å¼å§è¦ç--> |
| | | <DefaultRolloverStrategy max="15"/> |
| | | </RollingFile> |
| | | |
| | | <!-- è¿ä¸ªä¼æå°åºææçerrorå以ä¸çº§å«çä¿¡æ¯ï¼æ¯æ¬¡å¤§å°è¶
è¿sizeï¼åè¿size大å°çæ¥å¿ä¼èªå¨åå
¥æå¹´ä»½-æä»½å»ºç«çæä»¶å¤¹ä¸é¢å¹¶è¿è¡å缩ï¼ä½ä¸ºåæ¡£--> |
| | | <RollingFile name="RollingFileError" fileName="${FILE_PATH}/error.log" filePattern="${FILE_PATH}/${FILE_NAME}-ERROR-%d{yyyy-MM-dd}_%i.log.gz"> |
| | | <!--æ§å¶å°åªè¾åºlevelå以ä¸çº§å«çä¿¡æ¯ï¼onMatchï¼ï¼å
¶ä»çç´æ¥æç»ï¼onMismatchï¼--> |
| | | <ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/> |
| | | <PatternLayout pattern="${LOG_PATTERN}"/> |
| | | <Policies> |
| | | <!--interval屿§ç¨æ¥æå®å¤ä¹
æ»å¨ä¸æ¬¡ï¼é»è®¤æ¯1 hour--> |
| | | <TimeBasedTriggeringPolicy interval="1"/> |
| | | <SizeBasedTriggeringPolicy size="10MB"/> |
| | | </Policies> |
| | | <!-- DefaultRolloverStrategyå䏿件夹ä¸15个æä»¶å¼å§è¦ç ä¸è®¾ç½®ï¼åé»è®¤ä¸ºæå¤å䏿件夹ä¸7个æä»¶å¼å§è¦ç--> |
| | | <DefaultRolloverStrategy max="15"/> |
| | | </RollingFile> |
| | | </appenders> |
| | | |
| | | <!--Loggerèç¹ç¨æ¥åç¬æå®æ¥å¿çå½¢å¼ï¼æ¯å¦è¦ä¸ºæå®å
ä¸çclassæå®ä¸åçæ¥å¿çº§å«çã--> |
| | | <!--ç¶åå®ä¹loggersï¼åªæå®ä¹äºloggerå¹¶å¼å
¥çappenderï¼appenderæä¼çæ--> |
| | | <loggers> |
| | | <!--è¿æ»¤æspringåmybatisçä¸äºæ ç¨çDEBUGä¿¡æ¯--> |
| | | <logger name="org.mybatis" level="info" additivity="false"> |
| | | <AppenderRef ref="Console"/> |
| | | </logger> |
| | | <!--çæ§ç³»ç»ä¿¡æ¯--> |
| | | <!--è¥æ¯additivity设为falseï¼å åLogger åªä¼å¨èªå·±çappenderéè¾åºï¼èä¸ä¼å¨ ç¶Logger çappenderéè¾åºã--> |
| | | <Logger name="org.springframework" level="info" additivity="false"> |
| | | <AppenderRef ref="Console"/> |
| | | </Logger> |
| | | <!--æ¥å¿çº§å«--> |
| | | <root level="info"> |
| | | <appender-ref ref="Console"/> |
| | | <appender-ref ref="Filelog"/> |
| | | <appender-ref ref="RollingFileInfo"/> |
| | | <appender-ref ref="RollingFileWarn"/> |
| | | <appender-ref ref="RollingFileError"/> |
| | | </root> |
| | | </loggers> |
| | | |
| | | </configuration> |
| | |
| | | <artifactId>plt-web</artifactId> |
| | | |
| | | <dependencies> |
| | | <!--å¹³å°çå
--> |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-web-base</artifactId> |
| | |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-web-api</artifactId> |
| | | <version>2024.1-SNAPSHOT</version> |
| | | <exclusions> |
| | | <exclusion> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-web-base</artifactId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-starter</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-web-permission</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>eu.bitwalker</groupId> |
| | | <artifactId>UserAgentUtils</artifactId> |
| | | <version>1.20</version> |
| | | </dependency> |
| | | <!-- https://mvnrepository.com/artifact/com.github.jsqlparser/jsqlparser --> |
| | | <dependency> |
| | | <groupId>com.github.jsqlparser</groupId> |
| | | <artifactId>jsqlparser</artifactId> |
| | | <version>4.9</version> |
| | | </dependency> |
| | | |
| | | <!--å¼å¯ cache ç¼å --> |
| | |
| | | <artifactId>xstream</artifactId> |
| | | <version>1.4.10</version> |
| | | </dependency> |
| | | <dependency><!--代ç çæå¨æé模æ¿--> |
| | | <artifactId>velocity</artifactId> |
| | | <groupId>org.apache.velocity</groupId> |
| | | <version>1.7</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-starter</artifactId> |
| | | <version>${platform.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.reflections</groupId> |
| | | <artifactId>reflections</artifactId> |
| | | <version>0.9.11</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <finalName>plt-web</finalName> |
| | | <plugins> |
| | | <!-- <plugin>--> |
| | | <!-- <groupId>org.apache.maven.plugins</groupId>--> |
| | | <!-- <artifactId>maven-jar-plugin</artifactId>--> |
| | | <!-- <configuration>--> |
| | | <!-- <archive>--> |
| | | <!-- <manifest>--> |
| | | <!-- <addClasspath>false</addClasspath>--> |
| | | <!-- <classpathPrefix>lib/</classpathPrefix>--> |
| | | <!-- <useUniqueVersions>false</useUniqueVersions>--> |
| | | <!-- </manifest>--> |
| | | <!-- </archive>--> |
| | | <!-- <excludes>--> |
| | | <!-- <exclude>application-prod.yml</exclude>--> |
| | | <!-- <exclude>application-db.yml</exclude>--> |
| | | <!-- <exclude>properties/conf.properties</exclude>--> |
| | | <!-- </excludes>--> |
| | | <!-- </configuration>--> |
| | | <!-- </plugin>--> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-dependency-plugin</artifactId> |
| | |
| | | </goals> |
| | | <configuration> |
| | | <outputDirectory>${project.build.directory}/lib</outputDirectory> |
| | | <!-- <excludeGroupIds>com.vci.platform</excludeGroupIds>--> |
| | | </configuration> |
| | | </execution> |
| | | </executions> |
| | |
| | | </excludes> |
| | | </configuration> |
| | | </plugin> |
| | | <!-- <plugin>--> |
| | | <!-- <groupId>org.springframework.boot</groupId>--> |
| | | <!-- <artifactId>spring-boot-maven-plugin</artifactId>--> |
| | | <!-- <configuration>--> |
| | | <!-- <!–éåå
å«ä¾èµï¼å
å«ä¸åå¨çä¾èµï¼jaréæ²¡æpoméçä¾èµ–>--> |
| | | <!-- <includes>--> |
| | | <!-- <include>--> |
| | | <!-- <groupId>null</groupId>--> |
| | | <!-- <artifactId>null</artifactId>--> |
| | | <!-- </include>--> |
| | | <!-- </includes>--> |
| | | <!-- <layout>ZIP</layout>--> |
| | | <!-- <!–使ç¨å¤é¨é
ç½®æä»¶ï¼jarå
éæ²¡æèµæºæä»¶–>--> |
| | | <!-- <addResources>true</addResources>--> |
| | | <!-- </configuration>--> |
| | | <!-- <executions>--> |
| | | <!-- <execution>--> |
| | | <!-- <goals>--> |
| | | <!-- <goal>repackage</goal>--> |
| | | <!-- </goals>--> |
| | | <!-- <configuration>--> |
| | | <!-- <!–é
ç½®jarå
ç¹æ®æ è¯ é
ç½®åï¼ä¿çåæä»¶ï¼çææ°æä»¶ *-run.jar –>--> |
| | | <!-- <!–é
ç½®jarå
ç¹æ®æ è¯ ä¸é
ç½®ï¼åæä»¶å½å为 *.jar.originalï¼çææ°æä»¶ *.jar –>--> |
| | | <!-- <!–<classifier>run</classifier>–>--> |
| | | <!-- </configuration>--> |
| | | <!-- </execution>--> |
| | | <!-- </executions>--> |
| | | <!-- </plugin>--> |
| | | |
| | | </plugins> |
| | | </build> |
| | | |
| | |
| | | import com.vci.corba.framework.data.FuncOperationInfo; |
| | | import com.vci.corba.framework.data.OperateInfo; |
| | | import com.vci.dto.RoleInfoDTO; |
| | | import com.vci.dto.RoleRightDTO; |
| | | import com.vci.dto.RoleRightParamDTO; |
| | | import com.vci.dto.RoleRightParamDTOS; |
| | | import com.vci.frameworkcore.compatibility.ISmFunctionQueryService; |
| | | import com.vci.frameworkcore.compatibility.SmHMSysModConfigServiceI; |
| | | import com.vci.web.service.ISmFunctionQueryService; |
| | | import com.vci.web.service.SmHMSysModConfigServiceI; |
| | | import com.vci.pagemodel.AppConfigDetailInfoVO; |
| | | import com.vci.pagemodel.ExpExcelConditionVO; |
| | | import com.vci.pagemodel.MenuVO; |
| | |
| | | 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 com.vci.starter.web.util.Lcm.Func; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | import com.vci.starter.web.util.ControllerUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.LogBasicServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.dto.OsAttributeDTO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.OsAttributeServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.framework.data.GrandValue; |
| | | import com.vci.dto.OsPvolumeDTO; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.util.ControllerUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.OsDataAuthServiceI; |
| | | 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 javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.dto.OsLifeCycleDTO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.OsLifeCycleServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.pagemodel.OsBtmTypeAttributeVO; |
| | | import com.vci.pagemodel.OsLinkTypeAttributeVO; |
| | | import com.vci.pagemodel.OsLinkTypeVO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | 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.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.OsLinkTypeServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.text.ParseException; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.bo.LoginResultBO; |
| | | import com.vci.dto.LoginUserDTO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.constant.TokenKeyConstant; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.RequestClientInfo; |
| | | import com.vci.starter.web.pagemodel.SessionInfo; |
| | | import com.vci.starter.web.util.MessageUtils; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.WebThreadLocalUtil; |
| | | import com.vci.web.service.OsLoginServiceI; |
| | | import eu.bitwalker.useragentutils.*; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Locale; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * ç»å½æ§å¶å¨ |
| | | * @author weidy |
| | | * @date 2021-1-28 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/framework/loginController") |
| | | @VciBusinessLog(modelName="ç»å½æå¡") |
| | | public class OsLoginController { |
| | | |
| | | /** |
| | | * ç»å½æå¡ |
| | | */ |
| | | @Autowired |
| | | private OsLoginServiceI loginService; |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * ç»å½ï¼è¿ä¸ªå°æ¹ä¸»è¦æ¯ä¸ºäºç»å½ååç¬çä¸å¡ |
| | | * @param userDTO ç¨æ·ç对象 |
| | | * @param request 请æ±å¯¹è±¡ |
| | | * @param clientInfo 客æ·ç«¯çä¿¡æ¯ |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @VciBusinessLog(operateName="ç»å½") |
| | | @PostMapping(value = "/login") |
| | | @ResponseBody |
| | | @VciUnCheckRight() |
| | | public BaseResult login(LoginUserDTO userDTO, HttpServletRequest request, RequestClientInfo clientInfo){ |
| | | VciBaseUtil.alertNotNull(userDTO,"ç¨æ·å¯¹è±¡",clientInfo,"请æ±å®¢æ·ç«¯ä¿¡æ¯"); |
| | | try { |
| | | wrapperBrowserInfo(clientInfo,request); |
| | | LoginResultBO loginResultBO = loginService.login(userDTO,clientInfo); |
| | | if(loginResultBO.isSuccess()){ |
| | | return BaseResult.success(loginResultBO); |
| | | }else{ |
| | | BaseResult result = BaseResult.fail(loginResultBO.getFailMsg()); |
| | | result.setCode(200);//ç¶æç 䏿¯200åç«¯æ æ³è·åå°objä¸çä¿¡æ¯ |
| | | if(StringUtils.isBlank(loginResultBO.getFailMsg())){ |
| | | result.setMsg(MessageUtils.get(loginResultBO.getFailCode(),loginResultBO.getFailMsgArray())); |
| | | } |
| | | result.setObj(loginResultBO); |
| | | return result; |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String msg = "è°ç¨ç»å½æ¹æ³æ¶åºç°é误ï¼åå ï¼"+VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(msg); |
| | | return BaseResult.fail(msg); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·å客æ·ç«¯è¯·æ±ä¿¡æ¯,为äºéç»å¨serverå±ä½¿ç¨request |
| | | * @param request 请æ±å¯¹è±¡ |
| | | * @param clientInfo 客æ·ç«¯ä¿¡æ¯ |
| | | */ |
| | | private void wrapperBrowserInfo(RequestClientInfo clientInfo,HttpServletRequest request) { |
| | | UserAgent userAgent = UserAgent.parseUserAgentString(request.getHeader("User-Agent")); |
| | | if(StringUtils.isBlank(clientInfo.getIpaddress())){ |
| | | //æ¾IPå°å |
| | | clientInfo.setIpaddress(getIpAddressFromRequest(request)); |
| | | } |
| | | if(userAgent !=null) { |
| | | Browser browser = userAgent.getBrowser(); |
| | | OperatingSystem os = userAgent.getOperatingSystem(); |
| | | |
| | | clientInfo.setOsversion(os != null ? os.getName() : ""); |
| | | clientInfo.setBrowser(browser != null ? browser.getName() : "IE"); |
| | | String version = ""; |
| | | if (browser != null) { |
| | | Version version1 = browser.getVersion(request.getHeader("User-Agent")); |
| | | if (version1 != null) { |
| | | version = version1.getVersion(); |
| | | } |
| | | } |
| | | clientInfo.setBrowserversion(version); |
| | | if (os != null) { |
| | | clientInfo.setRequestType(os.getDeviceType().getName()); |
| | | if (DeviceType.COMPUTER.getName().equals(clientInfo.getRequestType())) { |
| | | clientInfo.setRequestType("browser"); |
| | | } |
| | | } |
| | | |
| | | Locale loc = Locale.getDefault(); |
| | | clientInfo.setCountry(loc.getCountry()); |
| | | clientInfo.setLanguage(loc.toLanguageTag()); |
| | | |
| | | Map<String,String> map = System.getenv(); |
| | | clientInfo.setMachine(map.get("COMPUTERNAME")); |
| | | clientInfo.setOsUser(map.get("USERNAME")); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä»è¯·æ±ä¸è·åipå°åï¼ä¸ºäºéç»å¨serverå±ä½¿ç¨request |
| | | * @param request 请æ±å¯¹è±¡ |
| | | * @return ipå°åï¼æ²¡ææ¾å°é»è®¤ä¸º127.0.0.1 |
| | | */ |
| | | private String getIpAddressFromRequest(HttpServletRequest request){ |
| | | String ip = request.getHeader("X-Forwarded-For"); |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("Proxy-Client-IP"); |
| | | } |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("WL-Proxy-Client-IP"); |
| | | } |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("HTTP_CLIENT_IP"); |
| | | } |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getHeader("HTTP_X_FORWARDED_FOR"); |
| | | } |
| | | if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { |
| | | ip = request.getRemoteAddr(); |
| | | } |
| | | if (ip == null || ip.length() == 0 || ip.indexOf("0:0:0:0:0:0:0:1") >-1) { |
| | | //0:0:0:0:0:0:0:1æ¯æ¬æºå¨è®¿é® |
| | | ip = "127.0.0.1"; |
| | | } |
| | | return ip; |
| | | } |
| | | |
| | | /** |
| | | * è·åç¨æ·çä¼è¯ä¿¡æ¯ |
| | | * @return success为true表示è·åæåï¼å¦åmsgæ¯é误信æ¯ï¼obj屿§æ¯è·åçä¼è¯å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | | @VciUnCheckRight |
| | | @PostMapping("/getSessionInfo") |
| | | @ResponseBody |
| | | public BaseResult getSessionInfo(){ |
| | | BaseResult<SessionInfo> json = new BaseResult<>(); |
| | | SessionInfo sessionInfo = WebThreadLocalUtil.getCurrentUserSessionInfoInThread(); |
| | | if(sessionInfo != null){ |
| | | json = json.success(sessionInfo); |
| | | } |
| | | return json; |
| | | } |
| | | |
| | | /** |
| | | * æ§è¡éåº |
| | | * @param request 请æ±å¯¹è±¡ |
| | | * @return success为true表示éåºæåï¼å端ä¸éè¦å¤æç»æ |
| | | */ |
| | | @VciUnCheckRight |
| | | @PostMapping("/logout") |
| | | @ResponseBody |
| | | public BaseResult logout(HttpServletRequest request){ |
| | | String userToken = request.getHeader(TokenKeyConstant.USER_TOKEN_KEY); |
| | | loginService.logout(userToken); |
| | | return BaseResult.success(); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.framework.data.PvolumeInfo; |
| | | import com.vci.dto.*; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | 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.VciBaseUtil; |
| | | import com.vci.web.service.OsActionServiceI; |
| | | import com.vci.web.service.OsPvolumesServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æä»¶æç®¡ççæ§å¶å¨ |
| | |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.OsQuereyTemplateServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.dom4j.DocumentException; |
| | | import org.slf4j.Logger; |
| | |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.dto.OsRevisionRuleDTO; |
| | | import com.vci.pagemodel.OsRevisionRuleVO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.OsRevisionRuleServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.frameworkcore.compatibility.ISmFunctionQueryService; |
| | | import com.vci.frameworkcore.enumpck.ResourceControlTypeEnum; |
| | | import com.vci.web.service.ISmFunctionQueryService; |
| | | import com.vci.web.enumpck.ResourceControlTypeEnum; |
| | | import com.vci.pagemodel.MenuVO; |
| | | import com.vci.pagemodel.SmFunctionVO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.pagemodel.UIContentVO; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmPwdStrategyQueryController.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.controller; |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.dto.SmPasswordStrategyDTO; |
| | | import com.vci.frameworkcore.compatibility.SmPwdStrategyQueryServiceI; |
| | | import com.vci.web.service.SmPwdStrategyQueryServiceI; |
| | | import com.vci.pagemodel.SmPasswordStrategyVO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | 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.util.VciBaseUtil; |
| | | import com.vci.web.service.OsBtmServiceI; |
| | | import com.vci.web.service.UIManagerServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.dto.OsAttributeDTO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.OsLifeCycleServiceI; |
| | | import com.vci.web.service.OsStatusServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.btm.BizType; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.dto.OsBtmTypeDTO; |
| | | import com.vci.model.IndexObject; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.pagemodel.OsBtmTypeAttributeVO; |
| | | import com.vci.pagemodel.OsBtmTypeVO; |
| | | import com.vci.pagemodel.OsERVO; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.Tree; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.ControllerUtil; |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.pagemodel.OsBtmTypeAttributeVO; |
| | | import com.vci.pagemodel.OsBtmTypeVO; |
| | | import com.vci.pagemodel.OsERVO; |
| | | import com.vci.web.service.OsAttributeServiceI; |
| | | import com.vci.web.service.OsBtmServiceI; |
| | | import com.vci.web.service.OsLinkTypeServiceI; |
| | | import com.vci.web.service.WebBtmIOServiceI; |
| | | import feign.Param; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.constant.FrameWorkBusLangCodeConstant.DATA_OID_NOT_EXIST; |
| | |
| | | List<OsBtmTypeAttributeVO> finalBoAttrs = boAttrs; |
| | | attributeService.getDefaultAttributeVOs().stream().forEach(attr->{ |
| | | OsBtmTypeAttributeVO attributeVO = new OsBtmTypeAttributeVO(); |
| | | BeanUtil.convert(attr,attributeVO); |
| | | BeanUtilForVCI.convert(attr,attributeVO); |
| | | attributeVO.setAttributeLength(attr.getAttrLength()); |
| | | attributeVO.setAttributeDataType(attr.getAttributeDataType()); |
| | | attributeVO.setReferBtmTypeId(attr.getBtmTypeId()); |
| | |
| | | if(StringUtils.isBlank(boData.getNameOid())){ |
| | | throw new PLException("没æè·åå°æ°æ®ç项主é®",new String[0]); |
| | | } |
| | | if(StringUtils.isBlank(boData.getBtmname())){ |
| | | if(StringUtils.isBlank(boData.getBtmName())){ |
| | | throw new PLException("没æè·åå°æ°æ®çä¸å¡ç±»å",new String[0]); |
| | | } |
| | | cbo.oid = boData.getOid(); |
| | | cbo.revisionid = boData.getRevisionOid(); |
| | | cbo.nameoid = boData.getNameOid(); |
| | | cbo.btName = boData.getBtmname(); |
| | | // selectedObject.setMasterObject(cbo); |
| | | // return selectedObject; |
| | | cbo.btName = boData.getBtmName(); |
| | | return null; |
| | | } |
| | | |
| | |
| | | |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.dto.OsEnumDTO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | |
| | | import com.vci.pagemodel.OsEnumItemVO; |
| | | import com.vci.pagemodel.OsEnumVO; |
| | | import com.vci.starter.web.util.ControllerUtil; |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.OsEnumServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.enumpck.ItemDblEnum; |
| | | import com.vci.web.enumpck.ItemTypeEnum; |
| | | import com.vci.enumpck.UI.ItemTypeEnum; |
| | | import com.vci.web.service.OsPortalVIServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.pagemodel.UIContentVO; |
| | | import com.vci.pagemodel.UIFormDefineVO; |
| | | import com.vci.pagemodel.UITableDefineVO; |
| | | import com.vci.starter.web.annotation.controller.VciUnCheckRight; |
| | | import com.vci.starter.web.annotation.log.VciBusinessLog; |
| | | import com.vci.web.service.UIEngineServiceI; |
| | | import com.vci.web.service.impl.WebInitServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | */ |
| | | @Autowired |
| | | private UIEngineServiceI uiService; |
| | | |
| | | /** |
| | | * åå§å |
| | | */ |
| | | @Autowired |
| | | private WebInitServiceImpl initService; |
| | | |
| | | /** |
| | | * è·åUIä¸ä¸æçå®ä¹ |
| | |
| | | @GetMapping("/getTableDefineById") |
| | | public UITableDefineVO getTableDefineById(String btmType,String id) throws PLException { |
| | | return uiService.getTableById(btmType,id); |
| | | } |
| | | |
| | | /** |
| | | * æ¸
é¤ç¼å |
| | | * @return æ§è¡ç»æ |
| | | */ |
| | | @GetMapping("/clearCache") |
| | | public BaseResult clearCache(){ |
| | | //æå¡ç«¯é£ä¸ªï¼ä¸è¨é¾å°½ |
| | | initService.clearAllCache(); |
| | | initService.initServerCache(); |
| | | return BaseResult.success(); |
| | | } |
| | | |
| | | |
| | |
| | | import com.vci.pagemodel.ReferConfigVO; |
| | | import com.vci.pagemodel.UIFormDataVO; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.query.UIDataGridQuery; |
| | | import com.vci.web.query.UIFormQuery; |
| | | import com.vci.web.query.UITreeQuery; |
| | | import com.vci.query.UIDataGridQuery; |
| | | import com.vci.query.UIFormQuery; |
| | | import com.vci.query.UITreeQuery; |
| | | import com.vci.web.service.UIDataServiceI; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | 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; |
| | | /** |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/enumpck/CombinationEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.enumpck; |
| | | |
| | | //import com.vci.frameworkcore.constant.FrameWorkEnumConstant; |
| | | //import com.vci.starter.web.annotation.VciEnum; |
| | | package com.vci.web.enumpck; |
| | | |
| | | import com.vci.starter.web.annotation.VciEnum; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | |
| | | package com.vci.web.enumpck; |
| | | |
| | | /** |
| | | * è¾å
¥æ¡æä¸¾ |
| | | */ |
| | | public enum ControlType { |
| | | Text, |
| | | TextBtn, |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * çªå£æä¸¾ |
| | | */ |
| | | public enum ItemDblEnum implements BaseEnum { |
| | | EDIT_PANEL("0","ä¿®æ¹é¡µé¢"), |
| | | CUSTOM_PANEL("1","èªå®ä¹é¡µé¢"), |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/enumpck/ResourceControlTypeEnum.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.enumpck; |
| | | |
| | | //import com.vci.frameworkcore.constant.FrameWorkEnumConstant; |
| | | //import com.vci.starter.web.annotation.VciEnum; |
| | | package com.vci.web.enumpck; |
| | | |
| | | import com.vci.starter.web.annotation.VciEnum; |
| | | import com.vci.starter.web.enumpck.BaseEnum; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.initTask; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.vci.pagemodel.OsAttributeVO; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.web.service.OsAttributeServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description å¹³å°åå§è¯ä»»å¡ |
| | | * @Author dangsn |
| | | * @Date 2024/11/28 15:38 |
| | | */ |
| | | @Component |
| | | public class OsInitTaskComponet implements ApplicationRunner { |
| | | |
| | | /** |
| | | * æ¥å¿å¯¹è±¡ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * 屿§çæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsAttributeServiceI attributeService; |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | //åå§åé»è®¤ç屿§ |
| | | initDefaultAttribute(); |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * åå§åé»è®¤ç屿§ |
| | | */ |
| | | private void initDefaultAttribute() { |
| | | try { |
| | | String attrJson = LocalFileUtil.readContentForFileInJar("DefaultAttribute.json"); |
| | | if (StringUtils.isBlank(attrJson)) { |
| | | logger.info("没æè¯»åå°classpath*:DefaultAttribute.jsonæä»¶çå
容"); |
| | | return; |
| | | } |
| | | List<OsAttributeVO> attributeVOS = JSONObject.parseArray(attrJson, OsAttributeVO.class); |
| | | if(!CollectionUtils.isEmpty(attributeVOS)){ |
| | | attributeService.setDefaultAttributeVOs(attributeVOS.stream().sorted(((o1, o2) -> o1.getId().compareTo(o2.getId()))).collect(Collectors.toList())); |
| | | attributeService.setDefaultAttributeVOMap(attributeVOS.stream().collect(Collectors.toMap(s->s.getId().toLowerCase(Locale.ROOT), t->t))); |
| | | } |
| | | logger.info("读åé»è®¤å±æ§å®æ"); |
| | | }catch (Throwable e){ |
| | | logger.error("读åclasspath*:DefaultAttribute.jsonçå
容并转æ¢çæ¶ååºéäº",e); |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.vci.web.other; |
| | | |
| | | import com.vci.pagemodel.UIActionVO; |
| | | |
| | | import java.util.Map; |
| | | |
| | | public class AllActionThreadLocal { |
| | |
| | | package com.vci.web.other; |
| | | |
| | | import com.vci.web.annotation.BdSelectInput; |
| | | import com.vci.web.dao.BdSelectInputCharDaoI; |
| | | import com.vci.model.BdSelectInputCharDO; |
| | | import com.vci.starter.web.annotation.BdSelectInput; |
| | | import com.vci.web.dao.BdSelectInputCharDaoI; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.aspectj.lang.JoinPoint; |
| | |
| | | import org.springframework.core.DefaultParameterNameDiscoverer; |
| | | import org.springframework.core.ParameterNameDiscoverer; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.Method; |
| | |
| | | /** |
| | | * ææçBdSelectInput注解ç |
| | | */ |
| | | @Pointcut("execution(public * com.vci..*.*(..)) && @target(com.vci.web.annotation.BdSelectInput) ") |
| | | @Pointcut("execution(public * com.vci..*.*(..)) && @target(com.vci.starter.web.annotation.BdSelectInput) ") |
| | | public void selectInputChar(){ |
| | | |
| | | } |
| | |
| | | package com.vci.web.other; |
| | | |
| | | import com.vci.corba.omd.btm.BizType; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.corba.omd.qtm.QTD; |
| | | import com.vci.corba.omd.qtm.QTInfo; |
| | | |
| | |
| | | package com.vci.web.other; |
| | | |
| | | import com.vci.corba.portal.data.PLAction; |
| | | import com.vci.corba.portal.data.PLActionCls; |
| | | import com.vci.corba.portal.data.PLActionParam; |
| | | |
| | | 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{ |
| | |
| | | package com.vci.web.other; |
| | | |
| | | import com.vci.web.annotation.FlowNotifyAfter; |
| | | import com.vci.web.annotation.FlowNotifyBefore; |
| | | import com.vci.web.annotation.FlowNotifyWeb; |
| | | import com.vci.bo.FlowNoticeInfo; |
| | | import com.vci.starter.web.annotation.FlowNotifyAfter; |
| | | import com.vci.starter.web.annotation.FlowNotifyBefore; |
| | | import com.vci.starter.web.annotation.FlowNotifyWeb; |
| | | |
| | | /** |
| | | * æµç¨éç¥çç¤ºä¾ |
| | |
| | | package com.vci.web.other; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.corba.omd.qtm.QTD; |
| | | import com.vci.corba.omd.qtm.QTInfo; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¨¡æ¿å¯¼åºæ°æ®ç±»ï¼å¯åºååä¸ºæ¨¡æ¿æä»¶,åæ¶ä¹å
¼å¯¼åºæ°æ®æ§å¶ç±» |
| | |
| | | package com.vci.web.other; |
| | | |
| | | import com.vci.bo.FlowNoticeInfo; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.web.annotation.FlowNotifyBefore; |
| | | import com.vci.web.annotation.FlowNotifyWeb; |
| | | import com.vci.bo.FlowNoticeInfo; |
| | | import com.vci.starter.web.annotation.FlowNotifyBefore; |
| | | import com.vci.starter.web.annotation.FlowNotifyWeb; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.*; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Description: æµç¨ç»æ¢æ¶ï¼æ¢å¤CodeAllCodeç¶æ |
| | |
| | | package com.vci.web.service; |
| | | |
| | | |
| | | import com.vci.pagemodel.BdSelectInputCharVO; |
| | | import com.vci.dto.BdSelectInputCharDTO; |
| | | import com.vci.model.BdSelectInputCharDO; |
| | | import com.vci.pagemodel.BdSelectInputCharVO; |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.pagemodel.SessionInfo; |
| | | |
| | | |
| | | import java.util.*; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * å¯è¾å¯éå
容æå¡æ¥å£ |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/ISmFunctionQueryService.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility; |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.common.exception.VciException; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.dto.RoleInfoDTO; |
| | | import com.vci.dto.RoleRightDTO; |
| | | import com.vci.dto.RoleRightParamDTO; |
| | | import com.vci.frameworkcore.enumpck.ResourceControlTypeEnum; |
| | | import com.vci.web.enumpck.ResourceControlTypeEnum; |
| | | import com.vci.pagemodel.MenuVO; |
| | | import com.vci.pagemodel.SmFunctionVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.dto.*; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.atm.AttributeDef; |
| | | import com.vci.dto.OsAttributeDTO; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.pagemodel.OsAttributeVO; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | |
| | | import java.io.File; |
| | | import java.util.Collection; |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.etm.EnumType; |
| | | import com.vci.dto.OsEnumDTO; |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.pagemodel.OsEnumItemVO; |
| | | import com.vci.pagemodel.OsEnumVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.pagemodel.OsEnumItemVO; |
| | | import com.vci.pagemodel.OsEnumVO; |
| | | |
| | | import java.io.File; |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | * @param targetStatus ç®æ ççå½å¨æç¶æï¼ä¸åºåå¤§å° |
| | | * @throws VciBaseException å¦æç®æ çå½å¨æåå½åçå½å¨æç¶ææ²¡æè¿æ¥çº¿æ¶æåºå¼å¸¸ |
| | | */ |
| | | void transStatus(com.vci.corba.omd.data.BusinessObject bo, String targetStatus) throws VciBaseException; |
| | | void transStatus(BusinessObject bo, String targetStatus) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ¹éè·è¿çå½å¨æç¶æï¼è¿äºæ°æ®ä¸çå½åç¶æå¿
须齿¯ä¸æ ·ãæè
æ¯å½åç¶æé½å¯ä»¥è¿æ¥å°ç®æ ç¶æ |
| | |
| | | * @param targetStatus ç®æ ç¶æï¼ä¸åºå大å°å |
| | | * @throws VciBaseException 转æ¢çå½å¨æåºéçæ¶åæåºå¼å¸¸ |
| | | */ |
| | | void transStatus(List<com.vci.corba.omd.data.BusinessObject> boList, String targetStatus) throws VciBaseException; |
| | | void transStatus(List<BusinessObject> boList, String targetStatus) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ¹éè·è¿çå½å¨æç¶æï¼è¿äºæ°æ®ä¸çå½åç¶æå¿
须齿¯ä¸æ ·ï¼æè
æ¯å½åç¶æé½å¯ä»¥è¿æ¥å°ç®æ ç¶æ |
| | |
| | | * @param targetStatus ç®æ ç¶æï¼ä¸åºå大å°å |
| | | * @throws VciBaseException 转æ¢çå½å¨æåºéçæ¶åæåºå¼å¸¸ |
| | | */ |
| | | void transStatus(com.vci.corba.omd.data.BusinessObject[] bos, String targetStatus) throws VciBaseException; |
| | | void transStatus(BusinessObject[] bos, String targetStatus) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ¹éè·è¿çå½å¨æç¶æï¼è¿äºæ°æ®ä¸çå½åç¶æå¿
须齿¯ä¸æ ·ï¼æè
æ¯å½åç¶æé½å¯ä»¥è¿æ¥å°ç®æ ç¶æ |
| | |
| | | * @param lineVO è·è¿è·¯ç± |
| | | * @throws VciBaseException è·è¿åºéçæ¯ä¼æåºå¼å¸¸ |
| | | */ |
| | | void doTransVO(com.vci.corba.omd.data.BusinessObject obj, OsLifeCycleLineVO lineVO) throws VciBaseException; |
| | | void doTransVO(BusinessObject obj, OsLifeCycleLineVO lineVO) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ¹éæ§è¡è·è¿æä½ï¼è¦æ±å¿
é¡»æ¯åä¸ä¸ªä¸å¡ç±»åä¸ç |
| | |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.pagemodel.OsBtmTypeAttributeVO; |
| | | import com.vci.pagemodel.OsLinkTypeAttributeVO; |
| | | import com.vci.pagemodel.OsLinkTypeVO; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/LoginServiceI.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.RequestClientInfo; |
| | | import com.vci.bo.LoginResultBO; |
| | | import com.vci.dto.LoginUserDTO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.RequestClientInfo; |
| | | |
| | | /** |
| | | * ç»å½åéåºæå¡ |
| | | * @author weidy |
| | | * @date 2020/1/29 |
| | | */ |
| | | public interface LoginServiceI { |
| | | public interface OsLoginServiceI { |
| | | |
| | | /** |
| | | * ç»å½ |
| | |
| | | * @throws VciBaseException ç»å½å¤±è´¥çæ¶åæåºå¼å¸¸ |
| | | */ |
| | | LoginResultBO login(LoginUserDTO userDTO, RequestClientInfo clientInfo) throws Exception; |
| | | |
| | | /** |
| | | * åç¹ç»å½ |
| | | * @param userDTO ç»å½ä¿¡æ¯ |
| | | * @param clientInfo 请æ±ç客æ·ç«¯çä¿¡æ¯ |
| | | * @return ç»å½çç»æå¯¹è±¡ |
| | | * @throws VciBaseException ç»å½å¤±è´¥çæ¶åæåºå¼å¸¸ |
| | | */ |
| | | LoginResultBO singleLogin(LoginUserDTO userDTO, RequestClientInfo clientInfo) throws Exception; |
| | | |
| | | /** |
| | | * éåºç³»ç» |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.portal.data.PortalVI; |
| | | import com.vci.dto.ClonePortalVIDTOList; |
| | |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.framework.data.PvolumeInfo; |
| | | import com.vci.dto.*; |
| | | import com.vci.dto.OsPvolumeDTO; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.stm.StatePool; |
| | | import com.vci.dto.OsStatusDTO; |
| | | import com.vci.pagemodel.OsStatusVO; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.dto.OsStatusDTO; |
| | | import com.vci.pagemodel.OsStatusVO; |
| | | |
| | | import java.io.File; |
| | | import java.util.Collection; |
| | |
| | | * @param statePool ç¶ææ± çæ°æ®å¯¹è±¡ |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | OsStatusVO statusDO2VO(com.vci.corba.omd.stm.StatePool statePool); |
| | | OsStatusVO statusDO2VO(StatePool statePool); |
| | | |
| | | /** |
| | | * æ°æ®å¯¹è±¡è½¬æ¢ä¸ºæ¾ç¤ºå¯¹è±¡ |
| | | * @param statePools ç¶ææ± çæ°æ®å¯¹è±¡ éå |
| | | * @return æ¾ç¤ºå¯¹è±¡ |
| | | */ |
| | | List<OsStatusVO> statusDO2VOs(Collection<com.vci.corba.omd.stm.StatePool> statePools); |
| | | List<OsStatusVO> statusDO2VOs(Collection<StatePool> statePools); |
| | | |
| | | /** |
| | | * æ¥è¯¢ææçç¶æ |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmHMSysModConfigServiceI.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility; |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.common.exception.VciException; |
| | | import com.vci.corba.common.PLException; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmPwdStrategyQueryServiceI.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility; |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.dto.SmPasswordStrategyDTO; |
| | | import com.vci.corba.common.PLException; |
| | |
| | | import com.vci.corba.omd.data.RevisionDataInfo; |
| | | import com.vci.corba.omd.data.VersionDataInfo; |
| | | import com.vci.dto.*; |
| | | import com.vci.pagemodel.OsBtmTypeVO; |
| | | import com.vci.pagemodel.ReferConfigVO; |
| | | import com.vci.pagemodel.UIFormDataVO; |
| | | import com.vci.query.UIDataGridQuery; |
| | | import com.vci.query.UIFormQuery; |
| | | import com.vci.query.UITreeQuery; |
| | | import com.vci.starter.web.enumpck.VciChangeDocumentTypeEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.model.BaseModel; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.pagemodel.OsBtmTypeVO; |
| | | import com.vci.pagemodel.ReferConfigVO; |
| | | import com.vci.pagemodel.UIFormDataVO; |
| | | import com.vci.web.query.UIDataGridQuery; |
| | | import com.vci.web.query.UIFormQuery; |
| | | import com.vci.web.query.UITreeQuery; |
| | | |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.portal.data.PLAction; |
| | | import com.vci.corba.portal.data.PLTabButton; |
| | | import com.vci.corba.portal.data.PLUILayout; |
| | | import com.vci.corba.portal.data.PortalVI; |
| | | import com.vci.corba.portal.data.PLAction; |
| | | import com.vci.pagemodel.*; |
| | | |
| | | import java.util.Collection; |
| | |
| | | import com.vci.corba.omd.btm.BizType; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.corba.omd.qtm.QTInfo; |
| | | import com.vci.corba.portal.data.PLUILayout; |
| | | import com.vci.corba.portal.data.PLTabPage; |
| | | import com.vci.corba.portal.data.PLUILayout; |
| | | import com.vci.corba.portal.data.PortalVI; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.dto.UIAuthorDTO; |
| | | import com.vci.pagemodel.PLDefinationVO; |
| | | import com.vci.pagemodel.PLTabButtonVO; |
| | | import com.vci.pagemodel.PLUILayoutCloneVO; |
| | | import com.vci.pagemodel.UICloneVO; |
| | | 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.dto.UIAuthorDTO; |
| | | import com.vci.starter.web.pagemodel.Tree; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | |
| | | package com.vci.web.service; |
| | | |
| | | import com.vci.corba.omd.btm.BizType; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.dto.OsBtmTypeExportDTO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | |
| | | import java.util.Collection; |
| | | |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.dto.BdSelectInputCharDTO; |
| | | import com.vci.model.BdSelectInputCharDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.pagemodel.BdSelectInputCharVO; |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.dao.BdSelectInputCharDaoI; |
| | | import com.vci.dto.BdSelectInputCharDTO; |
| | | import com.vci.model.BdSelectInputCharDO; |
| | | import com.vci.pagemodel.BatchCBO; |
| | | import com.vci.pagemodel.BdSelectInputCharVO; |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.web.service.BdSelectInputCharServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.WebUtil; |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.client.common.objects.UserObject; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | |
| | | import com.vci.dto.LogInfoDTO; |
| | | import com.vci.dto.LogPeriodInfoDTO; |
| | | import com.vci.dto.LogQueryCriteriaDTO; |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.web.service.SmUserQueryServiceI; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | | import com.vci.starter.poi.bo.WriteExcelOption; |
| | | import com.vci.starter.poi.util.ExcelUtil; |
| | |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.*; |
| | | import com.vci.web.service.LogBasicServiceI; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import cn.hutool.core.io.FileUtil; |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.corba.common.PLException; |
| | |
| | | import com.vci.web.enumpck.PlTypetypeEnum; |
| | | import com.vci.web.other.ExportActionLogBean; |
| | | import com.vci.web.other.ExportBeans; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.*; |
| | | import com.vci.web.service.OsActionServiceI; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PinyinCommon; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import com.vci.client.common.datatype.VTInteger; |
| | | import com.vci.client.common.datatype.VTLong; |
| | | import com.vci.client.common.datatype.VTString; |
| | | import com.vci.client.mw.ClientSessionUtility; |
| | | import com.vci.common.utility.ObjectUtility; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.atm.AttributeDef; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.corba.omd.vrm.VersionRule; |
| | | import com.vci.dto.OsAttributeDTO; |
| | | import com.vci.dto.OsEnumDTO; |
| | | import com.vci.dto.OsEnumItemDTO; |
| | | import com.vci.enumpck.UI.ItemTypeEnum; |
| | | import com.vci.model.OsAttributeDO; |
| | | import com.vci.omd.dataType.VTDataType; |
| | | import com.vci.omd.objects.OtherInfo; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.pagemodel.OsAttributeVO; |
| | | import com.vci.pagemodel.OsEnumVO; |
| | | import com.vci.po.OsAttributePO; |
| | | import com.vci.po.OsEnumPO; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | | import com.vci.starter.poi.bo.WriteExcelOption; |
| | |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.model.OsAttributeDO; |
| | | import com.vci.web.enumpck.ItemTypeEnum; |
| | | import com.vci.web.enumpck.PortalVITypeFlag; |
| | | import com.vci.web.properties.UsedNames; |
| | | import com.vci.web.service.OsAttributeServiceI; |
| | | import com.vci.web.service.OsBaseServiceI; |
| | | import com.vci.web.service.OsEnumServiceI; |
| | | import com.vci.web.service.OsLinkTypeServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.swing.*; |
| | | import java.awt.*; |
| | | import java.io.File; |
| | | import java.util.*; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | //import static com.vci.client.omd.attribpool.ui.VTDataTypePanel.*; |
| | | import static com.vci.omd.constants.AttributeConstants.*; |
| | | |
| | | /** |
| | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.vci.client.common.oq.OQTool; |
| | | import com.vci.client.common.providers.ClientServiceProvider; |
| | | import com.vci.client.mw.ClientSessionUtility; |
| | | import com.vci.common.qt.object.Condition; |
| | | import com.vci.common.qt.object.QueryTemplate; |
| | | import com.vci.common.utility.ObjectUtility; |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.atm.AttributeDef; |
| | |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.corba.omd.stm.StatePool; |
| | | import com.vci.corba.omd.vrm.VersionRule; |
| | | import com.vci.corba.portal.data.PLUILayout; |
| | | import com.vci.dto.OsBtmTypeDTO; |
| | | import com.vci.dto.OsBtmTypeLinkAttributesDTO; |
| | | import com.vci.model.IndexObject; |
| | | import com.vci.omd.constants.AttributeConstants; |
| | | import com.vci.omd.constants.FileObjectType; |
| | |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.po.OsBtmTypePO; |
| | | import com.vci.po.OsLinkTypePO; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | | import com.vci.starter.poi.bo.WriteExcelOption; |
| | | import com.vci.starter.poi.constant.ExcelLangCodeConstant; |
| | | import com.vci.starter.poi.util.ExcelUtil; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.pagemodel.Tree; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.Lcm.ConcurrentDateFormat; |
| | | import com.vci.starter.web.util.Lcm.DateUtil; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.*; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.swing.*; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.text.ParseException; |
| | |
| | | List<OsBtmTypeAttributeVO> btmTypeAttributeVOS = new ArrayList<>(); |
| | | Optional.ofNullable(attributeVOS).orElseGet(() -> new ArrayList<>()).stream().forEach(attributeVO -> { |
| | | OsBtmTypeAttributeVO btmTypeAttributeVO = new OsBtmTypeAttributeVO(); |
| | | BeanUtil.convert(attributeVO, btmTypeAttributeVO); |
| | | BeanUtilForVCI.convert(attributeVO, btmTypeAttributeVO); |
| | | btmTypeAttributeVO.setPkBtmType(vo.getOid()); |
| | | btmTypeAttributeVO.setBtmTypeId(vo.getId()); |
| | | btmTypeAttributeVO.setAttributeDataType(attributeVO.getAttributeDataType()); |
| | |
| | | List<OsBtmTypeAttributeVO> finalAttrVOs = attrVOs; |
| | | defaultAttributeVOs.stream().forEach(attr -> { |
| | | OsBtmTypeAttributeVO attributeVO = new OsBtmTypeAttributeVO(); |
| | | BeanUtil.convert(attr, attributeVO); |
| | | BeanUtilForVCI.convert(attr, attributeVO); |
| | | attributeVO.setAttributeDataType(attr.getAttributeDataType()); |
| | | attributeVO.setAttributeLength(attr.getAttrLength()); |
| | | attributeVO.setReferBtmTypeId(attr.getBtmTypeId()); |
| | |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.web.service.OsDataAuthServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * æ°æ®æéçæ§å¶å¨ |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.vci.client.common.providers.ClientServiceProvider; |
| | | import com.vci.constant.EnumIdConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.atm.AttributeDef; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.corba.omd.etm.EnumItem; |
| | | import com.vci.corba.omd.etm.EnumType; |
| | | import com.vci.dto.OsEnumDTO; |
| | | import com.vci.dto.OsEnumItemDTO; |
| | | import com.vci.omd.objects.OtherInfo; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.pagemodel.KeyValue; |
| | | import com.vci.pagemodel.OsEnumItemVO; |
| | | import com.vci.pagemodel.OsEnumVO; |
| | | import com.vci.pagemodel.OsStatusVO; |
| | | import com.vci.po.OsEnumPO; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.constant.EnumIdConstant; |
| | | import com.vci.web.service.OsEnumServiceI; |
| | | import com.vci.web.service.OsLifeCycleServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import com.vci.corba.omd.lcm.LifeCycle; |
| | | import com.vci.corba.omd.lcm.TransitionVO; |
| | | import com.vci.corba.omd.lcm.TransitionVOEvent; |
| | | import com.vci.dto.*; |
| | | import com.vci.dto.OsLifeCycleDTO; |
| | | import com.vci.model.OsLifeCycleDO; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.po.OsLifeCyclePO; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.model.OsLifeCycleDO; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.service.OsLifeCycleServiceI; |
| | | import com.vci.web.service.OsStatusServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.swing.*; |
| | | import java.io.File; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | import com.vci.corba.omd.btm.BizType; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.corba.omd.ltm.LinkTypeServicePrx; |
| | | import com.vci.dto.OsAttributeDTO; |
| | | import com.vci.model.OsLinkTypeDO; |
| | | import com.vci.omd.constants.AttributeConstants; |
| | | import com.vci.omd.constants.LinkTypeConstants; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.po.OsAttributePO; |
| | | import com.vci.po.OsLinkTypePO; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | |
| | | import com.vci.starter.poi.constant.ExcelLangCodeConstant; |
| | | import com.vci.starter.poi.util.ExcelUtil; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.enumpck.ResultCodeEnum; |
| | | import com.vci.starter.web.enumpck.VciFieldTypeEnum; |
| | | 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.*; |
| | | import com.vci.model.OsLinkTypeDO; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import javafx.scene.shape.HLineTo; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | List<OsLinkTypeAttributeVO> linkTypeAttributeVOS = new ArrayList<>(); |
| | | Optional.ofNullable(attributeVOS).orElseGet(()->new ArrayList<>()).stream().forEach(attributeVO->{ |
| | | OsLinkTypeAttributeVO linkTypeAttributeVO = new OsLinkTypeAttributeVO(); |
| | | BeanUtil.convert(attributeVO,linkTypeAttributeVO); |
| | | BeanUtilForVCI.convert(attributeVO,linkTypeAttributeVO); |
| | | linkTypeAttributeVO.setPkLinkType(vo.getOid()); |
| | | if(StringUtils.isNotBlank(attributeVO.getBtmTypeId())){ |
| | | linkTypeAttributeVO.setReferFlag(true); |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/LoginServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.bo.LoginResultBO; |
| | | import com.vci.constant.CacheNameConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.framework.data.DeptInfo; |
| | | import com.vci.corba.framework.data.LoginResult; |
| | | import com.vci.corba.framework.data.LoginState; |
| | | import com.vci.corba.framework.data.MachineInfo; |
| | | import com.vci.frameworkcore.ajaxTask.SmUserUnLockTask; |
| | | import com.vci.frameworkcore.ajaxTask.SmUserUnLockTaskManager; |
| | | import com.vci.frameworkcore.compatibility.ISmFunctionQueryService; |
| | | import com.vci.frameworkcore.compatibility.SmPwdStrategyQueryServiceI; |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.frameworkcore.enumpck.ResourceControlTypeEnum; |
| | | import com.vci.frameworkcore.lcstatuspck.FrameworkDataLCStatus; |
| | | import com.vci.dto.LoginUserDTO; |
| | | import com.vci.lcstatuspck.FrameworkDataLCStatus; |
| | | import com.vci.pagemodel.SmFunctionVO; |
| | | import com.vci.pagemodel.SmPasswordStrategyVO; |
| | | import com.vci.pagemodel.SmUserVO; |
| | | import com.vci.frameworkcore.properties.VciSecurityManageProperties; |
| | | import com.vci.starter.web.annotation.bus.VciLoginAfter; |
| | | import com.vci.starter.web.annotation.bus.VciLogoutBefore; |
| | | import com.vci.starter.web.annotation.bus.VciLogoutPlugin; |
| | |
| | | import com.vci.starter.web.pagemodel.RequestClientInfo; |
| | | import com.vci.starter.web.pagemodel.SessionInfo; |
| | | import com.vci.starter.web.pagemodel.TokenVO; |
| | | import com.vci.starter.web.util.*; |
| | | |
| | | import com.vci.bo.LoginResultBO; |
| | | import com.vci.constant.CacheNameConstant; |
| | | import com.vci.dto.LoginUserDTO; |
| | | import com.vci.web.properties.WebProperties; |
| | | import com.vci.starter.web.redis.RedisService; |
| | | import com.vci.web.service.LoginServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.ApplicationContextProvider; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.starter.web.util.WebThreadLocalUtil; |
| | | import com.vci.web.ajaxTask.SmUserUnLockTask; |
| | | import com.vci.web.ajaxTask.SmUserUnLockTaskManager; |
| | | import com.vci.web.enumpck.ResourceControlTypeEnum; |
| | | import com.vci.web.properties.VciSecurityManageProperties; |
| | | import com.vci.web.properties.WebProperties; |
| | | import com.vci.web.service.ISmFunctionQueryService; |
| | | import com.vci.web.service.OsLoginServiceI; |
| | | import com.vci.web.service.SmPwdStrategyQueryServiceI; |
| | | import com.vci.web.service.SmUserQueryServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | |
| | | * @date 2020/1/29 |
| | | */ |
| | | @Service |
| | | public class LoginServiceImpl implements LoginServiceI { |
| | | public class OsLoginServiceImpl implements OsLoginServiceI { |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | |
| | | return loginResult; |
| | | } |
| | | |
| | | /** |
| | | * ç»å½_åºå¼æ¹æ³ï¼ä¸»è¦ç¨æ¥å¤ä»½ |
| | | * @param userDTO ç¨æ·çæ°æ®ä¼ è¾å¯¹è±¡ |
| | | * @param clientInfo 客æ·ç«¯çä¿¡æ¯ |
| | | * @param checkPassword æ¯å¦æ ¡éªå¯ç |
| | | * @return æ§è¡ç»æ |
| | | * @throws VciBaseException åæ°é误ï¼ç¨æ·ä¸è½ç»å½ç伿åºå¼å¸¸ |
| | | */ |
| | | private LoginResultBO login_old(LoginUserDTO userDTO, RequestClientInfo clientInfo, boolean checkPassword/*åç¹ç»å½ä¸éè¦æ ¡éªå¯ç */) throws VciBaseException, PLException { |
| | | LoginResultBO loginResult = new LoginResultBO(); |
| | | loginResult.setSuccess(false); |
| | | |
| | | //1.å¤æç¨æ·çåºæ¬ä¿¡æ¯ |
| | | VciBaseUtil.alertNotNull(userDTO, "ç»å½ä¿¡æ¯", userDTO.getUserId(), "ç¨æ·è´¦å·"); |
| | | if (checkPassword) { |
| | | VciBaseUtil.alertNotNull(userDTO.getPassword(), "ç»å½å¯ç "); |
| | | } |
| | | //2ã夿å设å¤ç»å½,æ¯å¦å·²ç»ç»å½äº |
| | | String userIdTokenKey = CacheNameConstant.cacheKey(CacheNameConstant.USERID_TOKEN_KEY, userDTO.getUserId().trim()); |
| | | if(redisService.hasKey(userIdTokenKey) && !userDTO.isForceLogin() && securityManageProperties.isUserOneLogin()){ |
| | | loginResult.setFailCode(USER_IS_LOGINED); |
| | | loginResult.setFailMsg("å½åç¨æ·å·²ç»å¨å
¶ä»å°æ¹ç»å½ï¼"); |
| | | return loginResult; |
| | | } |
| | | //说æå·²ç»ç»å½äºï¼é£åºè¯¥åæ¶åæ¥çç»å½ |
| | | if (redisService.hasKey(userIdTokenKey) && userDTO.isForceLogin() && securityManageProperties.isUserOneLogin()) { |
| | | String tokenKey = redisService.getCacheObject(userIdTokenKey); |
| | | redisService.deleteObject(tokenKey); |
| | | redisService.deleteObject(userIdTokenKey); |
| | | } |
| | | |
| | | //3.è·åç¨æ·ç对象ï¼å¯¹è±¡ä¸å
å«è§è²é¨é¨è¿æå¯ç çç¥ä¿¡æ¯ï¼ |
| | | SmUserVO user = getUserByUserId(userDTO.getUserId().trim()); |
| | | if (user == null || StringUtils.isBlank(user.getOid())) { |
| | | loginResult.setFailCode(USER_NOT_FOUND); |
| | | loginResult.setFailMsgArray(new String[]{userDTO.getUserId()}); |
| | | return loginResult; |
| | | } |
| | | |
| | | //3ã夿å¯ç æ¯å¦æ£ç¡® |
| | | if (checkPassword) { |
| | | boolean passwordIsEqual = userQueryService.checkPasswordEqual(userDTO.getPassword(), user.getName()); |
| | | if (!passwordIsEqual) { |
| | | if (logger.isDebugEnabled()) { |
| | | logger.debug("{}å¯ç 䏿£ç¡®", user.getId()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //4ãè°ç¨å¹³å°ç»å½æ¥å£ï¼è¿è¡ç»å½ |
| | | MachineInfo machine = getMachieInfo(clientInfo); |
| | | machine.country = clientInfo.getCountry(); |
| | | machine.language = clientInfo.getLanguage(); |
| | | machine.osUser = clientInfo.getOsUser(); |
| | | machine.machine = clientInfo.getMachine(); |
| | | String token = null; |
| | | try { |
| | | LoginResult chkRes = platformClientUtil.getFrameworkService().checkLogin(userDTO.getUserId(),userDTO.getPassword(), machine); |
| | | loginResult.setFailCode(getErrorCode(chkRes)); |
| | | loginResult.setFailMsgArray(new String[]{userDTO.getUserId(), String.valueOf(chkRes.auxInfo)}); |
| | | if(chkRes.state == LoginState.Error || chkRes.state == LoginState.Locked || chkRes.state == LoginState.Freeze){ |
| | | return loginResult; |
| | | } |
| | | token = chkRes.token; |
| | | } catch (Exception e) { |
| | | loginResult.setFailCode(SYSTEM_ERROR); |
| | | loginResult.setFailMsgArray(new String[]{userDTO.getUserId()}); |
| | | return loginResult; |
| | | } |
| | | if(StringUtils.isBlank(token)){ |
| | | loginResult.setFailMsg(TOKEN_EMPTY); |
| | | loginResult.setFailMsgArray(new String[]{userDTO.getUserId()}); |
| | | return loginResult; |
| | | } |
| | | |
| | | //å¦æç¨æ·å·²ç»è¢«åç¨åéå®ï¼ä¸è½ç»å½ |
| | | if (FrameworkDataLCStatus.DISABLED.getValue().equals(user.getLcStatus())) { |
| | | loginResult.setFailCode(USER_IS_DISABLED); |
| | | loginResult.setFailMsgArray(new String[]{userDTO.getUserId()}); |
| | | return loginResult; |
| | | } |
| | | if (userQueryService.checkUserLock(user, user.getPwdWrongCount())) { |
| | | loginResult.setFailCode(USER_IS_LOCK); |
| | | loginResult.setFailMsgArray(new String[]{userDTO.getUserId()}); |
| | | return loginResult; |
| | | } |
| | | |
| | | //å¦æç¨æ·çå¤±ææ¥æå·²ç»è¶
è¿äºå½åæ¶é´ï¼ä¸è½ç»å½ |
| | | //åªææ°å¹³å°çç¨æ·æå¤æå¤±æ |
| | | /*if (user.getDisabledate() != null) { |
| | | //2021çæ¬ææè¿ä¸ªå±æ§çå¼ï¼å½åè¿ä¸ªæ²¡æè¿ä¸ªå¼ |
| | | Date disableDate = VciDateUtil.addOrSubDate(user.getDisabledate(), Calendar.DATE, 1); |
| | | if (disableDate != null && disableDate.getTime() < System.currentTimeMillis()) { |
| | | loginResult.setFailCode(USER_MORE_THAN_DISABLE_DATE); |
| | | loginResult.setFailMsgArray(new String[]{userDTO.getUserId()}); |
| | | return loginResult; |
| | | } |
| | | }*/ |
| | | //å½åç¨æ·æ²¡æé
置就æ¥è¯¢é»è®¤çå¯ç çç¥ |
| | | SmPasswordStrategyVO passwordStrategyVO = pwdStrategyQueryService.getPasswordStrategyVOByUserOid(user.getOid()); |
| | | if (checkPassword) { |
| | | //å端éè¦å
md5䏿¬¡ï¼ç¶ååå°åMD5䏿¬¡ï¼ |
| | | if (logger.isDebugEnabled()) { |
| | | logger.debug("{}å¯ç 䏿£ç¡®", user.getId()); |
| | | } |
| | | //åªè¦æ°æ®æ²¡æé®é¢å°±ä¸åå¨å¯ç çç¥ä¸ºç©ºçæ
åµ |
| | | if (passwordStrategyVO == null) { |
| | | //å¯è½æ°æ®é®é¢æ²¡æè®¾ç½®å¯ç çç¥ |
| | | passwordStrategyVO = new SmPasswordStrategyVO(); |
| | | passwordStrategyVO.setRetryTime(6); |
| | | passwordStrategyVO.setLockTime(30); |
| | | } |
| | | //夿å¯ç éè¯¯æ¬¡æ°æ¯å¦è¾¾å°ä¸é |
| | | if (passwordStrategyVO.getRetryTime() <= (user.getPwdWrongCount() + 1)) { |
| | | user.setLockFlag(true); |
| | | updateUserPwdWrongCount(user.getOid(), user.getPwdWrongCount() + 1); |
| | | addUserToUnLock(userDTO.getUserId(), passwordStrategyVO.getLockTime()); |
| | | //updateUserPwdWrongCount(user.getOid(), user.getPwdWrongCount() + 1); |
| | | loginResult.setFailCode(USER_PWD_LOCK); |
| | | loginResult.setFailMsgArray(new String[]{userDTO.getUserId(), passwordStrategyVO.getLockTime() + ""}); |
| | | return loginResult; |
| | | } else { |
| | | //è¿æ²¡æå°éå®çæ¬¡æ° |
| | | updateUserPwdWrongCount(user.getOid(), user.getPwdWrongCount() + 1); |
| | | //5, è¿æ¯ç¬¬ä¸æ¬¡é误ï¼å©ä¸çæ¯ 5- ï¼0+1ï¼ |
| | | loginResult.setFailCode(USER_PWD_NOT_EQUAL); |
| | | loginResult.setFailMsgArray(new String[]{userDTO.getUserId(), (passwordStrategyVO.getRetryTime() - (user.getPwdWrongCount() + 1)) + ""}); |
| | | return loginResult; |
| | | } |
| | | } |
| | | |
| | | //æ£æ¥æ¯å¦è¯¥ä¿®æ¹å¯ç |
| | | if (!clientInfo.isSso() && checkPassword) { |
| | | //æåä¿®æ¹æ¶é´ + å¤±ææ¶é´ï¼å¤§äºçäºå½åæ¥æï¼åéè¦é©¬ä¸ä¿®æ¹å¯ç |
| | | Date currentDay = null; |
| | | try { |
| | | currentDay = VciDateUtil.getNow(VciDateUtil.DateFormat); |
| | | } catch (Throwable e) { |
| | | if (logger.isErrorEnabled()) { |
| | | logger.error("è·åå½åæ¥æ", e); |
| | | } |
| | | } |
| | | if (currentDay != null && passwordStrategyVO != null && passwordStrategyVO.getValidDay() != null) { |
| | | Date inValidDay = null; |
| | | if (user.getLastModifyPasswordTime() == null) { |
| | | //仿¥æ²¡æç»å½è¿ |
| | | loginResult.setMustChangePassword(true); |
| | | } else { |
| | | inValidDay = VciDateUtil.addOrSubDate(user.getLastModifyPasswordTime(), Calendar.DATE, passwordStrategyVO.getValidDay()); |
| | | if (inValidDay.getTime() <= (currentDay).getTime()) { |
| | | loginResult.setMustChangePassword(true); |
| | | } |
| | | } |
| | | if (!loginResult.isMustChangePassword()) { |
| | | if (VciDateUtil.addOrSubDate(inValidDay, Calendar.DATE, -(passwordStrategyVO.getRemindDay())).getTime() |
| | | <= (currentDay).getTime()) { |
| | | //æ¨çå¯ç è¿æ{0}å¤©è¿æï¼è¯·åæ¶ä¿®æ¹å¯ç |
| | | long remainDay = VciDateUtil.getDaySub(inValidDay, currentDay); |
| | | loginResult.setPasswordInfo(MessageFormat.format(PASSWORD_REMAIN_DAY, new String[]{String.valueOf(remainDay)})); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //说æå¯ç æ£ç¡®ç |
| | | if (logger.isDebugEnabled()) { |
| | | logger.debug("{}çå¯ç æ£ç¡®", user.getId()); |
| | | } |
| | | user.setLastLoginTime(new Date()); |
| | | user.setPwdWrongCount(0); |
| | | |
| | | SessionInfo sessionInfo = new SessionInfo(); |
| | | sessionInfo.setToken(token); |
| | | |
| | | //åå§åå¹³å°çtoken |
| | | sessionForLogin.initInvocationInfo(sessionInfo); |
| | | |
| | | //æ·è´ç¨æ·çæ°å°sessionä¼è¯ä¸ |
| | | copyUser2SessionInfo(user, sessionInfo, userDTO.getLangCode()); |
| | | //æ·è´è¯·æ±ä¿¡æ¯å°sessionä¼è¯ä¸ |
| | | copyRequest2SessionInfo(clientInfo, sessionInfo); |
| | | |
| | | //è·å人åæå±çé¨é¨ä¿¡æ¯ |
| | | try { |
| | | DeptInfo deptInfo = platformClientUtil.getFrameworkService().fetchDeptByUserId(user.getOid()); |
| | | sessionInfo.setDeptOid(deptInfo.id); |
| | | sessionInfo.setDeptName(deptInfo.name); |
| | | sessionInfo.setDeptNum(deptInfo.num); |
| | | } catch (PLException e) { |
| | | throw new VciBaseException("è·åç¨æ·æå±é¨é¨å¤±è´¥:"+e.getMessage()); |
| | | } |
| | | |
| | | /** //æ¥è¯¢ææçè§è² |
| | | List<SmRoleVO> roleVOList = roleQueryService.listRoleByUserOid(user.getOid(), null); |
| | | if (!CollectionUtils.isEmpty(roleVOList)) { |
| | | Map<String, String> roleOidNameMap = roleVOList.stream().collect(Collectors.toMap(s -> s.getOid(), t -> t.getName())); |
| | | sessionInfo.setRolesName(roleOidNameMap); |
| | | } else { |
| | | sessionInfo.setRolesName(new HashMap()); |
| | | } |
| | | //æ¥è¯¢ææçæé |
| | | List<SmFunctionVO> functionVOList = functionQueryService.listFunctionByUserOid(user.getOid(), null, ResourceControlTypeEnum.BS); |
| | | if (!CollectionUtils.isEmpty(functionVOList)) { |
| | | List<String> functionOidList = functionVOList.stream().map(s -> s.getOid()).collect(Collectors.toList()); |
| | | sessionInfo.setFunctionOids(functionOidList); |
| | | } else { |
| | | sessionInfo.setFunctionOids(new ArrayList()); |
| | | }*/ |
| | | |
| | | //æ·»å å°ä¼è¯ä¿¡æ¯ |
| | | TokenVO tokenVO = saveSessionInfo(sessionInfo); |
| | | loginResult.setTokenVO(tokenVO); |
| | | |
| | | loginResult.setSuccess(true); |
| | | return loginResult; |
| | | } |
| | | |
| | | private MachineInfo getMachieInfo(RequestClientInfo clientInfo) { |
| | | MachineInfo machine = new MachineInfo(); |
| | | machine.country = clientInfo.getCountry(); |
| | |
| | | */ |
| | | private SmUserVO getUserByUserId(String userId) { |
| | | return userQueryService.getUserByUserId(userId); |
| | | } |
| | | |
| | | /** |
| | | * åç¹ç»å½ |
| | | * |
| | | * @param userDTO ç»å½ä¿¡æ¯ |
| | | * @param clientInfo 请æ±ç客æ·ç«¯çä¿¡æ¯ |
| | | * @return ç»å½çç»æå¯¹è±¡ |
| | | * @throws VciBaseException ç»å½å¤±è´¥çæ¶åæåºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public LoginResultBO singleLogin(LoginUserDTO userDTO, RequestClientInfo clientInfo) throws Exception { |
| | | return login(userDTO,clientInfo,false); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.vci.corba.portal.PortalService.GetPagePortalVIArrayByPageInfoResult; |
| | | import com.vci.corba.portal.data.PortalVI; |
| | | import com.vci.dto.*; |
| | | import com.vci.model.*; |
| | | import com.vci.enumpck.UI.ItemTypeEnum; |
| | | import com.vci.model.PRMDO; |
| | | import com.vci.model.PRMItemDO; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.po.PortalVIPO; |
| | | import com.vci.po.QTDPO; |
| | |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.word.bo.WordMergeStartTableDataBO; |
| | | import com.vci.starter.word.util.WordUtil; |
| | | import com.vci.web.enumpck.ItemTypeEnum; |
| | | import com.vci.web.enumpck.PortalVIType; |
| | | import com.vci.web.enumpck.PortalVITypeFlag; |
| | | import com.vci.web.other.BtmQTExportData; |
| | | import com.vci.web.service.OsAttributeServiceI; |
| | | import com.vci.web.service.OsPortalVIServiceI; |
| | | import com.vci.web.service.OsQuereyTemplateServiceI; |
| | |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.*; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.FileOutputStream; |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.corba.framework.data.PvolumeInfo; |
| | | import com.vci.dto.*; |
| | | import com.vci.dto.OsPvolumeDTO; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | | import com.vci.starter.poi.bo.WriteExcelOption; |
| | | import com.vci.starter.poi.util.ExcelUtil; |
| | |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.WebThreadLocalUtil; |
| | | import com.vci.web.service.OsPvolumesServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.io.*; |
| | | import java.io.File; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import cn.hutool.core.io.FileUtil; |
| | | import cn.hutool.core.util.ZipUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.vci.client.ClientSession; |
| | | import com.vci.client.common.oq.OQTool; |
| | | import com.vci.client.common.providers.ClientServiceProvider; |
| | | import com.vci.common.qt.object.*; |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.corba.common.PLException; |
| | |
| | | import com.vci.dto.*; |
| | | import com.vci.omd.constants.SystemAttribute; |
| | | import com.vci.omd.objects.OtherInfo; |
| | | import com.vci.po.OsLinkTypePO; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | | import com.vci.starter.poi.bo.WriteExcelOption; |
| | | import com.vci.starter.poi.constant.ExcelLangCodeConstant; |
| | | 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.DataGrid; |
| | | import com.vci.starter.web.pagemodel.Tree; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.starter.web.util.ControllerUtil; |
| | | import com.vci.starter.web.util.Lcm.DateUtil; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.other.BtmQTExportData; |
| | | import com.vci.web.other.LinkQTExportData; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.DateUtil; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.service.OsQuereyTemplateServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.commons.lang3.time.DateFormatUtils; |
| | | import org.dom4j.Document; |
| | | import org.dom4j.DocumentException; |
| | | import org.dom4j.DocumentHelper; |
| | | import org.dom4j.Element; |
| | | import org.jdesktop.swingx.JXDatePicker; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.swing.*; |
| | | import java.awt.*; |
| | | import java.io.*; |
| | | import java.util.*; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.client.mw.ClientSessionUtility; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.stm.StatePool; |
| | | import com.vci.corba.omd.vrm.VersionRule; |
| | | import com.vci.dto.OsAttributeDTO; |
| | | import com.vci.dto.OsRevisionRuleDTO; |
| | | import com.vci.dto.OsStatusDTO; |
| | | import com.vci.pagemodel.OsAttributeVO; |
| | | import com.vci.pagemodel.OsEnumVO; |
| | | import com.vci.pagemodel.OsStatusVO; |
| | | import com.vci.po.OsAttributePO; |
| | | import com.vci.po.OsEnumPO; |
| | | import com.vci.pagemodel.OsRevisionRuleVO; |
| | | import com.vci.po.OsRevisionRulePO; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.pagemodel.OsRevisionRuleVO; |
| | | import com.vci.web.service.OsRevisionRuleServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.swing.*; |
| | | import java.awt.*; |
| | | import java.io.File; |
| | | import java.util.*; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.stm.StatePool; |
| | | import com.vci.dto.OsStatusDTO; |
| | | import com.vci.model.OsStatusDO; |
| | | import com.vci.pagemodel.OsStatusVO; |
| | | import com.vci.po.OsStatusPO; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.dto.OsStatusDTO; |
| | | import com.vci.model.OsStatusDO; |
| | | import com.vci.pagemodel.OsStatusVO; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.service.OsLifeCycleServiceI; |
| | | import com.vci.web.service.OsStatusServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.client.mw.ClientContextVariable; |
| | | import com.vci.common.utility.ObjectUtility; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.portal.data.PLAction; |
| | | import com.vci.corba.portal.data.PLTypeAction; |
| | | import com.vci.dto.PLActionDTO; |
| | | import com.vci.dto.PLTypeActionDTO; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.OsTypeActionServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.UITools; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.client.common.providers.ClientServiceProvider; |
| | | import com.vci.common.exception.VciException; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.corba.framework.data.AppConfigCategoryInfo; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.swing.*; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.constant.FrameWorkBtmTypeConstant; |
| | | import com.vci.frameworkcore.compatibility.ISmFunctionQueryService; |
| | | import com.vci.model.SmFavFunctionDO; |
| | | import com.vci.pagemodel.SmFunctionVO; |
| | | import com.vci.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.model.SmFavFunctionDO; |
| | | import com.vci.web.service.ISmFunctionQueryService; |
| | | import com.vci.web.service.SmFavFunctionServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.WebUtil; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmFunctionQueryServicePlatformImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility.impl; |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.JSONReader; |
| | | import com.vci.client.ClientSession; |
| | | import com.vci.client.common.objects.RoleObject; |
| | | import com.vci.common.exception.VciException; |
| | | import com.vci.common.locale.LocaleDisplay; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.corba.framework.data.*; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.corba.portal.data.PLUILayout; |
| | | import com.vci.dto.RoleInfoDTO; |
| | | import com.vci.dto.RoleRightDTO; |
| | | import com.vci.dto.RoleRightParamDTO; |
| | | import com.vci.frameworkcore.compatibility.ISmFunctionQueryService; |
| | | import com.vci.frameworkcore.enumpck.ResourceControlTypeEnum; |
| | | import com.vci.model.RoleRightDO; |
| | | import com.vci.model.SmFunctionForPlatform1; |
| | | import com.vci.model.SmRoleForPlatform1; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.MenuVO; |
| | | import com.vci.pagemodel.SmFunctionVO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.UIContentVO; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.pagemodel.UIContentVO; |
| | | import com.vci.web.enumpck.ResourceControlTypeEnum; |
| | | import com.vci.web.properties.JsonConfigReader; |
| | | import com.vci.web.service.ISmFunctionQueryService; |
| | | import com.vci.web.service.UIEngineServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.RightControlUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.el.stream.Stream; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmHMSysModConfigServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility.impl; |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.common.exception.VciException; |
| | | 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.*; |
| | | import com.vci.frameworkcore.compatibility.SmHMSysModConfigServiceI; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.pagemodel.ExpExcelConditionVO; |
| | | import com.vci.pagemodel.MenuVO; |
| | | import com.vci.starter.poi.bo.SheetDataSet; |
| | | import com.vci.starter.poi.bo.SheetRowData; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | |
| | | 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.redis.RedisService; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.WebThreadLocalUtil; |
| | | import com.vci.starter.web.redis.RedisService; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.service.SmHMSysModConfigServiceI; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.*; |
| | | import java.io.BufferedWriter; |
| | | import java.io.File; |
| | | import java.io.FileWriter; |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.pagemodel.SmOperationVO; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.SmOperationServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmPwdStrategyQueryServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility.impl; |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.dto.SmPasswordStrategyDTO; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.corba.framework.data.PasswordStrategyInfo; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.frameworkcore.compatibility.SmPwdStrategyQueryServiceI; |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.frameworkcore.enumpck.CombinationEnum; |
| | | import com.vci.dto.SmPasswordStrategyDTO; |
| | | import com.vci.model.SmPasswordStrategyDO; |
| | | import com.vci.model.SmPasswordStrategyForPlatform1; |
| | | import com.vci.pagemodel.SmPasswordStrategyVO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.SmPasswordStrategyVO; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.web.service.SmUserQueryServiceI; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.WebThreadLocalUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.enumpck.CombinationEnum; |
| | | import com.vci.web.service.SmPwdStrategyQueryServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | SmPasswordStrategyDO passwordStrategyDO = new SmPasswordStrategyDO(); |
| | | WebUtil.copyValueToObjectFromCbos(item,passwordStrategyDO); |
| | | SmPasswordStrategyVO passwordStrategyVO = new SmPasswordStrategyVO(); |
| | | BeanUtil.convert(passwordStrategyDO,passwordStrategyVO); |
| | | BeanUtilForVCI.convert(passwordStrategyDO,passwordStrategyVO); |
| | | smPasswordStrategyVOMap.put(passwordStrategyVO.getOid(),passwordStrategyVO); |
| | | }); |
| | | return smPasswordStrategyVOMap; |
| | |
| | | SmPasswordStrategyDO passwordStrategyDO = new SmPasswordStrategyDO(); |
| | | WebUtil.copyValueToObjectFromCbos(cboList.get(0),passwordStrategyDO); |
| | | SmPasswordStrategyVO passwordStrategyVO = new SmPasswordStrategyVO(); |
| | | BeanUtil.convert(passwordStrategyDO,passwordStrategyVO); |
| | | BeanUtilForVCI.convert(passwordStrategyDO,passwordStrategyVO); |
| | | return passwordStrategyVO; |
| | | }else{ |
| | | //è·åé»è®¤ç |
| | |
| | | */ |
| | | private SmPasswordStrategyVO pwdStrategyDO2VO(SmPasswordStrategyDO smPasswordStrategyDO){ |
| | | SmPasswordStrategyVO passwordStrategyVO = new SmPasswordStrategyVO(); |
| | | BeanUtil.convert(smPasswordStrategyDO,passwordStrategyVO); |
| | | BeanUtilForVCI.convert(smPasswordStrategyDO,passwordStrategyVO); |
| | | return passwordStrategyVO; |
| | | } |
| | | |
| | |
| | | SmPasswordStrategyDO passwordStrategyDO = new SmPasswordStrategyDO(); |
| | | WebUtil.copyValueToObjectFromCbos(item,passwordStrategyDO); |
| | | SmPasswordStrategyVO passwordStrategyVO = new SmPasswordStrategyVO(); |
| | | BeanUtil.convert(passwordStrategyDO,passwordStrategyVO); |
| | | BeanUtilForVCI.convert(passwordStrategyDO,passwordStrategyVO); |
| | | smPasswordStrategyVOList.add(passwordStrategyVO); |
| | | }); |
| | | return smPasswordStrategyVOList; |
ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmSessionForLoginImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.frameworkcore.compatibility.impl; |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.client.mw.ClientSessionUtility; |
| | | import com.vci.constant.CacheNameConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.InvocationInfo; |
| | | import com.vci.corba.omd.data.AttributeValue; |
| | |
| | | import com.vci.starter.web.interceptor.VciSessionForLoginI; |
| | | import com.vci.starter.web.pagemodel.SessionInfo; |
| | | import com.vci.starter.web.pagemodel.TokenVO; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.constant.CacheNameConstant; |
| | | import com.vci.web.properties.WebProperties; |
| | | import com.vci.starter.web.redis.RedisService; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.web.properties.WebProperties; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | |
| | | import com.vci.common.qt.object.QueryTemplate; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.framework.data.UserInfo; |
| | | import com.vci.corba.omd.data.*; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.corba.omd.data.LinkObject; |
| | | import com.vci.corba.omd.data.RevisionDataInfo; |
| | | import com.vci.corba.omd.data.VersionDataInfo; |
| | | import com.vci.corba.omd.lcm.LifeCycle; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.corba.omd.qtm.QTInfo; |
| | | import com.vci.corba.query.data.BOAndLO; |
| | | import com.vci.dto.*; |
| | | import com.vci.frameworkcore.lcstatuspck.FrameworkDataLCStatus; |
| | | import com.vci.frameworkcore.lcstatuspck.ReleaseDataLCStatus; |
| | | import com.vci.lcstatuspck.FrameworkDataLCStatus; |
| | | import com.vci.lcstatuspck.ReleaseDataLCStatus; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.query.UIDataGridQuery; |
| | | import com.vci.query.UIFormQuery; |
| | | import com.vci.query.UILinkTypeDataQuery; |
| | | import com.vci.query.UITreeQuery; |
| | | import com.vci.starter.revision.bo.TreeWrapperOptions; |
| | | import com.vci.starter.web.annotation.bus.VciChangeDataAfter; |
| | | import com.vci.starter.web.annotation.bus.VciChangeDataBefore; |
| | |
| | | import com.vci.starter.web.model.BaseModel; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.enumpck.DeleteTypeEnum; |
| | | import com.vci.web.enumpck.UIFieldTypeEnum; |
| | | import com.vci.web.enumpck.UITreeLoadTypeEnum; |
| | | import com.vci.web.query.UIDataGridQuery; |
| | | import com.vci.web.query.UIFormQuery; |
| | | import com.vci.web.query.UILinkTypeDataQuery; |
| | | import com.vci.web.query.UITreeQuery; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.constant.FrameWorkBusLangCodeConstant.DATA_OID_NOT_EXIST; |
| | | |
| | | |
| | | /** |
| | | * UIä¸çæ°æ®æ¥è¯¢ |
| | |
| | | if((baseModelDTOList == null || CollectionUtils.isEmpty(baseModelDTOList.getDataList())) && (baseLinkModelDTOList == null || CollectionUtils.isEmpty(baseLinkModelDTOList.getDataList()))){ |
| | | return BaseResult.success(); |
| | | } |
| | | String btmType = (baseModelDTOList !=null && !CollectionUtils.isEmpty(baseModelDTOList.getDataList()))? baseModelDTOList.getDataList().get(0).getBtmname():null; |
| | | String btmType = (baseModelDTOList !=null && !CollectionUtils.isEmpty(baseModelDTOList.getDataList()))? baseModelDTOList.getDataList().get(0).getBtmName():null; |
| | | String linkType = (baseLinkModelDTOList !=null && !CollectionUtils.isEmpty(baseLinkModelDTOList.getDataList()))?baseLinkModelDTOList.getDataList().get(0).getLinkType():null; |
| | | if(StringUtils.isNotBlank(preEvent)){ |
| | | //åç½®äºä»¶ |
| | |
| | | public BaseModelDTOList formData2DTOList(FormDataDTO formDataDTO){ |
| | | BaseModelDTOList modelDTOList = new BaseModelDTOList(); |
| | | BaseModelDTO modelDTO = new BaseModelDTO(); |
| | | BeanUtil.convert((BaseModelDTO)formDataDTO,modelDTO); |
| | | BeanUtilForVCI.convert(formDataDTO,modelDTO); |
| | | modelDTO.setData(formDataDTO.getData()); |
| | | List<BaseModelDTO> modelDTOS = new ArrayList<>(); |
| | | modelDTOS.add(modelDTO); |
| | |
| | | BaseLinkModelDTOList modelDTOList = new BaseLinkModelDTOList(); |
| | | BaseLinkModelDTO modelDTO = new BaseLinkModelDTO(); |
| | | modelDTO.setData(formLinkDataDTO.getData()); |
| | | BeanUtil.convert((BaseLinkModelDTO)formLinkDataDTO,modelDTO); |
| | | BeanUtilForVCI.convert(formLinkDataDTO,modelDTO); |
| | | List<BaseLinkModelDTO> linkModelDTOS = new ArrayList<>(); |
| | | linkModelDTOS.add(modelDTO); |
| | | modelDTOList.setDataList(linkModelDTOS); |
| | |
| | | modelDTOS.stream().findAny().orElseGet(()->null); |
| | | formDataDTOList.getFormDataDTOS().forEach(formDataDTO -> { |
| | | BaseModelDTO modelDTO = new BaseModelDTO(); |
| | | BeanUtil.convert((BaseModelDTO)formDataDTO,modelDTO); |
| | | BeanUtilForVCI.convert((BaseModelDTO)formDataDTO,modelDTO); |
| | | modelDTO.setData(formDataDTO.getData()); |
| | | modelDTOS.add(modelDTO); |
| | | }); |
| | |
| | | List<BaseLinkModelDTO> modelDTOS = new ArrayList<>(); |
| | | formLinkDataDTOList.getDataDTOList().forEach(formDataDTO -> { |
| | | BaseLinkModelDTO modelDTO = new BaseLinkModelDTO(); |
| | | BeanUtil.convert((BaseLinkModelDTO)formDataDTO,modelDTO); |
| | | BeanUtilForVCI.convert((BaseLinkModelDTO)formDataDTO,modelDTO); |
| | | modelDTO.setData(formDataDTO.getData()); |
| | | modelDTOS.add(modelDTO); |
| | | }); |
| | |
| | | @Override |
| | | public BaseResult<Map<String, Object>> addSave(FormDataDTO formDataDTO) throws VciBaseException, PLException { |
| | | //é¦å
å¤æå¯¹è±¡æ¯å¦ä¸ºç©º |
| | | VciBaseUtil.alertNotNull(formDataDTO,"æ·»å çæ°æ®å¯¹è±¡",formDataDTO.getBtmname(),"ä¸å¡ç±»åçåç§°",formDataDTO.getFormDefineId(),"表åå®ä¹çç¼å·"); |
| | | UIFormDefineVO formDefineVO = uiEngineService.getFormById(formDataDTO.getBtmname(), formDataDTO.getFormDefineId()); |
| | | VciBaseUtil.alertNotNull(formDataDTO,"æ·»å çæ°æ®å¯¹è±¡",formDataDTO.getBtmName(),"ä¸å¡ç±»åçåç§°",formDataDTO.getFormDefineId(),"表åå®ä¹çç¼å·"); |
| | | UIFormDefineVO formDefineVO = uiEngineService.getFormById(formDataDTO.getBtmName(), formDataDTO.getFormDefineId()); |
| | | String preEvent = formDataDTO.getPreEvent(); |
| | | BaseModelDTOList modelDTOList = formData2DTOList(formDataDTO); |
| | | BaseResult beforeResult = callPreEvent(modelDTOList, null,preEvent, VciChangeDocumentTypeEnum.ADD); |
| | |
| | | baseModel.setOid(cbo.oid); |
| | | baseModel.setNameOid(cbo.nameoid); |
| | | baseModel.setRevisionOid(cbo.revisionid); |
| | | baseModel.setBtmname(cbo.btName); |
| | | baseModel.setBtmName(cbo.btName); |
| | | baseModel.setLastR(String.valueOf(cbo.isLastR)); |
| | | baseModel.setLastV(String.valueOf(cbo.isLastV)); |
| | | baseModel.setFirstR(String.valueOf(cbo.isFirstR)); |
| | |
| | | VciBaseUtil.alertNotNull(formDataDTOList,"è¦æ·»å çæ°æ®",formDataDTOList.getFormDataDTOS(),"è¦æ·»å çæ°æ®"); |
| | | //é¦å
å¤æå¯¹è±¡æ¯å¦ä¸ºç©º |
| | | FormDataDTO firstFormDataDTO = formDataDTOList.getFormDataDTOS().stream().findFirst().get(); |
| | | UIFormDefineVO formDefineVO = uiEngineService.getFormById(firstFormDataDTO.getBtmname(), firstFormDataDTO.getId()); |
| | | UIFormDefineVO formDefineVO = uiEngineService.getFormById(firstFormDataDTO.getBtmName(), firstFormDataDTO.getId()); |
| | | String preEvent = firstFormDataDTO.getPreEvent(); |
| | | BaseModelDTOList modelDTOList = formDataList2DTOList(formDataDTOList); |
| | | BaseResult beforeResult = callPreEvent(modelDTOList, null, preEvent, VciChangeDocumentTypeEnum.ADD); |
| | |
| | | } |
| | | if(!CollectionUtils.isEmpty(releasedFileOids)){ |
| | | releasedFileOids.forEach((oid,fileOids)->{ |
| | | fileObjectService.releasedFile(firstFormDataDTO.getBtmname(),oid,fileOids); |
| | | fileObjectService.releasedFile(firstFormDataDTO.getBtmName(),oid,fileOids); |
| | | }); |
| | | } |
| | | //åç½®äºä»¶ |
| | |
| | | @Override |
| | | public BaseResult<Map<String, Object>> editSave(FormDataDTO formDataDTO) throws VciBaseException, PLException { |
| | | //é¦å
å¤æå¯¹è±¡æ¯å¦ä¸ºç©º |
| | | VciBaseUtil.alertNotNull(formDataDTO,"ä¿®æ¹çæ°æ®å¯¹è±¡",formDataDTO.getBtmname(),"ä¸å¡ç±»åçåç§°",formDataDTO.getFormDefineId(),"表åå®ä¹çç¼å·"); |
| | | UIFormDefineVO formDefineVO = uiEngineService.getFormById(formDataDTO.getBtmname(), formDataDTO.getFormDefineId()); |
| | | VciBaseUtil.alertNotNull(formDataDTO,"ä¿®æ¹çæ°æ®å¯¹è±¡",formDataDTO.getBtmName(),"ä¸å¡ç±»åçåç§°",formDataDTO.getFormDefineId(),"表åå®ä¹çç¼å·"); |
| | | UIFormDefineVO formDefineVO = uiEngineService.getFormById(formDataDTO.getBtmName(), formDataDTO.getFormDefineId()); |
| | | String preEvent = formDataDTO.getPreEvent(); |
| | | BaseModelDTOList modelDTOList = formData2DTOList(formDataDTO); |
| | | BaseResult beforeResult = callPreEvent(modelDTOList,null, preEvent, VciChangeDocumentTypeEnum.EDIT); |
| | |
| | | @Override |
| | | public BaseResult<Map<String, Object>> upRevision(FormDataDTO formDataDTO) throws VciBaseException, PLException { |
| | | //é¦å
å¤æå¯¹è±¡æ¯å¦ä¸ºç©º |
| | | VciBaseUtil.alertNotNull(formDataDTO,"ä¿®æ¹çæ°æ®å¯¹è±¡",formDataDTO.getBtmname(),"ä¸å¡ç±»åçåç§°",formDataDTO.getFormDefineId(),"表åå®ä¹çç¼å·",formDataDTO.getCopyFromVersion(),"èçæ¬ç主é®"); |
| | | UIFormDefineVO formDefineVO = uiEngineService.getFormById(formDataDTO.getBtmname(), formDataDTO.getFormDefineId()); |
| | | VciBaseUtil.alertNotNull(formDataDTO,"ä¿®æ¹çæ°æ®å¯¹è±¡",formDataDTO.getBtmName(),"ä¸å¡ç±»åçåç§°",formDataDTO.getFormDefineId(),"表åå®ä¹çç¼å·",formDataDTO.getCopyFromVersion(),"èçæ¬ç主é®"); |
| | | UIFormDefineVO formDefineVO = uiEngineService.getFormById(formDataDTO.getBtmName(), formDataDTO.getFormDefineId()); |
| | | String preEvent = formDataDTO.getPreEvent(); |
| | | BaseModelDTOList modelDTOList = formData2DTOList(formDataDTO); |
| | | BaseResult beforeResult = callPreEvent(modelDTOList, null,preEvent, VciChangeDocumentTypeEnum.UPREVISION); |
| | |
| | | Map<String,String> conditionMap = WebUtil.getOidQuery(formDataDTO.getCopyFromVersion()); |
| | | conditionMap.put("ts", VciDateUtil.date2Str(ts,VciDateUtil.DateTimeMillFormat)); |
| | | conditionMap.put("oid",formDataDTO.getCopyFromVersion()); |
| | | businessObjects = boService.queryCBO(formDataDTO.getBtmname(), conditionMap); |
| | | businessObjects = boService.queryCBO(formDataDTO.getBtmName(), conditionMap); |
| | | if(businessObjects.size() ==0){ |
| | | throw new VciBaseException("æ°æ®ä¸æ¯ææ°çï¼å»ºè®®æ¨å·æ°åéæ°æä½"); |
| | | } |
| | |
| | | VciBaseUtil.alertNotNull(formDataDTOList,"è¦ä¿®æ¹çæ°æ®",formDataDTOList.getFormDataDTOS(),"è¦ä¿®æ¹çæ°æ®"); |
| | | //é¦å
å¤æå¯¹è±¡æ¯å¦ä¸ºç©º |
| | | FormDataDTO firstFormDataDTO = formDataDTOList.getFormDataDTOS().stream().findFirst().get(); |
| | | UIFormDefineVO formDefineVO = uiEngineService.getFormById(firstFormDataDTO.getBtmname(), firstFormDataDTO.getId()); |
| | | UIFormDefineVO formDefineVO = uiEngineService.getFormById(firstFormDataDTO.getBtmName(), firstFormDataDTO.getId()); |
| | | String preEvent = firstFormDataDTO.getPreEvent(); |
| | | BaseModelDTOList modelDTOList = formDataList2DTOList(formDataDTOList); |
| | | BaseResult beforeResult = callPreEvent(modelDTOList,null, preEvent, VciChangeDocumentTypeEnum.EDIT); |
| | |
| | | } |
| | | if(!CollectionUtils.isEmpty(releasedFileOids)){ |
| | | releasedFileOids.forEach((oid,fileOids)->{ |
| | | fileObjectService.releasedFile(firstFormDataDTO.getBtmname(),oid,fileOids); |
| | | fileObjectService.releasedFile(firstFormDataDTO.getBtmName(),oid,fileOids); |
| | | }); |
| | | } |
| | | //åç½®äºä»¶ |
| | |
| | | @Override |
| | | public BaseResult batchDelete(DeleteDataDTO deleteDataDTO) throws VciBaseException, PLException { |
| | | VciBaseUtil.alertNotNull(deleteDataDTO,"æ°æ®ä¼ è¾å¯¹è±¡",deleteDataDTO.getDataList(),"æ°æ®ä¼ è¾å¯¹è±¡"); |
| | | String btmName = deleteDataDTO.getDataList().get(0).getBtmname(); |
| | | String btmName = deleteDataDTO.getDataList().get(0).getBtmName(); |
| | | List<String> oidList = deleteDataDTO.getDataList().stream().map(BaseModelDTO::getOid).collect(Collectors.toList()); |
| | | //çç级èå é¤ãåªæèªå·±å¼ç¨èªå·±çæ¶åå¯ä»¥çº§èå é¤ |
| | | List<BusinessObject> cbo = null; |
| | |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.LangBaseUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.enumpck.UIComponentDisplayTypeEnum; |
| | | import com.vci.web.enumpck.UIComponentTypeEnum; |
| | |
| | | && !UIFieldTypeEnum.CUSTOM.getValue().equalsIgnoreCase(s.getFieldType())).forEach(fieldVO->{ |
| | | //å表éé¢ä¸æ¾editï¼èæ¥è¯¢éé¢éè¦æ¾edit |
| | | UITableFieldVO queryFieldVO = new UITableFieldVO(); |
| | | BeanUtil.convert(fieldVO,queryFieldVO); |
| | | BeanUtilForVCI.convert(fieldVO,queryFieldVO); |
| | | canQueryFields.add(queryFieldVO); |
| | | }); |
| | | tableDefineVO.setSeniorQueryColumns(canQueryFields); |
| | |
| | | List<UIComponentVO> southCompVO = componentVOs.stream().filter(s->!s.getOid().equals(firstCompVO.getOid())).collect(Collectors.toList()); |
| | | |
| | | UILayoutVO centerVO = new UILayoutVO(); |
| | | BeanUtil.convert(layoutVO,centerVO); |
| | | BeanUtilForVCI.convert(layoutVO,centerVO); |
| | | centerVO.setOid(centerVO.getOid() + "_center"); |
| | | centerVO.setLayoutAreaType(UILayoutAreaTypeEnum.CENTER.getValue()); |
| | | centerVO.setOrderNum(0); |
| | |
| | | //å
¶ä½çä½ä¸ºsouth |
| | | if(!CollectionUtils.isEmpty(southCompVO)) { |
| | | UILayoutVO southVO = new UILayoutVO(); |
| | | BeanUtil.convert(layoutVO, southVO); |
| | | BeanUtilForVCI.convert(layoutVO, southVO); |
| | | southVO.setOid(centerVO.getOid() + "_south"); |
| | | southVO.setLayoutAreaType(UILayoutAreaTypeEnum.SOUTH.getValue()); |
| | | southVO.setOrderNum(0); |
| | |
| | | if(tableDefineVO != null) { |
| | | |
| | | UITreeTableDefineVO treeTableDefineVO = new UITreeTableDefineVO(); |
| | | BeanUtil.convert(tableDefineVO, treeTableDefineVO); |
| | | BeanUtilForVCI.convert(tableDefineVO, treeTableDefineVO); |
| | | if(isLink){ |
| | | treeTableDefineVO.setTreeCurrentField("t_oid"); |
| | | treeTableDefineVO.setTreeParentField("f_oid"); |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.vci.common.utility.ObjectUtility; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | |
| | | import com.vci.starter.poi.util.ExcelUtil; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | 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.pagemodel.SessionInfo; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.starter.web.redis.RedisService; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.starter.web.util.Lcm.BeanUtil; |
| | | import com.vci.starter.web.util.Lcm.CollectionUtil; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.service.OsBtmServiceI; |
| | | import com.vci.web.service.UIManagerServiceI; |
| | | import com.vci.web.util.*; |
| | | import com.vci.web.util.BeanUtil; |
| | | import com.vci.web.utility.UIDataFetcher; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.RightControlUtil; |
| | | import com.vci.web.util.UITools; |
| | | import com.vci.web.utility.UIDataFetcher; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.NoArgsConstructor; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.swing.tree.TreePath; |
| | | import java.io.File; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | | import java.util.regex.Pattern; |
| | | import java.util.stream.Stream; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * UIå®ä¹æå¡çé¢ç¸å
³æ¥å£ |
| | |
| | | @Override |
| | | public boolean authorizedUI(UIAuthorDTO uiAuthorDTO) throws Exception { |
| | | boolean res=false; |
| | | if(uiAuthorDTO==null||CollectionUtil.isEmpty(uiAuthorDTO.getSelectTreeList())){ |
| | | if(uiAuthorDTO==null|| CollectionUtil.isEmpty(uiAuthorDTO.getSelectTreeList())){ |
| | | throw new VciBaseException("è¯·éæ©èç¹è¿è¡ææ!"); |
| | | } |
| | | BaseQueryObject treeQueryObject=new BaseQueryObject(); |
| | |
| | | import com.vci.starter.web.constant.FrameWorkLcStatusConstant; |
| | | import com.vci.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.starter.web.util.LocalFileUtil; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | |
| | | import com.vci.starter.word.util.WordUtil; |
| | | import com.vci.web.properties.OsDDLExportWordFieldProperties; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | List<OsBtmTypeAttributeVO> attributes = new ArrayList<>(); |
| | | linkAttributes.stream().forEach(t -> { |
| | | OsBtmTypeAttributeVO attributeVO = new OsBtmTypeAttributeVO(); |
| | | BeanUtil.convert(t,attributeVO); |
| | | BeanUtilForVCI.convert(t,attributeVO); |
| | | attributeVO.setPkBtmType(t.getPkLinkType()); |
| | | attributes.add(attributeVO); |
| | | }); |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.bo.VciLogObjectBO; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.starter.web.pagemodel.SessionInfo; |
| | | import com.vci.starter.web.util.WebThreadLocalUtil; |
| | | import com.vci.bo.VciLogObjectBO; |
| | | import com.vci.web.service.WebLogServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | |
| | | package com.vci.web.util; |
| | | import com.vci.client.common.objects.RoleObject; |
| | | import com.vci.common.exception.VciException; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.framework.data.FunctionInfo; |
| | | import com.vci.corba.framework.data.RoleInfo; |
| | |
| | | package com.vci.web.util; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | import com.vci.corba.portal.data.PLPageDefination; |
| | | 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; |
| | | import com.vci.model.PLDefination; |
| | | import com.vci.model.PRMDO; |
| | | import com.vci.model.PRMItemDO; |
| | |
| | | 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; |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | private-token-key: vciweb20210212 |
| | | ###tomcatç¸å
³çé
ç½® |
| | | server: |
| | | port: 12005 |
| | | port: 12000 |
| | | servlet: |
| | | context-path: /web |
| | | tomcat: |
| | |
| | | level: |
| | | com.vci: debug |
| | | root: info |
| | | ###æ¬é¡¹ç®çé
ç½®ï¼æ³¨æspringå®¶æè¯»åé
ç½®æ¶ï¼å¤§å忝éè¦è½¬æ¢ä¸º-çæ¹å¼ï¼èfeignéè¦å¤§å°åå®å
¨ç¸å |
| | | session: |
| | | session-info-storage-type: "database" |
| | | database-platform: oracle |
| | | clear-session-on-start: false |
| | | ###æ¯å¦å¼å¯ç¨æ·å¨çº¿æ£æ¥ |
| | | checkSessionTimeout: false |
| | | ###客æ·ç«¯å¤æè¶
æ¶è½®è¯¢æ¶é´ï¼åä½ä¸ºç§ |
| | | sessionInterval: 10 |
| | | ###客æ·ç«¯æå¤§å卿¶é´ï¼åä½ä¸ºåé |
| | | sessionIdlTime: 30 |
| | | ###è¶
æ¶æéæ¶é´ï¼åä½ä¸ºåé |
| | | sessionRemind: 3 |
| | | user-table-compatibility: "platform1" |
| | | #å2021çæ¬çé¨åæ¥å£çå½±åï¼ä¸é¢çå
容éè¦é
ç½®ï¼ |
| | | vciPlatform: |
| | | objectServiceUrl: "" |
| | | #ç¼å |
| | | spring: |
| | | # redisé
ç½® |
| | |
| | | host: localhost # ipå°å |
| | | database: 2 # redisæ°æ®åº 0-15 |
| | | port: 6379 # 端å£å· |
| | | password: foobared # æ å¯ç ä¸å¡« |
| | | password: 123456 # æ å¯ç ä¸å¡« |
| | | timeout: 30000s # è¿æ¥è¶
æ¶æ¶é´ ï¼é»è®¤1å¤©ï¼ |
| | | lettuce: |
| | | shutdown-timeout: 100ms # å
³éè¶
æ¶æ¶é´ é»è®¤ 100ms |
| | |
| | | mvc: |
| | | view: |
| | | suffix: .html |
| | | |
| | | #å¹³å°ç¸å
³é
ç½® |
| | | plt: |
| | | #人åä¿¡æ¯å½å
¥æ¶,æ¯å¦éè¦å¯çº§å段 |
| | | export-secret-grade: false |
| | | |
| | | ###ä¸å¡é¡¹ç®çé
ç½®ï¼æ³¨æspringå®¶æè¯»åé
ç½®æ¶ï¼å¤§å忝éè¦è½¬æ¢ä¸º-çæ¹å¼ï¼èfeignéè¦å¤§å°åå®å
¨ç¸å |
| | | session: |
| | | session-info-storage-type: "database" |
| | | database-platform: oracle |
| | | clear-session-on-start: false |
| | | ###æ¯å¦å¼å¯ç¨æ·å¨çº¿æ£æ¥ |
| | | checkSessionTimeout: false |
| | | ###客æ·ç«¯å¤æè¶
æ¶è½®è¯¢æ¶é´ï¼åä½ä¸ºç§ |
| | | sessionInterval: 10 |
| | | ###客æ·ç«¯æå¤§å卿¶é´ï¼åä½ä¸ºåé |
| | | sessionIdlTime: 30 |
| | | ###è¶
æ¶æéæ¶é´ï¼åä½ä¸ºåé |
| | | sessionRemind: 3 |
| | | |
| | | ##webé
ç½® |
| | | vciweb: |
| | | debug: true |
| | | |
| | | #æä»¶é¢è§é
ç½® |
| | | file-preview: |
| | | enabled: true |
| | | preview-service-url: "http://dev.yunkeruida.top:28090/vciFilePreview/ajaxPreview.html" |
| | | preview-system-key: plt2020 |
| | | |
| | | #feignå°å |
| | | feign: |
| | | #æ«æå·¥å
·æå¡ |
| | | scanServiceUrl: "" |
| | | #å¹³å°æå¡ |
| | | pltServiceUrl: "" |
| | | #æä»¶æå¡ |
| | | fileServiceUrl: "" |
| | | |
| | | #springmvcé
ç½® |
| | | vcispringmvc: |
| | | enabled: true |
| | | #䏿 ¡éªå®å
¨ç龿¥å°å |
| | |
| | | port: 12000 |
| | | servlet: |
| | | context-path: /web |
| | | tomcat: |
| | | uri-encoding: UTF-8 |
| | | ###log4j2çé
ç½®ï¼éè¦åªä¸ªå
ä¸çæä»¶å¼å¯æä¸ªç级ï¼å°±ç´æ¥xxxxx: yyè¿æ ·æ¹å¼ |
| | | logging: |
| | | config: "classpath:log4j2-spring-prod.xml" |
| | | level: |
| | | com.vci: debug |
| | | root: info |
| | | ###æ¬é¡¹ç®çé
ç½®ï¼æ³¨æspringå®¶æè¯»åé
ç½®æ¶ï¼å¤§å忝éè¦è½¬æ¢ä¸º-çæ¹å¼ï¼èfeignéè¦å¤§å°åå®å
¨ç¸å |
| | | #ç¼å |
| | | spring: |
| | | # redisé
ç½® |
| | | redis: ###### redis é
ç½® |
| | | enabled: true #trueï¼å¯ç¨rediï¼falseä¸å¯ç¨ï¼é»è®¤false,é
ç½®æä»¶æ²¡æè¿äºé»è®¤ä¸å¯ç¨redis |
| | | host: localhost # ipå°å |
| | | database: 2 # redisæ°æ®åº 0-15 |
| | | port: 6379 # 端å£å· |
| | | password: foobared # æ å¯ç ä¸å¡« |
| | | timeout: 30000s # è¿æ¥è¶
æ¶æ¶é´ ï¼é»è®¤1å¤©ï¼ |
| | | lettuce: |
| | | shutdown-timeout: 100ms # å
³éè¶
æ¶æ¶é´ é»è®¤ 100ms |
| | | pool: # lettuce è¿æ¥æ± |
| | | max-active: 8 # è¿æ¥æ± æå¤§è¿æ¥æ° é»è®¤ 8ï¼-1 ï¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: 60000ms # è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ é»è®¤-1ms ï¼-1 :表示没æéå¶ï¼ è¿é设置1åé |
| | | max-idle: 8 # æå¤§ç©ºé²è¿æ¥ é»è®¤ 8 |
| | | min-idle: 0 # æå°ç©ºé²è¿æ¥ é»è®¤ 0 |
| | | resources: |
| | | chain: |
| | | cache: false |
| | | strategy: |
| | | content: |
| | | enabled: true |
| | | paths: /** |
| | | cache: |
| | | type: ehcache |
| | | servlet: |
| | | multipart: |
| | | enabled: true |
| | | ###å个æä»¶å¤§å°ï¼50M |
| | | max-file-size: 52428800 |
| | | ###æ»ä¸ä¼ çæä»¶å¤§å°ï¼50M |
| | | max-request-size: 52428800 |
| | | mvc: |
| | | view: |
| | | suffix: .html |
| | | |
| | | #å¹³å°ç¸å
³é
ç½® |
| | | plt: |
| | | #人åä¿¡æ¯å½å
¥æ¶,æ¯å¦éè¦å¯çº§å段 |
| | | export-secret-grade: false |
| | | |
| | | ###ä¸å¡é¡¹ç®çé
ç½®ï¼æ³¨æspringå®¶æè¯»åé
ç½®æ¶ï¼å¤§å忝éè¦è½¬æ¢ä¸º-çæ¹å¼ï¼èfeignéè¦å¤§å°åå®å
¨ç¸å |
| | | session: |
| | | session-info-storage-type: "database" |
| | | database-platform: oracle |
| | |
| | | sessionIdlTime: 30 |
| | | ###è¶
æ¶æéæ¶é´ï¼åä½ä¸ºåé |
| | | sessionRemind: 3 |
| | | ###å
¼å®¹æ§ï¼å¿
须设置为è¿ä¸ª |
| | | user-table-compatibility: "platform1" |
| | | #ç¼åé
ç½® |
| | | ###corbaçé
ç½® |
| | | jacorb: |
| | | client: |
| | | enabled: true |
| | | url: "corbaloc::localhost:30000/NameService" |
| | | instanceIdentity: "platform-sf" |
| | | #å2021çæ¬çé¨åæ¥å£çå½±åï¼ä¸é¢çå
容éè¦é
ç½®ï¼ |
| | | vciPlatform: |
| | | objectServiceUrl: "2" |
| | | #ç¼å |
| | | spring: |
| | | # redisé
ç½® |
| | | redis: ###### redis é
ç½® |
| | | enabled: false #trueï¼å¯ç¨rediï¼falseä¸å¯ç¨ï¼é»è®¤false,é
ç½®æä»¶æ²¡æè¿äºé»è®¤ä¸å¯ç¨redis |
| | | host: vciserver # ipå°å |
| | | database: 0 # redisæ°æ®åº 0-15 |
| | | port: 6379 # 端å£å· |
| | | password: vcitest # æ å¯ç ä¸å¡« |
| | | timeout: 30000s # è¿æ¥è¶
æ¶æ¶é´ ï¼é»è®¤1å¤©ï¼ |
| | | lettuce: |
| | | shutdown-timeout: 100ms # å
³éè¶
æ¶æ¶é´ é»è®¤ 100ms |
| | | pool: # lettuce è¿æ¥æ± |
| | | max-active: 8 # è¿æ¥æ± æå¤§è¿æ¥æ° é»è®¤ 8ï¼-1 ï¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: 60000ms # è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ é»è®¤-1ms ï¼-1 :表示没æéå¶ï¼ è¿é设置1åé |
| | | max-idle: 8 # æå¤§ç©ºé²è¿æ¥ é»è®¤ 8 |
| | | min-idle: 0 # æå°ç©ºé²è¿æ¥ é»è®¤ 0 |
| | | cache: |
| | | type: ehcache |
| | | config: |
| | | location: |
| | | mvc: |
| | | view: |
| | | suffix: ".html" |
| | | |
| | | ##webé
ç½® |
| | | vciweb: |
| | | debug: true |
| | | cors: |
| | | |
| | | #æä»¶é¢è§é
ç½® |
| | | file-preview: |
| | | enabled: true |
| | | preview-service-url: "http://dev.yunkeruida.top:28090/vciFilePreview/ajaxPreview.html" |
| | | preview-system-key: plt2020 |
| | | |
| | | #feignå°å |
| | | feign: |
| | | #æ«æå·¥å
·æå¡ |
| | | scanServiceUrl: "" |
| | | #å¹³å°æå¡ |
| | | pltServiceUrl: "" |
| | | #æä»¶æå¡ |
| | | fileServiceUrl: "" |
| | | |
| | | #springmvcé
ç½® |
| | | vcispringmvc: |
| | | enabled: true |
| | | #䏿 ¡éªå®å
¨ç龿¥å°å |
| | | un-check-urls: |
| | | #䏿´æ°è¯·æ±æ¶é´ç龿¥å°å |
| | | un-storage-request-time-urls: |
| | |
| | | com.vci.base.lifecycle.noroute=\u751F\u547D\u5468\u671F\u6CA1\u6709\u4EFB\u4F55\u72B6\u6001 |
| | | lifeCycleTransError=\u751F\u547D\u5468\u671F\u8DC3\u8FC1\u5931\u8D25,{0} |
| | | |
| | | |
| | | #####\u6D41\u7A0B\u76F8\u5173 |
| | | com.vci.web.flow.taskOidOrProcessOidNotNull=\u6D41\u7A0B\u4EFB\u52A1\u6216\u8005\u6D41\u7A0B\u6267\u884C\u5B9E\u4F8B\u4E0D\u5B58\u5728 |
| | | |
| | | ###\u6587\u4EF6\u76F8\u5173 |
| | | fileUploadSecretError=\u6587\u4EF6\u6807\u5BC6\u8D85\u8FC7\u4E86\u7528\u6237\u7684\u5BC6\u7EA7\uFF0C\u7528\u6237\u5BC6\u7EA7{0}\uFF0C\u6587\u4EF6\u6807\u5BC6{1} |
| | | fileUploadDataSecretError=\u6587\u4EF6\u6807\u5BC6\u8D85\u8FC7\u4E86\u6570\u636E\u7684\u5BC6\u7EA7\uFF0C\u6570\u636E\u5BC6\u7EA7{0},\u6587\u4EF6\u6807\u5BC6{1} |
| | |
| | | cellValueCanNotNullForReg=\u5355\u5143\u683C\u7684\u5185\u5BB9\u4E0D\u7B26\u5408\u6B63\u5219\u8868\u8FBE\u5F0F\u8981\u6C42\uFF0C\u5217\u540D{0},\u884C\u6570{1} |
| | | cellNotDateFormate=\u5355\u5143\u683C\u4E0D\u662F\u6709\u6548\u7684\u4E8B\u4EF6\u683C\u5F0F,\u5217\u540D{0},\u884C\u6570{1} |
| | | |
| | | ###\u6D41\u7A0B\u76F8\u5173### |
| | | com.vci.web.flow.processTemplateNotExist=\u6D41\u7A0B\u6A21\u677F[{0}]\u4E0D\u5B58\u5728\uFF0C\u8BF7\u67E5\u8BC1 |
| | | com.vci.web.flow.typeNotExist=\u6D41\u7A0B\u6A21\u677F\u5206\u7C7B[{0}]\u4E0D\u5B58\u5728\uFF0C\u8BF7\u67E5\u8BC1 |
| | | com.vci.web.flow.deployIdNotExist=\u6D41\u7A0B\u90E8\u7F72ID[{0}]\u4E0D\u5B58\u5728 |
| | | com.vci.web.flow.doTaskTypeError=\u6D41\u7A0B\u4EFB\u52A1\u7C7B\u578B[{0}]\u9519\u8BEF |
| | | com.vci.web.flow.taskOidOrProcessOidNotNull=\u6D41\u7A0B\u4EFB\u52A1\u6216\u8005\u6D41\u7A0B\u6267\u884C\u5B9E\u4F8B\u4E0D\u5B58\u5728 |
| | | |
| | | ###\u4E1A\u52A1#### |
| | | com.vci.web.flow.processTemplateNotExist=\u6D41\u7A0B\u6A21\u677F\u4E0D\u5B58\u5728\uFF0C\u8BF7\u67E5\u8BC1 |
| | | com.vci.web.loService.sortLengthError=\u6392\u5E8F\u5B57\u6BB5\u957F\u5EA6\u9519\u8BEF |
| | |
| | | com.vci.base.lifecycle.noexistlife=\u751F\u547D\u5468\u671F\u4E0D\u5B58\u5728 |
| | | com.vci.base.lifecycle.noroute=\u751F\u547D\u5468\u671F\u6CA1\u6709\u4EFB\u4F55\u72B6\u6001 |
| | | |
| | | |
| | | #####\u6D41\u7A0B\u76F8\u5173 |
| | | com.vci.web.flow.taskOidOrProcessOidNotNull=\u6D41\u7A0B\u4EFB\u52A1\u6216\u8005\u6D41\u7A0B\u6267\u884C\u5B9E\u4F8B\u4E0D\u5B58\u5728 |
| | | |
| | | ###\u6587\u4EF6\u76F8\u5173 |
| | | fileUploadSecretError=\u6587\u4EF6\u6807\u5BC6\u8D85\u8FC7\u4E86\u7528\u6237\u7684\u5BC6\u7EA7\uFF0C\u7528\u6237\u5BC6\u7EA7{0}\uFF0C\u6587\u4EF6\u6807\u5BC6{1} |
| | | fileUploadDataSecretError=\u6587\u4EF6\u6807\u5BC6\u8D85\u8FC7\u4E86\u6570\u636E\u7684\u5BC6\u7EA7\uFF0C\u6570\u636E\u5BC6\u7EA7{0},\u6587\u4EF6\u6807\u5BC6{1} |
| | |
| | | cellValueCanNotNullForReg=\u5355\u5143\u683C\u7684\u5185\u5BB9\u4E0D\u7B26\u5408\u6B63\u5219\u8868\u8FBE\u5F0F\u8981\u6C42\uFF0C\u5217\u540D{0},\u884C\u6570{1} |
| | | cellNotDateFormate=\u5355\u5143\u683C\u4E0D\u662F\u6709\u6548\u7684\u4E8B\u4EF6\u683C\u5F0F,\u5217\u540D{0},\u884C\u6570{1} |
| | | |
| | | #####\u6D41\u7A0B\u76F8\u5173#### |
| | | com.vci.web.flow.processTemplateNotExist=\u6D41\u7A0B\u6A21\u677F[{0}]\u4E0D\u5B58\u5728\uFF0C\u8BF7\u67E5\u8BC1 |
| | | com.vci.web.flow.typeNotExist=\u6D41\u7A0B\u6A21\u677F\u5206\u7C7B[{0}]\u4E0D\u5B58\u5728\uFF0C\u8BF7\u67E5\u8BC1 |
| | | com.vci.web.flow.deployIdNotExist=\u6D41\u7A0B\u90E8\u7F72ID[{0}]\u4E0D\u5B58\u5728 |
| | | com.vci.web.flow.doTaskTypeError=\u6D41\u7A0B\u4EFB\u52A1\u7C7B\u578B[{0}]\u9519\u8BEF |
| | | com.vci.web.flow.taskOidOrProcessOidNotNull=\u6D41\u7A0B\u4EFB\u52A1\u6216\u8005\u6D41\u7A0B\u6267\u884C\u5B9E\u4F8B\u4E0D\u5B58\u5728 |
| | | |
| | | ###\u4E1A\u52A1#### |
| | | com.vci.web.flow.processTemplateNotExist=\u6D41\u7A0B\u6A21\u677F\u4E0D\u5B58\u5728\uFF0C\u8BF7\u67E5\u8BC1 |
| | | com.vci.web.loService.sortLengthError=\u6392\u5E8F\u5B57\u6BB5\u957F\u5EA6\u9519\u8BEF |
| | |
| | | Endpoints=default -h localhost -p 4601 |
| | | Endpoints=default -h localhost -p 4061 |
| | |
| | | <module>plt-starter</module> |
| | | <module>plt-web-base</module> |
| | | <module>plt-web-api</module> |
| | | <module>plt-web-permission</module> |
| | | </modules> |
| | | |
| | | <properties> |
| | |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-web-api</artifactId> |
| | | <version>2024.1-SNAPSHOT</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-web-base</artifactId> |
| | | <version>2024.1-SNAPSHOT</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.vci</groupId> |
| | | <artifactId>plt-web-permission</artifactId> |
| | | <version>2024.1-SNAPSHOT</version> |
| | | </dependency> |
| | | |
| | | <!--springç¸å
³--> |
| | | <dependency> |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | //è·åç¨æ·ï¼æ°æ®ææé¡µé¢éæ©ç¨æ· |
| | | export function listUserByUserType(params) { |
| | | return request({ |
| | | url: "/api/userQueryController/listUserByUserType", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | |
| | |
| | | import {Message} from 'element-ui' |
| | | import {setStore, getStore} from '@/util/store' |
| | | import {isURL, validatenull} from '@/util/validate' |
| | | import {deepClone,queryStringToObject} from '@/util/util' |
| | | import {deepClone, queryStringToObject} from '@/util/util' |
| | | import website from '@/config/website' |
| | | import {loginByUsername, loginBySocial, loginBySso, getUserInfo, logout, refreshToken, getButtons} from '@/api/user' |
| | | import {getTopMenu, getRoutes} from '@/api/system/menu' |
| | |
| | | item.pathValue = item.path; |
| | | item.path = '/' + item.code; |
| | | item.query = {}; // åå§å item.query |
| | | if(item.pathValue.indexOf('?')!=-1) { |
| | | if (item.pathValue.indexOf('?') != -1) { |
| | | item.query = queryStringToObject(item.pathValue) |
| | | } |
| | | if (item.children && item.children.length > 0) { |
| | |
| | | //æ ¹æ®ç¨æ·åç»å½ |
| | | LoginByUsername({commit}, userInfo) { |
| | | return new Promise((resolve, reject) => { |
| | | let passwordDes = func.encryptData(userInfo.password,'daliantan0v0vcip') |
| | | loginByUsername(userInfo.deptId, userInfo.roleId, userInfo.username,passwordDes, userInfo.type, userInfo.key,).then(res => { |
| | | let passwordDes = func.encryptData(userInfo.password, 'daliantan0v0vcip') |
| | | loginByUsername(userInfo.deptId, userInfo.roleId, userInfo.username, passwordDes, userInfo.type, userInfo.key,).then(res => { |
| | | const data = res.data; |
| | | if (data.obj.failCode === 'loginSuccess') { |
| | | commit('SET_TOKEN', data.obj.tokenVO.accessToken); |
| | |
| | | return new Promise((resolve, reject) => { |
| | | getUserInfo().then((res) => { |
| | | const data = res.data.data; |
| | | console.log('user',res) |
| | | console.log('user', res) |
| | | // commit('SET_USER_INFO', data.roles); |
| | | resolve(data); |
| | | }).catch(err => { |
| | |
| | | SET_ROLES: (state, roles) => { |
| | | state.roles = roles; |
| | | }, |
| | | |
| | | SET_PERMISSION: (state, permission) => { |
| | | let permission_new = {}; |
| | | permission.forEach(item => { |
| | | let children = {}; |
| | | if (item.children && item.children.length > 0) { |
| | | item.children.forEach(child => { |
| | | Vue.set(children, child.code, true); |
| | | }); |
| | | } |
| | | Vue.set(permission_new, item.code, children); |
| | | }); |
| | | state.permission = permission_new; |
| | | setStore({name: "permission", content: permission_new}); |
| | | }, |
| | | } |
| | | |
| | | } |
| | | export default user |
| | |
| | | import CryptoJS from 'crypto-js' |
| | | |
| | | export default class func { |
| | | |
| | | static getSvgList() { |
| | | const fs = require('fs'); |
| | | const path = require('path'); |
| | | |
| | | // æå®æä»¶å¤¹è·¯å¾ |
| | | const directoryPath = "../config/svg"; // ä¿®æ¹ä¸ºä½ çæä»¶å¤¹è·¯å¾ |
| | | |
| | | // åå¨ .svg æä»¶è·¯å¾çæ°ç» |
| | | let svgFiles = []; |
| | | |
| | | // 读åæä»¶å¤¹ |
| | | fs.readdir(directoryPath, (err, files) => { |
| | | if (err) { |
| | | return console.error('æ æ³è¯»åç®å½: ' + err); |
| | | } |
| | | |
| | | // éåæä»¶ |
| | | files.forEach(file => { |
| | | // æ£æ¥æä»¶åç¼å |
| | | if (path.extname(file).toLowerCase() === '.svg') { |
| | | // æå»ºæä»¶ç宿´è·¯å¾ |
| | | const filePath = path.join(directoryPath, file); |
| | | svgFiles.push(filePath); |
| | | } |
| | | }); |
| | | |
| | | // è¾åºç»æ |
| | | console.log(JSON.stringify(svgFiles, null, 2)); |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * åéè¡¨æ ¼è¡ |
| | | * æ¶é´æ³æ ¼å¼å |
| | |
| | | */ |
| | | |
| | | static isEmptyObject(obj) { |
| | | if(obj){ |
| | | if (obj) { |
| | | return Object.keys(obj).length === 0; |
| | | }else { |
| | | } else { |
| | | return true; |
| | | } |
| | | } |
| | |
| | | :formData="form" |
| | | @getFormData="getFormData"> |
| | | </basic-form> |
| | | <el-container v-if="!readOnly"> |
| | | <el-container v-if="!readOnly && (form.ruleType=='1' || form.ruleType=='3')"> |
| | | <el-aside style="width:350px"> |
| | | <fieldset> |
| | | <legend> å鿡件 </legend> |
| | |
| | | </el-tab-pane> |
| | | <el-tab-pane> |
| | | <span slot="label"><i class="el-icon-s-tools"></i> æä½</span> |
| | | <fieldset :style="'width:99.5%;height: '+(height/2+20)+'px;margin-bottom:10px;'"> |
| | | <fieldset :style="'width:99.5%;height: '+(height-10)+'px;margin-bottom:10px;'"> |
| | | <legend> ä¸è¬æä½ </legend> |
| | | <div> |
| | | <avue-checkbox :disabled="readOnly" key="actionCheck" :all="!readOnly" v-model="actionForm" placeholder="è¯·éæ©å
容" :dic="actionDic"></avue-checkbox> |
| | | </div> |
| | | </fieldset> |
| | | <fieldset :style="'width:99.5%;height: '+(height/2-30)+'px;'"> |
| | | <fieldset v-if="0" :style="'width:99.5%;height: '+(height/2-30)+'px;'"> |
| | | <legend> å
³ç³»åè·è¿ </legend> |
| | | <div> |
| | | <avue-checkbox :disabled="readOnly" key="linkActionCheck" :all="!readOnly" v-model="linkactionForm" placeholder="è¯·éæ©å
容" :dic="linkactionDic"></avue-checkbox> |
| | |
| | | import formQueryDialog from "@/views/modelingMenu/queryTemplate/linkTypeQuery/formQueryDialog.vue"; |
| | | import {queryTemplateListByAttr} from "@/api/queryTemplate/queryDefine"; |
| | | import {getCriteria} from "@/api/queryTemplate/linkTypeQuery"; |
| | | import {listUserByUserType} from "@/api/system/user/api"; |
| | | import {listUserByRoleOid, listUserUnInRoleOid, saveRight} from "@/api/system/role/api"; |
| | | |
| | | export default { |
| | |
| | | default: {} |
| | | }, |
| | | //éä¸è¡æ°æ® |
| | | data: { |
| | | selectRow: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | |
| | | type: Number, |
| | | default: 400 |
| | | }, |
| | | actionDic:{ |
| | | actionMap:{ |
| | | type: Object, |
| | | default: {} |
| | | } |
| | |
| | | height: this.height-80, |
| | | tip:false, |
| | | size:'mini', |
| | | highlightCurrentRow:true, |
| | | column: [{ |
| | | label: ' åç±»', |
| | | prop: 'type', |
| | |
| | | tip:false, |
| | | showHeader:false, |
| | | size:'mini', |
| | | highlightCurrentRow:true, |
| | | align:'left', |
| | | column: [{ |
| | | label: 'åç§°', |
| | | prop: 'name' |
| | |
| | | }, |
| | | formItems:[{ |
| | | label: 'è§ååç§°', |
| | | prop: 'qtName', |
| | | prop: 'ruleName', |
| | | type: 'input', |
| | | span:8, |
| | | labelWidth: 100, |
| | |
| | | }] |
| | | }, { |
| | | label: 'è§åç±»å', |
| | | prop: 'version', |
| | | prop: 'ruleType', |
| | | type: 'select', |
| | | span:6, |
| | | labelWidth:110, |
| | | disabled:this.readOnly, |
| | | dicData: [{ |
| | | label: 'å
¨é¨å
许', |
| | | value: 1 |
| | | value: '0' |
| | | }, { |
| | | label: 'å
许æé', |
| | | value: 2 |
| | | value: '1', |
| | | disabled:true |
| | | }, { |
| | | label: 'å
¨é¨æç»', |
| | | value: 3 |
| | | value: '2' |
| | | }, { |
| | | label: 'æç»æé', |
| | | value: 7 |
| | | value: '3', |
| | | disabled:true |
| | | }], |
| | | value: 1 |
| | | value: '0' |
| | | }], |
| | | form:{ |
| | | btmName:'', |
| | | qtName: '', |
| | | levelFlag:0,//0:æ®éæ¥è¯¢æ¨¡æ¿; 1:é«çº§æ¥è¯¢æ¨¡æ¿" |
| | | queryTemplate:{} |
| | | queryTemplate:{},//客ä½ä¸æ¥è¯¢æ¡ä»¶ |
| | | "ID": "",//æ°æ®çID |
| | | "roles": "",//æ¾ç¤ºå°ææä¸»ä½çé¢ï¼è§è²åç§°ï¼å¤ä¸ªä½¿ç¨éå·åé |
| | | "userGroups": "",//æ¾ç¤ºå°ææä¸»ä½çé¢ï¼é¨é¨åç§°ï¼å¤ä¸ªä½¿ç¨éå·åé |
| | | "users": "",//æ¾ç¤ºå°ææä¸»ä½çé¢ï¼ç¨æ·åç§°ï¼å¤ä¸ªä½¿ç¨éå·åé |
| | | "expToSQL": "",//æ¤å¤ä¸ºå
许æéææç»æééå¡«å
çæ°æ®ï¼ææ¶ä¸åå¤çï¼ä¸ºç©ºå符串å³å¯ |
| | | "identifier": "terminology_query",//ä¸å¡ç±»åï¼terminologyï¼+ä¸å线ï¼_ï¼+æä½åºçä¸è¬æä½çæé®è±æåç§°ï¼queryï¼,å¤ä¸ªæé®çè¯æ¯å¤æ¡æ°æ®ä¸æ¯ä½¿ç¨éå·åé |
| | | "isGrand": 49, //æ¤å¤ä¸ºæä½åºçä¸è¬æä½çæé®æ¯å¦ä¸ºéæ©æ
åµï¼æªéä¸å¼ä¸º48ï¼éä¸ä¸º49ï¼è¿éæ¯å°0å1转为äºbyteå¼ï¼æä»¥ä¸º48ï¼49 |
| | | "lexpToSQL": "",//æ¤å¤ä¸ºå
许æéææç»æééå¡«å
çæ°æ®ï¼ææ¶ä¸åå¤çï¼ä¸ºç©ºå符串å³å¯ |
| | | "lruleText": "",//æ¤å¤ä¸ºå
许æéææç»æééå¡«å
çæ°æ®ï¼ææ¶ä¸åå¤çï¼ä¸ºç©ºå符串å³å¯ |
| | | "lseniorRuleText": "",//æ¤å¤ä¸ºå
许æéææç»æééå¡«å
çæ°æ®ï¼ææ¶ä¸åå¤çï¼ä¸ºç©ºå符串å³å¯ |
| | | "ruleName": "assssss",//è§ååç§° |
| | | "ruleText": "",//æ¤å¤ä¸ºå
许æéææç»æééå¡«å
çæ°æ®ï¼ææ¶ä¸åå¤çï¼ä¸ºç©ºå符串å³å¯ |
| | | "ruleType": "2",//0å
¨é¨å
许ï¼1å
许æéï¼2å
¨é¨æç»ï¼3æç»æéï¼ç±äºææ¶åªåå
¨é¨å
许ä¸å
¨é¨æç»ï¼æä»¥ææ¶å¯ä»¥ä¸ç¨ç®¡ |
| | | "seniorRuleText": "",//æ¤å¤ä¸ºå
许æéææç»æééå¡«å
çæ°æ®ï¼ææ¶ä¸åå¤çï¼ä¸ºç©ºå符串å³å¯ |
| | | }, |
| | | radioForm:0, |
| | | radioDic:[{ |
| | |
| | | actionForm:[],//ä¸è¬æä½éä¸å¼ |
| | | actionDic:[],//ä¸è¬æä½éä¸é¡¹ |
| | | linkactionForm:[],//å
³ç³»åè·è¿éä¸å¼ |
| | | linkactionDic:[{ |
| | | label:'é项111', |
| | | value:0 |
| | | },{ |
| | | label:'é项222', |
| | | value:1 |
| | | }]//å
³ç³»åè·è¿éä¸é¡¹ |
| | | linkactionDic:[]//å
³ç³»åè·è¿éä¸é¡¹ |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | listUserByUserType().then(res => { |
| | | if(typeof res.data == 'string'){ |
| | | res.data=eval('('+res.data +')') |
| | | } |
| | | // ç»è£
å¥½ç©¿æ¢æ¡å¯ç¨æ°æ® |
| | | this.leftUserData = res.data.data.map(item => { |
| | | return { |
| | | name: item.name + `(${item.id})`, |
| | | oid: item.oid |
| | | } |
| | | }) |
| | | this.rightUserData = []; |
| | | }) |
| | | }, |
| | | watch: { |
| | | data:{ |
| | | selectRow:{ |
| | | handler(val) { |
| | | if(val && val.oid){ |
| | | this.getTemp(true); |
| | | this.getTemp(false) |
| | | this.authData=[]; |
| | | if(val && val.rules){ |
| | | //this.getTemp(true); |
| | | //this.getTemp(false) |
| | | //æå»ºææä¸»ä½æ°æ® |
| | | if(val.rules.users){ |
| | | val.rules.users.split(',').forEach((item,i)=>{ |
| | | if(item){ |
| | | this.authData.push({ |
| | | name:'{'+item+', '+item+', user}' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | if(val.rules.roles){ |
| | | val.rules.roles.split(',').forEach((item,i)=>{ |
| | | if(item){ |
| | | this.authData.push({ |
| | | name:'{'+item+', '+item+', role}' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | if(val.rules.userGroups){ |
| | | val.rules.userGroups.split(',').forEach((item,i)=>{ |
| | | if(item){ |
| | | this.authData.push({ |
| | | name:'{'+item+', '+item+', userGroup}' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | immediate: true, |
| | |
| | | }, |
| | | actionMap:{ |
| | | handler(val) { |
| | | this.actionDic=[{ |
| | | label:'é项1', |
| | | value:0 |
| | | },{ |
| | | label:'é项2', |
| | | value:1 |
| | | }]; |
| | | this.actionDic=[]; |
| | | if(val){ |
| | | for(var i in val){ |
| | | this.actionDic.push({ |
| | | label:i, |
| | | value:val[i] |
| | | }) |
| | | } |
| | | }; |
| | | }, |
| | | immediate: true, |
| | | deep: true |
| | |
| | | methods: { |
| | | //éä¸ç¨æ· |
| | | userHandler(){ |
| | | Promise.all([ |
| | | listUserUnInRoleOid({pkRole: this.selectList.oid}), |
| | | listUserByRoleOid({pkRole: this.selectList.oid}) |
| | | ]).then(([unInRoleRes, byRoleRes]) => { |
| | | if (unInRoleRes.data.code === 200 && byRoleRes.data.code === 200) { |
| | | const leftData = [...unInRoleRes.data.data, ...byRoleRes.data.data]; |
| | | // ç»è£
å¥½ç©¿æ¢æ¡å¯ç¨æ°æ® |
| | | this.leftUserData = leftData.map(item => { |
| | | return { |
| | | name: item.name + `(${item.id})`, |
| | | oid: item.oid |
| | | } |
| | | }) |
| | | this.rightUserData = byRoleRes.data.data.map(item => item.oid); |
| | | this.$refs.usertransfer.visible = true; |
| | | } |
| | | }); |
| | | |
| | | this.$refs.usertransfer.visible = true; |
| | | }, |
| | | |
| | | // éä¸ç¨æ·ç©¿æ¢æ¡åå¡« |
| | |
| | | :option="option" |
| | | :table-loading="tableLoading" |
| | | @refresh-change="handleRefresh" |
| | | @selection-change="selectChange" |
| | | @row-click="rowClickHandler"> |
| | | @current-row-change="rowClickHandler"> |
| | | <template slot="menuLeft"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">æ·»å </el-button> |
| | | <el-button icon="el-icon-plus" 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-view" plain size="small" type="primary" @click="chekView">æ¥çææç»æ</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <div style="margin-top: 15px;"> |
| | | <data-view key="dataView" :btmNode="nodeRow" :data="viewData" :actionDic="actionMap" :readOnly="true" :height="clientHeight-260-220"></data-view> |
| | | <data-view key="dataView" :btmNode="nodeRow" :selectRow="selectRow" :actionMap="actionMap" :readOnly="true" :height="clientHeight-260-220"></data-view> |
| | | </div> |
| | | <!-- æ°å¢ && ç¼è¾ --> |
| | | <el-dialog |
| | |
| | | width="70%" |
| | | @close="addDialogClose"> |
| | | <div> |
| | | <data-view ref="editView" key="editView" :btmNode="nodeRow" :data="viewData" :actionDic="actionMap" :readOnly="false" :height="clientHeight-340"></data-view> |
| | | <data-view ref="editView" key="editView" :btmNode="nodeRow" :selectRow="selectRow" :actionMap="actionMap" :readOnly="false" :height="clientHeight-340"></data-view> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button size="small" type="primary" @click="addDialogSavaHandler">ç¡® å®</el-button> |
| | |
| | | nodeRow: {}, |
| | | treeData: [], |
| | | tableLoading: false, |
| | | selectList: [], |
| | | selectRow: {}, |
| | | option: { |
| | | ...basicOption, |
| | | height:280, |
| | | highlightCurrentRow:true, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | |
| | | columnBtn:false, |
| | | gridBtn:false, |
| | | tip: false, |
| | | align: 'left', |
| | | index:false, |
| | | selection:false, |
| | | menu:false, |
| | | column: [ |
| | | { |
| | | label: 'è§ååç§°', |
| | | prop: 'plCode', |
| | | overHidden: true |
| | | }, |
| | | { |
| | | label: 'è§åç±»å', |
| | | prop: 'plName', |
| | | overHidden: true |
| | | } |
| | | ] |
| | | align:'center', |
| | | column: [{ |
| | | label: 'è§ååç§°', |
| | | prop: 0, |
| | | overHidden: true |
| | | },{ |
| | | label: 'è§åç±»å', |
| | | prop: 1, |
| | | overHidden: true |
| | | }] |
| | | }, |
| | | data: [], |
| | | viewData:{}, |
| | | title: '', |
| | | visible: false, |
| | | form:{}, |
| | | actionMap:{} |
| | | actionMap:{}, |
| | | switchDic:[{ |
| | | label:'', |
| | | value:false |
| | | },{ |
| | | label:'', |
| | | value:true |
| | | }] |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | } |
| | | }, |
| | | getTableList() { |
| | | getData({ |
| | | 'typeName': this.nodeRow.attributes.name, |
| | | }).then(res => { |
| | | getData(this.nodeRow.attributes.name).then(res => { |
| | | /*if(typeof res.data == 'string'){ |
| | | res.data=eval('('+res.data +')') |
| | | }*/ |
| | | if(res.data.obj.tableHeader){ |
| | | this.option.column=[ { |
| | | label: 'è§ååç§°', |
| | | prop: 0, |
| | | overHidden: true |
| | | },{ |
| | | label: 'è§åç±»å', |
| | | prop: 1, |
| | | overHidden: true |
| | | }]; |
| | | res.data.obj.tableHeader.forEach((item,i)=>{ |
| | | if(i<=1) return; |
| | | if(i=='rules') return; |
| | | this.option.column.push({ |
| | | label: item, |
| | | prop: i, |
| | | overHidden: true, |
| | | width:'auto', |
| | | html:true, |
| | | formatter:(val)=> { |
| | | return '<label class="el-checkbox is-disabled ' + (val[i] == true ? 'is-checked' : '') + '"><span class="el-checkbox__input is-disabled ' + (val[i] == true ? 'is-checked' : '') + '"><span class="el-checkbox__inner"></span><input type="checkbox" aria-hidden="false" class="el-checkbox__original" value="' + val[i] + '"></span></label>' |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | this.data = res.data.obj.rowList; |
| | | this.$refs.crud.clearSelection(); |
| | | this.tableLoading = false; |
| | | this.actionMap=res.data.obj.actionMap |
| | | this.actionMap=res.data.obj.actionMap; |
| | | this.selectRow={} |
| | | }) |
| | | }, |
| | | handleRefresh() { |
| | |
| | | }, |
| | | // è¡ç¹å» |
| | | rowClickHandler(row) { |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.crud, |
| | | this.lastIndex, |
| | | (newIndex) => { |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = [row]; |
| | | } |
| | | ); |
| | | this.getViewData(row) |
| | | }, |
| | | // éæ©æ¡ |
| | | selectChange(row) { |
| | | this.selectList = row; |
| | | }, |
| | | //è·å䏿¹æ°æ® |
| | | getViewData(row){ |
| | | this.viewData={ |
| | | oid:row.plOId |
| | | }; |
| | | this.selectRow=row |
| | | }, |
| | | // æ¥çææç»æ |
| | | chekView() { |
| | | if (this.selectList.length <= 0) { |
| | | this.$message.warning('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | if (this.selectList.length > 1) { |
| | | this.$message.warning('åªè½éæ©ä¸æ¡æ°æ®è¿è¡æ¥ç'); |
| | | if (this.selectRow=={}) { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | |
| | | getUsedEnumList({enumName: this.selectList[0].id}).then(res => { |
| | | getUsedEnumList({enumName: this.selectRow.id}).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.checkViewVisible = true; |
| | | this.checkViewData = res.data.data; |
| | |
| | | let list = []; |
| | | let that = this; |
| | | let getValue = function (queryTemplate, item) { |
| | | for (let key in queryTemplate.condition.cIMap) { |
| | | if (queryTemplate.condition.cIMap[key].leaf) { |
| | | item.clause += '.' + queryTemplate.condition.cIMap[key].leafInfo.clause; |
| | | if (queryTemplate.condition.cIMap[key].leafInfo.value.queryTemplate) { |
| | | getValue(queryTemplate.condition.cIMap[key].leafInfo.value.queryTemplate, item) |
| | | } else { |
| | | //item.ordinaryValue = queryTemplate.condition.cIMap[key].leafInfo.value.ordinaryValue; |
| | | item.type = queryTemplate.condition.cIMap[key].leafInfo.type; |
| | | if (['VTInteger', 'VTDouble', 'VTLong'].includes(item.type)) { |
| | | item.operatorDic = that.operatorIntDic; |
| | | } else if (['VTDateTime', 'VTDate', 'VTTime'].includes(item.type)) { |
| | | item.operatorDic = that.operatorDateDic; |
| | | if(queryTemplate.id.indexOf('qt_')==0){ |
| | | item.clause += '.' + queryTemplate.condition.cIMap['ci1'].leafInfo.clause; |
| | | item.ordinaryValue = queryTemplate.condition.cIMap['ci1'].leafInfo.value.ordinaryValue; |
| | | item.type = queryTemplate.condition.cIMap['ci1'].leafInfo.type; |
| | | }else { |
| | | item.ordinaryValue = queryTemplate.id+';'+queryTemplate.clauseList.join(','); |
| | | /*for (let key in queryTemplate.condition.cIMap) { |
| | | if (queryTemplate.condition.cIMap[key].leaf) { |
| | | item.clause += '.' + queryTemplate.condition.cIMap[key].leafInfo.clause; |
| | | if (queryTemplate.condition.cIMap[key].leafInfo.value.queryTemplate) { |
| | | getValue(queryTemplate.condition.cIMap[key].leafInfo.value.queryTemplate, item) |
| | | } else { |
| | | item.operatorDic = that.operatorDic; |
| | | item.ordinaryValue = queryTemplate.condition.cIMap[key].leafInfo.value.ordinaryValue; |
| | | item.type = queryTemplate.condition.cIMap[key].leafInfo.type; |
| | | } |
| | | } |
| | | } |
| | | }*/ |
| | | } |
| | | if (['VTInteger', 'VTDouble', 'VTLong'].includes(item.type)) { |
| | | item.operatorDic = that.operatorIntDic; |
| | | } else if (['VTDateTime', 'VTDate', 'VTTime'].includes(item.type)) { |
| | | item.operatorDic = that.operatorDateDic; |
| | | } else { |
| | | item.operatorDic = that.operatorDic; |
| | | } |
| | | } |
| | | for (let key in val.cIMap) { |
| | |
| | | operatorDic: [] |
| | | } |
| | | if (this.queryCondition.cIMap[key].leafInfo.value.queryTemplate) { |
| | | item.ordinaryValue = this.queryCondition.cIMap[key].leafInfo.value.queryTemplate.id+';'+this.queryCondition.cIMap[key].leafInfo.value.queryTemplate.clauseList.join(','); |
| | | if(this.queryCondition.cIMap[key].leafInfo.value.queryTemplate.id.indexOf('qt_')==0){ |
| | | getValue(this.queryCondition.cIMap[key].leafInfo.value.queryTemplate, item) |
| | | }else { |
| | | item.type = this.queryCondition.cIMap[key].leafInfo.type; |
| | | if (['VTInteger', 'VTDouble', 'VTLong'].includes(item.type)) { |
| | | item.operatorDic = that.operatorIntDic; |
| | | } else if (['VTDateTime', 'VTDate', 'VTTime'].includes(item.type)) { |
| | | item.operatorDic = that.operatorDateDic; |
| | | } else { |
| | | item.operatorDic = that.operatorDic; |
| | | } |
| | | } |
| | | } else { |
| | | item.ordinaryValue = this.queryCondition.cIMap[key].leafInfo.value.ordinaryValue; |
| | | item.type = this.queryCondition.cIMap[key].leafInfo.type; |
| | |
| | | font-size: 14px |
| | | } |
| | | |
| | | .formItemMargin { |
| | | margin: 10px 0 10px 0; |
| | | } |
| | | //.formItemMargin { |
| | | // margin: 10px 0 10px 0; |
| | | //} |
| | | |
| | | </style> |
| | |
| | | <span v-else-if="form.searchTarger === '1'">æºå¯¹è±¡</span> |
| | | <span v-else-if="form.searchTarger === '2'">ç®æ 对象</span> |
| | | </template> |
| | | |
| | | <template slot="extAttrLabel" slot-scope="{}"> |
| | | <el-tooltip placement="top"> |
| | | <div slot="content">示ä¾:ext1:xx;ext2;ext3:xx;ext4:xxx;extn:xxx; |
| | | <br/>1ãç¨è±äº¤åè§åå·:åéåç»å¼; |
| | | <br/>2ãæ¯ç»ç¨è±äº¤åè§åå·:åéå䏿©å±å±æ§åç§°å屿§å¼; |
| | | <br/>3ãå¯ä»¥å®ä¹ä»»æç»ï¼ä½æ»å符é¿åº¦ä¸å¾è¶
è¿4000; |
| | | <br/>4ãè¾å
¥æ¶ï¼ä¸è¦æ²å车æ¢è¡; |
| | | </div> |
| | | <span>æ©å±å±æ§ <i class="el-icon-warning" style="color:red;"></i> </span> |
| | | </el-tooltip> |
| | | </template> |
| | | |
| | | <template slot="uiParserLabel" slot-scope="{}"> |
| | | <el-tooltip placement="top"> |
| | | <div slot="content">示ä¾ï¼java_cs;xxx.java_bs;xxx.net_cs;xxxx.net_bs;xxx.mobile_cs;xx.mobile_bs;xxx; |
| | | <br/>1ãç¨è±æåè§åå·;åå²åç»å¼ï¼ï¼è¿éç»å°¾çæ¯ä¸æå符çåå·ï¼ |
| | | <br/>2ãæ¯ç»ç¨è±æåè§åå·:åéå䏿©å±å±æ§åç§°å屿§å¼ï¼ |
| | | <br/>3ãå
¶ä¸çxxxæ¯åç§è§£æç±»ç宿´ç±»ååç§°ï¼å®å
¨éå®å)ï¼ |
| | | <br/>4ãè¾å
¥æ¶ï¼ä¸è¦æ²å车æ¢è¡; |
| | | </div> |
| | | <span>UIè§£æç±»å <i class="el-icon-warning" style="color:red;"></i> </span> |
| | | </el-tooltip> |
| | | </template> |
| | | |
| | | <template slot="templateIdForm" slot-scope="{}"> |
| | | <el-select v-model="form.templateId" filterable placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in templateIdList" |
| | | :key="item.viName" |
| | | :label="item.viName" |
| | | :value="item.viName"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | |
| | | <template slot="queryTemplateNameForm" slot-scope="{}"> |
| | | <el-select v-model="form.queryTemplateName" filterable placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in queryTemplateNameList" |
| | | :key="item.qtName" |
| | | :label="item.qtName" |
| | | :value="item.qtName"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog |
| | | v-dialogDrag |
| | |
| | | delPageDefination, |
| | | joinBtn, |
| | | exitBtn, |
| | | updatePageDefination |
| | | updatePageDefination, |
| | | getPortalVIDatasByPage, |
| | | getQTInfoDatasByPage |
| | | } from "@/api/UI/uiDefine"; |
| | | import actionDialog from '@/views/modelingMenu/ui/Aciton/components/dialog'; |
| | | import cloneDialog from "@/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog"; |
| | |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | queryTemplateNameList:[], |
| | | templateIdList: [], |
| | | searchTargerChangeFlag: false, |
| | | formBtnOid: '', |
| | | sourceBtnOid: '', |
| | | sourceOId: '', |
| | |
| | | eventOption: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | // editBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | refreshBtn: false, |
| | | highlightCurrentRow: true, |
| | |
| | | ], |
| | | }, |
| | | { |
| | | label: 'UIè§£æç±»å', |
| | | label: '', |
| | | prop: 'uiParser', |
| | | hide: true, |
| | | labelWidth: 100, |
| | | }, |
| | | { |
| | | label: 'æ©å±å±æ§', |
| | | label: '', |
| | | prop: 'extAttr', |
| | | hide: true, |
| | | }, |
| | |
| | | // list.forEach(item => { |
| | | // this.form[item] = ""; |
| | | // }) |
| | | this.form.searchTarger = '1' |
| | | // this.form.searchTarger = '1' |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // è·åæç´¢ç±»åé
置项 |
| | | searchTarger.display = true; // 忢é»è®¤å±ç¤ºæç´¢ç±»å |
| | | // 模æ¿ç±»åä¸ºè¡¨æ ¼ |
| | |
| | | dicData: [ |
| | | { |
| | | label: '䏿¾ç¤º', |
| | | value: '3' |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: 'æ¾ç¤ºè§è²', |
| | |
| | | }, |
| | | { |
| | | label: 'æ¾ç¤ºFolder', |
| | | value: '1', |
| | | value: '3', |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | const obj = this.option.group[0].column.find(item => item.prop === 'linkType'); |
| | | obj.display = val.value !== '1'; |
| | | } |
| | | // 忢æ¸
空模æ¿ç±»å |
| | | const list = ['showType', 'linkType', 'templateId', 'SubUILayout', 'queryTemplateName', 'searchObjType']; |
| | | // list.forEach(item => { |
| | | // this.form[item] = ''; |
| | | // }) |
| | | |
| | | if (this.searchTargerChangeFlag) { |
| | | // 忢æ¸
空模æ¿ç±»å |
| | | const list = ['showType', 'linkType', 'templateId', 'SubUILayout', 'queryTemplateName', 'searchObjType', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']; |
| | | list.forEach(item => { |
| | | this.form[item] = ''; |
| | | }) |
| | | } else { |
| | | this.searchTargerChangeFlag = true; |
| | | } |
| | | } |
| | | }, |
| | | { |
| | |
| | | label: 'æºå¯¹è±¡', |
| | | prop: 'showType', |
| | | type: 'select', |
| | | cascader: ['linkType', 'templateId', 'SubUILayout', 'searchObjType', 'queryTemplateName'], |
| | | cascader: ['linkType', 'SubUILayout', 'searchObjType'], |
| | | placeholder: "请è¾å
¥å
容", |
| | | dicUrl: '/api/uiManagerController/getBtmDatasByPage?page=1&limit=-1', |
| | | filterable: true, |
| | | change: (val) => { |
| | | if (val.value) { |
| | | let params = { |
| | | 'conditionMap[selectBtmType]': this.form.searchTarger === '1' ? this.form.showType : this.form.linkType |
| | | } |
| | | getPortalVIDatasByPage(1, -1, params).then(res => { |
| | | this.templateIdList = res.data.data; |
| | | }) |
| | | getQTInfoDatasByPage(1, -1, params).then(res => { |
| | | this.queryTemplateNameList = res.data.data; |
| | | }) |
| | | } |
| | | }, |
| | | props: { |
| | | label: 'name', |
| | | value: 'name', |
| | |
| | | desc: 'tag' |
| | | }, |
| | | dicUrl: '/api/uiManagerController/getLinkDatasByPage?page=1&limit=-1&conditionMap[selectBtmType]={{key}}', |
| | | change:(val) => { |
| | | if (val.value) { |
| | | let params = { |
| | | 'conditionMap[selectBtmType]': val.value |
| | | } |
| | | getPortalVIDatasByPage(1, -1, params).then(res => { |
| | | this.templateIdList = res.data.data; |
| | | }) |
| | | getQTInfoDatasByPage(1, -1, params).then(res => { |
| | | this.queryTemplateNameList = res.data.data; |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | label: 'éæ©æ¨¡æ¿', |
| | | prop: 'templateId', |
| | | display: false, |
| | | type: 'select', |
| | | filterable: true, |
| | | dicUrl: '/api/uiManagerController/getPortalVIDatasByPage?page=1&limit=-1&conditionMap[selectBtmType]={{key}}', |
| | | formslot: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | trigger: 'submit' |
| | | } |
| | | ], |
| | | props: { |
| | | label: 'viName', |
| | | value: 'viName', |
| | | desc: 'viType' |
| | | }, |
| | | }, |
| | | { |
| | | label: 'UIå®ä¹', |
| | |
| | | label: 'æ¥è¯¢æ¨¡æ¿', |
| | | prop: 'queryTemplateName', |
| | | type: 'select', |
| | | filterable: true, |
| | | display: false, |
| | | props: { |
| | | label: 'qtName', |
| | | value: 'qtName', |
| | | desc: 'btmName' |
| | | }, |
| | | dicUrl: '/api/uiManagerController/getQTInfoDatasByPage?page=1&limit=-1&conditionMap[selectBtmType]={{key}}', |
| | | formslot: true, |
| | | }, |
| | | { |
| | | label: 'æ§å¶è·¯å¾', |
| | |
| | | prop: 'showAbs', |
| | | display: false, |
| | | labelWidth: 135, |
| | | span: 12 |
| | | }, |
| | | { |
| | | label: 'B/Sèªå®ä¹æ¥è¯¢', |
| | | prop: 'bsCustQueryCLsOrUrl', |
| | | display: false, |
| | | labelWidth: 115, |
| | | span: 12 |
| | | }, |
| | | { |
| | | label: 'C/Sèªå®ä¹æ¥è¯¢', |
| | | prop: 'csCustQueryCLsOrUrl', |
| | | display: false, |
| | | labelWidth: 115, |
| | | span: 12 |
| | | }, |
| | | ] |
| | |
| | | |
| | | // å¢å |
| | | addClickHandler() { |
| | | console.log(this.sourceData); |
| | | if (!this.sourceData || !this.sourceData.plOId) { |
| | | this.$message.error('请å¨ä¸æ¹éæ©ä¸æ¡æ°æ®åè¿è¡æ·»å '); |
| | | return; |
| | | } |
| | | this.$refs.crud.rowAdd(); |
| | | }, |
| | | |
| | | // ç¼è¾æå¼è¡¨åå |
| | | beforeOpen(done, type) { |
| | | // if (type === 'edit') { |
| | | // console.log('edit'); |
| | | // this.form.showType = 'Ludc'; |
| | | // } |
| | | done(); |
| | | }, |
| | | |
| | | // å¢å å
³éå¯¹è¯æ¡ æ¸
空eventæ°ç» |
| | |
| | | }; |
| | | }); |
| | | } |
| | | this.searchTargerChangeFlag = false; |
| | | this.$refs.crud.rowEdit(row); |
| | | console.log(this.form); |
| | | }, |
| | | |
| | | // å é¤ |
| | | rowDeleteHandler(row) { |
| | | console.log(row); |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤æéæ©çæ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | |
| | | row.SubUIObjType = row.showType; |
| | | row.showType = ""; |
| | | } |
| | | console.log(this.sourceData); |
| | | const params = { |
| | | ...row, |
| | | tabPageOId: this.sourceData.plOId |
| | | } |
| | | addPageDefination(params).then(res => { |
| | | console.log(res); |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | |
| | | }) |
| | | }, |
| | | |
| | | rowUpdateHandler(row,index,done,loading){ |
| | | rowUpdateHandler(row, index, done, loading) { |
| | | if (row.templateType === '6') { |
| | | row.SubUIObjType = row.showType; |
| | | row.showType = ""; |
| | | } |
| | | console.log(this.sourceData); |
| | | const params = { |
| | | ...row, |
| | | tabPageOId: this.sourceData.plOId |
| | | } |
| | | updatePageDefination(params).then(res => { |
| | | console.log(res); |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | |
| | | // 模æ¿ç±»åä¸ºè¡¨æ ¼ |
| | | templateTypeTable(val) { |
| | | if (!val) return; |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']); |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为èªå®ä¹æ¨¡æ¿ |
| | |
| | | // 模æ¿ç±»å为æ 表 |
| | | templateTypeTreeTable(val) { |
| | | if (!val) return; |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'expandMode']); |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'expandMode', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为表å |
| | | templateTypeForm(val) { |
| | | if (!val) return; |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']); |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为æ |
| | |
| | | if (!val) return; |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // è·åæç´¢ç±»åé
置项 |
| | | searchTarger.display = false; // ä¸å±ç¤ºæç´¢ç±»å |
| | | this.updateDisplay(val, ['showType', 'queryTemplateName', 'rootContent', 'showAbs', 'showLinkAbs', 'separator', 'expandMode', 'linkType']); |
| | | this.updateDisplay(val, ['showType', 'queryTemplateName', 'rootContent', 'showAbs', 'showLinkAbs', 'separator', 'expandMode', 'linkType', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为UIå®ä¹ |
| | |
| | | if (!val) return; |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // è·åæç´¢ç±»åé
置项 |
| | | searchTarger.display = false; // ä¸å±ç¤ºæç´¢ç±»å |
| | | this.updateDisplay(val, ['showType', 'SubUILayout', 'searchType', 'searchObjType', 'queryTemplateName']); |
| | | this.updateDisplay(val, ['showType', 'SubUILayout', 'searchType', 'searchObjType', 'queryTemplateName', 'bsCustQueryCLsOrUrl', 'csCustQueryCLsOrUrl']); |
| | | }, |
| | | |
| | | // æ¥æ¾æ°ç»ä¸å¯¹è±¡ç´¢å¼ |
| | |
| | | this.$message.error('è¯·éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | console.log(this.selectList); |
| | | this.btnDesignVisible = true; |
| | | this.formBtnOid = this.selectList[0].id; |
| | | this.getTabBtnTree(); |
| | |
| | | |
| | | // æé®è®¾è®¡ä¿¡æ¯åæ°ä¿¡æ¯ä¿®æ¹ |
| | | paramsRowEditHandler(row) { |
| | | this.$refs.paramsCrud.rowEdit(row,row.$index); |
| | | this.$refs.paramsCrud.rowEdit(row, row.$index); |
| | | }, |
| | | |
| | | // æé®è®¾è®¡åæ°ä¿¡æ¯æ·»å æé® |
| | |
| | | |
| | | // æé®è®¾è®¡åæ°ä¿¡æ¯ä¿®æ¹ä¿å |
| | | paramsRowUpdate(row, index, done, loading) { |
| | | console.log(row,index); |
| | | this.paramsData.splice(index, 1, row); |
| | | done(); |
| | | }, |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteTabButton(this.nodeTreeRow).then(res => { |
| | | // console.log(res); |
| | | if (res.data.code === 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getTabBtnTree(); |
| | |
| | | |
| | | // æå¼å
éå¯¹è¯æ¡ |
| | | rowCloneHandler(row) { |
| | | console.log(row); |
| | | this.fromOid = this.sourceData.plOId; |
| | | this.sourceOId = row.id; |
| | | this.$refs.cloneDialog.openDialog(row); |
| | |
| | | return; |
| | | } |
| | | joinBtn(this.nodeTreeRow).then(res => { |
| | | // console.log(res); |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTabBtnTree(); |
| | |
| | | this.$message.error('è¯·éæ©èç¹è¿è¡ä¿®æ¹'); |
| | | return; |
| | | } |
| | | |
| | | if (this.nodeTreeRow.oId === "parentNode") { |
| | | this.$message.error('é¡¶å±èç¹ä¸å
è®¸è°æ´'); |
| | | return; |
| | |
| | | rowSaveHandler(row, done, loading) { |
| | | delete row.roleClassifyText; |
| | | addRole(row).then(res => { |
| | | console.log(res) |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | |
| | | } |
| | | }).catch(err => { |
| | | loading(); |
| | | console.log(err); |
| | | }); |
| | | }, |
| | | |
| | |
| | | return; |
| | | } |
| | | listUserByRoleOid({pkRole: this.selectList[0].oid}).then(res => { |
| | | console.log(res) |
| | | if (res.data.code === 200) { |
| | | const data = res.data.data; |
| | | this.countData = data.map(item => { |
| | |
| | | }); |
| | | this.statisticsVisible = true; |
| | | } |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | |
| | |
| | | <el-row> |
| | | <el-col :span="16" style="height: 560px"> |
| | | <basic-container> |
| | | <el-collapse v-model="activeNames" @change="handleChange"> |
| | | <el-collapse v-model="activeNames"> |
| | | <el-collapse-item name="1" title="欢è¿ä½¿ç¨PLT-WEBå¹³å°"> |
| | | <div> |
| | | 1ãå京å®åè¿è¾¾ç§ææéå
¬å¸ï¼ä»¥ä¸ç®ç§°âå®åè¿è¾¾âï¼é¿æä¸æ³¨äºå¶é ä¸ä¿¡æ¯å建设ï¼ä¸ºå®¢æ·æä¾ä¼ä¸ä¿¡æ¯åæ´ä½è§£å³æ¹æ¡åç¸å
³è½¯ä»¶ç åãå¨è¯¢å宿½æå¡ãå®åè¿è¾¾å®¢æ·ç¾¤ä½æ¶µçèªç©ºãèªå¤©ãè¹è¶ãå
µå¨ã汽车ãéç¨æºæ¢°ãçµåçå¶é è¡ä¸ï¼éè¿ä¸å®¢æ·æ·±åº¦åä½ï¼æ¿æ
äºå¤é¡¹å½å®¶çº§è½¯ä»¶ç åä¸ææ¯æå¡é¡¹ç®ï¼æ¥æå¤é¡¹å
·æèªä¸»ç¥è¯äº§æç软件产åã |
| | |
| | | <div> |
| | | 2ã为äºç»å®¢æ·æä¾æ´å¤çææ¯åæ°è½ååç¸åºçä¼ä¸çº§ç®¡çæ¯æå¹³å°ï¼å®åè¿è¾¾ç åäºå
·æèªä¸»ç¥è¯äº§æçä¼ä¸çº§ä¿¡æ¯åæ´ä½è§£å³æ¹æ¡ï¼åæ¶é对客æ·çç¹å®éæ±ï¼æä¾äºé«åº¦å¯å®å¶çä¸ä¸åºç¨ã为äºè¿ä¸æ¥æåææ¯æå¡è½åï¼å®åè¿è¾¾æå
¥ä¸é¨åéå¨åæ²¿ææ¯æ¹é¢è¿è¡æ¢ç´¢ï¼å¨ä¼ä¸ç§æäºè®¡ç®åå¤§æ°æ®çé¢å䏿åå¾çªç ´ãéçæ°ä¸ä»£ä¸å¡ä¸ç®¡çææ¯å¹³å°çæ¨åºï¼æ´å¢å¼ºäºå
¬å¸ä¸ºå®¢æ·æä¾é«è´¨éãå
¨æ¹ä½ãæ·±å±æ¬¡æå¡çææ¯è½åã |
| | | </div> |
| | | <div>3ãå®åè¿è¾¾ä¸ç´ç§æ¿âç¨æºæ
§ä¸ºå®¢æ·åé ä»·å¼âç宿¨ï¼æ¿ä»¥âè¯ä¿¡è´è´£âçæåº¦åä¸ä¸åçæå¡ï¼å¨ä¼ä¸ä¿¡æ¯ååå±çéè·¯ä¸ï¼ä¸å®¢æ·ä¸èµ·æé¿ï¼å
±åè§è¯æåï¼</div> |
| | | <div> |
| | | 3ãå®åè¿è¾¾ä¸ç´ç§æ¿âç¨æºæ
§ä¸ºå®¢æ·åé ä»·å¼âç宿¨ï¼æ¿ä»¥âè¯ä¿¡è´è´£âçæåº¦åä¸ä¸åçæå¡ï¼å¨ä¼ä¸ä¿¡æ¯ååå±çéè·¯ä¸ï¼ä¸å®¢æ·ä¸èµ·æé¿ï¼å
±åè§è¯æåï¼ |
| | | </div> |
| | | </el-collapse-item> |
| | | |
| | | <el-collapse-item name="2" title="æå¡è®¡åå¶å®"> |
| | |
| | | |
| | | <span>è¯´æææ¡£</span> |
| | | <el-divider direction="vertical"/> |
| | | <span><el-link href="https://bladex.vip" target="_blank" |
| | | type="primary">https://bladex.vip</el-link></span> |
| | | <span> |
| | | <el-link href="https://bladex.vip" target="_blank" |
| | | type="primary">https://bladex.vip |
| | | </el-link> |
| | | </span> |
| | | <el-divider content-position="right"><i class="el-icon-star-off"/></el-divider> |
| | | |
| | | </div> |
| | |
| | | import 'echarts/lib/chart/pie' // 导å
¥æ±ç¶å¾ç»ä»¶ |
| | | import 'echarts/lib/component/tooltip' |
| | | import 'echarts/lib/component/legend' |
| | | import func from "@/util/func"; |
| | | |
| | | export default { |
| | | name: "wel", |
| | |
| | | this.getLogHandler(); |
| | | }, |
| | | methods: { |
| | | handleChange(val) { |
| | | window.console.log(val); |
| | | }, |
| | | |
| | | getLogHandler() { |
| | | this.loading = true; |
| | | |