zenglf
2023-08-18 a693d3897dc9739dee07e4f15dd5eeb086f4d9ab
设备管理代码提交
已修改18个文件
512 ■■■■■ 文件已修改
lxzn-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-boot-base-core/src/main/java/org/jeecg/common/system/vo/LoginUser.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-boot-base-core/src/main/java/org/jeecg/common/util/DateUtils.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-boot-base-core/src/main/java/org/jeecg/common/util/oss/OssBootUtil.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/EquipmentMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-api/lxzn-system-cloud-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-api/lxzn-system-cloud-api/src/main/java/org/jeecg/common/system/api/fallback/SysBaseAPIFallback.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-api/lxzn-system-local-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUploadController.java 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDepartMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysDepartMapper.xml 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/ISysDepartService.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java 189 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-start/pom.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-start/src/main/resources/application-dev.yml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-module-system/lxzn-system-start/src/main/resources/application.yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lxzn-boot-base-core/src/main/java/org/jeecg/common/constant/CommonConstant.java
@@ -134,6 +134,18 @@
    String STATUS_1 = "1";
    
    /**
     * 是否默认((0:是,1:否))
     */
    String DEFAULT_0 = "0";
    String DEFAULT_1 = "1";
    /**
     * 供应商类型(1:外部单位,2:内部单位))
     */
    String SUPPLIERTYPE_1 = "1";
    String SUPPLIERTYPE_2 = "2";
   /**
     * 同步工作流引擎1同步0不同步
     */
    Integer ACT_SYNC_1 = 1;
lxzn-boot-base-core/src/main/java/org/jeecg/common/system/vo/LoginUser.java
@@ -129,5 +129,12 @@
    /**设备id uniapp推送用*/
    private String clientId;
    /**企业Id*/
    private String enterpriseId;
    /**
     * 所属组织id
     */
    private String departId;
}
lxzn-boot-base-core/src/main/java/org/jeecg/common/util/DateUtils.java
@@ -8,6 +8,7 @@
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.TimeZone;
import org.jeecg.common.constant.SymbolConstant;
import org.springframework.util.StringUtils;
@@ -63,7 +64,25 @@
            return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        }
    };
    public static ThreadLocal<SimpleDateFormat> hoursAndMinutes = new ThreadLocal<SimpleDateFormat>() {
        @Override
        protected SimpleDateFormat initialValue() {
            return new SimpleDateFormat("HH:mm:ss");
        }
    };
    public static ThreadLocal<SimpleDateFormat> monthFormat = new ThreadLocal<SimpleDateFormat>() {
        @Override
        protected SimpleDateFormat initialValue() {
            return new SimpleDateFormat("yyyy-MM");
        }
    };
    public static ThreadLocal<SimpleDateFormat> yearFormat = new ThreadLocal<SimpleDateFormat>() {
        @Override
        protected SimpleDateFormat initialValue() {
            return new SimpleDateFormat("yyyy");
        }
    };
    /**
     * 以毫秒表示的时间
     */
