zhangxin 4 тижнів тому
батько
коміт
e070eb1c96
11 змінених файлів з 378 додано та 6 видалено
  1. 0 2
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/controller/weixin/WechatNotificationController.java
  2. 62 3
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/StatisticsInfoController.java
  3. 4 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/AppOrderMapper.java
  4. 8 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/StatisticsInfoMapper.java
  5. 10 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppOrderMapper.xml
  6. 17 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/StatisticsInfoMapper.xml
  7. 10 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IStatisticsInfoService.java
  8. 135 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/StatisticsInfoServiceImpl.java
  9. 27 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/vo/statistics/FindByShopSumVO.java
  10. 49 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/vo/statistics/FindByStatisticsChartVO.java
  11. 56 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/vo/statistics/FindByStatisticsVO.java

+ 0 - 2
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/controller/weixin/WechatNotificationController.java

@@ -18,7 +18,6 @@ import org.springframework.web.bind.annotation.RestController;
 import javax.validation.Valid;
 import java.util.List;
 @Slf4j
-//@Tag(name = "消息通知测试")
 @RestController
 @RequestMapping("/api/wechat/notification")
 public class WechatNotificationController {
@@ -29,7 +28,6 @@ public class WechatNotificationController {
         this.notificationService = notificationService;
     }
 
-//    @Operation(summary = "消息发送")
     @PostMapping("/send")
     public ResponseEntity<Result<String>> sendNotification(@Valid @RequestBody NotificationRequest request) {
         logger.info("发送请求参数:"+JSONObject.toJSONString(request));

+ 62 - 3
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/StatisticsInfoController.java

@@ -15,14 +15,21 @@ import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.system.app.entity.StatisticsInfo;
 import org.jeecg.modules.system.app.service.IStatisticsInfoService;
+import org.jeecg.modules.system.app.vo.statistics.FindByShopSumVO;
+import org.jeecg.modules.system.app.vo.statistics.FindByStatisticsChartVO;
+import org.jeecg.modules.system.app.vo.statistics.FindByStatisticsVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.Arrays;
- /**
+import java.util.List;
+
+/**
  * @Description: 首页统计表
  * @Author: jeecg-boot
  * @Date:   2025-08-18
@@ -30,7 +37,7 @@ import java.util.Arrays;
  */
 @Tag(name="首页统计表")
 @RestController
-@RequestMapping("/statisticsInfo/statisticsInfo")
+@RequestMapping("/statisticsInfo")
 @Slf4j
 public class StatisticsInfoController extends JeecgController<StatisticsInfo, IStatisticsInfoService> {
 	@Autowired
@@ -59,6 +66,59 @@ public class StatisticsInfoController extends JeecgController<StatisticsInfo, IS
 		IPage<StatisticsInfo> pageList = statisticsInfoService.page(page, queryWrapper);
 		return Result.OK(pageList);
 	}
+
+
+	 /**
+	  * 首页查询
+	  * @return
+	  */
+	 //@AutoLog(value = "首页统计表-分页列表查询")
+	 @Operation(summary="首页统计表-首页查询")
+	 @GetMapping(value = "/findByStatistics")
+	 public Result<FindByStatisticsVO> findByStatistics() {
+		 LocalDateTime today = LocalDateTime.now();
+		 /**获取当天的yyyyMMdd时间格式 int类型*/
+		 int dateAsInt = Integer.parseInt(
+				 today.format(DateTimeFormatter.ofPattern("yyyyMMdd"))
+		 );
+		 LocalDateTime yesterday = today.minusDays(1);
+
+		 int yesterdayNum =  Integer.parseInt(
+				 yesterday.format(DateTimeFormatter.ofPattern("yyyyMMdd"))
+		 );
+		 /**获取当月的yyyyMMdd时间格式 int类型*/
+		 int firstDayInt = Integer.parseInt(today.withDayOfMonth(1).format(DateTimeFormatter.ofPattern("yyyyMMdd")));
+		 LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		 FindByStatisticsVO findByStatisticsVOS =  statisticsInfoService.findByStatistics(loginUser.getOrgCode(),dateAsInt,firstDayInt,yesterdayNum);
+		 return Result.OK(findByStatisticsVOS);
+	 }
+
+	/**
+	 * 首页详情查询
+	 * @return
+	 */
+	//@AutoLog(value = "首页统计表-分页列表查询")
+	@Operation(summary="首页统计表-首页详情查询")
+	@GetMapping(value = "/findByShopMoneyList")
+	public Result<List<FindByStatisticsChartVO>> findByShopMoneyList(@RequestParam("type") Integer type) {
+
+		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		List<FindByStatisticsChartVO> findByStatisticsVOS= statisticsInfoService.findByShopMoneyList(loginUser.getOrgCode(),type);
+		return Result.OK(findByStatisticsVOS);
+	}
+	/**
+	 * 首页售卖商品数详情查询
+	 * @return
+	 */
+	//@AutoLog(value = "首页统计表-分页列表查询")
+	@Operation(summary="首页统计表-首页售卖商品数详情查询")
+	@GetMapping(value = "/findByShopSumList")
+	public Result<List<FindByShopSumVO>> findByShopSumList(@RequestParam("type") Integer type) {
+		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		List<FindByShopSumVO> findByStatisticsVOS= statisticsInfoService.findByShopSumList(loginUser.getOrgCode(),type);
+		return Result.OK(findByStatisticsVOS);
+	}
+
 	
 	/**
 	 *   添加
@@ -72,7 +132,6 @@ public class StatisticsInfoController extends JeecgController<StatisticsInfo, IS
 	@PostMapping(value = "/add")
 	public Result<String> add(@RequestBody StatisticsInfo statisticsInfo) {
 		statisticsInfoService.save(statisticsInfo);
-
 		return Result.OK("添加成功!");
 	}
 	

+ 4 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/AppOrderMapper.java

@@ -12,8 +12,10 @@ import org.jeecg.modules.quartz.vo.JobReservationSiteVo;
 import org.jeecg.modules.system.app.entity.AppOrder;
 import org.jeecg.modules.system.app.form.AppOrderPageForm;
 import org.jeecg.modules.system.app.vo.OrderPageVO;
+import org.jeecg.modules.system.app.vo.statistics.FindByShopSumVO;
 
 import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.util.Date;
 import java.util.List;
@@ -54,4 +56,6 @@ public interface AppOrderMapper extends BaseMapper<AppOrder> {
     List<JobReservationSiteVo> findByReservationSite();
 
     List<JobReservationSiteVo> findByReservationSiteTicket(@Param("currentDate")LocalDate currentDate,@Param("localTime") LocalTime localTime);
+
+    List<FindByShopSumVO> findByShopSumList(@Param("orgCode")String orgCode,@Param("startTime") LocalDateTime startTime,@Param("endTime") LocalDateTime endTime);
 }

+ 8 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/StatisticsInfoMapper.java

@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.jeecg.modules.system.app.entity.StatisticsInfo;
+import org.jeecg.modules.system.app.vo.statistics.FindByStatisticsChartVO;
+
+import java.util.List;
 
 /**
  * @Description: 首页统计表
@@ -17,5 +20,9 @@ public interface StatisticsInfoMapper extends BaseMapper<StatisticsInfo> {
     StatisticsInfo findByOrgCode(@Param("orgCode") String orgCode ,@Param("dateDaily")  Integer dateDaily);
 
     @Select("select * from nm_statistics_info where org_code =#{orgCode} order by  date_daily desc limit 1")
-    StatisticsInfo findByCode(String orgCode);
+    StatisticsInfo findByCode(@Param("orgCode")String orgCode);
+
+    List<FindByStatisticsChartVO> findByOrgCodeAndDay(@Param("orgCode")String orgCode,@Param("dateAsInt") int dateAsInt,@Param("firstDayInt") int firstDayInt);
+
+    List<FindByStatisticsChartVO> findByShopMoneyList(@Param("orgCode")String orgCode,@Param("startTime") int startTime,@Param("endTime")  int endTime);
 }

+ 10 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppOrderMapper.xml

@@ -167,4 +167,14 @@
           AND p.date_of_sale = CURDATE()
           AND p.start_time > CURRENT_TIME();
     </select>
+    <select id="findByShopSumList" resultType="org.jeecg.modules.system.app.vo.statistics.FindByShopSumVO">
+        <![CDATA[
+        SELECT b.product_name AS shop_name, COALESCE(SUM(b.price), 0) AS total_price,
+        COALESCE(COUNT(b.product_id), 0) AS product_count from nm_order a
+        LEFT JOIN nm_order_pro_info b on a.id = b.order_id
+        where b.type in (1,3)  and a.order_status in (1,2,3) and a.org_code like CONCAT('',#{orgCode},'%')  and a.pay_time >=#{startTime} and a.pay_time <=#{endTime}
+        GROUP BY b.product_name
+        order by product_count desc
+        ]]>
+    </select>
 </mapper>

+ 17 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/StatisticsInfoMapper.xml

@@ -2,4 +2,21 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="org.jeecg.modules.system.app.mapper.StatisticsInfoMapper">
 
+    <select id="findByOrgCodeAndDay"
+            resultType="org.jeecg.modules.system.app.vo.statistics.FindByStatisticsChartVO">
+        <![CDATA[select * from nm_statistics_info  where org_code =#{orgCode} and date_daily >=#{firstDayInt} and date_daily <= #{dateAsInt}]]>
+    </select>
+    <select id="findByShopMoneyList"
+            resultType="org.jeecg.modules.system.app.vo.statistics.FindByStatisticsChartVO">
+         <![CDATA[
+        select
+                b.depart_name,
+                sum(sale_money) as saleMoney,
+                a.dept_id from nm_statistics_info a
+         left join  sys_depart b on a.dept_id =b.id
+         where org_code like CONCAT('',#{orgCode},'%')  and  org_code !=#{orgCode} and date_daily >=#{firstDayInt} and date_daily <= #{dateAsInt}
+        group by  a.dept_id
+        order by  saleMoney desc
+         ]]>
+    </select>
 </mapper>

+ 10 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IStatisticsInfoService.java

@@ -4,8 +4,12 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.system.app.entity.ReceiptPaymentDetailsInfo;
 import org.jeecg.modules.system.app.entity.StatisticsInfo;
+import org.jeecg.modules.system.app.vo.statistics.FindByShopSumVO;
+import org.jeecg.modules.system.app.vo.statistics.FindByStatisticsChartVO;
+import org.jeecg.modules.system.app.vo.statistics.FindByStatisticsVO;
 
 import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * @Description: 首页统计表
@@ -18,4 +22,10 @@ public interface IStatisticsInfoService extends IService<StatisticsInfo> {
     Result<String> add(ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo, BigDecimal money);
 
     StatisticsInfo findByCode(String orgCode);
+
+    FindByStatisticsVO findByStatistics(String orgCode, int dateAsInt, int firstDayInt, int yesterdayNum );
+
+    List<FindByStatisticsChartVO> findByShopMoneyList(String orgCode, Integer type);
+
+    List<FindByShopSumVO> findByShopSumList(String orgCode, Integer type);
 }

+ 135 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/StatisticsInfoServiceImpl.java

@@ -6,17 +6,27 @@ import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.modules.system.app.entity.ReceiptPaymentDetailsInfo;
 import org.jeecg.modules.system.app.entity.StatisticsInfo;
 import org.jeecg.modules.system.app.entity.StatisticsInfoHis;
+import org.jeecg.modules.system.app.mapper.AppOrderMapper;
 import org.jeecg.modules.system.app.mapper.StatisticsInfoHisMapper;
 import org.jeecg.modules.system.app.mapper.StatisticsInfoMapper;
 import org.jeecg.modules.system.app.service.IStatisticsInfoService;
+import org.jeecg.modules.system.app.vo.statistics.FindByShopSumVO;
+import org.jeecg.modules.system.app.vo.statistics.FindByStatisticsChartVO;
+import org.jeecg.modules.system.app.vo.statistics.FindByStatisticsVO;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.time.DayOfWeek;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
+import java.time.temporal.TemporalAdjusters;
+import java.util.ArrayList;
 import java.util.Date;
+import java.util.List;
 
 /**
  * @Description: 首页统计表
@@ -33,6 +43,9 @@ public class StatisticsInfoServiceImpl extends ServiceImpl<StatisticsInfoMapper,
     @Autowired
     StatisticsInfoHisMapper statisticsInfoHisMapper;
 
+    @Autowired
+    AppOrderMapper appOrderMapper;
+
     @Override
     public Result<String> add(ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo,BigDecimal money) {
         int dateAsInt = Integer.parseInt(
@@ -73,4 +86,126 @@ public class StatisticsInfoServiceImpl extends ServiceImpl<StatisticsInfoMapper,
     public StatisticsInfo findByCode(String orgCode) {
         return statisticsInfoMapper.findByCode(orgCode);
     }
+
+    @Override
+    public FindByStatisticsVO findByStatistics(String orgCode, int dateAsInt, int firstDayInt,int yesterdayNum ) {
+        StatisticsInfo byOrgCode = statisticsInfoMapper.findByOrgCode(orgCode, dateAsInt);
+        FindByStatisticsVO findByStatisticsVO =new FindByStatisticsVO();
+        List<FindByStatisticsChartVO> findByStatisticsChartVOS = new ArrayList<>();
+        if(byOrgCode!=null){
+            // 定义日期格式(yyyyMMdd)
+            DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
+            BeanUtils.copyProperties(byOrgCode,findByStatisticsVO);
+            findByStatisticsChartVOS = statisticsInfoMapper.findByOrgCodeAndDay(orgCode,dateAsInt,firstDayInt);
+            for (FindByStatisticsChartVO findByStatisticsChartVO : findByStatisticsChartVOS) {
+                Integer dateDaily = findByStatisticsChartVO.getDateDaily();
+                // 解析为 LocalDate
+                LocalDate date = LocalDate.parse(String.valueOf(dateDaily), formatter);
+                findByStatisticsChartVO.setDateDailyDate(date);
+            }
+        }
+        StatisticsInfo byOrgCodeOld = statisticsInfoMapper.findByOrgCode(orgCode, yesterdayNum);
+        getStatisticsInfo(byOrgCode,byOrgCodeOld,findByStatisticsVO);
+        findByStatisticsVO.setFindByStatisticsChartVOList(findByStatisticsChartVOS);
+        return findByStatisticsVO;
+    }
+
+    @Override
+    public List<FindByStatisticsChartVO> findByShopMoneyList(String orgCode,Integer type) {
+        LocalDateTime today = LocalDateTime.now();
+        /**获取当天的yyyyMMdd时间格式 int类型*/
+        int startTime = Integer.parseInt(
+                today.format(DateTimeFormatter.ofPattern("yyyyMMdd"))
+        );
+        /**获取当月的yyyyMMdd时间格式 int类型*/
+        int endTime = Integer.parseInt(today.format(DateTimeFormatter.ofPattern("yyyyMMdd")));//默认当天
+        if (type==1){//今日
+            endTime = Integer.parseInt(today.format(DateTimeFormatter.ofPattern("yyyyMMdd")));
+        } else if (type==2) {//本周
+            endTime = Integer.parseInt(today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)).format(DateTimeFormatter.ofPattern("yyyyMMdd")));
+        }else if (type==3){//本月
+            endTime = Integer.parseInt(today.withDayOfMonth(1).format(DateTimeFormatter.ofPattern("yyyyMMdd")));
+        }
+        return statisticsInfoMapper.findByShopMoneyList(orgCode,startTime,endTime);
+    }
+
+    @Override
+    public List<FindByShopSumVO> findByShopSumList(String orgCode, Integer type) {
+        // 获取当前日期
+        LocalDate today = LocalDate.now();
+        LocalDateTime startTime = today.atStartOfDay();
+        // 1. 明天 00:00:00
+        LocalDateTime endTime = today.plusDays(1).atStartOfDay();
+        if (type==1){
+            // 1. 明天 00:00:00
+            endTime = today.plusDays(1).atStartOfDay();
+        } else if (type==2) {
+            // 2. 本周第一天(周一)00:00:00
+            endTime = today.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY))
+                    .atStartOfDay();
+        } else if (type==3) {
+            // 3. 当月第一天 00:00:00
+            endTime = today.with(TemporalAdjusters.firstDayOfMonth())
+                    .atStartOfDay();
+        }
+        List<FindByShopSumVO> findByShopSumVOS= appOrderMapper.findByShopSumList(orgCode,startTime,endTime);
+        return null;
+    }
+
+    private void getStatisticsInfo(StatisticsInfo statisticsInfoNew ,StatisticsInfo statisticsInfoOld,FindByStatisticsVO findByStatisticsVO){
+        if (statisticsInfoOld!=null){
+            if (statisticsInfoNew==null){
+                findByStatisticsVO.setSaleMoneyChain(getTwoNum(BigDecimal.valueOf(-1)));
+                findByStatisticsVO.setAddNumberChain(getTwoNum(BigDecimal.valueOf(-1)));
+                findByStatisticsVO.setConsumeNumberChain(getTwoNum(BigDecimal.valueOf(-1)));
+                findByStatisticsVO.setEffectiveOrderNumChain(getTwoNum(BigDecimal.valueOf(-1)));
+                findByStatisticsVO.setExpectIncomeMoneyChain(getTwoNum(BigDecimal.valueOf(-1)));
+            }else {
+                findByStatisticsVO.setAddNumberChain(getChain(statisticsInfoNew.getAddNumber(),statisticsInfoOld.getAddNumber()));
+                findByStatisticsVO.setConsumeNumberChain(getChain(statisticsInfoNew.getConsumeNumber(),statisticsInfoOld.getConsumeNumber()));
+                findByStatisticsVO.setSaleMoneyChain(getChain(statisticsInfoNew.getSaleMoney(),statisticsInfoOld.getSaleMoney()));
+                findByStatisticsVO.setEffectiveOrderNumChain(getChain(statisticsInfoNew.getEffectiveOrderNum(),statisticsInfoOld.getEffectiveOrderNum()));
+                findByStatisticsVO.setExpectIncomeMoneyChain(getChain(statisticsInfoNew.getExpectIncomeMoney(),statisticsInfoOld.getExpectIncomeMoney()));
+            }
+        }
+    }
+
+    /**
+     * 保存两位小数
+     * @param bigDecimal
+     * @return
+     */
+    private BigDecimal getTwoNum(BigDecimal bigDecimal){
+        if (bigDecimal==null){
+            return BigDecimal.ZERO;
+        }
+        return bigDecimal.multiply(new BigDecimal("100")).setScale(2, RoundingMode.HALF_UP);
+    }
+
+    /**
+     * 获取环比
+     * @param bigDecimalNew
+     * @param bigDecimalOld
+     * @return
+     */
+    private BigDecimal getChain(BigDecimal bigDecimalNew,BigDecimal bigDecimalOld){
+        if (bigDecimalOld.compareTo(BigDecimal.ZERO)==0){
+            return null;
+        }
+        return getTwoNum((bigDecimalNew.subtract(bigDecimalOld)).divide(bigDecimalOld, 2, RoundingMode.HALF_UP));
+    }
+
+    /**
+     * 获取环比
+     * @param bigDecimalNew
+     * @param bigDecimalOld
+     * @return
+     */
+    private BigDecimal getChain(int bigDecimalNew,int bigDecimalOld){
+        if (bigDecimalOld==0){
+            return null;
+        }
+        return getChain(BigDecimal.valueOf(bigDecimalNew),BigDecimal.valueOf(bigDecimalOld));
+    }
+
 }

