Commit 8b37dbd0 by ilal Committed by chenzg

临时提交考勤接口

parent 8a89a17f
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-07
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_ass_overtime_vice")
@ApiModel("加班规则-扣除休息时间")
public class KqglAssOvertimeVice extends Model<KqglAssOvertimeVice> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "1")
private Integer id;
@ApiModelProperty(value = "加班规则id 加班规则id", example = "101")
private Integer overtimeRulesId;
@ApiModelProperty(value = "休息开始时间 ", example = "休息开始时间")
private String breakStartTime;
@ApiModelProperty(value = "休息结束时间 ", example = "休息结束时间")
private String breakEndTime;
@ApiModelProperty(value = "类型 1:工作日;2:休息日;3:节假日", example = "101")
private Integer overType;
}
\ No newline at end of file
package cn.timer.api.bean.kqmk;
import javax.persistence.*;
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-07
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_bcsz")
@ApiModel("班次表")
public class KqglAssoBcsz extends Model<KqglAssoBcsz> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "班次名称 ", example = "班次名称")
private String name;
@ApiModelProperty(value = "上班1 ", example = "上班1")
private String sbdk1;
@ApiModelProperty(value = "上班1是否次日(0:否;1:是) 上班1是否次日(0:否;1:是)", example = "101")
private Integer isSbdk1Cr;
@ApiModelProperty(value = "上班1区间开始 ", example = "上班1区间开始")
private String sbqjks1;
@ApiModelProperty(value = "上班1区间结束 ", example = "上班1区间结束")
private String sbqjjs1;
@ApiModelProperty(value = "下班1 ", example = "下班1")
private String xbdk1;
@ApiModelProperty(value = "下班1是否次日(0:否;1:是) 下班1是否次日(0:否;1:是)", example = "101")
private Integer isXbdk1Cr;
@ApiModelProperty(value = "下班1区间开始 ", example = "下班1区间开始")
private String xbqjks1;
@ApiModelProperty(value = "下班1区间结束 ", example = "下班1区间结束")
private String xbqjjs1;
@ApiModelProperty(value = "上班2 ", example = "上班2")
private String sbdk2;
@ApiModelProperty(value = "上班2是否次日(0:否;1:是) 上班2是否次日(0:否;1:是)", example = "101")
private Integer isSbdk2Cr;
@ApiModelProperty(value = "上班2区间开始 ", example = "上班2区间开始")
private String sbqjks2;
@ApiModelProperty(value = "上班2区间结束 ", example = "上班2区间结束")
private String sbqjjs2;
@ApiModelProperty(value = "下班2 ", example = "下班2")
private String xbdk2;
@ApiModelProperty(value = "下班2是否次日(0:否;1:是) 下班2是否次日(0:否;1:是)", example = "101")
private Integer isXbdk2Cr;
@ApiModelProperty(value = "下班2区间开始 ", example = "下班2区间开始")
private String xbqjks2;
@ApiModelProperty(value = "下班2区间结束 ", example = "下班2区间结束")
private String xbqjjs2;
@ApiModelProperty(value = "上班3 ", example = "上班3")
private String sbdk3;
@ApiModelProperty(value = "上班3是否次日(0:否;1:是) 上班3是否次日(0:否;1:是)", example = "101")
private Integer isSbdk3Cr;
@ApiModelProperty(value = "上班3区间开始 ", example = "上班3区间开始")
private String sbqjks3;
@ApiModelProperty(value = "上班3区间结束 ", example = "上班3区间结束")
private String sbqjjs3;
@ApiModelProperty(value = "下班3 ", example = "下班3")
private String xbdk3;
@ApiModelProperty(value = "下班3是否次日(0:否;1:是) 下班3是否次日(0:否;1:是)", example = "101")
private Integer isXbdk3Cr;
@ApiModelProperty(value = "下班3区间开始 ", example = "下班3区间开始")
private String xbqjks3;
@ApiModelProperty(value = "下班3区间结束 ", example = "下班3区间结束")
private String xbqjjs3;
@ApiModelProperty(value = "是否开启休息时间(0:否;1:是) 是否开启休息时间(0:否;1:是)", example = "101")
private Integer isXiuxi;
@ApiModelProperty(value = "休息开始时间 休息开始时间", example = "101")
private Long startTime;
@ApiModelProperty(value = "休息结束时间 休息结束时间", example = "101")
private Long endTime;
@ApiModelProperty(value = "上下班次数(1/2/3 最大值为3)", example = "101")
private Integer sxbcs;
@ApiModelProperty(value = "是否允许下班打卡(0:否;1:是) 是否允许下班打卡(0:否;1:是)", example = "101")
private Integer isXbdk;
@ApiModelProperty(value = "允许迟到分钟数 允许迟到分钟数", example = "101")
private Integer yxcdfzs;
@ApiModelProperty(value = "严重迟到分钟数 严重迟到分钟数", example = "101")
private Integer yzcdfzs;
@ApiModelProperty(value = "旷工迟到分钟数 旷工迟到分钟数", example = "101")
private Integer kgcdfzs;
@ApiModelProperty(value = "是否开启晚走晚到(0:否;1:是) 是否开启晚走晚到(0:否;1:是)", example = "101")
private Integer isWzwd;
@ApiModelProperty(value = "下班晚走1(0:不启用 ", example = " 大于0启用 ---> 1/2/3 最大值为3)")
private String xbwz1;
@ApiModelProperty(value = "上班晚到1(0:不启用 ", example = " 大于0启用 ---> 1/2/3 最大值为3)")
private String sbwd1;
@ApiModelProperty(value = "下班晚走2(0:不启用 ", example = " 大于0启用 ---> 1/2/3 最大值为3)")
private String xbwz2;
@ApiModelProperty(value = "上班晚到2(0:不启用 ", example = " 大于0启用 ---> 1/2/3 最大值为3)")
private String sbwd2;
@ApiModelProperty(value = "下班晚走3(0:不启用 ", example = " 大于0启用 ---> 1/2/3 最大值为3)")
private String xbwz3;
@ApiModelProperty(value = "上班晚到3(0:不启用 ", example = " 大于0启用 ---> 1/2/3 最大值为3)")
private String sbwd3;
@ApiModelProperty(value = "备注 ", example = "备注")
private String beiz;
@ApiModelProperty(value = "企业id 企业id", example = "101")
private Integer qyid;
@ApiModelProperty(value = "录入时间 录入时间", example = "101")
private Long lusjTime;
@ApiModelProperty(value = "录入人员 录入人员", example = "101")
private Integer luryid;
}
\ No newline at end of file
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-08
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_leave_rules")
@ApiModel("假期规则")
public class KqglAssoLeaveRules extends Model<KqglAssoLeaveRules> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "假期规则编号 假期规则编号", example = "101")
private Integer id;
@ApiModelProperty(value = "假期名称 ", example = "假期名称")
private String name;
@ApiModelProperty(value = "请假单位 ", example = "1:按天请假;2:按半天;3:按小时")
private String company;
@ApiModelProperty(value = "假期类型 ", example = "1:系统项;2:自定义项")
private Integer leaveType;
@ApiModelProperty(value = "适用范围 ", example = "0:全公司 >0:考勤组id")
private String apply;
@ApiModelProperty(value = "创建时间 创建时间", example = "101")
private Long createTime;
@ApiModelProperty(value = "创建人员id 创建人员id", example = "101")
private Integer createUserid;
@ApiModelProperty(value = "企业组织代码 企业组织代码", example = "101")
private Integer orgCode;
@ApiModelProperty(value = "是否开启 0:否;1:是", example = "101")
private Integer isOpen;
}
\ No newline at end of file
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-08
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_overtime_basics")
@ApiModel("加班基础设置")
public class KqglAssoOvertimeBasics extends Model<KqglAssoOvertimeBasics> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "1")
private Integer id;
@ApiModelProperty(value = "最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班", example = "1")
private Integer minimumUnit;
@ApiModelProperty(value = "修改人 修改人", example = "224")
private Integer modifyUserid;
@ApiModelProperty(value = "修改时间 修改时间", example = "1588902915035")
private Long modifyTime;
@ApiModelProperty(value = "企业组织代码 企业组织代码", example = "117")
private Integer orgCode;
}
\ No newline at end of file
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-07
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_overtime_rules")
@ApiModel("加班规则")
public class KqglAssoOvertimeRules extends Model<KqglAssoOvertimeRules> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "加班规则编号 加班规则编号", example = "1")
private Integer id;
@ApiModelProperty(value = "规则名称 ", example = "以审批时间计算加班")
private String name;
@ApiModelProperty(value = "应用范围", example = "1")
private Integer appliedScope;
@ApiModelProperty(value = "工作日是否允许加班 0:否;1:是", example = "1")
private Integer isWorkovertime;
@ApiModelProperty(value = "计算方式 1:按审批时长计算", example = "1")
private Integer workMode;
@ApiModelProperty(value = "扣除休息时间开关 0:关;1:开", example = "0")
private Integer workBuckleRest;
@ApiModelProperty(value = "计为调休或加班费开关 0:关;1:开", example = "0")
private Integer workSwitch;
@ApiModelProperty(value = "1:按n计为调休 ", example = "1")
private String workOne;
@ApiModelProperty(value = "2:计为加班费 0:未选择;1:已选择", example = "0")
private Integer workTwo;
@ApiModelProperty(value = "3:多种选择 ", example = "1")
private String workThree;
@ApiModelProperty(value = "休息日是否允许加班 0:否;1:是", example = "0")
private Integer isRestovertime;
@ApiModelProperty(value = "计算方式 1:按审批时长计算", example = "1")
private Integer restMode;
@ApiModelProperty(value = "扣除休息时间开关 0:关;1:开", example = "0")
private Integer restBuckleRest;
@ApiModelProperty(value = "计为调休或加班费开关 0:关;1:开", example = "0")
private Integer restSwitch;
@ApiModelProperty(value = "1:按n计为调休 ", example = "1")
private String restOne;
@ApiModelProperty(value = "2:计为加班费 0:未选择;1:已选择", example = "0")
private Integer restTwo;
@ApiModelProperty(value = "3:多种选择 ", example = "1")
private String restThree;
@ApiModelProperty(value = "节假日是否允许加班 0:否;1:是", example = "0")
private Integer isHolidays;
@ApiModelProperty(value = "计算方式 ", example = "1")
private Double holidaysMode;
@ApiModelProperty(value = "扣除休息时间开关 0:关;1:开", example = "0")
private Integer holidaysBuckleRest;
@ApiModelProperty(value = "计为调休或加班费开关 0:关;1:开", example = "0")
private Integer holidaysSwitch;
@ApiModelProperty(value = "1:按n计为调休 ", example = "1")
private String holidaysOne;
@ApiModelProperty(value = "2:计为加班费 0:未选择;1:已选择", example = "0")
private Integer holidaysTwo;
@ApiModelProperty(value = "3:多种选择 ", example = "1")
private String holidaysThree;
@ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Long createTime;
@ApiModelProperty(value = "创建人员 创建人员", example = "101")
private Integer createUserid;
@ApiModelProperty(value = "企业组织代码 企业组织代码", example = "117")
private Integer orgCode;
}
\ No newline at end of file
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-08
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_rules_vice")
@ApiModel("假期规则-适用范围")
public class KqglAssoRulesVice extends Model<KqglAssoRulesVice> {
/**
*
*/
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 leaveRulesId;
@ApiModelProperty(value = "适用的考勤组id 适用的考勤组id", example = "101")
private Integer attgroupId;
}
\ No newline at end of file
package cn.timer.api.controller.kqgl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.timer.api.dto.kqgl.CompensateDto;
import cn.timer.api.dto.kqgl.LeaveTypeDto;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Console;
import cn.timer.api.bean.kqmk.KqglAssOvertimeVice;
import cn.timer.api.bean.kqmk.KqglAssoBcsz;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRules;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRules;
import cn.timer.api.bean.kqmk.KqglAssoRulesVice;
import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dao.kqmk.KqglAssOvertimeViceMapper;
import cn.timer.api.dao.kqmk.KqglAssoBcszMapper;
import cn.timer.api.dao.kqmk.KqglAssoLeaveRulesMapper;
import cn.timer.api.dao.kqmk.KqglAssoOvertimeRulesMapper;
import cn.timer.api.dao.kqmk.KqglAssoRulesViceMapper;
import cn.timer.api.dto.kqmk.AttqueryCriteriaDto;
import cn.timer.api.dto.kqmk.CompensateDto;
import cn.timer.api.dto.kqmk.IndividualOvertimeRule;
import cn.timer.api.dto.kqmk.KqglAssoLeaveRulesDto;
import cn.timer.api.dto.kqmk.KqglAssoOvertimeRulesDto;
import cn.timer.api.dto.kqmk.LeaveTypeDto;
import cn.timer.api.dto.kqmk.StartTimeRestDto;
import cn.timer.api.dto.kqmk.VacationInformation;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import io.swagger.annotations.Api;
......@@ -22,13 +54,287 @@ import io.swagger.annotations.ApiOperation;
@Transactional
@RequestMapping(value = "/kqmk", produces = { "application/json", "multipart/form-data" })
public class TimeCardController {
@Autowired
private KqglAssoBcszMapper kqglassobcszmapper;
@Autowired
private KqglAssoOvertimeRulesMapper kqglassoovertimerulesmapper;
@Autowired
private KqglAssOvertimeViceMapper kqglassovertimevicemapper;
/**
* 查询列表-获取班次数据-分页
*/
@PostMapping(value = "/select_shifts")
@ApiOperation(value = "1.获取班次数据-根据 组织机构代码-分页", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 1)
public Result<Object> selectShifts(@CurrentUser UserBean userBean, @RequestBody AttqueryCriteriaDto attquerycriteriadto) {
IPage<KqglAssoBcsz> page = new Page<KqglAssoBcsz>(
attquerycriteriadto.getCurrentPage() == null ? 1 : attquerycriteriadto.getCurrentPage(),
attquerycriteriadto.getTotalPage() == null ? 10 : attquerycriteriadto.getTotalPage());
attquerycriteriadto.setOrgCode(userBean.getOrgCode());
attquerycriteriadto.setEmpNum(userBean.getEmpNum());
// IPage<KqglAssoBcsz> pageAs = kqglassobcszmapper.selectPage(page, attquerycriteriadto);//用于SQL语句
IPage<KqglAssoBcsz> pageAs = kqglassobcszmapper.selectPage(page, new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getQyid, userBean.getOrgCode()));
List<KqglAssoBcsz> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!");
}
/**
* 新增班次信息
*/
@PostMapping(value = "/Shif")
@ApiOperation(value = "2:新增班次信息", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 2)
public Result<KqglAssoBcsz> ShiftInformation(@CurrentUser UserBean userBean,@RequestBody KqglAssoBcsz shif) {
shif.setQyid(userBean.getOrgCode());
shif.setLusjTime(new Date().getTime());
shif.setLuryid(userBean.getEmpNum());//录入人员
if(kqglassobcszmapper.insert(shif)>0){
return ResultUtil.data(shif, "新增班次成功");
}else{
return ResultUtil.error("新增班次失败");
}
}
/**
* 删除班次信息
*/
@DeleteMapping(value = "/Shif/{id}")
@ApiOperation(value = "3:删除班次信息", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 3)
public Result<Integer> deleteShiftInformation(@PathVariable("id") Integer id) {
return KqglAssoBcsz.builder().id(id).build().deleteById() ? ResultUtil.success("删除成功!") : ResultUtil.error("没有找到该对象");
}
/**
* 根据班次id获取班次信息
*/
@GetMapping(value="/Shifts/{id}")
@ApiOperation(value = "4:获取班次信息-根据班次id", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 4)
public Result<Object> getShiftCenter(@PathVariable("id") Integer id) {
return ResultUtil.data(KqglAssoBcsz.builder().id(id).build().selectById(),"操作成功!");
}
/**
* 修改班次信息
*/
@PutMapping(value = "/Shif")
@ApiOperation(value = "5:修改班次信息", httpMethod = "PUT", notes = "接口发布说明")
@ApiOperationSupport(order = 5)
public Result<KqglAssoBcsz> updateShiftInformation(@CurrentUser UserBean userBean,@RequestBody KqglAssoBcsz shif) {
shif.setQyid(userBean.getOrgCode());//企业id
if (kqglassobcszmapper.update(shif) > 0) {
return ResultUtil.data(shif,"修改班次信息成功");
}
return ResultUtil.error("修改班次信息失败");
}
/**
* 查询列表-获取加班规则数据-分页
*/
@PostMapping(value = "/select_overtime_rules")
@ApiOperation(value = "6.获取加班规则数据-根据 组织机构代码-分页", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 6)
public Result<Object> selectOvertimeRules(@CurrentUser UserBean userBean, @RequestBody AttqueryCriteriaDto attquerycriteriadto) {
IPage<KqglAssoOvertimeRules> page = new Page<KqglAssoOvertimeRules>(
attquerycriteriadto.getCurrentPage() == null ? 1 : attquerycriteriadto.getCurrentPage(),
attquerycriteriadto.getTotalPage() == null ? 10 : attquerycriteriadto.getTotalPage());
attquerycriteriadto.setOrgCode(userBean.getOrgCode());
attquerycriteriadto.setEmpNum(userBean.getEmpNum());
IPage<KqglAssoOvertimeRules> pageAs = kqglassoovertimerulesmapper.selectPage(page, new QueryWrapper<KqglAssoOvertimeRules>().lambda().eq(KqglAssoOvertimeRules::getOrgCode, userBean.getOrgCode()));
List<KqglAssoOvertimeRules> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!");
}
/**
* 新增/修改--加班规则
*/
@PostMapping(value = "/overtime_rules")
@ApiOperation(value = "7:新增/修改--加班规则", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 7)
public Result<Object> InOvertimerules(@CurrentUser UserBean userBean,@RequestBody KqglAssoOvertimeRulesDto overrules) {
overrules.setCreateTime(new Date().getTime());
overrules.setOrgCode(userBean.getOrgCode());
overrules.setCreateUserid(userBean.getEmpNum());
KqglAssoOvertimeRules rul = KqglAssoOvertimeRules.builder().build();
// 克隆 KqglAssoOvertimeRulesDto对象 到 KqglAssoOvertimeRules对象
BeanUtil.copyProperties(overrules, rul , "starttime");
if (!rul.insertOrUpdate())
return ResultUtil.error("操作失败");
Integer id = rul.getId();
Console.log("新增/修改加班规则id: " + id);
List<KqglAssOvertimeVice> overtimes=new ArrayList<KqglAssOvertimeVice>();
StartTimeRestDto[] rest = overrules.getStarttime();
if(rest != null && rest.length>0){
for(int p=0;p<rest.length;p++){
KqglAssOvertimeVice.builder().build().delete(new QueryWrapper<KqglAssOvertimeVice>().lambda().eq(KqglAssOvertimeVice::getOvertimeRulesId, id));
KqglAssOvertimeVice vice = new KqglAssOvertimeVice();
vice.setOvertimeRulesId(id);
vice.setBreakStartTime(rest[p].getStarttime());
vice.setBreakEndTime(rest[p].getEndtime());
vice.setOverType(rest[p].getOvertype());
overtimes.add(vice);
}
}
if(overtimes.size()>0){
kqglassovertimevicemapper.insertovertimeviceList(overtimes);
}
return ResultUtil.data(rul, "操作成功!");
}
/**
* 根据加班规则id获取加班规则信息
*/
@GetMapping(value="/Overtime/{id}")
@ApiOperation(value = "8:根据加班规则id获取加班规则信息", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 8)
public Result<IndividualOvertimeRule> getOvertimeRules(@PathVariable("id") Integer id) {
IndividualOvertimeRule overrule = IndividualOvertimeRule.builder().build();
KqglAssoOvertimeRules rules = KqglAssoOvertimeRules.builder().id(id).build().selectById();
overrule.setRules(rules);
List<KqglAssOvertimeVice> vice = new LambdaQueryChainWrapper<KqglAssOvertimeVice>(kqglassovertimevicemapper).eq(KqglAssOvertimeVice::getOvertimeRulesId, id).list();
overrule.setVice(vice);
return ResultUtil.data(overrule,"操作成功!");
}
/**
* 删除加班规则
* @throws Exception
*/
@DeleteMapping(value = "/Overtime/{id}")
@ApiOperation(value = "9:删除加班规则", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 9)
public Result<Integer> deleteOvertimeRules(@PathVariable("id") Integer id) throws Exception {
if(!KqglAssoOvertimeRules.builder().id(id).build().deleteById()) {
throw new Exception();
}else {
KqglAssOvertimeVice.builder().build().delete(new QueryWrapper<KqglAssOvertimeVice>().lambda().eq(KqglAssOvertimeVice::getOvertimeRulesId, id));
return ResultUtil.success("删除成功!");
}
}
/**
* 编辑加班基础设置
*/
@PostMapping(value = "/overtime_basic_settings")
@ApiOperation(value = "10:编辑加班基础设置", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 10)
public Result<Object> OvertimeBasicSettings(@CurrentUser UserBean userBean,@RequestBody KqglAssoOvertimeBasics overtiasics) {
overtiasics.setModifyUserid(userBean.getEmpNum());
overtiasics.setModifyTime(new Date().getTime());
overtiasics.setOrgCode(userBean.getOrgCode());
return overtiasics.insertOrUpdate() ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!");
}
@Autowired
private KqglAssoLeaveRulesMapper kqglassoleaverulesmapper;
/**
* @param userBean
* @param overrules
* @return
*/
@PostMapping(value = "/initialization_data")
@ApiOperation(value = "11:初始化假期数据", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 11)
public Result<Object> InitializationData(@CurrentUser UserBean userBean) {
//获取模板数据
List<KqglAssoLeaveRules> ruless = new LambdaQueryChainWrapper<KqglAssoLeaveRules>(kqglassoleaverulesmapper).eq(KqglAssoLeaveRules::getOrgCode, 0).list();
//查询当前公司是否已初始化
KqglAssoLeaveRules rule = kqglassoleaverulesmapper.selectOne(new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, userBean.getOrgCode())
.eq(KqglAssoLeaveRules::getLeaveType, 1));
if(rule == null) {
List<KqglAssoLeaveRules> rullist = new ArrayList<KqglAssoLeaveRules>();
for(KqglAssoLeaveRules rul : ruless){
KqglAssoLeaveRules vice = KqglAssoLeaveRules.builder().name(rul.getName()).company(rul.getCompany()).leaveType(rul.getLeaveType())
.apply(rul.getApply()).createTime(new Date().getTime()).createUserid(userBean.getEmpNum()).orgCode(userBean.getOrgCode())
.isOpen(rul.getIsOpen()).build();
rullist.add(vice);
}
if(rullist.size() > 0) {
kqglassoleaverulesmapper.insertleaverulesList(rullist);
}
}
return ResultUtil.success("操作成功!");
}
@Autowired
private KqglAssoRulesViceMapper kqglassorulesvicemapper;
/**
* 新增/修改--假期规则
*/
@PostMapping(value = "/leave_rules")
@ApiOperation(value = "12:新增/修改--假期规则", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 12)
public Result<Object> LeaveRules(@CurrentUser UserBean userBean,@RequestBody KqglAssoLeaveRulesDto leaverules) {
leaverules.setCreateTime(new Date().getTime());
leaverules.setOrgCode(userBean.getOrgCode());
leaverules.setCreateUserid(userBean.getEmpNum());
leaverules.setIsOpen(1);//是否开启 0:否;1:是 [只针对系统项]
KqglAssoLeaveRules learul = KqglAssoLeaveRules.builder().build();
// 克隆 KqglAssoOvertimeRulesDto对象 到 KqglAssoOvertimeRules对象
BeanUtil.copyProperties(leaverules, learul , "starttime");
if (!learul.insertOrUpdate())
return ResultUtil.error("操作失败");
Integer id = learul.getId();
Console.log("新增/修改--假期规则id: " + id);
List<KqglAssoRulesVice> vices = new ArrayList<KqglAssoRulesVice>();
String[] rest = leaverules.getRange();
if(rest != null && rest.length>0){
for(int p=0;p<rest.length;p++){
KqglAssoRulesVice.builder().build().delete(new QueryWrapper<KqglAssoRulesVice>().lambda().eq(KqglAssoRulesVice::getLeaveRulesId, id));
KqglAssoRulesVice vice = KqglAssoRulesVice.builder().build();
vice.setLeaveRulesId(id);
vice.setAttgroupId(Integer.valueOf(rest[p]));
vices.add(vice);
}
}
if(vices.size()>0){
kqglassorulesvicemapper.insertrulesviceList(vices);
}
return ResultUtil.data(null, "操作成功!");
}
/**
* 删除假期规则
* @throws Exception
*/
@DeleteMapping(value = "/leave_rule/{id}")
@ApiOperation(value = "13: 删除假期规则", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 13)
public Result<Integer> Deleteleaverule(@PathVariable("id") Integer id) throws Exception {
if(!KqglAssoLeaveRules.builder().id(id).build().deleteById()) {
throw new Exception();
}else {
KqglAssoRulesVice.builder().build().delete(new QueryWrapper<KqglAssoRulesVice>().lambda().eq(KqglAssoRulesVice::getLeaveRulesId, id));
return ResultUtil.success("删除成功!");
}
}
/**
* 根据假期规则id获取假期规则信息
*/
@GetMapping(value="/Vacation_information/{id}")
@ApiOperation(value = "14:根据假期规则id获取假期规则信息", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 14)
public Result<VacationInformation> VacationInformation(@PathVariable("id") Integer id) {
VacationInformation overrule = VacationInformation.builder().build();
KqglAssoLeaveRules rules = KqglAssoLeaveRules.builder().id(id).build().selectById();
overrule.setRules(rules);
List<KqglAssoRulesVice> vice = new LambdaQueryChainWrapper<KqglAssoRulesVice>(kqglassorulesvicemapper).eq(KqglAssoRulesVice::getLeaveRulesId, id).list();
overrule.setVice(vice);
return ResultUtil.data(overrule,"操作成功!");
}
/**********************************************测试数据********************************************************/
/**
* 查询列表-假期规则
*/
@GetMapping(value = "/list_leave_rules")
@ApiOperation(value = "1: 查询列表-假期规则", httpMethod = "GET", notes = " 查询列表-假期规则")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "111: 查询列表-假期规则", httpMethod = "GET", notes = " 查询列表-假期规则")
public Result<Object> selectListLeaveRules() {
List<LeaveTypeDto> leas = new ArrayList<LeaveTypeDto>();
......@@ -53,8 +359,7 @@ public class TimeCardController {
* 查询列表-加班补偿方式
*/
@GetMapping(value = "/list_compensate")
@ApiOperation(value = "2: 查询列表-加班补偿方式", httpMethod = "GET", notes = " 查询列表-加班补偿方式")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "222: 查询列表-加班补偿方式", httpMethod = "GET", notes = " 查询列表-加班补偿方式")
public Result<Object> selectListCompensate() {
List<CompensateDto> coms = new ArrayList<CompensateDto>();
......
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.KqglAssOvertimeVice;
/**
* 加班规则-扣除休息时间
*
* @author LAL 2020-05-07
*/
@Repository
public interface KqglAssOvertimeViceMapper extends BaseMapper<KqglAssOvertimeVice> {
int insertovertimeviceList(List<KqglAssOvertimeVice> kqglassovertimevice);
}
package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoBcsz;
/**
* 班次表
* @author LAL 2020-05-07
*/
@Repository
public interface KqglAssoBcszMapper extends BaseMapper<KqglAssoBcsz> {
int insert(KqglAssoBcsz kqglassobcsz);
int update(KqglAssoBcsz kqglassobcsz);
}
package cn.timer.api.dao.kqmk;
import java.util.List;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRules;
/**
* 假期规则
*
* @author LAL 2020-05-08
*/
@Repository
public interface KqglAssoLeaveRulesMapper extends BaseMapper<KqglAssoLeaveRules> {
int insertleaverulesList(List<KqglAssoLeaveRules> kqglassoleaverules);
}
package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics;
/**
* 加班基础设置
* @author LAL 2020-05-08
*/
@Repository
public interface KqglAssoOvertimeBasicsMapper extends BaseMapper<KqglAssoOvertimeBasics> {
}
package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRules;
/**
* 加班规则
*
* @author LAL 2020-05-07
*/
@Repository
public interface KqglAssoOvertimeRulesMapper extends BaseMapper<KqglAssoOvertimeRules> {
}
package cn.timer.api.dao.kqmk;
import java.util.List;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.kqmk.KqglAssoRulesVice;
/**
* 假期规则-适用范围
* @author LAL 2020-05-08
*/
@Repository
public interface KqglAssoRulesViceMapper extends BaseMapper<KqglAssoRulesVice> {
int insertrulesviceList(List<KqglAssoRulesVice> kqglassorulesvice);
}
package cn.timer.api.dto.kqmk;
import cn.timer.api.utils.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AttqueryCriteriaDto extends Page {
private Integer orgCode;
private Integer empNum;
@ApiModelProperty(value = "关键字", example = "")
private String query;
}
package cn.timer.api.dto.kqmk;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CompensateDto {
@ApiModelProperty(value = "加班补偿记录id", example = "1", required = true)
private Integer id;
@ApiModelProperty(value = "加班补偿名称", example = "加班费、调休")
private String value;
}
package cn.timer.api.dto.kqmk;
import java.util.List;
import cn.timer.api.bean.kqmk.KqglAssOvertimeVice;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRules;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class IndividualOvertimeRule {
@ApiModelProperty(value = "加班规则数据 ", example = "字段说明")
KqglAssoOvertimeRules rules;
@ApiModelProperty(value = "加班规则-扣除休息时间 ", example = "字段说明")
List<KqglAssOvertimeVice> vice;
}
package cn.timer.api.dto.kqmk;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author LAL 2020-05-08
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class KqglAssoLeaveRulesDto {
@ApiModelProperty(value = "假期规则编号 假期规则编号", example = "101")
private Integer id;
@ApiModelProperty(value = "假期名称 ", example = "假期名称")
private String name;
@ApiModelProperty(value = "请假单位 ", example = "1:按天请假;2:按半天;3:按小时")
private String company;
@ApiModelProperty(value = "假期类型 ", example = "1:系统项;2:自定义项")
private Integer leaveType;
@ApiModelProperty(value = "适用范围 ", example = "0:全公司 -1:考勤组id")
private String apply;
@ApiModelProperty(value = "创建时间 创建时间", example = "101")
private Long createTime;
@ApiModelProperty(value = "创建人员id 创建人员id", example = "101")
private Integer createUserid;
@ApiModelProperty(value = "企业组织代码 企业组织代码", example = "101")
private Integer orgCode;
@ApiModelProperty(value = "是否开启 0:否;1:是", example = "1")
private Integer isOpen;
@ApiModelProperty(value = "适用范围集合", example = "101")
private String[] range;
}
\ No newline at end of file
package cn.timer.api.dto.kqmk;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class KqglAssoOvertimeRulesDto {
@ApiModelProperty(value = "加班规则编号 加班规则编号", example = "1")
private Integer id;
@ApiModelProperty(value = "规则名称 ", example = "以审批时间计算加班")
private String name;
@ApiModelProperty(value = "应用范围", example = "1")
private Integer appliedScope;
@ApiModelProperty(value = "工作日是否允许加班 0:否;1:是", example = "1")
private Integer isWorkovertime;
@ApiModelProperty(value = "计算方式 1:按审批时长计算", example = "1")
private Integer workMode;
@ApiModelProperty(value = "扣除休息时间开关 0:关;1:开", example = "0")
private Integer workBuckleRest;
@ApiModelProperty(value = "计为调休或加班费开关 0:关;1:开", example = "0")
private Integer workSwitch;
@ApiModelProperty(value = "1:按n计为调休 ", example = "1")
private String workOne;
@ApiModelProperty(value = "2:计为加班费 0:未选择;1:已选择", example = "0")
private Integer workTwo;
@ApiModelProperty(value = "3:多种选择 ", example = "1")
private String workThree;
@ApiModelProperty(value = "休息日是否允许加班 0:否;1:是", example = "0")
private Integer isRestovertime;
@ApiModelProperty(value = "计算方式 1:按审批时长计算", example = "1")
private Integer restMode;
@ApiModelProperty(value = "扣除休息时间开关 0:关;1:开", example = "0")
private Integer restBuckleRest;
@ApiModelProperty(value = "计为调休或加班费开关 0:关;1:开", example = "0")
private Integer restSwitch;
@ApiModelProperty(value = "1:按n计为调休 ", example = "1")
private String restOne;
@ApiModelProperty(value = "2:计为加班费 0:未选择;1:已选择", example = "0")
private Integer restTwo;
@ApiModelProperty(value = "3:多种选择 ", example = "1")
private String restThree;
@ApiModelProperty(value = "节假日是否允许加班 0:否;1:是", example = "0")
private Integer isHolidays;
@ApiModelProperty(value = "计算方式 ", example = "1")
private Double holidaysMode;
@ApiModelProperty(value = "扣除休息时间开关 0:关;1:开", example = "0")
private Integer holidaysBuckleRest;
@ApiModelProperty(value = "计为调休或加班费开关 0:关;1:开", example = "0")
private Integer holidaysSwitch;
@ApiModelProperty(value = "1:按n计为调休 ", example = "1")
private String holidaysOne;
@ApiModelProperty(value = "2:计为加班费 0:未选择;1:已选择", example = "0")
private Integer holidaysTwo;
@ApiModelProperty(value = "3:多种选择 ", example = "1")
private String holidaysThree;
@ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Long createTime;
@ApiModelProperty(value = "创建人员 创建人员", example = "101")
private Integer createUserid;
@ApiModelProperty(value = "企业组织代码 企业组织代码", example = "117")
private Integer orgCode;
@ApiModelProperty(value = "扣除休息时间段", example = "12:00-13:30")
private StartTimeRestDto[] starttime;
}
\ No newline at end of file
package cn.timer.api.dto.kqmk;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LeaveTypeDto {
@ApiModelProperty(value = "假期记录id", example = "1", required = true)
private Integer id;
@ApiModelProperty(value = "假期名称", example = "事假、调休...")
private String value;
}
package cn.timer.api.dto.kqmk;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class StartTimeRestDto {
@ApiModelProperty(value = "休息开始时间 ", example = "字段说明")
String starttime;
@ApiModelProperty(value = "休息结束时间 ", example = "字段说明")
String endtime;
@ApiModelProperty(value = "类型 1:工作日;2:休息日;3:节假日 ", example = "字段说明")
Integer overtype;
}
package cn.timer.api.dto.kqmk;
import java.util.List;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRules;
import cn.timer.api.bean.kqmk.KqglAssoRulesVice;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class VacationInformation {
@ApiModelProperty(value = "假期规则数据 ", example = "字段说明")
KqglAssoLeaveRules rules;
@ApiModelProperty(value = "假期规则-适用范围 ", example = "字段说明")
List<KqglAssoRulesVice> vice;
}
<?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.KqglAssOvertimeViceMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssOvertimeVice" >
<id column="id" property="id" />
<result column="overtime_rules_id" property="overtimeRulesId" />
<result column="break_start_time" property="breakStartTime" />
<result column="break_end_time" property="breakEndTime" />
<result column="over_type" property="overType" />
</resultMap>
<sql id="Base_Column_List">
id,
overtime_rules_id,
break_start_time,
break_end_time,
over_type
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssOvertimeVice_id,
overtime_rules_id KqglAssOvertimeVice_overtime_rules_id,
break_start_time KqglAssOvertimeVice_break_start_time,
break_end_time KqglAssOvertimeVice_break_end_time,
over_type KqglAssOvertimeVice_over_type
</sql>
<insert id="insertovertimeviceList" parameterType="java.util.List" >
insert into kqgl_ass_overtime_vice (overtime_rules_id, break_start_time, break_end_time,over_type)
<foreach collection="list" item="item" index="index" open="values " close="" separator=",">
(
<if test="item.overtimeRulesId != null" >
#{item.overtimeRulesId,jdbcType=INTEGER},
</if>
<if test="item.breakStartTime != null" >
#{item.breakStartTime,jdbcType=VARCHAR},
</if>
<if test="item.breakEndTime != null" >
#{item.breakEndTime,jdbcType=VARCHAR},
</if>
<if test="item.overType != null" >
#{item.overType,jdbcType=INTEGER},
</if>
)
</foreach>
</insert>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssOvertimeVice">
INSERT INTO kqgl_ass_overtime_vice
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != overtimeRulesId'>
overtime_rules_id,
</if>
<if test ='null != breakStartTime'>
break_start_time,
</if>
<if test ='null != breakEndTime'>
break_end_time,
</if>
<if test ='null != overType'>
over_type
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != overtimeRulesId'>
#{overtimeRulesId},
</if>
<if test ='null != breakStartTime'>
#{breakStartTime},
</if>
<if test ='null != breakEndTime'>
#{breakEndTime},
</if>
<if test ='null != overType'>
#{overType}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_ass_overtime_vice
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssOvertimeVice">
UPDATE kqgl_ass_overtime_vice
<set>
<if test ='null != overtimeRulesId'>overtime_rules_id = #{overtimeRulesId},</if>
<if test ='null != breakStartTime'>break_start_time = #{breakStartTime},</if>
<if test ='null != breakEndTime'>break_end_time = #{breakEndTime},</if>
<if test ='null != overType'>over_type = #{overType}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_ass_overtime_vice
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_ass_overtime_vice
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_ass_overtime_vice
</select>
-->
</mapper>
\ No newline at end of file
<?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.KqglAssoBcszMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoBcsz" >
<id column="id" property="id" />
<result column="name" property="name" />
<result column="sbdk1" property="sbdk1" />
<result column="is_sbdk1_cr" property="isSbdk1Cr" />
<result column="sbqjks1" property="sbqjks1" />
<result column="sbqjjs1" property="sbqjjs1" />
<result column="xbdk1" property="xbdk1" />
<result column="is_xbdk1_cr" property="isXbdk1Cr" />
<result column="xbqjks1" property="xbqjks1" />
<result column="xbqjjs1" property="xbqjjs1" />
<result column="sbdk2" property="sbdk2" />
<result column="is_sbdk2_cr" property="isSbdk2Cr" />
<result column="sbqjks2" property="sbqjks2" />
<result column="sbqjjs2" property="sbqjjs2" />
<result column="xbdk2" property="xbdk2" />
<result column="is_xbdk2_cr" property="isXbdk2Cr" />
<result column="xbqjks2" property="xbqjks2" />
<result column="xbqjjs2" property="xbqjjs2" />
<result column="sbdk3" property="sbdk3" />
<result column="is_sbdk3_cr" property="isSbdk3Cr" />
<result column="sbqjks3" property="sbqjks3" />
<result column="sbqjjs3" property="sbqjjs3" />
<result column="xbdk3" property="xbdk3" />
<result column="is_xbdk3_cr" property="isXbdk3Cr" />
<result column="xbqjks3" property="xbqjks3" />
<result column="xbqjjs3" property="xbqjjs3" />
<result column="is_xiuxi" property="isXiuxi" />
<result column="start_time" property="startTime" />
<result column="end_time" property="endTime" />
<result column="sxbcs" property="sxbcs" />
<result column="is_xbdk" property="isXbdk" />
<result column="yxcdfzs" property="yxcdfzs" />
<result column="yzcdfzs" property="yzcdfzs" />
<result column="kgcdfzs" property="kgcdfzs" />
<result column="is_wzwd" property="isWzwd" />
<result column="xbwz1" property="xbwz1" />
<result column="sbwd1" property="sbwd1" />
<result column="xbwz2" property="xbwz2" />
<result column="sbwd2" property="sbwd2" />
<result column="xbwz3" property="xbwz3" />
<result column="sbwd3" property="sbwd3" />
<result column="beiz" property="beiz" />
<result column="qyid" property="qyid" />
<result column="lusj_time" property="lusjTime" />
<result column="luryid" property="luryid" />
</resultMap>
<sql id="Base_Column_List">
id,
name,
sbdk1,
is_sbdk1_cr,
sbqjks1,
sbqjjs1,
xbdk1,
is_xbdk1_cr,
xbqjks1,
xbqjjs1,
sbdk2,
is_sbdk2_cr,
sbqjks2,
sbqjjs2,
xbdk2,
is_xbdk2_cr,
xbqjks2,
xbqjjs2,
sbdk3,
is_sbdk3_cr,
sbqjks3,
sbqjjs3,
xbdk3,
is_xbdk3_cr,
xbqjks3,
xbqjjs3,
is_xiuxi,
start_time,
end_time,
sxbcs,
is_xbdk,
yxcdfzs,
yzcdfzs,
kgcdfzs,
is_wzwd,
xbwz1,
sbwd1,
xbwz2,
sbwd2,
xbwz3,
sbwd3,
beiz,
qyid,
lusj_time,
luryid
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoBcsz_id,
name KqglAssoBcsz_name,
sbdk1 KqglAssoBcsz_sbdk1,
is_sbdk1_cr KqglAssoBcsz_is_sbdk1_cr,
sbqjks1 KqglAssoBcsz_sbqjks1,
sbqjjs1 KqglAssoBcsz_sbqjjs1,
xbdk1 KqglAssoBcsz_xbdk1,
is_xbdk1_cr KqglAssoBcsz_is_xbdk1_cr,
xbqjks1 KqglAssoBcsz_xbqjks1,
xbqjjs1 KqglAssoBcsz_xbqjjs1,
sbdk2 KqglAssoBcsz_sbdk2,
is_sbdk2_cr KqglAssoBcsz_is_sbdk2_cr,
sbqjks2 KqglAssoBcsz_sbqjks2,
sbqjjs2 KqglAssoBcsz_sbqjjs2,
xbdk2 KqglAssoBcsz_xbdk2,
is_xbdk2_cr KqglAssoBcsz_is_xbdk2_cr,
xbqjks2 KqglAssoBcsz_xbqjks2,
xbqjjs2 KqglAssoBcsz_xbqjjs2,
sbdk3 KqglAssoBcsz_sbdk3,
is_sbdk3_cr KqglAssoBcsz_is_sbdk3_cr,
sbqjks3 KqglAssoBcsz_sbqjks3,
sbqjjs3 KqglAssoBcsz_sbqjjs3,
xbdk3 KqglAssoBcsz_xbdk3,
is_xbdk3_cr KqglAssoBcsz_is_xbdk3_cr,
xbqjks3 KqglAssoBcsz_xbqjks3,
xbqjjs3 KqglAssoBcsz_xbqjjs3,
is_xiuxi KqglAssoBcsz_is_xiuxi,
start_time KqglAssoBcsz_start_time,
end_time KqglAssoBcsz_end_time,
sxbcs KqglAssoBcsz_sxbcs,
is_xbdk KqglAssoBcsz_is_xbdk,
yxcdfzs KqglAssoBcsz_yxcdfzs,
yzcdfzs KqglAssoBcsz_yzcdfzs,
kgcdfzs KqglAssoBcsz_kgcdfzs,
is_wzwd KqglAssoBcsz_is_wzwd,
xbwz1 KqglAssoBcsz_xbwz1,
sbwd1 KqglAssoBcsz_sbwd1,
xbwz2 KqglAssoBcsz_xbwz2,
sbwd2 KqglAssoBcsz_sbwd2,
xbwz3 KqglAssoBcsz_xbwz3,
sbwd3 KqglAssoBcsz_sbwd3,
beiz KqglAssoBcsz_beiz,
qyid KqglAssoBcsz_qyid,
lusj_time KqglAssoBcsz_lusj_time,
luryid KqglAssoBcsz_luryid
</sql>
<insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoBcsz">
INSERT INTO kqgl_asso_bcsz
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != name'>
name,
</if>
<if test ='null != sbdk1'>
sbdk1,
</if>
<if test ='null != isSbdk1Cr'>
is_sbdk1_cr,
</if>
<if test ='null != sbqjks1'>
sbqjks1,
</if>
<if test ='null != sbqjjs1'>
sbqjjs1,
</if>
<if test ='null != xbdk1'>
xbdk1,
</if>
<if test ='null != isXbdk1Cr'>
is_xbdk1_cr,
</if>
<if test ='null != xbqjks1'>
xbqjks1,
</if>
<if test ='null != xbqjjs1'>
xbqjjs1,
</if>
<if test ='null != sbdk2'>
sbdk2,
</if>
<if test ='null != isSbdk2Cr'>
is_sbdk2_cr,
</if>
<if test ='null != sbqjks2'>
sbqjks2,
</if>
<if test ='null != sbqjjs2'>
sbqjjs2,
</if>
<if test ='null != xbdk2'>
xbdk2,
</if>
<if test ='null != isXbdk2Cr'>
is_xbdk2_cr,
</if>
<if test ='null != xbqjks2'>
xbqjks2,
</if>
<if test ='null != xbqjjs2'>
xbqjjs2,
</if>
<if test ='null != sbdk3'>
sbdk3,
</if>
<if test ='null != isSbdk3Cr'>
is_sbdk3_cr,
</if>
<if test ='null != sbqjks3'>
sbqjks3,
</if>
<if test ='null != sbqjjs3'>
sbqjjs3,
</if>
<if test ='null != xbdk3'>
xbdk3,
</if>
<if test ='null != isXbdk3Cr'>
is_xbdk3_cr,
</if>
<if test ='null != xbqjks3'>
xbqjks3,
</if>
<if test ='null != xbqjjs3'>
xbqjjs3,
</if>
<if test ='null != isXiuxi'>
is_xiuxi,
</if>
<if test ='null != startTime'>
start_time,
</if>
<if test ='null != endTime'>
end_time,
</if>
<if test ='null != sxbcs'>
sxbcs,
</if>
<if test ='null != isXbdk'>
is_xbdk,
</if>
<if test ='null != yxcdfzs'>
yxcdfzs,
</if>
<if test ='null != yzcdfzs'>
yzcdfzs,
</if>
<if test ='null != kgcdfzs'>
kgcdfzs,
</if>
<if test ='null != isWzwd'>
is_wzwd,
</if>
<if test ='null != xbwz1'>
xbwz1,
</if>
<if test ='null != sbwd1'>
sbwd1,
</if>
<if test ='null != xbwz2'>
xbwz2,
</if>
<if test ='null != sbwd2'>
sbwd2,
</if>
<if test ='null != xbwz3'>
xbwz3,
</if>
<if test ='null != sbwd3'>
sbwd3,
</if>
<if test ='null != beiz'>
beiz,
</if>
<if test ='null != qyid'>
qyid,
</if>
<if test ='null != lusjTime'>
lusj_time,
</if>
<if test ='null != luryid'>
luryid
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != name'>
#{name},
</if>
<if test ='null != sbdk1'>
#{sbdk1},
</if>
<if test ='null != isSbdk1Cr'>
#{isSbdk1Cr},
</if>
<if test ='null != sbqjks1'>
#{sbqjks1},
</if>
<if test ='null != sbqjjs1'>
#{sbqjjs1},
</if>
<if test ='null != xbdk1'>
#{xbdk1},
</if>
<if test ='null != isXbdk1Cr'>
#{isXbdk1Cr},
</if>
<if test ='null != xbqjks1'>
#{xbqjks1},
</if>
<if test ='null != xbqjjs1'>
#{xbqjjs1},
</if>
<if test ='null != sbdk2'>
#{sbdk2},
</if>
<if test ='null != isSbdk2Cr'>
#{isSbdk2Cr},
</if>
<if test ='null != sbqjks2'>
#{sbqjks2},
</if>
<if test ='null != sbqjjs2'>
#{sbqjjs2},
</if>
<if test ='null != xbdk2'>
#{xbdk2},
</if>
<if test ='null != isXbdk2Cr'>
#{isXbdk2Cr},
</if>
<if test ='null != xbqjks2'>
#{xbqjks2},
</if>
<if test ='null != xbqjjs2'>
#{xbqjjs2},
</if>
<if test ='null != sbdk3'>
#{sbdk3},
</if>
<if test ='null != isSbdk3Cr'>
#{isSbdk3Cr},
</if>
<if test ='null != sbqjks3'>
#{sbqjks3},
</if>
<if test ='null != sbqjjs3'>
#{sbqjjs3},
</if>
<if test ='null != xbdk3'>
#{xbdk3},
</if>
<if test ='null != isXbdk3Cr'>
#{isXbdk3Cr},
</if>
<if test ='null != xbqjks3'>
#{xbqjks3},
</if>
<if test ='null != xbqjjs3'>
#{xbqjjs3},
</if>
<if test ='null != isXiuxi'>
#{isXiuxi},
</if>
<if test ='null != startTime'>
#{startTime},
</if>
<if test ='null != endTime'>
#{endTime},
</if>
<if test ='null != sxbcs'>
#{sxbcs},
</if>
<if test ='null != isXbdk'>
#{isXbdk},
</if>
<if test ='null != yxcdfzs'>
#{yxcdfzs},
</if>
<if test ='null != yzcdfzs'>
#{yzcdfzs},
</if>
<if test ='null != kgcdfzs'>
#{kgcdfzs},
</if>
<if test ='null != isWzwd'>
#{isWzwd},
</if>
<if test ='null != xbwz1'>
#{xbwz1},
</if>
<if test ='null != sbwd1'>
#{sbwd1},
</if>
<if test ='null != xbwz2'>
#{xbwz2},
</if>
<if test ='null != sbwd2'>
#{sbwd2},
</if>
<if test ='null != xbwz3'>
#{xbwz3},
</if>
<if test ='null != sbwd3'>
#{sbwd3},
</if>
<if test ='null != beiz'>
#{beiz},
</if>
<if test ='null != qyid'>
#{qyid},
</if>
<if test ='null != lusjTime'>
#{lusjTime},
</if>
<if test ='null != luryid'>
#{luryid}
</if>
</trim>
</insert>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoBcsz">
UPDATE kqgl_asso_bcsz
<set>
<if test ='null != name'>name = #{name},</if>
<if test ='null != sbdk1'>sbdk1 = #{sbdk1},</if>
<if test ='null != isSbdk1Cr'>is_sbdk1_cr = #{isSbdk1Cr},</if>
<if test ='null != sbqjks1'>sbqjks1 = #{sbqjks1},</if>
<if test ='null != sbqjjs1'>sbqjjs1 = #{sbqjjs1},</if>
<if test ='null != xbdk1'>xbdk1 = #{xbdk1},</if>
<if test ='null != isXbdk1Cr'>is_xbdk1_cr = #{isXbdk1Cr},</if>
<if test ='null != xbqjks1'>xbqjks1 = #{xbqjks1},</if>
<if test ='null != xbqjjs1'>xbqjjs1 = #{xbqjjs1},</if>
<if test ='null != sbdk2'>sbdk2 = #{sbdk2},</if>
<if test ='null != isSbdk2Cr'>is_sbdk2_cr = #{isSbdk2Cr},</if>
<if test ='null != sbqjks2'>sbqjks2 = #{sbqjks2},</if>
<if test ='null != sbqjjs2'>sbqjjs2 = #{sbqjjs2},</if>
<if test ='null != xbdk2'>xbdk2 = #{xbdk2},</if>
<if test ='null != isXbdk2Cr'>is_xbdk2_cr = #{isXbdk2Cr},</if>
<if test ='null != xbqjks2'>xbqjks2 = #{xbqjks2},</if>
<if test ='null != xbqjjs2'>xbqjjs2 = #{xbqjjs2},</if>
<if test ='null != sbdk3'>sbdk3 = #{sbdk3},</if>
<if test ='null != isSbdk3Cr'>is_sbdk3_cr = #{isSbdk3Cr},</if>
<if test ='null != sbqjks3'>sbqjks3 = #{sbqjks3},</if>
<if test ='null != sbqjjs3'>sbqjjs3 = #{sbqjjs3},</if>
<if test ='null != xbdk3'>xbdk3 = #{xbdk3},</if>
<if test ='null != isXbdk3Cr'>is_xbdk3_cr = #{isXbdk3Cr},</if>
<if test ='null != xbqjks3'>xbqjks3 = #{xbqjks3},</if>
<if test ='null != xbqjjs3'>xbqjjs3 = #{xbqjjs3},</if>
<if test ='null != isXiuxi'>is_xiuxi = #{isXiuxi},</if>
<if test ='null != startTime'>start_time = #{startTime},</if>
<if test ='null != endTime'>end_time = #{endTime},</if>
<if test ='null != sxbcs'>sxbcs = #{sxbcs},</if>
<if test ='null != isXbdk'>is_xbdk = #{isXbdk},</if>
<if test ='null != yxcdfzs'>yxcdfzs = #{yxcdfzs},</if>
<if test ='null != yzcdfzs'>yzcdfzs = #{yzcdfzs},</if>
<if test ='null != kgcdfzs'>kgcdfzs = #{kgcdfzs},</if>
<if test ='null != isWzwd'>is_wzwd = #{isWzwd},</if>
<if test ='null != xbwz1'>xbwz1 = #{xbwz1},</if>
<if test ='null != sbwd1'>sbwd1 = #{sbwd1},</if>
<if test ='null != xbwz2'>xbwz2 = #{xbwz2},</if>
<if test ='null != sbwd2'>sbwd2 = #{sbwd2},</if>
<if test ='null != xbwz3'>xbwz3 = #{xbwz3},</if>
<if test ='null != sbwd3'>sbwd3 = #{sbwd3},</if>
<if test ='null != beiz'>beiz = #{beiz},</if>
<if test ='null != qyid'>qyid = #{qyid},</if>
<if test ='null != lusjTime'>lusj_time = #{lusjTime},</if>
<if test ='null != luryid'>luryid = #{luryid}</if>
</set>
WHERE id = #{id}
</update>
<!--
<delete id="delete" >
DELETE FROM kqgl_asso_bcsz
WHERE id = #{id}
</delete>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_bcsz
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_bcsz
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_bcsz
</select>
-->
</mapper>
\ No newline at end of file
<?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.KqglAssoLeaveRulesMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoLeaveRules" >
<id column="id" property="id" />
<result column="name" property="name" />
<result column="company" property="company" />
<result column="leave_type" property="leaveType" />
<result column="apply" property="apply" />
<result column="create_time" property="createTime" />
<result column="create_userid" property="createUserid" />
<result column="org_code" property="orgCode" />
<result column="is_open" property="isOpen" />
</resultMap>
<sql id="Base_Column_List">
id,
name,
company,
leave_type,
apply,
create_time,
create_userid,
org_code,
is_open
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoLeaveRules_id,
name KqglAssoLeaveRules_name,
company KqglAssoLeaveRules_company,
leave_type KqglAssoLeaveRules_leave_type,
apply KqglAssoLeaveRules_apply,
create_time KqglAssoLeaveRules_create_time,
create_userid KqglAssoLeaveRules_create_userid,
org_code KqglAssoLeaveRules_org_code,
is_open KqglAssoLeaveRules_is_open
</sql>
<insert id="insertleaverulesList" parameterType="java.util.List" >
insert into kqgl_asso_leave_rules (name,company,leave_type,apply,create_time,create_userid,org_code,is_open)
<foreach collection="list" item="item" index="index" open="values " close="" separator=",">
(
<if test="item.name != null" >
#{item.name,jdbcType=VARCHAR},
</if>
<if test="item.company != null" >
#{item.company,jdbcType=VARCHAR},
</if>
<if test="item.leaveType != null" >
#{item.leaveType,jdbcType=INTEGER},
</if>
<if test="item.apply != null" >
#{item.apply,jdbcType=INTEGER},
</if>
<if test="item.createTime != null" >
#{item.createTime,jdbcType=VARCHAR},
</if>
<if test="item.createUserid != null" >
#{item.createUserid,jdbcType=INTEGER},
</if>
<if test="item.orgCode != null" >
#{item.orgCode,jdbcType=INTEGER},
</if>
<if test="item.isOpen != null" >
#{item.isOpen,jdbcType=INTEGER},
</if>
)
</foreach>
</insert>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoLeaveRules">
INSERT INTO kqgl_asso_leave_rules
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != name'>
name,
</if>
<if test ='null != company'>
company,
</if>
<if test ='null != leaveType'>
leave_type,
</if>
<if test ='null != apply'>
apply,
</if>
<if test ='null != createTime'>
create_time,
</if>
<if test ='null != createUserid'>
create_userid,
</if>
<if test ='null != orgCode'>
org_code,
</if>
<if test ='null != isOpen'>
is_open
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != name'>
#{name},
</if>
<if test ='null != company'>
#{company},
</if>
<if test ='null != leaveType'>
#{leaveType},
</if>
<if test ='null != apply'>
#{apply},
</if>
<if test ='null != createTime'>
#{createTime},
</if>
<if test ='null != createUserid'>
#{createUserid},
</if>
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != isOpen'>
#{isOpen}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_leave_rules
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoLeaveRules">
UPDATE kqgl_asso_leave_rules
<set>
<if test ='null != name'>name = #{name},</if>
<if test ='null != company'>company = #{company},</if>
<if test ='null != leaveType'>leave_type = #{leaveType},</if>
<if test ='null != apply'>apply = #{apply},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != createUserid'>create_userid = #{createUserid},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != isOpen'>is_open = #{isOpen}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_leave_rules
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_leave_rules
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_leave_rules
</select>
-->
</mapper>
\ No newline at end of file
<?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.KqglAssoOvertimeBasicsMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics" >
<id column="id" property="id" />
<result column="minimum_unit" property="minimumUnit" />
<result column="modify_userid" property="modifyUserid" />
<result column="modify_time" property="modifyTime" />
<result column="org_code" property="orgCode" />
</resultMap>
<sql id="Base_Column_List">
id,
minimum_unit,
modify_userid,
modify_time,
org_code
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoOvertimeBasics_id,
minimum_unit KqglAssoOvertimeBasics_minimum_unit,
modify_userid KqglAssoOvertimeBasics_modify_userid,
modify_time KqglAssoOvertimeBasics_modify_time,
org_code KqglAssoOvertimeBasics_org_code
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics">
INSERT INTO kqgl_asso_overtime_basics
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != minimumUnit'>
minimum_unit,
</if>
<if test ='null != modifyUserid'>
modify_userid,
</if>
<if test ='null != modifyTime'>
modify_time,
</if>
<if test ='null != orgCode'>
org_code
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != minimumUnit'>
#{minimumUnit},
</if>
<if test ='null != modifyUserid'>
#{modifyUserid},
</if>
<if test ='null != modifyTime'>
#{modifyTime},
</if>
<if test ='null != orgCode'>
#{orgCode}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_overtime_basics
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics">
UPDATE kqgl_asso_overtime_basics
<set>
<if test ='null != minimumUnit'>minimum_unit = #{minimumUnit},</if>
<if test ='null != modifyUserid'>modify_userid = #{modifyUserid},</if>
<if test ='null != modifyTime'>modify_time = #{modifyTime},</if>
<if test ='null != orgCode'>org_code = #{orgCode}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_overtime_basics
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_overtime_basics
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_overtime_basics
</select>
-->
</mapper>
\ No newline at end of file
<?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.KqglAssoOvertimeRulesMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoOvertimeRules" >
<id column="id" property="id" />
<result column="name" property="name" />
<result column="applied_scope" property="appliedScope" />
<result column="is_workovertime" property="isWorkovertime" />
<result column="work_mode" property="workMode" />
<result column="work_buckle_rest" property="workBuckleRest" />
<result column="work_switch" property="workSwitch" />
<result column="work_one" property="workOne" />
<result column="work_two" property="workTwo" />
<result column="work_three" property="workThree" />
<result column="is_restovertime" property="isRestovertime" />
<result column="rest_mode" property="restMode" />
<result column="rest_buckle_rest" property="restBuckleRest" />
<result column="rest_switch" property="restSwitch" />
<result column="rest_one" property="restOne" />
<result column="rest_two" property="restTwo" />
<result column="rest_three" property="restThree" />
<result column="is_holidays" property="isHolidays" />
<result column="holidays_mode" property="holidaysMode" />
<result column="holidays_buckle_rest" property="holidaysBuckleRest" />
<result column="holidays_switch" property="holidaysSwitch" />
<result column="holidays_one" property="holidaysOne" />
<result column="holidays_two" property="holidaysTwo" />
<result column="holidays_three" property="holidaysThree" />
<result column="create_time" property="createTime" />
<result column="create_userid" property="createUserid" />
<result column="org_code" property="orgCode" />
</resultMap>
<sql id="Base_Column_List">
id,
name,
applied_scope,
is_workovertime,
work_mode,
work_buckle_rest,
work_switch,
work_one,
work_two,
work_three,
is_restovertime,
rest_mode,
rest_buckle_rest,
rest_switch,
rest_one,
rest_two,
rest_three,
is_holidays,
holidays_mode,
holidays_buckle_rest,
holidays_switch,
holidays_one,
holidays_two,
holidays_three,
create_time,
create_userid,
org_code
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoOvertimeRules_id,
name KqglAssoOvertimeRules_name,
applied_scope KqglAssoOvertimeRules_applied_scope,
is_workovertime KqglAssoOvertimeRules_is_workovertime,
work_mode KqglAssoOvertimeRules_work_mode,
work_buckle_rest KqglAssoOvertimeRules_work_buckle_rest,
work_switch KqglAssoOvertimeRules_work_switch,
work_one KqglAssoOvertimeRules_work_one,
work_two KqglAssoOvertimeRules_work_two,
work_three KqglAssoOvertimeRules_work_three,
is_restovertime KqglAssoOvertimeRules_is_restovertime,
rest_mode KqglAssoOvertimeRules_rest_mode,
rest_buckle_rest KqglAssoOvertimeRules_rest_buckle_rest,
rest_switch KqglAssoOvertimeRules_rest_switch,
rest_one KqglAssoOvertimeRules_rest_one,
rest_two KqglAssoOvertimeRules_rest_two,
rest_three KqglAssoOvertimeRules_rest_three,
is_holidays KqglAssoOvertimeRules_is_holidays,
holidays_mode KqglAssoOvertimeRules_holidays_mode,
holidays_buckle_rest KqglAssoOvertimeRules_holidays_buckle_rest,
holidays_switch KqglAssoOvertimeRules_holidays_switch,
holidays_one KqglAssoOvertimeRules_holidays_one,
holidays_two KqglAssoOvertimeRules_holidays_two,
holidays_three KqglAssoOvertimeRules_holidays_three,
create_time KqglAssoOvertimeRules_create_time,
create_userid KqglAssoOvertimeRules_create_userid,
org_code KqglAssoOvertimeRules_org_code
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoOvertimeRules">
INSERT INTO kqgl_asso_overtime_rules
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != name'>
name,
</if>
<if test ='null != appliedScope'>
applied_scope,
</if>
<if test ='null != isWorkovertime'>
is_workovertime,
</if>
<if test ='null != workMode'>
work_mode,
</if>
<if test ='null != workBuckleRest'>
work_buckle_rest,
</if>
<if test ='null != workSwitch'>
work_switch,
</if>
<if test ='null != workOne'>
work_one,
</if>
<if test ='null != workTwo'>
work_two,
</if>
<if test ='null != workThree'>
work_three,
</if>
<if test ='null != isRestovertime'>
is_restovertime,
</if>
<if test ='null != restMode'>
rest_mode,
</if>
<if test ='null != restBuckleRest'>
rest_buckle_rest,
</if>
<if test ='null != restSwitch'>
rest_switch,
</if>
<if test ='null != restOne'>
rest_one,
</if>
<if test ='null != restTwo'>
rest_two,
</if>
<if test ='null != restThree'>
rest_three,
</if>
<if test ='null != isHolidays'>
is_holidays,
</if>
<if test ='null != holidaysMode'>
holidays_mode,
</if>
<if test ='null != holidaysBuckleRest'>
holidays_buckle_rest,
</if>
<if test ='null != holidaysSwitch'>
holidays_switch,
</if>
<if test ='null != holidaysOne'>
holidays_one,
</if>
<if test ='null != holidaysTwo'>
holidays_two,
</if>
<if test ='null != holidaysThree'>
holidays_three,
</if>
<if test ='null != createTime'>
create_time,
</if>
<if test ='null != createUserid'>
create_userid,
</if>
<if test ='null != orgCode'>
org_code
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != name'>
#{name},
</if>
<if test ='null != appliedScope'>
#{appliedScope},
</if>
<if test ='null != isWorkovertime'>
#{isWorkovertime},
</if>
<if test ='null != workMode'>
#{workMode},
</if>
<if test ='null != workBuckleRest'>
#{workBuckleRest},
</if>
<if test ='null != workSwitch'>
#{workSwitch},
</if>
<if test ='null != workOne'>
#{workOne},
</if>
<if test ='null != workTwo'>
#{workTwo},
</if>
<if test ='null != workThree'>
#{workThree},
</if>
<if test ='null != isRestovertime'>
#{isRestovertime},
</if>
<if test ='null != restMode'>
#{restMode},
</if>
<if test ='null != restBuckleRest'>
#{restBuckleRest},
</if>
<if test ='null != restSwitch'>
#{restSwitch},
</if>
<if test ='null != restOne'>
#{restOne},
</if>
<if test ='null != restTwo'>
#{restTwo},
</if>
<if test ='null != restThree'>
#{restThree},
</if>
<if test ='null != isHolidays'>
#{isHolidays},
</if>
<if test ='null != holidaysMode'>
#{holidaysMode},
</if>
<if test ='null != holidaysBuckleRest'>
#{holidaysBuckleRest},
</if>
<if test ='null != holidaysSwitch'>
#{holidaysSwitch},
</if>
<if test ='null != holidaysOne'>
#{holidaysOne},
</if>
<if test ='null != holidaysTwo'>
#{holidaysTwo},
</if>
<if test ='null != holidaysThree'>
#{holidaysThree},
</if>
<if test ='null != createTime'>
#{createTime},
</if>
<if test ='null != createUserid'>
#{createUserid},
</if>
<if test ='null != orgCode'>
#{orgCode}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_overtime_rules
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoOvertimeRules">
UPDATE kqgl_asso_overtime_rules
<set>
<if test ='null != name'>name = #{name},</if>
<if test ='null != appliedScope'>applied_scope = #{appliedScope},</if>
<if test ='null != isWorkovertime'>is_workovertime = #{isWorkovertime},</if>
<if test ='null != workMode'>work_mode = #{workMode},</if>
<if test ='null != workBuckleRest'>work_buckle_rest = #{workBuckleRest},</if>
<if test ='null != workSwitch'>work_switch = #{workSwitch},</if>
<if test ='null != workOne'>work_one = #{workOne},</if>
<if test ='null != workTwo'>work_two = #{workTwo},</if>
<if test ='null != workThree'>work_three = #{workThree},</if>
<if test ='null != isRestovertime'>is_restovertime = #{isRestovertime},</if>
<if test ='null != restMode'>rest_mode = #{restMode},</if>
<if test ='null != restBuckleRest'>rest_buckle_rest = #{restBuckleRest},</if>
<if test ='null != restSwitch'>rest_switch = #{restSwitch},</if>
<if test ='null != restOne'>rest_one = #{restOne},</if>
<if test ='null != restTwo'>rest_two = #{restTwo},</if>
<if test ='null != restThree'>rest_three = #{restThree},</if>
<if test ='null != isHolidays'>is_holidays = #{isHolidays},</if>
<if test ='null != holidaysMode'>holidays_mode = #{holidaysMode},</if>
<if test ='null != holidaysBuckleRest'>holidays_buckle_rest = #{holidaysBuckleRest},</if>
<if test ='null != holidaysSwitch'>holidays_switch = #{holidaysSwitch},</if>
<if test ='null != holidaysOne'>holidays_one = #{holidaysOne},</if>
<if test ='null != holidaysTwo'>holidays_two = #{holidaysTwo},</if>
<if test ='null != holidaysThree'>holidays_three = #{holidaysThree},</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != createUserid'>create_userid = #{createUserid},</if>
<if test ='null != orgCode'>org_code = #{orgCode}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_overtime_rules
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_overtime_rules
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_overtime_rules
</select>
-->
</mapper>
\ No newline at end of file
<?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.KqglAssoRulesViceMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoRulesVice" >
<id column="id" property="id" />
<result column="leave_rules_id" property="leaveRulesId" />
<result column="attgroup_id" property="attgroupId" />
</resultMap>
<sql id="Base_Column_List">
id,
leave_rules_id,
attgroup_id
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoRulesVice_id,
leave_rules_id KqglAssoRulesVice_leave_rules_id,
attgroup_id KqglAssoRulesVice_attgroup_id
</sql>
<insert id="insertrulesviceList" parameterType="java.util.List" >
insert into kqgl_asso_rules_vice (leave_rules_id,attgroup_id)
<foreach collection="list" item="item" index="index" open="values " close="" separator=",">
(
<if test="item.leaveRulesId != null" >
#{item.leaveRulesId,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.KqglAssoRulesVice">
INSERT INTO kqgl_asso_rules_vice
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != leaveRulesId'>
leave_rules_id,
</if>
<if test ='null != attgroupId'>
attgroup_id
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != leaveRulesId'>
#{leaveRulesId},
</if>
<if test ='null != attgroupId'>
#{attgroupId}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_rules_vice
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoRulesVice">
UPDATE kqgl_asso_rules_vice
<set>
<if test ='null != leaveRulesId'>leave_rules_id = #{leaveRulesId},</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_rules_vice
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_rules_vice
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_rules_vice
</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