|
|
|
@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestHeader; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@ -20,8 +21,8 @@ public class ManContController { |
|
|
|
@Autowired |
|
|
|
UserService userService; |
|
|
|
/*根据主表id拿到表单字段信息*/ |
|
|
|
@RequestMapping(value = "getManCont") |
|
|
|
public JsonData getFieldTree(@RequestBody Map<String,String> requestBody) { |
|
|
|
@RequestMapping(value = "getParentOrgsByDeviceNo") |
|
|
|
public JsonData getParentOrgsByDeviceNo(@RequestBody Map<String,String> requestBody) { |
|
|
|
|
|
|
|
String paramType = requestBody.get("paramType"); |
|
|
|
String paramValue = requestBody.get("paramValue"); |
|
|
|
@ -29,7 +30,17 @@ public class ManContController { |
|
|
|
if(paramType.equals("deviceNo")){ |
|
|
|
if(!StringUtils.isBlank(paramValue)){ |
|
|
|
ManCont manCont = userService.getManContByDeviceNo(paramType,paramValue); |
|
|
|
return JsonData.buildSuccess(manCont); |
|
|
|
if(null!=manCont){ |
|
|
|
|
|
|
|
//查出该员工的所有父级部门
|
|
|
|
List<String> parentOrgs = userService.getAllParentOrgForEmp(manCont); |
|
|
|
return JsonData.buildSuccess(parentOrgs); |
|
|
|
//return JsonData.buildError("当前deviceNo没有绑定员工,可以xxl-job手动同步一下试试");
|
|
|
|
|
|
|
|
}else{ |
|
|
|
return JsonData.buildError("当前deviceNo没有绑定员工,可以xxl-job手动同步一下试试"); |
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
return JsonData.buildError("paramValue 非法,isBlank"); |
|
|
|
} |
|
|
|
@ -41,16 +52,7 @@ public class ManContController { |
|
|
|
return JsonData.buildError("paramType 非法, isBlank"); |
|
|
|
} |
|
|
|
|
|
|
|
/*if(tree.getId()==null){ |
|
|
|
return JsonData.buildError("查无此表单"); |
|
|
|
}else{ |
|
|
|
if(tree.getId().equals("cfid为空")){ |
|
|
|
return JsonData.buildSuccess(tree); |
|
|
|
}else if(tree.getId().equals("masterTable为null")){ |
|
|
|
return JsonData.buildSuccess(tree); |
|
|
|
} |
|
|
|
return JsonData.buildSuccess(tree); |
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|