@@ -670,7 +689,13 @@
        calendar.setTime(getDate());
        return calendar.get(Calendar.YEAR);
    }
    public static String getDayStr(Date date) {
        Calendar calendar = getCalendar();
        calendar.setTime(date);// 把当前时间赋给日历
        int day = calendar.get(Calendar.DATE);// 获取日
        String dayStr = day < 10 ? "0" + day : day + "";
        return dayStr;
    }
    /**
     * 将字符串转成时间
     * @param str
@@ -684,4 +709,50 @@
        return null;
    }
    /**
     * 获取指定时间之后的几天 qsw
     */
    public static Date getDayAfter(Date data,int number) {
        Calendar c = Calendar.getInstance();
        c.setTime(data);
        c.add(Calendar.DAY_OF_MONTH, number);
        Date afterTime = c.getTime();
//        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//        String resultDate = f.format(afterTime);
        return afterTime;
    }
    /**
     * 获取指定时间之后的几分钟 qsw
     */
    public static Date getMinAfter(Date data,int number) {
        Calendar c = Calendar.getInstance();
        c.setTime(data);
        c.add(Calendar.MINUTE, number);
        Date afterTime = c.getTime();
        return afterTime;
    }
    /**
     * 获取指定时间之后的几小时 qsw
     */
    public static Date getHourAfter(Date data,int number) {
        Calendar c = Calendar.getInstance();
        c.setTime(data);
        c.add(Calendar.HOUR_OF_DAY, number);
        Date afterTime = c.getTime();
        return afterTime;
    }
    public static String getCurrentDateStr() {
        Date date = new Date();
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        dateFormat.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));// 设置北京时区
        return dateFormat.format(date);
    }
}
lxzn-boot-base-core/src/main/java/org/jeecg/common/util/oss/OssBootUtil.java
@@ -4,6 +4,7 @@
import com.aliyun.oss.OSSClient;
import com.aliyun.oss.common.auth.DefaultCredentialProvider;
import com.aliyun.oss.model.CannedAccessControlList;
import com.aliyun.oss.model.GetObjectRequest;
import com.aliyun.oss.model.OSSObject;
import com.aliyun.oss.model.PutObjectResult;
import lombok.extern.slf4j.Slf4j;
@@ -212,6 +213,17 @@
        return filePath;
    }
    public static InputStream download(String key) {
        initOss(endPoint, accessKeyId, accessKeySecret);
        // 下载OSS文件到本地文件。如果指定的本地文件存在会覆盖,不存在则新建。
        // ossClient.getObject(new GetObjectRequest(bucketName, key), new File());
        OSSObject object = ossClient.getObject(new GetObjectRequest(bucketName, key));
        // 关闭OSSClient
//        ossClient.shutdown();
        return object.getObjectContent();
    }
    /**
     * 删除文件
     * @param url
@@ -371,4 +383,6 @@
        log.info("------replacePrefix---替换后---objectName:{}",objectName);
        return objectName;
    }
}
lxzn-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
@@ -106,11 +106,18 @@
        filterChainDefinitionMap.put("/**/*.css", "anon");
        filterChainDefinitionMap.put("/**/*.html", "anon");
        filterChainDefinitionMap.put("/**/*.svg", "anon");
        filterChainDefinitionMap.put("/**/*.SVG", "anon");
        filterChainDefinitionMap.put("/**/*.pdf", "anon");
        filterChainDefinitionMap.put("/**/*.PDF", "anon");
        filterChainDefinitionMap.put("/**/*.jpg", "anon");
        filterChainDefinitionMap.put("/**/*.JPG", "anon");
        filterChainDefinitionMap.put("/**/*.png", "anon");
        filterChainDefinitionMap.put("/**/*.PNG", "anon");
        filterChainDefinitionMap.put("/**/*.gif", "anon");
        filterChainDefinitionMap.put("/**/*.GIF", "anon");
        filterChainDefinitionMap.put("/**/*.ico", "anon");
        filterChainDefinitionMap.put("/**/*.ICO", "anon");
        // update-begin--Author:sunjianlei Date:20190813 for:排除字体格式的后缀
        filterChainDefinitionMap.put("/**/*.ttf", "anon");
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/EquipmentMapper.java
@@ -1,6 +1,5 @@
package org.jeecg.modules.mdc.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.mdc.entity.Equipment;
@@ -10,7 +9,7 @@
 * @Date: 2023-03-23
 * @Version: V1.0
 */
@DS("multi-datasource1")
public interface EquipmentMapper extends BaseMapper<Equipment> {
}
lxzn-module-system/lxzn-system-api/lxzn-system-cloud-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java
@@ -194,7 +194,7 @@
     * @return
     */
    @GetMapping("/sys/api/queryAllUser")
    public JSONObject queryAllUser(@RequestParam(name="userIds",required=false)String userIds, @RequestParam(name="pageNo",required=false) Integer pageNo,@RequestParam(name="pageSize",required=false) int pageSize);
    public JSONObject queryAllUser(@RequestParam(name="userIds",required=false)String userIds, @RequestParam(name="pageNo",required=false) Integer pageNo,@RequestParam(name="pageSize",required=false) Integer pageSize);
    /**
@@ -439,9 +439,9 @@
     * @param ids
     * @return
     */
    @GetMapping("/sys/api/queryDepartsByOrgIds")
    List<JSONObject> queryDepartsByOrgIds(@RequestParam("ids") String ids);
