feat(文档拆分):企标拆分详情页权限判断、详情页条款内容搜索
This commit is contained in:
+39
-9
@@ -261,6 +261,13 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
if (horizonValid) {
|
if (horizonValid) {
|
||||||
isHorizontalOverstep(parameter.get(INFO_ID).toString());
|
isHorizontalOverstep(parameter.get(INFO_ID).toString());
|
||||||
}
|
}
|
||||||
|
// 企标权限校验
|
||||||
|
if (parameter.containsKey("serialNumber")){
|
||||||
|
SarFileSplitInfoEO sarFileSplitInfoEO = new SarFileSplitInfoEO();
|
||||||
|
sarFileSplitInfoEO.setSerialNumber((String) parameter.get("serialNumber"));
|
||||||
|
enterpriseCheck(sarFileSplitInfoEO);
|
||||||
|
parameter.remove("serialNumber");
|
||||||
|
}
|
||||||
// 查询全部字段列表
|
// 查询全部字段列表
|
||||||
List<LawsTag> fieldList = lawsCommonMapper.getFieldList(TableNameEnum.DOCUMENT_SPLIT.getTableName());
|
List<LawsTag> fieldList = lawsCommonMapper.getFieldList(TableNameEnum.DOCUMENT_SPLIT.getTableName());
|
||||||
// 列表展示字段
|
// 列表展示字段
|
||||||
@@ -1033,11 +1040,21 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
public LawsDocumentSplitView queryView(Map<String, Object> parameter) {
|
public LawsDocumentSplitView queryView(Map<String, Object> parameter) {
|
||||||
LawsDocumentSplitView lawsDocumentSplitView = new LawsDocumentSplitView();
|
LawsDocumentSplitView lawsDocumentSplitView = new LawsDocumentSplitView();
|
||||||
String id = (String) parameter.get(ID);
|
String id = (String) parameter.get(ID);
|
||||||
|
boolean itemContent = false;
|
||||||
// 水平越权
|
// 水平越权
|
||||||
if (parameter.containsKey("horizontalOverstep")){
|
if (parameter.containsKey("horizontalOverstep")){
|
||||||
isHorizontalOverstep(id);
|
isHorizontalOverstep(id);
|
||||||
parameter.remove("horizontalOverstep");
|
parameter.remove("horizontalOverstep");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 企标权限校验
|
||||||
|
if (parameter.containsKey("serial_number")){
|
||||||
|
SarFileSplitInfoEO sarFileSplitInfoEO = new SarFileSplitInfoEO();
|
||||||
|
sarFileSplitInfoEO.setSerialNumber((String) parameter.get("serial_number"));
|
||||||
|
enterpriseCheck(sarFileSplitInfoEO);
|
||||||
|
parameter.remove("serial_number");
|
||||||
|
}
|
||||||
|
|
||||||
// 文档拆分信息
|
// 文档拆分信息
|
||||||
DocumentSplitInfo documentSplitInfo = new DocumentSplitInfo();
|
DocumentSplitInfo documentSplitInfo = new DocumentSplitInfo();
|
||||||
documentSplitInfo.setId(id);
|
documentSplitInfo.setId(id);
|
||||||
@@ -1047,20 +1064,33 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
|
|||||||
List<DocumentSplitInfo> documentSplitInfos = queryByList(documentSplitInfo);
|
List<DocumentSplitInfo> documentSplitInfos = queryByList(documentSplitInfo);
|
||||||
lawsDocumentSplitView.setDocumentSplitInfo(documentSplitInfos.get(0));
|
lawsDocumentSplitView.setDocumentSplitInfo(documentSplitInfos.get(0));
|
||||||
|
|
||||||
// 目录
|
if (parameter.containsKey("item_content")){
|
||||||
SarFileSplitMenuEOPage splitMenuEOPage = new SarFileSplitMenuEOPage();
|
itemContent = true;
|
||||||
splitMenuEOPage.setValidFlag("0");
|
}
|
||||||
splitMenuEOPage.setOrderBy("display_seq");
|
|
||||||
splitMenuEOPage.setInfoId(id);
|
|
||||||
List<SarFileSplitMenuEO> sarFileSplitMenuEOS = sarFileSplitMenuEOService.queryByList(splitMenuEOPage);
|
|
||||||
// 不需要总目录层级
|
|
||||||
lawsDocumentSplitView.setSarFileSplitMenuEO(sarFileSplitMenuEOS.get(0).getChildren());
|
|
||||||
|
|
||||||
// 文档拆分详情
|
// 文档拆分详情
|
||||||
parameter.remove(ID);
|
parameter.remove(ID);
|
||||||
parameter.put(INFO_ID, id);
|
parameter.put(INFO_ID, id);
|
||||||
List<Map<String, Object>> documentSplitDetailByList = queryDocumentSplitDetailByList(parameter);
|
List<Map<String, Object>> documentSplitDetailByList = queryDocumentSplitDetailByList(parameter);
|
||||||
lawsDocumentSplitView.setDocumentSplitDetail(documentSplitDetailByList);
|
lawsDocumentSplitView.setDocumentSplitDetail(documentSplitDetailByList);
|
||||||
|
|
||||||
|
// 目录
|
||||||
|
SarFileSplitMenuEOPage splitMenuEOPage = new SarFileSplitMenuEOPage();
|
||||||
|
splitMenuEOPage.setValidFlag("0");
|
||||||
|
splitMenuEOPage.setOrderBy("display_seq");
|
||||||
|
splitMenuEOPage.setInfoId(id);
|
||||||
|
if (itemContent && CollectionUtils.isNotEmpty(documentSplitDetailByList)){
|
||||||
|
List<String> menuId = documentSplitDetailByList.stream()
|
||||||
|
.map(v -> String.valueOf(v.get("menu_id"))).distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
splitMenuEOPage.setIdList(menuId);
|
||||||
|
List<SarFileSplitMenuEO> sarFileSplitMenuEOS = sarFileSplitMenuEOService.queryByList(splitMenuEOPage);
|
||||||
|
lawsDocumentSplitView.setSarFileSplitMenuEO(sarFileSplitMenuEOS);
|
||||||
|
}else {
|
||||||
|
List<SarFileSplitMenuEO> sarFileSplitMenuEOS = sarFileSplitMenuEOService.queryByList(splitMenuEOPage);
|
||||||
|
// 不需要总目录层级
|
||||||
|
lawsDocumentSplitView.setSarFileSplitMenuEO(sarFileSplitMenuEOS.get(0).getChildren());
|
||||||
|
}
|
||||||
|
|
||||||
return lawsDocumentSplitView;
|
return lawsDocumentSplitView;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+7
-1
@@ -71,6 +71,12 @@
|
|||||||
<if test="modifyUser != null" >
|
<if test="modifyUser != null" >
|
||||||
and modify_user ${modifyUserOperator} #{modifyUser}
|
and modify_user ${modifyUserOperator} #{modifyUser}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="idList != null and idList.size>0" >
|
||||||
|
and id in
|
||||||
|
<foreach collection="idList" item="id" index="index" open="(" close=")" separator=",">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@@ -178,7 +184,7 @@
|
|||||||
|
|
||||||
<!-- 根据id查询 SAR_FILE_SPLIT_MENU -->
|
<!-- 根据id查询 SAR_FILE_SPLIT_MENU -->
|
||||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||||
select <include refid="Base_Column_List" />
|
select <include refid="Base_Column_List" />
|
||||||
from SAR_FILE_SPLIT_MENU
|
from SAR_FILE_SPLIT_MENU
|
||||||
where id = #{value}
|
where id = #{value}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.jero.modules.split.page;
|
package com.jero.modules.split.page;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.jero.modules.split.common.BasePage;
|
import com.jero.modules.split.common.BasePage;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <b>功能:</b>SAR_FILE_SPLIT_MENU SarFileSplitMenuEOPage<br>
|
* <b>功能:</b>SAR_FILE_SPLIT_MENU SarFileSplitMenuEOPage<br>
|
||||||
* <b>作者:</b>code generator<br>
|
* <b>作者:</b>code generator<br>
|
||||||
@@ -142,4 +145,10 @@ public class SarFileSplitMenuEOPage extends BasePage {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty("更新人运算符")
|
@ApiModelProperty("更新人运算符")
|
||||||
private String modifyUserOperator = "=";
|
private String modifyUserOperator = "=";
|
||||||
|
/**
|
||||||
|
* idList
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("idList")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<String> idList;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -205,6 +205,10 @@ public class SarFileSplitMenuEOServiceImpl extends ServiceImpl<SarFileSplitMenuE
|
|||||||
sarFileSplitMenuEO.setMoveDownFlag(moveDownFlag);
|
sarFileSplitMenuEO.setMoveDownFlag(moveDownFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(page.getIdList())){
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
// 关键字查询
|
// 关键字查询
|
||||||
if (StringUtils.isNotBlank(itemName) && !result.isEmpty()){
|
if (StringUtils.isNotBlank(itemName) && !result.isEmpty()){
|
||||||
List<SarFileSplitMenuEO> trees = result.stream()
|
List<SarFileSplitMenuEO> trees = result.stream()
|
||||||
|
|||||||
Reference in New Issue
Block a user