Kaynağa Gözat

Merge remote-tracking branch 'origin/master'

侯茂昌 1 yıl önce
ebeveyn
işleme
da2cdab846
24 değiştirilmiş dosya ile 1158 ekleme ve 617 silme
  1. 19 10
      zkqy-admin/src/main/java/com/zkqy/ZkqyApplication.java
  2. 294 0
      zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysEngineeringController.java
  3. 1 1
      zkqy-common/src/main/java/com/zkqy/common/core/domain/entity/SysDictType.java
  4. 156 0
      zkqy-system/src/main/java/com/zkqy/system/domain/SysEngineering.java
  5. 61 0
      zkqy-system/src/main/java/com/zkqy/system/mapper/SysEngineeringMapper.java
  6. 61 0
      zkqy-system/src/main/java/com/zkqy/system/service/ISysEngineeringService.java
  7. 96 0
      zkqy-system/src/main/java/com/zkqy/system/service/impl/SysEngineeringServiceImpl.java
  8. 111 0
      zkqy-system/src/main/resources/mapper/system/SysEngineeringMapper.xml
  9. 131 79
      zkqy-system/src/main/resources/mapper/system/SysMenuMapper.xml
  10. 0 372
      zkqy-system/src/main/resources/mapper/system/SysMenuMapper12312.xml
  11. 6 0
      zkqy-system/src/main/resources/mapper/system/SysRoleMapper.xml
  12. 2 2
      zkqy-ui/src/layout/index.vue
  13. 2 0
      zkqy-ui/src/utils/request.js
  14. 3 3
      zkqy-ui/src/views/bpmprocess/scriptManage.vue
  15. 1 1
      zkqy-ui/src/views/bussiness/dialogCompments/Mec/AssignEmployees.vue
  16. 21 15
      zkqy-ui/src/views/bussiness/processMange.vue
  17. 36 27
      zkqy-ui/src/views/bussiness/progressShow.vue
  18. 1 1
      zkqy-ui/src/views/index.vue
  19. 8 6
      zkqy-ui/src/views/login.vue
  20. 130 81
      zkqy-ui/src/views/relateTable/index.vue
  21. 11 12
      zkqy-ui/src/views/system/engineeringManage/index.vue
  22. 4 4
      zkqy-ui/src/views/system/menu/index.vue
  23. 2 2
      zkqy-ui/src/views/system/role/index.vue
  24. 1 1
      zkqy-ui/src/views/system/tenant/dict/index.vue

+ 19 - 10
zkqy-admin/src/main/java/com/zkqy/ZkqyApplication.java

@@ -14,15 +14,24 @@ public class ZkqyApplication {
     public static void main(String[] args) {
         //System.setProperty("spring.devtools.restart.enabled", "false");
         SpringApplication.run(ZkqyApplication.class, args);
-        System.out.println("(♥◠‿◠)ノ゙  若依启动成功   ლ(´ڡ`ლ)゙  \n" +
-                " .-------.       ____     __        \n" +
-                " |  _ _   \\      \\   \\   /  /    \n" +
-                " | ( ' )  |       \\  _. /  '       \n" +
-                " |(_ o _) /        _( )_ .'         \n" +
-                " | (_,_).' __  ___(_ o _)'          \n" +
-                " |  |\\ \\  |  ||   |(_,_)'         \n" +
-                " |  | \\ `'   /|   `-'  /           \n" +
-                " |  |  \\    /  \\      /           \n" +
-                " ''-'   `'-'    `-..-'              ");
+        System.out.println("(♥◠‿◠)ノ゙  CRM工具端启动成功   ლ(´ڡ`ლ)゙  \n" +
+                "                                                                        \n" +
+                "        CCCCCCCCCCCCCRRRRRRRRRRRRRRRRR   MMMMMMMM               MMMMMMMM\n" +
+                "     CCC::::::::::::CR::::::::::::::::R  M:::::::M             M:::::::M\n" +
+                "   CC:::::::::::::::CR::::::RRRRRR:::::R M::::::::M           M::::::::M\n" +
+                "  C:::::CCCCCCCC::::CRR:::::R     R:::::RM:::::::::M         M:::::::::M\n" +
+                " C:::::C       CCCCCC  R::::R     R:::::RM::::::::::M       M::::::::::M\n" +
+                "C:::::C                R::::R     R:::::RM:::::::::::M     M:::::::::::M\n" +
+                "C:::::C                R::::RRRRRR:::::R M:::::::M::::M   M::::M:::::::M\n" +
+                "C:::::C                R:::::::::::::RR  M::::::M M::::M M::::M M::::::M\n" +
+                "C:::::C                R::::RRRRRR:::::R M::::::M  M::::M::::M  M::::::M\n" +
+                "C:::::C                R::::R     R:::::RM::::::M   M:::::::M   M::::::M\n" +
+                "C:::::C                R::::R     R:::::RM::::::M    M:::::M    M::::::M\n" +
+                " C:::::C       CCCCCC  R::::R     R:::::RM::::::M     MMMMM     M::::::M\n" +
+                "  C:::::CCCCCCCC::::CRR:::::R     R:::::RM::::::M               M::::::M\n" +
+                "   CC:::::::::::::::CR::::::R     R:::::RM::::::M               M::::::M\n" +
+                "     CCC::::::::::::CR::::::R     R:::::RM::::::M               M::::::M\n" +
+                "        CCCCCCCCCCCCCRRRRRRRR     RRRRRRRMMMMMMMM               MMMMMMMM\n" +
+                "                                                                        "  );
     }
 }

+ 294 - 0
zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysEngineeringController.java

