parent
84d48102b9
commit
6beedebf98
@ -0,0 +1,91 @@
|
||||
package com.ruoyi.jjh.ent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 首页智能提醒数据返回体
|
||||
* @author du
|
||||
* @since 2024/7/1 19:29
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("首页智能提醒数据返回体")
|
||||
public class HomeRequestSmart {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 申报记录id
|
||||
*/
|
||||
@ApiModelProperty("申报记录id")
|
||||
private Long declarationId;
|
||||
|
||||
|
||||
/**
|
||||
* 申报记录名称
|
||||
*/
|
||||
@ApiModelProperty("申报记录名称")
|
||||
private String declarationName;
|
||||
|
||||
/**
|
||||
* 是否已读
|
||||
*/
|
||||
@ApiModelProperty("是否已读 1未读 2已读")
|
||||
private Integer isRead;
|
||||
|
||||
/**
|
||||
* 统一社会信用代码
|
||||
*/
|
||||
@ApiModelProperty("统一社会信用代码")
|
||||
private String tyshxydm;
|
||||
|
||||
/**
|
||||
* 提醒对象 1.企业用户 2政务用户
|
||||
*/
|
||||
@ApiModelProperty("提醒对象 1.企业用户 2政务用户")
|
||||
private Integer alertRecipients;
|
||||
|
||||
/**
|
||||
* 提醒方式 1.定时提醒 2.不定时提醒
|
||||
*/
|
||||
@ApiModelProperty("提醒方式 1.定期提醒 2.不定期提醒")
|
||||
private Integer alertManner;
|
||||
|
||||
/**
|
||||
* 提醒时间
|
||||
*/
|
||||
@ApiModelProperty("提醒时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime alertTime;
|
||||
|
||||
/**
|
||||
* 提前天数提醒
|
||||
*/
|
||||
@ApiModelProperty("提前天数提醒")
|
||||
private Integer daysAdvance;
|
||||
|
||||
/**
|
||||
* 提醒内容
|
||||
*/
|
||||
@ApiModelProperty("提醒内容")
|
||||
private String alertContent;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ApiModelProperty("项目ID")
|
||||
private String projectId;
|
||||
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package com.ruoyi.jjh.ent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 企业端首页智能提醒数据返回体
|
||||
* @author du
|
||||
* @since 2024/7/1 19:29
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("企业端首页智能提醒返回体")
|
||||
public class JSmartDeclaration {
|
||||
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty("Id")
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 申报记录id
|
||||
*/
|
||||
@ApiModelProperty("申报记录id")
|
||||
private Long declarationId;
|
||||
|
||||
/**
|
||||
* 智能提醒id
|
||||
*/
|
||||
@ApiModelProperty("智能提醒id")
|
||||
private Long smartRemindersId;
|
||||
|
||||
/**
|
||||
* 在线模板开始时间
|
||||
*/
|
||||
@ApiModelProperty("在线模板开始时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 在线模板结束时间
|
||||
*/
|
||||
@ApiModelProperty("在线模板结束时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 提醒时间
|
||||
*/
|
||||
@ApiModelProperty("提醒时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime alertTime;
|
||||
|
||||
|
||||
/**
|
||||
* 是否已读
|
||||
*/
|
||||
@ApiModelProperty("是否已读 1未读 2已读")
|
||||
private Integer isRead;
|
||||
|
||||
/**
|
||||
* 统一社会信用代码
|
||||
*/
|
||||
@ApiModelProperty("统一社会信用代码")
|
||||
private String tyshxydm;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ApiModelProperty("项目ID")
|
||||
private Long projectId;
|
||||
|
||||
|
||||
/**
|
||||
* 政务用户id
|
||||
*/
|
||||
@ApiModelProperty("政务用户id")
|
||||
private Long zwId;
|
||||
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
package com.ruoyi.jjh.ent.entity.request;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 定期提醒实体类
|
||||
* @author du
|
||||
* @since 2024/7/1 15:56
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("定期提醒")
|
||||
public class JSmartRemindersDq {
|
||||
|
||||
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
@ApiModelProperty("Id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 规则名称
|
||||
*/
|
||||
@NotBlank
|
||||
@ApiModelProperty("规则名称")
|
||||
private String rulesName;
|
||||
|
||||
/**
|
||||
* 提醒对象 1.企业用户 2政务用户
|
||||
*/
|
||||
@NotNull
|
||||
@ApiModelProperty("提醒对象 1.企业用户 2政务用户")
|
||||
private Integer alertRecipients;
|
||||
|
||||
/**
|
||||
* 提醒方式 1.定时提醒 2.不定时提醒
|
||||
*/
|
||||
@NotNull
|
||||
@ApiModelProperty("提醒方式 1.定期提醒 2.不定期提醒")
|
||||
private Integer alertManner;
|
||||
|
||||
/**
|
||||
* 提醒时间 yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@NotNull
|
||||
@ApiModelProperty("提醒时间 yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime alertTime;
|
||||
|
||||
/**
|
||||
* 提醒内容
|
||||
*/
|
||||
@NotBlank
|
||||
@ApiModelProperty("提醒内容")
|
||||
private String alertContent;
|
||||
|
||||
/**
|
||||
* 项目id 非必传
|
||||
*/
|
||||
@ApiModelProperty("项目id 非必传")
|
||||
private String projectId;
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.jjh.ent.entity.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 不定期提醒实体类
|
||||
* @author du
|
||||
* @since 2024/7/1 15:56
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("不定期提醒")
|
||||
public class JSmartRemindersNDq {
|
||||
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
@ApiModelProperty("Id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 规则名称
|
||||
*/
|
||||
@NotBlank
|
||||
@ApiModelProperty("规则名称")
|
||||
private String rulesName;
|
||||
|
||||
/**
|
||||
* 提醒对象 1.企业用户 2政务用户
|
||||
*/
|
||||
@NotNull
|
||||
@ApiModelProperty("提醒对象 1.企业用户 2政务用户")
|
||||
private Integer alertRecipients;
|
||||
|
||||
/**
|
||||
* 提醒方式 1.定时提醒 2.不定时提醒
|
||||
*/
|
||||
@NotNull
|
||||
@ApiModelProperty("提醒方式 1.定期提醒 2.不定期提醒")
|
||||
private Integer alertManner;
|
||||
|
||||
/**
|
||||
* 提醒分类 1.申报任务即将结束(企业) 2项目即将建设完成(政务)
|
||||
*/
|
||||
@NotNull
|
||||
@ApiModelProperty("提醒分类 1.申报任务即将结束(企业) 2项目即将建设完成(政务)")
|
||||
private Integer alertType;
|
||||
|
||||
/**
|
||||
* 提前天数提醒
|
||||
*/
|
||||
@NotNull
|
||||
@ApiModelProperty("提前天数提醒")
|
||||
private Integer daysAdvance;
|
||||
|
||||
/**
|
||||
* 提醒内容
|
||||
*/
|
||||
@NotBlank
|
||||
@ApiModelProperty("提醒内容")
|
||||
private String alertContent;
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
<?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.ruoyi.jjh.ent.mapper.JSmartDeclarationMapper">
|
||||
<select id="selectEnterpriseAllList" resultType="com.ruoyi.jjh.ent.entity.HomeRequestSmart">
|
||||
SELECT
|
||||
a.id as id,
|
||||
b.id as declarationId,
|
||||
b.project_name as declarationName,
|
||||
a.is_read as isRead,
|
||||
a.tyshxydm as tyshxydm,
|
||||
c.alert_recipients as alertRecipients,
|
||||
c.alert_Manner as alertManner,
|
||||
a.alert_time as alertTime,
|
||||
c.days_advance as daysAdvance,
|
||||
c.alert_content as alertContent,
|
||||
a.project_id as projectId
|
||||
FROM
|
||||
j_smart_declaration AS a
|
||||
LEFT JOIN bms_declaration_records AS b ON a.declaration_id = b.id
|
||||
LEFT JOIN j_smart_reminders AS c ON a.smart_reminders_id = c.id
|
||||
<where>
|
||||
c.alert_recipients = 1
|
||||
<if test="userName != null and userName != '' ">
|
||||
and a.tyshxydm = #{userName}
|
||||
</if>
|
||||
and a.alert_time < NOW()
|
||||
</where>
|
||||
order by a.alert_time desc;
|
||||
</select>
|
||||
<select id="chiefAll" resultType="com.ruoyi.jjh.ent.entity.HomeRequestSmart">
|
||||
SELECT
|
||||
a.id as id,
|
||||
b.project_name as declarationName,
|
||||
a.is_read as isRead,
|
||||
a.tyshxydm as tyshxydm,
|
||||
c.alert_recipients as alertRecipients,
|
||||
c.alert_Manner as alertManner,
|
||||
a.alert_time as alertTime,
|
||||
c.days_advance as daysAdvance,
|
||||
c.alert_content as alertContent,
|
||||
a.project_id as projectId
|
||||
FROM
|
||||
j_smart_declaration AS a
|
||||
LEFT JOIN j_project AS b ON a.project_id = b.id
|
||||
LEFT JOIN j_smart_reminders AS c ON a.smart_reminders_id = c.id
|
||||
<where>
|
||||
c.alert_recipients = 2
|
||||
<if test="projectId != null and projectId != '' ">
|
||||
and a.project_id = #{projectId}
|
||||
</if>
|
||||
<if test="userId != null and userId != '' ">
|
||||
and a.zw_id = #{userId}
|
||||
</if>
|
||||
and a.alert_time < NOW()
|
||||
</where>
|
||||
order by a.alert_time desc;
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in new issue