| | |
| | | druid: |
| | | # 主库数据源 |
| | | master: |
| | | url: jdbc:sqlserver://127.0.0.1:1433;DataBaseName=billion-db-bq |
| | | url: jdbc:sqlserver://127.0.0.1:1433;DataBaseName=billion-db-063 |
| | | username: sa |
| | | password: admin@123 |
| | | password: 123456 |
| | | # datasource: |
| | | # type: com.alibaba.druid.pool.DruidDataSource |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | |
| | | # 匹配链接 |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | |
| | | kangaroohy: |
| | | milo: |
| | | config: |
| | | default: |
| | | endpoint: opc.tcp://127.0.0.1:49320 |
| | | security-policy: none |
| | | tcp: |
| | | server: |
| | | ip: 127.0.0.1 |
| | | port: 1000 |
| | | |
| | | #kangaroohy: |
| | | # milo: |
| | | # config: |
| | | # default: |
| | | # endpoint: opc.tcp://127.0.0.1:49320 |
| | | # security-policy: none |
| | |
| | | <?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"> |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.billion.generator.mapper.GenTableColumnMapper"> |
| | | |
| | | <resultMap type="GenTableColumn" id="GenTableColumnResult"> |
| | |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectGenTableColumnVo"> |
| | | <sql id="selectGenTableColumnVo"> |
| | | select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, create_by, create_time, update_by, update_time from gen_table_column |
| | | </sql> |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="selectDbTableColumnsByName" parameterType="String" resultMap="GenTableColumnResult"> |
| | | select column_name, (case when (is_nullable = 'no' <![CDATA[ && ]]> column_key != 'PRI') then '1' else '0' end) as is_required, (case when column_key = 'PRI' then '1' else '0' end) as is_pk, ordinal_position as sort, column_comment, (case when extra = 'auto_increment' then '1' else '0' end) as is_increment, column_type |
| | | from information_schema.columns where table_schema = (select database()) and table_name = (#{tableName}) |
| | | order by ordinal_position |
| | | </select> |
| | | SELECT a.name AS column_name, |
| | | (CASE WHEN a.isnullable = 1 THEN 0 ELSE 1 END) AS is_required, |
| | | (CASE WHEN ( |
| | | SELECT COUNT(*) FROM sysobjects |
| | | WHERE (name IN ( |
| | | SELECT name FROM sysindexes |
| | | WHERE (id = a.id) |
| | | AND (indid IN ( |
| | | SELECT indid FROM sysindexkeys |
| | | WHERE (id = a.id) |
| | | AND (colid IN (SELECT colid FROM syscolumns WHERE (id = a.id) AND (name = a.name))) |
| | | )))) |
| | | AND (xtype = 'PK') |
| | | ) > 0 THEN 1 |
| | | ELSE 0 END) AS is_pk, |
| | | a.colorder AS sort, |
| | | isnull(g.[value], ' ') AS column_comment, |
| | | (CASE WHEN COLUMNPROPERTY(a.id, a.name, 'IsIdentity') = 1 THEN 1 ELSE 0 END) AS is_increment, |
| | | b.name AS column_type |
| | | FROM syscolumns as a |
| | | LEFT JOIN systypes b ON a.xtype = b.xusertype |
| | | INNER JOIN sysobjects d ON a.id = d.id AND d.xtype = 'U' AND d.name <![CDATA[<>]]> 'dtproperties' |
| | | LEFT JOIN syscomments e ON a.cdefault = e.id |
| | | LEFT JOIN sys.extended_properties g ON a.id = g.major_id AND a.colid = g.minor_id |
| | | LEFT JOIN sys.extended_properties f ON d.id = f.class AND f.minor_id = 0 |
| | | LEFT JOIN sys.objects h ON a.id = h.object_id |
| | | LEFT JOIN sys.schemas i ON h.schema_id = i.schema_id |
| | | WHERE d.name = #{tableName} |
| | | ORDER BY a.colorder |
| | | </select> |
| | | |
| | | <insert id="insertGenTableColumn" parameterType="GenTableColumn" useGeneratedKeys="true" keyProperty="columnId"> |
| | | insert into gen_table_column ( |
| | | <if test="tableId != null and tableId != ''">table_id,</if> |
| | | <if test="columnName != null and columnName != ''">column_name,</if> |
| | | <if test="columnComment != null and columnComment != ''">column_comment,</if> |
| | | <if test="columnType != null and columnType != ''">column_type,</if> |
| | | <if test="javaType != null and javaType != ''">java_type,</if> |
| | | <if test="javaField != null and javaField != ''">java_field,</if> |
| | | <if test="isPk != null and isPk != ''">is_pk,</if> |
| | | <if test="isIncrement != null and isIncrement != ''">is_increment,</if> |
| | | <if test="isRequired != null and isRequired != ''">is_required,</if> |
| | | <if test="isInsert != null and isInsert != ''">is_insert,</if> |
| | | <if test="isEdit != null and isEdit != ''">is_edit,</if> |
| | | <if test="isList != null and isList != ''">is_list,</if> |
| | | <if test="isQuery != null and isQuery != ''">is_query,</if> |
| | | <if test="queryType != null and queryType != ''">query_type,</if> |
| | | <if test="htmlType != null and htmlType != ''">html_type,</if> |
| | | <if test="dictType != null and dictType != ''">dict_type,</if> |
| | | <if test="sort != null">sort,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | create_time |
| | | )values( |
| | | <if test="tableId != null and tableId != ''">#{tableId},</if> |
| | | <if test="columnName != null and columnName != ''">#{columnName},</if> |
| | | <if test="columnComment != null and columnComment != ''">#{columnComment},</if> |
| | | <if test="columnType != null and columnType != ''">#{columnType},</if> |
| | | <if test="javaType != null and javaType != ''">#{javaType},</if> |
| | | <if test="javaField != null and javaField != ''">#{javaField},</if> |
| | | <if test="isPk != null and isPk != ''">#{isPk},</if> |
| | | <if test="isIncrement != null and isIncrement != ''">#{isIncrement},</if> |
| | | <if test="isRequired != null and isRequired != ''">#{isRequired},</if> |
| | | <if test="isInsert != null and isInsert != ''">#{isInsert},</if> |
| | | <if test="isEdit != null and isEdit != ''">#{isEdit},</if> |
| | | <if test="isList != null and isList != ''">#{isList},</if> |
| | | <if test="isQuery != null and isQuery != ''">#{isQuery},</if> |
| | | <if test="queryType != null and queryType != ''">#{queryType},</if> |
| | | <if test="htmlType != null and htmlType != ''">#{htmlType},</if> |
| | | <if test="dictType != null and dictType != ''">#{dictType},</if> |
| | | <if test="sort != null">#{sort},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | ) |
| | | <if test="tableId != null and tableId != ''">table_id,</if> |
| | | <if test="columnName != null and columnName != ''">column_name,</if> |
| | | <if test="columnComment != null and columnComment != ''">column_comment,</if> |
| | | <if test="columnType != null and columnType != ''">column_type,</if> |
| | | <if test="javaType != null and javaType != ''">java_type,</if> |
| | | <if test="javaField != null and javaField != ''">java_field,</if> |
| | | <if test="isPk != null and isPk != ''">is_pk,</if> |
| | | <if test="isIncrement != null and isIncrement != ''">is_increment,</if> |
| | | <if test="isRequired != null and isRequired != ''">is_required,</if> |
| | | <if test="isInsert != null and isInsert != ''">is_insert,</if> |
| | | <if test="isEdit != null and isEdit != ''">is_edit,</if> |
| | | <if test="isList != null and isList != ''">is_list,</if> |
| | | <if test="isQuery != null and isQuery != ''">is_query,</if> |
| | | <if test="queryType != null and queryType != ''">query_type,</if> |
| | | <if test="htmlType != null and htmlType != ''">html_type,</if> |
| | | <if test="dictType != null and dictType != ''">dict_type,</if> |
| | | <if test="sort != null">sort,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | create_time |
| | | )values( |
| | | <if test="tableId != null and tableId != ''">#{tableId},</if> |
| | | <if test="columnName != null and columnName != ''">#{columnName},</if> |
| | | <if test="columnComment != null and columnComment != ''">#{columnComment},</if> |
| | | <if test="columnType != null and columnType != ''">#{columnType},</if> |
| | | <if test="javaType != null and javaType != ''">#{javaType},</if> |
| | | <if test="javaField != null and javaField != ''">#{javaField},</if> |
| | | <if test="isPk != null and isPk != ''">#{isPk},</if> |
| | | <if test="isIncrement != null and isIncrement != ''">#{isIncrement},</if> |
| | | <if test="isRequired != null and isRequired != ''">#{isRequired},</if> |
| | | <if test="isInsert != null and isInsert != ''">#{isInsert},</if> |
| | | <if test="isEdit != null and isEdit != ''">#{isEdit},</if> |
| | | <if test="isList != null and isList != ''">#{isList},</if> |
| | | <if test="isQuery != null and isQuery != ''">#{isQuery},</if> |
| | | <if test="queryType != null and queryType != ''">#{queryType},</if> |
| | | <if test="htmlType != null and htmlType != ''">#{htmlType},</if> |
| | | <if test="dictType != null and dictType != ''">#{dictType},</if> |
| | | <if test="sort != null">#{sort},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | getdate() |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateGenTableColumn" parameterType="GenTableColumn"> |
| | | update gen_table_column |
| | | <set> |
| | | is_insert = #{isInsert}, |
| | | is_edit = #{isEdit}, |
| | | is_list = #{isList}, |
| | | is_query = #{isQuery}, |
| | | is_required = #{isRequired}, |
| | | <if test="columnComment != null">column_comment = #{columnComment},</if> |
| | | <if test="javaType != null">java_type = #{javaType},</if> |
| | | <if test="javaField != null">java_field = #{javaField},</if> |
| | | <if test="isInsert != null">is_insert = #{isInsert},</if> |
| | | <if test="isEdit != null">is_edit = #{isEdit},</if> |
| | | <if test="isList != null">is_list = #{isList},</if> |
| | | <if test="isQuery != null">is_query = #{isQuery},</if> |
| | | <if test="isRequired != null">is_required = #{isRequired},</if> |
| | | <if test="queryType != null">query_type = #{queryType},</if> |
| | | <if test="htmlType != null">html_type = #{htmlType},</if> |
| | | <if test="dictType != null">dict_type = #{dictType},</if> |
| | | <if test="sort != null">sort = #{sort},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = getdate() |
| | | </set> |
| | | where column_id = #{columnId} |
| | | </update> |
| | |
| | | <?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"> |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.billion.generator.mapper.GenTableMapper"> |
| | | |
| | | <resultMap type="GenTable" id="GenTableResult"> |
| | | <id property="tableId" column="table_id" /> |
| | | <id property="tableId" column="table_id" /> |
| | | <result property="tableName" column="table_name" /> |
| | | <result property="tableComment" column="table_comment" /> |
| | | <result property="subTableName" column="sub_table_name" /> |
| | | <result property="subTableFkName" column="sub_table_fk_name" /> |
| | | <result property="className" column="class_name" /> |
| | | <result property="tplCategory" column="tpl_category" /> |
| | | <result property="tplWebType" column="tpl_web_type" /> |
| | | <result property="packageName" column="package_name" /> |
| | | <result property="moduleName" column="module_name" /> |
| | | <result property="businessName" column="business_name" /> |
| | |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | <collection property="columns" javaType="java.util.List" resultMap="GenTableColumnResult" /> |
| | | <collection property="columns" javaType="java.util.List" resultMap="GenTableColumnResult" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap type="GenTableColumn" id="GenTableColumnResult"> |
| | | <id property="columnId" column="column_id" /> |
| | | <result property="tableId" column="table_id" /> |
| | | <result property="columnName" column="column_name" /> |
| | | <result property="columnComment" column="column_comment" /> |
| | | <result property="columnType" column="column_type" /> |
| | | <result property="javaType" column="java_type" /> |
| | | <result property="javaField" column="java_field" /> |
| | | <result property="isPk" column="is_pk" /> |
| | | <result property="isIncrement" column="is_increment" /> |
| | | <result property="isRequired" column="is_required" /> |
| | | <result property="isInsert" column="is_insert" /> |
| | | <result property="isEdit" column="is_edit" /> |
| | | <result property="isList" column="is_list" /> |
| | | <result property="isQuery" column="is_query" /> |
| | | <result property="queryType" column="query_type" /> |
| | | <result property="htmlType" column="html_type" /> |
| | | <result property="dictType" column="dict_type" /> |
| | | <result property="sort" column="sort" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <id property="columnId" column="column_id" /> |
| | | <result property="tableId" column="table_id" /> |
| | | <result property="columnName" column="column_name" /> |
| | | <result property="columnComment" column="column_comment" /> |
| | | <result property="columnType" column="column_type" /> |
| | | <result property="javaType" column="java_type" /> |
| | | <result property="javaField" column="java_field" /> |
| | | <result property="isPk" column="is_pk" /> |
| | | <result property="isIncrement" column="is_increment" /> |
| | | <result property="isRequired" column="is_required" /> |
| | | <result property="isInsert" column="is_insert" /> |
| | | <result property="isEdit" column="is_edit" /> |
| | | <result property="isList" column="is_list" /> |
| | | <result property="isQuery" column="is_query" /> |
| | | <result property="queryType" column="query_type" /> |
| | | <result property="htmlType" column="html_type" /> |
| | | <result property="dictType" column="dict_type" /> |
| | | <result property="sort" column="sort" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectGenTableVo"> |
| | | select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, tpl_web_type, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table |
| | | </sql> |
| | | |
| | | <select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | | select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table |
| | | </sql> |
| | | |
| | | <select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | | <include refid="selectGenTableVo"/> |
| | | <where> |
| | | <if test="tableName != null and tableName != ''"> |
| | |
| | | AND lower(table_comment) like lower(concat('%', #{tableComment}, '%')) |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | AND date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') |
| | | <!-- and <![CDATA[ create_time >= convert(datetime, #{params.beginTime}, 20)]]>--> |
| | | and datediff(d, create_time, #{params.beginTime}) <![CDATA[<=]]> 0 |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | AND date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
| | | <!-- and <![CDATA[ create_time <= convert(datetime, #{params.endTime}, 20)]]>--> |
| | | and datediff(d, create_time, #{params.endTime}) <![CDATA[>=]]> 0 |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | | select table_name, table_comment, create_time, update_time from information_schema.tables |
| | | where table_schema = (select database()) |
| | | AND table_name NOT LIKE 'qrtz\_%' AND table_name NOT LIKE 'gen\_%' |
| | | AND table_name NOT IN (select table_name from gen_table) |
| | | SELECT |
| | | so.name as table_name, |
| | | sep.value as table_comment, |
| | | so.create_date as create_time, |
| | | so.modify_date as update_time |
| | | FROM |
| | | sys.objects as so |
| | | LEFT JOIN sys.extended_properties as sep on so.object_id = sep.major_id |
| | | WHERE |
| | | so.type = 'U' |
| | | AND sep.minor_id = 0 |
| | | AND so.name NOT LIKE 'qrtz_%' AND so.name NOT LIKE 'gen_%' |
| | | AND so.name NOT LIKE 'act_%' AND so.name NOT LIKE 'flw_%' |
| | | AND so.name NOT IN (select table_name from gen_table) |
| | | <if test="tableName != null and tableName != ''"> |
| | | AND lower(table_name) like lower(concat('%', #{tableName}, '%')) |
| | | AND lower(so.name) like lower(concat('%', #{tableName}, '%')) |
| | | </if> |
| | | <if test="tableComment != null and tableComment != ''"> |
| | | AND lower(table_comment) like lower(concat('%', #{tableComment}, '%')) |
| | | AND lower(cast(sep.value as nvarchar)) like lower(concat('%', #{tableComment}, '%')) |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | AND date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') |
| | | <!-- and <![CDATA[ create_time >= convert(datetime, #{params.beginTime}, 20)]]>--> |
| | | and datediff(d, so.create_date, #{params.beginTime}) <![CDATA[<=]]> 0 |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | AND date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
| | | <!-- and <![CDATA[ create_time <= convert(datetime, #{params.endTime}, 20)]]>--> |
| | | and datediff(d, so.create_date, #{params.endTime}) <![CDATA[>=]]> 0 |
| | | </if> |
| | | order by create_time desc |
| | | order by so.create_date desc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDbTableListByNames" resultMap="GenTableResult"> |
| | | select table_name, table_comment, create_time, update_time from information_schema.tables |
| | | where table_name NOT LIKE 'qrtz\_%' and table_name NOT LIKE 'gen\_%' and table_schema = (select database()) |
| | | and table_name in |
| | | <foreach collection="array" item="name" open="(" separator="," close=")"> |
| | | #{name} |
| | | </foreach> |
| | | SELECT |
| | | SO.name table_name, |
| | | SEP.VALUE table_comment, |
| | | SO.create_date create_time, |
| | | SO.modify_date update_time |
| | | FROM |
| | | sys.objects AS SO |
| | | LEFT JOIN sys.extended_properties AS SEP ON SO.object_id = SEP.major_id |
| | | WHERE |
| | | SO.type = 'U' |
| | | AND SEP.minor_id = 0 |
| | | and SO.name NOT LIKE 'qrtz_%' and SO.name NOT LIKE 'gen_%' |
| | | AND so.name NOT LIKE 'act_%' AND so.name NOT LIKE 'flw_%' |
| | | and SO.name in |
| | | <foreach collection="array" item="name" open="(" separator="," close=")"> |
| | | #{name} |
| | | </foreach> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectTableByName" parameterType="String" resultMap="GenTableResult"> |
| | | select table_name, table_comment, create_time, update_time from information_schema.tables |
| | | where table_comment <![CDATA[ <> ]]> '' and table_schema = (select database()) |
| | | and table_name = #{tableName} |
| | | and table_name = #{tableName} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectGenTableById" parameterType="Long" resultMap="GenTableResult"> |
| | | SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark, |
| | | SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark, |
| | | c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort |
| | | FROM gen_table t |
| | | LEFT JOIN gen_table_column c ON t.table_id = c.table_id |
| | | LEFT JOIN gen_table_column c ON t.table_id = c.table_id |
| | | where t.table_id = #{tableId} order by c.sort |
| | | </select> |
| | | |
| | | |
| | | <select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult"> |
| | | SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark, |
| | | SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark, |
| | | c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort |
| | | FROM gen_table t |
| | | LEFT JOIN gen_table_column c ON t.table_id = c.table_id |
| | | LEFT JOIN gen_table_column c ON t.table_id = c.table_id |
| | | where t.table_name = #{tableName} order by c.sort |
| | | </select> |
| | | |
| | | |
| | | <select id="selectGenTableAll" parameterType="String" resultMap="GenTableResult"> |
| | | SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.tpl_web_type, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark, |
| | | SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark, |
| | | c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort |
| | | FROM gen_table t |
| | | LEFT JOIN gen_table_column c ON t.table_id = c.table_id |
| | | LEFT JOIN gen_table_column c ON t.table_id = c.table_id |
| | | order by c.sort |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertGenTable" parameterType="GenTable" useGeneratedKeys="true" keyProperty="tableId"> |
| | | insert into gen_table ( |
| | | <if test="tableName != null">table_name,</if> |
| | | <if test="tableComment != null and tableComment != ''">table_comment,</if> |
| | | <if test="className != null and className != ''">class_name,</if> |
| | | <if test="tplCategory != null and tplCategory != ''">tpl_category,</if> |
| | | <if test="tplWebType != null and tplWebType != ''">tpl_web_type,</if> |
| | | <if test="packageName != null and packageName != ''">package_name,</if> |
| | | <if test="moduleName != null and moduleName != ''">module_name,</if> |
| | | <if test="businessName != null and businessName != ''">business_name,</if> |
| | | <if test="functionName != null and functionName != ''">function_name,</if> |
| | | <if test="functionAuthor != null and functionAuthor != ''">function_author,</if> |
| | | <if test="genType != null and genType != ''">gen_type,</if> |
| | | <if test="genPath != null and genPath != ''">gen_path,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | create_time |
| | | )values( |
| | | <if test="tableName != null">#{tableName},</if> |
| | | <if test="tableComment != null and tableComment != ''">#{tableComment},</if> |
| | | <if test="className != null and className != ''">#{className},</if> |
| | | <if test="tplCategory != null and tplCategory != ''">#{tplCategory},</if> |
| | | <if test="tplWebType != null and tplWebType != ''">#{tplWebType},</if> |
| | | <if test="packageName != null and packageName != ''">#{packageName},</if> |
| | | <if test="moduleName != null and moduleName != ''">#{moduleName},</if> |
| | | <if test="businessName != null and businessName != ''">#{businessName},</if> |
| | | <if test="functionName != null and functionName != ''">#{functionName},</if> |
| | | <if test="functionAuthor != null and functionAuthor != ''">#{functionAuthor},</if> |
| | | <if test="genType != null and genType != ''">#{genType},</if> |
| | | <if test="genPath != null and genPath != ''">#{genPath},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="createTable"> |
| | | ${sql} |
| | | </update> |
| | | |
| | | <update id="updateGenTable" parameterType="GenTable"> |
| | | update gen_table |
| | | <set> |
| | | <if test="tableName != null">table_name = #{tableName},</if> |
| | | <if test="tableComment != null and tableComment != ''">table_comment = #{tableComment},</if> |
| | | <if test="subTableName != null">sub_table_name = #{subTableName},</if> |
| | | <if test="subTableFkName != null">sub_table_fk_name = #{subTableFkName},</if> |
| | | <if test="className != null and className != ''">class_name = #{className},</if> |
| | | <if test="functionAuthor != null and functionAuthor != ''">function_author = #{functionAuthor},</if> |
| | | <if test="genType != null and genType != ''">gen_type = #{genType},</if> |
| | | <if test="genPath != null and genPath != ''">gen_path = #{genPath},</if> |
| | | <if test="tplCategory != null and tplCategory != ''">tpl_category = #{tplCategory},</if> |
| | | <if test="tplWebType != null and tplWebType != ''">tpl_web_type = #{tplWebType},</if> |
| | | <if test="packageName != null and packageName != ''">package_name = #{packageName},</if> |
| | | <if test="moduleName != null and moduleName != ''">module_name = #{moduleName},</if> |
| | | <if test="businessName != null and businessName != ''">business_name = #{businessName},</if> |
| | | <if test="functionName != null and functionName != ''">function_name = #{functionName},</if> |
| | | <if test="options != null and options != ''">options = #{options},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | | where table_id = #{tableId} |
| | | </update> |
| | | |
| | | <delete id="deleteGenTableByIds" parameterType="Long"> |
| | | delete from gen_table where table_id in |
| | | <foreach collection="array" item="tableId" open="(" separator="," close=")"> |
| | | #{tableId} |
| | | </foreach> |
| | | </delete> |
| | | insert into gen_table ( |
| | | <if test="tableName != null">table_name,</if> |
| | | <if test="tableComment != null and tableComment != ''">table_comment,</if> |
| | | <if test="className != null and className != ''">class_name,</if> |
| | | <if test="tplCategory != null and tplCategory != ''">tpl_category,</if> |
| | | <if test="packageName != null and packageName != ''">package_name,</if> |
| | | <if test="moduleName != null and moduleName != ''">module_name,</if> |
| | | <if test="businessName != null and businessName != ''">business_name,</if> |
| | | <if test="functionName != null and functionName != ''">function_name,</if> |
| | | <if test="functionAuthor != null and functionAuthor != ''">function_author,</if> |
| | | <if test="genType != null and genType != ''">gen_type,</if> |
| | | <if test="genPath != null and genPath != ''">gen_path,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | create_time |
| | | )values( |
| | | <if test="tableName != null">#{tableName},</if> |
| | | <if test="tableComment != null and tableComment != ''">#{tableComment},</if> |
| | | <if test="className != null and className != ''">#{className},</if> |
| | | <if test="tplCategory != null and tplCategory != ''">#{tplCategory},</if> |
| | | <if test="packageName != null and packageName != ''">#{packageName},</if> |
| | | <if test="moduleName != null and moduleName != ''">#{moduleName},</if> |
| | | <if test="businessName != null and businessName != ''">#{businessName},</if> |
| | | <if test="functionName != null and functionName != ''">#{functionName},</if> |
| | | <if test="functionAuthor != null and functionAuthor != ''">#{functionAuthor},</if> |
| | | <if test="genType != null and genType != ''">#{genType},</if> |
| | | <if test="genPath != null and genPath != ''">#{genPath},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | getdate() |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateGenTable" parameterType="GenTable"> |
| | | update gen_table |
| | | <set> |
| | | <if test="tableName != null">table_name = #{tableName},</if> |
| | | <if test="tableComment != null and tableComment != ''">table_comment = #{tableComment},</if> |
| | | <if test="subTableName != null">sub_table_name = #{subTableName},</if> |
| | | <if test="subTableFkName != null">sub_table_fk_name = #{subTableFkName},</if> |
| | | <if test="className != null and className != ''">class_name = #{className},</if> |
| | | <if test="functionAuthor != null and functionAuthor != ''">function_author = #{functionAuthor},</if> |
| | | <if test="genType != null and genType != ''">gen_type = #{genType},</if> |
| | | <if test="genPath != null and genPath != ''">gen_path = #{genPath},</if> |
| | | <if test="tplCategory != null and tplCategory != ''">tpl_category = #{tplCategory},</if> |
| | | <if test="packageName != null and packageName != ''">package_name = #{packageName},</if> |
| | | <if test="moduleName != null and moduleName != ''">module_name = #{moduleName},</if> |
| | | <if test="businessName != null and businessName != ''">business_name = #{businessName},</if> |
| | | <if test="functionName != null and functionName != ''">function_name = #{functionName},</if> |
| | | <if test="options != null and options != ''">options = #{options},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | update_time = getdate() |
| | | </set> |
| | | where table_id = #{tableId} |
| | | </update> |
| | | |
| | | <delete id="deleteGenTableByIds" parameterType="Long"> |
| | | delete from gen_table where table_id in |
| | | <foreach collection="array" item="tableId" open="(" separator="," close=")"> |
| | | #{tableId} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | </mapper> |
| | |
| | | </dependency> |
| | | |
| | | <!-- opc start--> |
| | | <dependency> |
| | | <groupId>com.kangaroohy</groupId> |
| | | <artifactId>milo-spring-boot-starter</artifactId> |
| | | <version>3.0.4</version> |
| | | </dependency> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.kangaroohy</groupId>--> |
| | | <!-- <artifactId>milo-spring-boot-starter</artifactId>--> |
| | | <!-- <version>3.0.4</version>--> |
| | | <!-- </dependency>--> |
| | | <!-- opc end--> |
| | | |
| | | <dependency> |
| | | <groupId>com.billion</groupId> |
| | | <artifactId>billion-quartz</artifactId> |
| | | </dependency> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.billion</groupId>--> |
| | | <!-- <artifactId>billion-quartz</artifactId>--> |
| | | <!-- </dependency>--> |
| | | <dependency> |
| | | <groupId>org.mybatis</groupId> |
| | | <artifactId>mybatis</artifactId> |
| | |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>5.8.22</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>fastjson</artifactId> |
| | | <version>2.0.22</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | package com.billion.main.da.controller; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.collection.ListUtil; |
| | | import cn.hutool.core.util.ObjUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.billion.common.annotation.Log; |
| | | import com.billion.common.core.controller.BaseController; |
| | | import com.billion.common.core.domain.AjaxResult; |
| | | import com.billion.common.core.domain.R; |
| | | import com.billion.common.core.page.TableDataInfo; |
| | | import com.billion.common.enums.BusinessType; |
| | | import com.billion.common.exception.ServiceException; |
| | | import com.billion.common.utils.poi.ExcelUtil; |
| | | import com.billion.main.da.domain.DaStationCollection; |
| | | import com.billion.main.da.service.IDaStationCollectionService; |
| | | import com.billion.main.da.service.impl.DaStationCollectionServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.rmi.ServerError; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class DaStationCollectionController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IDaStationCollectionService daStationCollectionService; |
| | | private DaStationCollectionServiceImpl daStationCollectionService; |
| | | |
| | | /** |
| | | * 查询过站采集列表 |
| | |
| | | startPage(); |
| | | List<DaStationCollection> list = daStationCollectionService.selectDaStationCollectionList(daStationCollection); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | @GetMapping("/printList") |
| | | public R printList() |
| | | { |
| | | List<DaStationCollection> list = daStationCollectionService.list(new LambdaQueryWrapper<DaStationCollection>().eq(DaStationCollection::getStatus,"0")); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('da:stationCollection:remove')") |
| | | @Log(title = "过站采集", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | @DeleteMapping("/{id}") |
| | | public R remove(@PathVariable Long id) |
| | | { |
| | | return toAjax(daStationCollectionService.deleteDaStationCollectionByIds(ids)); |
| | | if (ObjUtil.isNull(id)){ |
| | | throw new ServiceException("id不能为空"); |
| | | } |
| | | List<DaStationCollection> list = daStationCollectionService.list(new LambdaQueryWrapper<DaStationCollection>().eq(DaStationCollection::getId, id)); |
| | | if (CollUtil.isEmpty(list)){ |
| | | throw new ServiceException("数据不存在,请刷新后重试"); |
| | | } |
| | | daStationCollectionService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/crave") |
| | | public R crave(String sfcCode) throws IOException { |
| | | if (StrUtil.isBlank(sfcCode)){ |
| | | throw new ServiceException("序列号不能为空"); |
| | | } |
| | | if (!sfcCode.contains(StrUtil.SPACE)){ |
| | | throw new ServiceException("输入的序列号需要包含空格!"); |
| | | } |
| | | |
| | | List<DaStationCollection> list = daStationCollectionService.list(new LambdaQueryWrapper<DaStationCollection>() |
| | | .eq(DaStationCollection::getSfcCode, sfcCode) |
| | | .eq(DaStationCollection::getLocationCode,"OP001")); |
| | | if (CollUtil.isNotEmpty(list)){ |
| | | DaStationCollection daStationCollection = list.get(0); |
| | | //重复刻码 |
| | | return R.ok(303,"此序列号已刻码"); |
| | | } else { |
| | | // //首次刻码-发送刻码信号给下位机 |
| | | // TcpClient tcpClient = new TcpClient(); |
| | | // byte[] bytes = sfcCode.getBytes(StandardCharsets.UTF_8); |
| | | // tcpClient.sendData(bytes); |
| | | //查询数据中状态为0的数据 |
| | | List<DaStationCollection> collect = daStationCollectionService.list(new LambdaQueryWrapper<DaStationCollection>() |
| | | .eq(DaStationCollection::getStatus, "0")); |
| | | if (CollUtil.isNotEmpty(collect)) { |
| | | //清除 |
| | | daStationCollectionService.update(new LambdaUpdateWrapper<DaStationCollection>() |
| | | .eq(DaStationCollection::getStatus,"0") |
| | | .set(DaStationCollection::getStatus,"1")); |
| | | } |
| | | |
| | | //保存数据 |
| | | DaStationCollection daStationCollection = new DaStationCollection(); |
| | | Date date = new Date(); |
| | | daStationCollection.setSfcCode(sfcCode); |
| | | List<String> split = ListUtil.toList(sfcCode.split(StrUtil.SPACE)); |
| | | if (CollUtil.isNotEmpty(split)){ |
| | | if (split.size() > 1){ |
| | | daStationCollection.setPrintCode(split.get(1)); |
| | | } |
| | | } |
| | | daStationCollection.setLocationCode("OP001"); |
| | | daStationCollection.setCollectTime(date); |
| | | daStationCollection.setInboundTime(date); |
| | | daStationCollection.setOutboundTime(date); |
| | | daStationCollection.setStatus("0"); |
| | | daStationCollectionService.save(daStationCollection); |
| | | return R.ok(200); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | @GetMapping("/reCrave") |
| | | public R reCrave(String sfcCode) throws IOException { |
| | | if (StrUtil.isBlank(sfcCode)){ |
| | | throw new ServiceException("序列号不能为空"); |
| | | } |
| | | if (!sfcCode.contains(StrUtil.SPACE)){ |
| | | throw new ServiceException("输入的序列号需要包含空格!"); |
| | | } |
| | | // //发送刻码信号给下位机 |
| | | // TcpClient tcpClient = new TcpClient(); |
| | | // byte[] bytes = sfcCode.getBytes(StandardCharsets.UTF_8); |
| | | // tcpClient.sendData(bytes); |
| | | |
| | | List<DaStationCollection> collect = daStationCollectionService.list(new LambdaQueryWrapper<DaStationCollection>() |
| | | .eq(DaStationCollection::getStatus, "0")); |
| | | if (CollUtil.isNotEmpty(collect)) { |
| | | //清除 |
| | | daStationCollectionService.update(new LambdaUpdateWrapper<DaStationCollection>() |
| | | .eq(DaStationCollection::getStatus,"0") |
| | | .set(DaStationCollection::getStatus,"1")); |
| | | } |
| | | |
| | | //保存数据 |
| | | DaStationCollection daStationCollection = new DaStationCollection(); |
| | | Date date = new Date(); |
| | | daStationCollection.setSfcCode(sfcCode); |
| | | List<String> split = ListUtil.toList(sfcCode.split(StrUtil.SPACE)); |
| | | if (CollUtil.isNotEmpty(split)){ |
| | | if (split.size() > 1){ |
| | | daStationCollection.setPrintCode(split.get(1)); |
| | | } |
| | | } |
| | | daStationCollection.setLocationCode("OP001"); |
| | | daStationCollection.setCollectTime(date); |
| | | daStationCollection.setInboundTime(date); |
| | | daStationCollection.setOutboundTime(date); |
| | | daStationCollection.setStatus("0"); |
| | | daStationCollectionService.save(daStationCollection); |
| | | return R.ok(200); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | // @GetMapping("/testSend") |
| | | // public void test(){ |
| | | // TcpClient tcpClient = new TcpClient(); |
| | | // tcpClient.receiveData(); |
| | | // } |
| | | } |
| | |
| | | private Date collectTime; |
| | | |
| | | |
| | | private String printCode; |
| | | |
| | | |
| | | } |
| | |
| | | package com.billion.main.plc; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import com.billion.main.da.service.IDaParamCollectionService; |
| | | import com.billion.main.da.service.IDaStationCollectionService; |
| | | import com.billion.main.plc.constant.Constants; |
| | | import com.billion.main.plc.sub.OPCUaSubscription; |
| | | import com.billion.main.sc.domain.ScOpcConf; |
| | | import com.billion.main.sc.service.IScCollectionParamConfService; |
| | | import com.billion.main.sc.service.IScOpcConfService; |
| | | import com.kangaroohy.milo.service.MiloService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Component |
| | | public class CustomRunner implements ApplicationRunner { |
| | | |
| | | @Autowired |
| | | private MiloService miloService; |
| | | @Autowired |
| | | private IScOpcConfService opcConfService; |
| | | @Autowired |
| | | private IScCollectionParamConfService collectionParamConfService; |
| | | @Autowired |
| | | private IDaParamCollectionService paramCollectionService; |
| | | @Autowired |
| | | private IDaStationCollectionService stationCollectionService; |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | |
| | | OPCUaSubscription opcUaSubscription = new OPCUaSubscription( |
| | | miloService, |
| | | collectionParamConfService, |
| | | paramCollectionService, |
| | | stationCollectionService); |
| | | |
| | | List<String> lists = getSubList(); |
| | | System.out.println("订阅内容:"+lists); |
| | | miloService.subscriptionFromOpcUa(lists,50,opcUaSubscription); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 订阅内容 |
| | | */ |
| | | public List<String> getSubList(){ |
| | | List<String> lists = opcConfService.list(new LambdaQueryWrapper<ScOpcConf>() |
| | | .eq(ScOpcConf::getSubscribe,Constants.YES)) |
| | | .stream().map(ScOpcConf::getNode).collect(Collectors.toList()); |
| | | return lists; |
| | | } |
| | | } |
| | | |
| | | //package com.billion.main.plc; |
| | | // |
| | | // |
| | | //import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | //import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | //import com.billion.main.da.service.IDaParamCollectionService; |
| | | //import com.billion.main.da.service.IDaStationCollectionService; |
| | | //import com.billion.main.plc.constant.Constants; |
| | | //import com.billion.main.plc.sub.OPCUaSubscription; |
| | | //import com.billion.main.sc.domain.ScOpcConf; |
| | | //import com.billion.main.sc.service.IScCollectionParamConfService; |
| | | //import com.billion.main.sc.service.IScOpcConfService; |
| | | //import com.kangaroohy.milo.service.MiloService; |
| | | //import org.springframework.beans.factory.annotation.Autowired; |
| | | //import org.springframework.boot.ApplicationArguments; |
| | | //import org.springframework.boot.ApplicationRunner; |
| | | //import org.springframework.stereotype.Component; |
| | | // |
| | | //import java.util.List; |
| | | //import java.util.stream.Collectors; |
| | | // |
| | | //@Component |
| | | //public class CustomRunner implements ApplicationRunner { |
| | | // |
| | | // @Autowired |
| | | // private MiloService miloService; |
| | | // @Autowired |
| | | // private IScOpcConfService opcConfService; |
| | | // @Autowired |
| | | // private IScCollectionParamConfService collectionParamConfService; |
| | | // @Autowired |
| | | // private IDaParamCollectionService paramCollectionService; |
| | | // @Autowired |
| | | // private IDaStationCollectionService stationCollectionService; |
| | | // |
| | | // @Override |
| | | // public void run(ApplicationArguments args) throws Exception { |
| | | // |
| | | // OPCUaSubscription opcUaSubscription = new OPCUaSubscription( |
| | | // miloService, |
| | | // collectionParamConfService, |
| | | // paramCollectionService, |
| | | // stationCollectionService); |
| | | // |
| | | // List<String> lists = getSubList(); |
| | | // System.out.println("订阅内容:"+lists); |
| | | // miloService.subscriptionFromOpcUa(lists,50,opcUaSubscription); |
| | | // |
| | | // } |
| | | // |
| | | // /** |
| | | // * 订阅内容 |
| | | // */ |
| | | // public List<String> getSubList(){ |
| | | // List<String> lists = opcConfService.list(new LambdaQueryWrapper<ScOpcConf>() |
| | | // .eq(ScOpcConf::getSubscribe,Constants.YES)) |
| | | // .stream().map(ScOpcConf::getNode).collect(Collectors.toList()); |
| | | // return lists; |
| | | // } |
| | | //} |
| | | // |
| | |
| | | package com.billion.main.plc.sub; |
| | | |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.http.HttpRequest; |
| | | import cn.hutool.http.HttpResponse; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.billion.main.api.domain.StationST180; |
| | | import com.billion.main.da.domain.DaParamCollection; |
| | | import com.billion.main.da.service.IDaParamCollectionService; |
| | | import com.billion.main.da.service.IDaStationCollectionService; |
| | | import com.billion.main.plc.constant.Constants; |
| | | import com.billion.main.sc.domain.ScCollectionParamConf; |
| | | import com.billion.main.sc.service.IScCollectionParamConfService; |
| | | import com.kangaroohy.milo.model.ReadWriteEntity; |
| | | import com.kangaroohy.milo.runner.subscription.SubscriptionCallback; |
| | | import com.kangaroohy.milo.service.MiloService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.stream.Collectors; |
| | | import java.lang.reflect.Field; |
| | | |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class OPCUaSubscription implements SubscriptionCallback { |
| | | |
| | | public static MiloService miloService; |
| | | public static IScCollectionParamConfService collectionParamConfService; |
| | | public static IDaParamCollectionService paramCollectionService; |
| | | public static IDaStationCollectionService stationCollectionService; |
| | | |
| | | public OPCUaSubscription(MiloService miloService, IScCollectionParamConfService collectionParamConfService |
| | | ,IDaParamCollectionService paramCollectionService,IDaStationCollectionService stationCollectionService) { |
| | | OPCUaSubscription.miloService = miloService; |
| | | OPCUaSubscription.collectionParamConfService = collectionParamConfService; |
| | | OPCUaSubscription.paramCollectionService = paramCollectionService; |
| | | OPCUaSubscription.stationCollectionService = stationCollectionService; |
| | | } |
| | | |
| | | @Override |
| | | public void onSubscribe(String identifier, Object value) { |
| | | log.info("地址:"+identifier+"值:"+value); |
| | | try { |
| | | if(null != value && !Constants.ZERO.equals(value.toString())) { |
| | | String[] nodes = identifier.split("[.]"); |
| | | String thoroughfare = nodes[0];//通道 |
| | | String device = nodes[1];//设备 |
| | | String tab = nodes[2];//标记 |
| | | String valueString = value.toString();//地址值 |
| | | |
| | | CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { |
| | | subHandle(thoroughfare,device,tab,valueString); |
| | | }); |
| | | |
| | | } |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | public void subHandle(String thoroughfare,String device,String tab,String valueString){ |
| | | try{ |
| | | //监听recordData |
| | | if(tab.equals(Constants.RECORD_DATA)){ |
| | | //如果是2做出站处理 |
| | | if(valueString.equals(Constants.TWO)){ |
| | | Integer result = Constants.INTEGER_TWO_ONE; |
| | | result = saveParamCollection(device, "snCode", "stationStatus"); |
| | | miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build()); |
| | | } |
| | | } |
| | | }catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 保存过站数据 |
| | | * |
| | | * @param device 工位 |
| | | * @param snCode 产品序列号 |
| | | * @return Integer |
| | | * @throws Exception e |
| | | */ |
| | | private static Integer savePassingStation(String device, String snCode,String stationStatus){ |
| | | Integer result = 21; |
| | | try { |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 保存参数数据和发送工厂MES |
| | | * @param device 工位 |
| | | * @param snCode 产品SN |
| | | * @param stationStatus 站状态 |
| | | * @return result |
| | | * @throws Exception e |
| | | */ |
| | | private static Integer saveParamCollection(String device, String snCode, String stationStatus) { |
| | | Integer result = Constants.INTEGER_TWO_ONE; |
| | | try { |
| | | // 查询参数配置表 |
| | | List<ScCollectionParamConf> list = collectionParamConfService.list(new LambdaQueryWrapper<ScCollectionParamConf>() |
| | | .eq(ScCollectionParamConf::getLocationCode, device) |
| | | .eq(ScCollectionParamConf::getSubscribe, Constants.ONE) |
| | | .orderByDesc(ScCollectionParamConf::getOrderNum) |
| | | ); |
| | | |
| | | if (CollUtil.isNotEmpty(list)) { |
| | | // 获取参数值 |
| | | List<String> collect = list.stream() |
| | | .map(ScCollectionParamConf::getNode) |
| | | .collect(Collectors.toList()); |
| | | List<ReadWriteEntity> readWriteEntityList = miloService.readFromOpcUa(collect); |
| | | |
| | | // 保存采集数据 |
| | | saveCollectionData(device, snCode, list, readWriteEntityList); |
| | | |
| | | // 创建工位对象并赋值 |
| | | Object stationObject = createStationObject(device, list, readWriteEntityList); |
| | | if (stationObject != null) { |
| | | System.out.println("工位" + device + "对象创建成功:" + stationObject); |
| | | // 这里可以对创建的对象进行进一步处理 |
| | | handleMesRequest(stationObject, device); |
| | | } |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | log.error("保存数据异常", e); |
| | | throw new RuntimeException("保存数据发送工厂MES异常"); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 保存采集数据 |
| | | */ |
| | | private static void saveCollectionData(String device, String snCode, |
| | | List<ScCollectionParamConf> list, List<ReadWriteEntity> readWriteEntityList) { |
| | | ArrayList<DaParamCollection> collectionList = new ArrayList<>(); |
| | | for (int i = 0; i < readWriteEntityList.size(); i++) { |
| | | DaParamCollection daParamCollection = new DaParamCollection(); |
| | | daParamCollection.setSfcCode(snCode); |
| | | daParamCollection.setLocationCode(device); |
| | | daParamCollection.setParamCode(list.get(i).getParamCode()); |
| | | daParamCollection.setParamName(list.get(i).getParamName()); |
| | | daParamCollection.setParamValue(readWriteEntityList.get(i).getValue().toString()); |
| | | daParamCollection.setCollectTime(new Date()); |
| | | collectionList.add(daParamCollection); |
| | | } |
| | | paramCollectionService.insertBatch(collectionList); |
| | | } |
| | | |
| | | /** |
| | | * 创建工位对象并赋值 |
| | | */ |
| | | private static Object createStationObject(String device, |
| | | List<ScCollectionParamConf> list, List<ReadWriteEntity> readWriteEntityList) { |
| | | try { |
| | | // 构建完整的类名 |
| | | String className = "com.billion.main.api.domain.Station" + device; |
| | | Class<?> stationClass = Class.forName(className); |
| | | Object stationObject = stationClass.newInstance(); |
| | | |
| | | // 获取所有属性 |
| | | Field[] fields = stationClass.getDeclaredFields(); |
| | | |
| | | // 创建参数值Map,方便查找 |
| | | Map<String, String> paramValueMap = new HashMap<>(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | paramValueMap.put(list.get(i).getParamCode(), |
| | | readWriteEntityList.get(i).getValue().toString()); |
| | | } |
| | | |
| | | // 按顺序给属性赋值 |
| | | for (Field field : fields) { |
| | | field.setAccessible(true); |
| | | String paramCode = field.getName(); // 假设属性名与参数编码一致 |
| | | String value = paramValueMap.get(paramCode); |
| | | |
| | | if (value != null) { |
| | | // 根据字段类型转换值 |
| | | Object convertedValue = convertValue(value, field.getType()); |
| | | field.set(stationObject, convertedValue); |
| | | } |
| | | } |
| | | |
| | | return stationObject; |
| | | } catch (Exception e) { |
| | | log.error("创建工位对象失败:" + device, e); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据字段类型转换值 |
| | | */ |
| | | private static Object convertValue(String value, Class<?> type) { |
| | | if (type == String.class) { |
| | | return value; |
| | | } else if (type == Integer.class || type == int.class) { |
| | | return Integer.parseInt(value); |
| | | } else if (type == Double.class || type == double.class) { |
| | | return Double.parseDouble(value); |
| | | } else if (type == Float.class || type == float.class) { |
| | | return Float.parseFloat(value); |
| | | } else if (type == Long.class || type == long.class) { |
| | | return Long.parseLong(value); |
| | | } else if (type == Boolean.class || type == boolean.class) { |
| | | return Boolean.parseBoolean(value); |
| | | } else if (type == Date.class) { |
| | | try { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | return sdf.parse(value); |
| | | } catch (ParseException e) { |
| | | return null; |
| | | } |
| | | } |
| | | return value; |
| | | } |
| | | |
| | | private static void handleMesRequest(Object stationObject, String device) { |
| | | try { |
| | | // 发送HTTP请求 |
| | | HttpResponse response = HttpRequest.post(Constants.SY_MES_URL) |
| | | .body(JSONUtil.toJsonStr(stationObject)) |
| | | .timeout(5000) // 设置超时时间 |
| | | .execute(); |
| | | |
| | | // 解析响应 |
| | | if (response.isOk()) { // 请求成功 |
| | | JSONObject jsonResponse = JSONUtil.parseObj(response.body()); |
| | | String message = jsonResponse.getStr("message"); |
| | | |
| | | if (!"ok".equals(message)) { |
| | | // 响应不是ok,保存失败记录 |
| | | saveMesFailRecord(stationObject, device, "响应异常:" + message); |
| | | } |
| | | } else { |
| | | // HTTP请求失败,保存失败记录 |
| | | saveMesFailRecord(stationObject, device, "HTTP状态码:" + response.getStatus()); |
| | | } |
| | | } catch (Exception e) { |
| | | // 发生异常(比如连接超时、服务不可用等),保存失败记录 |
| | | saveMesFailRecord(stationObject, device, "请求异常:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 保存MES推送失败记录 |
| | | */ |
| | | private static void saveMesFailRecord(Object stationObject, String device, String errorMsg) { |
| | | try { |
| | | MesFailRecord failRecord = new MesFailRecord(); |
| | | failRecord.setDeviceCode(device); |
| | | failRecord.setRequestData(JSONUtil.toJsonStr(stationObject)); |
| | | failRecord.setErrorMsg(errorMsg); |
| | | failRecord.setCreateTime(new Date()); |
| | | failRecord.setStatus(0); // 0:未处理 1:已处理 |
| | | failRecord.setRetryCount(0); // 重试次数 |
| | | |
| | | // 保存到数据库 |
| | | mesFailRecordService.save(failRecord); |
| | | |
| | | log.error("MES推送失败,已保存失败记录。设备:{},错误:{}", device, errorMsg); |
| | | } catch (Exception e) { |
| | | log.error("保存MES失败记录时发生错误", e); |
| | | } |
| | | } |
| | | |
| | | } |
| | | //package com.billion.main.plc.sub; |
| | | // |
| | | // |
| | | //import cn.hutool.core.collection.CollUtil; |
| | | //import cn.hutool.core.util.ObjectUtil; |
| | | //import cn.hutool.http.HttpRequest; |
| | | //import cn.hutool.http.HttpResponse; |
| | | //import cn.hutool.json.JSONUtil; |
| | | //import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | //import com.billion.main.api.domain.StationST180; |
| | | //import com.billion.main.da.domain.DaParamCollection; |
| | | //import com.billion.main.da.service.IDaParamCollectionService; |
| | | //import com.billion.main.da.service.IDaStationCollectionService; |
| | | //import com.billion.main.plc.constant.Constants; |
| | | //import com.billion.main.sc.domain.ScCollectionParamConf; |
| | | //import com.billion.main.sc.service.IScCollectionParamConfService; |
| | | //import com.kangaroohy.milo.model.ReadWriteEntity; |
| | | //import com.kangaroohy.milo.runner.subscription.SubscriptionCallback; |
| | | //import com.kangaroohy.milo.service.MiloService; |
| | | //import lombok.extern.slf4j.Slf4j; |
| | | //import org.springframework.stereotype.Component; |
| | | //import com.alibaba.fastjson.JSONObject; |
| | | // |
| | | //import java.text.ParseException; |
| | | //import java.text.SimpleDateFormat; |
| | | //import java.util.*; |
| | | //import java.util.concurrent.CompletableFuture; |
| | | //import java.util.stream.Collectors; |
| | | //import java.lang.reflect.Field; |
| | | // |
| | | // |
| | | //@Slf4j |
| | | //@Component |
| | | //public class OPCUaSubscription implements SubscriptionCallback { |
| | | // |
| | | // public static MiloService miloService; |
| | | // public static IScCollectionParamConfService collectionParamConfService; |
| | | // public static IDaParamCollectionService paramCollectionService; |
| | | // public static IDaStationCollectionService stationCollectionService; |
| | | // |
| | | // public OPCUaSubscription(MiloService miloService, IScCollectionParamConfService collectionParamConfService |
| | | // ,IDaParamCollectionService paramCollectionService,IDaStationCollectionService stationCollectionService) { |
| | | // OPCUaSubscription.miloService = miloService; |
| | | // OPCUaSubscription.collectionParamConfService = collectionParamConfService; |
| | | // OPCUaSubscription.paramCollectionService = paramCollectionService; |
| | | // OPCUaSubscription.stationCollectionService = stationCollectionService; |
| | | // } |
| | | // |
| | | // @Override |
| | | // public void onSubscribe(String identifier, Object value) { |
| | | // log.info("地址:"+identifier+"值:"+value); |
| | | // try { |
| | | // if(null != value && !Constants.ZERO.equals(value.toString())) { |
| | | // String[] nodes = identifier.split("[.]"); |
| | | // String thoroughfare = nodes[0];//通道 |
| | | // String device = nodes[1];//设备 |
| | | // String tab = nodes[2];//标记 |
| | | // String valueString = value.toString();//地址值 |
| | | // |
| | | // CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { |
| | | // subHandle(thoroughfare,device,tab,valueString); |
| | | // }); |
| | | // |
| | | // } |
| | | // } catch (Exception e) { |
| | | // log.error(e.getMessage()); |
| | | // } |
| | | // } |
| | | // |
| | | // public void subHandle(String thoroughfare,String device,String tab,String valueString){ |
| | | // try{ |
| | | // //监听recordData |
| | | // if(tab.equals(Constants.RECORD_DATA)){ |
| | | // //如果是2做出站处理 |
| | | // if(valueString.equals(Constants.TWO)){ |
| | | // Integer result = Constants.INTEGER_TWO_ONE; |
| | | // result = saveParamCollection(device, "snCode", "stationStatus"); |
| | | // miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build()); |
| | | // } |
| | | // } |
| | | // }catch (Exception e) { |
| | | // log.error(e.getMessage()); |
| | | // } |
| | | // } |
| | | // |
| | | // /** |
| | | // * 保存过站数据 |
| | | // * |
| | | // * @param device 工位 |
| | | // * @param snCode 产品序列号 |
| | | // * @return Integer |
| | | // * @throws Exception e |
| | | // */ |
| | | // private static Integer savePassingStation(String device, String snCode,String stationStatus){ |
| | | // Integer result = 21; |
| | | // try { |
| | | // |
| | | // |
| | | // } catch (Exception e) { |
| | | // throw new RuntimeException(e); |
| | | // } |
| | | // |
| | | // return result; |
| | | // } |
| | | // |
| | | // /** |
| | | // * 保存参数数据和发送工厂MES |
| | | // * @param device 工位 |
| | | // * @param snCode 产品SN |
| | | // * @param stationStatus 站状态 |
| | | // * @return result |
| | | // * @throws Exception e |
| | | // */ |
| | | // private static Integer saveParamCollection(String device, String snCode, String stationStatus) { |
| | | // Integer result = Constants.INTEGER_TWO_ONE; |
| | | // try { |
| | | // // 查询参数配置表 |
| | | // List<ScCollectionParamConf> list = collectionParamConfService.list(new LambdaQueryWrapper<ScCollectionParamConf>() |
| | | // .eq(ScCollectionParamConf::getLocationCode, device) |
| | | // .eq(ScCollectionParamConf::getSubscribe, Constants.ONE) |
| | | // .orderByDesc(ScCollectionParamConf::getOrderNum) |
| | | // ); |
| | | // |
| | | // if (CollUtil.isNotEmpty(list)) { |
| | | // // 获取参数值 |
| | | // List<String> collect = list.stream() |
| | | // .map(ScCollectionParamConf::getNode) |
| | | // .collect(Collectors.toList()); |
| | | // List<ReadWriteEntity> readWriteEntityList = miloService.readFromOpcUa(collect); |
| | | // |
| | | // // 保存采集数据 |
| | | // saveCollectionData(device, snCode, list, readWriteEntityList); |
| | | // |
| | | // // 创建工位对象并赋值 |
| | | // Object stationObject = createStationObject(device, list, readWriteEntityList); |
| | | // if (stationObject != null) { |
| | | // System.out.println("工位" + device + "对象创建成功:" + stationObject); |
| | | // // 这里可以对创建的对象进行进一步处理 |
| | | // |
| | | // } |
| | | // } |
| | | // |
| | | // } catch (Exception e) { |
| | | // log.error("保存数据异常", e); |
| | | // throw new RuntimeException("保存数据发送工厂MES异常"); |
| | | // } |
| | | // return result; |
| | | // } |
| | | // |
| | | // /** |
| | | // * 保存采集数据 |
| | | // */ |
| | | // private static void saveCollectionData(String device, String snCode, |
| | | // List<ScCollectionParamConf> list, List<ReadWriteEntity> readWriteEntityList) { |
| | | // ArrayList<DaParamCollection> collectionList = new ArrayList<>(); |
| | | // for (int i = 0; i < readWriteEntityList.size(); i++) { |
| | | // DaParamCollection daParamCollection = new DaParamCollection(); |
| | | // daParamCollection.setSfcCode(snCode); |
| | | // daParamCollection.setLocationCode(device); |
| | | // daParamCollection.setParamCode(list.get(i).getParamCode()); |
| | | // daParamCollection.setParamName(list.get(i).getParamName()); |
| | | // daParamCollection.setParamValue(readWriteEntityList.get(i).getValue().toString()); |
| | | // daParamCollection.setCollectTime(new Date()); |
| | | // collectionList.add(daParamCollection); |
| | | // } |
| | | // paramCollectionService.insertBatch(collectionList); |
| | | // } |
| | | // |
| | | // /** |
| | | // * 创建工位对象并赋值 |
| | | // */ |
| | | // private static Object createStationObject(String device, |
| | | // List<ScCollectionParamConf> list, List<ReadWriteEntity> readWriteEntityList) { |
| | | // try { |
| | | // // 构建完整的类名 |
| | | // String className = "com.billion.main.api.domain.Station" + device; |
| | | // Class<?> stationClass = Class.forName(className); |
| | | // Object stationObject = stationClass.newInstance(); |
| | | // |
| | | // // 获取所有属性 |
| | | // Field[] fields = stationClass.getDeclaredFields(); |
| | | // |
| | | // // 创建参数值Map,方便查找 |
| | | // Map<String, String> paramValueMap = new HashMap<>(); |
| | | // for (int i = 0; i < list.size(); i++) { |
| | | // paramValueMap.put(list.get(i).getParamCode(), |
| | | // readWriteEntityList.get(i).getValue().toString()); |
| | | // } |
| | | // |
| | | // // 按顺序给属性赋值 |
| | | // for (Field field : fields) { |
| | | // field.setAccessible(true); |
| | | // String paramCode = field.getName(); // 假设属性名与参数编码一致 |
| | | // String value = paramValueMap.get(paramCode); |
| | | // |
| | | // if (value != null) { |
| | | // // 根据字段类型转换值 |
| | | // Object convertedValue = convertValue(value, field.getType()); |
| | | // field.set(stationObject, convertedValue); |
| | | // } |
| | | // } |
| | | // |
| | | // return stationObject; |
| | | // } catch (Exception e) { |
| | | // log.error("创建工位对象失败:" + device, e); |
| | | // return null; |
| | | // } |
| | | // } |
| | | // |
| | | // /** |
| | | // * 根据字段类型转换值 |
| | | // */ |
| | | // private static Object convertValue(String value, Class<?> type) { |
| | | // if (type == String.class) { |
| | | // return value; |
| | | // } else if (type == Integer.class || type == int.class) { |
| | | // return Integer.parseInt(value); |
| | | // } else if (type == Double.class || type == double.class) { |
| | | // return Double.parseDouble(value); |
| | | // } else if (type == Float.class || type == float.class) { |
| | | // return Float.parseFloat(value); |
| | | // } else if (type == Long.class || type == long.class) { |
| | | // return Long.parseLong(value); |
| | | // } else if (type == Boolean.class || type == boolean.class) { |
| | | // return Boolean.parseBoolean(value); |
| | | // } else if (type == Date.class) { |
| | | // try { |
| | | // SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | // return sdf.parse(value); |
| | | // } catch (ParseException e) { |
| | | // return null; |
| | | // } |
| | | // } |
| | | // return value; |
| | | // } |
| | | // |
| | | //} |
| | |
| | | package com.billion.main.plc.sub; |
| | | |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.billion.main.da.domain.DaParamCollection; |
| | | import com.billion.main.da.service.IDaParamCollectionService; |
| | | import com.billion.main.da.service.IDaStationCollectionService; |
| | | import com.billion.main.plc.constant.Constants; |
| | | import com.billion.main.sc.domain.ScCollectionParamConf; |
| | | import com.billion.main.sc.service.IScCollectionParamConfService; |
| | | import com.kangaroohy.milo.model.ReadWriteEntity; |
| | | import com.kangaroohy.milo.runner.subscription.SubscriptionCallback; |
| | | import com.kangaroohy.milo.service.MiloService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | @Slf4j |
| | | public class OPCUaSubscriptionTemp implements SubscriptionCallback { |
| | | |
| | | public static MiloService miloService; |
| | | public static IScCollectionParamConfService collectionParamConfService; |
| | | public static IDaParamCollectionService paramCollectionService; |
| | | public static IDaStationCollectionService stationCollectionService; |
| | | |
| | | public OPCUaSubscriptionTemp(MiloService miloService, IScCollectionParamConfService collectionParamConfService |
| | | , IDaParamCollectionService paramCollectionService, IDaStationCollectionService stationCollectionService) { |
| | | OPCUaSubscriptionTemp.miloService = miloService; |
| | | OPCUaSubscriptionTemp.collectionParamConfService = collectionParamConfService; |
| | | OPCUaSubscriptionTemp.paramCollectionService = paramCollectionService; |
| | | OPCUaSubscriptionTemp.stationCollectionService = stationCollectionService; |
| | | } |
| | | |
| | | @Override |
| | | public void onSubscribe(String identifier, Object value) { |
| | | log.info("地址:"+identifier+"值:"+value); |
| | | try { |
| | | if(null != value && !Constants.ZERO.equals(value.toString())) { |
| | | String[] nodes = identifier.split("[.]"); |
| | | String thoroughfare = nodes[0];//通道 |
| | | String device = nodes[1];//设备 |
| | | String tab = nodes[2];//标记 |
| | | String valueString = value.toString();//地址值 |
| | | |
| | | CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { |
| | | subHandle(thoroughfare,device,tab,valueString); |
| | | }); |
| | | |
| | | } |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | public void subHandle(String thoroughfare,String device,String tab,String valueString){ |
| | | try{ |
| | | //监听recordData |
| | | if(tab.equals(Constants.RECORD_DATA)){ |
| | | //如果是1做进站处理 |
| | | if(valueString.equals(Constants.ONE)){ |
| | | Object sfcCodeObject = miloService.readFromOpcUa(thoroughfare + "." + device + ".sfcCode").getValue(); |
| | | if(ObjectUtil.isNotNull(sfcCodeObject)){ |
| | | miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(Constants.STRING_ONE_ONE).build()); |
| | | }else { |
| | | miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(Constants.STRING_ONE_TWO).build()); |
| | | } |
| | | //如果是2做出站处理处理 |
| | | }else if(valueString.equals(Constants.TWO)){ |
| | | String result = Constants.STRING_TWO_ONE; |
| | | //读变速箱总成码 |
| | | Object sfcCodeObject = miloService.readFromOpcUa(thoroughfare + "." + device + ".sfcCode").getValue(); |
| | | //为空时,返回5 |
| | | if (ObjectUtil.isNull(sfcCodeObject)){ |
| | | miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(Constants.STRING_TWO_FIVE).build()); |
| | | }else { |
| | | String snCode = sfcCodeObject.toString().trim();//产品SN |
| | | Object stationStatusObjcet = miloService.readFromOpcUa(thoroughfare + "." + device + ".StationStatus").getValue();//站状态地址 |
| | | String stationStatus = stationStatusObjcet.toString(); |
| | | if (ObjectUtil.isNotNull(stationStatusObjcet)) { |
| | | //保存参数,发送工厂MES |
| | | result = saveParamCollection(device, snCode, stationStatus); |
| | | //保存过站记录 |
| | | savePassingStation(device,snCode,stationStatus); |
| | | }else { |
| | | result = Constants.STRING_TWO_THREE; |
| | | log.info("读取到工位{}StationStatus数据:{},返回RecordDataDone的值为{}", device, "IS NULL!", result); |
| | | } |
| | | } |
| | | miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build()); |
| | | } |
| | | } |
| | | }catch (Exception e) { |
| | | log.error(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 保存过站数据 |
| | | * |
| | | * @param device 工位 |
| | | * @param snCode 产品序列号 |
| | | * @return Integer |
| | | * @throws Exception e |
| | | */ |
| | | private static Integer savePassingStation(String device, String snCode,String stationStatus){ |
| | | Integer result = 21; |
| | | try { |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 保存参数数据和发送工厂MES |
| | | * @param device 工位 |
| | | * @param snCode 产品SN |
| | | * @param stationStatus 站状态 |
| | | * @return result |
| | | * @throws Exception e |
| | | */ |
| | | private static String saveParamCollection(String device,String snCode,String stationStatus){ |
| | | String result = Constants.STRING_TWO_ONE;//返回结果 |
| | | try { |
| | | //查询参数配置表 |
| | | List<ScCollectionParamConf> list = collectionParamConfService.list(new LambdaQueryWrapper<ScCollectionParamConf>() |
| | | .eq(ScCollectionParamConf::getLocationCode, device)//工位 |
| | | .eq(ScCollectionParamConf::getSubscribe, Constants.ONE)//是否采集 |
| | | ); |
| | | if (CollUtil.isNotEmpty(list)){ |
| | | List<String> collect = list.stream() |
| | | .map(ScCollectionParamConf::getNode).collect(Collectors.toList()); |
| | | List<ReadWriteEntity> readWriteEntityList = miloService.readFromOpcUa(collect); |
| | | ArrayList<DaParamCollection> collectionList = new ArrayList<>(); |
| | | for (int i = 0; i < readWriteEntityList.size(); i++) { |
| | | DaParamCollection daParamCollection = new DaParamCollection(); |
| | | daParamCollection.setSfcCode(snCode); |
| | | daParamCollection.setLocationCode(device); |
| | | daParamCollection.setParamCode(list.get(i).getParamCode());//参数编码 |
| | | daParamCollection.setParamName(list.get(i).getParamName());//参数名称 |
| | | daParamCollection.setParamValue(readWriteEntityList.get(i).getValue().toString()); |
| | | daParamCollection.setCollectTime(new Date()); |
| | | collectionList.add(daParamCollection); |
| | | } |
| | | paramCollectionService.saveBatch(collectionList); |
| | | } |
| | | |
| | | }catch (Exception e) { |
| | | throw new RuntimeException("保存数据发送工厂MES异常"); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | |
| | | } |
| | | //package com.billion.main.plc.sub; |
| | | // |
| | | // |
| | | //import cn.hutool.core.collection.CollUtil; |
| | | //import cn.hutool.core.util.ObjectUtil; |
| | | //import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | //import com.billion.main.da.domain.DaParamCollection; |
| | | //import com.billion.main.da.service.IDaParamCollectionService; |
| | | //import com.billion.main.da.service.IDaStationCollectionService; |
| | | //import com.billion.main.plc.constant.Constants; |
| | | //import com.billion.main.sc.domain.ScCollectionParamConf; |
| | | //import com.billion.main.sc.service.IScCollectionParamConfService; |
| | | //import com.kangaroohy.milo.model.ReadWriteEntity; |
| | | //import com.kangaroohy.milo.runner.subscription.SubscriptionCallback; |
| | | //import com.kangaroohy.milo.service.MiloService; |
| | | //import lombok.extern.slf4j.Slf4j; |
| | | //import org.springframework.stereotype.Component; |
| | | // |
| | | //import java.util.ArrayList; |
| | | //import java.util.Date; |
| | | //import java.util.List; |
| | | //import java.util.concurrent.CompletableFuture; |
| | | //import java.util.stream.Collectors; |
| | | // |
| | | // |
| | | //@Slf4j |
| | | //public class OPCUaSubscriptionTemp implements SubscriptionCallback { |
| | | // |
| | | // public static MiloService miloService; |
| | | // public static IScCollectionParamConfService collectionParamConfService; |
| | | // public static IDaParamCollectionService paramCollectionService; |
| | | // public static IDaStationCollectionService stationCollectionService; |
| | | // |
| | | // public OPCUaSubscriptionTemp(MiloService miloService, IScCollectionParamConfService collectionParamConfService |
| | | // , IDaParamCollectionService paramCollectionService, IDaStationCollectionService stationCollectionService) { |
| | | // OPCUaSubscriptionTemp.miloService = miloService; |
| | | // OPCUaSubscriptionTemp.collectionParamConfService = collectionParamConfService; |
| | | // OPCUaSubscriptionTemp.paramCollectionService = paramCollectionService; |
| | | // OPCUaSubscriptionTemp.stationCollectionService = stationCollectionService; |
| | | // } |
| | | // |
| | | // @Override |
| | | // public void onSubscribe(String identifier, Object value) { |
| | | // log.info("地址:"+identifier+"值:"+value); |
| | | // try { |
| | | // if(null != value && !Constants.ZERO.equals(value.toString())) { |
| | | // String[] nodes = identifier.split("[.]"); |
| | | // String thoroughfare = nodes[0];//通道 |
| | | // String device = nodes[1];//设备 |
| | | // String tab = nodes[2];//标记 |
| | | // String valueString = value.toString();//地址值 |
| | | // |
| | | // CompletableFuture<Void> cp1 = CompletableFuture.runAsync(() -> { |
| | | // subHandle(thoroughfare,device,tab,valueString); |
| | | // }); |
| | | // |
| | | // } |
| | | // } catch (Exception e) { |
| | | // log.error(e.getMessage()); |
| | | // } |
| | | // } |
| | | // |
| | | // public void subHandle(String thoroughfare,String device,String tab,String valueString){ |
| | | // try{ |
| | | // //监听recordData |
| | | // if(tab.equals(Constants.RECORD_DATA)){ |
| | | // //如果是1做进站处理 |
| | | // if(valueString.equals(Constants.ONE)){ |
| | | // Object sfcCodeObject = miloService.readFromOpcUa(thoroughfare + "." + device + ".sfcCode").getValue(); |
| | | // if(ObjectUtil.isNotNull(sfcCodeObject)){ |
| | | // miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(Constants.STRING_ONE_ONE).build()); |
| | | // }else { |
| | | // miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(Constants.STRING_ONE_TWO).build()); |
| | | // } |
| | | // //如果是2做出站处理处理 |
| | | // }else if(valueString.equals(Constants.TWO)){ |
| | | // String result = Constants.STRING_TWO_ONE; |
| | | // //读变速箱总成码 |
| | | // Object sfcCodeObject = miloService.readFromOpcUa(thoroughfare + "." + device + ".sfcCode").getValue(); |
| | | // //为空时,返回5 |
| | | // if (ObjectUtil.isNull(sfcCodeObject)){ |
| | | // miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(Constants.STRING_TWO_FIVE).build()); |
| | | // }else { |
| | | // String snCode = sfcCodeObject.toString().trim();//产品SN |
| | | // Object stationStatusObjcet = miloService.readFromOpcUa(thoroughfare + "." + device + ".StationStatus").getValue();//站状态地址 |
| | | // String stationStatus = stationStatusObjcet.toString(); |
| | | // if (ObjectUtil.isNotNull(stationStatusObjcet)) { |
| | | // //保存参数,发送工厂MES |
| | | // result = saveParamCollection(device, snCode, stationStatus); |
| | | // //保存过站记录 |
| | | // savePassingStation(device,snCode,stationStatus); |
| | | // }else { |
| | | // result = Constants.STRING_TWO_THREE; |
| | | // log.info("读取到工位{}StationStatus数据:{},返回RecordDataDone的值为{}", device, "IS NULL!", result); |
| | | // } |
| | | // } |
| | | // miloService.writeToOpcUa(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(result).build()); |
| | | // } |
| | | // } |
| | | // }catch (Exception e) { |
| | | // log.error(e.getMessage()); |
| | | // } |
| | | // } |
| | | // |
| | | // /** |
| | | // * 保存过站数据 |
| | | // * |
| | | // * @param device 工位 |
| | | // * @param snCode 产品序列号 |
| | | // * @return Integer |
| | | // * @throws Exception e |
| | | // */ |
| | | // private static Integer savePassingStation(String device, String snCode,String stationStatus){ |
| | | // Integer result = 21; |
| | | // try { |
| | | // |
| | | // |
| | | // } catch (Exception e) { |
| | | // throw new RuntimeException(e); |
| | | // } |
| | | // |
| | | // return result; |
| | | // } |
| | | // |
| | | // /** |
| | | // * 保存参数数据和发送工厂MES |
| | | // * @param device 工位 |
| | | // * @param snCode 产品SN |
| | | // * @param stationStatus 站状态 |
| | | // * @return result |
| | | // * @throws Exception e |
| | | // */ |
| | | // private static String saveParamCollection(String device,String snCode,String stationStatus){ |
| | | // String result = Constants.STRING_TWO_ONE;//返回结果 |
| | | // try { |
| | | // //查询参数配置表 |
| | | // List<ScCollectionParamConf> list = collectionParamConfService.list(new LambdaQueryWrapper<ScCollectionParamConf>() |
| | | // .eq(ScCollectionParamConf::getLocationCode, device)//工位 |
| | | // .eq(ScCollectionParamConf::getSubscribe, Constants.ONE)//是否采集 |
| | | // ); |
| | | // if (CollUtil.isNotEmpty(list)){ |
| | | // List<String> collect = list.stream() |
| | | // .map(ScCollectionParamConf::getNode).collect(Collectors.toList()); |
| | | // List<ReadWriteEntity> readWriteEntityList = miloService.readFromOpcUa(collect); |
| | | // ArrayList<DaParamCollection> collectionList = new ArrayList<>(); |
| | | // for (int i = 0; i < readWriteEntityList.size(); i++) { |
| | | // DaParamCollection daParamCollection = new DaParamCollection(); |
| | | // daParamCollection.setSfcCode(snCode); |
| | | // daParamCollection.setLocationCode(device); |
| | | // daParamCollection.setParamCode(list.get(i).getParamCode());//参数编码 |
| | | // daParamCollection.setParamName(list.get(i).getParamName());//参数名称 |
| | | // daParamCollection.setParamValue(readWriteEntityList.get(i).getValue().toString()); |
| | | // daParamCollection.setCollectTime(new Date()); |
| | | // collectionList.add(daParamCollection); |
| | | // } |
| | | // paramCollectionService.saveBatch(collectionList); |
| | | // } |
| | | // |
| | | // }catch (Exception e) { |
| | | // throw new RuntimeException("保存数据发送工厂MES异常"); |
| | | // } |
| | | // return result; |
| | | // } |
| | | // |
| | | // |
| | | //} |
| | |
| | | <groupId>com.billion</groupId> |
| | | <artifactId>billion-common</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.billion</groupId> |
| | | <artifactId>billion-main</artifactId> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | |
| | | package com.billion.quartz.task; |
| | | |
| | | |
| | | import org.springframework.stereotype.Component; |
| | | import com.billion.common.utils.StringUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 定时任务调度测试 |
| | |
| | | @Component("ryTask") |
| | | public class RyTask |
| | | { |
| | | |
| | | // @Resource |
| | | // private TcpClient tcpClient; |
| | | |
| | | public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) |
| | | { |
| | | System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i)); |
| | |
| | | public void ryNoParams() |
| | | { |
| | | System.out.println("执行无参方法"); |
| | | // tcpClient.receiveData(); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | // 写入数据库当中 |
| | | SpringUtils.getBean(ISysJobLogService.class).addJobLog(sysJobLog); |
| | | // SpringUtils.getBean(ISysJobLogService.class).addJobLog(sysJobLog); |
| | | } |
| | | |
| | | /** |
| | |
| | | <if test="jobMessage != null and jobMessage != ''">#{jobMessage},</if> |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if> |
| | | sysdate() |
| | | GETDATE() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="status !=null">status = #{status},</if> |
| | | <if test="remark != null and remark != ''">remark = #{remark},</if> |
| | | <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
| | | update_time = sysdate() |
| | | update_time = GETDATE() |
| | | </set> |
| | | where job_id = #{jobId} |
| | | </update> |
| | |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | sysdate() |
| | | GETDATE() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function printList(query) { |
| | | return request({ |
| | | url: '/da/stationCollection/printList', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | printList |
| | | // 查询过站采集详细 |
| | | export function getStationCollection(id) { |
| | | return request({ |
| | |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | export function crave(param) { |
| | | return request({ |
| | | url: '/da/stationCollection/crave', |
| | | method: 'get', |
| | | params: param |
| | | }) |
| | | } |
| | | |
| | | export function reCrave(param) { |
| | | return request({ |
| | | url: '/da/stationCollection/reCrave', |
| | | method: 'get', |
| | | params: param |
| | | }) |
| | | } |
| | |
| | | ] |
| | | }, |
| | | // 样机标签打印路由 |
| | | { |
| | | path: '/main/bq', |
| | | component: Layout, |
| | | children: [ |
| | | { |
| | | path: 'prototypeLabelPrinting', |
| | | component: () => import('@/views/main/bq/prototypeLabelPrinting'), |
| | | name: 'PrototypeLabelPrinting', |
| | | meta: { title: '样机标签打印', icon: 'printer' } |
| | | } |
| | | ] |
| | | }, |
| | | // { |
| | | // path: '/main/bq', |
| | | // component: Layout, |
| | | // children: [ |
| | | // { |
| | | // path: 'prototypeLabelPrinting', |
| | | // component: () => import('@/views/main/bq/prototypeLabelPrinting'), |
| | | // name: 'PrototypeLabelPrinting', |
| | | // meta: { title: '样机标签打印', icon: 'printer' } |
| | | // } |
| | | // ] |
| | | // }, |
| | | // 匹配所有路径 |
| | | { |
| | | path: '*', |
| | |
| | | <template> |
| | | <div class="app-container home"> |
| | | <el-row :gutter="20"> |
| | | <el-col :sm="24" :lg="24"> |
| | | <blockquote class="text-warning" style="font-size: 14px"> |
| | | 领取阿里云通用云产品1888优惠券 |
| | | <br /> |
| | | <el-link |
| | | href="https://www.aliyun.com/minisite/goods?userCode=brki8iof" |
| | | type="primary" |
| | | target="_blank" |
| | | >https://www.aliyun.com/minisite/goods?userCode=brki8iof</el-link |
| | | > |
| | | <br /> |
| | | 领取腾讯云通用云产品2860优惠券 |
| | | <br /> |
| | | <el-link |
| | | href="https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console" |
| | | type="primary" |
| | | target="_blank" |
| | | >https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console</el-link |
| | | > |
| | | <br /> |
| | | 阿里云服务器折扣区 |
| | | <el-link href="http://aly.ruoyi.vip" type="primary" target="_blank" |
| | | >>☛☛点我进入☚☚</el-link |
| | | > |
| | | 腾讯云服务器秒杀区 |
| | | <el-link href="http://txy.ruoyi.vip" type="primary" target="_blank" |
| | | >>☛☛点我进入☚☚</el-link |
| | | ><br /> |
| | | <h4 class="text-danger"> |
| | | 云产品通用红包,可叠加官网常规优惠使用。(仅限新用户) |
| | | </h4> |
| | | </blockquote> |
| | | |
| | | <hr /> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <div class="grid-content bg-purple-dark" |
| | | style="font-size: 50px; font-weight: bolder; align-content: center"> |
| | | <div style="width:100%; margin-left: 300px"> |
| | | <span style="text-align: center">德玛智控-箱体刻码</span> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :sm="24" :lg="12" style="padding-left: 20px"> |
| | | <h2>若依后台管理框架</h2> |
| | | <p> |
| | | 一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了若依管理系统,她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。 |
| | | </p> |
| | | <p> |
| | | <b>当前版本:</b> <span>v{{ version }}</span> |
| | | </p> |
| | | <p> |
| | | <el-tag type="danger">¥免费开源</el-tag> |
| | | </p> |
| | | <p> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | icon="el-icon-cloudy" |
| | | plain |
| | | @click="goTarget('https://gitee.com/y_project/RuoYi-Vue')" |
| | | >访问码云</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | icon="el-icon-s-home" |
| | | plain |
| | | @click="goTarget('http://ruoyi.vip')" |
| | | >访问主页</el-button |
| | | > |
| | | </p> |
| | | </el-col> |
| | | |
| | | <el-col :sm="24" :lg="12" style="padding-left: 50px"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <h2>技术选型</h2> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <h4>后端技术</h4> |
| | | <ul> |
| | | <li>SpringBoot</li> |
| | | <li>Spring Security</li> |
| | | <li>JWT</li> |
| | | <li>MyBatis</li> |
| | | <li>Druid</li> |
| | | <li>Fastjson</li> |
| | | <li>...</li> |
| | | </ul> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <h4>前端技术</h4> |
| | | <ul> |
| | | <li>Vue</li> |
| | | <li>Vuex</li> |
| | | <li>Element-ui</li> |
| | | <li>Axios</li> |
| | | <li>Sass</li> |
| | | <li>Quill</li> |
| | | <li>...</li> |
| | | </ul> |
| | | </el-col> |
| | | </el-row> |
| | | </el-col> |
| | | <el-row :gutter="20" style="margin-top: 50px"> |
| | | <el-input |
| | | class="myinput" |
| | | placeholder="请输入序列号" |
| | | v-model="sfcCode" |
| | | clearable |
| | | style="width: 60%; height: 50px; font-size: 34px"> |
| | | </el-input> |
| | | <el-button type="primary" style=" margin-left: 20px; width: 12%; height: 50px; font-size: 28px; " @click="carveMethod()">确认</el-button> |
| | | <el-button type="success" style=" margin-left: 20px; width: 12%; height: 50px; font-size: 28px;" @click="flushMethod()">刷新</el-button> |
| | | </el-row> |
| | | <el-divider /> |
| | | <el-row :gutter="20"> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="8"> |
| | | <el-card class="update-log"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>联系信息</span> |
| | | </div> |
| | | <div class="body"> |
| | | <p> |
| | | <i class="el-icon-s-promotion"></i> 官网:<el-link |
| | | href="http://www.ruoyi.vip" |
| | | target="_blank" |
| | | >http://www.ruoyi.vip</el-link |
| | | > |
| | | </p> |
| | | <p> |
| | | <i class="el-icon-user-solid"></i> QQ群:<s> 满937441 </s> <s> 满887144332 </s> |
| | | <s> 满180251782 </s> <s> 满104180207 </s> <s> 满186866453 </s> <s> 满201396349 </s> |
| | | <s> 满101456076 </s> <s> 满101539465 </s> <s> 满264312783 </s> <s> 满167385320 </s> |
| | | <s> 满104748341 </s> <s> 满160110482 </s> <s> 满170801498 </s> <s> 满108482800 </s> |
| | | <s> 满101046199 </s> <s> 满136919097 </s> <s> 满143961921 </s> <s> 满174951577 </s> |
| | | <s> 满161281055 </s> <s> 满138988063 </s> <a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=SUc-msaypcqB2UTFif4eqGlBHkKcvMNP&authKey=JdQBouY2PG%2BS%2BCzAfIgbCGNgxyahpfh24IW%2F03rPxGilhqVbisLma%2FFFnt79DHNh&noverify=0&group_code=151450850" target="_blank">151450850</a> |
| | | </p> |
| | | <p> |
| | | <i class="el-icon-chat-dot-round"></i> 微信:<a |
| | | href="javascript:;" |
| | | >/ *若依</a |
| | | > |
| | | </p> |
| | | <p> |
| | | <i class="el-icon-money"></i> 支付宝:<a |
| | | href="javascript:;" |
| | | class="支付宝信息" |
| | | >/ *若依</a |
| | | > |
| | | </p> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="8"> |
| | | <el-card class="update-log"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>更新日志</span> |
| | | </div> |
| | | <el-collapse accordion> |
| | | <el-collapse-item title="v3.8.8 - 2024-06-30"> |
| | | <ol> |
| | | <li>菜单管理新增路由名称</li> |
| | | <li>新增数据脱敏过滤注解</li> |
| | | <li>用户密码新增非法字符验证</li> |
| | | <li>限制用户操作数据权限范围</li> |
| | | <li>代码生成新增创建表结构功能</li> |
| | | <li>定时任务白名单配置范围缩小</li> |
| | | <li>优化代码生成主子表关联查询方式</li> |
| | | <li>Excel注解新增属性comboReadDict</li> |
| | | <li>Excel注解ColumnType类型新增文本</li> |
| | | <li>新增国际化资源文件配置</li> |
| | | <li>升级oshi到最新版本6.6.1</li> |
| | | <li>升级druid到最新版本1.2.23</li> |
| | | <li>升级core-js到最新版本3.37.1</li> |
| | | <li>更新HttpUtils中的User-Agent</li> |
| | | <li>更新compressionPlugin到6.1.2以兼容node18+</li> |
| | | <li>升级spring-security到安全版本,防止漏洞风险</li> |
| | | <li>升级spring-framework到安全版本,防止漏洞风险</li> |
| | | <li>优化自定义XSS注解匹配方式</li> |
| | | <li>优化缓存监控键名列表排序显示</li> |
| | | <li>优化定时任务日志默认按时间排序</li> |
| | | <li>优化默认文件大小超过2G无效的问题</li> |
| | | <li>优化查表特殊字符使用反斜杠进行转义</li> |
| | | <li>优化定时任务cron表达式小时配置显示错误问题</li> |
| | | <li>优化多个自定数据权限使用in查询,避免多次拼接</li> |
| | | <li>优化导入Excel时设置dictType属性重复查缓存问题</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.8.7 - 2023-12-08"> |
| | | <ol> |
| | | <li>操作日志记录部门名称</li> |
| | | <li>全局数据存储用户编号</li> |
| | | <li>新增编程式判断资源访问权限</li> |
| | | <li>操作日志列表新增IP地址查询</li> |
| | | <li>定时任务新增页去除状态选项</li> |
| | | <li>代码生成支持选择前端模板类型</li> |
| | | <li>显隐列组件支持复选框弹出类型</li> |
| | | <li>通用排序属性orderBy参数限制长度</li> |
| | | <li>Excel自定义数据处理器增加单元格/工作簿对象</li> |
| | | <li>升级oshi到最新版本6.4.8</li> |
| | | <li>升级druid到最新版本1.2.20</li> |
| | | <li>升级fastjson到最新版2.0.43</li> |
| | | <li>升级pagehelper到最新版1.4.7</li> |
| | | <li>升级commons.io到最新版本2.13.0</li> |
| | | <li>升级element-ui到最新版本2.15.14</li> |
| | | <li>修复五级路由缓存无效问题</li> |
| | | <li>修复外链带端口出现的异常</li> |
| | | <li>修复树模板父级编码变量错误</li> |
| | | <li>修复字典表详情页面搜索问题</li> |
| | | <li>修复内链iframe没有传递参数问题</li> |
| | | <li>修复自定义字典样式不生效的问题</li> |
| | | <li>修复字典缓存删除方法参数错误问题</li> |
| | | <li>修复Excel导入数据临时文件无法删除问题</li> |
| | | <li>修复未登录带参数访问成功后参数丢失问题</li> |
| | | <li>修复HeaderSearch组件跳转query参数丢失问题</li> |
| | | <li>修复代码生成导入后必填项与数据库不匹配问题</li> |
| | | <li>修复Excels导入时无法获取到dictType字典值问题</li> |
| | | <li>优化下载zip方法新增遮罩层</li> |
| | | <li>优化头像上传参数新增文件名称</li> |
| | | <li>优化字典标签支持自定义分隔符</li> |
| | | <li>优化菜单管理类型为按钮状态可选</li> |
| | | <li>优化前端防重复提交数据大小限制</li> |
| | | <li>优化TopNav菜单没有图标svg不显示</li> |
| | | <li>优化数字金额大写转换精度丢失问题</li> |
| | | <li>优化富文本Editor组件检验图片格式</li> |
| | | <li>优化页签在Firefox浏览器被遮挡的问题</li> |
| | | <li>优化个人中心/基本资料修改时数据显示问题</li> |
| | | <li>优化缓存监控图表支持跟随屏幕大小自适应调整</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.8.6 - 2023-06-30"> |
| | | <ol> |
| | | <li>支持登录IP黑名单限制</li> |
| | | <li>新增监控页面图标显示</li> |
| | | <li>操作日志新增消耗时间属性</li> |
| | | <li>屏蔽定时任务bean违规的字符</li> |
| | | <li>日志管理使用索引提升查询性能</li> |
| | | <li>日志注解支持排除指定的请求参数</li> |
| | | <li>支持自定义隐藏属性列过滤子对象</li> |
| | | <li>升级oshi到最新版本6.4.3</li> |
| | | <li>升级druid到最新版本1.2.16</li> |
| | | <li>升级fastjson到最新版2.0.34</li> |
| | | <li>升级spring-boot到最新版本2.5.15</li> |
| | | <li>升级element-ui到最新版本2.15.13</li> |
| | | <li>移除apache/commons-fileupload依赖</li> |
| | | <li>修复页面切换时布局错乱的问题</li> |
| | | <li>修复匿名注解Anonymous空指针问题</li> |
| | | <li>修复路由跳转被阻止时内部产生报错信息问题</li> |
| | | <li>修复isMatchedIp的参数判断产生空指针的问题</li> |
| | | <li>修复用户多角色数据权限可能出现权限抬升的情况</li> |
| | | <li>修复开启TopNav后一级菜单路由参数设置无效问题</li> |
| | | <li>修复DictTag组件value没有匹配的值时则展示value</li> |
| | | <li>优化文件下载出现的异常</li> |
| | | <li>优化选择图标组件高亮回显</li> |
| | | <li>优化弹窗后导航栏偏移的问题</li> |
| | | <li>优化修改密码日志存储明文问题</li> |
| | | <li>优化页签栏关闭其他出现的异常问题</li> |
| | | <li>优化页签关闭左侧选项排除首页选项</li> |
| | | <li>优化关闭当前tab页跳转最右侧tab页</li> |
| | | <li>优化缓存列表清除操作提示不变的问题</li> |
| | | <li>优化字符未使用下划线不进行驼峰式处理</li> |
| | | <li>优化用户导入更新时需获取用户编号问题</li> |
| | | <li>优化侧边栏的平台标题与VUE_APP_TITLE保持同步</li> |
| | | <li>优化导出Excel时设置dictType属性重复查缓存问题</li> |
| | | <li>连接池Druid支持新的配置connectTimeout和socketTimeout</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.8.5 - 2023-01-01"> |
| | | <ol> |
| | | <li>定时任务违规的字符</li> |
| | | <li>重置时取消部门选中</li> |
| | | <li>新增返回警告消息提示</li> |
| | | <li>忽略不必要的属性数据返回</li> |
| | | <li>修改参数键名时移除前缓存配置</li> |
| | | <li>导入更新用户数据前校验数据权限</li> |
| | | <li>兼容Excel下拉框内容过多无法显示的问题</li> |
| | | <li>升级echarts到最新版本5.4.0</li> |
| | | <li>升级core-js到最新版本3.25.3</li> |
| | | <li>升级oshi到最新版本6.4.0</li> |
| | | <li>升级kaptcha到最新版2.3.3</li> |
| | | <li>升级druid到最新版本1.2.15</li> |
| | | <li>升级fastjson到最新版2.0.20</li> |
| | | <li>升级pagehelper到最新版1.4.6</li> |
| | | <li>优化弹窗内容过多展示不全问题</li> |
| | | <li>优化swagger-ui静态资源使用缓存</li> |
| | | <li>开启TopNav没有子菜单隐藏侧边栏</li> |
| | | <li>删除fuse无效选项maxPatternLength</li> |
| | | <li>优化导出对象的子列表为空会出现[]问题</li> |
| | | <li>优化编辑头像时透明部分会变成黑色问题</li> |
| | | <li>优化小屏幕上修改头像界面布局错位的问题</li> |
| | | <li>修复代码生成勾选属性无效问题</li> |
| | | <li>修复文件上传组件格式验证问题</li> |
| | | <li>修复回显数据字典数组异常问题</li> |
| | | <li>修复sheet超出最大行数异常问题</li> |
| | | <li>修复Log注解GET请求记录不到参数问题</li> |
| | | <li>修复调度日志点击多次数据不变化的问题</li> |
| | | <li>修复主题颜色在Drawer组件不会加载问题</li> |
| | | <li>修复文件名包含特殊字符的文件无法下载问题</li> |
| | | <li>修复table中更多按钮切换主题色未生效修复问题</li> |
| | | <li>修复某些特性的环境生成代码变乱码TXT文件问题</li> |
| | | <li>修复代码生成图片/文件/单选时选择必填无法校验问题</li> |
| | | <li>修复某些特性的情况用户编辑对话框中角色和部门无法修改问题</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.8.4 - 2022-09-26"> |
| | | <ol> |
| | | <li>数据逻辑删除不进行唯一验证</li> |
| | | <li>Excel注解支持导出对象的子列表方法</li> |
| | | <li>Excel注解支持自定义隐藏属性列</li> |
| | | <li>Excel注解支持backgroundColor属性设置背景色</li> |
| | | <li>支持配置密码最大错误次数/锁定时间</li> |
| | | <li>登录日志新增解锁账户功能</li> |
| | | <li>通用下载方法新增config配置选项</li> |
| | | <li>支持多权限字符匹配角色数据权限</li> |
| | | <li>页面内嵌iframe切换tab不刷新数据</li> |
| | | <li>操作日志记录支持排除敏感属性字段</li> |
| | | <li>修复多文件上传报错出现的异常问题</li> |
| | | <li>修复图片预览组件src属性为null值控制台报错问题</li> |
| | | <li>升级oshi到最新版本6.2.2</li> |
| | | <li>升级fastjson到最新版2.0.14</li> |
| | | <li>升级pagehelper到最新版1.4.3</li> |
| | | <li>升级core-js到最新版本3.25.2</li> |
| | | <li>升级element-ui到最新版本2.15.10</li> |
| | | <li>优化任务过期不执行调度</li> |
| | | <li>优化字典数据使用store存取</li> |
| | | <li>优化修改资料头像被覆盖的问题</li> |
| | | <li>优化修改用户登录账号重复验证</li> |
| | | <li>优化代码生成同步后值NULL问题</li> |
| | | <li>优化定时任务支持执行父类方法</li> |
| | | <li>优化用户个人信息接口防止修改部门</li> |
| | | <li>优化布局设置使用el-drawer抽屉显示</li> |
| | | <li>优化没有权限的用户编辑部门缺少数据</li> |
| | | <li>优化日志注解记录限制请求地址的长度</li> |
| | | <li>优化excel/scale属性导出单元格数值类型</li> |
| | | <li>优化日志操作中重置按钮时重复查询的问题</li> |
| | | <li>优化多个相同角色数据导致权限SQL重复问题</li> |
| | | <li>优化表格上右侧工具条(搜索按钮显隐&右侧样式凸出)</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.8.3 - 2022-06-27"> |
| | | <ol> |
| | | <li>新增缓存列表菜单功能</li> |
| | | <li>代码生成树表新增(展开/折叠)</li> |
| | | <li>Excel注解支持color字体颜色</li> |
| | | <li>新增Anonymous匿名访问不鉴权注解</li> |
| | | <li>用户头像上传限制只能为图片格式</li> |
| | | <li>接口使用泛型使其看到响应属性字段</li> |
| | | <li>检查定时任务bean所在包名是否为白名单配置</li> |
| | | <li>添加页签openPage支持传递参数</li> |
| | | <li>用户缓存信息添加部门ancestors祖级列表</li> |
| | | <li>升级element-ui到最新版本2.15.8</li> |
| | | <li>升级oshi到最新版本6.1.6</li> |
| | | <li>升级druid到最新版本1.2.11</li> |
| | | <li>升级fastjson到最新版2.0.8</li> |
| | | <li>升级spring-boot到最新版本2.5.14</li> |
| | | <li>降级jsencrypt版本兼容IE浏览器</li> |
| | | <li>删除多余的salt字段</li> |
| | | <li>新增获取不带后缀文件名称方法</li> |
| | | <li>新增获取配置文件中的属性值方法</li> |
| | | <li>新增内容编码/解码方便插件集成使用</li> |
| | | <li>字典类型必须以字母开头,且只能为(小写字母,数字,下滑线)</li> |
| | | <li>优化设置分页参数默认值</li> |
| | | <li>优化对空字符串参数处理的过滤</li> |
| | | <li>优化显示顺序orderNum类型为整型</li> |
| | | <li>优化表单构建按钮不显示正则校验</li> |
| | | <li>优化字典数据回显样式下拉框显示值</li> |
| | | <li>优化R响应成功状态码与全局保持一致</li> |
| | | <li>优化druid开启wall过滤器出现的异常问题</li> |
| | | <li>优化用户管理左侧树型组件增加选中高亮保持</li> |
| | | <li>优化新增用户与角色信息&用户与岗位信息逻辑</li> |
| | | <li>优化默认不启用压缩文件缓存防止node_modules过大</li> |
| | | <li>修复字典数据显示不全问题</li> |
| | | <li>修复操作日志查询类型条件为0时会查到所有数据</li> |
| | | <li>修复Excel注解prompt/combo同时使用不生效问题</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.8.2 - 2022-04-01"> |
| | | <ol> |
| | | <li>前端支持设置是否需要防止数据重复提交</li> |
| | | <li>开启TopNav没有子菜单情况隐藏侧边栏</li> |
| | | <li>侧边栏菜单名称过长悬停显示标题</li> |
| | | <li>用户访问控制时校验数据权限,防止越权</li> |
| | | <li>导出Excel时屏蔽公式,防止CSV注入风险</li> |
| | | <li>组件ImagePreview支持多图预览显示</li> |
| | | <li>组件ImageUpload支持多图同时选择上传</li> |
| | | <li>组件FileUpload支持多文件同时选择上传</li> |
| | | <li>服务监控新增运行参数信息显示</li> |
| | | <li>定时任务目标字符串过滤特殊字符</li> |
| | | <li>定时任务目标字符串验证包名白名单</li> |
| | | <li>代码生成列表图片支持预览</li> |
| | | <li>代码生成编辑修改打开新页签</li> |
| | | <li>代码生成新增Java类型Boolean</li> |
| | | <li>代码生成子表支持日期/字典配置</li> |
| | | <li>代码生成同步保留必填/类型选项</li> |
| | | <li>升级oshi到最新版本6.1.2</li> |
| | | <li>升级fastjson到最新版1.2.80</li> |
| | | <li>升级pagehelper到最新版1.4.1</li> |
| | | <li>升级spring-boot到最新版本2.5.11</li> |
| | | <li>升级spring-boot-mybatis到最新版2.2.2</li> |
| | | <li>添加遗漏的分页参数合理化属性</li> |
| | | <li>修改npm即将过期的注册源地址</li> |
| | | <li>修复分页组件请求两次问题</li> |
| | | <li>修复通用文件下载接口跨域问题</li> |
| | | <li>修复Xss注解字段值为空时的异常问题</li> |
| | | <li>修复选项卡点击右键刷新丢失参数问题</li> |
| | | <li>修复表单清除元素位置未垂直居中问题</li> |
| | | <li>修复服务监控中运行参数显示条件错误</li> |
| | | <li>修复导入Excel时字典字段类型为Long转义为空问题</li> |
| | | <li>修复登录超时刷新页面跳转登录页面还提示重新登录问题</li> |
| | | <li>优化加载字典缓存数据</li> |
| | | <li>优化IP地址获取到多个的问题</li> |
| | | <li>优化任务队列满时任务拒绝策略</li> |
| | | <li>优化文件上传兼容Weblogic环境</li> |
| | | <li>优化定时任务默认保存到内存中执行</li> |
| | | <li>优化部门修改缩放后出现的错位问题</li> |
| | | <li>优化Excel格式化不同类型的日期对象</li> |
| | | <li>优化菜单表关键字导致的插件报错问题</li> |
| | | <li>优化Oracle用户头像列为空时不显示问题</li> |
| | | <li>优化页面若未匹配到字典标签则返回原字典值</li> |
| | | <li>优化修复登录失效后多次请求提示多次弹窗问题</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.8.1 - 2022-01-01"> |
| | | <ol> |
| | | <li>新增Vue3前端代码生成模板</li> |
| | | <li>新增图片预览组件</li> |
| | | <li>新增压缩插件实现打包Gzip</li> |
| | | <li>自定义xss校验注解实现</li> |
| | | <li>自定义文字复制剪贴指令</li> |
| | | <li>代码生成预览支持复制内容</li> |
| | | <li>路由支持单独配置菜单或角色权限</li> |
| | | <li>用户管理部门查询选择节点后分页参数初始</li> |
| | | <li>修复用户分配角色属性错误</li> |
| | | <li>修复打包后字体图标偶现的乱码问题</li> |
| | | <li>修复菜单管理重置表单出现的错误</li> |
| | | <li>修复版本差异导致的懒加载报错问题</li> |
| | | <li>修复Cron组件中周回显问题</li> |
| | | <li>修复定时任务多参数逗号分隔的问题</li> |
| | | <li>修复根据ID查询列表可能出现的主键溢出问题</li> |
| | | <li>修复tomcat配置参数已过期问题</li> |
| | | <li>升级clipboard到最新版本2.0.8</li> |
| | | <li>升级oshi到最新版本v5.8.6</li> |
| | | <li>升级fastjson到最新版1.2.79</li> |
| | | <li>升级spring-boot到最新版本2.5.8</li> |
| | | <li>升级log4j2到2.17.1,防止漏洞风险</li> |
| | | <li>优化下载解析blob异常提示</li> |
| | | <li>优化代码生成字典组重复问题</li> |
| | | <li>优化查询用户的角色组&岗位组代码</li> |
| | | <li>优化定时任务cron表达式小时设置24</li> |
| | | <li>优化用户导入提示溢出则显示滚动条</li> |
| | | <li>优化防重复提交标识组合为(key+url+header)</li> |
| | | <li>优化分页方法设置成通用方便灵活调用</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.8.0 - 2021-12-01"> |
| | | <ol> |
| | | <li>新增配套并同步的Vue3前端版本</li> |
| | | <li>新增通用方法简化模态/缓存/下载/权限/页签使用</li> |
| | | <li>优化导出数据/使用通用下载方法</li> |
| | | <li>Excel注解支持自定义数据处理器</li> |
| | | <li>Excel注解支持导入导出标题信息</li> |
| | | <li>Excel导入支持@Excels注解</li> |
| | | <li>新增组件data-dict,简化数据字典使用</li> |
| | | <li>新增Jaxb依赖,防止jdk8以上出现的兼容错误</li> |
| | | <li>生产环境使用路由懒加载提升页面响应速度</li> |
| | | <li>修复五级以上菜单出现的404问题</li> |
| | | <li>防重提交注解支持配置间隔时间/提示消息</li> |
| | | <li>日志注解新增是否保存响应参数</li> |
| | | <li>任务屏蔽违规字符&参数忽略双引号中的逗号</li> |
| | | <li>升级SpringBoot到最新版本2.5.6</li> |
| | | <li>升级pagehelper到最新版1.4.0</li> |
| | | <li>升级spring-boot-mybatis到最新版2.2.0</li> |
| | | <li>升级oshi到最新版本v5.8.2</li> |
| | | <li>升级druid到最新版1.2.8</li> |
| | | <li>升级velocity到最新版本2.3</li> |
| | | <li>升级fastjson到最新版1.2.78</li> |
| | | <li>升级axios到最新版本0.24.0</li> |
| | | <li>升级dart-sass到版本1.32.13</li> |
| | | <li>升级core-js到最新版本3.19.1</li> |
| | | <li>升级jsencrypt到最新版本3.2.1</li> |
| | | <li>升级js-cookie到最新版本3.0.1</li> |
| | | <li>升级file-saver到最新版本2.0.5</li> |
| | | <li>升级sass-loader到最新版本10.1.1</li> |
| | | <li>升级element-ui到最新版本2.15.6</li> |
| | | <li>新增sendGet无参请求方法</li> |
| | | <li>禁用el-tag组件的渐变动画</li> |
| | | <li>代码生成点击预览重置激活tab</li> |
| | | <li>AjaxResult重写put方法,以方便链式调用</li> |
| | | <li>优化登录/验证码请求headers不设置token</li> |
| | | <li>优化用户个人信息接口防止修改用户名</li> |
| | | <li>优化Cron表达式生成器关闭时销毁避免缓存</li> |
| | | <li>优化注册成功提示消息类型success</li> |
| | | <li>优化aop语法,使用spring自动注入注解</li> |
| | | <li>优化记录登录信息,移除不必要的修改</li> |
| | | <li>优化mybatis全局默认的执行器</li> |
| | | <li>优化Excel导入图片可能出现的异常</li> |
| | | <li>修复代码生成模板主子表删除缺少事务</li> |
| | | <li>修复日志记录可能出现的转换异常</li> |
| | | <li>修复代码生成复选框字典遗漏问题</li> |
| | | <li>修复关闭xss功能导致可重复读RepeatableFilter失效</li> |
| | | <li>修复字符串无法被反转义问题</li> |
| | | <li>修复后端主子表代码模板方法名生成错误问题</li> |
| | | <li>修复xss过滤后格式出现的异常</li> |
| | | <li>修复swagger没有指定dataTypeClass导致启动出现warn日志</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.7.0 - 2021-09-13"> |
| | | <ol> |
| | | <li>参数管理支持配置验证码开关</li> |
| | | <li>新增是否开启用户注册功能</li> |
| | | <li>定时任务支持在线生成cron表达式</li> |
| | | <li>菜单管理支持配置路由参数</li> |
| | | <li>支持自定义注解实现接口限流</li> |
| | | <li>Excel注解支持Image图片导入</li> |
| | | <li>自定义弹层溢出滚动样式</li> |
| | | <li>自定义可拖动弹窗宽度指令</li> |
| | | <li>自定义可拖动弹窗高度指令</li> |
| | | <li>修复任意账户越权问题</li> |
| | | <li>修改时检查用户数据权限范围</li> |
| | | <li>修复保存配置主题颜色失效问题</li> |
| | | <li>新增暗色菜单风格主题</li> |
| | | <li>菜单&部门新增展开/折叠功能</li> |
| | | <li>页签新增关闭左侧&添加图标</li> |
| | | <li>顶部菜单排除隐藏的默认路由</li> |
| | | <li>顶部菜单同步系统主题样式</li> |
| | | <li>跳转路由高亮相对应的菜单栏</li> |
| | | <li>代码生成主子表多选行数据</li> |
| | | <li>日期范围支持添加多组</li> |
| | | <li>升级element-ui到最新版本2.15.5</li> |
| | | <li>升级oshi到最新版本v5.8.0</li> |
| | | <li>升级commons.io到最新版本v2.11.0</li> |
| | | <li>定时任务屏蔽ldap远程调用</li> |
| | | <li>定时任务屏蔽http(s)远程调用</li> |
| | | <li>补充定时任务表字段注释</li> |
| | | <li>定时任务对检查异常进行事务回滚</li> |
| | | <li>启用父部门状态排除顶级节点</li> |
| | | <li>富文本新增上传文件大小限制</li> |
| | | <li>默认首页使用keep-alive缓存</li> |
| | | <li>修改代码生成字典回显样式</li> |
| | | <li>自定义分页合理化传入参数</li> |
| | | <li>修复字典组件值为整形不显示问题</li> |
| | | <li>修复定时任务日志执行状态显示</li> |
| | | <li>角色&菜单新增字段属性提示信息</li> |
| | | <li>修复角色分配用户页面参数类型错误提醒</li> |
| | | <li>优化布局设置动画特效</li> |
| | | <li>优化异常处理信息</li> |
| | | <li>优化错误token导致的解析异常</li> |
| | | <li>密码框新增显示切换密码图标</li> |
| | | <li>定时任务新增更多操作</li> |
| | | <li>更多操作按钮添加权限控制</li> |
| | | <li>导入用户样式优化</li> |
| | | <li>提取通用方法到基类控制器</li> |
| | | <li>优化使用权限工具获取用户信息</li> |
| | | <li>优化用户不能删除自己</li> |
| | | <li>优化XSS跨站脚本过滤</li> |
| | | <li>优化代码生成模板</li> |
| | | <li>验证码默认20s超时</li> |
| | | <li>BLOB下载时清除URL对象引用</li> |
| | | <li>代码生成导入表按创建时间排序</li> |
| | | <li>修复代码生成页面数据编辑保存之后总是跳转第一页的问题</li> |
| | | <li>修复带safari浏览器无法格式化utc日期格式yyyy-MM-dd'T'HH:mm:ss.SSS问题</li> |
| | | <li>多图上传组件移除多余的api地址&验证失败导致图片删除问题&无法删除相应图片修复</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.6.0 - 2021-07-12"> |
| | | <ol> |
| | | <li>角色管理新增分配用户功能</li> |
| | | <li>用户管理新增分配角色功能</li> |
| | | <li>日志列表支持排序操作</li> |
| | | <li>优化参数&字典缓存操作</li> |
| | | <li>系统布局配置支持动态标题开关</li> |
| | | <li>菜单路由配置支持内链访问</li> |
| | | <li>默认访问后端首页新增提示语</li> |
| | | <li>富文本默认上传返回url类型</li> |
| | | <li>新增自定义弹窗拖拽指令</li> |
| | | <li>全局注册常用通用组件</li> |
| | | <li>全局挂载字典标签组件</li> |
| | | <li>ImageUpload组件支持多图片上传</li> |
| | | <li>FileUpload组件支持多文件上传</li> |
| | | <li>文件上传组件添加数量限制属性</li> |
| | | <li>富文本编辑组件添加类型属性</li> |
| | | <li>富文本组件工具栏配置视频</li> |
| | | <li>封装通用iframe组件</li> |
| | | <li>限制超级管理员不允许操作</li> |
| | | <li>用户信息长度校验限制</li> |
| | | <li>分页组件新增pagerCount属性</li> |
| | | <li>添加bat脚本执行应用</li> |
| | | <li>升级oshi到最新版本v5.7.4</li> |
| | | <li>升级element-ui到最新版本2.15.2</li> |
| | | <li>升级pagehelper到最新版1.3.1</li> |
| | | <li>升级commons.io到最新版本v2.10.0</li> |
| | | <li>升级commons.fileupload到最新版本v1.4</li> |
| | | <li>升级swagger到最新版本v3.0.0</li> |
| | | <li>修复关闭confirm提示框控制台报错问题</li> |
| | | <li>修复存在的SQL注入漏洞问题</li> |
| | | <li>定时任务屏蔽rmi远程调用</li> |
| | | <li>修复用户搜索分页变量错误</li> |
| | | <li>修复导出角色数据范围翻译缺少仅本人</li> |
| | | <li>修复表单构建选择下拉选择控制台报错问题</li> |
| | | <li>优化图片工具类读取文件</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.5.0 - 2021-05-25"> |
| | | <ol> |
| | | <li>新增菜单导航显示风格TopNav(false为左侧导航菜单,true为顶部导航菜单)</li> |
| | | <li>布局设置支持保存&重置配置</li> |
| | | <li>修复树表数据显示不全&加载慢问题</li> |
| | | <li>新增IE浏览器版本过低提示页面</li> |
| | | <li>用户登录后记录最后登录IP&时间</li> |
| | | <li>页面导出按钮点击之后添加遮罩</li> |
| | | <li>富文本编辑器支持自定义上传地址</li> |
| | | <li>富文本编辑组件新增readOnly属性</li> |
| | | <li>页签TagsView新增关闭右侧功能</li> |
| | | <li>显隐列组件加载初始默认隐藏列</li> |
| | | <li>关闭头像上传窗口还原默认图片</li> |
| | | <li>个人信息添加手机&邮箱重复验证</li> |
| | | <li>代码生成模板导出按钮点击后添加遮罩</li> |
| | | <li>代码生成模板树表操作列添加新增按钮</li> |
| | | <li>代码生成模板修复主子表字段重名问题</li> |
| | | <li>升级fastjson到最新版1.2.76</li> |
| | | <li>升级druid到最新版本v1.2.6</li> |
| | | <li>升级mybatis到最新版3.5.6 阻止远程代码执行漏洞</li> |
| | | <li>升级oshi到最新版本v5.6.0</li> |
| | | <li>velocity剔除commons-collections版本,防止3.2.1版本的反序列化漏洞</li> |
| | | <li>数据监控页默认账户密码防止越权访问</li> |
| | | <li>修复firefox下表单构建拖拽会新打卡一个选项卡</li> |
| | | <li>修正后端导入表权限标识</li> |
| | | <li>修正前端操作日志&登录日志权限标识</li> |
| | | <li>设置Redis配置HashKey序列化</li> |
| | | <li>删除操作日志记录信息</li> |
| | | <li>上传媒体类型添加视频格式</li> |
| | | <li>修复请求形参未传值记录日志异常问题</li> |
| | | <li>优化xss校验json请求条件</li> |
| | | <li>树级结构更新子节点使用replaceFirst</li> |
| | | <li>优化ExcelUtil空值处理</li> |
| | | <li>日志记录过滤BindingResult对象,防止异常</li> |
| | | <li>修改主题后mini类型按钮无效问题</li> |
| | | <li>优化通用下载完成后删除节点</li> |
| | | <li>通用Controller添加响应返回消息</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.4.0 - 2021-02-22"> |
| | | <ol> |
| | | <li>代码生成模板支持主子表</li> |
| | | <li>表格右侧工具栏组件支持显隐列</li> |
| | | <li>图片组件添加预览&移除功能</li> |
| | | <li>Excel注解支持Image图片导出</li> |
| | | <li>操作按钮组调整为朴素按钮样式</li> |
| | | <li>代码生成支持文件上传组件</li> |
| | | <li>代码生成日期控件区分范围</li> |
| | | <li>代码生成数据库文本类型生成表单文本域</li> |
| | | <li>用户手机邮箱&菜单组件修改允许空字符串</li> |
| | | <li>升级SpringBoot到最新版本2.2.13 提升启动速度</li> |
| | | <li>升级druid到最新版本v1.2.4</li> |
| | | <li>升级fastjson到最新版1.2.75</li> |
| | | <li>升级element-ui到最新版本2.15.0</li> |
| | | <li>修复IE11浏览器报错问题</li> |
| | | <li>优化多级菜单之间切换无法缓存的问题</li> |
| | | <li>修复四级菜单无法显示问题</li> |
| | | <li>修正侧边栏静态路由丢失问题</li> |
| | | <li>修复角色管理-编辑角色-功能权限显示异常</li> |
| | | <li>配置文件新增redis数据库索引属性</li> |
| | | <li>权限工具类增加admin判断</li> |
| | | <li>角色非自定义权限范围清空选择值</li> |
| | | <li>修复导入数据为负浮点数时丢失精度问题</li> |
| | | <li>移除path-to-regexp正则匹配插件</li> |
| | | <li>修复生成树表代码异常</li> |
| | | <li>修改ip字段长度防止ipv6地址长度不够</li> |
| | | <li>防止get请求参数值为false或0等特殊值会导致无法正确的传参</li> |
| | | <li>登录后push添加catch防止出现检查错误</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.3.0 - 2020-12-14"> |
| | | <ol> |
| | | <li>新增缓存监控功能</li> |
| | | <li>支持主题风格配置</li> |
| | | <li>修复多级菜单之间切换无法缓存的问题</li> |
| | | <li>多级菜单自动配置组件</li> |
| | | <li>代码生成预览支持高亮显示</li> |
| | | <li>支持Get请求映射Params参数</li> |
| | | <li>删除用户和角色解绑关联</li> |
| | | <li>去除用户手机邮箱部门必填验证</li> |
| | | <li>Excel支持注解align对齐方式</li> |
| | | <li>Excel支持导入Boolean型数据</li> |
| | | <li>优化头像样式,鼠标移入悬停遮罩</li> |
| | | <li>代码生成预览提供滚动机制</li> |
| | | <li>代码生成删除多余的数字float类型</li> |
| | | <li>修正转换字符串的目标字符集属性</li> |
| | | <li>回显数据字典防止空值报错</li> |
| | | <li>日志记录增加过滤多文件场景</li> |
| | | <li>修改缓存Set方法可能导致嵌套的问题</li> |
| | | <li>移除前端一些多余的依赖</li> |
| | | <li>防止安全扫描YUI出现的风险提示</li> |
| | | <li>修改node-sass为dart-sass</li> |
| | | <li>升级SpringBoot到最新版本2.1.18</li> |
| | | <li>升级poi到最新版本4.1.2</li> |
| | | <li>升级oshi到最新版本v5.3.6</li> |
| | | <li>升级bitwalker到最新版本1.21</li> |
| | | <li>升级axios到最新版本0.21.0</li> |
| | | <li>升级element-ui到最新版本2.14.1</li> |
| | | <li>升级vue到最新版本2.6.12</li> |
| | | <li>升级vuex到最新版本3.6.0</li> |
| | | <li>升级vue-cli到版本4.5.9</li> |
| | | <li>升级vue-router到最新版本3.4.9</li> |
| | | <li>升级vue-cli到最新版本4.4.6</li> |
| | | <li>升级vue-cropper到最新版本0.5.5</li> |
| | | <li>升级clipboard到最新版本2.0.6</li> |
| | | <li>升级core-js到最新版本3.8.1</li> |
| | | <li>升级echarts到最新版本4.9.0</li> |
| | | <li>升级file-saver到最新版本2.0.4</li> |
| | | <li>升级fuse.js到最新版本6.4.3</li> |
| | | <li>升级js-beautify到最新版本1.13.0</li> |
| | | <li>升级js-cookie到最新版本2.2.1</li> |
| | | <li>升级path-to-regexp到最新版本6.2.0</li> |
| | | <li>升级quill到最新版本1.3.7</li> |
| | | <li>升级screenfull到最新版本5.0.2</li> |
| | | <li>升级sortablejs到最新版本1.10.2</li> |
| | | <li>升级vuedraggable到最新版本2.24.3</li> |
| | | <li>升级chalk到最新版本4.1.0</li> |
| | | <li>升级eslint到最新版本7.15.0</li> |
| | | <li>升级eslint-plugin-vue到最新版本7.2.0</li> |
| | | <li>升级lint-staged到最新版本10.5.3</li> |
| | | <li>升级runjs到最新版本4.4.2</li> |
| | | <li>升级sass-loader到最新版本10.1.0</li> |
| | | <li>升级script-ext-html-webpack-plugin到最新版本2.1.5</li> |
| | | <li>升级svg-sprite-loader到最新版本5.1.1</li> |
| | | <li>升级vue-template-compiler到最新版本2.6.12</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.2.1 - 2020-11-18"> |
| | | <ol> |
| | | <li>阻止任意文件下载漏洞</li> |
| | | <li>代码生成支持上传控件</li> |
| | | <li>新增图片上传组件</li> |
| | | <li>调整默认首页</li> |
| | | <li>升级druid到最新版本v1.2.2</li> |
| | | <li>mapperLocations配置支持分隔符</li> |
| | | <li>权限信息调整</li> |
| | | <li>调整sql默认时间</li> |
| | | <li>解决代码生成没有bit类型的问题</li> |
| | | <li>升级pagehelper到最新版1.3.0</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v3.2.0 - 2020-10-10"> |
| | | <ol> |
| | | <li>升级springboot版本到2.1.17 提升安全性</li> |
| | | <li>升级oshi到最新版本v5.2.5</li> |
| | | <li>升级druid到最新版本v1.2.1</li> |
| | | <li>升级jjwt到版本0.9.1</li> |
| | | <li>升级fastjson到最新版1.2.74</li> |
| | | <li>修改sass为node-sass,避免el-icon图标乱码</li> |
| | | <li>代码生成支持同步数据库</li> |
| | | <li>代码生成支持富文本控件</li> |
| | | <li>代码生成页面时不忽略remark属性</li> |
| | | <li>代码生成添加select必填选项</li> |
| | | <li>Excel导出类型NUMERIC支持精度浮点类型</li> |
| | | <li>Excel导出targetAttr优化获取值,防止get方法不规范</li> |
| | | <li>Excel注解支持自动统计数据总和</li> |
| | | <li>Excel注解支持设置BigDecimal精度&舍入规则</li> |
| | | <li>菜单&数据权限新增(展开/折叠 全选/全不选 父子联动)</li> |
| | | <li>允许用户分配到部门父节点</li> |
| | | <li>菜单新增是否缓存keep-alive</li> |
| | | <li>表格操作列间距调整</li> |
| | | <li>限制系统内置参数不允许删除</li> |
| | | <li>富文本组件优化,支持自定义高度&图片冲突问题</li> |
| | | <li>富文本工具栏样式对齐</li> |
| | | <li>导入excel整形值校验优化</li> |
| | | <li>修复页签关闭所有时固定标签路由不刷新问题</li> |
| | | <li>表单构建布局型组件新增按钮</li> |
| | | <li>左侧菜单文字过长显示省略号</li> |
| | | <li>修正根节点为子部门时,树状结构显示问题</li> |
| | | <li>修正调用目标字符串最大长度</li> |
| | | <li>修正菜单提示信息错误</li> |
| | | <li>修正定时任务执行一次权限标识</li> |
| | | <li>修正数据库字符串类型nvarchar</li> |
| | | <li>优化递归子节点</li> |
| | | <li>优化数据权限判断</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | |
| | | <el-collapse-item title="v3.1.0 - 2020-08-13"> |
| | | <ol> |
| | | <li>表格工具栏右侧添加刷新&显隐查询组件</li> |
| | | <li>后端支持CORS跨域请求</li> |
| | | <li>代码生成支持选择上级菜单</li> |
| | | <li>代码生成支持自定义路径</li> |
| | | <li>代码生成支持复选框</li> |
| | | <li>Excel导出导入支持dictType字典类型</li> |
| | | <li>Excel支持分割字符串组内容</li> |
| | | <li>验证码类型支持(数组计算、字符验证)</li> |
| | | <li>升级vue-cli版本到4.4.4</li> |
| | | <li>修改 node-sass 为 dart-sass</li> |
| | | <li>表单类型为Integer/Long设置整形默认值</li> |
| | | <li>代码生成器默认mapper路径与默认mapperScan路径不一致</li> |
| | | <li>优化防重复提交拦截器</li> |
| | | <li>优化上级菜单不能选择自己</li> |
| | | <li>修复角色的权限分配后,未实时生效问题</li> |
| | | <li>修复在线用户日志记录类型</li> |
| | | <li>修复富文本空格和缩进保存后不生效问题</li> |
| | | <li>修复在线用户判断逻辑</li> |
| | | <li>唯一限制条件只返回单条数据</li> |
| | | <li>添加获取当前的环境配置方法</li> |
| | | <li>超时登录后页面跳转到首页</li> |
| | | <li>全局异常状态汉化拦截处理</li> |
| | | <li>HTML过滤器改为将html转义</li> |
| | | <li>检查字符支持小数点&降级改成异常提醒</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | |
| | | <el-collapse-item title="v3.0.0 - 2020-07-20"> |
| | | <ol> |
| | | <li>单应用调整为多模块项目</li> |
| | | <li>升级element-ui版本到2.13.2</li> |
| | | <li>删除babel,提高编译速度。</li> |
| | | <li>新增菜单默认主类目</li> |
| | | <li>编码文件名修改为uuid方式</li> |
| | | <li>定时任务cron表达式验证</li> |
| | | <li>角色权限修改时已有权限未自动勾选异常修复</li> |
| | | <li>防止切换权限用户后登录出现404</li> |
| | | <li>Excel支持sort导出排序</li> |
| | | <li>创建用户不允许选择超级管理员角色</li> |
| | | <li>修复代码生成导入表结构出现异常页面不提醒问题</li> |
| | | <li>修复代码生成点击多次表修改数据不变化的问题</li> |
| | | <li>修复头像上传成功二次打开无法改变裁剪框大小和位置问题</li> |
| | | <li>修复布局为small者mini用户表单显示错位问题</li> |
| | | <li>修复热部署导致的强换异常问题</li> |
| | | <li>修改用户管理复选框宽度,防止部分浏览器出现省略号</li> |
| | | <li>IpUtils工具,清除Xss特殊字符,防止Xff注入攻击</li> |
| | | <li>生成domain 如果是浮点型 统一用BigDecimal</li> |
| | | <li>定时任务调整label-width,防止部署出现错位</li> |
| | | <li>调整表头固定列默认样式</li> |
| | | <li>代码生成模板调整,字段为String并且必填则加空串条件</li> |
| | | <li>代码生成字典Integer/Long使用parseInt</li> |
| | | <li> |
| | | 修复dict_sort不可update为0的问题&查询返回增加dict_sort升序排序 |
| | | </li> |
| | | <li>修正岗位导出权限注解</li> |
| | | <li>禁止加密密文返回前端</li> |
| | | <li>修复代码生成页面中的查询条件创建时间未生效的问题</li> |
| | | <li>修复首页搜索菜单外链无法点击跳转问题</li> |
| | | <li>修复菜单管理选择图标,backspace删除时不过滤数据</li> |
| | | <li>用户管理部门分支节点不可检查&显示计数</li> |
| | | <li>数据范围过滤属性调整</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | |
| | | <el-collapse-item title="v2.3.0 - 2020-06-01"> |
| | | <ol> |
| | | <li>升级fastjson到最新版1.2.70 修复高危安全漏洞</li> |
| | | <li>dev启动默认打开浏览器</li> |
| | | <li>vue-cli使用默认source-map</li> |
| | | <li>slidebar eslint报错优化</li> |
| | | <li>当tags-view滚动关闭右键菜单</li> |
| | | <li>字典管理添加缓存读取</li> |
| | | <li>参数管理支持缓存操作</li> |
| | | <li>支持一级菜单(和主页同级)在main区域显示</li> |
| | | <li>限制外链地址必须以http(s)开头</li> |
| | | <li>tagview & sidebar 主题颜色与element ui(全局)同步</li> |
| | | <li>修改数据源类型优先级,先根据方法,再根据类</li> |
| | | <li>支持是否需要设置token属性,自定义返回码消息。</li> |
| | | <li>swagger请求前缀加入配置。</li> |
| | | <li>登录地点设置内容过长则隐藏显示</li> |
| | | <li>修复定时任务执行一次按钮后不提示消息问题</li> |
| | | <li>修改上级部门(选择项排除本身和下级)</li> |
| | | <li>通用http发送方法增加参数 contentType 编码类型</li> |
| | | <li>更换IP地址查询接口</li> |
| | | <li>修复页签变量undefined</li> |
| | | <li>添加校验部门包含未停用的子部门</li> |
| | | <li>修改定时任务详情下次执行时间日期显示错误</li> |
| | | <li>角色管理查询设置默认排序字段</li> |
| | | <li>swagger添加enable参数控制是否启用</li> |
| | | <li>只对json类型请求构建可重复读取inputStream的request</li> |
| | | <li>修改代码生成字典字段int类型没有自动选中问题</li> |
| | | <li>vuex用户名取值修正</li> |
| | | <li>表格树模板去掉多余的)</li> |
| | | <li>代码生成序号修正</li> |
| | | <li>全屏情况下不调整上外边距</li> |
| | | <li>代码生成Date字段添加默认格式</li> |
| | | <li>用户管理角色选择权限控制</li> |
| | | <li>修复路由懒加载报错问题</li> |
| | | <li>模板sql.vm添加菜单状态</li> |
| | | <li>设置用户名称不能修改</li> |
| | | <li>dialog添加append-to-body属性,防止ie遮罩</li> |
| | | <li>菜单区分状态和显示隐藏功能</li> |
| | | <li>升级fastjson到最新版1.2.68 修复安全加固</li> |
| | | <li>修复代码生成如果选择字典类型缺失逗号问题</li> |
| | | <li>登录请求params更换为data,防止暴露url</li> |
| | | <li>日志返回时间格式处理</li> |
| | | <li>添加handle控制允许拖动的元素</li> |
| | | <li>布局设置点击扩大范围</li> |
| | | <li>代码生成列属性排序查询</li> |
| | | <li>代码生成列支持拖动排序</li> |
| | | <li>修复时间格式不支持ios问题</li> |
| | | <li>表单构建添加父级class,防止冲突</li> |
| | | <li>定时任务并发属性修正</li> |
| | | <li>角色禁用&菜单隐藏不查询权限</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | |
| | | <el-collapse-item title="v2.2.0 - 2020-03-18"> |
| | | <ol> |
| | | <li>系统监控新增定时任务功能</li> |
| | | <li>添加一个打包Web工程bat</li> |
| | | <li>修复页签鼠标滚轮按下的时候,可以关闭不可关闭的tag</li> |
| | | <li>修复点击退出登录有时会无提示问题</li> |
| | | <li>修复防重复提交注解无效问题</li> |
| | | <li>修复通知公告批量删除异常问题</li> |
| | | <li>添加菜单时路由地址必填限制</li> |
| | | <li>代码生成字段描述可编辑</li> |
| | | <li>修复用户修改个人信息导致缓存不过期问题</li> |
| | | <li>个人信息创建时间获取正确属性值</li> |
| | | <li>操作日志详细显示正确类型</li> |
| | | <li>导入表单击行数据时选中对应的复选框</li> |
| | | <li>批量替换表前缀逻辑调整</li> |
| | | <li>固定重定向路径表达式</li> |
| | | <li>升级element-ui版本到2.13.0</li> |
| | | <li>操作日志排序调整</li> |
| | | <li>修复charts切换侧边栏或者缩放窗口显示bug</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | |
| | | <el-collapse-item title="v2.1.0 - 2020-02-24"> |
| | | <ol> |
| | | <li>新增表单构建</li> |
| | | <li>代码生成支持树表结构</li> |
| | | <li>新增用户导入</li> |
| | | <li>修复动态加载路由页面刷新问题</li> |
| | | <li>修复地址开关无效问题</li> |
| | | <li>汉化错误提示页面</li> |
| | | <li>代码生成已知问题修改</li> |
| | | <li>修复多数据源下配置关闭出现异常处理</li> |
| | | <li>添加HTML过滤器,用于去除XSS漏洞隐患</li> |
| | | <li>修复上传头像控制台出现异常</li> |
| | | <li>修改用户管理分页不正确的问题</li> |
| | | <li>修复验证码记录提示错误</li> |
| | | <li>修复request.js缺少Message引用</li> |
| | | <li>修复表格时间为空出现的异常</li> |
| | | <li>添加Jackson日期反序列化时区配置</li> |
| | | <li>调整根据用户权限加载菜单数据树形结构</li> |
| | | <li>调整成功登录不恢复按钮,防止多次点击</li> |
| | | <li>修改用户个人资料同步缓存信息</li> |
| | | <li>修复页面同时出现el-upload和Editor不显示处理</li> |
| | | <li>修复在角色管理页修改菜单权限偶尔未选中问题</li> |
| | | <li>配置文件新增redis密码属性</li> |
| | | <li>设置mybatis全局的配置文件</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | |
| | | <el-collapse-item title="v2.0.0 - 2019-12-02"> |
| | | <ol> |
| | | <li>新增代码生成</li> |
| | | <li>新增@RepeatSubmit注解,防止重复提交</li> |
| | | <li>新增菜单主目录添加/删除操作</li> |
| | | <li>日志记录过滤特殊对象,防止转换异常</li> |
| | | <li>修改代码生成路由脚本错误</li> |
| | | <li>用户上传头像实时同步缓存,无需重新登录</li> |
| | | <li>调整切换页签后不重新加载数据</li> |
| | | <li>添加jsencrypt实现参数的前端加密</li> |
| | | <li>系统退出删除用户缓存记录</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v1.1.0 - 2019-11-11"> |
| | | <ol> |
| | | <li>新增在线用户管理</li> |
| | | <li>新增按钮组功能实现(批量删除、导出、清空)</li> |
| | | <li>新增查询条件重置按钮</li> |
| | | <li>新增Swagger全局Token配置</li> |
| | | <li>新增后端参数校验</li> |
| | | <li>修复字典管理页面的日期查询异常</li> |
| | | <li>修改时间函数命名防止冲突</li> |
| | | <li>去除菜单上级校验,默认为顶级</li> |
| | | <li>修复用户密码无法修改问题</li> |
| | | <li>修复菜单类型为按钮时不显示权限标识</li> |
| | | <li>其他细节优化</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="v1.0.0 - 2019-10-08"> |
| | | <ol> |
| | | <li>若依前后端分离系统正式发布</li> |
| | | </ol> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </el-card> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="12" :lg="8"> |
| | | <el-card class="update-log"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>捐赠支持</span> |
| | | </div> |
| | | <div class="body"> |
| | | <img |
| | | src="@/assets/images/pay.png" |
| | | alt="donate" |
| | | width="100%" |
| | | /> |
| | | <span style="display: inline-block; height: 30px; line-height: 30px" |
| | | >你可以请作者喝杯咖啡表示鼓励</span |
| | | > |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <div> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | style="width: 750px; font-size: x-large; font-weight: bolder"> |
| | | <el-table-column |
| | | class="fontHead" |
| | | fixed |
| | | prop="sfcCode" |
| | | label="等待打标信息" |
| | | width="550" |
| | | > |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | width="200" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button @click="deleteRow(scope.row)" type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | import {crave, reCrave, printList, delStationCollection} from "../api/main/da/stationCollection"; |
| | | |
| | | export default { |
| | | name: "Index", |
| | | data() { |
| | | return { |
| | | // 版本号 |
| | | version: "3.8.8" |
| | | version: "3.8.8", |
| | | sfcCode: '', |
| | | tableData: [], |
| | | }; |
| | | }, |
| | | methods: { |
| | | goTarget(href) { |
| | | window.open(href, "_blank"); |
| | | } |
| | | |
| | | //关于此页面还需要验证, |
| | | //如果打标软件能够执行两条sql语句,第二条sql语句为达标完成的标识修改,此时页面可显示多条待打标数据,此时可以有删除按钮 |
| | | //如果不支持多条sql语句,不需要删除操作,逻辑为输入一条打一条 |
| | | deleteRow(row){ |
| | | delStationCollection(row.id).then(res => { |
| | | console.log("res",res) |
| | | this.flushMethod() |
| | | }) |
| | | }, |
| | | open() { |
| | | this.$confirm('此序列号已刻码,是否需要重新刻码?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | console.log('111111') |
| | | reCrave({sfcCode:this.sfcCode}).then(res => { |
| | | console.log('res',res) |
| | | this.flushMethod() |
| | | }) |
| | | this.$message({ |
| | | type: 'success', |
| | | message: '确认重新刻码!' |
| | | }); |
| | | }).catch(() => { |
| | | console.log('222222') |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已取消' |
| | | }); |
| | | }); |
| | | }, |
| | | carveMethod(){ |
| | | crave({sfcCode:this.sfcCode}).then(res => { |
| | | console.log('res',res) |
| | | if (res.code === 200) { |
| | | if (res.data === 200){ |
| | | this.$message({ |
| | | message: '刻码信息发送成功', |
| | | type: 'success' |
| | | }); |
| | | this.flushMethod() |
| | | } else if (res.data === 303){ |
| | | this.open() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | flushMethod(){ |
| | | printList().then(res => { |
| | | console.log(res) |
| | | if (res.code === 200){ |
| | | this.tableData = res.data |
| | | } else { |
| | | this.$message({ |
| | | message: '查询失败,请联系管理员', |
| | | type: 'info' |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | |
| | | |
| | | }, |
| | | mounted(){ |
| | | this.interval = setInterval(() => { |
| | | this.flushMethod() |
| | | }, 3000); |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(this.interval); // 清除定时器,防止内存泄漏 |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | ::v-deep .el-input__inner{ |
| | | height: 50px; |
| | | } |
| | | //::v-deep .el-table--border .el-table__cell:first-child .cell{ |
| | | // font-size: x-large; |
| | | //} |
| | | .home { |
| | | blockquote { |
| | | padding: 10px 20px; |
| | |
| | | return { |
| | | codeUrl: "", |
| | | loginForm: { |
| | | username: "admin", |
| | | password: "admin123", |
| | | username: "", |
| | | password: "", |
| | | rememberMe: false, |
| | | code: "", |
| | | uuid: "" |