| | |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | |
| | | @ApiOperation(value = "专项 - 营业收入", notes = "专项 - 营业收入") |
| | | @PostMapping(value = "/findBusinessInCome") |
| | | public AjaxResult findBusinessInCome(@RequestBody StatisticsParamVo statisticsParam) { |
| | | return dataAnalysisCustomerService.getAnalysisResult(statisticsParam, new Caculate<BigDecimal>() { |
| | | @Override |
| | | public Map<String, BigDecimal> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long companyId) { |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, shopId, null); |
| | | } |
| | | }); |
| | | public AjaxResult findBusinessInCome(@RequestBody @Validated StatisticsParamVo statisticsParam) { |
| | | if (statisticsParam.getShopId() != null) { |
| | | return dataAnalysisCustomerService.getAnalysisResult(statisticsParam, new Caculate<BigDecimal>() { |
| | | @Override |
| | | public Map<String, BigDecimal> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long companyId) { |
| | | switch (statisticsParam.getType()) { |
| | | case "1" : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, shopId, null); |
| | | case "2" : |
| | | return tjVipSumDao.selectCashIncome(timeSpaceParam, shopId, null); |
| | | case "3" : |
| | | return tjVipSumDao.selectCardUse(timeSpaceParam, shopId, null); |
| | | case "4" : |
| | | return tjVipSumDao.selectHisConsume(timeSpaceParam, shopId, null); |
| | | case "5" : |
| | | return tjVipSumDao.selectFreeConsume(timeSpaceParam, shopId, null); |
| | | case "6" : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, shopId, null); |
| | | case "7" : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, shopId, null); |
| | | case "8" : |
| | | return tjVipSumDao.selectArrears(timeSpaceParam, shopId, null); |
| | | default : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, shopId, null); |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | return dataAnalysisCustomerService.getCompanyAnalysisResult(statisticsParam, new Caculate<BigDecimal>() { |
| | | @Override |
| | | public Map<String, BigDecimal> exec(List<StatisticsTimeDaoParam> timeSpaceParam, Long shopId, Long companyId) { |
| | | switch (statisticsParam.getType()) { |
| | | case "1" : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, null, companyId); |
| | | case "2" : |
| | | return tjVipSumDao.selectCashIncome(timeSpaceParam, null, companyId); |
| | | case "3" : |
| | | return tjVipSumDao.selectCardUse(timeSpaceParam, null, companyId); |
| | | case "4" : |
| | | return tjVipSumDao.selectHisConsume(timeSpaceParam, null, companyId); |
| | | case "5" : |
| | | return tjVipSumDao.selectFreeConsume(timeSpaceParam, null, companyId); |
| | | case "6" : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, null, companyId); |
| | | case "7" : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, null, companyId); |
| | | case "8" : |
| | | return tjVipSumDao.selectArrears(timeSpaceParam, null, companyId); |
| | | default : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, null, companyId); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |