Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+56
-2
@@ -45,6 +45,9 @@ import org.springframework.beans.factory.annotation.Value;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
import java.nio.file.StandardOpenOption;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -298,10 +301,12 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
|
|||||||
cell.setCellValue(titleArr[i]);
|
cell.setCellValue(titleArr[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<FileSplitValImgExportDto> allImgList = new ArrayList<>(); // 存储文件数据
|
||||||
|
|
||||||
//设置导出数据
|
//设置导出数据
|
||||||
if(CollectionUtils.isNotEmpty(exportData)) {
|
if(CollectionUtils.isNotEmpty(exportData)) {
|
||||||
List<FileSpiltValTableExportDto> allTableList = new ArrayList<>(); // 存储表格数据
|
List<FileSpiltValTableExportDto> allTableList = new ArrayList<>(); // 存储表格数据
|
||||||
List<FileSplitValImgExportDto> allImgList = new ArrayList<>(); // 存储文件数据
|
|
||||||
SarFileSplitItemsEOPage page = new SarFileSplitItemsEOPage();
|
SarFileSplitItemsEOPage page = new SarFileSplitItemsEOPage();
|
||||||
|
|
||||||
for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) {
|
for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) {
|
||||||
@@ -318,7 +323,11 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
|
|||||||
List<SarFileSplitItemsValEO> getValList = this.sarFileSplitItemsValEOService.queryByList(valEOPage);
|
List<SarFileSplitItemsValEO> getValList = this.sarFileSplitItemsValEOService.queryByList(valEOPage);
|
||||||
List<FileSplitValExportDto> valContentList = this.fileSplitItemsEOService.combineItemValInfo(getValList,allTableList,allImgList,page); //TODO
|
List<FileSplitValExportDto> valContentList = this.fileSplitItemsEOService.combineItemValInfo(getValList,allTableList,allImgList,page); //TODO
|
||||||
if(CollectionUtils.isNotEmpty(valContentList)){
|
if(CollectionUtils.isNotEmpty(valContentList)){
|
||||||
itemContent = valContentList.get(0).getValContent();
|
String contents = "";
|
||||||
|
for (FileSplitValExportDto fileSplitValExportDto : valContentList) {
|
||||||
|
contents += fileSplitValExportDto.getValContent() + "\n";
|
||||||
|
}
|
||||||
|
itemContent = contents;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,6 +350,12 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
|
|||||||
fileTemp.delete();
|
fileTemp.delete();
|
||||||
}
|
}
|
||||||
fileTemp.mkdirs();
|
fileTemp.mkdirs();
|
||||||
|
|
||||||
|
//下载图片内容到导出的压缩包中
|
||||||
|
if (allImgList != null && !allImgList.isEmpty()) {
|
||||||
|
downLoadImgList(allImgList,path);
|
||||||
|
}
|
||||||
|
|
||||||
//excel
|
//excel
|
||||||
OutputStream excelOS = new FileOutputStream(path + File.separator + fileName);
|
OutputStream excelOS = new FileOutputStream(path + File.separator + fileName);
|
||||||
workbook.write(excelOS);
|
workbook.write(excelOS);
|
||||||
@@ -434,4 +449,43 @@ public class LawsTechnologyEvaluationItemResultEOServiceImpl extends ServiceImpl
|
|||||||
}
|
}
|
||||||
return evaluationMethodsName;
|
return evaluationMethodsName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void downLoadImgList(List<FileSplitValImgExportDto> allImgList, String fileNowPath) {
|
||||||
|
for(FileSplitValImgExportDto imgExportDto : allImgList){
|
||||||
|
String oldPath = imgExportDto.getImgPath();
|
||||||
|
String newPath = fileNowPath + File.separator + imgExportDto.getImgName();
|
||||||
|
if (CosBootUtil.doesObjectExist(oldPath)){
|
||||||
|
try (InputStream in = CosBootUtil.download(oldPath);) {
|
||||||
|
copyFile1(in, newPath);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void copyFile1(InputStream in, String destPath) throws IOException {
|
||||||
|
BufferedInputStream bis = new BufferedInputStream(in);
|
||||||
|
BufferedOutputStream bos =
|
||||||
|
new BufferedOutputStream(Files.newOutputStream(Paths.get(destPath),
|
||||||
|
StandardOpenOption.CREATE,
|
||||||
|
StandardOpenOption.TRUNCATE_EXISTING,
|
||||||
|
StandardOpenOption.WRITE));
|
||||||
|
// 打开输入流
|
||||||
|
// FileInputStream fis = new FileInputStream(srcPath);
|
||||||
|
// 打开输出流
|
||||||
|
// FileOutputStream fos = new FileOutputStream(destPath);
|
||||||
|
// 读取和写入信息
|
||||||
|
byte[] bytes = new byte[1024 * 1024];
|
||||||
|
int len;
|
||||||
|
while ((len = bis.read(bytes)) > 0) {
|
||||||
|
bos.write(bytes, 0, len);
|
||||||
|
}
|
||||||
|
// 关闭流 先开后关 后开先关
|
||||||
|
// 先开后关,先开的输入流,再开的输出流,那么应该先关输出流,再关输入流
|
||||||
|
// 先关外层,再关内层。如BufferedInputStream包装了一个FileInputStream,那么先关BufferedInputStream,再关FileInputStream。
|
||||||
|
bos.close(); // 后开先关
|
||||||
|
bis.close(); // 先开后关
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1519,7 +1519,7 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
|||||||
list1.add("</text>");
|
list1.add("</text>");
|
||||||
mapTemp.put("pre_tags", list);
|
mapTemp.put("pre_tags", list);
|
||||||
mapTemp.put("post_tags", list1);
|
mapTemp.put("post_tags", list1);
|
||||||
mapTemp.put("fragment_size", 500);//高亮字段内容长度,去除html样式标签,统计字数,设置为200
|
mapTemp.put("fragment_size", 320);//高亮字段内容长度,去除html样式标签,统计字数,设置为200
|
||||||
mapTemp.put("number_of_fragments", 1);//高亮内容默认分为5段, 此处设置为一段
|
mapTemp.put("number_of_fragments", 1);//高亮内容默认分为5段, 此处设置为一段
|
||||||
mapTemp.put("type", "plain");
|
mapTemp.put("type", "plain");
|
||||||
mapHighlight.put(key, mapTemp);
|
mapHighlight.put(key, mapTemp);
|
||||||
|
|||||||
+2
-1
@@ -3209,7 +3209,8 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if ("TEXT".equals(type)) {
|
} else if ("TEXT".equals(type)) {
|
||||||
lastOne.setValContent(lastOne.getValContent()+itemsValEO.getItemContent() + "\n");
|
//lastOne.setValContent(lastOne.getValContent()+itemsValEO.getItemContent() + "\n");
|
||||||
|
lastOne.setValContent(itemsValEO.getItemContent() + "\n");
|
||||||
valContent.add(lastOne);
|
valContent.add(lastOne);
|
||||||
|
|
||||||
//第一次
|
//第一次
|
||||||
|
|||||||
+3
-3
@@ -41,9 +41,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-bootom-button">
|
<!-- <div class="drawer-bootom-button">-->
|
||||||
<a-button @click="handleCancel" type="danger">{{$t('cancel')}}</a-button>
|
<!-- <a-button @click="handleCancel" type="danger">{{$t('cancel')}}</a-button>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<classificationMaintenanceAdd ref="classificationMaintenanceAddRef"
|
<classificationMaintenanceAdd ref="classificationMaintenanceAddRef"
|
||||||
@classificationMaintenanceAddForm="classificationMaintenanceAddForm"/>
|
@classificationMaintenanceAddForm="classificationMaintenanceAddForm"/>
|
||||||
|
|||||||
+3
-3
@@ -46,9 +46,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-bootom-button">
|
<!-- <div class="drawer-bootom-button">-->
|
||||||
<a-button @click="handleCancel" type="danger">{{$t('cancel')}}</a-button>
|
<!-- <a-button @click="handleCancel" type="danger">{{$t('cancel')}}</a-button>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<countryCardReleaseModelAdd ref="countryCardReleaseModelAddRef"
|
<countryCardReleaseModelAdd ref="countryCardReleaseModelAddRef"
|
||||||
@countryCardReleaseModelAddForm="countryCardReleaseModelAddForm"/>
|
@countryCardReleaseModelAddForm="countryCardReleaseModelAddForm"/>
|
||||||
|
|||||||
+3
-3
@@ -41,9 +41,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-bootom-button">
|
<!-- <div class="drawer-bootom-button">-->
|
||||||
<a-button @click="handleCancel" type="danger">{{$t('cancel')}}</a-button>
|
<!-- <a-button @click="handleCancel" type="danger">{{$t('cancel')}}</a-button>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<optionMaintenanceAdd ref="optionMaintenanceAddRef"
|
<optionMaintenanceAdd ref="optionMaintenanceAddRef"
|
||||||
@optionMaintenanceAddForm="optionMaintenanceAddForm"/>
|
@optionMaintenanceAddForm="optionMaintenanceAddForm"/>
|
||||||
|
|||||||
+2
-1
@@ -75,7 +75,8 @@
|
|||||||
title: this.$t('clauseNo'),
|
title: this.$t('clauseNo'),
|
||||||
dataIndex: 'itemNum',
|
dataIndex: 'itemNum',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
ellipsis: true
|
ellipsis: true,
|
||||||
|
width: 120
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('clauseName'),
|
title: this.$t('clauseName'),
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<div class="myList-box-content-box" v-for="(item,index) in dataSource" :key="index" @click="prcClick(item)">
|
<div class="myList-box-content-box" v-for="(item,index) in dataSource" :key="index" @click="prcClick(item)">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<span class="top-text" :title="item.prcName">{{item.prcName}}</span>
|
<span class="top-text" :title="item.prcName">{{item.prcName}}</span>
|
||||||
<span class="top-admin" :title="prcTypeName[item.prcType]">{{prcTypeName[item.prcType]}}</span>
|
<!-- <span class="top-admin" :title="prcTypeName[item.prcType]">{{prcTypeName[item.prcType]}}</span>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="button">
|
<div class="button">
|
||||||
{{item.creatTime}}
|
{{item.creatTime}}
|
||||||
@@ -161,25 +161,24 @@
|
|||||||
font-family: Blue Sky Noto;
|
font-family: Blue Sky Noto;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #040B29;
|
color: #040B29;
|
||||||
max-width: 50%;
|
max-width: calc(100% - 72px);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
/*.top-admin {*/
|
||||||
.top-admin {
|
/* font-size: 16px;*/
|
||||||
font-size: 16px;
|
/* font-family: Blue Sky Noto;*/
|
||||||
font-family: Blue Sky Noto;
|
/* display: inline-block;*/
|
||||||
display: inline-block;
|
/* font-weight: 400;*/
|
||||||
font-weight: 400;
|
/* color: #040B29;*/
|
||||||
color: #040B29;
|
/* margin-left: 4px;*/
|
||||||
margin-left: 4px;
|
/* max-width: calc(50% - 72px);*/
|
||||||
max-width: calc(50% - 72px);
|
/* overflow: hidden;*/
|
||||||
overflow: hidden;
|
/* text-overflow: ellipsis;*/
|
||||||
text-overflow: ellipsis;
|
/* white-space: nowrap;*/
|
||||||
white-space: nowrap;
|
/*}*/
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
|
|||||||
+37
-3
@@ -51,6 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="detail-content-content-right-data-text" v-html="item.itemsText"></div>
|
<div class="detail-content-content-right-data-text" v-html="item.itemsText"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<JLoading :loading="loadingText">{{$t('dataLoading')}}</JLoading>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -143,7 +144,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { postAction, putAction } from '../../../../api/manage'
|
import { postAction, putAction, getAction } from '../../../../api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'documentDataComparison',
|
name: 'documentDataComparison',
|
||||||
@@ -152,6 +153,7 @@
|
|||||||
formInline: {},
|
formInline: {},
|
||||||
formInlineText: {},
|
formInlineText: {},
|
||||||
dataLoadingText: '',
|
dataLoadingText: '',
|
||||||
|
loadingText:false,
|
||||||
rules: {
|
rules: {
|
||||||
comment: [
|
comment: [
|
||||||
{
|
{
|
||||||
@@ -322,6 +324,7 @@
|
|||||||
detailLeft[num].classList.add('detail-content-content-right-data-color')
|
detailLeft[num].classList.add('detail-content-content-right-data-color')
|
||||||
}
|
}
|
||||||
this.dataLeft = item
|
this.dataLeft = item
|
||||||
|
this.dataLeft.numIndex = num
|
||||||
if (this.isMatching) {
|
if (this.isMatching) {
|
||||||
let detailRightColor = document.getElementsByClassName('detail-content-content-right-data-color-right')
|
let detailRightColor = document.getElementsByClassName('detail-content-content-right-data-color-right')
|
||||||
if (detailRightColor && detailRightColor.length > 0) {
|
if (detailRightColor && detailRightColor.length > 0) {
|
||||||
@@ -335,6 +338,8 @@
|
|||||||
detailRight[item.targetStand].classList.add('detail-content-content-right-data-color-right')
|
detailRight[item.targetStand].classList.add('detail-content-content-right-data-color-right')
|
||||||
detailContent[0].scrollTop = detailRight[item.targetStand].offsetTop - 150
|
detailContent[0].scrollTop = detailRight[item.targetStand].offsetTop - 150
|
||||||
}
|
}
|
||||||
|
this.dataRight.numIndex = item.targetStand
|
||||||
|
this.clauseComparison()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -352,6 +357,7 @@
|
|||||||
detailRight[num].classList.add('detail-content-content-right-data-color-right')
|
detailRight[num].classList.add('detail-content-content-right-data-color-right')
|
||||||
}
|
}
|
||||||
this.dataRight = item
|
this.dataRight = item
|
||||||
|
this.dataRight.numIndex = num
|
||||||
if (this.isMatching) {
|
if (this.isMatching) {
|
||||||
let detailLeftColor = document.getElementsByClassName('detail-content-content-right-data-color')
|
let detailLeftColor = document.getElementsByClassName('detail-content-content-right-data-color')
|
||||||
if (detailLeftColor && detailLeftColor.length > 0) {
|
if (detailLeftColor && detailLeftColor.length > 0) {
|
||||||
@@ -359,15 +365,34 @@
|
|||||||
}
|
}
|
||||||
if (item.targetStand > -1) {
|
if (item.targetStand > -1) {
|
||||||
this.dataLeft = this.resultData.textLeft[item.targetStand]
|
this.dataLeft = this.resultData.textLeft[item.targetStand]
|
||||||
|
this.dataLeft.numIndex = item.targetStand
|
||||||
let detailContent = document.getElementsByClassName('detail-content-content-right-top')
|
let detailContent = document.getElementsByClassName('detail-content-content-right-top')
|
||||||
let detailLeft = document.getElementsByClassName('detail-content-content-right-data')
|
let detailLeft = document.getElementsByClassName('detail-content-content-right-data')
|
||||||
if (detailLeft && detailLeft.length > 0 && item.targetStand >= 0) {
|
if (detailLeft && detailLeft.length > 0 && item.targetStand >= 0) {
|
||||||
detailLeft[item.targetStand].classList.add('detail-content-content-right-data-color')
|
detailLeft[item.targetStand].classList.add('detail-content-content-right-data-color')
|
||||||
detailContent[0].scrollTop = detailLeft[item.targetStand].offsetTop - 150
|
detailContent[0].scrollTop = detailLeft[item.targetStand].offsetTop - 150
|
||||||
}
|
}
|
||||||
|
this.clauseComparison()
|
||||||
|
// this.resultData = { ...this.resultData }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
clauseComparison() {
|
||||||
|
let query = {
|
||||||
|
leftId: this.dataLeft.id,
|
||||||
|
rightId: this.dataRight.id
|
||||||
|
}
|
||||||
|
this.loadingText = true
|
||||||
|
getAction('/compare/sarFileCompareItem/clauseComparison', query).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.loadingText = false
|
||||||
|
this.resultData.textLeft[this.dataLeft.numIndex].itemsText = res.result[0]
|
||||||
|
this.resultData.textRight[this.dataRight.numIndex].itemsText = res.result[1]
|
||||||
|
}else{
|
||||||
|
this.loadingText = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
onSelectLeft(selectedKeys, exports) {
|
onSelectLeft(selectedKeys, exports) {
|
||||||
let node = exports.node.$vnode.data.props.dataRef
|
let node = exports.node.$vnode.data.props.dataRef
|
||||||
let detailLeft = document.getElementsByClassName('detail-content-content-right-data')
|
let detailLeft = document.getElementsByClassName('detail-content-content-right-data')
|
||||||
@@ -377,7 +402,7 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
for (let i = 0; i < this.resultData.textLeft.length; i++) {
|
for (let i = 0; i < this.resultData.textLeft.length; i++) {
|
||||||
if (node.parentId && node.itemName == this.resultData.textLeft[i].itemsName) {
|
if (node.parentId && node.menuId == this.resultData.textLeft[i].menuId) {
|
||||||
detailContent[0].scrollTop = detailLeft[i].offsetTop - 150
|
detailContent[0].scrollTop = detailLeft[i].offsetTop - 150
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -392,7 +417,7 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
for (let i = 0; i < this.resultData.textRight.length; i++) {
|
for (let i = 0; i < this.resultData.textRight.length; i++) {
|
||||||
if (node.parentId && node.itemName == this.resultData.textRight[i].itemsName) {
|
if (node.parentId && node.menuId == this.resultData.textRight[i].menuId) {
|
||||||
detailContent[0].scrollTop = detailRight[i].offsetTop - 150
|
detailContent[0].scrollTop = detailRight[i].offsetTop - 150
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -642,4 +667,13 @@
|
|||||||
border: 1px red solid;
|
border: 1px red solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .delClass {
|
||||||
|
background: #ff7168;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .insertClass {
|
||||||
|
background: rgba(85, 183, 255, .6);
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user