Commit e1bfde27 by liuyang

图文管理功能调整

parent a00cdaff
...@@ -51,7 +51,21 @@ public enum ProjectSourceEnum { ...@@ -51,7 +51,21 @@ public enum ProjectSourceEnum {
} }
return null; return null;
} }
/**
* 根据编码查询
* @param code
* @return
*/
public static ProjectSourceEnum getByCode(String code) {
for (ProjectSourceEnum value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}
ProjectSourceEnum(String code, String name) { ProjectSourceEnum(String code, String name) {
this.code = code; this.code = code;
this.name = name; this.name = name;
......
...@@ -24,6 +24,10 @@ public class HgWdSqlConstant { ...@@ -24,6 +24,10 @@ public class HgWdSqlConstant {
public static final String UPDATE_PROJECT = "HGWD001.updateProject"; public static final String UPDATE_PROJECT = "HGWD001.updateProject";
// 查询所以 // 查询所以
public static final String QUERY_ALL = "HGWD001.queryAll"; public static final String QUERY_ALL = "HGWD001.queryAll";
// 查询子节点
public static final String QUERY_FILE_CHILD = "HGWD001.queryFileChild";
public static final String UPDATE_FILE_PATH = "HGWD001.updateFilePath";
} }
/** /**
......
...@@ -45,6 +45,7 @@ public class HGWD001 extends DaoEPBase { ...@@ -45,6 +45,7 @@ public class HGWD001 extends DaoEPBase {
public static final String FIELD_STATUS = "status"; /* 状态*/ public static final String FIELD_STATUS = "status"; /* 状态*/
public static final String FIELD_REMARK = "remark"; /* 备注*/ public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_RELEASE_DATE = "releaseDate"; /* 发布时间*/ public static final String FIELD_RELEASE_DATE = "releaseDate"; /* 发布时间*/
public static final String FIELD_FILE_PATH = "filePath"; /* 文件路径*/
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"; /* 企业编码*/
...@@ -102,6 +103,7 @@ public class HGWD001 extends DaoEPBase { ...@@ -102,6 +103,7 @@ public class HGWD001 extends DaoEPBase {
private Integer status = 0; /* 状态*/ private Integer status = 0; /* 状态*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
private String releaseDate = " "; /* 发布时间*/ private String releaseDate = " "; /* 发布时间*/
private String filePath = " ";
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -206,7 +208,9 @@ public class HGWD001 extends DaoEPBase { ...@@ -206,7 +208,9 @@ public class HGWD001 extends DaoEPBase {
eiColumn.setDescName("发布时间"); eiColumn.setDescName("发布时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_PATH);
eiColumn.setDescName("文件路径");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -591,6 +595,14 @@ public class HGWD001 extends DaoEPBase { ...@@ -591,6 +595,14 @@ public class HGWD001 extends DaoEPBase {
public void setReleaseDate(String releaseDate) { public void setReleaseDate(String releaseDate) {
this.releaseDate = releaseDate; this.releaseDate = releaseDate;
} }
public String getFilePath() {
return filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -623,6 +635,7 @@ public class HGWD001 extends DaoEPBase { ...@@ -623,6 +635,7 @@ public class HGWD001 extends DaoEPBase {
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status)); setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setReleaseDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RELEASE_DATE)), releaseDate)); setReleaseDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RELEASE_DATE)), releaseDate));
setFilePath(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH)), filePath));
} }
/** /**
...@@ -656,6 +669,7 @@ public class HGWD001 extends DaoEPBase { ...@@ -656,6 +669,7 @@ public class HGWD001 extends DaoEPBase {
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS))); 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_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put(FIELD_RELEASE_DATE, StringUtils.toString(releaseDate, eiMetadata.getMeta(FIELD_RELEASE_DATE))); map.put(FIELD_RELEASE_DATE, StringUtils.toString(releaseDate, eiMetadata.getMeta(FIELD_RELEASE_DATE)));
map.put(FIELD_FILE_PATH, StringUtils.toString(filePath, eiMetadata.getMeta(FIELD_FILE_PATH)));
return map; return map;
} }
......
...@@ -48,6 +48,7 @@ public class HGWD002 extends DaoEPBase { ...@@ -48,6 +48,7 @@ public class HGWD002 extends DaoEPBase {
public static final String FIELD_PREVIEW_NUM = "previewNum"; /* 预览次数*/ public static final String FIELD_PREVIEW_NUM = "previewNum"; /* 预览次数*/
public static final String FIELD_DOWNLOAD_NUM = "downloadNum"; /* 下载次数*/ public static final String FIELD_DOWNLOAD_NUM = "downloadNum"; /* 下载次数*/
public static final String FIELD_DOC_TYPE = "docType"; /* 文件类型*/ public static final String FIELD_DOC_TYPE = "docType"; /* 文件类型*/
public static final String FIELD_CHANGE_CONTENT = "changeContent"; /* 变更内容*/
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"; /* 企业编码*/
...@@ -107,6 +108,7 @@ public class HGWD002 extends DaoEPBase { ...@@ -107,6 +108,7 @@ public class HGWD002 extends DaoEPBase {
private Integer previewNum = new Integer(0); /* 预览次数*/ private Integer previewNum = new Integer(0); /* 预览次数*/
private Integer downloadNum = new Integer(0); /* 下载次数*/ private Integer downloadNum = new Integer(0); /* 下载次数*/
private String docType = " "; /* 文件类型*/ private String docType = " "; /* 文件类型*/
private String changeContent = " "; /* 变更内容*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -218,6 +220,10 @@ public class HGWD002 extends DaoEPBase { ...@@ -218,6 +220,10 @@ public class HGWD002 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_DOC_TYPE); eiColumn = new EiColumn(FIELD_DOC_TYPE);
eiColumn.setDescName("文件类型"); eiColumn.setDescName("文件类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CHANGE_CONTENT);
eiColumn.setDescName("变更内容");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -635,6 +641,23 @@ public class HGWD002 extends DaoEPBase { ...@@ -635,6 +641,23 @@ public class HGWD002 extends DaoEPBase {
public void setDocType(String docType) { public void setDocType(String docType) {
this.docType = docType; this.docType = docType;
} }
/**
* get the changeContent - 变更内容.
* @return the changeContent
*/
public String getChangeContent() {
return this.changeContent;
}
/**
* set the changeContent - 变更内容.
*
* @param changeContent - 变更内容
*/
public void setChangeContent(String changeContent) {
this.changeContent = changeContent;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -669,6 +692,7 @@ public class HGWD002 extends DaoEPBase { ...@@ -669,6 +692,7 @@ public class HGWD002 extends DaoEPBase {
setPreviewNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PREVIEW_NUM)), previewNum)); setPreviewNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PREVIEW_NUM)), previewNum));
setDownloadNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOWNLOAD_NUM)), downloadNum)); setDownloadNum(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOWNLOAD_NUM)), downloadNum));
setDocType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_TYPE)), docType)); setDocType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_TYPE)), docType));
setChangeContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHANGE_CONTENT)), changeContent));
} }
/** /**
...@@ -704,6 +728,7 @@ public class HGWD002 extends DaoEPBase { ...@@ -704,6 +728,7 @@ public class HGWD002 extends DaoEPBase {
map.put(FIELD_PREVIEW_NUM, StringUtils.toString(previewNum, eiMetadata.getMeta(FIELD_PREVIEW_NUM))); 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))); map.put(FIELD_DOWNLOAD_NUM, StringUtils.toString(downloadNum, eiMetadata.getMeta(FIELD_DOWNLOAD_NUM)));
map.put(FIELD_DOC_TYPE, StringUtils.toString(docType, eiMetadata.getMeta(FIELD_DOC_TYPE))); map.put(FIELD_DOC_TYPE, StringUtils.toString(docType, eiMetadata.getMeta(FIELD_DOC_TYPE)));
map.put(FIELD_CHANGE_CONTENT, StringUtils.toString(changeContent, eiMetadata.getMeta(FIELD_CHANGE_CONTENT)));
return map; return map;
} }
......
...@@ -38,6 +38,8 @@ public class HGWD099 extends DaoEPBase { ...@@ -38,6 +38,8 @@ public class HGWD099 extends DaoEPBase {
public static final String FIELD_DOC_VERSION = "docVersion"; /* 文件版本号*/ public static final String FIELD_DOC_VERSION = "docVersion"; /* 文件版本号*/
public static final String FIELD_DOC_TYPE = "docType"; /* 文件类型*/ public static final String FIELD_DOC_TYPE = "docType"; /* 文件类型*/
public static final String FIELD_OPER_STATUS = "operStatus"; /* 是否变更 0-否 1-是*/ public static final String FIELD_OPER_STATUS = "operStatus"; /* 是否变更 0-否 1-是*/
public static final String FIELD_CHANGE_CONTENT = "changeContent"; /* 变更内容*/
public static final String FIELD_FILE_PATH = "filePath"; /* 文件路径*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
...@@ -87,6 +89,8 @@ public class HGWD099 extends DaoEPBase { ...@@ -87,6 +89,8 @@ public class HGWD099 extends DaoEPBase {
private Integer docVersion = new Integer(0); /* 文件版本号*/ private Integer docVersion = new Integer(0); /* 文件版本号*/
private String docType = " "; /* 文件类型*/ private String docType = " "; /* 文件类型*/
private Integer operStatus = new Integer(0); private Integer operStatus = new Integer(0);
private String changeContent = " "; /* 变更内容*/
private String filePath = " ";
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -178,6 +182,14 @@ public class HGWD099 extends DaoEPBase { ...@@ -178,6 +182,14 @@ public class HGWD099 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_OPER_STATUS); eiColumn = new EiColumn(FIELD_OPER_STATUS);
eiColumn.setDescName("操作状态"); eiColumn.setDescName("操作状态");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CHANGE_CONTENT);
eiColumn.setDescName("变更内容");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_FILE_PATH);
eiColumn.setDescName("文件路径");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -486,6 +498,31 @@ public class HGWD099 extends DaoEPBase { ...@@ -486,6 +498,31 @@ public class HGWD099 extends DaoEPBase {
} }
/** /**
* get the changeContent - 变更内容.
* @return the changeContent
*/
public String getChangeContent() {
return this.changeContent;
}
/**
* set the changeContent - 变更内容.
*
* @param changeContent - 变更内容
*/
public void setChangeContent(String changeContent) {
this.changeContent = changeContent;
}
public String getFilePath() {
return filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
/**
* get the value from Map. * get the value from Map.
* *
* @param map - source data map * @param map - source data map
...@@ -514,6 +551,8 @@ public class HGWD099 extends DaoEPBase { ...@@ -514,6 +551,8 @@ public class HGWD099 extends DaoEPBase {
setReleaseDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RELEASE_DATE)), releaseDate)); setReleaseDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RELEASE_DATE)), releaseDate));
setDocType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_TYPE)), docType)); setDocType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_TYPE)), docType));
setOperStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_OPER_STATUS)), operStatus)); setOperStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_OPER_STATUS)), operStatus));
setChangeContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CHANGE_CONTENT)), changeContent));
setFilePath(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH)), filePath));
} }
/** /**
...@@ -544,6 +583,8 @@ public class HGWD099 extends DaoEPBase { ...@@ -544,6 +583,8 @@ public class HGWD099 extends DaoEPBase {
map.put(FIELD_RELEASE_DATE, StringUtils.toString(releaseDate, eiMetadata.getMeta(FIELD_RELEASE_DATE))); map.put(FIELD_RELEASE_DATE, StringUtils.toString(releaseDate, eiMetadata.getMeta(FIELD_RELEASE_DATE)));
map.put(FIELD_DOC_TYPE, StringUtils.toString(docType, eiMetadata.getMeta(FIELD_DOC_TYPE))); map.put(FIELD_DOC_TYPE, StringUtils.toString(docType, eiMetadata.getMeta(FIELD_DOC_TYPE)));
map.put(FIELD_OPER_STATUS, StringUtils.toString(operStatus, eiMetadata.getMeta(FIELD_OPER_STATUS))); map.put(FIELD_OPER_STATUS, StringUtils.toString(operStatus, eiMetadata.getMeta(FIELD_OPER_STATUS)));
map.put(FIELD_CHANGE_CONTENT, StringUtils.toString(changeContent, eiMetadata.getMeta(FIELD_CHANGE_CONTENT)));
map.put(FIELD_FILE_PATH, StringUtils.toString(filePath, eiMetadata.getMeta(FIELD_FILE_PATH)));
return map; return map;
} }
......
...@@ -219,9 +219,6 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -219,9 +219,6 @@ public class ServiceHGWD001 extends ServiceEPBase {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
HGWD099 hgwd099 = new HGWD099(); HGWD099 hgwd099 = new HGWD099();
hgwd099.fromMap(map); hgwd099.fromMap(map);
if (hgwd099.getOperStatus() == 0){
hgwd099.setDocVersion(hgwd099.getDocVersion() + 1);
}
hgwd099.setStatus(HgWdConstant.FileStatus.S_1); hgwd099.setStatus(HgWdConstant.FileStatus.S_1);
hgwd099.setReleaseDate(DateUtils.shortDateTime()); hgwd099.setReleaseDate(DateUtils.shortDateTime());
hgwd099.setOperStatus(HgWdConstant.OperStatus.S_0); hgwd099.setOperStatus(HgWdConstant.OperStatus.S_0);
...@@ -308,13 +305,13 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -308,13 +305,13 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd099.setDocId(resultRow.get(HGWD099.FIELD_DOC_ID).toString()); hgwd099.setDocId(resultRow.get(HGWD099.FIELD_DOC_ID).toString());
hgwd099.setDocName(resultRow.get(HGWD099.FIELD_DOC_NAME).toString()); hgwd099.setDocName(resultRow.get(HGWD099.FIELD_DOC_NAME).toString());
hgwd099.setDocType(resultRow.get(HGWD099.FIELD_DOC_TYPE).toString()); hgwd099.setDocType(resultRow.get(HGWD099.FIELD_DOC_TYPE).toString());
hgwd099.setChangeContent(resultRow.get(HGWD099.FIELD_CHANGE_CONTENT).toString());
hgwd099.setStatus(HgWdConstant.FileStatus.S_0); hgwd099.setStatus(HgWdConstant.FileStatus.S_0);
hgwd099.setOperStatus(HgWdConstant.OperStatus.S_1); hgwd099.setOperStatus(HgWdConstant.OperStatus.S_1);
DaoUtils.insert(HGWD099.UPDATE, hgwd099); DaoUtils.insert(HGWD099.UPDATE, hgwd099);
if (Objects.nonNull(resultRow.get("changeContent")) || resultRow.get("changeContent").toString().trim().length()>0){ if (Objects.nonNull(resultRow.get("changeContent")) || resultRow.get("changeContent").toString().trim().length()>0){
HGWDTools.HgWd006.add(hgwd099, hgwd001, resultRow.get("changeContent").toString()); HGWDTools.HgWd006.add(hgwd099, hgwd001, resultRow.get("changeContent").toString());
} }
} }
//获取文件下的权限人员 //获取文件下的权限人员
List<HGWD003> listByFile = HGWDTools.HgWd003.listByFile(hgwd001.getFileId()); List<HGWD003> listByFile = HGWDTools.HgWd003.listByFile(hgwd001.getFileId());
...@@ -434,6 +431,7 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -434,6 +431,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
cleanBaseInfo(hgdm099); cleanBaseInfo(hgdm099);
hgdm099.setDeleteFlag(CommonConstant.YesNo.NO_0); hgdm099.setDeleteFlag(CommonConstant.YesNo.NO_0);
hgdm099.setBizId(hgwd001.getFileId()); hgdm099.setBizId(hgwd001.getFileId());
hgdm099.setFilePath(hgwd001.getFilePath());
hgdm099.setStatus(HgWdConstant.FileStatus.S_0); hgdm099.setStatus(HgWdConstant.FileStatus.S_0);
DaoUtils.insert(HGWD099.INSERT, hgdm099); DaoUtils.insert(HGWD099.INSERT, hgdm099);
strFileName.append(hgdm099.getDocName()).append(","); strFileName.append(hgdm099.getDocName()).append(",");
...@@ -516,6 +514,7 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -516,6 +514,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
if (!StringUtils.isNull(result2Rows)) { if (!StringUtils.isNull(result2Rows)) {
result2Rows.forEach(hgwd001 -> { result2Rows.forEach(hgwd001 -> {
hgwd001.setParentId(parentId); hgwd001.setParentId(parentId);
hgwd001.setFilePath(detail2Rows.get(0).getFilePath()+"/"+hgwd001.getFileName());
}); });
// 查询添加子节点 // 查询添加子节点
addNode(result2Rows); addNode(result2Rows);
...@@ -540,6 +539,7 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -540,6 +539,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd001s.forEach(o -> { hgwd001s.forEach(o -> {
if (o.getParentId().equals(hgwd001.getFileId())) { if (o.getParentId().equals(hgwd001.getFileId())) {
o.setParentId(fileId); o.setParentId(fileId);
o.setFilePath(hgwd001.getFilePath()+"/"+o.getFileName());
} }
}); });
} }
...@@ -563,6 +563,7 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -563,6 +563,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
cleanBaseInfo(hgwd099); cleanBaseInfo(hgwd099);
hgwd099.setDeleteFlag(CommonConstant.YesNo.NO_0); hgwd099.setDeleteFlag(CommonConstant.YesNo.NO_0);
hgwd099.setBizId(fileId); hgwd099.setBizId(fileId);
hgwd099.setFilePath(hgwd001.getFilePath());
hgwd099.setStatus(HgWdConstant.FileStatus.S_0); hgwd099.setStatus(HgWdConstant.FileStatus.S_0);
DaoUtils.insert(HGWD099.INSERT, hgwd099); DaoUtils.insert(HGWD099.INSERT, hgwd099);
strFileName.append(hgwd099.getDocName()).append(","); strFileName.append(hgwd099.getDocName()).append(",");
......
...@@ -10,6 +10,7 @@ import com.baosight.hggp.hg.sc.tools.HGSCTools; ...@@ -10,6 +10,7 @@ import com.baosight.hggp.hg.sc.tools.HGSCTools;
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.HGWD003; import com.baosight.hggp.hg.wd.domain.HGWD003;
import com.baosight.hggp.hg.wd.domain.HGWD099;
import com.baosight.hggp.hg.wd.tools.HGWDTools; import com.baosight.hggp.hg.wd.tools.HGWDTools;
import com.baosight.hggp.hg.wd.utils.HgWdUtils; import com.baosight.hggp.hg.wd.utils.HgWdUtils;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
...@@ -249,6 +250,7 @@ public class ServiceHGWD001D extends TreeService { ...@@ -249,6 +250,7 @@ public class ServiceHGWD001D extends TreeService {
Map leafMap = buildLeaf(parentId, label, text, HgWdConstant.LeafType.P); Map leafMap = buildLeaf(parentId, label, text, HgWdConstant.LeafType.P);
leafMap.put("type", "-1"); leafMap.put("type", "-1");
leafMap.put("leafLevel", "-1"); leafMap.put("leafLevel", "-1");
leafMap.put("filePath", text);
results.add(leafMap); results.add(leafMap);
} }
// 设置叶子节点 // 设置叶子节点
...@@ -269,6 +271,7 @@ public class ServiceHGWD001D extends TreeService { ...@@ -269,6 +271,7 @@ public class ServiceHGWD001D extends TreeService {
Map queryMap = new HashMap<>(); Map queryMap = new HashMap<>();
queryMap.put("ename", ename); queryMap.put("ename", ename);
queryMap.put("projectSource", parentId); queryMap.put("projectSource", parentId);
// 非管理员仅查询自己有权限的项目 // 非管理员仅查询自己有权限的项目
String userId = UserSessionUtils.getLoginName(); String userId = UserSessionUtils.getLoginName();
if (isAuth && !HgWdUtils.HgWd009.isManager(userId)) { if (isAuth && !HgWdUtils.HgWd009.isManager(userId)) {
...@@ -292,6 +295,7 @@ public class ServiceHGWD001D extends TreeService { ...@@ -292,6 +295,7 @@ public class ServiceHGWD001D extends TreeService {
leafMap.put("leafLevel", "0"); leafMap.put("leafLevel", "0");
leafMap.put("count", count); leafMap.put("count", count);
leafMap.put("isAuth", isAuth ? "1" : "0"); leafMap.put("isAuth", isAuth ? "1" : "0");
leafMap.put("filePath", ProjectSourceEnum.getByCode(parentId).getName()+"/"+text);
results.add(leafMap); results.add(leafMap);
} }
// 设置叶子节点 // 设置叶子节点
...@@ -326,16 +330,27 @@ public class ServiceHGWD001D extends TreeService { ...@@ -326,16 +330,27 @@ public class ServiceHGWD001D extends TreeService {
List<String> fileIds = dbWd001s.stream().map(HGWD001::getFileId).distinct().collect(Collectors.toList()); List<String> fileIds = dbWd001s.stream().map(HGWD001::getFileId).distinct().collect(Collectors.toList());
// 查询目录授权人数 // 查询目录授权人数
Map<String, List<HGWD003>> dbWd003Map = HGWDTools.HgWd003.map(fileIds); Map<String, List<HGWD003>> dbWd003Map = HGWDTools.HgWd003.map(fileIds);
Map<String, List<HGWD099>> fWd099s = HGWDTools.HgWd099.map(fileIds);
for (HGWD001 dbWd001 : dbWd001s) { for (HGWD001 dbWd001 : dbWd001s) {
Map leafMap = buildLeaf(parentId, dbWd001.getFileId(), dbWd001.getFileName(), HgWdConstant.LeafType.C); Map leafMap = buildLeaf(parentId, dbWd001.getFileId(), dbWd001.getFileName(), HgWdConstant.LeafType.C);
// 已授权人员信息 // 已授权人员信息
List<HGWD003> dbWd003s = dbWd003Map == null ? null : dbWd003Map.get(dbWd001.getFileId()); List<HGWD003> dbWd003s = dbWd003Map == null ? null : dbWd003Map.get(dbWd001.getFileId());
int dbWd099s = fWd099s.get(dbWd001.getFileId()) == null ? 0 : fWd099s.get(dbWd001.getFileId()).size();
int count = 0;
if (dbWd003s!=null && dbWd003s.size() > 0 && dbWd099s > 0){
count = 3;
}else if (dbWd003s!=null && dbWd003s.size() > 0){
count = 2;
}else if (dbWd099s > 0){
count = 1;
}
leafMap.put("projCode", dbWd001.getProjCode()); leafMap.put("projCode", dbWd001.getProjCode());
leafMap.put("projName", dbWd001.getProjName()); leafMap.put("projName", dbWd001.getProjName());
leafMap.put("ename", dbWd001.getProjCode()); leafMap.put("ename", dbWd001.getProjCode());
leafMap.put("type", dbWd001.getFileType()); leafMap.put("type", dbWd001.getFileType());
leafMap.put("leafLevel", dbWd001.getLeafLevel()); leafMap.put("leafLevel", dbWd001.getLeafLevel());
leafMap.put("count", dbWd003s == null ? 0 : dbWd003s.size()); leafMap.put("count", count);
leafMap.put("filePath",dbWd001.getFilePath());
if (!isManager && isSourceAuth) { if (!isManager && isSourceAuth) {
leafMap.put("isAuth", "1"); leafMap.put("isAuth", "1");
// 从已授权的信息中查找出自己 // 从已授权的信息中查找出自己
......
...@@ -16,9 +16,7 @@ import com.baosight.hggp.hg.wd.domain.HGWD001A; ...@@ -16,9 +16,7 @@ import com.baosight.hggp.hg.wd.domain.HGWD001A;
import com.baosight.hggp.hg.wd.domain.HGWD005; import com.baosight.hggp.hg.wd.domain.HGWD005;
import com.baosight.hggp.hg.wd.tools.HGWDTools; import com.baosight.hggp.hg.wd.tools.HGWDTools;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.*;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -69,8 +67,15 @@ public class ServiceHGWD001E extends ServiceEPBase { ...@@ -69,8 +67,15 @@ public class ServiceHGWD001E extends ServiceEPBase {
@OperationLogAnnotation(operModul = "文档库",operType = "保存",operDesc = "保存操作") @OperationLogAnnotation(operModul = "文档库",operType = "保存",operDesc = "保存操作")
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
Map<String,String> queryMap = EiInfoUtils.getFirstRow(inInfo);
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map<String, Object>> edcm01List = Iplat4jTools.EdCm01.list("hggp.hgwd.fileType"); List<Map<String, Object>> edcm01List = Iplat4jTools.EdCm01.getByCodesetMap("CODESET_CODE IN ('hggp.hgwd.fileType','app.sc.projectSource')");
HGWD001 wd001 = (HGWD001) this.dao.get(HGWD001.QUERY, HGWD001.FIELD_FILE_ID, queryMap.get(HGWD001.FIELD_PARENT_ID));
HGSC001 hgsc001 = new HGSC001();
if (wd001 == null){
hgsc001 = HGSCTools.Hgsc001.queryByCode(queryMap.get(HGWD001.FIELD_PARENT_ID));
}
Map<String, List<Map<String, Object>>> edcm01Map = edcm01List.stream().collect(Collectors.groupingBy(map -> map.get("codesetCode").toString(), Collectors.toList()));
List<HGWD001> hgwd001s = new ArrayList<>(); List<HGWD001> hgwd001s = new ArrayList<>();
// 写入数据 // 写入数据
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
...@@ -79,10 +84,17 @@ public class ServiceHGWD001E extends ServiceEPBase { ...@@ -79,10 +84,17 @@ public class ServiceHGWD001E extends ServiceEPBase {
hgwd001.setStatus(HgWdConstant.FileStatus.S_0); hgwd001.setStatus(HgWdConstant.FileStatus.S_0);
// 设置项目信息 // 设置项目信息
this.setProjectInfo(hgwd001); this.setProjectInfo(hgwd001);
if (wd001 == null){
String filePath = setFilePath(hgsc001,edcm01Map.get("app.sc.projectSource"));
hgwd001.setFilePath(filePath+"/"+hgwd001.getFileName());
}else {
hgwd001.setFilePath(wd001.getFilePath()+"/"+hgwd001.getFileName());
}
if (hgwd001.getId() == null || hgwd001.getId() == 0) { if (hgwd001.getId() == null || hgwd001.getId() == 0) {
this.add(hgwd001); this.add(hgwd001);
} else { } else {
this.modify(hgwd001,edcm01List); List<Map<String, Object>> mapList = edcm01Map.get("hggp.hgwd.fileType");
this.modify(hgwd001,mapList);
} }
hgwd001s.add(hgwd001); hgwd001s.add(hgwd001);
} }
...@@ -132,7 +144,7 @@ public class ServiceHGWD001E extends ServiceEPBase { ...@@ -132,7 +144,7 @@ public class ServiceHGWD001E extends ServiceEPBase {
hgwd001a.setChangeEnd(hgwd001.getFileName()); hgwd001a.setChangeEnd(hgwd001.getFileName());
HGWDTools.HgWd001.addHGWD001A(hgwd001a); HGWDTools.HgWd001.addHGWD001A(hgwd001a);
}else if (wd001 != null && !wd001.getFileType().equals(hgwd001.getFileType())){ }else if (wd001 != null && !wd001.getFileType().equals(hgwd001.getFileType())){
List<Map> fileType1 = edcm01List.stream().filter(map -> map.get("itemCode").equals(wd001.getFileType())).collect(Collectors.toList()); List<Map> fileType1 = edcm01List.stream().filter(map -> map.get("itemCode").equals(hgwd001.getFileType())).filter(map -> map.get("itemCode").equals(wd001.getFileType())).collect(Collectors.toList());
List<Map> fileType2 = edcm01List.stream().filter(map -> map.get("itemCode").equals(hgwd001.getFileType())).collect(Collectors.toList()); List<Map> fileType2 = edcm01List.stream().filter(map -> map.get("itemCode").equals(hgwd001.getFileType())).collect(Collectors.toList());
hgwd001a.setChangeContent("文件类型"); hgwd001a.setChangeContent("文件类型");
hgwd001a.setChangeStart(fileType1.get(0).get("itemCname").toString()); hgwd001a.setChangeStart(fileType1.get(0).get("itemCname").toString());
...@@ -165,5 +177,9 @@ public class ServiceHGWD001E extends ServiceEPBase { ...@@ -165,5 +177,9 @@ public class ServiceHGWD001E extends ServiceEPBase {
fWd001.setProjName(dbSc001.getProjName()); fWd001.setProjName(dbSc001.getProjName());
fWd001.setProjectSource(dbSc001.getProjectSource()); fWd001.setProjectSource(dbSc001.getProjectSource());
} }
private String setFilePath(HGSC001 hgsc001,List<Map<String, Object>> edcm01List) {
String filePath = edcm01List.stream().filter(map -> map.get("itemCode").equals(hgsc001.getProjectSource())).findAny().get().get("itemCname").toString();
return filePath+"/"+hgsc001.getProjName();
}
} }
...@@ -8,12 +8,17 @@ import com.baosight.hggp.core.dao.DaoUtils; ...@@ -8,12 +8,17 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.OrgTypeEnum; import com.baosight.hggp.core.enums.OrgTypeEnum;
import com.baosight.hggp.core.tools.Iplat4jTools; import com.baosight.hggp.core.tools.Iplat4jTools;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.hg.wd.constant.HgWdConstant; import com.baosight.hggp.hg.wd.constant.HgWdConstant;
import com.baosight.hggp.hg.wd.constant.HgWdSqlConstant;
import com.baosight.hggp.hg.wd.domain.HGWD001; import com.baosight.hggp.hg.wd.domain.HGWD001;
import com.baosight.hggp.hg.wd.domain.HGWD001A; import com.baosight.hggp.hg.wd.domain.HGWD001A;
import com.baosight.hggp.hg.wd.domain.HGWD099;
import com.baosight.hggp.hg.wd.tools.HGWDTools; import com.baosight.hggp.hg.wd.tools.HGWDTools;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -21,10 +26,7 @@ import com.baosight.iplat4j.core.ei.EiInfo; ...@@ -21,10 +26,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -61,17 +63,32 @@ public class ServiceHGWD001F extends ServiceEPBase { ...@@ -61,17 +63,32 @@ public class ServiceHGWD001F extends ServiceEPBase {
@OperationLogAnnotation(operModul = "文档库",operType = "保存",operDesc = "保存操作") @OperationLogAnnotation(operModul = "文档库",operType = "保存",operDesc = "保存操作")
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
Map<String,String> queryMap = EiInfoUtils.getFirstRow(inInfo);
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
List<Map<String, Object>> edcm01List = Iplat4jTools.EdCm01.list("hggp.hgwd.fileType"); List<Map<String, Object>> edcm01List = Iplat4jTools.EdCm01.getByCodesetMap("CODESET_CODE IN ('hggp.hgwd.fileType','app.sc.projectSource')");
HGWD001 wd001 = (HGWD001) this.dao.get(HGWD001.QUERY, HGWD001.FIELD_FILE_ID, inInfo.getString(HGWD001.FIELD_PARENT_ID));
HGSC001 hgsc001 = new HGSC001();
if (wd001 == null){
hgsc001 = HGSCTools.Hgsc001.queryByCode(queryMap.get(HGWD001.FIELD_PROJ_CODE));
}
Map<String, List<Map<String, Object>>> edcm01Map = edcm01List.stream().collect(Collectors.groupingBy(map -> map.get("codesetCode").toString(), Collectors.toList()));
// 写入数据 // 写入数据
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HGWD001 hgwd001 = new HGWD001(); HGWD001 hgwd001 = new HGWD001();
hgwd001.fromMap(resultRow); hgwd001.fromMap(resultRow);
hgwd001.setStatus(HgWdConstant.FileStatus.S_0); hgwd001.setStatus(HgWdConstant.FileStatus.S_0);
if (wd001 == null){
String filePath = setFilePath(hgsc001,edcm01Map.get("app.sc.projectSource"));
hgwd001.setFilePath(filePath+"/"+hgwd001.getFileName());
}else {
hgwd001.setFilePath(wd001.getFilePath()+"/"+hgwd001.getFileName());
}
if (hgwd001.getId() == null || hgwd001.getId() == 0) { if (hgwd001.getId() == null || hgwd001.getId() == 0) {
this.add(hgwd001); this.add(hgwd001);
} else { } else {
this.modify(hgwd001,edcm01List); String wd001FilePath = wd001 == null? setFilePath(hgsc001,edcm01Map.get("app.sc.projectSource")):wd001.getFilePath();
this.modify(hgwd001,wd001FilePath,edcm01Map);
} }
} }
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
...@@ -103,9 +120,12 @@ public class ServiceHGWD001F extends ServiceEPBase { ...@@ -103,9 +120,12 @@ public class ServiceHGWD001F extends ServiceEPBase {
/** /**
* 修改操作 * 修改操作
* @param hgwd001 文件信息
* @param wd001FilePath 文件路径
* @param edcm01Map 小代碼
*/ */
public void modify(HGWD001 hgwd001,List<Map<String, Object>> edcm01List) { public void modify(HGWD001 hgwd001,String wd001FilePath,Map<String, List<Map<String, Object>>> edcm01Map) {
HGWD001 wd001 =HGWDTools.HgWd001.get(hgwd001.getId()); HGWD001 wd001out =HGWDTools.HgWd001.get(hgwd001.getId());
HGWD001A hgwd001a = new HGWD001A(); HGWD001A hgwd001a = new HGWD001A();
hgwd001a.setCompanyCode(hgwd001.getCompanyCode()); hgwd001a.setCompanyCode(hgwd001.getCompanyCode());
hgwd001a.setCompanyName(hgwd001.getCompanyName()); hgwd001a.setCompanyName(hgwd001.getCompanyName());
...@@ -113,14 +133,14 @@ public class ServiceHGWD001F extends ServiceEPBase { ...@@ -113,14 +133,14 @@ public class ServiceHGWD001F extends ServiceEPBase {
hgwd001a.setProjName(hgwd001.getProjName()); hgwd001a.setProjName(hgwd001.getProjName());
hgwd001a.setChangeType(ChangeTypeEnum.UPDATE.getCode()); hgwd001a.setChangeType(ChangeTypeEnum.UPDATE.getCode());
hgwd001a.setMatId(hgwd001.getId()); hgwd001a.setMatId(hgwd001.getId());
if (wd001 != null && !wd001.getFileName().equals(hgwd001.getFileName())){ if (wd001out != null && !wd001out.getFileName().equals(hgwd001.getFileName())){
hgwd001a.setChangeContent("文件名称"); hgwd001a.setChangeContent("文件名称");
hgwd001a.setChangeStart(wd001.getFileName()); hgwd001a.setChangeStart(wd001out.getFileName());
hgwd001a.setChangeEnd(hgwd001.getFileName()); hgwd001a.setChangeEnd(hgwd001.getFileName());
HGWDTools.HgWd001.addHGWD001A(hgwd001a); HGWDTools.HgWd001.addHGWD001A(hgwd001a);
}else if (wd001 != null && !wd001.getFileType().equals(hgwd001.getFileType())){ }else if (wd001out != null && !wd001out.getFileType().equals(hgwd001.getFileType())){
List<Map> fileType1 = edcm01List.stream().filter(map -> map.get("itemCode").equals(wd001.getFileType())).collect(Collectors.toList()); List<Map> fileType1 = edcm01Map.get("hggp.hgwd.fileType").stream().filter(map -> map.get("itemCode").equals(wd001out.getFileType())).collect(Collectors.toList());
List<Map> fileType2 = edcm01List.stream().filter(map -> map.get("itemCode").equals(hgwd001.getFileType())).collect(Collectors.toList()); List<Map> fileType2 = edcm01Map.get("hggp.hgwd.fileType").stream().filter(map -> map.get("itemCode").equals(hgwd001.getFileType())).collect(Collectors.toList());
hgwd001a.setChangeContent("文件类型"); hgwd001a.setChangeContent("文件类型");
hgwd001a.setChangeStart(fileType1.get(0).get("itemCname").toString()); hgwd001a.setChangeStart(fileType1.get(0).get("itemCname").toString());
hgwd001a.setChangeEnd(fileType2.get(0).get("itemCname").toString()); hgwd001a.setChangeEnd(fileType2.get(0).get("itemCname").toString());
...@@ -128,5 +148,40 @@ public class ServiceHGWD001F extends ServiceEPBase { ...@@ -128,5 +148,40 @@ public class ServiceHGWD001F extends ServiceEPBase {
} }
DaoUtils.update(HGWD001.UPDATE, hgwd001); DaoUtils.update(HGWD001.UPDATE, hgwd001);
updateFilePath(hgwd001,wd001out,wd001FilePath);
}
public void updateFilePath(HGWD001 hgwd001,HGWD001 wd001out,String wd001FilePath) {
List<Map> childList = HGWDTools.HgWd001.queryFileChild(hgwd001.getFileId());
List<String> childFileIdList = Optional.ofNullable(childList).orElse(new ArrayList<>()).stream()
.filter(map -> !hgwd001.getFileId().equals(map.get(HGWD001.FIELD_FILE_ID)))
.map(map -> map.get(HGWD001.FIELD_FILE_ID).toString()).collect(Collectors.toList());
List<HGWD099> hgwd099List = HGWDTools.HgWd099.queryByBiz("WD",childFileIdList);
Map<String, List<HGWD099>> listMap = hgwd099List.stream().collect(Collectors.groupingBy(HGWD099::getBizId,Collectors.toList()));
int end = wd001out.getFilePath().length()+1;
if (childList != null && childList.size() > 0) {
for (Map child : childList) {
HGWD001 childOut = new HGWD001();
childOut.fromMap(child);
if (!hgwd001.getFileId().equals(childOut.getFileId())){
String filePathEnd = child.get(HGWD001.FIELD_FILE_PATH).toString().substring(end);
StringBuffer filePath = new StringBuffer();
filePath.append(wd001FilePath).append("/").append(hgwd001.getFileName()).append("/").append(filePathEnd);
childOut.setFilePath(filePath.toString());
DaoUtils.update(HgWdSqlConstant.HgWd001.UPDATE_FILE_PATH, childOut);
if (listMap.containsKey(childOut.getFileId())){
for (HGWD099 hgwd099: listMap.get(childOut.getFileId())) {
hgwd099.setFilePath(filePath.toString());
DaoUtils.update(HGWD099.UPDATE, hgwd099);
}
}
}
}
}
}
private String setFilePath(HGSC001 hgsc001,List<Map<String, Object>> edcm01List) {
String filePath = edcm01List.stream().filter(map -> map.get("itemCode").equals(hgsc001.getProjectSource())).findAny().get().get("itemCname").toString();
return filePath+"/"+hgsc001.getProjName();
} }
} }
...@@ -135,6 +135,12 @@ public class ServiceHGWD002 extends ServiceBase { ...@@ -135,6 +135,12 @@ public class ServiceHGWD002 extends ServiceBase {
case "updatedTime desc": case "updatedTime desc":
orderByStr.append(orderBy[i].replace("updatedTime desc", "b.updatedTime desc")); orderByStr.append(orderBy[i].replace("updatedTime desc", "b.updatedTime desc"));
break; break;
case "changeContent asc":
orderByStr.append(orderBy[i].replace("downloadNum desc", "b.changeContent asc"));
break;
case "changeContent desc":
orderByStr.append(orderBy[i].replace("updatedTime desc", "b.changeContent desc"));
break;
default: default:
if (!orderBy[i].isEmpty()) { if (!orderBy[i].isEmpty()) {
orderByStr.append(orderBy[i]); orderByStr.append(orderBy[i]);
......
...@@ -65,7 +65,12 @@ public class ServiceHGWD099 extends ServiceEPBase { ...@@ -65,7 +65,12 @@ public class ServiceHGWD099 extends ServiceEPBase {
try { try {
Map queryRow =EiInfoUtils.getFirstRow(inInfo); Map queryRow =EiInfoUtils.getFirstRow(inInfo);
if (StringUtils.isNotEmpty(queryRow.get(HGWD001.FIELD_PARENT_ID).toString())){ if (StringUtils.isNotEmpty(queryRow.get(HGWD001.FIELD_PARENT_ID).toString())){
inInfo = super.query(inInfo, HGWD099.QUERY, new HGWD099()); List<Map> childList = HGWDTools.HgWd001.queryFileChild(queryRow.get(HGWD001.FIELD_PARENT_ID).toString());
List<String> childFileIdList = Optional.ofNullable(childList).orElse(new ArrayList<>()).stream().map(map -> map.get(HGWD001.FIELD_FILE_ID).toString()).collect(Collectors.toList());
queryRow.put("bizIds",childFileIdList);
queryRow.remove(HGWD099.FIELD_BIZ_ID);
inInfo.getBlock(EiConstant.queryBlock).getRow(ACConstants.ROW_CODE_0).remove(HGWD001.FIELD_PARENT_ID);
inInfo = super.query(inInfo, HGWD099.QUERY, new HGWD099());
} }
} catch (Throwable e) { } catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
...@@ -26,7 +26,8 @@ ...@@ -26,7 +26,8 @@
DOC_VERSION as "docVersion", <!-- 文件版本号 --> DOC_VERSION as "docVersion", <!-- 文件版本号 -->
STATUS as "status", <!-- 状态 --> STATUS as "status", <!-- 状态 -->
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
RELEASE_DATE as "releaseDate" <!-- 发布时间 --> RELEASE_DATE as "releaseDate", <!-- 发布时间 -->
FILE_PATH as "filePath" <!-- 文件路径 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -93,6 +94,9 @@ ...@@ -93,6 +94,9 @@
<isNotEmpty prepend=" AND " property="releaseDate"> <isNotEmpty prepend=" AND " property="releaseDate">
RELEASE_DATE = #releaseDate# RELEASE_DATE = #releaseDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath">
FILE_PATH = #filePath#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ename"> <isNotEmpty prepend=" AND " property="ename">
PROJ_NAME like concat('%', #ename#, '%') or PROJ_CODE like concat('%', #ename#, '%') PROJ_NAME like concat('%', #ename#, '%') or PROJ_CODE like concat('%', #ename#, '%')
</isNotEmpty> </isNotEmpty>
...@@ -209,12 +213,13 @@ ...@@ -209,12 +213,13 @@
DOC_VERSION, <!-- 文件版本号 --> DOC_VERSION, <!-- 文件版本号 -->
STATUS, <!-- 状态 --> STATUS, <!-- 状态 -->
REMARK, <!-- 备注 --> REMARK, <!-- 备注 -->
RELEASE_DATE RELEASE_DATE,
FILE_PATH
) VALUES ( ) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #projectSource#, #deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #projectSource#,
#leafLevel#, #parentId#, #fileId#, #fileType#, #fileName#, #leafLevel#, #parentId#, #fileId#, #fileType#, #fileName#,
#docVersion#, #status#, #remark#, #releaseDate# #docVersion#, #status#, #remark#, #releaseDate#, #filePath#
) )
<selectKey resultClass="long" keyProperty="id"> <selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGWD001 SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGWD001
...@@ -236,6 +241,7 @@ ...@@ -236,6 +241,7 @@
STATUS = #status#, <!-- 状态 --> STATUS = #status#, <!-- 状态 -->
REMARK = #remark#, <!-- 备注 --> REMARK = #remark#, <!-- 备注 -->
RELEASE_DATE = #releaseDate#, <!--发布时间--> RELEASE_DATE = #releaseDate#, <!--发布时间-->
FILE_PATH = #filePath#,
<include refid="SqlBase.updateRevise"/> <include refid="SqlBase.updateRevise"/>
WHERE ID = #id# WHERE ID = #id#
</update> </update>
...@@ -259,6 +265,14 @@ ...@@ -259,6 +265,14 @@
WHERE ID = #id# WHERE ID = #id#
</update> </update>
<update id="updateFilePath">
UPDATE ${hggpSchema}.HGWD001
SET
FILE_PATH = #filePath#,
<include refid="SqlBase.updateRevise"/>
WHERE ID = #id#
</update>
<select id="queryTree" resultClass="java.util.HashMap"> <select id="queryTree" resultClass="java.util.HashMap">
SELECT SELECT
COMPANY_CODE as "companyCode", <!-- 公司编码 --> COMPANY_CODE as "companyCode", <!-- 公司编码 -->
...@@ -270,7 +284,8 @@ ...@@ -270,7 +284,8 @@
PARENT_ID as "pId", <!--父级ID--> PARENT_ID as "pId", <!--父级ID-->
FILE_ID as "fileId", <!-- 文件ID --> FILE_ID as "fileId", <!-- 文件ID -->
FILE_TYPE as "fileType", <!-- 文件类型 --> FILE_TYPE as "fileType", <!-- 文件类型 -->
FILE_NAME as "fileName" <!-- 文件名称 --> FILE_NAME as "fileName", <!-- 文件名称 -->
FILE_PATH as "filePath"
FROM ${hggpSchema}.HGWD001 FROM ${hggpSchema}.HGWD001
WHERE 1=1 WHERE 1=1
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
...@@ -309,7 +324,8 @@ ...@@ -309,7 +324,8 @@
FILE_TYPE as "type", FILE_TYPE as "type",
PARENT_ID as "parentId", PARENT_ID as "parentId",
DELETE_FLAG as "isDeleted", DELETE_FLAG as "isDeleted",
LEAF_LEVEL as "leafLevel" LEAF_LEVEL as "leafLevel",
FILE_PATH as "filePath"
FROM ${hggpSchema}.HGWD001 FROM ${hggpSchema}.HGWD001
WHERE 1=1 WHERE 1=1
<isEmpty prepend=" AND " property="deletedQuery"> <isEmpty prepend=" AND " property="deletedQuery">
...@@ -331,7 +347,11 @@ ...@@ -331,7 +347,11 @@
<!--档库所有子节点树查询--> <!--档库所有子节点树查询-->
<select id="queryFileChild" resultClass="java.util.HashMap"> <select id="queryFileChild" resultClass="java.util.HashMap">
SELECT SELECT
T3.ID as "id", T3.FILE_ID AS "fileId",T3.FILE_TYPE AS "fileType", T3.PARENT_ID as "parentId" T3.ID as "id",
T3.FILE_ID AS "fileId",
T3.FILE_TYPE AS "fileType",
T3.PARENT_ID as "parentId",
T3.FILE_PATH as "filePath"
FROM ( FROM (
SELECT SELECT
@CODES AS CODES, @CODES AS CODES,
...@@ -354,7 +374,7 @@ ...@@ -354,7 +374,7 @@
${hggpSchema}.HGWD001 T3 ${hggpSchema}.HGWD001 T3
WHERE T3.DELETE_FLAG = 0 WHERE T3.DELETE_FLAG = 0
AND FIND_IN_SET(T3.FILE_ID, T2.CODES) AND FIND_IN_SET(T3.FILE_ID, T2.CODES)
ORDER BY T3.FILE_ID ASC ORDER BY T3.ID ASC
</select> </select>
<!-- 修改项目信息 --> <!-- 修改项目信息 -->
...@@ -375,7 +395,8 @@ ...@@ -375,7 +395,8 @@
PARENT_ID as "parentId", <!--父级ID--> PARENT_ID as "parentId", <!--父级ID-->
FILE_ID as "fileId", <!-- 文件ID --> FILE_ID as "fileId", <!-- 文件ID -->
FILE_TYPE as "fileType", <!-- 文件类型 --> FILE_TYPE as "fileType", <!-- 文件类型 -->
FILE_NAME as "fileName" <!-- 文件名称 --> FILE_NAME as "fileName", <!-- 文件名称 -->
FILE_PATH as "filePath"
from ( from (
SELECT SELECT
PROJ_CODE, <!-- 项目编码 --> PROJ_CODE, <!-- 项目编码 -->
...@@ -384,7 +405,8 @@ ...@@ -384,7 +405,8 @@
PROJ_CODE as "PARENT_ID", <!--父级ID--> PROJ_CODE as "PARENT_ID", <!--父级ID-->
'' as "FILE_ID", <!-- 文件ID --> '' as "FILE_ID", <!-- 文件ID -->
'' as "FILE_TYPE", <!-- 文件类型 --> '' as "FILE_TYPE", <!-- 文件类型 -->
'' as "FILE_NAME" <!-- 文件名称 --> '' as "FILE_NAME", <!-- 文件名称 -->
project_source as "FILE_PATH"
FROM ${hggpSchema}.HGSC001 T WHERE 1=1 FROM ${hggpSchema}.HGSC001 T WHERE 1=1
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode# ACCOUNT_CODE = #accountCode#
...@@ -411,7 +433,8 @@ ...@@ -411,7 +433,8 @@
PARENT_ID, <!--父级ID--> PARENT_ID, <!--父级ID-->
FILE_ID, <!-- 文件ID --> FILE_ID, <!-- 文件ID -->
FILE_TYPE, <!-- 文件类型 --> FILE_TYPE, <!-- 文件类型 -->
FILE_NAME <!-- 文件名称 --> FILE_NAME, <!-- 文件名称 -->
FILE_PATH
FROM ${hggpSchema}.HGWD001 T WHERE 1=1 FROM ${hggpSchema}.HGWD001 T WHERE 1=1
<include refid="condition"/> <include refid="condition"/>
) a ) a
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
B.DOC_TYPE as "docType", <!-- 文件类型 --> B.DOC_TYPE as "docType", <!-- 文件类型 -->
B.PREVIEW_NUM as "previewNum", <!-- 预览次数 --> B.PREVIEW_NUM as "previewNum", <!-- 预览次数 -->
B.DOWNLOAD_NUM as "downloadNum", <!-- 下载次数 --> B.DOWNLOAD_NUM as "downloadNum", <!-- 下载次数 -->
B.CHANGE_CONTENT as "changeContent", <!-- 变更内容 -->
B.CREATED_BY as "createdBy", <!-- 创建人 --> B.CREATED_BY as "createdBy", <!-- 创建人 -->
B.CREATED_NAME as "createdName", <!-- 创建人名称 --> B.CREATED_NAME as "createdName", <!-- 创建人名称 -->
B.CREATED_TIME as "createdTime", <!-- 创建时间 --> B.CREATED_TIME as "createdTime", <!-- 创建时间 -->
......
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
DOWNLOAD_NUM as "downloadNum", <!-- 下载次数 --> DOWNLOAD_NUM as "downloadNum", <!-- 下载次数 -->
DOC_VERSION as "docVersion", <!-- 文件版本号 --> DOC_VERSION as "docVersion", <!-- 文件版本号 -->
RELEASE_DATE as "releaseDate", <!-- 发布时间 --> RELEASE_DATE as "releaseDate", <!-- 发布时间 -->
OPER_STATUS as "operStatus" OPER_STATUS as "operStatus",
CHANGE_CONTENT as "changeContent", <!-- 变更内容 -->
FILE_PATH as "filePath"
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -36,9 +38,9 @@ ...@@ -36,9 +38,9 @@
<isNotEmpty prepend=" AND " property="bizId"> <isNotEmpty prepend=" AND " property="bizId">
BIZ_ID = #bizId# BIZ_ID = #bizId#
</isNotEmpty> </isNotEmpty>
<!--<isNotEmpty prepend=" AND " property="fileId"> <isNotEmpty prepend=" AND " property="bizIds">
BIZ_ID IN (select FILE_ID from ${hggpSchema}.hgwd003 where USER_ID = #userId# and FILE_ID = #fileId# ) BIZ_ID IN <iterate close=")" open="(" conjunction="," property="bizIds">#bizIds[]#</iterate>
</isNotEmpty>--> </isNotEmpty>
<isNotEmpty prepend=" AND " property="docId"> <isNotEmpty prepend=" AND " property="docId">
DOC_ID = #docId# DOC_ID = #docId#
</isNotEmpty> </isNotEmpty>
...@@ -69,6 +71,9 @@ ...@@ -69,6 +71,9 @@
<isNotEmpty prepend=" AND " property="updatedTime"> <isNotEmpty prepend=" AND " property="updatedTime">
LEFT(UPDATED_TIME,8) = replace(#updatedTime#,'-','') LEFT(UPDATED_TIME,8) = replace(#updatedTime#,'-','')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath">
FILE_PATH like concat('%',#filePath#,'%')
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -139,11 +144,14 @@ ...@@ -139,11 +144,14 @@
STATUS, STATUS,
DOC_VERSION, DOC_VERSION,
RELEASE_DATE, RELEASE_DATE,
OPER_STATUS OPER_STATUS,
CHANGE_CONTENT,
FILE_PATH
) VALUES ( ) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#updatedBy#, #updatedName#, #updatedTime#, #updatedBy#, #updatedName#, #updatedTime#,
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #docType#, #status#, #docVersion#, #releaseDate#, #operStatus# #deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #docType#, #status#,
#docVersion#, #releaseDate#, #operStatus#, #changeContent#, #filePath#
<selectKey resultClass="long" keyProperty="id"> <selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGWD099 SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGWD099
</selectKey> </selectKey>
...@@ -177,9 +185,10 @@ ...@@ -177,9 +185,10 @@
DOC_NAME = #docName#, <!-- 文件名称 --> DOC_NAME = #docName#, <!-- 文件名称 -->
DOC_TYPE = #docType#, <!-- 文件类型 --> DOC_TYPE = #docType#, <!-- 文件类型 -->
STATUS = #status#, STATUS = #status#,
DOC_VERSION = DOC_VERSION + 1, <!--版本号-->
RELEASE_DATE = #releaseDate#, <!--发布时间--> RELEASE_DATE = #releaseDate#, <!--发布时间-->
OPER_STATUS = #operStatus#, OPER_STATUS = #operStatus#,
CHANGE_CONTENT = #changeContent#,
FILE_PATH = #filePath#,
UPDATED_BY = #updatedBy#, <!-- 修改人 --> UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 --> UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 --> UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
...@@ -200,7 +209,7 @@ ...@@ -200,7 +209,7 @@
UPDATE ${hggpSchema}.HGWD099 UPDATE ${hggpSchema}.HGWD099
SET SET
RELEASE_DATE = #releaseDate#, <!--发布时间--> RELEASE_DATE = #releaseDate#, <!--发布时间-->
DOC_VERSION = #docVersion#, <!--版本号--> DOC_VERSION = DOC_VERSION + 1, <!--版本号-->
STATUS = #status#, <!-- 状态 --> STATUS = #status#, <!-- 状态 -->
OPER_STATUS = #operStatus#, OPER_STATUS = #operStatus#,
<include refid="SqlBase.updateRevise"/> <include refid="SqlBase.updateRevise"/>
......
...@@ -215,6 +215,20 @@ public class HGWDTools { ...@@ -215,6 +215,20 @@ public class HGWDTools {
} }
return results; return results;
} }
/**
* 查询文件子节点
*
* @param parentId
* @return
*/
public static List<Map> queryFileChild(String parentId) {
AssertUtils.isEmpty(parentId, "文件ID不能为空");
Map queryMap = new HashMap();
queryMap.put("parentId", parentId);
List<Map> results = DaoBase.getInstance().query(HgWdSqlConstant.HgWd001.QUERY_FILE_CHILD, queryMap);
return CollectionUtils.isEmpty(results) ? null : results;
}
} }
...@@ -444,6 +458,18 @@ public class HGWDTools { ...@@ -444,6 +458,18 @@ public class HGWDTools {
); );
return results; return results;
} }
/**
* @param fileIds
* @return
*/
public static Map<String, List<HGWD099>> map(List<String> fileIds) {
List<HGWD099> hgwd099List = queryByBiz("WD",fileIds);
if (CollectionUtils.isEmpty(hgwd099List)) {
return null;
}
return hgwd099List.stream().collect(Collectors.groupingBy(HGWD099::getBizId));
}
} }
/** /**
......
...@@ -122,14 +122,22 @@ $(function () { ...@@ -122,14 +122,22 @@ $(function () {
switch (item.leafType) { switch (item.leafType) {
case 'P': case 'P':
icon = 'fa fa-clipboard' icon = 'fa fa-clipboard'
if (count>0){ if (count == 2){
icon = 'fa fa-clipboard text-success' icon = 'fa fa-clipboard text-success'
}else if (count == 3){
icon = 'fa fa-clipboard text-primary'
}else if (count == 1){
icon = 'fa fa-clipboard text-danger'
} }
break; break;
case 'C': case 'C':
icon = 'fa fa-folder' icon = 'fa fa-folder'
if (count>0){ if (count == 2){
icon = 'fa fa-folder text-success' icon = 'fa fa-folder text-success'
}else if (count == 3){
icon = 'fa fa-folder text-primary'
}else if (count == 1){
icon = 'fa fa-folder text-danger'
} }
break; break;
} }
...@@ -274,6 +282,7 @@ $(function () { ...@@ -274,6 +282,7 @@ $(function () {
$("#edit").on("click", () => { $("#edit").on("click", () => {
const orgId = $("#inqu_status-0-parentId").val(); const orgId = $("#inqu_status-0-parentId").val();
let parentId = IPLATUI.EFTree.categoryTree.selectTreeNode.parentId;
let projCode = $("#inqu_status-0-projCode").val(); let projCode = $("#inqu_status-0-projCode").val();
let leafLevel = parseInt($("#inqu_status-0-leafLevel").val())+1; let leafLevel = parseInt($("#inqu_status-0-leafLevel").val())+1;
let type = $("#inqu_status-0-type").val(); let type = $("#inqu_status-0-type").val();
...@@ -285,7 +294,7 @@ $(function () { ...@@ -285,7 +294,7 @@ $(function () {
message2("提示", "项目无法编辑!"); message2("提示", "项目无法编辑!");
return return
} }
let params = "&inqu_status-0-fileId=" + orgId +"&inqu_status-0-projCode="+projCode; let params = "&inqu_status-0-fileId=" + orgId +"&inqu_status-0-projCode="+projCode+"&parentId="+parentId;
JSColorbox.open({ JSColorbox.open({
href: "HGWD001F?methodName=initLoad" + params, href: "HGWD001F?methodName=initLoad" + params,
title: "<div style='text-align: center;'>编辑文件</div>", title: "<div style='text-align: center;'>编辑文件</div>",
...@@ -381,6 +390,7 @@ $(function () { ...@@ -381,6 +390,7 @@ $(function () {
leafLevel: '', leafLevel: '',
leafType: '', leafType: '',
isAuth: '1', isAuth: '1',
filePath: '',
}, },
// expandLevel:1, // expandLevel:1,
/** /**
...@@ -522,7 +532,7 @@ $(function () { ...@@ -522,7 +532,7 @@ $(function () {
query: function (e) { query: function (e) {
let inEiInfo = new EiInfo(); let inEiInfo = new EiInfo();
let fileId = IPLATUI.EFTree.categoryTree.selectTreeNode.fileId; let fileId = IPLATUI.EFTree.categoryTree.selectTreeNode.fileId;
inEiInfo.set("inqu_status2-0-parentId", fileId); inEiInfo.set("inqu_status2-0-fileId", fileId);
return inEiInfo; return inEiInfo;
} }
}, },
...@@ -699,6 +709,7 @@ let setTreeNodeValue = function (nodeData) { ...@@ -699,6 +709,7 @@ let setTreeNodeValue = function (nodeData) {
IPLATUI.EFTree.categoryTree.selectTreeNode.leafLevel = leafLevel; IPLATUI.EFTree.categoryTree.selectTreeNode.leafLevel = leafLevel;
IPLATUI.EFTree.categoryTree.selectTreeNode.leafType = nodeData.leafType; IPLATUI.EFTree.categoryTree.selectTreeNode.leafType = nodeData.leafType;
IPLATUI.EFTree.categoryTree.selectTreeNode.isAuth = nodeData.isAuth; IPLATUI.EFTree.categoryTree.selectTreeNode.isAuth = nodeData.isAuth;
IPLATUI.EFTree.categoryTree.selectTreeNode.filePath = nodeData.filePath;
$("[name = 'inqu_status-0-parentId']").val(nodeData.label); $("[name = 'inqu_status-0-parentId']").val(nodeData.label);
$("[name = 'inqu_status-0-fileId']").val(nodeData.label); $("[name = 'inqu_status-0-fileId']").val(nodeData.label);
$("[name = 'inqu_status-0-leafLevel']").val(leafLevel); $("[name = 'inqu_status-0-leafLevel']").val(leafLevel);
...@@ -786,6 +797,7 @@ function uploadFileCallback(data) { ...@@ -786,6 +797,7 @@ function uploadFileCallback(data) {
inEiInfo.set("result-0-ndocId", data.ndocId); inEiInfo.set("result-0-ndocId", data.ndocId);
inEiInfo.set("inqu_status-0-fileId", data.bizId); inEiInfo.set("inqu_status-0-fileId", data.bizId);
inEiInfo.set("result-0-changeContent", data.changeContent); inEiInfo.set("result-0-changeContent", data.changeContent);
inEiInfo.set("result-0-filePath", IPLATUI.EFTree.categoryTree.selectTreeNode.filePath);
let serviceName = data.operType == "add" ? "HGWD099" : "HGWD001"; let serviceName = data.operType == "add" ? "HGWD099" : "HGWD001";
let methodName = data.operType == "add" ? "insert" : "updateFile"; let methodName = data.operType == "add" ? "insert" : "updateFile";
......
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
startName="updateDateFrom" endName="updateDateTo" role="date" startName="updateDateFrom" endName="updateDateTo" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="false"> format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="false">
</EF:EFDateSpan> </EF:EFDateSpan>
<EF:EFInput cname="文件路径" ename="filePath" blockId="inqu_status" row="0" colWidth="3" />
</div> </div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true"> <EF:EFRegion id="result" title="明细信息" fitHeight="true">
...@@ -84,6 +85,8 @@ ...@@ -84,6 +85,8 @@
<EF:EFColumn ename="operator" cname="操作" enable="false" width="150" align="center" sort="false"/> <EF:EFColumn ename="operator" cname="操作" enable="false" width="150" align="center" sort="false"/>
<EF:EFColumn ename="docName" cname="附件名称" enable="false" width="200"/> <EF:EFColumn ename="docName" cname="附件名称" enable="false" width="200"/>
<EF:EFColumn ename="docType" cname="附件类型" enable="false" width="110" align="center"/> <EF:EFColumn ename="docType" cname="附件类型" enable="false" width="110" align="center"/>
<EF:EFColumn ename="changeContent" cname="变更内容" enable="false" width="200" align="center"/>
<EF:EFColumn ename="filePath" cname="文件路径" enable="false" width="200" align="center"/>
<EF:EFColumn ename="docVersion" cname="版本号" enable="false" width="90" align="center" sort="true"/> <EF:EFColumn ename="docVersion" cname="版本号" enable="false" width="90" align="center" sort="true"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="100" align="center" <EF:EFComboColumn ename="status" cname="状态" enable="false" width="100" align="center"
defaultValue="0" hidden="false"> defaultValue="0" hidden="false">
...@@ -130,6 +133,7 @@ ...@@ -130,6 +133,7 @@
queryMethod="query1"> queryMethod="query1">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="parentId" cname="上级ID" hidden="true"/> <EF:EFColumn ename="parentId" cname="上级ID" hidden="true"/>
<EF:EFColumn ename="filePath" cname="文件路径" hidden="true"/>
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id" <EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
...@@ -162,6 +166,7 @@ ...@@ -162,6 +166,7 @@
<EF:EFGrid blockId="detail2" autoDraw="override" autoBind="false" isFloat="true" checkMode="single" queryMethod="queryDetail2"> <EF:EFGrid blockId="detail2" autoDraw="override" autoBind="false" isFloat="true" checkMode="single" queryMethod="queryDetail2">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="parentId" cname="上级ID" hidden="true"/> <EF:EFColumn ename="parentId" cname="上级ID" hidden="true"/>
<EF:EFColumn ename="filePath" cname="文件路径" hidden="true"/>
<%--<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id" <%--<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
...@@ -182,6 +187,7 @@ ...@@ -182,6 +187,7 @@
<EF:EFGrid blockId="result2" autoDraw="override" autoBind="false" isFloat="true" checkMode="row " queryMethod="query2"> <EF:EFGrid blockId="result2" autoDraw="override" autoBind="false" isFloat="true" checkMode="row " queryMethod="query2">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="parentId" cname="上级ID" hidden="true"/> <EF:EFColumn ename="parentId" cname="上级ID" hidden="true"/>
<EF:EFColumn ename="filePath" cname="文件路径" hidden="true"/>
<%--<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id" <%--<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
......
...@@ -4,25 +4,27 @@ $(function () { ...@@ -4,25 +4,27 @@ $(function () {
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
IPLATUI.EFGrid= { IPLATUI.EFGrid= {
"result": { "result": {
exportGrid: false, // 隐藏右侧自定义导出按钮 exportGrid: false, // 隐藏右侧自定义导出按钮
pageable: { pageable: {
pageSize: 500, pageSize: 500,
pageSizes: [20, 50, 100, 250, 500], pageSizes: [20, 50, 100, 250, 500],
}, },
columns: [{ columns: [
field: "projCode", {
title: "所属项目", field: "projCode",
template: function (dataItem) { title: "所属项目",
for (let i = 0; i < projCodeBox.length; i++) { template: function (dataItem) {
if (projCodeBox[i]['valueField'] === dataItem['projCode']) { for (let i = 0; i < projCodeBox.length; i++) {
dataItem['projName'] = projCodeBox[i]['textField'] if (projCodeBox[i]['valueField'] === dataItem['projCode']) {
return projCodeBox[i]['textField']; dataItem['projName'] = projCodeBox[i]['textField']
} return projCodeBox[i]['textField'];
} }
return dataItem["projCode"]; }
} return dataItem["projCode"];
}, { }
},
{
field:"fileName", field:"fileName",
editor: function (container, options) { editor: function (container, options) {
var grid = container.closest(".k-grid").data("kendoGrid"); var grid = container.closest(".k-grid").data("kendoGrid");
......
...@@ -136,7 +136,7 @@ let save = function (btnNode) { ...@@ -136,7 +136,7 @@ let save = function (btnNode) {
var status = e.status; var status = e.status;
if (status !== -1) { if (status !== -1) {
let fileId = $("#inqu_status-0-fileId").val(); let fileId = $("#inqu_status-0-fileId").val();
parent.JSColorbox.setValueCallback(fileId); parent.JSColorbox.setValueCallback();
} }
} }
); );
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<EF:EFPage title="文档库"> <EF:EFPage title="文档库">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput cname="上级组织编码" blockId="inqu_status" ename="parentId" row="0" type="hidden"/> <EF:EFInput cname="上级组织编码" ename="parentId" type="hidden"/>
<EF:EFInput cname="组织编码" blockId="inqu_status" ename="fileId" row="0" type="hidden"/> <EF:EFInput cname="组织编码" blockId="inqu_status" ename="fileId" row="0" type="hidden"/>
<EF:EFInput cname="项目代码" blockId="inqu_status" ename="projCode" row="0" type="hidden"/> <EF:EFInput cname="项目代码" blockId="inqu_status" ename="projCode" row="0" type="hidden"/>
<EF:EFInput cname="层级" blockId="inqu_status" ename="leafLevel" row="0" type="hidden"/> <EF:EFInput cname="层级" blockId="inqu_status" ename="leafLevel" row="0" type="hidden"/>
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
<EF:EFRegion id="result" title="明细信息" fitHeight="true"> <EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" showCount="true" height="73vh"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" showCount="true" height="73vh">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="filePath" cname="文件路径" hidden="true"/>
<%--<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center"/> <%--<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center" defaultValue="0"> <EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgwd.status"/> <EF:EFCodeOption codeName="hggp.hgwd.status"/>
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
<EF:EFColumn ename="docName" cname="附件名称" enable="false" width="220" sort="true"/> <EF:EFColumn ename="docName" cname="附件名称" enable="false" width="220" sort="true"/>
<EF:EFColumn ename="docType" cname="附件后缀" enable="false" width="110" align="center" sort="true"/> <EF:EFColumn ename="docType" cname="附件后缀" enable="false" width="110" align="center" sort="true"/>
<EF:EFColumn ename="docVersion" cname="版本号" enable="false" width="90" align="center" sort="true"/> <EF:EFColumn ename="docVersion" cname="版本号" enable="false" width="90" align="center" sort="true"/>
<EF:EFColumn ename="changeContent" cname="变更内容" enable="false" width="200" align="center" sort="true"/>
<EF:EFColumn ename="updatedTime" cname="上传时间" parseFormats="['yyyyMMddHHmmss']" editType="datetime" <EF:EFColumn ename="updatedTime" cname="上传时间" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="140" readonly="true" dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="140" readonly="true"
required="false" enable="false" sort="true"/> required="false" enable="false" sort="true"/>
......
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
<EF:EFColumn ename="docId" cname="附件ID" width="160" enable="true" readonly="false" hidden="true" align="center" required="false"/> <EF:EFColumn ename="docId" cname="附件ID" width="160" enable="true" readonly="false" hidden="true" align="center" required="false"/>
<EF:EFColumn ename="docName" cname="附件名称" width="160" enable="true" readonly="true" align="center" required="false"/> <EF:EFColumn ename="docName" cname="附件名称" width="160" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn ename="changeContent" cname="变更内容" width="200" enable="true" readonly="true" align="center" required="false"/> <EF:EFColumn ename="changeContent" cname="变更内容" width="200" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn cname="变更人" ename="createdName" enable="false" align="center"/>
<EF:EFColumn cname="变更时间" ename="createdTime" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
......
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