报表管理
This commit is contained in:
parent
eac723ed1b
commit
05c0d92af7
|
|
@ -3,8 +3,6 @@ package com.bonus.canteen.core.account.controller;
|
|||
import com.bonus.canteen.core.account.domain.AccountTrade;
|
||||
import com.bonus.canteen.core.account.domain.param.AccConsumeDetailQueryParam;
|
||||
import com.bonus.canteen.core.account.service.IAccTradeService;
|
||||
import com.bonus.canteen.core.report.domain.TradeFlowVO;
|
||||
import com.bonus.canteen.core.report.service.TradeReportService;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -32,19 +30,6 @@ public class AccTradeController extends BaseController {
|
|||
@Autowired
|
||||
private IAccTradeService accTradeService;
|
||||
|
||||
@Autowired
|
||||
private TradeReportService tradeReportService;
|
||||
|
||||
@ApiOperation(value = "交易流水")
|
||||
//@RequiresPermissions("health:info:list")
|
||||
@GetMapping("/acct")
|
||||
public TableDataInfo acct(TradeFlowVO param) {
|
||||
startPage();
|
||||
List<TradeFlowVO> list = tradeReportService.selectTradeFlow(param);
|
||||
System.out.println(list.size());
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询账户交易记录列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ package com.bonus.canteen.core.health.controller;
|
|||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.canteen.core.report.domain.TradeFlowVO;
|
||||
import com.bonus.canteen.core.report.service.TradeReportService;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
//import com.bonus.canteen.core.health.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
|
|
@ -12,14 +10,10 @@ import io.swagger.annotations.ApiOperation;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.canteen.core.health.domain.HealthPersonInfo;
|
||||
import com.bonus.canteen.core.health.service.IHealthPersonInfoService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
|
|
@ -40,9 +34,6 @@ public class HealthPersonInfoController extends BaseController {
|
|||
@Autowired
|
||||
private IHealthPersonInfoService healthPersonInfoService;
|
||||
|
||||
@Autowired
|
||||
private TradeReportService tradeReportService;
|
||||
|
||||
/**
|
||||
* 查询人员健康情况列表
|
||||
*/
|
||||
|
|
@ -55,15 +46,6 @@ public class HealthPersonInfoController extends BaseController {
|
|||
List<HealthPersonInfo> list = healthPersonInfoService.selectHealthPersonInfoList(healthPersonInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation(value = "交易流水")
|
||||
//@RequiresPermissions("health:info:list")
|
||||
@GetMapping("/acct")
|
||||
public TableDataInfo acct(TradeFlowVO param) {
|
||||
startPage();
|
||||
List<TradeFlowVO> list = tradeReportService.selectTradeFlow(param);
|
||||
System.out.println(list.size());
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 导出人员健康情况列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import java.util.List;
|
|||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.bonus.canteen.core.report.domain.TradeFlowVO;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.houqin.utils.SM4EncryptUtils;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package com.bonus.canteen.core.report_bak.controller;
|
||||
package com.bonus.canteen.core.report.controller;
|
||||
|
||||
import com.bonus.canteen.core.account.domain.param.AccountInfoQueryParam;
|
||||
import com.bonus.canteen.core.account.domain.vo.AccInfoDetailsVO;
|
||||
import com.bonus.canteen.core.report_bak.domain.*;
|
||||
import com.bonus.canteen.core.report_bak.service.AccReportService;
|
||||
import com.bonus.canteen.core.report.domain.*;
|
||||
import com.bonus.canteen.core.report.service.AccReportService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
package com.bonus.canteen.core.report.controller;
|
||||
|
||||
import com.bonus.canteen.core.health.domain.HealthPersonInfo;
|
||||
import com.bonus.canteen.core.health.service.IHealthPersonInfoService;
|
||||
import com.bonus.canteen.core.report.domain.*;
|
||||
import com.bonus.canteen.core.report.service.TradeReportService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
|
|
@ -9,34 +7,77 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交易报表
|
||||
*
|
||||
* @author jsk
|
||||
* @date 2025-06-06
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/reportTrade")
|
||||
@RequestMapping("/report/trade")
|
||||
public class TradeReportController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private TradeReportService tradeReportService;
|
||||
|
||||
@Autowired
|
||||
private IHealthPersonInfoService healthPersonInfoService;
|
||||
|
||||
@ApiOperation(value = "交易流水")
|
||||
//@RequiresPermissions("report:trade:flow")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TradeFlowVO param) {
|
||||
@ApiOperation("交易流水")
|
||||
@PostMapping("/flow")
|
||||
@ResponseBody
|
||||
public TableDataInfo tradeFlowList(@RequestBody TradeFlowParam param)
|
||||
{
|
||||
startPage();
|
||||
List<TradeFlowVO> list = tradeReportService.selectTradeFlow(param);
|
||||
System.out.println(list.size());
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("营业汇总")
|
||||
@PostMapping("/revenue/operating")
|
||||
@ResponseBody
|
||||
public TableDataInfo selectOperatingRevenue(@RequestBody OperatingRevenueParam param)
|
||||
{
|
||||
startPage();
|
||||
List<OperatingRevenueVO> list = tradeReportService.selectOperatingRevenue(param);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation("食堂档口汇总")
|
||||
@PostMapping("/revenue/canteen")
|
||||
@ResponseBody
|
||||
public TableDataInfo selectCanteenStallRevenue(@RequestBody CanteenStallRevenueParam param)
|
||||
{
|
||||
startPage();
|
||||
List<CanteenStallRevenueVO> list = tradeReportService.selectCanteenStallRevenue(param);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation("设备汇总")
|
||||
@PostMapping("/revenue/device")
|
||||
@ResponseBody
|
||||
public TableDataInfo selectDeviceRevenue(@RequestBody DeviceRevenueParam param)
|
||||
{
|
||||
startPage();
|
||||
List<DeviceRevenueVO> list = tradeReportService.selectDeviceRevenue(param);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation("个人消费汇总")
|
||||
@PostMapping("/revenue/user")
|
||||
@ResponseBody
|
||||
public TableDataInfo selectUserRevenue(@RequestBody UserRevenueParam param)
|
||||
{
|
||||
startPage();
|
||||
List<UserRevenueVO> list = tradeReportService.selectUserRevenue(param);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation("菜品销售汇总")
|
||||
@PostMapping("/revenue/goods")
|
||||
@ResponseBody
|
||||
public TableDataInfo selectGoodsRevenue(@RequestBody GoodsRevenueParam param)
|
||||
{
|
||||
startPage();
|
||||
List<GoodsRevenueVO> list = tradeReportService.selectGoodsRevenue(param);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,17 +1,13 @@
|
|||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class TradeFlowVO extends BaseEntity {
|
||||
public class TradeFlowVO implements Serializable {
|
||||
private Long userId;
|
||||
private String userName;
|
||||
private Integer userType;
|
||||
|
|
@ -28,12 +24,4 @@ public class TradeFlowVO extends BaseEntity {
|
|||
private String createBy;
|
||||
private BigDecimal income;
|
||||
private BigDecimal outcome;
|
||||
|
||||
private String searchValue;
|
||||
private List<Long> deptIdList;
|
||||
@ApiModelProperty("开始时间")
|
||||
private String startDateTime;
|
||||
@ApiModelProperty("结束时间")
|
||||
private String endDateTime;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
package com.bonus.canteen.core.report.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.canteen.core.report_bak.mapper;
|
||||
package com.bonus.canteen.core.report.mapper;
|
||||
|
||||
import com.bonus.canteen.core.report_bak.domain.*;
|
||||
import com.bonus.canteen.core.report.domain.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -1,10 +1,17 @@
|
|||
package com.bonus.canteen.core.report.mapper;
|
||||
|
||||
import com.bonus.canteen.core.report.domain.TradeFlowVO;
|
||||
import com.bonus.canteen.core.report.domain.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TradeReportMapper {
|
||||
public List<TradeFlowVO> selectTradeFlow(@Param("param") TradeFlowVO param,@Param("encryptedSearchValue") String encryptedSearchValue);
|
||||
public List<TradeFlowVO> selectTradeFlow(@Param("param")TradeFlowParam param,
|
||||
@Param("encryptedSearchValue") String encryptedSearchValue);
|
||||
public List<OperatingRevenueVO> selectOperatingRevenue(@Param("param") OperatingRevenueParam param);
|
||||
public List<CanteenStallRevenueVO> selectCanteenStallRevenue(@Param("param")CanteenStallRevenueParam param);
|
||||
public List<DeviceRevenueVO> selectDeviceRevenue(@Param("param")DeviceRevenueParam param);
|
||||
public List<UserRevenueVO> selectUserRevenue(@Param("param")UserRevenueParam param,
|
||||
@Param("encryptedSearchValue") String encryptedSearchValue);
|
||||
public List<GoodsRevenueVO> selectGoodsRevenue(@Param("param")GoodsRevenueParam param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.bonus.canteen.core.report_bak.service;
|
||||
package com.bonus.canteen.core.report.service;
|
||||
|
||||
import com.bonus.canteen.core.account.domain.param.AccountInfoQueryParam;
|
||||
import com.bonus.canteen.core.account.domain.vo.AccInfoDetailsVO;
|
||||
import com.bonus.canteen.core.report_bak.domain.*;
|
||||
import com.bonus.canteen.core.report.domain.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -1,10 +1,14 @@
|
|||
package com.bonus.canteen.core.report.service;
|
||||
|
||||
|
||||
import com.bonus.canteen.core.report.domain.TradeFlowVO;
|
||||
import com.bonus.canteen.core.report.domain.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TradeReportService {
|
||||
List<TradeFlowVO> selectTradeFlow(TradeFlowVO param);
|
||||
List<TradeFlowVO> selectTradeFlow(TradeFlowParam param);
|
||||
List<OperatingRevenueVO> selectOperatingRevenue(OperatingRevenueParam param);
|
||||
List<CanteenStallRevenueVO> selectCanteenStallRevenue(CanteenStallRevenueParam param);
|
||||
List<DeviceRevenueVO> selectDeviceRevenue(DeviceRevenueParam param);
|
||||
List<UserRevenueVO> selectUserRevenue(UserRevenueParam param);
|
||||
List<GoodsRevenueVO> selectGoodsRevenue(GoodsRevenueParam param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
package com.bonus.canteen.core.report_bak.service.impl;
|
||||
package com.bonus.canteen.core.report.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.canteen.core.account.domain.param.AccountInfoQueryParam;
|
||||
import com.bonus.canteen.core.account.domain.vo.AccInfoDetailsVO;
|
||||
import com.bonus.canteen.core.account.service.IAccInfoService;
|
||||
import com.bonus.canteen.core.report_bak.domain.*;
|
||||
import com.bonus.canteen.core.report_bak.mapper.AccReportMapper;
|
||||
import com.bonus.canteen.core.report_bak.service.AccReportService;
|
||||
import com.bonus.canteen.core.report.domain.*;
|
||||
import com.bonus.canteen.core.report.mapper.AccReportMapper;
|
||||
import com.bonus.canteen.core.report.service.AccReportService;
|
||||
import com.bonus.common.houqin.utils.SM4EncryptUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.canteen.core.report.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.canteen.core.report.domain.TradeFlowVO;
|
||||
import com.bonus.canteen.core.report.domain.*;
|
||||
import com.bonus.canteen.core.report.mapper.TradeReportMapper;
|
||||
import com.bonus.canteen.core.report.service.TradeReportService;
|
||||
import com.bonus.common.houqin.utils.SM4EncryptUtils;
|
||||
|
|
@ -16,9 +16,9 @@ public class TradeReportServiceImpl implements TradeReportService {
|
|||
TradeReportMapper tradeReportMapper;
|
||||
|
||||
@Override
|
||||
public List<TradeFlowVO> selectTradeFlow(TradeFlowVO param) {
|
||||
public List<TradeFlowVO> selectTradeFlow(TradeFlowParam param) {
|
||||
String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(param.getSearchValue());
|
||||
List<TradeFlowVO> tradeFlowVOList = tradeReportMapper.selectTradeFlow(param,encryptedSearchValue);
|
||||
List<TradeFlowVO> tradeFlowVOList = tradeReportMapper.selectTradeFlow(param, encryptedSearchValue);
|
||||
if(CollUtil.isNotEmpty(tradeFlowVOList)) {
|
||||
for(TradeFlowVO vo : tradeFlowVOList) {
|
||||
vo.setPhonenumber(SM4EncryptUtils.sm4Decrypt(vo.getPhonenumber()));
|
||||
|
|
@ -26,4 +26,29 @@ public class TradeReportServiceImpl implements TradeReportService {
|
|||
}
|
||||
return tradeFlowVOList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OperatingRevenueVO> selectOperatingRevenue(OperatingRevenueParam param) {
|
||||
return tradeReportMapper.selectOperatingRevenue(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CanteenStallRevenueVO> selectCanteenStallRevenue(CanteenStallRevenueParam param) {
|
||||
return tradeReportMapper.selectCanteenStallRevenue(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeviceRevenueVO> selectDeviceRevenue(DeviceRevenueParam param) {
|
||||
return tradeReportMapper.selectDeviceRevenue(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserRevenueVO> selectUserRevenue(UserRevenueParam param) {
|
||||
return tradeReportMapper.selectUserRevenue(param, SM4EncryptUtils.sm4Encrypt(param.getSearchValue()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsRevenueVO> selectGoodsRevenue(GoodsRevenueParam param) {
|
||||
return tradeReportMapper.selectGoodsRevenue(param);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,83 +0,0 @@
|
|||
package com.bonus.canteen.core.report_bak.controller;
|
||||
|
||||
import com.bonus.canteen.core.report_bak.domain.*;
|
||||
import com.bonus.canteen.core.report_bak.service.TradeReportService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 交易报表
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-14
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/report/trade")
|
||||
public class TradeReportController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private TradeReportService tradeReportService;
|
||||
@ApiOperation("交易流水")
|
||||
@PostMapping("/flow")
|
||||
@ResponseBody
|
||||
public TableDataInfo tradeFlowList(@RequestBody TradeFlowParam param)
|
||||
{
|
||||
startPage();
|
||||
List<TradeFlowVO> list = tradeReportService.selectTradeFlow(param);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation("营业汇总")
|
||||
@PostMapping("/revenue/operating")
|
||||
@ResponseBody
|
||||
public TableDataInfo selectOperatingRevenue(@RequestBody OperatingRevenueParam param)
|
||||
{
|
||||
startPage();
|
||||
List<OperatingRevenueVO> list = tradeReportService.selectOperatingRevenue(param);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation("食堂档口汇总")
|
||||
@PostMapping("/revenue/canteen")
|
||||
@ResponseBody
|
||||
public TableDataInfo selectCanteenStallRevenue(@RequestBody CanteenStallRevenueParam param)
|
||||
{
|
||||
startPage();
|
||||
List<CanteenStallRevenueVO> list = tradeReportService.selectCanteenStallRevenue(param);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation("设备汇总")
|
||||
@PostMapping("/revenue/device")
|
||||
@ResponseBody
|
||||
public TableDataInfo selectDeviceRevenue(@RequestBody DeviceRevenueParam param)
|
||||
{
|
||||
startPage();
|
||||
List<DeviceRevenueVO> list = tradeReportService.selectDeviceRevenue(param);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation("个人消费汇总")
|
||||
@PostMapping("/revenue/user")
|
||||
@ResponseBody
|
||||
public TableDataInfo selectUserRevenue(@RequestBody UserRevenueParam param)
|
||||
{
|
||||
startPage();
|
||||
List<UserRevenueVO> list = tradeReportService.selectUserRevenue(param);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation("菜品销售汇总")
|
||||
@PostMapping("/revenue/goods")
|
||||
@ResponseBody
|
||||
public TableDataInfo selectGoodsRevenue(@RequestBody GoodsRevenueParam param)
|
||||
{
|
||||
startPage();
|
||||
List<GoodsRevenueVO> list = tradeReportService.selectGoodsRevenue(param);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
package com.bonus.canteen.core.report_bak.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class TradeFlowVO implements Serializable {
|
||||
private Long userId;
|
||||
private String userName;
|
||||
private Integer userType;
|
||||
private String phonenumber;
|
||||
private Long deptId;
|
||||
private String deptName;
|
||||
private String deptFullName;
|
||||
private BigDecimal accountAllBal;
|
||||
private LocalDateTime tradeTime;
|
||||
private Integer tradeType;
|
||||
private Integer payType;
|
||||
private String machineSn;
|
||||
private String deviceName;
|
||||
private String createBy;
|
||||
private BigDecimal income;
|
||||
private BigDecimal outcome;
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
package com.bonus.canteen.core.report_bak.mapper;
|
||||
|
||||
import com.bonus.canteen.core.report_bak.domain.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TradeReportMapper {
|
||||
public List<TradeFlowVO> selectTradeFlow(@Param("param")TradeFlowParam param,
|
||||
@Param("encryptedSearchValue") String encryptedSearchValue);
|
||||
public List<OperatingRevenueVO> selectOperatingRevenue(@Param("param") OperatingRevenueParam param);
|
||||
public List<CanteenStallRevenueVO> selectCanteenStallRevenue(@Param("param")CanteenStallRevenueParam param);
|
||||
public List<DeviceRevenueVO> selectDeviceRevenue(@Param("param")DeviceRevenueParam param);
|
||||
public List<UserRevenueVO> selectUserRevenue(@Param("param")UserRevenueParam param,
|
||||
@Param("encryptedSearchValue") String encryptedSearchValue);
|
||||
public List<GoodsRevenueVO> selectGoodsRevenue(@Param("param")GoodsRevenueParam param);
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
package com.bonus.canteen.core.report_bak.service;
|
||||
|
||||
import com.bonus.canteen.core.report_bak.domain.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TradeReportService {
|
||||
List<TradeFlowVO> selectTradeFlow(TradeFlowParam param);
|
||||
List<OperatingRevenueVO> selectOperatingRevenue(OperatingRevenueParam param);
|
||||
List<CanteenStallRevenueVO> selectCanteenStallRevenue(CanteenStallRevenueParam param);
|
||||
List<DeviceRevenueVO> selectDeviceRevenue(DeviceRevenueParam param);
|
||||
List<UserRevenueVO> selectUserRevenue(UserRevenueParam param);
|
||||
List<GoodsRevenueVO> selectGoodsRevenue(GoodsRevenueParam param);
|
||||
}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
package com.bonus.canteen.core.report_bak.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.canteen.core.report_bak.domain.*;
|
||||
import com.bonus.canteen.core.report_bak.mapper.TradeReportMapper;
|
||||
import com.bonus.canteen.core.report_bak.service.TradeReportService;
|
||||
import com.bonus.common.houqin.utils.SM4EncryptUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class TradeReportServiceImpl implements TradeReportService {
|
||||
@Resource
|
||||
TradeReportMapper tradeReportMapper;
|
||||
|
||||
@Override
|
||||
public List<TradeFlowVO> selectTradeFlow(TradeFlowParam param) {
|
||||
String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(param.getSearchValue());
|
||||
List<TradeFlowVO> tradeFlowVOList = tradeReportMapper.selectTradeFlow(param, encryptedSearchValue);
|
||||
if(CollUtil.isNotEmpty(tradeFlowVOList)) {
|
||||
for(TradeFlowVO vo : tradeFlowVOList) {
|
||||
vo.setPhonenumber(SM4EncryptUtils.sm4Decrypt(vo.getPhonenumber()));
|
||||
}
|
||||
}
|
||||
return tradeFlowVOList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OperatingRevenueVO> selectOperatingRevenue(OperatingRevenueParam param) {
|
||||
return tradeReportMapper.selectOperatingRevenue(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CanteenStallRevenueVO> selectCanteenStallRevenue(CanteenStallRevenueParam param) {
|
||||
return tradeReportMapper.selectCanteenStallRevenue(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeviceRevenueVO> selectDeviceRevenue(DeviceRevenueParam param) {
|
||||
return tradeReportMapper.selectDeviceRevenue(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserRevenueVO> selectUserRevenue(UserRevenueParam param) {
|
||||
return tradeReportMapper.selectUserRevenue(param, SM4EncryptUtils.sm4Encrypt(param.getSearchValue()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsRevenueVO> selectGoodsRevenue(GoodsRevenueParam param) {
|
||||
return tradeReportMapper.selectGoodsRevenue(param);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.canteen.core.report_bak.mapper.AccReportMapper">
|
||||
<select id="selectRechargeRecord" resultType="com.bonus.canteen.core.report_bak.domain.RechargeRecordVO">
|
||||
<mapper namespace="com.bonus.canteen.core.report.mapper.AccReportMapper">
|
||||
<select id="selectRechargeRecord" resultType="com.bonus.canteen.core.report.domain.RechargeRecordVO">
|
||||
select
|
||||
DATE_FORMAT(atwd.trade_time , '%Y-%m-%d') AS statistic_date,
|
||||
count(IF(atwd.trade_type = 10, 1, NULL)) AS recharge_num,
|
||||
|
|
@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
statistic_date desc
|
||||
</select>
|
||||
|
||||
<select id="selectWithdrawRecord" resultType="com.bonus.canteen.core.report_bak.domain.WithdrawRecordVO">
|
||||
<select id="selectWithdrawRecord" resultType="com.bonus.canteen.core.report.domain.WithdrawRecordVO">
|
||||
select
|
||||
atwd.user_id,
|
||||
su.nick_name,
|
||||
|
|
@ -49,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by user_id
|
||||
</select>
|
||||
|
||||
<select id="selectDeptIncomeOutcome" resultType="com.bonus.canteen.core.report_bak.domain.DeptIncomeOutcomeVO">
|
||||
<select id="selectDeptIncomeOutcome" resultType="com.bonus.canteen.core.report.domain.DeptIncomeOutcomeVO">
|
||||
SELECT
|
||||
c.dept_id,
|
||||
c.dept_name,
|
||||
|
|
@ -126,7 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by c.dept_id
|
||||
</select>
|
||||
|
||||
<select id="selectUserIncomeOutcome" resultType="com.bonus.canteen.core.report_bak.domain.UserIncomeOutcomeVO">
|
||||
<select id="selectUserIncomeOutcome" resultType="com.bonus.canteen.core.report.domain.UserIncomeOutcomeVO">
|
||||
SELECT
|
||||
b.user_id,
|
||||
b.phonenumber,
|
||||
|
|
@ -54,5 +54,342 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
order by at2.trade_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectOperatingRevenue" resultType="com.bonus.canteen.core.report.domain.OperatingRevenueVO">
|
||||
select
|
||||
count(distinct oi.user_id) as user_count,
|
||||
count(oi.order_id) as order_count,
|
||||
sum(oi.payable_amount) as payable_amount ,
|
||||
sum(oi.discounts_amount) as discounts_amount ,
|
||||
sum(oi.real_amount - oi.refund_amount) as real_amount,
|
||||
sum(b.personal_wallet_count) as personal_wallet_count,
|
||||
sum(b.sub_wallet_count) as sub_wallet_count
|
||||
from
|
||||
order_info oi
|
||||
left join sys_user su on
|
||||
oi.user_id = su.user_id
|
||||
left join (
|
||||
select
|
||||
ats.order_no,
|
||||
sum(case when atwd.wallet_type = 1 and ats.trade_type = 110 and ats.pay_state = 3 then
|
||||
ifnull(atwd.amount, 0) ELSE 0 end) -
|
||||
sum(case when atwd.wallet_type = 1 and ats.trade_type = 130 and ats.pay_state = 3 then
|
||||
ifnull(atwd.amount, 0) ELSE 0 end) as personal_wallet_count,
|
||||
sum(case when atwd.wallet_type = 2 and ats.trade_type = 110 and ats.pay_state = 3 then
|
||||
ifnull(atwd.amount, 0) ELSE 0 end) -
|
||||
sum(case when atwd.wallet_type = 2 and ats.trade_type = 130 and ats.pay_state = 3 then
|
||||
ifnull(atwd.amount, 0) ELSE 0 end) as sub_wallet_count
|
||||
from
|
||||
account_trade ats
|
||||
left join account_trade_wallet_detail atwd on
|
||||
ats.trade_id = atwd.trade_id
|
||||
group by
|
||||
ats.order_no) b on
|
||||
oi.order_id = b.order_no
|
||||
where oi.pay_state = 3 and oi.order_state in (1, 2)
|
||||
and oi.pay_time <![CDATA[ >= ]]> #{param.startDateTime}
|
||||
and oi.pay_time <![CDATA[ <= ]]> #{param.endDateTime}
|
||||
<if test="param.deptIdList != null and param.deptIdList.size() > 0">
|
||||
and su.dept_id IN
|
||||
<foreach collection="param.deptIdList" item="deptId" separator="," open="(" close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
<select id="selectCanteenStallRevenue" resultType="com.bonus.canteen.core.report.domain.CanteenStallRevenueVO">
|
||||
select
|
||||
oi.canteen_id,
|
||||
oi.stall_id,
|
||||
CONCAT(ac.canteen_name , '/', ast.stall_name) as canteenAndStallName,
|
||||
count(distinct case when oi.mealtime_type = 1 then
|
||||
oi.user_id else null
|
||||
end) as breakfast_user_count,
|
||||
count(case when oi.mealtime_type = 1 then
|
||||
oi.order_id else null
|
||||
end) as breakfast_order_count,
|
||||
sum(case when oi.mealtime_type = 1 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as breakfast_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 2 then
|
||||
oi.user_id else null
|
||||
end) as lunch_user_count,
|
||||
count(case when oi.mealtime_type = 2 then
|
||||
oi.order_id else null
|
||||
end) as lunch_order_count,
|
||||
sum(case when oi.mealtime_type = 2 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as lunch_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 3 then
|
||||
oi.user_id else null
|
||||
end) as afternoon_tea_user_count,
|
||||
count(case when oi.mealtime_type = 3 then
|
||||
oi.order_id else null
|
||||
end) as afternoon_tea_order_count,
|
||||
sum(case when oi.mealtime_type = 3 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as afternoon_tea_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 4 then
|
||||
oi.user_id else null
|
||||
end) as dinner_user_count,
|
||||
count(case when oi.mealtime_type = 4 then
|
||||
oi.order_id else null
|
||||
end) as dinner_order_count,
|
||||
sum(case when oi.mealtime_type = 4 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as dinner_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 5 then
|
||||
oi.user_id else null
|
||||
end) as midnight_snack_user_count,
|
||||
count(case when oi.mealtime_type = 5 then
|
||||
oi.order_id else null
|
||||
end) as midnight_snack_order_count,
|
||||
sum(case when oi.mealtime_type = 5 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as midnight_snack_consume_count
|
||||
from
|
||||
order_info oi
|
||||
left join sys_user su on
|
||||
oi.user_id = su.user_id
|
||||
left join basic_canteen ac on
|
||||
oi.canteen_id = ac.canteen_id
|
||||
left join basic_stall ast on
|
||||
oi.stall_id = ast.stall_id
|
||||
where oi.pay_state = 3 and oi.order_state in (1, 2)
|
||||
and oi.pay_time <![CDATA[ >= ]]> #{param.startDateTime}
|
||||
and oi.pay_time <![CDATA[ <= ]]> #{param.endDateTime}
|
||||
<if test="param.deptIdList != null and param.deptIdList.size() > 0">
|
||||
and su.dept_id IN
|
||||
<foreach collection="param.deptIdList" item="deptId" separator="," open="(" close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
group by
|
||||
oi.canteen_id,
|
||||
oi.stall_id
|
||||
</select>
|
||||
|
||||
<select id="selectDeviceRevenue" resultType="com.bonus.canteen.core.report.domain.DeviceRevenueVO">
|
||||
select
|
||||
di.device_number,
|
||||
di.device_sn,
|
||||
di.device_name,
|
||||
count(distinct case when oi.mealtime_type = 1 then
|
||||
oi.user_id else null
|
||||
end) as breakfast_user_count,
|
||||
count(case when oi.mealtime_type = 1 then
|
||||
oi.order_id else null
|
||||
end) as breakfast_order_count,
|
||||
sum(case when oi.mealtime_type = 1 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as breakfast_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 2 then
|
||||
oi.user_id else null
|
||||
end) as lunch_user_count,
|
||||
count(case when oi.mealtime_type = 2 then
|
||||
oi.order_id else null
|
||||
end) as lunch_order_count,
|
||||
sum(case when oi.mealtime_type = 2 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as lunch_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 3 then
|
||||
oi.user_id else null
|
||||
end) as afternoon_tea_user_count,
|
||||
count(case when oi.mealtime_type = 3 then
|
||||
oi.order_id else null
|
||||
end) as afternoon_tea_order_count,
|
||||
sum(case when oi.mealtime_type = 3 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as afternoon_tea_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 4 then
|
||||
oi.user_id else null
|
||||
end) as dinner_user_count,
|
||||
count(case when oi.mealtime_type = 4 then
|
||||
oi.order_id else null
|
||||
end) as dinner_order_count,
|
||||
sum(case when oi.mealtime_type = 4 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as dinner_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 5 then
|
||||
oi.user_id else null
|
||||
end) as midnight_snack_user_count,
|
||||
count(case when oi.mealtime_type = 5 then
|
||||
oi.order_id else null
|
||||
end) as midnight_snack_order_count,
|
||||
sum(case when oi.mealtime_type = 5 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as midnight_snack_consume_count
|
||||
from
|
||||
order_info oi
|
||||
left join sys_user su on
|
||||
oi.user_id = su.user_id
|
||||
left join device_info di on
|
||||
oi.device_sn = di.device_sn and oi.device_num = di.device_number
|
||||
where oi.source_type = 20 and oi.pay_state = 3 and oi.order_state in (1, 2)
|
||||
and oi.pay_time <![CDATA[ >= ]]> #{param.startDateTime}
|
||||
and oi.pay_time <![CDATA[ <= ]]> #{param.endDateTime}
|
||||
<if test="param.deptIdList != null and param.deptIdList.size() > 0">
|
||||
and su.dept_id IN
|
||||
<foreach collection="param.deptIdList" item="deptId" separator="," open="(" close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.searchValue != null and param.searchValue != ''">
|
||||
and (
|
||||
di.device_number = #{param.searchValue}
|
||||
or di.device_name like concat('%', #{param.searchValue}, '%')
|
||||
)
|
||||
</if>
|
||||
group by
|
||||
oi.device_sn,
|
||||
oi.device_num
|
||||
</select>
|
||||
|
||||
<select id="selectUserRevenue" resultType="com.bonus.canteen.core.report.domain.UserRevenueVO">
|
||||
select
|
||||
oi.user_id,
|
||||
su.nick_name,
|
||||
sd.dept_full_name,
|
||||
count(distinct case when oi.mealtime_type = 1 then
|
||||
oi.user_id else null
|
||||
end) as breakfast_user_count,
|
||||
count(case when oi.mealtime_type = 1 then
|
||||
oi.order_id else null
|
||||
end) as breakfast_order_count,
|
||||
sum(case when oi.mealtime_type = 1 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as breakfast_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 2 then
|
||||
oi.user_id else null
|
||||
end) as lunch_user_count,
|
||||
count(case when oi.mealtime_type = 2 then
|
||||
oi.order_id else null
|
||||
end) as lunch_order_count,
|
||||
sum(case when oi.mealtime_type = 2 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as lunch_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 3 then
|
||||
oi.user_id else null
|
||||
end) as afternoon_tea_user_count,
|
||||
count(case when oi.mealtime_type = 3 then
|
||||
oi.order_id else null
|
||||
end) as afternoon_tea_order_count,
|
||||
sum(case when oi.mealtime_type = 3 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as afternoon_tea_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 4 then
|
||||
oi.user_id else null
|
||||
end) as dinner_user_count,
|
||||
count(case when oi.mealtime_type = 4 then
|
||||
oi.order_id else null
|
||||
end) as dinner_order_count,
|
||||
sum(case when oi.mealtime_type = 4 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as dinner_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 5 then
|
||||
oi.user_id else null
|
||||
end) as midnight_snack_user_count,
|
||||
count(case when oi.mealtime_type = 5 then
|
||||
oi.order_id else null
|
||||
end) as midnight_snack_order_count,
|
||||
sum(case when oi.mealtime_type = 5 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as midnight_snack_consume_count
|
||||
from
|
||||
order_info oi
|
||||
left join sys_user su on
|
||||
oi.user_id = su.user_id
|
||||
left join sys_dept sd on
|
||||
su.dept_id = sd.dept_id
|
||||
where oi.pay_state = 3 and oi.order_state in (1, 2)
|
||||
and oi.pay_time <![CDATA[ >= ]]> #{param.startDateTime}
|
||||
and oi.pay_time <![CDATA[ <= ]]> #{param.endDateTime}
|
||||
<if test="param.deptIdList != null and param.deptIdList.size() > 0">
|
||||
and su.dept_id IN
|
||||
<foreach collection="param.deptIdList" item="deptId" separator="," open="(" close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.searchValue != null and param.searchValue != ''">
|
||||
and (
|
||||
su.nick_name like CONCAT('%',#{param.searchValue},'%')
|
||||
or su.phonenumber = #{encryptedSearchValue}
|
||||
or su.user_id like concat('%', #{param.searchValue}, '%')
|
||||
)
|
||||
</if>
|
||||
group by
|
||||
oi.user_id
|
||||
</select>
|
||||
|
||||
<select id="selectGoodsRevenue" resultType="com.bonus.canteen.core.report.domain.GoodsRevenueVO">
|
||||
select
|
||||
od.goods_id,
|
||||
od.goods_name,
|
||||
ifnull(mrd.sale_price, 0) as sale_price,
|
||||
sum(case when oi.mealtime_type = 1 then
|
||||
od.quantity else 0
|
||||
end) as breakfast_quantity_count,
|
||||
sum(case when oi.mealtime_type = 1 then
|
||||
od.real_amount - od.refund_amount else 0
|
||||
end) as breakfast_consume_count,
|
||||
sum(case when oi.mealtime_type = 2 then
|
||||
od.quantity else 0
|
||||
end) as lunch_quantity_count,
|
||||
sum(case when oi.mealtime_type = 2 then
|
||||
od.real_amount - od.refund_amount else 0
|
||||
end) as lunch_consume_count,
|
||||
sum(case when oi.mealtime_type = 3 then
|
||||
od.quantity else 0
|
||||
end) as afternoon_tea_quantity_count,
|
||||
sum(case when oi.mealtime_type = 3 then
|
||||
od.real_amount - od.refund_amount else 0
|
||||
end) as afternoon_tea_consume_count,
|
||||
sum(case when oi.mealtime_type = 4 then
|
||||
od.quantity else 0
|
||||
end) as dinner_quantity_count,
|
||||
sum(case when oi.mealtime_type = 4 then
|
||||
od.real_amount - od.refund_amount else 0
|
||||
end) as dinner_consume_count,
|
||||
sum(case when oi.mealtime_type = 5 then
|
||||
od.quantity else 0
|
||||
end) as midnight_snack_quantity_count,
|
||||
sum(case when oi.mealtime_type = 5 then
|
||||
od.real_amount - od.refund_amount else 0
|
||||
end) as midnight_snack_consume_count,
|
||||
sum(case when oi.mealtime_type not in (1, 2, 3, 4, 5) then
|
||||
od.quantity else 0
|
||||
end) as other_quantity_count,
|
||||
sum(case when oi.mealtime_type not in (1, 2, 3, 4, 5) then
|
||||
od.real_amount - od.refund_amount else 0
|
||||
end) as other_consume_count
|
||||
from
|
||||
order_detail od
|
||||
left join order_info oi on
|
||||
oi.order_id = od.order_id
|
||||
left join sys_user su on
|
||||
oi.user_id = su.user_id
|
||||
left join cook_recipe_dishes mrd on
|
||||
od.recipe_detail_id = mrd.recipe_detail_id
|
||||
and od.goods_id = mrd.dishes_id
|
||||
where
|
||||
oi.pay_state = 3
|
||||
and oi.order_state in (1, 2)
|
||||
and oi.pay_time <![CDATA[ >= ]]> #{param.startDateTime}
|
||||
and oi.pay_time <![CDATA[ <= ]]> #{param.endDateTime}
|
||||
<if test="param.deptIdList != null and param.deptIdList.size() > 0">
|
||||
and su.dept_id IN
|
||||
<foreach collection="param.deptIdList" item="deptId" separator="," open="(" close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.orderDetailTypeList != null and param.orderDetailTypeList.size() > 0">
|
||||
and od.detail_type IN
|
||||
<foreach collection="param.orderDetailTypeList" item="detailType" separator="," open="(" close=")">
|
||||
#{detailType}
|
||||
</foreach>
|
||||
</if>
|
||||
group by
|
||||
od.goods_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,395 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.canteen.core.report_bak.mapper.TradeReportMapper">
|
||||
<select id="selectTradeFlow" resultType="com.bonus.canteen.core.report_bak.domain.TradeFlowVO">
|
||||
select
|
||||
su.user_id,
|
||||
su.user_name,
|
||||
su.user_type,
|
||||
su.phonenumber,
|
||||
sd.dept_id,
|
||||
sd.dept_name,
|
||||
sd.dept_full_name,
|
||||
at2.account_all_bal,
|
||||
at2.trade_time,
|
||||
at2.trade_type,
|
||||
at2.pay_type,
|
||||
at2.machine_sn,
|
||||
di.device_name,
|
||||
at2.create_by,
|
||||
IFNULL(CASE
|
||||
WHEN at2.trade_type in (10, 20, 130) then
|
||||
at2.actual_amount
|
||||
end, 0)as income,
|
||||
IFNULL(CASE
|
||||
WHEN at2.trade_type in (30, 100, 110) then
|
||||
at2.actual_amount
|
||||
end, 0) as outcome
|
||||
from
|
||||
account_trade at2
|
||||
left join sys_user su on
|
||||
at2.user_id = su.user_id
|
||||
left join sys_dept sd on
|
||||
su.dept_id = sd.dept_id
|
||||
left join device_info di on
|
||||
at2.machine_sn = di.device_sn
|
||||
where
|
||||
at2.pay_state = 3
|
||||
and at2.trade_time <![CDATA[ >= ]]> #{param.startDateTime}
|
||||
and at2.trade_time <![CDATA[ <= ]]> #{param.endDateTime}
|
||||
<if test="param.deptIdList != null and param.deptIdList.size() > 0">
|
||||
and su.dept_id IN
|
||||
<foreach collection="param.deptIdList" item="deptId" separator="," open="(" close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.searchValue != null and param.searchValue != ''">
|
||||
and (
|
||||
su.nick_name like CONCAT('%',#{param.searchValue},'%')
|
||||
or su.phonenumber = #{encryptedSearchValue}
|
||||
or su.user_id like concat('%', #{param.searchValue}, '%')
|
||||
)
|
||||
</if>
|
||||
order by at2.trade_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectOperatingRevenue" resultType="com.bonus.canteen.core.report_bak.domain.OperatingRevenueVO">
|
||||
select
|
||||
count(distinct oi.user_id) as user_count,
|
||||
count(oi.order_id) as order_count,
|
||||
sum(oi.payable_amount) as payable_amount ,
|
||||
sum(oi.discounts_amount) as discounts_amount ,
|
||||
sum(oi.real_amount - oi.refund_amount) as real_amount,
|
||||
sum(b.personal_wallet_count) as personal_wallet_count,
|
||||
sum(b.sub_wallet_count) as sub_wallet_count
|
||||
from
|
||||
order_info oi
|
||||
left join sys_user su on
|
||||
oi.user_id = su.user_id
|
||||
left join (
|
||||
select
|
||||
ats.order_no,
|
||||
sum(case when atwd.wallet_type = 1 and ats.trade_type = 110 and ats.pay_state = 3 then
|
||||
ifnull(atwd.amount, 0) ELSE 0 end) -
|
||||
sum(case when atwd.wallet_type = 1 and ats.trade_type = 130 and ats.pay_state = 3 then
|
||||
ifnull(atwd.amount, 0) ELSE 0 end) as personal_wallet_count,
|
||||
sum(case when atwd.wallet_type = 2 and ats.trade_type = 110 and ats.pay_state = 3 then
|
||||
ifnull(atwd.amount, 0) ELSE 0 end) -
|
||||
sum(case when atwd.wallet_type = 2 and ats.trade_type = 130 and ats.pay_state = 3 then
|
||||
ifnull(atwd.amount, 0) ELSE 0 end) as sub_wallet_count
|
||||
from
|
||||
account_trade ats
|
||||
left join account_trade_wallet_detail atwd on
|
||||
ats.trade_id = atwd.trade_id
|
||||
group by
|
||||
ats.order_no) b on
|
||||
oi.order_id = b.order_no
|
||||
where oi.pay_state = 3 and oi.order_state in (1, 2)
|
||||
and oi.pay_time <![CDATA[ >= ]]> #{param.startDateTime}
|
||||
and oi.pay_time <![CDATA[ <= ]]> #{param.endDateTime}
|
||||
<if test="param.deptIdList != null and param.deptIdList.size() > 0">
|
||||
and su.dept_id IN
|
||||
<foreach collection="param.deptIdList" item="deptId" separator="," open="(" close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectCanteenStallRevenue" resultType="com.bonus.canteen.core.report_bak.domain.CanteenStallRevenueVO">
|
||||
select
|
||||
oi.canteen_id,
|
||||
oi.stall_id,
|
||||
CONCAT(ac.canteen_name , '/', ast.stall_name) as canteenAndStallName,
|
||||
count(distinct case when oi.mealtime_type = 1 then
|
||||
oi.user_id else null
|
||||
end) as breakfast_user_count,
|
||||
count(case when oi.mealtime_type = 1 then
|
||||
oi.order_id else null
|
||||
end) as breakfast_order_count,
|
||||
sum(case when oi.mealtime_type = 1 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as breakfast_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 2 then
|
||||
oi.user_id else null
|
||||
end) as lunch_user_count,
|
||||
count(case when oi.mealtime_type = 2 then
|
||||
oi.order_id else null
|
||||
end) as lunch_order_count,
|
||||
sum(case when oi.mealtime_type = 2 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as lunch_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 3 then
|
||||
oi.user_id else null
|
||||
end) as afternoon_tea_user_count,
|
||||
count(case when oi.mealtime_type = 3 then
|
||||
oi.order_id else null
|
||||
end) as afternoon_tea_order_count,
|
||||
sum(case when oi.mealtime_type = 3 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as afternoon_tea_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 4 then
|
||||
oi.user_id else null
|
||||
end) as dinner_user_count,
|
||||
count(case when oi.mealtime_type = 4 then
|
||||
oi.order_id else null
|
||||
end) as dinner_order_count,
|
||||
sum(case when oi.mealtime_type = 4 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as dinner_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 5 then
|
||||
oi.user_id else null
|
||||
end) as midnight_snack_user_count,
|
||||
count(case when oi.mealtime_type = 5 then
|
||||
oi.order_id else null
|
||||
end) as midnight_snack_order_count,
|
||||
sum(case when oi.mealtime_type = 5 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as midnight_snack_consume_count
|
||||
from
|
||||
order_info oi
|
||||
left join sys_user su on
|
||||
oi.user_id = su.user_id
|
||||
left join basic_canteen ac on
|
||||
oi.canteen_id = ac.canteen_id
|
||||
left join basic_stall ast on
|
||||
oi.stall_id = ast.stall_id
|
||||
where oi.pay_state = 3 and oi.order_state in (1, 2)
|
||||
and oi.pay_time <![CDATA[ >= ]]> #{param.startDateTime}
|
||||
and oi.pay_time <![CDATA[ <= ]]> #{param.endDateTime}
|
||||
<if test="param.deptIdList != null and param.deptIdList.size() > 0">
|
||||
and su.dept_id IN
|
||||
<foreach collection="param.deptIdList" item="deptId" separator="," open="(" close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
group by
|
||||
oi.canteen_id,
|
||||
oi.stall_id
|
||||
</select>
|
||||
|
||||
<select id="selectDeviceRevenue" resultType="com.bonus.canteen.core.report_bak.domain.DeviceRevenueVO">
|
||||
select
|
||||
di.device_number,
|
||||
di.device_sn,
|
||||
di.device_name,
|
||||
count(distinct case when oi.mealtime_type = 1 then
|
||||
oi.user_id else null
|
||||
end) as breakfast_user_count,
|
||||
count(case when oi.mealtime_type = 1 then
|
||||
oi.order_id else null
|
||||
end) as breakfast_order_count,
|
||||
sum(case when oi.mealtime_type = 1 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as breakfast_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 2 then
|
||||
oi.user_id else null
|
||||
end) as lunch_user_count,
|
||||
count(case when oi.mealtime_type = 2 then
|
||||
oi.order_id else null
|
||||
end) as lunch_order_count,
|
||||
sum(case when oi.mealtime_type = 2 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as lunch_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 3 then
|
||||
oi.user_id else null
|
||||
end) as afternoon_tea_user_count,
|
||||
count(case when oi.mealtime_type = 3 then
|
||||
oi.order_id else null
|
||||
end) as afternoon_tea_order_count,
|
||||
sum(case when oi.mealtime_type = 3 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as afternoon_tea_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 4 then
|
||||
oi.user_id else null
|
||||
end) as dinner_user_count,
|
||||
count(case when oi.mealtime_type = 4 then
|
||||
oi.order_id else null
|
||||
end) as dinner_order_count,
|
||||
sum(case when oi.mealtime_type = 4 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as dinner_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 5 then
|
||||
oi.user_id else null
|
||||
end) as midnight_snack_user_count,
|
||||
count(case when oi.mealtime_type = 5 then
|
||||
oi.order_id else null
|
||||
end) as midnight_snack_order_count,
|
||||
sum(case when oi.mealtime_type = 5 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as midnight_snack_consume_count
|
||||
from
|
||||
order_info oi
|
||||
left join sys_user su on
|
||||
oi.user_id = su.user_id
|
||||
left join device_info di on
|
||||
oi.device_sn = di.device_sn and oi.device_num = di.device_number
|
||||
where oi.source_type = 20 and oi.pay_state = 3 and oi.order_state in (1, 2)
|
||||
and oi.pay_time <![CDATA[ >= ]]> #{param.startDateTime}
|
||||
and oi.pay_time <![CDATA[ <= ]]> #{param.endDateTime}
|
||||
<if test="param.deptIdList != null and param.deptIdList.size() > 0">
|
||||
and su.dept_id IN
|
||||
<foreach collection="param.deptIdList" item="deptId" separator="," open="(" close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.searchValue != null and param.searchValue != ''">
|
||||
and (
|
||||
di.device_number = #{param.searchValue}
|
||||
or di.device_name like concat('%', #{param.searchValue}, '%')
|
||||
)
|
||||
</if>
|
||||
group by
|
||||
oi.device_sn,
|
||||
oi.device_num
|
||||
</select>
|
||||
|
||||
<select id="selectUserRevenue" resultType="com.bonus.canteen.core.report_bak.domain.UserRevenueVO">
|
||||
select
|
||||
oi.user_id,
|
||||
su.nick_name,
|
||||
sd.dept_full_name,
|
||||
count(distinct case when oi.mealtime_type = 1 then
|
||||
oi.user_id else null
|
||||
end) as breakfast_user_count,
|
||||
count(case when oi.mealtime_type = 1 then
|
||||
oi.order_id else null
|
||||
end) as breakfast_order_count,
|
||||
sum(case when oi.mealtime_type = 1 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as breakfast_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 2 then
|
||||
oi.user_id else null
|
||||
end) as lunch_user_count,
|
||||
count(case when oi.mealtime_type = 2 then
|
||||
oi.order_id else null
|
||||
end) as lunch_order_count,
|
||||
sum(case when oi.mealtime_type = 2 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as lunch_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 3 then
|
||||
oi.user_id else null
|
||||
end) as afternoon_tea_user_count,
|
||||
count(case when oi.mealtime_type = 3 then
|
||||
oi.order_id else null
|
||||
end) as afternoon_tea_order_count,
|
||||
sum(case when oi.mealtime_type = 3 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as afternoon_tea_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 4 then
|
||||
oi.user_id else null
|
||||
end) as dinner_user_count,
|
||||
count(case when oi.mealtime_type = 4 then
|
||||
oi.order_id else null
|
||||
end) as dinner_order_count,
|
||||
sum(case when oi.mealtime_type = 4 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as dinner_consume_count,
|
||||
count(distinct case when oi.mealtime_type = 5 then
|
||||
oi.user_id else null
|
||||
end) as midnight_snack_user_count,
|
||||
count(case when oi.mealtime_type = 5 then
|
||||
oi.order_id else null
|
||||
end) as midnight_snack_order_count,
|
||||
sum(case when oi.mealtime_type = 5 then
|
||||
oi.real_amount - oi.refund_amount else 0
|
||||
end) as midnight_snack_consume_count
|
||||
from
|
||||
order_info oi
|
||||
left join sys_user su on
|
||||
oi.user_id = su.user_id
|
||||
left join sys_dept sd on
|
||||
su.dept_id = sd.dept_id
|
||||
where oi.pay_state = 3 and oi.order_state in (1, 2)
|
||||
and oi.pay_time <![CDATA[ >= ]]> #{param.startDateTime}
|
||||
and oi.pay_time <![CDATA[ <= ]]> #{param.endDateTime}
|
||||
<if test="param.deptIdList != null and param.deptIdList.size() > 0">
|
||||
and su.dept_id IN
|
||||
<foreach collection="param.deptIdList" item="deptId" separator="," open="(" close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.searchValue != null and param.searchValue != ''">
|
||||
and (
|
||||
su.nick_name like CONCAT('%',#{param.searchValue},'%')
|
||||
or su.phonenumber = #{encryptedSearchValue}
|
||||
or su.user_id like concat('%', #{param.searchValue}, '%')
|
||||
)
|
||||
</if>
|
||||
group by
|
||||
oi.user_id
|
||||
</select>
|
||||
|
||||
<select id="selectGoodsRevenue" resultType="com.bonus.canteen.core.report_bak.domain.GoodsRevenueVO">
|
||||
select
|
||||
od.goods_id,
|
||||
od.goods_name,
|
||||
ifnull(mrd.sale_price, 0) as sale_price,
|
||||
sum(case when oi.mealtime_type = 1 then
|
||||
od.quantity else 0
|
||||
end) as breakfast_quantity_count,
|
||||
sum(case when oi.mealtime_type = 1 then
|
||||
od.real_amount - od.refund_amount else 0
|
||||
end) as breakfast_consume_count,
|
||||
sum(case when oi.mealtime_type = 2 then
|
||||
od.quantity else 0
|
||||
end) as lunch_quantity_count,
|
||||
sum(case when oi.mealtime_type = 2 then
|
||||
od.real_amount - od.refund_amount else 0
|
||||
end) as lunch_consume_count,
|
||||
sum(case when oi.mealtime_type = 3 then
|
||||
od.quantity else 0
|
||||
end) as afternoon_tea_quantity_count,
|
||||
sum(case when oi.mealtime_type = 3 then
|
||||
od.real_amount - od.refund_amount else 0
|
||||
end) as afternoon_tea_consume_count,
|
||||
sum(case when oi.mealtime_type = 4 then
|
||||
od.quantity else 0
|
||||
end) as dinner_quantity_count,
|
||||
sum(case when oi.mealtime_type = 4 then
|
||||
od.real_amount - od.refund_amount else 0
|
||||
end) as dinner_consume_count,
|
||||
sum(case when oi.mealtime_type = 5 then
|
||||
od.quantity else 0
|
||||
end) as midnight_snack_quantity_count,
|
||||
sum(case when oi.mealtime_type = 5 then
|
||||
od.real_amount - od.refund_amount else 0
|
||||
end) as midnight_snack_consume_count,
|
||||
sum(case when oi.mealtime_type not in (1, 2, 3, 4, 5) then
|
||||
od.quantity else 0
|
||||
end) as other_quantity_count,
|
||||
sum(case when oi.mealtime_type not in (1, 2, 3, 4, 5) then
|
||||
od.real_amount - od.refund_amount else 0
|
||||
end) as other_consume_count
|
||||
from
|
||||
order_detail od
|
||||
left join order_info oi on
|
||||
oi.order_id = od.order_id
|
||||
left join sys_user su on
|
||||
oi.user_id = su.user_id
|
||||
left join cook_recipe_dishes mrd on
|
||||
od.menu_detail_id = mrd.recipe_detail_id
|
||||
and od.goods_id = mrd.dishes_id
|
||||
where
|
||||
oi.pay_state = 3
|
||||
and oi.order_state in (1, 2)
|
||||
and oi.pay_time <![CDATA[ >= ]]> #{param.startDateTime}
|
||||
and oi.pay_time <![CDATA[ <= ]]> #{param.endDateTime}
|
||||
<if test="param.deptIdList != null and param.deptIdList.size() > 0">
|
||||
and su.dept_id IN
|
||||
<foreach collection="param.deptIdList" item="deptId" separator="," open="(" close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.orderDetailTypeList != null and param.orderDetailTypeList.size() > 0">
|
||||
and od.detail_type IN
|
||||
<foreach collection="param.orderDetailTypeList" item="detailType" separator="," open="(" close=")">
|
||||
#{detailType}
|
||||
</foreach>
|
||||
</if>
|
||||
group by
|
||||
od.goods_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue