|
@@ -13,6 +13,7 @@ import javax.validation.Validator;
|
|
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
|
import com.ruoyi.common.enums.UserRolesType;
|
|
import com.ruoyi.common.enums.UserRolesType;
|
|
|
import com.ruoyi.project.domain.ProjectStaff;
|
|
import com.ruoyi.project.domain.ProjectStaff;
|
|
|
|
|
+import com.ruoyi.project.domain.ProjectStaffRecord;
|
|
|
import com.ruoyi.project.domain.ProjectTask;
|
|
import com.ruoyi.project.domain.ProjectTask;
|
|
|
import com.ruoyi.project.mapper.ProjectStaffMapper;
|
|
import com.ruoyi.project.mapper.ProjectStaffMapper;
|
|
|
import com.ruoyi.project.mapper.ProjectStaffRecordMapper;
|
|
import com.ruoyi.project.mapper.ProjectStaffRecordMapper;
|
|
@@ -711,6 +712,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
public List<UserClockDtails> pushUserClock(List<Map<Integer, String>> maps) {
|
|
public List<UserClockDtails> pushUserClock(List<Map<Integer, String>> maps) {
|
|
|
List<UserClockDtails> list=new ArrayList<>();
|
|
List<UserClockDtails> list=new ArrayList<>();
|
|
|
List<String> names=new ArrayList<>();
|
|
List<String> names=new ArrayList<>();
|
|
|
|
|
+ List<String> uids=new ArrayList<>();
|
|
|
int month =0;
|
|
int month =0;
|
|
|
int year =0;
|
|
int year =0;
|
|
|
int days=0;
|
|
int days=0;
|
|
@@ -773,6 +775,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
}
|
|
}
|
|
|
if (!names.contains(newUserlock.getName())){
|
|
if (!names.contains(newUserlock.getName())){
|
|
|
names.add(newUserlock.getName());
|
|
names.add(newUserlock.getName());
|
|
|
|
|
+ uids.add(newUserlock.getUserId());
|
|
|
}
|
|
}
|
|
|
list.add(newUserlock);
|
|
list.add(newUserlock);
|
|
|
}
|
|
}
|
|
@@ -782,8 +785,22 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- names.forEach(System.out::println);
|
|
|
|
|
- return list;
|
|
|
|
|
|
|
+ //处理数据库
|
|
|
|
|
+ List<String> errorNames = new ArrayList<>();
|
|
|
|
|
+ List<Long> userList=new ArrayList<>();
|
|
|
|
|
+ for (int i = 0; i < names.size(); i++) {
|
|
|
|
|
+ SysUser sysUser = userMapper.selectDDUserId(uids.get(i));
|
|
|
|
|
+ if (sysUser==null){
|
|
|
|
|
+ errorNames.add(names.get(i));
|
|
|
|
|
+ }else {
|
|
|
|
|
+ userList.add(sysUser.getUserId());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!errorNames.isEmpty())throw new ServiceException(String.format("用户%s不能匹配到账号",errorNames.toString()));
|
|
|
|
|
+ for (Long aLong : userList) {
|
|
|
|
|
+ List<ProjectStaffRecord> projectStaffRecords = projectStaffRecordMapper.selectByPidAndAid(null, aLong);
|
|
|
|
|
+ }
|
|
|
|
|
+ return list;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|