|
@@ -70,6 +70,9 @@ public class ManagerSaleValueServiceImpl extends ServiceImpl<ManagerSaleValueMap
|
|
if ("b161b7d9793942f980dbfe8c931cd1b0".equals(userId) || "228c45f913924639bf20c79ce5dadb16".equals(userId)) {
|
|
if ("b161b7d9793942f980dbfe8c931cd1b0".equals(userId) || "228c45f913924639bf20c79ce5dadb16".equals(userId)) {
|
|
//账户集合
|
|
//账户集合
|
|
List<Long> accountIds = baseMapper.getCompanyAccountIds(companyId, mediaId);
|
|
List<Long> accountIds = baseMapper.getCompanyAccountIds(companyId, mediaId);
|
|
|
|
+ if (Check.isNull(accountIds)) {
|
|
|
|
+ return Result.error("未查询到账户!");
|
|
|
|
+ }
|
|
JSONObject data = getManagerData(accountIds, userId, mediaId, companyId);
|
|
JSONObject data = getManagerData(accountIds, userId, mediaId, companyId);
|
|
data.put("weeklyGoalValue", weekly);
|
|
data.put("weeklyGoalValue", weekly);
|
|
data.put("monthlyGoalValue", monthly);
|
|
data.put("monthlyGoalValue", monthly);
|
|
@@ -93,6 +96,9 @@ public class ManagerSaleValueServiceImpl extends ServiceImpl<ManagerSaleValueMap
|
|
} else if ("CompanyManager".equals(roleCode) || "admin".equals(roleCode)) {
|
|
} else if ("CompanyManager".equals(roleCode) || "admin".equals(roleCode)) {
|
|
//账户集合
|
|
//账户集合
|
|
List<Long> accountIds = baseMapper.getCompanyAccountIds(companyId, mediaId);
|
|
List<Long> accountIds = baseMapper.getCompanyAccountIds(companyId, mediaId);
|
|
|
|
+ if (Check.isNull(accountIds)) {
|
|
|
|
+ return Result.error("未查询到账户!");
|
|
|
|
+ }
|
|
JSONObject data = getManagerData(accountIds, userId, mediaId, companyId);
|
|
JSONObject data = getManagerData(accountIds, userId, mediaId, companyId);
|
|
data.put("weeklyGoalValue", weekly);
|
|
data.put("weeklyGoalValue", weekly);
|
|
data.put("monthlyGoalValue", monthly);
|
|
data.put("monthlyGoalValue", monthly);
|
|
@@ -183,6 +189,10 @@ public class ManagerSaleValueServiceImpl extends ServiceImpl<ManagerSaleValueMap
|
|
String roleCode = baseMapper.getRoleCodeByUserId(userId);
|
|
String roleCode = baseMapper.getRoleCodeByUserId(userId);
|
|
|
|
|
|
List<Long> compayAllAccountIds = baseMapper.getCompanyAccountIds(companyId, mediaId);
|
|
List<Long> compayAllAccountIds = baseMapper.getCompanyAccountIds(companyId, mediaId);
|
|
|
|
+ if (Check.isNull(compayAllAccountIds)) {
|
|
|
|
+ return Result.error("未查询到账户!");
|
|
|
|
+ }
|
|
|
|
+
|
|
JSONObject data = null;
|
|
JSONObject data = null;
|
|
//销售总监
|
|
//销售总监
|
|
if ("saleDirector".equals(roleCode)) {
|
|
if ("saleDirector".equals(roleCode)) {
|
|
@@ -316,6 +326,9 @@ public class ManagerSaleValueServiceImpl extends ServiceImpl<ManagerSaleValueMap
|
|
//丁兆明特殊处理
|
|
//丁兆明特殊处理
|
|
if ("b161b7d9793942f980dbfe8c931cd1b0".equals(userId) || "228c45f913924639bf20c79ce5dadb16".equals(userId)) {
|
|
if ("b161b7d9793942f980dbfe8c931cd1b0".equals(userId) || "228c45f913924639bf20c79ce5dadb16".equals(userId)) {
|
|
List<Long> projectIds = baseMapper.querySalesDirectorProjectIds(companyId, mediaId, null);
|
|
List<Long> projectIds = baseMapper.querySalesDirectorProjectIds(companyId, mediaId, null);
|
|
|
|
+ if(Check.isNull(projectIds)){
|
|
|
|
+ throw new Exception("未查询到项目!");
|
|
|
|
+ }
|
|
if (startTime.equals(endTime)) {
|
|
if (startTime.equals(endTime)) {
|
|
return getProjectDailyCharges(projectIds, mediaId, startTime, null, pageNo, pageSize);
|
|
return getProjectDailyCharges(projectIds, mediaId, startTime, null, pageNo, pageSize);
|
|
} else {
|
|
} else {
|
|
@@ -330,7 +343,7 @@ public class ManagerSaleValueServiceImpl extends ServiceImpl<ManagerSaleValueMap
|
|
//账户集合
|
|
//账户集合
|
|
List<Long> projectIds = baseMapper.querySalesDirectorProjectIds(companyId, mediaId, saleTeaMber);
|
|
List<Long> projectIds = baseMapper.querySalesDirectorProjectIds(companyId, mediaId, saleTeaMber);
|
|
if (Check.isNull(projectIds)) {
|
|
if (Check.isNull(projectIds)) {
|
|
- throw new Exception("未查询到账户!");
|
|
|
|
|
|
+ throw new Exception("未查询到项目!");
|
|
}
|
|
}
|
|
if (startTime.equals(endTime)) {
|
|
if (startTime.equals(endTime)) {
|
|
return getProjectDailyCharges(projectIds, mediaId, startTime, null, pageNo, pageSize);
|
|
return getProjectDailyCharges(projectIds, mediaId, startTime, null, pageNo, pageSize);
|
|
@@ -340,6 +353,9 @@ public class ManagerSaleValueServiceImpl extends ServiceImpl<ManagerSaleValueMap
|
|
//分公司总经理
|
|
//分公司总经理
|
|
} else if ("CompanyManager".equals(roleCode) || "admin".equals(roleCode)) {
|
|
} else if ("CompanyManager".equals(roleCode) || "admin".equals(roleCode)) {
|
|
List<Long> projectIds = baseMapper.querySalesDirectorProjectIds(companyId, mediaId, null);
|
|
List<Long> projectIds = baseMapper.querySalesDirectorProjectIds(companyId, mediaId, null);
|
|
|
|
+ if(Check.isNull(projectIds)){
|
|
|
|
+ throw new Exception("未查询到项目!");
|
|
|
|
+ }
|
|
if (startTime.equals(endTime)) {
|
|
if (startTime.equals(endTime)) {
|
|
return getProjectDailyCharges(projectIds, mediaId, startTime, null, pageNo, pageSize);
|
|
return getProjectDailyCharges(projectIds, mediaId, startTime, null, pageNo, pageSize);
|
|
} else {
|
|
} else {
|