Commit 20331eea authored by huyuchen's avatar huyuchen

假勤信息优化修改

parent c4f5ea61
package com.yifu.cloud.plus.v1.business.controller.vacation;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.business.entity.vacation.TBusLeave;
import com.yifu.cloud.plus.v1.business.service.vacation.TBusLeaveService;
......@@ -169,15 +170,17 @@ public class TBusLeaveController {
}
int i = 1;
List<TBusLeave> updateLsit = new ArrayList<>();
List<String> teleList = new ArrayList<>();
TBusLeave tBusLeaveExit;
for (TBusLeave tBusLeave : leaveList) {
i++;
if (Common.isNotNull(tBusLeave.getTeleNo())) {
if (!teleList.isEmpty() && teleList.contains(tBusLeave.getTeleNo())) {
errorList.add(new ErrorMessage(i, "表中已存在对应电信工号'" + tBusLeave.getTeleNo() + "'的离职数据!"));
tBusLeaveExit = tBusLeaveService.getOne(Wrappers.<TBusLeave>query().lambda()
.eq(TBusLeave::getTeleNo, tBusLeave.getTeleNo())
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(tBusLeaveExit)) {
errorList.add(new ErrorMessage(i, "已存在对应电信工号'" + tBusLeave.getTeleNo() + "'的离职数据!"));
continue;
} else {
teleList.add(tBusLeave.getTeleNo()); }
}
} else {
errorList.add(new ErrorMessage(i, "'" + "'电信工号不可为空!"));
continue;
......
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