fengjin
2022-11-10 32487a093a941e37090e299cc1d7e9e8d124a42f
1.修改bug  2.添加法律法规实体类
5个文件已修改
3个文件已添加
188 ■■■■■ 已修改文件
flower_city/src/main/java/com/dg/core/controller/CommonController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/entity/AutomessagePolicyDocuments.java 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/gen/mapper/AutomessagePolicyDocumentsMapper.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/db/manual/mapper/util/MapperGenerator.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/task/SendWsListener.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/AutomessagePolicyDocumentsMapper.xml 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/OrganizationChartMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/TransactionEventMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/java/com/dg/core/controller/CommonController.java
@@ -151,7 +151,6 @@
            return success("工作日");
    }
    /**
     * 获取天气默认为攀枝花
     */
flower_city/src/main/java/com/dg/core/db/gen/entity/AutomessagePolicyDocuments.java
New file
@@ -0,0 +1,95 @@
package com.dg.core.db.gen.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * <p>
 * 法律法规政策文件实体类
 * </p>
 *
 * @author fengjin
 * @since 2022-11-10
 */
@TableName("automessage_policy_documents")
@Data
@ApiModel("法律法规政策文件实体类")
public class AutomessagePolicyDocuments implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键id
     */
    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 部门id
     */
    @ApiModelProperty("部门id")
    private Integer departmentId;
    /**
     * 名称
     */
    @ApiModelProperty("名称")
    private String name;
    /**
     * 跳转链接类型(1.富文本2.微信文章)
     */
    @ApiModelProperty("名称")
    private String linkType;
    /**
     * 文章链接
     */
    @ApiModelProperty("文章链接")
    private String articleLink;
    /**
     * 文章富文本
     */
    @ApiModelProperty("文章富文本")
    private String richText;
    /**
     * 类型(1.法律法规2.政策文件)
     */
    @ApiModelProperty("类型(1.法律法规2.政策文件)")
    private Integer type;
    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
    /**
     * 创建人
     */
    @ApiModelProperty("创建人")
    private Integer createUserId;
    /**
     * 修改时间
     */
    @ApiModelProperty("修改时间")
    private LocalDateTime updateTime;
    /**
     * 修改人
     */
    @ApiModelProperty("修改人")
    private Integer  updateUserId;
}
flower_city/src/main/java/com/dg/core/db/gen/mapper/AutomessagePolicyDocumentsMapper.java
New file
@@ -0,0 +1,20 @@
package com.dg.core.db.gen.mapper;
import com.dg.core.db.gen.entity.AutomessagePolicyDocuments;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author fengjin
 * @since 2022-11-10
 */