+ 27 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/vo/statistics/FindByShopSumVO.java

@@ -0,0 +1,27 @@
+package org.jeecg.modules.system.app.vo.statistics;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@AllArgsConstructor
+@NoArgsConstructor
+@Schema(description = "首页统计页面图表参数")
+public class FindByShopSumVO {
+    @Schema(description = "商品名称")
+    private String shopName;
+    /**销售量*/
+    @Schema(description = "销售量")
+    private Long productCount;
+    /**销售金额*/
+    @Schema(description = "销售金额")
+    private BigDecimal totalPrice ;
+}

+ 49 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/vo/statistics/FindByStatisticsChartVO.java

@@ -0,0 +1,49 @@
+package org.jeecg.modules.system.app.vo.statistics;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@AllArgsConstructor
+@NoArgsConstructor
+@Schema(description = "首页统计页面图表参数")
+public class FindByStatisticsChartVO  {
+
+    @Schema(description = "日期 列如20250813")
+    private Integer dateDaily;
+    @Schema(description = "日期")
+    @JsonFormat( pattern = "MM/dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private LocalDate dateDailyDate;
+
+    @Schema(description = "机构编码")
+    private Integer org_code;
+    @Schema(description = "商家名称")
+    private Integer DeptName;
+    /**销售金额*/
+    @Schema(description = "销售金额")
+    private BigDecimal saleMoney =BigDecimal.ZERO;
+    /**有效订单数*/
+    @Schema(description = "有效订单数")
+    private Integer effectiveOrderNum=0;
+    /**预计收入*/
+    @Schema(description = "预计收入")
+    private BigDecimal expectIncomeMoney =BigDecimal.ZERO;
+    /**消费人数*/
+    @Schema(description = "消费人数")
+    private Integer consumeNumber=0;
+    /**新增用户数*/
+    @Schema(description = "新增用户数")
+    private Integer addNumber=0;
+}

+ 56 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/vo/statistics/FindByStatisticsVO.java

@@ -0,0 +1,56 @@
+package org.jeecg.modules.system.app.vo.statistics;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@AllArgsConstructor
+@NoArgsConstructor
+@Schema(description = "首页统计页面参数")
+public class FindByStatisticsVO  {
+
+    @Schema(description = "日期 列如20250813")
+    private Integer dateDaily;
+    /**销售金额*/
+    @Schema(description = "销售金额")
+    private BigDecimal saleMoney =BigDecimal.ZERO;
+
+    @Schema(description = "销售金额环比")
+    private BigDecimal saleMoneyChain;
+    /**有效订单数*/
+    @Schema(description = "有效订单数")
+    private Integer effectiveOrderNum=0;
+
+    /**有效订单数环比*/
+    @Schema(description = "有效订单数环比")
+    private BigDecimal effectiveOrderNumChain;
+    /**预计收入*/
+    @Schema(description = "预计收入")
+    private BigDecimal expectIncomeMoney =BigDecimal.ZERO;
+    /**预计收入环比*/
+    @Schema(description = "预计收入环比")
+    private BigDecimal expectIncomeMoneyChain;
+    /**消费人数*/
+    @Schema(description = "消费人数")
+    private Integer consumeNumber=0;
+    /**消费人数环比*/
+    @Schema(description = "消费人数环比")
+    private BigDecimal consumeNumberChain;
+    /**新增用户数*/
+    @Schema(description = "新增用户数")
+    private Integer addNumber=0;
+    /**新增用户数环比*/
+    @Schema(description = "新增用户数环比")
+    private BigDecimal addNumberChain;
+
+    private List<FindByStatisticsChartVO> findByStatisticsChartVOList;
+}