Browse Source

服务通知

zhangxin 3 days ago
parent
commit
e0f4c65961
36 changed files with 2082 additions and 11 deletions
  1. 63 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/controller/weixin/WechatNotificationController.java
  2. 1 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/weixinService/WechatNotificationService.java
  3. 44 10
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/wxNotification/WxNotificationService.java
  4. 50 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/quartz/vo/JobReservationSiteVo.java
  5. 166 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/ReceiptPaymentDetailsInfoController.java
  6. 180 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/ShopMoneyController.java
  7. 164 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/ShopMoneyHisController.java
  8. 177 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/StatisticsInfoController.java
  9. 164 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/StatisticsInfoHisController.java
  10. 79 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/receiptPaymentDetails/ReceiptPaymentDetailsInfoVo.java
  11. 88 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/ReceiptPaymentDetailsInfo.java
  12. 87 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/ShopMoney.java
  13. 70 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/ShopMoneyHis.java
  14. 90 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/StatisticsInfoHis.java
  15. 7 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/AppOrderMapper.java
  16. 22 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/ReceiptPaymentDetailsInfoMapper.java
  17. 14 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/ShopMoneyHisMapper.java
  18. 22 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/ShopMoneyMapper.java
  19. 14 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/StatisticsInfoHisMapper.java
  20. 40 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppOrderMapper.xml
  21. 23 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/ReceiptPaymentDetailsInfoMapper.xml
  22. 5 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/ShopMoneyHisMapper.xml
  23. 39 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/ShopMoneyMapper.xml
  24. 5 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/StatisticsInfoHisMapper.xml
  25. 5 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IAppOrderService.java
  26. 22 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IReceiptPaymentDetailsInfoService.java
  27. 14 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IShopMoneyHisService.java
  28. 24 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IShopMoneyService.java
  29. 14 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IStatisticsInfoHisService.java
  30. 21 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/IStatisticsInfoService.java
  31. 22 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppOrderServiceImpl.java
  32. 119 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/ReceiptPaymentDetailsInfoServiceImpl.java
  33. 18 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/ShopMoneyHisServiceImpl.java
  34. 115 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/ShopMoneyServiceImpl.java
  35. 18 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/StatisticsInfoHisServiceImpl.java
  36. 76 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/StatisticsInfoServiceImpl.java

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

@@ -0,0 +1,63 @@
+package org.jeecg.modules.app.controller.weixin;
+
+import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.app.vo.weixin.NotificationRequest;
+import org.jeecg.modules.app.vo.weixin.NotificationResult;
+import org.jeecg.modules.app.weixinService.WechatNotificationService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+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.RestController;
+
+import javax.validation.Valid;
+import java.util.List;
+@Slf4j
+//@Tag(name = "消息通知测试")
+@RestController
+@RequestMapping("/api/wechat/notification")
+public class WechatNotificationController {
+    private static final Logger logger = LoggerFactory.getLogger(WechatNotificationController.class);
+    private final WechatNotificationService notificationService;
+
+    public WechatNotificationController(WechatNotificationService notificationService) {
+        this.notificationService = notificationService;
+    }
+
+//    @Operation(summary = "消息发送")
+    @PostMapping("/send")
+    public ResponseEntity<Result<String>> sendNotification(@Valid @RequestBody NotificationRequest request) {
+        logger.info("发送请求参数:"+JSONObject.toJSONString(request));
+        JSONObject data = new JSONObject();
+        // 根据模板内容设置数据项
+        data.put("time3", new JSONObject().fluentPut("value", "19:00"));
+        data.put("thing4", new JSONObject().fluentPut("value", "观山湖区第一中学"));
+        data.put("thing11", new JSONObject().fluentPut("value", "尽快到场,准备上课"));
+        request.setTemplateId("Yi1Z1IKRwgF6-mpiFcOUTvavc4TUAsfsLynK_3Yu350");
+        request.setData(data);
+        NotificationResult result = notificationService.sendSubscribeMessage(request);
+        if (result.isSuccess()) {
+            logger.info("发送成功返回结果:"+JSONObject.toJSONString(result));
+            return ResponseEntity.ok(Result.ok("发送成功"));
+        } else {
+            return ResponseEntity.status(HttpStatus.BAD_REQUEST)
+                    .body(Result.error(result.getErrorMsg()));
+        }
+    }
+
+    @PostMapping("/batch-send")
+    public ResponseEntity<Result<String>> batchSendNotification(@Valid @RequestBody List<NotificationRequest> requests) {
+        logger.info("发送请求参数:"+JSONObject.toJSONString(requests));
+        if (requests.size() > 1000) {
+            return ResponseEntity.status(HttpStatus.BAD_REQUEST)
+                    .body(Result.error("单次批量发送不能超过1000条"));
+        }
+        notificationService.batchSendSubscribeMessages(requests);
+        return ResponseEntity.ok(Result.ok("批量发送任务已提交"));
+    }
+}

+ 1 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/weixinService/WechatNotificationService.java

