Commit 88e33fbb by leialin

Merge branch 'lal' into 'develop'

Lal

See merge request 8timerv2/8timerapiv200!297
parents a546bffa f46d98e3
......@@ -68,4 +68,11 @@ public class KqglAssoRelationSummary extends Model<KqglAssoRelationSummary> {
private String endTime;
@ApiModelProperty(value = "企业组织代码 ", example = "企业组织代码")
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 {
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{
// @Scheduled(cron = "0 22 15 * * ?") // 测试:5秒执行一次 0 0 19 * * ?
// @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0 3 19 * * ?")
// @Scheduled(cron = "0 40 17 * * ?")
public void AttendanceTask() throws ParseException {
// boolean implement = false;
......@@ -579,6 +579,7 @@ 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));
for(KqglAssoRelationSummary lea : leas) {
//最小加班单位 1:按分钟加班、2:按半小时加班、3:按小时加班、4:按半天加班、5:按天加班
KqglAssoOvertimeBasics basics = KqglAssoOvertimeBasics.builder().build().selectOne(new QueryWrapper<KqglAssoOvertimeBasics>().lambda().eq(KqglAssoOvertimeBasics::getOrgCode, org_code));
if(basics.getMinimumUnit() == 1) { company = "分钟"; }
......@@ -591,6 +592,8 @@ public class AttendanceTaskTiming{
else if(lea.getCompensateId() == 2) { method="转加班费"; }
else {method="转调休或加班费";}
rowData.add(lea.getStartTime() +"到"+ lea.getEndTime()+"加班"+lea.getDuration()+company+"["+method+"]");
//防止多运算
if(lea.getOrdernum() == lea.getTotals()) {
//加班补偿方式 1:转调休;2:转加班费;3:转调休或加班费
//工作日
if(ClockInTool.contains(ClockInTool.deleteArrayNull(ycqts),num)) {
......@@ -624,6 +627,7 @@ public class AttendanceTaskTiming{
}
}
}
}
}
......
......@@ -111,12 +111,13 @@ public class KqglServiceImpl implements KqglService {
String startdate = new SimpleDateFormat("yyyy-MM-dd").format(overappr.getStarttime());
String enddate = new SimpleDateFormat("yyyy-MM-dd").format(overappr.getEndtime());
String[] days=ClockInTool.listToString(ClockInTool.getDays(startdate,enddate)).split(",");
int i = 1;
for(String num : days) {
//记入打卡月汇总关联表
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()))
.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()));
......
......@@ -861,4 +861,17 @@ public class SpmkController {
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 {
private Integer sbdk3jg;// 上班3打卡结果
private String xbdk3;// 下班3打卡时间
private Integer xbdk3jg;// 下班3打卡结果
private Integer sbcdzs;// 迟到总数
private Integer xbztzs;// 早退总数
private Integer ydkcs;// 应打卡次数
private Integer gzsc;// 工作时长
private Integer qyid;// 企业id
......
......@@ -193,6 +193,10 @@
<result column="sbdk3jg" property="sbdk3jg" />
<result column="xbdk3" property="xbdk3" />
<result column="xbdk3jg" property="xbdk3jg" />
<result column="sbcdzs" property="sbcdzs" />
<result column="xbztzs" property="xbztzs" />
<result column="ydkcs" property="ydkcs" />
<result column="gzsc" property="gzsc" />
<result column="qyid" property="qyid" />
......@@ -373,6 +377,8 @@
IFNULL(rtj.xbdk2 ,'') xbdk2,IFNULL(rtj.xbdk2jg,'') xbdk2jg,
IFNULL(rtj.sbdk3 ,'') sbdk3,IFNULL(rtj.sbdk3jg ,'') sbdk3jg,
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.gzsc ,'') gzsc,
IFNULL(rtj.qyid,'') qyid,
......
......@@ -16,6 +16,8 @@
<result column="start_time" property="startTime" />
<result column="end_time" property="endTime" />
<result column="org_code" property="orgCode" />
<result column="ordernum" property="ordernum" />
<result column="totals" property="totals" />
</resultMap>
<sql id="Base_Column_List">
......@@ -30,7 +32,9 @@
compensate_id,
start_time,
end_time,
org_code
org_code,
ordernum,
totals
</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