Commit fc350c39 by liuyang

2024-09-02 文档库优化

parent 54603783
...@@ -2,12 +2,15 @@ package com.baosight.hggp.hg.wd.service; ...@@ -2,12 +2,15 @@ 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.security.UserSessionUtils;
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.wd.domain.HGWD002;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils; 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.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
...@@ -52,6 +55,7 @@ public class ServiceHGWD002 extends ServiceBase { ...@@ -52,6 +55,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.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, User.FIELD_USER_ID, UserSessionUtils.getUserId());
inInfo = super.query(inInfo, HGWD002.QUERY, new HGWD002()); inInfo = super.query(inInfo, HGWD002.QUERY, new HGWD002());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
......
...@@ -60,7 +60,6 @@ public class ServiceHGWD099 extends ServiceEPBase { ...@@ -60,7 +60,6 @@ public class ServiceHGWD099 extends ServiceEPBase {
try { try {
Map queryRow =EiInfoUtils.getFirstRow(inInfo); Map queryRow =EiInfoUtils.getFirstRow(inInfo);
if (StringUtils.isNotEmpty(queryRow.get(HGWD001.FIELD_FILE_ID).toString())){ if (StringUtils.isNotEmpty(queryRow.get(HGWD001.FIELD_FILE_ID).toString())){
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, User.FIELD_USER_ID, UserSessionUtils.getUserId());
inInfo = super.query(inInfo, HGWD099.QUERY, new HGWD099()); inInfo = super.query(inInfo, HGWD099.QUERY, new HGWD099());
} }
} catch (Throwable e) { } catch (Throwable e) {
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0 AND DELETE_FLAG = 0
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<sql id="condition"> <sql id="condition">
AND A.DELETE_FLAG = 0 AND A.DELETE_FLAG = 0
AND B.DELETE_FLAG = 0
AND B.BIZ_TYPE = 'WD' AND B.BIZ_TYPE = 'WD'
<include refid="HGXSDataAuth.authConditionA"/> <include refid="HGXSDataAuth.authConditionA"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
...@@ -52,6 +53,9 @@ ...@@ -52,6 +53,9 @@
<isNotEmpty prepend=" AND " property="docName"> <isNotEmpty prepend=" AND " property="docName">
B.DOC_NAME LIKE CONCAT('%', #docName#, '%') B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
B.BIZ_ID IN (select FILE_ID from ${hggpSchema}.hgwd003 where USER_ID = #userId# and FILE_ID = #parentId# )
</isNotEmpty>
</sql> </sql>
<sql id="orderBy"> <sql id="orderBy">
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,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="fileId">
BIZ_ID IN (select FILE_ID from ${hggpSchema}.hgwd003 where USER_ID = #userId# and FILE_ID = #fileId# ) BIZ_ID IN (select FILE_ID from ${hggpSchema}.hgwd003 where USER_ID = #userId# and FILE_ID = #fileId# )
</isNotEmpty> </isNotEmpty>-->
<isNotEmpty prepend=" AND " property="docId"> <isNotEmpty prepend=" AND " property="docId">
DOC_ID = #docId# DOC_ID = #docId#
</isNotEmpty> </isNotEmpty>
...@@ -50,6 +50,9 @@ ...@@ -50,6 +50,9 @@
<isNotEmpty prepend=" AND " property="releaseDate"> <isNotEmpty prepend=" AND " property="releaseDate">
RELEASE_DATE = #releaseDate# RELEASE_DATE = #releaseDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
BIZ_ID = #parentId#
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
......
...@@ -471,9 +471,10 @@ $(function () { ...@@ -471,9 +471,10 @@ $(function () {
// 附件上传 // 附件上传
$("#UPLOAD_FILE").on("click", uploadFile); $("#UPLOAD_FILE").on("click", uploadFile);
//发布
$("#RELEASE").click("click",updateRelease) $("#RELEASE").click("click",updateRelease);
//变更记录
$("#CHANGE_RECORD").on("click", changeResord);
}, },
onDelete: function (e) { onDelete: function (e) {
// 阻止默认请求,使用自定义删除 // 阻止默认请求,使用自定义删除
...@@ -833,7 +834,7 @@ function uploadFile() { ...@@ -833,7 +834,7 @@ function uploadFile() {
}); });
} }
function changeFile(docId,bizId) { function changeResor(docId,bizId) {
JSColorbox.open({ JSColorbox.open({
href: "HGWD099A?methodName=initLoad&inqu_status-0-bizType=WD" + href: "HGWD099A?methodName=initLoad&inqu_status-0-bizType=WD" +
"&inqu_status-0-bizId="+bizId+"" + "&inqu_status-0-bizId="+bizId+"" +
...@@ -925,7 +926,6 @@ function updateRelease() { ...@@ -925,7 +926,6 @@ function updateRelease() {
); );
} }
/** /**
* 显示授权按钮 * 显示授权按钮
*/ */
...@@ -935,8 +935,31 @@ let showAuthButton = function () { ...@@ -935,8 +935,31 @@ let showAuthButton = function () {
if (leafType && leafType >0) { if (leafType && leafType >0) {
$("#RELEASE").attr("disabled", false); $("#RELEASE").attr("disabled", false);
$("#UPLOAD_FILE").attr("disabled", false); $("#UPLOAD_FILE").attr("disabled", false);
$("#CHANGE_RECORD").attr("disabled", true);
} else { } else {
$("#RELEASE").attr("disabled", true); $("#RELEASE").attr("disabled", true);
$("#UPLOAD_FILE").attr("disabled", true); $("#UPLOAD_FILE").attr("disabled", true);
$("#CHANGE_RECORD").attr("disabled", false);
} }
}
/**
* 文件上传
*/
function changeResord() {
let leafType = IPLATUI.EFTree.categoryTree.selectTreeNode.leafLevel;
if (isBlank(leafType)){
message("请选择文档目录树节点!");
return;
}
JSColorbox.open({
href: "HGWD001A?methodName=initLoad&inqu_status-0-bizType=WD" +
"&inqu_status-0-projCode=" + $("#inqu_status-0-parentId").val()+"" +
"&inqu_status-0-projName=" + $("#inqu_status-0-fileName").val() +
"&efParentFormEname=HGWD001",
title: "<div style='text-align: center;'>变更记录</div>",
width: "80%",
height: "80%",
callbackName: uploadFileCallback
});
} }
\ No newline at end of file
...@@ -4,7 +4,7 @@ $(function () { ...@@ -4,7 +4,7 @@ $(function () {
"result": { "result": {
exportGrid: false, // 隐藏右侧自定义导出按钮 exportGrid: false, // 隐藏右侧自定义导出按钮
pageable: { pageable: {
pageSize: 20, pageSize: 10,
pageSizes: [20, 50, 70, 100], pageSizes: [20, 50, 70, 100],
}, },
columns: [/*{ columns: [/*{
...@@ -22,19 +22,19 @@ $(function () { ...@@ -22,19 +22,19 @@ $(function () {
field: "changeStart", field: "changeStart",
template: function (item) { template: function (item) {
let template = item["changeStart"] let template = item["changeStart"]
if (item.changeType == "uploadAdd" || item.changeType == "uploadDelete") { /* if (item.changeType == "uploadAdd" || item.changeType == "uploadDelete") {
template = ""; template = "";
} }*/
return template; return template;
} }
},{ },{
field: "changeEnd", field: "changeEnd",
template: function (item) { template: function (item) {
let template = item["changeEnd"] let template = item["changeEnd"]
if (item.changeType == "uploadAdd" || item.changeType == "uploadDelete") { /*if (item.changeType == "uploadAdd" || item.changeType == "uploadDelete") {
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + downloadHref(item.changeStart) + '" target="_blank">'+item.changeEnd+'</a>'; + 'href="' + downloadHref(item.changeStart) + '" target="_blank">'+item.changeEnd+'</a>';
} }*/
return template; return template;
} }
}], }],
......
...@@ -20,11 +20,12 @@ ...@@ -20,11 +20,12 @@
<EF:EFPage title="变更记录"> <EF:EFPage title="变更记录">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains" readonly="true"> <EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="projCode" cname="项目编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3" readonly="true"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="changeType" cname="变更类型" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="changeType" cname="变更类型" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgwd.changeType"/> <EF:EFCodeOption codeName="hggp.hgwd.changeType"/>
......
...@@ -177,7 +177,14 @@ let save = function (btnNode) { ...@@ -177,7 +177,14 @@ let save = function (btnNode) {
if(flag) { if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () { ok: function () {
JSUtils.submitGridsData("result", "HGWD001E", "save", true); JSUtils.submitGridsData("result", "HGWD001E", "save", true,
function (e) {
var status = e.status;
if (status !== -1) {
let parentOrgId = $("#inqu_status-0-parentOrgId").val();
parent.JSColorbox.setValueCallback(parentOrgId);
}
});
btnNode.attr("disabled", false); btnNode.attr("disabled", false);
} }
}); });
......
...@@ -145,7 +145,15 @@ let save = function (btnNode) { ...@@ -145,7 +145,15 @@ let save = function (btnNode) {
if(flag) { if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () { ok: function () {
JSUtils.submitGridsData("result", "HGWD001F", "save", true); JSUtils.submitGridsData("result", "HGWD001F", "save", true,
function (e) {
var status = e.status;
if (status !== -1) {
let parentOrgId = $("#inqu_status-0-parentOrgId").val();
parent.JSColorbox.setValueCallback(parentOrgId);
}
}
);
btnNode.attr("disabled", false); btnNode.attr("disabled", false);
} }
}); });
......
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