@@ -56,7 +56,7 @@ public class WechatNotificationService {
                 if (resultJson.getInteger("errcode") == 0) {
                     logger.info("成功发送小程序订阅消息: openid={}, templateId={}",
                             request.getOpenid(), request.getTemplateId());
-                    throw new JeecgBootException(""+resultJson.getLong("msgid"));
+                    return null;
                 } else {
                     logger.error("发送小程序订阅消息失败: {}, 请求参数: {}",
                             result, requestBody.toJSONString());

+ 44 - 10
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/wxNotification/WxNotificationService.java

@@ -7,6 +7,7 @@ import org.jeecg.modules.app.vo.weixin.NotificationRequest;
 import org.jeecg.modules.app.weixinService.WechatNotificationService;
 import org.jeecg.modules.quartz.vo.JobClassNoticeVo;
 import org.jeecg.modules.quartz.vo.JobExtendedClassNoticeVo;
+import org.jeecg.modules.quartz.vo.JobReservationSiteVo;
 import org.jeecg.modules.system.app.entity.AppOrder;
 import org.jeecg.modules.system.app.service.IAppOrderService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -14,6 +15,12 @@ import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 
 import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
@@ -87,9 +94,25 @@ public class WxNotificationService {
             Date now = new Date();
             log.info("Start checking orders for notification at {}", now);
 
+            LocalDate currentDate = LocalDate.now();
+            LocalTime localTime = LocalTime.now().truncatedTo(ChronoUnit.SECONDS);
+
             //查询预约过学校场地的用户并通知他
-//            iAppOrderService.findBySite();
+           List<JobReservationSiteVo> jobReservationSiteVos =  iAppOrderService.findBySite(currentDate,localTime);
 
+            ArrayList<NotificationRequest> notificationRequests = new ArrayList<>();
+            for (JobReservationSiteVo jobReservationSiteVo : jobReservationSiteVos) {
+                NotificationRequest notificationRequest = new NotificationRequest();
+                notificationRequest.setOpenid(jobReservationSiteVo.getUserOpenId());
+                notificationRequest.setTemplateId("WSJjc9I24ijtr3EyNVXjEvTQm0gIECW9ABYVFcegOwM");
+                JSONObject data = new JSONObject();
+                // 根据模板内容设置数据项
+                data.put("thing5", new JSONObject().fluentPut("value",jobReservationSiteVo.getSiteName() ));
+                data.put("thing3", new JSONObject().fluentPut("value", "空闲:" +getDate(currentDate,jobReservationSiteVo.getStartTime(),jobReservationSiteVo.getEndTime()) ));
+                notificationRequest.setData(data);
+                notificationRequests.add(notificationRequest);
+            }
+            notificationService.batchSendSubscribeMessages(notificationRequests);
             log.info("Finished checking orders for notification");
         } catch (Exception e) {
             log.error("Error occurred while checking orders for notification", e);
@@ -115,7 +138,7 @@ public class WxNotificationService {
             }
             Date now = new Date();
             log.info("Start checking orders for notification at {}", now);
-            ExecutorService executor = Executors.newFixedThreadPool(10);
+            ArrayList<NotificationRequest> notificationRequests = new ArrayList<>();
             for (JobExtendedClassNoticeVo jobExtendedClassNoticeVo : jobExtendedClassNoticeVos) {
                 NotificationRequest notificationRequest = new NotificationRequest();
                 notificationRequest.setOpenid(jobExtendedClassNoticeVo.getUserOpenId());
@@ -125,15 +148,10 @@ public class WxNotificationService {
                 data.put("thing2", new JSONObject().fluentPut("value", jobExtendedClassNoticeVo.getLassHourTime()));
                 data.put("thing1", new JSONObject().fluentPut("value", jobExtendedClassNoticeVo.getSiteName()));
                 data.put("thing3", new JSONObject().fluentPut("value", jobExtendedClassNoticeVo.getReasonClassExtension()));
-                executor.submit(() -> {
-                    try {
-                        notificationService.sendSubscribeMessage(notificationRequest);
-                    } catch (Exception e) {
-                        log.error("延课批量发送小程序订阅消息异常", e);
-                    }
-                });
-
+                notificationRequest.setData(data);
+                notificationRequests.add(notificationRequest);
             }
+            notificationService.batchSendSubscribeMessages(notificationRequests);
             //查询被延课的数据通知他
 //            iAppOrderService.findBySite();
 
@@ -183,6 +201,7 @@ public class WxNotificationService {
                 data.put("time3", new JSONObject().fluentPut("value", date));
                 data.put("thing4", new JSONObject().fluentPut("value", siteName));
                 data.put("thing11", new JSONObject().fluentPut("value", "如有特殊情况不能上课,记得沟通延课"));
+                notificationRequest.setData(data);
                 executor.submit(() -> {
                     AppOrder appOrder = iAppOrderService.getById(jobClassNoticeVo.getOrderId());
                     if (appOrder==null){
@@ -218,4 +237,19 @@ public class WxNotificationService {
         return sdf.format(date);
     }
 
+    private String getDate(LocalDate currentDate  ,Date startTime,Date endTime){
+
+        if (startTime==null|| endTime==null){
+            return null;
+        }
+        // 将 Date 转换为 LocalDateTime
+        LocalDateTime startLdt = LocalDateTime.ofInstant(startTime.toInstant(), java.time.ZoneId.systemDefault());
+        LocalDateTime endLdt = LocalDateTime.ofInstant(endTime.toInstant(), java.time.ZoneId.systemDefault());
+        DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("MM.dd");
+        DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("HH:mm");
+        String formattedDate = currentDate.format(dateFormatter);
+        String formattedStartTime = startLdt.format(timeFormatter);
+        String formattedEndTime = endLdt.format(timeFormatter);
+        return   formattedDate + " " + formattedStartTime + "-" + formattedEndTime;
+    }
 }

+ 50 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/quartz/vo/JobReservationSiteVo.java

@@ -0,0 +1,50 @@
+package org.jeecg.modules.quartz.vo;
+
+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.util.Date;
+
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@AllArgsConstructor
+@NoArgsConstructor
+@Schema(description="查询上课通知数据")
+public class JobReservationSiteVo {
+
+    /** 用户微信openID*/
+    private String userOpenId;
+
+    /** 开始时间*/
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date startTime;
+
+    /** 开始时间*/
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm:ss", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "HH:mm:ss")
+    private Date endTime;
+
+    /** 开始时间*/
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date dateOfSale;
+
+    /** 场地名称*/
+    private String siteName;
+
+
+    /** 场地id*/
+    private String siteId;
+
+    /** 余票数*/
+    private Integer inventory;
+
+}

+ 166 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/ReceiptPaymentDetailsInfoController.java

@@ -0,0 +1,166 @@
+package org.jeecg.modules.system.app.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.modules.system.app.entity.ReceiptPaymentDetailsInfo;
+import org.jeecg.modules.system.app.service.IReceiptPaymentDetailsInfoService;
+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.util.Arrays;
+ /**
+ * @Description: 店铺资金明细
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Tag(name="店铺资金明细")
+@RestController
+@RequestMapping("/receiptPaymentDetailsInfo/receiptPaymentDetailsInfo")
+@Slf4j
+public class ReceiptPaymentDetailsInfoController extends JeecgController<ReceiptPaymentDetailsInfo, IReceiptPaymentDetailsInfoService> {
+	@Autowired
+	private IReceiptPaymentDetailsInfoService receiptPaymentDetailsInfoService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param receiptPaymentDetailsInfo
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "店铺资金明细-分页列表查询")
+	@Operation(summary="店铺资金明细-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<ReceiptPaymentDetailsInfo>> queryPageList(ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+
+
+//        QueryWrapper<ReceiptPaymentDetailsInfo> queryWrapper = QueryGenerator.initQueryWrapper(receiptPaymentDetailsInfo, req.getParameterMap());
+		LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		Page<ReceiptPaymentDetailsInfo> page = new Page<ReceiptPaymentDetailsInfo>(pageNo, pageSize);
+		receiptPaymentDetailsInfo.setOrgCode(loginUser.getOrgCode());
+		IPage<ReceiptPaymentDetailsInfo> pageList = receiptPaymentDetailsInfoService.findPage(page, receiptPaymentDetailsInfo);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param receiptPaymentDetailsInfo
+	 * @return
+	 */
+	@AutoLog(value = "店铺资金明细-添加")
+	@Operation(summary="店铺资金明细-添加")
+	@RequiresPermissions("receiptPaymentDetailsInfo:nm_receipt_payment_details_info:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo) {
+		receiptPaymentDetailsInfoService.save(receiptPaymentDetailsInfo);
+
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param receiptPaymentDetailsInfo
+	 * @return
+	 */
+	@AutoLog(value = "店铺资金明细-编辑")
+	@Operation(summary="店铺资金明细-编辑")
+	@RequiresPermissions("receiptPaymentDetailsInfo:nm_receipt_payment_details_info:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo) {
+		receiptPaymentDetailsInfoService.updateById(receiptPaymentDetailsInfo);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "店铺资金明细-通过id删除")
+	@Operation(summary="店铺资金明细-通过id删除")
+	@RequiresPermissions("receiptPaymentDetailsInfo:nm_receipt_payment_details_info:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		receiptPaymentDetailsInfoService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "店铺资金明细-批量删除")
+	@Operation(summary="店铺资金明细-批量删除")
+	@RequiresPermissions("receiptPaymentDetailsInfo:nm_receipt_payment_details_info:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.receiptPaymentDetailsInfoService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "店铺资金明细-通过id查询")
+	@Operation(summary="店铺资金明细-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<ReceiptPaymentDetailsInfo> queryById(@RequestParam(name="id",required=true) String id) {
+		ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo = receiptPaymentDetailsInfoService.getById(id);
+		if(receiptPaymentDetailsInfo==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(receiptPaymentDetailsInfo);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param receiptPaymentDetailsInfo
+    */
+    @RequiresPermissions("receiptPaymentDetailsInfo:nm_receipt_payment_details_info:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo) {
+        return super.exportXls(request, receiptPaymentDetailsInfo, ReceiptPaymentDetailsInfo.class, "店铺资金明细");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("receiptPaymentDetailsInfo:nm_receipt_payment_details_info:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, ReceiptPaymentDetailsInfo.class);
+    }
+
+}

+ 180 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/ShopMoneyController.java

@@ -0,0 +1,180 @@
+package org.jeecg.modules.system.app.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.modules.system.app.entity.ShopMoney;
+import org.jeecg.modules.system.app.service.IShopMoneyService;
+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.util.Arrays;
+ /**
+ * @Description: 店铺资金总数
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Tag(name="店铺资金总数")
+@RestController
+@RequestMapping("/shopMoney/shopMoney")
+@Slf4j
+public class ShopMoneyController extends JeecgController<ShopMoney, IShopMoneyService> {
+	@Autowired
+	private IShopMoneyService shopMoneyService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param shopMoney
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "店铺资金总数-分页列表查询")
+	@Operation(summary="店铺资金总数-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<ShopMoney>> queryPageList(ShopMoney shopMoney,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+
+
+		Page<ShopMoney> page = new Page<ShopMoney>(pageNo, pageSize);
+		IPage<ShopMoney> pageList = shopMoneyService.findPage(page, shopMoney);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param shopMoney
+	 * @return
+	 */
+	@AutoLog(value = "店铺资金总数-添加")
+	@Operation(summary="店铺资金总数-添加")
+	@RequiresPermissions("shopMoney:nm_shop_money:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody ShopMoney shopMoney) {
+		shopMoneyService.save(shopMoney);
+
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param shopMoney
+	 * @return
+	 */
+	@AutoLog(value = "店铺资金总数-编辑")
+	@Operation(summary="店铺资金总数-编辑")
+	@RequiresPermissions("shopMoney:nm_shop_money:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody ShopMoney shopMoney) {
+		shopMoneyService.updateById(shopMoney);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "店铺资金总数-通过id删除")
+	@Operation(summary="店铺资金总数-通过id删除")
+	@RequiresPermissions("shopMoney:nm_shop_money:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		shopMoneyService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "店铺资金总数-批量删除")
+	@Operation(summary="店铺资金总数-批量删除")
+	@RequiresPermissions("shopMoney:nm_shop_money:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.shopMoneyService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "店铺资金总数-通过id查询")
+	@Operation(summary="店铺资金总数-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<ShopMoney> queryById(@RequestParam(name="id",required=true) String id) {
+		ShopMoney shopMoney = shopMoneyService.getById(id);
+		if(shopMoney==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(shopMoney);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param shopMoney
+    */
+    @RequiresPermissions("shopMoney:nm_shop_money:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, ShopMoney shopMoney) {
+        return super.exportXls(request, shopMoney, ShopMoney.class, "店铺资金总数");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("shopMoney:nm_shop_money:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, ShopMoney.class);
+    }
+
+	 /**
+	  * 通过orgCode查询
+	  *
+	  * @return
+	  */
+	 //@AutoLog(value = "店铺资金总数-通过id查询")
+	 @Operation(summary="店铺资金总数-通过id查询")
+	 @GetMapping(value = "/queryByCode")
+	 public Result<ShopMoney> queryByCode() {
+		 LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		 ShopMoney shopMoney = shopMoneyService.findByOrgCode(loginUser.getOrgCode());
+		 if(shopMoney==null) {
+			 return Result.error("未找到对应数据");
+		 }
+		 return Result.OK(shopMoney);
+	 }
+
+}

+ 164 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/ShopMoneyHisController.java

@@ -0,0 +1,164 @@
+package org.jeecg.modules.system.app.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.system.app.entity.ShopMoneyHis;
+import org.jeecg.modules.system.app.service.IShopMoneyHisService;
+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.util.Arrays;
+ /**
+ * @Description: 变化历史记录表
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Tag(name="变化历史记录表")
+@RestController
+@RequestMapping("/shopMoneyHis/shopMoneyHis")
+@Slf4j
+public class ShopMoneyHisController extends JeecgController<ShopMoneyHis, IShopMoneyHisService> {
+	@Autowired
+	private IShopMoneyHisService shopMoneyHisService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param shopMoneyHis
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "变化历史记录表-分页列表查询")
+	@Operation(summary="变化历史记录表-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<ShopMoneyHis>> queryPageList(ShopMoneyHis shopMoneyHis,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+
+
+        QueryWrapper<ShopMoneyHis> queryWrapper = QueryGenerator.initQueryWrapper(shopMoneyHis, req.getParameterMap());
+		Page<ShopMoneyHis> page = new Page<ShopMoneyHis>(pageNo, pageSize);
+		IPage<ShopMoneyHis> pageList = shopMoneyHisService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param shopMoneyHis
+	 * @return
+	 */
+	@AutoLog(value = "变化历史记录表-添加")
+	@Operation(summary="变化历史记录表-添加")
+	@RequiresPermissions("shopMoneyHis:nm_shop_money_his:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody ShopMoneyHis shopMoneyHis) {
+		shopMoneyHisService.save(shopMoneyHis);
+
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param shopMoneyHis
+	 * @return
+	 */
+	@AutoLog(value = "变化历史记录表-编辑")
+	@Operation(summary="变化历史记录表-编辑")
+	@RequiresPermissions("shopMoneyHis:nm_shop_money_his:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody ShopMoneyHis shopMoneyHis) {
+		shopMoneyHisService.updateById(shopMoneyHis);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "变化历史记录表-通过id删除")
+	@Operation(summary="变化历史记录表-通过id删除")
+	@RequiresPermissions("shopMoneyHis:nm_shop_money_his:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		shopMoneyHisService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "变化历史记录表-批量删除")
+	@Operation(summary="变化历史记录表-批量删除")
+	@RequiresPermissions("shopMoneyHis:nm_shop_money_his:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.shopMoneyHisService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "变化历史记录表-通过id查询")
+	@Operation(summary="变化历史记录表-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<ShopMoneyHis> queryById(@RequestParam(name="id",required=true) String id) {
+		ShopMoneyHis shopMoneyHis = shopMoneyHisService.getById(id);
+		if(shopMoneyHis==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(shopMoneyHis);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param shopMoneyHis
+    */
+    @RequiresPermissions("shopMoneyHis:nm_shop_money_his:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, ShopMoneyHis shopMoneyHis) {
+        return super.exportXls(request, shopMoneyHis, ShopMoneyHis.class, "变化历史记录表");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("shopMoneyHis:nm_shop_money_his:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, ShopMoneyHis.class);
+    }
+
+}

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

@@ -0,0 +1,177 @@
+package org.jeecg.modules.system.app.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+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.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.util.Arrays;
+ /**
+ * @Description: 首页统计表
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Tag(name="首页统计表")
+@RestController
+@RequestMapping("/statisticsInfo/statisticsInfo")
+@Slf4j
+public class StatisticsInfoController extends JeecgController<StatisticsInfo, IStatisticsInfoService> {
+	@Autowired
+	private IStatisticsInfoService statisticsInfoService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param statisticsInfo
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "首页统计表-分页列表查询")
+	@Operation(summary="首页统计表-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<StatisticsInfo>> queryPageList(StatisticsInfo statisticsInfo,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+
+
+        QueryWrapper<StatisticsInfo> queryWrapper = QueryGenerator.initQueryWrapper(statisticsInfo, req.getParameterMap());
+		Page<StatisticsInfo> page = new Page<StatisticsInfo>(pageNo, pageSize);
+		IPage<StatisticsInfo> pageList = statisticsInfoService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param statisticsInfo
+	 * @return
+	 */
+	@AutoLog(value = "首页统计表-添加")
+	@Operation(summary="首页统计表-添加")
+	@RequiresPermissions("statisticsInfo:nm_statistics_info:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody StatisticsInfo statisticsInfo) {
+		statisticsInfoService.save(statisticsInfo);
+
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param statisticsInfo
+	 * @return
+	 */
+	@AutoLog(value = "首页统计表-编辑")
+	@Operation(summary="首页统计表-编辑")
+	@RequiresPermissions("statisticsInfo:nm_statistics_info:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody StatisticsInfo statisticsInfo) {
+		statisticsInfoService.updateById(statisticsInfo);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "首页统计表-通过id删除")
+	@Operation(summary="首页统计表-通过id删除")
+	@RequiresPermissions("statisticsInfo:nm_statistics_info:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		statisticsInfoService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "首页统计表-批量删除")
+	@Operation(summary="首页统计表-批量删除")
+	@RequiresPermissions("statisticsInfo:nm_statistics_info:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.statisticsInfoService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "首页统计表-通过id查询")
+	@Operation(summary="首页统计表-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<StatisticsInfo> queryById(@RequestParam(name="id",required=true) String id) {
+		StatisticsInfo statisticsInfo = statisticsInfoService.getById(id);
+		if(statisticsInfo==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(statisticsInfo);
+	}
+	 @Operation(summary="首页统计表-通过id查询")
+	 @GetMapping(value = "/queryByCode")
+	 public Result<StatisticsInfo> queryByCode() {
+		 LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		 StatisticsInfo statisticsInfo = statisticsInfoService.findByCode(loginUser.getOrgCode());
+		 if(statisticsInfo==null) {
+			 return Result.error("未找到对应数据");
+		 }
+		 return Result.OK(statisticsInfo);
+	 }
+
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param statisticsInfo
+    */
+    @RequiresPermissions("statisticsInfo:nm_statistics_info:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, StatisticsInfo statisticsInfo) {
+        return super.exportXls(request, statisticsInfo, StatisticsInfo.class, "首页统计表");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("statisticsInfo:nm_statistics_info:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, StatisticsInfo.class);
+    }
+
+}

+ 164 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/controller/StatisticsInfoHisController.java

@@ -0,0 +1,164 @@
+package org.jeecg.modules.system.app.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.system.app.entity.StatisticsInfoHis;
+import org.jeecg.modules.system.app.service.IStatisticsInfoHisService;
+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.util.Arrays;
+ /**
+ * @Description: 首页统计历史记录表
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Tag(name="首页统计历史记录表")
+@RestController
+@RequestMapping("/statisticsInfoHis/statisticsInfoHis")
+@Slf4j
+public class StatisticsInfoHisController extends JeecgController<StatisticsInfoHis, IStatisticsInfoHisService> {
+	@Autowired
+	private IStatisticsInfoHisService statisticsInfoHisService;
+	
+	/**
+	 * 分页列表查询
+	 *
+	 * @param statisticsInfoHis
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	//@AutoLog(value = "首页统计历史记录表-分页列表查询")
+	@Operation(summary="首页统计历史记录表-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<StatisticsInfoHis>> queryPageList(StatisticsInfoHis statisticsInfoHis,
+								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+								   HttpServletRequest req) {
+
+
+        QueryWrapper<StatisticsInfoHis> queryWrapper = QueryGenerator.initQueryWrapper(statisticsInfoHis, req.getParameterMap());
+		Page<StatisticsInfoHis> page = new Page<StatisticsInfoHis>(pageNo, pageSize);
+		IPage<StatisticsInfoHis> pageList = statisticsInfoHisService.page(page, queryWrapper);
+		return Result.OK(pageList);
+	}
+	
+	/**
+	 *   添加
+	 *
+	 * @param statisticsInfoHis
+	 * @return
+	 */
+	@AutoLog(value = "首页统计历史记录表-添加")
+	@Operation(summary="首页统计历史记录表-添加")
+	@RequiresPermissions("statisticsInfoHis:nm_statistics_info_his:add")
+	@PostMapping(value = "/add")
+	public Result<String> add(@RequestBody StatisticsInfoHis statisticsInfoHis) {
+		statisticsInfoHisService.save(statisticsInfoHis);
+
+		return Result.OK("添加成功!");
+	}
+	
+	/**
+	 *  编辑
+	 *
+	 * @param statisticsInfoHis
+	 * @return
+	 */
+	@AutoLog(value = "首页统计历史记录表-编辑")
+	@Operation(summary="首页统计历史记录表-编辑")
+	@RequiresPermissions("statisticsInfoHis:nm_statistics_info_his:edit")
+	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
+	public Result<String> edit(@RequestBody StatisticsInfoHis statisticsInfoHis) {
+		statisticsInfoHisService.updateById(statisticsInfoHis);
+		return Result.OK("编辑成功!");
+	}
+	
+	/**
+	 *   通过id删除
+	 *
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "首页统计历史记录表-通过id删除")
+	@Operation(summary="首页统计历史记录表-通过id删除")
+	@RequiresPermissions("statisticsInfoHis:nm_statistics_info_his:delete")
+	@DeleteMapping(value = "/delete")
+	public Result<String> delete(@RequestParam(name="id",required=true) String id) {
+		statisticsInfoHisService.removeById(id);
+		return Result.OK("删除成功!");
+	}
+	
+	/**
+	 *  批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "首页统计历史记录表-批量删除")
+	@Operation(summary="首页统计历史记录表-批量删除")
+	@RequiresPermissions("statisticsInfoHis:nm_statistics_info_his:deleteBatch")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		this.statisticsInfoHisService.removeByIds(Arrays.asList(ids.split(",")));
+		return Result.OK("批量删除成功!");
+	}
+	
+	/**
+	 * 通过id查询
+	 *
+	 * @param id
+	 * @return
+	 */
+	//@AutoLog(value = "首页统计历史记录表-通过id查询")
+	@Operation(summary="首页统计历史记录表-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<StatisticsInfoHis> queryById(@RequestParam(name="id",required=true) String id) {
+		StatisticsInfoHis statisticsInfoHis = statisticsInfoHisService.getById(id);
+		if(statisticsInfoHis==null) {
+			return Result.error("未找到对应数据");
+		}
+		return Result.OK(statisticsInfoHis);
+	}
+
+    /**
+    * 导出excel
+    *
+    * @param request
+    * @param statisticsInfoHis
+    */
+    @RequiresPermissions("statisticsInfoHis:nm_statistics_info_his:exportXls")
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, StatisticsInfoHis statisticsInfoHis) {
+        return super.exportXls(request, statisticsInfoHis, StatisticsInfoHis.class, "首页统计历史记录表");
+    }
+
+    /**
+      * 通过excel导入数据
+    *
+    * @param request
+    * @param response
+    * @return
+    */
+    @RequiresPermissions("statisticsInfoHis:nm_statistics_info_his:importExcel")
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        return super.importExcel(request, response, StatisticsInfoHis.class);
+    }
+
+}

+ 79 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/dto/receiptPaymentDetails/ReceiptPaymentDetailsInfoVo.java

@@ -0,0 +1,79 @@
+package org.jeecg.modules.system.app.dto.receiptPaymentDetails;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.constraints.*;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 店铺资金明细
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@Schema(description="店铺资金明细添加vo")
+public class ReceiptPaymentDetailsInfoVo {
+
+	/**机构编码*/
+    @Schema(description = "机构编码")
+    @NotBlank(message = "机构编码不能为空")
+    @Size(min = 27, max = 27, message = "充电订单号长度必须为27字符")
+    private String orgCode;
+	/**部门id*/
+    @Schema(description = "部门id")
+    @Size( max = 32, message = "充电订单号长度最大值为32")
+    private String deptId;
+	/**收支类型 0-收入 1-支出*/
+    @Schema(description = "收支类型 0-收入 1-支出")
+    @NotNull(message = "收支类型不能为空")
+    @Min(value = 0, message = "收支类型最小值为0")
+    @Max(value = 1, message = "收支类型最大值为1")
+    private Integer payType;
+
+    /**部门类型 0-平台 1-商户 2-门店*/
+    @Schema(description = "部门类型 0-平台 1-商户 2-门店")
+    @NotNull(message = "部门类型不能为空")
+    @Min(value = 0, message = "部门类型最小值为0")
+    @Max(value = 2, message = "部门类型最大值为1")
+    private Integer deptType;
+	/**订单编号*/
+    @Schema(description = "订单编号")
+    @Size( max = 32, message = "充电订单号长度最大值为32")
+    private String orderId;
+    /**变化金额*/
+    @Schema(description = "总金额")
+    @NotNull(message = "总金额不能为空")
+    @DecimalMin(value = "0.00", message = "总金额不能小于0")
+    @Digits(integer = 10, fraction = 2, message = "总金额必须精确到小数点后2位")
+    private BigDecimal money;
+	/**变化金额*/
+    @Schema(description = "变化金额")
+    @NotNull(message = "变化金额不能为空")
+    @DecimalMin(value = "0.00", message = "变化金额不能小于0")
+    @Digits(integer = 10, fraction = 2, message = "变化金额必须精确到小数点后2位")
+    private BigDecimal changeMoney;
+	/**资金变化原因 0-用户支付,1-用户退款,2-分账,3-银行卡到账*/
+    @Schema(description = "资金变化原因 0-用户支付,1-用户退款,2-分账,3-银行卡到账")
+    @Min(value = 0, message = "资金变化原因最小值为0")
+    @Max(value = 3, message = "资金变化原因最大值为3")
+    private Integer purseChangeReason;
+	/**创建时间;创建时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "创建时间;创建时间")
+    private Date createTime;
+	/**更新时间;更新时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "更新时间;更新时间")
+    private Date updateTime;
+}

+ 88 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/ReceiptPaymentDetailsInfo.java

@@ -0,0 +1,88 @@
+package org.jeecg.modules.system.app.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.constraints.DecimalMin;
+import javax.validation.constraints.Digits;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 店铺资金明细
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Data
+@TableName("nm_receipt_payment_details_info")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@Schema(description="店铺资金明细")
+public class ReceiptPaymentDetailsInfo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @Schema(description = "id")
+    private String id;
+	/**机构编码*/
+	@Excel(name = "机构编码", width = 15)
+    @Schema(description = "机构编码")
+    private String orgCode;
+	/**部门id*/
+	@Excel(name = "部门id", width = 15)
+    @Schema(description = "部门id")
+    private String deptId;
+	/**收支类型 0-收入 1-支出*/
+	@Excel(name = "收支类型 0-收入 1-支出", width = 15)
+    @Schema(description = "收支类型 0-收入 1-支出")
+    private Integer payType;
+	/**订单编号*/
+	@Excel(name = "订单编号", width = 15)
+    @Schema(description = "订单编号")
+    private String orderId;
+	/**变更前金额*/
+	@Excel(name = "变更前金额", width = 15)
+    @Schema(description = "变更前金额")
+    private BigDecimal beforeMoney;
+	/**变更后金额*/
+	@Excel(name = "变更后金额", width = 15)
+    @Schema(description = "变更后金额")
+    private BigDecimal afterMoney;
+	/**变化金额*/
+	@Excel(name = "变化金额", width = 15)
+    @Schema(description = "变化金额")
+    @NotNull(message = "总金额不能为空")
+    @DecimalMin(value = "0.00", message = "总金额不能小于0")
+    @Digits(integer = 10, fraction = 2, message = "总金额必须精确到小数点后2位")
+    private BigDecimal changeMoney;
+	/**资金变化原因 0-用户支付,1-用户退款,2-分账,3-银行卡到账*/
+	@Excel(name = "资金变化原因 0-用户支付,1-用户退款,2-分账,3-银行卡到账", width = 15)
+    @Schema(description = "资金变化原因 0-用户支付,1-用户退款,2-分账,3-银行卡到账")
+    private Integer purseChangeReason;
+    /**金额类型 0-待结算,1-可用余额,2-已到账*/
+    @Excel(name = "金额类型 0-待结算,1-可用余额,2-已到账", width = 15)
+    @Schema(description = "金额类型 0-待结算,1-可用余额,2-已到账")
+    private Integer moneyType;
+	/**创建时间;创建时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "创建时间;创建时间")
+    private Date createTime;
+	/**更新时间;更新时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "更新时间;更新时间")
+    private Date updateTime;
+}

+ 87 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/ShopMoney.java

@@ -0,0 +1,87 @@
+package org.jeecg.modules.system.app.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 店铺资金总数
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Data
+@TableName("nm_shop_money")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@Schema(description="店铺资金总数")
+public class ShopMoney implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @Schema(description = "id")
+    private String id;
+	/**部门编码*/
+	@Excel(name = "部门编码", width = 15)
+    @Schema(description = "部门编码")
+    private String orgCode;
+	/**部门id*/
+	@Excel(name = "部门id", width = 15)
+    @Schema(description = "部门id")
+    private String deptId;
+	/**待结算金额*/
+	@Excel(name = "待结算金额", width = 15)
+    @Schema(description = "待结算金额")
+    private BigDecimal pendSettlementMoney;
+	/**可用余额*/
+	@Excel(name = "可用余额", width = 15)
+    @Schema(description = "可用余额")
+    private BigDecimal canBalance;
+	/**已到账金额*/
+	@Excel(name = "已到账金额", width = 15)
+    @Schema(description = "已到账金额")
+    private BigDecimal receivedAmount;
+	/**创建时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "创建时间")
+    private Date createTime;
+	/**修改时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "修改时间")
+    private Date updateTime;
+
+    @Excel(name = "明细id", width = 15)
+    @Schema(description = "明细id")
+    private String  receipPaymentDetailsId;
+
+
+    @Excel(name = "店铺资金状态", width = 15)
+    @Schema(description = "店铺资金状态  0-启用 1-停用")
+    @TableField(exist = false)
+    private Integer  accountStatus;
+
+    @Excel(name = "店铺名称", width = 15)
+    @Schema(description = "店铺名称  0-启用 1-停用")
+    @TableField(exist = false)
+    private String  siteName;
+
+    @Excel(name = "图片", width = 15)
+    @Schema(description = "图片")
+    @TableField(exist = false)
+    private String  siteCover;
+}

+ 70 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/ShopMoneyHis.java

@@ -0,0 +1,70 @@
+package org.jeecg.modules.system.app.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import org.jeecg.common.constant.ProvinceCityArea;
+import org.jeecg.common.util.SpringContextUtils;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: 变化历史记录表
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Data
+@TableName("nm_shop_money_his")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@Schema(description="变化历史记录表")
+public class ShopMoneyHis implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**id*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @Schema(description = "id")
+    private String id;
+	/**部门编码*/
+	@Excel(name = "部门编码", width = 15)
+    @Schema(description = "部门编码")
+    private String orgCode;
+	/**部门id*/
+	@Excel(name = "部门id", width = 15)
+    @Schema(description = "部门id")
+    private String deptId;
+	/**待结算金额*/
+	@Excel(name = "待结算金额", width = 15)
+    @Schema(description = "待结算金额")
+    private BigDecimal pendSettlementMoney;
+	/**可用余额*/
+	@Excel(name = "可用余额", width = 15)
+    @Schema(description = "可用余额")
+    private BigDecimal canBalance;
+	/**已到账金额*/
+	@Excel(name = "已到账金额", width = 15)
+    @Schema(description = "已到账金额")
+    private BigDecimal receivedAmount;
+	/**创建时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "创建时间")
+    private Date createTime;
+	/**修改时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "修改时间")
+    private Date updateTime;
+}

+ 90 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/StatisticsInfoHis.java

@@ -0,0 +1,90 @@
+package org.jeecg.modules.system.app.entity;
+
+import java.io.Serializable;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import org.jeecg.common.constant.ProvinceCityArea;
+import org.jeecg.common.util.SpringContextUtils;
+import lombok.Data;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+import org.jeecg.common.aspect.annotation.Dict;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Description: 首页统计历史记录表
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Data
+@TableName("nm_statistics_info_his")
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@Schema(description="首页统计历史记录表")
+public class StatisticsInfoHis implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+	/**主键id*/
+	@TableId(type = IdType.ASSIGN_ID)
+    @Schema(description = "主键id")
+    private String id;
+	/**日期 列如20250813*/
+	@Excel(name = "日期 列如20250813", width = 15)
+    @Schema(description = "日期 列如20250813")
+    private Integer dateDaily;
+	/**销售金额*/
+	@Excel(name = "销售金额", width = 15)
+    @Schema(description = "销售金额")
+    private BigDecimal saleMoney;
+	/**有效订单数*/
+	@Excel(name = "有效订单数", width = 15)
+    @Schema(description = "有效订单数")
+    private Integer effectiveOrderNum;
+	/**预计收入*/
+	@Excel(name = "预计收入", width = 15)
+    @Schema(description = "预计收入")
+    private BigDecimal expectIncomeMoney;
+	/**消费人数*/
+	@Excel(name = "消费人数", width = 15)
+    @Schema(description = "消费人数")
+    private Integer consumeNumber;
+	/**新增用户数*/
+	@Excel(name = "新增用户数", width = 15)
+    @Schema(description = "新增用户数")
+    private Integer addNumber;
+	/**机构编码*/
+	@Excel(name = "机构编码", width = 15)
+    @Schema(description = "机构编码")
+    private String orgCode;
+	/**商户id*/
+	@Excel(name = "商户id", width = 15)
+    @Schema(description = "商户id")
+    private String deptId;
+	/**创建时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "创建时间")
+    private Date createTime;
+	/**修改时间*/
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @Schema(description = "修改时间")
+    private Date updateTime;
+	/**明细id*/
+	@Excel(name = "明细id", width = 15)
+    @Schema(description = "明细id")
+    private String receipPaymentDetailsId;
+	/**自增主键*/
+	@Excel(name = "自增主键", width = 15)
+    @Schema(description = "自增主键")
+    private Integer incrementId;
+}

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

@@ -8,10 +8,13 @@ import org.jeecg.modules.app.form.PageOrdersForm;
 import org.jeecg.modules.app.vo.PageOrdersVO;
 import org.jeecg.modules.app.vo.game.GameOrderVo;
 import org.jeecg.modules.quartz.vo.JobClassNoticeVo;
+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 java.time.LocalDate;
+import java.time.LocalTime;
 import java.util.Date;
 import java.util.List;
 
@@ -47,4 +50,8 @@ public interface AppOrderMapper extends BaseMapper<AppOrder> {
     IPage<PageOrdersVO> pageOrders(Page<PageOrdersVO> page, @Param("pageOrdersForm") PageOrdersForm pageOrdersForm);
 
     List<JobClassNoticeVo> findByJob(@Param("hoursBefore") Integer hoursBefore,@Param("date") Date date,@Param("maxRetry")  int maxRetry);
+
+    List<JobReservationSiteVo> findByReservationSite();
+
+    List<JobReservationSiteVo> findByReservationSiteTicket(@Param("currentDate")LocalDate currentDate,@Param("localTime") LocalTime localTime);
 }

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

@@ -0,0 +1,22 @@
+package org.jeecg.modules.system.app.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import org.jeecg.modules.system.app.entity.ReceiptPaymentDetailsInfo;
+
+/**
+ * @Description: 店铺资金明细
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+public interface ReceiptPaymentDetailsInfoMapper extends BaseMapper<ReceiptPaymentDetailsInfo> {
+
+    @Select(" from nm_receipt_payment_details_info where org_code =#{orgCode}  order by increment_id desc limit 1")
+    ReceiptPaymentDetailsInfo findByOrgCode(@Param("orgCode") String orgCode);
+
+    IPage<ReceiptPaymentDetailsInfo> findPage(@Param("receiptPaymentDetailsInfo") Page<ReceiptPaymentDetailsInfo> page, @Param("receiptPaymentDetailsInfo") ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo);
+}

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

@@ -0,0 +1,14 @@
+package org.jeecg.modules.system.app.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.system.app.entity.ShopMoneyHis;
+
+/**
+ * @Description: 变化历史记录表
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+public interface ShopMoneyHisMapper extends BaseMapper<ShopMoneyHis> {
+
+}

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

@@ -0,0 +1,22 @@
+package org.jeecg.modules.system.app.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.system.app.entity.ShopMoney;
+
+/**
+ * @Description: 店铺资金总数
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+public interface ShopMoneyMapper extends BaseMapper<ShopMoney> {
+
+
+//    @Select("select  * from nm_shop_money where org_code =#{orgCode}")
+    ShopMoney findByOrgCode(@Param("orgCode") String orgCode);
+
+    IPage<ShopMoney> findPage(@Param("page")Page<ShopMoney> page, @Param("shopMoney")ShopMoney shopMoney);
+}

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

@@ -0,0 +1,14 @@
+package org.jeecg.modules.system.app.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.system.app.entity.StatisticsInfoHis;
+
+/**
+ * @Description: 首页统计历史记录表
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+public interface StatisticsInfoHisMapper extends BaseMapper<StatisticsInfoHis> {
+
+}

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

@@ -126,4 +126,44 @@
         </if>
         and notify_retry_count = #{maxRetry}
     </select>
+    <select id="findByReservationSite" resultType="org.jeecg.modules.quartz.vo.JobReservationSiteVo">
+        select b.user_open_id,e.`name`,e.id as siteId from nm_order_pro_info a
+        INNER JOIN nm_order b on a.order_id =b.id and b.order_type =0
+        INNER JOIN nm_site_price_rules c  on  a.product_id =c.id and  c.type =0
+        INNER JOIN nm_site_place d on c.site_place_id =d.id
+        INNER JOIN nm_site e on  d.site_id = e.id and e.del_flag =0  and e.type =0
+        GROUP BY b.user_open_id,e.id
+    </select>
+    <select id="findByReservationSiteTicket" resultType="org.jeecg.modules.quartz.vo.JobReservationSiteVo">
+        SELECT
+            e.id as siteId,
+            p.start_time,
+            p.end_time,
+            p.date_of_sale,
+            p.inventory,
+            e.`name` as siteName
+        FROM
+            nm_site_price_rules p
+                INNER JOIN (
+                SELECT
+                    site_place_id,
+                    MIN(start_time) AS min_start_time
+                FROM
+                    nm_site_price_rules
+                WHERE
+                    type = 0
+                  AND view_status = 0
+                  AND date_of_sale = CURDATE()
+                  AND start_time > CURRENT_TIME()
+                GROUP BY
+                    site_place_id
+            ) AS m ON p.site_place_id = m.site_place_id AND p.start_time = m.min_start_time
+                INNER JOIN nm_site_place d on p.site_place_id =d.id
+                INNER JOIN nm_site e on  d.site_id = e.id and e.del_flag =0 and e.type =0
+        WHERE
+            p.type = 0
+          AND p.view_status = 0
+          AND p.date_of_sale = CURDATE()
+          AND p.start_time > CURRENT_TIME();
+    </select>
 </mapper>

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

@@ -0,0 +1,23 @@
+<?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="org.jeecg.modules.system.app.mapper.ReceiptPaymentDetailsInfoMapper">
+
+    <select id="findPage" resultType="org.jeecg.modules.system.app.entity.ReceiptPaymentDetailsInfo">
+        select * from nm_receipt_payment_details_info
+        where 1=1
+        <if test="receiptPaymentDetailsInfo != null and receiptPaymentDetailsInfo != ''">
+            <if test="receiptPaymentDetailsInfo.payType != null">
+            AND a.name =#{receiptPaymentDetailsInfo.payType}
+            </if>
+            <if test="receiptPaymentDetailsInfo.purseChangeReason != null ">
+                AND a.name = #{receiptPaymentDetailsInfo.purseChangeReason}
+            </if>
+            <if test="receiptPaymentDetailsInfo.moneyType != null">
+                AND a.name = #{receiptPaymentDetailsInfo.moneyType}
+            </if>
+            <if test="receiptPaymentDetailsInfo.orgCode != null and receiptPaymentDetailsInfo.orgCode  != ''">
+                AND a.name = #{receiptPaymentDetailsInfo.orgCode}
+            </if>
+        </if>
+    </select>
+</mapper>

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

@@ -0,0 +1,5 @@
+<?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="org.jeecg.modules.system.app.mapper.ShopMoneyHisMapper">
+
+</mapper>

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

@@ -0,0 +1,39 @@
+<?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="org.jeecg.modules.system.app.mapper.ShopMoneyMapper">
+
+    <select id="findByOrgCode" resultType="org.jeecg.modules.system.app.entity.ShopMoney">
+        select  a.id,
+                a.org_code ,
+                a.dept_id ,
+                a.pend_settlement_money ,
+                a.can_balance ,
+                a.received_amount ,
+                a.create_time ,
+                a.update_time ,
+                a.receip_payment_details_id ,
+                b.account_status
+        from nm_shop_money a
+        left join  nm_separate_accounts  b on a.dept_id =b.dept_id
+        where a.org_code =#{orgCode} limit 1
+    </select>
+    <select id="findPage" resultType="org.jeecg.modules.system.app.entity.ShopMoney">
+        SELECT a.id,
+        a.org_code ,
+        a.dept_id ,
+        a.pend_settlement_money ,
+        a.can_balance ,
+        a.received_amount ,
+        a.create_time ,
+        a.update_time ,
+        a.receip_payment_details_id ,
+        b.account_status,b.name as siteName,b.cover as siteCover FROM nm_shop_money a
+        inner join nm_site b on a.org_code = b.org_code
+        where 1=1
+        <if test="shopMoney != null and shopMoney != ''">
+            <if test="shopMoney.siteName != null and shopMoney.siteName  != ''">
+                AND b.name = #{shopMoney.siteName}
+            </if>
+        </if>
+    </select>
+</mapper>

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

@@ -0,0 +1,5 @@
+<?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="org.jeecg.modules.system.app.mapper.StatisticsInfoHisMapper">
+
+</mapper>

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

@@ -4,12 +4,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.app.vo.ScanCodeQueryOrderVO;
 import org.jeecg.modules.quartz.vo.JobClassNoticeVo;
+import org.jeecg.modules.quartz.vo.JobReservationSiteVo;
 import org.jeecg.modules.system.app.dto.AppOrderDTO;
 import org.jeecg.modules.system.app.entity.AppOrder;
 import org.jeecg.modules.system.app.form.AppOrderPageForm;
 import org.jeecg.modules.system.app.vo.AppOrderInfoVO;
 import org.jeecg.modules.system.app.vo.OrderPageVO;
 
+import java.time.LocalDate;
+import java.time.LocalTime;
 import java.util.Date;
 import java.util.List;
 
@@ -58,4 +61,6 @@ public interface IAppOrderService extends IService<AppOrder> {
 
 
     List<JobClassNoticeVo> findByJob(Integer hoursBefore,Date date, int maxRetry);
+
+    List<JobReservationSiteVo> findBySite(LocalDate currentDate, LocalTime localTime);
 }

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

@@ -0,0 +1,22 @@
+package org.jeecg.modules.system.app.service;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.system.app.dto.receiptPaymentDetails.ReceiptPaymentDetailsInfoVo;
+import org.jeecg.modules.system.app.entity.ReceiptPaymentDetailsInfo;
+
+/**
+ * @Description: 店铺资金明细
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+public interface IReceiptPaymentDetailsInfoService extends IService<ReceiptPaymentDetailsInfo> {
+
+    Result<String>  add(ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVo);
+
+    IPage<ReceiptPaymentDetailsInfo> findPage(Page<ReceiptPaymentDetailsInfo> page, ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo);
+}

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

@@ -0,0 +1,14 @@
+package org.jeecg.modules.system.app.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.system.app.entity.ShopMoneyHis;
+
+/**
+ * @Description: 变化历史记录表
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+public interface IShopMoneyHisService extends IService<ShopMoneyHis> {
+
+}

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

@@ -0,0 +1,24 @@
+package org.jeecg.modules.system.app.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+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.ShopMoney;
+
+/**
+ * @Description: 店铺资金总数
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+public interface IShopMoneyService extends IService<ShopMoney> {
+
+    ShopMoney findByOrgCode(String orgCode);
+
+
+    Result<String> add(ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo);
+
+    IPage<ShopMoney> findPage(Page<ShopMoney> page, ShopMoney shopMoney);
+}

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

@@ -0,0 +1,14 @@
+package org.jeecg.modules.system.app.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.system.app.entity.StatisticsInfoHis;
+
+/**
+ * @Description: 首页统计历史记录表
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+public interface IStatisticsInfoHisService extends IService<StatisticsInfoHis> {
+
+}

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

@@ -0,0 +1,21 @@
+package org.jeecg.modules.system.app.service;
+
+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 java.math.BigDecimal;
+
+/**
+ * @Description: 首页统计表
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+public interface IStatisticsInfoService extends IService<StatisticsInfo> {
+
+    Result<String> add(ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo, BigDecimal money);
+
+    StatisticsInfo findByCode(String orgCode);
+}

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

@@ -12,6 +12,7 @@ import org.jeecg.modules.app.vo.AppGameScheduleVO;
 import org.jeecg.modules.app.vo.AppOrderProInfoVerifyVO;
 import org.jeecg.modules.app.vo.ScanCodeQueryOrderVO;
 import org.jeecg.modules.quartz.vo.JobClassNoticeVo;
+import org.jeecg.modules.quartz.vo.JobReservationSiteVo;
 import org.jeecg.modules.system.app.dto.AppOrderDTO;
 import org.jeecg.modules.system.app.dto.IsinUserInfoDTO;
 import org.jeecg.modules.system.app.dto.VerificationRecordDTO;
@@ -29,10 +30,13 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.time.LocalTime;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 /**
@@ -291,4 +295,22 @@ public class AppOrderServiceImpl extends ServiceImpl<AppOrderMapper, AppOrder> i
         return appOrderMapper.findByJob(hoursBefore,date,maxRetry);
     }
 
+    @Override
+    public List<JobReservationSiteVo> findBySite(LocalDate currentDate, LocalTime localTime) {
+        List<JobReservationSiteVo> jobReservationSiteVosOne= appOrderMapper.findByReservationSite();
+        List<JobReservationSiteVo> jobReservationSiteVosTwe= appOrderMapper.findByReservationSiteTicket(currentDate,localTime);
+        // 1. 构建查找Map(O(n)时间复杂度)
+        Map<String, JobReservationSiteVo> aMap = jobReservationSiteVosOne.stream()
+                .collect(Collectors.toMap(JobReservationSiteVo::getSiteId,  Function.identity()));
+
+        // 2. 遍历并赋值(O(n)时间复杂度)
+        jobReservationSiteVosTwe.forEach(b -> {
+            JobReservationSiteVo matchedA = aMap.get(b.getSiteId());
+            if (matchedA != null) {
+                b.setUserOpenId(matchedA.getUserOpenId());
+            }
+        });
+        return jobReservationSiteVosTwe;
+    }
+
 }

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

@@ -0,0 +1,119 @@
+package org.jeecg.modules.system.app.service.impl;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.system.app.dto.receiptPaymentDetails.ReceiptPaymentDetailsInfoVo;
+import org.jeecg.modules.system.app.entity.ReceiptPaymentDetailsInfo;
+import org.jeecg.modules.system.app.mapper.ReceiptPaymentDetailsInfoMapper;
+import org.jeecg.modules.system.app.service.IReceiptPaymentDetailsInfoService;
+import org.jeecg.modules.system.app.service.IShopMoneyService;
+import org.jeecg.modules.system.app.service.IStatisticsInfoService;
+import org.jeecg.modules.system.entity.SysDepart;
+import org.jeecg.modules.system.mapper.SysDepartMapper;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.validation.Valid;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 店铺资金明细
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Service
+public class ReceiptPaymentDetailsInfoServiceImpl extends ServiceImpl<ReceiptPaymentDetailsInfoMapper, ReceiptPaymentDetailsInfo> implements IReceiptPaymentDetailsInfoService {
+
+    @Autowired
+    ReceiptPaymentDetailsInfoMapper receiptPaymentDetailsInfoMapper;
+    SysDepartMapper sysDepartMapper;
+
+    @Autowired
+    IShopMoneyService iShopMoneyService;
+
+    @Autowired
+    IStatisticsInfoService iStatisticsInfoService;
+
+    @Override
+    public Result<String> add(@Valid ReceiptPaymentDetailsInfoVo receiptPaymentDetailsInfoVo) {
+        ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo = new ReceiptPaymentDetailsInfo();
+        BeanUtils.copyProperties(receiptPaymentDetailsInfoVo,receiptPaymentDetailsInfo);
+        if (StringUtils.isEmpty(receiptPaymentDetailsInfo.getOrgCode())){
+            return Result.error("添加资金明细失败,机构编码为空");
+        }
+        if (ObjectUtils.isEmpty(receiptPaymentDetailsInfo.getPurseChangeReason())){
+            return Result.error("添加资金明细失败,资金变化原因为空");
+        }
+        if (receiptPaymentDetailsInfo.getPurseChangeReason()==0||receiptPaymentDetailsInfo.getPurseChangeReason()==1){//用户支付和退款
+            receiptPaymentDetailsInfo.setMoneyType(0);//待结算
+        } else if (receiptPaymentDetailsInfo.getPurseChangeReason()==2) {//分账
+            receiptPaymentDetailsInfo.setMoneyType(1);//可用余额
+        } else if (receiptPaymentDetailsInfo.getPurseChangeReason()==3) {//银行卡导致
+            receiptPaymentDetailsInfo.setMoneyType(2);//已到账金额
+        }
+        SysDepart sysDepart = sysDepartMapper.findByOrgCode(receiptPaymentDetailsInfo.getOrgCode());
+        receiptPaymentDetailsInfo.setDeptId(sysDepart.getId());
+        ReceiptPaymentDetailsInfo receiptPaymentDetailsInfoOld =  receiptPaymentDetailsInfoMapper.findByOrgCode(receiptPaymentDetailsInfo.getOrgCode());
+        BigDecimal bigDecimal =null;
+        if (receiptPaymentDetailsInfoOld==null||receiptPaymentDetailsInfoOld.getAfterMoney()==null){
+            bigDecimal =BigDecimal.ZERO;
+        }else {
+            bigDecimal= receiptPaymentDetailsInfoOld.getAfterMoney();
+        }
+        receiptPaymentDetailsInfo.setBeforeMoney(bigDecimal);
+        receiptPaymentDetailsInfo.setAfterMoney(bigDecimal.add(receiptPaymentDetailsInfo.getChangeMoney()));
+        receiptPaymentDetailsInfo.setChangeMoney(receiptPaymentDetailsInfo.getChangeMoney());
+        receiptPaymentDetailsInfo.setCreateTime(new Date());
+        receiptPaymentDetailsInfo.setUpdateTime(new Date());
+        int insert = receiptPaymentDetailsInfoMapper.insert(receiptPaymentDetailsInfo);
+
+        if (insert!=1){
+            return Result.error("添加资金明细失败");
+        }
+        if (ObjectUtils.isEmpty(receiptPaymentDetailsInfoVo.getDeptType())){
+            return Result.error("添加资金明细成功,保存总额失败,部门类型不能为空");
+        }
+        //需要nm_statistics_info这个表里面插数据 只属于支出和退款进行
+        if (receiptPaymentDetailsInfoVo.getPurseChangeReason()==0||receiptPaymentDetailsInfoVo.getPurseChangeReason()==1){
+            Result<String> addResult = null;
+            try {
+                addResult = iStatisticsInfoService.add(receiptPaymentDetailsInfo,receiptPaymentDetailsInfoVo.getMoney());
+            } catch (Exception e) {
+                log.error("保存首页数据:"+JSONObject.toJSONString(e));
+                log.error("保存首页数据:"+e.getMessage());
+            }
+            if (addResult !=null&&!addResult.isSuccess()){
+                return addResult;
+            }
+        }
+        if (receiptPaymentDetailsInfoVo.getDeptType()==2){
+            Result<String> result= null;
+            try {
+                result = iShopMoneyService.add(receiptPaymentDetailsInfo);
+            } catch (Exception e) {
+                log.error("保存店铺数据:"+JSONObject.toJSONString(e));
+                log.error("保存店铺数据:"+e.getMessage());
+            }
+            if (result !=null&&!result.isSuccess()){
+                return result;
+            }
+        }
+
+
+        return Result.ok("成功");
+    }
+
+    @Override
+    public IPage<ReceiptPaymentDetailsInfo> findPage(Page<ReceiptPaymentDetailsInfo> page, ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo) {
+        return receiptPaymentDetailsInfoMapper.findPage(page,receiptPaymentDetailsInfo);
+    }
+}

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

@@ -0,0 +1,18 @@
+package org.jeecg.modules.system.app.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.system.app.entity.ShopMoneyHis;
+import org.jeecg.modules.system.app.mapper.ShopMoneyHisMapper;
+import org.jeecg.modules.system.app.service.IShopMoneyHisService;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description: 变化历史记录表
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Service
+public class ShopMoneyHisServiceImpl extends ServiceImpl<ShopMoneyHisMapper, ShopMoneyHis> implements IShopMoneyHisService {
+
+}

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

@@ -0,0 +1,115 @@
+package org.jeecg.modules.system.app.service.impl;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.exception.JeecgBootException;
+import org.jeecg.modules.system.app.entity.ReceiptPaymentDetailsInfo;
+import org.jeecg.modules.system.app.entity.ShopMoney;
+import org.jeecg.modules.system.app.entity.ShopMoneyHis;
+import org.jeecg.modules.system.app.mapper.ShopMoneyHisMapper;
+import org.jeecg.modules.system.app.mapper.ShopMoneyMapper;
+import org.jeecg.modules.system.app.service.IShopMoneyService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Description: 店铺资金总数
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Service
+public class ShopMoneyServiceImpl extends ServiceImpl<ShopMoneyMapper, ShopMoney> implements IShopMoneyService {
+
+    @Autowired
+    ShopMoneyMapper shopMoneyMapper;
+
+    @Autowired
+    ShopMoneyHisMapper shopMoneyHisMapper;
+
+
+    @Override
+    public ShopMoney findByOrgCode(String orgCode) {
+        return shopMoneyMapper.findByOrgCode(orgCode);
+    }
+
+    @Override
+    @Transactional
+    public Result<String> add(ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo) {
+        ShopMoney shopMoney= shopMoneyMapper.findByOrgCode(receiptPaymentDetailsInfo.getOrgCode());
+        if (shopMoney==null){
+            if (receiptPaymentDetailsInfo.getPayType()==1){
+                return Result.error("不存在待结算金额,无法进行支出操作");
+            }
+            if (receiptPaymentDetailsInfo.getPayType()==0&&receiptPaymentDetailsInfo.getPurseChangeReason()==2){
+                return Result.error("不存在待结算金额,无法进行提现操作");
+            }
+            shopMoney =  new ShopMoney();
+            BeanUtils.copyProperties(receiptPaymentDetailsInfo,shopMoney);
+            shopMoney.setPendSettlementMoney(receiptPaymentDetailsInfo.getChangeMoney());
+            shopMoney.setReceipPaymentDetailsId(receiptPaymentDetailsInfo.getId());
+        }else {
+            ShopMoneyHis shopMoneyHis = new ShopMoneyHis();
+            BeanUtils.copyProperties(shopMoney,shopMoneyHis);
+            shopMoneyHis.setCreateTime(new Date());
+            shopMoneyHis.setUpdateTime(new Date());
+            int insert = shopMoneyHisMapper.insert(shopMoneyHis);
+            if (insert!=1){
+                throw new JeecgBootException("报错店铺资金历史错误,保存失败");
+//                return Result.error("报错店铺资金错误,保存失败");
+            }
+
+            if (receiptPaymentDetailsInfo.getPurseChangeReason()==2){//分账
+                shopMoney.setCanBalance(shopMoney.getCanBalance().add(receiptPaymentDetailsInfo.getChangeMoney()));
+                BigDecimal bigDecimal = getBigDecimal(shopMoney.getPendSettlementMoney(), receiptPaymentDetailsInfo.getChangeMoney());
+                shopMoney.setPendSettlementMoney(bigDecimal);
+                shopMoney.setUpdateTime(new Date());
+            }else if (receiptPaymentDetailsInfo.getPurseChangeReason()==3){//提现
+                shopMoney.setReceivedAmount( shopMoney.getReceivedAmount().add(receiptPaymentDetailsInfo.getChangeMoney()));
+                BigDecimal bigDecimal = getBigDecimal(shopMoney.getCanBalance(), receiptPaymentDetailsInfo.getChangeMoney());
+                shopMoney.setCanBalance(bigDecimal);
+                shopMoney.setUpdateTime(new Date());
+            }else if (receiptPaymentDetailsInfo.getPurseChangeReason()==1){//退款
+                BigDecimal bigDecimal = getBigDecimal(shopMoney.getPendSettlementMoney(), receiptPaymentDetailsInfo.getChangeMoney());
+                shopMoney.setPendSettlementMoney(bigDecimal);
+                shopMoney.setUpdateTime(new Date());
+            } else if (receiptPaymentDetailsInfo.getPurseChangeReason()==0) {//支付
+                shopMoney.setPendSettlementMoney(shopMoney.getPendSettlementMoney().add(receiptPaymentDetailsInfo.getChangeMoney()));
+                shopMoney.setUpdateTime(new Date());
+            }
+
+        }
+        shopMoney.setReceipPaymentDetailsId(receiptPaymentDetailsInfo.getId());
+        int insertShopMoney = shopMoneyMapper.insert(shopMoney);
+        if (insertShopMoney!=1){
+            throw new JeecgBootException("报错店铺资金错误,保存失败");
+//                return Result.error("报错店铺资金错误,保存失败");
+        }
+        return Result.ok("成功");
+    }
+
+    @Override
+    public IPage<ShopMoney> findPage(Page<ShopMoney> page, ShopMoney shopMoney) {
+        return shopMoneyMapper.findPage(page,shopMoney);
+    }
+
+    private BigDecimal getBigDecimal(BigDecimal bigDecimal1 ,BigDecimal bigDecimal2 ){
+        if (bigDecimal2.compareTo(BigDecimal.ZERO) <= 0) {
+            throw new IllegalArgumentException("扣款金额必须大于0");
+        }
+
+        if (bigDecimal1.compareTo(bigDecimal2) < 0) {
+            throw new IllegalArgumentException("余额不足");
+        }
+
+        return bigDecimal1.subtract(bigDecimal2);
+    }
+}

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

@@ -0,0 +1,18 @@
+package org.jeecg.modules.system.app.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.system.app.entity.StatisticsInfoHis;
+import org.jeecg.modules.system.app.mapper.StatisticsInfoHisMapper;
+import org.jeecg.modules.system.app.service.IStatisticsInfoHisService;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Description: 首页统计历史记录表
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Service
+public class StatisticsInfoHisServiceImpl extends ServiceImpl<StatisticsInfoHisMapper, StatisticsInfoHis> implements IStatisticsInfoHisService {
+
+}

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

@@ -0,0 +1,76 @@
+package org.jeecg.modules.system.app.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.common.api.vo.Result;
+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.StatisticsInfoHisMapper;
+import org.jeecg.modules.system.app.mapper.StatisticsInfoMapper;
+import org.jeecg.modules.system.app.service.IStatisticsInfoService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
+
+/**
+ * @Description: 首页统计表
+ * @Author: jeecg-boot
+ * @Date:   2025-08-18
+ * @Version: V1.0
+ */
+@Service
+public class StatisticsInfoServiceImpl extends ServiceImpl<StatisticsInfoMapper, StatisticsInfo> implements IStatisticsInfoService {
+
+    @Autowired
+    StatisticsInfoMapper statisticsInfoMapper;
+
+    @Autowired
+    StatisticsInfoHisMapper statisticsInfoHisMapper;
+
+    @Override
+    public Result<String> add(ReceiptPaymentDetailsInfo receiptPaymentDetailsInfo,BigDecimal money) {
+        int dateAsInt = Integer.parseInt(
+                LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd"))
+        );
+        StatisticsInfo statisticsInfo= statisticsInfoMapper.findByOrgCode(receiptPaymentDetailsInfo.getOrgCode(),dateAsInt);
+        if (statisticsInfo==null){
+            statisticsInfo =  new StatisticsInfo();
+            BeanUtils.copyProperties(receiptPaymentDetailsInfo,statisticsInfo);
+            statisticsInfo.setDateDaily(dateAsInt);
+        }else {
+            StatisticsInfoHis statisticsInfoHis = new StatisticsInfoHis();
+            BeanUtils.copyProperties(statisticsInfo,statisticsInfoHis);
+            statisticsInfoHis.setCreateTime(new Date());
+            statisticsInfoHis.setUpdateTime(new Date());
+            int insert = statisticsInfoHisMapper.insert(statisticsInfoHis);
+            if (insert!=1){
+                throw new JeecgBootException("报错首页统计历史错误,保存失败");
+            }
+
+        }
+        if (receiptPaymentDetailsInfo.getPayType()==0){
+            statisticsInfo.setConsumeNumber(statisticsInfo.getConsumeNumber()+1);
+            statisticsInfo.setSaleMoney(statisticsInfo.getSaleMoney().add(money));
+            statisticsInfo.setExpectIncomeMoney(statisticsInfo.getExpectIncomeMoney().add(receiptPaymentDetailsInfo.getChangeMoney()));
+            statisticsInfo.setEffectiveOrderNum(statisticsInfo.getEffectiveOrderNum()+1);
+        }else if (receiptPaymentDetailsInfo.getPayType()==1){
+            statisticsInfo.setEffectiveOrderNum(statisticsInfo.getEffectiveOrderNum()-1);
+            statisticsInfo.setSaleMoney(statisticsInfo.getSaleMoney().subtract(money));
+            statisticsInfo.setExpectIncomeMoney(statisticsInfo.getExpectIncomeMoney().subtract(receiptPaymentDetailsInfo.getChangeMoney()));
+        }
+        statisticsInfo.setUpdateTime(new Date());
+        statisticsInfo.setReceipPaymentDetailsId(receiptPaymentDetailsInfo.getId());
+        return Result.ok("成功");
+    }
+
+    @Override
+    public StatisticsInfo findByCode(String orgCode) {
+        return statisticsInfoMapper.findByCode(orgCode);
+    }
+}