解决-法规月报-技术领域补充字段 导出时和技术领域为同一字段
This commit is contained in:
@@ -32,3 +32,8 @@ ALTER TABLE `laws_weilai`.`params_manifest`
|
|||||||
ADD COLUMN `project_version_id` varchar(50) NULL COMMENT '项目相关版本对应的项目id' AFTER `explanation`;
|
ADD COLUMN `project_version_id` varchar(50) NULL COMMENT '项目相关版本对应的项目id' AFTER `explanation`;
|
||||||
ALTER TABLE `laws_weilai`.`params_manifest_history`
|
ALTER TABLE `laws_weilai`.`params_manifest_history`
|
||||||
ADD COLUMN `project_version_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目相关版本对应的项目id' AFTER `explanation`;
|
ADD COLUMN `project_version_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目相关版本对应的项目id' AFTER `explanation`;
|
||||||
|
|
||||||
|
-- 项目库添加字段(技术领域补充(中文),技术领域补充(英文))--------2022-12-05 未同步生产环境
|
||||||
|
ALTER TABLE `laws_weilai`.`laws_monthly_report_write`
|
||||||
|
ADD COLUMN `technology_territory_cn` varchar(500) NULL COMMENT '技术领域补充(中文)' AFTER `memories_chapter_one`,
|
||||||
|
ADD COLUMN `technology_territory_en` varchar(500) NULL COMMENT '技术领域补充(英文)' AFTER `technology_territory_cn`;
|
||||||
|
|||||||
+1
-2
@@ -17,8 +17,7 @@ import java.io.IOException;
|
|||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Collectors;.Collectors;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class CompHanLPUtils {
|
public class CompHanLPUtils {
|
||||||
|
|||||||
+8
@@ -104,6 +104,14 @@ public class LawsMonthlyReportWriteEO implements Serializable {
|
|||||||
@ApiModelProperty(value = "相关领域")
|
@ApiModelProperty(value = "相关领域")
|
||||||
private java.lang.String technologyTerritory;
|
private java.lang.String technologyTerritory;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "技术领域补充中文")
|
||||||
|
private java.lang.String technologyTerritoryCn;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "相关领域补充英文")
|
||||||
|
private java.lang.String technologyTerritoryEn;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private java.lang.String technologyTerritoryName;
|
private java.lang.String technologyTerritoryName;
|
||||||
|
|
||||||
|
|||||||
+30
-4
@@ -255,7 +255,6 @@ public class WordUtil {
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CTSectPr sectPr = document.getDocument().getBody().getSectPr();
|
CTSectPr sectPr = document.getDocument().getBody().getSectPr();
|
||||||
if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
if (sectPr == null) sectPr = document.getDocument().getBody().addNewSectPr();
|
||||||
//设置页面大小(21*29.7)
|
//设置页面大小(21*29.7)
|
||||||
@@ -362,6 +361,7 @@ public class WordUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 主页面(只有页脚)
|
* 主页面(只有页脚)
|
||||||
|
*
|
||||||
* @param document
|
* @param document
|
||||||
* @param month
|
* @param month
|
||||||
*/
|
*/
|
||||||
@@ -522,6 +522,8 @@ public class WordUtil {
|
|||||||
String cut,
|
String cut,
|
||||||
List<LoginUser> loginUserList) {
|
List<LoginUser> loginUserList) {
|
||||||
String technologyTerritory = lawsMonthlyReportWriteEO.getTechnologyTerritory();//技术领域
|
String technologyTerritory = lawsMonthlyReportWriteEO.getTechnologyTerritory();//技术领域
|
||||||
|
String technologyTerritoryCn = lawsMonthlyReportWriteEO.getTechnologyTerritoryCn();//技术领域补充中文
|
||||||
|
String technologyTerritoryEn = lawsMonthlyReportWriteEO.getTechnologyTerritoryEn();//技术领域补充英文
|
||||||
String applyCar = lawsMonthlyReportWriteEO.getApplyCar();//适用车型
|
String applyCar = lawsMonthlyReportWriteEO.getApplyCar();//适用车型
|
||||||
String applyScope = lawsMonthlyReportWriteEO.getApplyScope();//适用范围
|
String applyScope = lawsMonthlyReportWriteEO.getApplyScope();//适用范围
|
||||||
String state = lawsMonthlyReportWriteEO.getState();//状态
|
String state = lawsMonthlyReportWriteEO.getState();//状态
|
||||||
@@ -566,8 +568,19 @@ public class WordUtil {
|
|||||||
sb.append(collect.get(0).getName() + ",");
|
sb.append(collect.get(0).getName() + ",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//拼接技术领域补充内容
|
||||||
|
if (cut.equals("cn")) {
|
||||||
|
if (StringUtils.isNotBlank(technologyTerritoryCn)) {
|
||||||
|
sb.append(" 补充:"+technologyTerritoryCn);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (StringUtils.isNotBlank(technologyTerritoryEn)) {
|
||||||
|
sb.append(" replenish:"+technologyTerritoryEn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(sb)) {
|
if (org.apache.commons.lang3.StringUtils.isNotBlank(sb)) {
|
||||||
technologyTerritoryName = sb.substring(0, sb.length() - 1);
|
technologyTerritoryName = sb.substring(0, sb.length());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//适用车型中文名
|
//适用车型中文名
|
||||||
@@ -653,6 +666,7 @@ public class WordUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 已固定长度分隔字符串
|
* 已固定长度分隔字符串
|
||||||
|
*
|
||||||
* @param str
|
* @param str
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -676,6 +690,7 @@ public class WordUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断字符串是否完全由数字组成
|
* 判断字符串是否完全由数字组成
|
||||||
|
*
|
||||||
* @param str
|
* @param str
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -684,8 +699,10 @@ public class WordUtil {
|
|||||||
Matcher m = p.matcher(str);
|
Matcher m = p.matcher(str);
|
||||||
return m.matches();
|
return m.matches();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断字符串是否完全由字母组成
|
* 判断字符串是否完全由字母组成
|
||||||
|
*
|
||||||
* @param str
|
* @param str
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -694,8 +711,10 @@ public class WordUtil {
|
|||||||
Matcher enMatch = enPatten.matcher(str);
|
Matcher enMatch = enPatten.matcher(str);
|
||||||
return enMatch.matches();
|
return enMatch.matches();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断字符串是否完全由数字和字母组成
|
* 判断字符串是否完全由数字和字母组成
|
||||||
|
*
|
||||||
* @param str
|
* @param str
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -707,6 +726,7 @@ public class WordUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 行业资讯动态
|
* 行业资讯动态
|
||||||
|
*
|
||||||
* @param document
|
* @param document
|
||||||
* @param lawsMonthlyReportWriteEO
|
* @param lawsMonthlyReportWriteEO
|
||||||
* @param cut
|
* @param cut
|
||||||
@@ -766,6 +786,7 @@ public class WordUtil {
|
|||||||
setCell(table, 4, "Link", link);
|
setCell(table, 4, "Link", link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void exportWordExcelAsk(XWPFDocument document,
|
public static void exportWordExcelAsk(XWPFDocument document,
|
||||||
LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,
|
LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,
|
||||||
String cut) {
|
String cut) {
|
||||||
@@ -804,6 +825,7 @@ public class WordUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void exportWordExcelIssue(XWPFDocument document,
|
public static void exportWordExcelIssue(XWPFDocument document,
|
||||||
LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,
|
LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO,
|
||||||
String cut) {
|
String cut) {
|
||||||
@@ -882,6 +904,7 @@ public class WordUtil {
|
|||||||
// table.getRow(i).getCell(2).setText(standardName);
|
// table.getRow(i).getCell(2).setText(standardName);
|
||||||
// table.getRow(i).getCell(3).setText(expirationDate);
|
// table.getRow(i).getCell(3).setText(expirationDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void setCellIssue(XWPFTable table, int i, String planNumber, String standardName, String expirationDate, String implementTime) {
|
private static void setCellIssue(XWPFTable table, int i, String planNumber, String standardName, String expirationDate, String implementTime) {
|
||||||
//设置单元格高度
|
//设置单元格高度
|
||||||
table.getRow(i).setHeight(500);
|
table.getRow(i).setHeight(500);
|
||||||
@@ -928,6 +951,7 @@ public class WordUtil {
|
|||||||
// table.getRow(i).getCell(3).setText(expirationDate);
|
// table.getRow(i).getCell(3).setText(expirationDate);
|
||||||
// table.getRow(i).getCell(4).setText(implementTime);
|
// table.getRow(i).getCell(4).setText(implementTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void setCellIssueOne(XWPFTable table, String number, String planNumber, String standardName, String expirationDate, String implementTime) {
|
private static void setCellIssueOne(XWPFTable table, String number, String planNumber, String standardName, String expirationDate, String implementTime) {
|
||||||
//设置单元格高度
|
//设置单元格高度
|
||||||
table.getRow(0).setHeight(500);
|
table.getRow(0).setHeight(500);
|
||||||
@@ -974,6 +998,7 @@ public class WordUtil {
|
|||||||
// table.getRow(0).getCell(3).setText(expirationDate);
|
// table.getRow(0).getCell(3).setText(expirationDate);
|
||||||
// table.getRow(0).getCell(4).setText(implementTime);
|
// table.getRow(0).getCell(4).setText(implementTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void setCellAskOne(XWPFTable table, String number, String planNumber, String standardName, String expirationDate) {
|
private static void setCellAskOne(XWPFTable table, String number, String planNumber, String standardName, String expirationDate) {
|
||||||
//设置单元格高度
|
//设置单元格高度
|
||||||
table.getRow(0).setHeight(500);
|
table.getRow(0).setHeight(500);
|
||||||
@@ -1069,6 +1094,7 @@ public class WordUtil {
|
|||||||
// table.getRow(number).getCell(1).setText(technologyTerritory);
|
// table.getRow(number).getCell(1).setText(technologyTerritory);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void setCellThree(XWPFTable table, int number, String fieldName, String technologyTerritory,
|
private static void setCellThree(XWPFTable table, int number, String fieldName, String technologyTerritory,
|
||||||
List<SysDictItem> sysDictItems, String code) {
|
List<SysDictItem> sysDictItems, String code) {
|
||||||
table.getRow(number).setHeight(500);
|
table.getRow(number).setHeight(500);
|
||||||
@@ -1128,6 +1154,7 @@ public class WordUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置单元格边距
|
* 设置单元格边距
|
||||||
|
*
|
||||||
* @param cell
|
* @param cell
|
||||||
*/
|
*/
|
||||||
public static void cellPadding(XWPFTableCell cell, String text) {
|
public static void cellPadding(XWPFTableCell cell, String text) {
|
||||||
@@ -1370,6 +1397,7 @@ public class WordUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置页边距,字体样式,超链接
|
* 设置页边距,字体样式,超链接
|
||||||
|
*
|
||||||
* @param cell
|
* @param cell
|
||||||
* @param text
|
* @param text
|
||||||
*/
|
*/
|
||||||
@@ -1427,8 +1455,6 @@ public class WordUtil {
|
|||||||
fonts.setHAnsi("Blue Sky Noto Regular");
|
fonts.setHAnsi("Blue Sky Noto Regular");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ctr.setTArray(new CTText[]{ctText});
|
ctr.setTArray(new CTText[]{ctText});
|
||||||
// Insert the linked text into the link
|
// Insert the linked text into the link
|
||||||
cLink.setRArray(new CTR[]{ctr});
|
cLink.setRArray(new CTR[]{ctr});
|
||||||
|
|||||||
Reference in New Issue
Block a user