Commit b0299183 by ilal

提交

parent d664cb39
......@@ -1110,6 +1110,8 @@ public class ClockInController {
status = status_;
}
}
//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(toweek)).attime(attime).dkmxid(dkmx).bcid(shifid).remarks(remarks).punchmode(Integer.valueOf(asVerifyMode))
......@@ -2022,6 +2024,7 @@ public class ClockInController {
dkmx = pcd.getId();
atttype = 1;
}else {//修改
boolean zydk = true;
dkmx = zydkmc.getId();
KqglAssoDkmx zypcd = KqglAssoDkmx.builder().build();
if((!("").equals(zydkmc.getSbdk1()) || zydkmc.getSbdk1() != null) && (("").equals(zydkmc.getXbdk1()) || zydkmc.getXbdk1() == null)){//下班1
......@@ -2031,6 +2034,8 @@ public class ClockInController {
if(zysd1.after(zysd2)) {//当zysd1大于zysd2时,返回TRUE,当小于等于时,返回false;
msg = "自由工时:上班打卡后"+canpunchworkdate+"小时后,才可打下班卡";
sbyf = 0;
zydk = false;
atttype = 0;
}else {
zypcd.setId(zydkmc.getId());
zypcd.setXbdk1(time_);//下班1打卡时间
......@@ -2040,7 +2045,10 @@ public class ClockInController {
}
kqglassodkmxmapper.updateByPrimaryKeySelective(zypcd);//修改打卡记录
}
atttype = 2;
if(zydk) {
atttype = 2;
}
}else if((!("").equals(zydkmc.getSbdk1()) || zydkmc.getSbdk1() != null) && (!("").equals(zydkmc.getXbdk1()) || zydkmc.getXbdk1() != null)
&& (("").equals(zydkmc.getSbdk2()) || zydkmc.getSbdk2() == null)){//上班2
zypcd.setId(zydkmc.getId());
......@@ -2055,6 +2063,8 @@ public class ClockInController {
if(zysd1.after(zysd2)) {//当zysd1大于zysd2时,返回TRUE,当小于等于时,返回false;
msg = "自由工时:上班打卡后"+canpunchworkdate+"小时后,才可打下班卡";
sbyf = 0;
zydk = false;
atttype = 0;
}else {
zypcd.setId(zydkmc.getId());
zypcd.setXbdk2(time_);//下班1打卡时间
......@@ -2068,7 +2078,9 @@ public class ClockInController {
}
kqglassodkmxmapper.updateByPrimaryKeySelective(zypcd);//修改打卡记录
}
if(zydk) {
atttype = 4;
}
}else if((!("").equals(zydkmc.getSbdk1()) || zydkmc.getSbdk1() != null) && (!("").equals(zydkmc.getXbdk1()) || zydkmc.getXbdk1() != null)
&& (!("").equals(zydkmc.getSbdk2()) || zydkmc.getSbdk2() != null) && (!("").equals(zydkmc.getXbdk2()) || zydkmc.getXbdk2() != null)
&& (("").equals(zydkmc.getSbdk3()) || zydkmc.getSbdk3() == null)){//上班3
......@@ -2085,6 +2097,8 @@ public class ClockInController {
if(zysd1.after(zysd2)) {//当zysd1大于zysd2时,返回TRUE,当小于等于时,返回false;
msg = "自由工时:上班打卡后"+canpunchworkdate+"小时后,才可打下班卡";
sbyf = 0;
zydk = false;
atttype = 0;
}else {
zypcd.setId(zydkmc.getId());
zypcd.setXbdk3(time_);//下班1打卡时间
......@@ -2098,8 +2112,9 @@ public class ClockInController {
}
kqglassodkmxmapper.updateByPrimaryKeySelective(zypcd);//修改打卡记录
}
if(zydk) {
atttype = 6;
}
}else {
atttype = 7;
}
......@@ -2137,63 +2152,65 @@ public class ClockInController {
}
}
}
int type,status = 0;
if((atttype)%2 > 0){
type = 1;// 类型(类型 0:无排班打卡 1:上班 2:下班) punchcardtime == 0:无班次打卡
if(attdate.getAttgrouptype() != 3) {
if(EmptyUtil.isNotEmpty(attdate.getAttsch())) {
if(punchcardtime == 0 && clockt.getShifid() != 0){
status = 1;
}if(punchcardtime == 0 && clockt.getShifid() == 0) {
status = 2;
}else{
if(isRange) {// 状态(0:打卡无效:此记录已被更新 1:正常 2:异常 3:迟到 4:早退 5:补卡 6:请假 7:加班 8:调休)
if(time > 0){
status = 3;
}else if(results == 0){
status = 1;
}
}else {
int type = 0,status = 0;
if(atttype > 0) {
if((atttype)%2 > 0){
type = 1;// 类型(类型 0:无排班打卡 1:上班 2:下班) punchcardtime == 0:无班次打卡
if(attdate.getAttgrouptype() != 3) {
if(EmptyUtil.isNotEmpty(attdate.getAttsch())) {
if(punchcardtime == 0 && clockt.getShifid() != 0){
status = 1;
}if(punchcardtime == 0 && clockt.getShifid() == 0) {
status = 2;
}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 if(EmptyUtil.isEmpty(attdate.getAttsch())) {
status = 2;
}
}else if(EmptyUtil.isEmpty(attdate.getAttsch())) {
status = 2;
}
}else {
if(sbyf == 1) {
status = 1;
}else {
status = 2;
}
}
}else{
type = 2;// 类型(类型 0:无排班打卡 1:上班 2:下班)
if(attdate.getAttgrouptype() != 3) {
if(EmptyUtil.isNotEmpty(attdate.getAttsch())) {
if(punchcardtime == 0 && clockt.getShifid() != 0){
if(sbyf == 1) {
status = 1;
}if(punchcardtime == 0 && clockt.getShifid() == 0) {
}else {
status = 2;
}else{
if(isRange) {
if(time < 0){
status = 4;
}else if(results == 0){
status = 1;
}
}else {
}
}
}else{
type = 2;// 类型(类型 0:无排班打卡 1:上班 2:下班)
if(attdate.getAttgrouptype() != 3) {
if(EmptyUtil.isNotEmpty(attdate.getAttsch())) {
if(punchcardtime == 0 && clockt.getShifid() != 0){
status = 1;
}if(punchcardtime == 0 && clockt.getShifid() == 0) {
status = 2;
}else{
if(isRange) {
if(time < 0){
status = 4;
}else if(results == 0){
status = 1;
}
}else {
status = 2;
}
}
}else if(EmptyUtil.isEmpty(attdate.getAttsch())) {
status = 2;
}
}else if(EmptyUtil.isEmpty(attdate.getAttsch())) {
status = 2;
}
}else {
if(sbyf == 1) {
status = 1;
}else {
status = 2;
if(sbyf == 1) {
status = 1;
}else {
status = 2;
}
}
}
}
......@@ -2604,14 +2621,14 @@ public class ClockInController {
List<AttSchedule> attsch = new ArrayList<AttSchedule>();
// List<KqglAssoDkjl> dajllist_ = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
KqglAssoDkjl dkjl = KqglAssoDkjl.builder().build();
// KqglAssoDkjl dkjl = KqglAssoDkjl.builder().build();
if(dajllist_.size() > 0) {
for(int i=1;i<=dajllist_.size();i++){
for(KqglAssoDkjl ddk : dajllist_) {
BeanUtil.copyProperties(ddk, dkjl,"attdate","bcid","remarks","userId","attime","dkmxid","commentary","punchequipment","punchmode");
}
KqglAssoDkjl dkjl = KqglAssoDkjl.builder().build();
// for(KqglAssoDkjl ddk : dajllist_) {
BeanUtil.copyProperties(dajllist_.get(i-1), dkjl,"attdate","bcid","remarks","userId","attime","dkmxid","commentary","punchequipment","punchmode");
// }
AttSchedule ast = AttSchedule.builder().build();
ast.setId(0);
ast.setIsdk(1);
......@@ -2882,7 +2899,7 @@ public class ClockInController {
AttendanceCardListDto attdate = MethodCall(userBean.getOrgCode(),userBean.getEmpNum(),num);//获取当天所打卡班次
List<AttSchedule> ashss = attdate.getAttsch();//获取今天应打卡时间
if(EmptyUtil.isNotEmpty(attdate.getAttsch())) {//班次不为空
if(EmptyUtil.isNotEmpty(attdate.getAttsch()) && attdate.getAttgrouptype() != 3) {//班次不为空
KqglAssoBcsz bcsts = KqglAssoBcsz.builder().build().selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, ashss.get(0).getId()));
......@@ -3019,6 +3036,7 @@ public class ClockInController {
//当月后续补贴数据
if(date == null || ("").equals(date) || date.equals(yue)) {
int pbfs = 0;
String next_day = ClockInTool.requires_extra_times(current,1,2,1);
Calendar ca = Calendar.getInstance();
ca.set(Calendar.DAY_OF_MONTH, ca.getActualMaximum(Calendar.DAY_OF_MONTH));
......@@ -3033,6 +3051,7 @@ public class ClockInController {
if(attgro != null){//该员工是否加入到考勤组 排班方式 1:固定排班;2:自由排班;3:自由工时 计算出应出勤,实际出勤,休息天数
if(attgro.getPbfs() == 1){ //固定排班
pbfs = 1;
List<KqglAssoTeshu> bxdklist = kqglassoteshumapper.ShouldSpecialDatessetByKqzid(attgro.getId(), ttstr,1);//当前月 必须打卡日期
int bxdk = bxdklist.size();
String[] bxdkss = new String[bxdk];////特殊-必须打卡天数(工作日)
......@@ -3096,6 +3115,7 @@ public class ClockInController {
}
}
}else if(attgro.getPbfs() == 2){ //自由排班
pbfs = 2;
DateFormat df11 = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);
List<Schedule> ycqs = schedulemapper.getAttendanceShouldList(userBean.getEmpNum(),startMonth,endMonth);
int z=0;
......@@ -3120,6 +3140,7 @@ public class ClockInController {
}
}
}else{
pbfs = 3;
List<AttendanceWeeklySch> atwek = attendanceweeklyschmapper.selectAttendanceMadeByUserid(userBean.getEmpNum(),userBean.getOrgCode());
String[] week= new String[atwek.size()];
int e = 0;
......@@ -3147,12 +3168,20 @@ public class ClockInController {
for(String nus : nextrange) {
WorkbenchCalendarDto wocal = WorkbenchCalendarDto.builder().build();
wocal.setDate(nus);
if(ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),nus)) {
wocal.setCalendar_status(1);//打卡异常
}
if(ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),nus)) {
wocal.setCalendar_status(4);//打卡异常
if(pbfs == 3) {
wocal.setCalendar_status(0);//
wocal.setCalendar_status_type(0);
}else {
if(ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),nus)) {
wocal.setCalendar_status(1);//
wocal.setCalendar_status_type(0);
}
if(ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),nus)) {
wocal.setCalendar_status(4);//
wocal.setCalendar_status_type(0);
}
}
workcal.add(wocal);
}
......
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