Commit f41b82c0 by ilal Committed by chenzg

提交

parent 40d3442a
package cn.timer.api.bean.kqmk;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author LAL 2020-05-13
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_overtime_range")
@ApiModel("加班规则-应用范围")
public class KqglAssoOvertimeRange extends Model<KqglAssoOvertimeRange> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号 编号", example = "101")
private Integer id;
@ApiModelProperty(value = "加班规则id 加班规则id", example = "101")
private Integer overtimeRulesId;
@ApiModelProperty(value = "应用的考勤组id 应用的考勤组id", example = "101")
private Integer attgroupId;
}
\ No newline at end of file
......@@ -808,6 +808,13 @@ public class TimeCardController {
KqglAssoPbmx.builder().build().delete(new QueryWrapper<KqglAssoPbmx>().lambda().eq(KqglAssoPbmx::getKqzid, id));
//删除考勤周排班
KqglAssoZhoupaiban.builder().build().delete(new QueryWrapper<KqglAssoZhoupaiban>().lambda().eq(KqglAssoZhoupaiban::getKqzid, id));
//刪除加班规则-应用范围
KqglAssoOvertimeRange.builder().build().delete(new QueryWrapper<KqglAssoOvertimeRange>().lambda().eq(KqglAssoOvertimeRange::getAttgroupId, id));
//刪除假期规则-适用范围
KqglAssoRulesVice.builder().build().delete(new QueryWrapper<KqglAssoRulesVice>().lambda().eq(KqglAssoRulesVice::getAttgroupId, id));
return ResultUtil.data(id,"删除成功");
}
return ResultUtil.error("删除失败");
......
package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRange;
/**
* 加班规则-应用范围
*
* @author LAL 2020-05-13
*/
@Repository
public interface KqglAssoOvertimeRangeMapper extends BaseMapper<KqglAssoOvertimeRange> {
int insertovertimerangelist(List<KqglAssoOvertimeRange> kqglassoovertimerange);
}
<?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="cn.timer.api.dao.kqmk.KqglAssoOvertimeRangeMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoOvertimeRange" >
<id column="id" property="id" />
<result column="overtime_rules_id" property="overtimeRulesId" />
<result column="attgroup_id" property="attgroupId" />
</resultMap>
<sql id="Base_Column_List">
id,
overtime_rules_id,
attgroup_id
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoOvertimeRange_id,
overtime_rules_id KqglAssoOvertimeRange_overtime_rules_id,
attgroup_id KqglAssoOvertimeRange_attgroup_id
</sql>
<insert id="insertovertimerangelist" parameterType="java.util.List" >
insert into kqgl_asso_overtime_range (overtime_rules_id, attgroup_id)
<foreach collection="list" item="item" index="index" open="values " close="" separator=",">
(
<if test="item.overtimeRulesId != null" >
#{item.overtimeRulesId,jdbcType=INTEGER},
</if>
<if test="item.attgroupId != null" >
#{item.attgroupId,jdbcType=INTEGER}
</if>
)
</foreach>
</insert>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoOvertimeRange">
INSERT INTO kqgl_asso_overtime_range
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != overtimeRulesId'>
overtime_rules_id,
</if>
<if test ='null != attgroupId'>
attgroup_id
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != overtimeRulesId'>
#{overtimeRulesId},
</if>
<if test ='null != attgroupId'>
#{attgroupId}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_overtime_range
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoOvertimeRange">
UPDATE kqgl_asso_overtime_range
<set>
<if test ='null != overtimeRulesId'>overtime_rules_id = #{overtimeRulesId},</if>
<if test ='null != attgroupId'>attgroup_id = #{attgroupId}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_overtime_range
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_overtime_range
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_overtime_range
</select>
-->
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment