Bläddra i källkod

奖金报错处理

anderx 3 år sedan
förälder
incheckning
78347027d1

+ 11 - 2
src/main/java/com/goafanti/organization/controller/AdminOrganizationController.java

@@ -31,13 +31,22 @@ public class AdminOrganizationController extends BaseApiController{
 		res.setData(organizationService.listOrganizationManagement(olo, pageNo, pageSize));
 		return res;
 	}
-	/**部门组织管理上级组织查询 **/
+	/**获取科德集团以下的部门 **/
+	@RequestMapping(value = "/getAllDep" , method = RequestMethod.GET)
+	public Result getAllDep(Integer hideSign){
+		Result res = new Result();
+		res.setData(organizationService.getAllDep(hideSign));
+		return res;
+	}
+
+	/**获取所有部门 **/
 	@RequestMapping(value = "/selectSuperId" , method = RequestMethod.GET)
-	public Result selectsuperId(Integer hideSign){
+	public Result selectSuperId(Integer hideSign){
 		Result res = new Result();
 		res.setData(organizationService.selectSuperId(hideSign));
 		return res;
 	}
+
 	/**部门组织管理上级组织查询 **/
 	@RequestMapping(value = "/selectSuperIdS" , method = RequestMethod.GET)
 	public Result selectsuperIdS(){

+ 4 - 0
src/main/java/com/goafanti/organization/service/OrganizationService.java

@@ -19,6 +19,8 @@ public interface OrganizationService {
 	listOrganizationManagement(OrganizationListOut olo,Integer pageNo, Integer pageSize);
 	/**组织名称查上级组织*/
 	List<DepOut> selectSuperId(Integer hideSign);
+
+	List<DepOut> getAllDep(Integer hideSign);
 	/**
 	 *
 	 * @param name 组织名称
@@ -45,4 +47,6 @@ public interface OrganizationService {
 			String remarks,String id,String abbreviation,String financeId,Integer workingHoursType,Integer hideSign,String depNo);
 
 	boolean checkDepNo(String depNo,Integer type);
+
+
 }

+ 14 - 0
src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java

@@ -61,6 +61,19 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
 		if (hideSign>1){
 			hideSign=null;
 		}
+		List<DepOut> depList=departmentMapper.selectSuperId(hideSign,0,null);
+		return depList;
+	}
+
+	@Override
+	public List<DepOut> getAllDep(Integer hideSign) {
+		if(hideSign==null){
+			hideSign=1;
+		}
+		//此处理用于前端不批量改接口
+		if (hideSign>1){
+			hideSign=null;
+		}
 		List<DepOut> depList=departmentMapper.selectSuperId(hideSign,3,null);
 		depList.forEach(e ->{
 			List<DepOut> list=getSubordinateDep(1,e.getId());
@@ -70,6 +83,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
 		});
 		return depList;
 	}
+
 	/**
 	 *
 	 */