Merge remote-tracking branch 'origin/master'
This commit is contained in:
+5
-20
@@ -46,23 +46,9 @@ public class ProjectLibraryBaseController extends JeroController<ProjectLibraryB
|
||||
@PostMapping(value = "/page")
|
||||
public Result<?> queryPageList(@RequestBody Map<String,Object> params) {
|
||||
IPage<ProjectLibraryBase> pageList= projectLibraryBaseService.queryPageList(params);
|
||||
List<ProjectLibraryBase> records =convertData(pageList.getRecords(),params.get("cut").toString());
|
||||
return Result.OK(records);
|
||||
}
|
||||
public List<ProjectLibraryBase> convertData(List<ProjectLibraryBase> records, String cut){
|
||||
//分页列表数据中英切换
|
||||
if(CutEnum.EN.getValue().equals(cut)) {
|
||||
for (ProjectLibraryBase data : records) {
|
||||
data.setTargetMarketName(data.getTargetMarketEnName());
|
||||
data.setProjectStatusName(data.getProjectStatusEnName());
|
||||
data.setStudioEngineerName(data.getStudioEngineerEnName());
|
||||
data.setCertificationEngineerName(data.getCertificationEngineerEnName());
|
||||
data.setDigitalPlatformName(data.getDigitalPlatformEnName());
|
||||
data.setVehiclePlatformName(data.getVehiclePlatformEnName());
|
||||
}
|
||||
}
|
||||
return records;
|
||||
return Result.OK(params.get("cut").toString(),pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
@@ -143,12 +129,11 @@ public class ProjectLibraryBaseController extends JeroController<ProjectLibraryB
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id,
|
||||
@RequestParam(name="cut",required=true) String cut) {
|
||||
// List<ProjectLibraryBase> data = projectLibraryBaseService.queryById(id);
|
||||
List<ProjectLibraryBase> records =convertData(projectLibraryBaseService.queryById(id),cut);
|
||||
if(records==null) {
|
||||
List<ProjectLibraryBase> data = projectLibraryBaseService.queryById(id);
|
||||
if(data==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(records);
|
||||
return Result.OK(cut,data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
-16
@@ -37,18 +37,10 @@ public class ProjectLibraryBase implements Serializable {
|
||||
/**目标市场*/
|
||||
@Dict(dicCode = "region")
|
||||
private java.lang.String targetMarket;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String targetMarketName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String targetMarketEnName;
|
||||
|
||||
/**项目状态*/
|
||||
@Dict(dicCode = "project_status")
|
||||
private java.lang.String projectStatus;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String projectStatusName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String projectStatusEnName;
|
||||
|
||||
/**studio工程师*/
|
||||
private java.lang.String studioEngineer;
|
||||
@@ -67,18 +59,10 @@ public class ProjectLibraryBase implements Serializable {
|
||||
/**车型平台*/
|
||||
@Dict(dicCode = "vehicle_platform")
|
||||
private java.lang.String vehiclePlatform;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String vehiclePlatformName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String vehiclePlatformEnName;
|
||||
|
||||
/**数字平台*/
|
||||
@Dict(dicCode = "digital_platform")
|
||||
private java.lang.String digitalPlatform;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String digitalPlatformName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String digitalPlatformEnName;
|
||||
|
||||
/**IPD信息*/
|
||||
private java.lang.String ipdInfo;
|
||||
|
||||
+40
-1
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -7,13 +8,20 @@ import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
import com.jero.modules.project.service.IProjectLibraryBaseService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.mapper.SysDictItemMapper;
|
||||
import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 项目库基础表
|
||||
@@ -26,6 +34,12 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
@Autowired
|
||||
private ProjectLibraryBaseMapper projectLibraryBaseMapper;
|
||||
|
||||
@Autowired
|
||||
private SysDictItemMapper sysDictItemMapper;
|
||||
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -114,12 +128,37 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage<ProjectLibraryBase> result = projectLibraryBaseMapper.queryPageList(page, params);
|
||||
List<ProjectLibraryBase> records = result.getRecords();
|
||||
|
||||
disposeData(records);
|
||||
return result;
|
||||
}
|
||||
|
||||
public void disposeData(List<ProjectLibraryBase> records){
|
||||
|
||||
|
||||
for (ProjectLibraryBase projectLibraryBase:records) {
|
||||
List<SysUser> sysUsers = new ArrayList<>();
|
||||
//认证工程师多个id查询
|
||||
String certificationEngineerId = projectLibraryBase.getCertificationEngineer();
|
||||
if (StringUtils.isNotEmpty(certificationEngineerId)) {
|
||||
QueryWrapper<SysUser> userqueryWrapper = new QueryWrapper<>();
|
||||
userqueryWrapper.in("id ", certificationEngineerId);
|
||||
sysUsers = sysUserMapper.selectList(userqueryWrapper);
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)) {
|
||||
if(StringUtils.isNotEmpty(certificationEngineerId)){
|
||||
String certificationEngineerName=sysUsers.stream().filter(e -> certificationEngineerId.equals(e.getId())).
|
||||
map(SysUser::getRealname).collect(Collectors.joining(","));
|
||||
projectLibraryBase.setCertificationEngineerName(certificationEngineerName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+23
-9
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.tag.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
@@ -94,6 +95,7 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
public Result<?> add(@Validated @RequestBody OnlCgformArea onlCgformArea) {
|
||||
int count=onlCgformAreaService.queryExitAreaName(onlCgformArea);
|
||||
if (count > 0) {
|
||||
// TODO Cut属性一定能拿到?拿不到的时候显示中文还是英文?现在对吗?测试了吗?
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals(onlCgformArea.getCut())) {
|
||||
return Result.error("同一所属模块下,展示区域名称不能重复!");
|
||||
@@ -118,14 +120,25 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
@PutMapping(value = "/edit")
|
||||
@RequiresPermissions("area:edit")
|
||||
public Result<?> edit(@Validated @RequestBody OnlCgformArea onlCgformArea) {
|
||||
int count=onlCgformAreaService.queryExitAreaName(onlCgformArea);
|
||||
if (count > 0) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals(onlCgformArea.getCut())) {
|
||||
return Result.error("同一所属模块下,展示区域名称不能重复!");
|
||||
}else{
|
||||
return Result.error("Under the same module, the display area name cannot be duplicate!");
|
||||
}
|
||||
// TODO 编辑的时候不考虑ID?不试试现在还能编辑成功?
|
||||
|
||||
QueryWrapper<OnlCgformArea> queryWrapper=new QueryWrapper<>();
|
||||
queryWrapper.eq("show_area", onlCgformArea.getShowArea()).eq("is_model", onlCgformArea.getIsModel());
|
||||
List<OnlCgformArea> existAreaList=onlCgformAreaService.list(queryWrapper);
|
||||
if(!existAreaList.isEmpty()){//有同名数据
|
||||
if(existAreaList.get(0).getId().equals(onlCgformArea.getId())) {//已存在同名的数据,就是正在编辑的这个
|
||||
onlCgformAreaService.editById(onlCgformArea);
|
||||
return Result.OK("编辑成功!");
|
||||
}else {
|
||||
//中英切换提示语
|
||||
// TODO Cut属性一定能拿到?拿不到的时候显示中文还是英文?现在对吗?测试了吗?
|
||||
if (CutEnum.CN.getValue().equals(onlCgformArea.getCut())) {
|
||||
|
||||
return Result.error("同一所属模块下,展示区域名称不能重复!");
|
||||
} else {
|
||||
return Result.error("Under the same module, the display area name cannot be duplicate!");
|
||||
}
|
||||
}
|
||||
}else {
|
||||
onlCgformAreaService.editById(onlCgformArea);
|
||||
return Result.OK("编辑成功!");
|
||||
@@ -148,7 +161,8 @@ public class OnlCgformAreaController extends JeroController<OnlCgformArea, IOnlC
|
||||
int count=onlCgformTagService.queryExitArea(onlCgformArea);
|
||||
if (count > 0) {
|
||||
//中英切换提示语
|
||||
if(CutEnum.CN.getValue().equals("cut")) {
|
||||
// TODO 只改一半?编辑和新增改了,删除不改?
|
||||
if(CutEnum.CN.getValue().equals(cut)) {
|
||||
return Result.error("该展示区域有关联数据,无法删除!");
|
||||
}else{
|
||||
return Result.error("This exhibition area has associated data and cannot be deleted!");
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<span v-if="ol.text==$t('backDocument')&&record.flag==0" class="text" v-has="'split:sarFileSplitInfo:bind'">
|
||||
{{ol.text}}
|
||||
</span>
|
||||
<span v-if="ol.text==$t('view')" class="text">
|
||||
<span v-if="ol.text==$t('view')" class="text" v-has="'split:sarFileSplitItems:page'">
|
||||
{{ol.text}}
|
||||
</span>
|
||||
<span v-if="ol.text==$t('delete')" v-has="'split:sarFileSplitInfo:delete'">
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
<search :flag="'3'" :url="url"/>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<div class="operator-text" @click="handleModule" v-has="'split ducument'">
|
||||
<div class="operator-text" @click="handleModule" v-has="'split:sarFileSplitInfo:splitFile'">
|
||||
<a-icon type="plus" />
|
||||
{{ $t('SplitText') }}
|
||||
</div>
|
||||
<div class="operator-text" @click="handleExport" v-has="'import split result'">
|
||||
<div class="operator-text" @click="handleExport" v-has="'split:sarFileSplitInfo:splitResult'">
|
||||
<a-icon type="export" />
|
||||
{{ $t('ImportResults') }}
|
||||
</div>
|
||||
|
||||
@@ -129,9 +129,9 @@
|
||||
spinning:false, //loading标识
|
||||
type:'',
|
||||
url:{
|
||||
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplit', //表格头部字段
|
||||
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //搜索字段
|
||||
tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据
|
||||
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //表格头部字段
|
||||
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //搜索字段
|
||||
tableList: 'split/sarFileSplitInfo/splitResultPageInfo', //表格数据
|
||||
},
|
||||
OperationList:[],
|
||||
upload1:this.$t('upload1'),
|
||||
|
||||
@@ -75,6 +75,10 @@
|
||||
import search from '@/components/search/index'
|
||||
import TableData from '@/components/SplitTable/DocTable'
|
||||
import eventBUs from '../../../../common/event'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import axios from 'axios'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'split',
|
||||
@@ -125,12 +129,14 @@
|
||||
],
|
||||
spinning:false, //loading标识
|
||||
url:{
|
||||
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplit', //表格头部字段
|
||||
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForOcr', //搜索字段
|
||||
tableList: 'document/bussDocumentLibraryEO/ocrPageInfo', //表格数据
|
||||
tableHeader: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //表格头部字段
|
||||
seachList: 'document/bussDocumentLibraryEO/getHeaderOrConditionForSplitResult', //搜索字段
|
||||
tableList: 'split/sarFileSplitInfo/splitFilePageInfo', //表格数据
|
||||
},
|
||||
type:'doc',
|
||||
OperationList:[]
|
||||
OperationList:[],
|
||||
token:Vue.ls.get(ACCESS_TOKEN),
|
||||
cut:'',
|
||||
}
|
||||
},
|
||||
props:{
|
||||
@@ -142,6 +148,7 @@
|
||||
},
|
||||
mounted() {
|
||||
this.visible=this.splitVisible
|
||||
|
||||
// console.log('visibleSplit',this.visible)
|
||||
},
|
||||
methods:{
|
||||
|
||||
Reference in New Issue
Block a user