@@ -0,0 +1,294 @@
+package com.zkqy.web.controller.system;
+
+import java.io.*;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Instant;
+import java.util.*;
+import java.util.stream.Collectors;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.common.config.ZkqyConfig;
+import com.zkqy.common.core.domain.entity.DataSource;
+import com.zkqy.common.core.domain.entity.SysUser;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.SecurityUtils;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
+import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
+import org.apache.commons.compress.utils.IOUtils;
+import org.springframework.core.io.InputStreamResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.system.domain.SysEngineering;
+import com.zkqy.system.service.ISysEngineeringService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody;
+
+/**
+ * 工程部署Controller
+ *
+ * @author zkqy
+ * @date 2024-01-03
+ */
+@RestController
+@RequestMapping("/system/engineering")
+public class SysEngineeringController extends BaseController
+{
+    @Autowired
+    private ISysEngineeringService sysEngineeringService;
+
+/**
+ * 查询工程部署列表
+ */
+@PreAuthorize("@ss.hasPermi('system:engineering:list')")
+@GetMapping("/list")
+@ApiOperation(value = "查询工程部署列表")
+    public TableDataInfo list(SysEngineering sysEngineering)
+    {
+        startPage();
+        List<SysEngineering> list = sysEngineeringService.selectSysEngineeringList(sysEngineering);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出工程部署列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:engineering:export')")
+    @Log(title = "工程部署", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出工程部署列表")
+    public void export(HttpServletResponse response, SysEngineering sysEngineering)
+    {
+        List<SysEngineering> list = sysEngineeringService.selectSysEngineeringList(sysEngineering);
+        ExcelUtil<SysEngineering> util = new ExcelUtil<SysEngineering>(SysEngineering.class);
+        util.exportExcel(response, list, "工程部署数据");
+    }
+
+    /**
+     * 获取工程部署详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:engineering:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取工程部署详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(sysEngineeringService.selectSysEngineeringById(id));
+    }
+
+    /**
+     * 新增工程部署
+     */
+    @PreAuthorize("@ss.hasPermi('system:engineering:add')")
+    @Log(title = "工程部署", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增工程部署")
+    public AjaxResult add(@RequestBody SysEngineering sysEngineering)
+    {
+        return toAjax(sysEngineeringService.insertSysEngineering(sysEngineering));
+    }
+
+    /**
+     * 修改工程部署
+     */
+    @PreAuthorize("@ss.hasPermi('system:engineering:edit')")
+    @Log(title = "工程部署", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改工程部署")
+    public AjaxResult edit(@RequestBody SysEngineering sysEngineering)
+    {
+        return toAjax(sysEngineeringService.updateSysEngineering(sysEngineering));
+    }
+
+    /**
+     * 删除工程部署
+     */
+    @PreAuthorize("@ss.hasPermi('system:engineering:remove')")
+    @Log(title = "工程部署", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除工程部署")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(sysEngineeringService.deleteSysEngineeringByIds(ids));
+    }
+
+    /**
+     * 下载压缩包
+     */
+    @GetMapping("/download")
+    public ResponseEntity<StreamingResponseBody> downloadZip() {
+
+        // 指定要打包的文件或目录路径
+        String sourceFilePath = ZkqyConfig.getUploadPath() + "/engineeringdownload/";
+
+        File dir = new File(sourceFilePath);
+        // 判断文件夹路径是否存在,不存在创建
+        if (!dir.exists()){
+            boolean isCreated = dir.mkdirs();
+            if (!isCreated) {
+                System.out.println("目录 '" + sourceFilePath + "' 创建失败.");
+            }
+        }
+
+        //当前用户数据源信息
+        DataSource datasourceInfo = SecurityUtils.getDatasourceInfo();
+        //导出数据库集合
+        Set<String> databaseList = new LinkedHashSet<>();
+        databaseList.add("ry-vue-call");
+//        databaseList.add("zkqy-template");
+//        databaseList.add("zkqy-call");
+        databaseList.add(datasourceInfo.getDatabaseName());
+        //将sql文件导出到指定目录下
+        exportMultipleDatabasesToLocal(databaseList,sourceFilePath,datasourceInfo);
+
+        //下载成功插入数据
+        SysUser sysUser = SecurityUtils.getLoginUser().getUser();
+        SysEngineering sysEngineering = new SysEngineering();
+        sysEngineering.setCreateTime(DateUtils.getNowDate());
+        sysEngineering.setDownloadTime(DateUtils.getNowDate());
+        sysEngineering.setEngineeringName(sysUser.getTenantName() + "-mes");
+        sysEngineeringService.insertSysEngineering(sysEngineering);
+
+        String zipFileName = new Date().getTime()+".zip";
+        HttpHeaders headers = new HttpHeaders();
+        headers.add(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + zipFileName + "\"");
+        headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
+
+        return ResponseEntity.ok()
+                .headers(headers)
+                .contentType(MediaType.APPLICATION_OCTET_STREAM)
+                .body(outputStream -> {
+                    try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(Paths.get(sourceFilePath));
+                         ZipOutputStream zipOut = new ZipOutputStream(outputStream)) {
+
+                        addFilesToZipRecursively(zipOut, Paths.get(sourceFilePath), directoryStream);
+
+                    } catch (IOException e) {
+                        throw new RuntimeException("Failed to create the ZIP stream.", e);
+                    }
+                });
+
+    }
+
+    private void addFilesToZipRecursively(ZipOutputStream zipOut, Path rootPath, DirectoryStream<Path> dirStream) throws IOException {
+        for (Path filePath : dirStream) {
+            if (Files.isDirectory(filePath)) {
+                // 添加目录条目到ZIP
+                String entryName = filePath.toString().substring(rootPath.toString().length() + 1) + "/";
+                zipOut.putNextEntry(new ZipEntry(entryName));
+                zipOut.closeEntry();
+
+                // 递归处理子目录中的文件
+                try (DirectoryStream<Path> subDirStream = Files.newDirectoryStream(filePath)) {
+                    addFilesToZipRecursively(zipOut, rootPath, subDirStream);
+                }
+            } else if (Files.isRegularFile(filePath)) {
+                // 添加文件到ZIP
+                String entryName = filePath.toString().substring(rootPath.toString().length() + 1);
+                zipOut.putNextEntry(new ZipEntry(entryName));
+
+                try (InputStream fileIn = Files.newInputStream(filePath)) {
+                    byte[] buffer = new byte[4096];
+                    int read;
+                    while ((read = fileIn.read(buffer)) != -1) {
+                        zipOut.write(buffer, 0, read);
+                    }
+                }
+
+                zipOut.closeEntry();
+            }
+        }
+    }
+
+    /**
+     * 导出数据库文件
+     */
+    public void exportMultipleDatabasesToLocal(Set<String> databaseNames, String outputPath, DataSource dataSource){
+        outputPath = outputPath + "sql/";
+
+        File dir = new File(outputPath);
+        // 判断文件夹路径是否存在,不存在创建
+        if (!dir.exists()){
+            boolean isCreated = dir.mkdirs();
+            if (!isCreated) {
+                System.out.println("目录 '" + outputPath + "' 创建失败.");
+            }
+        }
+        for (String databaseName : databaseNames){
+            try {
+                // 构建命令参数列表
+                List<String> cmd = new ArrayList<>();
+                cmd.add("mysqldump");
+                cmd.add("--column-statistics=0");
+                cmd.add("-h");
+                cmd.add(dataSource.getDatabaseIp());
+                cmd.add("-u");
+                cmd.add(dataSource.getUsername());
+                cmd.add("-p" + dataSource.getPassword());
+                cmd.add(databaseName);
+
+                ProcessBuilder pb = new ProcessBuilder(cmd);
+                // 设置MySQL bin目录到PATH环境变量,确保mysqldump可执行文件能找到
+//                Map<String, String> env = pb.environment();
+//                env.put("PATH", env.get("PATH") + File.pathSeparator + "D:\\software\\installpath\\mysql-8.0.20\\mysql-8.0.20-winx64\\bin");
+
+                // 创建进程并获取输出流
+                Process process = pb.start();
+
+                // 将mysqldump的输出重定向到文件
+                OutputStream outStream = new FileOutputStream(Paths.get(outputPath+databaseName+".sql").toFile());
+                InputStream processOutput = process.getInputStream();
+                byte[] buffer = new byte[4096];
+                int read;
+                while ((read = processOutput.read(buffer)) != -1) {
+                    outStream.write(buffer, 0, read);
+                }
+                outStream.close();
+                processOutput.close();
+
+                // 获取错误流,并打印或处理任何错误信息
+                InputStream errorStream = process.getErrorStream();
+                BufferedReader errorReader = new BufferedReader(new InputStreamReader(errorStream));
+                String line;
+                while ((line = errorReader.readLine()) != null) {
+                    System.err.println(line);
+                }
+                errorReader.close();
+                errorStream.close();
+
+                // 等待进程结束并检查退出码
+                int exitCode = process.waitFor();
+                if (exitCode == 0) {
+                    System.out.println("数据库备份成功,导出文件: " + outputPath);
+                } else {
+                    System.err.println("mysqldump命令执行失败,退出代码: " + exitCode);
+                }
+
+            } catch (IOException | InterruptedException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+}

+ 1 - 1
zkqy-common/src/main/java/com/zkqy/common/core/domain/entity/SysDictType.java

@@ -58,7 +58,7 @@ public class SysDictType extends BaseEntity
 
     @NotBlank(message = "字典类型不能为空")
     @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
-    @Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头,且只能为(小写字母,数字,下线)")
+    @Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头,且只能为(小写字母,数字,下线)")
     public String getDictType()
     {
         return dictType;

+ 156 - 0
zkqy-system/src/main/java/com/zkqy/system/domain/SysEngineering.java

@@ -0,0 +1,156 @@
+package com.zkqy.system.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zkqy.common.annotation.Excel;
+
+/**
+ * 工程部署对象 sys_engineering
+ * 
+ * @author zkqy
+ * @date 2024-01-03
+ */
+public class SysEngineering extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 */
+    private Long id;
+
+    /** 工程key */
+    @Excel(name = "工程key")
+    private String engineeringKey;
+
+    /** 工程名称 */
+    @Excel(name = "工程名称")
+    private String engineeringName;
+
+    /** 下载次数 */
+    @Excel(name = "下载次数")
+    private Long downloadNumber;
+
+    /** 下载时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "下载时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date downloadTime;
+
+    /** 租户编号 */
+    @Excel(name = "租户编号")
+    private Long tenantId;
+
+    /** 是否删除(0:否;2:是) */
+    private String delFlag;
+
+    /** 创建者ID */
+    @Excel(name = "创建者ID")
+    private Long createById;
+
+    /** 更新者ID */
+    @Excel(name = "更新者ID")
+    private Long updateById;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setEngineeringKey(String engineeringKey) 
+    {
+        this.engineeringKey = engineeringKey;
+    }
+
+    public String getEngineeringKey() 
+    {
+        return engineeringKey;
+    }
+    public void setEngineeringName(String engineeringName) 
+    {
+        this.engineeringName = engineeringName;
+    }
+
+    public String getEngineeringName() 
+    {
+        return engineeringName;
+    }
+    public void setDownloadNumber(Long downloadNumber) 
+    {
+        this.downloadNumber = downloadNumber;
+    }
+
+    public Long getDownloadNumber() 
+    {
+        return downloadNumber;
+    }
+    public void setDownloadTime(Date downloadTime) 
+    {
+        this.downloadTime = downloadTime;
+    }
+
+    public Date getDownloadTime() 
+    {
+        return downloadTime;
+    }
+    public void setTenantId(Long tenantId) 
+    {
+        this.tenantId = tenantId;
+    }
+
+    public Long getTenantId() 
+    {
+        return tenantId;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("engineeringKey", getEngineeringKey())
+            .append("engineeringName", getEngineeringName())
+            .append("downloadNumber", getDownloadNumber())
+            .append("downloadTime", getDownloadTime())
+            .append("tenantId", getTenantId())
+            .append("remark", getRemark())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createById", getCreateById())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateById", getUpdateById())
+            .append("updateTime", getUpdateTime())
+            .toString();
+    }
+}

+ 61 - 0
zkqy-system/src/main/java/com/zkqy/system/mapper/SysEngineeringMapper.java

@@ -0,0 +1,61 @@
+package com.zkqy.system.mapper;
+
+import java.util.List;
+import com.zkqy.system.domain.SysEngineering;
+
+/**
+ * 工程部署Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-01-03
+ */
+public interface SysEngineeringMapper 
+{
+    /**
+     * 查询工程部署
+     * 
+     * @param id 工程部署主键
+     * @return 工程部署
+     */
+    public SysEngineering selectSysEngineeringById(Long id);
+
+    /**
+     * 查询工程部署列表
+     * 
+     * @param sysEngineering 工程部署
+     * @return 工程部署集合
+     */
+    public List<SysEngineering> selectSysEngineeringList(SysEngineering sysEngineering);
+
+    /**
+     * 新增工程部署
+     * 
+     * @param sysEngineering 工程部署
+     * @return 结果
+     */
+    public int insertSysEngineering(SysEngineering sysEngineering);
+
+    /**
+     * 修改工程部署
+     * 
+     * @param sysEngineering 工程部署
+     * @return 结果
+     */
+    public int updateSysEngineering(SysEngineering sysEngineering);
+
+    /**
+     * 删除工程部署
+     * 
+     * @param id 工程部署主键
+     * @return 结果
+     */
+    public int deleteSysEngineeringById(Long id);
+
+    /**
+     * 批量删除工程部署
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysEngineeringByIds(Long[] ids);
+}

+ 61 - 0
zkqy-system/src/main/java/com/zkqy/system/service/ISysEngineeringService.java

@@ -0,0 +1,61 @@
+package com.zkqy.system.service;
+
+import java.util.List;
+import com.zkqy.system.domain.SysEngineering;
+
+/**
+ * 工程部署Service接口
+ * 
+ * @author zkqy
+ * @date 2024-01-03
+ */
+public interface ISysEngineeringService 
+{
+    /**
+     * 查询工程部署
+     * 
+     * @param id 工程部署主键
+     * @return 工程部署
+     */
+    public SysEngineering selectSysEngineeringById(Long id);
+
+    /**
+     * 查询工程部署列表
+     * 
+     * @param sysEngineering 工程部署
+     * @return 工程部署集合
+     */
+    public List<SysEngineering> selectSysEngineeringList(SysEngineering sysEngineering);
+
+    /**
+     * 新增工程部署
+     * 
+     * @param sysEngineering 工程部署
+     * @return 结果
+     */
+    public int insertSysEngineering(SysEngineering sysEngineering);
+
+    /**
+     * 修改工程部署
+     * 
+     * @param sysEngineering 工程部署
+     * @return 结果
+     */
+    public int updateSysEngineering(SysEngineering sysEngineering);
+
+    /**
+     * 批量删除工程部署
+     * 
+     * @param ids 需要删除的工程部署主键集合
+     * @return 结果
+     */
+    public int deleteSysEngineeringByIds(Long[] ids);
+
+    /**
+     * 删除工程部署信息
+     * 
+     * @param id 工程部署主键
+     * @return 结果
+     */
+    public int deleteSysEngineeringById(Long id);
+}

+ 96 - 0
zkqy-system/src/main/java/com/zkqy/system/service/impl/SysEngineeringServiceImpl.java

@@ -0,0 +1,96 @@
+package com.zkqy.system.service.impl;
+
+import java.util.List;
+import com.zkqy.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.system.mapper.SysEngineeringMapper;
+import com.zkqy.system.domain.SysEngineering;
+import com.zkqy.system.service.ISysEngineeringService;
+
+/**
+ * 工程部署Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-01-03
+ */
+@Service
+public class SysEngineeringServiceImpl implements ISysEngineeringService 
+{
+    @Autowired
+    private SysEngineeringMapper sysEngineeringMapper;
+
+    /**
+     * 查询工程部署
+     * 
+     * @param id 工程部署主键
+     * @return 工程部署
+     */
+    @Override
+    public SysEngineering selectSysEngineeringById(Long id)
+    {
+        return sysEngineeringMapper.selectSysEngineeringById(id);
+    }
+
+    /**
+     * 查询工程部署列表
+     * 
+     * @param sysEngineering 工程部署
+     * @return 工程部署
+     */
+    @Override
+    public List<SysEngineering> selectSysEngineeringList(SysEngineering sysEngineering)
+    {
+        return sysEngineeringMapper.selectSysEngineeringList(sysEngineering);
+    }
+
+    /**
+     * 新增工程部署
+     * 
+     * @param sysEngineering 工程部署
+     * @return 结果
+     */
+    @Override
+    public int insertSysEngineering(SysEngineering sysEngineering)
+    {
+        sysEngineering.setCreateTime(DateUtils.getNowDate());
+        return sysEngineeringMapper.insertSysEngineering(sysEngineering);
+    }
+
+    /**
+     * 修改工程部署
+     * 
+     * @param sysEngineering 工程部署
+     * @return 结果
+     */
+    @Override
+    public int updateSysEngineering(SysEngineering sysEngineering)
+    {
+        sysEngineering.setUpdateTime(DateUtils.getNowDate());
+        return sysEngineeringMapper.updateSysEngineering(sysEngineering);
+    }
+
+    /**
+     * 批量删除工程部署
+     * 
+     * @param ids 需要删除的工程部署主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysEngineeringByIds(Long[] ids)
+    {
+        return sysEngineeringMapper.deleteSysEngineeringByIds(ids);
+    }
+
+    /**
+     * 删除工程部署信息
+     * 
+     * @param id 工程部署主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysEngineeringById(Long id)
+    {
+        return sysEngineeringMapper.deleteSysEngineeringById(id);
+    }
+}

+ 111 - 0
zkqy-system/src/main/resources/mapper/system/SysEngineeringMapper.xml

@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.zkqy.system.mapper.SysEngineeringMapper">
+    
+    <resultMap type="SysEngineering" id="SysEngineeringResult">
+        <result property="id"    column="id"    />
+        <result property="engineeringKey"    column="engineering_key"    />
+        <result property="engineeringName"    column="engineering_name"    />
+        <result property="downloadNumber"    column="download_number"    />
+        <result property="downloadTime"    column="download_time"    />
+        <result property="tenantId"    column="tenant_id"    />
+        <result property="remark"    column="remark"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectSysEngineeringVo">
+        select id, engineering_key, engineering_name, download_number, download_time, tenant_id, remark, del_flag, create_by, create_by_id, create_time, update_by, update_by_id, update_time from sys_engineering
+    </sql>
+
+    <select id="selectSysEngineeringList" parameterType="SysEngineering" resultMap="SysEngineeringResult">
+        <include refid="selectSysEngineeringVo"/>
+        <where>  
+            <if test="engineeringKey != null  and engineeringKey != ''"> and engineering_key = #{engineeringKey}</if>
+            <if test="engineeringName != null  and engineeringName != ''"> and engineering_name like concat('%', #{engineeringName}, '%')</if>
+            <if test="downloadNumber != null "> and download_number = #{downloadNumber}</if>
+            <if test="downloadTime != null "> and download_time = #{downloadTime}</if>
+            <if test="tenantId != null "> and tenant_id = #{tenantId}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+        </where>
+        order by download_time desc
+    </select>
+    
+    <select id="selectSysEngineeringById" parameterType="Long" resultMap="SysEngineeringResult">
+        <include refid="selectSysEngineeringVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertSysEngineering" parameterType="SysEngineering">
+        insert into sys_engineering
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="engineeringKey != null">engineering_key,</if>
+            <if test="engineeringName != null">engineering_name,</if>
+            <if test="downloadNumber != null">download_number,</if>
+            <if test="downloadTime != null">download_time,</if>
+            <if test="tenantId != null">tenant_id,</if>
+            <if test="remark != null">remark,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateTime != null">update_time,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="engineeringKey != null">#{engineeringKey},</if>
+            <if test="engineeringName != null">#{engineeringName},</if>
+            <if test="downloadNumber != null">#{downloadNumber},</if>
+            <if test="downloadTime != null">#{downloadTime},</if>
+            <if test="tenantId != null">#{tenantId},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSysEngineering" parameterType="SysEngineering">
+        update sys_engineering
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="engineeringKey != null">engineering_key = #{engineeringKey},</if>
+            <if test="engineeringName != null">engineering_name = #{engineeringName},</if>
+            <if test="downloadNumber != null">download_number = #{downloadNumber},</if>
+            <if test="downloadTime != null">download_time = #{downloadTime},</if>
+            <if test="tenantId != null">tenant_id = #{tenantId},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSysEngineeringById" parameterType="Long">
+        delete from sys_engineering where id = #{id}
+    </delete>
+
+    <delete id="deleteSysEngineeringByIds" parameterType="String">
+        delete from sys_engineering where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 131 - 79
zkqy-system/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -29,11 +29,11 @@
 	</resultMap>
 
 	<sql id="selectMenuVo">
-        select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time 
+		select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
 		from sys_menu
-    </sql>
-    
-    <select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
+	</sql>
+
+	<select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
 		SELECT
 		m.menu_id,
 		m.menu_name,
@@ -57,44 +57,94 @@
 		LEFT JOIN sys_tenant t on t.tenant_id = u.tenant_id
 		where
 		m.menu_id not in (select DISTINCT menu_id from sys_tenant_menu)
-			<if test="menuName != null and menuName != ''">
-				AND m.menu_name like concat('%', #{menuName}, '%')
-			</if>
-			<if test="visible != null and visible != ''">
-				AND m.visible = #{visible}
-			</if>
-			<if test="status != null and status != ''">
-				AND m.status = #{status}
-			</if>
-			<if test="tenantName != null and tenantName != ''">
-				AND t.tenant_name like concat('%', #{tenantName}, '%')
-			</if>
+		<if test="menuName != null and menuName != ''">
+			AND m.menu_name like concat('%', #{menuName}, '%')
+		</if>
+		<if test="visible != null and visible != ''">
+			AND m.visible = #{visible}
+		</if>
+		<if test="status != null and status != ''">
+			AND m.status = #{status}
+		</if>
+		<if test="tenantName != null and tenantName != ''">
+			AND t.tenant_name like concat('%', #{tenantName}, '%')
+		</if>
 		order by parent_id, order_num
 	</select>
 
 	<select id="selectTenantMenuList" parameterType="Long" resultMap="SysMenuResult">
 		select m.menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time, tm.`tenant_id`
 		from sys_menu m
-		left join sys_tenant_menu tm on tm.menu_id = m.menu_id
+				 left join sys_tenant_menu tm on tm.menu_id = m.menu_id
 		where tm.tenant_id = #{tenantId}
+		  and m.menu_name not in ('数据引擎','流程引擎','表单引擎','门户引擎')
+		  and parent_id not in (select menu_id from  sys_menu where menu_name in ("数据引擎","流程引擎","表单引擎","门户引擎"))
 		order by parent_id, order_num
+
 	</select>
-	
+
 	<select id="selectMenuTreeAll" resultMap="SysMenuResult">
 		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
 		from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
-		and m.menu_id not in (select DISTINCT menu_id from sys_tenant_menu)
+						  and m.menu_id not in (select DISTINCT menu_id from sys_tenant_menu)
 		order by m.parent_id, m.order_num
 	</select>
 
 	<select id="selectTenantMenuTreeAll" parameterType="Long" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+		select distinct m.menu_id,
+						m.parent_id,
+						m.menu_name,
+						m.path,
+						m.component,
+						m.`query`,
+						m.visible,
+						m.status,
+						ifnull(m.perms, '') as perms,
+						m.is_frame,
+						m.is_cache,
+						m.menu_type,
+						m.icon,
+						m.order_num,
+						m.create_time
 		from sys_tenant_menu tm
-		left join sys_menu m on tm.menu_id = m.menu_id
-		where m.menu_type in ('M', 'C') and m.status = 0 and tm.tenant_id = #{tenantId}
-		order by m.parent_id, m.order_num
+				 left join sys_menu m on
+			tm.menu_id = m.menu_id
+		where m.menu_type in ('M', 'C')
+		  and m.status = 0
+		  and tm.tenant_id = #{tenantId}
+		  and m.menu_name in ('数据引擎', '流程引擎', '表单引擎','门户引擎')
+
+
+		UNION
+
+
+		select distinct m.menu_id,
+						m.parent_id,
+						m.menu_name,
+						m.path,
+						m.component,
+						m.`query`,
+						m.visible,
+						m.status,
+						ifnull(m.perms, '') as perms,
+						m.is_frame,
+						m.is_cache,
+						m.menu_type,
+						m.icon,
+						m.order_num,
+						m.create_time
+		from sys_tenant_menu tm
+				 left join sys_menu m on
+			tm.menu_id = m.menu_id
+		where m.menu_type in ('M', 'C')
+		  and m.status = 0
+		  and tm.tenant_id = #{tenantId}
+		  and m.parent_id in (select menu_id
+							  from sys_menu
+							  where menu_name in ("数据引擎", "流程引擎", "表单引擎","门户引擎"))
+
 	</select>
-	
+
 	<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
 		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time,t.tenant_name
 		from sys_menu m
@@ -105,72 +155,72 @@
 		LEFT JOIN sys_tenant t on t.tenant_id = u.tenant_id
 		where ur.user_id = #{params.userId}
 		<if test="menuName != null and menuName != ''">
-            AND m.menu_name like concat('%', #{menuName}, '%')
+			AND m.menu_name like concat('%', #{menuName}, '%')
 		</if>
 		<if test="visible != null and visible != ''">
-            AND m.visible = #{visible}
+			AND m.visible = #{visible}
 		</if>
 		<if test="status != null and status != ''">
-            AND m.status = #{status}
+			AND m.status = #{status}
 		</if>
 		<if test="tenantName != null and tenantName != ''">
 			AND t.tenant_name like concat('%', #{tenantName}, '%')
 		</if>
 		order by m.parent_id, m.order_num
 	</select>
-    
-    <select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
+
+	<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
 		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
 		from sys_menu m
-			 left join sys_role_menu rm on m.menu_id = rm.menu_id
-			 left join sys_user_role ur on rm.role_id = ur.role_id
-			 left join sys_role ro on ur.role_id = ro.role_id
-			 left join sys_user u on ur.user_id = u.user_id
+				 left join sys_role_menu rm on m.menu_id = rm.menu_id
+				 left join sys_user_role ur on rm.role_id = ur.role_id
+				 left join sys_role ro on ur.role_id = ro.role_id
+				 left join sys_user u on ur.user_id = u.user_id
 		where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0  AND ro.status = 0
 		order by m.parent_id, m.order_num
 	</select>
-	
+
 	<select id="selectMenuListByRoleId" resultType="Long">
 		select m.menu_id
 		from sys_menu m
-            left join sys_role_menu rm on m.menu_id = rm.menu_id
-        where rm.role_id = #{roleId}
-            <if test="menuCheckStrictly">
-              and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
-            </if>
+		left join sys_role_menu rm on m.menu_id = rm.menu_id
+		where rm.role_id = #{roleId}
+		<if test="menuCheckStrictly">
+			and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
+		</if>
 		order by m.parent_id, m.order_num
 	</select>
-	
+
 	<select id="selectMenuPerms" resultType="String">
 		select distinct m.perms
 		from sys_menu m
-			 left join sys_role_menu rm on m.menu_id = rm.menu_id
-			 left join sys_user_role ur on rm.role_id = ur.role_id
+				 left join sys_role_menu rm on m.menu_id = rm.menu_id
+				 left join sys_user_role ur on rm.role_id = ur.role_id
 	</select>
 
 	<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
 		select distinct m.perms
 		from sys_menu m
-			 left join sys_role_menu rm on m.menu_id = rm.menu_id
-			 left join sys_user_role ur on rm.role_id = ur.role_id
-			 left join sys_role r on r.role_id = ur.role_id
+				 left join sys_role_menu rm on m.menu_id = rm.menu_id
+				 left join sys_user_role ur on rm.role_id = ur.role_id
+				 left join sys_role r on r.role_id = ur.role_id
 		where m.status = '0' and r.status = '0' and ur.user_id = #{userId}
 	</select>
-	
+
 	<select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String">
 		select distinct m.perms
 		from sys_menu m
-			 left join sys_role_menu rm on m.menu_id = rm.menu_id
+				 left join sys_role_menu rm on m.menu_id = rm.menu_id
 		where m.status = '0' and rm.role_id = #{roleId}
 	</select>
-	
+
 	<select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult">
 		<include refid="selectMenuVo"/>
 		where menu_id = #{menuId}
 	</select>
-	
+
 	<select id="hasChildByMenuId" resultType="Integer">
-	    select count(1) from sys_menu where parent_id = #{menuId}
+		select count(1) from sys_menu where parent_id = #{menuId}
 	</select>
 
 	<select id="hasChildByMenuIdBatchRemove" resultType="Integer" parameterType="java.util.List">
@@ -180,33 +230,33 @@
 		</foreach>
 	</select>
 
-<!--	<include refid="selectMenuVo"/>-->
+	<!--	<include refid="selectMenuVo"/>-->
 	<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
-        SELECT sys.menu_id,
-        sys.menu_name,
-        sys.parent_id,
-        sys.order_num,
-        sys.path,
-        sys.component,
-        sys.`query`,
-        sys.is_frame,
-        sys.is_cache,
-        sys.menu_type,
-        sys.visible,
-        sys.STATUS,
-        ifnull(sys.perms, '') AS perms,
-        sys.icon,
-        sys.create_time
-        FROM sys_menu AS sys
-        LEFT JOIN sys_tenant_menu AS tenant ON sys.menu_id = tenant.menu_id
-        WHERE sys.menu_name = #{menuName}
-        AND sys.parent_id = #{parentId}
-        <if test="tenantId != null and tenantId != ''">
-            AND tenant.tenant_id = #{tenantId}
-        </if>
-        LIMIT 1
-    </select>
-	
+		SELECT sys.menu_id,
+		sys.menu_name,
+		sys.parent_id,
+		sys.order_num,
+		sys.path,
+		sys.component,
+		sys.`query`,
+		sys.is_frame,
+		sys.is_cache,
+		sys.menu_type,
+		sys.visible,
+		sys.STATUS,
+		ifnull(sys.perms, '') AS perms,
+		sys.icon,
+		sys.create_time
+		FROM sys_menu AS sys
+		LEFT JOIN sys_tenant_menu AS tenant ON sys.menu_id = tenant.menu_id
+		WHERE sys.menu_name = #{menuName}
+		AND sys.parent_id = #{parentId}
+		<if test="tenantId != null and tenantId != ''">
+			AND tenant.tenant_id = #{tenantId}
+		</if>
+		LIMIT 1
+	</select>
+
 	<update id="updateMenu" parameterType="SysMenu">
 		update sys_menu
 		<set>
@@ -269,9 +319,9 @@
 		sysdate()
 		)
 	</insert>
-	
+
 	<delete id="deleteMenuById" parameterType="Long">
-	    delete from sys_menu where menu_id = #{menuId}
+		delete from sys_menu where menu_id = #{menuId}
 	</delete>
 
 	<delete id="batchDeleteMenuById" parameterType="java.util.List">
@@ -317,4 +367,6 @@
 		</foreach>
 	</select>
 
-</mapper> 
+</mapper>
+
+

+ 0 - 372
zkqy-system/src/main/resources/mapper/system/SysMenuMapper12312.xml

@@ -1,372 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-		PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-		"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.zkqy.system.mapper.SysMenuMapper">
-
-	<resultMap type="SysMenu" id="SysMenuResult">
-		<id     property="menuId"         column="menu_id"        />
-		<result property="menuName"       column="menu_name"      />
-		<result property="parentName"     column="parent_name"    />
-		<result property="parentId"       column="parent_id"      />
-		<result property="orderNum"       column="order_num"      />
-		<result property="path"           column="path"           />
-		<result property="component"      column="component"      />
-		<result property="query"          column="query"          />
-		<result property="isFrame"        column="is_frame"       />
-		<result property="isCache"        column="is_cache"       />
-		<result property="menuType"       column="menu_type"      />
-		<result property="visible"        column="visible"        />
-		<result property="status"         column="status"         />
-		<result property="perms"          column="perms"          />
-		<result property="icon"           column="icon"           />
-		<result property="createBy"       column="create_by"      />
-		<result property="createTime"     column="create_time"    />
-		<result property="updateTime"     column="update_time"    />
-		<result property="updateBy"       column="update_by"      />
-		<result property="remark"         column="remark"         />
-		<result property="tenantName"     column="tenant_name"    />
-	</resultMap>
-
-	<sql id="selectMenuVo">
-        select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
-		from sys_menu
-    </sql>
-
-    <select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
-		SELECT
-		m.menu_id,
-		m.menu_name,
-		m.parent_id,
-		m.order_num,
-		m.path,
-		m.component,
-		m.`query`,
-		m.is_frame,
-		m.is_cache,
-		m.menu_type,
-		m.visible,
-		m.STATUS,
-		ifnull( m.perms, '' ) AS perms,
-		m.icon,
-		m.create_time,
-		t.tenant_name
-		FROM
-		sys_menu m
-		LEFT JOIN sys_user u on m.create_by = u.user_name
-		LEFT JOIN sys_tenant t on t.tenant_id = u.tenant_id
-		where
-		m.menu_id not in (select DISTINCT menu_id from sys_tenant_menu)
-			<if test="menuName != null and menuName != ''">
-				AND m.menu_name like concat('%', #{menuName}, '%')
-			</if>
-			<if test="visible != null and visible != ''">
-				AND m.visible = #{visible}
-			</if>
-			<if test="status != null and status != ''">
-				AND m.status = #{status}
-			</if>
-			<if test="tenantName != null and tenantName != ''">
-				AND t.tenant_name like concat('%', #{tenantName}, '%')
-			</if>
-		order by parent_id, order_num
-	</select>
-
-	<select id="selectTenantMenuList" parameterType="Long" resultMap="SysMenuResult">
-		select m.menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time, tm.`tenant_id`
-		from sys_menu m
-		    left join sys_tenant_menu tm on tm.menu_id = m.menu_id
-		where tm.tenant_id = #{tenantId}
-		  and m.menu_name not in ('数据引擎','流程引擎','表单引擎')
-		  and parent_id not in (select menu_id from  sys_menu where menu_name in ("数据引擎","流程引擎","表单引擎"))
-		order by parent_id, order_num
-
-	</select>
-
-	<select id="selectMenuTreeAll" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
-		from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
-		and m.menu_id not in (select DISTINCT menu_id from sys_tenant_menu)
-		order by m.parent_id, m.order_num
-	</select>
-
-	<select id="selectTenantMenuTreeAll" parameterType="Long" resultMap="SysMenuResult">
-        select distinct m.menu_id,
-                        m.parent_id,
-                        m.menu_name,
-                        m.path,
-                        m.component,
-                        m.`query`,
-                        m.visible,
-                        m.status,
-                        ifnull(m.perms, '') as perms,
-                        m.is_frame,
-                        m.is_cache,
-                        m.menu_type,
-                        m.icon,
-                        m.order_num,
-                        m.create_time
-        from sys_tenant_menu tm
-                 left join sys_menu m on
-            tm.menu_id = m.menu_id
-        where m.menu_type in ('M', 'C')
-          and m.status = 0
-          and tm.tenant_id = #{tenantId}
-          and m.menu_name in ('数据引擎', '流程引擎', '表单引擎')
-
-
-        UNION
-
-
-        select distinct m.menu_id,
-                        m.parent_id,
-                        m.menu_name,
-                        m.path,
-                        m.component,
-                        m.`query`,
-                        m.visible,
-                        m.status,
-                        ifnull(m.perms, '') as perms,
-                        m.is_frame,
-                        m.is_cache,
-                        m.menu_type,
-                        m.icon,
-                        m.order_num,
-                        m.create_time
-        from sys_tenant_menu tm
-                 left join sys_menu m on
-            tm.menu_id = m.menu_id
-        where m.menu_type in ('M', 'C')
-          and m.status = 0
-          and tm.tenant_id = #{tenantId}
-          and m.parent_id in (select menu_id
-                              from sys_menu
-                              where menu_name in ("数据引擎", "流程引擎", "表单引擎"))
-
-    </select>
-
-	<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time,t.tenant_name
-		from sys_menu m
-		left join sys_role_menu rm on m.menu_id = rm.menu_id
-		left join sys_user_role ur on rm.role_id = ur.role_id
-		left join sys_role ro on ur.role_id = ro.role_id
-		LEFT JOIN sys_user u on m.create_by = u.user_name
-		LEFT JOIN sys_tenant t on t.tenant_id = u.tenant_id
-		where ur.user_id = #{params.userId}
-		<if test="menuName != null and menuName != ''">
-            AND m.menu_name like concat('%', #{menuName}, '%')
-		</if>
-		<if test="visible != null and visible != ''">
-            AND m.visible = #{visible}
-		</if>
-		<if test="status != null and status != ''">
-            AND m.status = #{status}
-		</if>
-		<if test="tenantName != null and tenantName != ''">
-			AND t.tenant_name like concat('%', #{tenantName}, '%')
-		</if>
-		order by m.parent_id, m.order_num
-	</select>
-
-    <select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
-		from sys_menu m
-			 left join sys_role_menu rm on m.menu_id = rm.menu_id
-			 left join sys_user_role ur on rm.role_id = ur.role_id
-			 left join sys_role ro on ur.role_id = ro.role_id
-			 left join sys_user u on ur.user_id = u.user_id
-		where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0  AND ro.status = 0
-		order by m.parent_id, m.order_num
-	</select>
-
-	<select id="selectMenuListByRoleId" resultType="Long">
-		select m.menu_id
-		from sys_menu m
-            left join sys_role_menu rm on m.menu_id = rm.menu_id
-        where rm.role_id = #{roleId}
-            <if test="menuCheckStrictly">
-              and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
-            </if>
-		order by m.parent_id, m.order_num
-	</select>
-
-	<select id="selectMenuPerms" resultType="String">
-		select distinct m.perms
-		from sys_menu m
-			 left join sys_role_menu rm on m.menu_id = rm.menu_id
-			 left join sys_user_role ur on rm.role_id = ur.role_id
-	</select>
-
-	<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
-		select distinct m.perms
-		from sys_menu m
-			 left join sys_role_menu rm on m.menu_id = rm.menu_id
-			 left join sys_user_role ur on rm.role_id = ur.role_id
-			 left join sys_role r on r.role_id = ur.role_id
-		where m.status = '0' and r.status = '0' and ur.user_id = #{userId}
-	</select>
-
-	<select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String">
-		select distinct m.perms
-		from sys_menu m
-			 left join sys_role_menu rm on m.menu_id = rm.menu_id
-		where m.status = '0' and rm.role_id = #{roleId}
-	</select>
-
-	<select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult">
-		<include refid="selectMenuVo"/>
-		where menu_id = #{menuId}
-	</select>
-
-	<select id="hasChildByMenuId" resultType="Integer">
-	    select count(1) from sys_menu where parent_id = #{menuId}
-	</select>
-
-	<select id="hasChildByMenuIdBatchRemove" resultType="Integer" parameterType="java.util.List">
-		select count(1) from sys_menu where parent_id in
-		<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
-			#{item}
-		</foreach>
-	</select>
-
-<!--	<include refid="selectMenuVo"/>-->
-	<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
-        SELECT sys.menu_id,
-        sys.menu_name,
-        sys.parent_id,
-        sys.order_num,
-        sys.path,
-        sys.component,
-        sys.`query`,
-        sys.is_frame,
-        sys.is_cache,
-        sys.menu_type,
-        sys.visible,
-        sys.STATUS,
-        ifnull(sys.perms, '') AS perms,
-        sys.icon,
-        sys.create_time
-        FROM sys_menu AS sys
-        LEFT JOIN sys_tenant_menu AS tenant ON sys.menu_id = tenant.menu_id
-        WHERE sys.menu_name = #{menuName}
-        AND sys.parent_id = #{parentId}
-        <if test="tenantId != null and tenantId != ''">
-            AND tenant.tenant_id = #{tenantId}
-        </if>
-        LIMIT 1
-    </select>
-
-	<update id="updateMenu" parameterType="SysMenu">
-		update sys_menu
-		<set>
-			<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
-			<if test="parentId != null">parent_id = #{parentId},</if>
-			<if test="orderNum != null">order_num = #{orderNum},</if>
-			<if test="path != null and path != ''">path = #{path},</if>
-			<if test="component != null">component = #{component},</if>
-			<if test="query != null">`query` = #{query},</if>
-			<if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if>
-			<if test="isCache != null and isCache != ''">is_cache = #{isCache},</if>
-			<if test="menuType != null and menuType != ''">menu_type = #{menuType},</if>
-			<if test="visible != null">visible = #{visible},</if>
-			<if test="status != null">status = #{status},</if>
-			<if test="perms !=null">perms = #{perms},</if>
-			<if test="icon !=null and icon != ''">icon = #{icon},</if>
-			<if test="remark != null and remark != ''">remark = #{remark},</if>
-			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
-			update_time = sysdate()
-		</set>
-		where menu_id = #{menuId}
-	</update>
-
-	<insert id="insertMenu" parameterType="SysMenu" useGeneratedKeys="true" keyProperty="menuId">
-		insert into sys_menu(
-		<if test="menuId != null and menuId != 0">menu_id,</if>
-		<if test="parentId != null and parentId != 0">parent_id,</if>
-		<if test="menuName != null and menuName != ''">menu_name,</if>
-		<if test="orderNum != null">order_num,</if>
-		<if test="path != null and path != ''">path,</if>
-		<if test="component != null and component != ''">component,</if>
-		<if test="query != null and query != ''">`query`,</if>
-		<if test="isFrame != null and isFrame != ''">is_frame,</if>
-		<if test="isCache != null and isCache != ''">is_cache,</if>
-		<if test="menuType != null and menuType != ''">menu_type,</if>
-		<if test="visible != null">visible,</if>
-		<if test="status != null">status,</if>
-		<if test="perms !=null and perms != ''">perms,</if>
-		<if test="icon != null and icon != ''">icon,</if>
-		<if test="remark != null and remark != ''">remark,</if>
-		<if test="createBy != null and createBy != ''">create_by,</if>
-		create_time
-		)values(
-		<if test="menuId != null and menuId != 0">#{menuId},</if>
-		<if test="parentId != null and parentId != 0">#{parentId},</if>
-		<if test="menuName != null and menuName != ''">#{menuName},</if>
-		<if test="orderNum != null">#{orderNum},</if>
-		<if test="path != null and path != ''">#{path},</if>
-		<if test="component != null and component != ''">#{component},</if>
-		<if test="query != null and query != ''">#{query},</if>
-		<if test="isFrame != null and isFrame != ''">#{isFrame},</if>
-		<if test="isCache != null and isCache != ''">#{isCache},</if>
-		<if test="menuType != null and menuType != ''">#{menuType},</if>
-		<if test="visible != null">#{visible},</if>
-		<if test="status != null">#{status},</if>
-		<if test="perms !=null and perms != ''">#{perms},</if>
-		<if test="icon != null and icon != ''">#{icon},</if>
-		<if test="remark != null and remark != ''">#{remark},</if>
-		<if test="createBy != null and createBy != ''">#{createBy},</if>
-		sysdate()
-		)
-	</insert>
-
-	<delete id="deleteMenuById" parameterType="Long">
-	    delete from sys_menu where menu_id = #{menuId}
-	</delete>
-
-	<delete id="batchDeleteMenuById" parameterType="java.util.List">
-		delete from sys_menu where menu_id in
-		<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
-			#{item}
-		</foreach>
-	</delete>
-
-	<select id="getMenuList" resultMap="SysMenuResult">
-		SELECT
-			m.menu_id,
-			m.menu_name,
-			m.parent_id,
-			m.order_num,
-			m.path,
-			m.component,
-			m.`query`,
-			m.is_frame,
-			m.is_cache,
-			m.menu_type,
-			m.visible,
-			m.STATUS,
-			ifnull( m.perms, '' ) AS perms,
-			m.icon,
-			m.create_time
-		FROM
-			sys_menu m
-				join sys_tenant_menu tm on m.menu_id = tm.menu_id
-		where m.menu_type != 'F' and m.STATUS = '0' and tm.tenant_id = #{tenantId}
-	</select>
-
-	<select id="selectMenuByPath" parameterType="string" resultMap="SysMenuResult">
-		<include refid="selectMenuVo"/>
-		where path = #{path}
-	</select>
-
-	<select id="selectMenusByIds" resultMap="SysMenuResult">
-		<include refid="selectMenuVo"></include>
-		where menu_id in
-		<foreach collection="list" item="id" open="(" close=")" separator=",">
-			#{id}
-		</foreach>
-	</select>
-
-</mapper>
-
-

+ 6 - 0
zkqy-system/src/main/resources/mapper/system/SysRoleMapper.xml

@@ -57,6 +57,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<if test="tenantId != null and tenantId != 0">
 			AND r.tenant_id = #{tenantId}
 		</if>
+		<if test="tenantId == null">
+			and r.tenant_id is null
+		</if>
+		<if test="tenantName != null and tenantName != ''">
+			and t.tenant_name like concat('%', #{tenantName}, '%')
+		</if>
 		<!-- 数据范围过滤 -->
 		${params.dataScope}
 		order by r.role_sort

+ 2 - 2
zkqy-ui/src/layout/index.vue

@@ -5,8 +5,8 @@
       <el-row>
         <el-col :span="12">
           <span>
-            <!-- <img src="../assets/images/mec_logo1.png" alt="" class="imgg" /> -->
-            <img src="../assets/images/comlo.png" alt="" class="imgg" />
+            <img src="../assets/images/mec_logo1.png" alt="" class="imgg" />
+            <!-- <img src="../assets/images/comlo.png" alt="" class="imgg" /> -->
           </span>
         </el-col>
         <el-col :span="4" :offset="8">

+ 2 - 0
zkqy-ui/src/utils/request.js

@@ -94,8 +94,10 @@ service.interceptors.response.use(res => {
     }
     return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
   } else if (code === 500) {
+    console.log(msg);
     Message({ message: msg, type: 'error' })
     return Promise.reject(new Error(msg))
+    // return Promise.resolve()
   } else if (code === 601) {
     Message({ message: msg, type: 'warning' })
     return Promise.reject('error')

+ 3 - 3
zkqy-ui/src/views/bpmprocess/scriptManage.vue

@@ -393,9 +393,9 @@ export default {
         industryType: [
           { required: true, message: "请选择脚本类型", trigger: "change" },
         ],
-        tableName: [
-          { required: true, message: "请选择数据表", trigger: "change" },
-        ],
+        // tableName: [
+        //   { required: true, message: "请选择数据表", trigger: "change" },
+        // ],
       },
 
       // 代码编辑器相关数据

+ 1 - 1
zkqy-ui/src/views/bussiness/dialogCompments/Mec/AssignEmployees.vue

@@ -46,7 +46,7 @@ export default {
         teamId: "",
       },
       rules: {
-        teamId: [{ required: true, trigger: "change" }],
+        teamId: [{ required: true, message: '请选择班组',trigger: "change" }],
       },
     };
   },

+ 21 - 15
zkqy-ui/src/views/bussiness/processMange.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="process-mange-wrap">
     <!-- <el-card shadow="always" :body-style="{ padding: '20px' }"> -->
-    <el-row>
-      <el-col :xs="24" :md="8" :xl="8" class="col" v-show="false">
+    <el-row v-show="false">
+      <el-col :xs="24" :md="8" :xl="8" class="col">
         <div class="statistic-wrap">
           <div class="discription">
             <span class="title">我的处理</span>
-            <span class="sub-title">需要我处理的管道</span>
+            <span class="sub-title">需要我处理的流程</span>
           </div>
           <span class="data">{{ tableData.length }}</span>
         </div>
@@ -14,8 +14,8 @@
       <el-col :xs="24" :md="8" :xl="8" class="col">
         <div class="statistic-wrap">
           <div class="discription">
-            <span class="title">其它处理</span>
-            <span class="sub-title">需要其他人处理的管道</span>
+            <span class="title">已完成</span>
+            <span class="sub-title">已完成的</span>
           </div>
           <span class="data">0</span>
         </div>
@@ -36,7 +36,7 @@
         <h3 class="header">管道列表</h3>
         <div class="search-list">
           <div class="search-tab">
-            <el-radio-group v-model="taskType">
+            <el-radio-group v-model="taskType" v-show="false">
               <el-radio-button :label="1">我的处理</el-radio-button>
               <el-radio-button :label="2">其他处理</el-radio-button>
             </el-radio-group>
@@ -51,7 +51,11 @@
             </el-radio-group>
           </div>
           <div class="search-input">
-            <el-input placeholder="请输入..." v-model="queryString">
+            <el-input
+              placeholder="请输入..."
+              v-model="queryString"
+              @keyup.enter.native="getList"
+            >
               <el-button
                 slot="append"
                 icon="el-icon-search"
@@ -359,15 +363,17 @@ export default {
   methods: {
     // 获取列表数据
     getList() {
-      processList(this.queryParams).then((res) => {
-        if (res.code == 200) {
-          this.tableData = res.rows.map((item) => item.resultMap);
-          this.total = res.total;
-          console.log(this.tableData);
-        } else {
-          this.$message.error("网络异常,请稍后再试");
+      processList({ ...this.queryParams, taskName: this.queryString }).then(
+        (res) => {
+          if (res.code == 200) {
+            this.tableData = res.rows.map((item) => item.resultMap);
+            this.total = res.total;
+            console.log(this.tableData);
+          } else {
+            this.$message.error("网络异常,请稍后再试");
+          }
         }
-      });
+      );
     },
     // 获取表单数据
     async getFormData() {

+ 36 - 27
zkqy-ui/src/views/bussiness/progressShow.vue

@@ -32,7 +32,11 @@
             </el-radio-group>
           </div>
           <div class="search-input">
-            <el-input placeholder="请输入..." v-model="queryString">
+            <el-input
+              placeholder="请输入..."
+              v-model="queryString"
+              @keyup.enter.native="getList"
+            >
               <el-button
                 slot="append"
                 @click="getList"
@@ -43,12 +47,15 @@
         </div>
       </div>
       <div class="show-body">
-        <TaskList
-          v-for="(item, index) of tableData"
-          :key="index + 1"
-          :num="index + 1"
-          :cardData="item"
-        ></TaskList>
+        <template v-if="tableData.length > 0">
+          <TaskList
+            v-for="(item, index) of tableData"
+            :key="index + 1"
+            :num="index + 1"
+            :cardData="item"
+          ></TaskList>
+        </template>
+        <el-empty v-else description="暂无数据"></el-empty>
         <pagination
           v-show="total > 0"
           :total="total"
@@ -87,27 +94,29 @@ export default {
   methods: {
     // 获取列表数据
     getList() {
-      getListLog(this.queryParams).then((res) => {
-        if (res.code == 200) {
-          this.tableData = this.getTableData(
-            res.rows.map((item) => item.resultMap)
-          );
-          console.log(this.tableData);
-          this.total = res.total;
-        } else {
-          this.$message.error("网络异常,请稍后再试");
-        }
+      getListLog({ ...this.queryParams, taskName: this.queryString }).then(
+        (res) => {
+          if (res.code == 200) {
+            this.tableData = this.getTableData(
+              res.rows.map((item) => item.resultMap)
+            );
+            console.log(this.tableData);
+            this.total = res.total;
+          } else {
+            this.$message.error("网络异常,请稍后再试");
+          }
 
-        return;
-        if (res.code == 200) {
-          this.tableData = this.getTableData(
-            res.rows.map((item) => item.resultMap)
-          );
-          this.total = res.total;
-        } else {
-          this.$message.error("网络异常,请稍后再试");
+          return;
+          if (res.code == 200) {
+            this.tableData = this.getTableData(
+              res.rows.map((item) => item.resultMap)
+            );
+            this.total = res.total;
+          } else {
+            this.$message.error("网络异常,请稍后再试");
+          }
         }
-      });
+      );
     },
     // 获取表格展示数据
     getTableData(dataList) {
@@ -115,7 +124,7 @@ export default {
       res = dataList.map((item) => {
         let baseObj = {
           benTaskProcessKey: item.taskKey, //任务编号
-          bepTaskName: item.taskName, //任务名称
+          bepTaskName: item.taskPlanName, //任务名称
           benCreateTime: item.nodeLogList[0].taskNodeType
             ? item.nodeLogList[0].createTime
             : "", //开始或结束时间  需要根据bepTaskProcessState状态 来判定

+ 1 - 1
zkqy-ui/src/views/index.vue

@@ -55,7 +55,7 @@
       <div class="name">{{ nickName }}</div>
       <div class="tenant-name">{{ tenantName }}</div>
       <div class="date">{{ date }}</div>
-      <div class="title">欢迎登录CALL智能制造平台</div>
+      <div class="title">欢迎登录Mec OS 工业应用操作系统</div>
     </div>
   </div>
 </template>

+ 8 - 6
zkqy-ui/src/views/login.vue

@@ -10,8 +10,8 @@
         <el-col :span="12" class="comlogo"></el-col>
         <el-col :span="12">
           <div class="grid-content bg-purple-dark title">
-            <!-- 工业应用操作系统 -->
-            智能制造平台
+            工业应用操作系统
+            <!-- 智能制造平台 -->
           </div></el-col
         >
       </el-row>
@@ -171,8 +171,10 @@ export default {
     return {
       codeUrl: "",
       loginForm: {
-        username: "admin",
-        password: "admin123",
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
         rememberMe: false,
         code: "",
         uuid: "",
@@ -352,8 +354,8 @@ export default {
   margin-top: 57px;
   width: 194px;
   height: 64px;
-  // background: url(../assets/images/mec_logo_login.png);
-  background: url(../assets/images/comp.png);
+  background: url(../assets/images/mec_logo_login.png);
+  // background: url(../assets/images/comp.png);
   /* box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.25); */
   opacity: 1;
 }

+ 130 - 81
zkqy-ui/src/views/relateTable/index.vue

@@ -276,7 +276,9 @@
                 :label="item.tableComment"
                 :value="item.tableName"
               >
-                <span style="float: left">{{ item.tableComment }}</span>
+                <span class="discribe" style="float: left">{{
+                  item.tableComment
+                }}</span>
                 <span style="float: right; color: #8492a6; font-size: 13px">{{
                   item.tableName
                 }}</span>
@@ -772,6 +774,7 @@ export default {
         delete this.conditionDefault[this.isSearchIndex];
       }
       this.isSearchDialog = status;
+      console.log(111, this.relyFileds);
       this.conditionDefaultValueMap = "";
     },
     // 添加依赖字段取消
@@ -783,9 +786,11 @@ export default {
     },
     isSearchBtn() {
       if (this.relyOption == 0) {
+        //自定义依赖值
         this.conditionDefault[this.isSearchIndex] =
           this.conditionDefaultValueMap;
       } else {
+        console.log(this.tableDataList, this.editIndex);
         if (this.tableDataList.length !== 0) {
           this.relyFileds.tableName =
             this.tableDataList[this.editIndex - 1]?.dtTableName;
@@ -796,7 +801,7 @@ export default {
           "." +
           this.conditionDefaultValueMap;
       }
-
+      console.log(this.conditionDefault);
       this.isSearchDialog = false;
       this.conditionDefaultValueMap = "";
       this.relyFileds.tableName = "";
@@ -1054,89 +1059,119 @@ export default {
           }
           let echoData = {};
           // 判断修改还是新增
+
+          echoData = {
+            tableName: this.tableItemForm.tableName,
+            tableFieldData: this.tableFieldList,
+          };
+          console.log(echoData);
+          let tableKey = uuidv4();
+          let sqlKey = uuidv4();
+
+          this.relyFileds.tableFieldList = this.tableFieldList;
+          this.relyFileds.tableName = this.tableItemForm.tableName;
+          this.tableItemForm.rowId = Date.now();
+          let newTableData = {
+            //收集到的表格编辑结果
+            dtName: this.tableItemForm.title,
+            dtTableName: this.tableItemForm.tableName,
+            rowId: this.tableItemForm.rowId,
+            selectFields: this.tableItemForm.selectFields,
+            orderByColumn: this.tableItemForm.orderByColumn,
+            timeFormate: this.tableItemForm.timeFormate,
+            primaryKey: this.tableItemForm.selectFields,
+            rowId: this.tableItemForm.rowId,
+            tId: this.tId,
+            tableKey: tableKey,
+            sortOrder: this.tableItemForm.isAsc,
+            sqlKey: sqlKey,
+            dtColumnName: columns,
+            // timeFormat: "yyyy-MM-dd",
+            searchFieldList: searchFieldList,
+            conditionDefaultValueMap: this.conditionDefault,
+            tableSql: this.getSQLStr(),
+            tableExportField: "",
+            echoData: JSON.stringify(echoData),
+          };
           if (this.relateTitle) {
-            echoData = {
-              tableName: this.tableItemForm.tableName,
-              tableFieldData: this.tableFieldList,
-            };
-            console.log(echoData);
-            let tableKey = uuidv4();
-            let sqlKey = uuidv4();
+            this.tableDataList.push(newTableData);
+          } else {
+            this.$set(this.tableDataList, this.editIndex, newTableData);
+          }
 
-            this.relyFileds.tableFieldList = this.tableFieldList;
-            this.relyFileds.tableName = this.tableItemForm.tableName;
-            this.tableItemForm.rowId = Date.now();
+          // 选择依赖字段
+          this.groupList.push({
+            tableFieldList: this.tableFieldList,
+            tableItemForm: this.tableItemForm,
+            conditionDefaultValueMap: this.conditionDefaultValueMap,
+          });
 
-            this.tableDataList.push({
-              dtName: this.tableItemForm.title,
-              dtTableName: this.tableItemForm.tableName,
-              rowId: this.tableItemForm.rowId,
-              selectFields: this.tableItemForm.selectFields,
-              orderByColumn: this.tableItemForm.orderByColumn,
-              timeFormate: this.tableItemForm.timeFormate,
-              primaryKey: this.tableItemForm.selectFields,
+          if (this.groupTitle) {
+            this.addDragData.push({
               rowId: this.tableItemForm.rowId,
               tId: this.tId,
+              dtName: this.tableItemForm.title,
               tableKey: tableKey,
+              dtTableName: this.tableItemForm.tableName,
+              primaryKey: this.tableItemForm.selectFields,
+              orderByColumn: this.tableItemForm.orderByColumn,
               sortOrder: this.tableItemForm.isAsc,
               sqlKey: sqlKey,
               dtColumnName: columns,
-              timeFormat: "yyyy-MM-dd",
+              timeFormate: this.tableItemForm.timeFormate,
               searchFieldList: searchFieldList,
               conditionDefaultValueMap: this.conditionDefault,
               tableSql: this.getSQLStr(),
               tableExportField: "",
               echoData: JSON.stringify(echoData),
             });
+          }
 
-            // 选择依赖字段
-            this.groupList.push({
-              tableFieldList: this.tableFieldList,
-              tableItemForm: this.tableItemForm,
-              conditionDefaultValueMap: this.conditionDefaultValueMap,
-            });
+          // echoData = {
+          //   tableName: this.tableItemForm.tableName,
+          //   tableFieldData: this.tableFieldList,
+          // };
+          // console.log("123456", echoData);
+          // this.tableDataList.forEach((item, index) => {
+          //   console.log(item, this.tableItemForm);
+          //   if (item.tId == this.tableItemForm.tId) {
+          //     item.conditionDefaultValueMap = this.conditionDefault;
+          //     console.log(this.conditionDefault);
+          //     item.echoData = JSON.stringify(echoData);
+          //     item.sortOrder = this.tableItemForm.isAsc;
+          //     item.orderByColumn = this.tableItemForm.orderByColumn;
+          //     item.primaryKey = this.tableItemForm.selectFields;
+          //     item.dtTableName = this.tableItemForm.tableName;
+          //     item.dtName = this.tableItemForm.title;
+          //     item.dtColumnName = JSON.stringify(columns);
+          //     item.searchFieldList = searchFieldList;
+          //   }
+          // });
+          // console.log("保存表格信息", this.tableDataList, this.editIndex);
+          // this.tableDataList[this.editIndex] = {
+          //   iconditionDefaultValueMap: this.conditionDefault,
+          //   echoData: JSON.stringify(echoData),
+          //   sortOrder: this.tableItemForm.isAsc,
+          //   orderByColumn: this.tableItemForm.orderByColumn,
+          //   primaryKey: this.tableItemForm.selectFields,
+          //   dtTableName: this.tableItemForm.tableName,
+          //   dtName: this.tableItemForm.title,
+          //   dtColumnName: JSON.stringify(columns),
+          //   searchFieldList: searchFieldList,
+          // };
 
-            if (this.groupTitle) {
-              this.addDragData.push({
-                rowId: this.tableItemForm.rowId,
-                tId: this.tId,
-                dtName: this.tableItemForm.title,
-                tableKey: tableKey,
-                dtTableName: this.tableItemForm.tableName,
-                primaryKey: this.tableItemForm.selectFields,
-                orderByColumn: this.tableItemForm.orderByColumn,
-                sortOrder: this.tableItemForm.isAsc,
-                sqlKey: sqlKey,
-                dtColumnName: columns,
-                timeFormat: "yyyy-MM-dd",
-                searchFieldList: searchFieldList,
-                conditionDefaultValueMap: this.conditionDefault,
-                tableSql: this.getSQLStr(),
-                tableExportField: "",
-                echoData: JSON.stringify(echoData),
-              });
-            }
-          } else {
-            echoData = {
-              tableName: this.tableItemForm.tableName,
-              tableFieldData: this.tableFieldList,
-            };
-            console.log("123456", echoData);
-            this.tableDataList.forEach((item, index) => {
-              if (item.tId == this.tableItemForm.tId) {
-                item.conditionDefaultValueMap = this.conditionDefault;
-                console.log(this.conditionDefault);
-                item.echoData = JSON.stringify(echoData);
-                item.sortOrder = this.tableItemForm.isAsc;
-                item.orderByColumn = this.tableItemForm.orderByColumn;
-                item.primaryKey = this.tableItemForm.selectFields;
-                item.dtTableName = this.tableItemForm.tableName;
-                item.dtName = this.tableItemForm.title;
-                item.dtColumnName = JSON.stringify(columns);
-                item.searchFieldList = searchFieldList;
-              }
-            });
-          }
+          // this.$set(this.tableDataList, this.editIndex, {
+          //   iconditionDefaultValueMap: this.conditionDefault,
+          //   echoData: JSON.stringify(echoData),
+          //   sortOrder: this.tableItemForm.isAsc,
+          //   orderByColumn: this.tableItemForm.orderByColumn,
+          //   primaryKey: this.tableItemForm.selectFields,
+          //   dtTableName: this.tableItemForm.tableName,
+          //   dtName: this.tableItemForm.title,
+          //   dtColumnName: JSON.stringify(columns),
+          //   searchFieldList: searchFieldList,
+          //   timeFormate: this.tableItemForm.timeFormate,
+          // });
           this.isShowForm = false;
           echoData = {};
           this.tableItemForm = {};
@@ -1177,19 +1212,24 @@ export default {
         this.tableFieldList = echoData.tableFieldData;
         this.tableItemForm.tId = row.tId;
         this.tableItemForm.rowId = row.tableKey;
-        this.tableItemForm.isAsc = false;
+        console.log(typeof row.sortOrder);
+        this.$set(this.tableItemForm, "isAsc", row.sortOrder);
+        // this.tableItemForm.isAsc = row.sortOrder;
         this.tableItemForm.orderByColumn = row.orderByColumn;
         this.tableItemForm.title = row.dtName;
         this.tableItemForm.tableName = row.dtTableName;
         this.tableItemForm.selectFields = row.primaryKey;
-        this.tableItemForm.timeFormate = row.timeFormat;
+        this.tableItemForm.timeFormate = row.timeFormate;
       } else {
-        (this.tableItemForm.rowId = row.rowId),
-          (this.tableItemForm.title = row.dtName);
+        this.tableItemForm.rowId = row.rowId; //未知字段
+        this.tableItemForm.title = row.dtName;
         this.tableItemForm.selectFields = row.selectFields;
         this.tableItemForm.tableName = row.dtTableName;
         this.tableItemForm.orderByColumn = row.orderByColumn;
-        this.tableItemForm.timeFormate = row.timeFormat;
+        this.tableItemForm.timeFormate = row.timeFormate;
+        // this.tableItemForm.isAsc = row.sortOrder;
+        this.$set(this.tableItemForm, "isAsc", row.sortOrder);
+        this.tableItemForm.selectFields = row.primaryKey;
 
         this.getList();
         this.groupList.forEach((item) => {
@@ -1615,6 +1655,7 @@ export default {
     },
     // 新增一个联动表格
     addOneTable() {
+      this.editIndex = this.tableDataList.length;
       this.relateTitle = true;
       if (this.relateTitle) {
         this.tableItemForm = {};
@@ -1623,15 +1664,16 @@ export default {
       }
       if (!this.groupTitle) {
         // console.log(this.tableDataList[this.tableDataList.length-1].dtTableName)
-
+        console.log(this.relyFileds, this.groupTitle);
         this.relyFileds.tableName =
-          this.tableDataList[this.tableDataList.length - 1].dtTableName;
-
-        let echoData = JSON.parse(
-          this.tableDataList[this.tableDataList.length - 1].echoData
-        );
-
-        this.relyFileds.tableFieldList = echoData.tableFieldData;
+          this.tableDataList[this.tableDataList.length - 1]?.dtTableName;
+        if (this.tableDataList[this.tableDataList.length - 1]?.echoData) {
+          //是否有需要回显的数据
+          let echoData = JSON.parse(
+            this.tableDataList[this.tableDataList.length - 1]?.echoData
+          );
+          this.relyFileds.tableFieldList = echoData.tableFieldData;
+        }
       }
       this.getAllTable();
       // 注意校验最后一条数据是否合法
@@ -1658,6 +1700,13 @@ export default {
 };
 </script>
 <style scoped lang="scss">
+.discribe {
+  display: block;
+  max-width: 200px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
 ::v-deep .el-dialog:not(.is-fullscreen) {
   width: 900px !important;
 }

+ 11 - 12
zkqy-ui/src/views/system/engineeringManage/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form
+    <!-- <el-form
       :model="queryParams"
       ref="queryForm"
       size="small"
@@ -36,10 +36,10 @@
           >重置
         </el-button>
       </el-form-item>
-    </el-form>
+    </el-form> -->
 
     <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
           type="primary"
           plain
@@ -84,10 +84,10 @@
           v-hasPermi="['system:engineering:export']"
           >导出
         </el-button>
-      </el-col>
+      </el-col> -->
       <el-col :span="1.5">
         <el-button
-          type="info"
+          type="primary"
           plain
           icon="el-icon-download"
           size="mini"
@@ -108,26 +108,25 @@
       @selection-change="handleSelectionChange"
     >
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="编号" align="center" prop="id" />
+      <!-- <el-table-column label="编号" align="center" prop="id" /> -->
       <!-- <el-table-column label="工程key" align="center" prop="engineeringKey" /> -->
       <el-table-column label="工程名称" align="center" prop="engineeringName" />
-      <el-table-column label="下载次数" align="center" prop="downloadNumber" />
+      <!-- <el-table-column label="下载次数" align="center" prop="downloadNumber" /> -->
       <el-table-column
         label="下载时间"
         align="center"
         prop="downloadTime"
-        width="180"
       >
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.downloadTime, "{y}-{m}-{d}") }}</span>
+          <span>{{ parseTime(scope.row.downloadTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="更新时间" align="center" prop="updateTime" />
+      <!-- <el-table-column label="更新时间" align="center" prop="updateTime" /> -->
       <!-- <el-table-column label="租户编号" align="center" prop="tenantId" />
       <el-table-column label="备注" align="center" prop="remark" />
       <el-table-column label="创建者ID" align="center" prop="createById" />
       <el-table-column label="更新者ID" align="center" prop="updateById" /> -->
-      <el-table-column
+      <!-- <el-table-column
         label="操作"
         align="center"
         class-name="small-padding fixed-width"
@@ -161,7 +160,7 @@
             </el-dropdown-menu>
           </el-dropdown>
         </template>
-      </el-table-column>
+      </el-table-column> -->
     </el-table>
 
     <pagination

+ 4 - 4
zkqy-ui/src/views/system/menu/index.vue

@@ -15,14 +15,14 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="租户名称" prop="tenantName">
+      <!-- <el-form-item label="租户名称" prop="tenantName">
         <el-input
           v-model="queryParams.tenantName"
           placeholder="请输入租户名称"
           clearable
           @keyup.enter.native="handleQuery"
         />
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="状态" prop="status">
         <el-select
           v-model="queryParams.status"
@@ -126,12 +126,12 @@
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
       </el-table-column>
-      <el-table-column
+      <!-- <el-table-column
         prop="tenantName"
         label="租户名称"
         v-if="$store.state.user.name == 'admin'"
         :show-overflow-tooltip="true"
-      ></el-table-column>
+      ></el-table-column> -->
       <el-table-column
         label="操作"
         align="center"

+ 2 - 2
zkqy-ui/src/views/system/role/index.vue

@@ -16,7 +16,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="租户名称" prop="tenantName">
+      <!-- <el-form-item label="租户名称" prop="tenantName">
         <el-input
           v-model="queryParams.tenantName"
           placeholder="请输入租户名称"
@@ -24,7 +24,7 @@
           style="width: 240px"
           @keyup.enter.native="handleQuery"
         />
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="权限字符" prop="roleKey">
         <el-input
           v-model="queryParams.roleKey"

+ 1 - 1
zkqy-ui/src/views/system/tenant/dict/index.vue

@@ -78,7 +78,7 @@
           >新增</el-button
         >
       </el-col>
-      <el-col :span="1.5">
+      <el-col :span="1.5" v-show="false">
         <el-button
           type="success"
           plain