Commit de3d1321 by leialin

Merge branch 'lal' into 'develop'

Lal

See merge request 8timerv2/8timerapiv200!321
parents 5873f140 49cebe58
...@@ -74,7 +74,7 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> { ...@@ -74,7 +74,7 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> {
@ApiModelProperty(value = "历史审批人 ", example = "历史审批人") @ApiModelProperty(value = "历史审批人 ", example = "历史审批人")
private String historyApprover; private String historyApprover;
@ApiModelProperty(value = "关联类型 0无 1转正 2离职 3调岗 4加班 5请假 6出差 7外出 8补卡 9调薪", example = "1") @ApiModelProperty(value = "1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡", example = "1")
private Integer assoType; private Integer assoType;
@TableField(fill = FieldFill.UPDATE) @TableField(fill = FieldFill.UPDATE)
...@@ -98,5 +98,4 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> { ...@@ -98,5 +98,4 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> {
} }
\ No newline at end of file
...@@ -879,7 +879,7 @@ public class ClockInController { ...@@ -879,7 +879,7 @@ public class ClockInController {
String attdate_ = new SimpleDateFormat("yy-MM-dd").format(Double.valueOf(attendance_date));//转换打卡时间格式 String attdate_ = new SimpleDateFormat("yy-MM-dd").format(Double.valueOf(attendance_date));//转换打卡时间格式
//true:确认为最后一次打卡更新打卡时 之前打卡的一条数据变为“打卡更新数据” //true:确认为最后一次打卡更新打卡时 之前打卡的一条数据变为“打卡更新数据”
if(kskd && (atttype == 2 || atttype == 4 || atttype == 6)) { if(kskd && (atttype == 2 || atttype == 4 || atttype == 6) && attdate.getAttgrouptype() != 3) {
KqglAssoDkjl dkjj = KqglAssoDkjl.builder().build().selectOne(new QueryWrapper<KqglAssoDkjl>().lambda().eq(KqglAssoDkjl::getUserId, userid).eq(KqglAssoDkjl::getType, 2) KqglAssoDkjl dkjj = KqglAssoDkjl.builder().build().selectOne(new QueryWrapper<KqglAssoDkjl>().lambda().eq(KqglAssoDkjl::getUserId, userid).eq(KqglAssoDkjl::getType, 2)
.eq(KqglAssoDkjl::getSort, atttype).eq(KqglAssoDkjl::getQyid, qyid).eq(KqglAssoDkjl::getAttdate, attdate_+" "+ClockInTool.dateToWeek2(toweek))); .eq(KqglAssoDkjl::getSort, atttype).eq(KqglAssoDkjl::getQyid, qyid).eq(KqglAssoDkjl::getAttdate, attdate_+" "+ClockInTool.dateToWeek2(toweek)));
...@@ -2246,6 +2246,26 @@ public class ClockInController { ...@@ -2246,6 +2246,26 @@ public class ClockInController {
List<KqglAssoDkjl> dajllist_ = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum()); List<KqglAssoDkjl> dajllist_ = kqglassodkjlmapper.getDetailedRecordClock(startDate,endDate,userBean.getEmpNum());
KqglAssoDkjl dkjl = KqglAssoDkjl.builder().build(); KqglAssoDkjl dkjl = KqglAssoDkjl.builder().build();
if(dajllist_.size() == 0) {
KqglAssoDkjl dkjj = KqglAssoDkjl.builder().build();
AttSchedule ast = AttSchedule.builder().build();
ast.setId(0);
ast.setIsdk(0);
ast.setDajl(dkjj);
attsch.add(ast);
attdate.setAttsch(attsch);
}else {
for(KqglAssoDkjl ddk : dajllist_) {
BeanUtil.copyProperties(ddk, dkjl,"attdate","bcid","remarks","userId","attime","dkmxid","commentary","punchequipment","punchmode");
}
AttSchedule ast = AttSchedule.builder().build();
ast.setId(0);
ast.setIsdk(1);
ast.setDajl(dkjl);
attsch.add(ast);
attdate.setAttsch(attsch);
}
} }
......
...@@ -2,6 +2,7 @@ package cn.timer.api.controller.spmk; ...@@ -2,6 +2,7 @@ package cn.timer.api.controller.spmk;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
...@@ -31,10 +32,11 @@ import cn.hutool.core.collection.CollUtil; ...@@ -31,10 +32,11 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Console; import cn.hutool.core.lang.Console;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.aspect.lang.annotation.Log; import cn.timer.api.aspect.lang.annotation.Log;
import cn.timer.api.aspect.lang.enums.BusinessType; import cn.timer.api.aspect.lang.enums.BusinessType;
import cn.timer.api.bean.kqgl.PunchRecord;
import cn.timer.api.bean.kqmk.KqglAssoLeaveRules;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso; import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.spmk.SpmkApprovalG; import cn.timer.api.bean.spmk.SpmkApprovalG;
import cn.timer.api.bean.spmk.SpmkApprovalTemplate; import cn.timer.api.bean.spmk.SpmkApprovalTemplate;
...@@ -63,6 +65,7 @@ import cn.timer.api.config.validation.ValidList; ...@@ -63,6 +65,7 @@ import cn.timer.api.config.validation.ValidList;
import cn.timer.api.controller.spmk.service.SpmkService; import cn.timer.api.controller.spmk.service.SpmkService;
import cn.timer.api.controller.yggl.service.YgglService; import cn.timer.api.controller.yggl.service.YgglService;
import cn.timer.api.controller.zzgl.service.ZzglBmgwMService; import cn.timer.api.controller.zzgl.service.ZzglBmgwMService;
import cn.timer.api.dao.kqgl.PunchRecordMapper;
import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper; import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper;
import cn.timer.api.dao.spmk.SpmkApprovalGMapper; import cn.timer.api.dao.spmk.SpmkApprovalGMapper;
import cn.timer.api.dao.spmk.SpmkApprovalTemplateGMapper; import cn.timer.api.dao.spmk.SpmkApprovalTemplateGMapper;
...@@ -77,14 +80,12 @@ import cn.timer.api.dto.spmk.ApprovingDto; ...@@ -77,14 +80,12 @@ import cn.timer.api.dto.spmk.ApprovingDto;
import cn.timer.api.dto.spmk.FlowChildren; import cn.timer.api.dto.spmk.FlowChildren;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.dto.spmk.MySummaryQueryDto; import cn.timer.api.dto.spmk.MySummaryQueryDto;
import cn.timer.api.dto.spmk.Relation;
import cn.timer.api.dto.spmk.Router; import cn.timer.api.dto.spmk.Router;
import cn.timer.api.dto.spmk.SpmkApprovalTemplateDto; import cn.timer.api.dto.spmk.SpmkApprovalTemplateDto;
import cn.timer.api.dto.spmk.SpmkApproveDetailDto; import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
import cn.timer.api.dto.spmk.SpmkApproveSummaryDto; import cn.timer.api.dto.spmk.SpmkApproveSummaryDto;
import cn.timer.api.dto.spmk.SpmkCustomApprovalDto; import cn.timer.api.dto.spmk.SpmkCustomApprovalDto;
import cn.timer.api.dto.spmk.SummaryQueryDto; import cn.timer.api.dto.spmk.SummaryQueryDto;
import cn.timer.api.dto.spmk.User;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
import cn.timer.api.utils.router.RouterUtils; import cn.timer.api.utils.router.RouterUtils;
...@@ -754,6 +755,8 @@ public class SpmkController { ...@@ -754,6 +755,8 @@ public class SpmkController {
return ResultUtil.success(); return ResultUtil.success();
} }
@Autowired
private PunchRecordMapper punchrecordmapper;
//TODO 我发起的/我审批的/抄送我的 //TODO 我发起的/我审批的/抄送我的
/** /**
* 查询列表-我发起的/我审批的/抄送我的-分页 * 查询列表-我发起的/我审批的/抄送我的-分页
...@@ -772,6 +775,51 @@ public class SpmkController { ...@@ -772,6 +775,51 @@ public class SpmkController {
IPage<SpmkApproveSummary> pageAs = spmkApproveSummaryMapper.selectPageByQueryForEmpNum(page, mySummaryQueryDto); IPage<SpmkApproveSummary> pageAs = spmkApproveSummaryMapper.selectPageByQueryForEmpNum(page, mySummaryQueryDto);
List<SpmkApproveSummary> listAs = pageAs.getRecords(); List<SpmkApproveSummary> listAs = pageAs.getRecords();
for(SpmkApproveSummary sp : listAs) {
String requerstr = "";
try {
SpmkApproveDetail ad = spmkApproveDetailMapper.selectOne(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, sp.getId()));
JSONObject as = ObjectUtil.deserialize(ad.getRequestData());
// System.out.println(as);
// System.out.println(sp.getId()+"==========================================="+sp.getAssoType());
requerstr = "";
//assoType : 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡
switch (sp.getAssoType()) {
case 1:requerstr = "转正时间:"+as.getJSONObject("__newConfirmationTime").getStr("value");break;
case 2:requerstr = "离职时间:"+as.getJSONObject("__terminationDate").getStr("value");break;
case 3:
String namepos = "";
PunchRecord pu = punchrecordmapper.organizationalStructure(Integer.valueOf(as.getJSONObject("__TransferInDepartment").getStr("value")));
if(pu != null) {
namepos = pu.getPost();
}
requerstr = "调入岗位:"+namepos;
break;
case 5:requerstr = "加班时长:"+as.getJSONObject("__timeLong").getStr("value")+"(小时)";break;
case 6:
String name = "";
KqglAssoLeaveRules rul = KqglAssoLeaveRules.builder().build().selectById(as.getJSONObject("__LeaveType").getStr("value"));
if(rul != null) {
name = rul.getName();
}
requerstr = "请假类型:"+name;
break;
case 7:requerstr = "出差时长:"+as.getJSONObject("__longTime").getStr("value")+"(小时)";break;
case 8:requerstr = "外出时长:"+as.getJSONObject("__longTime").getStr("value")+"(小时)";break;
case 9:requerstr = "补卡时间:"+as.getJSONObject("__PatchCardTime").getStr("value");break;
default:
break;
}
} catch (Exception e) {
e.printStackTrace();
}
// System.out.println(requerstr);
sp.setDigest(requerstr);
}
return ResultUtil.data(pageAs, listAs); return ResultUtil.data(pageAs, listAs);
} }
......
...@@ -40,4 +40,6 @@ public interface PunchRecordMapper { ...@@ -40,4 +40,6 @@ public interface PunchRecordMapper {
IPage<PunchRecord> QueryOriginalRecord(IPage<PunchRecord> page,@Param("param") OriginalRecordDto originalrecorddto); IPage<PunchRecord> QueryOriginalRecord(IPage<PunchRecord> page,@Param("param") OriginalRecordDto originalrecorddto);
PunchRecord organizationalStructure(int id);
} }
\ No newline at end of file
...@@ -34,6 +34,13 @@ ...@@ -34,6 +34,13 @@
mac, qyid, attdate, attime, dkmxid,bcid,remarks,punchmode,punchequipment mac, qyid, attdate, attime, dkmxid,bcid,remarks,punchmode,punchequipment
</sql> </sql>
<select id="organizationalStructure" resultMap="BaseResultMap">
select m.name as post,um.name as dept,m.id as mid
from zzgl_bmgw_m m
left join zzgl_bmgw_m um on um.id = m.up_id
where m.id = #{id}
</select>
<select id="QueryOriginalRecord" resultMap="BaseResultMap"> <select id="QueryOriginalRecord" resultMap="BaseResultMap">
select dkjl.*, select dkjl.*,
bmgw.dept, bmgw.dept,
......
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