Просмотр исходного кода

Merge branch 'master' of http://62.234.61.92:3000/wjm/mec-cloud_IntelligentManufacturing_CRM

lph 1 год назад
Родитель
Сommit
281ff811cb

+ 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();
+            }
+        }
+    }
+
+}

+ 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>
-
-

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

@@ -16,7 +16,6 @@
             :key="item.value"
             :label="item.name"
             :value="item.id"
-            :rules="rules"
           >
           </el-option>
         </el-select>
@@ -47,7 +46,7 @@ export default {
         teamId: "",
       },
       rules: {
-        teamId: [{ required: true, trigger: "change" }],
+        teamId: [{ required: true, message: '请选择班组',trigger: "change" }],
       },
     };
   },

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

@@ -118,7 +118,7 @@
         prop="downloadTime"
       >
         <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" /> -->