Commit 1069b4b5 by lal

提交

parent f0990808
...@@ -68,4 +68,11 @@ public class KqglAssoRelationSummary extends Model<KqglAssoRelationSummary> { ...@@ -68,4 +68,11 @@ public class KqglAssoRelationSummary extends Model<KqglAssoRelationSummary> {
private String endTime; private String endTime;
@ApiModelProperty(value = "企业组织代码 ", example = "企业组织代码") @ApiModelProperty(value = "企业组织代码 ", example = "企业组织代码")
private Integer orgCode; private Integer orgCode;
@ApiModelProperty(value = " ", example = "")
private Integer ordernum;
@ApiModelProperty(value = " ", example = "")
private Integer totals;
} }
\ No newline at end of file
...@@ -2819,4 +2819,13 @@ public class TimeCardController { ...@@ -2819,4 +2819,13 @@ public class TimeCardController {
return ResultUtil.data(msg,"操作成功!"); return ResultUtil.data(msg,"操作成功!");
} }
@GetMapping(value = "/Weekly_attendance_data/{date}")
@ApiOperation(value = "考勤周数据", httpMethod = "GET", notes = "查询数据")
public Result<Object> Weekly_attendance_data(@CurrentUser UserBean userBean,@PathVariable("date") String date) throws ParseException {
return ResultUtil.data(null,"操作成功!");
}
} }
...@@ -109,7 +109,7 @@ public class AttendanceTaskTiming{ ...@@ -109,7 +109,7 @@ public class AttendanceTaskTiming{
// @Scheduled(cron = "0 22 15 * * ?") // 测试:5秒执行一次 0 0 19 * * ? // @Scheduled(cron = "0 22 15 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 */5 * * * ?") // @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 3 19 * * ?") // @Scheduled(cron = "0 40 17 * * ?")
public void AttendanceTask() throws ParseException { public void AttendanceTask() throws ParseException {
// boolean implement = false; // boolean implement = false;
...@@ -579,47 +579,51 @@ public class AttendanceTaskTiming{ ...@@ -579,47 +579,51 @@ public class AttendanceTaskTiming{
List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1)); List<KqglAssoRelationSummary> leas = KqglAssoRelationSummary.builder().build().selectList(new QueryWrapper<KqglAssoRelationSummary>().lambda().eq(KqglAssoRelationSummary::getUserId, user.getEmpnum()).eq(KqglAssoRelationSummary::getAppTime, num).eq(KqglAssoRelationSummary::getApprovalType, 1));
for(KqglAssoRelationSummary lea : leas) { for(KqglAssoRelationSummary lea : leas) {
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
KqglAssoOvertimeBasics basics = KqglAssoOvertimeBasics.builder().build().selectOne(new QueryWrapper<KqglAssoOvertimeBasics>().lambda().eq(KqglAssoOvertimeBasics::getOrgCode, org_code)); //最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
if(basics.getMinimumUnit() == 1) { company = "分钟"; } KqglAssoOvertimeBasics basics = KqglAssoOvertimeBasics.builder().build().selectOne(new QueryWrapper<KqglAssoOvertimeBasics>().lambda().eq(KqglAssoOvertimeBasics::getOrgCode, org_code));
else if(basics.getMinimumUnit() == 2) { company = "半小时";} if(basics.getMinimumUnit() == 1) { company = "分钟"; }
else if(basics.getMinimumUnit() == 3) { company = "小时";} else if(basics.getMinimumUnit() == 2) { company = "半小时";}
else if(basics.getMinimumUnit() == 4) { company = "半天";} else if(basics.getMinimumUnit() == 3) { company = "小时";}
else if(basics.getMinimumUnit() == 5) { company = "天";} else if(basics.getMinimumUnit() == 4) { company = "半天";}
//1:转调休;2:转加班费;3:转调休或加班费 else if(basics.getMinimumUnit() == 5) { company = "天";}
if(lea.getCompensateId() == 1) { method="转调休"; } //1:转调休;2:转加班费;3:转调休或加班费
else if(lea.getCompensateId() == 2) { method="转加班费"; } if(lea.getCompensateId() == 1) { method="转调休"; }
else {method="转调休或加班费";} else if(lea.getCompensateId() == 2) { method="转加班费"; }
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"加班"+lea.getDuration()+company+"["+method+"]"); else {method="转调休或加班费";}
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费 rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"加班"+lea.getDuration()+company+"["+method+"]");
//工作日 //防止多运算
if(ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num)) { if(lea.getOrdernum() == lea.getTotals()) {
if(lea.getOvertimeTypeId() == 1) { //加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) { //工作日
workingturncompenleave = workingturncompenleave + lea.getDuration(); if(ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num)) {
}else if(lea.getCompensateId() == 2 || lea.getCompensateId() == 4) { if(lea.getOvertimeTypeId() == 1) {
workingtransferovertime = workingtransferovertime + + lea.getDuration(); if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) {
workingturncompenleave = workingturncompenleave + lea.getDuration();
}else if(lea.getCompensateId() == 2 || lea.getCompensateId() == 4) {
workingtransferovertime = workingtransferovertime + + lea.getDuration();
}
} }
} }
} //休息日
//休息日 if(ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) {
if(ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) { if(lea.getOvertimeTypeId() == 2) {
if(lea.getOvertimeTypeId() == 2) { if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) {
if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) { restturncompenleave = restturncompenleave + lea.getDuration();
restturncompenleave = restturncompenleave + lea.getDuration(); }else if(lea.getCompensateId() == 2 || lea.getCompensateId() == 4) {
}else if(lea.getCompensateId() == 2 || lea.getCompensateId() == 4) { resttransferovertime = resttransferovertime + lea.getDuration();
resttransferovertime = resttransferovertime + lea.getDuration(); }
} }
} }
} if(!ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num) && !ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) {
if(!ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num) && !ClockInTool.contains(ClockInTool.deleteArrayNull(xxts),num)) { if(lea.getOvertimeTypeId() == 3) {
if(lea.getOvertimeTypeId() == 3) { if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) {
if(lea.getCompensateId() == 1 || lea.getCompensateId() == 3) { // holidayturncompenleave++;
// holidayturncompenleave++; holidayturncompenleave = holidayturncompenleave + lea.getDuration();
holidayturncompenleave = holidayturncompenleave + lea.getDuration(); }else if(lea.getCompensateId() == 2 || lea.getCompensateId() == 4) {
}else if(lea.getCompensateId() == 2 || lea.getCompensateId() == 4) { // holidaytransferovertime++;
// holidaytransferovertime++; holidaytransferovertime = holidaytransferovertime + lea.getDuration();
holidaytransferovertime = holidaytransferovertime + lea.getDuration(); }
} }
} }
} }
......
...@@ -111,12 +111,13 @@ public class KqglServiceImpl implements KqglService { ...@@ -111,12 +111,13 @@ public class KqglServiceImpl implements KqglService {
String startdate = new SimpleDateFormat("yyyy-MM-dd").format(overappr.getStarttime()); String startdate = new SimpleDateFormat("yyyy-MM-dd").format(overappr.getStarttime());
String enddate = new SimpleDateFormat("yyyy-MM-dd").format(overappr.getEndtime()); String enddate = new SimpleDateFormat("yyyy-MM-dd").format(overappr.getEndtime());
String[] days=ClockInTool.listToString(ClockInTool.getDays(startdate,enddate)).split(","); String[] days=ClockInTool.listToString(ClockInTool.getDays(startdate,enddate)).split(",");
int i = 1;
for(String num : days) { for(String num : days) {
//记入打卡月汇总关联表 //记入打卡月汇总关联表
KqglAssoRelationSummary.builder().userId(overappr.getUserid()).appTime(num).approvalId(overappr.getOvertimeid()).approvalType(1).duration(overappr.getDuration()) KqglAssoRelationSummary.builder().userId(overappr.getUserid()).appTime(num).approvalId(overappr.getOvertimeid()).approvalType(1).duration(overappr.getDuration())
.overtimeTypeId(overappr.getOvertimetype()).compensateId(overappr.getCompensate()).startTime(new SimpleDateFormat("yyyy-MM-dd' 'HH:mm:ss").format(overappr.getStarttime())) .overtimeTypeId(overappr.getOvertimetype()).compensateId(overappr.getCompensate()).startTime(new SimpleDateFormat("yyyy-MM-dd' 'HH:mm:ss").format(overappr.getStarttime()))
.endTime(new SimpleDateFormat("yyyy-MM-dd' 'HH:mm:ss").format(overappr.getEndtime())).orgCode(overappr.getOrgcode()).build().insert(); .endTime(new SimpleDateFormat("yyyy-MM-dd' 'HH:mm:ss").format(overappr.getEndtime())).ordernum(i).orgCode(overappr.getOrgcode()).totals(days.length).build().insert();
i++;
} }
YgglMainEmp emp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, overappr.getUserid()).eq(YgglMainEmp::getOrgCode, overappr.getOrgcode())); YgglMainEmp emp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, overappr.getUserid()).eq(YgglMainEmp::getOrgCode, overappr.getOrgcode()));
......
...@@ -861,4 +861,17 @@ public class SpmkController { ...@@ -861,4 +861,17 @@ public class SpmkController {
return ResultUtil.data(spmkIcons,"生成 审批组 和 自定义审批成功"); return ResultUtil.data(spmkIcons,"生成 审批组 和 自定义审批成功");
} }
@GetMapping(value = "/verification_staff")
@ApiOperation(value = "校验员工是否是正式员工", httpMethod = "GET", notes = " 查询列表-假期规则")
public Result<Object> verification_staff(@CurrentUser UserBean userBean) {
String msg = "";
YgglMainEmp ygem = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode())
.eq(YgglMainEmp::getEmpNum, userBean.getEmpNum()));
if(ygem.getJobStatus() == 1) {
msg = "正式员工不能发起转正审批";
}
return ResultUtil.data(msg);
}
} }
...@@ -60,6 +60,10 @@ public class DailyDetailsDto { ...@@ -60,6 +60,10 @@ public class DailyDetailsDto {
private Integer sbdk3jg;// 上班3打卡结果 private Integer sbdk3jg;// 上班3打卡结果
private String xbdk3;// 下班3打卡时间 private String xbdk3;// 下班3打卡时间
private Integer xbdk3jg;// 下班3打卡结果 private Integer xbdk3jg;// 下班3打卡结果
private Integer sbcdzs;// 迟到总数
private Integer xbztzs;// 早退总数
private Integer ydkcs;// 应打卡次数 private Integer ydkcs;// 应打卡次数
private Integer gzsc;// 工作时长 private Integer gzsc;// 工作时长
private Integer qyid;// 企业id private Integer qyid;// 企业id
......
...@@ -193,6 +193,10 @@ ...@@ -193,6 +193,10 @@
<result column="sbdk3jg" property="sbdk3jg" /> <result column="sbdk3jg" property="sbdk3jg" />
<result column="xbdk3" property="xbdk3" /> <result column="xbdk3" property="xbdk3" />
<result column="xbdk3jg" property="xbdk3jg" /> <result column="xbdk3jg" property="xbdk3jg" />
<result column="sbcdzs" property="sbcdzs" />
<result column="xbztzs" property="xbztzs" />
<result column="ydkcs" property="ydkcs" /> <result column="ydkcs" property="ydkcs" />
<result column="gzsc" property="gzsc" /> <result column="gzsc" property="gzsc" />
<result column="qyid" property="qyid" /> <result column="qyid" property="qyid" />
...@@ -373,6 +377,8 @@ ...@@ -373,6 +377,8 @@
IFNULL(rtj.xbdk2 ,'') xbdk2,IFNULL(rtj.xbdk2jg,'') xbdk2jg, IFNULL(rtj.xbdk2 ,'') xbdk2,IFNULL(rtj.xbdk2jg,'') xbdk2jg,
IFNULL(rtj.sbdk3 ,'') sbdk3,IFNULL(rtj.sbdk3jg ,'') sbdk3jg, IFNULL(rtj.sbdk3 ,'') sbdk3,IFNULL(rtj.sbdk3jg ,'') sbdk3jg,
IFNULL(rtj.xbdk3,'') xbdk3,IFNULL(rtj.xbdk3jg ,'') xbdk3jg, IFNULL(rtj.xbdk3,'') xbdk3,IFNULL(rtj.xbdk3jg ,'') xbdk3jg,
(IFNULL(rtj.sbdk1jg,0) + IFNULL(rtj.sbdk2jg ,0) + IFNULL(rtj.sbdk3jg ,0)) as sbcdzs,
(IFNULL(rtj.xbdk1jg,0) + IFNULL(rtj.xbdk2jg ,0) + IFNULL(rtj.xbdk3jg ,0)) as xbztzs,
IFNULL(rtj.dktj1,'') dktj1,IFNULL(rtj.dktj2,'') dktj2,IFNULL(rtj.dktj3,'') dktj3,IFNULL(rtj.dktj4,'') dktj4,IFNULL(rtj.dktj5,'') dktj5,IFNULL(rtj.dktj6,'') dktj6, IFNULL(rtj.dktj1,'') dktj1,IFNULL(rtj.dktj2,'') dktj2,IFNULL(rtj.dktj3,'') dktj3,IFNULL(rtj.dktj4,'') dktj4,IFNULL(rtj.dktj5,'') dktj5,IFNULL(rtj.dktj6,'') dktj6,
IFNULL(rtj.gzsc ,'') gzsc, IFNULL(rtj.gzsc ,'') gzsc,
IFNULL(rtj.qyid,'') qyid, IFNULL(rtj.qyid,'') qyid,
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
<result column="start_time" property="startTime" /> <result column="start_time" property="startTime" />
<result column="end_time" property="endTime" /> <result column="end_time" property="endTime" />
<result column="org_code" property="orgCode" /> <result column="org_code" property="orgCode" />
<result column="ordernum" property="ordernum" />
<result column="totals" property="totals" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -30,7 +32,9 @@ ...@@ -30,7 +32,9 @@
compensate_id, compensate_id,
start_time, start_time,
end_time, end_time,
org_code org_code,
ordernum,
totals
</sql> </sql>
......
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