Merge remote-tracking branch 'origin/HS-LaoBaiGan' into HS-LaoBaiGan

dev
Tuzki 2 years ago
commit fba85b3f82
  1. 8
      cjy-project/src/main/java/com/cjy/appointmentteamdata/controller/AppointmentTeamDataController.java
  2. 9
      cjy-project/src/main/java/com/cjy/reservation/service/impl/ReservationRealtimeServiceImpl.java
  3. 26
      cjy-project/src/main/java/com/cjy/reservationdata/controller/AppointmentCenterDataController.java
  4. 5
      cjy-project/src/main/java/com/cjy/reservationdata/service/IAppointmentCenterDataService.java
  5. 27
      cjy-project/src/main/java/com/cjy/reservationdata/service/impl/AppointmentCenterDataServiceImpl.java
  6. 49
      cjy-project/src/main/java/com/cjy/ticketrevenueanalysis/mapper/TicketRevenueAnalysisMapper.java
  7. 116
      cjy-project/src/main/java/com/cjy/ticketrevenueanalysis/service/impl/TicketRevenueAnalysisServiceImpl.java
  8. 1
      cjy-project/src/main/resources/mapper/marketingdata/MarketingWechatMicroblogInfoMapper.xml
  9. 12
      cjy-project/src/main/resources/mapper/reservationAge/AppointmentStatisticsTaskMapper.xml
  10. 4
      cjy-project/src/main/resources/mapper/reservationAge/ReservationHourMapper.xml
  11. 6
      cjy-project/src/main/resources/mapper/reservationAge/ReservationRealtimeMapper.xml
  12. 32
      cjy-project/src/main/resources/mapper/ticketrevenueanalysis/TicketRevenueAnalysisMapper.xml
  13. 6
      cjy-project/src/main/resources/mapper/tour/TourInfoMapper.xml
  14. 8
      ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/WeChatTaskServiceImpl.java

