Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+3
@@ -155,6 +155,9 @@ public class SarFileCompareInfoServiceImpl extends ServiceImpl<SarFileCompareInf
|
|||||||
double compareSimilarity = 0.0;
|
double compareSimilarity = 0.0;
|
||||||
if (null != leftTxt && !leftTxt.isEmpty()) {
|
if (null != leftTxt && !leftTxt.isEmpty()) {
|
||||||
for (int j = 0; j < rightItemList.size(); j++) {
|
for (int j = 0; j < rightItemList.size(); j++) {
|
||||||
|
if(null == rightItemList.get(j).getTargetStand()){
|
||||||
|
rightItemList.get(j).setTargetStand(-1);
|
||||||
|
}
|
||||||
String rightTxt = rightItemList.get(j).getItemsText();
|
String rightTxt = rightItemList.get(j).getItemsText();
|
||||||
if (null != rightTxt && !rightTxt.isEmpty()) {
|
if (null != rightTxt && !rightTxt.isEmpty()) {
|
||||||
double similarity = CompHanLPUtils.findSimilarity(leftTxt.trim(), rightTxt.trim());
|
double similarity = CompHanLPUtils.findSimilarity(leftTxt.trim(), rightTxt.trim());
|
||||||
|
|||||||
+3
@@ -2229,6 +2229,9 @@ public class DiffUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getHtmlDiffStr(String text1,String text2){
|
public List<String> getHtmlDiffStr(String text1,String text2){
|
||||||
|
text1 = text1.replaceAll("<img.*\\>", "");
|
||||||
|
text2 = text2.replaceAll("<img.*\\>", "");
|
||||||
|
|
||||||
LinkedList<Diff> diffs = diff_main(text1, text2);
|
LinkedList<Diff> diffs = diff_main(text1, text2);
|
||||||
//定义输出结果
|
//定义输出结果
|
||||||
String LResultStr="";
|
String LResultStr="";
|
||||||
|
|||||||
+1
-1
@@ -494,7 +494,7 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
|
|||||||
os.close();
|
os.close();
|
||||||
fis.close();
|
fis.close();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
}finally {
|
}finally {
|
||||||
IOUtils.closeQuietly(os);
|
IOUtils.closeQuietly(os);
|
||||||
File file = new File(uploadpath + "/tempZip"+l);
|
File file = new File(uploadpath + "/tempZip"+l);
|
||||||
|
|||||||
+92
-54
@@ -28,17 +28,22 @@ import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFldChar;
|
|||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTJc;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTJc;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPageMar;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPageMar;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr;
|
||||||
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblLayoutType;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblWidth;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTText;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STFldCharType;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STFldCharType;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STJc;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STJc;
|
||||||
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblLayoutType;
|
||||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STTblWidth;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class WordUtil {
|
public class WordUtil {
|
||||||
@@ -410,11 +415,12 @@ public class WordUtil {
|
|||||||
String stateName = dictItem(sysDictItems, state,cut, DictCodeReportEnum.STATE.getValue());
|
String stateName = dictItem(sysDictItems, state,cut, DictCodeReportEnum.STATE.getValue());
|
||||||
String useMethodName = dictItem(sysDictItems, useMethod,cut, DictCodeReportEnum.USEMETHOD.getValue());
|
String useMethodName = dictItem(sysDictItems, useMethod,cut, DictCodeReportEnum.USEMETHOD.getValue());
|
||||||
|
|
||||||
|
|
||||||
XWPFTable table = document.createTable(12, 2);
|
XWPFTable table = document.createTable(12, 2);
|
||||||
|
|
||||||
//表格属性
|
//表格属性
|
||||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||||
|
//固定列宽(英文和数字的时候自动换行)
|
||||||
|
CTTblLayoutType ctTblLayoutType = tablePr.isSetTblLayout() ? tablePr.getTblLayout() : tablePr.addNewTblLayout();
|
||||||
|
ctTblLayoutType.setType(STTblLayoutType.FIXED);
|
||||||
//表格宽度
|
//表格宽度
|
||||||
CTJc cTJc = tablePr.addNewJc();
|
CTJc cTJc = tablePr.addNewJc();
|
||||||
//居中
|
//居中
|
||||||
@@ -478,57 +484,62 @@ public class WordUtil {
|
|||||||
//第12行
|
//第12行
|
||||||
setCell(table, 11,"Link",link);
|
setCell(table, 11,"Link",link);
|
||||||
}
|
}
|
||||||
// if(CutEnum.CN.getValue().equals(cut)){
|
// ctTblLayoutType.setType(STTblLayoutType.FIXED);
|
||||||
// //第1行
|
|
||||||
// setCell(table.getRow(0), "相关领域",technologyTerritoryName);
|
}
|
||||||
// //第2行
|
|
||||||
// setCell(table.getRow(1), "适用车型",applyCarName);
|
/**
|
||||||
// //第3行
|
* 已固定长度分隔字符串
|
||||||
// setCell(table.getRow(2), "适用范围",applyScopeName);
|
* @param str
|
||||||
// //第4行
|
* @return
|
||||||
// setCell(table.getRow(3), "状态",stateName);
|
*/
|
||||||
// //第5行
|
public List<String> splitStr(String str){
|
||||||
// setCell(table.getRow(4), "用法",useMethodName);
|
//检查参数是否合法
|
||||||
// //第6行
|
if (null == str || str.equals("")) {
|
||||||
// setCell(table.getRow(5), "实施车型",implementCar);
|
return new ArrayList<>();
|
||||||
// //第7行
|
}
|
||||||
// setCell(table.getRow(6), "新车型实施日期",newCarImplementTime);
|
int length = 3;
|
||||||
// //第8行
|
int n = (str.length() + length - 1) / length; //获取整个字符串可以被切割成字符子串的个数
|
||||||
// setCell(table.getRow(7), "在产车实施日期",productionCarImplementTime);
|
List<String> list = new ArrayList<>();
|
||||||
// //第9行
|
for (int i = 0; i < n; i++) {
|
||||||
// setCell(table.getRow(8), "主要内容",contentCn);
|
if (i < (n - 1)) {
|
||||||
// //第10行
|
list.add(str.substring(i * length, (i + 1) * length)) ;
|
||||||
// setCell(table.getRow(9), "NIO工作进展",workProgressCn);
|
} else {
|
||||||
// //第11行
|
list.add(str.substring(i * length));
|
||||||
// setCell(table.getRow(10), "法规联系人",lawsContact);
|
}
|
||||||
// //第12行
|
}
|
||||||
// setCell(table.getRow(11), "链接",link);
|
return list;
|
||||||
// }else{
|
}
|
||||||
// //第1行
|
|
||||||
// setCell(table.getRow(0), "Related Areas",technologyTerritoryName);
|
/**
|
||||||
// //第2行
|
* 判断字符串是否完全由数字组成
|
||||||
// setCell(table.getRow(1), "Vehicle Type",applyCarName);
|
* @param str
|
||||||
// //第3行
|
* @return
|
||||||
// setCell(table.getRow(2), "Scope",applyScopeName);
|
*/
|
||||||
// //第4行
|
public boolean verifyFigure(String str){
|
||||||
// setCell(table.getRow(3), "Status",stateName);
|
Pattern p = Pattern.compile("[0-9]*");
|
||||||
// //第5行
|
Matcher m = p.matcher(str);
|
||||||
// setCell(table.getRow(4), "usage",useMethodName);
|
return m.matches();
|
||||||
// //第6行
|
}
|
||||||
// setCell(table.getRow(5), "Implementation Model",implementCar);
|
/**
|
||||||
// //第7行
|
* 判断字符串是否完全由字母组成
|
||||||
// setCell(table.getRow(6), "New Type Execution Date",newCarImplementTime);
|
* @param str
|
||||||
// //第8行
|
* @return
|
||||||
// setCell(table.getRow(7), "New Vehicle Execution Date",productionCarImplementTime);
|
*/
|
||||||
// //第9行
|
public boolean verifyEn(String str){
|
||||||
// setCell(table.getRow(8), "Main Content",contentEn);
|
Pattern enPatten = Pattern.compile("^[a-zA-Z]*");
|
||||||
// //第10行
|
Matcher enMatch = enPatten.matcher(str);
|
||||||
// setCell(table.getRow(9), "NIO Work Progress",workProgressEn);
|
return enMatch.matches();
|
||||||
// //第11行
|
}
|
||||||
// setCell(table.getRow(10), "Regulatory Contact",lawsContact);
|
/**
|
||||||
// //第12行
|
* 判断字符串是否完全由数字和字母组成
|
||||||
// setCell(table.getRow(11), "Link",link);
|
* @param str
|
||||||
// }
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean verifyFigureAndEn(String str){
|
||||||
|
Pattern figureAndEnPattern = Pattern.compile("[0-9a-zA-Z]{1,}");
|
||||||
|
Matcher figureAndEnMatcher = figureAndEnPattern.matcher(str);
|
||||||
|
return figureAndEnMatcher.matches();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -553,6 +564,9 @@ public class WordUtil {
|
|||||||
|
|
||||||
//表格属性
|
//表格属性
|
||||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||||
|
//固定列宽(英文和数字的时候自动换行)
|
||||||
|
CTTblLayoutType ctTblLayoutType = tablePr.isSetTblLayout() ? tablePr.getTblLayout() : tablePr.addNewTblLayout();
|
||||||
|
ctTblLayoutType.setType(STTblLayoutType.FIXED);
|
||||||
//表格宽度
|
//表格宽度
|
||||||
CTJc cTJc = tablePr.addNewJc();
|
CTJc cTJc = tablePr.addNewJc();
|
||||||
//居中
|
//居中
|
||||||
@@ -597,6 +611,9 @@ public class WordUtil {
|
|||||||
XWPFTable table = document.createTable(newOpinionTemplateEOList.size()+1, 4);
|
XWPFTable table = document.createTable(newOpinionTemplateEOList.size()+1, 4);
|
||||||
//表格属性
|
//表格属性
|
||||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||||
|
//固定列宽(英文和数字的时候自动换行)
|
||||||
|
CTTblLayoutType ctTblLayoutType = tablePr.isSetTblLayout() ? tablePr.getTblLayout() : tablePr.addNewTblLayout();
|
||||||
|
ctTblLayoutType.setType(STTblLayoutType.FIXED);
|
||||||
//表格宽度
|
//表格宽度
|
||||||
CTJc cTJc = tablePr.addNewJc();
|
CTJc cTJc = tablePr.addNewJc();
|
||||||
//居中
|
//居中
|
||||||
@@ -632,6 +649,9 @@ public class WordUtil {
|
|||||||
XWPFTable table = document.createTable(newStandardTemplateEOList.size()+1, 5);
|
XWPFTable table = document.createTable(newStandardTemplateEOList.size()+1, 5);
|
||||||
//表格属性
|
//表格属性
|
||||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||||
|
//固定列宽(英文和数字的时候自动换行)
|
||||||
|
CTTblLayoutType ctTblLayoutType = tablePr.isSetTblLayout() ? tablePr.getTblLayout() : tablePr.addNewTblLayout();
|
||||||
|
ctTblLayoutType.setType(STTblLayoutType.FIXED);
|
||||||
//表格宽度
|
//表格宽度
|
||||||
CTJc cTJc = tablePr.addNewJc();
|
CTJc cTJc = tablePr.addNewJc();
|
||||||
//居中
|
//居中
|
||||||
@@ -809,11 +829,29 @@ public class WordUtil {
|
|||||||
ctTblWidth0.setW(BigInteger.valueOf(2000));
|
ctTblWidth0.setW(BigInteger.valueOf(2000));
|
||||||
CTTblWidth ctTblWidth1 = table.getRow(number).getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
CTTblWidth ctTblWidth1 = table.getRow(number).getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||||
ctTblWidth1.setType(STTblWidth.DXA);
|
ctTblWidth1.setType(STTblWidth.DXA);
|
||||||
ctTblWidth1.setW(BigInteger.valueOf(5000));
|
ctTblWidth1.setW(BigInteger.valueOf(6000));
|
||||||
|
|
||||||
|
// XWPFParagraph para = table.getRow(number).getCell(1).getParagraphs().get(0);
|
||||||
|
// XWPFRun run = para.createRun();//对某个段落设置格式
|
||||||
|
// run.addBreak();//换行
|
||||||
|
|
||||||
table.getRow(number).getCell(0).setText(fieldName);
|
table.getRow(number).getCell(0).setText(fieldName);
|
||||||
table.getRow(number).getCell(1).setText(technologyTerritory);
|
table.getRow(number).getCell(1).setText(technologyTerritory);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// private static void setCell(XWPFTable table, int number, String fieldName,String technologyTerritory) {
|
||||||
|
//
|
||||||
|
// table.getRow(number).setHeight(500);
|
||||||
|
// CTTblWidth ctTblWidth0 = table.getRow(number).getCell(0).getCTTc().addNewTcPr().addNewTcW();
|
||||||
|
// ctTblWidth0.setType(STTblWidth.DXA);
|
||||||
|
// ctTblWidth0.setW(BigInteger.valueOf(2000));
|
||||||
|
// CTTblWidth ctTblWidth1 = table.getRow(number).getCell(1).getCTTc().addNewTcPr().addNewTcW();
|
||||||
|
// ctTblWidth1.setType(STTblWidth.DXA);
|
||||||
|
// ctTblWidth1.setW(BigInteger.valueOf(5000));
|
||||||
|
//
|
||||||
|
// table.getRow(number).getCell(0).setText(fieldName);
|
||||||
|
// table.getRow(number).getCell(1).setText(technologyTerritory);
|
||||||
|
// }
|
||||||
// private static void setCell(XWPFTableRow tableRow, String fieldName,String technologyTerritory) {
|
// private static void setCell(XWPFTableRow tableRow, String fieldName,String technologyTerritory) {
|
||||||
//
|
//
|
||||||
// tableRow.setHeight(500);
|
// tableRow.setHeight(500);
|
||||||
|
|||||||
@@ -221,7 +221,7 @@
|
|||||||
selectedRowrowValue: [],
|
selectedRowrowValue: [],
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 100,
|
||||||
pageSizeOptions: ['100', '200'],
|
pageSizeOptions: ['100', '200'],
|
||||||
total: 0,
|
total: 0,
|
||||||
searchParmes: {},
|
searchParmes: {},
|
||||||
@@ -505,7 +505,9 @@
|
|||||||
getTableListReset() {
|
getTableListReset() {
|
||||||
let params = {
|
let params = {
|
||||||
paramsManifestId: this.$route.query.id,
|
paramsManifestId: this.$route.query.id,
|
||||||
userTypes: this.currentPersonRole
|
userTypes: this.currentPersonRole,
|
||||||
|
pageNo:this.pageNo,
|
||||||
|
pageSize:this.pageSize
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.$emit('listReset', '')
|
this.$emit('listReset', '')
|
||||||
|
|||||||
@@ -767,6 +767,11 @@ export default {
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
getAction(this.url.list, params).then(res => {
|
getAction(this.url.list, params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
if (res.result.pageList.current > 1 && res.result.pageList.records.length == 0) {
|
||||||
|
this.pageNo = 1
|
||||||
|
this.loadData()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.dataSource = res.result.pageList.records || []
|
this.dataSource = res.result.pageList.records || []
|
||||||
this.authmanage =res.result.auth_manage
|
this.authmanage =res.result.auth_manage
|
||||||
this.total = res.result.pageList.total
|
this.total = res.result.pageList.total
|
||||||
|
|||||||
@@ -44,10 +44,10 @@
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
>
|
>
|
||||||
<span slot="projectName" slot-scope="text,record" :title="text">
|
<span slot="projectName" slot-scope="text,record" :title="text">
|
||||||
{{ text && text.length > 15 ? text.slice(0, 14) + '...' : text }}
|
{{ text }}
|
||||||
</span>
|
</span>
|
||||||
<span slot="templateName" slot-scope="text,record" :title="text">
|
<span slot="templateName" slot-scope="text,record" :title="text">
|
||||||
{{ text && text.length > 25 ? text.slice(0, 21) + '...' : text }}
|
{{ text }}
|
||||||
</span>
|
</span>
|
||||||
<span slot="operation" slot-scope="text,record">
|
<span slot="operation" slot-scope="text,record">
|
||||||
<a class="text-operation" v-has="'report:exportTemplate:edit'" @click="edit(record)">{{$t('edit')}}</a>
|
<a class="text-operation" v-has="'report:exportTemplate:edit'" @click="edit(record)">{{$t('edit')}}</a>
|
||||||
@@ -150,6 +150,7 @@ export default {
|
|||||||
title: this.$t('templateName'),
|
title: this.$t('templateName'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'templateName',
|
dataIndex: 'templateName',
|
||||||
|
ellipsis: true,
|
||||||
width: 300,
|
width: 300,
|
||||||
scopedSlots: { customRender: 'templateName' }
|
scopedSlots: { customRender: 'templateName' }
|
||||||
},
|
},
|
||||||
@@ -157,25 +158,29 @@ export default {
|
|||||||
title: this.$t('contentDescription'),
|
title: this.$t('contentDescription'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'description',
|
dataIndex: 'description',
|
||||||
|
ellipsis: true,
|
||||||
width: 300,
|
width: 300,
|
||||||
scopedSlots: { customRender: 'projectName' }
|
scopedSlots: { customRender: 'projectName' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('status'),
|
title: this.$t('status'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100,
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
dataIndex: 'state_dictText'
|
dataIndex: 'state_dictText'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('creater'),
|
title: this.$t('creater'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100,
|
width: 120,
|
||||||
|
ellipsis: true,
|
||||||
dataIndex: 'createBy'
|
dataIndex: 'createBy'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('Latestupdatetime'),
|
title: this.$t('Latestupdatetime'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
|
ellipsis: true,
|
||||||
dataIndex: 'updateTime'
|
dataIndex: 'updateTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user