Commit eb7ce0c7 by ilal

考勤机打卡

parent d0a165c8
package cn.timer.api.bean.kqmk;
import javax.persistence.Entity;
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-11
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_dkjl")
@ApiModel("打卡记录表")
public class KqglAssoDkjl extends Model<KqglAssoDkjl> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "打卡时间 打卡时间", example = "101")
private Long dktime;
@ApiModelProperty(value = "经度 ", example = "经度")
private Double lon;
@ApiModelProperty(value = "纬度 ", example = "纬度")
private Double lat;
@ApiModelProperty(value = "定位地址 ", example = "定位地址")
private String address;
@ApiModelProperty(value = "打卡结果 打卡结果", example = "101")
private Integer results;
@ApiModelProperty(value = "用户id 用户id", example = "101")
private Integer userId;
@ApiModelProperty(value = "类型(0:无排班打卡 1:上班 2:下班)", example = "101")
private Integer type;
@ApiModelProperty(value = "(0:打卡无效:此记录已被更新 1:正常 2:异常 3:迟到 4:早退 5:补卡 6:请假 7:加班 8:调休)", example = "101")
private Integer status;
@ApiModelProperty(value = "序号(0:打卡无效:此记录已被更新) 序号(0:打卡无效:此记录已被更新)", example = "101")
private Integer sort;
@ApiModelProperty(value = "打卡类型(1:GPS 2:WIFI 3:考勤机)", example = "101")
private Integer cardType;
@ApiModelProperty(value = "mac地址 ", example = "mac地址")
private String mac;
@ApiModelProperty(value = "wifi名称 ", example = "wifi名称")
private String macname;
@ApiModelProperty(value = "企业id 企业id", example = "101")
private Integer qyid;
@ApiModelProperty(value = "考勤日期 ", example = "考勤日期")
private String attdate;
@ApiModelProperty(value = "考勤时间 ", example = "考勤时间")
private Long attime;
@ApiModelProperty(value = "打卡明细id 打卡明细id", example = "101")
private Integer dkmxid;
@ApiModelProperty(value = "班次id 班次id", example = "101")
private Integer bcid;
@ApiModelProperty(value = "考勤备注 ", example = "考勤备注")
private String remarks;
@ApiModelProperty(value = "考勤机打卡方式==>1:指紋;2:人脸;3:密码;4:ID卡 考勤机打卡方式==>1:指紋;2:人脸;3:密码;4:ID卡", example = "101")
private Integer punchmode;
@ApiModelProperty(value = "打卡设备 ", example = "打卡设备")
private String punchequipment;
}
\ 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-11
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_dkmx")
@ApiModel("打卡明细表")
public class KqglAssoDkmx extends Model<KqglAssoDkmx> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "用户id 用户id", example = "101")
private Integer userid;
@ApiModelProperty(value = "日期 ", example = "日期")
private String data;
@ApiModelProperty(value = "上班1打卡时间 上班1打卡时间", example = "101")
private Long sbdk1;
@ApiModelProperty(value = "上班1打卡结果 上班1打卡结果", example = "101")
private Integer sbdk1jg;
@ApiModelProperty(value = "下班1打卡时间 下班1打卡时间", example = "101")
private Long xbdk1;
@ApiModelProperty(value = "下班1打卡结果 下班1打卡结果", example = "101")
private Integer xbdk1jg;
@ApiModelProperty(value = "上班2打卡时间 上班2打卡时间", example = "101")
private Long sbdk2;
@ApiModelProperty(value = "上班2打卡结果 上班2打卡结果", example = "101")
private Integer sbdk2jg;
@ApiModelProperty(value = "下班2打卡时间 下班2打卡时间", example = "101")
private Long xbdk2;
@ApiModelProperty(value = "下班2打卡结果 下班2打卡结果", example = "101")
private Integer xbdk2jg;
@ApiModelProperty(value = "上班3打卡时间 上班3打卡时间", example = "101")
private Long sbdk3;
@ApiModelProperty(value = "上班3打卡结果 上班3打卡结果", example = "101")
private Integer sbdk3jg;
@ApiModelProperty(value = "下班3打卡时间 下班3打卡时间", example = "101")
private Long xbdk3;
@ApiModelProperty(value = "下班3打卡结果 下班3打卡结果", example = "101")
private Integer xbdk3jg;
@ApiModelProperty(value = "应打卡次数 应打卡次数", example = "101")
private Integer ydkcs;
@ApiModelProperty(value = "工作时长 ", example = "工作时长")
private Double gzsc;
@ApiModelProperty(value = "企业id 企业id", example = "101")
private Integer qyid;
@ApiModelProperty(value = "打卡时间 打卡时间", example = "101")
private Long dksj;
}
\ 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-11
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_pbmx")
@ApiModel("排班明细表")
public class KqglAssoPbmx extends Model<KqglAssoPbmx> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "用户id 用户id", example = "101")
private Integer userid;
@ApiModelProperty(value = "日期 ", example = "日期")
private String data;
@ApiModelProperty(value = "班次id 班次id", example = "101")
private Integer bcid;
@ApiModelProperty(value = "考勤组id 考勤组id", example = "101")
private Integer kqzid;
}
\ 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-11
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_teshu")
@ApiModel("特殊日期表")
public class KqglAssoTeshu extends Model<KqglAssoTeshu> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "考勤组id 考勤组id", example = "101")
private Integer kqzid;
@ApiModelProperty(value = "日期 ", example = "日期")
private String tsrq;
@ApiModelProperty(value = "班次id 班次id", example = "101")
private Integer bcid;
@ApiModelProperty(value = "录入时间 录入时间", example = "101")
private Integer lusjTime;
@ApiModelProperty(value = "录入人员 录入人员", example = "101")
private Integer luryid;
@ApiModelProperty(value = "类型(1:必须打卡日期;2:不用打卡日期(扩展字段)) 类型(1:必须打卡日期;2:不用打卡日期(扩展字段))", example = "101")
private Integer type;
}
\ 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-11
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_zhoupaiban")
@ApiModel("考勤周排班")
public class KqglAssoZhoupaiban extends Model<KqglAssoZhoupaiban> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "考勤组id 考勤组id", example = "101")
private Integer kqzid;
@ApiModelProperty(value = "类型(1:周一、2:周二、3:周三。。。。、8:周一到周日统一班次、9:排班制) 类型(1:周一、2:周二、3:周三。。。。、8:周一到周日统一班次、9:排班制)", example = "101")
private Integer type;
@ApiModelProperty(value = "班次id(0:自由工时 班次id【大于0为:固定排班和排班制】)", example = "101")
private Integer bcid;
}
\ No newline at end of file
......@@ -45,7 +45,7 @@ public class WebSecurityConfig implements WebMvcConfigurer {
.excludePathPatterns("/v2/**")
.excludePathPatterns("/**/*.js")
.excludePathPatterns("/8timer/**")
.excludePathPatterns("/kqz/punchclock/**")
.excludePathPatterns("/kqdk/punchclock/**")
.excludePathPatterns("/kqz/sauserregdata/**")
.excludePathPatterns("/login/*")
.excludePathPatterns("/swagger*/**")
......
package cn.timer.api.controller.kqgl;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
/**
* @author Yl123 2020-05-11
*
*/
public class ClockInTool {
public static String dateToWeek2(String datetime) {
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
String[] weekDays = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
// String[] weekDays = {"7", "1", "2", "3", "4", "5", "6"};
Calendar cal = Calendar.getInstance();
Date date;
try {
date = f.parse(datetime);
cal.setTime(date);
} catch (ParseException e) {
e.printStackTrace();
}
// 一周的第几天
int w = cal.get(Calendar.DAY_OF_WEEK) - 1;
if (w < 0)
w = 0;
return weekDays[w];
}
/**
*
* @param nowDate 要比较的时间
* @param startDate 开始时间
* @param endDate 结束时间
* @return true在时间段内,false不在时间段内
* @throws Exception
*/
public static boolean hourMinuteBetween(String nowDate, String startDate, String endDate) throws Exception {
SimpleDateFormat format = new SimpleDateFormat("HH:mm");
Date now = format.parse(nowDate);
Date start = format.parse(startDate);
Date end = format.parse(endDate);
long nowTime = now.getTime();
long startTime = start.getTime();
long endTime = end.getTime();
return nowTime >= startTime && nowTime <= endTime;
}
/**
* 根据日期获取 星期 (2019-05-06 ——> 星期一)
*
* @param datetime
* @return
*/
public static String dateToWeek(String datetime) {
SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
// String[] weekDays = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
String[] weekDays = { "7", "1", "2", "3", "4", "5", "6" };
Calendar cal = Calendar.getInstance();
Date date;
try {
date = f.parse(datetime);
cal.setTime(date);
} catch (ParseException e) {
e.printStackTrace();
}
// 一周的第几天
int w = cal.get(Calendar.DAY_OF_WEEK) - 1;
if (w < 0)
w = 0;
return weekDays[w];
}
/**
* 2019-10-24T00:30:23.000Z 转化时间
*/
public static String dealDateFormat(String oldDateStr, int num) {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX"); // yyyy-MM-dd'T'HH:mm:ss.SSSZ
Date date = null;
try {
date = df.parse(oldDateStr);
} catch (ParseException e) {
e.printStackTrace();
}
SimpleDateFormat df1 = new SimpleDateFormat("EEE MMM dd HH:mm:ss Z yyyy", Locale.UK);
Date date1 = null;
try {
date1 = df1.parse(date.toString());
} catch (ParseException e) {
e.printStackTrace();
}
DateFormat df2 = null;
if (num == 1) {
df2 = new SimpleDateFormat("yyyy-MM-dd' 'HH:mm:ss");
} else if (num == 2) {
df2 = new SimpleDateFormat("HH:mm");
}
return df2.format(date1);
}
/**
* 时间转换时间戳
*/
public static String dateToStamp(String s) {
String res;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = null;
try {
date = simpleDateFormat.parse(s);
} catch (ParseException e) {
e.printStackTrace();
}
long ts = date.getTime();
res = String.valueOf(ts);
return res;
}
}
......@@ -13,6 +13,7 @@ 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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -23,6 +24,9 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Console;
import cn.hutool.json.JSONObject;
import cn.timer.api.bean.kqgl.AttConditions;
import cn.timer.api.bean.kqgl.AttendanceCardList;
import cn.timer.api.bean.kqmk.KqglAssOvertimeVice;
import cn.timer.api.bean.kqmk.KqglAssoBcsz;
import cn.timer.api.bean.kqmk.KqglAssoDkdz;
......@@ -591,7 +595,7 @@ public class TimeCardController {
}
/**
* 查询列表-假期规则
* 查询列表-假期规则*******************************************
*/
@GetMapping(value = "/list_leave_rules")
@ApiOperation(value = "111: 查询列表-假期规则", httpMethod = "GET", notes = " 查询列表-假期规则")
......@@ -611,7 +615,6 @@ public class TimeCardController {
return ResultUtil.data(leas, "操作成功!");
}
/**
* 查询列表-加班补偿方式
*/
......
package cn.timer.api.controller.kqgl;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import cn.timer.api.dto.kqmk.AttSchedule;
import cn.timer.api.dto.kqmk.AttendanceCardListDto;
import cn.timer.api.utils.DateUtil;
public class test {
public static void main(String[] args) throws Exception {
long starttime1,endtime1 = 0;
if(1==1) {
starttime1 = 12l;
}else {
endtime1 = 22l;
}
System.out.println(starttime1);
System.out.println(endtime1);
}
}
package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoDkjl;
/**
* 打卡记录表
*
* @author LAL 2020-05-11
*/
@Repository
public interface KqglAssoDkjlMapper extends BaseMapper<KqglAssoDkjl> {
}
package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoDkmx;
/**
* 打卡明细表
*
* @author LAL 2020-05-11
*/
@Repository
public interface KqglAssoDkmxMapper extends BaseMapper<KqglAssoDkmx> {
}
package cn.timer.api.dao.kqmk;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.kqmk.KqglAssoPbmx;
import cn.timer.api.dto.kqmk.KqglAssoPbmxDto;
/**
* 排班明细表
*
* @author LAL 2020-05-11
*/
@Repository
public interface KqglAssoPbmxMapper extends BaseMapper<KqglAssoPbmx> {
KqglAssoPbmxDto getScheduleSpecificAttendance(Integer kqzid, Integer userid, String date);
}
package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoTeshu;
/**
* 特殊日期表
*
* @author LAL 2020-05-11
*/
@Repository
public interface KqglAssoTeshuMapper extends BaseMapper<KqglAssoTeshu> {
}
package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban;
/**
* 考勤周排班
*
* @author LAL 2020-05-11
*/
@Repository
public interface KqglAssoZhoupaibanMapper extends BaseMapper<KqglAssoZhoupaiban> {
}
......@@ -18,4 +18,6 @@ import cn.timer.api.dto.kqmk.KqglMainKqzDto;
public interface KqglMainKqzMapper extends BaseMapper<KqglMainKqz> {
List<KqglMainKqzDto> selectAttGroupMachineByQyid(int qyid);
KqglMainKqz getAttendanceGroupInformationByUserid(int userid,int qyid);
}
package cn.timer.api.dto.kqmk;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author lalqq 打卡方式
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("打卡方式")
public class AttClockMethod implements Serializable{
private static final long serialVersionUID = 1495564336178422116L;
private String name;// 打卡名称
private String mac;// wifi【wifi】
private Integer attrange;// 范围【地址】
private Integer type;// 类型(1:考勤机;2:地址;3:WIFI)
private double longitude;// 经度【地址】
private double latitude;// 纬度【地址】
}
package cn.timer.api.dto.kqmk;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author lalqq 晚走晚到
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AttLateLate implements Serializable{
private static final long serialVersionUID = 5733260865781069938L;
private String latewalk;// 晚走
private String arrivelate;// 晚到
}
package cn.timer.api.dto.kqmk;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author lalqq 考勤班次
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AttSchedule implements Serializable{
private static final long serialVersionUID = 2301555360668389960L;
private Integer id;
private Integer sort;// 1:上班;2:下班; 3:上班;4:下班;5:上班;6:下班
private Long time;
private Long starttime;
private Long endtime;
}
package cn.timer.api.dto.kqmk;
import java.io.Serializable;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AttendanceCardListDto implements Serializable {
private static final long serialVersionUID = -5736914818628419342L;
private List<AttSchedule> attsch;// 考勤班次
private boolean attmachine;// 考勤机
private boolean attaddress;// 考勤地址
private boolean attwifi;// 考勤WIFI
private List<AttClockMethod> machine;// 详细打卡方式
private List<PunchRecord> attpr;// 打卡记录
private boolean optscheduling;// 未排班时,员工可选择班次打卡
private boolean fieldpersonnel;// 外勤 true:开 false:关
private Long stapclotime;// 自由排班开始时间
private double canpunchworkdate;// 上班打卡后多久大下班卡
private boolean noclockout;// 下班不用打卡
private Integer allowlate;// 允许迟到分钟数
private Integer seriouslate;// 严重迟到分钟数
private Integer absenteeismlate;// 旷工迟到分钟数
private boolean islatelate;// 晚走晚到
private List<AttLateLate> attlat;// 晚走晚到时间
private String latetime;// 前一天晚走小时****
private List<SystemShift> ssfh;// 无排班时获取的系统班次
private Integer attgrouptype;// 1:固定排班;2:自由排班;3:自由工时
}
package cn.timer.api.dto.kqmk;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author lalqq APP 打卡数据
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ClockCollectData implements Serializable {
private static final long serialVersionUID = -7658009549305902379L;
@ApiModelProperty(value = "用户id", example = "字段说明")
private Integer userid;
@ApiModelProperty(value = "打卡类型", example = "1:上班1 2:下班1 3:上班2 4:下班2 5:上班3 6:下班3......")
private Integer type;
@ApiModelProperty(value = "打卡时间", example = "字段说明")
private String punchtime;
@ApiModelProperty(value = "应打卡时间 \"\"", example = "字段说明")
private String punchcardtime;
@ApiModelProperty(value = "打卡类型", example = "1:GPS,2:WIFI,3:考勤机,4:外勤")
private Integer punchcardtype;
@ApiModelProperty(value = "纬度", example = "字段说明")
private String lat;
@ApiModelProperty(value = "经度", example = "字段说明")
private String lon;
@ApiModelProperty(value = "地址", example = "字段说明")
private String address;
@ApiModelProperty(value = "WIFI mac地址", example = "字段说明")
private String mac;
@ApiModelProperty(value = "WIFI名称", example = "字段说明")
private String macname;
@ApiModelProperty(value = "班次id", example = "无排班时 为“0”")
private Integer shifid;
@ApiModelProperty(value = "打卡状态", example = "状态,1:正常 2:异常 3:补卡 4:请假")
private Integer status;
@ApiModelProperty(value = "手机唯一ID", example = "字段说明")
private String registrationid;
@ApiModelProperty(value = "打卡类型", example = "1:打卡 2:更新打卡")
private Integer differ;
}
package cn.timer.api.dto.kqmk;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class KqglAssoPbmxDto {
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "用户id 用户id", example = "101")
private Integer userid;
@ApiModelProperty(value = "日期 ", example = "日期")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date data;
@ApiModelProperty(value = "班次id 班次id", example = "101")
private Integer bcid;
@ApiModelProperty(value = "考勤组id 考勤组id", example = "101")
private Integer kqzid;
private String username;
private String bcname;
private String yemo;
private String xsrq;
private String sbdk1;
private String sbqjks1;
private String sbqjjs1;
private String xbdk1;
private String xbqjks1;
private String xbqjjs1;
private String sbdk2;
private String sbqjks2;
private String sbqjjs2;
private String xbdk2;
private String xbqjks2;
private String xbqjjs2;
private String sbdk3;
private String sbqjks3;
private String sbqjjs3;
private String xbdk3;
private String xbqjks3;
private String xbqjjs3;
private Integer isxbdk;
private Integer sxbcs;
private List<PunchRecord> attpr;// 打卡记录
}
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 KqglAssoZhoupaibanDto {
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "考勤组id 考勤组id", example = "101")
private Integer kqzid;
@ApiModelProperty(value = "类型(1:周一、2:周二、3:周三。。。。、8:周一到周日统一班次、9:排班制) 类型(1:周一、2:周二、3:周三。。。。、8:周一到周日统一班次、9:排班制)", example = "101")
private Integer type;
@ApiModelProperty(value = "班次id(0:自由工时 班次id【大于0为:固定排班和排班制】)", example = "101")
private Integer bcid;
private String bcname;
private String sbdk1;
private String xbdk1;
private String sbdk2;
private String xbdk2;
private String sbdk3;
private String xbdk3;
private String weektime;
private String wekmc;
}
package cn.timer.api.dto.kqmk;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
/**
* @author lalqq 打卡记录
*/
@AllArgsConstructor
@NoArgsConstructor
public class PunchRecord implements Serializable {
private static final long serialVersionUID = -1674107232385310352L;
private Integer id;
private Long dktime;// 打卡时间
private String Strdktime = "";//
private Double lon;// 经度
private Double lat;// 纬度
private String address;// 定位地址
private Integer results;// 打卡结果
private Integer userId;// 用户id
private Integer type;// 类型(类型 0:无排班打卡 1:上班 2:下班)
private Integer status;// 状态(0:打卡无效:此记录已被更新 1:正常 2:异常 3:迟到 4:早退 5:补卡 6:请假 7:加班 8:请假迟到 9:请假早退 10:调休)',
private Integer sort;// 序号
private Integer cardType;// 打卡类型(1:GPS,2:WIFI,3:考勤机)
private String mac;// mac地址
private String macname;// WIFI名称
private Integer qyid;// 企业id
private String attdate;// 考勤日期
private Long attime;// 考勤时间
private String Strattime = "";//
private Integer dkmxid;// 打卡明细id
private Integer bcid;// 班次id
private String remarks;// 考勤备注
private Integer punchmode;// 考勤机打卡方式==>1:指紋;2:人脸;3:密码;4:ID卡
private String punchequipment;// 打卡设备
private String username = "";
private String dept = "";
private String post = "";
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Long getDktime() {
return dktime;
}
@SuppressWarnings("unlikely-arg-type")
public void setDktime(Long dktime) {
this.dktime = dktime;
if (dktime != null && !dktime.equals("")) {
this.Strdktime = format.format(dktime);
}
}
public String getStrdktime() {
return Strdktime;
}
public void setStrdktime(String strdktime) {
Strdktime = strdktime;
}
public Double getLon() {
return lon;
}
public void setLon(Double lon) {
this.lon = lon;
}
public Double getLat() {
return lat;
}
public void setLat(Double lat) {
this.lat = lat;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address == null ? "" : address.trim();
}
public Integer getResults() {
return results;
}
public void setResults(Integer results) {
this.results = results;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Integer getCardType() {
return cardType;
}
public void setCardType(Integer cardType) {
this.cardType = cardType;
}
public String getMacname() {
return macname;
}
public void setMacname(String macname) {
this.macname = macname == null ? "" : macname.trim();
}
public String getMac() {
return mac;
}
public void setMac(String mac) {
this.mac = mac == null ? "" : mac.trim();
}
public Integer getQyid() {
return qyid;
}
public void setQyid(Integer qyid) {
this.qyid = qyid;
}
public String getAttdate() {
return attdate;
}
public void setAttdate(String attdate) {
this.attdate = attdate == null ? "" : attdate.trim();
}
public Long getAttime() {
return attime;
}
@SuppressWarnings("unlikely-arg-type")
public void setAttime(Long attime) {
this.attime = attime;
if (attime != null && !attime.equals("")) {
this.Strattime = format.format(attime);
}
}
public String getStrattime() {
return Strattime;
}
public void setStrattime(String strattime) {
Strattime = strattime;
}
public Integer getDkmxid() {
return dkmxid;
}
public void setDkmxid(Integer dkmxid) {
this.dkmxid = dkmxid;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public Integer getBcid() {
return bcid;
}
public void setBcid(Integer bcid) {
this.bcid = bcid;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public Integer getPunchmode() {
return punchmode;
}
public void setPunchmode(Integer punchmode) {
this.punchmode = punchmode;
}
public String getPunchequipment() {
return punchequipment;
}
public void setPunchequipment(String punchequipment) {
this.punchequipment = punchequipment;
}
public String getDept() {
return dept;
}
public void setDept(String dept) {
this.dept = dept;
}
public String getPost() {
return post;
}
public void setPost(String post) {
this.post = post;
}
}
\ No newline at end of file
package cn.timer.api.dto.kqmk;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author lalqq 无排班时 返回班次
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SystemShift implements Serializable{
private static final long serialVersionUID = -1558779986672010849L;
private Integer id;
private String context;
}
<?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.KqglAssoDkmxMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoDkmx" >
<id column="id" property="id" />
<result column="userid" property="userid" />
<result column="data" property="data" />
<result column="sbdk1" property="sbdk1" />
<result column="sbdk1jg" property="sbdk1jg" />
<result column="xbdk1" property="xbdk1" />
<result column="xbdk1jg" property="xbdk1jg" />
<result column="sbdk2" property="sbdk2" />
<result column="sbdk2jg" property="sbdk2jg" />
<result column="xbdk2" property="xbdk2" />
<result column="xbdk2jg" property="xbdk2jg" />
<result column="sbdk3" property="sbdk3" />
<result column="sbdk3jg" property="sbdk3jg" />
<result column="xbdk3" property="xbdk3" />
<result column="xbdk3jg" property="xbdk3jg" />
<result column="ydkcs" property="ydkcs" />
<result column="gzsc" property="gzsc" />
<result column="qyid" property="qyid" />
<result column="dksj" property="dksj" />
</resultMap>
<sql id="Base_Column_List">
id,
userid,
data,
sbdk1,
sbdk1jg,
xbdk1,
xbdk1jg,
sbdk2,
sbdk2jg,
xbdk2,
xbdk2jg,
sbdk3,
sbdk3jg,
xbdk3,
xbdk3jg,
ydkcs,
gzsc,
qyid,
dksj
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoDkmx_id,
userid KqglAssoDkmx_userid,
data KqglAssoDkmx_data,
sbdk1 KqglAssoDkmx_sbdk1,
sbdk1jg KqglAssoDkmx_sbdk1jg,
xbdk1 KqglAssoDkmx_xbdk1,
xbdk1jg KqglAssoDkmx_xbdk1jg,
sbdk2 KqglAssoDkmx_sbdk2,
sbdk2jg KqglAssoDkmx_sbdk2jg,
xbdk2 KqglAssoDkmx_xbdk2,
xbdk2jg KqglAssoDkmx_xbdk2jg,
sbdk3 KqglAssoDkmx_sbdk3,
sbdk3jg KqglAssoDkmx_sbdk3jg,
xbdk3 KqglAssoDkmx_xbdk3,
xbdk3jg KqglAssoDkmx_xbdk3jg,
ydkcs KqglAssoDkmx_ydkcs,
gzsc KqglAssoDkmx_gzsc,
qyid KqglAssoDkmx_qyid,
dksj KqglAssoDkmx_dksj
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkmx">
INSERT INTO kqgl_asso_dkmx
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != userid'>
userid,
</if>
<if test ='null != data'>
data,
</if>
<if test ='null != sbdk1'>
sbdk1,
</if>
<if test ='null != sbdk1jg'>
sbdk1jg,
</if>
<if test ='null != xbdk1'>
xbdk1,
</if>
<if test ='null != xbdk1jg'>
xbdk1jg,
</if>
<if test ='null != sbdk2'>
sbdk2,
</if>
<if test ='null != sbdk2jg'>
sbdk2jg,
</if>
<if test ='null != xbdk2'>
xbdk2,
</if>
<if test ='null != xbdk2jg'>
xbdk2jg,
</if>
<if test ='null != sbdk3'>
sbdk3,
</if>
<if test ='null != sbdk3jg'>
sbdk3jg,
</if>
<if test ='null != xbdk3'>
xbdk3,
</if>
<if test ='null != xbdk3jg'>
xbdk3jg,
</if>
<if test ='null != ydkcs'>
ydkcs,
</if>
<if test ='null != gzsc'>
gzsc,
</if>
<if test ='null != qyid'>
qyid,
</if>
<if test ='null != dksj'>
dksj
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != userid'>
#{userid},
</if>
<if test ='null != data'>
#{data},
</if>
<if test ='null != sbdk1'>
#{sbdk1},
</if>
<if test ='null != sbdk1jg'>
#{sbdk1jg},
</if>
<if test ='null != xbdk1'>
#{xbdk1},
</if>
<if test ='null != xbdk1jg'>
#{xbdk1jg},
</if>
<if test ='null != sbdk2'>
#{sbdk2},
</if>
<if test ='null != sbdk2jg'>
#{sbdk2jg},
</if>
<if test ='null != xbdk2'>
#{xbdk2},
</if>
<if test ='null != xbdk2jg'>
#{xbdk2jg},
</if>
<if test ='null != sbdk3'>
#{sbdk3},
</if>
<if test ='null != sbdk3jg'>
#{sbdk3jg},
</if>
<if test ='null != xbdk3'>
#{xbdk3},
</if>
<if test ='null != xbdk3jg'>
#{xbdk3jg},
</if>
<if test ='null != ydkcs'>
#{ydkcs},
</if>
<if test ='null != gzsc'>
#{gzsc},
</if>
<if test ='null != qyid'>
#{qyid},
</if>
<if test ='null != dksj'>
#{dksj}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_dkmx
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkmx">
UPDATE kqgl_asso_dkmx
<set>
<if test ='null != userid'>userid = #{userid},</if>
<if test ='null != data'>data = #{data},</if>
<if test ='null != sbdk1'>sbdk1 = #{sbdk1},</if>
<if test ='null != sbdk1jg'>sbdk1jg = #{sbdk1jg},</if>
<if test ='null != xbdk1'>xbdk1 = #{xbdk1},</if>
<if test ='null != xbdk1jg'>xbdk1jg = #{xbdk1jg},</if>
<if test ='null != sbdk2'>sbdk2 = #{sbdk2},</if>
<if test ='null != sbdk2jg'>sbdk2jg = #{sbdk2jg},</if>
<if test ='null != xbdk2'>xbdk2 = #{xbdk2},</if>
<if test ='null != xbdk2jg'>xbdk2jg = #{xbdk2jg},</if>
<if test ='null != sbdk3'>sbdk3 = #{sbdk3},</if>
<if test ='null != sbdk3jg'>sbdk3jg = #{sbdk3jg},</if>
<if test ='null != xbdk3'>xbdk3 = #{xbdk3},</if>
<if test ='null != xbdk3jg'>xbdk3jg = #{xbdk3jg},</if>
<if test ='null != ydkcs'>ydkcs = #{ydkcs},</if>
<if test ='null != gzsc'>gzsc = #{gzsc},</if>
<if test ='null != qyid'>qyid = #{qyid},</if>
<if test ='null != dksj'>dksj = #{dksj}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_dkmx
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_dkmx
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_dkmx
</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.KqglAssoPbmxMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoPbmx" >
<id column="id" property="id" />
<result column="userid" property="userid" />
<result column="data" property="data" />
<result column="bcid" property="bcid" />
<result column="kqzid" property="kqzid" />
</resultMap>
<resultMap id="AssoPbmxMap" type="cn.timer.api.dto.kqmk.KqglAssoPbmxDto" >
<id column="id" property="id" />
<result column="userid" property="userid" />
<result column="data" property="data" />
<result column="bcid" property="bcid" />
<result column="kqzid" property="kqzid" />
<result column="bcname" property="bcname" />
<result column="sbdk1" property="sbdk1" />
<result column="sbqjks1" property="sbqjks1" />
<result column="sbqjjs1" property="sbqjjs1" />
<result column="xbdk1" property="xbdk1" />
<result column="xbqjks1" property="xbqjks1" />
<result column="xbqjjs1" property="xbqjjs1" />
<result column="sbdk2" property="sbdk2" />
<result column="sbqjks2" property="sbqjks2" />
<result column="sbqjjs2" property="sbqjjs2" />
<result column="xbdk2" property="xbdk2" />
<result column="xbqjks2" property="xbqjks2" />
<result column="xbqjjs2" property="xbqjjs2" />
<result column="sbdk3" property="sbdk3" />
<result column="sbqjks3" property="sbqjks3" />
<result column="sbqjjs3" property="sbqjjs3" />
<result column="xbdk3" property="xbdk3" />
<result column="xbqjks3" property="xbqjks3" />
<result column="xbqjjs3" property="xbqjjs3" />
<result column="isxbdk" property="isxbdk" />
<result column="sxbcs" property="sxbcs" />
</resultMap>
<sql id="Base_Column_List">
id,
userid,
data,
bcid,
kqzid
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoPbmx_id,
userid KqglAssoPbmx_userid,
data KqglAssoPbmx_data,
bcid KqglAssoPbmx_bcid,
kqzid KqglAssoPbmx_kqzid
</sql>
<select id="getScheduleSpecificAttendance" resultMap="AssoPbmxMap">
select pbmx.*,
bcsz.`name` bcname,
bcsz.sbdk1,
bcsz.sbqjks1,
bcsz.sbqjjs1,
bcsz.xbdk1,
bcsz.xbqjks1,
bcsz.xbqjjs1,
bcsz.sbdk2,
bcsz.sbqjks2,
bcsz.sbqjjs2,
bcsz.xbdk2,
bcsz.xbqjks2,
bcsz.xbqjjs2,
bcsz.sbdk3,
bcsz.sbqjks3,
bcsz.sbqjjs3,
bcsz.xbdk3,
bcsz.xbqjks3,
bcsz.xbqjjs3,
bcsz.sxbcs,
bcsz.is_xbdk as isxbdk
from kqgl_asso_pbmx pbmx
LEFT JOIN kqgl_asso_bcsz as bcsz on bcsz.id = pbmx.bcid
where pbmx.kqzid = #{kqzid}
and pbmx.userid = #{userid}
and pbmx.`data` = #{date}
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoPbmx">
INSERT INTO kqgl_asso_pbmx
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != userid'>
userid,
</if>
<if test ='null != data'>
data,
</if>
<if test ='null != bcid'>
bcid,
</if>
<if test ='null != kqzid'>
kqzid
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != userid'>
#{userid},
</if>
<if test ='null != data'>
#{data},
</if>
<if test ='null != bcid'>
#{bcid},
</if>
<if test ='null != kqzid'>
#{kqzid}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_pbmx
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoPbmx">
UPDATE kqgl_asso_pbmx
<set>
<if test ='null != userid'>userid = #{userid},</if>
<if test ='null != data'>data = #{data},</if>
<if test ='null != bcid'>bcid = #{bcid},</if>
<if test ='null != kqzid'>kqzid = #{kqzid}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_pbmx
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_pbmx
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_pbmx
</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.KqglAssoTeshuMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoTeshu" >
<id column="id" property="id" />
<result column="kqzid" property="kqzid" />
<result column="tsrq" property="tsrq" />
<result column="bcid" property="bcid" />
<result column="lusj_time" property="lusjTime" />
<result column="luryid" property="luryid" />
<result column="type" property="type" />
</resultMap>
<sql id="Base_Column_List">
id,
kqzid,
tsrq,
bcid,
lusj_time,
luryid,
type
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoTeshu_id,
kqzid KqglAssoTeshu_kqzid,
tsrq KqglAssoTeshu_tsrq,
bcid KqglAssoTeshu_bcid,
lusj_time KqglAssoTeshu_lusj_time,
luryid KqglAssoTeshu_luryid,
type KqglAssoTeshu_type
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoTeshu">
INSERT INTO kqgl_asso_teshu
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != kqzid'>
kqzid,
</if>
<if test ='null != tsrq'>
tsrq,
</if>
<if test ='null != bcid'>
bcid,
</if>
<if test ='null != lusjTime'>
lusj_time,
</if>
<if test ='null != luryid'>
luryid,
</if>
<if test ='null != type'>
type
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != kqzid'>
#{kqzid},
</if>
<if test ='null != tsrq'>
#{tsrq},
</if>
<if test ='null != bcid'>
#{bcid},
</if>
<if test ='null != lusjTime'>
#{lusjTime},
</if>
<if test ='null != luryid'>
#{luryid},
</if>
<if test ='null != type'>
#{type}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_teshu
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoTeshu">
UPDATE kqgl_asso_teshu
<set>
<if test ='null != kqzid'>kqzid = #{kqzid},</if>
<if test ='null != tsrq'>tsrq = #{tsrq},</if>
<if test ='null != bcid'>bcid = #{bcid},</if>
<if test ='null != lusjTime'>lusj_time = #{lusjTime},</if>
<if test ='null != luryid'>luryid = #{luryid},</if>
<if test ='null != type'>type = #{type}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_teshu
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_teshu
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_teshu
</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.KqglAssoZhoupaibanMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoZhoupaiban" >
<id column="id" property="id" />
<result column="kqzid" property="kqzid" />
<result column="type" property="type" />
<result column="bcid" property="bcid" />
</resultMap>
<sql id="Base_Column_List">
id,
kqzid,
type,
bcid
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoZhoupaiban_id,
kqzid KqglAssoZhoupaiban_kqzid,
type KqglAssoZhoupaiban_type,
bcid KqglAssoZhoupaiban_bcid
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoZhoupaiban">
INSERT INTO kqgl_asso_zhoupaiban
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != kqzid'>
kqzid,
</if>
<if test ='null != type'>
type,
</if>
<if test ='null != bcid'>
bcid
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != kqzid'>
#{kqzid},
</if>
<if test ='null != type'>
#{type},
</if>
<if test ='null != bcid'>
#{bcid}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_zhoupaiban
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoZhoupaiban">
UPDATE kqgl_asso_zhoupaiban
<set>
<if test ='null != kqzid'>kqzid = #{kqzid},</if>
<if test ='null != type'>type = #{type},</if>
<if test ='null != bcid'>bcid = #{bcid}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_zhoupaiban
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_zhoupaiban
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_zhoupaiban
</select>
-->
</mapper>
\ No newline at end of file
......@@ -132,6 +132,12 @@
where a.qyid = #{qyid,jdbcType=INTEGER}
</select>
<select id="getAttendanceGroupInformationByUserid" resultMap="BaseResultMap">
select * from kqgl_main_kqz kqz
where kqz.id = (select yhkqz.kqzid from kqgl_asso_yhkqz yhkqz
where yhkqz.userid = #{userid,jdbcType=INTEGER} and yhkqz.qyid = #{qyid,jdbcType=INTEGER})
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglMainKqz">
......
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