|
@@ -1,5 +1,6 @@
|
|
package com.gis.web.controller;
|
|
package com.gis.web.controller;
|
|
|
|
|
|
|
|
+import cn.hutool.core.io.FileUtil;
|
|
import com.gis.common.util.Result;
|
|
import com.gis.common.util.Result;
|
|
import com.gis.domain.dto.PersonalPageDateDto;
|
|
import com.gis.domain.dto.PersonalPageDateDto;
|
|
import com.gis.domain.dto.PersonalPageDto;
|
|
import com.gis.domain.dto.PersonalPageDto;
|
|
@@ -12,10 +13,13 @@ import com.gis.service.UserService;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.junit.Test;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
|
+import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
@@ -72,5 +76,41 @@ public class PersonalController extends BaseController {
|
|
return taskesTimateService.workByDayDetail(param);
|
|
return taskesTimateService.workByDayDetail(param);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 插入工号时,需要把deleted的字段注释他
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+// @ApiOperation(value = "")
|
|
|
|
+// @GetMapping(value = "tset1")
|
|
|
|
+// public Result tset1() {
|
|
|
|
+// List<UserEntity> all = userService.findAll();
|
|
|
|
+// HashMap<String, String> map = test3();
|
|
|
|
+// for (UserEntity userEntity : all) {
|
|
|
|
+// String realname = userEntity.getRealname();
|
|
|
|
+// String s = map.get(realname);
|
|
|
|
+// if (s != null) {
|
|
|
|
+// userEntity.setSlack(s);
|
|
|
|
+// userService.update(userEntity);
|
|
|
|
+// log.info("更新工号: " + realname + ": " + s);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// return Result.success();
|
|
|
|
+// }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ public HashMap<String, String> test3(){
|
|
|
|
+ String a = "C:\\Users\\Administrator\\Desktop\\33\\11.txt";
|
|
|
|
+ List<String> strings = FileUtil.readLines(a, "utf-8");
|
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
|
+ for (String str : strings) {
|
|
|
|
+ List<String> sub = Arrays.asList(str.split(","));
|
|
|
|
+ map.put(sub.get(0).trim(), sub.get(1));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return map;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|