Commit 66cb79a3 by liuyang

2024-09-05 发布变更逻辑调整

parent ae61af53
...@@ -35,5 +35,15 @@ public class HgWdConstant { ...@@ -35,5 +35,15 @@ public class HgWdConstant {
// 目录 // 目录
public static final String C = "C"; public static final String C = "C";
} }
/**
* 操作状态
*/
public static class OperStatus {
//新增
public static final Integer S_0 = 0;
//变更
public static final Integer S_1 = 1;
}
} }
...@@ -37,6 +37,7 @@ public class HGWD099 extends DaoEPBase { ...@@ -37,6 +37,7 @@ public class HGWD099 extends DaoEPBase {
public static final String FIELD_RELEASE_DATE = "releaseDate"; /* 发布时间*/ public static final String FIELD_RELEASE_DATE = "releaseDate"; /* 发布时间*/
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 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"; /* 企业编码 预留*/
...@@ -85,6 +86,7 @@ public class HGWD099 extends DaoEPBase { ...@@ -85,6 +86,7 @@ public class HGWD099 extends DaoEPBase {
private String releaseDate = " "; /* 发布时间*/ private String releaseDate = " "; /* 发布时间*/
private Integer docVersion = new Integer(0); /* 文件版本号*/ private Integer docVersion = new Integer(0); /* 文件版本号*/
private String docType = " "; /* 文件类型*/ private String docType = " "; /* 文件类型*/
private Integer operStatus = new Integer(0);
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -172,6 +174,10 @@ public class HGWD099 extends DaoEPBase { ...@@ -172,6 +174,10 @@ public class HGWD099 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_OPER_STATUS);
eiColumn.setDescName("操作状态");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -471,6 +477,14 @@ public class HGWD099 extends DaoEPBase { ...@@ -471,6 +477,14 @@ public class HGWD099 extends DaoEPBase {
this.docType = docType; this.docType = docType;
} }
public Integer getOperStatus() {
return operStatus;
}
public void setOperStatus(Integer operStatus) {
this.operStatus = operStatus;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -499,6 +513,7 @@ public class HGWD099 extends DaoEPBase { ...@@ -499,6 +513,7 @@ public class HGWD099 extends DaoEPBase {
setDocVersion(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOC_VERSION)), docVersion)); setDocVersion(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOC_VERSION)), docVersion));
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));
} }
/** /**
...@@ -528,6 +543,7 @@ public class HGWD099 extends DaoEPBase { ...@@ -528,6 +543,7 @@ public class HGWD099 extends DaoEPBase {
map.put(FIELD_DOC_VERSION, StringUtils.toString(docVersion, eiMetadata.getMeta(FIELD_DOC_VERSION))); map.put(FIELD_DOC_VERSION, StringUtils.toString(docVersion, eiMetadata.getMeta(FIELD_DOC_VERSION)));
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)));
return map; return map;
} }
......
...@@ -203,6 +203,7 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -203,6 +203,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd099.fromMap(map); hgwd099.fromMap(map);
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);
List<HGWD003> listByFile = HGWDTools.HgWd003.listByFile(hgwd099.getBizId()); List<HGWD003> listByFile = HGWDTools.HgWd003.listByFile(hgwd099.getBizId());
List hgwd003s = listByFile.stream().map(HGWD003::getUserId).distinct().collect(Collectors.toList()); List hgwd003s = listByFile.stream().map(HGWD003::getUserId).distinct().collect(Collectors.toList());
AssertUtils.isTrue(hgwd003s.size() <= 1, "文件未分配人员,请先分配人员!"); AssertUtils.isTrue(hgwd003s.size() <= 1, "文件未分配人员,请先分配人员!");
...@@ -221,7 +222,10 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -221,7 +222,10 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd001.setRemark(changeContent.trim().length()==0?"附件发布":changeContent); hgwd001.setRemark(changeContent.trim().length()==0?"附件发布":changeContent);
DaoUtils.update(HGWD001.RELEASE_DATE, hgwd001); DaoUtils.update(HGWD001.RELEASE_DATE, hgwd001);
} }
HGWDTools.interaction(hgwd001,strFileName.append("变更内容:").append(changeContent).toString()); if (StringUtils.isNotEmpty(changeContent)) {
strFileName.append("变更内容:").append(changeContent);
}
HGWDTools.interaction(hgwd001,strFileName.toString());
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "发布成功")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "发布成功")});
...@@ -263,6 +267,7 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -263,6 +267,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
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.setStatus(HgWdConstant.FileStatus.S_0); hgwd099.setStatus(HgWdConstant.FileStatus.S_0);
hgwd099.setOperStatus(HgWdConstant.OperStatus.S_1);
DaoUtils.insert(HGWD099.UPDATE, hgwd099); DaoUtils.insert(HGWD099.UPDATE, hgwd099);
} }
HGWDTools.interaction(hgwd001,strFileName.substring(0,strFileName.length()-1)); HGWDTools.interaction(hgwd001,strFileName.substring(0,strFileName.length()-1));
...@@ -296,6 +301,7 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -296,6 +301,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd001a.setChangeStartCode(hgwd099.getDocId()); hgwd001a.setChangeStartCode(hgwd099.getDocId());
hgwd001a.setChangeStart(hgwd099.getDocName()); hgwd001a.setChangeStart(hgwd099.getDocName());
}else if (ChangeTypeEnum.RELEASE.getCode().equals(type)){ }else if (ChangeTypeEnum.RELEASE.getCode().equals(type)){
hgwd001a.setChangeType(ChangeTypeEnum.RELEASE.getCode());
hgwd001a.setChangeContent(hgwd001.getRemark().trim().length()==0?"附件发布":hgwd001.getRemark().trim()); hgwd001a.setChangeContent(hgwd001.getRemark().trim().length()==0?"附件发布":hgwd001.getRemark().trim());
hgwd001a.setChangeStart("V".concat(hgwd001.getDocVersion()+"")); hgwd001a.setChangeStart("V".concat(hgwd001.getDocVersion()+""));
hgwd001a.setChangeEnd("V".concat(hgwd001.getDocVersion()+1+"")); hgwd001a.setChangeEnd("V".concat(hgwd001.getDocVersion()+1+""));
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
PREVIEW_NUM as "previewNum", <!-- 预览次数 --> PREVIEW_NUM as "previewNum", <!-- 预览次数 -->
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"
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -62,6 +63,9 @@ ...@@ -62,6 +63,9 @@
<isNotEmpty prepend=" AND " property="deleteFlag"> <isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG in <iterate close=")" open="(" conjunction="," property="deleteFlag">#deleteFlag[]#</iterate> DELETE_FLAG in <iterate close=")" open="(" conjunction="," property="deleteFlag">#deleteFlag[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="operStatus">
OPER_STATUS = #operStatus#
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -119,10 +123,11 @@ ...@@ -119,10 +123,11 @@
DOC_TYPE, <!-- 文件名称 --> DOC_TYPE, <!-- 文件名称 -->
STATUS, STATUS,
DOC_VERSION, DOC_VERSION,
RELEASE_DATE RELEASE_DATE,
OPER_STATUS
) VALUES ( ) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #docType#, #status#, #docVersion#, #releaseDate# #deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #docType#, #status#, #docVersion#, #releaseDate#, #operStatus#
) )
</insert> </insert>
...@@ -155,6 +160,7 @@ ...@@ -155,6 +160,7 @@
STATUS = #status#, STATUS = #status#,
DOC_VERSION = DOC_VERSION + 1, <!--版本号--> DOC_VERSION = DOC_VERSION + 1, <!--版本号-->
RELEASE_DATE = #releaseDate#, <!--发布时间--> RELEASE_DATE = #releaseDate#, <!--发布时间-->
OPER_STATUS = #operStatus#,
UPDATED_BY = #updatedBy#, <!-- 修改人 --> UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 --> UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 --> UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
...@@ -177,6 +183,7 @@ ...@@ -177,6 +183,7 @@
RELEASE_DATE = #releaseDate#, <!--发布时间--> RELEASE_DATE = #releaseDate#, <!--发布时间-->
DOC_VERSION = DOC_VERSION + 1, <!--版本号--> DOC_VERSION = DOC_VERSION + 1, <!--版本号-->
STATUS = #status#, <!-- 状态 --> STATUS = #status#, <!-- 状态 -->
OPER_STATUS = #operStatus#,
<include refid="SqlBase.updateRevise"/> <include refid="SqlBase.updateRevise"/>
WHERE ID = #id# WHERE ID = #id#
</update> </update>
......
...@@ -271,7 +271,7 @@ public class HGWDTools { ...@@ -271,7 +271,7 @@ public class HGWDTools {
if (Objects.nonNull(hgwd001)){ if (Objects.nonNull(hgwd001)){
List<HGWD003> listByFile = HGWDTools.HgWd003.listByFile(hgwd001.getFileId()); //获取文件下的权限人员 List<HGWD003> listByFile = HGWDTools.HgWd003.listByFile(hgwd001.getFileId()); //获取文件下的权限人员
HGPZ009 hgpz009 = HGPZTools.HgPz009.getByCode(hgwd001.getAccountCode()); //HGPZ009 hgpz009 = HGPZTools.HgPz009.getByCode(hgwd001.getAccountCode());
List<String> userIds = listByFile.stream().filter(item -> !item.getUserId().equals(UserSessionUtils.getUserId()) && item.getIsProjectManager() == 1) List<String> userIds = listByFile.stream().filter(item -> !item.getUserId().equals(UserSessionUtils.getUserId()) && item.getIsProjectManager() == 1)
.map(HGWD003::getExtId) .map(HGWD003::getExtId)
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="180" hidden="true"/> <EF:EFColumn ename="docId" cname="文件ID" enable="false" width="180" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="140" align="center"/> <EF:EFColumn ename="operator" cname="操作" enable="false" width="140" align="center"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="180"/> <EF:EFColumn ename="docName" cname="文件名称" enable="false" width="180"/>
<EF:EFColumn ename="docType" cname="文件类型" enable="false" width="110"/> <EF:EFColumn ename="docType" cname="文件类型" enable="false" width="110" align="center"/>
<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">
<EF:EFCodeOption codeName="hggp.hgwd.status"/> <EF:EFCodeOption codeName="hggp.hgwd.status"/>
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="项目名称" width="160" enable="true" readonly="true" align="center" <EF:EFColumn ename="companyName" cname="公司名称" width="160" enable="true" readonly="true" align="center"
required="true" hidden="true"/> required="true" 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#"
......
...@@ -24,8 +24,10 @@ ...@@ -24,8 +24,10 @@
<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="projCode" cname="项目编码" type="hidden" colWidth="3"/> <EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" colWidth="3" filter="contains" readonly="true">
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3" readonly="true"/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<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"/>
......
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