|
|
@@ -1,5 +1,6 @@
|
|
|
package com.goafanti.order.service.impl;
|
|
|
|
|
|
+import com.goafanti.admin.service.DepartmentService;
|
|
|
import com.goafanti.common.bo.Result;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
import com.goafanti.common.dao.*;
|
|
|
@@ -33,6 +34,8 @@ public class LegalAffairsServiceImpl extends BaseMybatisDao<TOrderMidMapper> imp
|
|
|
@Autowired
|
|
|
private TOrderLegalAffairsMapper tOrderLegalAffairsMapper;
|
|
|
@Autowired
|
|
|
+ private DepartmentService departmentService;
|
|
|
+ @Autowired
|
|
|
private AdminMapper adminMapper;
|
|
|
@Value(value = "${upload.path}")
|
|
|
private String uploadPath = null;
|
|
|
@@ -75,7 +78,11 @@ public class LegalAffairsServiceImpl extends BaseMybatisDao<TOrderMidMapper> imp
|
|
|
if (TokenManager.hasRole(AFTConstants.FINANCE)){
|
|
|
map.put("shiro",1);
|
|
|
List<String> deps=adminMapper.getFinanceDep(TokenManager.getAdminId());
|
|
|
- map.put("deps",deps);
|
|
|
+ if (in.getDeps()==null){
|
|
|
+ map.put("deps",deps);
|
|
|
+ }else {
|
|
|
+ map.put("deps",departmentService.selectSubDeps(deps));
|
|
|
+ }
|
|
|
}else if(TokenManager.hasRole(AFTConstants.SALESMAN_MANAGER)){
|
|
|
map.put("shiro",2);
|
|
|
map.put("sid", TokenManager.getAdminId());
|
|
|
@@ -92,8 +99,13 @@ public class LegalAffairsServiceImpl extends BaseMybatisDao<TOrderMidMapper> imp
|
|
|
if(in.getAid()!=null) map.put("aid", in.getAid());
|
|
|
if (in.getStatus()!=null) map.put("status",in.getStatus());
|
|
|
map.put("type", in.getType());
|
|
|
+
|
|
|
+ }
|
|
|
+ if (!TokenManager.hasRole(AFTConstants.FINANCE)){
|
|
|
+ if(in.getDeps()!=null){
|
|
|
+ map.put("deps", departmentService.parseArray(in.getDeps()));
|
|
|
+ }
|
|
|
}
|
|
|
- if(in.getDepId()!=null) map.put("depId", in.getDepId());
|
|
|
if(in.getUserName()!=null) map.put("userName", in.getUserName());
|
|
|
if(in.getStartTime()!=null)map.put("startTime", in.getStartTime());
|
|
|
if(in.getEndTime()!=null)map.put("endTime", in.getEndTime()+" 23:59:59");
|