From 4d523eddd8f97eb5e3997d26e06ff1f974e53261 Mon Sep 17 00:00:00 2001 From: zer0Black Date: Tue, 26 Jul 2022 15:18:34 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../document/service/impl/BussDocumentLibraryEOServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java index a56b95bbc..55d9aa986 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java @@ -3189,7 +3189,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl Date: Tue, 26 Jul 2022 16:43:04 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/RetrieveFilesList.vue | 35 ++++++++++++++----- .../documentTranslation/index.vue | 1 + 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/jero-web/src/views/documentTools/documentTranslation/components/RetrieveFilesList.vue b/jero-web/src/views/documentTools/documentTranslation/components/RetrieveFilesList.vue index 985d82608..b4883eed1 100644 --- a/jero-web/src/views/documentTools/documentTranslation/components/RetrieveFilesList.vue +++ b/jero-web/src/views/documentTools/documentTranslation/components/RetrieveFilesList.vue @@ -42,7 +42,7 @@ * {{$t('translationLanguage')}} - + - + { + this.$refs.ruleForm.clearValidate() + }) }, searchQuery() { this.pageNo = 1 @@ -216,7 +219,7 @@ let query = { pageNo: pageNo + '', pageSize: pageSize + '', - type: 'pdf', + type: 'doc', ...this.queryParam } this.loading = true @@ -249,9 +252,25 @@ if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { this.$refs.ruleForm.validate(valid => { if (valid) { + let query = { + ...this.formInline, + serialNumber: this.selectedRowKeysRecord[0].serial_number, + title: this.selectedRowKeysRecord[0].title, + fileName: this.selectedRowKeysRecord[0].file_name, + textStatus: this.selectedRowKeysRecord[0].text_info_id + } this.confirmLoading = true - let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) - this.visible = false + postAction('/docTranslation/docTranslationEO/add', query).then((res) => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.visible = false + this.confirmLoading = false + this.$emit('RetrieveFilesListForm') + } else { + this.$message.warning(this.$t('operationFailed')) + this.confirmLoading = false + } + }) } }) } else { diff --git a/jero-web/src/views/documentTools/documentTranslation/index.vue b/jero-web/src/views/documentTools/documentTranslation/index.vue index 2c3b82588..367a303da 100644 --- a/jero-web/src/views/documentTools/documentTranslation/index.vue +++ b/jero-web/src/views/documentTools/documentTranslation/index.vue @@ -222,6 +222,7 @@ this.getList() }, RetrieveFilesListForm() { + this.pageNo = 1 this.getList() }, handleToggleSearch() { From 5c8e40ad77364439b02c0f3aebbaedd7623937f9 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Tue, 26 Jul 2022 17:45:53 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=80=A7=E7=AC=A6?= =?UTF-8?q?=E5=90=88=E7=9C=8B=E6=9D=BF-=E6=8A=80=E6=9C=AF=E9=A2=86?= =?UTF-8?q?=E5=9F=9F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/views/externalReports/index.vue | 3 +-- jero-web/src/views/regulationsKanban/index.vue | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/jero-web/src/views/externalReports/index.vue b/jero-web/src/views/externalReports/index.vue index faad171c5..95b590d0a 100644 --- a/jero-web/src/views/externalReports/index.vue +++ b/jero-web/src/views/externalReports/index.vue @@ -8,7 +8,6 @@ -
+
- {{ $t('technicalField') }} + {{$t('technicalField')}}
- - - -
From cdf767aeb18b796fea40c014112845830bf165b1 Mon Sep 17 00:00:00 2001 From: gaosong Date: Tue, 26 Jul 2022 17:47:08 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E5=AF=B9=E5=A4=96=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=20=E6=96=87=E4=BB=B6=E5=A4=B9=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E6=8A=A5=E5=91=8A=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ExtRepoDataController.java | 207 ++++++++++++ .../controller/ExtRepoFolderController.java | 172 ++++++++++ .../modules/extRepo/entity/ERFTreeData.java | 127 ++++++++ .../modules/extRepo/entity/ExtRepoData.java | 81 +++++ .../modules/extRepo/entity/ExtRepoFolder.java | 96 ++++++ .../extRepo/mapper/ExtRepoDataMapper.java | 14 + .../extRepo/mapper/ExtRepoFolderMapper.java | 14 + .../extRepo/mapper/xml/ExtRepoDataMapper.xml | 16 + .../mapper/xml/ExtRepoFolderMapper.xml | 17 + .../extRepo/service/IExtRepoDataService.java | 62 ++++ .../service/IExtRepoFolderService.java | 77 +++++ .../service/impl/ExtRepoDataServiceImpl.java | 90 ++++++ .../impl/ExtRepoFolderServiceImpl.java | 298 ++++++++++++++++++ 13 files changed, 1271 insertions(+) create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoDataController.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoFolderController.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/entity/ERFTreeData.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/entity/ExtRepoData.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/entity/ExtRepoFolder.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/ExtRepoDataMapper.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/ExtRepoFolderMapper.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/xml/ExtRepoDataMapper.xml create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/xml/ExtRepoFolderMapper.xml create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/IExtRepoDataService.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/IExtRepoFolderService.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoDataServiceImpl.java create mode 100644 jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoFolderServiceImpl.java diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoDataController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoDataController.java new file mode 100644 index 000000000..167f4e812 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoDataController.java @@ -0,0 +1,207 @@ +package com.jero.modules.extRepo.controller; + +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.jero.common.api.vo.Result; +import com.jero.common.aspect.annotation.AutoLog; +import com.jero.common.system.base.controller.JeroController; +import com.jero.common.system.query.QueryGenerator; +import com.jero.common.system.vo.LoginUser; +import com.jero.modules.extRepo.entity.ExtRepoData; +import com.jero.modules.extRepo.service.IExtRepoDataService; +import com.jero.modules.extRepo.service.IExtRepoFolderService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.List; + + +/** + * @Description: 对外报告数据表 + * @Author: jero-boot + * @Date: 2022-07-25 + * @Version: V1.0 + */ +@Api(tags = "对外报告数据表") +@RestController +@RequestMapping("/com.jero.modules.extRepo/extRepoData") +@Slf4j +public class ExtRepoDataController extends JeroController { + @Autowired + private IExtRepoDataService extRepoDataService; + + @Autowired + private IExtRepoFolderService extRepoFolderService; + + /** + * 分页列表查询 + * + * @param extRepoData + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "对外报告数据表-分页列表查询") + @ApiOperation(value = "对外报告数据表-分页列表查询", notes = "对外报告数据表-分页列表查询") + @GetMapping(value = "/page") + public Result queryPageList(ExtRepoData extRepoData, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(extRepoData, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + // 文件名称模糊查询 + String fileName = req.getParameter("fileName"); + if (StringUtils.isNotBlank(fileName)) { + queryWrapper.like("fileName", fileName); + } + + // 创建人模糊查询 + String createBy = req.getParameter("createBy"); + if (StringUtils.isNotBlank(fileName)) { + queryWrapper.like("createBy", createBy); + } + IPage pageList = extRepoDataService.page(page, queryWrapper); + log.info("查询当前页:" + pageList.getCurrent()); + log.info("查询当前页数量:" + pageList.getSize()); + log.info("查询结果数量:" + pageList.getRecords().size()); + log.info("数据总数:" + pageList.getTotal()); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "对外报告数据表-列表查询") + @ApiOperation(value = "对外报告数据表-列表查询", notes = "对外报告数据表-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { + List list = extRepoDataService.queryList(); + return Result.OK(list); + } + + /** + * 添加 + * + * @param extRepoData + * @return + */ + @AutoLog(value = "对外报告数据表-添加") + @ApiOperation(value = "对外报告数据表-添加", notes = "对外报告数据表-添加") + @PostMapping(value = "/add") + public Result add(@Validated @RequestBody ExtRepoData extRepoData) { + if (extRepoFolderService.haveManageAuth(extRepoData.getSupFolder())) { + extRepoDataService.add(extRepoData); + return Result.OK("添加成功!"); + } else { + return Result.error("没有权限!"); + } + } + + /** + * 编辑 + * + * @param extRepoData + * @return + */ + @AutoLog(value = "对外报告数据表-编辑") + @ApiOperation(value = "对外报告数据表-编辑", notes = "对外报告数据表-编辑") + @PutMapping(value = "/edit") + public Result edit(@Validated @RequestBody ExtRepoData extRepoData) { + if (extRepoFolderService.haveManageAuth(extRepoData.getSupFolder())) { + extRepoDataService.editById(extRepoData); + return Result.OK("编辑成功!"); + } else { + return Result.error("没有权限!"); + } + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "对外报告数据表-通过id删除") + @ApiOperation(value = "对外报告数据表-通过id删除", notes = "对外报告数据表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name = "id", required = true) String id) { + ExtRepoData erd = extRepoDataService.queryById(id); + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + if (extRepoFolderService.haveManageAuth(erd.getSupFolder()) && erd.getCreateBy().equals(sysUser.getUsername())) { + extRepoDataService.deleteById(id); + return Result.OK("删除成功!"); + } else { + return Result.error("没有权限!"); + } + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "对外报告数据表-批量删除") + @ApiOperation(value = "对外报告数据表-批量删除", notes = "对外报告数据表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) { + this.extRepoDataService.deleteByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "对外报告数据表-通过id查询") + @ApiOperation(value = "对外报告数据表-通过id查询", notes = "对外报告数据表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + ExtRepoData extRepoData = extRepoDataService.queryById(id); + if (extRepoData == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(extRepoData); + } + + /** + * 导出excel + * + * @param request + * @param extRepoData + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ExtRepoData extRepoData) { + return super.exportXls(request, extRepoData, ExtRepoData.class, "对外报告数据表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, ExtRepoData.class); + } + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoFolderController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoFolderController.java new file mode 100644 index 000000000..d4b2107d4 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoFolderController.java @@ -0,0 +1,172 @@ +package com.jero.modules.extRepo.controller; + +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.jero.common.api.vo.Result; +import com.jero.common.aspect.annotation.AutoLog; +import com.jero.common.system.base.controller.JeroController; +import com.jero.common.system.query.QueryGenerator; +import com.jero.modules.extRepo.entity.ERFTreeData; +import com.jero.modules.extRepo.entity.ExtRepoFolder; +import com.jero.modules.extRepo.service.IExtRepoFolderService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.List; + + + /** + * @Description: 对外报告文件夹表 + * @Author: jero-boot + * @Date: 2022-07-25 + * @Version: V1.0 + */ +@Api(tags="对外报告文件夹表") +@RestController +@RequestMapping("/extRepo/extRepoFolder") +@Slf4j +public class ExtRepoFolderController extends JeroController { + @Autowired + private IExtRepoFolderService extRepoFolderService; + + /** + * 分页列表查询 + * + * @param extRepoFolder + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "对外报告文件夹表-分页列表查询") + @ApiOperation(value="对外报告文件夹表-分页列表查询", notes="对外报告文件夹表-分页列表查询") + @GetMapping(value = "/page") + public Result queryPageList(ExtRepoFolder extRepoFolder, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(extRepoFolder, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = extRepoFolderService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 列表查询 + * + * @return + */ + @AutoLog(value = "对外报告文件夹表-列表查询") + @ApiOperation(value="对外报告文件夹表-列表查询", notes="对外报告文件夹表-列表查询") + @GetMapping(value = "/list") + public Result> queryList() { + List list = extRepoFolderService.queryTreeList(); + return Result.OK(list); + } + + /** + * 添加 + * + * @param extRepoFolder + * @return + */ + @AutoLog(value = "对外报告文件夹表-添加") + @ApiOperation(value="对外报告文件夹表-添加", notes="对外报告文件夹表-添加") + @PostMapping(value = "/add") + public Result add(@Validated @RequestBody ExtRepoFolder extRepoFolder) { + extRepoFolderService.add(extRepoFolder); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param extRepoFolder + * @return + */ + @AutoLog(value = "对外报告文件夹表-编辑") + @ApiOperation(value="对外报告文件夹表-编辑", notes="对外报告文件夹表-编辑") + @PutMapping(value = "/edit") + public Result edit(@Validated @RequestBody ExtRepoFolder extRepoFolder) { + extRepoFolderService.editById(extRepoFolder); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "对外报告文件夹表-通过id删除") + @ApiOperation(value="对外报告文件夹表-通过id删除", notes="对外报告文件夹表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + extRepoFolderService.deleteById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "对外报告文件夹表-批量删除") + @ApiOperation(value="对外报告文件夹表-批量删除", notes="对外报告文件夹表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.extRepoFolderService.deleteByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "对外报告文件夹表-通过id查询") + @ApiOperation(value="对外报告文件夹表-通过id查询", notes="对外报告文件夹表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + ExtRepoFolder extRepoFolder = extRepoFolderService.queryById(id); + if(extRepoFolder==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(extRepoFolder); + } + + /** + * 导出excel + * + * @param request + * @param extRepoFolder + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ExtRepoFolder extRepoFolder) { + return super.exportXls(request, extRepoFolder, ExtRepoFolder.class, "对外报告文件夹表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, ExtRepoFolder.class); + } + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/entity/ERFTreeData.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/entity/ERFTreeData.java new file mode 100644 index 000000000..4c6553b2d --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/entity/ERFTreeData.java @@ -0,0 +1,127 @@ +package com.jero.modules.extRepo.entity; + +import org.jetbrains.annotations.NotNull; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * 对外报告文件夹 树结构实体类 + */ +public class ERFTreeData implements Comparable { + + private static final long serialVersionUID = 1L; + + /** + * 页面显示的名称 对应 folder_name + */ + private String title; + + /** + * 文件夹ID 对应 id + */ + private String key; + + /** + * 层级,设定最多4级 + */ + private int level; + + + /** + * 排序 + */ + private int orderId; + + + /** + * 是否显示 + */ + private boolean display = false; + + /** + * 子文件夹 + */ + private List children = new ArrayList(); + + public ERFTreeData() { + } + + public ERFTreeData(String title, String key, int level,int orderId) { + this.title = title; + this.key = key; + this.level = level; + this.orderId = orderId; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public int getLevel() { + return level; + } + + public void setLevel(int level) { + this.level = level; + } + + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } + + public int getOrderId() { + return orderId; + } + + public void setOrderId(int orderId) { + this.orderId = orderId; + } + + public boolean isDisplay() { + return display; + } + + public void setDisplay(boolean display) { + this.display = display; + } + + @Override + public String toString() { + return "ERFTreeData{" + + "title='" + title + '\'' + + ", key='" + key + '\'' + + ", level=" + level + + ", orderId=" + orderId + + ", display=" + display + + ", children=" + children + + '}'; + } + + public void sortChildren() { + Collections.sort(children); + } + + + @Override + public int compareTo(@NotNull ERFTreeData o) { + return this.orderId - o.orderId; + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/entity/ExtRepoData.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/entity/ExtRepoData.java new file mode 100644 index 000000000..60b13fee3 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/entity/ExtRepoData.java @@ -0,0 +1,81 @@ +package com.jero.modules.extRepo.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; + + +/** + * @Description: 对外报告数据表 + * @Author: jero-boot + * @Date: 2022-07-25 + * @Version: V1.0 + */ +@Data +@TableName("ext_repo_data") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="ext_repo_data对象", description="对外报告数据表") +public class ExtRepoData implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + + /**文件标识*/ + @Excel(name = "文件标识", width = 15) + @ApiModelProperty(value = "文件标识") + private java.lang.String fileKey; + + /**文件名称*/ + @Excel(name = "文件名称", width = 15) + @ApiModelProperty(value = "文件名称") + private java.lang.String fileName; + + /**文件说明*/ + @Excel(name = "文件说明", width = 15) + @ApiModelProperty(value = "文件说明") + private java.lang.String fileDescription; + + /**所属文件夹*/ + @Excel(name = "所属文件夹", width = 15) + @ApiModelProperty(value = "所属文件夹") + private java.lang.String supFolder; + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/entity/ExtRepoFolder.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/entity/ExtRepoFolder.java new file mode 100644 index 000000000..44c91e902 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/entity/ExtRepoFolder.java @@ -0,0 +1,96 @@ +package com.jero.modules.extRepo.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Arrays; +import java.util.List; + + +/** + * @Description: 对外报告文件夹表 + * @Author: jero-boot + * @Date: 2022-07-25 + * @Version: V1.0 + */ +@Data +@TableName("ext_repo_folder") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="ext_repo_folder对象", description="对外报告文件夹表") +public class ExtRepoFolder implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + + /**文件夹名称*/ + @Excel(name = "文件夹名称", width = 15) + @ApiModelProperty(value = "文件夹名称") + private java.lang.String folderName; + + /**文件夹排序*/ + @Excel(name = "文件夹排序", width = 15) + @ApiModelProperty(value = "文件夹排序") + private java.lang.Integer orderId; + + /**所属文件夹*/ + @Excel(name = "所属文件夹", width = 15) + @ApiModelProperty(value = "所属文件夹") + private java.lang.String supFolder; + + /**查看权限人员*/ + @Excel(name = "查看权限人员", width = 15) + @ApiModelProperty(value = "查看权限人员") + private java.lang.String authView; + + /**管理权限人员*/ + @Excel(name = "管理权限人员", width = 15) + @ApiModelProperty(value = "管理权限人员") + private java.lang.String authManage; + + public List getAuthManageList(){ + return Arrays.asList(authManage.split(",")); + } + + public List getAuthViewList(){ + return Arrays.asList(authView.split(",")); + } + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/ExtRepoDataMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/ExtRepoDataMapper.java new file mode 100644 index 000000000..d422b82fc --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/ExtRepoDataMapper.java @@ -0,0 +1,14 @@ +package com.jero.modules.extRepo.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jero.modules.extRepo.entity.ExtRepoData; + +/** + * @Description: 对外报告数据表 + * @Author: jero-boot + * @Date: 2022-07-25 + * @Version: V1.0 + */ +public interface ExtRepoDataMapper extends BaseMapper { + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/ExtRepoFolderMapper.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/ExtRepoFolderMapper.java new file mode 100644 index 000000000..0db47bb53 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/ExtRepoFolderMapper.java @@ -0,0 +1,14 @@ +package com.jero.modules.extRepo.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jero.modules.extRepo.entity.ExtRepoFolder; + +/** + * @Description: 对外报告文件夹表 + * @Author: jero-boot + * @Date: 2022-07-25 + * @Version: V1.0 + */ +public interface ExtRepoFolderMapper extends BaseMapper { + +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/xml/ExtRepoDataMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/xml/ExtRepoDataMapper.xml new file mode 100644 index 000000000..e80da742d --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/xml/ExtRepoDataMapper.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/xml/ExtRepoFolderMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/xml/ExtRepoFolderMapper.xml new file mode 100644 index 000000000..57568b5fd --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/mapper/xml/ExtRepoFolderMapper.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/IExtRepoDataService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/IExtRepoDataService.java new file mode 100644 index 000000000..bc9bfb91a --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/IExtRepoDataService.java @@ -0,0 +1,62 @@ +package com.jero.modules.extRepo.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.jero.modules.extRepo.entity.ExtRepoData; + +import java.util.List; + +/** + * @Description: 对外报告数据表 + * @Author: jero-boot + * @Date: 2022-07-25 + * @Version: V1.0 + */ +public interface IExtRepoDataService extends IService { + + /** + * 保存 + * + * @param extRepoData + * @return + */ + void add(ExtRepoData extRepoData); + + /** + * 更新 + * + * @param extRepoData + * @return + */ + void editById(ExtRepoData extRepoData); + + /** + * 通过id删除 + * + * @param id + * @return + */ + void deleteById(String id); + + /** + * 批量删除 + * + * @param ids + * @return + */ + void deleteByIds(List ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + ExtRepoData queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(); +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/IExtRepoFolderService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/IExtRepoFolderService.java new file mode 100644 index 000000000..eaf819340 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/IExtRepoFolderService.java @@ -0,0 +1,77 @@ +package com.jero.modules.extRepo.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.jero.modules.extRepo.entity.ERFTreeData; +import com.jero.modules.extRepo.entity.ExtRepoFolder; + +import java.util.List; + +/** + * @Description: 对外报告文件夹表 + * @Author: jero-boot + * @Date: 2022-07-25 + * @Version: V1.0 + */ +public interface IExtRepoFolderService extends IService { + + /** + * 保存 + * + * @param extRepoFolder + * @return + */ + void add(ExtRepoFolder extRepoFolder); + + /** + * 更新 + * + * @param extRepoFolder + * @return + */ + void editById(ExtRepoFolder extRepoFolder); + + /** + * 通过id删除 + * + * @param id + * @return + */ + void deleteById(String id); + + /** + * 批量删除 + * + * @param ids + * @return + */ + void deleteByIds(List ids); + + /** + * 通过id查询 + * + * @param id + * @return + */ + ExtRepoFolder queryById(String id); + + /** + * 列表查询 + * + * @return + */ + List queryList(); + + /** + * 查询返回树结构 + * @return + */ + List queryTreeList(); + + + /** + * 是否有管理权限 + * @param folderId + * @return + */ + boolean haveManageAuth(String folderId); +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoDataServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoDataServiceImpl.java new file mode 100644 index 000000000..72f4f50c9 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoDataServiceImpl.java @@ -0,0 +1,90 @@ +package com.jero.modules.extRepo.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jero.modules.extRepo.entity.ExtRepoData; +import com.jero.modules.extRepo.mapper.ExtRepoDataMapper; +import com.jero.modules.extRepo.service.IExtRepoDataService; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * @Description: 对外报告数据表 + * @Author: jero-boot + * @Date: 2022-07-25 + * @Version: V1.0 + */ +@Service +public class ExtRepoDataServiceImpl extends ServiceImpl implements IExtRepoDataService { + + /** + * 保存 + * + * @param extRepoData + * @return + */ + @Override + public void add(ExtRepoData extRepoData) { + Date now = new Date(); + extRepoData.setCreateTime(now); + extRepoData.setUpdateTime(now); + save(extRepoData); + } + + /** + * 更新 + * + * @param extRepoData + * @return + */ + @Override + public void editById(ExtRepoData extRepoData) { + Date now = new Date(); + extRepoData.setUpdateTime(now); + saveOrUpdate(extRepoData); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @Override + public void deleteById(String id) { + removeById(id); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @Override + public void deleteByIds(List ids) { + removeByIds(ids); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @Override + public ExtRepoData queryById(String id) { + return getById(id); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList() { + return list(); + } +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoFolderServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoFolderServiceImpl.java new file mode 100644 index 000000000..efa5974c4 --- /dev/null +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/service/impl/ExtRepoFolderServiceImpl.java @@ -0,0 +1,298 @@ +package com.jero.modules.extRepo.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jero.common.exception.JeroBootException; +import com.jero.common.system.query.QueryGenerator; +import com.jero.common.system.vo.LoginUser; +import com.jero.modules.extRepo.entity.ERFTreeData; +import com.jero.modules.extRepo.entity.ExtRepoFolder; +import com.jero.modules.extRepo.mapper.ExtRepoFolderMapper; +import com.jero.modules.extRepo.service.IExtRepoFolderService; +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * @Description: 对外报告文件夹表 + * @Author: jero-boot + * @Date: 2022-07-25 + * @Version: V1.0 + */ +@Service +public class ExtRepoFolderServiceImpl extends ServiceImpl implements IExtRepoFolderService { + + /** + * 一级文件夹的supFolder统一存root + */ + private static String superFolder = "root"; + + /** + * 保存 + * + * @param extRepoFolder + * @return + */ + @Override + public void add(ExtRepoFolder extRepoFolder) { + try { + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + //创建文件夹的时候把创建人加入管理权限 + extRepoFolder.setAuthManage(extRepoFolder.getAuthManage() + "," + sysUser.getUsername()); + if (StringUtils.isEmpty(extRepoFolder.getSupFolder())) { + //一级文件夹的supFolder统一存root,方便以后查找 + extRepoFolder.setSupFolder(superFolder); + } + Date now = new Date(); + extRepoFolder.setCreateTime(now); + extRepoFolder.setUpdateTime(now); + save(extRepoFolder); + editOrderId(extRepoFolder); + } catch (Exception ex) { + log.error("添加对外报告文件夹失败:" + ex.getMessage()); + throw new JeroBootException("添加文件夹失败!"); + } + } + + /** + * 同级文件夹,修改顺序号 + * + * @param extRepoFolder + */ + private void editOrderId(ExtRepoFolder extRepoFolder) throws Exception { + List list = getListBySupFolder(extRepoFolder.getSupFolder()); + for (ExtRepoFolder erf : list) { + if (erf.getOrderId() >= extRepoFolder.getOrderId() && !erf.getId().equals(extRepoFolder.getId())) { + erf.setOrderId(erf.getOrderId() + 1); + updateById(erf); + } + } + } + + private List getListBySupFolder(String supFolder){ + ExtRepoFolder erf = new ExtRepoFolder(); + erf.setSupFolder(supFolder); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(erf, new HashMap<>()); + return this.list(queryWrapper); + } + + /** + * 更新 + * + * @param extRepoFolder + * @return + */ + @Override + public void editById(ExtRepoFolder extRepoFolder) { + try { + //原有的记录 + ExtRepoFolder erf_orig = queryById(extRepoFolder.getId()); + Date now = new Date(); + extRepoFolder.setUpdateTime(now); + saveOrUpdate(extRepoFolder); + editOrderId(extRepoFolder); + editAuth(erf_orig, extRepoFolder); + } catch (Exception ex) { + log.error("修改对外报告文件夹失败:" + ex.getMessage()); + throw new JeroBootException("修改文件夹失败!"); + } + } + + /** + * 修改所有关联文件夹的权限 + */ + private void editAuth(ExtRepoFolder erf_orig, ExtRepoFolder erf_new) throws Exception { + List authManage_orig = erf_orig.getAuthManageList(); + List authManage_new = erf_new.getAuthManageList(); + //增加管理权限的人 + List addManageRole = getDefList(authManage_new, authManage_orig); + //删除管理权限的人 + List delManageRole = getDefList(authManage_orig, authManage_new); + + List authView_orig = erf_orig.getAuthViewList(); + List authView_new = erf_new.getAuthViewList(); + //增加查看权限的人 + List addViewRole = getDefList(authView_new, authView_orig); + //删除查看权限的人 + List delViewRole = getDefList(authView_orig, authView_new); + + List allSubFolder = getAllSubFolder(erf_orig.getId()); + //存储变化的对象 + List updateFolder = new ArrayList(); + for (ExtRepoFolder erf : allSubFolder) { + boolean isChange = false; + List authManage_erf = erf.getAuthManageList(); + List authView_erf = erf.getAuthViewList(); + for (String add : addManageRole) { + if (!authManage_erf.contains(add)) { + authManage_erf.add(add); + isChange = true; + } + } + for (String del : delManageRole) { + if (authManage_erf.contains(del)) { + authManage_erf.remove(del); + isChange = true; + } + } + for (String add : addViewRole) { + if (!authView_erf.contains(add)) { + authView_erf.add(add); + isChange = true; + } + } + for (String del : delViewRole) { + if (authView_erf.contains(del)) { + authView_erf.remove(del); + isChange = true; + } + } + erf.setAuthManage(StringUtils.join(authManage_erf, ",")); + erf.setAuthView(StringUtils.join(authView_erf, ",")); + if (isChange) { + updateFolder.add(erf); + } + } + if (updateFolder.size() > 0) { + updateBatchById(updateFolder); + } + } + + /** + * 得到列表新增元素集合 + * + * @param listA + * @param listB + * @return + */ + private List getDefList(List listA, List listB) { + List res = new ArrayList(); + for (String s : listA) { + if (StringUtils.isNotBlank(s) && !listB.contains(s)) { + res.add(s); + } + } + return res; + } + + private List getAllSubFolder(String folderId) { + List resList = getListBySupFolder(folderId); + List subList = new ArrayList(); + for (ExtRepoFolder erf : resList) { + subList.addAll(getAllSubFolder(erf.getId())); + } + resList.addAll(subList); + return resList; + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @Override + public void deleteById(String id) { + try { + List resList = getListBySupFolder(id); + if (resList.isEmpty()) { + removeById(id); + } + } catch (Exception ex) { + log.error("删除对外报告文件夹失败:" + ex.getMessage()); + throw new JeroBootException("删除文件夹失败!"); + } + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @Override + public void deleteByIds(List ids) { + removeByIds(ids); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @Override + public ExtRepoFolder queryById(String id) { + return getById(id); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryList() { + return list(); + } + + /** + * 列表查询 + * + * @return + */ + @Override + public List queryTreeList() { + try { + List list = queryList(); + List res = getSubFolder(superFolder, list, 1); + Collections.sort(res); + return res; + } catch (Exception ex) { + log.error("查询对外报告文件夹失败:" + ex.getMessage()); + throw new JeroBootException("查询文件夹失败!"); + } + } + + + /** + * 查找子文件夹,生成树结构 + * + * @param supId + * @param list + * @param level 前端需要知道当前文件夹在哪一层 + * @return + */ + private List getSubFolder(String supId, List list, int level) throws Exception { + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + List resList = new ArrayList(); + for (ExtRepoFolder erf : list) { + if (supId.equals(erf.getSupFolder())) { + ERFTreeData date = new ERFTreeData(erf.getFolderName(), erf.getId(), level, erf.getOrderId()); + //检查有没有权限查看 + date.setDisplay(erf.getAuthManageList().contains(sysUser.getUsername()) || erf.getAuthViewList().contains(sysUser.getUsername())); + int childLevel = date.getLevel() + 1; + date.setChildren(getSubFolder(erf.getId(), list, childLevel)); + date.sortChildren(); + resList.add(date); + } + } + return resList; + } + + /** + * 是否有管理权限 + * @param folderId + * @return + */ + @Override + public boolean haveManageAuth(String folderId) { + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + ExtRepoFolder erf = queryById(folderId); + return erf.getAuthManageList().contains(sysUser.getUsername()); + } + + +} From 95a8f05145bbaca4b6e5db363fdd9c0a44bec023 Mon Sep 17 00:00:00 2001 From: wangzhijiang <12345678> Date: Wed, 27 Jul 2022 09:24:46 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E6=96=87=E6=A1=A3=E7=BF=BB=E8=AF=91-?= =?UTF-8?q?=E8=B0=83=E5=8F=96=E5=B7=B2=E5=85=A5=E5=BA=93=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E6=A1=A3=E5=BA=93id=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../document/service/impl/BussDocumentLibraryEOServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java index 55d9aa986..d5f5e01a7 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/document/service/impl/BussDocumentLibraryEOServiceImpl.java @@ -3411,7 +3411,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl Date: Wed, 27 Jul 2022 09:46:34 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 1 + jero-web/src/common/lang/zh-cn.js | 271 +++++++++--------- .../components/RetrieveFilesList.vue | 4 +- .../documentTranslation/index.vue | 33 ++- 4 files changed, 163 insertions(+), 146 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 937d655fd..478f0c50f 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1190,4 +1190,5 @@ module.exports = { selectDirectorylocation: 'Please select the directory location to add the folder', Fileuploaded:'File uploaded, please wait', uploadedbyyourself:'You can only delete files and data uploaded by yourself', + doNotHavePermissionDeleteData:'Do not have permission to delete this data,' } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index d03b7b2da..807e2b639 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -178,9 +178,9 @@ module.exports = { MenuType: '菜单类型', menu: '菜单', ButtonsPermissions: '按钮/权限', - ConventionalExport:'常规导出', - CustomExport:'自定义导出', - CustomTemplateName:'自定义模板名称', + ConventionalExport: '常规导出', + CustomExport: '自定义导出', + CustomTemplateName: '自定义模板名称', assembly: '组件', route: '路径', AddSubmenu: '添加子菜单', @@ -393,8 +393,8 @@ module.exports = { StandardDetails: '标准详情', whole: '全部', DocumentLibrary: '文档库', - GeneralExportInformation:'常规导出信息', - CustomizeExportInformation:'自定义导出信息', + GeneralExportInformation: '常规导出信息', + CustomizeExportInformation: '自定义导出信息', DocumentComparisonLibrary: '文档对比库', weekly: '周报', SyncLibrary: '同步至文档库', @@ -689,11 +689,11 @@ module.exports = { listConfirmation: '清单确认', ListConfirmationDeadline: '清单确认截止时间', dataConfirmation: '请选择清单确认状态为未发起或拒绝的数据,以及法规工程师、认证工程师不为空', - pleaseSelectinitiatedOrRejected:'请选择清单确认状态为未发起或拒绝的数据', - TheEngineerAndCertification:'的法规工程师、认证工程师不能为空', + pleaseSelectinitiatedOrRejected: '请选择清单确认状态为未发起或拒绝的数据', + TheEngineerAndCertification: '的法规工程师、认证工程师不能为空', taskDataConfirmation: '请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据,以及工程接口人不为空', - theProjectContactEmpty:'的工程接口人不能为空', - PleaseTaskConfirmationRejected:'请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据', + theProjectContactEmpty: '的工程接口人不能为空', + PleaseTaskConfirmationRejected: '请选择清单确认状态为接受及任务确认状态为未发起或拒绝的数据', pleaseSelectPersonFirst: '请先选择人员', onlyOnePersonCanBeSelected: '只能选择一个人员', overrule: '驳回', @@ -750,7 +750,7 @@ module.exports = { // 参数收集 MaintainConfigureInfo: '维护配置信息', ParameteItemCollectionList: '参数项收集清单', - ParameterViewPage:'参数项查看页', + ParameterViewPage: '参数项查看页', Areyousureparameteritems: '确认提交所选参数项嘛?', Theselectedconfiguration: '参数清单中参数项均为待发起收集或变更时,才能添加配置', NoConfigurationNotStart: '未添加任何配置,无法开始收集,请检查', @@ -817,10 +817,10 @@ module.exports = { releaseVersion: '发布版本', parameterTemplate: '参数模板', contentDescription: '内容说明', - WhetherMergeParameters:'是否合并参数', - merge:'合并', - nonjoinder:'不合并', - MergeSeparator:'合并分隔符', + WhetherMergeParameters: '是否合并参数', + merge: '合并', + nonjoinder: '不合并', + MergeSeparator: '合并分隔符', parameterTemplateExportName: '参数项列表', parameterDataExport: '参数项导出数据', // 参数收集结束 @@ -983,10 +983,10 @@ module.exports = { documentLibraryDetails: '文档库详情', question: '催办', ConfirmQuestion: '确认催办?', - OnlyOrTaskconfirmationOut:'只有清单确认状态或任务确认状态为待确认时才可以进行催办', - disableInput:'禁止输入', - taskConfirmationDeadline:'任务确认截止时间', - taskConfirmationResponsiblePerson:'责任人任务确认', + OnlyOrTaskconfirmationOut: '只有清单确认状态或任务确认状态为待确认时才可以进行催办', + disableInput: '禁止输入', + taskConfirmationDeadline: '任务确认截止时间', + taskConfirmationResponsiblePerson: '责任人任务确认', or: '或', warningTime: '预警时间', RegulationMonthlyManagement: '法规月报管理', @@ -1025,23 +1025,23 @@ module.exports = { closingDate: '截止日期', viewProcess: '查看流程', evaluationResults: '评估结果', - regulatoryTechnicalEvaluationResults:'法规技术评估结果', - Assessor:'评估人', - collectionOfRegulatoryOpinions:'法规意见收集', - collectionOfRegulatoryOpinionsProcess:'法规意见收集流程', - feedbackInformation:'反馈信息', - relevantSections:'相关章节', - questionsSuggestions:'问题/建议', + regulatoryTechnicalEvaluationResults: '法规技术评估结果', + Assessor: '评估人', + collectionOfRegulatoryOpinions: '法规意见收集', + collectionOfRegulatoryOpinionsProcess: '法规意见收集流程', + feedbackInformation: '反馈信息', + relevantSections: '相关章节', + questionsSuggestions: '问题/建议', link: '链接', - reason:'理由', - planNoChinese:'计划号', - feedbackPoint:'反馈点', - standardNameCn:'标准名称中文', - standardNameEn:'标准名称英文', - deadlineForComments:'征求意见截止日期', - proposedTime:'提出时间', - standardNo:'标准编号', - implemenDate:'实施日期', + reason: '理由', + planNoChinese: '计划号', + feedbackPoint: '反馈点', + standardNameCn: '标准名称中文', + standardNameEn: '标准名称英文', + deadlineForComments: '征求意见截止日期', + proposedTime: '提出时间', + standardNo: '标准编号', + implemenDate: '实施日期', // 上报库 Enable: '启用', Latestupdatetime: '最新更新时间', @@ -1078,7 +1078,7 @@ module.exports = { Btext: '文本+下拉多选', Ctext: '文本+附件', Dtext: '下拉单选+附件', - Etext:'下拉多选+附件', + Etext: '下拉多选+附件', Ftext: '文本+下拉单选+附件', Gtext: '标题', Nnothing: '无', @@ -1093,104 +1093,105 @@ module.exports = { Copyparameterlist: '复制参数清单', Templatenamelist: '模板名称-参数项收集清单', newNiONumber: 'NIO编号', - English:'英文', - requiredParametersEmpty:'必填参数不能为空', - theResponsiblePersonAndDeadlineClank:'的责任人、截止时间不能为空', - bringInTheProjectInterface:'带入工程接口人', - theCurrentListSaved:'当前列表数据已全部提交,无法进行暂存', - defaultTemplate:'默认模板', - newRequestCommentListTemplate:'新征求意见清单模板', - NewReleasedStandardTemplate:'新发布标准模板', - pleaseSelectStandard:'请选择标准', - theResponsiblePersonEmpty:'的责任人不能为空', - theDeadlineEmpty:'的截止时间不能为空', - theDeliveryTypeCannotBeEmpty:'的交付物类型不能为空', - For:'针对于', - markedRejection:'标注的驳回意见', - RegulationListConfirmationTask:'清单确认任务', - RegulationListConfirmationNotification:'清单确认通知', - RegulationTaskConfirmation:'任务确认任务', - DesignComplianceTask:'设计符合性任务', - PreHomoTask:'Pre-Homo任务', - ValidationTask:'验证符合性任务', - DesignComplianceNotification:'设计符合性通知', - PreHomoNotification:'Pre-Homo通知', - ValidationComplianceNotification:'验证符合性通知', - RegulationTaskConfirmationNotification:'任务确认通知', - evaluationMethod:'评估方式', - uploadRelevantMaterials:'相关资料上传', - RelevantMaterials:'相关资料', - processBackground:'流程背景', - selectedStandard:'所选标准', - standardDecompositionDocument:'带入标准分解单', - pleaseSelectStandardFirst:'请先选择标准', - evaluatorFeedback:'评估人反馈', - nameTechnicalDocument:'技术文件名称', - chapter:'章节', - problemDescription:'问题说明', - filingExternalOpinions:'对外意见归档', - initiateProcessForCurrentStandard:'针对当前标准发起流程', - engineerFeedbackResults:'工程师反馈结果', - fileExport:'文件导出', - feedbackTime:'反馈时间', - regulatoryTechnologyAssessmentProcess:'法规技术评估流程', - feedbackEvaluation:'反馈评估', - clauseEvaluation:'条款评估', - standardDocuments:'标准文件', - pleaseCompleteTheEvaluationMethodorEvaluator:'请补全列表中评估方式或评估人', - reviewComments:'审核意见', - PleaseCompleteList:'请补全列表中符合性结果', - sponsorFeedback:'发起人反馈', - processNumber:'流程编号', - processName:'流程名称', - feedbackResults:'反馈结果', - theDoesNotSupportPreview:'当前文件格式不支持预览', - releaseSituation:'发布情况', - comparisonResults:'对比结果', - Published:'已发布', - initiateComparison:'发起对比', - translationLanguage:'翻译语言', - translationResults:'翻译结果', - conversionTime:'转换时间', - category:'类别', - RegulatoryProcessEvaluationResults :'法规流程评估结果', - ViewConformanceResults:'查看符合性结果', - CommentsCollectionResultsForReference:'意见收集结果参考', - TechnicalEvaluationResultsForReference:'技术评估结果参考', - ComplianceConfirmationRecord:'符合性确认记录', - complianceConfirmation:'符合性确认', - Deriveconformanceresults:'导出符合性结果', - Regulatorycompliancekanban:'法规符合性看板', - noComparisonDocumentSelected:'未选择对比文档', - RemarkInfo:'备注信息', - initiateDocumentComparison:'发起文档对比', - comparativeComments:'对比评论', - viewTheComparisonResults:'查看对比结果', - addFullTextComment:'添加全文评论', - turnOffAutomaticMatching:'关闭自动匹配', - exportComparisonReport:'导出对比报告', - comparisonDifferenceComment:'对比差异评论', - fullTextComments:'全文评论', - fileDeclaration:'文件说明', - FileForDetails:'文件详情', - Converting:'转换中', - convertNetwork:'转换完成', - convertFailed:'转换失败', - standardData:'标准数据', - Theorganization:'组织机构', - Addingfolder:'新增文件夹', - Addingsubfolders:'新增子文件夹', - Editfolder:'编辑文件夹', - Deletefolders:'删除文件夹', - Foldername:'文件夹名称', - Folderpermissions:'文件夹权限', - Folderorder:'文件夹顺序', - Downloadprivileges:'下载权限', - Openpersonnel:'开放人员', - originalText:'原文', - translatedText:'译文', - Administrativeprivileges:'管理权限', - Checkthepermissions:'查看权限', - onlyFilesUploaded:'只能上传.docx、.doc文件', - uploadedbyyourself:'只能删除自己上传的文件数据', + English: '英文', + requiredParametersEmpty: '必填参数不能为空', + theResponsiblePersonAndDeadlineClank: '的责任人、截止时间不能为空', + bringInTheProjectInterface: '带入工程接口人', + theCurrentListSaved: '当前列表数据已全部提交,无法进行暂存', + defaultTemplate: '默认模板', + newRequestCommentListTemplate: '新征求意见清单模板', + NewReleasedStandardTemplate: '新发布标准模板', + pleaseSelectStandard: '请选择标准', + theResponsiblePersonEmpty: '的责任人不能为空', + theDeadlineEmpty: '的截止时间不能为空', + theDeliveryTypeCannotBeEmpty: '的交付物类型不能为空', + For: '针对于', + markedRejection: '标注的驳回意见', + RegulationListConfirmationTask: '清单确认任务', + RegulationListConfirmationNotification: '清单确认通知', + RegulationTaskConfirmation: '任务确认任务', + DesignComplianceTask: '设计符合性任务', + PreHomoTask: 'Pre-Homo任务', + ValidationTask: '验证符合性任务', + DesignComplianceNotification: '设计符合性通知', + PreHomoNotification: 'Pre-Homo通知', + ValidationComplianceNotification: '验证符合性通知', + RegulationTaskConfirmationNotification: '任务确认通知', + evaluationMethod: '评估方式', + uploadRelevantMaterials: '相关资料上传', + RelevantMaterials: '相关资料', + processBackground: '流程背景', + selectedStandard: '所选标准', + standardDecompositionDocument: '带入标准分解单', + pleaseSelectStandardFirst: '请先选择标准', + evaluatorFeedback: '评估人反馈', + nameTechnicalDocument: '技术文件名称', + chapter: '章节', + problemDescription: '问题说明', + filingExternalOpinions: '对外意见归档', + initiateProcessForCurrentStandard: '针对当前标准发起流程', + engineerFeedbackResults: '工程师反馈结果', + fileExport: '文件导出', + feedbackTime: '反馈时间', + regulatoryTechnologyAssessmentProcess: '法规技术评估流程', + feedbackEvaluation: '反馈评估', + clauseEvaluation: '条款评估', + standardDocuments: '标准文件', + pleaseCompleteTheEvaluationMethodorEvaluator: '请补全列表中评估方式或评估人', + reviewComments: '审核意见', + PleaseCompleteList: '请补全列表中符合性结果', + sponsorFeedback: '发起人反馈', + processNumber: '流程编号', + processName: '流程名称', + feedbackResults: '反馈结果', + theDoesNotSupportPreview: '当前文件格式不支持预览', + releaseSituation: '发布情况', + comparisonResults: '对比结果', + Published: '已发布', + initiateComparison: '发起对比', + translationLanguage: '翻译语言', + translationResults: '翻译结果', + conversionTime: '转换时间', + category: '类别', + RegulatoryProcessEvaluationResults: '法规流程评估结果', + ViewConformanceResults: '查看符合性结果', + CommentsCollectionResultsForReference: '意见收集结果参考', + TechnicalEvaluationResultsForReference: '技术评估结果参考', + ComplianceConfirmationRecord: '符合性确认记录', + complianceConfirmation: '符合性确认', + Deriveconformanceresults: '导出符合性结果', + Regulatorycompliancekanban: '法规符合性看板', + noComparisonDocumentSelected: '未选择对比文档', + RemarkInfo: '备注信息', + initiateDocumentComparison: '发起文档对比', + comparativeComments: '对比评论', + viewTheComparisonResults: '查看对比结果', + addFullTextComment: '添加全文评论', + turnOffAutomaticMatching: '关闭自动匹配', + exportComparisonReport: '导出对比报告', + comparisonDifferenceComment: '对比差异评论', + fullTextComments: '全文评论', + fileDeclaration: '文件说明', + FileForDetails: '文件详情', + Converting: '转换中', + convertNetwork: '转换完成', + convertFailed: '转换失败', + standardData: '标准数据', + Theorganization: '组织机构', + Addingfolder: '新增文件夹', + Addingsubfolders: '新增子文件夹', + Editfolder: '编辑文件夹', + Deletefolders: '删除文件夹', + Foldername: '文件夹名称', + Folderpermissions: '文件夹权限', + Folderorder: '文件夹顺序', + Downloadprivileges: '下载权限', + Openpersonnel: '开放人员', + originalText: '原文', + translatedText: '译文', + Administrativeprivileges: '管理权限', + Checkthepermissions: '查看权限', + onlyFilesUploaded: '只能上传.docx、.doc文件', + uploadedbyyourself: '只能删除自己上传的文件数据', + doNotHavePermissionDeleteData: '没有权限删除此数据' } \ No newline at end of file diff --git a/jero-web/src/views/documentTools/documentTranslation/components/RetrieveFilesList.vue b/jero-web/src/views/documentTools/documentTranslation/components/RetrieveFilesList.vue index b4883eed1..37b0c040b 100644 --- a/jero-web/src/views/documentTools/documentTranslation/components/RetrieveFilesList.vue +++ b/jero-web/src/views/documentTools/documentTranslation/components/RetrieveFilesList.vue @@ -257,7 +257,9 @@ serialNumber: this.selectedRowKeysRecord[0].serial_number, title: this.selectedRowKeysRecord[0].title, fileName: this.selectedRowKeysRecord[0].file_name, - textStatus: this.selectedRowKeysRecord[0].text_info_id + textStatus: this.selectedRowKeysRecord[0].text_info_id, + sourceFileId:this.selectedRowKeysRecord[0].id, + bussDocumentLibraryId:this.selectedRowKeysRecord[0].buss_document_library_id } this.confirmLoading = true postAction('/docTranslation/docTranslationEO/add', query).then((res) => { diff --git a/jero-web/src/views/documentTools/documentTranslation/index.vue b/jero-web/src/views/documentTools/documentTranslation/index.vue index 367a303da..6f8d6ced2 100644 --- a/jero-web/src/views/documentTools/documentTranslation/index.vue +++ b/jero-web/src/views/documentTools/documentTranslation/index.vue @@ -148,6 +148,7 @@ pageNo: 1, queryParam: {}, userInfoQuery: {}, + selectedRowKeysRecord: [], columns: [ { title: this.$t('standard'), @@ -269,8 +270,9 @@ } }) }, - onSelectChange(value) { + onSelectChange(value, record) { this.selectedRowKeys = value + this.selectedRowKeysRecord = record }, viewClick(row) { let newUrl = this.$router.resolve({ @@ -322,16 +324,27 @@ this.$confirm({ content: _this.$t('ConfirmBatchDeletion'), onOk() { - let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys)) - deleteAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => { - if (res.success) { - _this.$message.success(_this.$t('OperationSuccessful')) - _this.selectedRowKeys = [] - _this.getList() - } else { - _this.$message.warning(res.message) + let idList = [] + let selectedRowKeysRecord = JSON.parse(JSON.stringify(_this.selectedRowKeysRecord)) + for (let i = 0; i < selectedRowKeysRecord.length; i++) { + if (selectedRowKeysRecord[i].createBy == _this.userInfo().username && + selectedRowKeysRecord[i].releaseCondition == 'draft') { + idList.push(selectedRowKeysRecord[i].id) } - }) + } + if (idList.length > 0) { + deleteAction(_this.url.deleteBatch, { ids: idList.join(',') }).then((res) => { + if (res.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.selectedRowKeys = [] + _this.getList() + } else { + _this.$message.warning(res.message) + } + }) + } else { + _this.$message.warning(_this.$t('doNotHavePermissionDeleteData')) + } } }) } else { From f0d12ff4b4a4f4a7f7e3d33a15246a22650117c7 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Wed, 27 Jul 2022 13:58:17 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/documentTranslationResults.vue | 148 +++++------------- .../documentTranslation/index.vue | 7 +- 2 files changed, 49 insertions(+), 106 deletions(-) diff --git a/jero-web/src/views/documentTools/documentTranslation/components/documentTranslationResults.vue b/jero-web/src/views/documentTools/documentTranslation/components/documentTranslationResults.vue index 0247520ec..ae67c40a1 100644 --- a/jero-web/src/views/documentTools/documentTranslation/components/documentTranslationResults.vue +++ b/jero-web/src/views/documentTools/documentTranslation/components/documentTranslationResults.vue @@ -16,52 +16,11 @@ {{$t('originalText')}}
- 汽车用LED前照灯 - - 1 范围 - - 本标准规定了汽车用LED光源/模块或含有LED光源/模块的前照灯配光性能、光色、温度循环等试验方法和检验规则等, - 本标准适用于M、N类汽车使用的LED前照灯、或主要由LED光源或LED模块形成远光或近光的LED前照灯。 - - 2 规范性引用文件 - - 下列文件中的条款,通过本标准的引用而成为本标准的条款,凡是注日期的引用文件,其随后所有的修改单(不包括勘误的内容)或修订版均不适用于本标准,然而,鼓励根据本标准达成协议的各方研究是否可使用这些文件的最新版本。凡是不注日期的引用文件,其最新版本适用于本标准. - GB 4599—2007 汽车用灯丝灯泡前照灯 - GB 4785 汽车及挂车外部照明和光信号装置的安装规定 - GB/T 7922 照明光源颜色的测量方法 - GB 15766.1 道路机动车辆灯丝灯泡 尺寸、光电性能要求 - - 3 术语和定义 - - GB 4599—2007和GB 4785中确立的,以及下列术语和定义适用于本标准占 - 3. 1 - 目标光通量: objective luminous flux - 可更换光源或光源模块光通量的设计值。 - 3.2 - 光源失效 failure of light source - LED或LED模块在正常使用条件下,一个或多个LED失去发光功能、变暗、色度超标、或出现闪烁的现象。 - 3.3 - LED 模块 LED module - 仅含有LED的光源模块。 - - 4 前照灯的不同型式 - - 在以下主要方面有差异的前照灯: - ——商品名称或商标; - ——光学系统的特性; - ——通过反射、折射、吸收和/或工作时的变形,改变光学效果的部件; - ——提供的光束种类(近光,远光或远、近光); - ——配光镜及其涂层的材料; - - - ——LED光源/模块类型和参数(电压、功率、光通量、色度、显色性九 - 5 要求 - 5.1 一般要求 - 5.1. 1 LED前照灯应设计和制造成在正常使用条件下,即使受到振动,仍能保证满足使用要求和符合本标准规定。 - 5.1.2 LED前照灯应具有良好的散热性,防止LED光源热堆积,LED前照灯即使在低温凝冻的环境下仍能正常工作, - 5.1.3 LED前照灯应具有良好的电磁兼容性能。 - 5.1.4 当前照灯装有LED光源或LED模块时其性能均应满足本标准要求;当LED前照灯中装有灯丝灯泡或HID光源实现远光或近光功能时,其配光性能和检测应分别满足其相应标准的要求, - 5.1.5 前照灯应具有光束调整装置,当近光灯和远光灯形成一组合体,并各自装有LED光源/模块、灯丝灯泡(或灯光组)时,调整装置应能对它们分别进行调整,这些要求不适用于远光灯和近光灯不能单独调节的前照灯, +
@@ -69,64 +28,7 @@ {{$t('translatedText')}}
- LED headlamp for automobile - one Range - This standard specifies the test methods and inspection rules for light distribution performance, light - color, temperature cycle, etc. of automotive LED light source / module or headlamp containing LED light - source / module, - This standard is applicable to LED headlamps used by M and N vehicles, or LED headlamps that mainly form - high beam or low beam by LED light source or LED module. - two Normative references - The provisions in the following documents become the provisions of this standard through the reference of - this standard. For dated references, all subsequent amendments (excluding the contents of Corrigendum) or - revisions are not applicable to this standard. However, parties to agreements based on this standard are - encouraged to study whether the latest versions of these documents can be used. For undated references, - the latest edition is applicable to this standard - GB 4599—2007 Automotive filament bulb headlamps - GB 4785 Provisions for the installation of exterior lighting and light signalling devices for automobiles - and trailers - GB/T 7922 Methods of measuring the color of lighting sources - GB 15766.1 Requirements for dimensions and photoelectric performance of filament bulbs for road motor - vehicles - three Terms and definitions - The terms and definitions established in GB 4599-2007 and GB 4785 and the following terms and definitions - are applicable to this standard - 3. 1 - Objective luminous flux - Design value of luminous flux of replaceable light source or light source module. - three point two - Failure of light source - Under normal use conditions of LED or LED module, one or more LEDs lose light-emitting function, darken, - chromaticity exceeds the standard, or flicker. - three point three - LED module - Light source module with led only. - four Different types of headlamps - Headlamps that differ in the following main respects: - ——Trade name or trademark; - ——Characteristics of optical system; - ——Components that change the optical effect through reflection, refraction, absorption and / or - deformation during operation; - ——Type of beam provided (low beam, high beam or high beam and low beam); - ——Materials of lens and its coating; - ——LED light source / module type and parameters (voltage, power, luminous flux, chromaticity, color - rendering IX - five requirement - five point one general requirements - 5.1. one The LED headlamp shall be designed and manufactured to ensure that it can meet the use - requirements and comply with the provisions of this standard even if it is vibrated under normal - conditions of use. - 5.1.2 The LED headlamp shall have good heat dissipation to prevent thermal accumulation of LED light - source. The LED headlamp can work normally even in the low-temperature freezing environment, - 5.1.3 LED headlamp shall have good electromagnetic compatibility performance. - 5.1.4 When the headlamp is equipped with LED light source or LED module, its performance shall meet the - requirements of this standard; When the LED headlamp is equipped with filament bulb or HID light source to - realize the function of high beam or low beam, its Photometric Performance and detection shall meet the - requirements of corresponding standards respectively, - 5.1.5 The headlamp shall have a beam adjustment device. When the dipped beam and the high beam form a - combination and each is equipped with an LED light source / module and a filament bulb (or light group), - the adjustment device shall be able to adjust them respectively. These requirements do not apply to - headlamps where the high beam and the low beam cannot be adjusted separately, +
@@ -136,18 +38,42 @@