Commit 7a0b2b6a by ilal Committed by chenzg

提交

parent 6ef25538
......@@ -2303,7 +2303,6 @@ public class ClockInController {
public Result<Object> getAttClockData(@CurrentUser UserBean userBean,@RequestBody AttConditions attconditions) throws ParseException {
long nowdate = new Date().getTime();
// String current = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
String str = null;
if(!("").equals(attconditions.getDate())){
......@@ -2325,13 +2324,10 @@ public class ClockInController {
String stampToDate = ClockInTool.stampToDate(String.valueOf(endDate));//当天打卡的最后时间
Timestamp d = Timestamp.valueOf(stampToDate);
Timestamp b = Timestamp.valueOf(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));//当前时间
String now = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
String nowtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
KqglMainKqz attgro = kqglmainkqzmapper.getAttendanceGroupInformationByUserid(userBean.getEmpNum(),userBean.getOrgCode()); //考勤组信息
if(attgro != null) {
......@@ -2351,11 +2347,52 @@ public class ClockInController {
if(attdate.getAttgrouptype() != 3) {
List<AttSchedule> attsch = attdate.getAttsch();
if(EmptyUtil.isNotEmpty(attdate.getAttsch()) && attsch.get(0).getId() != 0) {//班次不为空
/******次日开始*****/
int sb1 = 0,xb1 = 0,sb2 = 0,xb2 = 0,sb3 = 0,xb3 = 0;
//先判断前一天是否存在次日打卡的方式
KqglAssoBcsz jianchashif = KqglAssoBcsz.builder().build().selectOne(new QueryWrapper<KqglAssoBcsz>().lambda().eq(KqglAssoBcsz::getId, attsch.get(0).getId()));
if(jianchashif.getIsSbdk1Cr() == 1) { sb1 = 1; }
if(jianchashif.getIsXbdk1Cr() == 1) { xb1 = 1; }
if(jianchashif.getIsSbdk2Cr() == 1) { sb2 = 1; }
if(jianchashif.getIsXbdk2Cr() == 1) { xb2 = 1; }
if(jianchashif.getIsSbdk3Cr() == 1) { sb3 = 1; }
if(jianchashif.getIsXbdk3Cr() == 1) { xb3 = 1; }
//
if(sb1 == 1 ||xb1 == 1 || sb2 == 1 ||xb2 == 1 || sb3 == 1 ||xb3 == 1) {
//前一天的班次
AttendanceCardListDto beforeattdate = MethodCall(userBean.getOrgCode(),userBean.getEmpNum(),yesterday);
//前一天的打卡数据
List<KqglAssoDkjl> dajllistbefo = kqglassodkjlmapper.getDetailedRecordClock(startDateyesterday,endDateyesterday,userBean.getEmpNum());
List<AttSchedule> beforeattsch = beforeattdate.getAttsch();
int p = 0;
for(AttSchedule befo : beforeattsch) {
if(befo.getNextday() == 1) {
AttSchedule attschbefo = AttSchedule.builder().build();
BeanUtil.copyProperties(befo, attschbefo,"nextdaycard","dajl");
attschbefo.setNextday(2);//昨日
KqglAssoDkjl dkjlbefo = KqglAssoDkjl.builder().build();
for(KqglAssoDkjl ka : dajllistbefo) {
if(befo.getId() == ka.getBcid() && befo.getSort() == ka.getSort()) {//班次id和打卡顺序对应
BeanUtil.copyProperties(ka, dkjlbefo,"attdate","remarks","userId","attime","dkmxid","commentary","punchequipment","punchmode");
}
}
attschbefo.setDajl(dkjlbefo);
attsch.add(p,attschbefo);
p++;
}
}
}
/******次日结束*****/
int bccs = attdate.getAttsch().size();
int r = 1,bc = 0;
int bsz = 0;
for(AttSchedule ash : attsch) {
if(ash.getNextdaycard() == 0) {
if(attdate.getAttsch().size() == 2) {
//有范围
if(ash.getStarttime() != 0 && ash.getEndtime() != 0) {
......@@ -2474,8 +2511,8 @@ public class ClockInController {
}
////
// List<KqglAssoDkjl> dajllist_ = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
// dkcs = dajllist_.size();
// List<KqglAssoDkjl> dajllist_ = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
// dkcs = dajllist_.size();
KqglAssoDkjl dkjl = KqglAssoDkjl.builder().build();
for(KqglAssoDkjl daj : dajllist_) {
if(ash.getId() == daj.getBcid() && ash.getSort() == daj.getSort()) {//班次id和打卡顺序对应
......@@ -2619,6 +2656,7 @@ public class ClockInController {
ash.setDajl(dkjl);//班次信息中插入打卡打卡 数据
}
}
boolean lcdkgb = true;
......
......@@ -113,6 +113,7 @@ public class SpmkServiceImpl implements SpmkService{
if(sum != null) {
adD.setEmpNum(sum.getEmpNum());
adD.setSts(sum.getSts());
adD.setLaunchTime(sum.getCreateTime());
SpmkExecutor exe= null;
SpmkApproveExecuteRecord exere = SpmkApproveExecuteRecord.builder().build()
......
......@@ -21,7 +21,7 @@ public class AttSchedule implements Serializable{
private Integer id;
private Integer sort;// 1:上班;2:下班; 3:上班;4:下班;5:上班;6:下班
private Integer nextday;//0:否;1:是
private Integer nextday;//0:否;1:是 (0:今日;1:次日;2:昨日)
private Long time;
private Long starttime;
private Long endtime;
......@@ -32,4 +32,6 @@ public class AttSchedule implements Serializable{
private int isupdate;//是否跟新打卡
private int isdk;//0:当前打卡 1:已过打卡
private KqglAssoDkjl dajl;
private int nextdaycard;
}
......@@ -60,4 +60,7 @@ public class ClockCollectData implements Serializable {
@ApiModelProperty(value = "打卡类型", example = "1:打卡 2:更新打卡")
private Integer differ;
@ApiModelProperty(value = "打卡", example = "0:当天卡 1:次日卡")
private Integer nextday;
}
package cn.timer.api.dto.spmk;
import java.util.Date;
import java.util.List;
import cn.hutool.json.JSONObject;
......@@ -55,4 +56,6 @@ public class SpmkApproveDetailDto {
private Integer exereid;
private Date launchTime; //审批发起时间
}
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