Commit 60422ff2 by 宋祥

1.附件一对多的形式

parent 96c8bb80
package com.baosight.hggp.hg.cw.constant;
/**
* @author:songx
* @date:2024/8/16,15:51
*/
public class HgCwSqlConstant {
/**
* HGCW999 SQL定义
*
* @author:songx
* @date:2024/2/22,13:57
*/
public static class HgCw999 {
// 预览自增
public static final String PREVIEW_INCR = "HGCW999.previewIncr";
// 下载自增
public static final String DOWNLOAD_INCR = "HGCW999.downloadIncr";
}
}
...@@ -9,152 +9,163 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -9,152 +9,163 @@ import com.baosight.iplat4j.core.util.StringUtils;
/** /**
* Project: <br> * Project: <br>
* Title:HGCW999.java <br> * Title:Hgcw999.java <br>
* Description: <br> * Description: <br>
* *
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* *
* @version 1.0 * @version 1.0
* @history 2024-05-14 14:08:59 create * @history 2024-08-21 9:59:15 create
*/ */
public class HGCW999 extends DaoEPBase { public class HGCW999 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; /* 主键ID*/ public static final String FIELD_ID = "id"; /* 主键ID*/
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/ public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/ public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/ public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String FIELD_MAT_ID = "matId"; /* 物料ID*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/ public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/ public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/ public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 修改人*/ public static final String FIELD_UPDATED_BY = "updatedBy"; /* 修改人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 修改人名称*/ public static final String FIELD_UPDATED_NAME = "updatedName"; /* 修改人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 修改时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 修改时间*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件ID*/ public static final String FIELD_MAT_ID = "matId"; /* 物料ID*/
public static final String FIELD_COMPANY_CODES = "companyCodes";/*用户角色权限*/
public static final String FIELD_BIZ_TYPE = "bizType"; /* 业务类型*/ public static final String FIELD_BIZ_TYPE = "bizType"; /* 业务类型*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件名称*/
public static final String FIELD_PREVIEW_NUM = "previewNum"; /* 预览次数*/
public static final String FIELD_DOWNLOAD_NUM = "downloadNum"; /* 下载次数*/
public static final String COL_ID = "ID"; /* 主键ID*/ public static final String COL_ID = "ID"; /* 主键ID*/
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/ public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件ID*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/ public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/ public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/ public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 修改人*/ public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 修改人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 修改人名称*/ public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 修改人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 修改时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 修改时间*/
public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/
public static final String COL_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/ public static final String COL_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件名称*/
public static final String COL_PREVIEW_NUM = "PREVIEW_NUM"; /* 预览次数*/
public static final String COL_DOWNLOAD_NUM = "DOWNLOAD_NUM"; /* 下载次数*/
public static final String QUERY = "HGCW999.query"; public static final String QUERY = "HGCW999.query";
public static final String COUNT = "HGCW999.count"; public static final String COUNT = "HGCW999.count";
public static final String INSERT = "HGCW999.insert"; public static final String INSERT = "HGCW999.insert";
public static final String UPDATE = "HGCW999.update"; public static final String UPDATE = "HGCW999.update";
public static final String DELETE = "HGCW999.delete"; public static final String DELETE = "HGCW999.delete";
private Long id = new Long(0); /* 主键ID*/ private Long id = new Long(0); /* 主键ID*/
private String accountCode = " "; /* 企业编码*/ private String accountCode = " "; /* 企业编码*/
private String companyCode = " "; /* 公司编码*/ private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/ private String companyName = " "; /* 公司名称*/
private String depCode = " "; /* 部门编码 预留*/ private String depCode = " "; /* 部门编码 预留*/
private Long matId = new Long(0); /* 物料ID*/
private String docId = " "; /* 文件ID*/
private String docName = " "; /* 文件ID*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/ private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/ private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 修改人*/ private String updatedBy = " "; /* 修改人*/
private String updatedName = " "; /* 修改人名称*/ private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/ private String updatedTime = " "; /* 修改时间*/
private Long matId = new Long(0); /* 物料ID*/
private String bizType = " "; /* 业务类型*/ private String bizType = " "; /* 业务类型*/
private String docId = " "; /* 文件ID*/
private String docName = " "; /* 文件名称*/
private Integer previewNum = new Integer(0); /* 预览次数*/
private Integer downloadNum = new Integer(0); /* 下载次数*/
/** /**
* initialize the metadata. * initialize the metadata.
*/ */
public void initMetaData() { public void initMetaData() {
EiColumn eiColumn; EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID); eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true); eiColumn.setPrimaryKey(true);
eiColumn.setDescName("主键ID"); eiColumn.setDescName("主键ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE); eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码"); eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE); eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公司编码"); eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME); eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称"); eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE); eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码 预留"); eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_ID);
eiColumn.setDescName("物料ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_NAME);
eiColumn.setDescName("文件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY); eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人"); eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME); eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("创建人名称"); eiColumn.setDescName("创建人名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME); eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("创建时间"); eiColumn.setDescName("创建时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY); eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("修改人"); eiColumn.setDescName("修改人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME); eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("修改人名称"); eiColumn.setDescName("修改人名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME); eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("修改时间"); eiColumn.setDescName("修改时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAT_ID);
eiColumn.setDescName("物料ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_BIZ_TYPE); eiColumn = new EiColumn(FIELD_BIZ_TYPE);
eiColumn.setDescName("业务类型"); eiColumn.setDescName("业务类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_NAME);
eiColumn.setDescName("文件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PREVIEW_NUM);
eiColumn.setDescName("预览次数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOWNLOAD_NUM);
eiColumn.setDescName("下载次数");
eiMetadata.addMeta(eiColumn);
} }
/** /**
* the constructor. * the constructor.
*/ */
public HGCW999() { public HGCW999() {
initMetaData(); initMetaData();
} }
/** /**
* get the id - 主键ID. * get the id - 主键ID.
* @return the id * @return the id
...@@ -162,7 +173,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -162,7 +173,7 @@ public class HGCW999 extends DaoEPBase {
public Long getId() { public Long getId() {
return this.id; return this.id;
} }
/** /**
* set the id - 主键ID. * set the id - 主键ID.
* *
...@@ -178,7 +189,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -178,7 +189,7 @@ public class HGCW999 extends DaoEPBase {
public String getAccountCode() { public String getAccountCode() {
return this.accountCode; return this.accountCode;
} }
/** /**
* set the accountCode - 企业编码. * set the accountCode - 企业编码.
* *
...@@ -194,7 +205,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -194,7 +205,7 @@ public class HGCW999 extends DaoEPBase {
public String getCompanyCode() { public String getCompanyCode() {
return this.companyCode; return this.companyCode;
} }
/** /**
* set the companyCode - 公司编码. * set the companyCode - 公司编码.
* *
...@@ -210,7 +221,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -210,7 +221,7 @@ public class HGCW999 extends DaoEPBase {
public String getCompanyName() { public String getCompanyName() {
return this.companyName; return this.companyName;
} }
/** /**
* set the companyName - 公司名称. * set the companyName - 公司名称.
* *
...@@ -226,7 +237,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -226,7 +237,7 @@ public class HGCW999 extends DaoEPBase {
public String getDepCode() { public String getDepCode() {
return this.depCode; return this.depCode;
} }
/** /**
* set the depCode - 部门编码 预留. * set the depCode - 部门编码 预留.
* *
...@@ -236,45 +247,13 @@ public class HGCW999 extends DaoEPBase { ...@@ -236,45 +247,13 @@ public class HGCW999 extends DaoEPBase {
this.depCode = depCode; this.depCode = depCode;
} }
/** /**
* get the matId - 物料ID.
* @return the matId
*/
public Long getMatId() {
return this.matId;
}
/**
* set the matId - 物料ID.
*
* @param matId - 物料ID
*/
public void setMatId(Long matId) {
this.matId = matId;
}
/**
* get the docId - 文件ID.
* @return the docId
*/
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public void setDocId(String docId) {
this.docId = docId;
}
/**
* get the createdBy - 创建人. * get the createdBy - 创建人.
* @return the createdBy * @return the createdBy
*/ */
public String getCreatedBy() { public String getCreatedBy() {
return this.createdBy; return this.createdBy;
} }
/** /**
* set the createdBy - 创建人. * set the createdBy - 创建人.
* *
...@@ -290,7 +269,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -290,7 +269,7 @@ public class HGCW999 extends DaoEPBase {
public String getCreatedName() { public String getCreatedName() {
return this.createdName; return this.createdName;
} }
/** /**
* set the createdName - 创建人名称. * set the createdName - 创建人名称.
* *
...@@ -306,7 +285,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -306,7 +285,7 @@ public class HGCW999 extends DaoEPBase {
public String getCreatedTime() { public String getCreatedTime() {
return this.createdTime; return this.createdTime;
} }
/** /**
* set the createdTime - 创建时间. * set the createdTime - 创建时间.
* *
...@@ -322,7 +301,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -322,7 +301,7 @@ public class HGCW999 extends DaoEPBase {
public String getUpdatedBy() { public String getUpdatedBy() {
return this.updatedBy; return this.updatedBy;
} }
/** /**
* set the updatedBy - 修改人. * set the updatedBy - 修改人.
* *
...@@ -338,7 +317,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -338,7 +317,7 @@ public class HGCW999 extends DaoEPBase {
public String getUpdatedName() { public String getUpdatedName() {
return this.updatedName; return this.updatedName;
} }
/** /**
* set the updatedName - 修改人名称. * set the updatedName - 修改人名称.
* *
...@@ -354,7 +333,7 @@ public class HGCW999 extends DaoEPBase { ...@@ -354,7 +333,7 @@ public class HGCW999 extends DaoEPBase {
public String getUpdatedTime() { public String getUpdatedTime() {
return this.updatedTime; return this.updatedTime;
} }
/** /**
* set the updatedTime - 修改时间. * set the updatedTime - 修改时间.
* *
...@@ -364,13 +343,29 @@ public class HGCW999 extends DaoEPBase { ...@@ -364,13 +343,29 @@ public class HGCW999 extends DaoEPBase {
this.updatedTime = updatedTime; this.updatedTime = updatedTime;
} }
/** /**
* get the matId - 物料ID.
* @return the matId
*/
public Long getMatId() {
return this.matId;
}
/**
* set the matId - 物料ID.
*
* @param matId - 物料ID
*/
public void setMatId(Long matId) {
this.matId = matId;
}
/**
* get the bizType - 业务类型. * get the bizType - 业务类型.
* @return the bizType * @return the bizType
*/ */
public String getBizType() { public String getBizType() {
return this.bizType; return this.bizType;
} }
/** /**
* set the bizType - 业务类型. * set the bizType - 业务类型.
* *
...@@ -380,61 +375,121 @@ public class HGCW999 extends DaoEPBase { ...@@ -380,61 +375,121 @@ public class HGCW999 extends DaoEPBase {
this.bizType = bizType; this.bizType = bizType;
} }
/** /**
* get the docId - 文件ID.
* @return the docId
*/
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public void setDocId(String docId) {
this.docId = docId;
}
/**
* get the docName - 文件名称.
* @return the docName
*/
public String getDocName() {
return this.docName;
}
/**
* set the docName - 文件名称.
*
* @param docName - 文件名称
*/
public void setDocName(String docName) {
this.docName = docName;
}
/**
* get the previewNum - 预览次数.
* @return the previewNum
*/
public Integer getPreviewNum() {
return this.previewNum;
}
/**
* set the previewNum - 预览次数.
*
* @param previewNum - 预览次数
*/
public void setPreviewNum(Integer previewNum) {
this.previewNum = previewNum;
}
/**
* get the downloadNum - 下载次数.
* @return the downloadNum
*/
public Integer getDownloadNum() {
return this.downloadNum;
}
/**
* set the downloadNum - 下载次数.
*
* @param downloadNum - 下载次数
*/
public void setDownloadNum(Integer downloadNum) {
this.downloadNum = downloadNum;
}
/**
* get the value from Map. * get the value from Map.
* *
* @param map - source data map * @param map - source data map
*/ */
@Override @Override
public void fromMap(Map map) { public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id)); setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode)); setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode)); setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName)); setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName)); setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime)); setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType)); setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
setPreviewNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PREVIEW_NUM)), previewNum));
setDownloadNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOWNLOAD_NUM)), downloadNum));
} }
/** /**
* set the value to Map. * set the value to Map.
*/ */
@Override @Override
public Map toMap() { public Map toMap() {
Map map = new HashMap(); Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID))); map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE))); map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE))); map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME))); map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY))); map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME))); map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME))); map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY))); map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME))); map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_BIZ_TYPE, StringUtils.toString(bizType, eiMetadata.getMeta(FIELD_BIZ_TYPE))); map.put(FIELD_BIZ_TYPE, StringUtils.toString(bizType, eiMetadata.getMeta(FIELD_BIZ_TYPE)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_PREVIEW_NUM, StringUtils.toString(previewNum, eiMetadata.getMeta(FIELD_PREVIEW_NUM)));
map.put(FIELD_DOWNLOAD_NUM, StringUtils.toString(downloadNum, eiMetadata.getMeta(FIELD_DOWNLOAD_NUM)));
return map; return map;
} }
public String getDocName() {
return docName;
}
public void setDocName(String docName) {
this.docName = docName;
}
} }
...@@ -2,8 +2,8 @@ package com.baosight.hggp.hg.cw.service; ...@@ -2,8 +2,8 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.constant.S3Constant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW999; import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.ds.domain.HGDS002; import com.baosight.hggp.hg.ds.domain.HGDS002;
...@@ -55,8 +55,7 @@ public class ServiceHGCW999 extends ServiceEPBase { ...@@ -55,8 +55,7 @@ public class ServiceHGCW999 extends ServiceEPBase {
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
// 项目环境 // 项目环境
String projectEnv = ProjectInfo.getProjectEnv(); if (CommonConstant.FileLocation.S3.equalsIgnoreCase(S3Constant.FILE_LOCATION)) {
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
inInfo = super.query(inInfo, "HGCW999.queryRun", new HGCW999()); inInfo = super.query(inInfo, "HGCW999.queryRun", new HGCW999());
} else { } else {
inInfo = super.query(inInfo, "HGCW999.queryDev", new HGCW999()); inInfo = super.query(inInfo, "HGCW999.queryDev", new HGCW999());
...@@ -75,8 +74,7 @@ public class ServiceHGCW999 extends ServiceEPBase { ...@@ -75,8 +74,7 @@ public class ServiceHGCW999 extends ServiceEPBase {
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
map.put("docId",docId); map.put("docId",docId);
// 项目环境 // 项目环境
String projectEnv = ProjectInfo.getProjectEnv(); if (CommonConstant.FileLocation.S3.equalsIgnoreCase(S3Constant.FILE_LOCATION)) {
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
list = this.dao.query("HGCW999.queryRun",map); list = this.dao.query("HGCW999.queryRun",map);
} else { } else {
list = this.dao.query("HGCW999.queryDev",map); list = this.dao.query("HGCW999.queryDev",map);
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
Generate time : 2024-05-14 14:08:59
Version : 1.0
schema : hggp
tableName : HGCW999
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
DEP_CODE VARCHAR NOT NULL,
MAT_ID BIGINT,
DOC_ID VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
BIZ_TYPE VARCHAR
-->
<sqlMap namespace="HGCW999"> <sqlMap namespace="HGCW999">
<sql id="column"> <sql id="column">
A.ID as "id", <!-- 主键ID --> A.ID as "id", <!-- 主键ID -->
A.ACCOUNT_CODE as "accountCode", <!-- 企业编码 --> A.ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
A.COMPANY_CODE as "companyCode", <!-- 公司编码 --> A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
A.COMPANY_NAME as "companyName", <!-- 公司名称 --> A.COMPANY_NAME as "companyName", <!-- 公司名称 -->
A.DEP_CODE as "depCode", <!-- 部门编码 预留 --> A.DEP_CODE as "depCode", <!-- 部门编码 预留 -->
A.MAT_ID as "matId", <!-- 物料ID --> A.CREATED_BY as "createdBy", <!-- 创建人 -->
A.DOC_ID as "docId", <!-- 文件ID --> A.CREATED_NAME as "createdName", <!-- 创建人名称 -->
A.CREATED_BY as "createdBy", <!-- 创建人 --> A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
A.CREATED_NAME as "createdName", <!-- 创建人名称 --> A.UPDATED_BY as "updatedBy", <!-- 修改人 -->
A.CREATED_TIME as "createdTime", <!-- 创建时间 --> A.UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
A.UPDATED_BY as "updatedBy", <!-- 修改人 --> A.UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
A.UPDATED_NAME as "updatedName", <!-- 修改人名称 --> A.MAT_ID as "matId", <!-- 物料ID -->
A.UPDATED_TIME as "updatedTime", <!-- 修改时间 --> A.BIZ_TYPE as "bizType", <!-- 业务类型 -->
A.BIZ_TYPE as "bizType" <!-- 业务类型 --> A.DOC_ID as "docId", <!-- 文件ID -->
<!--A.DOC_NAME as "docName",--> <!-- 文件名称 -->
A.PREVIEW_NUM as "previewNum", <!-- 预览次数 -->
A.DOWNLOAD_NUM as "downloadNum" <!-- 下载次数 -->
</sql> </sql>
<sql id="columnDev"> <sql id="columnDev">
...@@ -169,61 +153,69 @@ ...@@ -169,61 +153,69 @@
</select> </select>
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGCW999 (ID, <!-- 主键ID --> INSERT INTO ${hggpSchema}.HGCW999 (
ACCOUNT_CODE, <!-- 企业编码 --> ACCOUNT_CODE, <!-- 企业编码 -->
COMPANY_CODE, <!-- 公司编码 --> COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 --> COMPANY_NAME, <!-- 公司名称 -->
DEP_CODE, <!-- 部门编码 预留 --> DEP_CODE, <!-- 部门编码 预留 -->
MAT_ID, <!-- 物料ID --> CREATED_BY, <!-- 创建人 -->
DOC_ID, <!-- 文件ID --> CREATED_NAME, <!-- 创建人名称 -->
CREATED_BY, <!-- 创建人 --> CREATED_TIME, <!-- 创建时间 -->
CREATED_NAME, <!-- 创建人名称 --> MAT_ID, <!-- 物料ID -->
CREATED_TIME, <!-- 创建时间 --> BIZ_TYPE, <!-- 业务类型 -->
UPDATED_BY, <!-- 修改人 --> DOC_ID, <!-- 文件ID -->
UPDATED_NAME, <!-- 修改人名称 --> DOC_NAME <!-- 文件文件 -->
UPDATED_TIME, <!-- 修改时间 --> ) VALUES (
BIZ_TYPE <!-- 业务类型 --> #accountCode#, #companyCode#, #companyName#, #depCode#,
) #createdBy#, #createdName#, #createdTime#, #matId#, #bizType#, #docId#, #docName#
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #depCode#, #matId#, #docId#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #bizType#) )
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM ${hggpSchema}.HGCW999 WHERE DELETE FROM ${hggpSchema}.HGCW999 WHERE ID = #id#
ID = #id#
</delete> </delete>
<delete id="deleteMatId"> <delete id="deleteMatId">
DELETE FROM ${hggpSchema}.HGCW999 WHERE DELETE FROM ${hggpSchema}.HGCW999 WHERE MAT_ID = #matId#
MAT_ID = #matId#
</delete> </delete>
<update id="update"> <update id="update">
UPDATE ${hggpSchema}.HGCW999 UPDATE ${hggpSchema}.HGCW999
SET SET
ACCOUNT_CODE = #accountCode#, <!-- 企业编码 --> BIZ_TYPE = #bizType#, <!-- 业务类型 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 --> MAT_ID = #matId#, <!-- 物料ID -->
COMPANY_NAME = #companyName#, <!-- 公司名称 --> DOC_ID = #docId#, <!-- 文件ID -->
DEP_CODE = #depCode#, <!-- 部门编码 预留 --> DOC_NAME = #docName#, <!-- 文件文件 -->
MAT_ID = #matId#, <!-- 物料ID --> <include refid="SqlBase.updateRevise"/>
DOC_ID = #docId#, <!-- 文件ID --> WHERE ID = #id#
CREATED_BY = #createdBy#, <!-- 创建人 -->
CREATED_NAME = #createdName#, <!-- 创建人名称 -->
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 修改时间 -->
BIZ_TYPE = #bizType# <!-- 业务类型 -->
WHERE
ID = #id#
</update>
<update id="batchUpdate">
UPDATE ${hggpSchema}.HGCW999
SET
MAT_ID = #matId#, <!-- 物料ID -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
WHERE
DOC_ID IN <iterate close=")" open="(" conjunction="," property="docIds">#docIds[]#</iterate>
</update> </update>
<update id="batchUpdate">
UPDATE ${hggpSchema}.HGCW999
SET
MAT_ID = #matId#, <!-- 物料ID -->
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
WHERE DOC_ID IN <iterate close=")" open="(" conjunction="," property="docIds">#docIds[]#</iterate>
</update>
<!-- 预览自增 -->
<update id="previewIncr">
UPDATE ${hggpSchema}.HGCW999
SET
PREVIEW_NUM = PREVIEW_NUM + 1,
<include refid="SqlBase.updateRevise"/>
WHERE DOC_ID = #docId#
</update>
<!-- 下载自增 -->
<update id="downloadIncr">
UPDATE ${hggpSchema}.HGCW999
SET
DOWNLOAD_NUM = DOWNLOAD_NUM + 1,
<include refid="SqlBase.updateRevise"/>
WHERE DOC_ID = #docId#
</update>
</sqlMap> </sqlMap>
...@@ -6,6 +6,7 @@ import com.baosight.hggp.core.dao.DaoBase; ...@@ -6,6 +6,7 @@ import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cb.domain.HGCB001; import com.baosight.hggp.hg.cb.domain.HGCB001;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.cw.constant.HgCwSqlConstant;
import com.baosight.hggp.hg.cw.domain.*; import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.*; import com.baosight.hggp.hg.kc.domain.*;
...@@ -24,10 +25,6 @@ import java.math.BigDecimal; ...@@ -24,10 +25,6 @@ import java.math.BigDecimal;
import java.math.BigInteger; import java.math.BigInteger;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -1130,8 +1127,37 @@ public class HGCWTools { ...@@ -1130,8 +1127,37 @@ public class HGCWTools {
} }
} }
/**
*
* @author:songx
* @date:2024/8/21,9:44
*/
public static class HgCw999 { public static class HgCw999 {
/**
* 预览记录自增
*
* @param docId
*/
public static void previewIncr(String docId) {
AssertUtils.isEmpty(docId, "文件ID不能为空");
Map queryMap = new HashMap();
queryMap.put(HGCW999.FIELD_DOC_ID, docId);
DaoUtils.update(HgCwSqlConstant.HgCw999.PREVIEW_INCR, queryMap);
}
/**
* 下载记录自增
*
* @param docId
*/
public static void downloadIncr(String docId) {
AssertUtils.isEmpty(docId, "文件ID不能为空");
Map queryMap = new HashMap();
queryMap.put(HGCW999.FIELD_DOC_ID, docId);
DaoUtils.update(HgCwSqlConstant.HgCw999.DOWNLOAD_INCR, queryMap);
}
public static void batchUpdate(List<Map> rows, Long id) { public static void batchUpdate(List<Map> rows, Long id) {
AssertUtils.isNull(id, "业务ID不能为空!"); AssertUtils.isNull(id, "业务ID不能为空!");
String[] docIds = rows.stream().map(row -> row.get("docId").toString()).toArray(String[]::new); String[] docIds = rows.stream().map(row -> row.get("docId").toString()).toArray(String[]::new);
......
...@@ -13,11 +13,7 @@ public class HgWdSqlConstant { ...@@ -13,11 +13,7 @@ public class HgWdSqlConstant {
* @date:2024/2/22,13:57 * @date:2024/2/22,13:57
*/ */
public static class HgWd001 { public static class HgWd001 {
// 预览自增
public static final String PREVIEW_INCR = "HGWD001.previewIncr";
// 下载自增
public static final String DOWNLOAD_INCR = "HGWD001.downloadIncr";
} }
} }
...@@ -32,6 +32,7 @@ public class HGWD001B extends DaoEPBase { ...@@ -32,6 +32,7 @@ public class HGWD001B extends DaoEPBase {
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/ public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/
public static final String FIELD_FILE_ID = "fileId"; /* 文件ID*/ public static final String FIELD_FILE_ID = "fileId"; /* 文件ID*/
public static final String FIELD_DOC_ID = "docId"; /* 附件ID*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
...@@ -44,6 +45,7 @@ public class HGWD001B extends DaoEPBase { ...@@ -44,6 +45,7 @@ public class HGWD001B extends DaoEPBase {
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/ public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/
public static final String COL_FILE_ID = "FILE_ID"; /* 文件ID*/ public static final String COL_FILE_ID = "FILE_ID"; /* 文件ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 附件ID*/
public static final String QUERY = "HGWD001B.query"; public static final String QUERY = "HGWD001B.query";
public static final String COUNT = "HGWD001B.count"; public static final String COUNT = "HGWD001B.count";
...@@ -62,6 +64,7 @@ public class HGWD001B extends DaoEPBase { ...@@ -62,6 +64,7 @@ public class HGWD001B extends DaoEPBase {
private String updatedTime = " "; /* 记录修改时间*/ private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/ private Integer deleteFlag; /* 0-未删除,1-已删除*/
private String fileId = " "; /* 文件ID*/ private String fileId = " "; /* 文件ID*/
private String docId = " "; /* 附件ID*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -113,8 +116,11 @@ public class HGWD001B extends DaoEPBase { ...@@ -113,8 +116,11 @@ public class HGWD001B extends DaoEPBase {
eiColumn = new EiColumn(FIELD_FILE_ID); eiColumn = new EiColumn(FIELD_FILE_ID);
eiColumn.setDescName("文件ID"); eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setDescName("附件ID");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -301,6 +307,22 @@ public class HGWD001B extends DaoEPBase { ...@@ -301,6 +307,22 @@ public class HGWD001B extends DaoEPBase {
this.fileId = fileId; this.fileId = fileId;
} }
/** /**
* get the docId - 附件ID.
* @return the docId
*/
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public void setDocId(String docId) {
this.docId = docId;
}
/**
* get the value from Map. * get the value from Map.
* *
* @param map - source data map * @param map - source data map
...@@ -319,6 +341,7 @@ public class HGWD001B extends DaoEPBase { ...@@ -319,6 +341,7 @@ public class HGWD001B extends DaoEPBase {
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setFileId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_ID)), fileId)); setFileId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_ID)), fileId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
} }
/** /**
...@@ -339,6 +362,7 @@ public class HGWD001B extends DaoEPBase { ...@@ -339,6 +362,7 @@ public class HGWD001B extends DaoEPBase {
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG))); map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_FILE_ID, StringUtils.toString(fileId, eiMetadata.getMeta(FIELD_FILE_ID))); map.put(FIELD_FILE_ID, StringUtils.toString(fileId, eiMetadata.getMeta(FIELD_FILE_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
return map; return map;
} }
......
...@@ -32,6 +32,7 @@ public class HGWD001C extends DaoEPBase { ...@@ -32,6 +32,7 @@ public class HGWD001C extends DaoEPBase {
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/ public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/
public static final String FIELD_FILE_ID = "fileId"; /* 文件ID*/ public static final String FIELD_FILE_ID = "fileId"; /* 文件ID*/
public static final String FIELD_DOC_ID = "docId"; /* 附件ID*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
...@@ -44,6 +45,7 @@ public class HGWD001C extends DaoEPBase { ...@@ -44,6 +45,7 @@ public class HGWD001C extends DaoEPBase {
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/ public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/
public static final String COL_FILE_ID = "FILE_ID"; /* 文件ID*/ public static final String COL_FILE_ID = "FILE_ID"; /* 文件ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 附件ID*/
public static final String QUERY = "HGWD001C.query"; public static final String QUERY = "HGWD001C.query";
public static final String COUNT = "HGWD001C.count"; public static final String COUNT = "HGWD001C.count";
...@@ -62,6 +64,7 @@ public class HGWD001C extends DaoEPBase { ...@@ -62,6 +64,7 @@ public class HGWD001C extends DaoEPBase {
private String updatedTime = " "; /* 记录修改时间*/ private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag; /* 0-未删除,1-已删除*/ private Integer deleteFlag; /* 0-未删除,1-已删除*/
private String fileId = " "; /* 文件ID*/ private String fileId = " "; /* 文件ID*/
private String docId = " "; /* 附件ID*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -113,7 +116,10 @@ public class HGWD001C extends DaoEPBase { ...@@ -113,7 +116,10 @@ public class HGWD001C extends DaoEPBase {
eiColumn = new EiColumn(FIELD_FILE_ID); eiColumn = new EiColumn(FIELD_FILE_ID);
eiColumn.setDescName("文件ID"); eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setDescName("附件ID");
eiMetadata.addMeta(eiColumn);
} }
...@@ -301,6 +307,22 @@ public class HGWD001C extends DaoEPBase { ...@@ -301,6 +307,22 @@ public class HGWD001C extends DaoEPBase {
this.fileId = fileId; this.fileId = fileId;
} }
/** /**
* get the docId - 附件ID.
* @return the docId
*/
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public void setDocId(String docId) {
this.docId = docId;
}
/**
* get the value from Map. * get the value from Map.
* *
* @param map - source data map * @param map - source data map
...@@ -319,6 +341,7 @@ public class HGWD001C extends DaoEPBase { ...@@ -319,6 +341,7 @@ public class HGWD001C extends DaoEPBase {
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setFileId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_ID)), fileId)); setFileId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_ID)), fileId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
} }
/** /**
...@@ -339,6 +362,7 @@ public class HGWD001C extends DaoEPBase { ...@@ -339,6 +362,7 @@ public class HGWD001C extends DaoEPBase {
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG))); map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_FILE_ID, StringUtils.toString(fileId, eiMetadata.getMeta(FIELD_FILE_ID))); map.put(FIELD_FILE_ID, StringUtils.toString(fileId, eiMetadata.getMeta(FIELD_FILE_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
return map; return map;
} }
......
package com.baosight.hggp.hg.wd.domain;
import com.baosight.iplat4j.core.data.DaoEPBase;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
/**
* Project: <br>
* Title:Hgwd001.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-08-19 14:34:38 create
*/
public class HGWD002 extends DaoEPBase {
private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id";
public static final String FIELD_ACCOUNT_CODE = "accountCode"; /* 企业编码*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 记录创建者*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 记录创建名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 记录创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 记录修改者*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 记录修改名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 记录修改时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 0-未删除,1-已删除*/
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 公司编码*/
public static final String FIELD_COMPANY_NAME = "companyName"; /* 公司名称*/
public static final String FIELD_PROJ_CODE = "projCode"; /* 项目编码*/
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_FILE_ID = "fileId"; /* 文件ID*/
public static final String FIELD_FILE_TYPE = "fileType"; /* 文件类型*/
public static final String FIELD_FILE_NAME = "fileName"; /* 文件名称*/
public static final String FIELD_DOC_ID = "docId"; /* 文件号*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件附件名称*/
public static final String FIELD_DOC_VERSION = "docVersion"; /* 文件版本号*/
public static final String FIELD_STATUS = "status"; /* 状态*/
public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_RELEASE_DATE = "releaseDate"; /* 发布时间*/
public static final String FIELD_PREVIEW_NUM = "previewNum"; /* 预览次数*/
public static final String FIELD_DOWNLOAD_NUM = "downloadNum"; /* 下载次数*/
public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 记录创建者*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 记录创建名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 记录创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 记录修改者*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 记录修改名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 0-未删除,1-已删除*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 公司编码*/
public static final String COL_COMPANY_NAME = "COMPANY_NAME"; /* 公司名称*/
public static final String COL_PROJ_CODE = "PROJ_CODE"; /* 项目编码*/
public static final String COL_PROJ_NAME = "PROJ_NAME"; /* 项目名称*/
public static final String COL_FILE_ID = "FILE_ID"; /* 文件ID*/
public static final String COL_FILE_TYPE = "FILE_TYPE"; /* 文件类型*/
public static final String COL_FILE_NAME = "FILE_NAME"; /* 文件名称*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件号*/
public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件附件名称*/
public static final String COL_DOC_VERSION = "DOC_VERSION"; /* 文件版本号*/
public static final String COL_STATUS = "STATUS"; /* 状态*/
public static final String COL_REMARK = "REMARK"; /* 备注*/
public static final String COL_RELEASE_DATE = "RELEASE_DATE"; /* 发布时间*/
public static final String COL_PREVIEW_NUM = "PREVIEW_NUM"; /* 预览次数*/
public static final String COL_DOWNLOAD_NUM = "DOWNLOAD_NUM"; /* 下载次数*/
public static final String QUERY = "HGWD002.query";
public static final String COUNT = "HGWD002.count";
public static final String INSERT = "HGWD002.insert";
public static final String UPDATE = "HGWD002.update";
public static final String DELETE = "HGWD002.delete";
private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/
private String depCode = " "; /* 部门编码*/
private String createdBy = " "; /* 记录创建者*/
private String createdName = " "; /* 记录创建名称*/
private String createdTime = " "; /* 记录创建时间*/
private String updatedBy = " "; /* 记录修改者*/
private String updatedName = " "; /* 记录修改名称*/
private String updatedTime = " "; /* 记录修改时间*/
private Integer deleteFlag = 0; /* 0-未删除,1-已删除*/
private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/
private String projCode = " "; /* 项目编码*/
private String projName = " "; /* 项目名称*/
private String fileId = " "; /* 文件ID*/
private String fileType = " "; /* 文件类型*/
private String fileName = " "; /* 文件名称*/
private String docId = " "; /* 文件号*/
private String docName = " "; /* 文件附件名称*/
private Integer docVersion = new Integer(0); /* 文件版本号*/
private Integer status = 0; /* 状态*/
private String remark = " "; /* 备注*/
private String releaseDate = " "; /* 发布时间*/
private Integer previewNum = new Integer(0); /* 预览次数*/
private Integer downloadNum = new Integer(0); /* 下载次数*/
/**
* initialize the metadata.
*/
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn(FIELD_ID);
eiColumn.setPrimaryKey(true);
eiColumn.setDescName(" ");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_ACCOUNT_CODE);
eiColumn.setDescName("企业编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("记录创建者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_NAME);
eiColumn.setDescName("记录创建名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_TIME);
eiColumn.setDescName("记录创建时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_BY);
eiColumn.setDescName("记录修改者");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_NAME);
eiColumn.setDescName("记录修改名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_UPDATED_TIME);
eiColumn.setDescName("记录修改时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("0-未删除,1-已删除");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_CODE);
eiColumn.setDescName("公司编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_COMPANY_NAME);
eiColumn.setDescName("公司名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_CODE);
eiColumn.setDescName("项目编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PROJ_NAME);
eiColumn.setDescName("项目名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_ID);
eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_TYPE);
eiColumn.setDescName("文件类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_NAME);
eiColumn.setDescName("文件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_ID);
eiColumn.setDescName("文件号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_NAME);
eiColumn.setDescName("文件附件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_VERSION);
eiColumn.setDescName("文件版本号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_STATUS);
eiColumn.setDescName("状态");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARK);
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_RELEASE_DATE);
eiColumn.setDescName("发布时间");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_PREVIEW_NUM);
eiColumn.setDescName("预览次数");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOWNLOAD_NUM);
eiColumn.setDescName("下载次数");
eiMetadata.addMeta(eiColumn);
}
/**
* the constructor.
*/
public HGWD002() {
initMetaData();
}
/**
* get the id .
* @return the id
*/
public Long getId() {
return this.id;
}
/**
* set the id .
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* get the accountCode - 企业编码.
* @return the accountCode
*/
public String getAccountCode() {
return this.accountCode;
}
/**
* set the accountCode - 企业编码.
*
* @param accountCode - 企业编码
*/
public void setAccountCode(String accountCode) {
this.accountCode = accountCode;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public String getDepCode() {
return this.depCode;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/**
* get the createdBy - 记录创建者.
* @return the createdBy
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
* set the createdBy - 记录创建者.
*
* @param createdBy - 记录创建者
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* get the createdName - 记录创建名称.
* @return the createdName
*/
public String getCreatedName() {
return this.createdName;
}
/**
* set the createdName - 记录创建名称.
*
* @param createdName - 记录创建名称
*/
public void setCreatedName(String createdName) {
this.createdName = createdName;
}
/**
* get the createdTime - 记录创建时间.
* @return the createdTime
*/
public String getCreatedTime() {
return this.createdTime;
}
/**
* set the createdTime - 记录创建时间.
*
* @param createdTime - 记录创建时间
*/
public void setCreatedTime(String createdTime) {
this.createdTime = createdTime;
}
/**
* get the updatedBy - 记录修改者.
* @return the updatedBy
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
* set the updatedBy - 记录修改者.
*
* @param updatedBy - 记录修改者
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
* get the updatedName - 记录修改名称.
* @return the updatedName
*/
public String getUpdatedName() {
return this.updatedName;
}
/**
* set the updatedName - 记录修改名称.
*
* @param updatedName - 记录修改名称
*/
public void setUpdatedName(String updatedName) {
this.updatedName = updatedName;
}
/**
* get the updatedTime - 记录修改时间.
* @return the updatedTime
*/
public String getUpdatedTime() {
return this.updatedTime;
}
/**
* set the updatedTime - 记录修改时间.
*
* @param updatedTime - 记录修改时间
*/
public void setUpdatedTime(String updatedTime) {
this.updatedTime = updatedTime;
}
/**
* get the deleteFlag - 0-未删除,1-已删除.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 0-未删除,1-已删除.
*
* @param deleteFlag - 0-未删除,1-已删除
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the companyCode - 公司编码.
* @return the companyCode
*/
public String getCompanyCode() {
return this.companyCode;
}
/**
* set the companyCode - 公司编码.
*
* @param companyCode - 公司编码
*/
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/**
* get the companyName - 公司名称.
* @return the companyName
*/
public String getCompanyName() {
return this.companyName;
}
/**
* set the companyName - 公司名称.
*
* @param companyName - 公司名称
*/
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/**
* get the projCode - 项目编码.
* @return the projCode
*/
public String getProjCode() {
return this.projCode;
}
/**
* set the projCode - 项目编码.
*
* @param projCode - 项目编码
*/
public void setProjCode(String projCode) {
this.projCode = projCode;
}
/**
* get the projName - 项目名称.
* @return the projName
*/
public String getProjName() {
return this.projName;
}
/**
* set the projName - 项目名称.
*
* @param projName - 项目名称
*/
public void setProjName(String projName) {
this.projName = projName;
}
/**
* get the fileId - 文件ID.
* @return the fileId
*/
public String getFileId() {
return this.fileId;
}
/**
* set the fileId - 文件ID.
*
* @param fileId - 文件ID
*/
public void setFileId(String fileId) {
this.fileId = fileId;
}
/**
* get the fileType - 文件类型.
* @return the fileType
*/
public String getFileType() {
return this.fileType;
}
/**
* set the fileType - 文件类型.
*
* @param fileType - 文件类型
*/
public void setFileType(String fileType) {
this.fileType = fileType;
}
/**
* get the fileName - 文件名称.
* @return the fileName
*/
public String getFileName() {
return this.fileName;
}
/**
* set the fileName - 文件名称.
*
* @param fileName - 文件名称
*/
public void setFileName(String fileName) {
this.fileName = fileName;
}
/**
* get the docId - 文件号.
* @return the docId
*/
public String getDocId() {
return this.docId;
}
/**
* set the docId - 文件号.
*
* @param docId - 文件号
*/
public void setDocId(String docId) {
this.docId = docId;
}
/**
* get the docName - 文件附件名称.
* @return the docName
*/
public String getDocName() {
return this.docName;
}
/**
* set the docName - 文件附件名称.
*
* @param docName - 文件附件名称
*/
public void setDocName(String docName) {
this.docName = docName;
}
/**
* get the docVersion - 文件版本号.
* @return the docVersion
*/
public Integer getDocVersion() {
return this.docVersion;
}
/**
* set the docVersion - 文件版本号.
*
* @param docVersion - 文件版本号
*/
public void setDocVersion(Integer docVersion) {
this.docVersion = docVersion;
}
/**
* get the status - 状态.
* @return the status
*/
public Integer getStatus() {
return this.status;
}
/**
* set the status - 状态.
*
* @param status - 状态
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* get the remark - 备注.
* @return the remark
*/
public String getRemark() {
return this.remark;
}
/**
* set the remark - 备注.
*
* @param remark - 备注
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* get the releaseDate - 发布时间.
* @return the releaseDate
*/
public String getReleaseDate() {
return this.releaseDate;
}
/**
* set the releaseDate - 发布时间.
*
* @param releaseDate - 发布时间
*/
public void setReleaseDate(String releaseDate) {
this.releaseDate = releaseDate;
}
/**
* get the previewNum - 预览次数.
* @return the previewNum
*/
public Integer getPreviewNum() {
return this.previewNum;
}
/**
* set the previewNum - 预览次数.
*
* @param previewNum - 预览次数
*/
public void setPreviewNum(Integer previewNum) {
this.previewNum = previewNum;
}
/**
* get the downloadNum - 下载次数.
* @return the downloadNum
*/
public Integer getDownloadNum() {
return this.downloadNum;
}
/**
* set the downloadNum - 下载次数.
*
* @param downloadNum - 下载次数
*/
public void setDownloadNum(Integer downloadNum) {
this.downloadNum = downloadNum;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public void fromMap(Map map) {
setId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_ID)), id));
setAccountCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_ACCOUNT_CODE)), accountCode));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setCompanyCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_CODE)), companyCode));
setCompanyName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_COMPANY_NAME)), companyName));
setProjCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_CODE)), projCode));
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setFileId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_ID)), fileId));
setFileType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_TYPE)), fileType));
setFileName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_NAME)), fileName));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
setDocVersion(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOC_VERSION)), docVersion));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setReleaseDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RELEASE_DATE)), releaseDate));
setPreviewNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PREVIEW_NUM)), previewNum));
setDownloadNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOWNLOAD_NUM)), downloadNum));
}
/**
* set the value to Map.
*/
@Override
public Map toMap() {
Map map = new HashMap();
map.put(FIELD_ID, StringUtils.toString(id, eiMetadata.getMeta(FIELD_ID)));
map.put(FIELD_ACCOUNT_CODE, StringUtils.toString(accountCode, eiMetadata.getMeta(FIELD_ACCOUNT_CODE)));
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_COMPANY_CODE, StringUtils.toString(companyCode, eiMetadata.getMeta(FIELD_COMPANY_CODE)));
map.put(FIELD_COMPANY_NAME, StringUtils.toString(companyName, eiMetadata.getMeta(FIELD_COMPANY_NAME)));
map.put(FIELD_PROJ_CODE, StringUtils.toString(projCode, eiMetadata.getMeta(FIELD_PROJ_CODE)));
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_FILE_ID, StringUtils.toString(fileId, eiMetadata.getMeta(FIELD_FILE_ID)));
map.put(FIELD_FILE_TYPE, StringUtils.toString(fileType, eiMetadata.getMeta(FIELD_FILE_TYPE)));
map.put(FIELD_FILE_NAME, StringUtils.toString(fileName, eiMetadata.getMeta(FIELD_FILE_NAME)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_DOC_VERSION, StringUtils.toString(docVersion, eiMetadata.getMeta(FIELD_DOC_VERSION)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put(FIELD_RELEASE_DATE, StringUtils.toString(releaseDate, eiMetadata.getMeta(FIELD_RELEASE_DATE)));
map.put(FIELD_PREVIEW_NUM, StringUtils.toString(previewNum, eiMetadata.getMeta(FIELD_PREVIEW_NUM)));
map.put(FIELD_DOWNLOAD_NUM, StringUtils.toString(downloadNum, eiMetadata.getMeta(FIELD_DOWNLOAD_NUM)));
return map;
}
}
...@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.wd.service; ...@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.wd.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.wd.constant.HgWdConstant; import com.baosight.hggp.hg.wd.constant.HgWdConstant;
import com.baosight.hggp.hg.wd.domain.HGWD001; import com.baosight.hggp.hg.wd.domain.HGWD001;
import com.baosight.hggp.hg.wd.domain.HGWD001B; import com.baosight.hggp.hg.wd.domain.HGWD001B;
...@@ -92,7 +93,7 @@ public class ServiceHGWD001B extends ServiceBase { ...@@ -92,7 +93,7 @@ public class ServiceHGWD001B extends ServiceBase {
List<HGWD001B> fWd001bs = MapUtils.toDaoEPBases(inInfo, HGWD001B.class); List<HGWD001B> fWd001bs = MapUtils.toDaoEPBases(inInfo, HGWD001B.class);
for (HGWD001B fWd001b : fWd001bs) { for (HGWD001B fWd001b : fWd001bs) {
// 预览记录+1 // 预览记录+1
HGWDTools.HgWd001.previewIncr(fWd001b.getFileId()); HGCWTools.HgCw999.previewIncr(fWd001b.getDocId());
// 新增 // 新增
DaoUtils.insert(HGWD001B.INSERT, fWd001b); DaoUtils.insert(HGWD001B.INSERT, fWd001b);
} }
......
...@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.wd.service; ...@@ -2,6 +2,7 @@ package com.baosight.hggp.hg.wd.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.wd.domain.HGWD001; import com.baosight.hggp.hg.wd.domain.HGWD001;
import com.baosight.hggp.hg.wd.domain.HGWD001B; import com.baosight.hggp.hg.wd.domain.HGWD001B;
import com.baosight.hggp.hg.wd.domain.HGWD001C; import com.baosight.hggp.hg.wd.domain.HGWD001C;
...@@ -89,7 +90,7 @@ public class ServiceHGWD001C extends ServiceBase { ...@@ -89,7 +90,7 @@ public class ServiceHGWD001C extends ServiceBase {
List<HGWD001C> fWd001cs = MapUtils.toDaoEPBases(inInfo, HGWD001C.class); List<HGWD001C> fWd001cs = MapUtils.toDaoEPBases(inInfo, HGWD001C.class);
for (HGWD001C fWd001c : fWd001cs) { for (HGWD001C fWd001c : fWd001cs) {
// 下载记录+1 // 下载记录+1
HGWDTools.HgWd001.downloadIncr(fWd001c.getFileId()); HGCWTools.HgCw999.downloadIncr(fWd001c.getDocId());
// 新增 // 新增
DaoUtils.insert(HGWD001C.INSERT, fWd001c); DaoUtils.insert(HGWD001C.INSERT, fWd001c);
} }
......
...@@ -13,6 +13,7 @@ import com.baosight.hggp.hg.kc.tools.HGKCTools; ...@@ -13,6 +13,7 @@ import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.kc.utils.HGKCUtils; import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.wd.constant.HgWdConstant; import com.baosight.hggp.hg.wd.constant.HgWdConstant;
import com.baosight.hggp.hg.wd.domain.HGWD001; import com.baosight.hggp.hg.wd.domain.HGWD001;
import com.baosight.hggp.hg.wd.domain.HGWD002;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
...@@ -48,7 +49,7 @@ public class ServiceHGWD002 extends ServiceBase { ...@@ -48,7 +49,7 @@ public class ServiceHGWD002 extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID)); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROJ_RECORD_BLOCK_ID));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGWD001().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGWD002().eiMetadata);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
...@@ -68,7 +69,7 @@ public class ServiceHGWD002 extends ServiceBase { ...@@ -68,7 +69,7 @@ public class ServiceHGWD002 extends ServiceBase {
Map queryRow = EiInfoUtils.getFirstRow(inInfo); Map queryRow = EiInfoUtils.getFirstRow(inInfo);
// 仅查询已发布的文件 // 仅查询已发布的文件
queryRow.put(HGWD001.FIELD_STATUS, HgWdConstant.FileStatus.S_1); queryRow.put(HGWD001.FIELD_STATUS, HgWdConstant.FileStatus.S_1);
inInfo = super.query(inInfo, HGWD001.QUERY, new HGWD001()); inInfo = super.query(inInfo, HGWD002.QUERY, new HGWD002());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
......
...@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.wd.service; ...@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.wd.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.ChangeTypeEnum; import com.baosight.hggp.common.ChangeTypeEnum;
import com.baosight.hggp.core.constant.CommonConstant; import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.constant.S3Constant;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW999; import com.baosight.hggp.hg.cw.domain.HGCW999;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
...@@ -60,8 +61,7 @@ public class ServiceHGWD099 extends ServiceEPBase { ...@@ -60,8 +61,7 @@ public class ServiceHGWD099 extends ServiceEPBase {
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
// 项目环境 // 项目环境
String projectEnv = ProjectInfo.getProjectEnv(); if (CommonConstant.FileLocation.S3.equalsIgnoreCase(S3Constant.FILE_LOCATION)) {
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
inInfo = super.query(inInfo, "HGCW999.queryRun", new HGCW999()); inInfo = super.query(inInfo, "HGCW999.queryRun", new HGCW999());
} else { } else {
inInfo = super.query(inInfo, "HGCW999.queryDev", new HGCW999()); inInfo = super.query(inInfo, "HGCW999.queryDev", new HGCW999());
...@@ -80,8 +80,7 @@ public class ServiceHGWD099 extends ServiceEPBase { ...@@ -80,8 +80,7 @@ public class ServiceHGWD099 extends ServiceEPBase {
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
map.put("docId",docId); map.put("docId",docId);
// 项目环境 // 项目环境
String projectEnv = ProjectInfo.getProjectEnv(); if (CommonConstant.FileLocation.S3.equalsIgnoreCase(S3Constant.FILE_LOCATION)) {
if (CommonConstant.projectEnv.RUN.equalsIgnoreCase(projectEnv)) {
list = this.dao.query("HGCW999.queryRun",map); list = this.dao.query("HGCW999.queryRun",map);
} else { } else {
list = this.dao.query("HGCW999.queryDev",map); list = this.dao.query("HGCW999.queryDev",map);
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
UPDATED_NAME as "updatedName", <!-- 记录修改名称 --> UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 --> UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 --> DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
FILE_ID as "fileId" <!-- 文件ID --> FILE_ID as "fileId", <!-- 文件ID -->
DOC_ID as "docId" <!-- 附件ID -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -86,10 +87,11 @@ ...@@ -86,10 +87,11 @@
CREATED_NAME, <!-- 记录创建名称 --> CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 --> CREATED_TIME, <!-- 记录创建时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 --> DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
FILE_ID <!-- 文件ID --> FILE_ID, <!-- 文件ID -->
DOC_ID <!-- 附件ID -->
) VALUES ( ) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #fileId# #deleteFlag#, #fileId#, #docId#
) )
</insert> </insert>
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
UPDATED_NAME as "updatedName", <!-- 记录修改名称 --> UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 --> UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 --> DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
FILE_ID as "fileId" <!-- 文件ID --> FILE_ID as "fileId", <!-- 文件ID -->
DOC_ID as "docId" <!-- 附件ID -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -86,10 +87,11 @@ ...@@ -86,10 +87,11 @@
CREATED_NAME, <!-- 记录创建名称 --> CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 --> CREATED_TIME, <!-- 记录创建时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 --> DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
FILE_ID <!-- 文件ID --> FILE_ID, <!-- 文件ID -->
DOC_ID <!-- 附件ID -->
) VALUES ( ) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #fileId# #deleteFlag#, #fileId#, #docId#
) )
</insert> </insert>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGWD002">
<sql id="column">
A.ID as "id",
A.ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
A.DEP_CODE as "depCode", <!-- 部门编码 -->
A.DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
A.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
A.COMPANY_NAME as "companyName", <!-- 公司名称 -->
A.PROJ_CODE as "projCode", <!-- 项目编码 -->
A.PROJ_NAME as "projName", <!-- 项目名称 -->
A.FILE_ID as "fileId", <!-- 文件ID -->
A.FILE_TYPE as "fileType", <!-- 文件类型 -->
A.FILE_NAME as "fileName", <!-- 文件名称 -->
A.DOC_VERSION as "docVersion", <!-- 文件版本号 -->
A.RELEASE_DATE as "releaseDate", <!-- 发布时间 -->
B.DOC_ID as "docId", <!-- 文件号 -->
B.DOC_NAME as "docName", <!-- 文件附件名称 -->
B.PREVIEW_NUM as "previewNum", <!-- 预览次数 -->
B.DOWNLOAD_NUM as "downloadNum" <!-- 下载次数 -->
</sql>
<sql id="condition">
AND A.DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
A.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
A.COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="fileId">
A.FILE_ID = #fileId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="fileType">
A.FILE_TYPE = #fileType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="fileName">
A.FILE_NAME LIKE CONCAT('%', #fileName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
A.STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docId">
B.DOC_ID = #docId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="docName">
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
A.ID DESC, B.ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hggp.hg.wd.domain.HGWD002">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGWD001 A
INNER JOIN ${hggpSchema}.HGCW999 B ON A.ID = B.MAT_ID
WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*)
FROM ${hggpSchema}.HGWD001 A
INNER JOIN ${hggpSchema}.HGCW999 B ON A.ID = B.MAT_ID
WHERE 1=1
<include refid="condition"/>
</select>
</sqlMap>
...@@ -48,30 +48,6 @@ public class HGWDTools { ...@@ -48,30 +48,6 @@ public class HGWDTools {
return CollectionUtils.isEmpty(results) ? null : results.get(0); return CollectionUtils.isEmpty(results) ? null : results.get(0);
} }
/**
* 预览记录自增
*
* @param fileId
*/
public static void previewIncr(String fileId) {
AssertUtils.isEmpty(fileId, "文件ID不能为空");
Map queryMap = new HashMap();
queryMap.put(HGWD001.FIELD_FILE_ID, fileId);
DaoUtils.update(HgWdSqlConstant.HgWd001.PREVIEW_INCR, queryMap);
}
/**
* 下载记录自增
*
* @param fileId
*/
public static void downloadIncr(String fileId) {
AssertUtils.isEmpty(fileId, "文件ID不能为空");
Map queryMap = new HashMap();
queryMap.put(HGWD001.FIELD_FILE_ID, fileId);
DaoUtils.update(HgWdSqlConstant.HgWd001.DOWNLOAD_INCR, queryMap);
}
public static void add(HGWD001A hgwd001a) { public static void add(HGWD001A hgwd001a) {
AssertUtils.isNull(hgwd001a, "文档对象不能为空"); AssertUtils.isNull(hgwd001a, "文档对象不能为空");
DaoUtils.insert(HGWD001A.INSERT, hgwd001a); DaoUtils.insert(HGWD001A.INSERT, hgwd001a);
......
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW015.xml"/> <sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW015.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW016.xml"/> <sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW016.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW017.xml"/> <sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW017.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW999.xml"/>
<!--配置--> <!--配置-->
<sqlMap resource="com/baosight/hggp/hg/pz/sql/HGPZ005.xml"/> <sqlMap resource="com/baosight/hggp/hg/pz/sql/HGPZ005.xml"/>
......
...@@ -17,6 +17,7 @@ $(function () { ...@@ -17,6 +17,7 @@ $(function () {
console.log($("#inqu_status-0-bizType").val()) console.log($("#inqu_status-0-bizType").val())
var data = { var data = {
docId: docId, docId: docId,
docName: e.response.docName,
matId: matId, matId: matId,
bizType: bizType bizType: bizType
} }
......
...@@ -66,6 +66,7 @@ function uploadFileCallback(data) { ...@@ -66,6 +66,7 @@ function uploadFileCallback(data) {
let inEiInfo = new EiInfo(); let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", data.matId); inEiInfo.set("result-0-matId", data.matId);
inEiInfo.set("result-0-docId", data.docId); inEiInfo.set("result-0-docId", data.docId);
inEiInfo.set("result-0-docName", data.docName);
inEiInfo.set("result-0-bizType", data.bizType); inEiInfo.set("result-0-bizType", data.bizType);
EiCommunicator.send('HGCW999', 'insert', inEiInfo, { EiCommunicator.send('HGCW999', 'insert', inEiInfo, {
onSuccess(response) { onSuccess(response) {
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="fileName" cname="文件名" enable="false" width="100" align="left"/> <EF:EFColumn ename="fileName" cname="文件名" enable="false" width="100" align="left"/>
<EF:EFColumn ename="docVersion" cname="版本号" enable="false" width="100" align="center"/> <EF:EFColumn ename="docVersion" cname="版本号" enable="false" width="100" align="center"/>
<EF:EFColumn ename="docId" cname="文件号" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="docId" cname="附件ID" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="docName" cname="文件附件名称" enable="false" width="100" align="left"/> <EF:EFColumn ename="docName" cname="附件名称" enable="false" width="100" align="left"/>
<EF:EFColumn ename="previewNum" cname="预览次数" enable="false" width="100" align="right"/> <EF:EFColumn ename="previewNum" cname="预览次数" enable="false" width="100" align="right"/>
<EF:EFColumn ename="downloadNum" cname="下载次数" enable="false" width="100" align="right"/> <EF:EFColumn ename="downloadNum" cname="下载次数" enable="false" width="100" align="right"/>
</EF:EFGrid> </EF:EFGrid>
......
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