Commit 2e652bb6 authored by hongguangwu's avatar hongguangwu

MVP1.7.17-离职待办-派单暂存

parent fbb2630d
...@@ -611,6 +611,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -611,6 +611,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
} }
} }
if (Common.isNotNull(doTypeYi)) { if (Common.isNotNull(doTypeYi)) {
String closeRemark = "已在其他入口处理";
logInfo.append("已在其他入口处理:"); logInfo.append("已在其他入口处理:");
String socialDispatchId = ""; String socialDispatchId = "";
String fundDispatchId = ""; String fundDispatchId = "";
...@@ -637,6 +638,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -637,6 +638,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
errorInfo.append("社保未派减完结!"); errorInfo.append("社保未派减完结!");
} }
leave.setDoStatusSocial(CommonConstants.ONE_STRING); leave.setDoStatusSocial(CommonConstants.ONE_STRING);
leave.setCloseRemarkSocial(closeRemark);
} else { } else {
errorInfo.append("社保状态已完结,不可处理!"); errorInfo.append("社保状态已完结,不可处理!");
} }
...@@ -648,7 +650,8 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -648,7 +650,8 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
if (Common.isEmpty(fundDispatchId)) { if (Common.isEmpty(fundDispatchId)) {
errorInfo.append("公积金未派减完结!"); errorInfo.append("公积金未派减完结!");
} }
leave.setDoStatusSocial(CommonConstants.ONE_STRING); leave.setDoStatusFund(CommonConstants.ONE_STRING);
leave.setCloseRemarkFund(closeRemark);
} else { } else {
errorInfo.append("公积金状态已完结,不可处理!"); errorInfo.append("公积金状态已完结,不可处理!");
} }
...@@ -670,6 +673,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -670,6 +673,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
errorInfo.append("商险未派减完结!"); errorInfo.append("商险未派减完结!");
} }
leave.setDoStatusInsurance(CommonConstants.ONE_STRING); leave.setDoStatusInsurance(CommonConstants.ONE_STRING);
leave.setCloseRemarkInsurance(closeRemark);
} else { } else {
errorInfo.append("商险状态已完结,不可处理!"); errorInfo.append("商险状态已完结,不可处理!");
} }
...@@ -690,6 +694,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -690,6 +694,7 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
errorInfo.append("存在可用的合同!"); errorInfo.append("存在可用的合同!");
} }
leave.setDoStatusContract(CommonConstants.ONE_STRING); leave.setDoStatusContract(CommonConstants.ONE_STRING);
leave.setCloseRemarkContract(closeRemark);
} else { } else {
errorInfo.append("合同状态已完结,不可处理!"); errorInfo.append("合同状态已完结,不可处理!");
} }
...@@ -975,7 +980,24 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -975,7 +980,24 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
@Override @Override
public void autoDoLeave() { public void autoDoLeave() {
List<EmployeeRegistrationLeave> leaveList = baseMapper.selectLeaveListByDispatch(null); List<EmployeeRegistrationLeave> leaveList = baseMapper.selectLeaveListByDispatch(null);
batchDoLeaveCore(leaveList, CommonConstants.ONE_STRING, null); List<EmployeeRegistrationLeave> saveLeaveList = new ArrayList<>();
String customerUsernameNew;
YifuUser user;
String userName = "自动化自动-";
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
for (int i=0; i<leaveList.size(); i++) {
saveLeaveList.add(leaveList.get(i));
customerUsernameNew = leaveList.get(i).getCustomerUsernameNew();
if (i == leaveList.size()-1 || Common.isEmpty(customerUsernameNew)
|| !customerUsernameNew.equals(leaveList.get(i+1).getCustomerUsernameNew())) {
user = getNewYifuUser(authorities, userName + customerUsernameNew);
batchDoLeaveCore(saveLeaveList, CommonConstants.ONE_STRING, null, user);
saveLeaveList = new ArrayList<>();
}
}
} }
// @param isExit: 1仅发起日期为今日及之前的事项 0立即发起(全量) // @param isExit: 1仅发起日期为今日及之前的事项 0立即发起(全量)
...@@ -983,7 +1005,13 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -983,7 +1005,13 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
@Override @Override
public R<ErrorInfoVo> batchDoLeave(List<String> idList, String isExit, String doType) { public R<ErrorInfoVo> batchDoLeave(List<String> idList, String isExit, String doType) {
List<EmployeeRegistrationLeave> leaveList = baseMapper.selectLeaveListByDispatch(idList); List<EmployeeRegistrationLeave> leaveList = baseMapper.selectLeaveListByDispatch(idList);
return batchDoLeaveCore(leaveList, isExit, doType); YifuUser user = SecurityUtils.getUser();
String userName = "自动化手动-";
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
user = getNewYifuUser(authorities, userName + user.getNickname());
return batchDoLeaveCore(leaveList, isExit, doType, user);
} }
private YifuUser getNewYifuUser(Collection<? extends GrantedAuthority> authorities, String userName) { private YifuUser getNewYifuUser(Collection<? extends GrantedAuthority> authorities, String userName) {
...@@ -999,23 +1027,11 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe ...@@ -999,23 +1027,11 @@ public class EmployeeRegistrationLeaveServiceImpl extends ServiceImpl<EmployeeRe
// @param isExit: 1仅发起日期为今日及之前的事项 0立即发起(全量) // @param isExit: 1仅发起日期为今日及之前的事项 0立即发起(全量)
// * @param doType: 需处理项:1社保2公积金3商险4合同5项目档案6人员档案 // * @param doType: 需处理项:1社保2公积金3商险4合同5项目档案6人员档案
private R<ErrorInfoVo> batchDoLeaveCore(List<EmployeeRegistrationLeave> leaveList, String isExit, String doType) { private R<ErrorInfoVo> batchDoLeaveCore(List<EmployeeRegistrationLeave> leaveList, String isExit, String doType, YifuUser user) {
YifuUser user = SecurityUtils.getUser();
String userName = "自动化";
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
if (user != null && Common.isNotNull(user.getNickname())) {
userName += "手动-" + user.getNickname();
} else {
userName += "自动";
}
user = getNewYifuUser(authorities, userName);
if (Common.isEmpty(leaveList)) { if (Common.isEmpty(leaveList)) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE); return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
} }
String userName = user.getNickname();
List<TDispatchReduceVo> socialOldList = new ArrayList<>(); List<TDispatchReduceVo> socialOldList = new ArrayList<>();
TDispatchReduceVo vo; TDispatchReduceVo vo;
List<TDispatchReduceVo> fundOldList = new ArrayList<>(); List<TDispatchReduceVo> fundOldList = new ArrayList<>();
......
...@@ -232,8 +232,7 @@ ...@@ -232,8 +232,7 @@
a.close_remark_emp, a.close_remark_emp,
a.close_remark_emp_project, a.close_remark_emp_project,
a.leave_reason_name, a.leave_reason_name,
a.leave_reason_id, a.leave_reason_id
a.customer_username_new
</sql> </sql>
...@@ -599,7 +598,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh ...@@ -599,7 +598,7 @@ when '4' then '待减员' when '5' then '待办理' when '6' then '减员中' wh
</foreach> </foreach>
</if> </if>
</where> </where>
ORDER BY b.create_time asc,b.id asc ORDER BY b.customer_username_new asc,b.id asc
</select> </select>
<!-- 查询需要办理的数据 --> <!-- 查询需要办理的数据 -->
......
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