Commit 8183d5ef by lal Committed by chenzg

提交

parent 7bc43a48
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-15
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "kqgl_asso_month_punch_summary")
@ApiModel("打卡月汇总")
public class KqglAssoMonthPunchSummary extends Model<KqglAssoMonthPunchSummary> {
/**
*
*/
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 = "101")
private Integer num;
@ApiModelProperty(value = "部门 ", example = "部门")
private String dept;
@ApiModelProperty(value = "职位 ", example = "职位")
private String post;
@ApiModelProperty(value = "考勤组id 考勤组id", example = "101")
private Integer attGroup;
@ApiModelProperty(value = "班次id 班次id", example = "101")
private Integer shift;
@ApiModelProperty(value = "应出勤天数 ", example = "应出勤天数")
private Double daysOnDuty;
@ApiModelProperty(value = "实际出勤天数 ", example = "实际出勤天数")
private Double actualAttDays;
@ApiModelProperty(value = "休息天数 ", example = "休息天数")
private Double daysOff;
@ApiModelProperty(value = "工作时长(分钟) ", example = "工作时长(分钟)")
private Double workingHours;
@ApiModelProperty(value = "迟到次数 ", example = "迟到次数")
private Double lateTimes;
@ApiModelProperty(value = "迟到时长(分钟) ", example = "迟到时长(分钟)")
private Double lateHours;
@ApiModelProperty(value = "严重迟到次数 ", example = "严重迟到次数")
private Double seriousLateTimes;
@ApiModelProperty(value = "严重迟到时长(分钟) ", example = "严重迟到时长(分钟)")
private Double seriousLateHours;
@ApiModelProperty(value = "旷工迟到次数 ", example = "旷工迟到次数")
private Double absenLateTimes;
@ApiModelProperty(value = "早退次数 ", example = "早退次数")
private Double earlyLeaveTimes;
@ApiModelProperty(value = "早退时长(分钟) ", example = "早退时长(分钟)")
private Double lengthEarlyLeave;
@ApiModelProperty(value = "上班缺卡次数 ", example = "上班缺卡次数")
private Double numberWorkCardShortage;
@ApiModelProperty(value = "下班缺卡次数 ", example = "下班缺卡次数")
private Double numberDutyCardShortage;
@ApiModelProperty(value = "旷工天数 ", example = "旷工天数")
private Double absenteeismDays;
@ApiModelProperty(value = "出差时长 ", example = "出差时长")
private Double lengthBusinessTrip;
@ApiModelProperty(value = "外出时长 ", example = "外出时长")
private Double timeOut;
@ApiModelProperty(value = "加班总时长 ", example = "加班总时长")
private Double totalOvertimeHours;
@ApiModelProperty(value = "工作日(转调休) ", example = "工作日(转调休)")
private Double workingTurnCompenLeave;
@ApiModelProperty(value = "休息日(转调休) ", example = "休息日(转调休)")
private Double restTurnCompenLeave;
@ApiModelProperty(value = "节假日(转调休) ", example = "节假日(转调休)")
private Double holidayTurnCompenLeave;
@ApiModelProperty(value = "工作日(转加班费) ", example = "工作日(转加班费)")
private Double workingTransferOvertime;
@ApiModelProperty(value = "休息日(转加班费) ", example = "休息日(转加班费)")
private Double restTransferOvertime;
@ApiModelProperty(value = "节假日(转加班费) ", example = "节假日(转加班费)")
private Double holidayTransferOvertime;
@ApiModelProperty(value = "day1 ", example = "day1")
private String day1;
@ApiModelProperty(value = "day2 ", example = "day2")
private String day2;
@ApiModelProperty(value = "day3 ", example = "day3")
private String day3;
@ApiModelProperty(value = "day4 ", example = "day4")
private String day4;
@ApiModelProperty(value = "day5 ", example = "day5")
private String day5;
@ApiModelProperty(value = "day6 ", example = "day6")
private String day6;
@ApiModelProperty(value = "day7 ", example = "day7")
private String day7;
@ApiModelProperty(value = "day8 ", example = "day8")
private String day8;
@ApiModelProperty(value = "day9 ", example = "day9")
private String day9;
@ApiModelProperty(value = "day10 ", example = "day10")
private String day10;
@ApiModelProperty(value = "day11 ", example = "day11")
private String day11;
@ApiModelProperty(value = "day12 ", example = "day12")
private String day12;
@ApiModelProperty(value = "day13 ", example = "day13")
private String day13;
@ApiModelProperty(value = "day14 ", example = "day14")
private String day14;
@ApiModelProperty(value = "day15 ", example = "day15")
private String day15;
@ApiModelProperty(value = "day16 ", example = "day16")
private String day16;
@ApiModelProperty(value = "day17 ", example = "day17")
private String day17;
@ApiModelProperty(value = "day18 ", example = "day18")
private String day18;
@ApiModelProperty(value = "day19 ", example = "day19")
private String day19;
@ApiModelProperty(value = "day20 ", example = "day20")
private String day20;
@ApiModelProperty(value = "day21 ", example = "day21")
private String day21;
@ApiModelProperty(value = "day22 ", example = "day22")
private String day22;
@ApiModelProperty(value = "day23 ", example = "day23")
private String day23;
@ApiModelProperty(value = "day24 ", example = "day24")
private String day24;
@ApiModelProperty(value = "day25 ", example = "day25")
private String day25;
@ApiModelProperty(value = "day26 ", example = "day26")
private String day26;
@ApiModelProperty(value = "day27 ", example = "day27")
private String day27;
@ApiModelProperty(value = "day28 ", example = "day28")
private String day28;
@ApiModelProperty(value = "day29 ", example = "day29")
private String day29;
@ApiModelProperty(value = "day30 ", example = "day30")
private String day30;
@ApiModelProperty(value = "day31 ", example = "day31")
private String day31;
@ApiModelProperty(value = "年 年", example = "101")
private Integer belongYear;
@ApiModelProperty(value = "月 月", example = "101")
private Integer belongMonth;
@ApiModelProperty(value = "企业组织代码 企业组织代码", example = "101")
private Integer orgCode;
@ApiModelProperty(value = "最后修改时间 最后修改时间", example = "101")
private Integer lastModified;
}
\ No newline at end of file
......@@ -16,7 +16,6 @@ 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;
......@@ -25,6 +24,7 @@ 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.KqglAssoMonthPunchSummary;
import cn.timer.api.bean.kqmk.KqglAssoTeshu;
import cn.timer.api.bean.kqmk.KqglAssoZhoupaiban;
import cn.timer.api.bean.kqmk.KqglMainKqz;
......@@ -32,7 +32,6 @@ 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;
......@@ -49,10 +48,8 @@ import io.swagger.annotations.ApiOperation;
@Transactional
@RequestMapping(value = "/kqdk", produces = { "application/json", "multipart/form-data" })
public class ClockInController {
@Autowired
private KqglMainKqzMapper kqglmainkqzmapper;
/**
* 考勤打卡
*
......@@ -65,24 +62,18 @@ public class ClockInController {
@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();
String asDevId = jsonArray.get("dev_id").toString();//考勤机编码
String asUserId = jsonArray.get("user_id").toString();//打卡用户id
String asVerifyMode = jsonArray.get("verify_mode").toString();//考勤机打卡方式(1:指纹;20:人脸;40:掌纹;60:密码(猜的^v^))
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
int qyid = user.getOrgCode();
int userid = user.getEmpNum();
KqglMainKqz attgro = kqglmainkqzmapper.getAttendanceGroupInformationByUserid(userid,qyid); //考勤组信息
//pbfs;// 排班方式 1:固定排班;2:自由排班;3:自由工时
if(attgro != null) {
......@@ -248,6 +239,12 @@ public class ClockInController {
KqglAssoDkmx.builder().id(dkmc.getId()).build().updateById();
}
}
//具体打卡时间入汇总表(打卡成功才会录入汇总表)
KqglAssoMonthPunchSummary summary = KqglAssoMonthPunchSummary.builder().build();
}else {
System.out.println("当前打卡时间不在范围内");
}
//原始打卡记录数据录入**************************************************************************************************************************************
......@@ -282,7 +279,7 @@ public class ClockInController {
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 = "考勤机人脸打卡";}
if(("1").equals(asVerifyMode)) {remarks = "考勤机指纹打卡";}else if(("20").equals(asVerifyMode)) {remarks = "考勤机人脸打卡";}else if(("40").equals(asVerifyMode)) {remarks = "考勤机掌纹打卡";}else if(("60").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))
......
package cn.timer.api.dao.kqmk;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary;
/**
* 打卡月汇总
*
* @author Tang 2020-05-15
*/
@Repository
public interface KqglAssoMonthPunchSummaryMapper extends BaseMapper<KqglAssoMonthPunchSummary> {
}
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