|
@@ -9,6 +9,9 @@ import java.util.UUID;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
+import com.goafanti.admin.service.DepartmentService;
|
|
|
|
|
+import com.goafanti.common.model.OrganizationManagement;
|
|
|
|
|
+import com.goafanti.order.service.OrderService;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
@@ -53,6 +56,8 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
|
|
|
private UserBusinessMapper userBusinessMapper;
|
|
private UserBusinessMapper userBusinessMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private OrganizationManagementMapper organizationManagementMapper;
|
|
private OrganizationManagementMapper organizationManagementMapper;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private DepartmentService departmentService;
|
|
|
@Resource(name = "passwordUtil")
|
|
@Resource(name = "passwordUtil")
|
|
|
private PasswordUtil passwordUtil;
|
|
private PasswordUtil passwordUtil;
|
|
|
|
|
|
|
@@ -365,12 +370,12 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- @Cacheable(cacheNames = "selectAllUser#500",key = "'selectAllUser:depId:'+#depId+'startTime:'+#startTime+" +
|
|
|
|
|
- "'endTime:'+#endTime+'aName:'+#aName")
|
|
|
|
|
|
|
+ @Cacheable(cacheNames = "selectAllUser#500",key = "'selectAllUser:depId:'+#depId+'startTime:'+#startTime+" +"'endTime:'+#endTime+'aName:'+#aName")
|
|
|
public depCountBo selectAllUser(String depId, String startTime, String endTime,String aName) {
|
|
public depCountBo selectAllUser(String depId, String startTime, String endTime,String aName) {
|
|
|
depCountBo acb=new depCountBo();
|
|
depCountBo acb=new depCountBo();
|
|
|
if (endTime!=null)endTime=endTime+" 23:59:59";
|
|
if (endTime!=null)endTime=endTime+" 23:59:59";
|
|
|
List<depCountBo >deps=new ArrayList<>();
|
|
List<depCountBo >deps=new ArrayList<>();
|
|
|
|
|
+ List<OrganizationManagement> depIds=new ArrayList<>();
|
|
|
if (depId==null) {
|
|
if (depId==null) {
|
|
|
acb.setName("科德集团");
|
|
acb.setName("科德集团");
|
|
|
deps=organizationManagementMapper.selectBysuperName("科德集团");
|
|
deps=organizationManagementMapper.selectBysuperName("科德集团");
|
|
@@ -379,8 +384,9 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
|
|
|
acb.setName(oo.getName());
|
|
acb.setName(oo.getName());
|
|
|
acb.setId(depId);
|
|
acb.setId(depId);
|
|
|
deps=organizationManagementMapper.selectBysuperId(oo.getId());
|
|
deps=organizationManagementMapper.selectBysuperId(oo.getId());
|
|
|
|
|
+ depIds =departmentService.selectSubDeps(depId);
|
|
|
}
|
|
}
|
|
|
- List<AdminCustomerBo> list =organizationManagementMapper.AlldepCount(startTime, endTime);
|
|
|
|
|
|
|
+ List<AdminCustomerBo> list =organizationManagementMapper.AlldepCount(depIds,startTime, endTime);
|
|
|
for (AdminCustomerBo ad : list) {
|
|
for (AdminCustomerBo ad : list) {
|
|
|
if (acb.getId().equals(ad.getDepId())){
|
|
if (acb.getId().equals(ad.getDepId())){
|
|
|
acb.getaList().add(ad);
|
|
acb.getaList().add(ad);
|