Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
zyx.net
2022-07-18 15:54:11 +08:00
9 changed files with 270 additions and 51 deletions
@@ -27,5 +27,5 @@ public interface LawsComplianceBoardMapper {
* @param params
* @return
*/
List<Map<String, Object>> queryList(Map<String, Object> params);
List<Map<String, Object>> queryList(@Param("params") Map<String, Object> params);
}
@@ -92,7 +92,9 @@
OR pti.prehomo_p_id IS NOT NULL
OR pti.verify_p_id IS NOT NULL
)
${params.condition}
<if test="params.condition != '' ">
${params.condition}
</if>
GROUP BY bdl.id
order by bdl.create_time desc
</select>
@@ -97,7 +97,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
map.setValue("");
}
});
if(StringUtils.isNotEmpty(dataMap.get("state").toString())){
if(dataMap.get("state") != null){
String state_dicText = "";
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
state_dicText = stateSysDictItems.stream().filter(sysDictItem -> {
@@ -118,7 +118,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
}
dataMap.put("state_dicText",state_dicText);
}
if(StringUtils.isNotEmpty(dataMap.get("technologyTerritory").toString())){
if(dataMap.get("technologyTerritory") != null){
String technologyTerritory_dictText = disposeTechnologyTerritory(technologyTerritoryList, dataMap.get("technologyTerritory").toString(), cut);
dataMap.put("technologyTerritory_dicText",technologyTerritory_dictText);
}
@@ -153,33 +153,39 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
if(CollectionUtils.isNotEmpty(complianceResultList)){
List<SysDictItem> dutyTerritoryDictItemList = sysDictItemService.selectItemsByDictCode("duty_territory");
for (Map<String, Object> complianceResult : complianceResultList) {
if (StringUtils.isNotEmpty(complianceResult.get("designStatus").toString())) {
if (complianceResult.get("designStatus") != null) {
String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("designStatus").toString(), cut);
complianceResult.put("designStatus_dicText",textByValue);
}
if (StringUtils.isNotEmpty(complianceResult.get("prehomoStatus").toString())) {
if (complianceResult.get("prehomoStatus") != null) {
String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("prehomoStatus").toString(), cut);
complianceResult.put("prehomoStatus_dicText",textByValue);
}
if (StringUtils.isNotEmpty(complianceResult.get("verifyStatus").toString())) {
if (complianceResult.get("verifyStatus") != null) {
String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("verifyStatus").toString(), cut);
complianceResult.put("verifyStatus_dicText",textByValue);
}
if (StringUtils.isNotEmpty(complianceResult.get("dutyTerritory").toString())) {
if (complianceResult.get("dutyTerritory") != null) {
String dutyTerritory_dicText = "";
if (CutEnum.EN.getValue().equals(cut)) {
dutyTerritory_dicText = dutyTerritoryDictItemList.stream().filter(dictItem -> {
boolean flag = false;
if(StringUtils.equals(dictItem.getItemValue(),complianceResult.get("dutyTerritory").toString())){
flag = true;
String[] dutyTerritoryArr = complianceResult.get("dutyTerritory").toString().split(",");
for (String duty : dutyTerritoryArr) {
if(StringUtils.equals(dictItem.getItemValue(),duty)){
flag = true;
}
}
return flag;
}).map(SysDictItem::getEnName).collect(Collectors.joining(","));
} else {
dutyTerritory_dicText = dutyTerritoryDictItemList.stream().filter(dictItem -> {
boolean flag = false;
if(StringUtils.equals(dictItem.getItemValue(),complianceResult.get("dutyTerritory").toString())){
flag = true;
String[] dutyTerritoryArr = complianceResult.get("dutyTerritory").toString().split(",");
for (String duty : dutyTerritoryArr) {
if(StringUtils.equals(dictItem.getItemValue(),duty)){
flag = true;
}
}
return flag;
}).map(SysDictItem::getItemText).collect(Collectors.joining(","));
@@ -193,9 +199,16 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
@Override
public void exportComplianceResult(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params) {
String cut = (String) params.get("cut");
String exportAll = (String) params.get("exportAll");
String condition = this.getConditionStr(params);
params.put("condition",condition);
List<Map<String,Object>> exportData = this.lawsComplianceBoardMapper.queryList(params);
params.put("condition",StringUtils.isNotEmpty(condition) ? condition : "");
List<Map<String,Object>> exportData = new ArrayList<>();
if(StringUtils.equals(exportAll,"no")){
IPage page = this.queryPageList(params);
exportData = page.getRecords();
}else {
exportData = this.lawsComplianceBoardMapper.queryList(params);
}
this.disposeData(exportData,cut);
if(CollectionUtils.isNotEmpty(exportData)){
List<String> idList = new ArrayList<>();
@@ -206,6 +219,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
List<Map<String,Object>> complianceResultList = new ArrayList<>();
if(CollectionUtils.isNotEmpty(idList)){
complianceResultList = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
this.disposeComplianceResult(complianceResultList,cut);
}
String title = "";
@@ -237,7 +251,8 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
Row firstRow = sheet.createRow(0);
//设置居中、表头值。
for (int i = 0; i <= firstLineTitleArr.length; i++){
for (int i = 0; i < firstLineTitleArr.length; i++){
sheet.setColumnWidth(i,5000);
Cell cell = firstRow.createCell(i);
cell.setCellStyle(titleCellStyle);
cell.setCellValue(firstLineTitleArr[i]);
@@ -247,46 +262,40 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
if(CollectionUtils.isNotEmpty(exportData)) {
int rowIndex = 1;
for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) {
Row dataRow = sheet.createRow(rowIndex);
List<Map<String, Object>> byStandIdcomplianceResultList = new ArrayList<>();
if(CollectionUtils.isNotEmpty(complianceResultList)){
int finalDataIndex = dataIndex;
byStandIdcomplianceResultList = complianceResultList.stream().filter(comlianceResult -> {
boolean flag = false;
if (StringUtils.equals(comlianceResult.get("standId").toString(), exportData.get(finalDataIndex).get("id").toString())) {
flag = true;
for (Map<String, Object> comlianceResult : complianceResultList) {
if (StringUtils.equals(comlianceResult.get("standId").toString(), exportData.get(dataIndex).get("id").toString())) {
byStandIdcomplianceResultList.add(comlianceResult);
}
return flag;
}).collect(Collectors.toList());
}
}
if(CollectionUtils.isNotEmpty(byStandIdcomplianceResultList)){
int byStandIdComlianceResultSize = byStandIdcomplianceResultList.size();
for (int i=0; i<byStandIdComlianceResultSize; i++){
dataRow.createCell(0).setCellValue(exportData.get(dataIndex).get("serialNumber").toString());
dataRow.createCell(1).setCellValue(exportData.get(dataIndex).get("title").toString());
dataRow.createCell(2).setCellValue(exportData.get(dataIndex).get("state_dicText").toString());
dataRow.createCell(3).setCellValue(exportData.get(dataIndex).get("technologyTerritory_dicText").toString());
Row dataRow = sheet.createRow(rowIndex);
dataRow.createCell(0).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("serialNumber")));
dataRow.createCell(1).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("title")));
dataRow.createCell(2).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("state_dicText")));
dataRow.createCell(3).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("technologyTerritory_dicText")));
dataRow.createCell(4).setCellValue(byStandIdcomplianceResultList.get(i).get("dutyTerritory_dicText").toString());
dataRow.createCell(5).setCellValue(byStandIdcomplianceResultList.get(i).get("projectName").toString());
dataRow.createCell(6).setCellValue(byStandIdcomplianceResultList.get(i).get("designStatus_dicText").toString());
dataRow.createCell(7).setCellValue(byStandIdcomplianceResultList.get(i).get("prehomoStats_dicText").toString());
dataRow.createCell(8).setCellValue(byStandIdcomplianceResultList.get(i).get("verifyStatus_dicText").toString());
rowIndex ++;
dataRow.createCell(4).setCellValue(checkValueIsNotNull(byStandIdcomplianceResultList.get(i).get("dutyTerritory_dicText")));
String projectName = checkValueIsNotNull(byStandIdcomplianceResultList.get(i).get("projectName")) + "-" + checkValueIsNotNull(byStandIdcomplianceResultList.get(i).get("yearName"));
dataRow.createCell(5).setCellValue(projectName);
dataRow.createCell(6).setCellValue(checkValueIsNotNull(byStandIdcomplianceResultList.get(i).get("designStatus_dicText")));
dataRow.createCell(7).setCellValue(checkValueIsNotNull(byStandIdcomplianceResultList.get(i).get("prehomoStatus_dicText")));
dataRow.createCell(8).setCellValue(checkValueIsNotNull(byStandIdcomplianceResultList.get(i).get("verifyStatus_dicText")));
if(byStandIdComlianceResultSize > 1 && i != (byStandIdComlianceResultSize - 1)){
rowIndex ++;
}
}
}else {
dataRow.createCell(0).setCellValue(exportData.get(dataIndex).get("serialNumber").toString());
dataRow.createCell(1).setCellValue(exportData.get(dataIndex).get("title").toString());
dataRow.createCell(2).setCellValue(exportData.get(dataIndex).get("state_dicText").toString());
dataRow.createCell(3).setCellValue(exportData.get(dataIndex).get("technologyTerritory_dicText").toString());
/*dataRow.createCell(4).setCellValue(exportData.get(dataIndex).get("dutyTerritory").toString());
dataRow.createCell(5).setCellValue(exportData.get(dataIndex).get("projectName").toString());
dataRow.createCell(6).setCellValue(exportData.get(dataIndex).get("designStatus").toString());
dataRow.createCell(7).setCellValue(exportData.get(dataIndex).get("prehomoStats").toString());
dataRow.createCell(8).setCellValue(exportData.get(dataIndex).get("verifyStatus").toString());*/
Row dataRow = sheet.createRow(rowIndex);
dataRow.createCell(0).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("serialNumber")));
dataRow.createCell(1).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("title")));
dataRow.createCell(2).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("state_dicText")));
dataRow.createCell(3).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("technologyTerritory_dicText")));
}
rowIndex ++;
}
@@ -304,10 +313,24 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
}
}
/**
* 验证值是否是null
* @param str
* @return
*/
public String checkValueIsNotNull(Object str){
String result = "";
if(str != null){
result = str.toString();
}
return result;
}
@Override
public void exportComplianceResultDetail(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params) {
String cut = (String) params.get("cut");
List<Map<String,Object>> exportData = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
this.disposeComplianceResult(exportData,cut);
if(CollectionUtils.isNotEmpty(exportData)){
String title = "";
String fileName = "";
@@ -338,7 +361,8 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
Row firstRow = sheet.createRow(0);
//设置居中、表头值。
for (int i = 0; i <= firstLineTitleArr.length; i++){
for (int i = 0; i < firstLineTitleArr.length; i++){
sheet.setColumnWidth(i,5000);
Cell cell = firstRow.createCell(i);
cell.setCellStyle(titleCellStyle);
cell.setCellValue(firstLineTitleArr[i]);
@@ -349,11 +373,11 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
int rowIndex = 1;
for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) {
Row dataRow = sheet.createRow(rowIndex);
dataRow.createCell(0).setCellValue(exportData.get(dataIndex).get("dutyTerritory_dicText").toString());
dataRow.createCell(1).setCellValue(exportData.get(dataIndex).get("projectName").toString());
dataRow.createCell(2).setCellValue(exportData.get(dataIndex).get("designStatus_dicText").toString());
dataRow.createCell(3).setCellValue(exportData.get(dataIndex).get("prehomoStats_dicText").toString());
dataRow.createCell(4).setCellValue(exportData.get(dataIndex).get("verifyStatus_dicText").toString());
dataRow.createCell(0).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("dutyTerritory_dicText")));
dataRow.createCell(1).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("projectName")));
dataRow.createCell(2).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("designStatus_dicText")));
dataRow.createCell(3).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("prehomoStatus_dicText")));
dataRow.createCell(4).setCellValue(checkValueIsNotNull(exportData.get(dataIndex).get("verifyStatus_dicText")));
rowIndex ++;
}
}
+1
View File
@@ -1160,4 +1160,5 @@ module.exports = {
turnOffAutomaticMatching:'Turn Off Automatic Matching',
Deriveconformanceresults:'Derive Conformance Results',
Regulatorycompliancekanban:'Regulatory Compliance Kanban',
exportComparisonReport:'Export Comparison Report',
}
+1
View File
@@ -1164,4 +1164,5 @@ module.exports = {
viewTheComparisonResults:'查看对比结果',
addFullTextComment:'添加全文评论',
turnOffAutomaticMatching:'关闭自动匹配',
exportComparisonReport:'导出对比报告',
}
@@ -98,6 +98,7 @@
this.$route.path == '/projectStatusAndProgress' ||
this.$route.path == '/TaskPlanList' ||
this.$route.path == '/documentDataComparison' ||
this.$route.path == '/comparisonResults' ||
this.$route.path == '/initiateDocumentComparison' ||
this.$route.path == '/evaluationProcess' ||
this.$route.path == '/evaluationResultsClause' ||
+5
View File
@@ -392,6 +392,11 @@ export const constantRouterMap = [
name: 'documentDataComparison',
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTools/documentComparison/components/documentDataComparison')
},
{
path: '/comparisonResults',
name: 'comparisonResults',
component: () => import(/* webpackChunkName: "user" */ '@/views/documentTools/documentComparison/components/comparisonResults')
},
{
path: '/handshakeProcess',
name: 'handshakeProcess',
@@ -0,0 +1,185 @@
<template>
<div class="doc-detail">
<div class="doc-detail-wrap">
<div class="doc-detail-header" style="position: fixed;top: 0">
<div class="doc-detail-title">
<span style="line-height: 66px;display: inline-block;float: left" @click="Fallback">
<a-icon type="arrow-left" style="margin-right: 6px;"/>
</span>
<span> {{$t('comparisonResults')}}</span>
</div>
<div class="doc-detail-right">
<div @click="exportComparisonReportClick" class="operator-text-text"
:title="$t('exportComparisonReport')">
<a-icon type="eye"/>
{{$t('exportComparisonReport')}}
</div>
<div @click="commentClick" class="operator-text-text"
:title="$t('comment')">
<a-icon type="message"/>
{{$t('comment')}}
</div>
</div>
</div>
<div style="padding-top: 68px;background: #fff">
<div class="detail-content">
<div class="detail-content-header">
<a-checkbox @change="onChange" style="margin-left: 20px;float: left"></a-checkbox>
<div class="detail-content-header-content">
<div class="detail-content-header-content-left">
所选标准:GB 23456-2020 机动车标准 FMVSS 114 中文.word
</div>
<div class="detail-content-header-content-content">
所选标准:GB 23456-2020 机动车标准 FMVSS 114 中文.word
</div>
<div class="detail-content-header-content-right">
操作
</div>
</div>
</div>
<a-checkbox-group @change="onChange">
<div class="detail-content-content">
</div>
</a-checkbox-group>
</div>
</div>
</div>
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
</div>
</template>
<script>
export default {
name: 'comparisonResults',
data() {
return {
loading: false
}
},
methods: {
Fallback() {
this.$router.push({
path: '/documentComparison'
})
},
commentClick() {
},
exportComparisonReportClick() {
}
}
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.doc-detail {
background: #fff;
height: 100%;
.doc-detail-wrap {
.doc-detail-header {
width: 100%;
z-index: 1000;
height: 68px;
line-height: 68px;
padding: 0 0 0 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
border-bottom: 2px #eff1f3 solid;
background: #fff;
.doc-detail-title {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 20px;
font-weight: 400;
color: #040B29;
line-height: 68px;
}
}
.doc-detail-right {
width: 300px;
line-height: 68px;
/*display: flex;*/
text-align: right;
.doc-detail-btn {
margin-left: 10px;
}
}
.operator-text-text {
cursor: pointer;
margin-right: 53px;
font-size: 14px;
font-weight: 400;
color: #040B29;
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text-align: right;
}
}
}
.detail-content {
padding: 24px 32px;
box-sizing: border-box;
}
.detail-content-header {
width: 100%;
height: 56px;
line-height: 56px;
}
.detail-content-header-content {
width: calc(100% - 56px);
margin-left: 20px;
display: inline-block;
height: 56px;
font-size: 14px;
font-family: Blue Sky Noto;
font-weight: bold;
color: #040B29;
.detail-content-header-content-left {
width: calc(50% - 64px);
height: 56px;
display: inline-block;
background: rgba(4, 11, 41, 0.0300);
border-radius: 4px 0px 0px 4px;
border-right: 1px #EFF1F3 solid;
padding-left: 24px;
}
.detail-content-header-content-content {
width: calc(50% - 64px);
display: inline-block;
height: 56px;
background: rgba(4, 11, 41, 0.0300);
border-radius: 4px 0px 0px 4px;
border-right: 1px #EFF1F3 solid;
padding-left: 24px;
}
.detail-content-header-content-right {
width: 128px;
display: inline-block;
height: 56px;
background: rgba(4, 11, 41, 0.0300);
border-radius: 4px 0px 0px 4px;
padding-left: 24px;
}
}
</style>
@@ -261,7 +261,7 @@
},
initiatingProcessClick(){
let newUrl = this.$router.resolve({
path: '/documentDataComparison',
path: '/comparisonResults',
})
window.open(newUrl.href, '_blank')
},