public interface AutomessagePolicyDocumentsMapper extends BaseMapper<AutomessagePolicyDocuments> {
   List<AutomessagePolicyDocuments> selectConfigList();
}
flower_city/src/main/java/com/dg/core/db/manual/mapper/util/MapperGenerator.java
@@ -34,7 +34,7 @@
                })
                .strategyConfig(builder -> {
//                    builder.addInclude("");
                    builder.addInclude("automessage_sys_user_record") // 设置需要生成的表名
                    builder.addInclude("automessage_policy_documents") // 设置需要生成的表名
                            .addTablePrefix("t_", "c_"); // 设置过滤表前缀
                })
                .templateConfig(builder -> {
flower_city/src/main/java/com/dg/core/task/SendWsListener.java
@@ -1,21 +1,24 @@
package com.dg.core.task;
import com.dg.core.service.IGuideRepairOrderService;
import com.dg.core.util.TestDate;
import org.springframework.data.redis.core.RedisTemplate;
import javax.annotation.Resource;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
import java.util.Calendar;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
import java.util.*;
@WebListener
public class SendWsListener implements ServletContextListener {
    @Resource
    private IGuideRepairOrderService iGuideRepairOrderService;
    @Resource
    RedisTemplate<String, Object> redisTemplate;
    @Override
    public void contextDestroyed(ServletContextEvent arg0) {
        System.out.println("定时发送Xml信息监听--已关闭!");
@@ -57,6 +60,9 @@
                iGuideRepairOrderService.pushOvertimeGuideRepairOrder();
                //定时更新未评价的单据评价状态
                iGuideRepairOrderService.updateEvaluate();
                TestDate td = new TestDate();
                Map weather = td.getWeather("510400");
                redisTemplate.opsForValue().set("weather",weather);
                // TODO 写你的逻辑
            }
        }, defaultdate, 1 * 60 * 1000);// 定时每15分钟
flower_city/src/main/resources/mapper/AutomessagePolicyDocumentsMapper.xml
New file
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dg.core.db.gen.mapper.AutomessagePolicyDocumentsMapper">
    <resultMap type="com.dg.core.db.gen.entity.AutomessagePolicyDocuments" id="AutomessagePolicyDocumentsResult">
        <id     property="id"      column="id"      />
        <id     property="departmentId"      column="department_id"      />
        <id     property="name"      column="name"      />
        <id     property="linkType"      column="link_type"      />
        <id     property="articleLink"      column="article_link"      />
        <id     property="richText"      column="rich_text"      />
        <id     property="type"      column="type"      />
        <id     property="createTime"      column="create_time"      />
        <id     property="createUserId"      column="create_user_id"      />
        <id     property="updateTime"      column="update_time"      />
        <id     property="updateUserId"      column="update_user_id"      />
    </resultMap>
    <sql id="selectAutomessagePolicyDocumentsResult">
        SELECT
            id,
            (select organization_name from  automessage_organization_chart where id=a.department_id )departmentName,
            department_id,
            name,
            link_type,
            type,
            article_link,
            rich_text,
            create_time,
            update_time,
            (select user_name from automessage_sys_user where user_id=a.update_user_id)updateUserName,
            update_user_id,
            (select user_name from automessage_sys_user where user_id=a.create_user_id)createUserName,
            create_user_id
        FROM
            automessage_policy_documents a
    </sql>
    <select id="selectConfigList" resultMap="AutomessagePolicyDocumentsResult">
        <include refid="selectAutomessagePolicyDocumentsResult" />
        <where>
            <if test="name!=null and name!=''">
                and name  like concat('%', #{name}, '%')
            </if>
            <if test="type!=null">
                and type = #{type}
            </if>
        </where>
    </select>
</mapper>
flower_city/src/main/resources/mapper/OrganizationChartMapper.xml
@@ -165,7 +165,7 @@
            <if test="updateUserId != null">update_user_id=#{updateUserId},</if>
            <if test="areaList != null and areaList != '' ">area_list=#{areaList},</if>
            <if test="contactNumber != null and contactNumber != '' ">contact_number=#{contactNumber},</if>
            <if test="departmentalApplication != null and departmentalApplication != '' ">departmental_application=#{departmentalApplication},</if>
            <if test="departmentalApplication != null  ">departmental_application=#{departmentalApplication},</if>
            <if test="updateUserId != null and updateUserId != '' ">update_user_id=#{updateUserId},</if>
            <if test="resume != null and resume != '' ">resume=#{resume},</if>
            update_time=sysdate()
flower_city/src/main/resources/mapper/TransactionEventMapper.xml
@@ -388,7 +388,9 @@
    </select>
    <select id="sumTransactionNum"  resultMap="TransactionEventEntityResult">
        select sum(transaction_num)sumTransactionNum,count(*) counttransaction   FROM automessage_transaction_event
        select sum(TransactionNum)sumTransactionNum,  count(*) counttransaction from (
        SELECT (select count(id) from automessage_guide_repair_order where state in (3,4) and  a.id=matter_id) TransactionNum
        from automessage_transaction_event a)k
    </select>
    <select id="queryByClassifyIdList"  resultMap="TransactionEventEntityResult">