//    @GetMapping("/sys/api/queryDepartsByOrgIds")
//    List<JSONObject> queryDepartsByOrgIds(@RequestParam("ids") String ids);
//
    /**
     * 40发送邮件消息
     * @param email
lxzn-module-system/lxzn-system-api/lxzn-system-cloud-api/src/main/java/org/jeecg/common/system/api/fallback/SysBaseAPIFallback.java
@@ -121,10 +121,20 @@
        return null;
    }
    /**
     * 19分页查询用户 返回JSONObject
     *
     * @param userIds  多个用户id
     * @param pageNo   当前页数
     * @param pageSize 每页条数
     * @return
     */
    @Override
    public JSONObject queryAllUser(String userIds, Integer pageNo, int pageSize) {
    public JSONObject queryAllUser(String userIds, Integer pageNo, Integer pageSize) {
        return null;
    }
    @Override
    public List<ComboModel> queryAllRole(String[] roleIds) {
@@ -303,7 +313,7 @@
        return null;
    }
    @Override
//    @Override
    public List<JSONObject> queryDepartsByOrgIds(String ids) {
        return null;
    }
lxzn-module-system/lxzn-system-api/lxzn-system-local-api/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java
@@ -1,11 +1,16 @@
package org.jeecg.common.system.api;
import com.alibaba.fastjson.JSONObject;
import org.jeecg.common.api.CommonAPI;
import org.jeecg.common.api.dto.DataLogDTO;
import org.jeecg.common.api.dto.OnlineAuthDTO;
import org.jeecg.common.api.dto.message.*;
import org.jeecg.common.system.base.entity.DataVersion;
import org.jeecg.common.system.base.entity.SysUpload;
import org.jeecg.common.system.base.entity.SysUploadRela;
import org.jeecg.common.system.vo.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.Map;
@@ -383,4 +388,56 @@
     * @param userId
     */
    void sendAppChatSocket(String userId);
    List<SysUploadRela> listByBusIdAndBusType(String busId, String busType);
    SysUpload getUploadById(String id);
    boolean saveOrUpdateBatchUploadRela(List<SysUploadRela> sysUploadRelaList);
    boolean  updateBatchUploadById(List<SysUpload> sysUploadList);
    List<SysUpload> batchUploadFile(String fileType, List<MultipartFile> multipartFileList, String description) throws Exception;
    void saveOrUpdateUploadRale(String busId, String busType, String uploadId);
//    Unit getUnitById(id);
    void removeDataVersionByBusinessId(String businessId);
    void removeUploadById(String id);
    void removeUploadRelaById(String id);
    void delSysUploadRelaByBusIdAndBusType(String busId, String busType);
    String getUnitNameById(String unitId);
    String queryDictTextByKey(String dictCode, String key);
    String getVersionStatusByVersionAndBusinessType(Integer version, String businessType);
    void saveDataVersion(DataVersion dataVersion);
    DataVersion getDataVersionByBusinessId(String id);
    void removeDataVersionById(String id);
    String getEnterpriseNameById(String enterpriseId);
    List<DataVersion> getLastDataVersion(String businessType, String enterpriseId, String isLastusable);
    List<DataVersion>  getDataVersionList(String businessType,String enterpriseId,String versionStatus, String version);
    /**根据ids 批量删除 数据版本
     *
     * @param ids
     */
    void removeDataVersionByIds(String ids);
    void updateBatchDataVersion(List<DataVersion> dataVersionList);
    void closeJobByClassName(String className);
}
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/controller/SysUploadController.java
@@ -1,21 +1,30 @@
package org.jeecg.modules.system.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.CommonUtils;
import org.jeecg.common.util.MinioUtil;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.oss.entity.OssFile;
import org.jeecg.modules.oss.service.IOssFileService;
import org.jeecg.common.system.base.entity.SysUpload;
import org.jeecg.modules.system.service.IUploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
/**
 * minio文件上传示例
@@ -27,6 +36,9 @@
public class SysUploadController {
    @Autowired
    private IOssFileService ossFileService;
    @Autowired
    private IUploadService uploadService;
    /**
     * 上传
@@ -65,4 +77,53 @@
        result.setSuccess(true);
        return result;
    }
    @GetMapping(value = "/list")
    public Result<?> list(SysUpload upload, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                          @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
        QueryWrapper<SysUpload> queryWrapper = QueryGenerator.initQueryWrapper(upload, req.getParameterMap());
        Page<SysUpload> page = new Page<SysUpload>(pageNo, pageSize);
        IPage<SysUpload> pageList = uploadService.page(page, queryWrapper);
        return Result.ok(pageList);
    }
    @DeleteMapping(value = "/delete")
    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
        uploadService.removeById(id);
        return Result.ok("删除成功!");
    }
    @DeleteMapping(value = "/deleteBatch")
    public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
        uploadService.removeByIds(Arrays.asList(ids.split(",")));
        return Result.ok("批量删除成功!");
    }
    @PostMapping("/batchUploadFile")
    public Result<?> batchUploadFile(HttpServletRequest request)  {
        // 创建一个通用的多部分解析器
        CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver(request.getSession().getServletContext());
        // 判断 request 是否有文件上传,即多部分请求
        if (multipartResolver.isMultipart(request)) {
            // 转换成多部分request
            MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) request;
            List<MultipartFile> files = multiRequest.getFiles("files[]");
            String type = multiRequest.getParameter("type");
            String description = multiRequest.getParameter("description");
            try {
                List<SysUpload> sysUploads = uploadService.batchUploadFile(type, files, description);
                return Result.ok(sysUploads);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
        return Result.error("操作失败");
    }
    @GetMapping("/downloadFile")
    public void downloadFile(@RequestParam("id") String id, HttpServletResponse response) {
        uploadService.downloadFile(response, uploadService.getById(id));
    }
}
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysDepartMapper.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.common.system.vo.SelectTreeModel;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.model.SysDepartTreeModel;
import org.jeecg.modules.system.model.TreeModel;
@@ -90,4 +91,8 @@
     */
    @Select("SELECT * FROM sys_depart where del_flag ='0' AND parent_id = #{parentId,jdbcType=VARCHAR}")
    List<SysDepart> queryDeptByPid(@Param("parentId")String parentId);
    List<SysDepart> getDepartListByParentId(List<String> parentIds);
    List<SelectTreeModel> getDepartTreeByParentId(String parentId);
}
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysDepartMapper.xml
@@ -51,4 +51,35 @@
    <select id="queryCompByOrgCode" resultType="org.jeecg.modules.system.entity.SysDepart">
        select * from sys_depart where del_flag = '0' and org_category='1' and org_code= #{orgCode,jdbcType=VARCHAR}
    </select>
    <select id="getDepartTreeByParentId" parameterType="String" resultType="org.jeecg.common.system.vo.SelectTreeModel">
        select
            id as "key",
            depart_name as "title",
            parent_id as parentId
        from sys_depart
        where parent_id = #{parentId}
          and del_flag='0'
    </select>
    <select id="getDepartListByParentId"  resultType="org.jeecg.modules.system.entity.SysDepart">
        select
        id,
        org_code orgCode,
        depart_name departName
        from sys_depart
        where parent_id in
        <foreach collection="parentIds" open="(" separator="," close=")" item="parentId">
            #{parentId}
        </foreach>
        and del_flag='0'
    </select>
    <select id="getDepartTreeByParentId" parameterType="String" resultType="org.jeecg.common.system.vo.SelectTreeModel">
        select
            id as "key",
            depart_name as "title",
            parent_id as parentId
        from sys_depart
        where parent_id = #{parentId}
          and del_flag='0'
    </select>
