Commit 09830dc0 by 翁国栋

审批移除人员bug

parent b2e8519f
...@@ -835,7 +835,7 @@ public class SpmkController { ...@@ -835,7 +835,7 @@ public class SpmkController {
// 查询 SpmkApproveSummary 状态, // 查询 SpmkApproveSummary 状态,
SpmkApproveSummary aSummary = spmkApproveSummaryMapper.selectOne(new QueryWrapper<SpmkApproveSummary>().lambda() SpmkApproveSummary aSummary = spmkApproveSummaryMapper.selectOne(new QueryWrapper<SpmkApproveSummary>().lambda()
.select(SpmkApproveSummary::getSts,SpmkApproveSummary::getAssoType,SpmkApproveSummary::getEmpNum,SpmkApproveSummary::getOrgCode) .select(SpmkApproveSummary::getSts, SpmkApproveSummary::getAssoType, SpmkApproveSummary::getEmpNum, SpmkApproveSummary::getOrgCode)
.eq(SpmkApproveSummary::getId, asId)); .eq(SpmkApproveSummary::getId, asId));
if (aSummary.getSts() > ApproveSummarySts.IN.ordinal()) { if (aSummary.getSts() > ApproveSummarySts.IN.ordinal()) {
...@@ -872,8 +872,8 @@ public class SpmkController { ...@@ -872,8 +872,8 @@ public class SpmkController {
} }
//判断是否是请假审批 //判断是否是请假审批
if(aSummary.getAssoType()==ApproveEnum.LEAVE.getType()){ if (aSummary.getAssoType() == ApproveEnum.LEAVE.getType()) {
if(approvingDto.getSts()==2) { if (approvingDto.getSts() == 2) {
JSONObject jSONObject = jsonObject.parseObject(ad.getRequestData(), JSONObject.class); JSONObject jSONObject = jsonObject.parseObject(ad.getRequestData(), JSONObject.class);
// 请假类型 - 前端传中文 // 请假类型 - 前端传中文
String LeaveType = ObjectUtil.isNull(jSONObject.get("__LeaveType", FromData.class)) ? null : jSONObject.get("__LeaveType", FromData.class).getValue(); String LeaveType = ObjectUtil.isNull(jSONObject.get("__LeaveType", FromData.class)) ? null : jSONObject.get("__LeaveType", FromData.class).getValue();
...@@ -883,7 +883,7 @@ public class SpmkController { ...@@ -883,7 +883,7 @@ public class SpmkController {
KqglAssoLeaveEmployeeBalance emba = KqglAssoLeaveEmployeeBalance.builder().build().selectOne(new QueryWrapper<KqglAssoLeaveEmployeeBalance>().lambda().eq(KqglAssoLeaveEmployeeBalance::getLeaveRulesId, Convert.toInt(LeaveType)) KqglAssoLeaveEmployeeBalance emba = KqglAssoLeaveEmployeeBalance.builder().build().selectOne(new QueryWrapper<KqglAssoLeaveEmployeeBalance>().lambda().eq(KqglAssoLeaveEmployeeBalance::getLeaveRulesId, Convert.toInt(LeaveType))
.eq(KqglAssoLeaveEmployeeBalance::getUserid, aSummary.getEmpNum()).eq(KqglAssoLeaveEmployeeBalance::getOrgCode, aSummary.getOrgCode())); .eq(KqglAssoLeaveEmployeeBalance::getUserid, aSummary.getEmpNum()).eq(KqglAssoLeaveEmployeeBalance::getOrgCode, aSummary.getOrgCode()));
if (emba != null) { if (emba != null) {
if (emba.getBalanceDays()!=-1&&emba.getBalanceDays() < Convert.toInt(longTime)) { if (emba.getBalanceDays() != -1 && emba.getBalanceDays() < Convert.toInt(longTime)) {
return ResultUtil.error("当前发起人假期余额不足"); return ResultUtil.error("当前发起人假期余额不足");
} }
} }
...@@ -1527,8 +1527,13 @@ public class SpmkController { ...@@ -1527,8 +1527,13 @@ public class SpmkController {
} else if (listFlowChildren.get(spmkApproveDetailDto.getIndex() + 1).getClassName().equals("copy")) { } else if (listFlowChildren.get(spmkApproveDetailDto.getIndex() + 1).getClassName().equals("copy")) {
isFinal = true; isFinal = true;
} }
//执行中的人会存在操作记录 SpmkApproveExecuteRecord spmkApproveExecuteRecord;
SpmkApproveExecuteRecord spmkApproveExecuteRecord = spmkApproveExecuteRecordMapper.selectExecuteRecordById(Integer.parseInt(currentUser.getId()), spmkApproveDetailSummary.getApproveSummaryId()); //执行中的人会存在操作记录/spmk/delteApprove
if (spmkApproveDetailDto.getApproveExecuteRecordId()!=null) {
spmkApproveExecuteRecord = SpmkApproveExecuteRecord.builder().id(spmkApproveDetailDto.getApproveExecuteRecordId()).build().selectById();
} else {
spmkApproveExecuteRecord = spmkApproveExecuteRecordMapper.selectExecuteRecordById(Integer.parseInt(currentUser.getId()), spmkApproveDetailSummary.getApproveSummaryId());
}
//删除操作人记录 //删除操作人记录
if (spmkApproveExecuteRecord != null) { if (spmkApproveExecuteRecord != null) {
SpmkExecutor spmkExecutor = SpmkExecutor.builder().build().selectOne(new LambdaQueryWrapper<SpmkExecutor>() SpmkExecutor spmkExecutor = SpmkExecutor.builder().build().selectOne(new LambdaQueryWrapper<SpmkExecutor>()
......
...@@ -65,4 +65,7 @@ public class SpmkApproveDetailDto { ...@@ -65,4 +65,7 @@ public class SpmkApproveDetailDto {
private Integer userIndex;//插入审批人的当前用户索引 private Integer userIndex;//插入审批人的当前用户索引
private Integer approveExecuteId;
private Integer approveExecuteRecordId;
} }
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