Commit 2c462840 by 邓实川

Merge branch 'develop' of http://120.24.24.239:8082/8timerv2/8timerapiv200.git into dsc

parents 7c365873 d02138a0
......@@ -7,11 +7,7 @@ import java.util.List;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.stereotype.Component;
import org.springframework.validation.BeanPropertyBindingResult;
import org.springframework.validation.ObjectError;
......@@ -25,12 +21,12 @@ import cn.timer.api.aspect.lang.bean.ValidationError;
import cn.timer.api.utils.ResultUtil;
/**
* 校验信息返回
* 校验信息返回-(闲置)
*
* @author TZQ
*/
@Aspect
@Component
//@Aspect
//@Component
public class BindingResultAspect {
// @annotation配置织入点
......@@ -40,7 +36,7 @@ public class BindingResultAspect {
// }
// execution 配置织入点 -匹配 cn.timer.api.controller 包下的所有子包的类的方法
@Pointcut("execution(* cn.timer.api.controller.spmk.*.*(..))")
// @Pointcut("execution(* cn.timer.api.controller.spmk.*.*(..))")
public void clazzPointCut(){
}
......@@ -53,45 +49,41 @@ public class BindingResultAspect {
// }
// @Around("bindingResultPointCut() && args(..,bindingResult)")
@Around("clazzPointCut()")
public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
Long startTime = System.currentTimeMillis();
Object retVal;
Object[] objs = joinPoint.getArgs();
List<Object> listObj = CollectionUtil.toList(objs);
BeanPropertyBindingResult optional = (BeanPropertyBindingResult)listObj.stream()
.filter(p -> "BeanPropertyBindingResult".equals(ClassUtil.getClassName(p, true)))
.findFirst()
.orElse(null);
if(optional != null && optional.hasErrors()){
List<ObjectError> ls = optional.getAllErrors();
List<ValidationError> listVe = new ArrayList<ValidationError>();
ValidationError ve;
for (ObjectError one : ls) {
String fieldString = one.getCodes().length >= 1 ? one.getCodes()[0] : "";
if (fieldString != null) {
fieldString = fieldString.substring(fieldString.lastIndexOf(".") + 1);
}
// for (String str : one.getCodes()) {
// System.err.println(str);
// @Around("clazzPointCut()")
// public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
// Long startTime = System.currentTimeMillis();
// Object retVal;
// Object[] objs = joinPoint.getArgs();
// List<Object> listObj = CollectionUtil.toList(objs);
// BeanPropertyBindingResult optional = (BeanPropertyBindingResult)listObj.stream()
// .filter(p -> "BeanPropertyBindingResult".equals(ClassUtil.getClassName(p, true)))
// .findFirst()
// .orElse(null);
// if(optional != null && optional.hasErrors()){
// List<ObjectError> ls = optional.getAllErrors();
// List<ValidationError> listVe = new ArrayList<ValidationError>();
// ValidationError ve;
// for (ObjectError one : ls) {
//
// String fieldString = one.getCodes().length >= 1 ? one.getCodes()[0] : "";
// if (fieldString != null) {
// fieldString = fieldString.substring(fieldString.lastIndexOf(".") + 1);
// }
ve = ValidationError.builder().field(fieldString).msg(one.getDefaultMessage()).build();
listVe.add(ve);
}
retVal = ResultUtil.error(listVe);
}else {
retVal = joinPoint.proceed(joinPoint.getArgs());
}
Console.log("返回内容 {}: " ,JSONObject.toJSONString(retVal));
Long endtime = System.currentTimeMillis();
Console.log("执行耗时为{}:" ,endtime-startTime + "ms");
return retVal;
}
//
// ve = ValidationError.builder().field(fieldString).msg(one.getDefaultMessage()).build();
// listVe.add(ve);
//
// }
// retVal = ResultUtil.error(listVe);
// }else {
// retVal = joinPoint.proceed(joinPoint.getArgs());
// }
// Console.log("返回内容 {}: " ,JSONObject.toJSONString(retVal));
// Long endtime = System.currentTimeMillis();
// Console.log("执行耗时为{}:" ,endtime-startTime + "ms");
//
// return retVal;
// }
protected void handleDataScope(final JoinPoint joinPoint)
{
......
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.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-09
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_dkdz")
@ApiModel("考勤打卡地址")
public class KqglAssoDkdz extends Model<KqglAssoDkdz> {
/**
*
*/
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 = "详细地址 ", example = "详细地址")
private String address;
@ApiModelProperty(value = "打卡范围 打卡范围", example = "101")
private Integer dkfw;
@ApiModelProperty(value = "经度 ", example = "经度")
private Double lon;
@ApiModelProperty(value = "纬度 ", example = "纬度")
private Double lat;
@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.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.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-09
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_dkwx")
@ApiModel("考勤打卡wifi")
public class KqglAssoDkwx extends Model<KqglAssoDkwx> {
/**
*
*/
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 = "mac地址 ", example = "mac地址")
private String mac;
@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-09
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_kqj")
@ApiModel("考勤机表")
public class KqglAssoKqj extends Model<KqglAssoKqj> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "1")
private Integer id;
@ApiModelProperty(value = "名称 ", example = "考勤机测试")
private String name;
@ApiModelProperty(value = "设备编码 ", example = "45654HF565HY5")
private String code;
@ApiModelProperty(value = "企业id 企业id", example = "117")
private Integer qyid;
@ApiModelProperty(value = "录入时间 录入时间", example = "1588988847000")
private Long lusjTime;
@ApiModelProperty(value = "录入人员 录入人员", example = "201")
private Integer luryid;
@ApiModelProperty(value = "类型(1:浩顺考勤机;2:中控考勤机) 类型(1:浩顺考勤机;2:中控考勤机)", example = "1")
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;
import lombok.experimental.Tolerate;
/**
* @author LAL 2020-05-09
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_kqzdkfs")
@ApiModel("考勤组绑定的打卡方式")
public class KqglAssoKqzdkfs extends Model<KqglAssoKqzdkfs> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "打卡方式id(考勤机、WIFI、地址) 打卡方式id(考勤机、WIFI、地址)", example = "101")
private Integer dkfsid;
@ApiModelProperty(value = "考勤组ID 考勤组ID", example = "101")
private Integer kqzId;
@ApiModelProperty(value = "类型(1:考勤机;2:地址;3:WIFI) 类型(1:考勤机;2:地址;3:WIFI)", example = "101")
private Integer type;
@ApiModelProperty(value = "企业id 企业id", example = "101")
private Integer qyid;
@ApiModelProperty(value = "状态(0:停用;1:启用) 状态(0:停用;1:启用)", example = "101")
private Integer state;
}
\ 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-09
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_leave_balance")
@ApiModel("员工假期余额")
public class KqglAssoLeaveBalance extends Model<KqglAssoLeaveBalance> {
/**
*
*/
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 leaveRulesId;
@ApiModelProperty(value = "员工id 员工id", example = "101")
private Integer userid;
@ApiModelProperty(value = "修改动作 1:增加;2:减少", example = "101")
private Integer modifyAction;
@ApiModelProperty(value = "余额天数 ", example = "余额天数")
private String balanceDays;
@ApiModelProperty(value = "理由 ", example = "理由")
private String reason;
@ApiModelProperty(value = "修改人 修改人", example = "101")
private Integer modifyUserid;
@ApiModelProperty(value = "修改时间 修改时间", example = "101")
private Long modifyTimer;
@ApiModelProperty(value = "修改序号 修改序号", example = "101")
private Integer modifyNumber;
@ApiModelProperty(value="企业组织代码 企业组织代码",example="101")
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_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 Integer 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;
@ApiModelProperty(value = "假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”)", example = "101")
private Integer leaveBalance;
}
\ 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 String 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-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-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.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.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-09
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_yhsb")
@ApiModel("用户与设备关系表")
public class KqglAssoYhsb extends Model<KqglAssoYhsb> {
/**
*
*/
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 = "设备id 设备id", example = "101")
private Integer kqjid;
@ApiModelProperty(value = "类型(类型 1:考勤机)", example = "101")
private Integer type;
@ApiModelProperty(value = "是否为管理员--0:否;1:是 是否为管理员--0:否;1:是", example = "101")
private Integer isGly;
}
\ 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
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-09
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_main_kqz")
@ApiModel("考勤组")
public class KqglMainKqz extends Model<KqglMainKqz> {
/**
*
*/
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 = "考勤备注 ", example = "考勤备注")
private String kqbz;
@ApiModelProperty(value = "排班方式(1:固定排班;2:自由排班;3:自由工时) 排班方式(1:固定排班;2:自由排班;3:自由工时)", example = "101")
private Integer pbfs;
@ApiModelProperty(value = "企业id 企业id", example = "101")
private Integer qyid;
@ApiModelProperty(value = "是否开启法定节假日休息 是否开启法定节假日休息", example = "101")
private Integer isFdjjr;
@ApiModelProperty(value = "考勤开始时间(自由工时专用) ", example = "考勤开始时间(自由工时专用)")
private String kqkssjTime;
@ApiModelProperty(value = "至少工作时长(自由工时专用--【已去掉】) ", example = "至少工作时长(自由工时专用--【已去掉】)")
private String zsgzsc;
@ApiModelProperty(value = "正常工作时长(自由工时专用--【已去掉】) ", example = "正常工作时长(自由工时专用--【已去掉】)")
private String zcgzsc;
@ApiModelProperty(value = "上班后多久可打下班卡(自由工时专用) ", example = "上班后多久可打下班卡(自由工时专用)")
private String jbzdsc;
@ApiModelProperty(value = "是否开启到期提醒([排班制专用]0:否;1:是) 是否开启到期提醒([排班制专用]0:否;1:是)", example = "101")
private Integer isDqtx;
@ApiModelProperty(value = "提醒人员([排班制专用]员工id以[“,”]连接 ", example = "json数组)")
private String txry;
@ApiModelProperty(value = "提醒方式([排班制专用]提前15天、7天、3天、1天) 提醒方式([排班制专用]提前15天、7天、3天、1天)", example = "101")
private Integer txfs;
@ApiModelProperty(value = "提醒循环天数([排班制专用]) 提醒循环天数([排班制专用])", example = "101")
private Integer txxhts;
@ApiModelProperty(value = "提醒时间([排班制专用]) ", example = "提醒时间([排班制专用])")
private String txsjTime;
@ApiModelProperty(value = "提示方式([排班制专用]PC端、APP客户端、短信、邮件 ", example = "以[“,”]连接 json数组)")
private String tsfs;
@ApiModelProperty(value = "是否开启未排班时打卡([排班制专用]0:否;1:是;未排班时,员工可以选择班次打卡) 是否开启未排班时打卡([排班制专用]0:否;1:是;未排班时,员工可以选择班次打卡)", example = "101")
private Integer isWpbsdk;
@ApiModelProperty(value = "使用班次【排班制使用】 ", example = "使用班次【排班制使用】")
private String sybc;
@ApiModelProperty(value = "是否开启未排班时,员工可选择班次打卡 是否开启未排班时,员工可选择班次打卡", example = "101")
private Integer isXzbcdk;
@ApiModelProperty(value = "外勤 外勤", example = "101")
private Integer isWq;
}
\ No newline at end of file
......@@ -18,7 +18,7 @@ import cn.timer.api.dto.yggl.YgbintuDto;
import lombok.Getter;
/**
* @date 2020年3月23日
* @date 2020年3月23日
* @author 翁东州
* @方法中文名称:
*/
......@@ -28,29 +28,32 @@ public interface YgEnumInterface {
* 男女
*/
@Getter
enum sex implements YgEnumInterface{
MAN(0,"男"),WOMAN(1,"女");
enum sex implements YgEnumInterface {
MAN(0, "男"), WOMAN(1, "女");
private Integer type;
private String name;
sex(Integer type, String name) {
this.type = type;
this.name = name;
}
public static String isMan(String index) {
sex mow = (index == null || index.length() == 0) ? sex.MAN : (index.indexOf(sex.MAN.name)!= -1)||(index.indexOf(sex.MAN.type)!= -1) ? sex.MAN:sex.WOMAN;
return mow.type.toString();
sex mow = (index == null || index.length() == 0) ? sex.MAN
: (index.indexOf(sex.MAN.name) != -1) || (index.indexOf(sex.MAN.type) != -1) ? sex.MAN : sex.WOMAN;
return mow.type.toString();
}
}
/**
* 员工类型
*/
@Getter
enum YgJobType implements YgEnumInterface{
QUANZHI(0, "全"),SHIXI(1, "实习"),JIANZHI(2, "兼"),LWPQ(3, "劳务派遣"),
LAOWU(4, "劳务"),PAIQIAN(5, "派遣"),WAIBAO(6, "外包"),TUIXIU(7, "退休");
enum YgJobType implements YgEnumInterface {
QUANZHI(0, "全"), SHIXI(1, "实习"), JIANZHI(2, "兼"), LWPQ(3, "劳务派遣"), LAOWU(4, "劳务"), PAIQIAN(5, "派遣"),
WAIBAO(6, "外包"), TUIXIU(7, "退休");
private Integer type;
......@@ -63,45 +66,49 @@ public interface YgEnumInterface {
public static String choose(String index) {
YgJobType result = YgJobType.QUANZHI;
if(index == null || index.length() == 0) return result.type.toString();
if (index == null || index.length() == 0)
return result.type.toString();
for (YgJobType item : YgJobType.values()) {
if (index.indexOf(item.getType()) !=-1 ||index.indexOf(item.getName()) !=-1 ) result = item;
if (index.indexOf(item.getType()) != -1 || index.indexOf(item.getName()) != -1)
result = item;
}
return result.type.toString();
}
}
/**
* 员工状态
*/
@Getter
enum jobStatus implements YgEnumInterface{
SHIYONG(0,"试用"),ZHENSHI(1,"正式"),LIZHIZHONG(2,"离职中"),YILIZHI(3,"已离职");
enum jobStatus implements YgEnumInterface {
SHIYONG(0, "试用"), ZHENSHI(1, "正式"), LIZHIZHONG(2, "离职中"), YILIZHI(3, "已离职");
private Integer type;
private String name;
jobStatus(Integer type, String name) {
this.type = type;
this.name = name;
}
public static String isZhen(String index) {
jobStatus zos = (index == null || index.length() == 0) ? YgEnumInterface.jobStatus.ZHENSHI: (index.indexOf(jobStatus.ZHENSHI.name)!= -1)||(index.indexOf(jobStatus.ZHENSHI.type)!= -1) ? jobStatus.ZHENSHI:jobStatus.SHIYONG;
jobStatus zos = (index == null || index.length() == 0) ? YgEnumInterface.jobStatus.ZHENSHI
: (index.indexOf(jobStatus.ZHENSHI.name) != -1) || (index.indexOf(jobStatus.ZHENSHI.type) != -1)
? jobStatus.ZHENSHI
: jobStatus.SHIYONG;
return zos.type.toString();
}
}
/**
* 入职日期
*/
@Getter
enum rzTime implements YgEnumInterface{
ZHEN("--","yyyy-M-d"),XIE("//","yyyy/M/d"),
DIAN("..","yyyy.M.d"),NYR("年月日","yyyy年M月d日");
enum rzTime implements YgEnumInterface {
ZHEN("--", "yyyy-M-d"), XIE("//", "yyyy/M/d"), DIAN("..", "yyyy.M.d"), NYR("年月日", "yyyy年M月d日");
private String type;
private String name;
......@@ -110,124 +117,151 @@ public interface YgEnumInterface {
this.type = type;
this.name = name;
}
public static String tranTime(String index) {
//String str ="2013/11/12";
// String str ="2013/11/12";
if (index == null) {
return null;
}
String p = "年|月|日|号|时|/|//-";
String result = index.replaceAll(p, "-");
String p2 = "-$";
String result2 = result.replaceAll(p2, "");
return result2;
}
/*
* public static String tranTime(String index) { DateFormat zhenFormat = new
* SimpleDateFormat(ZHEN.name); String result = zhenFormat.format(new Date());
* if (index == null || index.length() == 0) return result; Pattern pattern =
* Pattern.compile("^[0-9]{8}$"); if (pattern.matcher(index).matches()) { result
* = index.substring(0, 4) + "-" + index.substring(4, 6) + "-" +
* index.substring(6, 8); return result; } String s =
* index.replaceAll("([1-9]+[0-9]*|0)(\\.[\\d]+)?", ""); for (rzTime item :
* rzTime.values()) { if (s.indexOf(item.type) != -1) { DateFormat dateFormat =
* new SimpleDateFormat(item.name); try { result = new
* SimpleDateFormat(ZHEN.name).format(dateFormat.parse(index)); return result; }
* catch (ParseException e) { e.printStackTrace(); return result; } } } return
* result; }
*/
// public static String tranTime(String index) {
// DateFormat zhenFormat = new SimpleDateFormat(ZHEN.name);
// String result = zhenFormat.format(new Date());
// if (index == null || index.length() == 0)
// return result;
// Pattern pattern = Pattern.compile("^[0-9]{8}$");
// if (pattern.matcher(index).matches()) {
// result = index.substring(0, 4) + "-" + index.substring(4, 6) + "-" + index.substring(6, 8);
// return result;
// }
// String s = index.replaceAll("([1-9]+[0-9]*|0)(\\.[\\d]+)?", "");
// for (rzTime item : rzTime.values()) {
// if (s.indexOf(item.type) != -1) {
// DateFormat dateFormat = new SimpleDateFormat(item.name);
// try {
// result = new SimpleDateFormat(ZHEN.name).format(dateFormat.parse(index));
// return result;
// } catch (ParseException e) {
// e.printStackTrace();
// return result;
// }
// }
// }
// return result;
// }
public static String tranTime2(String result) {
String isYear ="^(?:(?!0000)[0-9]{4} -(?:(?:0[1-9]|1[0-2]) -(?:0[1-9]|1[0-9]|2[0-8]) |(?:0[13-9]|1[0-2]) -(?:29|30) |(?:0[13578]|1[02]) -31 )|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00) -02 -29 )$";
String isYear = "^(?:(?!0000)[0-9]{4} -(?:(?:0[1-9]|1[0-2]) -(?:0[1-9]|1[0-9]|2[0-8]) |(?:0[13-9]|1[0-2]) -(?:29|30) |(?:0[13578]|1[02]) -31 )|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00) -02 -29 )$";
Pattern pattern = Pattern.compile(isYear);
if (pattern.matcher(result).matches()) {
return result;
}else {
result = new SimpleDateFormat(ZHEN.name).format(new Date());
} else {
result = new SimpleDateFormat(ZHEN.name).format(new Date());
return result;
}
}
}
/**
* 试用期
*/
@Getter
enum syq implements YgEnumInterface{
ZERO(0,"无"),ONE(1,"一"),TWO(2,"二"),THREE(3,"三"),FOUR(4,"四"),FIVE(5,"五"),SIX(6,"六");
enum syq implements YgEnumInterface {
ZERO(0, "无"), ONE(1, "一"), TWO(2, "二"), THREE(3, "三"), FOUR(4, "四"), FIVE(5, "五"), SIX(6, "六");
private Integer type;
private String name;
syq(Integer type, String name) {
this.type = type;
this.name = name;
}
public static String choose(String index) {
syq result = syq.ZERO;
if (index == null || index.length() == 0) result.type.toString();
if (index == null || index.length() == 0)
result.type.toString();
for (syq item : syq.values()) {
if (index.indexOf(item.getName()) !=-1 ||index.indexOf(item.getType()) !=-1 ) result=item;
if (index.indexOf(item.getName()) != -1 || index.indexOf(item.getType()) != -1)
result = item;
}
return result.type.toString();
}
}
/**
* 工龄
*/
@Getter
enum workage implements YgEnumInterface{
//NEW(0,183),HALF(1,365),ONE(2,548),ONEHALF(3,730),TWO(4,913),LONG(5,10000);
NEW(0,30,0),ROOKIE(31,183,0),HALF(184,365,0),ONE(366,548,0),ONEHALF(549,730,0),TWO(731,1000,0),LONG(1001,10000,0);
enum workage implements YgEnumInterface {
// NEW(0,183),HALF(1,365),ONE(2,548),ONEHALF(3,730),TWO(4,913),LONG(5,10000);
NEW(0, 30, 0), ROOKIE(31, 183, 0), HALF(184, 365, 0), ONE(366, 548, 0), ONEHALF(549, 730, 0), TWO(731, 1000, 0),
LONG(1001, 10000, 0);
private Integer begin;
private Integer end;
private Integer number;
workage(Integer begin, Integer end,Integer number) {
workage(Integer begin, Integer end, Integer number) {
this.begin = begin;
this.end = end;
this.number = number;
}
public static Map<String, Integer> choose(List<YgbintuDto> bintu) {
for (YgbintuDto b : bintu) {
Integer index = b.getWorkage();
for (workage item : workage.values()) {
if (index>= item.begin && index<=item.end) item.number++;
if (index >= item.begin && index <= item.end)
item.number++;
}
}
Map<String, Integer> result = new HashMap<String, Integer>();
result.put("本月新入职", NEW.number);
result.put("x<0.5", NEW.number+ROOKIE.number);
result.put("x<0.5", NEW.number + ROOKIE.number);
result.put("0.5<x<1", HALF.number);
result.put("1<x<1.5", ONE.number);
result.put("1.5<x<2", ONEHALF.number);
result.put("2<x<3", TWO.number);
result.put("x++", LONG.number);
NEW.number=0;ROOKIE.number=0;HALF.number=0;ONE.number=0;ONEHALF.number=0;TWO.number=0;LONG.number=0;
NEW.number = 0;
ROOKIE.number = 0;
HALF.number = 0;
ONE.number = 0;
ONEHALF.number = 0;
TWO.number = 0;
LONG.number = 0;
return result;
}
}
/**
* 年龄
*/
@Getter
enum age implements YgEnumInterface{
//NEW(0,183),HALF(1,365),ONE(2,548),ONEHALF(3,730),TWO(4,913),LONG(5,10000);
CHILD(1,17,0),TEEN(18,25,0),YOUNG(26,32,0),MAN(33,38,0),MIDDLE(39,45,0),OLD(46,1000,0);
enum age implements YgEnumInterface {
// NEW(0,183),HALF(1,365),ONE(2,548),ONEHALF(3,730),TWO(4,913),LONG(5,10000);
CHILD(1, 17, 0), TEEN(18, 25, 0), YOUNG(26, 32, 0), MAN(33, 38, 0), MIDDLE(39, 45, 0), OLD(46, 1000, 0);
private Integer begin;
private Integer end;
private Integer number;
age(Integer begin, Integer end,Integer number) {
age(Integer begin, Integer end, Integer number) {
this.begin = begin;
this.end = end;
this.number = number;
}
public static Map<String, Integer> choose(List<YgbintuDto> bintu) {
Integer average = 0;
Integer i = 0;
......@@ -235,7 +269,9 @@ public interface YgEnumInterface {
for (YgbintuDto b : bintu) {
Integer index = b.getAge();
for (; i < age.values().length; i++) {
if (index>= age.values()[i].begin && index<=age.values()[i].end) age.values()[i].number++;j++;
if (index >= age.values()[i].begin && index <= age.values()[i].end)
age.values()[i].number++;
j++;
}
average = average + index;
}
......@@ -246,9 +282,14 @@ public interface YgEnumInterface {
result.put("32-38", MAN.number);
result.put("38-45", MIDDLE.number);
result.put("45以上", OLD.number);
Integer pInjun = j>0 ?(average/j) :0;
Integer pInjun = j > 0 ? (average / j) : 0;
result.put("平均年龄", pInjun);
CHILD.number =0;TEEN.number=0;YOUNG.number=0;MAN.number=0;MIDDLE.number=0;OLD.number=0;
CHILD.number = 0;
TEEN.number = 0;
YOUNG.number = 0;
MAN.number = 0;
MIDDLE.number = 0;
OLD.number = 0;
return result;
}
}
......
package cn.timer.api.config.exception;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.validation.ObjectError;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import cn.timer.api.aspect.lang.bean.ValidationError;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
......@@ -57,4 +65,31 @@ public class GlobalExceptionHandler {
}
return ResultUtil.error(e.getCode(), e.getMessage());
}
/**
* 自定义验证异常
*/
@ExceptionHandler(MethodArgumentNotValidException.class)
public Object validExceptionHandler(MethodArgumentNotValidException e)
{
// log.error("1--------"+e.getMessage());
// log.error("2--------"+JSONUtil.parse(e.getBindingResult().getAllErrors()));
// String message = e.getBindingResult().getFieldError().getDefaultMessage();
// String field = e.getBindingResult().getFieldError().getField();
List<ObjectError> ls = e.getBindingResult().getAllErrors();
List<ValidationError> listVe = new ArrayList<ValidationError>();
ValidationError ve;
for (ObjectError one : ls) {
String fieldString = one.getCodes().length >= 1 ? one.getCodes()[0] : "";
if (fieldString != null) {
fieldString = fieldString.substring(fieldString.lastIndexOf(".") + 1);
}
ve = ValidationError.builder().field(fieldString).msg(one.getDefaultMessage()).build();
listVe.add(ve);
}
return ResultUtil.error(listVe);
}
}
package cn.timer.api.config.exception;
public class ValidationMsg {
public static final String NULL = "参数必须为空";
public static final String NOTNULL = "参数值不能为空";
public static final String NOTEMPTY = "参数值不能为空";
public static final String NOTBLANK = "参数键值不能为空";
public static final String ASSERTTRUE = "参数值必须为true";
public static final String ASSERTFALSE = "参数值必须为false";
public static final String PATTERN = "参数值格式不符";
public static final String SIZE = "参数长度不符";
public static final String MIN = "参数值太小";
public static final String MAX = "参数值太大";
public static final String DECIMALMIN = "参数值太小";
public static final String DECIMALMAX = "参数值太大";
public static final String DIGITS = "参数值大小不在有效范围内";
public static final String PAST = "参数值必须为过去日期";
public static final String FUTURE = "参数值必须为未来日期";
public static final String EMAIL = "参数值格式必须为邮箱地址";
public static final String LENGTH = "参数值长度不在有效范围内";
public static final String RANGE = "参数值不在有效范围内";
}
......@@ -22,9 +22,10 @@ public class MyConfiguration {
// 创建配置类
FastJsonConfig config = new FastJsonConfig();
config.setSerializerFeatures(
SerializerFeature.WriteNullListAsEmpty,
SerializerFeature.WriteMapNullValue,
SerializerFeature.WriteNullStringAsEmpty
SerializerFeature.PrettyFormat
// SerializerFeature.WriteNullListAsEmpty,
// SerializerFeature.WriteMapNullValue,
// SerializerFeature.WriteNullStringAsEmpty
);
//此处是全局处理方式
......
......@@ -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*/**")
......@@ -75,7 +75,7 @@ public class WebSecurityConfig implements WebMvcConfigurer {
// 2.添加fastJson的配置信息,比如,是否需要格式化返回的json数据
FastJsonConfig fastJsonConfig = new FastJsonConfig();
// 时间格式化
// fastJsonConfig.setDateFormat("yyyy-MM-dd HH:mm:ss");
fastJsonConfig.setDateFormat("yyyy-MM-dd HH:mm:ss");
// fastJsonConfig.setDateFormat("yyyy-MM-dd");
// 空值特别处理
// WriteNullListAsEmpty 将Collection类型字段的字段空值输出为[]
......
package cn.timer.api.controller.kqgl;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
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.PostMapping;
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;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.json.JSONObject;
import cn.timer.api.bean.kqmk.KqglAssoBcsz;
import cn.timer.api.bean.kqmk.KqglAssoDkjl;
import cn.timer.api.bean.kqmk.KqglAssoDkmx;
import cn.timer.api.bean.kqmk.KqglAssoKqj;
import cn.timer.api.bean.kqmk.KqglAssoKqzdkfs;
import cn.timer.api.bean.kqmk.KqglAssoTeshu;
import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban;
import cn.timer.api.bean.kqmk.KqglMainKqz;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.exception.CustomException;
import cn.timer.api.dao.kqmk.KqglAssoPbmxMapper;
import cn.timer.api.dao.kqmk.KqglMainKqzMapper;
import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import cn.timer.api.dto.kqmk.AttLateLate;
import cn.timer.api.dto.kqmk.AttSchedule;
import cn.timer.api.dto.kqmk.AttendanceCardListDto;
import cn.timer.api.dto.kqmk.ClockCollectData;
import cn.timer.api.dto.kqmk.KqglAssoPbmxDto;
import cn.timer.api.utils.DateUtil;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@Api(tags = "3.0考勤打卡")
@RestController
@Transactional
@RequestMapping(value = "/kqdk", produces = { "application/json", "multipart/form-data" })
public class ClockInController {
@Autowired
private KqglMainKqzMapper kqglmainkqzmapper;
/**
* 考勤打卡
*
* @param json dev_id : 考勤机id user_id : 打卡用户id verify_mode : 打卡方式(1:指纹、20:人脸)
* io_time : 打卡时间
* @return
*/
@PostMapping(value = "/punchclock")
@ApiOperation(value = "1:考勤机打卡", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 1)
public Result<Object> punchclock(@RequestParam String json) throws Exception {
JSONObject jsonArray = new JSONObject(json);
String asDevId = jsonArray.get("dev_id").toString();
String asUserId = jsonArray.get("user_id").toString();
String asVerifyMode = jsonArray.get("verify_mode").toString();
String asIOMode = "0";
String sStdIoTime = jsonArray.get("io_time").toString();
KqglAssoKqj kqjdev = KqglAssoKqj.builder().build().selectOne(new QueryWrapper<KqglAssoKqj>().lambda().eq(KqglAssoKqj::getCode, asDevId));
if (kqjdev == null)
return ResultUtil.error("考勤机不存在!");
// YgglMainEmp user = new LambdaQueryChainWrapper<YgglMainEmp>(ygglmainempmapper).eq(YgglMainEmp::getEmpNum, asUserId).eq(YgglMainEmp::getOrgCode, kqjdev.getQyid()).one();
YgglMainEmp user = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, asUserId).eq(YgglMainEmp::getOrgCode, kqjdev.getQyid()));
if(user != null) {
int qyid = user.getOrgCode();//坏小孩【企业id】
int userid = user.getEmpNum();//用户id
KqglMainKqz attgro = kqglmainkqzmapper.getAttendanceGroupInformationByUserid(userid,qyid); //考勤组信息
//pbfs;// 排班方式 1:固定排班;2:自由排班;3:自由工时
if(attgro != null) {
List<KqglAssoKqzdkfs> kqjs = KqglAssoKqzdkfs.builder().build().selectList(new QueryWrapper<KqglAssoKqzdkfs>().lambda().eq(KqglAssoKqzdkfs::getKqzId, attgro.getId()));
if(kqjs.size() > 0) {
long time_ = DateUtil.getStringTime(sStdIoTime, "yyyy-MM-dd HH:mm:ss");
String putime = new SimpleDateFormat("yyyy-MM-dd").format(time_);//转换打卡时间格式
//打卡当天开始时间,打卡当天结束时间
Long startDate = DateUtil.getStartTime(0,DateUtil.getStringTime(putime,"yyyy-MM-dd")).getTime();
Long endDate = DateUtil.getnowEndTime(23,DateUtil.getStringTime(putime,"yyyy-MM-dd")).getTime();
int dkmx = 0;
//查询打卡当天是否有记录
KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build().selectOne(new QueryWrapper<KqglAssoDkmx>().lambda().eq(KqglAssoDkmx::getUserid, userid)
.gt(KqglAssoDkmx::getDksj, startDate).lt(KqglAssoDkmx::getDksj, endDate));
AttendanceCardListDto attdate = MethodCall(qyid,userid,putime);
ClockCollectData clockt = new ClockCollectData();
long starttime1 = 0,starttime1ks = 0,starttime1js = 0,endtime1 = 0,endtime1ks = 0,endtime1js = 0,starttime2 = 0,starttime2ks = 0,starttime2js = 0,endtime2 = 0,endtime2ks = 0,endtime2js = 0,starttime3 = 0,starttime3ks = 0,starttime3js = 0,
endtime3 = 0,endtime3ks = 0,endtime3js = 0;
if(attdate.getAttsch().size() > 0) {
List<AttSchedule> ash = attdate.getAttsch();
int y = 0;
clockt.setShifid(ash.get(y).getId());
if(attdate.getAttsch().size() == 2 || attdate.getAttsch().size() == 4 || attdate.getAttsch().size() == 6) {
starttime1 = ash.get(0).getTime();starttime1ks = ash.get(0).getStarttime();starttime1js = ash.get(0).getEndtime();
endtime1 = ash.get(1).getTime();endtime1ks = ash.get(1).getStarttime();endtime1js = ash.get(1).getEndtime();
}
if(attdate.getAttsch().size() == 4 || attdate.getAttsch().size() == 6) {
starttime2 = ash.get(2).getTime();starttime2ks = ash.get(2).getStarttime();starttime2js = ash.get(2).getEndtime();
endtime2 = ash.get(3).getTime();endtime2ks = ash.get(3).getStarttime();endtime2js = ash.get(3).getEndtime();
}
if(attdate.getAttsch().size() == 6) {
starttime3 = ash.get(4).getTime();starttime3ks = ash.get(4).getStarttime();starttime3js = ash.get(4).getEndtime();
endtime3 = ash.get(5).getTime();endtime3ks = ash.get(5).getStarttime();endtime3js = ash.get(5).getEndtime();
}
}
long punchcardtime,punchstart,punchend = 0;//应打卡时间,应打卡开始时间,应打卡结束时间
int atttype = 0;
if(dkmc == null) {//上班1 ****新增
punchcardtime = starttime1;
punchstart = starttime1ks;
punchend = starttime1js;
atttype = 1;
}else {
if((!("").equals(dkmc.getSbdk1()) || dkmc.getSbdk1() != null) && (("").equals(dkmc.getXbdk1()) || dkmc.getXbdk1() == null)){ //下班1
punchcardtime = endtime1;punchstart = endtime1ks;punchend = endtime1js;atttype = 2;
}else if((!("").equals(dkmc.getSbdk1()) || dkmc.getSbdk1() != null) && (!("").equals(dkmc.getXbdk1()) || dkmc.getXbdk1() != null)
&& (("").equals(dkmc.getSbdk2()) || dkmc.getSbdk2() == null)){ //上班2
punchcardtime = starttime2;punchstart = starttime2ks;punchend = starttime2js;atttype = 3;
}else if((!("").equals(dkmc.getSbdk1()) || dkmc.getSbdk1() != null) && (!("").equals(dkmc.getXbdk1()) || dkmc.getXbdk1() != null)
&& (!("").equals(dkmc.getSbdk2()) || dkmc.getSbdk2() != null) && (("").equals(dkmc.getXbdk2()) || dkmc.getXbdk2() == null)){ //下班2
punchcardtime = endtime2;punchstart = endtime2ks;punchend = endtime2js;atttype = 4;
}else if((!("").equals(dkmc.getSbdk1()) || dkmc.getSbdk1() != null) && (!("").equals(dkmc.getXbdk1()) || dkmc.getXbdk1() != null)
&& (!("").equals(dkmc.getSbdk2()) || dkmc.getSbdk2() != null) && (!("").equals(dkmc.getXbdk2()) || dkmc.getXbdk2() != null)
&& (("").equals(dkmc.getSbdk3()) || dkmc.getSbdk3() == null)){ //上班3
punchcardtime = starttime3;punchstart = starttime3ks;punchend = starttime3js;atttype = 5;
}else if((!("").equals(dkmc.getSbdk1()) || dkmc.getSbdk1() != null) && (!("").equals(dkmc.getXbdk1()) || dkmc.getXbdk1() != null)
&& (!("").equals(dkmc.getSbdk2()) || dkmc.getSbdk2() != null) && (!("").equals(dkmc.getXbdk2()) || dkmc.getXbdk2() != null)
&& (!("").equals(dkmc.getSbdk3()) || dkmc.getSbdk3() != null) && (("").equals(dkmc.getXbdk3()) || dkmc.getXbdk3() == null)){ //下班3
punchcardtime = endtime3;punchstart = endtime3ks;punchend = endtime3js;atttype = 6;
}else {
punchcardtime = 0;punchstart = 0;punchend = 0;atttype = 7;
}
}
KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
if(attdate.getAttsch().size() > 0 && clockt.getShifid() > 0){//有无班次
shif = shif.selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, clockt.getShifid()));
}
//打卡记录录入 -- 打卡是否有时间范围限制
boolean isRange = true;
if(punchstart>0 && punchend>0) {
String staputime = new SimpleDateFormat("HH:mm").format(punchstart);//应打卡开始时间
String entputime = new SimpleDateFormat("HH:mm").format(punchend);//应打卡结束时间
String DKputime = new SimpleDateFormat("HH:mm").format(time_);//打卡时间
boolean effectiveDate = ClockInTool.hourMinuteBetween(DKputime, staputime, entputime);
if (!effectiveDate) {
System.out.println("当前打卡时间不在范围内");
// 手动抛出异常
isRange = false;
// throw new Exception();
}
}
if(isRange) {
if(dkmc == null) {//上班1 ****新增
int sbdk1jg = 0;
if(punchcardtime != 0){//有应打卡时间时
Long time = (time_ - punchcardtime)/1000/60;
if(time > 0){sbdk1jg = Math.abs(Integer.valueOf(time.toString()));}//上班1打卡结果
}
int ydkcs = 0;
if(shif != null){ydkcs = shif.getSxbcs()*2;}//应打卡次数
KqglAssoDkmx pcd = KqglAssoDkmx.builder().userid(userid).data(putime).sbdk1(time_).sbdk1jg(sbdk1jg).ydkcs(ydkcs).qyid(qyid).dksj(startDate).build();
if (!pcd.insert()) {
throw new CustomException("打卡明细-新增异常-1");
}
dkmx = pcd.getId();
}else { //*****修改
dkmx = dkmc.getId();
if((!("").equals(dkmc.getSbdk1()) || dkmc.getSbdk1() != null) && (("").equals(dkmc.getXbdk1()) || dkmc.getXbdk1() == null)){//下班1
int xbdk1jg = 0;
if(punchcardtime != 0){//有应打卡时间时
Long time = (time_ - punchcardtime)/1000/60;
if(time > 0){}else{xbdk1jg = Math.abs(Integer.valueOf(time.toString()));}//上班1打卡结果
}
double gzsc = 0;
if(dkmc.getSbdk1() != null){
Long time = (time_ - dkmc.getSbdk1())/1000/60;
gzsc = Math.abs(Double.valueOf(time.toString()));//只打一次卡时计算工作时长
}
KqglAssoDkmx.builder().id(dkmc.getId()).xbdk1(time_).xbdk1jg(xbdk1jg).gzsc(gzsc).build().updateById();
}else if((!("").equals(dkmc.getSbdk1()) || dkmc.getSbdk1() != null) && (!("").equals(dkmc.getXbdk1()) || dkmc.getXbdk1() != null)
&& (("").equals(dkmc.getSbdk2()) || dkmc.getSbdk2() == null)){//上班2
int sbdk2jg = 0;
if(punchcardtime != 0){//有应打卡时间时
Long time = (time_ - punchcardtime)/1000/60;
if(time > 0){sbdk2jg = Math.abs(Integer.valueOf(time.toString()));}
}
KqglAssoDkmx.builder().id(dkmc.getId()).sbdk2(time_).sbdk2jg(sbdk2jg).build().updateById();
}else if((!("").equals(dkmc.getSbdk1()) || dkmc.getSbdk1() != null) && (!("").equals(dkmc.getXbdk1()) || dkmc.getXbdk1() != null)
&& (!("").equals(dkmc.getSbdk2()) || dkmc.getSbdk2() != null) && (("").equals(dkmc.getXbdk2()) || dkmc.getXbdk2() == null)){//下班2
int xbdk2jg = 0;
if(punchcardtime != 0){//有应打卡时间时
Long time = (time_ - punchcardtime)/1000/60;
if(time > 0){}else{xbdk2jg = Math.abs(Integer.valueOf(time.toString()));}
}
//班次为4次时,计算工作时长
double worktime = 0;
if(dkmc.getSbdk2() != null){
Long time = (time_ - dkmc.getSbdk2())/1000/60;
BigDecimal om = new BigDecimal(dkmc.getGzsc());
BigDecimal on = new BigDecimal(time);
worktime = Math.abs(om.add(on).doubleValue());
}
KqglAssoDkmx.builder().id(dkmc.getId()).xbdk2(time_).xbdk2jg(xbdk2jg).gzsc(worktime).build().updateById();
}else if((!("").equals(dkmc.getSbdk1()) || dkmc.getSbdk1() != null) && (!("").equals(dkmc.getXbdk1()) || dkmc.getXbdk1() != null)
&& (!("").equals(dkmc.getSbdk2()) || dkmc.getSbdk2() != null) && (!("").equals(dkmc.getXbdk2()) || dkmc.getXbdk2() != null)
&& (("").equals(dkmc.getSbdk3()) || dkmc.getSbdk3() == null)){//上班3
int sbdk3jg = 0;
if(punchcardtime != 0){//有应打卡时间时
Long time = (time_ - punchcardtime)/1000/60;
if(time > 0){sbdk3jg = Math.abs(Integer.valueOf(time.toString()));}
}
KqglAssoDkmx.builder().id(dkmc.getId()).sbdk3(time_).sbdk3jg(sbdk3jg).build().updateById();
}else if((!("").equals(dkmc.getSbdk1()) || dkmc.getSbdk1() != null) && (!("").equals(dkmc.getXbdk1()) || dkmc.getXbdk1() != null)
&& (!("").equals(dkmc.getSbdk2()) || dkmc.getSbdk2() != null) && (!("").equals(dkmc.getXbdk2()) || dkmc.getXbdk2() != null)
&& (!("").equals(dkmc.getSbdk3()) || dkmc.getSbdk3() != null) && (("").equals(dkmc.getXbdk3()) || dkmc.getXbdk3() == null)){//下班3
int xbdk3jg = 0;
if(punchcardtime != 0){//有应打卡时间时
Long time = (time_ - punchcardtime)/1000/60;
if(time > 0){}else{xbdk3jg = Math.abs(Integer.valueOf(time.toString()));}
}
//班次为6次时,计算工作时长
double worktime = 0;
if(dkmc.getSbdk3() != null){
Long time = (time_ - dkmc.getSbdk3())/1000/60;
BigDecimal om = new BigDecimal(dkmc.getGzsc());//第二次
BigDecimal on = new BigDecimal(time);
worktime = Math.abs(om.add(on).doubleValue());
}
KqglAssoDkmx.builder().id(dkmc.getId()).xbdk3(time_).xbdk3jg(xbdk3jg).gzsc(worktime).build().updateById();
}
if(atttype <= 6){
KqglAssoDkmx.builder().id(dkmc.getId()).build().updateById();
}
}
}
//原始打卡记录数据录入**************************************************************************************************************************************
int results = 0;
Long time = (time_ - punchcardtime)/1000/60;
if(punchcardtime != 0){
if(isRange) {
if((atttype)%2 > 0){//上班
if(time > 0){results = Integer.valueOf(time.toString());}// 打卡结果
}else{//下班
if(time > 0){}else{results = Math.abs(Integer.valueOf(time.toString()));}// 打卡结果
}
}
}
int type,status = 0;
if((atttype)%2 > 0){
type = 1;// 类型(类型 0:无排班打卡 1:上班 2:下班) punchcardtime == 0:无班次打卡
if(punchcardtime == 0){status = 1;}else{
if(isRange) {// 状态(0:打卡无效:此记录已被更新 1:正常 2:异常 3:迟到 4:早退 5:补卡 6:请假 7:加班 8:调休)
if(time > 0){status = 3;}else if(results == 0){status = 1;}
}else {status = 2;}
}
}else{
type = 2;// 类型(类型 0:无排班打卡 1:上班 2:下班)
if(punchcardtime == 0){status = 1;}else{
if(isRange) {
if(time < 0){status = 4;}else if(results == 0){status = 1;}
}else {status = 2;}
}
}
String attdate_ = new SimpleDateFormat("yy-MM-dd").format(Double.valueOf(startDate));//转换打卡时间格式
long attime;
if(punchcardtime == 0 && !isRange){attime = new Date().getTime();}else{attime = punchcardtime;}// 考勤时间(应打卡时间)
String remarks = "";
if(("1").equals(asVerifyMode)) {remarks = "考勤机指纹打卡";}else if(("20").equals(asVerifyMode)) {remarks = "考勤机人脸打卡";}
//cardtype--1:GPS,2:WIFI,3:考勤机
KqglAssoDkjl pre = KqglAssoDkjl.builder().dktime(time_).results(results).userId(userid).type(type).status(status).sort(atttype)
.cardType(3).qyid(qyid).attdate(attdate_+" "+ClockInTool.dateToWeek2(putime)).attime(attime).dkmxid(dkmx).bcid(clockt.getShifid()).remarks(remarks).punchmode(Integer.valueOf(asVerifyMode))
.punchequipment(asDevId).build();
if (!pre.insert()) {
throw new CustomException("打卡记录-新增异常-2");
}
}
}else {
return ResultUtil.error("打卡失败!,未加入考勤组!");
}
}else {
return ResultUtil.error("打卡失败!,用户不存在!");
}
return ResultUtil.data(null, "打卡成功");
}
@Autowired
private KqglAssoPbmxMapper kqglassopbmxmapper;
public AttendanceCardListDto MethodCall(int qyid,int userid,String date) throws ParseException {
AttendanceCardListDto attcar = new AttendanceCardListDto();
String str = null;
if(!("").equals(date)){
str = date;
}else{
Date d = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
str = sdf.format(d);
}
// Long startDate = DateUtil.getStartTime(0,DateUtil.getStringTime(str,"yyyy-MM-dd")).getTime();
// Long endDate = DateUtil.getnowEndTime(23,DateUtil.getStringTime(str,"yyyy-MM-dd")).getTime();
KqglMainKqz attgro = kqglmainkqzmapper.getAttendanceGroupInformationByUserid(userid,qyid); //考勤组信息
//pbfs:排班方式 1:固定排班;2:自由排班;3:自由工时
if(attgro != null){//判断当前用户是否加入到考勤组
//排班制
KqglAssoPbmxDto jrpb = kqglassopbmxmapper.getScheduleSpecificAttendance(attgro.getId(),userid,str);
//固定排班
int week = Integer.valueOf(ClockInTool.dateToWeek(str));//4
KqglAssoZhoupaiban atwek = KqglAssoZhoupaiban.builder().build().selectOne(new QueryWrapper<KqglAssoZhoupaiban>().lambda().eq(KqglAssoZhoupaiban::getKqzid, attgro.getId())
.eq(KqglAssoZhoupaiban::getType, week).ne(KqglAssoZhoupaiban::getBcid, 0));
if(attgro.getPbfs() == 1){//固定排班
if(atwek != null){//有固定周排班
KqglAssoTeshu rest = KqglAssoTeshu.builder().build().selectOne(new QueryWrapper<KqglAssoTeshu>().lambda().eq(KqglAssoTeshu::getKqzid, attgro.getId())
.eq(KqglAssoTeshu::getTsrq, str).eq(KqglAssoTeshu::getBcid, 0));
if(rest != null){//今天休息 Sort返回0【特殊日期--休息】
List<AttSchedule> atts = new ArrayList<AttSchedule>();
AttSchedule as = AttSchedule.builder().id(0).sort(0).time(0l).starttime(0l).endtime(0l).build();
atts.add(as);
attcar.setAttsch(atts);
}else{//今天上班
KqglAssoBcsz bcz = KqglAssoBcsz.builder().build().selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, atwek.getBcid()));
if(bcz != null){
Getshiftinformationbatch(bcz,attcar,str);
}
}
}else{//必须打卡
KqglAssoTeshu tsri = KqglAssoTeshu.builder().build().selectOne(new QueryWrapper<KqglAssoTeshu>().lambda().eq(KqglAssoTeshu::getKqzid, attgro.getId())
.eq(KqglAssoTeshu::getTsrq, str).ne(KqglAssoTeshu::getBcid, 0));
if(tsri != null){
KqglAssoBcsz tsrq = KqglAssoBcsz.builder().build().selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, tsri.getBcid()));
if(tsrq!=null){
Getshiftinformationbatch(tsrq,attcar,str);
}
}else{//休息
List<AttSchedule> atts = new ArrayList<AttSchedule>();
AttSchedule as = AttSchedule.builder().id(0).sort(0).time(0l).starttime(0l).endtime(0l).build();
atts.add(as);
attcar.setAttsch(atts);
}
}
}else if(attgro.getPbfs() == 2){//自由排班
//未排班时,员工可选择班次打卡
if(attgro.getIsXzbcdk() == 1){
attcar.setOptscheduling(true);
}else{
attcar.setOptscheduling(false);
}
if(jrpb != null){
if(jrpb.getBcid() != 0){//有班次时("Bcid"不为0时)
KqglAssoBcsz tsrq = KqglAssoBcsz.builder().build().selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, jrpb.getBcid()));
/**已简化**/
Getshiftinformationbatch(tsrq,attcar,str);
}else{//当天排班为休息
List<AttSchedule> atts1 = new ArrayList<AttSchedule>();
AttSchedule as = AttSchedule.builder().id(0).sort(0).time(0l).starttime(0l).endtime(0l).build();
atts1.add(as);
attcar.setAttsch(atts1);
}
}
}else{//自由工时
KqglAssoZhoupaiban wekz = KqglAssoZhoupaiban.builder().build().selectOne(new QueryWrapper<KqglAssoZhoupaiban>().lambda().eq(KqglAssoZhoupaiban::getKqzid, attgro.getId())
.eq(KqglAssoZhoupaiban::getBcid, 0).eq(KqglAssoZhoupaiban::getType, week));
if(wekz != null){//
String dada = str+" "+attgro.getKqkssjTime()+":00";
attcar.setStapclotime(Long.valueOf(ClockInTool.dateToStamp(dada)));
}
if(!("").equals(attgro.getJbzdsc())){
attcar.setCanpunchworkdate(Double.valueOf(attgro.getJbzdsc()));//上班打卡后多久大下班卡
}
}
if(jrpb != null || atwek != null){
KqglAssoBcsz shif = KqglAssoBcsz.builder().build();
if(attgro.getPbfs() == 1){
shif = shif.selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, atwek.getBcid()));
}else if(attgro.getPbfs() == 2){
shif = shif.selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, jrpb.getBcid()));
}
if(shif != null){
if(shif.getIsXbdk() == 1){
attcar.setNoclockout(true);// 下班不用打卡
}else{
attcar.setNoclockout(false);// 下班不用打卡
}
attcar.setAllowlate(shif.getYxcdfzs());// 允许迟到分钟数
attcar.setSeriouslate(shif.getYzcdfzs());// 严重迟到分钟数
attcar.setAbsenteeismlate(shif.getKgcdfzs());// 旷工迟到分钟数
if(shif.getIsWzwd() == 1){
attcar.setIslatelate(true);// 晚走晚到
List<AttLateLate> atwzwd = new ArrayList<AttLateLate>();
int p = 0;
if(!("").equals(shif.getXbwz1()) && !("").equals(shif.getSbwd1())){p = 2;}
if(!("").equals(shif.getXbwz1()) && !("").equals(shif.getSbwd1()) && !("").equals(shif.getXbwz2()) && !("").equals(shif.getSbwd2())){p = 4;}
if(!("").equals(shif.getXbwz1()) && !("").equals(shif.getSbwd1()) && !("").equals(shif.getXbwz2()) && !("").equals(shif.getSbwd2()) && !("").equals(shif.getXbwz3()) && !("").equals(shif.getSbwd3())){p = 6;}
AttLateLate ala = AttLateLate.builder().build();
ala.setLatewalk(shif.getXbwz1());
ala.setArrivelate(shif.getSbwd1());
atwzwd.add(ala);
if(p == 4 || p == 6){
AttLateLate alat = AttLateLate.builder().build();
alat.setLatewalk(shif.getXbwz2());
alat.setArrivelate(shif.getSbwd2());
atwzwd.add(alat);
}
if(p == 6){
AttLateLate alas = AttLateLate.builder().build();
alas.setLatewalk(shif.getXbwz3());
alas.setArrivelate(shif.getSbwd3());
atwzwd.add(alas);
}
attcar.setAttlat(atwzwd);
}else{
attcar.setIslatelate(false);// 晚走晚到
}
}
}
attcar.setAttgrouptype(attgro.getPbfs());//1:固定排班;2:自由排班;3:自由工时
}else{
attcar.setAttgrouptype(0);//1:固定排班;2:自由排班;3:自由工时
}
return attcar;
}
//
public void Getshiftinformationbatch(KqglAssoBcsz shiftm,AttendanceCardListDto attcar,String str){
List<AttSchedule> atts = new ArrayList<AttSchedule>();
if(shiftm.getSxbcs() == 1 || shiftm.getSxbcs() == 2 || shiftm.getSxbcs() == 3){//1次上下班
for(int o=0;o<2;o++){
if(o==0){
AttSchedule as = AttSchedule.builder().id(shiftm.getId()).sort(1).time(Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getSbdk1(),2)+":00")))
.starttime(("").equals(shiftm.getSbqjks1()) ? 0 : Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getSbqjks1(),2)+":00")))
.endtime(("").equals(shiftm.getSbqjjs1()) ? 0 : Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getSbqjjs1(),2)+":00"))).build();
atts.add(as);
}else{
AttSchedule as = AttSchedule.builder().id(shiftm.getId()).sort(2).time(Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getXbdk1(),2)+":00")))
.starttime(("").equals(shiftm.getXbqjks1()) ? 0 : Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getXbqjks1(),2)+":00")))
.endtime(("").equals(shiftm.getXbqjjs1()) ? 0 : Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getXbqjjs1(),2)+":00"))).build();
atts.add(as);
}
}
attcar.setAttsch(atts);
}
if(shiftm.getSxbcs() == 2 || shiftm.getSxbcs() == 3){//2次上下班
for(int o=0;o<2;o++){
if(o==0){
AttSchedule as = AttSchedule.builder().id(shiftm.getId()).sort(3).time(Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getSbdk2(),2)+":00")))
.starttime(("").equals(shiftm.getSbqjks2()) ? 0 : Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getSbqjks2(),2)+":00")))
.endtime(("").equals(shiftm.getSbqjjs2()) ? 0 : Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getSbqjjs2(),2)+":00"))).build();
atts.add(as);
}else{
AttSchedule as = AttSchedule.builder().id(shiftm.getId()).sort(4).time(Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getXbdk2(),2)+":00")))
.starttime(("").equals(shiftm.getXbqjks2()) ? 0 : Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getXbqjks2(),2)+":00")))
.endtime(("").equals(shiftm.getXbqjjs2()) ? 0 : Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getXbqjjs2(),2)+":00"))).build();
atts.add(as);
}
}
attcar.setAttsch(atts);
}
if(shiftm.getSxbcs() == 3){//3次上下班
for(int o=0;o<2;o++){
if(o==0){
AttSchedule as = AttSchedule.builder().id(shiftm.getId()).sort(5).time(Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getSbdk3(),2)+":00")))
.starttime(("").equals(shiftm.getSbqjks3()) ? 0 : Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getSbqjks3(),2)+":00")))
.endtime(("").equals(shiftm.getSbqjjs3()) ? 0 : Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getSbqjjs3(),2)+":00"))).build();
atts.add(as);
}else{
AttSchedule as = AttSchedule.builder().id(shiftm.getId()).sort(6).time(Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getXbdk3(),2)+":00")))
.starttime(("").equals(shiftm.getXbqjks3()) ? 0 : Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getXbqjks3(),2)+":00")))
.endtime(("").equals(shiftm.getXbqjjs3()) ? 0 : Long.valueOf(ClockInTool.dateToStamp(str+" "+ClockInTool.dealDateFormat(shiftm.getXbqjjs3(),2)+":00"))).build();
atts.add(as);
}
}
attcar.setAttsch(atts);
}
}
}
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;
}
}
package cn.timer.api.controller.kqgl;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang.StringUtils;
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.RequestParam;
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.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;
import cn.timer.api.bean.kqmk.KqglAssoDkwx;
import cn.timer.api.bean.kqmk.KqglAssoKqj;
import cn.timer.api.bean.kqmk.KqglAssoLeaveBalance;
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.bean.kqmk.KqglMainKqz;
import cn.timer.api.bean.spmk.SpmkInitiatorConfig;
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.KqglAssoDkdzMapper;
import cn.timer.api.dao.kqmk.KqglAssoDkwxMapper;
import cn.timer.api.dao.kqmk.KqglAssoKqjMapper;
import cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper;
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.dao.kqmk.KqglAssoYhsbMapper;
import cn.timer.api.dao.kqmk.KqglMainKqzMapper;
import cn.timer.api.dto.kqmk.AttqueryCriteriaDto;
import cn.timer.api.dto.kqmk.CompensateDto;
import cn.timer.api.dto.kqmk.IndividualOvertimeRuleDto;
import cn.timer.api.dto.kqmk.KqglAssoLeaveRulesDto;
import cn.timer.api.dto.kqmk.KqglAssoOvertimeRulesDto;
import cn.timer.api.dto.kqmk.KqglMainKqzDto;
import cn.timer.api.dto.kqmk.LeaveTypeDto;
import cn.timer.api.dto.kqmk.MachinememberDto;
import cn.timer.api.dto.kqmk.StartTimeRestDto;
import cn.timer.api.dto.kqmk.VacationInformationDto;
import cn.timer.api.utils.ResponseResult;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import io.swagger.annotations.Api;
......@@ -22,39 +75,619 @@ 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;
/**
* 查询列表-假期规则
* 查询列表-获取班次数据-分页
*/
@GetMapping(value = "/list_leave_rules")
@ApiOperation(value = "1: 查询列表-假期规则", httpMethod = "GET", notes = " 查询列表-假期规则")
@PostMapping(value = "/select_shifts")
@ApiOperation(value = "1.获取班次数据-根据 组织机构代码-分页", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 1)
public Result<Object> selectListLeaveRules() {
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());
String[] launchs = overrules.getApplyrange();
String appliedscope = StringUtils.join(launchs, ",");
// rul.setAppliedScope(appliedscope);//应用范围
overrules.setAppliedScope(appliedscope);
KqglAssoOvertimeRules rul = KqglAssoOvertimeRules.builder().build();
// 克隆 KqglAssoOvertimeRulesDto对象 到 KqglAssoOvertimeRules对象
BeanUtil.copyProperties(overrules, rul , "starttime","applyrange");
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<IndividualOvertimeRuleDto> getOvertimeRules(@PathVariable("id") Integer id) {
IndividualOvertimeRuleDto overrule = IndividualOvertimeRuleDto.builder().build();
KqglAssoOvertimeRules rules = KqglAssoOvertimeRules.builder().id(id).build().selectById();
String str = rules.getAppliedScope();
String[] arr = str.split(","); // 用,分割
KqglAssoOvertimeRulesDto ruldto = KqglAssoOvertimeRulesDto.builder().build();
ruldto.setApplyrange(arr);
BeanUtil.copyProperties(rules, ruldto , "starttime","applyrange");
overrule.setRules(ruldto);
List<KqglAssOvertimeVice> vice = new LambdaQueryChainWrapper<KqglAssOvertimeVice>(kqglassovertimevicemapper).eq(KqglAssOvertimeVice::getOvertimeRulesId, id).list();
overrule.setStarttime(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;
/**
* 初始化假期数据
*/
@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).last("LIMIT 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()).leaveBalance(rul.getLeaveBalance()).build();
rullist.add(vice);
}
if(rullist.size() > 0) {
kqglassoleaverulesmapper.insertleaverulesList(rullist);
}
return ResultUtil.success("操作成功!");
}else {
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);
if(leaverules.getLeaveBalance() == 0) {//假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”)
KqglAssoLeaveBalance.builder().build().delete(new QueryWrapper<KqglAssoLeaveBalance>().lambda().eq(KqglAssoLeaveBalance::getLeaveRulesId, id)
.eq(KqglAssoLeaveBalance :: getOrgCode, userBean.getOrgCode()));
}
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(learul, "操作成功!");
}
/**
* 删除假期规则
* @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<VacationInformationDto> VacationInformation(@PathVariable("id") Integer id) {
VacationInformationDto overrule = VacationInformationDto.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.setRange(vice);
return ResultUtil.data(overrule,"操作成功!");
}
@Autowired
private KqglAssoKqjMapper kqglassokqjmapper;
@Autowired
private KqglAssoYhsbMapper kqglassoyhsbmapper;
@Autowired
private KqglMainKqzMapper kqglmainkqzmapper;
/**
* 获取考勤机数据
*/
@GetMapping(value="/AttMachine")
@ApiOperation(value = "15:获取考勤机数据-根据 组织机构代码", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 15)
public Result<Object> getAttMachineEquipment(@CurrentUser UserBean userBean){
List<KqglAssoKqj> attendanList = new LambdaQueryChainWrapper<KqglAssoKqj>(kqglassokqjmapper).eq(KqglAssoKqj::getQyid, userBean.getOrgCode()).list();
return ResultUtil.data(attendanList,"操作成功!");
}
/**
* 新增考勤机
*/
@PostMapping(value = "/Attendance_machine")
@ApiOperation(value = "16:新增考勤机", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 16)
public Result<Object> AttendanceMachine(@CurrentUser UserBean userBean,@RequestBody KqglAssoKqj kqglassokqj) {
kqglassokqj.setLuryid(userBean.getEmpNum());
kqglassokqj.setLusjTime(new Date().getTime());
kqglassokqj.setQyid(userBean.getOrgCode());
return kqglassokqj.insert() ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!");
}
/**
* 删除考勤机信息
*/
@DeleteMapping(value = "/attmachine/{id}")
@ApiOperation(value = "17:删除考勤机信息", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 17)
public Result<Integer> deattmachine(@PathVariable("id") Integer id) {
return KqglAssoKqj.builder().id(id).build().deleteById() ? ResultUtil.success("删除成功!") : ResultUtil.error("没有找到该对象");
}
/**
* 考勤机内成员
*/
@GetMapping(value="/aircraftmembers/{id}")
@ApiOperation(value = "18:考勤机成员", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 18)
public ResponseResult selectAircraftMembers(@CurrentUser UserBean userBean,@PathVariable("id") Integer id) {
List<MachinememberDto> kqjcys = kqglassoyhsbmapper.selectAircraftMembers(id,userBean.getOrgCode());
return new ResponseResult().success("考勤机成员", kqjcys);
}
/**
* 获取考勤机数据-根据 组织机构代码
*/
@GetMapping(value="/AttGroupMachine")
@ApiOperation(value = "19:获取考勤机数据-根据 组织机构代码", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 19)
public Result<Object> getAttGroupMachineList(@CurrentUser UserBean userBean) {
List<KqglMainKqzDto> attmacList = kqglmainkqzmapper.selectAttGroupMachineByQyid(userBean.getOrgCode());
return ResultUtil.data(attmacList);
}
/*********打卡地址***********/
@Autowired
private KqglAssoDkdzMapper kqglassodkdzmapper;
/**
* 获取打卡地址数据
*/
@PostMapping(value = "/PunchAddress")
@ApiOperation(value = "20:获取打卡地址数据-根据 组织机构代码-分页", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 20)
public Result<Object> getPunchCardAddress(@CurrentUser UserBean userBean, @RequestBody AttqueryCriteriaDto attquerycriteriadto) {
IPage<KqglAssoDkdz> page = new Page<KqglAssoDkdz>(
attquerycriteriadto.getCurrentPage() == null ? 1 : attquerycriteriadto.getCurrentPage(),
attquerycriteriadto.getTotalPage() == null ? 10 : attquerycriteriadto.getTotalPage());
attquerycriteriadto.setOrgCode(userBean.getOrgCode());
attquerycriteriadto.setEmpNum(userBean.getEmpNum());
IPage<KqglAssoDkdz> pageAs = kqglassodkdzmapper.selectPage(page, new QueryWrapper<KqglAssoDkdz>().lambda().eq(KqglAssoDkdz::getQyid, userBean.getOrgCode()));
List<KqglAssoDkdz> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!");
}
/**
* 根据打卡地址id获取打卡地址信息
*/
@GetMapping(value="/PuAddress/{id}")
@ApiOperation(value = "21:获取打卡地址信息-根据打卡地址id", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 21)
public Result<Object> getPunchAddressByid(@PathVariable("id") Integer id) {
return ResultUtil.data(KqglAssoDkdz.builder().id(id).build().selectById(),"操作成功!");
}
/**
* 新增/修改--打卡地址信息
*/
@PostMapping(value = "/PunchAddress_addmod")
@ApiOperation(value = "22:新增/修改--打卡地址信息", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 22)
public Result<Object> PunchCardAddress(@CurrentUser UserBean userBean,@RequestBody KqglAssoDkdz kqglassodkdz) {
kqglassodkdz.setLuryid(userBean.getEmpNum());
kqglassodkdz.setLusjTime(new Date().getTime());
kqglassodkdz.setQyid(userBean.getOrgCode());
return kqglassodkdz.insertOrUpdate() ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!");
}
/**
* 删除打卡地址信息
*/
@DeleteMapping(value = "/PunchAddress/{id}")
@ApiOperation(value = "23:删除打卡地址信息", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 23)
public Result<Integer> deletePunchCardAddress(@PathVariable("id") Integer id) {
return KqglAssoDkdz.builder().id(id).build().deleteById() ? ResultUtil.success("删除成功!") : ResultUtil.error("没有找到该对象");
}
/**
* 获取打卡地址所在考勤组数据*********
*/
// @GetMapping(value="/PunchAddressGroup/{id}")
// @ApiOperation(value = "获取打卡地址所在考勤组数据", httpMethod = "GET", notes = "接口发布说明")
// @ApiOperationSupport(order = 14)
// public Result<List<AttendanceGroup>> getPunchAddressGroup(@CurrentUser UserBean userBean,@PathVariable("id") Integer id) {
//
// int qyid = userBean.getOrgCode();//坏小孩【企业id】
// int userid = userBean.getEmpNum();//用户id
//
// List<AttendanceGroup> attaddressownlist = attendancegroupservice.selectByPrimaryAttAddressOwn(qyid,id);
// return ResultUtil.data(attaddressownlist);
// }
/*********打卡WIFI***********/
/**
* 获取打卡WIFI数据
*/
@Autowired
private KqglAssoDkwxMapper kqglassodkwxmapper;
@PostMapping(value = "/PunchWIFI")
@ApiOperation(value = "24:获取打卡WIFI数据-根据 组织机构代码-分页", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 24)
public Result<Object> getPunchCardWIFI(@CurrentUser UserBean userBean, @RequestBody AttqueryCriteriaDto attquerycriteriadto) {
IPage<KqglAssoDkwx> page = new Page<KqglAssoDkwx>(
attquerycriteriadto.getCurrentPage() == null ? 1 : attquerycriteriadto.getCurrentPage(),
attquerycriteriadto.getTotalPage() == null ? 10 : attquerycriteriadto.getTotalPage());
attquerycriteriadto.setOrgCode(userBean.getOrgCode());
attquerycriteriadto.setEmpNum(userBean.getEmpNum());
IPage<KqglAssoDkwx> pageAs = kqglassodkwxmapper.selectPage(page, new QueryWrapper<KqglAssoDkwx>().lambda().eq(KqglAssoDkwx::getQyid, userBean.getOrgCode()));
List<KqglAssoDkwx> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!");
}
/**
* 根据打卡WIFIid获取打卡WIFI信息
*/
@GetMapping(value="/PuWIFI/{id}")
@ApiOperation(value = "25:获取打卡WIFI信息-根据打卡WIFIid", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 25)
public Result<Object> getPunchWIFIByid(@PathVariable("id") Integer id) {
return ResultUtil.data(KqglAssoDkwx.builder().id(id).build().selectById(),"操作成功!");
}
/**
* 新增/修改--打卡WIFI信息
*/
@PostMapping(value = "/PunchWIFI_addmod")
@ApiOperation(value = "26:新增/修改--打卡WIFI信息", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 26)
public Result<Object> PunchCardWIFI(@CurrentUser UserBean userBean,@RequestBody KqglAssoDkwx kqglassodkwx) {
kqglassodkwx.setLuryid(userBean.getEmpNum());
kqglassodkwx.setLusjTime(new Date().getTime());
kqglassodkwx.setQyid(userBean.getOrgCode());
return kqglassodkwx.insertOrUpdate() ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!");
}
/**
* 删除打卡WIFI信息
*/
@DeleteMapping(value = "/PunchWIFI/{id}")
@ApiOperation(value = "27:删除打卡地址信息", httpMethod = "DELETE", notes = "接口发布说明")
@ApiOperationSupport(order = 27)
public Result<Integer> deletePunchCardWIFI(@PathVariable("id") Integer id) {
return KqglAssoDkwx.builder().id(id).build().deleteById() ? ResultUtil.success("删除成功!") : ResultUtil.error("没有找到该对象");
}
/**
* 获取打卡WIFI所在考勤组数据*****
*/
// @GetMapping(value="/PunchWIFIGroup/{id}")
// @ApiOperation(value = "获取打卡WIFI所在考勤组数据", httpMethod = "GET", notes = "接口发布说明")
// @ApiOperationSupport(order = 20)
// public Result<List<AttendanceGroup>> getPunchWIFIGroup(@CurrentUser UserBean userBean,@PathVariable("id") Integer id) {
// int qyid = userBean.getOrgCode();//坏小孩【企业id】
//
// List<AttendanceGroup> attwifiownlist = attendancegroupservice.selectByPrimaryAttWIFIOwn(qyid,id);
// return ResultUtil.data(attwifiownlist);
// }
@Autowired
private KqglAssoLeaveBalanceMapper kqglassoleavebalancemapper;
/**
* 新增/修改--员工假期余额
*/
@PostMapping(value = "/Leave_balance")
@ApiOperation(value = "28:新增/修改--员工假期余额", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 28)
public Result<Object> LeaveBalance(@CurrentUser UserBean userBean,@RequestBody KqglAssoLeaveBalance balance) {
balance.setModifyUserid(userBean.getEmpNum());
balance.setModifyTimer(new Date().getTime());
balance.setOrgCode(userBean.getOrgCode());
KqglAssoLeaveBalance balan = kqglassoleavebalancemapper.selectOne(new QueryWrapper<KqglAssoLeaveBalance>().lambda().eq(KqglAssoLeaveBalance::getUserid, balance.getUserid())
.orderByDesc(KqglAssoLeaveBalance :: getModifyNumber).last("LIMIT 1"));
if(balan != null) {
balance.setModifyNumber(balan.getModifyNumber()+1);
}else {
balance.setModifyNumber(1);
}
return balance.insert() ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!");
}
/**
* 根据 组织机构代码获取员工假期余额表头
*/
@GetMapping(value="/balance_header")
@ApiOperation(value = "29:根据 组织机构代码获取员工假期余额表头", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 29)
public Result<Object> BalanceHeader(@CurrentUser UserBean userBean) {
List<KqglAssoLeaveRules> balheas = new LambdaQueryChainWrapper<KqglAssoLeaveRules>(kqglassoleaverulesmapper).eq(KqglAssoLeaveRules :: getOrgCode,userBean.getOrgCode())
.eq(KqglAssoLeaveRules :: getLeaveType, 2).or().eq(KqglAssoLeaveRules :: getIsOpen, 1).list();
return ResultUtil.data(balheas, "操作成功!");
}
/**
* 查询列表-假期规则*******************************************
*/
@GetMapping(value = "/list_leave_rules")
@ApiOperation(value = "30: 查询列表-假期规则", httpMethod = "GET", notes = " 查询列表-假期规则")
@ApiOperationSupport(order = 30)
public Result<Object> selectListLeaveRules(@CurrentUser UserBean userBean) {
List<KqglAssoLeaveRules> balheas = new LambdaQueryChainWrapper<KqglAssoLeaveRules>(kqglassoleaverulesmapper).eq(KqglAssoLeaveRules :: getOrgCode,userBean.getOrgCode())
.eq(KqglAssoLeaveRules :: getLeaveType, 2).or().eq(KqglAssoLeaveRules :: getIsOpen, 1).list();
List<LeaveTypeDto> leas = new ArrayList<LeaveTypeDto>();
LeaveTypeDto lea = LeaveTypeDto.builder().build();
lea.setId(1);
lea.setValue("事假");
leas.add(lea);
LeaveTypeDto lea2 = LeaveTypeDto.builder().build();
lea2.setId(2);
lea2.setValue("调休");
leas.add(lea2);
LeaveTypeDto lea3 = LeaveTypeDto.builder().build();
lea3.setId(3);
lea3.setValue("病假");
leas.add(lea3);
for(KqglAssoLeaveRules rul : balheas) {
LeaveTypeDto lea = LeaveTypeDto.builder().build();
lea.setId(rul.getId());
lea.setValue(rul.getName());
leas.add(lea);
}
return ResultUtil.data(leas, "操作成功!");
}
/**
* 根据组织机构代码 获取考勤组
*/
@GetMapping(value="/check_workatt")
@ApiOperation(value = "31:根据组织机构代码 获取考勤组", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 31)
public Result<Object> CheckWorkatt(@CurrentUser UserBean userBean) {
List<KqglMainKqz> kqzs = KqglMainKqz.builder().build().selectList(new QueryWrapper<KqglMainKqz>().lambda().eq(KqglMainKqz::getQyid, userBean.getOrgCode()));
List<LeaveTypeDto> leas = new ArrayList<LeaveTypeDto>();
for(KqglMainKqz rul : kqzs) {
LeaveTypeDto lea = LeaveTypeDto.builder().build();
lea.setId(rul.getId());
lea.setValue(rul.getName());
leas.add(lea);
}
return ResultUtil.data(leas, "操作成功!");
}
/**
* 根据组织机构代码 获取加班基础设置信息
*/
@PostMapping(value = "/overtime_basic_information")
@ApiOperation(value = "32:根据组织机构代码 获取加班基础设置信息", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 32)
public Result<Object> overtimebasicinformation(@CurrentUser UserBean userBean) {
KqglAssoOvertimeBasics kqjdev = KqglAssoOvertimeBasics.builder().build().selectOne(new QueryWrapper<KqglAssoOvertimeBasics>().lambda().eq(KqglAssoOvertimeBasics::getOrgCode, userBean.getOrgCode()));
return ResultUtil.data(kqjdev, "操作成功!");
}
/**
* 查询列表-获取假期规则数据-分页
*/
@PostMapping(value = "/select_leave_rules")
@ApiOperation(value = "33:获取假期规则数据-分页", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 33)
public Result<Object> selectleaverules(@CurrentUser UserBean userBean, @RequestBody AttqueryCriteriaDto attquerycriteriadto) {
IPage<KqglAssoLeaveRules> page = new Page<KqglAssoLeaveRules>(
attquerycriteriadto.getCurrentPage() == null ? 1 : attquerycriteriadto.getCurrentPage(),
attquerycriteriadto.getTotalPage() == null ? 10 : attquerycriteriadto.getTotalPage());
attquerycriteriadto.setOrgCode(userBean.getOrgCode());
attquerycriteriadto.setEmpNum(userBean.getEmpNum());
IPage<KqglAssoLeaveRules> pageAs = kqglassoleaverulesmapper.selectPage(page, new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, userBean.getOrgCode()));
List<KqglAssoLeaveRules> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!");
}
/**
* 查询列表-加班补偿方式
*/
@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>();
......
......@@ -9,6 +9,8 @@ import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -167,7 +169,7 @@ public class SpmkController {
@PostMapping(value = "/save_approval_template")
@ApiOperation(value = "5.新增或编辑-审批模板", httpMethod = "POST", notes = "新增或编辑-审批模板")
@ApiOperationSupport(order = 5)
public Result<Object> saveAt(@Valid @RequestBody SpmkApprovalTemplateDto spmkApprovalTemplateDto,BindingResult bindingResult){
public Result<Object> saveAt(@Validated @RequestBody SpmkApprovalTemplateDto spmkApprovalTemplateDto){
Integer approvalTemplateGId = spmkApprovalTemplateDto.getApprovalTemplateGId();
if (ObjectUtil.isNull(approvalTemplateGId))
return ResultUtil.error("操作失败!-1");
......@@ -415,8 +417,7 @@ public class SpmkController {
@ApiOperation(value = "17.发起审批", httpMethod = "POST", notes = "发起审批")
@ApiOperationSupport(order = 17)
@Transactional(rollbackFor = Exception.class)
// @BindingResultCtrol(title = "发起审批")
public Result<Object> saveCa(@CurrentUser UserBean userBean,@Valid @RequestBody SpmkApproveSummaryDto spmkApproveSummaryDto,BindingResult bindingResult) throws Exception{
public Result<Object> saveCa(@CurrentUser UserBean userBean,@Validated @RequestBody SpmkApproveSummaryDto spmkApproveSummaryDto) throws Exception{
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>()
.lambda()
.select(YgglMainEmp::getHeadUrl,YgglMainEmp::getName)
......@@ -545,7 +546,7 @@ public class SpmkController {
@Transactional(rollbackFor = Exception.class)
@ApiOperationSupport(order = 20)
// @BindingResultCtrol(title = "审批人审批")
public Result<Object> approving(@Valid @RequestBody ApprovingDto approvingDto, BindingResult bindingResult) throws Exception {
public Result<Object> approving(@Validated @RequestBody ApprovingDto approvingDto) throws Exception {
SpmkApproveDetail ad = SpmkApproveDetail.builder().build().selectOne(new QueryWrapper<SpmkApproveDetail>()
.lambda()
.select(SpmkApproveDetail::getId,
......@@ -615,7 +616,7 @@ public class SpmkController {
@PostMapping(value = "/select_my_approve")
@ApiOperation(value = "21.查询列表-我审批的/抄送我的-分页", httpMethod = "POST", notes = "查询列表-我审批的-关键字、审批状态、发起时间-分页")
@ApiOperationSupport(order = 21)
public Result<Object> selectMyAs(@CurrentUser UserBean userBean, @RequestBody MySummaryQueryDto mySummaryQueryDto) {
public Result<Object> selectMyAs(@CurrentUser UserBean userBean, @Validated @RequestBody MySummaryQueryDto mySummaryQueryDto) throws MethodArgumentNotValidException{
IPage<SpmkApproveSummary> page = new Page<SpmkApproveSummary>(
mySummaryQueryDto.getCurrentPage() == null ? 1 : mySummaryQueryDto.getCurrentPage(),
mySummaryQueryDto.getTotalPage() == null ? 10 : mySummaryQueryDto.getTotalPage());
......@@ -625,7 +626,6 @@ public class SpmkController {
IPage<SpmkApproveSummary> pageAs = spmkApproveSummaryMapper.selectPageByQueryForEmpNum(page, mySummaryQueryDto);
List<SpmkApproveSummary> listAs = pageAs.getRecords();
return ResultUtil.data(pageAs, listAs, "操作成功!");
}
......@@ -681,7 +681,6 @@ public class SpmkController {
@ApiOperation(value = "90.(开发使用)删除-审批数据", httpMethod = "DELETE", notes = "审批组、自定义审批、审批汇总、审批详情、审批执行记录、审批执行人记录 所有数据")
@ApiOperationSupport(order = 90)
public Result<Object> deleteApprovalData(@CurrentUser UserBean userBean){
spmkApprovalGMapper.delete(null);
spmkCustomApprovalMapper.delete(null);
spmkApproveSummaryMapper.delete(null);
......
......@@ -1546,7 +1546,7 @@ public class YgglController {
updateWrapper.eq("emp_num", empNum);
UpdateWrapper<YgglMainLzb> updateWrapper1 = new UpdateWrapper<YgglMainLzb>();
updateWrapper1.eq("emp_num", empNum);
YgglMainEmp.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(3).build().update(updateWrapper);
YgglMainEmp.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(YgEnumInterface.jobStatus.LIZHIZHONG.getType()).build().update(updateWrapper);
YgglMainLzb.builder().jobStatus(YgEnumInterface.jobStatus.LIZHIZHONG.getType()).lzTime(lzygQueryDto.getLzTime())
.lzyy(lzygQueryDto.getLzyy()).lzbz(lzygQueryDto.getLzbz()).build().update(updateWrapper1);
......@@ -1813,7 +1813,7 @@ public class YgglController {
@ApiOperation(value = "查询员工列表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 62)
public Result<List<YgQueryDto>> queryEmpMessage(@CurrentUser UserBean userBean) {
List<YgQueryDto> ygQueryDto = ygglMainEmpMapper.queryEmpMessage(userBean);
List<YgQueryDto> ygQueryDto = ygglMainEmpMapper.queryEmpMessage(userBean.getOrgCode());
for (YgQueryDto yg : ygQueryDto) {
if (StringUtil.isEmpty(yg.getHeadUrl())) {
yg.setHeadUrl("");
......
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 com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoDkdz;
/**
* 考勤打卡地址
*
* @author LAL 2020-05-09
*/
@Repository
public interface KqglAssoDkdzMapper extends BaseMapper<KqglAssoDkdz> {
}
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 com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoDkwx;
/**
* 考勤打卡wifi
*
* @author LAL 2020-05-09
*/
@Repository
public interface KqglAssoDkwxMapper extends BaseMapper<KqglAssoDkwx> {
}
package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoKqj;
/**
* 考勤机表
*
* @author LAL 2020-05-09
*/
@Repository
public interface KqglAssoKqjMapper extends BaseMapper<KqglAssoKqj> {
}
package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoKqzdkfs;
/**
* 考勤组绑定的打卡方式
*
* @author LAL 2020-05-09
*/
@Repository
public interface KqglAssoKqzdkfsMapper extends BaseMapper<KqglAssoKqzdkfs> {
}
package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoLeaveBalance;
/**
* 员工假期余额
*
* @author LAL 2020-05-09
*/
@Repository
public interface KqglAssoLeaveBalanceMapper extends BaseMapper<KqglAssoLeaveBalance> {
}
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 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 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.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 java.util.List;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoYhsb;
import cn.timer.api.dto.kqmk.MachinememberDto;
/**
* 用户与设备关系表
* @author LAL 2020-05-09
*/
@Repository
public interface KqglAssoYhsbMapper extends BaseMapper<KqglAssoYhsb> {
List<MachinememberDto> selectAircraftMembers(int kqjid,int orgcode);
}
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> {
}
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.KqglMainKqz;
import cn.timer.api.dto.kqmk.KqglMainKqzDto;
/**
* 考勤组
*
* @author LAL 2020-05-09
*/
@Repository
public interface KqglMainKqzMapper extends BaseMapper<KqglMainKqz> {
List<KqglMainKqzDto> selectAttGroupMachineByQyid(int qyid);
KqglMainKqz getAttendanceGroupInformationByUserid(int userid,int qyid);
}
......@@ -2,6 +2,7 @@ package cn.timer.api.dao.yggl;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -46,7 +47,7 @@ public interface YgglMainEmpMapper extends BaseMapper<YgglMainEmp> {
* @param userBean
* @return
*/
List<YgQueryDto> queryEmpMessage(UserBean userBean);
List<YgQueryDto> queryEmpMessage(@Param("orgCode") Integer orgCode);
/**
......
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 java.util.ArrayList;
import java.util.List;
import cn.timer.api.bean.kqgl.AttGroupBinPunchMode;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AttendanceGroupDto implements Serializable{
private static final long serialVersionUID = -5573272776427338217L;
private Integer id;
private String name;// 名称
private String kqbz;// 考勤备注
private Integer pbfs;// 排班方式 1:固定排班;2:自由排班;3:自由工时
private Integer qyid;// 企业id
private Integer isFdjjr;// 是否开启法定节假日休息
private String kqkssjTime;// 考勤开始时间【自由工时专用】
private String zsgzsc;// 至少工作时长【自由工时专用】
private String zcgzsc;// 正常工作时长【自由工时专用】
private String jbzdsc;// 加班最大时长【自由工时专用】
private Integer isDqtx;// 是否开启到期提醒 [排班制专用]0:否;1:是
private String txry;// 提醒人员 [排班制专用]
private Integer txfs;// 提醒天数提醒 [排班制专用]
private Integer txxhts;// 提醒循环天数 [排班制专用]
private String txsjTime;// 提醒时间 [排班制专用]
private String tsfs;// 提示方式 [排班制专用]PC端、APP客户端、短信、邮件 以[“,”]连接 json数组
private Integer isWpbsdk;// 是否开启未排班时打卡 [排班制专用]0:否;1:是;未排班时,员工可以选择班次打卡
private String sybc;// 使用班次【排班制使用】
private Integer isXzbcdk;// 是否开启未排班时,员工可选择班次打卡
private Integer kqznum;// 考勤组人员数
private String pbfsnm;// 排班方式
private String dkfs;// 打卡方式
private Integer isWq;//外勤
private Integer kqjid;
private List<AttGroupBinPunchMode> kqzdkfslist = new ArrayList<AttGroupBinPunchMode>();
}
\ No newline at end of file
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 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 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 IndividualOvertimeRuleDto {
@ApiModelProperty(value = "加班规则数据 ", example = "字段说明")
KqglAssoOvertimeRulesDto rules;
@ApiModelProperty(value = "加班规则-扣除休息时间 ", example = "字段说明")
List<KqglAssOvertimeVice> starttime;
}
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 Integer 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 = "假期余额 0:关(该项余额为“不限余额”);1:开(该项余额为“0”)", example = "101")
private Integer leaveBalance;
@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 String 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;
@ApiModelProperty(value = "应用范围", example = "[]")
private String[] applyrange;
}
\ No newline at end of file
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 io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author LAL 2020-05-09
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class KqglMainKqzDto {
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "名称 ", example = "名称")
private String name;
@ApiModelProperty(value = "考勤备注 ", example = "考勤备注")
private String kqbz;
@ApiModelProperty(value = "排班方式(1:固定排班;2:自由排班;3:自由工时) 排班方式(1:固定排班;2:自由排班;3:自由工时)", example = "101")
private Integer pbfs;
@ApiModelProperty(value = "企业id 企业id", example = "101")
private Integer qyid;
@ApiModelProperty(value = "是否开启法定节假日休息 是否开启法定节假日休息", example = "101")
private Integer isFdjjr;
@ApiModelProperty(value = "考勤开始时间(自由工时专用) ", example = "考勤开始时间(自由工时专用)")
private String kqkssjTime;
@ApiModelProperty(value = "至少工作时长(自由工时专用--【已去掉】) ", example = "至少工作时长(自由工时专用--【已去掉】)")
private String zsgzsc;
@ApiModelProperty(value = "正常工作时长(自由工时专用--【已去掉】) ", example = "正常工作时长(自由工时专用--【已去掉】)")
private String zcgzsc;
@ApiModelProperty(value = "上班后多久可打下班卡(自由工时专用) ", example = "上班后多久可打下班卡(自由工时专用)")
private String jbzdsc;
@ApiModelProperty(value = "是否开启到期提醒([排班制专用]0:否;1:是) 是否开启到期提醒([排班制专用]0:否;1:是)", example = "101")
private Integer isDqtx;
@ApiModelProperty(value = "提醒人员([排班制专用]员工id以[“,”]连接 ", example = "json数组)")
private String txry;
@ApiModelProperty(value = "提醒方式([排班制专用]提前15天、7天、3天、1天) 提醒方式([排班制专用]提前15天、7天、3天、1天)", example = "101")
private Integer txfs;
@ApiModelProperty(value = "提醒循环天数([排班制专用]) 提醒循环天数([排班制专用])", example = "101")
private Integer txxhts;
@ApiModelProperty(value = "提醒时间([排班制专用]) ", example = "提醒时间([排班制专用])")
private String txsjTime;
@ApiModelProperty(value = "提示方式([排班制专用]PC端、APP客户端、短信、邮件 ", example = "以[“,”]连接 json数组)")
private String tsfs;
@ApiModelProperty(value = "是否开启未排班时打卡([排班制专用]0:否;1:是;未排班时,员工可以选择班次打卡) 是否开启未排班时打卡([排班制专用]0:否;1:是;未排班时,员工可以选择班次打卡)", example = "101")
private Integer isWpbsdk;
@ApiModelProperty(value = "使用班次【排班制使用】 ", example = "使用班次【排班制使用】")
private String sybc;
@ApiModelProperty(value = "是否开启未排班时,员工可选择班次打卡 是否开启未排班时,员工可选择班次打卡", example = "101")
private Integer isXzbcdk;
@ApiModelProperty(value = "外勤 外勤", example = "101")
private Integer isWq;
@ApiModelProperty(value = "考勤组人员数", example = "100")
private Integer kqznum;
@ApiModelProperty(value = "排班方式", example = "1")
private String pbfsnm;
@ApiModelProperty(value = "打卡方式", example = "2")
private String dkfs;
@ApiModelProperty(value = "考勤机id", example = "3")
private Integer kqjid;
}
\ 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 java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MachinememberDto implements Serializable {
/**
*
*/
private static final long serialVersionUID = 6595051268318648078L;
@ApiModelProperty(value = "部门 ", example = "字段说明")
private String dept;
@ApiModelProperty(value = "岗位 ", example = "字段说明")
private String post;
@ApiModelProperty(value = "姓名", example = "字段说明")
private String name;
@ApiModelProperty(value = "id", example = "字段说明")
private Integer id;
@ApiModelProperty(value = "员工ID", example = "字段说明")
private Integer userId;
@ApiModelProperty(value = "考勤机ID", example = "字段说明")
private Integer kqjid;
@ApiModelProperty(value = "类型(类型 1:考勤机) ", example = "字段说明")
private Integer type;
@ApiModelProperty(value = "是否为管理员--0:否;1:是 ", example = "字段说明")
private String isgly;
}
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 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.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;
}
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 VacationInformationDto {
@ApiModelProperty(value = "假期规则数据 ", example = "字段说明")
KqglAssoLeaveRules rules;
@ApiModelProperty(value = "假期规则-适用范围 ", example = "字段说明")
List<KqglAssoRulesVice> range;
}
......@@ -2,6 +2,7 @@ package cn.timer.api.dto.spmk;
import javax.validation.constraints.NotNull;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -14,22 +15,22 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
public class ApprovingDto {
@NotNull(message = "asId为空")
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "审批汇总id", example = "2", required = true)
private Integer asId;
@NotNull(message = "executeRecordId为空")
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "审批执行记录id", example = "10", required = true)
private Integer executeRecordId;
@NotNull(message = "executorId为空")
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "执行人记录id", example = "10", required = true)
private Integer executorId;
@ApiModelProperty(value = "意见", example = "同意、拒绝")
private String opinion;
@NotNull(message = "sts为空")
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "状态 2同意 3拒绝 4转派", example = "2", required = true)
private Integer sts;
......
......@@ -2,9 +2,11 @@ package cn.timer.api.dto.spmk;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import cn.timer.api.config.exception.ValidationMsg;
import cn.timer.api.utils.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -34,9 +36,9 @@ public class MySummaryQueryDto extends Page{
@ApiModelProperty(value = "结束时间 ", example = "2020-10-10 10:10:10")
private String endTime;
@NotNull(message = "type为空")
@DecimalMax(value = "2",message = "type 只能为 0我发起的 1抄送我的 2我审批的")
@DecimalMin(value = "0",message = "type 只能为 0我发起的 1抄送我的 2我审批的")
@NotNull(message = ValidationMsg.NOTNULL)
@DecimalMax(value = "2",message = ValidationMsg.DECIMALMAX+" 只能为 0我发起的 1抄送我的 2我审批的")
@DecimalMin(value = "0",message = ValidationMsg.DECIMALMIN+" 只能为 0我发起的 1抄送我的 2我审批的")
@ApiModelProperty(value = "0我发起的 1抄送我的 2我审批的", example = "0")
private Integer type;
......
......@@ -11,6 +11,7 @@ import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import cn.hutool.json.JSONObject;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -26,15 +27,15 @@ public class SpmkApprovalTemplateDto {
@ApiModelProperty(value = "编号 编号", example = "101")
private Integer id;
@NotNull(message = "approvalTemplateGId为空")
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "审批模板组id 当前用户ID", example = "101")
private Integer approvalTemplateGId;
@NotBlank(message = "iconUrl为空")
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value = "审批图标地址 ", example = "审批图标地址")
private String iconUrl;
@NotBlank(message = "name为空")
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value = "审批名称 ", example = "审批名称")
private String name;
......@@ -47,7 +48,7 @@ public class SpmkApprovalTemplateDto {
@ApiModelProperty(value = "排序 由于区分关键字,命名后缀加s", example = "101")
private Integer ranks;
@NotBlank(message = "isOpinion为空 是否必填 意见 0是 1否")
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value = "审批意见 是否必填 意见 0是 1否", example = "101")
private Integer isOpinion;
......@@ -57,17 +58,17 @@ public class SpmkApprovalTemplateDto {
@ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime;
@NotNull(message = "assoType为空")
@DecimalMax(value = "9",message = "assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@DecimalMin(value = "0",message = "assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@NotNull(message = ValidationMsg.NOTNULL)
@DecimalMax(value = "9",message = ValidationMsg.DECIMALMAX +" 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@DecimalMin(value = "0",message = ValidationMsg.DECIMALMIN +" 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@ApiModelProperty(value = "关联类型 0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪", example = "1")
private Integer assoType;
@NotEmpty(message = "froms为空")
@NotEmpty(message = ValidationMsg.NOTEMPTY)
@ApiModelProperty(value = "审批表单 ", example = "审批表单")
private List<JSONObject> froms;
@NotNull(message = "router为空")
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "审批流程 ", example = "审批流程")
private Router router;
......
......@@ -8,6 +8,7 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import cn.hutool.json.JSONObject;
import cn.timer.api.config.exception.ValidationMsg;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -23,36 +24,36 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
public class SpmkApproveSummaryDto{
@NotBlank(message = "title为空")
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value = "标题 ", example = "标题", required = true)
private String title;
@NotBlank(message = "approveName为空")
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value = "审批名称 ", example = "审批名称", required = true)
private String approveName;
@ApiModelProperty(value = "摘要", example = "摘要", required = true)
private String digest;
@NotBlank(message = "initiator为空")
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value = "发起人名称 ", example = "发起人名称", required = true)
private String initiator;
@NotNull(message = "assoType为空")
@DecimalMax(value = "9",message = "assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@DecimalMin(value = "0",message = "assoType 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@NotNull(message = ValidationMsg.NOTNULL)
@DecimalMax(value = "9",message = ValidationMsg.DECIMALMAX +" 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@DecimalMin(value = "0",message = ValidationMsg.DECIMALMIN +" 只能为 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡 ")
@ApiModelProperty(value = "关联类型 0无 1转正 2离职 3调岗 4招聘 5加班 6请假 7出差 8外出 9补卡", example = "1")
private Integer assoType;
@NotNull(message = "requestData为空")
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "申请数据 ", example = "申请数据", required = true)
private JSONObject requestData;
@NotNull(message = "froms为空")
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "审批表单 ", example = "数组", required = true)
private List<JSONObject> froms;
@NotNull(message = "router为空")
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "审批流程", example = "审批流程", required = true)
private Router router;
......
<?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.KqglAssoDkdzMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoDkdz" >
<id column="id" property="id" />
<result column="name" property="name" />
<result column="address" property="address" />
<result column="dkfw" property="dkfw" />
<result column="lon" property="lon" />
<result column="lat" property="lat" />
<result column="qyid" property="qyid" />
<result column="lusj_time" property="lusjTime" />
<result column="luryid" property="luryid" />
</resultMap>
<sql id="Base_Column_List">
id,
name,
address,
dkfw,
lon,
lat,
qyid,
lusj_time,
luryid
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoDkdz_id,
name KqglAssoDkdz_name,
address KqglAssoDkdz_address,
dkfw KqglAssoDkdz_dkfw,
lon KqglAssoDkdz_lon,
lat KqglAssoDkdz_lat,
qyid KqglAssoDkdz_qyid,
lusj_time KqglAssoDkdz_lusj_time,
luryid KqglAssoDkdz_luryid
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkdz">
INSERT INTO kqgl_asso_dkdz
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != name'>
name,
</if>
<if test ='null != address'>
address,
</if>
<if test ='null != dkfw'>
dkfw,
</if>
<if test ='null != lon'>
lon,
</if>
<if test ='null != lat'>
lat,
</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 != address'>
#{address},
</if>
<if test ='null != dkfw'>
#{dkfw},
</if>
<if test ='null != lon'>
#{lon},
</if>
<if test ='null != lat'>
#{lat},
</if>
<if test ='null != qyid'>
#{qyid},
</if>
<if test ='null != lusjTime'>
#{lusjTime},
</if>
<if test ='null != luryid'>
#{luryid}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_dkdz
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkdz">
UPDATE kqgl_asso_dkdz
<set>
<if test ='null != name'>name = #{name},</if>
<if test ='null != address'>address = #{address},</if>
<if test ='null != dkfw'>dkfw = #{dkfw},</if>
<if test ='null != lon'>lon = #{lon},</if>
<if test ='null != lat'>lat = #{lat},</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>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_dkdz
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_dkdz
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_dkdz
</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.KqglAssoDkjlMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoDkjl" >
<id column="id" property="id" />
<result column="dktime" property="dktime" />
<result column="lon" property="lon" />
<result column="lat" property="lat" />
<result column="address" property="address" />
<result column="results" property="results" />
<result column="user_id" property="userId" />
<result column="type" property="type" />
<result column="status" property="status" />
<result column="sort" property="sort" />
<result column="card_type" property="cardType" />
<result column="mac" property="mac" />
<result column="macname" property="macname" />
<result column="qyid" property="qyid" />
<result column="attdate" property="attdate" />
<result column="attime" property="attime" />
<result column="dkmxid" property="dkmxid" />
<result column="bcid" property="bcid" />
<result column="remarks" property="remarks" />
<result column="punchmode" property="punchmode" />
<result column="punchequipment" property="punchequipment" />
</resultMap>
<sql id="Base_Column_List">
id,
dktime,
lon,
lat,
address,
results,
user_id,
type,
status,
sort,
card_type,
mac,
macname,
qyid,
attdate,
attime,
dkmxid,
bcid,
remarks,
punchmode,
punchequipment
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoDkjl_id,
dktime KqglAssoDkjl_dktime,
lon KqglAssoDkjl_lon,
lat KqglAssoDkjl_lat,
address KqglAssoDkjl_address,
results KqglAssoDkjl_results,
user_id KqglAssoDkjl_user_id,
type KqglAssoDkjl_type,
status KqglAssoDkjl_status,
sort KqglAssoDkjl_sort,
card_type KqglAssoDkjl_card_type,
mac KqglAssoDkjl_mac,
macname KqglAssoDkjl_macname,
qyid KqglAssoDkjl_qyid,
attdate KqglAssoDkjl_attdate,
attime KqglAssoDkjl_attime,
dkmxid KqglAssoDkjl_dkmxid,
bcid KqglAssoDkjl_bcid,
remarks KqglAssoDkjl_remarks,
punchmode KqglAssoDkjl_punchmode,
punchequipment KqglAssoDkjl_punchequipment
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkjl">
INSERT INTO kqgl_asso_dkjl
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != dktime'>
dktime,
</if>
<if test ='null != lon'>
lon,
</if>
<if test ='null != lat'>
lat,
</if>
<if test ='null != address'>
address,
</if>
<if test ='null != results'>
results,
</if>
<if test ='null != userId'>
user_id,
</if>
<if test ='null != type'>
type,
</if>
<if test ='null != status'>
status,
</if>
<if test ='null != sort'>
sort,
</if>
<if test ='null != cardType'>
card_type,
</if>
<if test ='null != mac'>
mac,
</if>
<if test ='null != macname'>
macname,
</if>
<if test ='null != qyid'>
qyid,
</if>
<if test ='null != attdate'>
attdate,
</if>
<if test ='null != attime'>
attime,
</if>
<if test ='null != dkmxid'>
dkmxid,
</if>
<if test ='null != bcid'>
bcid,
</if>
<if test ='null != remarks'>
remarks,
</if>
<if test ='null != punchmode'>
punchmode,
</if>
<if test ='null != punchequipment'>
punchequipment
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != dktime'>
#{dktime},
</if>
<if test ='null != lon'>
#{lon},
</if>
<if test ='null != lat'>
#{lat},
</if>
<if test ='null != address'>
#{address},
</if>
<if test ='null != results'>
#{results},
</if>
<if test ='null != userId'>
#{userId},
</if>
<if test ='null != type'>
#{type},
</if>
<if test ='null != status'>
#{status},
</if>
<if test ='null != sort'>
#{sort},
</if>
<if test ='null != cardType'>
#{cardType},
</if>
<if test ='null != mac'>
#{mac},
</if>
<if test ='null != macname'>
#{macname},
</if>
<if test ='null != qyid'>
#{qyid},
</if>
<if test ='null != attdate'>
#{attdate},
</if>
<if test ='null != attime'>
#{attime},
</if>
<if test ='null != dkmxid'>
#{dkmxid},
</if>
<if test ='null != bcid'>
#{bcid},
</if>
<if test ='null != remarks'>
#{remarks},
</if>
<if test ='null != punchmode'>
#{punchmode},
</if>
<if test ='null != punchequipment'>
#{punchequipment}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_dkjl
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkjl">
UPDATE kqgl_asso_dkjl
<set>
<if test ='null != dktime'>dktime = #{dktime},</if>
<if test ='null != lon'>lon = #{lon},</if>
<if test ='null != lat'>lat = #{lat},</if>
<if test ='null != address'>address = #{address},</if>
<if test ='null != results'>results = #{results},</if>
<if test ='null != userId'>user_id = #{userId},</if>
<if test ='null != type'>type = #{type},</if>
<if test ='null != status'>status = #{status},</if>
<if test ='null != sort'>sort = #{sort},</if>
<if test ='null != cardType'>card_type = #{cardType},</if>
<if test ='null != mac'>mac = #{mac},</if>
<if test ='null != macname'>macname = #{macname},</if>
<if test ='null != qyid'>qyid = #{qyid},</if>
<if test ='null != attdate'>attdate = #{attdate},</if>
<if test ='null != attime'>attime = #{attime},</if>
<if test ='null != dkmxid'>dkmxid = #{dkmxid},</if>
<if test ='null != bcid'>bcid = #{bcid},</if>
<if test ='null != remarks'>remarks = #{remarks},</if>
<if test ='null != punchmode'>punchmode = #{punchmode},</if>
<if test ='null != punchequipment'>punchequipment = #{punchequipment}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_dkjl
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_dkjl
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_dkjl
</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.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.KqglAssoDkwxMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoDkwx" >
<id column="id" property="id" />
<result column="name" property="name" />
<result column="mac" property="mac" />
<result column="qyid" property="qyid" />
<result column="lusj_time" property="lusjTime" />
<result column="luryid" property="luryid" />
</resultMap>
<sql id="Base_Column_List">
id,
name,
mac,
qyid,
lusj_time,
luryid
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoDkwx_id,
name KqglAssoDkwx_name,
mac KqglAssoDkwx_mac,
qyid KqglAssoDkwx_qyid,
lusj_time KqglAssoDkwx_lusj_time,
luryid KqglAssoDkwx_luryid
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkwx">
INSERT INTO kqgl_asso_dkwx
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != name'>
name,
</if>
<if test ='null != mac'>
mac,
</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 != mac'>
#{mac},
</if>
<if test ='null != qyid'>
#{qyid},
</if>
<if test ='null != lusjTime'>
#{lusjTime},
</if>
<if test ='null != luryid'>
#{luryid}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_dkwx
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkwx">
UPDATE kqgl_asso_dkwx
<set>
<if test ='null != name'>name = #{name},</if>
<if test ='null != mac'>mac = #{mac},</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>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_dkwx
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_dkwx
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_dkwx
</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.KqglAssoKqjMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoKqj" >
<id column="id" property="id" />
<result column="name" property="name" />
<result column="code" property="code" />
<result column="qyid" property="qyid" />
<result column="lusj_time" property="lusjTime" />
<result column="luryid" property="luryid" />
<result column="type" property="type" />
</resultMap>
<sql id="Base_Column_List">
id,
name,
code,
qyid,
lusj_time,
luryid,
type
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoKqj_id,
name KqglAssoKqj_name,
code KqglAssoKqj_code,
qyid KqglAssoKqj_qyid,
lusj_time KqglAssoKqj_lusj_time,
luryid KqglAssoKqj_luryid,
type KqglAssoKqj_type
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoKqj">
INSERT INTO kqgl_asso_kqj
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != name'>
name,
</if>
<if test ='null != code'>
code,
</if>
<if test ='null != qyid'>
qyid,
</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 != name'>
#{name},
</if>
<if test ='null != code'>
#{code},
</if>
<if test ='null != qyid'>
#{qyid},
</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_kqj
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoKqj">
UPDATE kqgl_asso_kqj
<set>
<if test ='null != name'>name = #{name},</if>
<if test ='null != code'>code = #{code},</if>
<if test ='null != qyid'>qyid = #{qyid},</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_kqj
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_kqj
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_kqj
</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.KqglAssoKqzdkfsMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoKqzdkfs" >
<id column="id" property="id" />
<result column="dkfsid" property="dkfsid" />
<result column="kqz_id" property="kqzId" />
<result column="type" property="type" />
<result column="qyid" property="qyid" />
<result column="state" property="state" />
</resultMap>
<sql id="Base_Column_List">
id,
dkfsid,
kqz_id,
type,
qyid,
state
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoKqzdkfs_id,
dkfsid KqglAssoKqzdkfs_dkfsid,
kqz_id KqglAssoKqzdkfs_kqz_id,
type KqglAssoKqzdkfs_type,
qyid KqglAssoKqzdkfs_qyid,
state KqglAssoKqzdkfs_state
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoKqzdkfs">
INSERT INTO kqgl_asso_kqzdkfs
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != dkfsid'>
dkfsid,
</if>
<if test ='null != kqzId'>
kqz_id,
</if>
<if test ='null != type'>
type,
</if>
<if test ='null != qyid'>
qyid,
</if>
<if test ='null != state'>
state
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != dkfsid'>
#{dkfsid},
</if>
<if test ='null != kqzId'>
#{kqzId},
</if>
<if test ='null != type'>
#{type},
</if>
<if test ='null != qyid'>
#{qyid},
</if>
<if test ='null != state'>
#{state}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_kqzdkfs
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoKqzdkfs">
UPDATE kqgl_asso_kqzdkfs
<set>
<if test ='null != dkfsid'>dkfsid = #{dkfsid},</if>
<if test ='null != kqzId'>kqz_id = #{kqzId},</if>
<if test ='null != type'>type = #{type},</if>
<if test ='null != qyid'>qyid = #{qyid},</if>
<if test ='null != state'>state = #{state}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_kqzdkfs
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_kqzdkfs
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_kqzdkfs
</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.KqglAssoLeaveBalanceMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoLeaveBalance" >
<id column="id" property="id" />
<result column="leave_rules_id" property="leaveRulesId" />
<result column="userid" property="userid" />
<result column="modify_action" property="modifyAction" />
<result column="balance_days" property="balanceDays" />
<result column="reason" property="reason" />
<result column="modify_userid" property="modifyUserid" />
<result column="modify_timer" property="modifyTimer" />
<result column="modify_number" property="modifyNumber" />
<result column="org_code" property="orgCode" />
</resultMap>
<sql id="Base_Column_List">
id,
leave_rules_id,
userid,
modify_action,
balance_days,
reason,
modify_userid,
modify_timer,
modify_number,
org_code
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoLeaveBalance_id,
leave_rules_id KqglAssoLeaveBalance_leave_rules_id,
userid KqglAssoLeaveBalance_userid,
modify_action KqglAssoLeaveBalance_modify_action,
balance_days KqglAssoLeaveBalance_balance_days,
reason KqglAssoLeaveBalance_reason,
modify_userid KqglAssoLeaveBalance_modify_userid,
modify_timer KqglAssoLeaveBalance_modify_timer,
modify_number KqglAssoLeaveBalance_modify_number,
org_code KqglAssoLeaveBalance_org_code
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoLeaveBalance">
INSERT INTO kqgl_asso_leave_balance
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != leaveRulesId'>
leave_rules_id,
</if>
<if test ='null != userid'>
userid,
</if>
<if test ='null != modifyAction'>
modify_action,
</if>
<if test ='null != balanceDays'>
balance_days,
</if>
<if test ='null != reason'>
reason,
</if>
<if test ='null != modifyUserid'>
modify_userid,
</if>
<if test ='null != modifyTimer'>
modify_timer,
</if>
<if test ='null != modifyNumber'>
modify_number,
</if>
<if test ='null != orgCode'>
org_code
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != leaveRulesId'>
#{leaveRulesId},
</if>
<if test ='null != userid'>
#{userid},
</if>
<if test ='null != modifyAction'>
#{modifyAction},
</if>
<if test ='null != balanceDays'>
#{balanceDays},
</if>
<if test ='null != reason'>
#{reason},
</if>
<if test ='null != modifyUserid'>
#{modifyUserid},
</if>
<if test ='null != modifyTimer'>
#{modifyTimer},
</if>
<if test ='null != modifyNumber'>
#{modifyNumber},
</if>
<if test ='null != orgCode'>
#{orgCode}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_leave_balance
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoLeaveBalance">
UPDATE kqgl_asso_leave_balance
<set>
<if test ='null != leaveRulesId'>leave_rules_id = #{leaveRulesId},</if>
<if test ='null != userid'>userid = #{userid},</if>
<if test ='null != modifyAction'>modify_action = #{modifyAction},</if>
<if test ='null != balanceDays'>balance_days = #{balanceDays},</if>
<if test ='null != reason'>reason = #{reason},</if>
<if test ='null != modifyUserid'>modify_userid = #{modifyUserid},</if>
<if test ='null != modifyTimer'>modify_timer = #{modifyTimer},</if>
<if test ='null != modifyNumber'>modify_number = #{modifyNumber},</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_leave_balance
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_leave_balance
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_leave_balance
</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" />
<result column="leave_balance" property="leaveBalance" />
</resultMap>
<sql id="Base_Column_List">
id,
name,
company,
leave_type,
apply,
create_time,
create_userid,
org_code,
is_open,
leave_balance
</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,
leave_balance KqglAssoLeaveRules_leave_balance
</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,leave_balance)
<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>
<if test="item.leaveBalance != null" >
#{item.leaveBalance,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>
<if test ='null != leaveBalance'>
leave_balance
</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>
<if test ='null != leaveBalance'>
#{leaveBalance}
</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>
<if test ='null != leaveBalance'>leave_balance = #{leaveBalance}</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.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.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
<?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.KqglAssoYhsbMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoYhsb" >
<id column="id" property="id" />
<result column="user_id" property="userId" />
<result column="kqjid" property="kqjid" />
<result column="type" property="type" />
<result column="is_gly" property="isGly" />
</resultMap>
<resultMap id="MachinememberMap" type="cn.timer.api.dto.kqmk.MachinememberDto" >
<result column="dept" property="dept" jdbcType="VARCHAR" />
<result column="post" property="post" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="id" property="id" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="kqjid" property="kqjid" jdbcType="INTEGER" />
<result column="type" property="type" jdbcType="INTEGER" />
<result column="isgly" property="isgly" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List">
id,
user_id,
kqjid,
type,
is_gly
</sql>
<sql id="Base_Column_List_Alias">
id KqglAssoYhsb_id,
user_id KqglAssoYhsb_user_id,
kqjid KqglAssoYhsb_kqjid,
type KqglAssoYhsb_type,
is_gly KqglAssoYhsb_is_gly
</sql>
<select id="selectAircraftMembers" resultMap="MachinememberMap">
select bmgw.dept,
bmgw.post,
emp.`name`,
yhsb.id,
yhsb.kqjid,
yhsb.type,
yhsb.user_id,
yhsb.is_gly as isgly
from kqgl_asso_yhsb yhsb
LEFT JOIN yggl_main_emp as emp on emp.emp_num = yhsb.user_id and emp.org_code = #{orgcode}
LEFT JOIN (select m.name as post,um.name as dept,m.id as mid
from zzgl_bmgw_m m
left join zzgl_bmgw_m um on um.id = m.up_id
) as bmgw on bmgw.mid = emp.bmgw_id
where yhsb.kqjid = #{kqjid}
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoYhsb">
INSERT INTO kqgl_asso_yhsb
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != userId'>
user_id,
</if>
<if test ='null != kqjid'>
kqjid,
</if>
<if test ='null != type'>
type,
</if>
<if test ='null != isGly'>
is_gly
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != userId'>
#{userId},
</if>
<if test ='null != kqjid'>
#{kqjid},
</if>
<if test ='null != type'>
#{type},
</if>
<if test ='null != isGly'>
#{isGly}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_yhsb
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoYhsb">
UPDATE kqgl_asso_yhsb
<set>
<if test ='null != userId'>user_id = #{userId},</if>
<if test ='null != kqjid'>kqjid = #{kqjid},</if>
<if test ='null != type'>type = #{type},</if>
<if test ='null != isGly'>is_gly = #{isGly}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_yhsb
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_yhsb
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_yhsb
</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
<?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.KqglMainKqzMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglMainKqz" >
<id column="id" property="id" />
<result column="name" property="name" />
<result column="kqbz" property="kqbz" />
<result column="pbfs" property="pbfs" />
<result column="qyid" property="qyid" />
<result column="is_fdjjr" property="isFdjjr" />
<result column="kqkssj_time" property="kqkssjTime" />
<result column="zsgzsc" property="zsgzsc" />
<result column="zcgzsc" property="zcgzsc" />
<result column="jbzdsc" property="jbzdsc" />
<result column="is_dqtx" property="isDqtx" />
<result column="txry" property="txry" />
<result column="txfs" property="txfs" />
<result column="txxhts" property="txxhts" />
<result column="txsj_time" property="txsjTime" />
<result column="tsfs" property="tsfs" />
<result column="is_wpbsdk" property="isWpbsdk" />
<result column="sybc" property="sybc" />
<result column="is_xzbcdk" property="isXzbcdk" />
<result column="is_wq" property="isWq" />
</resultMap>
<resultMap id="AuxiliaryMap" type="cn.timer.api.dto.kqmk.KqglMainKqzDto" >
<id column="id" property="id" />
<result column="name" property="name" />
<result column="kqbz" property="kqbz" />
<result column="pbfs" property="pbfs" />
<result column="qyid" property="qyid" />
<result column="is_fdjjr" property="isFdjjr" />
<result column="kqkssj_time" property="kqkssjTime" />
<result column="zsgzsc" property="zsgzsc" />
<result column="zcgzsc" property="zcgzsc" />
<result column="jbzdsc" property="jbzdsc" />
<result column="is_dqtx" property="isDqtx" />
<result column="txry" property="txry" />
<result column="txfs" property="txfs" />
<result column="txxhts" property="txxhts" />
<result column="txsj_time" property="txsjTime" />
<result column="tsfs" property="tsfs" />
<result column="is_wpbsdk" property="isWpbsdk" />
<result column="sybc" property="sybc" />
<result column="is_xzbcdk" property="isXzbcdk" />
<result column="is_wq" property="isWq" />
<result column="kqznum" property="kqznum" />
<result column="pbfsnm" property="pbfsnm" />
<result column="dkfs" property="dkfs" />
<result column="kqjid" property="kqjid" />
</resultMap>
<sql id="Base_Column_List">
id,
name,
kqbz,
pbfs,
qyid,
is_fdjjr,
kqkssj_time,
zsgzsc,
zcgzsc,
jbzdsc,
is_dqtx,
txry,
txfs,
txxhts,
txsj_time,
tsfs,
is_wpbsdk,
sybc,
is_xzbcdk,
is_wq
</sql>
<sql id="Base_Column_List_Alias">
id KqglMainKqz_id,
name KqglMainKqz_name,
kqbz KqglMainKqz_kqbz,
pbfs KqglMainKqz_pbfs,
qyid KqglMainKqz_qyid,
is_fdjjr KqglMainKqz_is_fdjjr,
kqkssj_time KqglMainKqz_kqkssj_time,
zsgzsc KqglMainKqz_zsgzsc,
zcgzsc KqglMainKqz_zcgzsc,
jbzdsc KqglMainKqz_jbzdsc,
is_dqtx KqglMainKqz_is_dqtx,
txry KqglMainKqz_txry,
txfs KqglMainKqz_txfs,
txxhts KqglMainKqz_txxhts,
txsj_time KqglMainKqz_txsj_time,
tsfs KqglMainKqz_tsfs,
is_wpbsdk KqglMainKqz_is_wpbsdk,
sybc KqglMainKqz_sybc,
is_xzbcdk KqglMainKqz_is_xzbcdk,
is_wq KqglMainKqz_is_wq
</sql>
<sql id="Base_Column_List_a">
a.id,
a.name,
a.kqbz,
a.pbfs,
a.qyid,
a.is_fdjjr,
a.kqkssj_time,
a.zsgzsc,
a.zcgzsc,
a.jbzdsc,
a.is_dqtx,
a.txry,
a.txfs,
a.txxhts,
a.txsj_time,
a.tsfs,
a.is_wpbsdk,
a.sybc,
a.is_xzbcdk,
a.is_wq
</sql>
<select id="selectAttGroupMachineByQyid" resultMap="AuxiliaryMap">
select
<include refid="Base_Column_List_a" />,
kqzdkfs.dkfsid as kqjid
from kqgl_main_kqz a
LEFT JOIN kqgl_asso_kqzdkfs as kqzdkfs on kqzdkfs.kqz_id = a.id and kqzdkfs.type = 1 and kqzdkfs.state = 1
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">
INSERT INTO kqgl_main_kqz
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != name'>
name,
</if>
<if test ='null != kqbz'>
kqbz,
</if>
<if test ='null != pbfs'>
pbfs,
</if>
<if test ='null != qyid'>
qyid,
</if>
<if test ='null != isFdjjr'>
is_fdjjr,
</if>
<if test ='null != kqkssjTime'>
kqkssj_time,
</if>
<if test ='null != zsgzsc'>
zsgzsc,
</if>
<if test ='null != zcgzsc'>
zcgzsc,
</if>
<if test ='null != jbzdsc'>
jbzdsc,
</if>
<if test ='null != isDqtx'>
is_dqtx,
</if>
<if test ='null != txry'>
txry,
</if>
<if test ='null != txfs'>
txfs,
</if>
<if test ='null != txxhts'>
txxhts,
</if>
<if test ='null != txsjTime'>
txsj_time,
</if>
<if test ='null != tsfs'>
tsfs,
</if>
<if test ='null != isWpbsdk'>
is_wpbsdk,
</if>
<if test ='null != sybc'>
sybc,
</if>
<if test ='null != isXzbcdk'>
is_xzbcdk,
</if>
<if test ='null != isWq'>
is_wq
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != name'>
#{name},
</if>
<if test ='null != kqbz'>
#{kqbz},
</if>
<if test ='null != pbfs'>
#{pbfs},
</if>
<if test ='null != qyid'>
#{qyid},
</if>
<if test ='null != isFdjjr'>
#{isFdjjr},
</if>
<if test ='null != kqkssjTime'>
#{kqkssjTime},
</if>
<if test ='null != zsgzsc'>
#{zsgzsc},
</if>
<if test ='null != zcgzsc'>
#{zcgzsc},
</if>
<if test ='null != jbzdsc'>
#{jbzdsc},
</if>
<if test ='null != isDqtx'>
#{isDqtx},
</if>
<if test ='null != txry'>
#{txry},
</if>
<if test ='null != txfs'>
#{txfs},
</if>
<if test ='null != txxhts'>
#{txxhts},
</if>
<if test ='null != txsjTime'>
#{txsjTime},
</if>
<if test ='null != tsfs'>
#{tsfs},
</if>
<if test ='null != isWpbsdk'>
#{isWpbsdk},
</if>
<if test ='null != sybc'>
#{sybc},
</if>
<if test ='null != isXzbcdk'>
#{isXzbcdk},
</if>
<if test ='null != isWq'>
#{isWq}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_main_kqz
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglMainKqz">
UPDATE kqgl_main_kqz
<set>
<if test ='null != name'>name = #{name},</if>
<if test ='null != kqbz'>kqbz = #{kqbz},</if>
<if test ='null != pbfs'>pbfs = #{pbfs},</if>
<if test ='null != qyid'>qyid = #{qyid},</if>
<if test ='null != isFdjjr'>is_fdjjr = #{isFdjjr},</if>
<if test ='null != kqkssjTime'>kqkssj_time = #{kqkssjTime},</if>
<if test ='null != zsgzsc'>zsgzsc = #{zsgzsc},</if>
<if test ='null != zcgzsc'>zcgzsc = #{zcgzsc},</if>
<if test ='null != jbzdsc'>jbzdsc = #{jbzdsc},</if>
<if test ='null != isDqtx'>is_dqtx = #{isDqtx},</if>
<if test ='null != txry'>txry = #{txry},</if>
<if test ='null != txfs'>txfs = #{txfs},</if>
<if test ='null != txxhts'>txxhts = #{txxhts},</if>
<if test ='null != txsjTime'>txsj_time = #{txsjTime},</if>
<if test ='null != tsfs'>tsfs = #{tsfs},</if>
<if test ='null != isWpbsdk'>is_wpbsdk = #{isWpbsdk},</if>
<if test ='null != sybc'>sybc = #{sybc},</if>
<if test ='null != isXzbcdk'>is_xzbcdk = #{isXzbcdk},</if>
<if test ='null != isWq'>is_wq = #{isWq}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_main_kqz
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_main_kqz
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_main_kqz
</select>
-->
</mapper>
\ No newline at end of file
......@@ -107,9 +107,9 @@
WHERE a.org_code = #{param.orgCode}
<if test="param.query != null and param.query != ''">
and (
a.title like CONCAT(#{param.query},'%') or
a.initiator like CONCAT(#{param.query},'%') or
a.id like CONCAT(#{param.query},'%')
a.title like CONCAT('%',#{param.query},'%') or
a.initiator like CONCAT('%',#{param.query},'%') or
a.id like CONCAT('%',#{param.query},'%')
)
</if>
<if test="param.sts != null">
......@@ -159,9 +159,9 @@
</if>
<if test="param.query != null and param.query != ''">
and (
a.title like CONCAT(#{param.query},'%') or
a.initiator like CONCAT(#{param.query},'%') or
a.id like CONCAT(#{param.query},'%')
a.title like CONCAT('%',#{param.query},'%') or
a.initiator like CONCAT('%',#{param.query},'%') or
a.id like CONCAT('%',#{param.query},'%')
)
</if>
<if test="param.startTime != null and param.startTime != ''">
......
......@@ -193,9 +193,9 @@
<!-- 查询员工信息 搜索 分页 -->
<select id="queryEmpMessage" resultType="cn.timer.api.dto.yggl.YgQueryDto">
SELECT
a. NAME empName,
a.name empName,
a.emp_num empNum,
b. NAME deptName,
b.name deptName,
a.rz_time rzTime,
a.job_type jobType,
a.phone phone,
......
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