@ -5,6 +5,8 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.cjy.appointmentteamdata.domain.AppointmentPeopleInfo;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -47,7 +49,11 @@ public class AppointmentTeamDataController extends BaseController
{
startPage();
appointmentTeamData.setOrganCode(getUserOrganCode());
appointmentTeamData.setCreateBy(getUserId().toString());
SysUser user = SecurityUtils.getLoginUser().getUser();
if(user.getRoles().stream()
.noneMatch(role -> role.getRoleId() == 1)){
appointmentTeamData.setCreateBy(getUserId().toString());
}
List<AppointmentTeamData> list = appointmentTeamDataService.selectAppointmentTeamDataList(appointmentTeamData);
return getDataTable(list);

@ -4,6 +4,7 @@ import com.cjy.reservation.domain.ReservationRealtime;
import com.cjy.reservation.domain.vo.ReservationRealtimeVO;
import com.cjy.reservation.mapper.ReservationRealtimeMapper;
import com.cjy.reservation.service.IReservationRealtimeService;
import com.cjy.ticketrevenueanalysis.mapper.TicketRevenueAnalysisMapper;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -24,7 +25,8 @@ import java.util.stream.Collectors;
public class ReservationRealtimeServiceImpl implements IReservationRealtimeService {
@Autowired
private ReservationRealtimeMapper reservationRealtimeMapper;
@Autowired
TicketRevenueAnalysisMapper ticketRevenueAnalysisMapper;
/**
* 查询分时预约实时
*
@ -156,7 +158,10 @@ public class ReservationRealtimeServiceImpl implements IReservationRealtimeServi
@Override
public int selectPreBookByOrganCode(Long organCode) {
return reservationRealtimeMapper.selectPreBookByOrganCode(organCode);
int countDate = reservationRealtimeMapper.selectPreBookByOrganCode(organCode);
return countDate;
}
/**

@ -7,6 +7,8 @@ import javax.servlet.http.HttpServletResponse;
import com.cjy.reservation.utils.IDCardUtils;
import com.cjy.reservationdata.domain.vo.SynchronousWriteOffDataVO;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -50,22 +52,23 @@ public class AppointmentCenterDataController extends BaseController
{
startPage();
appointmentCenterData.setOrganCode(getUserOrganCode());
List<AppointmentCenterData> list = appointmentCenterDataService.selectAppointmentCenterDataList(appointmentCenterData);
SysUser user = SecurityUtils.getLoginUser().getUser();
List<AppointmentCenterData> list = appointmentCenterDataService.selectAppointmentCenterDataList(appointmentCenterData,user);
return getDataTable(list);
}
/**
* 导出预约记录列表
*/
@PreAuthorize("@ss.hasPermi('reservationdata:appointmentrecord:export')")
@Log(title = "预约记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, AppointmentCenterData appointmentCenterData)
{
List<AppointmentCenterData> list = appointmentCenterDataService.selectAppointmentCenterDataList(appointmentCenterData);
ExcelUtil<AppointmentCenterData> util = new ExcelUtil<AppointmentCenterData>(AppointmentCenterData.class);
util.exportExcel(response, list, "预约记录数据");
}
// @PreAuthorize("@ss.hasPermi('reservationdata:appointmentrecord:export')")
// @Log(title = "预约记录", businessType = BusinessType.EXPORT)
// @PostMapping("/export")
// public void export(HttpServletResponse response, AppointmentCenterData appointmentCenterData)
// {
// List<AppointmentCenterData> list = appointmentCenterDataService.selectAppointmentCenterDataList(appointmentCenterData);
// ExcelUtil<AppointmentCenterData> util = new ExcelUtil<AppointmentCenterData>(AppointmentCenterData.class);
// util.exportExcel(response, list, "预约记录数据");
// }
/**
* 获取预约记录详细信息
@ -74,7 +77,8 @@ public class AppointmentCenterDataController extends BaseController
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(appointmentCenterDataService.selectAppointmentCenterDataById(id));
SysUser user = SecurityUtils.getLoginUser().getUser();
return success(appointmentCenterDataService.selectAppointmentCenterDataById(id,user));
}
/**

@ -3,6 +3,7 @@ package com.cjy.reservationdata.service;
import java.util.List;
import com.cjy.reservationdata.domain.AppointmentCenterData;
import com.cjy.reservationdata.domain.vo.SynchronousWriteOffDataVO;
import com.ruoyi.common.core.domain.entity.SysUser;
/**
* 预约记录Service接口
@ -18,7 +19,7 @@ public interface IAppointmentCenterDataService
* @param id 预约记录主键
* @return 预约记录
*/
public AppointmentCenterData selectAppointmentCenterDataById(Long id);
public AppointmentCenterData selectAppointmentCenterDataById(Long id,SysUser user);
/**
* 查询预约记录列表
@ -26,7 +27,7 @@ public interface IAppointmentCenterDataService
* @param appointmentCenterData 预约记录
* @return 预约记录集合
*/
public List<AppointmentCenterData> selectAppointmentCenterDataList(AppointmentCenterData appointmentCenterData);
public List<AppointmentCenterData> selectAppointmentCenterDataList(AppointmentCenterData appointmentCenterData, SysUser user);
/**
* 新增预约记录

@ -9,6 +9,7 @@ import com.cjy.media.util.WeiBoEncryption;
import com.cjy.reservation.utils.IDCardUtils;
import com.cjy.reservationdata.domain.vo.SynchronousWriteOffDataVO;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.service.ISysDictDataService;
@ -41,7 +42,7 @@ public class AppointmentCenterDataServiceImpl implements IAppointmentCenterDataS
* @return 预约记录
*/
@Override
public AppointmentCenterData selectAppointmentCenterDataById(Long id) {
public AppointmentCenterData selectAppointmentCenterDataById(Long id,SysUser user) {
AppointmentCenterData appointmentCenterData = appointmentCenterDataMapper.selectAppointmentCenterDataById(id);
if (appointmentCenterData.getCertificateType().equals("5501")) {
@ -49,8 +50,14 @@ public class AppointmentCenterDataServiceImpl implements IAppointmentCenterDataS
appointmentCenterData.setDocumentsNumber(desensitizeIDCard(documentsNumber));
}
if (!appointmentCenterData.getAppointmentPeoplePhone().isEmpty()) {
String phone = WeiBoEncryption.decrypt(appointmentCenterData.getAppointmentPeoplePhone(), rule);
appointmentCenterData.setAppointmentPeoplePhone(desensitizePhoneNumber(phone));
String phone = WeiBoEncryption.decrypt(appointmentCenterData.getAppointmentPeoplePhone(), rule);
if(user.getRoles().stream()
.noneMatch(role -> role.getRoleId() == 1)){
appointmentCenterData.setAppointmentPeoplePhone(desensitizePhoneNumber(phone));
}else {
appointmentCenterData.setAppointmentPeoplePhone(phone);
}
}
return appointmentCenterData;
}
@ -62,7 +69,7 @@ public class AppointmentCenterDataServiceImpl implements IAppointmentCenterDataS
* @return 预约记录
*/
@Override
public List<AppointmentCenterData> selectAppointmentCenterDataList(AppointmentCenterData appointmentCenterData) {
public List<AppointmentCenterData> selectAppointmentCenterDataList(AppointmentCenterData appointmentCenterData, SysUser user) {
if (appointmentCenterData.getCertificateType() !=null) {
if (appointmentCenterData.getCertificateType().equals("5501")) {
String documentsNumber = WeiBoEncryption.encrypt(appointmentCenterData.getDocumentsNumber(), rule);
@ -78,11 +85,19 @@ public class AppointmentCenterDataServiceImpl implements IAppointmentCenterDataS
if (item.getCertificateType().equals("5501")) {
String documentsNumber = WeiBoEncryption.decrypt(item.getDocumentsNumber(), rule);
item.setDocumentsNumber(desensitizeIDCard(documentsNumber));
item.setDocumentsNumber(desensitizeIDCard(documentsNumber));
}
if (!item.getAppointmentPeoplePhone().isEmpty()) {
String phone = WeiBoEncryption.decrypt(item.getAppointmentPeoplePhone(), rule);
item.setAppointmentPeoplePhone(desensitizePhoneNumber(phone));
if(user.getRoles().stream()
.noneMatch(role -> role.getRoleId() == 1)){
item.setAppointmentPeoplePhone(desensitizePhoneNumber(phone));
}else {
item.setAppointmentPeoplePhone(phone);
}
}
});

@ -21,10 +21,59 @@ public interface TicketRevenueAnalysisMapper {
* @return
*/
Map<String,Object> scenicSpotReservationStatistics(@Param("organCode") Long organCode, @Param("scenicSpotId") String scenicSpotId);
/**
* 获取团队数据今日
*/
int scenicSpotReservationStatisticsTeam(@Param("organCode") Long organCode, @Param("scenicSpotId") String scenicSpotId);
/**
* 获取个人预约本周数量
* @param organCode
* @param scenicSpotId
* @return
*/
Map<String,Object> getScenicSpotReservationStatisticsThisWeekData(@Param("organCode") Long organCode, @Param("scenicSpotId") String scenicSpotId);
/**
* 获取团队预约本周数量
* @param organCode
* @param scenicSpotId
* @return
*/
int getScenicSpotReservationStatisticsThisWeekDataTeam(@Param("organCode") Long organCode, @Param("scenicSpotId") String scenicSpotId);
/**
* 获取个人月数据
* @param organCode
* @param scenicSpotId
* @return
*/
Map<String,Object> getScenicSpotReservationStatisticsMonthData(@Param("organCode") Long organCode, @Param("scenicSpotId") String scenicSpotId);
/**
* 获取本月团队数据
* @param organCode
* @param scenicSpotId
* @return
*/
int getScenicSpotReservationStatisticsMonthDataTeam(@Param("organCode") Long organCode, @Param("scenicSpotId") String scenicSpotId);
/**
* 获取本年个人数据
* @param organCode
* @param scenicSpotId
* @return
*/
Map<String,Object> getScenicSpotReservationStatisticsYearData(@Param("organCode") Long organCode, @Param("scenicSpotId") String scenicSpotId);
/**
* 获取本年度团队数据
* @param organCode
* @param scenicSpotId
* @return
*/
int getScenicSpotReservationStatisticsYearDataTeam(@Param("organCode") Long organCode, @Param("scenicSpotId") String scenicSpotId);
/**
* 获取今天数据
* @param organCode

@ -45,7 +45,7 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
HotelPassengerFlowVO hotelPassengerFlowVO = new HotelPassengerFlowVO();
List<HotelPassengerDTO> todayCheckHotelPassengerDTOList = new ArrayList<>();
//获取今日数据
Map<String, Object> dayData = ticketRevenueAnalysisMapper.getTicketThisDayData(organCode,"");
Map<String, Object> dayData = ticketRevenueAnalysisMapper.getTicketThisDayData(organCode, "");
HotelPassengerDTO quantityHotelPassengerDTO = new HotelPassengerDTO();
quantityHotelPassengerDTO.setName("数量");
quantityHotelPassengerDTO.setValue(dayData.get("participationStatistics").toString());
@ -61,7 +61,7 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
otherTitleList.add("收入 (元)");
hotelPassengerFlowVO.setOtherTitle(otherTitleList);
//获取周数据
Map<String, Object> thisWeekData = ticketRevenueAnalysisMapper.getTicketThisWeekData(organCode,"");
Map<String, Object> thisWeekData = ticketRevenueAnalysisMapper.getTicketThisWeekData(organCode, "");
HotelPassengerListDTO thisWeekHotelPassengerListDTO = new HotelPassengerListDTO();
thisWeekHotelPassengerListDTO.setName("本周");
@ -71,7 +71,7 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
thisWeekList.add(thisWeekData.get("participatingStatisticalIncome").toString());
thisWeekHotelPassengerListDTO.setValue(thisWeekList);
//获取月数据
Map<String, Object> thisMonthData = ticketRevenueAnalysisMapper.getTicketThisMonthData(organCode,"");
Map<String, Object> thisMonthData = ticketRevenueAnalysisMapper.getTicketThisMonthData(organCode, "");
HotelPassengerListDTO thisMonthHotelPassengerListDTO = new HotelPassengerListDTO();
thisMonthHotelPassengerListDTO.setName("本月");
@ -80,7 +80,7 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
thisMonthList.add(thisMonthData.get("participatingStatisticalIncome").toString());
thisMonthHotelPassengerListDTO.setValue(thisMonthList);
//获取年数据
Map<String, Object> thisYearData = ticketRevenueAnalysisMapper.getTicketThisYearData(organCode,"");
Map<String, Object> thisYearData = ticketRevenueAnalysisMapper.getTicketThisYearData(organCode, "");
HotelPassengerListDTO thisYearPassengerListDTO = new HotelPassengerListDTO();
thisYearPassengerListDTO.setName("本年");
@ -102,18 +102,19 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
/**
* 通过景区id获取票务信息
*
* @param organCode
* @param scenicSpotId
* @return
*/
@Override
public HotelPassengerFlowVO getTicketSalesStatisticsByScenicSpotId(Long organCode,String scenicSpotId) {
public HotelPassengerFlowVO getTicketSalesStatisticsByScenicSpotId(Long organCode, String scenicSpotId) {
//返回结合
HotelPassengerFlowVO hotelPassengerFlowVO = new HotelPassengerFlowVO();
List<HotelPassengerDTO> todayCheckHotelPassengerDTOList = new ArrayList<>();
//获取今日数据
Map<String, Object> dayData = ticketRevenueAnalysisMapper.getTicketThisDayData(organCode,scenicSpotId);
Map<String, Object> dayData = ticketRevenueAnalysisMapper.getTicketThisDayData(organCode, scenicSpotId);
HotelPassengerDTO quantityHotelPassengerDTO = new HotelPassengerDTO();
quantityHotelPassengerDTO.setName("数量");
quantityHotelPassengerDTO.setValue(dayData.get("participationStatistics").toString());
@ -129,7 +130,7 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
otherTitleList.add("收入 (元)");
hotelPassengerFlowVO.setOtherTitle(otherTitleList);
//获取周数据
Map<String, Object> thisWeekData = ticketRevenueAnalysisMapper.getTicketThisWeekData(organCode,scenicSpotId);
Map<String, Object> thisWeekData = ticketRevenueAnalysisMapper.getTicketThisWeekData(organCode, scenicSpotId);
HotelPassengerListDTO thisWeekHotelPassengerListDTO = new HotelPassengerListDTO();
thisWeekHotelPassengerListDTO.setName("本周");
@ -139,7 +140,7 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
thisWeekList.add(thisWeekData.get("participatingStatisticalIncome").toString());
thisWeekHotelPassengerListDTO.setValue(thisWeekList);
//获取月数据
Map<String, Object> thisMonthData = ticketRevenueAnalysisMapper.getTicketThisMonthData(organCode,scenicSpotId);
Map<String, Object> thisMonthData = ticketRevenueAnalysisMapper.getTicketThisMonthData(organCode, scenicSpotId);
HotelPassengerListDTO thisMonthHotelPassengerListDTO = new HotelPassengerListDTO();
thisMonthHotelPassengerListDTO.setName("本月");
@ -148,7 +149,7 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
thisMonthList.add(thisMonthData.get("participatingStatisticalIncome").toString());
thisMonthHotelPassengerListDTO.setValue(thisMonthList);
//获取年数据
Map<String, Object> thisYearData = ticketRevenueAnalysisMapper.getTicketThisYearData(organCode,scenicSpotId);
Map<String, Object> thisYearData = ticketRevenueAnalysisMapper.getTicketThisYearData(organCode, scenicSpotId);
HotelPassengerListDTO thisYearPassengerListDTO = new HotelPassengerListDTO();
thisYearPassengerListDTO.setName("本年");
@ -167,20 +168,26 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
}
@Override
public HotelPassengerFlowVO scenicSpotReservationStatistics(Long organCode,String scenicSpotId) {
@Override
public HotelPassengerFlowVO scenicSpotReservationStatistics(Long organCode, String scenicSpotId) {
//返回结合
HotelPassengerFlowVO hotelPassengerFlowVO = new HotelPassengerFlowVO();
List<HotelPassengerDTO> todayCheckHotelPassengerDTOList = new ArrayList<>();
//获取今日数据
Map<String, Object> dayData = ticketRevenueAnalysisMapper.scenicSpotReservationStatistics(organCode,scenicSpotId);
Map<String, Object> dayData = ticketRevenueAnalysisMapper.scenicSpotReservationStatistics(organCode, scenicSpotId);
//获取预约日期是今日团队数量
int teamDayCount = ticketRevenueAnalysisMapper.scenicSpotReservationStatisticsTeam(organCode, scenicSpotId);
HotelPassengerDTO quantityHotelPassengerDTO = new HotelPassengerDTO();
quantityHotelPassengerDTO.setName("预约数");
quantityHotelPassengerDTO.setValue(dayData.get("numberReservations").toString());
int numberReservationsCount = teamDayCount + Integer.parseInt(dayData.get("numberReservations").toString());
quantityHotelPassengerDTO.setValue(numberReservationsCount + "");
HotelPassengerDTO incomeHotelPassengerDTO = new HotelPassengerDTO();
incomeHotelPassengerDTO.setName("入园数");
incomeHotelPassengerDTO.setValue(dayData.get("writeOffs").toString());
int writeOffsCount = teamDayCount + Integer.parseInt(dayData.get("writeOffs").toString());
incomeHotelPassengerDTO.setValue(writeOffsCount + "");
todayCheckHotelPassengerDTOList.add(quantityHotelPassengerDTO);
todayCheckHotelPassengerDTOList.add(incomeHotelPassengerDTO);
@ -190,32 +197,45 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
otherTitleList.add("入园(人次)");
hotelPassengerFlowVO.setOtherTitle(otherTitleList);
//获取周数据
Map<String, Object> thisWeekData = ticketRevenueAnalysisMapper.getScenicSpotReservationStatisticsThisWeekData(organCode,scenicSpotId);
Map<String, Object> thisWeekData = ticketRevenueAnalysisMapper.getScenicSpotReservationStatisticsThisWeekData(organCode, scenicSpotId);
HotelPassengerListDTO thisWeekHotelPassengerListDTO = new HotelPassengerListDTO();
thisWeekHotelPassengerListDTO.setName("本周");
List<String> thisWeekList = new ArrayList<>();
thisWeekList.add(thisWeekData.get("numberReservations").toString());
thisWeekList.add(thisWeekData.get("writeOffs").toString());
int teamWeekCount = ticketRevenueAnalysisMapper.getScenicSpotReservationStatisticsThisWeekDataTeam(organCode, scenicSpotId);
int numberReservationsWeek = teamWeekCount + Integer.parseInt(thisWeekData.get("numberReservations").toString());
int writeOffsWeek = teamWeekCount + Integer.parseInt(thisWeekData.get("writeOffs").toString());
thisWeekList.add(numberReservationsWeek + "");
thisWeekList.add(writeOffsWeek + "");
thisWeekHotelPassengerListDTO.setValue(thisWeekList);
//获取月数据
Map<String, Object> thisMonthData = ticketRevenueAnalysisMapper.getScenicSpotReservationStatisticsMonthData(organCode,scenicSpotId);
Map<String, Object> thisMonthData = ticketRevenueAnalysisMapper.getScenicSpotReservationStatisticsMonthData(organCode, scenicSpotId);
HotelPassengerListDTO thisMonthHotelPassengerListDTO = new HotelPassengerListDTO();
thisMonthHotelPassengerListDTO.setName("本月");
List<String> thisMonthList = new ArrayList<>();
thisMonthList.add(thisMonthData.get("numberReservations").toString());
thisMonthList.add(thisMonthData.get("writeOffs").toString());
int teamMonekCount = ticketRevenueAnalysisMapper.getScenicSpotReservationStatisticsMonthDataTeam(organCode, scenicSpotId);
int numberReservationsMont = teamMonekCount + Integer.parseInt(thisMonthData.get("numberReservations").toString());
int writeOffsMont = teamMonekCount + Integer.parseInt(thisMonthData.get("writeOffs").toString());
thisMonthList.add(numberReservationsMont + "");
thisMonthList.add(writeOffsMont + "");
thisMonthHotelPassengerListDTO.setValue(thisMonthList);
//获取年数据
Map<String, Object> thisYearData = ticketRevenueAnalysisMapper.getScenicSpotReservationStatisticsYearData(organCode,scenicSpotId);
Map<String, Object> thisYearData = ticketRevenueAnalysisMapper.getScenicSpotReservationStatisticsYearData(organCode, scenicSpotId);
HotelPassengerListDTO thisYearPassengerListDTO = new HotelPassengerListDTO();
thisYearPassengerListDTO.setName("本年");
List<String> thisYearList = new ArrayList<>();
thisYearList.add(thisYearData.get("numberReservations").toString());
thisYearList.add(thisYearData.get("writeOffs").toString());
int teamYearkCount = ticketRevenueAnalysisMapper.getScenicSpotReservationStatisticsYearDataTeam(organCode, scenicSpotId);
int numberReservationsYear = teamYearkCount + Integer.parseInt(thisYearData.get("numberReservations").toString());
int writeOffsMontYear = teamYearkCount + Integer.parseInt(thisYearData.get("writeOffs").toString());
thisYearList.add(numberReservationsYear + "");
thisYearList.add(writeOffsMontYear + "");
thisYearPassengerListDTO.setValue(thisYearList);
List<HotelPassengerListDTO> hotelPassengerList = new ArrayList<>();
@ -291,6 +311,7 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
/**
* 分时段门票收入走势
*
* @param organCode
* @return
*/
@ -351,6 +372,7 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
/**
* 售票数量分析
*
* @param organCode
* @return
*/
@ -366,7 +388,7 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
List<TrafficAnalysisDTO> list = ticketRevenueAnalysisMapper.getTicketSalesDataAnalysisList(organCode);
List<TrafficAnalysisDTO> seriesData = new ArrayList<>();
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd");
DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd");
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
dateList.stream().forEach(item1 -> {
if (list.isEmpty()) {
@ -443,6 +465,7 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
/**
* 门票收入分析
*
* @param organCode
* @return
*/
@ -458,7 +481,7 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
List<TrafficAnalysisDTO> list = ticketRevenueAnalysisMapper.getTicketRevenueAnalysisList(organCode);
List<TrafficAnalysisDTO> seriesData = new ArrayList<>();
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd");
DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd");
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
dateList.stream().forEach(item1 -> {
if (list.isEmpty()) {
@ -535,65 +558,69 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
/**
* 支付方式分析
*
* @param organCode
* @return
*/
@Override
public ReturnVO getPaymentMethodAnalysis(Long organCode) {
ReturnVO returnVO =new ReturnVO();
ReturnVO returnVO = new ReturnVO();
returnVO.setName("支付方式分析");
List<HotelPassengerDTO> roomTypeList =ticketRevenueAnalysisMapper.getPaymentMethodAnalysisList(organCode);
List<HotelPassengerDTO> roomTypeList = ticketRevenueAnalysisMapper.getPaymentMethodAnalysisList(organCode);
returnVO.setSeriesData(roomTypeList);
return returnVO;
}
/**
* 售票渠道分析
*
* @param organCode
* @return
*/
@Override
public ReturnVO getAnalysisOfTicketingChannels(Long organCode) {
ReturnVO returnVO =new ReturnVO();
ReturnVO returnVO = new ReturnVO();
returnVO.setName("售票渠道分析");
List<HotelPassengerDTO> roomTypeList =ticketRevenueAnalysisMapper.getAnalysisOfTicketingChannelsList(organCode);
List<HotelPassengerDTO> roomTypeList = ticketRevenueAnalysisMapper.getAnalysisOfTicketingChannelsList(organCode);
returnVO.setSeriesData(roomTypeList);
return returnVO;
}
/**
* OTA分销渠道占比渠道商业
*
* @param organCode
* @return
*/
@Override
public ReturnVO getOtaProportionOfDistributionChannels(Long organCode) {
ReturnVO returnVO =new ReturnVO();
ReturnVO returnVO = new ReturnVO();
returnVO.setName("OTA分销渠道占比");
List<HotelPassengerDTO> roomTypeList =ticketRevenueAnalysisMapper.getOtaProportionOfDistributionChannelsList(organCode);
List<HotelPassengerDTO> roomTypeList = ticketRevenueAnalysisMapper.getOtaProportionOfDistributionChannelsList(organCode);
returnVO.setSeriesData(roomTypeList);
return returnVO;
}
/**
* 分析渠道占比
*
* @param organCode
* @return
*/
@Override
public ReturnVO getRoportionOfDistributionChannels(Long organCode) {
ReturnVO returnVO =new ReturnVO();
ReturnVO returnVO = new ReturnVO();
returnVO.setName("售票渠道分析");
List<HotelPassengerDTO> roomTypeList =ticketRevenueAnalysisMapper.getRoportionOfDistributionChannelsList(organCode);
List<HotelPassengerDTO> roomTypeList = ticketRevenueAnalysisMapper.getRoportionOfDistributionChannelsList(organCode);
List<String> categoriesList = new ArrayList<>();
ChartVO countVO = new ChartVO();
countVO.setName("数量");
List<String> countList =new ArrayList<>();
List<String> countList = new ArrayList<>();
ChartVO percentageVo = new ChartVO();
percentageVo.setName("占比");
List<String> percentageList =new ArrayList<>();
roomTypeList.stream().forEach(item ->{
List<String> percentageList = new ArrayList<>();
roomTypeList.stream().forEach(item -> {
categoriesList.add(item.getName());
percentageList.add(item.getPercentage());
countList.add(item.getValue());
@ -610,42 +637,45 @@ public class TicketRevenueAnalysisServiceImpl implements TicketRevenueAnalysisSe
/**
* 游客类型占比
*
* @param organCode
* @return
*/
@Override
public ReturnVO getTouristTypeProportion(Long organCode) {
ReturnVO returnVO =new ReturnVO();
ReturnVO returnVO = new ReturnVO();
returnVO.setName("游客类型占比");
List<HotelPassengerDTO> roomTypeList =ticketRevenueAnalysisMapper.getTouristTypeProportionList(organCode);
List<HotelPassengerDTO> roomTypeList = ticketRevenueAnalysisMapper.getTouristTypeProportionList(organCode);
returnVO.setSeriesData(roomTypeList);
return returnVO;
}
/**
* 销售类型分析
*
* @param organCode
* @return
*/
@Override
public ReturnVO getSalesTypeAnalysis(Long organCode) {
ReturnVO returnVO =new ReturnVO();
ReturnVO returnVO = new ReturnVO();
returnVO.setName("销售类型分析");
List<HotelPassengerDTO> roomTypeList =ticketRevenueAnalysisMapper.getSalesTypeAnalysisList(organCode);
List<HotelPassengerDTO> roomTypeList = ticketRevenueAnalysisMapper.getSalesTypeAnalysisList(organCode);
returnVO.setSeriesData(roomTypeList);
return returnVO;
}
/**
* 业务类型占比
*
* @param organCode
* @return
*/
@Override
public ReturnVO getBusinessTypeProportion(Long organCode) {
ReturnVO returnVO =new ReturnVO();
ReturnVO returnVO = new ReturnVO();
returnVO.setName("售票渠道分析");
List<HotelPassengerDTO> roomTypeList =ticketRevenueAnalysisMapper.getBusinessTypeProportionList(organCode);
List<HotelPassengerDTO> roomTypeList = ticketRevenueAnalysisMapper.getBusinessTypeProportionList(organCode);
returnVO.setSeriesData(roomTypeList);
return returnVO;
}

@ -82,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="organCode != null "> and t1.organ_code = #{organCode}</if>
<if test="type != null and type != ''"> and t1.type = #{type}</if>
</where>
order by t1.create_time desc
</select>
<insert id="insertMarketingWechatMicroblogInfo" parameterType="marketingWechatMicroblogInfoDTO" useGeneratedKeys="true" keyProperty="id">

@ -66,16 +66,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getResourceCodeListTeam" resultType="java.util.Map">
SELECT
IFNULL(t2.resource_code,"") AS resourceCode,
t1.organ_code AS organCode,
t2.organ_code AS organCode,
ifnull(t2.id,'') as resourceId
FROM
appointment_team_data t1
LEFT JOIN b_tour_info t2 on t1.scenic_code = t2.resource_code
where t1.del_flag!=2
GROUP BY
t2.resource_code,
t1.organ_code,
t2.id
b_tour_info t2
where t2.del_flag!=2 and t2.type='scenic'
</select>
<select id="getWriteOffDate" resultType="java.lang.Integer">
SELECT

@ -77,13 +77,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectHourFlowList" resultMap="ResultVOResult">
select t1.hour as name,ifnull( sum(t1.prebook_num),0) as num from r_reservation_hour t1
left join b_tour_info t2 on t1.resource_code = t2.resource_code
where t1.del_flag !='2' and t2.del_flag !='2' and t2.organ_code =#{organCode}
where t1.del_flag !='2' and t2.del_flag !='2' and t2.organ_code =#{organCode} and (t1.hour &gt;=8 and t1.hour &lt;=18)
group by t1.hour
</select>
<select id="selectInToFlowHourList" resultMap="ResultVOResult">
select t1.hour as name,ifnull( sum(t1.into_num),0) as num from r_reservation_hour t1
left join b_tour_info t2 on t1.resource_code = t2.resource_code
where t1.del_flag !='2' and t2.del_flag !='2' and t2.organ_code =#{organCode}
where t1.del_flag !='2' and t2.del_flag !='2' and t2.organ_code =#{organCode} and (t1.hour &gt;=8 and t1.hour &lt;=18)
group by t1.hour
</select>

@ -77,7 +77,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select ifnull(in_num,0)as num from r_reservation_realtime where resource_code=#{resourceCode}
</select>
<select id="selectPreBookByOrganCode" resultType="java.lang.Integer" parameterType="Long">
getGroupAppointmentCount
select ifnull(sum(t1.prebook_num), 0) as prebookNum
from r_reservation_realtime t1
left join b_tour_info t2 on t1.resource_code = t2.resource_code
where t1.del_flag !='2' and t2.del_flag !='2' and t2.organ_code =#{organCode}
</select>
<select id="getGroupAppointmentCount" resultType="java.lang.Long">

@ -318,4 +318,36 @@
where del_flag!='2' and organ_code=#{organCode}
and year (appointment_date) = year (now())
</select>
<select id="scenicSpotReservationStatisticsTeam" resultType="java.lang.Integer">
select count(*)
from appointment_people_info t1
left join appointment_team_data t2 on t1.appointment_form =t2.id
where t2.del_flag!='2' and t2.organ_code=#{organCode} and t1.del_flag!='2'
and to_days(t2.appointment_date) = to_days(now())
</select>
<select id="getScenicSpotReservationStatisticsThisWeekDataTeam" resultType="java.lang.Integer">
select count(*)
from appointment_people_info t1
left join appointment_team_data t2 on t1.appointment_form =t2.id
where t2.del_flag!='2' and t2.organ_code=#{organCode} and t1.del_flag!='2'
and year (t2.appointment_date) = year (now())
and week(t2.appointment_date
, 1) = week(now()
, 1)
</select>
<select id="getScenicSpotReservationStatisticsMonthDataTeam" resultType="java.lang.Integer">
select count(*)
from appointment_people_info t1
left join appointment_team_data t2 on t1.appointment_form =t2.id
where t2.del_flag!='2' and t2.organ_code=#{organCode} and t1.del_flag!='2'
and year (t2.appointment_date) = year (now())
and month (t2.appointment_date) = month (now())
</select>
<select id="getScenicSpotReservationStatisticsYearDataTeam" resultType="java.lang.Integer">
select count(*)
from appointment_people_info t1
left join appointment_team_data t2 on t1.appointment_form =t2.id
where t2.del_flag!='2' and t2.organ_code=#{organCode} and t1.del_flag!='2'
and year (t2.appointment_date) = year (now())
</select>
</mapper>

@ -546,7 +546,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectScenicFlow" resultType="java.util.Map">
SELECT
SUM( t1.max_load ) maxLoad,
(select ifnull( sum(t2.current_num),0) from flow_current_scenic t2 ) as intoFlow
( select
ifnull(sum(case WHEN state = 1 then 1 else 0 end), 0) as writeOffs
from appointment_center_data
where del_flag!='2' and organ_code=#{organCode}
and to_days(appointment_date) = to_days(now())) as intoFlow
FROM
b_tour_info t1
WHERE

@ -119,7 +119,13 @@ public class WeChatTaskServiceImpl implements WeChatTaskService {
for (int i = 0; i < GetArticleSummaryList.size(); i++) {
String index = (Integer.parseInt(GetArticleSummaryList.get(i).getMsgid().split("_")[1]) - 1) + "";
JSONObject returnGetUserRead = WeChatUtils.getCommentData(accessToken, GetArticleSummaryList.get(i).getMsgid(), index);
commentCout += Integer.parseInt(returnGetUserRead.get("comment_cnt").toString());
System.out.println(returnGetUserRead+"--------");
if(returnGetUserRead.get("88000")==null){
commentCout += 0;
}else {
commentCout += Integer.parseInt(returnGetUserRead.get("comment_cnt").toString());
}
}
//转发数量
forwardCount = GetArticleSummaryList.stream().mapToInt(GetArticleSummaryDTO::getShareCount).sum();

Loading…
Cancel
Save