|
@@ -13,10 +13,7 @@ import org.apache.poi.ss.usermodel.Workbook;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.util.DateUtils;
|
|
|
import org.jeecg.ctop.material.constants.Check;
|
|
|
-import org.jeecg.ctop.material.entity.vo.KuaiShouAccountPieVo;
|
|
|
-import org.jeecg.ctop.material.entity.vo.KuaiShouOperateAccountVo;
|
|
|
-import org.jeecg.ctop.material.entity.vo.KuaiShouOperateProjectVo;
|
|
|
-import org.jeecg.ctop.material.entity.vo.KuaiShouOperateVo;
|
|
|
+import org.jeecg.ctop.material.entity.vo.*;
|
|
|
import org.jeecg.ctop.material.mapper.MaterialStareMapper;
|
|
|
import org.jeecg.ctop.material.service.MaterialStareService;
|
|
|
import org.jeecg.ctop.material.utils.FeidNotNullUtils;
|
|
@@ -25,10 +22,13 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.text.DecimalFormat;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.DoubleStream;
|
|
|
+import java.util.stream.IntStream;
|
|
|
|
|
|
/**
|
|
|
* 盯盘接口
|
|
@@ -196,6 +196,9 @@ public class MaterialStareServiceImpl implements MaterialStareService {
|
|
|
//有消耗的账户
|
|
|
operatorUserIds = materialStareMapper.getKuaiShouAllOperators(companyId,DateUtils.getDateInteger(startTime).longValue(),DateUtils.getDateInteger(endTime).longValue(),operatorUserIds);
|
|
|
|
|
|
+ //快手-在投项目数量
|
|
|
+ String projectNum = materialStareMapper.getKuaiShouOperatorProjectNum(DateUtils.getDateInteger(startTime).longValue(),DateUtils.getDateInteger(endTime).longValue(),operatorUserIds);
|
|
|
+
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
|
// ==>> 20220202
|
|
|
String now = sdf.format(new Date());
|
|
@@ -225,6 +228,7 @@ public class MaterialStareServiceImpl implements MaterialStareService {
|
|
|
DecimalFormat df = new DecimalFormat("#.000");
|
|
|
resultMap.put("userAverageAccount",new Double(Math.ceil(userAverageAccount)).intValue());
|
|
|
resultMap.put("userAveragecost",df.format(userAveragecost));
|
|
|
+ resultMap.put("peojectNum",projectNum);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -352,6 +356,8 @@ public class MaterialStareServiceImpl implements MaterialStareService {
|
|
|
public Result getKuaiShouOperateInfo(Integer pageNum, int pageSize, String startTime, String endTime, String userId) {
|
|
|
DecimalFormat decimalFormat = new DecimalFormat("0.00%");
|
|
|
|
|
|
+
|
|
|
+
|
|
|
try {
|
|
|
//查询当前人员所有下级
|
|
|
Set<String> operatorUserIds = getAffiliateId(userId);
|
|
@@ -363,16 +369,29 @@ public class MaterialStareServiceImpl implements MaterialStareService {
|
|
|
long lastTimeStart = Long.valueOf(DateUtils.getDateInteger(lastTime.get("lastTimeStart")));
|
|
|
long lastTimeEnd = Long.valueOf(DateUtils.getDateInteger(lastTime.get("lastTimeEnd")));
|
|
|
|
|
|
+ long now = Long.valueOf(DateUtils.getDateInteger(DateUtils.getDate("yyyy-MM-dd")));
|
|
|
+
|
|
|
PageHelper.startPage(pageNum,pageSize);
|
|
|
//查询运营数据
|
|
|
List<KuaiShouOperateVo> listOperate = materialStareMapper.getKuaiShouOperateInfo(startDate,entDate,operatorUserIds);
|
|
|
for (KuaiShouOperateVo operate : listOperate) {
|
|
|
|
|
|
- //查询 有效 上新计划 上新组
|
|
|
- JSONObject newEffect = materialStareMapper.getKuaiShouAccountBaseByUserId(operate.getUserId(),null,null,startDate,entDate);
|
|
|
- operate.setNewEffectNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newEffectNum"));//有效
|
|
|
- operate.setNewCampaignNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newCampaignNum"));//计划
|
|
|
- operate.setNewUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum"));//组
|
|
|
+ Set<String> ids = new HashSet<String>(){{
|
|
|
+ add(operate.getUserId());
|
|
|
+ }};
|
|
|
+
|
|
|
+ //当天
|
|
|
+ if (startDate == entDate && entDate == now){
|
|
|
+ //查询 当天有效 上新计划 上新组
|
|
|
+ JSONObject newEffect = materialStareMapper.getKuaiShouAccountNowBaseByUserId(ids,null,null,startDate,entDate);
|
|
|
+ operate.setNewUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum"));//组
|
|
|
+ }else {
|
|
|
+ //查询 有效 上新计划 上新组
|
|
|
+ JSONObject newEffect = materialStareMapper.getKuaiShouAccountBaseByUserId(ids,null,null,startDate,entDate);
|
|
|
+ //operate.setNewEffectNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newEffectNum"));//有效
|
|
|
+ operate.setNewCampaignNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newCampaignNum"));//计划
|
|
|
+ operate.setNewUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum"));//组
|
|
|
+ }
|
|
|
|
|
|
Set<String> userSet = new HashSet<String>(){{
|
|
|
add(operate.getUserId());
|
|
@@ -408,15 +427,29 @@ public class MaterialStareServiceImpl implements MaterialStareService {
|
|
|
long lastTimeStart = Long.valueOf(DateUtils.getDateInteger(lastTime.get("lastTimeStart")));
|
|
|
long lastTimeEnd = Long.valueOf(DateUtils.getDateInteger(lastTime.get("lastTimeEnd")));
|
|
|
|
|
|
- //查询运营数据
|
|
|
+ long now = Long.valueOf(DateUtils.getDateInteger(DateUtils.getDate("yyyy-MM-dd")));
|
|
|
+
|
|
|
+ //查询运营数据
|
|
|
List<KuaiShouOperateVo> listOperate = materialStareMapper.getKuaiShouOperateInfo(startDate,entDate,operatorUserIds);
|
|
|
for (KuaiShouOperateVo operate : listOperate) {
|
|
|
|
|
|
- //查询 有效 上新计划 上新组
|
|
|
- JSONObject newEffect = materialStareMapper.getKuaiShouAccountBaseByUserId(operate.getUserId(),null,null,startDate,entDate);
|
|
|
- operate.setNewEffectNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newEffectNum"));//有效
|
|
|
- operate.setNewCampaignNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newCampaignNum"));//计划
|
|
|
- operate.setNewUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum"));//组
|
|
|
+ Set<String> ids = new HashSet<String>(){{
|
|
|
+ add(operate.getUserId());
|
|
|
+ }};
|
|
|
+
|
|
|
+ //当天
|
|
|
+ if (startDate == entDate && entDate == now){
|
|
|
+ //查询 当天有效 上新计划 上新组
|
|
|
+ JSONObject newEffect = materialStareMapper.getKuaiShouAccountNowBaseByUserId(ids,null,null,startDate,entDate);
|
|
|
+ operate.setNewUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum"));//组
|
|
|
+ }else {
|
|
|
+ //查询 有效 上新计划 上新组
|
|
|
+ JSONObject newEffect = materialStareMapper.getKuaiShouAccountBaseByUserId(ids,null,null,startDate,entDate);
|
|
|
+ //operate.setNewEffectNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newEffectNum"));//有效
|
|
|
+ operate.setNewCampaignNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newCampaignNum"));//计划
|
|
|
+ operate.setNewUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum"));//组
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
Set<String> userSet = new HashSet<String>(){{
|
|
|
add(operate.getUserId());
|
|
@@ -491,6 +524,15 @@ public class MaterialStareServiceImpl implements MaterialStareService {
|
|
|
projectInfo.setNewVideoNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newVideoNum"));//上新
|
|
|
projectInfo.setNewHotNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newHotNum"));//爆款
|
|
|
|
|
|
+ projectInfo.setNewUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum"));//基建数
|
|
|
+ projectInfo.setTrustUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("trustUnitNum"));//智能托管
|
|
|
+
|
|
|
+ //查看 上传到助手、媒体的素材数量 分版位花费
|
|
|
+ List<JSONObject> materailUpload = materialStareMapper.getKuaiShouMaterailUploadType(projectInfo.getProjectId(),startDate,entDate);
|
|
|
+
|
|
|
+ projectInfo.setAdspNum(Check.isNull(materailUpload) ? "0" : JSONObject.parseObject(materailUpload.get(0)+"").getString("num"));//上传到助手
|
|
|
+ projectInfo.setMediaNum(Check.isNull(materailUpload) ? "0" : JSONObject.parseObject(materailUpload.get(1)+"").getString("num"));//上传到媒体
|
|
|
+ projectInfo.setAdSceneNum(Check.isNull(materailUpload) ? "0" : JSONObject.parseObject(materailUpload.get(2)+"").getString("num"));//分版位
|
|
|
|
|
|
String projectId = projectInfo.getProjectId();
|
|
|
List<KuaiShouOperateProjectVo> projectYearOnYearInfo = materialStareMapper.getKuaiShouOperateProjectInfo(lastTimeStart,lastTimeEnd,projectId,operatorUserIds);
|
|
@@ -558,6 +600,15 @@ public class MaterialStareServiceImpl implements MaterialStareService {
|
|
|
projectInfo.setNewVideoNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newVideoNum"));//上新
|
|
|
projectInfo.setNewHotNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newHotNum"));//爆款
|
|
|
|
|
|
+ projectInfo.setNewUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum"));//基建数
|
|
|
+ projectInfo.setTrustUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("trustUnitNum"));//智能托管
|
|
|
+
|
|
|
+ //查看 上传到助手、媒体的素材数量 分版位花费
|
|
|
+ List<JSONObject> materailUpload = materialStareMapper.getKuaiShouMaterailUploadType(projectInfo.getProjectId(),startDate,entDate);
|
|
|
+
|
|
|
+ projectInfo.setAdspNum(Check.isNull(materailUpload) ? "0" : JSONObject.parseObject(materailUpload.get(0)+"").getString("num"));//上传到助手
|
|
|
+ projectInfo.setMediaNum(Check.isNull(materailUpload) ? "0" : JSONObject.parseObject(materailUpload.get(1)+"").getString("num"));//上传到媒体
|
|
|
+ projectInfo.setAdSceneNum(Check.isNull(materailUpload) ? "0" : JSONObject.parseObject(materailUpload.get(2)+"").getString("num"));//分版位
|
|
|
|
|
|
String projectId = projectInfo.getProjectId();
|
|
|
List<KuaiShouOperateProjectVo> projectYearOnYearInfo = materialStareMapper.getKuaiShouOperateProjectInfo(lastTimeStart,lastTimeEnd,projectId,operatorUserIds);
|
|
@@ -989,6 +1040,170 @@ public class MaterialStareServiceImpl implements MaterialStareService {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @description: 运营组列表数据
|
|
|
+ *
|
|
|
+ * @param startTime
|
|
|
+ * @param endTime
|
|
|
+ * @param pageNum
|
|
|
+ * @param pageSize
|
|
|
+ * @return: org.jeecg.common.api.vo.Result
|
|
|
+ * @author: zianY
|
|
|
+ * @time: 2022/8/31 15:16
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public Result getOperationGroupData(String startTime,String endTime,Integer pageNum,Integer pageSize) {
|
|
|
+ List<KuaiShouOperateGroupVo> resultList = new ArrayList<>();
|
|
|
+ DecimalFormat decimalFormat = new DecimalFormat("0.00%");
|
|
|
+ try {
|
|
|
+ long startDate = Long.valueOf(DateUtils.getDateInteger(startTime));
|
|
|
+ long entDate = Long.valueOf(DateUtils.getDateInteger(endTime));
|
|
|
+ //计算环比 时间值 上阶段时间 以及 两个日期之间的 间隔天数
|
|
|
+ Map<String,String> lastTime = DateUtils.getStartEndTime(startTime,endTime);
|
|
|
+ long lastTimeStart = Long.valueOf(DateUtils.getDateInteger(lastTime.get("lastTimeStart")));
|
|
|
+ long lastTimeEnd = Long.valueOf(DateUtils.getDateInteger(lastTime.get("lastTimeEnd")));
|
|
|
+ Integer daysBetween = Integer.valueOf(lastTime.get("daysBetween"))+1;
|
|
|
+ PageHelper.startPage(pageNum,pageSize);
|
|
|
+ //查询运营经理
|
|
|
+ List<JSONObject> operationManagerList = materialStareMapper.getOperationManagerUser();
|
|
|
+ for (JSONObject operationManagerUser : operationManagerList) {
|
|
|
+ KuaiShouOperateGroupVo groupVo = new KuaiShouOperateGroupVo();
|
|
|
+ groupVo.setRealname(operationManagerUser.getString("realname"));
|
|
|
+ //下级员工
|
|
|
+ Set<String> operatorUserIds = getAffiliateId(operationManagerUser.getString("userId"));
|
|
|
+ //运营数量
|
|
|
+ int operationNum = Check.isNull(operatorUserIds) ? 0 : operatorUserIds.size();
|
|
|
+ groupVo.setOperationNum(operationNum);
|
|
|
+ //查询账户数据
|
|
|
+ List<KuaiShouOperateVo> listOperate = materialStareMapper.getKuaiShouOperateInfo(startDate,entDate,operatorUserIds);
|
|
|
+ //总花费
|
|
|
+ Double totalCost = Check.isNull(listOperate) ? 0 : listOperate.stream().mapToDouble(KuaiShouOperateVo::getTotalCost).sum();
|
|
|
+ groupVo.setTotalCost(new BigDecimal(totalCost).setScale(3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+
|
|
|
+ //日均消耗 总花费/天数
|
|
|
+ Double aveDay = daysBetween == 0 ? 0 : totalCost/daysBetween;
|
|
|
+ groupVo.setAverageDayCost(new BigDecimal(aveDay).setScale(3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ //人均消耗
|
|
|
+ OptionalDouble avePeople = listOperate.stream().mapToDouble(KuaiShouOperateVo::getTotalCost).average();
|
|
|
+ groupVo.setAveragePeopleCost(Check.isNull(listOperate) ? 0 : new BigDecimal( avePeople.getAsDouble()).setScale(3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+
|
|
|
+ //项目数量
|
|
|
+ Double projectNum = Check.isNull(listOperate) ? 0 : listOperate.stream().mapToDouble(KuaiShouOperateVo::getProjectNum).sum();
|
|
|
+ groupVo.setProjectNum(projectNum.longValue());
|
|
|
+ //账户数量
|
|
|
+ Double accountNum = Check.isNull(listOperate) ? 0 : listOperate.stream().mapToDouble(KuaiShouOperateVo::getAccountNum).sum();
|
|
|
+ groupVo.setAccountNum(accountNum.longValue());
|
|
|
+ //平均账户消耗 总花费/账户数量
|
|
|
+ Double aveAccount = accountNum.intValue() == 0 ? 0 : totalCost/accountNum;
|
|
|
+ groupVo.setAverageAccountCost(new BigDecimal(aveAccount).setScale(3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ //环比 = (当前 - 上阶段 ) / 上阶段
|
|
|
+ List<KuaiShouOperateVo> yearOnYearInfo = materialStareMapper.getKuaiShouOperateInfo(lastTimeStart,lastTimeEnd,operatorUserIds);
|
|
|
+ String yearOnYear = "0";
|
|
|
+ if (!Check.isNull(yearOnYearInfo)){
|
|
|
+ Double lastTotalCost = Check.isNull(yearOnYearInfo) ? 0 : yearOnYearInfo.stream().mapToDouble(KuaiShouOperateVo::getTotalCost).sum();
|
|
|
+ Double yearOnYearD = (totalCost - lastTotalCost) / lastTotalCost;
|
|
|
+ yearOnYear = decimalFormat.format(yearOnYearD);
|
|
|
+ }
|
|
|
+ //花费环比
|
|
|
+ groupVo.setYearOnYearCost(yearOnYear);
|
|
|
+ //查询 上新组
|
|
|
+ JSONObject newEffect = materialStareMapper.getKuaiShouAccountBaseByUserId(operatorUserIds,null,null,startDate,entDate);
|
|
|
+ //基建数量
|
|
|
+ groupVo.setUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum"));//组
|
|
|
+ resultList.add(groupVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ PageInfo<KuaiShouOperateGroupVo> pageInfo = new PageInfo<>(resultList);
|
|
|
+ return Result.successMsg("运营组列表数据查询成功。",pageInfo);
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return Result.errorMsg("哎呀,查询失败了。");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public Result exportOperationGroupData(String startTime,String endTime, HttpServletResponse response) {
|
|
|
+ List<KuaiShouOperateGroupVo> resultList = new ArrayList<>();
|
|
|
+ DecimalFormat decimalFormat = new DecimalFormat("0.00%");
|
|
|
+ try {
|
|
|
+ long startDate = Long.valueOf(DateUtils.getDateInteger(startTime));
|
|
|
+ long entDate = Long.valueOf(DateUtils.getDateInteger(endTime));
|
|
|
+ //计算环比 时间值 上阶段时间 以及 两个日期之间的 间隔天数
|
|
|
+ Map<String,String> lastTime = DateUtils.getStartEndTime(startTime,endTime);
|
|
|
+ long lastTimeStart = Long.valueOf(DateUtils.getDateInteger(lastTime.get("lastTimeStart")));
|
|
|
+ long lastTimeEnd = Long.valueOf(DateUtils.getDateInteger(lastTime.get("lastTimeEnd")));
|
|
|
+ Integer daysBetween = Integer.valueOf(lastTime.get("daysBetween"))+1;
|
|
|
+
|
|
|
+ //查询运营经理
|
|
|
+ List<JSONObject> operationManagerList = materialStareMapper.getOperationManagerUser();
|
|
|
+ for (JSONObject operationManagerUser : operationManagerList) {
|
|
|
+ KuaiShouOperateGroupVo groupVo = new KuaiShouOperateGroupVo();
|
|
|
+ groupVo.setRealname(operationManagerUser.getString("realname"));
|
|
|
+ //下级员工
|
|
|
+ Set<String> operatorUserIds = getAffiliateId(operationManagerUser.getString("userId"));
|
|
|
+ //运营数量
|
|
|
+ int operationNum = Check.isNull(operatorUserIds) ? 0 : operatorUserIds.size();
|
|
|
+ groupVo.setOperationNum(operationNum);
|
|
|
+ //查询账户数据
|
|
|
+ List<KuaiShouOperateVo> listOperate = materialStareMapper.getKuaiShouOperateInfo(startDate,entDate,operatorUserIds);
|
|
|
+ //总花费
|
|
|
+ Double totalCost = Check.isNull(listOperate) ? 0 : listOperate.stream().mapToDouble(KuaiShouOperateVo::getTotalCost).sum();
|
|
|
+ groupVo.setTotalCost(new BigDecimal(totalCost).setScale(3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ //日均消耗 总花费/天数
|
|
|
+ Double aveDay = daysBetween == 0 ? 0 : totalCost/daysBetween;
|
|
|
+ groupVo.setAverageDayCost(new BigDecimal(aveDay).setScale(3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ //人均消耗
|
|
|
+ OptionalDouble avePeople = listOperate.stream().mapToDouble(KuaiShouOperateVo::getTotalCost).average();
|
|
|
+
|
|
|
+ groupVo.setAveragePeopleCost(Check.isNull(listOperate) ? 0 : new BigDecimal(String.valueOf( avePeople.getAsDouble())).setScale(3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ //项目数量
|
|
|
+ Double projectNum = Check.isNull(listOperate) ? 0 : listOperate.stream().mapToDouble(KuaiShouOperateVo::getProjectNum).sum();
|
|
|
+ groupVo.setProjectNum(projectNum.longValue());
|
|
|
+ //账户数量
|
|
|
+ Double accountNum = Check.isNull(listOperate) ? 0 : listOperate.stream().mapToDouble(KuaiShouOperateVo::getAccountNum).sum();
|
|
|
+ groupVo.setAccountNum(accountNum.longValue());
|
|
|
+ //平均账户消耗 总花费/账户数量
|
|
|
+ Double aveAccount = accountNum.intValue() == 0 ? 0 : totalCost/accountNum;
|
|
|
+ groupVo.setAverageAccountCost(new BigDecimal(aveAccount).setScale(3,BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ //环比 = (当前 - 上阶段 ) / 上阶段
|
|
|
+ List<KuaiShouOperateVo> yearOnYearInfo = materialStareMapper.getKuaiShouOperateInfo(lastTimeStart,lastTimeEnd,operatorUserIds);
|
|
|
+ String yearOnYear = "0";
|
|
|
+ if (!Check.isNull(yearOnYearInfo)){
|
|
|
+ Double lastTotalCost = Check.isNull(yearOnYearInfo) ? 0 : yearOnYearInfo.stream().mapToDouble(KuaiShouOperateVo::getTotalCost).sum();
|
|
|
+ Double yearOnYearD = (totalCost - lastTotalCost) / lastTotalCost;
|
|
|
+ yearOnYear = decimalFormat.format(yearOnYearD);
|
|
|
+ }
|
|
|
+ //花费环比
|
|
|
+ groupVo.setYearOnYearCost(yearOnYear);
|
|
|
+ //查询 上新组
|
|
|
+ JSONObject newEffect = materialStareMapper.getKuaiShouAccountBaseByUserId(operatorUserIds,null,null,startDate,entDate);
|
|
|
+ //基建数量
|
|
|
+ groupVo.setUnitNum(Check.isNull(newEffect) ? 0 : newEffect.getInteger("newUnitNum"));//组
|
|
|
+ resultList.add(groupVo);
|
|
|
+ }
|
|
|
+ Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams("运营组数据详情", "运营组数据"), KuaiShouOperateGroupVo.class, resultList);
|
|
|
+ response.setCharacterEncoding("UTF-8");
|
|
|
+ response.setHeader("content-Type", "application/vnd.ms-excel");
|
|
|
+ response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("运营组数据详情.xlsx", "UTF-8"));
|
|
|
+ workbook.write(response.getOutputStream());
|
|
|
+ return null;
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return Result.errorMsg("哎呀,查询失败了。");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//===========================================查询下级员工========================
|
|
|
|
|
|
public Result getCompanyAllSubordinateByUserId(String userId){
|