开发超期未审核提前提醒功能(差插第三方库表)
parent
4493a824b1
commit
cb2a1f389a
@ -0,0 +1,19 @@
|
||||
package com.emr.dao;
|
||||
|
||||
import com.emr.entity.ArchiveRemindDeptUserInfo;
|
||||
|
||||
public interface ArchiveRemindDeptUserInfoMapper extends CommomMapper{
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ArchiveRemindDeptUserInfo record);
|
||||
|
||||
int insertSelective(ArchiveRemindDeptUserInfo record);
|
||||
|
||||
ArchiveRemindDeptUserInfo selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ArchiveRemindDeptUserInfo record);
|
||||
|
||||
int updateByPrimaryKey(ArchiveRemindDeptUserInfo record);
|
||||
|
||||
int updateSendSuccess();
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.emr.dao;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ProjectName:
|
||||
* @Description:
|
||||
* @Param 传输参数
|
||||
* @Return
|
||||
* @Author: 曾文和
|
||||
* @CreateDate: 2020/10/29 13:22
|
||||
* @UpdateUser: 曾文和
|
||||
* @UpdateDate: 2020/10/29 13:22
|
||||
* @UpdateRemark: 更新说明
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public interface CommomMapper {
|
||||
int selectColByTableName(@Param("tableName")String tableName);
|
||||
|
||||
void insertBatch(@Param("list") List<Object> list);
|
||||
}
|
||||
@ -0,0 +1,194 @@
|
||||
package com.emr.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class ArchiveRemindDeptUserInfo implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String userTel;
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer roleId;
|
||||
|
||||
private String deptCode;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Byte sendSuccess;
|
||||
|
||||
private String sendContext;
|
||||
|
||||
private String roleName;
|
||||
|
||||
private String deptName;
|
||||
|
||||
private String userWechat;
|
||||
|
||||
private Integer int1;
|
||||
|
||||
private String str1;
|
||||
|
||||
private Integer int2;
|
||||
|
||||
private String str2;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName == null ? null : userName.trim();
|
||||
}
|
||||
|
||||
public String getUserTel() {
|
||||
return userTel;
|
||||
}
|
||||
|
||||
public void setUserTel(String userTel) {
|
||||
this.userTel = userTel == null ? null : userTel.trim();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name == null ? null : name.trim();
|
||||
}
|
||||
|
||||
public Integer getRoleId() {
|
||||
return roleId;
|
||||
}
|
||||
|
||||
public void setRoleId(Integer roleId) {
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public String getDeptCode() {
|
||||
return deptCode;
|
||||
}
|
||||
|
||||
public void setDeptCode(String deptCode) {
|
||||
this.deptCode = deptCode == null ? null : deptCode.trim();
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Byte getSendSuccess() {
|
||||
return sendSuccess;
|
||||
}
|
||||
|
||||
public void setSendSuccess(Byte sendSuccess) {
|
||||
this.sendSuccess = sendSuccess;
|
||||
}
|
||||
|
||||
public String getSendContext() {
|
||||
return sendContext;
|
||||
}
|
||||
|
||||
public void setSendContext(String sendContext) {
|
||||
this.sendContext = sendContext == null ? null : sendContext.trim();
|
||||
}
|
||||
|
||||
public String getRoleName() {
|
||||
return roleName;
|
||||
}
|
||||
|
||||
public void setRoleName(String roleName) {
|
||||
this.roleName = roleName == null ? null : roleName.trim();
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName == null ? null : deptName.trim();
|
||||
}
|
||||
|
||||
public String getUserWechat() {
|
||||
return userWechat;
|
||||
}
|
||||
|
||||
public void setUserWechat(String userWechat) {
|
||||
this.userWechat = userWechat == null ? null : userWechat.trim();
|
||||
}
|
||||
|
||||
public Integer getInt1() {
|
||||
return int1;
|
||||
}
|
||||
|
||||
public void setInt1(Integer int1) {
|
||||
this.int1 = int1;
|
||||
}
|
||||
|
||||
public String getStr1() {
|
||||
return str1;
|
||||
}
|
||||
|
||||
public void setStr1(String str1) {
|
||||
this.str1 = str1 == null ? null : str1.trim();
|
||||
}
|
||||
|
||||
public Integer getInt2() {
|
||||
return int2;
|
||||
}
|
||||
|
||||
public void setInt2(Integer int2) {
|
||||
this.int2 = int2;
|
||||
}
|
||||
|
||||
public String getStr2() {
|
||||
return str2;
|
||||
}
|
||||
|
||||
public void setStr2(String str2) {
|
||||
this.str2 = str2 == null ? null : str2.trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", userName=").append(userName);
|
||||
sb.append(", userTel=").append(userTel);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", roleId=").append(roleId);
|
||||
sb.append(", deptCode=").append(deptCode);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", sendSuccess=").append(sendSuccess);
|
||||
sb.append(", sendContext=").append(sendContext);
|
||||
sb.append(", roleName=").append(roleName);
|
||||
sb.append(", deptName=").append(deptName);
|
||||
sb.append(", userWechat=").append(userWechat);
|
||||
sb.append(", int1=").append(int1);
|
||||
sb.append(", str1=").append(str1);
|
||||
sb.append(", int2=").append(int2);
|
||||
sb.append(", str2=").append(str2);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,250 @@
|
||||
<?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.emr.dao.ArchiveRemindDeptUserInfoMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.emr.entity.ArchiveRemindDeptUserInfo" >
|
||||
<id column="id" property="id" jdbcType="INTEGER" />
|
||||
<result column="user_name" property="userName" jdbcType="NVARCHAR" />
|
||||
<result column="user_tel" property="userTel" jdbcType="VARCHAR" />
|
||||
<result column="name" property="name" jdbcType="NVARCHAR" />
|
||||
<result column="role_id" property="roleId" jdbcType="INTEGER" />
|
||||
<result column="dept_code" property="deptCode" jdbcType="VARCHAR" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="send_success" property="sendSuccess" jdbcType="TINYINT" />
|
||||
<result column="send_context" property="sendContext" jdbcType="NVARCHAR" />
|
||||
<result column="role_name" property="roleName" jdbcType="NVARCHAR" />
|
||||
<result column="dept_name" property="deptName" jdbcType="NVARCHAR" />
|
||||
<result column="user_wechat" property="userWechat" jdbcType="NVARCHAR" />
|
||||
<result column="int1" property="int1" jdbcType="INTEGER" />
|
||||
<result column="str1" property="str1" jdbcType="NVARCHAR" />
|
||||
<result column="int2" property="int2" jdbcType="INTEGER" />
|
||||
<result column="str2" property="str2" jdbcType="NVARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, user_name, user_tel, name, role_id, dept_code, create_time, send_success, send_context,
|
||||
role_name, dept_name, user_wechat, int1, str1, int2, str2
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from archive_remind_dept_user_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from archive_remind_dept_user_info
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.emr.entity.ArchiveRemindDeptUserInfo" >
|
||||
insert into archive_remind_dept_user_info (id, user_name, user_tel,
|
||||
name, role_id, dept_code,
|
||||
create_time, send_success, send_context,
|
||||
role_name, dept_name, user_wechat,
|
||||
int1, str1, int2,
|
||||
str2)
|
||||
values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=NVARCHAR}, #{userTel,jdbcType=VARCHAR},
|
||||
#{name,jdbcType=NVARCHAR}, #{roleId,jdbcType=INTEGER}, #{deptCode,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{sendSuccess,jdbcType=TINYINT}, #{sendContext,jdbcType=NVARCHAR},
|
||||
#{roleName,jdbcType=NVARCHAR}, #{deptName,jdbcType=NVARCHAR}, #{userWechat,jdbcType=NVARCHAR},
|
||||
#{int1,jdbcType=INTEGER}, #{str1,jdbcType=NVARCHAR}, #{int2,jdbcType=INTEGER},
|
||||
#{str2,jdbcType=NVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.emr.entity.ArchiveRemindDeptUserInfo" >
|
||||
insert into archive_remind_dept_user_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="userName != null" >
|
||||
user_name,
|
||||
</if>
|
||||
<if test="userTel != null" >
|
||||
user_tel,
|
||||
</if>
|
||||
<if test="name != null" >
|
||||
name,
|
||||
</if>
|
||||
<if test="roleId != null" >
|
||||
role_id,
|
||||
</if>
|
||||
<if test="deptCode != null" >
|
||||
dept_code,
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time,
|
||||
</if>
|
||||
<if test="sendSuccess != null" >
|
||||
send_success,
|
||||
</if>
|
||||
<if test="sendContext != null" >
|
||||
send_context,
|
||||
</if>
|
||||
<if test="roleName != null" >
|
||||
role_name,
|
||||
</if>
|
||||
<if test="deptName != null" >
|
||||
dept_name,
|
||||
</if>
|
||||
<if test="userWechat != null" >
|
||||
user_wechat,
|
||||
</if>
|
||||
<if test="int1 != null" >
|
||||
int1,
|
||||
</if>
|
||||
<if test="str1 != null" >
|
||||
str1,
|
||||
</if>
|
||||
<if test="int2 != null" >
|
||||
int2,
|
||||
</if>
|
||||
<if test="str2 != null" >
|
||||
str2,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userName != null" >
|
||||
#{userName,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="userTel != null" >
|
||||
#{userTel,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null" >
|
||||
#{name,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="roleId != null" >
|
||||
#{roleId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="deptCode != null" >
|
||||
#{deptCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="sendSuccess != null" >
|
||||
#{sendSuccess,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="sendContext != null" >
|
||||
#{sendContext,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="roleName != null" >
|
||||
#{roleName,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="deptName != null" >
|
||||
#{deptName,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="userWechat != null" >
|
||||
#{userWechat,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="int1 != null" >
|
||||
#{int1,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str1 != null" >
|
||||
#{str1,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="int2 != null" >
|
||||
#{int2,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str2 != null" >
|
||||
#{str2,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.emr.entity.ArchiveRemindDeptUserInfo" >
|
||||
update archive_remind_dept_user_info
|
||||
<set >
|
||||
<if test="userName != null" >
|
||||
user_name = #{userName,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="userTel != null" >
|
||||
user_tel = #{userTel,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null" >
|
||||
name = #{name,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="roleId != null" >
|
||||
role_id = #{roleId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="deptCode != null" >
|
||||
dept_code = #{deptCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="sendSuccess != null" >
|
||||
send_success = #{sendSuccess,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="sendContext != null" >
|
||||
send_context = #{sendContext,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="roleName != null" >
|
||||
role_name = #{roleName,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="deptName != null" >
|
||||
dept_name = #{deptName,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="userWechat != null" >
|
||||
user_wechat = #{userWechat,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="int1 != null" >
|
||||
int1 = #{int1,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str1 != null" >
|
||||
str1 = #{str1,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
<if test="int2 != null" >
|
||||
int2 = #{int2,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="str2 != null" >
|
||||
str2 = #{str2,jdbcType=NVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.emr.entity.ArchiveRemindDeptUserInfo" >
|
||||
update archive_remind_dept_user_info
|
||||
set user_name = #{userName,jdbcType=NVARCHAR},
|
||||
user_tel = #{userTel,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=NVARCHAR},
|
||||
role_id = #{roleId,jdbcType=INTEGER},
|
||||
dept_code = #{deptCode,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
send_success = #{sendSuccess,jdbcType=TINYINT},
|
||||
send_context = #{sendContext,jdbcType=NVARCHAR},
|
||||
role_name = #{roleName,jdbcType=NVARCHAR},
|
||||
dept_name = #{deptName,jdbcType=NVARCHAR},
|
||||
user_wechat = #{userWechat,jdbcType=NVARCHAR},
|
||||
int1 = #{int1,jdbcType=INTEGER},
|
||||
str1 = #{str1,jdbcType=NVARCHAR},
|
||||
int2 = #{int2,jdbcType=INTEGER},
|
||||
str2 = #{str2,jdbcType=NVARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<insert id="insertBatch">
|
||||
insert into archive_remind_dept_user_info(user_name, user_tel,
|
||||
name, role_id, dept_code,
|
||||
create_time, send_success, send_context,
|
||||
role_name, dept_name, user_wechat,
|
||||
int1, str1, int2,
|
||||
str2)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.userName,jdbcType=NVARCHAR}, #{item.userTel,jdbcType=VARCHAR},
|
||||
#{item.name,jdbcType=NVARCHAR}, #{item.roleId,jdbcType=INTEGER}, #{item.deptCode,jdbcType=VARCHAR},
|
||||
#{item.createTime,jdbcType=TIMESTAMP}, #{item.sendSuccess,jdbcType=TINYINT}, #{item.sendContext,jdbcType=NVARCHAR},
|
||||
#{item.roleName,jdbcType=NVARCHAR}, #{item.deptName,jdbcType=NVARCHAR}, #{item.userWechat,jdbcType=NVARCHAR},
|
||||
#{item.int1,jdbcType=INTEGER}, #{item.str1,jdbcType=NVARCHAR}, #{item.int2,jdbcType=INTEGER},
|
||||
#{item.str2,jdbcType=NVARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<!--将当天记录更新为成功-->
|
||||
<update id="updateSendSuccess">
|
||||
UPDATE archive_remind_dept_user_info
|
||||
SET send_success = 1
|
||||
WHERE
|
||||
datediff(
|
||||
DAY,
|
||||
create_time,
|
||||
getdate ())=0
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,10 @@
|
||||
<?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.emr.dao.CommomMapper">
|
||||
<!--查询表字段数-->
|
||||
<select id="selectColByTableName" resultType="java.lang.Integer">
|
||||
select count(*)
|
||||
from syscolumns s
|
||||
where s.id = object_id(#{tableName});
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue