合并分支 'fix_2nd_20230103' 到 'master'

Fix 2nd 20230103

查看合并请求 laws-nio/laws-weilai!279
This commit is contained in:
高嵩
2023-01-13 17:23:59 +08:00
6 changed files with 118 additions and 43 deletions
@@ -160,11 +160,16 @@ ALTER TABLE `laws_weilai`.`params_report_detail`
-- 更新拆分详情列 展示顺序不在列表头展示sql 2022-12-30 已同步生产环境
UPDATE `laws_weilai`.`onl_cgform_field` SET `is_show_list` = 0 WHERE `id` = '1529373706885799937'
-- 项目库置顶 2023-1-12 同步生产环境
CREATE TABLE `laws_weilai`.`top_project` (
`id` varchar(36) NOT NULL COMMENT 'id',
`project_library_base_id` varchar(36) NULL COMMENT '项目id',
`flag` varchar(255) NULL COMMENT '置顶标识',
`sort` varchar(255) NULL COMMENT '置顶排序',
PRIMARY KEY (`id`)
);
-- 项目库置顶 2023-1-12 同步生产环境
CREATE TABLE `top_project` (
`id` varchar(36) NOT NULL,
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新日期',
`sys_org_code` varchar(64) DEFAULT NULL COMMENT '所属部门',
`project_library_base_id` varchar(32) DEFAULT NULL COMMENT '项目id',
`flag` varchar(32) DEFAULT NULL COMMENT '置顶标识',
`sort` varchar(255) DEFAULT NULL COMMENT '置顶排序',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -25,6 +26,7 @@ import java.util.List;
@TableName("project_library_base")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@JsonIgnoreProperties
public class ProjectLibraryBase implements Comparable<ProjectLibraryBase> {
private static final long serialVersionUID = 1L;
@@ -153,5 +155,44 @@ public class ProjectLibraryBase implements Comparable<ProjectLibraryBase> {
return projectName+yearName+targetMarket+projectVersion;
}
@Override
public String toString() {
return "ProjectLibraryBase{" +
"id='" + id + '\'' +
", projectNameId='" + projectNameId + '\'' +
", projectName='" + projectName + '\'' +
", yearNameId='" + yearNameId + '\'' +
", yearName='" + yearName + '\'' +
", targetMarket='" + targetMarket + '\'' +
", projectStatus='" + projectStatus + '\'' +
", studioEngineer='" + studioEngineer + '\'' +
", studioEngineerName='" + studioEngineerName + '\'' +
", certificationEngineer='" + certificationEngineer + '\'' +
", certificationEngineerName='" + certificationEngineerName + '\'' +
", vehiclePlatform='" + vehiclePlatform + '\'' +
", digitalPlatform='" + digitalPlatform + '\'' +
", ipdInfo='" + ipdInfo + '\'' +
", vehicleDevelopmentPlan='" + vehicleDevelopmentPlan + '\'' +
", attestationPlan='" + attestationPlan + '\'' +
", createBy='" + createBy + '\'' +
", createTime=" + createTime +
", updateBy='" + updateBy + '\'' +
", sysOrgCode='" + sysOrgCode + '\'' +
", updateTime=" + updateTime +
", cut='" + cut + '\'' +
", startTime='" + startTime + '\'' +
", endTime='" + endTime + '\'' +
", targetMarketName='" + targetMarketName + '\'' +
", parentId='" + parentId + '\'' +
", projectVersion='" + projectVersion + '\'' +
", softwareVersion='" + softwareVersion + '\'' +
", versionLast='" + versionLast + '\'' +
", explanation='" + explanation + '\'' +
", sort='" + sort + '\'' +
", flag='" + flag + '\'' +
", brand='" + brand + '\'' +
", brandText='" + brandText + '\'' +
", brandTextEn='" + brandTextEn + '\'' +
'}';
}
}
@@ -874,9 +874,10 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
if(ObjectUtils.isNotEmpty(params.get("projectName"))){
result = result.stream().filter(e->e.getProjectName().toLowerCase().contains(String.valueOf(params.get("projectName")).toLowerCase())).collect(Collectors.toList());
}
List<ProjectLibraryBase> projectLibraryBaseParentList = result.stream().filter(e -> StringUtils.isBlank(e.getParentId())).distinct().collect(Collectors.toList());
//处理搜索版本号,(因为列表展示数据是以主项目为主并绑定子项目, 所以搜索的时候只有子项目这种情况需要特殊处理)
List<ProjectLibraryBase> resultNew = getProjectLibraryBases(result, projectLibraryBaseListParent);
disposeData(resultNew,"",false);
//数据组装
@@ -887,7 +888,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
// }
// }
for (ProjectLibraryBase projectLibraryBase : resultNew) {
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseParentList) {
//子项目
List<ProjectLibraryBase> children = result.stream()
.filter(e -> StringUtils.isNotBlank(e.getParentId()) && projectLibraryBase.getId().equals(e.getParentId())).collect(Collectors.toList());
@@ -916,9 +917,13 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
//权限筛选
if (sysUserService.isAdministrator()) {
//管理员查看全部
resultLast = resultNew;
if(ObjectUtils.isNotEmpty(projectLibraryBaseParentList)){
resultLast = projectLibraryBaseParentList;
}else{
resultLast = resultNew;
}
} else {
for (ProjectLibraryBase projectLibraryBase : resultNew) {
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseParentList) {
//判断父项目是否有权限
if (!projectIds.contains(projectLibraryBase.getId())) {
//判断子项目是否有权限
@@ -949,8 +954,6 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
}
}
//表头排序
// params.put("orderBy","1");
// params.put("orderByField","digitalPlatform");
hearSort(params, resultLast);
return resultLast;
}
@@ -1050,22 +1053,28 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
//主项目
List<ProjectLibraryBase> collect1 = result.stream().filter(e -> StringUtils.isBlank(e.getParentId())).collect(Collectors.toList());
resultNew.addAll(collect1);
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseListParent) {
List<ProjectLibraryBase> resultNewTemp = new ArrayList<>();
//子项目
List<ProjectLibraryBase> collect = result.stream().filter(e -> projectLibraryBase.getId().equals(e.getParentId())).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(collect)){
resultNew.add(projectLibraryBase);
resultNewTemp.addAll(collect);
}
//子项目的子项目
if(ObjectUtils.isNotEmpty(resultChild)){
List<ProjectLibraryBase> collect2 = resultChild.stream().filter(e -> e.getParentId().equals(projectLibraryBase.getId())).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(collect2)){
resultNew.add(projectLibraryBase);
resultNewTemp.addAll(collect2);
}
}
if(ObjectUtils.isNotEmpty(resultNewTemp)){
projectLibraryBase.setChildren(resultNewTemp);
projectLibraryBaseList.add(projectLibraryBase);
}
}
resultNew = resultNew.stream().distinct().collect(Collectors.toList());
return resultNew;
// resultNew = resultNew.stream().distinct().collect(Collectors.toList());
return projectLibraryBaseList;
}
// /**
// * 分页列表查询
@@ -56,14 +56,14 @@
<div style="margin-top: 20px">
<span class="text">{{$t('filingExternalOpinions')}}:</span>
<div @click="clickButtonToUpload('opinionArchiveId')" style="color: #21c9cc"
v-if="formInline.createBy == this.userInfoQuery.username" class="operator-text">
<a-button type="primary"style="margin-right: 8px;height: 32px">
{{$t('clickUpload')}}
v-if="formInline.createBy == this.userInfoQuery.username" class="operator-text-index">
<a-button type="primary" style="margin-right: 8px;height: 32px">
{{$t('clickUpload')}}
</a-button>
</div>
<div @click="seeFileClick(formInline.opinionArchiveId)" style="color: #21c9cc" class="operator-text">
<a-button type="primary"style="margin-right: 8px;height: 32px">
{{$t('viewFile')}}
<div @click="seeFileClick(formInline.opinionArchiveId)" style="color: #21c9cc" class="operator-text-index">
<a-button type="primary" style="margin-right: 8px;height: 32px">
{{$t('viewFile')}}
</a-button>
</div>
</div>
@@ -94,10 +94,10 @@
total: 0,
pageSize: 10,
pageNo: 1,
flag:false,
flag: false,
dataSource: [],
formInline: {},
administrators:false,
administrators: false,
userInfoQuery: {},
columns: [
{
@@ -164,8 +164,11 @@
}
})
}
getAction('/project/projectUserPermission/hasProcessControlButton', {type: 'LawsOpinionGather',id : this.$route.query.id}).then((res) => {
this.flag = res
getAction('/project/projectUserPermission/hasProcessControlButton', {
type: 'LawsOpinionGather',
id: this.$route.query.id
}).then((res) => {
this.flag = res
})
},
methods: {
@@ -215,7 +218,7 @@
actiProcInstId: this.actiProcInstId
}
downloadFile('/lawsOpinionGather/lawsOpinionAssessmentResultEO/exportXls',
this.$route.query.serialNumber+ ' ' +this.$t('evaluationResults') + '.zip', query)
this.$route.query.serialNumber + ' ' + this.$t('evaluationResults') + '.zip', query)
},
getData() {
this.formInline = JSON.parse(JSON.stringify(this.$route.query))
@@ -381,4 +384,10 @@
overflow: hidden;
text-align: right;
}
.operator-text-index {
display: inline-block;
/*margin-right: 16px;*/
margin-left: 16px;
}
</style>
@@ -102,15 +102,16 @@
<script>
import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
import problemKnowledgeBaseList from './components/problemKnowledgeBaseList'
export default {
name: 'collection',
components:{
components: {
problemKnowledgeBaseList
},
data() {
return {
selectedRowKeys: [],
activeTab:this.$t('DocumentLibrary'),
activeTab: this.$t('DocumentLibrary'),
queryParams: {
pageNo: 1,
pageSize: 10
@@ -126,7 +127,7 @@
key: 'serialNumber',
scopedSlots: { customRender: 'serialNumber' },
align: 'left',
sorter:true,
sorter: true,
ellipsis: true,
width: 180
},
@@ -143,7 +144,7 @@
align: 'left',
width: 180,
ellipsis: true,
sorter:true,
sorter: true,
dataIndex: 'state'
},
{
@@ -151,7 +152,7 @@
align: 'left',
width: 180,
ellipsis: true,
sorter:true,
sorter: true,
dataIndex: 'createTime'
},
{
@@ -175,11 +176,11 @@
methods: {
tableOnChange(pagination, filters, sorter) {
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
if(sorter.columnKey == 'serialNumber'){
if (sorter.columnKey == 'serialNumber') {
this.orderByField = 'serial_number'
} else if(sorter.columnKey == 'createTime') {
} else if (sorter.columnKey == 'createTime') {
this.orderByField = 'create_time'
} else{
} else {
this.orderByField = sorter.columnKey
}
this.loadData()
@@ -205,7 +206,7 @@
}
})
},//搜索
callback(event){
callback(event) {
},
searchQuery() {
@@ -326,7 +327,7 @@
.collection {
.collection-search-wrapper {
margin-bottom: 20px;
/*margin-bottom: 20px;*/
}
.colloction-table {
@@ -367,6 +368,10 @@
.box-button {
height: 38px;
}
::v-deep .ant-card-body {
padding: 0 24px!important;
}
</style>
<style lang="less">
/*.collection{*/
@@ -10,7 +10,7 @@
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span='9'>
<a-col :span='8'>
<div class="box-title-text">
<div class="title-text" :title="$t('areaOfResponsibility')">
<span>{{$t('areaOfResponsibility')}}</span>
@@ -32,7 +32,7 @@
</div>
</a-col>
<a-col :span='9'>
<a-col :span='8'>
<div class="box-title-text">
<div class="title-text" :title="$t('RelatedItems')">
<span>{{$t('RelatedItems')}}</span>
@@ -50,9 +50,11 @@
</div>
</a-col>
<a-col :span='6' style='margin-top: 4px;'>
<a-col :span='8' style='margin-top: 2px;'>
<span style="float: right;margin-right: 8px">
<a-button class='box-button' type='primary' @click='searchQuery'>{{ $t('query') }}</a-button>
<a-button class='box-button' style='margin-left: 8px' @click='searchReset'>{{ $t('reset') }}</a-button>
</span>
</a-col>
</a-row>
</a-form-model>
@@ -524,6 +526,10 @@
color: red;
margin-right: 4px;
}
.box-button{
height:38px;
}
</style>
<style lang='less'>
.area-module {