|
@@ -39,13 +39,11 @@ public class LaborController {
|
|
|
|
|
|
@DataSource(value = DataSourceType.TICKET)
|
|
|
@GetMapping(value = "group")
|
|
|
- public AjaxResult getLaborGroup( @RequestParam("role") String role, @RequestParam("dept") String dept) {
|
|
|
+ public AjaxResult getLaborGroup(@RequestParam("role") String role, @RequestParam("dept") String dept) {
|
|
|
Wfrole wfrole = wfroleService.getRole(role);
|
|
|
if (wfrole == null)
|
|
|
return AjaxResult.error(4004, "人员获取失败");
|
|
|
|
|
|
- System.out.println(role);
|
|
|
- System.out.println(wfrole.getRoletype());
|
|
|
List<Labor> labors = new ArrayList<>();
|
|
|
switch (wfrole.getRoletype()){
|
|
|
case "自定义类":
|
|
@@ -83,5 +81,17 @@ public class LaborController {
|
|
|
|
|
|
return AjaxResult.successData(labors);
|
|
|
}
|
|
|
+
|
|
|
+ @DataSource(value = DataSourceType.TICKET)
|
|
|
+ @GetMapping(value = "list")
|
|
|
+ public AjaxResult getLabors(@RequestHeader("token") String header){
|
|
|
+ TokenUser token = shiroService.findToken(header);
|
|
|
+ List<Labor> labors = laborService.getLabors(token.getDepartment());
|
|
|
+
|
|
|
+ if (labors == null || labors.size() == 0)
|
|
|
+ return AjaxResult.error(4004, "数据为空");
|
|
|
+
|
|
|
+ return AjaxResult.successData(labors);
|
|
|
+ }
|
|
|
}
|
|
|
|