|
@@ -5,15 +5,12 @@ import java.util.List;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
-import com.github.pagehelper.PageHelper;
|
|
|
|
|
-import com.github.pagehelper.PageInfo;
|
|
|
|
|
import com.xintong.system.err.BusinessException;
|
|
import com.xintong.system.err.BusinessException;
|
|
|
import com.xintong.visualinspection.bean.FeeStation;
|
|
import com.xintong.visualinspection.bean.FeeStation;
|
|
|
import com.xintong.visualinspection.bean.Organ;
|
|
import com.xintong.visualinspection.bean.Organ;
|
|
@@ -102,11 +99,12 @@ public class DepartmentController extends BaseController {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
@RequestMapping(value = "/get/all",method=RequestMethod.GET,produces="application/json;charset=UTF-8")
|
|
@RequestMapping(value = "/get/all",method=RequestMethod.GET,produces="application/json;charset=UTF-8")
|
|
|
- public String getAllDept(){
|
|
|
|
|
|
|
+ public String getAllDept(HttpServletRequest request){
|
|
|
try{
|
|
try{
|
|
|
|
|
+ User u = getCurrentUser(request);
|
|
|
Organ organ=new Organ();
|
|
Organ organ=new Organ();
|
|
|
organ.setStatus(0);
|
|
organ.setStatus(0);
|
|
|
- List<Organ> organs= departmentService.getOrgans(organ);
|
|
|
|
|
|
|
+ List<Organ> organs= departmentService.getOrgans(organ,u);
|
|
|
return returnResult(0, "获取成功", organs);
|
|
return returnResult(0, "获取成功", organs);
|
|
|
}catch(Exception e){
|
|
}catch(Exception e){
|
|
|
throw new BusinessException(20001);
|
|
throw new BusinessException(20001);
|
|
@@ -119,7 +117,7 @@ public class DepartmentController extends BaseController {
|
|
|
|
|
|
|
|
Organ organ = new Organ();
|
|
Organ organ = new Organ();
|
|
|
organ.setParentid(pid);
|
|
organ.setParentid(pid);
|
|
|
- List<Organ> organs= departmentService.getOrgans(organ);
|
|
|
|
|
|
|
+ List<Organ> organs= departmentService.getOrgans(organ,null);
|
|
|
return returnResult(0, "获取成功",(organs));
|
|
return returnResult(0, "获取成功",(organs));
|
|
|
}catch(Exception e){
|
|
}catch(Exception e){
|
|
|
throw new BusinessException(20001);
|
|
throw new BusinessException(20001);
|
|
@@ -132,7 +130,7 @@ public class DepartmentController extends BaseController {
|
|
|
Organ organ = new Organ();
|
|
Organ organ = new Organ();
|
|
|
organ.setId(organid);
|
|
organ.setId(organid);
|
|
|
|
|
|
|
|
- List<Organ> organs = departmentService.getOrgans(organ);
|
|
|
|
|
|
|
+ List<Organ> organs = departmentService.getOrgans(organ,null);
|
|
|
if(organs==null||organs.size()<1 ) throw new BusinessException(20001);
|
|
if(organs==null||organs.size()<1 ) throw new BusinessException(20001);
|
|
|
return returnResult(0, "获取成功", organs.get(0));
|
|
return returnResult(0, "获取成功", organs.get(0));
|
|
|
}catch(Exception e){
|
|
}catch(Exception e){
|