| | |
| | | package com.matrix.system.hive.statistics; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | |
| | | import com.matrix.core.tools.excl.ExcelVersion; |
| | | import com.matrix.system.common.bean.CustomerDataDictionary; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.CustomerDataDictionaryDao; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | |
| | | public @ResponseBody |
| | | AjaxResult findSumDailyInfoNew(@RequestBody AchieveNew achieveNew) { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | achieveNew.setShopId(sysUsers.getShopId()); |
| | | } |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, achieveNewService.findSumDailyInfoNew(achieveNew, null), |
| | |
| | | AjaxResult findDailyInfoNew(@RequestBody AchieveNew achieveNew) { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | achieveNew.setCompanyId(sysUsers.getCompanyId()); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | achieveNew.setShopId(sysUsers.getShopId()); |
| | | } |
| | | PaginationVO pageVo = new PaginationVO(); |
| | |
| | | , "服务提成", "人头", "项目个数", "服务时间", "订单类型"}; |
| | | orderSheet.setHeaders(header); |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | queryDto.setShopId(sysUsers.getShopId()); |
| | | } |
| | | queryDto.setCompanyId(sysUsers.getCompanyId()); |
| | | Page<AchieveNewStatisticsVo> page = new Page(1, Long.MAX_VALUE); |
| | | |
| | | if (StrUtil.isNotBlank(queryDto.getBeginTimeStr())) { |
| | | queryDto.setBeginTime(DateUtil.stringToDate(queryDto.getBeginTimeStr(), DateUtil.DATE_FORMAT_MM)); |
| | | } |
| | | |
| | | if (StrUtil.isNotBlank(queryDto.getEndTimeStr())) { |
| | | queryDto.setEndTime(DateUtil.stringToDate(queryDto.getEndTimeStr(), DateUtil.DATE_FORMAT_MM)); |
| | | } |
| | | IPage<AchieveNewStatisticsVo> rows = achieveNewDao.achieveNewStatistics(page,queryDto); |
| | | List<AchieveNewStatisticsVo> dataList = rows.getRecords(); |
| | | List<List<Object>> list = new ArrayList<>(); |
| | |
| | | |
| | | |
| | | orderSheet.setHeaders(header); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | achieveNew.setShopId(sysUsers.getShopId()); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/findDailyBeautyList") |
| | | @ResponseBody |
| | | public AjaxResult findDailyBeautyList(@RequestBody AchieveNew achieveNew) { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | achieveNew.setCompanyId(sysUsers.getCompanyId()); |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | achieveNew.setShopId(sysUsers.getShopId()); |
| | | } |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | |
| | | pageVo.setOffset(achieveNew.getOffset()); |
| | | pageVo.setLimit(achieveNew.getLimit()); |
| | | return AjaxResult.buildSuccessInstance(achieveNewService.findDailyBeautyList(achieveNew, pageVo), achieveNewService.findDailyBeautyListTotal(achieveNew)); |
| | | } |
| | | |
| | | } |
| | | |