已修改82个文件
已删除9个文件
已重命名174个文件
已添加29个文件
| | |
| | | </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 + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | /** |
| | | * æ çæ°æ® |
| | | */ |
| | | private Collection<Tree> treeData; |
| | | private Collection<BaseTree> treeData; |
| | | |
| | | public Object[] getMsgObjs() { |
| | | return msgObjs; |
| | |
| | | this.data = data; |
| | | } |
| | | |
| | | public Collection<Tree> getTreeData() { |
| | | public Collection<BaseTree> getTreeData() { |
| | | return treeData; |
| | | } |
| | | |
| | | public void setTreeData(Collection<Tree> treeData) { |
| | | public void setTreeData(Collection<BaseTree> treeData) { |
| | | this.treeData = treeData; |
| | | } |
| | | |
| | |
| | | * @param treeList æ èç¹éå |
| | | * @return ç»ä¸æ°æ®å¯¹è±¡ |
| | | */ |
| | | public static BaseResult tree(Collection<Tree> treeList){ |
| | | public static BaseResult tree(Collection<? extends BaseTree> treeList){ |
| | | BaseResult baseResult = new BaseResult<>(); |
| | | baseResult.setCode(ResultCodeEnum.SUCCESS.code); |
| | | baseResult.setSuccess(true); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.starter.web.pagemodel; |
| | | |
| | | |
| | | /** |
| | | * @author ludc |
| | | * @date 2024/11/27 16:53 |
| | | */ |
| | | public class BaseTree implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | | * @serial åºååå¼ |
| | | */ |
| | | private static final long serialVersionUID = 6886695271635257122L; |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | private String oid; |
| | | |
| | | /** |
| | | * æ¾ç¤ºææ¬ |
| | | */ |
| | | private String text; |
| | | |
| | | /** |
| | | * ç¼å· |
| | | */ |
| | | private String id; |
| | | |
| | | /** |
| | | * æ¯å¦å¶å |
| | | */ |
| | | private boolean leaf = false; |
| | | |
| | | /** |
| | | * æ¯å¦æ¾ç¤ºå¤éæ¡ |
| | | */ |
| | | private boolean showCheckbox = false; |
| | | |
| | | /** |
| | | * æ¯å¦é»è®¤éä¸ |
| | | */ |
| | | private boolean checked = false; |
| | | |
| | | /** |
| | | * å±çº§ |
| | | */ |
| | | private int level; |
| | | |
| | | /** |
| | | * 徿 |
| | | */ |
| | | private String icon; |
| | | |
| | | /** |
| | | * 徿 æ ·å¼ |
| | | */ |
| | | private String iconCls; |
| | | |
| | | /** |
| | | * ä¸çº§èç¹ |
| | | */ |
| | | private String parentId; |
| | | |
| | | /** |
| | | * ä¸çº§èç¹çåç§° |
| | | */ |
| | | private String parentName; |
| | | |
| | | /** |
| | | * ä¸çº§èç¹çä¸å¡ç±»å |
| | | */ |
| | | private String parentBtmName; |
| | | |
| | | /** |
| | | * æ¯å¦å±å¼ |
| | | */ |
| | | private boolean expanded = false; |
| | | |
| | | /** |
| | | * 龿¥ |
| | | */ |
| | | private String href;//layuiåextjs使ç¨href,easyui使ç¨urlï¼ç»ä¸href |
| | | |
| | | /** |
| | | * æåºç´¢å¼ |
| | | */ |
| | | private String index; |
| | | |
| | | /** |
| | | * å½åæ°æ®å¯¹è±¡ |
| | | */ |
| | | private Object data; |
| | | |
| | | public void setOid(String oid) { |
| | | this.oid = oid; |
| | | } |
| | | |
| | | public void setText(String text) { |
| | | this.text = text; |
| | | } |
| | | |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public void setLeaf(boolean leaf) { |
| | | this.leaf = leaf; |
| | | } |
| | | |
| | | public void setShowCheckbox(boolean showCheckbox) { |
| | | this.showCheckbox = showCheckbox; |
| | | } |
| | | |
| | | public void setChecked(boolean checked) { |
| | | this.checked = checked; |
| | | } |
| | | |
| | | public void setLevel(int level) { |
| | | this.level = level; |
| | | } |
| | | |
| | | public void setIcon(String icon) { |
| | | this.icon = icon; |
| | | } |
| | | |
| | | public void setIconCls(String iconCls) { |
| | | this.iconCls = iconCls; |
| | | } |
| | | |
| | | public void setParentId(String parentId) { |
| | | this.parentId = parentId; |
| | | } |
| | | |
| | | public void setParentName(String parentName) { |
| | | this.parentName = parentName; |
| | | } |
| | | |
| | | public void setParentBtmName(String parentBtmName) { |
| | | this.parentBtmName = parentBtmName; |
| | | } |
| | | |
| | | public void setExpanded(boolean expanded) { |
| | | this.expanded = expanded; |
| | | } |
| | | |
| | | public void setHref(String href) { |
| | | this.href = href; |
| | | } |
| | | |
| | | public void setIndex(String index) { |
| | | this.index = index; |
| | | } |
| | | |
| | | public void setData(Object data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | public String getOid() { |
| | | return oid; |
| | | } |
| | | |
| | | public String getText() { |
| | | return text; |
| | | } |
| | | |
| | | public String getId() { |
| | | return id; |
| | | } |
| | | |
| | | public boolean isLeaf() { |
| | | return leaf; |
| | | } |
| | | |
| | | public boolean isShowCheckbox() { |
| | | return showCheckbox; |
| | | } |
| | | |
| | | public boolean isChecked() { |
| | | return checked; |
| | | } |
| | | |
| | | public int getLevel() { |
| | | return level; |
| | | } |
| | | |
| | | public String getIcon() { |
| | | return icon; |
| | | } |
| | | |
| | | public String getIconCls() { |
| | | return iconCls; |
| | | } |
| | | |
| | | public String getParentId() { |
| | | return parentId; |
| | | } |
| | | |
| | | public String getParentName() { |
| | | return parentName; |
| | | } |
| | | |
| | | public String getParentBtmName() { |
| | | return parentBtmName; |
| | | } |
| | | |
| | | public boolean isExpanded() { |
| | | return expanded; |
| | | } |
| | | |
| | | public String getHref() { |
| | | return href; |
| | | } |
| | | |
| | | public String getIndex() { |
| | | return index; |
| | | } |
| | | |
| | | public Object getData() { |
| | | return data; |
| | | } |
| | | } |
| | |
| | | * @author weidy |
| | | * |
| | | */ |
| | | public class Tree implements java.io.Serializable{ |
| | | public class Tree extends BaseTree implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | |
| | | setData(o); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | private String oid; |
| | | /** |
| | | * æ¾ç¤ºææ¬ |
| | | */ |
| | | private String text; |
| | | /** |
| | | * ç¼å· |
| | | */ |
| | | private String id; |
| | | /** |
| | | * æ¯å¦å¶å |
| | | */ |
| | | private boolean leaf = false; |
| | | |
| | | /** |
| | | * æ¯å¦æ¾ç¤ºå¤éæ¡ |
| | | */ |
| | | private boolean showCheckbox = false; |
| | | /** |
| | | * æ¯å¦é»è®¤éä¸ |
| | | */ |
| | | private boolean checked = false; |
| | | |
| | | /** |
| | | * åèç¹ |
| | | */ |
| | | private List<Tree> children = new ArrayList<Tree>(); |
| | | /** |
| | | * å±çº§ |
| | | */ |
| | | private int level; |
| | | /** |
| | | * 徿 |
| | | */ |
| | | private String icon; |
| | | /** |
| | | * 徿 æ ·å¼ |
| | | */ |
| | | private String iconCls; |
| | | /** |
| | | * ä¸çº§èç¹ |
| | | */ |
| | | private String parentId; |
| | | private List<Tree> children = new ArrayList<>(); |
| | | |
| | | /** |
| | | * ä¸çº§èç¹çåç§° |
| | | */ |
| | | private String parentName; |
| | | |
| | | /** |
| | | * ä¸çº§èç¹çä¸å¡ç±»å |
| | | */ |
| | | private String parentBtmName; |
| | | /** |
| | | * æ¯å¦å±å¼ |
| | | */ |
| | | private boolean expanded = false; |
| | | |
| | | /** |
| | | * 龿¥ |
| | | */ |
| | | private String href;//layuiåextjs使ç¨href,easyui使ç¨urlï¼ç»ä¸href |
| | | |
| | | /** |
| | | * æåºç´¢å¼ |
| | | */ |
| | | private String index;//æåºç´¢å¼ |
| | | /*** |
| | | * å½åæ°æ®å¯¹è±¡ |
| | | */ |
| | | private Object data; |
| | | |
| | | /** |
| | | * å
¶ä»ç屿§ |
| | | */ |
| | | private Map<String,String> attributes = new HashMap<String, String>();//使ç¨å¹³å°çè¯ï¼ææç屿§é½æ¯Stringç |
| | | |
| | | private Map<String,String> attributes = new HashMap<>();//使ç¨å¹³å°çè¯ï¼ææç屿§é½æ¯Stringç |
| | | |
| | | /** |
| | | * è·åä¸»é® |
| | | * @return 主é®çå¼ |
| | | */ |
| | | public String getOid() { |
| | | return oid; |
| | | return super.getOid(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param oid 主é®çå¼ |
| | | */ |
| | | public void setOid(String oid) { |
| | | this.oid = oid; |
| | | super.setOid(oid); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return æ èç¹ææ¬ |
| | | */ |
| | | public String getText() { |
| | | return text; |
| | | return super.getText(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param text æ èç¹ææ¬ |
| | | */ |
| | | public void setText(String text) { |
| | | this.text = text; |
| | | super.setText(text); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param id |
| | | */ |
| | | public void setId(String id) { |
| | | this.id = id; |
| | | super.setId(id); |
| | | } |
| | | |
| | | /** |
| | | * è·åç¼å· |
| | | */ |
| | | public String getId() { |
| | | return id; |
| | | return super.getId(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return true 表示å¶åèç¹ |
| | | */ |
| | | public boolean isLeaf() { |
| | | return leaf; |
| | | return super.isLeaf(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param leaf æ¯å¦å¶åèç¹ |
| | | */ |
| | | public void setLeaf(boolean leaf) { |
| | | this.leaf = leaf; |
| | | super.setLeaf(leaf); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return true表示æ¾ç¤º |
| | | */ |
| | | public boolean isShowCheckbox() { |
| | | return showCheckbox; |
| | | return super.isShowCheckbox(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param showCheckbox æ¯å¦æ¾ç¤ºå¤éæ¡ |
| | | */ |
| | | public void setShowCheckbox(boolean showCheckbox) { |
| | | this.showCheckbox = showCheckbox; |
| | | super.setShowCheckbox(showCheckbox); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return true表示éè¦èªå¨å¾é |
| | | */ |
| | | public boolean isChecked() { |
| | | return checked; |
| | | return super.isChecked(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param checked æ¯å¦èªå¨å¾é |
| | | */ |
| | | public void setChecked(boolean checked) { |
| | | this.checked = checked; |
| | | super.setChecked(checked); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return åèç¹å表 |
| | | */ |
| | | public List<Tree> getChildren() { |
| | | return children; |
| | | return this.children; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 徿 |
| | | */ |
| | | public String getIcon() { |
| | | return icon; |
| | | return super.getIcon(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param icon 徿 |
| | | */ |
| | | public void setIcon(String icon) { |
| | | this.icon = icon; |
| | | super.setIcon(icon); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return cssç±»çåç§° |
| | | */ |
| | | public String getIconCls() { |
| | | return iconCls; |
| | | return super.getIconCls(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param iconCls cssç±»çåç§° |
| | | */ |
| | | public void setIconCls(String iconCls) { |
| | | this.iconCls = iconCls; |
| | | super.setIconCls(iconCls); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return ä¸çº§èç¹çoid |
| | | */ |
| | | public String getParentId() { |
| | | return parentId; |
| | | return super.getParentId(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param parentId ä¸çº§èç¹çoid |
| | | */ |
| | | public void setParentId(String parentId) { |
| | | this.parentId = parentId; |
| | | super.setParentId(parentId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return true表示èªå¨å±å¼ |
| | | */ |
| | | public boolean isExpanded() { |
| | | return expanded; |
| | | return super.isExpanded(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param expanded æ¯å¦èªå¨å±å¼ |
| | | */ |
| | | public void setExpanded(boolean expanded) { |
| | | this.expanded = expanded; |
| | | super.setExpanded(expanded); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 龿¥å°å |
| | | */ |
| | | public String getHref() { |
| | | return href; |
| | | return super.getHref(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param href 龿¥å°å |
| | | */ |
| | | public void setHref(String href) { |
| | | this.href = href; |
| | | super.setHref(href); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return æåºå· |
| | | */ |
| | | public String getIndex() { |
| | | return index; |
| | | return super.getIndex(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param index æåºå· |
| | | */ |
| | | public void setIndex(String index) { |
| | | this.index = index; |
| | | super.setIndex(index); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return ä¸çº§çåç§° |
| | | */ |
| | | public String getParentName() { |
| | | return parentName; |
| | | return super.getParentName(); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param parentName ä¸çº§çåç§° |
| | | */ |
| | | public void setParentName(String parentName) { |
| | | this.parentName = parentName; |
| | | super.setParentName(parentName); |
| | | } |
| | | |
| | | public String getParentBtmName() { |
| | | return parentBtmName; |
| | | return super.getParentBtmName(); |
| | | } |
| | | |
| | | public void setParentBtmName(String parentBtmName) { |
| | | this.parentBtmName = parentBtmName; |
| | | super.setParentBtmName(parentBtmName); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (node.getOid().equalsIgnoreCase(childnode.getParentId())) { |
| | | childnode.setParentName(node.getText()); |
| | | if(StringUtils.isBlank(childnode.getParentBtmName())){ |
| | | childnode.setParentBtmName(node.getAttributes().getOrDefault("btmname","")); |
| | | childnode.setParentBtmName((String)node.getAttributes().getOrDefault("btmname","")); |
| | | } |
| | | node.getChildren().add(childnode); |
| | | } |
| | |
| | | node.setLeaf(false); |
| | | }else { |
| | | node.setLeaf(true); |
| | | |
| | | |
| | | } |
| | | this.getChildren().add(node); |
| | | } |
| | |
| | | |
| | | |
| | | public Object getData() { |
| | | return data; |
| | | return super.getData(); |
| | | } |
| | | |
| | | public void setData(Object data) { |
| | | this.data = data; |
| | | super.setData(data); |
| | | } |
| | | |
| | | public int getLevel() { |
| | | return level; |
| | | return super.getLevel(); |
| | | } |
| | | |
| | | public void setLevel(int level) { |
| | | this.level = level; |
| | | super.setLevel(level); |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Tree{" + |
| | | "oid='" + oid + '\'' + |
| | | ", text='" + text + '\'' + |
| | | ", leaf=" + leaf + |
| | | ", showCheckbox=" + showCheckbox + |
| | | ", checked=" + checked + |
| | | ", children=" + children + |
| | | ", level=" + level + |
| | | ", icon='" + icon + '\'' + |
| | | ", iconCls='" + iconCls + '\'' + |
| | | ", parentId='" + parentId + '\'' + |
| | | ", parentName='" + parentName + '\'' + |
| | | ", parentBtmName='" + parentBtmName + '\'' + |
| | | ", expanded=" + expanded + |
| | | ", href='" + href + '\'' + |
| | | ", index='" + index + '\'' + |
| | | ", data=" + data + |
| | | "oid='" + super.getOid() + '\'' + |
| | | ", text='" + super.getText() + '\'' + |
| | | ", leaf=" + super.isLeaf() + |
| | | ", showCheckbox=" + super.isShowCheckbox() + |
| | | ", checked=" + super.isChecked() + |
| | | ", children=" + this.getChildren() + |
| | | ", level=" + super.getLevel() + |
| | | ", icon='" + super.getIcon() + '\'' + |
| | | ", iconCls='" + super.getIconCls() + '\'' + |
| | | ", parentId='" + super.getParentId() + '\'' + |
| | | ", parentName='" + super.getParentBtmName() + '\'' + |
| | | ", parentBtmName='" + super.getParentBtmName() + '\'' + |
| | | ", expanded=" + super.isExpanded() + |
| | | ", href='" + super.getHref() + '\'' + |
| | | ", index='" + super.getIndex() + '\'' + |
| | | ", data=" + super.getData() + |
| | | ", attributes=" + attributes + |
| | | '}'; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.starter.web.pagemodel; |
| | | |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ludc |
| | | * @date 2024/11/27 16:34 |
| | | */ |
| | | @Data |
| | | public class UIDataTree extends BaseTree implements java.io.Serializable{ |
| | | |
| | | /** |
| | | * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ |
| | | * @serial åºååå¼ |
| | | */ |
| | | private static final long serialVersionUID = 6886695271635257212L; |
| | | |
| | | /** |
| | | * æé 彿° |
| | | */ |
| | | public UIDataTree(){ |
| | | |
| | | } |
| | | |
| | | /** |
| | | * æé 彿° |
| | | * @param oid ä¸»é® |
| | | * @param text æ èç¹ææ¬ |
| | | */ |
| | | public UIDataTree(String oid, String text){ |
| | | setOid(oid); |
| | | setText(text); |
| | | } |
| | | |
| | | /** |
| | | * æé 彿° |
| | | * @param oid ä¸»é® |
| | | * @param text æ èç¹ææ¬ |
| | | */ |
| | | public UIDataTree(String oid, String text,Object o){ |
| | | setOid(oid); |
| | | setText(text); |
| | | setData(o); |
| | | } |
| | | |
| | | /** |
| | | * å
¶ä»ç屿§ |
| | | */ |
| | | private Map<String,Object> attributes = new HashMap<>(); |
| | | |
| | | /** |
| | | * åèç¹ |
| | | */ |
| | | private List<UIDataTree> children = new ArrayList<>(); |
| | | |
| | | /** |
| | | * è·åä¸»é® |
| | | * @return 主é®çå¼ |
| | | */ |
| | | public String getOid() { |
| | | return super.getOid(); |
| | | } |
| | | |
| | | /** |
| | | * è®¾ç½®ä¸»é® |
| | | * @param oid 主é®çå¼ |
| | | */ |
| | | public void setOid(String oid) { |
| | | super.setOid(oid); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ èç¹ææ¬ |
| | | * @return æ èç¹ææ¬ |
| | | */ |
| | | public String getText() { |
| | | return super.getText(); |
| | | } |
| | | |
| | | /** |
| | | * 设置æ èç¹ææ¬ |
| | | * @param text æ èç¹ææ¬ |
| | | */ |
| | | public void setText(String text) { |
| | | super.setText(text); |
| | | } |
| | | |
| | | /** |
| | | * 设置ç¼å· |
| | | * @param id |
| | | */ |
| | | public void setId(String id) { |
| | | super.setId(id); |
| | | } |
| | | |
| | | /** |
| | | * è·åç¼å· |
| | | */ |
| | | public String getId() { |
| | | return super.getId(); |
| | | } |
| | | |
| | | /** |
| | | * æ¯å¦å¶åèç¹ |
| | | * @return true 表示å¶åèç¹ |
| | | */ |
| | | public boolean isLeaf() { |
| | | return super.isLeaf(); |
| | | } |
| | | |
| | | /** |
| | | * 设置å¶åèç¹ |
| | | * @param leaf æ¯å¦å¶åèç¹ |
| | | */ |
| | | public void setLeaf(boolean leaf) { |
| | | super.setLeaf(leaf); |
| | | } |
| | | |
| | | /** |
| | | * æ¯å¦æ¾ç¤ºå¤éæ¡ |
| | | * @return true表示æ¾ç¤º |
| | | */ |
| | | public boolean isShowCheckbox() { |
| | | return super.isShowCheckbox(); |
| | | } |
| | | |
| | | /** |
| | | * 设置æ¯å¦æ¾ç¤ºå¤éæ¡ |
| | | * @param showCheckbox æ¯å¦æ¾ç¤ºå¤éæ¡ |
| | | */ |
| | | public void setShowCheckbox(boolean showCheckbox) { |
| | | super.setShowCheckbox(showCheckbox); |
| | | } |
| | | |
| | | /** |
| | | * æ¯å¦èªå¨å¾éä¸ |
| | | * @return true表示éè¦èªå¨å¾é |
| | | */ |
| | | public boolean isChecked() { |
| | | return super.isChecked(); |
| | | } |
| | | |
| | | /** |
| | | * 设置æ¯å¦å¾é |
| | | * @param checked æ¯å¦èªå¨å¾é |
| | | */ |
| | | public void setChecked(boolean checked) { |
| | | super.setChecked(checked); |
| | | } |
| | | |
| | | /** |
| | | * è·ååèç¹ |
| | | * @return åèç¹å表 |
| | | */ |
| | | public List<UIDataTree> getChildren() { |
| | | return this.children; |
| | | } |
| | | |
| | | /** |
| | | * 设置åèç¹ |
| | | * @param children åèç¹å表 |
| | | */ |
| | | public void setChildren(List<UIDataTree> children) { |
| | | this.children = children; |
| | | } |
| | | |
| | | /** |
| | | * è·å徿 |
| | | * @return 徿 |
| | | */ |
| | | public String getIcon() { |
| | | return super.getIcon(); |
| | | } |
| | | |
| | | /** |
| | | * è®¾ç½®å¾æ |
| | | * @param icon 徿 |
| | | */ |
| | | public void setIcon(String icon) { |
| | | super.setIcon(icon); |
| | | } |
| | | |
| | | /** |
| | | * è·å徿 çæ¾ç¤ºcssç±» |
| | | * @return cssç±»çåç§° |
| | | */ |
| | | public String getIconCls() { |
| | | return super.getIconCls(); |
| | | } |
| | | |
| | | /** |
| | | * è®¾ç½®å¾æ çæ¾ç¤ºcssç±» |
| | | * @param iconCls cssç±»çåç§° |
| | | */ |
| | | public void setIconCls(String iconCls) { |
| | | super.setIconCls(iconCls); |
| | | } |
| | | |
| | | /** |
| | | * è·åä¸çº§ä¸»é® |
| | | * @return ä¸çº§èç¹çoid |
| | | */ |
| | | public String getParentId() { |
| | | return super.getParentId(); |
| | | } |
| | | |
| | | /** |
| | | * 设置ä¸çº§ä¸»é® |
| | | * @param parentId ä¸çº§èç¹çoid |
| | | */ |
| | | public void setParentId(String parentId) { |
| | | super.setParentId(parentId); |
| | | } |
| | | |
| | | /** |
| | | * æ¯å¦èªå¨å±å¼ |
| | | * @return true表示èªå¨å±å¼ |
| | | */ |
| | | public boolean isExpanded() { |
| | | return super.isExpanded(); |
| | | } |
| | | |
| | | /** |
| | | * 设置æ¯å¦èªå¨å±å¼ |
| | | * @param expanded æ¯å¦èªå¨å±å¼ |
| | | */ |
| | | public void setExpanded(boolean expanded) { |
| | | super.setExpanded(expanded); |
| | | } |
| | | |
| | | /** |
| | | * è·å龿¥å°å |
| | | * @return 龿¥å°å |
| | | */ |
| | | public String getHref() { |
| | | return super.getHref(); |
| | | } |
| | | |
| | | /** |
| | | * è®¾ç½®é¾æ¥å°å |
| | | * @param href 龿¥å°å |
| | | */ |
| | | public void setHref(String href) { |
| | | super.setHref(href); |
| | | } |
| | | |
| | | /** |
| | | * è·åæåºå· |
| | | * @return æåºå· |
| | | */ |
| | | public String getIndex() { |
| | | return super.getIndex(); |
| | | } |
| | | |
| | | /** |
| | | * 设置æåºå· |
| | | * @param index æåºå· |
| | | */ |
| | | public void setIndex(String index) { |
| | | super.setIndex(index); |
| | | } |
| | | |
| | | /** |
| | | * è·åæ èç¹æä»£çä¸å¡æ°æ®çææå±æ§æ å° |
| | | * @return keyè¡¨ç¤ºå±æ§çåç§°ï¼valueè¡¨ç¤ºå±æ§çå¼ |
| | | */ |
| | | public Map<String, Object> getAttributes() { |
| | | return attributes; |
| | | } |
| | | |
| | | /** |
| | | * 设置æ èç¹æä»£çä¸å¡æ°æ®çææå±æ§æ å° |
| | | * @param attributes keyè¡¨ç¤ºå±æ§çåç§°ï¼valueè¡¨ç¤ºå±æ§çå¼ |
| | | */ |
| | | public void setAttributes(Map<String, Object> attributes) { |
| | | this.attributes = attributes; |
| | | } |
| | | |
| | | /** |
| | | * è·åä¸çº§çèç¹çåç§° |
| | | * @return ä¸çº§çåç§° |
| | | */ |
| | | public String getParentName() { |
| | | return super.getParentName(); |
| | | } |
| | | |
| | | /** |
| | | * 设置ä¸çº§èç¹çåç§° |
| | | * @param parentName ä¸çº§çåç§° |
| | | */ |
| | | public void setParentName(String parentName) { |
| | | super.setParentName(parentName); |
| | | } |
| | | |
| | | public String getParentBtmName() { |
| | | return super.getParentBtmName(); |
| | | } |
| | | |
| | | public void setParentBtmName(String parentBtmName) { |
| | | super.setParentBtmName(parentBtmName); |
| | | } |
| | | |
| | | /** |
| | | * å©ç¨éå½å°æ 转æ¢ä¸ºä¸ä¸çº§å
³ç³» |
| | | * @param rootTree é¡¶å±èç¹ |
| | | * @param children åèç¹ |
| | | * @return 嫿ä¸ä¸çº§å
³ç³»çæ |
| | | */ |
| | | public static List<UIDataTree> getChildList(List<UIDataTree> rootTree, List<UIDataTree> children){ |
| | | if(rootTree == null ||rootTree.size() == 0){ |
| | | if(children !=null && children.size()>0){ |
| | | rootTree = children.subList(0, children.size()); |
| | | }else{ |
| | | return null; |
| | | } |
| | | } |
| | | UIDataTree bt = new UIDataTree(); |
| | | bt.findChild(rootTree, children); |
| | | return rootTree; |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ çä¸çº§ |
| | | * @param treenode å½åèç¹ |
| | | * @param children å
¶ä»çèç¹ |
| | | */ |
| | | public void findChild(List<UIDataTree> treenode, List<UIDataTree> children){ |
| | | for (UIDataTree node : treenode) { |
| | | for (UIDataTree childnode : children) { |
| | | if (node.getOid().equalsIgnoreCase(childnode.getParentId())) { |
| | | childnode.setParentName(node.getText()); |
| | | if(StringUtils.isBlank(childnode.getParentBtmName())){ |
| | | childnode.setParentBtmName((String)node.getAttributes().getOrDefault("btmname","")); |
| | | } |
| | | node.getChildren().add(childnode); |
| | | } |
| | | } |
| | | if (node.getChildren().size()>0) { |
| | | findChild(node.getChildren(), children); |
| | | node.setLeaf(false); |
| | | }else { |
| | | node.setLeaf(true); |
| | | |
| | | } |
| | | this.getChildren().add(node); |
| | | } |
| | | } |
| | | |
| | | |
| | | public Object getData() { |
| | | return super.getData(); |
| | | } |
| | | |
| | | public void setData(Object data) { |
| | | super.setData(data); |
| | | } |
| | | |
| | | public int getLevel() { |
| | | return super.getLevel(); |
| | | } |
| | | |
| | | public void setLevel(int level) { |
| | | super.setLevel(level); |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "UIDataTree{" + |
| | | "oid='" + this.getOid() + '\'' + |
| | | ", text='" + this.getText() + '\'' + |
| | | ", leaf=" + this.isLeaf() + |
| | | ", showCheckbox=" + this.isShowCheckbox() + |
| | | ", checked=" + this.isChecked() + |
| | | ", children=" + this.getChildren() + |
| | | ", level=" + this.getLevel() + |
| | | ", icon='" + this.getIcon() + '\'' + |
| | | ", iconCls='" + this.getIconCls() + '\'' + |
| | | ", parentId='" + this.getParentId() + '\'' + |
| | | ", parentName='" + this.getParentBtmName() + '\'' + |
| | | ", parentBtmName='" + this.getParentBtmName() + '\'' + |
| | | ", expanded=" + this.isExpanded() + |
| | | ", href='" + this.getHref() + '\'' + |
| | | ", index='" + this.getIndex() + '\'' + |
| | | ", data=" + this.getData() + |
| | | ", attributes=" + attributes + |
| | | '}'; |
| | | } |
| | | |
| | | } |
| | |
| | | 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); |
| | | } |
| | | |
| | | /** |
| | |
| | | return name; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸å¡ç±»åè·åè¡¨æ ¼åç§° |
| | | * @param btmname ä¸å¡ç±»åï¼å¹¶ä¸ä¸è½æ¯è§å¾ |
| | |
| | | * @param replaceMap ä½¿ç¨æ¿æ¢çæ°æ®æº |
| | | * @return æ¿æ¢åçå¼ |
| | | */ |
| | | public static String replaceByFreeMarker(String freemarker,Map<String,String> replaceMap){ |
| | | public static String replaceByFreeMarker(String freemarker,Map<String,Object> replaceMap){ |
| | | if(StringUtils.isBlank(freemarker)){ |
| | | return ""; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 使ç¨å½åç¨æ·çç±»åæ¥è¯¢ç¨æ· |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | @RequestMapping(value = "/listUserByUserType",method = RequestMethod.GET) |
| | | public BaseResult<List<SmUserVO>> listUserByUserType() throws VciBaseException{ |
| | | try { |
| | | List<SmUserVO> smUserVOList = userQueryService.listUserByUserType(); |
| | | return BaseResult.dataList(smUserVOList); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "éè¿å½åç¨æ·çç±»åæ¥è·åç¨æ·æ°æ®æ¶åºç°é误ï¼åå ï¼" + VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | return BaseResult.fail(exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 使ç¨è§è²è·åä¸å¨æä¸ªè§è²ä¸çç¨æ·åç
§å表 |
| | | * @param pkRole è§è²ç主é®ï¼ä¸è½ä¸ºç©º |
| | |
| | | * @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); |
| | |
| | | //èç项ç®ä¾ç¶æ¯æ·»å try catchï¼æ¹æ³é䏿åºå¼å¸¸ |
| | | //BaseResult.fail("è¿éè¿åå端çé误信æ¯"); |
| | | } |
| | | |
| | | |
| | | } |
ÎļþÃû´Ó 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); |
| | | |
| | | /** |
| | | * 使ç¨å½åç¨æ·çç±»åæ¥è¯¢ç¨æ· |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | List<SmUserVO> listUserByUserType() throws PLException; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | List<BusinessObject> queryCBOByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, String> replaceMap) throws VciBaseException; |
| | | List<BusinessObject> queryCBOByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, Object> replaceMap) throws VciBaseException; |
| | | |
| | | /** |
| | | * ä½¿ç¨æ¥è¯¢æ¹æ¡æ¥æ¥è¯¢æ°æ®ï¼è¿åCBOï¼æ¯æå页 |
| | |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | List<BusinessObject> queryCBOByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, String> replaceMap, PageHelper ph) throws VciBaseException; |
| | | List<BusinessObject> queryCBOByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, Object> replaceMap, PageHelper ph) throws VciBaseException; |
| | | |
| | | /** |
| | | * 使ç¨ååè·åæ¥è¯¢æ¨¡æ¿ |
| | |
| | | * @return æ¥è¯¢æ¨¡æ¿ |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | QueryTemplate getQtByName(String name, Map<String, String> replaceMap) throws VciBaseException; |
| | | QueryTemplate getQtByName(String name, Map<String, Object> replaceMap) throws VciBaseException; |
| | | |
| | | /** |
| | | * ä½¿ç¨æ¥è¯¢æ¹æ¡æ¥æ¥è¯¢æ°æ®ï¼è¿åCBOï¼æ¯æèªå®ä¹æ¥è¯¢å段ï¼å
æ¬åç
§åæä¸¾;åç
§å段使ç¨xxx.yy;æä¸¾å段使ç¨xxx_enumCode |
| | |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | List<BusinessObject> queryCBOByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, String> replaceMap, PageHelper ph, List<String> clauseList) throws VciBaseException; |
| | | List<BusinessObject> queryCBOByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, Object> replaceMap, PageHelper ph, List<String> clauseList) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ°é |
| | |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | int queryCountByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, String> replaceMap) throws VciBaseException; |
| | | int queryCountByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, Object> replaceMap) throws VciBaseException; |
| | | |
| | | /** |
| | | * 使ç¨å¯¹è±¡æ¥æ¥è¯¢æ°é |
| | |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | <T> List<T> queryObjectByScheme(String queryScheme, Class<T> c, Map<String, String> conditionMap, PageHelper ph, Map<String, String> replaceMap) throws VciBaseException; |
| | | <T> List<T> queryObjectByScheme(String queryScheme, Class<T> c, Map<String, String> conditionMap, PageHelper ph, Map<String, Object> replaceMap) throws VciBaseException; |
| | | |
| | | /** |
| | | * ä¿åæ°æ®ï¼å¯ä»¥å¨requestä¸è®¾ç½®æ¯å¦æä¹
å |
| | |
| | | * @return åè¡¨æ°æ®ï¼æ°æ®æ¯Mapå½¢å¼çï¼å
å«åé¡µä¿¡æ¯ |
| | | * @throws VciBaseException |
| | | */ |
| | | DataGrid queryGridByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, String> replaceMap) throws VciBaseException; |
| | | DataGrid queryGridByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, Object> replaceMap) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ ¹æ®æ¥è¯¢æ¹æ¡æ¥æ¥è¯¢åè¡¨æ°æ®ï¼å¯ä»¥å¨pageHelperä¸è®¾ç½®æ¯å¦æ¥è¯¢æ»æ°ï¼pageHelperçä¼å
级æå¤§ï¼ |
| | |
| | | * @return åè¡¨æ°æ®ï¼æ°æ®æ¯Mapå½¢å¼çï¼å
å«åé¡µä¿¡æ¯ |
| | | * @throws VciBaseException |
| | | */ |
| | | DataGrid queryGridByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, String> replaceMap, PageHelper ph) throws VciBaseException; |
| | | DataGrid queryGridByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, Object> replaceMap, PageHelper ph) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ ¹æ®æ¥è¯¢æ¹æ¡æ¥æ¥è¯¢åè¡¨æ°æ®ï¼å¯ä»¥èªå®ä¹æ¥è¯¢çåï¼å
æ¬åç
§åæä¸¾ |
| | |
| | | * @return åè¡¨æ°æ®ï¼æ°æ®æ¯Mapå½¢å¼çï¼å
å«åé¡µä¿¡æ¯ |
| | | * @throws VciBaseException |
| | | */ |
| | | DataGrid queryGridByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, String> replaceMap, PageHelper ph, List<String> clauseList) throws VciBaseException; |
| | | DataGrid queryGridByScheme(String queryScheme, Map<String, String> conditionMap, Map<String, Object> replaceMap, PageHelper ph, List<String> clauseList) throws VciBaseException; |
| | | |
| | | /** |
| | | * æ¥è¯¢å¯¹è±¡çåè¡¨æ°æ® |
| | |
| | | * @return åè¡¨æ°æ®ï¼æ°æ®æ¯å¯¹è±¡å½¢å¼çï¼å
å«åé¡µä¿¡æ¯ |
| | | * @throws VciBaseException |
| | | */ |
| | | DataGrid queryGridClassByScheme(String queryScheme, Class c, Map<String, String> conditionMap, Map<String, String> replaceMap) throws VciBaseException; |
| | | DataGrid queryGridClassByScheme(String queryScheme, Class c, Map<String, String> conditionMap, Map<String, Object> replaceMap) throws VciBaseException; |
| | | |
| | | /** |
| | | * éè¿æ¥è¯¢æ¹æ¡æ¥è¯¢å¯¹è±¡çåè¡¨æ°æ® |
| | |
| | | * @return åè¡¨æ°æ®ï¼æ°æ®æ¯å¯¹è±¡å½¢å¼çï¼å
å«åé¡µä¿¡æ¯ |
| | | * @throws VciBaseException |
| | | */ |
| | | DataGrid queryGridClassByScheme(String queryScheme, Class c, Map<String, String> conditionMap, Map<String, String> replaceMap, PageHelper ph) throws VciBaseException; |
| | | DataGrid queryGridClassByScheme(String queryScheme, Class c, Map<String, String> conditionMap, Map<String, Object> replaceMap, PageHelper ph) throws VciBaseException; |
| | | |
| | | /** |
| | | * BusinessObject 转为HashMap |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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; |
| | | |
| | | public interface WebLoServiceI { |
| | | |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®æ¥è¯¢æ¡ä»¶æ¥æ¥è¯¢é¾æ¥ç±»å |
| | |
| | | */ |
| | | 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 clol 龿¥ç±»å |
| | |
| | | * @param linkTypeDataQuery æ¥è¯¢å¯¹è±¡ |
| | | * @return 龿¥ç±»ååå
³èçto端 |
| | | */ |
| | | List<com.vci.corba.query.data.BOAndLO> queryCLOAndBOBySchema(UILinkTypeDataQuery linkTypeDataQuery) ; |
| | | List<BOAndLO> queryCLOAndBOBySchema(UILinkTypeDataQuery linkTypeDataQuery) ; |
| | | |
| | | /** |
| | | * 使ç¨é¾æ¥ç±»åçåç§°æ¥è¯¢ 龿¥ç±»åçto端çä¸å¡ç±»å |
| | | * @param linkTypeDataQuery æ¥è¯¢ç对象 |
| | | * @return 龿¥å¯¹è±¡åto端ä¸å¡å¯¹è±¡ |
| | | */ |
| | | List<com.vci.corba.query.data.BOAndLO> queryCLOAndBoByLinkType(UILinkTypeDataQuery linkTypeDataQuery); |
| | | List<BOAndLO> queryCLOAndBoByLinkType(UILinkTypeDataQuery linkTypeDataQuery); |
| | | |
| | | /** |
| | | * æ¥è¯¢å表 |
| | |
| | | * @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)); |
| | |
| | | //ä¸ä¸ |
| | | smUserVO.setSpecialties(userInfo.specialties); |
| | | UserLogonInfo lockObj = platformClientUtil.getFrameworkService().fetchUserLogonObj(userInfo.id); |
| | | smUserVO.setLockFlag(lockObj.plWrongNum == 0); |
| | | smUserVO.setLockFlag(lockObj.plWrongNum != 0); |
| | | smUserVO.setCreator(userInfo.createUser); |
| | | smUserVO.setCreateTime(VciDateUtil.long2Date(userInfo.createTime)); |
| | | smUserVO.setLastModifier(userInfo.updateUser); |
| | |
| | | */ |
| | | 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; |
| | |
| | | return userNameList; |
| | | } |
| | | |
| | | /** |
| | | * 使ç¨å½åç¨æ·çç±»åæ¥è¯¢ç¨æ· |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | @Override |
| | | public List<SmUserVO> listUserByUserType() throws PLException { |
| | | try { |
| | | UserInfo[] userInfo = platformClientUtil.getFrameworkService().fetchUserInfoByType(Short.parseShort(WebUtil.getCurrentUserSessionInfo().getUsertype())); |
| | | return userInfoArr2VO(userInfo); |
| | | } catch (PLException e) { |
| | | throw new VciBaseException("ç»å½æ¶ï¼è·åç¨æ·ä¿¡æ¯å¤±è´¥ï¼"+e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | } |
ÎļþÃû´Ó 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 List<BusinessObject> queryCBOByScheme(String queryScheme, |
| | | Map<String, String> conditionMap, Map<String, String> replaceMap) |
| | | Map<String, String> conditionMap, Map<String, Object> replaceMap) |
| | | throws VciBaseException { |
| | | PageHelper ph = new PageHelper(-1); |
| | | return queryCBOByScheme(queryScheme,conditionMap,replaceMap,ph); |
| | |
| | | */ |
| | | @Override |
| | | public List<BusinessObject> queryCBOByScheme(String queryScheme, |
| | | Map<String, String> conditionMap, Map<String, String> replaceMap, |
| | | Map<String, String> conditionMap, Map<String, Object> replaceMap, |
| | | PageHelper ph) throws VciBaseException { |
| | | List<String> clauseList = new ArrayList<String>(); |
| | | clauseList.add("*"); |
| | |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public QueryTemplate getQtByName(String name, Map<String, String> replaceMap) throws VciBaseException{ |
| | | public QueryTemplate getQtByName(String name, Map<String, Object> replaceMap) throws VciBaseException{ |
| | | QueryTemplate qt = null; |
| | | try{ |
| | | VciBaseUtil.alertNotNull(name,"æ¥è¯¢æ¨¡æ¿çåç§°"); |
| | |
| | | //å 为ä¹åå¹³å°çTool.replaceQTValues 没æå¤ç ${xxx}ãï¼ ä¸ºäºå¿½ç¥å¤§å°åï¼æä»¬è¿éåç¬å¤ç weidy@2021-3-10 |
| | | //æä»¬è½¬æ¢ä¸ºå°å |
| | | Condition condition = qt.getCondition(); |
| | | Map<String,String> replaceLowMap = new HashMap<>(); |
| | | Map<String,Object> replaceLowMap = new HashMap<>(); |
| | | if(condition !=null && condition.getCIMap()!=null){ |
| | | // Map<String, String> systemVarValueMap = VciSystemVarConstants.getSystemVarValueMap(); |
| | | //转å°å |
| | | if(!CollectionUtils.isEmpty(replaceMap)){ |
| | | replaceMap.forEach((key,value)->{ |
| | | replaceLowMap.put(key.toLowerCase(),value); |
| | |
| | | * @param qt |
| | | * @param replaceLowMap |
| | | */ |
| | | private void recurReplaceCiMap(QueryTemplate qt, Map<String,String> replaceLowMap){ |
| | | private void recurReplaceCiMap(QueryTemplate qt, Map<String,Object> replaceLowMap){ |
| | | //è·³åºéå½ |
| | | if(Func.isEmpty(qt)){ |
| | | return; |
| | |
| | | } |
| | | } |
| | | }else if(replaceLowMap.containsKey(value.toLowerCase())){ |
| | | lInfo.getValue().setOrdinaryValue(replaceLowMap.get(value.toLowerCase())); |
| | | lInfo.getValue().setOrdinaryValue((String) replaceLowMap.get(value.toLowerCase())); |
| | | } |
| | | }else { |
| | | recurReplaceCiMap(lInfo.getValue().getQueryTemplate(),replaceLowMap); |
| | |
| | | */ |
| | | @Override |
| | | public List<BusinessObject> queryCBOByScheme(String queryScheme, |
| | | Map<String, String> conditionMap, Map<String, String> replaceMap, |
| | | Map<String, String> conditionMap, Map<String, Object> replaceMap, |
| | | PageHelper ph, List<String> clauseList) throws VciBaseException { |
| | | QueryTemplate qt = getQtByName(queryScheme,replaceMap); |
| | | return baseQueryCBO(qt,conditionMap,ph,clauseList); |
| | |
| | | */ |
| | | @Override |
| | | public int queryCountByScheme(String queryScheme, |
| | | Map<String, String> conditionMap, Map<String, String> replaceMap) |
| | | Map<String, String> conditionMap, Map<String, Object> replaceMap) |
| | | throws VciBaseException { |
| | | QueryTemplate qt = getQtByName(queryScheme,replaceMap); |
| | | return baseQueryCount(qt,conditionMap); |
| | |
| | | @Override |
| | | public <T> List<T> queryObjectByScheme(String queryScheme, Class<T> c, |
| | | Map<String, String> conditionMap, PageHelper ph, |
| | | Map<String, String> replaceMap) throws VciBaseException { |
| | | Map<String, Object> replaceMap) throws VciBaseException { |
| | | WebUtil.alertNotNull(queryScheme,"æ¥è¯¢æ¹æ¡"); |
| | | //ç´æ¥ä»å¯¹è±¡é廿¥è¯¢ä¸å¡ç±»åçåç§° |
| | | swapConditionMap(c,conditionMap); |
| | |
| | | */ |
| | | @Override |
| | | public DataGrid queryGridByScheme(String queryScheme, |
| | | Map<String, String> conditionMap, Map<String, String> replaceMap) |
| | | Map<String, String> conditionMap, Map<String, Object> replaceMap) |
| | | throws VciBaseException { |
| | | return queryGridByScheme(queryScheme,conditionMap,replaceMap,new PageHelper(-1,true),null); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public DataGrid queryGridByScheme(String queryScheme, |
| | | Map<String, String> conditionMap, Map<String, String> replaceMap, |
| | | Map<String, String> conditionMap, Map<String, Object> replaceMap, |
| | | PageHelper ph) throws VciBaseException { |
| | | return queryGridByScheme(queryScheme,conditionMap,replaceMap,ph,null); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public DataGrid queryGridByScheme(String queryScheme, |
| | | Map<String, String> conditionMap, Map<String, String> replaceMap, |
| | | Map<String, String> conditionMap, Map<String, Object> replaceMap, |
| | | PageHelper ph, List<String> clauseList) throws VciBaseException { |
| | | if(ph == null){ |
| | | ph = new PageHelper(-1,true); |
| | |
| | | */ |
| | | @Override |
| | | public DataGrid queryGridClassByScheme(String queryScheme, Class c, |
| | | Map<String, String> conditionMap,Map<String,String> replaceMap) throws VciBaseException { |
| | | Map<String, String> conditionMap,Map<String,Object> replaceMap) throws VciBaseException { |
| | | return queryGridClassByScheme(queryScheme,c,conditionMap,replaceMap,new PageHelper(-1,true)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public DataGrid queryGridClassByScheme(String queryScheme, Class c, |
| | | Map<String, String> conditionMap, Map<String,String> replaceMap,PageHelper ph) |
| | | Map<String, String> conditionMap, Map<String,Object> replaceMap,PageHelper ph) |
| | | throws VciBaseException { |
| | | if(ph == null){ |
| | | ph = new PageHelper(-1,true); |
| | |
| | | public Map cbo2Map(BusinessObject cbo) throws VciBaseException { |
| | | Map<String,String> map = new HashMap<String, String>(); |
| | | WebUtil.copyValueToMapFromCbos(cbo, map); |
| | | return map; |
| | | //TODOï¼20241128 è¿æ»¤æç©ºkeyå空value |
| | | Map<String, Object> filteredCbo2Map = map.entrySet() |
| | | .stream() |
| | | .filter(entry -> entry.getKey() != null && !entry.getKey().isEmpty() && entry.getValue() != null && !entry.getValue().toString().isEmpty()) |
| | | .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); |
| | | return filteredCbo2Map; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * map转为BusinessObject |
| | |
| | | @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, |
| | |
| | | public Map clo2Map(LinkObject clo) throws VciBaseException { |
| | | Map<String,String> map = new HashMap<String, String>(); |
| | | WebUtil.copyValueToMapFromClos(clo, map); |
| | | return map; |
| | | //TODO:20241128 è¿æ»¤æç©ºkeyå空value |
| | | Map<String, Object> filteredClo2Map = map.entrySet() |
| | | .stream() |
| | | .filter(entry -> entry.getKey() != null && !entry.getKey().isEmpty() && entry.getValue() != null && !entry.getValue().toString().isEmpty()) |
| | | .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); |
| | | return filteredClo2Map; |
| | | } |
| | | |
| | | @Override |
| | |
| | | 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; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.controller; |
| | | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.framework.data.GrandValue; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.web.service.OsDataAuthServiceI; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ°æ®æéçæ§å¶å¨ |
| | | * @author yuxc |
| | | * @date 2024-11-25 |
| | | */ |
| | | @RequestMapping("/dataAuthController") |
| | | @RestController |
| | | public class OsDataAuthController { |
| | | |
| | | /** |
| | | * æ°æ®æéæå¡ |
| | | */ |
| | | @Autowired |
| | | private OsDataAuthServiceI osDataAuthServiceI; |
| | | |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * è·åå½åä¸å¡ç±»åä¸çæ°æ®æéç¸å
³ä¿¡æ¯ |
| | | * @return æ°æ® |
| | | */ |
| | | @GetMapping("/getData") |
| | | public BaseResult getData(String typeName){ |
| | | try { |
| | | return osDataAuthServiceI.getData(typeName); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¿åæ°æ®æéæ°æ® |
| | | * @return ä¿åç»æ |
| | | */ |
| | | @PostMapping("/saveGrand") |
| | | public BaseResult saveGrand(@RequestBody List<GrandValue> grandValues){ |
| | | try { |
| | | return osDataAuthServiceI.saveGrand(grandValues); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "ä¿åæ°æ®æéæ¶åºç°é误ï¼åå ï¼" + VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | return BaseResult.fail(exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å 餿°æ®æé |
| | | * @param typeName ä¸å¡ç±»å |
| | | * @param ruleName è§ååç§° |
| | | * @return å é¤ç»æ |
| | | */ |
| | | @DeleteMapping("/deleteTypeRuleGrand") |
| | | public BaseResult deleteTypeRuleGrand(String typeName,String ruleName){ |
| | | try { |
| | | return osDataAuthServiceI.deleteTypeRuleGrand(typeName,ruleName); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "å 餿°æ®æéæ¶åºç°é误ï¼åå ï¼" + VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | return BaseResult.fail(exceptionMessage); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | 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.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.LangBaseUtil; |
| | | import com.vci.starter.web.util.MessageUtils; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.WebThreadLocalUtil; |
| | | import com.vci.bo.LoginResultBO; |
| | | import com.vci.dto.LoginUserDTO; |
| | | 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 org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.Cookie; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.security.Principal; |
| | | import java.util.Enumeration; |
| | | import java.util.HashMap; |
| | | 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()); |
| | |
| | | |
| | | 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.framework.data.GrandValue; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ°æ®æéçæ§å¶å¨ |
| | | * @author yuxc |
| | | * @date 2024-11-25 |
| | | */ |
| | | public interface OsDataAuthServiceI { |
| | | |
| | | BaseResult getData(String typeName) throws PLException; |
| | | /** |
| | | * ä¿åæ°æ®æéæ°æ® |
| | | * @return ä¿åç»æ |
| | | */ |
| | | BaseResult saveGrand(List<GrandValue> grandValues) throws PLException; |
| | | |
| | | /** |
| | | * å 餿°æ®æé |
| | | * @param typeName ä¸å¡ç±»å |
| | | * @param ruleName è§ååç§° |
| | | * @return å é¤ç»æ |
| | | */ |
| | | BaseResult deleteTypeRuleGrand(String typeName, String ruleName) throws PLException; |
| | | } |
| | |
| | | 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; |
| | |
| | | * @return æ å½¢æ°æ® |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | List<Tree> getDataForTree(UITreeQuery treeQuery) throws VciBaseException, PLException; |
| | | List<UIDataTree> getDataForTree(UITreeQuery treeQuery) throws Exception; |
| | | |
| | | /** |
| | | * è·åæ å½¢æ°æ®(æ ¹æ®æ¥è¯¢æ¨¡æ¿æ¥è¯¢å¯¹è±¡) |
| | |
| | | * @return æ å½¢æ°æ® |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | BaseResult getDataByTemp(UITreeQuery treeQuery) throws VciBaseException, PLException; |
| | | BaseResult getDataByTemp(UITreeQuery treeQuery) throws Exception; |
| | | |
| | | /** |
| | | * è°ç¨åç½®äºä»¶ |
| | |
| | | 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; |
| | |
| | | vo.setTableName(VciBaseUtil.getTableName(vo.getId())); |
| | | vo.setInputRevisionFlag(btmItem.revInput); |
| | | vo.setDelimiter(btmItem.delimiter); |
| | | vo.setImageName(btmItem.imageName); |
| | | vo.setfName(btmItem.fName); |
| | | vo.setVersionRule(String.valueOf(btmItem.verRuleName)); |
| | | if (StringUtils.isNotBlank(vo.getRevisionRuleId()) || vo.isInputRevisionFlag()) { |
| | |
| | | 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()); |
| | |
| | | }); |
| | | attrVOs = finalAttrVOs; |
| | | } |
| | | return attrVOs; |
| | | //// TODO: 2024/12/2 Ludc è¿åå¼æåº |
| | | return attrVOs.stream().sorted(Comparator.comparing(o->o.getId(),String.CASE_INSENSITIVE_ORDER)).collect(Collectors.toList()); |
| | | } |
| | | |
| | | /** |
| | |
| | | tree.setParentName(null); |
| | | tree.setParentId(null); |
| | | tree.setLeaf(true); |
| | | tree.setIcon(osBtmTypeVO.getImageName()); |
| | | tree.setId(osBtmTypeVO.getId()); |
| | | tree.setText(osBtmTypeVO.getDescription()); |
| | | tree.setAttributes(WebUtil.objectToMapString(osBtmTypeVO)); |
| | |
| | | bizType.label = dto.getName(); |
| | | bizType.fName = dto.getfName(); |
| | | bizType.implClass = dto.getImplClass(); |
| | | bizType.imageName = dto.getImageName(); |
| | | bizType.shape = ""; |
| | | bizType.lifeCycle = dto.getLifeCycleId(); |
| | | List<String> lcList = Arrays.asList(dto.getSubLifeCycleId().split(",")); |
| | |
| | | bizType.revLevel = dto.getRevLevel(); |
| | | bizType.revRuleName = dto.getRevisionRuleId(); |
| | | bizType.revInput = dto.isInputRevisionFlag(); |
| | | |
| | | bizType.delimiter = (dto.getDelimiter() == null ? "" : dto.getDelimiter()); |
| | | |
| | | bizType.verRuleName = Func.isBlank(dto.getVersionRule()) ? 0 : Short.parseShort(dto.getVersionRule()); |
| | | |
| | | //bizType.imageName = dto.get; |
| | | //List<String> attrIdList = dto.getAttributesDTOList().stream().map(OsBtmTypeLinkAttributesDTO::getId).collect(Collectors.toList()); |
| | | |
| | | bizType.apNameArray = dto.getApNameArray().split(",");//attrIdList.toArray(new String[attrIdList.size()]); |
| | | String userId = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(); |
| | | long timeMillis = System.currentTimeMillis(); |
| | |
| | | //设置åå |
| | | List<String> columns = new ArrayList<>( |
| | | Arrays.asList("ç±»ååç§°", "æ ç¾", "ç»§æ¿èª", "å®ç°ç±»", "æè¿°", "çæ¬è§å", "çæ¬å·è§å", |
| | | "æ¯å¦æå·¥è¾å
¥", "åé符", "çæ¬¡å·è§å", "çå½å¨æ", "å¤éçå½å¨æå表", "屿§å表") |
| | | "æ¯å¦æå·¥è¾å
¥", "åé符", "çæ¬¡å·è§å","徿 ", "çå½å¨æ", "å¤éçå½å¨æå表", "屿§å表") |
| | | ); |
| | | try { |
| | | new File(excelPath).createNewFile(); |
| | |
| | | excelDataList.add(new WriteExcelData(i + 1, 7, bizType.revInput)); |
| | | excelDataList.add(new WriteExcelData(i + 1, 8, bizType.delimiter)); |
| | | excelDataList.add(new WriteExcelData(i + 1, 9, bizType.verRuleName)); |
| | | excelDataList.add(new WriteExcelData(i + 1, 10, bizType.lifeCycle)); |
| | | excelDataList.add(new WriteExcelData(i + 1, 11, String.join(",", bizType.lifeCycles))); |
| | | excelDataList.add(new WriteExcelData(i + 1, 12, String.join(",", bizType.apNameArray))); |
| | | excelDataList.add(new WriteExcelData(i + 1, 10, bizType.imageName)); |
| | | excelDataList.add(new WriteExcelData(i + 1, 11, bizType.lifeCycle)); |
| | | excelDataList.add(new WriteExcelData(i + 1, 12, String.join(",", bizType.lifeCycles))); |
| | | excelDataList.add(new WriteExcelData(i + 1, 13, String.join(",", bizType.apNameArray))); |
| | | attributes.addAll(Arrays.asList(bizType.apNameArray)); |
| | | i++; |
| | | } |
| | |
| | | bizType.revInput = Boolean.parseBoolean(osBtmTypePO.getRevInput().toLowerCase(Locale.ROOT)); |
| | | bizType.delimiter = osBtmTypePO.getDelimiter(); |
| | | bizType.verRuleName = osBtmTypePO.getVerRuleName(); |
| | | bizType.imageName = osBtmTypePO.getImageName(); |
| | | bizType.lifeCycle = osBtmTypePO.getLifeCycle(); |
| | | bizType.lifeCycles = osBtmTypePO.getLifeCycles().split(","); |
| | | bizType.apNameArray = osBtmTypePO.getApNameArray().split(","); |
| | |
| | | tree.setParentName(parentBIzType.getfName()); |
| | | tree.setParentId(parentBIzType.getOid()); |
| | | tree.setLeaf(true); |
| | | tree.setIcon(bizType.getImageName()); |
| | | tree.setText(bizType.getDescription()); |
| | | tree.setAttributes(WebUtil.objectToMapString(bizType)); |
| | | tree.setChildren(getChildren(osBtmTypeVOS, bizType)); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.common.qt.object.Symbol; |
| | | import com.vci.constant.IRightConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.framework.data.GrandValue; |
| | | import com.vci.corba.omd.btm.BizType; |
| | | import com.vci.corba.omd.lcm.LifeCycle; |
| | | import com.vci.corba.omd.lcm.TransitionVO; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.corba.portal.data.PLAction; |
| | | import com.vci.dto.OsDataAuthDTO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.web.service.OsDataAuthServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * æ°æ®æéçæ§å¶å¨ |
| | | * @author yuxc |
| | | * @date 2024-11-25 |
| | | */ |
| | | @Service |
| | | public class OsDataAuthServiceImpl implements OsDataAuthServiceI { |
| | | |
| | | @Autowired |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | @Override |
| | | public BaseResult getData(String typeName) throws PLException { |
| | | GrandValue[] grandValues = platformClientUtil.getFrameworkService().queryGrand(typeName); |
| | | // 设置Tableåå¤´ä¿¡æ¯ |
| | | List<String> tableHeader = new ArrayList<String>(); |
| | | //è·åè¡¨å¤´æ°æ® |
| | | getTableHeader(grandValues, tableHeader, typeName); |
| | | //åè¡¨æ°æ® |
| | | List<Map> rowList = new ArrayList<>(); |
| | | //è·ååè¡¨æ°æ® |
| | | getTableData(grandValues, tableHeader, typeName, rowList); |
| | | Map<String, String> actionsMap = getAllActionsByType2(typeName, "business"); |
| | | OsDataAuthDTO tableData = new OsDataAuthDTO(); |
| | | tableData.setTableHeader(tableHeader); |
| | | tableData.setRowList(rowList); |
| | | tableData.setActionMap(actionsMap); |
| | | return BaseResult.success(tableData); |
| | | } |
| | | /** |
| | | * ä¿åæ°æ®æéæ°æ® |
| | | * @return ä¿åç»æ |
| | | */ |
| | | @Override |
| | | public BaseResult saveGrand(List<GrandValue> grandValues) throws PLException { |
| | | boolean isTrue = false; |
| | | isTrue = platformClientUtil.getFrameworkService() |
| | | .deleteTypeRuleGrand(grandValues.get(0).identifier.split("_")[0], grandValues.get(0).ruleName); |
| | | if(!isTrue){ |
| | | throw new VciBaseException("æ°æ®æéå é¤å¤±è´¥ï¼"); |
| | | } |
| | | // save |
| | | boolean isTrue_add = false; |
| | | try { |
| | | isTrue_add = platformClientUtil.getFrameworkService() |
| | | .saveGrand(grandValues.toArray(new GrandValue[grandValues.size()])); |
| | | } catch (Exception e) { |
| | | throw new VciBaseException("æ°æ®æéä¿å失败ï¼"); |
| | | } |
| | | if (isTrue_add) { |
| | | return BaseResult.success("ä¿åæåï¼"); |
| | | } |
| | | return BaseResult.success("ä¿å失败ï¼"); |
| | | } |
| | | /** |
| | | * å 餿°æ®æé |
| | | * @param typeName ä¸å¡ç±»å |
| | | * @param ruleName è§ååç§° |
| | | * @return å é¤ç»æ |
| | | */ |
| | | @Override |
| | | public BaseResult deleteTypeRuleGrand(String typeName, String ruleName) throws PLException { |
| | | // DataBase |
| | | boolean isTrue = platformClientUtil.getFrameworkService().deleteTypeRuleGrand(typeName, |
| | | ruleName); |
| | | if (!isTrue) { |
| | | return BaseResult.success("å é¤å¤±è´¥ï¼"); |
| | | } |
| | | return BaseResult.success("å 餿åï¼"); |
| | | } |
| | | |
| | | //add by caill start 2015 12.18 å°æ¥è¯¢åºæ¥çactionæ¾å
¥å°mapä¸ |
| | | private Map<String, String> getAllActionsByType2(String typeName, String type) throws PLException { |
| | | Map<String,String> boActions2 = new HashMap<String,String>(); |
| | | boActions2.put("æ¥è¯¢", "query"); |
| | | PLAction[] allActions = platformClientUtil.getUIService().getAllPLActionEntityByType(typeName); |
| | | if (allActions == null || allActions.length == 0) { |
| | | return boActions2; |
| | | } |
| | | for (int i = 0; i < allActions.length; i++) { |
| | | if(allActions[i].plTypeType.equals(type)){ |
| | | boActions2.put(allActions[i].plName,allActions[i].plCode); //å°ä¸ææ¾ç¤ºä½ä¸ºkey,è±ææ¾ç¤ºä½ä¸ºvalueæ¾å°mapä¸ |
| | | } |
| | | } |
| | | return boActions2; |
| | | } |
| | | |
| | | private void getTableData(GrandValue[] grandValues, List<String> tableHeader, String typeName, List<Map> rowList) throws PLException { |
| | | // 便®è§ååç§°ï¼è§ååç±» |
| | | Map<String, List<GrandValue>> splitRuleMap = splitRuleByName(grandValues); |
| | | // 便®è§ååç§° |
| | | // int row = 0; |
| | | // 设置è§åè®°å½è¡æ° |
| | | // ruleModel.setRowCount(splitRuleMap.size()); |
| | | // add by caill start 2016.1.11 å¾å°btmãlinkãlifeCyles |
| | | LinkType[] links = null; |
| | | LifeCycle lifeCycle = null; |
| | | BizType btm = null; |
| | | try { |
| | | btm = platformClientUtil.getBtmService().getBizTypeByName(typeName); |
| | | links = platformClientUtil.getLinkTypeService().getLinkTypeByBtmName(btm.name, Symbol.FROM); |
| | | LifeCycle[] lifeCyles = platformClientUtil.getLifeCycleService().getLifeCycles(); |
| | | for (int m = 0; m < lifeCyles.length; m++) { |
| | | if (lifeCyles[m].name.equals(btm.lifeCycle)) { |
| | | lifeCycle = lifeCyles[m]; |
| | | break; |
| | | } |
| | | } |
| | | } catch (Throwable e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | // add by caill end |
| | | // ActionConstants act = new ActionConstants(); |
| | | PLAction[] allActions = platformClientUtil.getUIService().getAllPLActionEntityByType(typeName); |
| | | // platformClientUtil.getUIService().getAllPLActionEntityByType(typeName); |
| | | for (Iterator<Map.Entry<String, List<GrandValue>>> iter = splitRuleMap.entrySet().iterator(); iter.hasNext();) { |
| | | Map.Entry<String, List<GrandValue>> entry = iter.next(); |
| | | List<GrandValue> rules = entry.getValue(); |
| | | |
| | | Map<Object, Object> columnData = new HashMap<>(); |
| | | // å¢å 页é¢ç¼å |
| | | // ruleModel.setConditionValue(row, rules); |
| | | columnData.put("rules",rules.get(0)); |
| | | // add by caill start 2015 12.18 å°æ¥åºçactionæ¾å°mapä¸ï¼æ³¨æä¸è¦è½ä¸âæ¥è¯¢â |
| | | Map<String, String> actionMap = new HashMap<String, String>(); |
| | | actionMap.put("query", "æ¥è¯¢"); // å°æä½ä¸çqueryæ¾å
¥actionMapä¸ |
| | | for (int i = 0; i < allActions.length; i++) { |
| | | if (allActions[i].plTypeType.equals("business")) { |
| | | actionMap.put(allActions[i].plCode, allActions[i].plName); // 尿使¾å
¥actionMapä¸ |
| | | } |
| | | } |
| | | for (int j = 0; j < links.length; j++) { |
| | | for (int i = 0; i < allActions.length; i++) { |
| | | if (allActions[i].plTypeType.equals("link")) { |
| | | actionMap.put(links[j].name + "." + allActions[i].plCode, |
| | | links[j].name + "." + allActions[i].plName);// å°å
³ç³»æ¾å
¥actionMapä¸ |
| | | } |
| | | } |
| | | actionMap.put(links[j].name + "." + "query", links[j].name + "." + "æ¥è¯¢"); // å°å
³ç³»ä¸çqueryæ¾å
¥actionMapä¸ |
| | | } |
| | | |
| | | TransitionVO[] transitions = lifeCycle != null ? lifeCycle.routes : new TransitionVO[0]; |
| | | for (int j = 0; j < transitions.length; j++) { |
| | | String name = lifeCycle.name + "." + transitions[j].connect; |
| | | actionMap.put(name, name); // å°è·è¿æ¾å
¥actionMapä¸ |
| | | } |
| | | // add by caill end |
| | | for (int j = 0; j < rules.size(); j++) { |
| | | // è§åååç±»å |
| | | // ruleModel.setValueAt(rules.get(j).ruleName, row, 0); |
| | | columnData.put(0, rules.get(j).ruleName); |
| | | if (rules.get(j).ruleType.equals(IRightConstant.RULETYPE__HAS)) { |
| | | columnData.put(1, "å
许è§å"); |
| | | } else if (rules.get(j).ruleType.equals(IRightConstant.RULETYPE__NOTHAS)) { |
| | | columnData.put(1, "æç»è§å"); |
| | | } else if (rules.get(j).ruleType.equals(IRightConstant.RULETYPE_ALL_HAS)) { |
| | | columnData.put(1, "å
¨é¨ææ"); |
| | | } else { |
| | | columnData.put(1, "å
¨é¨æ æ"); |
| | | } |
| | | // æå®çæä½èµå¼ |
| | | // TableColumnModel columnModel = funclet.getRightMainPanel().getRuleTable().getColumnModel(); |
| | | int start = rules.get(j).identifier.lastIndexOf("_") + 1; |
| | | String op = rules.get(j).identifier.substring(start, rules.get(j).identifier.length()); |
| | | // add by caill start 2015.12.18 éåmapï¼æ ¹æ®è±æåç§°æ¾å°ç¸åºç䏿åç§°ï¼å¹¶æ ¹æ®ä¸æåç§°æ¾å°å¯¹åºçå |
| | | String headerName = null; |
| | | Set<String> keys = null; |
| | | if (actionMap.size() > 0) { |
| | | keys = actionMap.keySet(); |
| | | } |
| | | if (keys.size() != 0) { |
| | | for (Iterator<String> iterator = keys.iterator(); iterator.hasNext();) { |
| | | String key = iterator.next(); |
| | | if (op.equals(key)) { |
| | | headerName = actionMap.get(key); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | int columnIndex = -1; |
| | | if (headerName != null) { |
| | | // columnIndex = columnModel.getColumnIndex(headerName); |
| | | columnIndex = tableHeader.indexOf(headerName); |
| | | } |
| | | // add by caill end |
| | | // int columnIndex = columnModel.getColumnIndex(op); |
| | | if (columnIndex >= 0) { |
| | | // ruleModel.setValueAt(rules.get(j).isGrand == '1' ? true : false, row, columnIndex); |
| | | columnData.put(columnIndex, rules.get(j).isGrand == '1' ? true : false); |
| | | } |
| | | |
| | | } |
| | | // ++row; |
| | | rowList.add(columnData); |
| | | } |
| | | } |
| | | |
| | | private void getTableHeader(GrandValue[] grandValues, List<String> tableHeader, String typeName) throws PLException { |
| | | // æä½ä¿¡æ¯ |
| | | List<String> ops = new ArrayList<String>(); |
| | | for (int i = 0; i < grandValues.length; i++) { |
| | | int start = grandValues[i].identifier.lastIndexOf("_") + 1; |
| | | String op = grandValues[i].identifier.substring(start, grandValues[i].identifier.length()); |
| | | if (!ops.contains(op)) { |
| | | ops.add(op); |
| | | } |
| | | } |
| | | // æä½ä¿¡æ¯ |
| | | String[] operations = ops.toArray(new String[ops.size()]); |
| | | // List<String> tablerule = new ArrayList<String>(); |
| | | tableHeader.add("è§ååç§°"); |
| | | tableHeader.add("è§åç±»å"); |
| | | PLAction[] allActions = platformClientUtil.getUIService().getAllPLActionEntityByType(typeName); |
| | | |
| | | for (int m = 0; m < operations.length; m++) { |
| | | if (allActions != null && allActions.length != 0) { |
| | | for (int i = 0; i < allActions.length; i++) { |
| | | if (allActions[i].plCode.equals(operations[m])) { |
| | | tableHeader.add(allActions[i].plName); |
| | | break; |
| | | } else if (operations[m].endsWith("." + allActions[i].plCode)) { |
| | | int index = operations[m].indexOf("." + allActions[i].plCode); |
| | | StringBuilder sb = new StringBuilder(operations[m]); |
| | | StringBuilder actionChina = sb.replace(index + 1, operations[m].length(), allActions[i].plName); |
| | | tableHeader.add(actionChina.toString()); |
| | | break; |
| | | } else if (operations[m].equals("query")) { |
| | | tableHeader.add("æ¥è¯¢"); // 注æä¸è¦è½ä¸åæ»çâæ¥è¯¢â |
| | | break; |
| | | } else if (operations[m].endsWith(".query")) { |
| | | int index = operations[m].indexOf(".query"); |
| | | StringBuilder sb = new StringBuilder(operations[m]); |
| | | StringBuilder actionChina = sb.replace(index + 1, operations[m].length(), "æ¥è¯¢"); |
| | | tableHeader.add(actionChina.toString()); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | } else { |
| | | if (operations[m].equals("query")) { |
| | | tableHeader.add("æ¥è¯¢"); // 注æä¸è¦è½ä¸åæ»çâæ¥è¯¢â |
| | | } |
| | | if (operations[m].endsWith(".query")) { |
| | | int index = operations[m].indexOf(".query"); |
| | | StringBuilder sb = new StringBuilder(operations[m]); |
| | | StringBuilder actionChina = sb.replace(index + 1, operations[m].length(), "æ¥è¯¢"); |
| | | tableHeader.add(actionChina.toString()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | LifeCycle lifeCycle = null; |
| | | BizType btm = null; |
| | | try { |
| | | btm = platformClientUtil.getBtmService().getBizTypeByName(typeName); |
| | | LifeCycle[] lifeCyles = platformClientUtil.getLifeCycleService().getLifeCycles(); |
| | | for (int j = 0; j < lifeCyles.length; j++) { |
| | | if (lifeCyles[j].name.equals(btm.lifeCycle)) { |
| | | lifeCycle = lifeCyles[j]; |
| | | break; |
| | | } |
| | | } |
| | | } catch (Throwable e) { |
| | | e.printStackTrace(); |
| | | } |
| | | TransitionVO[] transitions = lifeCycle != null ? lifeCycle.routes : new TransitionVO[0]; |
| | | for (int j = 0; j < transitions.length; j++) { |
| | | tableHeader.add(lifeCycle.name + "." + transitions[j].connect); |
| | | } |
| | | } |
| | | |
| | | private Map<String, List<GrandValue>> splitRuleByName(GrandValue[] values) { |
| | | Map<String, List<GrandValue>> splitRuleMap = new HashMap<String, List<GrandValue>>(); |
| | | for (int i = 0; i < values.length; i++) { |
| | | if (splitRuleMap.get(values[i].ruleName) == null) { |
| | | List<GrandValue> ruleOfOneName = new ArrayList<GrandValue>(); |
| | | ruleOfOneName.add(values[i]); |
| | | splitRuleMap.put(values[i].ruleName, ruleOfOneName); |
| | | } else { |
| | | splitRuleMap.get(values[i].ruleName).add(values[i]); |
| | | } |
| | | |
| | | } |
| | | return splitRuleMap; |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | }else { |
| | | qtdArray = platformClientUtil.getQTDService().getBizTypeQTDs(btmName); |
| | | } |
| | | return BaseResult.dataList(Arrays.asList(qtdArray)); |
| | | List<QTD> qtdList = Arrays.asList(qtdArray).stream().sorted(Comparator.comparing(s -> s.name,String.CASE_INSENSITIVE_ORDER)).collect(Collectors.toList()); |
| | | return BaseResult.dataList(qtdList); |
| | | } |
| | | |
| | | /** |
| | |
| | | public BaseResult getObjTypeQTs(String btName) throws PLException, DocumentException { |
| | | VciBaseUtil.alertNotNull(btName,"ç±»åå"); |
| | | QTInfo[] objTypeQTs = platformClientUtil.getQTDService().getObjTypeQTs(btName); |
| | | if(Func.isEmpty(objTypeQTs)){ |
| | | return BaseResult.success(); |
| | | } |
| | | List<QTInfoDTO> dtos = new ArrayList<>(); |
| | | Map<String, AttributeDef> allSysAttr = Arrays.stream(platformClientUtil.getBtmService().getSysAttributeDefs()).collect(Collectors.toMap(e -> e.name, e -> e)); |
| | | allSysAttr.putAll(Arrays.stream(platformClientUtil.getLinkTypeService().getSysAttributeDefs()).collect(Collectors.toMap(e -> e.name, e -> e))); |
| | |
| | | qtInfoDTO.setCreateTimeText(DateFormatUtils.format(new Date(obj.createTime), DateUtil.PATTERN_DATETIME)); |
| | | dtos.add(qtInfoDTO); |
| | | } |
| | | //// TODO: 2024/12/2 Ludc è¿åå¼æåº |
| | | dtos = dtos.stream().sorted(Comparator.comparing(QTInfoDTO::getQtName,String.CASE_INSENSITIVE_ORDER)).collect(Collectors.toList()); |
| | | return BaseResult.dataList(dtos); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public BaseResult getAllQTs() throws PLException { |
| | | QTInfo[] allQTs = platformClientUtil.getQTDService().getAllQTs(); |
| | | List<QTInfo> allQTList = Arrays.stream(allQTs).sorted(Comparator.comparing(o -> o.qtName, String.CASE_INSENSITIVE_ORDER)).collect(Collectors.toList()); |
| | | DataGrid<QTInfo> dataGrid = new DataGrid<>(); |
| | | dataGrid.setData(Arrays.asList(allQTs)); |
| | | dataGrid.setData(allQTList); |
| | | dataGrid.setTotal(allQTs.length); |
| | | return BaseResult.dataGrid(dataGrid); |
| | | } |
| | |
| | | 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; |
| | |
| | | if(strategy.getRequireCharCount() > strategy.getCombinations().split(",").length){ |
| | | throw new VciBaseException("å¿
å¡«ç§ç±»ä¸è½å¤§äºæéæ©çå¯ç ç»åæ¹å¼ç个æ°!"); |
| | | } |
| | | if(strategy.getRequireCharCount() <= 0){ |
| | | throw new VciBaseException("å¿
å¡«ç§ç±»ä¸è½å°äºçäº0!"); |
| | | } |
| | | if(strategy.getMaxLength() < strategy.getMinLength()){ |
| | | throw new VciBaseException("å¯ç æå¤§é¿åº¦ä¸è½å°äºæå°é¿åº¦!"); |
| | | } |
| | |
| | | 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; |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import com.vci.client.common.oq.OQTool; |
| | | 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.btm.BizType; |
| | | 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 org.dom4j.DocumentHelper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | VciBaseUtil.alertNotNull(dataGridQuery,"æ¥è¯¢å¯¹è±¡",dataGridQuery.getBtmname(),"ä¸å¡ç±»å",dataGridQuery.getTableDefineId()); |
| | | //å
夿æ¥è¯¢æ¨¡æ¿ |
| | | UITableDefineVO tableDefineVO = uiEngineService.getComponentByOid(dataGridQuery.getComponentOid(),null).getTableDefineVO(); |
| | | String queryTemplate = !CollectionUtils.isEmpty(dataGridQuery.getSourceData())?dataGridQuery.getSourceData().getOrDefault("querytemplate",tableDefineVO.getQueryTemplateName()):tableDefineVO.getQueryTemplateName(); |
| | | String queryTemplate = !CollectionUtils.isEmpty(dataGridQuery.getSourceData())? (String) dataGridQuery.getSourceData().getOrDefault("querytemplate",tableDefineVO.getQueryTemplateName()) :tableDefineVO.getQueryTemplateName(); |
| | | if(StringUtils.isBlank(queryTemplate)){ |
| | | //è¯´ææ²¡æè®¾ç½®æ¥è¯¢æ¨¡æ¿ï¼éè¦ççå¨è¿ä¸ªè¡¨æ ¼æå¨çç»ä»¶ææ²¡æè®¾ç½® |
| | | tableDefineVO = uiEngineService.getTableById(dataGridQuery.getBtmname(), dataGridQuery.getTableDefineId()); |
| | |
| | | queryFieldList.add("creator_name"); |
| | | queryFieldList.add("lastmodifier_name"); |
| | | //æä»¬å¨åå°æ¥è¯¢ä¸å¡æ°æ® |
| | | Map<String, String> replaceMap = wrapperReplaceMap(dataGridQuery.getSourceData()); |
| | | Map<String, Object> replaceMap = wrapperReplaceMap(dataGridQuery.getSourceData()); |
| | | |
| | | if(dataGridQuery.isLinkTypeFlag()){ |
| | | UILinkTypeDataQuery linkTypeDataQuery = new UILinkTypeDataQuery(); |
| | |
| | | public UIFormDataVO getDataForForm(UIFormQuery formQuery) throws VciBaseException, PLException { |
| | | VciBaseUtil.alertNotNull(formQuery,"表åçæ¥è¯¢å¯¹è±¡",formQuery.getBtmname(),"ä¸å¡ç±»åçä¿¡æ¯",formQuery.getOid(),"ä¸å¡æ°æ®ç主é®",formQuery.getFormDefineId(),"表åçå®ä¹ç¼å·"); |
| | | UIFormDefineVO formDefineVO = uiEngineService.getFormById(formQuery.getBtmname(),formQuery.getFormDefineId()); |
| | | String queryTemplate = !CollectionUtils.isEmpty(formQuery.getSourceData())?formQuery.getSourceData().getOrDefault("querytemplate",formDefineVO.getQueryTemplateName()):formDefineVO.getQueryTemplateName(); |
| | | String queryTemplate = !CollectionUtils.isEmpty(formQuery.getSourceData())? (String) formQuery.getSourceData().getOrDefault("querytemplate",formDefineVO.getQueryTemplateName()) :formDefineVO.getQueryTemplateName(); |
| | | Set<String> queryFieldList = formDefineVO.getItems().stream().filter(s->!UIFieldTypeEnum.CUSTOM.getValue().equalsIgnoreCase(s.getType())).map(UIFormItemVO::getField).collect(Collectors.toSet()); |
| | | //è·ååç
§ |
| | | List<UIFormItemVO> referFieldList = formDefineVO.getItems().stream().filter(s -> UIFieldTypeEnum.REFER.getValue().equalsIgnoreCase(s.getType())).collect(Collectors.toList()); |
| | |
| | | queryFieldList.add("creator_name"); |
| | | queryFieldList.add("lastmodifier_name"); |
| | | Map<String,String> conditionMap = WebUtil.getOidQuery(formQuery.getOid()); |
| | | Map<String, String> replaceMap = wrapperReplaceMap(formQuery.getSourceData()); |
| | | Map<String, Object> replaceMap = wrapperReplaceMap(formQuery.getSourceData()); |
| | | UIFormDataVO formDataVO = new UIFormDataVO(); |
| | | replaceMap.put("oid", formQuery.getOid().trim()); |
| | | if(!formDefineVO.isLinkTypeFlag()) { |
| | |
| | | * @param sourceDataMap æ¥æºæ°æ® |
| | | * @return æ¿æ¢åçå¼ |
| | | */ |
| | | private Map<String,String> wrapperReplaceMap(Map<String,String> sourceDataMap){ |
| | | Map<String,String> replaceMap =!CollectionUtils.isEmpty(sourceDataMap)? sourceDataMap:new HashMap<>(); |
| | | private Map<String,Object> wrapperReplaceMap(Map<String,Object> sourceDataMap){ |
| | | Map<String,Object> replaceMap =!CollectionUtils.isEmpty(sourceDataMap)? sourceDataMap:new HashMap<>(); |
| | | if(!replaceMap.containsKey("f_oid")){ |
| | | replaceMap.put("f_oid",replaceMap.getOrDefault("oid","")); |
| | | } |
| | | if(replaceMap.get("f_oid").contains(TREE_NODE_ID_SEP)){ |
| | | replaceMap.put("f_oid",replaceMap.get("f_oid").split(TREE_NODE_ID_SEP)[1]); |
| | | String fOid = replaceMap.get("f_oid").toString(); |
| | | if(fOid.contains(TREE_NODE_ID_SEP)){ |
| | | replaceMap.put("f_oid",fOid.split(TREE_NODE_ID_SEP)[1]); |
| | | } |
| | | return replaceMap; |
| | | } |
| | |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public List<Tree> getDataForTree(UITreeQuery treeQuery) throws VciBaseException, PLException { |
| | | public List<UIDataTree> getDataForTree(UITreeQuery treeQuery) throws Exception { |
| | | VciBaseUtil.alertNotNull(treeQuery,"表åçæ¥è¯¢å¯¹è±¡",treeQuery.getBtmname(),"ä¸å¡ç±»åçä¿¡æ¯",treeQuery.getComponentOid(),"æ æå¨çç»ä»¶ç主é®"); |
| | | Map<String, OsAttributeVO> attributeVOMap = attrService.selectAllAttributeMap(); |
| | | UIComponentVO componentVO = uiEngineService.getComponentByOid(treeQuery.getComponentOid(),attributeVOMap); |
| | |
| | | if(!treeQuery.isLinkTypeFlag() && StringUtils.isBlank(treeQuery.getParentBtmName())){ |
| | | treeQuery.setParentBtmName(treeQuery.getBtmname()); |
| | | } |
| | | |
| | | //TODO: æ¿æ¢æ å®ä¹ä¸çæ£ååæ¥è¯¢å±æ§ï¼å 为æ£ååæ¥è¯¢æ¯ç±é¾æ¥ç±»åæ¥è¯¢æ¨¡æ¿ä¸æ§å¶ç |
| | | boolean isOrientation = false; //æ¯å¦ååï¼ä½¿ç¨æ¨¡æ¿ä¸é
ç½®ç |
| | | String qtName = treeDefineVO.getQueryTemplateName(); |
| | | if(Func.isNotBlank(treeDefineVO.getLinkType()) && Func.isNotBlank(qtName)){ |
| | | QTInfo wrapper = platformClientUtil.getQTDService().getQT(qtName); |
| | | QueryTemplate qt = OQTool.getQTByDoc(DocumentHelper.parseText(wrapper.qtText), qtName); |
| | | isOrientation = qt.getDirection().equals("opposite"); |
| | | } |
| | | if(treeQuery.getConditionMap() == null){ |
| | | treeQuery.setConditionMap(new HashMap<>()); |
| | | } |
| | |
| | | if(StringUtils.isNotBlank(treeQuery.getParentOid()) && treeQuery.getParentOid().contains(TREE_NODE_ID_SEP)){ |
| | | treeQuery.setParentOid(treeQuery.getParentOid().split(TREE_NODE_ID_SEP)[1]); |
| | | } |
| | | String queryTemplate = StringUtils.isNotBlank(treeQuery.getQueryTemplate())?treeQuery.getQueryTemplate():(!CollectionUtils.isEmpty(treeQuery.getSourceData())?treeQuery.getSourceData().getOrDefault("querytemplate",treeDefineVO.getQueryTemplateName()):treeDefineVO.getQueryTemplateName()); |
| | | String valueField = treeQuery.isLinkTypeFlag()?(!treeDefineVO.isOrientation()?"${oid}" + TREE_NODE_ID_SEP + "${t_oid}":"${oid}" + TREE_NODE_ID_SEP + "${f_oid}"):(StringUtils.isNotBlank(treeQuery.getValueField())?treeQuery.getValueField():"oid"); |
| | | String queryTemplate = StringUtils.isNotBlank(treeQuery.getQueryTemplate())?treeQuery.getQueryTemplate():(!CollectionUtils.isEmpty(treeQuery.getSourceData())? (String) treeQuery.getSourceData().getOrDefault("querytemplate",treeDefineVO.getQueryTemplateName()) :treeDefineVO.getQueryTemplateName()); |
| | | String valueField = treeQuery.isLinkTypeFlag()?(!isOrientation?"${oid}" + TREE_NODE_ID_SEP + "${t_oid}":"${oid}" + TREE_NODE_ID_SEP + "${f_oid}"):(StringUtils.isNotBlank(treeQuery.getValueField())?treeQuery.getValueField():"oid"); |
| | | String textField = StringUtils.isNotBlank(treeDefineVO.getTreeNodeExpression())?treeDefineVO.getTreeNodeExpression():(StringUtils.isNotBlank(treeQuery.getTextField())?treeQuery.getTextField():"name"); |
| | | List<Tree> rootTreeList = new ArrayList<>(); |
| | | List<UIDataTree> rootTreeList = new ArrayList<>(); |
| | | List<String> queryFieldList = new ArrayList<>(); |
| | | queryFieldList.add("creator_name"); |
| | | queryFieldList.add("lastmodifier_name"); |
| | | String rootExpress = StringUtils.isNotBlank(treeQuery.getRootExpress())?treeQuery.getRootExpress():treeDefineVO.getRootContent(); |
| | | Map<String, String> replaceMap = wrapperReplaceMap(treeQuery.getSourceData()); |
| | | Map<String, Object> replaceMap = wrapperReplaceMap(treeQuery.getSourceData()); |
| | | if(StringUtils.isBlank(treeDefineVO.getLinkType())){ |
| | | //è¿ä¸ªæ¯ä¸å¡ç±»åçèªåç
§ |
| | | //以åç平尿²¡æå¯¹èªåç
§è¿ç§æå
¨é¨æ¥è¯¢ç |
| | |
| | | linkTypeDataQuery.setConditionMap(treeQuery.getConditionMap()); |
| | | linkTypeDataQuery.setParentOid(treeQuery.getParentOid()); |
| | | linkTypeDataQuery.setClauseList(queryFieldList); |
| | | linkTypeDataQuery.setDirection(treeDefineVO.isOrientation()); |
| | | linkTypeDataQuery.setDirection(isOrientation); |
| | | linkTypeDataQuery.setToBtmType(treeDefineVO.getBtmType()); |
| | | linkTypeDataQuery.setLinkType(treeDefineVO.getLinkType()); |
| | | if(UITreeLoadTypeEnum.ALL.getValue().equalsIgnoreCase(treeDefineVO.getLoadType())){ |
| | |
| | | } |
| | | if(treeQuery.isQueryRoot()){ |
| | | //æ¥è¯¢æ ¹èç¹.æä»¬éè¦å¤ææ¯å¦è®¾ç½®äºæ ¹èç¹çæ¥è¯¢æ¡ä»¶ |
| | | List<com.vci.corba.query.data.BOAndLO> rootCbos = null; |
| | | List<BOAndLO> rootCbos = null; |
| | | String parentFieldNameAndValue = treeDefineVO.getShowLinkAbs(); |
| | | if(StringUtils.isNotBlank(parentFieldNameAndValue)){ |
| | | if(StringUtils.isNotBlank(queryTemplate)){ |
| | |
| | | } |
| | | if(!CollectionUtils.isEmpty(rootCbos)){ |
| | | if(StringUtils.isBlank(parentFieldName)){ |
| | | if(treeDefineVO.isOrientation()){ |
| | | if(isOrientation){ |
| | | parentFieldName = "t_oid"; |
| | | }else{ |
| | | parentFieldName = "f_oid"; |
| | |
| | | if(CollectionUtils.isEmpty(replaceMap)){ |
| | | throw new VciBaseException("æ ¹èç¹æ²¡æé
ç½®æ¥è¯¢æ¡ä»¶ï¼ä¹æ²¡ææ¥æºæ°æ®"); |
| | | } |
| | | Tree root = new Tree(); |
| | | root.setOid(replaceMap.getOrDefault("oid",replaceMap.getOrDefault("t_oid",""))); |
| | | UIDataTree root = new UIDataTree(); |
| | | root.setOid((String) replaceMap.getOrDefault("oid",replaceMap.getOrDefault("t_oid",""))); |
| | | root.setText(getValueByExpressForBOAndLO(new HashMap<>(),replaceMap,rootExpress)); |
| | | root.setAttributes(replaceMap); |
| | | root.setIndex("0"); |
| | | rootTreeList.add(root); |
| | | |
| | | if(StringUtils.isBlank(parentFieldName)){ |
| | | if(treeDefineVO.isOrientation()){ |
| | | if(isOrientation){ |
| | | parentFieldName = "t_oid"; |
| | | }else{ |
| | | parentFieldName = "f_oid"; |
| | |
| | | if(linkTypeDataQuery.getReplaceMap() == null){ |
| | | linkTypeDataQuery.setReplaceMap(new HashMap<>()); |
| | | } |
| | | linkTypeDataQuery.getReplaceMap().put(treeDefineVO.isOrientation()?"t_oid":"f_oid",treeQuery.getParentOid()); |
| | | linkTypeDataQuery.getReplaceMap().put(isOrientation?"t_oid":"f_oid",treeQuery.getParentOid()); |
| | | } |
| | | return cloAndCbo2Trees(loService.queryCLOAndBoByLinkType(linkTypeDataQuery),valueField,textField,parentFieldName,treeQuery.isShowCheckBox(),treeQuery.getParentOid()); |
| | | } |
| | |
| | | * @throws VciBaseException æ¥è¯¢åºéçæ¶å伿åºå¼å¸¸ |
| | | */ |
| | | @Override |
| | | public BaseResult getDataByTemp(UITreeQuery treeQuery) throws VciBaseException, PLException { |
| | | public BaseResult getDataByTemp(UITreeQuery treeQuery) throws Exception { |
| | | VciBaseUtil.alertNotNull(treeQuery,"表åçæ¥è¯¢å¯¹è±¡",treeQuery.getComponentOid(),"å½åç»ä»¶ç主é®"); |
| | | //1ãå
æ¥è¯¢é¡µé¢å®ä¹ç»ä»¶ |
| | | Map<String, OsAttributeVO> attributeVOMap = attrService.selectAllAttributeMap(); |
| | |
| | | } |
| | | // 2ãæ ¹æ®é
ç½®çæ¥è¯¢æ¨¡æ¿æ¥è¯¢æ°æ®(éè¦èèå
¨é¢ä¸ç¹), |
| | | // è¿å¿æ ¹æ®å½åç±»åæ¥è·åæ¯ä»ä¹ç±»åçæ¥è¯¢æ¨¡æ¿ï¼ç¶åå对åºçæ¥è¯¢å¤ç |
| | | |
| | | //TODO: æ¿æ¢æ å®ä¹ä¸çæ£ååæ¥è¯¢å±æ§ï¼å 为æ£ååæ¥è¯¢æ¯ç±é¾æ¥ç±»åæ¥è¯¢æ¨¡æ¿ä¸æ§å¶ç |
| | | UITreeDefineVO treeDefineVO = componentVO.getTreeDefineVO(); |
| | | String queryTemplate = StringUtils.isNotBlank(treeQuery.getQueryTemplate())?treeQuery.getQueryTemplate():(!CollectionUtils.isEmpty(treeQuery.getSourceData())?treeQuery.getSourceData().getOrDefault("querytemplate",treeDefineVO.getQueryTemplateName()):treeDefineVO.getQueryTemplateName()); |
| | | Map<String, String> replaceMap = wrapperReplaceMap(treeQuery.getSourceData()); |
| | | boolean isOrientation = false; //æ¯å¦ååï¼ä½¿ç¨æ¨¡æ¿ä¸é
ç½®ç |
| | | String qtName = treeDefineVO.getQueryTemplateName(); |
| | | if(Func.isNotBlank(treeDefineVO.getLinkType()) && Func.isNotBlank(qtName)){ |
| | | QTInfo wrapper = platformClientUtil.getQTDService().getQT(qtName); |
| | | QueryTemplate qt = OQTool.getQTByDoc(DocumentHelper.parseText(wrapper.qtText), qtName); |
| | | isOrientation = qt.getDirection().equals("opposite"); |
| | | } |
| | | String queryTemplate = StringUtils.isNotBlank(treeQuery.getQueryTemplate())?treeQuery.getQueryTemplate():(!CollectionUtils.isEmpty(treeQuery.getSourceData())? (String) treeQuery.getSourceData().getOrDefault("querytemplate",treeDefineVO.getQueryTemplateName()) :treeDefineVO.getQueryTemplateName()); |
| | | Map<String, Object> replaceMap = wrapperReplaceMap(treeQuery.getSourceData()); |
| | | List<String> queryFieldList = new ArrayList<>(); |
| | | String valueField = treeQuery.isLinkTypeFlag()?(!treeDefineVO.isOrientation()?"${oid}" + TREE_NODE_ID_SEP + "${t_oid}":"${oid}" + TREE_NODE_ID_SEP + "${f_oid}"):(StringUtils.isNotBlank(treeQuery.getValueField())?treeQuery.getValueField():"oid"); |
| | | String valueField = treeQuery.isLinkTypeFlag()?(!isOrientation?"${oid}" + TREE_NODE_ID_SEP + "${t_oid}":"${oid}" + TREE_NODE_ID_SEP + "${f_oid}"):(StringUtils.isNotBlank(treeQuery.getValueField())?treeQuery.getValueField():"oid"); |
| | | String textField = StringUtils.isNotBlank(treeDefineVO.getTreeNodeExpression())?treeDefineVO.getTreeNodeExpression():(StringUtils.isNotBlank(treeQuery.getTextField())?treeQuery.getTextField():"name"); |
| | | String rootExpress = StringUtils.isNotBlank(treeQuery.getRootExpress())?treeQuery.getRootExpress():treeDefineVO.getRootContent(); |
| | | String parentFieldName = treeQuery.getParentFieldName(); |
| | |
| | | List<BusinessObject> rootCbos = boService.queryCBOByScheme(queryTemplate, null, replaceMap); |
| | | |
| | | //3ãæ ¹æ®ä¸åçç»ä»¶è¿åä¸åçæ°æ®ç±»åï¼æ ãåè¡¨ãæ è¡¨ãèªå®ä¹æ¨¡æ¿ã表åçï¼ |
| | | List<Tree> rootTreeList = null; |
| | | List<UIDataTree> rootTreeList = null; |
| | | if(!CollectionUtils.isEmpty(rootCbos)){ |
| | | rootTreeList = cbo2Trees(rootCbos,valueField,StringUtils.isBlank(rootExpress)?textField:rootExpress,parentFieldName,treeQuery.isShowCheckBox(),null); |
| | | TreeQueryObject treeQueryObject = new TreeQueryObject(); |
| | |
| | | * @param queryFieldList æ¥è¯¢çåæ®µ |
| | | * @param treeQueryObject æ å½¢æ¥è¯¢å¯¹è±¡ï¼éè¦valueFieldåtextFieldï¼è¿æparentFieldName,åcheckBox |
| | | */ |
| | | private void queryTreeForBO(List<Tree> rootTreeList, String queryTemplate,List<String> queryFieldList,TreeQueryObject treeQueryObject) { |
| | | for (Tree rootTree : rootTreeList) { |
| | | private void queryTreeForBO(List<UIDataTree> rootTreeList, String queryTemplate,List<String> queryFieldList,TreeQueryObject treeQueryObject) { |
| | | for (UIDataTree rootTree : rootTreeList) { |
| | | List<BusinessObject> thisChildren = null; |
| | | Map<String,String> sourceDataMap = rootTree.getAttributes(); |
| | | Map<String,Object> sourceDataMap = rootTree.getAttributes(); |
| | | sourceDataMap.put("f_oid",rootTree.getOid()); |
| | | Map<String,String> conditionMap = new HashMap<>(); |
| | | conditionMap.put(treeQueryObject.getParentFieldName(),rootTree.getOid()); |
| | | if (StringUtils.isNotBlank(queryTemplate)) { |
| | | thisChildren = boService.queryCBOByScheme(queryTemplate, conditionMap, sourceDataMap, null, queryFieldList); |
| | | } else { |
| | | thisChildren = boService.queryCBO(sourceDataMap.getOrDefault("btmname",sourceDataMap.getOrDefault("btmName",treeQueryObject.getParentBtmName())), conditionMap, null, queryFieldList); |
| | | thisChildren = boService.queryCBO((String) sourceDataMap.getOrDefault("btmname",sourceDataMap.getOrDefault("btmName",treeQueryObject.getParentBtmName())), conditionMap, null, queryFieldList); |
| | | } |
| | | List<Tree> childrenTree = cbo2Trees(thisChildren, treeQueryObject.getValueField(), treeQueryObject.getTextField(), treeQueryObject.getParentFieldName(), treeQueryObject.isShowCheckBox(), null); |
| | | List<UIDataTree> childrenTree = cbo2Trees(thisChildren, treeQueryObject.getValueField(), treeQueryObject.getTextField(), treeQueryObject.getParentFieldName(), treeQueryObject.isShowCheckBox(), null); |
| | | rootTree.setChildren(childrenTree); |
| | | if(treeQueryObject.isQueryAllLevel() && !CollectionUtils.isEmpty(childrenTree) ) { |
| | | queryTreeForBO(childrenTree,queryTemplate,queryFieldList,treeQueryObject); |
| | |
| | | * @param textField æ¾ç¤ºè¡¨è¾¾å¼ |
| | | * @param showCheckBox æ¯å¦æ¾ç¤ºå¤éæ¡ |
| | | */ |
| | | private void queryTreeForLO(List<Tree> rootTreeList, UILinkTypeDataQuery linkTypeDataQuery,String parentFieldName,String valueField,String textField,boolean showCheckBox) { |
| | | for (Tree rootTree : rootTreeList) { |
| | | private void queryTreeForLO(List<UIDataTree> rootTreeList, UILinkTypeDataQuery linkTypeDataQuery,String parentFieldName,String valueField,String textField,boolean showCheckBox) { |
| | | for (UIDataTree rootTree : rootTreeList) { |
| | | Map<String,String> conditionMap = new HashMap<>(); |
| | | conditionMap.put(linkTypeDataQuery.isDirection()?"t_oid":"f_oid",rootTree.getOid()); |
| | | linkTypeDataQuery.setConditionMap(conditionMap); |
| | |
| | | * @param parentOid ä¸çº§çä¸»é® |
| | | * @return æ |
| | | */ |
| | | private List<Tree> cbo2Trees(Collection<BusinessObject> cbos,String valueField,String textField,String parentFieldName,boolean showCheckBox,String parentOid){ |
| | | private List<UIDataTree> cbo2Trees(Collection<BusinessObject> cbos,String valueField,String textField,String parentFieldName,boolean showCheckBox,String parentOid){ |
| | | final int[] i = {0}; |
| | | List<Tree> rootList = new ArrayList<>(); |
| | | List<Tree> children = new ArrayList<>(); |
| | | List<UIDataTree> rootList = new ArrayList<>(); |
| | | List<UIDataTree> children = new ArrayList<>(); |
| | | cbos.stream().forEach(cbo->{ |
| | | Tree tree = new Tree(); |
| | | UIDataTree tree = new UIDataTree(); |
| | | tree.setOid(getValueByExpress(cbo,valueField)); |
| | | tree.setText(getValueByExpress(cbo,textField)); |
| | | if(StringUtils.isNotBlank(parentFieldName)){ |
| | | tree.setParentId(ObjectTool.getBOAttributeValue(cbo,parentFieldName)); |
| | | } |
| | | tree.setAttributes(boService.cbo2Map(cbo)); |
| | | Map<String,Object> cbo2Map = boService.cbo2Map(cbo); |
| | | Map<String, Object> returnMap = new HashMap<>(); |
| | | returnMap.put((String) cbo2Map.get("btmname"),cbo2Map); |
| | | tree.setAttributes(returnMap); |
| | | tree.setIndex(i[0] + ""); |
| | | i[0]++; |
| | | tree.setChecked(showCheckBox); |
| | |
| | | if(rootList.size() == 0 && children.size() == 0){ |
| | | return rootList; |
| | | } |
| | | return Tree.getChildList(rootList,children); |
| | | return UIDataTree.getChildList(rootList,children); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param parentOid ä¸çº§çå¼ |
| | | * @return æ å½¢æ°æ® |
| | | */ |
| | | public List<Tree> cloAndCbo2Trees(Collection<com.vci.corba.query.data.BOAndLO> boAndLOS,String valueField,String textField,String parentFieldName,boolean showCheckBox,String parentOid){ |
| | | public List<UIDataTree> cloAndCbo2Trees(Collection<BOAndLO> boAndLOS, String valueField, String textField, String parentFieldName, boolean showCheckBox, String parentOid){ |
| | | final int[] i = {0}; |
| | | List<Tree> rootList = new ArrayList<>(); |
| | | List<Tree> children = new ArrayList<>(); |
| | | List<UIDataTree> rootList = new ArrayList<>(); |
| | | List<UIDataTree> children = new ArrayList<>(); |
| | | boAndLOS.stream().forEach(boAndLO->{ |
| | | Tree tree = new Tree(); |
| | | UIDataTree tree = new UIDataTree(); |
| | | BusinessObject cbo = new BusinessObject(); |
| | | cbo = boAndLO.bo; |
| | | LinkObject clo = new LinkObject(); |
| | | clo = boAndLO.lo; |
| | | Map<String,String> cloMap = loService.clo2Map(clo); |
| | | Map<String,String> cbo2Map = boService.cbo2Map(cbo); |
| | | //å°é¾æ¥ç±»åç屿§ä¹æ¾è¿è¿è¡è¿å |
| | | String linkName = Func.isNotBlank(cloMap.get("linktypename")) ? cloMap.get("linktypename"):parentFieldName; |
| | | Map<String, String> returnMap = new HashMap<>(); |
| | | cloMap.forEach((key,value)->{ |
| | | //è¿æ»¤æç©ºå¼ |
| | | if(!returnMap.containsKey(linkName + key) && Func.isNotBlank(key) || Func.isNotBlank(value)){ |
| | | returnMap.put(linkName + key,value); |
| | | } |
| | | }); |
| | | //è¿æ»¤æç©ºå¼ï¼ç¨ä½è¿åçmap |
| | | cbo2Map.entrySet().stream().forEach(entry -> { |
| | | String key = entry.getKey(); |
| | | String value = entry.getValue(); |
| | | if (!returnMap.containsKey(key) && Func.isNotBlank(key) && Func.isNotBlank(value)) { |
| | | returnMap.put(key,value); |
| | | } |
| | | }); |
| | | Map<String,Object> cloMap = loService.clo2Map(clo); |
| | | Map<String,Object> cbo2Map = boService.cbo2Map(cbo); |
| | | |
| | | if(!CollectionUtils.isEmpty(cbo2Map)){ |
| | | /*if(!CollectionUtils.isEmpty(cbo2Map)){ |
| | | cbo2Map.forEach((key,value)->{ |
| | | //TODO: è¿å¿ä¸ºå¥è¦æ¼æ¥ä¸parentFieldNameï¼å¯¼è´åé¢freemarkerè¡¨è¾¾å¼æ æ³æ£ç¡®æ¿æ¢ |
| | | cloMap.put(/*parentFieldName + "." +*/ key,value); |
| | | cloMap.put(/*parentFieldName + "." + key,value); |
| | | }); |
| | | } |
| | | }*/ |
| | | tree.setOid(getValueByExpressForBOAndLO(cloMap,cbo2Map,valueField)); |
| | | tree.setText(getValueByExpressForBOAndLO(cloMap,cbo2Map,textField)); |
| | | if(StringUtils.isBlank(parentFieldName)){ |
| | |
| | | tree.setParentId(ObjectTool.getLOAttributeValue(clo,parentFieldName)); |
| | | } |
| | | } |
| | | |
| | | //TODOï¼è¿åçæ°æ®æ¹ææé¾æ¥ç±»ååä¸å¡ç±»å为keyï¼å¼ä¸ºå¯¹åºç屿§éåå½¢å¼è¿å |
| | | Map<String, Object> returnMap = new HashMap<>(); |
| | | returnMap.put((String) cloMap.get("linktypename"),cloMap); |
| | | returnMap.put((String) cbo2Map.get("btmname"),cbo2Map); |
| | | tree.setAttributes(returnMap); |
| | | tree.setIndex(i[0] + ""); |
| | | i[0]++; |
| | |
| | | } |
| | | }); |
| | | |
| | | return Tree.getChildList(rootList,children); |
| | | return UIDataTree.getChildList(rootList,children); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param fieldExpress è¡¨è¾¾å¼ |
| | | * @return æ¿æ¢åçå¼ |
| | | */ |
| | | private String getValueByExpressForBOAndLO(Map<String,String> valueMap,Map<String,String> boValueMap,String fieldExpress){ |
| | | private String getValueByExpressForBOAndLO(Map<String,Object> valueMap,Map<String,Object> boValueMap,String fieldExpress){ |
| | | if(fieldExpress.contains("${")){ |
| | | //使ç¨freemarkerå¤ç |
| | | return VciBaseUtil.replaceByFreeMarker(fieldExpress,valueMap); |
| | | /* |
| | | TODO:表达å¼åå¨T_OID.nameè¿ç§å½¢å¼æ¶freemarkeræ¿æ¢è§åæ¯ä»T_OIDè¿ä¸ªå¯¹è±¡ä¸æname屿§ï¼ |
| | | 使¯valueMapæ¯ä¸ä¸ªString,StringçMapæä»¥éè¦å°T_OID.æF_OID.廿ï¼å 为ä¸ç®¡æ¯æ¥è¯¢ç |
| | | formç«¯è¿æ¯toç«¯é½æ¯å¹³å°æ¥å¥½æ¾å¨ä¸å¡å±æ§boValueMapéåä¸çï¼æä»¥ç´æ¥æ¿å°±å¯ä»¥ |
| | | */ |
| | | if(fieldExpress.contains(".")){ |
| | | //å»é¤t_oidãT_OID以åf_oidãF_OID |
| | | fieldExpress = fieldExpress |
| | | .replace("t_oid.","") |
| | | .replace("T_OID.","") |
| | | .replace("f_oid.","") |
| | | .replace("F_OID.",""); |
| | | } |
| | | return VciBaseUtil.replaceByFreeMarker(fieldExpress,boValueMap); |
| | | }else { |
| | | List<String> fieldList = VciBaseUtil.str2List(fieldExpress); |
| | | Map<String,String> valueLowMap = new HashMap<>(); |
| | | Map<String,Object> valueLowMap = new HashMap<>(); |
| | | valueMap.forEach((key,value)->{ |
| | | valueLowMap.put(key.toLowerCase(),value); |
| | | }); |
| | | Map<String,String> boLowValueMap = new HashMap<>(); |
| | | Map<String,Object> boLowValueMap = new HashMap<>(); |
| | | if(!CollectionUtils.isEmpty(boValueMap)){ |
| | | boValueMap.forEach((key,value)->{ |
| | | boLowValueMap.put(key.toLowerCase(),value); |
| | |
| | | } |
| | | StringBuilder sb = new StringBuilder(); |
| | | fieldList.stream().forEach(field->{ |
| | | sb.append(valueLowMap.getOrDefault(field,boLowValueMap.getOrDefault(field,""))).append(" "); |
| | | sb.append(boLowValueMap.getOrDefault(field,valueLowMap.getOrDefault(field,""))).append(" "); |
| | | }); |
| | | return sb.toString().trim(); |
| | | } |
| | |
| | | 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; |
| | | |
| | | |
| | | /** |
| | |
| | | node = rootNode.addElement(PLDefinationConstants.QUERYTEMPLATENAME); |
| | | node.setText(obj.getQueryTemplateName()); |
| | | |
| | | node = rootNode.addElement(PLDefinationConstants.QUERYTEMPLATENAME); |
| | | node.setText(obj.getBsCustQueryCLsOrUrl()); |
| | | |
| | | node = rootNode.addElement(PLDefinationConstants.QUERYTEMPLATENAME); |
| | | node.setText(obj.getCsCustQueryCLsOrUrl()); |
| | | |
| | | node = rootNode.addElement(PLDefinationConstants.SUBUIOBJTYPE); |
| | | node.setText(obj.getSubUiObjType()); |
| | | |
| | |
| | | elementText = root.elementText(PLDefinationConstants.QUERYTEMPLATENAME); |
| | | obj.setQueryTemplateName(elementText == null ? "" : elementText); |
| | | |
| | | elementText = root.elementText(PLDefinationConstants.BSCUSTQUERYCLSORURL); |
| | | obj.setBsCustQueryCLsOrUrl(elementText == null ? "" : elementText); |
| | | |
| | | elementText = root.elementText(PLDefinationConstants.CSCUSTQUERYCLSORURL); |
| | | obj.setCsCustQueryCLsOrUrl(elementText == null ? "" : elementText); |
| | | |
| | | elementText = root.elementText(PLDefinationConstants.SUBUILAYOUT); |
| | | obj.setSubUILayout(elementText == null ? "" : elementText); |
| | | } |
| | |
| | | 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> |