合并分支 'fix_2nd_period' 到 'master'
Fix 2nd period 查看合并请求 laws-nio/laws-weilai!256
This commit is contained in:
+5
@@ -141,4 +141,9 @@ public class ProjectLibraryBase implements Comparable<ProjectLibraryBase> {
|
||||
// return o.id-this.id;//降序
|
||||
}
|
||||
|
||||
public String getShowName(){
|
||||
return projectName+yearName+targetMarket+projectVersion;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+8
-9
@@ -27,14 +27,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -128,6 +121,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
|
||||
projectLibraryBaseLinkedList.addAll(projectLibraryBaseListTemp);
|
||||
}
|
||||
}
|
||||
projectLibraryBaseList.sort(Comparator.comparing(ProjectLibraryBase::getShowName));
|
||||
|
||||
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsByDictCode("region");
|
||||
for (ProjectLibraryBase libraryBase : projectLibraryBaseList) {
|
||||
@@ -190,6 +184,7 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
|
||||
}
|
||||
|
||||
|
||||
projectLibraryBaseList.sort(Comparator.comparing(ProjectLibraryBase::getShowName));
|
||||
for (ProjectLibraryBase libraryBase : projectLibraryBaseList) {
|
||||
//处理目标市场
|
||||
targetMarket(projectLibraryBase, dictItemList, libraryBase);
|
||||
@@ -201,8 +196,12 @@ public class ProjectStatusBoardServiceImpl implements IProjectStatusBoardService
|
||||
if(projectTaskInventoryEOList.size() != 0){
|
||||
projectTaskInventoryEOS = projectTaskInventoryEOList.stream().filter(e -> ProjectLawsInventoryIdList.contains(e.getProjectLawsInventoryId())).collect(Collectors.toList());
|
||||
}
|
||||
String projectVersion = libraryBase.getProjectVersion();
|
||||
if(StringUtils.isBlank(projectVersion)){
|
||||
projectVersion = "00";
|
||||
}
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("projectName",libraryBase.getProjectName());//项目名称
|
||||
map.put("projectName",libraryBase.getProjectName()+" "+libraryBase.getYearName()+"-"+libraryBase.getTargetMarket()+"-"+projectVersion);//项目名称
|
||||
map.put("targetMarket",libraryBase.getTargetMarket());//目标市场
|
||||
|
||||
//1. 项目当前状态--projectState(蓝/红/黄/绿)-->studio视角下的数据
|
||||
|
||||
+53
-6
@@ -575,7 +575,9 @@ public class WordUtil {
|
||||
String applyScopeName = dictItem(sysDictItems, applyScope,cut, DictCodeReportEnum.APPLYSCOPE.getValue());
|
||||
String stateName = dictItem(sysDictItems, state,cut, DictCodeReportEnum.STATE_REPORT.getValue());
|
||||
String useMethodName = dictItem(sysDictItems, useMethod,cut, DictCodeReportEnum.USEMETHOD.getValue());
|
||||
|
||||
if(useMethodName.equals("安装即符合")){
|
||||
useMethodName = "安装需符合";
|
||||
}
|
||||
XWPFTable table = document.createTable(10, 2);
|
||||
//表格属性
|
||||
CTTblPr tablePr = table.getCTTbl().addNewTblPr();
|
||||
@@ -1193,16 +1195,18 @@ public class WordUtil {
|
||||
setBlank(text, run, sb, itemText);
|
||||
}
|
||||
if("Scope".equals(fieldName)){
|
||||
// M,N,Enterprise,Vehicle,System/Parts,New Car Model,Models In Production
|
||||
// M,N,Enterprise,Vehicle,System/Part ,New Type ,New Vehicle
|
||||
String itemText = "M,N,Enterprise,Vehicle,System/Parts,New Car Model,Models In Production";
|
||||
setBlank(text, run, sb, itemText);
|
||||
|
||||
}
|
||||
if("状态".equals(fieldName)){
|
||||
String itemText = "草稿,公示稿,发布稿";
|
||||
setBlank(text, run, sb, itemText);
|
||||
}
|
||||
if("Status".equals(fieldName)){
|
||||
String itemText = "Draft,Public Notice,Release";
|
||||
// Draft,Public Notice,Release
|
||||
String itemText = "Draft,Publicity,Final";
|
||||
setBlank(text, run, sb, itemText);
|
||||
}
|
||||
if("用法".equals(fieldName)){
|
||||
@@ -1222,12 +1226,39 @@ public class WordUtil {
|
||||
}
|
||||
|
||||
private static void setBlank(String text, XWPFRun run, StringBuilder sb, String itemText) {
|
||||
//用法的三个复选框 在后端get到的英文和导出的word对应不上,也就是和itemText中给定的内容对应不上
|
||||
if(text.equals("constraint")){
|
||||
text = "Mandatory";
|
||||
}
|
||||
if(text.equals("recommend")){
|
||||
text = "Voluntary";
|
||||
}
|
||||
if(text.equals("installation is compliant")){
|
||||
text = "Mandatory if fitted";
|
||||
}
|
||||
|
||||
if(text.equals("Public Notice")){
|
||||
text = "Publicity";
|
||||
}
|
||||
if(text.equals("Release")){
|
||||
text = "Final";
|
||||
}
|
||||
|
||||
|
||||
for (String value : itemText.split(",")) {
|
||||
String blank = getBlank(value);
|
||||
if(text.contains(value)){
|
||||
//contains()方法 当选中的是Mandatory if fitted时,Mandatory也包含在其中结果会是true,也会被选中
|
||||
if(text.equals("Mandatory if fitted") && value.equals("Mandatory if fitted")){
|
||||
sb.append("■"+value+blank);
|
||||
break;
|
||||
}
|
||||
if(text.contains(value)){
|
||||
//将错误的英文转为正确的
|
||||
String value1 = scopeConvert(value);
|
||||
sb.append("■"+value1+blank);
|
||||
}else{
|
||||
sb.append("□"+value+blank);
|
||||
String value1 = scopeConvert(value);
|
||||
sb.append("□"+value1+blank);
|
||||
}
|
||||
}
|
||||
String[] split = sb.toString().split("\r\n");
|
||||
@@ -1239,6 +1270,23 @@ public class WordUtil {
|
||||
}
|
||||
}
|
||||
|
||||
private static String scopeConvert(String text){
|
||||
|
||||
if(text.equals("System/Parts")){
|
||||
text = "System/Part ";
|
||||
return text;
|
||||
}
|
||||
if(text.equals("New Car Model")){
|
||||
text = "New Type ";
|
||||
return text;
|
||||
}
|
||||
if(text.equals("Models In Production")){
|
||||
text = "New Vehicle ";
|
||||
return text;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
public static String getBlank(String value){
|
||||
String blank = "";
|
||||
switch (value) {
|
||||
@@ -1361,7 +1409,6 @@ public class WordUtil {
|
||||
// 设置链接字体大小
|
||||
CTHpsMeasure sz = rpr.isSetSz() ? rpr.getSz() : rpr.addNewSz();
|
||||
sz.setVal(new BigInteger("22"));
|
||||
|
||||
// CTHpsMeasure szCs = rpr.isSetSzCs() ? rpr.getSzCs() : rpr
|
||||
// .addNewSzCs();
|
||||
// szCs.setVal(new BigInteger("11"));
|
||||
|
||||
@@ -740,7 +740,7 @@
|
||||
|
||||
::v-deep .ant-table-row:first-child {
|
||||
background: #fff !important;
|
||||
opacity: 0.9;
|
||||
opacity: 3;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-body {
|
||||
|
||||
+8
-8
@@ -69,16 +69,16 @@
|
||||
title: this.$t('entryName'),
|
||||
align: 'center',
|
||||
dataIndex: 'projectName',
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('targetMarket'),
|
||||
align: 'center',
|
||||
dataIndex: 'targetMarket',
|
||||
width: 180,
|
||||
width: 240,
|
||||
ellipsis: true
|
||||
},
|
||||
// {
|
||||
// title: this.$t('targetMarket'),
|
||||
// align: 'center',
|
||||
// dataIndex: 'targetMarket',
|
||||
// width: 180,
|
||||
// ellipsis: true
|
||||
// },
|
||||
{
|
||||
align: 'center',
|
||||
dataIndex: 'projectStatus',
|
||||
|
||||
@@ -177,16 +177,16 @@
|
||||
align: 'center',
|
||||
dataIndex: 'projectName',
|
||||
scopedSlots: { customRender: 'projectName' },
|
||||
width: 180,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('targetMarket'),
|
||||
align: 'center',
|
||||
dataIndex: 'targetMarket',
|
||||
width: 180,
|
||||
width: 240,
|
||||
ellipsis: true
|
||||
},
|
||||
// {
|
||||
// title: this.$t('targetMarket'),
|
||||
// align: 'center',
|
||||
// dataIndex: 'targetMarket',
|
||||
// width: 180,
|
||||
// ellipsis: true
|
||||
// },
|
||||
{
|
||||
align: 'center',
|
||||
dataIndex: 'projectStatus',
|
||||
|
||||
Reference in New Issue
Block a user