diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLibraryBaseController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLibraryBaseController.java index be7b73a69..decdee3e6 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLibraryBaseController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectLibraryBaseController.java @@ -46,23 +46,9 @@ public class ProjectLibraryBaseController extends JeroController queryPageList(@RequestBody Map params) { IPage pageList= projectLibraryBaseService.queryPageList(params); - List records =convertData(pageList.getRecords(),params.get("cut").toString()); - return Result.OK(records); - } - public List convertData(List 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 queryById(@RequestParam(name="id",required=true) String id, @RequestParam(name="cut",required=true) String cut) { -// List data = projectLibraryBaseService.queryById(id); - List records =convertData(projectLibraryBaseService.queryById(id),cut); - if(records==null) { + List data = projectLibraryBaseService.queryById(id); + if(data==null) { return Result.error("未找到对应数据"); } - return Result.OK(records); + return Result.OK(cut,data); } /** diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLibraryBase.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLibraryBase.java index 8313d13fa..4f80924c6 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLibraryBase.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectLibraryBase.java @@ -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; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java index f3aef4cfe..a1f5e9be2 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectLibraryBaseServiceImpl.java @@ -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 result = projectLibraryBaseMapper.queryPageList(page, params); List records = result.getRecords(); - + disposeData(records); return result; } + public void disposeData(List records){ + for (ProjectLibraryBase projectLibraryBase:records) { + List sysUsers = new ArrayList<>(); + //认证工程师多个id查询 + String certificationEngineerId = projectLibraryBase.getCertificationEngineer(); + if (StringUtils.isNotEmpty(certificationEngineerId)) { + QueryWrapper 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); + } + } + + } + + + + + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/controller/OnlCgformAreaController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/controller/OnlCgformAreaController.java index dc6fe5246..d694171a2 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/controller/OnlCgformAreaController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/tag/controller/OnlCgformAreaController.java @@ -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 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 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 queryWrapper=new QueryWrapper<>(); + queryWrapper.eq("show_area", onlCgformArea.getShowArea()).eq("is_model", onlCgformArea.getIsModel()); + List 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 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!"); diff --git a/jero-web/src/components/SplitTable/index.vue b/jero-web/src/components/SplitTable/index.vue index 652fad818..7a564e16b 100644 --- a/jero-web/src/components/SplitTable/index.vue +++ b/jero-web/src/components/SplitTable/index.vue @@ -21,7 +21,7 @@ {{ol.text}} - + {{ol.text}} diff --git a/jero-web/src/views/documentManage/splitting/index.vue b/jero-web/src/views/documentManage/splitting/index.vue index ca6457b1d..e3c7ef46f 100644 --- a/jero-web/src/views/documentManage/splitting/index.vue +++ b/jero-web/src/views/documentManage/splitting/index.vue @@ -5,11 +5,11 @@
-
+
{{ $t('SplitText') }}
-
+
{{ $t('ImportResults') }}
diff --git a/jero-web/src/views/documentManage/splitting/modules/ImportResult.vue b/jero-web/src/views/documentManage/splitting/modules/ImportResult.vue index 06305470c..3797d0309 100644 --- a/jero-web/src/views/documentManage/splitting/modules/ImportResult.vue +++ b/jero-web/src/views/documentManage/splitting/modules/ImportResult.vue @@ -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'), diff --git a/jero-web/src/views/documentManage/splitting/modules/SplitText.vue b/jero-web/src/views/documentManage/splitting/modules/SplitText.vue index 85bccf04f..25ca164ac 100644 --- a/jero-web/src/views/documentManage/splitting/modules/SplitText.vue +++ b/jero-web/src/views/documentManage/splitting/modules/SplitText.vue @@ -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:{