anderx лет назад: 3
Родитель
Сommit
d981a5c6b0

+ 4 - 4
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -609,9 +609,6 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	private void addParams(InputPublicDtails in, Map<String, Object> map) {
 		if(in.getAid()!=null) map.put("aid", in.getAid());
 		if(in.getSid()!=null) map.put("sid", in.getSid());
-		if(in.getDeps()!=null){
-			map.put("deps", departmentService.parseArray(in.getDeps()));
-		}
 		if(in.getReleaseStart()!=null) map.put("releaseStart", in.getReleaseStart());
 		if(in.getReleaseEnd()!=null) map.put("releaseEnd", in.getReleaseEnd()+" 23:59:59");
 		if(in.getCreateStart()!=null) map.put("createStart", in.getCreateStart());
@@ -629,10 +626,13 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			in.setType(2);
 		}else if(TokenManager.hasRole(AFTConstants.COMPANY_MANAGER)||TokenManager.hasRole(AFTConstants.SALESMAN_ADMIN)){
 			in.setType(1);
-			map.put("deps", departmentService.selectMyDeps());
+			map.put("deps", departmentService.selectSubDeps(in.getDeps()));
 		}else{
 			in.setType(0);
 			if (in.getAid()==null) map.put("aid",TokenManager.getAdminId());
+			if(in.getDeps()!=null){
+				map.put("deps", departmentService.parseArray(in.getDeps()));
+			}
 		}
 		map.put("type", in.getType());
 	}