Commit 11e2789a authored by zhengfunan's avatar zhengfunan

提交各接口调用方法

parent 6b2d4890
......@@ -80,6 +80,13 @@
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5</version>
</dependency>
</dependencies>
<build>
......
This diff is collapsed.
package com.tongda.tdpimssdk.api;
import com.alibaba.fastjson.JSONObject;
import com.tongda.tdpimssdk.auth.SaAuth;
import com.tongda.tdpimssdk.entities.Product;
import com.tongda.tdpimssdk.entities.common.CatalogRoot;
import com.tongda.tdpimssdk.entities.common.Team2;
import com.tongda.tdpimssdk.http.PimHttpUtil;
import com.tongda.tdpimssdk.resultVo.vo.AssetVo;
import com.tongda.tdpimssdk.resultVo.vo.CatalogItem;
import com.tongda.tdpimssdk.resultVo.vo.TeamVo;
import java.util.List;
public class PimsBusiness {
/**
* 新建业务
* @param teamVo
* @return
*/
public String createBusiness(TeamVo teamVo){
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business?dbName="+SaAuth.dbName;
String response= PimHttpUtil.sendPost(url,(JSONObject)JSONObject.toJSON(teamVo));
String s=PimsQuery.resultUtil(response);
return s;
}
/**
* 查询业务详情
* @param id
* @param lcID
* @param stateKey
* @return
*/
public List<Team2> getBusinessDetails(String id, String lcID, String stateKey) {
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business/details?dbName="+SaAuth.dbName+"&id="+id+"&lcID="+lcID+"&stateKey="+stateKey;
String response= PimHttpUtil.sendGet(url);
String s=PimsQuery.resultUtil(response);
return JSONObject.parseArray(s,Team2.class);
}
/**
* 查询目录下资产列表
* @param id
* @param lcID
* @param stateKey
* @return
*/
public List<CatalogRoot> queryAssetByCatalog(String id, String catalogID,String lcID, String stateKey) {
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business/details?dbName="+SaAuth.dbName+"&id="+id+"&catalogID="+catalogID+"&lcID="+lcID+"&stateKey="+stateKey;
String response= PimHttpUtil.sendGet(url);
String s=PimsQuery.resultUtil(response);
return JSONObject.parseArray(s,CatalogRoot.class);
}
/**
* 修改资产或文档属性(字段)
* @param vo
* @return
*/
public String getLifeCycleDefinitionList(AssetVo vo) {
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset/field?dbName="+SaAuth.dbName;
String response= PimHttpUtil.sendPut(url,(JSONObject)JSONObject.toJSON(vo));
String s=PimsQuery.resultUtil(response);
return s;
}
/**
* 删除业务
* @param id
* @return
*/
public String deleteTeam(String id) {
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business?dbName="+SaAuth.dbName;
TeamVo teamVo=new TeamVo();
teamVo.setTeamID(id);
String response= PimHttpUtil.sendDeleteBody(url,(JSONObject)JSONObject.toJSON(teamVo));
String s=PimsQuery.resultUtil(response);
return s;
}
/**
* 将资源从业务团队中移除
* {
* "dbName": "TXPIMDB",
* "id": "Team2-1125463491344334848",
* "assetID": "Product-1125819770889830400"
* }
* @return
*/
public String removeAssetFromTeam(CatalogItem item) {
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business/asset?dbName="+SaAuth.dbName;
String response= PimHttpUtil.sendDeleteBody(url,(JSONObject)JSONObject.toJSON(item));
String s=PimsQuery.resultUtil(response);
return s;
}
/**
* 修改资产或文档属性(字段)
* @param item
* @return
*/
public String addAssetRefToTeam(CatalogItem item) {
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business/asset?dbName="+SaAuth.dbName;
String response= PimHttpUtil.sendPut(url,(JSONObject)JSONObject.toJSON(item));
String s=PimsQuery.resultUtil(response);
return s;
}
public static String remove="{\n" +
" \"dbName\": \"TXPIMDB\",\n" +
" \"id\": \"Team2-1125463491344334848\",\n" +
" \"assetID\": \"Product-1126119026813042688\"\n" +
"}";
public static String create="{\n" +
" \"userId\": \"EndUser-1128343251971997696\",\n" +
" \"label\": \"test16\",\n" +
" \"desc\": \"test\",\n" +
" \"lifecycleID\": \"TDLifeCycleDefinition-Common\"\n" +
"}";
}
package com.tongda.tdpimssdk.api;
import com.alibaba.fastjson.JSONObject;
import com.tongda.tdpimssdk.auth.SaAuth;
import com.tongda.tdpimssdk.entities.Product;
import com.tongda.tdpimssdk.entities.Resource;
import com.tongda.tdpimssdk.http.PimHttpUtil;
import com.tongda.tdpimssdk.resultVo.vo.AssetVo;
import java.io.File;
import java.util.List;
public class PimsDocument {
/**
* 新建文档
* @param vo
* @return
*/
public String createDocumentAsset(AssetVo vo){
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset/document?dbName="+SaAuth.dbName;
String response= PimHttpUtil.sendPost(url,(JSONObject)JSONObject.toJSON(vo));
String s=PimsQuery.resultUtil(response);
return s;
}
/**
* 查询文档详情
* @param id
* @param lcID
* @param stateKey
* @return
*/
public List<Resource> getDocumentContent(String id, String lcID, String stateKey) {
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/document/content?dbName="+SaAuth.dbName+"&id="+id+"&lcID="+lcID+"&stateKey="+stateKey;
String response= PimHttpUtil.sendGet(url);
String s=PimsQuery.resultUtil(response);
return JSONObject.parseArray(s,Resource.class);
}
/**
* 修改资产或文档属性(字段)
* @param vo
* @return
*/
public String getLifeCycleDefinitionList(AssetVo vo) {
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset/field?dbName="+SaAuth.dbName;
String response= PimHttpUtil.sendPut(url,(JSONObject)JSONObject.toJSON(vo));
String s=PimsQuery.resultUtil(response);
return s;
}
/**
* 删除文档
* @param id
* @return
*/
public String deleteAsset(String id) {
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset/document?dbName="+SaAuth.dbName+"&id="+id;
String response= PimHttpUtil.sendDelete(url);
String s=PimsQuery.resultUtil(response);
return s;
}
public String uploadBinary(String id, String lcID, String stateKey, File file) {
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/document/upload?dbName="+SaAuth.dbName+"&id="+id+"&lcID="+lcID+"&stateKey="+stateKey;
String response= PimHttpUtil.uploadFile(url,file);
String s=PimsQuery.resultUtil(response);
return s;
}
public static String update="{\n" +
" \"id\": \"Resource-1129783425285226496\",\n" +
" \"lcID\":\"TDLifeCycleDefinition-Common\",\n" +
" \"stateKey\":\"Editing\",\n" +
" \"fields\": [\n" +
" {\n" +
" \"mode\": \"tdpim.dict.system.metadata.mode.single.value\",\n" +
" \"uom\": \"\",\n" +
" \"key\": \"td_asset_number\",\n" +
" \"value\": \"test1234\",\n" +
" \"valueMin\": null,\n" +
" \"valueMax\": null,\n" +
" \"selectedIDs\": null\n" +
" }\n" +
" ]\n" +
"}";
public static String create="{\n" +
" \"templateID\": \"ResourceTemplate-1125740648473821184\",\n" +
" \"label\": \"测试7\",\n" +
" \"fields\": [\n" +
" {\n" +
" \"mode\": \"tdpim.dict.system.metadata.mode.single.value\",\n" +
" \"uom\": \"\",\n" +
" \"key\": \"td_asset_number\",\n" +
" \"value\": \"test123456789\",\n" +
" \"valueMin\": null,\n" +
" \"valueMax\": null,\n" +
" \"selectedIDs\": null\n" +
" },\n" +
" {\n" +
" \"mode\": \"tdpim.dict.system.metadata.mode.single.select.value\",\n" +
" \"uom\": \"\",\n" +
" \"key\": \"td_asset_subtype\",\n" +
" \"value\": \"安全设备\",\n" +
" \"valueMin\": null,\n" +
" \"valueMax\": null,\n" +
" \"selectedIDs\": null\n" +
" }\n" +
" ]\n" +
"}";
}
package com.tongda.tdpimssdk.api;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.tongda.tdpimssdk.auth.SaAuth;
import com.tongda.tdpimssdk.entities.AssetAbstract;
import com.tongda.tdpimssdk.entities.Entity;
import com.tongda.tdpimssdk.entities.common.CatalogRoot;
import com.tongda.tdpimssdk.http.PimHttpUtil;
import com.tongda.tdpimssdk.resultVo.vo.GeneralPagerVo;
import java.util.List;
public class PimsApi {
public class PimsQuery {
/**
* 查询资产模型清单
* @return
*/
public List<CatalogRoot> pimsTemplate(){
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/template?dbName="+SaAuth.dbName;
String response=PimHttpUtil.sendGet(url);
String s=resultUtil(response);
JSONObject.parseArray(s,CatalogRoot.class);
return JSONObject.parseArray(s,CatalogRoot.class);
}
/**
* 查询文档模型清单
* @return
*/
public List<CatalogRoot> queryDocumentList(){
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/template/document?dbName="+SaAuth.dbName;
String response=PimHttpUtil.sendGet(url);
String s=resultUtil(response);
return JSONObject.parseArray(s,CatalogRoot.class);
}
/**
* 根据模型ID查询资产/文档清单
* @param templateID
* @param page
* @param size
* @return
*/
public GeneralPagerVo<AssetAbstract> getLifeCycleDefinitionList(String templateID, int page, int size){
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset?dbName="+SaAuth.dbName+"&templateID="+templateID+"&page="+page+templateID+"&size="+size;
String response=PimHttpUtil.sendGet(url);
String s=resultUtil(response);
return JSONObject.parseObject(s,new TypeReference<GeneralPagerVo<AssetAbstract>>(){});
}
/**
* 查询资产所属业务
* @param id
* @return
*/
public List<Entity> queryAssetAppViewPath(String id){
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/asset/business/path?dbName="+SaAuth.dbName+"&id="+id;
String response=PimHttpUtil.sendGet(url);
String s=resultUtil(response);
return JSONObject.parseArray(s,Entity.class);
}
/**
* 查询业务清单
* @return
*/
public List<Entity> getBusinessList(String label) {
String url="http://"+ SaAuth.serverId +":"+SaAuth.serverPort+"/pims/business?dbName="+SaAuth.dbName+"&label="+label;
String response=PimHttpUtil.sendGet(url);
String s=resultUtil(response);
return JSONObject.parseArray(s,Entity.class);
}
public static String resultUtil(String re){
System.out.println(re);
......
package com.tongda.tdpimssdk.auth;
import com.tongda.tdpimssdk.api.PimsApi;
import com.tongda.tdpimssdk.entities.common.CatalogRoot;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.tongda.tdpimssdk.api.PimsAsset;
import com.tongda.tdpimssdk.api.PimsBusiness;
import com.tongda.tdpimssdk.api.PimsDocument;
import com.tongda.tdpimssdk.api.PimsQuery;
import com.tongda.tdpimssdk.http.PimHttpUtil;
import com.tongda.tdpimssdk.resultVo.vo.AssetVo;
import com.tongda.tdpimssdk.resultVo.vo.CatalogItem;
import com.tongda.tdpimssdk.resultVo.vo.TeamVo;
import lombok.Data;
import java.util.List;
import java.io.File;
@Data
public class SaAuth {
......@@ -26,27 +33,69 @@ public class SaAuth {
this.port = port;
}
public static String loginAndSatoken(){
public static String loginGetSatoken(){
String url="http://"+id+":"+port+"/sso/doLogin";
satoken=PimHttpUtil.loginGet(url,user,password);
satoken=PimHttpUtil.loginGetSatoken(url,user,password);
return satoken;
}
public static void main(String[] args) {
SaAuth.serverId="150.158.75.213";
// SaAuth.serverId="150.158.75.213";
SaAuth.serverId="127.0.0.1";
SaAuth.serverPort=8080;
SaAuth.dbName="TXPIMDB";
SaAuth saAuth=new SaAuth("zhengfunan","q1w2e3r4","121.199.160.117",9000);
String satoken=SaAuth.loginAndSatoken();
PimsApi pimsApi =new PimsApi();
List<CatalogRoot> list= pimsApi.pimsTemplate();
System.out.println(list);
// s= pimsApi.pimsTemplate();
// System.out.println(s);
SaAuth saAuth=new SaAuth("guantiantian","q1w2e3r4","121.199.160.117",9000);
String satoken=SaAuth.loginGetSatoken();
System.out.println(satoken);
PimsQuery pimsQuery =new PimsQuery();
// //查询5个接口
// System.out.println(pimsQuery.pimsTemplate());
//
// System.out.println(pimsQuery.queryDocumentList());
//
// System.out.println(pimsQuery.getBusinessList(""));
//
// System.out.println(pimsQuery.getLifeCycleDefinitionList("ResourceTemplate-1125740648473821184",1,20));
//
// System.out.println(pimsQuery.queryAssetAppViewPath("Product-1128330059979948032"));
}
PimsAsset pimsAsset=new PimsAsset();
// System.out.println(pimsAsset.pimsTemplate(JSONObject.parseObject(PimsAsset.create, AssetVo.class)));
// System.out.println(pimsAsset.getAssetContent("Product-1129500005887901696","TDLifeCycleDefinition-Common","Editing"));
// System.out.println(pimsAsset.getLifeCycleDefinitionList(JSONObject.parseObject(PimsAsset.update, AssetVo.class)));
// System.out.println(pimsAsset.deleteAsset("Product-1129500005887901696"));
PimsDocument pimsDocument=new PimsDocument();
// System.out.println(pimsDocument.createDocumentAsset(JSONObject.parseObject(PimsDocument.create, AssetVo.class)));
// System.out.println(pimsDocument.getDocumentContent("Resource-1129786933577252864","TDLifeCycleDefinition-Common","Editing"));
// System.out.println(pimsDocument.getLifeCycleDefinitionList(JSONObject.parseObject(PimsDocument.update, AssetVo.class)));
// System.out.println(pimsDocument.deleteAsset("Resource-1129433907997966336"));
PimsBusiness pimsBusiness=new PimsBusiness();
// System.out.println(pimsBusiness.createBusiness(JSONObject.parseObject(PimsBusiness.create, TeamVo.class)));
// System.out.println(pimsBusiness.getBusinessDetails("Team2-1129450504951169024","TDLifeCycleDefinition-Common","Editing"));
// System.out.println(pimsBusiness.deleteTeam("Team2-1129450504951169024"));
// System.out.println(pimsBusiness.queryAssetByCatalog("Team2-1129497138993037312","CatalogAppView-1129455551755845632","TDLifeCycleDefinition-Common","Editing"));
// System.out.println(pimsBusiness.removeAssetFromTeam(JSONObject.parseObject(PimsBusiness.remove, CatalogItem.class)));
// System.out.println(pimsBusiness.addAssetRefToTeam(JSONObject.parseObject(PimsBusiness.remove, CatalogItem.class)));
File file=new File("C:\\Users\\zfn\\Desktop\\新建 文本文档1.txt");
System.out.println(pimsDocument.uploadBinary("Resource-1126839993566756864","TDLifeCycleDefinition-Common","Editing",file));
}
}
......@@ -47,7 +47,8 @@ public class ChangeLog {
protected String userName;
@XmlAttribute(name = "stamp")
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar stamp;
protected String stamp;
// protected XMLGregorianCalendar stamp;
@XmlAttribute(name = "type")
protected String type;
@XmlAttribute(name = "version")
......
package com.tongda.tdpimssdk.http;
import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
import java.net.URI;
class HttpDeleteWithBody extends HttpEntityEnclosingRequestBase {
public static final String METHOD_NAME = "DELETE";
/**
* 获取方法(必须重载)
*
* @return
*/
@Override
public String getMethod() {
return METHOD_NAME;
}
public HttpDeleteWithBody(final String uri) {
super();
setURI(URI.create(uri));
}
public HttpDeleteWithBody(final URI uri) {
super();
setURI(uri);
}
public HttpDeleteWithBody() {
super();
}
}
package com.tongda.tdpimssdk.resultVo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* 自定义异常
*
* @author xcq
* {@code @date} 2023/03/14
*/
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BusinessException extends RuntimeException{
private Integer code;
private String desc;
/**
* 业务异常构造方法
*
* @param resultVoEnum 返回值枚举
* @param exception 异常
*/
public BusinessException(ResultVoEnum resultVoEnum, Throwable exception) {
super(exception);
this.code = resultVoEnum.getCode();
this.desc = resultVoEnum.getDesc();
}
}
package com.tongda.tdpimssdk.resultVo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* Rest返回值对象
*
* @author xcq
* @date 2023/03/15
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultVo<T> implements Serializable {
private Integer code;
private String desc;
private T data;
/**
* 从枚举中构造返回值
*
* @param resultVoEnum 返回值枚举
*/
public ResultVo(ResultVoEnum resultVoEnum) {
this.code = resultVoEnum.getCode();
this.desc = resultVoEnum.getDesc();
}
/**
* 成功
*
* @param data 数据
* @return {@link ResultVo}<{@link T}>
*/
public static <T> ResultVo<T> success(T data) {
ResultVo<T> resultVO = new ResultVo<>(ResultVoEnum.SUCCESS);
resultVO.setData(data);
return resultVO;
}
/**
* 错误
*
* @param businessException 业务异常
* @return {@link ResultVo}<{@link String}>
*/
public static ResultVo<String> error(BusinessException businessException) {
return ResultVo.<String>builder()
.code(businessException.getCode())
.desc(businessException.getDesc())
.data(businessException.getMessage())
.build();
}
/**
* 错误
*
* @param exception 系统异常
* @return {@link ResultVo}<{@link String}>
*/
public static ResultVo<String> error(Exception exception) {
ResultVo<String> resultVO = new ResultVo<>(ResultVoEnum.INTERNAL_SERVER_EXCEPTION);
resultVO.setData(exception.getMessage());
return resultVO;
}
}
package com.tongda.tdpimssdk.resultVo;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 返回值枚举
*
* @author xcq
* @date 2023/03/15
*/
@Getter
@AllArgsConstructor
public enum ResultVoEnum {
SUCCESS(200, "success"),
INTERNAL_SERVER_EXCEPTION(-1, "exception"),
FAIL(1, "fail"),
JSON_MAPPING_ERROR(2, "JsonProcessingException"),
// 2000-2999 代表客户异常
ACCOUNT_ERROR(2000, "检测到您尚未登录,请先登录!"),
PARAM_ERROR(2001, "请求参数不合法!"),
PARAM_PARSE_ERROR(2002, "请求参数解析失败"),
// 3000-3999 代表服务异常
XML_PARSE_ERROR(3000, "数据解析异常"),
XQUERY_FILE_ANALYZE_ERROR(3001, "xquery文件解析出错"),
JAXB_ANALYZE_ERROR(3002, "XML解析出错"),
// 4000-4999 代表xquery请求异常
XQUERY_IOEXCEPTION_ERROR(4000, "IoException"),
XQUERY_EXECUTE_ERROR(4001, "请求出错,请检查!");
private final Integer code;
private final String desc;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Tittle: AssetVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/5/25 19:10
*/
@Data
public class AssetVo {
// 模型ID
private String templateID;
// 资产ID
private String id;
// 模型名称
private String label;
private String userID;
private String userName;
private List<AssetField> fields;
/**
* '[
* {"key": "tdpim.asset.mainframe.cpu.count", "type":"SingleValue", "value":"6"},
* {"key": "tdpim.asset.mainframe.cpu.temp", "type":"Range", "valueMin":"1", "valueMax":"5"},
* {"key": "tdpim.asset.mainframe.area", "type":"MultiSelect", "selectedIDs":["CandidateValue-1110951999471353858","CandidateValue-1110951999471353859"]}
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class AssetField {
// 单值/单选
private String key;
private String mode; //元数据模式
private String value;
// 范围
// private String key;
// private String type;
private String valueMin;
private String valueMax;
// 多选
// private String key;
// private String type;
private List<String> selectedIDs;
}
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
/**
* @Tittle: CatalogItem
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/8 10:44
*/
@Data
public class CatalogItem {
// * declare variable $dbName external := 'TXPIMDB';
// * declare variable $parentCatalogID external := 'Catalog-1092230561717551104';
// * declare variable $label external := '未归类产品';
// * declare variable $type external := 'ProductRef'; (: Catalog | ProductSeriesRef | ProductRef:)
// * declare variable $idRef external := 'Product-1092049602028240896';
// 目录父节点ID
private String parentCatalogID;
// 目录ID
private String catalogID;
// 目录名称
private String label;
private String type;
private String templateID;
// 业务ID
private String id;
private String assetID;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Tittle: DataGroupVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/5/16 14:32
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class DataGroupVo {
private String groupId; // 元数据组ID
private String id; //可为空
private String key; //不可为空
private String label; //不可为空
private String modeId; //不可为空
private String dataTypeId; //不可为空
protected String status;
private String uomId; //可为空
private String regPatternId; //可为空
private String desc; //可为空
private String value; //可为空
private List<Option> options;
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class Option {
private String key; //不可为空
private String id;
private String label;
private String value;
}
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Tittle: DocumentFieldVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/7 16:48
*/
@Data
public class DocumentFieldVo {
@NotBlank(message = "id不能为空")
private String docID;
@NotBlank(message = "名称不能为空")
private String label;
private String desc;
private String rollBackFrom;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
import java.util.List;
/**
* @Tittle: GeneralPagerVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/5/26 16:33
*/
@Data
public class GeneralPagerVo<T> {
private String total;
private List<T> data;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
/**
* @Tittle: LifeCycleVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/20 14:09
*/
@Data
public class LifeCycleVo {
private String lcID;
private String templateID;
private String status;
private String label;
private String lifeCycleXml;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
/**
* @Tittle: GeneralPagerVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/5/26 16:33
*/
@Data
public class LifecycleGraphJsonVo<T> {
private T graphJson;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.List;
/**
* @Tittle: Templete
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/6 17:56
*/
@Data
public class MetadataEntityVo {
@NotBlank(message = "元数据组id不能为空")
private String metadataGroupID;
@NotBlank(message = "尚未选中元数据,请先选择后添加")
private List<String> metadata;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MetadataGroupDicVo {
private String dictEntryKey;
private String dictEntryLabel;
private String dictEntryValue;
private String dataType; //正则表达式字典表
private String uomCatalogKey; //计量单位字典表
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Tittle: Templete
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/6 17:56
*/
@Data
public class MetadataGroupVo {
@NotBlank(message = "模板id不能为空")
private String documentID;
@NotBlank(message = "元数据分类组key不能为空")
private String key;
}
package com.tongda.tdpimssdk.resultVo.vo;
import com.tongda.tdpimssdk.entities.common.CandidateValue;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
* @Tittle: MetadataOption
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/4 17:01
*/
@Data
public class MetadataOption extends CandidateValue {
@NotNull(message = "缺少元数据编码字段")
@NotEmpty(message = "元数据编码不能为空")
private String mdeFullKey;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Tittle: ProductVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/8 18:47
*/
@Data
public class ProductVo {
@NotBlank(message = "产品系、产品或资源名不能为空")
private String label;
@NotBlank(message = "产品系、产品或资源模板不能为空")
private String templateID;
// 资源链接id
private String resRefID;
private String productSeriesID;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
/**
* @Tittle: RegularDicVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/12 13:59
*/
@Data
public class RegularDicVo {
// * declare variable $dataType external := ''; (:数据类型key:)
// * declare variable $dictEntryKey external := ''; (:正则编码:)
// * declare variable $dictEntryLabel external := ''; (:正则名称:)
// * declare variable $dictEntryValue external := ''; (:正则值:)
private String dataType;
private String dictEntryKey;
private String dictEntryLabel;
private String dictEntryValue;
private String isSelected; // "true" "false"
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Tittle: ResourceListVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/7 17:47
*/
@Data
public class ResourceListVo {
@NotBlank(message = "资源id不能为空")
private String docID;
/**
* 从下拉框选择,数据源自资源分类字典表
*/
@NotBlank(message = "资源类型编码不能为空")
private String key;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Tittle: ResourceVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/7 17:51
*/
@Data
public class ResourceVo {
/**
* 资源分类id
*/
@NotBlank(message = "资源分类id不能为空")
private String resListID;
/**
* 资源模板id
*/
private String resTplID;
/**
* 资源id
*/
private String resID;
/**
* 资源名称
*/
@NotBlank(message = "资源名称不能为空")
private String newLabel;
}
package com.tongda.tdpimssdk.resultVo.vo;
import com.tongda.tdpimssdk.entities.common.TDEvent;
import lombok.Data;
/**
* @Tittle: StateMachineVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/6/6 11:13
*/
@Data
public class StateMachineVo {
private String lcID; // 生命周期ID
private String sourceStateID; // 源状态ID
private String entityId; // 资产ID、模型ID、文档ID、业务ID
private TDEvent tdEvent;
}
package com.tongda.tdpimssdk.resultVo.vo;
import com.tongda.tdpimssdk.entities.common.PermDef;
import lombok.Data;
/**
* @Tittle: TeamVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/23 19:07
*/
@Data
public class TeamVo {
private String teamID;
private String teamRoleID;
private String teamRoleLabel;
private String label;
private String desc;
private PermDef permDef;
private String endUserID;
private String productID;
private String productRefID;
// * declare variable $teamAdminID external := 'admin';
// * declare variable $teamAdminName external := '系统管理员';
private String userId;
private String userName;
private String lifecycleID;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
/**
* @Tittle: Templete
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/6 17:56
*/
@Data
public class TemplateInfoVo {
private String groupId;
private String key;
private String id;
private String label;
private String icon;
private String userID;
private String userName;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Tittle: TemplateMetadataList
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/5/18 10:55
*/
@Data
public class TemplateMetadataList {
@NotBlank(message = "模型id不能为空")
private String id;
@NotBlank(message = "文档或元数据模型ID列表不能为空")
private String batchID;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Tittle: Templete
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/6 17:56
*/
@Data
public class TempleteVo {
@NotBlank(message = "模板类型不能为空")
private String templateType;
@NotBlank(message = "模板名称不能为空")
private String label;
private String userID;
private String userName;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
/**
* @Tittle: TimeSeriesVariableVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/20 16:48
*/
@Data
public class TimeSeriesVariableVo {
private String key; // 时序变量编码
private String label; // 时序变量名称
private String parentID; // 产品系或产品ID
private String dataType; // 数据类型ID
private String uom; // 数据单位ID
private String keepInSeconds; // 数据保留时间
private String id;
private String value;
}
package com.tongda.tdpimssdk.resultVo.vo;
import lombok.Data;
/**
* @Tittle: UomDicVo
* @description:
* @Package: com.tongda.pimdemo.http.resultVo.vo
* @Date 2023/4/12 15:26
*/
@Data
public class UomDicVo {
// (:计量单位组:)
//declare variable $uomCatalogKey external := '';
//(:计量单位组名称:)
//declare variable $uomCatalogLabel external := '';
// params.put("uomCatalogKey", uomDicVo.getUomCatalogKey());
// params.put("dictEntryKey", uomDicVo.getUomCatalogKey());
// params.put("dictEntryLabel", uomDicVo.getUomCatalogLabel());
/**
* 计量单位组key
*/
private String uomCatalogKey;
/**
* 计量单位组label
*/
private String uomCatalogLabel;
/**
* 计量单位key
*/
private String dictEntryKey;
/**
* 计量单位label
*/
private String dictEntryLabel;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment