Commit b16b1e09 by leialin

Merge branch 'lal' into 'develop'

提交

See merge request 8timerv2/8timerapiv200!383
parents d3890260 a3981b56
......@@ -61,7 +61,7 @@ public class KqglAssoDkjl extends Model<KqglAssoDkjl> {
@ApiModelProperty(value = "类型(0:无排班打卡 1:上班 2:下班)", example = "101")
private Integer type;
@ApiModelProperty(value = "(0:打卡无效:此记录已被更新 1:正常 2:异常 3:迟到 4:早退 5:补卡 6:请假 7:加班 8:调休 9:管理员改为正常 10:管理员改为迟到 11:管理员改为早退 12:补卡通过/正常 13:补卡通过/迟到 14:补卡通过/早退)", example = "101")
@ApiModelProperty(value = "(0:打卡无效:此记录已被更新 1:正常 2:异常 3:迟到 4:早退 5:补卡 6:请假 7:加班 8:调休 9:管理员改为正常 10:管理员改为迟到 11:管理员改为早退 12:补卡通过/正常 13:补卡通过/迟到 14:补卡通过/早退 15:严重迟到 16:旷工迟到)", example = "101")
private Integer status;
@ApiModelProperty(value = "序号(0:打卡无效:此记录已被更新) 序号(0:打卡无效:此记录已被更新)", example = "101")
......
......@@ -74,6 +74,7 @@ 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.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
@Api(tags = "3.0[3]考勤打卡")
......@@ -2475,7 +2476,29 @@ public class ClockInController {
KqglAssoDkjl dkjl = KqglAssoDkjl.builder().build();
for(KqglAssoDkjl daj : dajllist_) {
if(ash.getId() == daj.getBcid() && ash.getSort() == daj.getSort()) {//班次id和打卡顺序对应
BeanUtil.copyProperties(daj, dkjl,"attdate","bcid","remarks","userId","attime","dkmxid","commentary","punchequipment","punchmode");
BeanUtil.copyProperties(daj, dkjl,"attdate","remarks","userId","attime","dkmxid","commentary","punchequipment","punchmode");
int bcid = dkjl.getBcid();
int results = dkjl.getResults();
KqglAssoBcsz bcsz = KqglAssoBcsz.builder().build().selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, bcid));
if(bcsz != null) {
int yxcdfzs = bcsz.getYxcdfzs();//允许迟到分钟数
int yzcdfzs = bcsz.getYzcdfzs();//严重迟到分钟数
int kgcdfzs = bcsz.getKgcdfzs();//旷工迟到分钟数
//允许迟到范围
if(results < yxcdfzs) {
dkjl.setResults(0);
dkjl.setStatus(1);
}
//严重迟到范围
if(results>yzcdfzs && results < kgcdfzs && yzcdfzs>0) {
dkjl.setStatus(15);//严重迟到
}
//旷工迟到
if(results>kgcdfzs && kgcdfzs>0) {
dkjl.setStatus(16);//旷工迟到
}
}
if(bsz == 1) {
bc++;
ash.setIsdk(1);
......@@ -2486,23 +2509,25 @@ public class ClockInController {
}
KqglAssoBcsz shif = KqglAssoBcsz.builder().build().selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, ash.getId()));
Timestamp tt = Timestamp.valueOf(ClockInTool.stampToDate(String.valueOf(ash.getTime())));
if(shif.getIsXbdk() == 1 && (ash.getSort())%2 == 0) {
Timestamp tt = Timestamp.valueOf(ClockInTool.stampToDate(String.valueOf(ash.getTime())));
if(dkjl.getDktime() == null && b.after(tt)) {
KqglAssoDkjl dkjl_ = KqglAssoDkjl.builder().build();
dkjl_.setDktime(ash.getTime());
dkjl_.setStatus(1);
dkjl_.setSort(ash.getSort());
dkjl_.setId(999);
BeanUtil.copyProperties(dkjl_, dkjl);
dkjl.setDktime(ash.getTime());
dkjl.setStatus(1);
dkjl.setSort(ash.getSort());
dkjl.setId(999);
}else if(dkjl.getDktime() != null){
dkjl.setStatus(1);
}
}
if(ash.getIsdk() == 1 && b.after(tt) && dkcs == 0) {
dkjl.setDktime(null);
dkjl.setStatus(17);//缺卡
dkjl.setSort(ash.getSort());
dkjl.setId(888);
}
/****/
//事务(请假,加班,调休,出差)
......@@ -2575,7 +2600,7 @@ public class ClockInController {
}
/****/
ash.setDajl(dkjl);
ash.setDajl(dkjl);//班次信息中插入打卡打卡 数据
}
......
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