|
@@ -188,9 +188,16 @@ public class MaterialStareServiceImpl implements MaterialStareService {
|
|
public Result kuaiShouOperateDateTotal(String mediaType, String startTime, String endTime, String userId) {
|
|
public Result kuaiShouOperateDateTotal(String mediaType, String startTime, String endTime, String userId) {
|
|
Map resultMap = new HashMap();
|
|
Map resultMap = new HashMap();
|
|
DecimalFormat decimalFormat = new DecimalFormat("0.00%");
|
|
DecimalFormat decimalFormat = new DecimalFormat("0.00%");
|
|
|
|
+ //查询用户所属公司
|
|
|
|
+ String companyId = materialStareMapper.getUserCompanyByUserId(userId);
|
|
|
|
+ Set<String> operatorUserIds = null;
|
|
try {
|
|
try {
|
|
//查询当前人员所有下级
|
|
//查询当前人员所有下级
|
|
- Set<String> operatorUserIds = getAffiliateId(userId);
|
|
|
|
|
|
+ operatorUserIds= getAffiliateId(userId);
|
|
|
|
+
|
|
|
|
+ //有消耗的账户
|
|
|
|
+ operatorUserIds = materialStareMapper.getKuaiShouAllOperators(companyId,DateUtils.getDateInteger(startTime).longValue(),DateUtils.getDateInteger(endTime).longValue(),operatorUserIds);
|
|
|
|
+
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
// ==>> 20220202
|
|
// ==>> 20220202
|
|
String now = sdf.format(new Date());
|
|
String now = sdf.format(new Date());
|
|
@@ -696,14 +703,17 @@ public class MaterialStareServiceImpl implements MaterialStareService {
|
|
//查询用户角色
|
|
//查询用户角色
|
|
String roleCode = materialStareMapper.getRoleCodeByUserId(userId);
|
|
String roleCode = materialStareMapper.getRoleCodeByUserId(userId);
|
|
//管理员查询公司下所有用户
|
|
//管理员查询公司下所有用户
|
|
- if ("admin".equals(roleCode)) {
|
|
|
|
|
|
+ /* if ("admin".equals(roleCode)) {
|
|
return materialStareMapper.getCompanyAllUserId(companyId);
|
|
return materialStareMapper.getCompanyAllUserId(companyId);
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
Set<String> result;
|
|
Set<String> result;
|
|
//查询当前用户是否存在下级
|
|
//查询当前用户是否存在下级
|
|
Set<String> subordinate = materialStareMapper.getAffiliateId(userId,companyId);
|
|
Set<String> subordinate = materialStareMapper.getAffiliateId(userId,companyId);
|
|
if (subordinate.isEmpty()) {
|
|
if (subordinate.isEmpty()) {
|
|
|
|
+ if ("admin".equals(roleCode)) {
|
|
|
|
+ return materialStareMapper.getCompanyAllUserId(companyId);
|
|
|
|
+ }
|
|
subordinate.add(userId);
|
|
subordinate.add(userId);
|
|
return subordinate;
|
|
return subordinate;
|
|
} else {
|
|
} else {
|