</mapper>
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/ISysDepartService.java
@@ -164,4 +164,10 @@
     * 根据用户id获取部门下拉树选项
     */
    List<DepartIdModel> loadDepartTreeOptions(String userId);
//    @Override
//    public List<String> getVersionStatusByVersion(Integer version) {
//        return baseMapper.getVersionStatusByVersion(version);
//    }
}
lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java
@@ -7,6 +7,7 @@
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.base.Joiner;
import lombok.extern.slf4j.Slf4j;
@@ -21,10 +22,16 @@
import org.jeecg.common.desensitization.util.SensitiveInfoUtil;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.common.system.base.entity.DataVersion;
import org.jeecg.common.system.base.entity.SysUpload;
import org.jeecg.common.system.base.entity.SysUploadRela;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.*;
import org.jeecg.common.util.*;
import org.jeecg.common.util.dynamic.db.FreemarkerParseFactory;
import org.jeecg.modules.base.entity.Unit;
import org.jeecg.modules.base.service.IEnterpriseService;
import org.jeecg.modules.base.service.IUnitService;
import org.jeecg.modules.message.entity.SysMessageTemplate;
import org.jeecg.modules.message.handle.impl.DdSendMsgHandle;
import org.jeecg.modules.message.handle.impl.EmailSendMsgHandle;
@@ -32,6 +39,8 @@
import org.jeecg.modules.message.handle.impl.SystemSendMsgHandle;
import org.jeecg.modules.message.service.ISysMessageTemplateService;
import org.jeecg.modules.message.websocket.WebSocket;
import org.jeecg.modules.quartz.entity.QuartzJob;
import org.jeecg.modules.quartz.service.IQuartzJobService;
import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.mapper.*;
import org.jeecg.modules.system.service.*;
@@ -42,6 +51,7 @@
import org.springframework.stereotype.Service;
import org.springframework.util.AntPathMatcher;
import org.springframework.util.PathMatcher;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.sql.DataSource;
@@ -59,7 +69,9 @@
@Slf4j
@Service
public class SysBaseApiImpl implements ISysBaseAPI {
    /** 当前系统数据库类型 */
    /**
     * 当前系统数据库类型
     */
    private static String DB_TYPE = "";
    @Autowired
@@ -104,6 +116,24 @@
    private ISysDataLogService sysDataLogService;
    @Autowired
    private ISysFilesService sysFilesService;
    @Autowired
    private IUploadRelaService uploadRelaService;
    @Autowired
    private IUploadService uploadService;
    @Autowired
    private IDataVersionService dataVersionService;
    @Autowired
    private IUnitService unitService;
    @Autowired
    private IEnterpriseService enterpriseService;
    @Autowired
    private IQuartzJobService quartzJobService;
    @Override
    //@SensitiveDecode
@@ -325,11 +355,7 @@
    @Override
    public void sendSysAnnouncement(MessageDTO message) {
        this.sendSysAnnouncement(message.getFromUser(),
                message.getToUser(),
                message.getTitle(),
                message.getContent(),
                message.getCategory());
        this.sendSysAnnouncement(message.getFromUser(), message.getToUser(), message.getTitle(), message.getContent(), message.getCategory());
        try {
            // 同步发送第三方APP消息
            wechatEnterpriseService.sendMessage(message, true);
@@ -341,13 +367,7 @@
    @Override
    public void sendBusAnnouncement(BusMessageDTO message) {
        sendBusAnnouncement(message.getFromUser(),
                message.getToUser(),
                message.getTitle(),
                message.getContent(),
                message.getCategory(),
                message.getBusType(),
                message.getBusId());
        sendBusAnnouncement(message.getFromUser(), message.getToUser(), message.getTitle(), message.getContent(), message.getCategory(), message.getBusType(), message.getBusId());
        try {
            // 同步发送第三方APP消息
            wechatEnterpriseService.sendMessage(message, true);
@@ -539,10 +559,11 @@
    /**
     * 获取数据库类型
     *
     * @param dataSource
     * @return
     * @throws SQLException
     */
    @Resource
    private String getDatabaseTypeByDataSource(DataSource dataSource) throws SQLException{
        if("".equals(DB_TYPE)) {
            Connection connection = dataSource.getConnection();
@@ -647,7 +668,7 @@
        return json;
    }
    @Override
    //    @Override
    public List<ComboModel> queryAllRole() {
        List<ComboModel> list = new ArrayList<ComboModel>();
        List<SysRole> roleList = roleMapper.selectList(new QueryWrapper<SysRole>());
@@ -758,6 +779,7 @@
    /**
     * 推送签到人员信息
     *
     * @param userId
     */
    @Override
@@ -829,6 +851,7 @@
    /**
     * 查询用户拥有的角色集合
     *
     * @param username
     * @return
     */
@@ -842,6 +865,7 @@
    /**
     * 查询用户拥有的权限集合
     *
     * @param username
     * @return
     */
@@ -864,6 +888,7 @@
    /**
     * 判断online菜单是否有权限
     *
     * @param onlineAuthDTO
     * @return
     */
@@ -899,6 +924,7 @@
    /**
     * 查询用户拥有的角色集合 common api 里面的接口实现
     *
     * @param username
     * @return
     */
@@ -909,6 +935,7 @@
    /**
     * 查询用户拥有的权限集合 common api 里面的接口实现
     *
     * @param username
     * @return
     */
@@ -919,6 +946,7 @@
    /**
     * 36根据多个用户账号(逗号分隔),查询返回多个用户信息
     *
     * @param usernames
     * @return
     */
@@ -938,6 +966,7 @@
    /**
     * 37根据多个部门编码(逗号分隔),查询返回多个部门信息
     *
     * @param orgCodes
     * @return
     */
@@ -957,6 +986,7 @@
    /**
     * 发消息
     *
     * @param fromUser
     * @param toUser
     * @param title
@@ -1003,6 +1033,7 @@
    /**
     * 发消息 带业务参数
     *
     * @param fromUser
     * @param toUser
     * @param title
@@ -1054,6 +1085,7 @@
    /**
     * 发送邮件消息
     *
     * @param email
     * @param title
     * @param content
@@ -1066,6 +1098,7 @@
    /**
     * 获取公司下级部门和所有用户id信息
     *
     * @param orgCode
     * @return
     */
@@ -1297,4 +1330,130 @@
        obj.put(WebsocketConst.MSG_USER_ID, userId);
        webSocket.sendMessage(userId, obj.toJSONString());
    }
    @Override
    public List<SysUploadRela> listByBusIdAndBusType(String busId, String busType) {
        return uploadRelaService.listByBusIdAndBusType(busId, busType);
    }
    @Override
    public SysUpload getUploadById(String id) {
        return uploadService.getById(id);
    }
    @Override
    public boolean saveOrUpdateBatchUploadRela(List<SysUploadRela> sysUploadRelaList) {
        return uploadRelaService.saveOrUpdateBatch(sysUploadRelaList);
    }
    @Override
    public boolean updateBatchUploadById(List<SysUpload> sysUploadList) {
        return uploadService.updateBatchById(sysUploadList);
    }
    @Override
    public List<SysUpload> batchUploadFile(String fileType, List<MultipartFile> multipartFileList, String description) throws Exception {
        return uploadService.batchUploadFile(fileType, multipartFileList, description);
    }
    @Override
    public void saveOrUpdateUploadRale(String busId, String busType, String uploadId) {
        uploadRelaService.saveOrUpdateUploadRale(busId, busType, uploadId);
    }
    @Override
    public void removeDataVersionByBusinessId(String businessId) {
        dataVersionService.removeDataVersionByBusinessId(businessId);
    }
    @Override
    public void removeUploadById(String id) {
        uploadService.removeById(id);
    }
    @Override
    public void removeUploadRelaById(String id) {
        uploadRelaService.removeById(id);
    }
    @Override
    public void delSysUploadRelaByBusIdAndBusType(String busId, String busType) {
        uploadRelaService.delSysUploadRelaByBusIdAndBusType(busId, busType);
    }
    @Override
    public String getUnitNameById(String unitId) {
        Unit unit = unitService.getById(unitId);
        String unitName = unit.getName();
        return unitName;
    }
    @Override
    public String queryDictTextByKey(String dictCode, String key) {
        return sysDictService.queryDictTextByKey(dictCode, key);
    }
    @Override
    public String getVersionStatusByVersionAndBusinessType(Integer version, String businessType) {
        return dataVersionService.getVersionStatusByVersionAndBusinessType(version, businessType);
    }
    @Override
    public void saveDataVersion(DataVersion dataVersion) {
        dataVersionService.save(dataVersion);
    }
    @Override
    public DataVersion getDataVersionByBusinessId(String id) {
        return dataVersionService.getById(id);
    }
    @Override
    public void removeDataVersionById(String id) {
        dataVersionService.removeById(id);
    }
    /**
     * 根据企业ID获取企业名称
     *
     * @param enterpriseId
     * @return
     */
    @Override
    public String getEnterpriseNameById(String enterpriseId) {
        String enterpriseName = enterpriseService.getById(enterpriseId).getName();
        return enterpriseName;
    }
    @Override
    public List<DataVersion> getLastDataVersion(String businessType, String enterpriseId, String isLastusable) {
        List<DataVersion> dataVersionList = dataVersionService.getLastDataVersion(businessType, enterpriseId, isLastusable);
        return dataVersionList;
    }
    @Override
    public List<DataVersion> getDataVersionList(String businessType, String enterpriseId, String versionStatus, String version) {
        List<DataVersion> dataVersionList = dataVersionService.getDataVersionList(businessType, enterpriseId, versionStatus, version);
        return dataVersionList;
    }
    @Override
    public void removeDataVersionByIds(String ids) {
        dataVersionService.removeBatchByIds(Arrays.asList(ids.split(",")));
    }
    @Override
    public void updateBatchDataVersion(List<DataVersion> dataVersionList) {
        dataVersionService.saveOrUpdateBatch(dataVersionList);
    }
    @Override
    public void closeJobByClassName(String className) {
        QuartzJob quartzJob = quartzJobService.getOne(new QueryWrapper<QuartzJob>().eq("job_class_name", className), true);
        if (ObjectUtils.isNotNull(quartzJob)) {
            quartzJobService.deleteAndStopJob(quartzJob);
        }
    }
}
lxzn-module-system/lxzn-system-start/pom.xml
@@ -30,6 +30,12 @@
            <artifactId>lxzn-module-mdc</artifactId>
            <version>${jeecgboot.version}</version>
        </dependency>
        <!-- 设备管理模块-->
        <dependency>
            <groupId>org.jeecgframework.boot</groupId>
            <artifactId>lxzn-module-eam</artifactId>
            <version>${jeecgboot.version}</version>
        </dependency>
    </dependencies>
    <build>
lxzn-module-system/lxzn-system-start/src/main/resources/application-dev.yml
@@ -132,10 +132,11 @@
        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
      datasource:
        master:
          url: jdbc:sqlserver://192.168.0.29:1433;databasename=LXZN_TEST_430
#          url: jdbc:sqlserver://192.168.0.29:1433;databasename=LXZN_TEST_430
          url: jdbc:sqlserver://30036q420j.yicp.fun:11047;databasename=LXZN_TEST_430
          username: sa
          password: LXZN@1688
          #password: 123
#          password: LXZN@1688
          password: 123
          driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
          #url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
          #username: root
@@ -152,7 +153,7 @@
    database: 0
    host: 127.0.0.1
    port: 6379
    password: 123456
    password:
#mybatis plus 设置
mybatis-plus:
  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml
lxzn-module-system/lxzn-system-start/src/main/resources/application.yml
@@ -3,3 +3,4 @@
    name: jeecg-system
  profiles:
    active: '@profile.name@'
#    active: dev
pom.xml
@@ -66,6 +66,7 @@
        <module>lxzn-module-demo</module>
        <module>lxzn-module-system</module>
        <module>lxzn-module-mdc</module>
        <module>lxzn-module-eam</module>
    </modules>
    <repositories>
@@ -439,5 +440,7 @@
                <module>jeecg-server-cloud</module>
            </modules>
        </profile>
    </profiles>
</project>