|
@@ -717,6 +717,8 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
int year =0;
|
|
int year =0;
|
|
|
int days=0;
|
|
int days=0;
|
|
|
Map<Integer,String> hand=new HashMap<>();
|
|
Map<Integer,String> hand=new HashMap<>();
|
|
|
|
|
+ String startClockTime=null;
|
|
|
|
|
+ String endClockTime=null;
|
|
|
if (!maps.isEmpty()){
|
|
if (!maps.isEmpty()){
|
|
|
for (int i = 0; i < maps.size(); i++) {
|
|
for (int i = 0; i < maps.size(); i++) {
|
|
|
//获取头部
|
|
//获取头部
|
|
@@ -725,8 +727,8 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
String head = map.get(0);
|
|
String head = map.get(0);
|
|
|
int i1 = head.indexOf(":")+1;
|
|
int i1 = head.indexOf(":")+1;
|
|
|
int i2 = head.indexOf("至");
|
|
int i2 = head.indexOf("至");
|
|
|
- String startClockTime = head.substring(i1, i2).trim();
|
|
|
|
|
- String endClockTime = head.substring(i2+1).trim();
|
|
|
|
|
|
|
+ startClockTime = head.substring(i1, i2).trim();
|
|
|
|
|
+ endClockTime = head.substring(i2+1).trim();
|
|
|
System.out.println(startClockTime+"~"+endClockTime);
|
|
System.out.println(startClockTime+"~"+endClockTime);
|
|
|
LocalDate date = LocalDate.parse(startClockTime, DateTimeFormatter.ISO_DATE);
|
|
LocalDate date = LocalDate.parse(startClockTime, DateTimeFormatter.ISO_DATE);
|
|
|
month=date.getMonthValue();
|
|
month=date.getMonthValue();
|
|
@@ -750,7 +752,9 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
UserClockDtails newUserlock=new UserClockDtails(userClockDtails);
|
|
UserClockDtails newUserlock=new UserClockDtails(userClockDtails);
|
|
|
if(StringUtils.isNotEmpty(s)){
|
|
if(StringUtils.isNotEmpty(s)){
|
|
|
String[] split = s.split("\n");
|
|
String[] split = s.split("\n");
|
|
|
- if (split.length==1)newUserlock.setStauts(1);
|
|
|
|
|
|
|
+ if (split.length==1){
|
|
|
|
|
+ newUserlock.setStauts(1);
|
|
|
|
|
+ }
|
|
|
String regex = "\\d+";
|
|
String regex = "\\d+";
|
|
|
if (hand.get(j).matches(regex)){
|
|
if (hand.get(j).matches(regex)){
|
|
|
days=Integer.parseInt(hand.get(j));
|
|
days=Integer.parseInt(hand.get(j));
|
|
@@ -771,7 +775,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
Double hours = getHuors(startTime, endTime);
|
|
Double hours = getHuors(startTime, endTime);
|
|
|
newUserlock.setDuration(hours);
|
|
newUserlock.setDuration(hours);
|
|
|
}else {
|
|
}else {
|
|
|
- newUserlock.setDuration(0d);
|
|
|
|
|
|
|
+ newUserlock.setDuration(0.0);
|
|
|
}
|
|
}
|
|
|
if (!names.contains(newUserlock.getName())){
|
|
if (!names.contains(newUserlock.getName())){
|
|
|
names.add(newUserlock.getName());
|
|
names.add(newUserlock.getName());
|
|
@@ -786,20 +790,20 @@ public class SysUserServiceImpl implements ISysUserService
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//处理数据库
|
|
//处理数据库
|
|
|
- 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);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// 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 uid : userList) {
|
|
|
|
|
+// projectStaffRecordMapper.selectByAidAndTime(uid,startClockTime,endClockTime);
|
|
|
|
|
+// }
|
|
|
return list;
|
|
return list;
|
|
|
}
|
|
}
|
|
|
|
|
|