From 24f2e1047e0260915ce6e401ec36763974531eed Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Thu, 27 Jun 2024 10:15:23 +0800
Subject: [PATCH] 积木报表+业主大会统计
---
src/main/java/org/springblade/modules/report/service/IReportDbService.java | 42 +
src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml | 14
src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java | 6
src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml | 16
src/main/java/org/springblade/modules/report/service/impl/ReportServiceImpl.java | 43 +
src/main/java/org/springblade/modules/report/vo/ReportVO.java | 35 +
src/main/java/org/springblade/modules/discuss/service/ITopicsService.java | 8
pom.xml | 8
src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml | 39 +
src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java | 5
src/main/java/org/springblade/modules/report/mapper/ReportDbMapper.xml | 15
src/main/java/sql/report.menu.sql | 10
src/main/java/org/springblade/modules/report/wrapper/ReportDbWrapper.java | 50 +
src/main/java/org/springblade/modules/house/service/impl/HouseServiceImpl.java | 5
src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java | 6
src/main/java/org/springblade/modules/house/mapper/HouseMapper.java | 7
src/main/java/org/springblade/modules/discuss/controller/TopicsController.java | 1
src/main/java/org/springblade/modules/eCallEventTwo/controller/ECallEventTwoController.java | 12
src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java | 130 +++++
src/main/java/org/springblade/modules/discuss/vo/PublicDiscussVO.java | 11
src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.java | 6
src/main/java/org/springblade/modules/report/controller/ReportDbController.java | 125 ++++
src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java | 2
src/main/java/org/springblade/modules/discuss/entity/PublicDiscussEntity.java | 51 -
src/main/java/org/springblade/modules/report/mapper/ReportMapper.xml | 15
src/main/java/org/springblade/modules/report/service/impl/ReportDbServiceImpl.java | 42 +
src/main/java/org/springblade/modules/report/service/IReportService.java | 43 +
src/main/java/org/springblade/modules/report/wrapper/ReportWrapper.java | 50 +
src/main/java/sql/reportdb.menu.sql | 10
src/main/java/org/springblade/modules/report/entity/ReportEntity.java | 157 ++++++
src/main/java/org/springblade/modules/report/dto/ReportDbDTO.java | 34 +
src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.java | 3
src/main/java/org/springblade/modules/house/service/IHouseService.java | 6
src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java | 3
src/main/java/org/springblade/modules/discuss/service/IPublicDiscussService.java | 13
src/main/java/org/springblade/modules/report/controller/ReportController.java | 126 ++++
src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java | 8
src/main/java/org/springblade/modules/discuss/controller/PublicDiscussController.java | 46 +
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java | 2
src/main/java/org/springblade/modules/report/mapper/ReportDbMapper.java | 43 +
src/main/java/org/springblade/modules/report/mapper/ReportMapper.java | 43 +
src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java | 3
src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrder.java | 5
src/main/java/org/springblade/modules/report/dto/ReportDTO.java | 34 +
src/main/java/org/springblade/modules/report/vo/ReportDbVO.java | 34 +
src/main/java/org/springblade/modules/report/entity/ReportDbEntity.java | 149 +++++
src/main/resources/application.yml | 4
47 files changed, 1,454 insertions(+), 66 deletions(-)
diff --git a/pom.xml b/pom.xml
index 14bf15d..264992b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -334,6 +334,14 @@
<artifactId>mysql-connector-java</artifactId>
<version>8.0.27</version>
</dependency>
+
+ <!-- JimuReport -->
+ <dependency>
+ <groupId>org.jeecgframework.jimureport</groupId>
+ <artifactId>jimureport-spring-boot-starter</artifactId>
+ <version>1.7.6</version>
+ </dependency>
+
</dependencies>
<build>
diff --git a/src/main/java/org/springblade/modules/discuss/controller/PublicDiscussController.java b/src/main/java/org/springblade/modules/discuss/controller/PublicDiscussController.java
index 5ff7167..fdd353a 100644
--- a/src/main/java/org/springblade/modules/discuss/controller/PublicDiscussController.java
+++ b/src/main/java/org/springblade/modules/discuss/controller/PublicDiscussController.java
@@ -16,7 +16,6 @@
*/
package org.springblade.modules.discuss.controller;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
@@ -29,6 +28,7 @@
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.discuss.dto.TopicsDTO;
import org.springblade.modules.discuss.entity.PublicDiscussEntity;
import org.springblade.modules.discuss.service.IPublicDiscussService;
import org.springblade.modules.discuss.vo.PublicDiscussVO;
@@ -36,6 +36,8 @@
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
/**
* 公益报名与议事 控制器
@@ -127,4 +129,46 @@
}
+ /**
+ * 议事统计
+ * @param publicDiscuss
+ * @return
+ */
+ @GetMapping("/publicDiscussTotal")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "房屋统计", notes = "传入ids")
+ public R publicDiscussTotal(PublicDiscussVO publicDiscuss) {
+ Map<String, Object> result = publicDiscussService.GetPublicDiscussTotal(publicDiscuss);
+ return R.data(result);
+ }
+
+ /**
+ * 议事统计
+ * @param publicDiscuss
+ * @return
+ */
+ @GetMapping("/managementProtocol")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "管理规约", notes = "传入ids")
+ public R managementProtocol(PublicDiscussVO publicDiscuss) {
+ List<TopicsDTO> result = publicDiscussService.managementProtocol(publicDiscuss,1);
+ return R.data(result);
+
+ }
+
+ /**
+ * 议事统计
+ * @param publicDiscuss
+ * @return
+ */
+ @GetMapping("/candidate")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "candidate", notes = "传入ids")
+ public R candidate(PublicDiscussVO publicDiscuss) {
+ List<TopicsDTO> result = publicDiscussService.managementProtocol(publicDiscuss,2);
+ return R.data(result);
+
+ }
+
+
}
diff --git a/src/main/java/org/springblade/modules/discuss/controller/TopicsController.java b/src/main/java/org/springblade/modules/discuss/controller/TopicsController.java
index c84bf62..d237b50 100644
--- a/src/main/java/org/springblade/modules/discuss/controller/TopicsController.java
+++ b/src/main/java/org/springblade/modules/discuss/controller/TopicsController.java
@@ -132,6 +132,7 @@
for (TopicsDTO child : children) {
child.setParentId(topics.getId());
child.setDiscussContent(topics.getDiscussContent());
+ child.setArticleId(topics.getArticleId());
child.setLevel(2);
boolean b2 = topicsService.saveOrUpdate(child);
}
diff --git a/src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java b/src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java
index b3b3f38..205b55b 100644
--- a/src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java
+++ b/src/main/java/org/springblade/modules/discuss/dto/TopicsDTO.java
@@ -16,10 +16,12 @@
*/
package org.springblade.modules.discuss.dto;
+import io.swagger.annotations.ApiModelProperty;
import org.springblade.modules.discuss.entity.TopicsEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
+import java.math.BigDecimal;
import java.util.List;
/**
@@ -40,4 +42,10 @@
private String houseCode;
+ @ApiModelProperty(value = "数量", example = "")
+ private Integer number;
+
+ @ApiModelProperty(value = "比例", example = "")
+ private BigDecimal proportion;
+
}
diff --git a/src/main/java/org/springblade/modules/discuss/entity/PublicDiscussEntity.java b/src/main/java/org/springblade/modules/discuss/entity/PublicDiscussEntity.java
index 04d4ef9..ca597c1 100644
--- a/src/main/java/org/springblade/modules/discuss/entity/PublicDiscussEntity.java
+++ b/src/main/java/org/springblade/modules/discuss/entity/PublicDiscussEntity.java
@@ -44,128 +44,77 @@
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
- /**
- * 标题
- */
@ApiModelProperty(value = "标题", example = "")
@TableField("title")
private String title;
- /**
- * 0 开启:1关闭
- */
@ApiModelProperty(value = "0 开启:1关闭", example = "")
@TableField("open_flag")
private Integer openFlag;
- /**
- * 人数限制:0 不限制
- */
@ApiModelProperty(value = "人数限制:0 不限制", example = "")
@TableField("number_restrictions")
private Integer numberRestrictions;
- /**
- * 投票限制:0 一人一票 1 一户一票
- */
@ApiModelProperty(value = "投票限制:0 一人一票 1 一户一票", example = "")
@TableField("vote_restrictions")
private Integer voteRestrictions;
- /**
- * 用户限制 0 不限制 1 必须绑定手机 2 必须绑定住房
- */
@ApiModelProperty(value = "用户限制 0 不限制 1 必须绑定手机 2 必须绑定住房", example = "")
@TableField("user_restrictions")
private Integer userRestrictions;
- /**
- * 截止时间
- */
@ApiModelProperty(value = "截止时间", example = "")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@TableField("end_time")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
- /**
- * 开始时间
- */
@ApiModelProperty(value = "开始时间", example = "")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@TableField("start_time")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startTime;
- /**
- * 文章id
- */
@ApiModelProperty(value = "文章id", example = "")
@TableField("article_id")
private Integer articleId;
- /**
- * 创建时间
- */
@ApiModelProperty(value = "创建时间", example = "")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime;
- /**
- * 更新时间
- */
@ApiModelProperty(value = "更新时间", example = "")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@TableField(value = "update_time",fill = FieldFill.UPDATE)
private Date updateTime;
- /**
- * 0:否 1 是
- */
@ApiModelProperty(value = "0:否 1 是", example = "")
@TableField("deleted_flag")
@TableLogic
private Integer deletedFlag;
- /**
- * 多房屋可重复投票 0否 1是
- */
@ApiModelProperty(value = "多房屋可重复投票 0否 1是", example = "")
@TableField("repeat_vote")
private Integer repeatVote;
- /**
- * 票数公开 0 全程公开 1 投票后公开 2 投票结束公开 3 不公开
- */
@ApiModelProperty(value = "票数公开 0 全程公开 1 投票后公开 2 投票结束公开 3 不公开", example = "")
@TableField("vote_number_public")
private Integer voteNumberPublic;
- /**
- * 指定用户 0 否 1是
- */
@ApiModelProperty(value = "指定用户 0 否 1是", example = "")
@TableField("appoint_user")
private Integer appointUser;
- /**
- * 指定用户id [ 1,2,3,4,5,6,7,8,9 ]
- */
@ApiModelProperty(value = "指定用户id [ 1,2,3,4,5,6,7,8,9 ]", example = "")
@TableField("user_ids")
private String userIds;
- /**
- * 0:公益报名 1:议事
- */
@ApiModelProperty(value = "0:公益报名 1:议事", example = "")
@TableField("event_type")
private Integer eventType;
- /**
- * 创建人
- */
@ApiModelProperty(value = "创建人", example = "")
@TableField("create_by")
private Long createBy;
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.java b/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.java
index 4ec1125..00b5de8 100644
--- a/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.java
+++ b/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.java
@@ -48,5 +48,11 @@
*/
public List<TopicsDTO> selectTopicsList(TopicsDTO topicsDTO);
+ /**
+ *
+ * @param articleId
+ * @return
+ */
+ List<TopicsDTO> getTopicstotalbyarticleid(Integer articleId);
}
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml b/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
index ef46d1b..113fc29 100644
--- a/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
+++ b/src/main/java/org/springblade/modules/discuss/mapper/TopicsMapper.xml
@@ -143,4 +143,20 @@
</select>
+ <select id="getTopicstotalbyarticleid" resultType="org.springblade.modules.discuss.dto.TopicsDTO">
+
+ SELECT
+ jt.discuss_content,
+ jt.option_content,
+ ( SELECT count( 1 ) FROM jczz_user_topics jut WHERE jut.topics_id = jt.id ) number
+ FROM
+ jczz_topics jt
+ WHERE
+ jt.article_id = #{articleId}
+ AND jt.`level` = 2
+ and jt.delete_flag = 0
+
+ </select>
+
+
</mapper>
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.java b/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.java
index 59d79de..4423163 100644
--- a/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.java
+++ b/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.java
@@ -26,6 +26,7 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
+import java.util.Map;
/**
* 用户议题报表 Mapper 接口
@@ -59,4 +60,6 @@
UserTopicsVO getresult(UserTopicsVO userTopics);
List<holdExcel> getHouseholdList(UserTopicsVO userTopics);
+
+ Map<String, Object> getUserTopicsTotal(Integer articleId);
}
diff --git a/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml b/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml
index 8e4dcfd..95ae488 100644
--- a/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml
+++ b/src/main/java/org/springblade/modules/discuss/mapper/UserTopicsMapper.xml
@@ -266,5 +266,19 @@
GROUP BY id
</select>
+ <select id="getUserTopicsTotal" resultType="java.util.Map">
+ SELECT IFNULL(sum(a.area), 0) AS area,
+ IFNULL(COUNT(1), 0) number
+ FROM (SELECT DISTINCT jut.house_code,
+ jh.area
+ FROM jczz_user_topics jut
+ LEFT JOIN jczz_household jhd ON jhd.id = jut.household_id
+ LEFT JOIN jczz_house jh ON jh.house_code = jhd.house_code
+ LEFT JOIN jczz_topics jt ON jt.id = jut.topics_id
+ AND jt.delete_flag = 0
+ WHERE jut.article_id = #{articleId}) a
+
+ </select>
+
</mapper>
diff --git a/src/main/java/org/springblade/modules/discuss/service/IPublicDiscussService.java b/src/main/java/org/springblade/modules/discuss/service/IPublicDiscussService.java
index 1f1a324..4198e69 100644
--- a/src/main/java/org/springblade/modules/discuss/service/IPublicDiscussService.java
+++ b/src/main/java/org/springblade/modules/discuss/service/IPublicDiscussService.java
@@ -17,10 +17,14 @@
package org.springblade.modules.discuss.service;
import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.discuss.dto.TopicsDTO;
import org.springblade.modules.discuss.entity.PublicDiscussEntity;
import org.springblade.modules.discuss.vo.PublicDiscussVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+import java.util.Map;
/**
* 公益报名与议事 服务类
@@ -41,4 +45,13 @@
PublicDiscussVO getDetail(PublicDiscussVO publicDiscuss);
+
+ /**
+ * 获取统计数据
+ * @param publicDiscuss
+ * @return
+ */
+ Map<String, Object> GetPublicDiscussTotal(PublicDiscussVO publicDiscuss);
+
+ List<TopicsDTO> managementProtocol(PublicDiscussVO publicDiscuss,Integer type);
}
diff --git a/src/main/java/org/springblade/modules/discuss/service/ITopicsService.java b/src/main/java/org/springblade/modules/discuss/service/ITopicsService.java
index c20d3d7..761ca43 100644
--- a/src/main/java/org/springblade/modules/discuss/service/ITopicsService.java
+++ b/src/main/java/org/springblade/modules/discuss/service/ITopicsService.java
@@ -49,5 +49,13 @@
*/
public List<TopicsDTO> selectTopicsList(TopicsDTO topicsDTO);
+ /**
+ * 根据文章id查询用户参与次数
+ * @param articleId
+ * @return
+ */
+ List<TopicsDTO> getTopicsTotalByArticleId(Integer articleId);
+
+
}
diff --git a/src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java b/src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java
index f34c44b..baedfd0 100644
--- a/src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java
+++ b/src/main/java/org/springblade/modules/discuss/service/IUserTopicsService.java
@@ -25,6 +25,7 @@
import java.io.OutputStream;
import java.util.List;
+import java.util.Map;
/**
* 用户议题报表 服务类
@@ -53,4 +54,6 @@
Boolean saveUserTopicsEntity(UserTopicsEntity userTopics);
void handleExcel(OutputStream out,UserTopicsVO userTopics);
+
+ Map<String,Object> getUserTopicsTotal(Integer articleId);
}
diff --git a/src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java b/src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java
index aa99403..52b9ac7 100644
--- a/src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java
+++ b/src/main/java/org/springblade/modules/discuss/service/impl/PublicDiscussServiceImpl.java
@@ -19,25 +19,39 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.xxl.job.core.util.DateUtil;
import org.springblade.common.constant.CommonConstant;
import org.springblade.common.utils.SpringUtils;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.article.entity.Article;
+import org.springblade.modules.article.service.ArticleService;
+import org.springblade.modules.discuss.dto.TopicsDTO;
import org.springblade.modules.discuss.entity.PublicDiscussEntity;
import org.springblade.modules.discuss.entity.UserTopicsEntity;
import org.springblade.modules.discuss.mapper.PublicDiscussMapper;
import org.springblade.modules.discuss.service.IPublicDiscussService;
+import org.springblade.modules.discuss.service.ITopicsService;
import org.springblade.modules.discuss.service.IUserPublicEnrollService;
import org.springblade.modules.discuss.service.IUserTopicsService;
import org.springblade.modules.discuss.vo.PublicDiscussVO;
import org.springblade.modules.discuss.vo.UserTopicsVO;
+import org.springblade.modules.district.entity.DistrictEntity;
+import org.springblade.modules.district.service.IDistrictService;
import org.springblade.modules.house.entity.HouseholdEntity;
+import org.springblade.modules.house.service.IHouseService;
import org.springblade.modules.house.service.IHouseholdService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.util.Comparator;
+import java.util.Date;
import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
/**
* 公益报名与议事 服务实现类
@@ -113,4 +127,120 @@
}
return publicDiscussVO;
}
+
+ @Override
+ public Map<String, Object> GetPublicDiscussTotal(PublicDiscussVO publicDiscuss) {
+ // 参与房屋投票的总数
+ IDistrictService districtService = SpringUtils.getBean(IDistrictService.class);
+ // 获取文章信息
+ PublicDiscussEntity discussEntity = getOne(Wrappers.<PublicDiscussEntity>lambdaQuery().eq(PublicDiscussEntity::getArticleId, publicDiscuss.getArticleId()));
+ ArticleService articleService = SpringUtils.getBean(ArticleService.class);
+ Article serviceOne = articleService.getOne(Wrappers.<Article>lambdaQuery().eq(Article::getId, publicDiscuss.getArticleId()));
+ String articleRange = serviceOne.getArticleRange();
+ List<String> strings = Func.toStrList(articleRange);
+ // 获取小区信息
+ List<DistrictEntity> list = districtService.list(Wrappers.<DistrictEntity>lambdaQuery()
+ .in(DistrictEntity::getId, strings));
+ List<String> aoiCodeList = list.stream().map(districtEntity -> districtEntity.getAoiCode()).collect(Collectors.toList());
+
+ IHouseService iHouseService = SpringUtils.getBean(IHouseService.class);
+ // 获取小区房屋总数和面积
+ Map<String, Object> buildingAreaStatistics = iHouseService.getHoseTotalAndAreaTotalByDistrictCode(aoiCodeList);
+ // 获取投票数量和面积
+ IUserTopicsService userTopicsService = SpringUtils.getBean(IUserTopicsService.class);
+ Map<String, Object> userTopicsTotal = userTopicsService.getUserTopicsTotal(discussEntity.getArticleId());
+ // 投票详情统计
+ ITopicsService iTopicsService = SpringUtils.getBean(ITopicsService.class);
+ List<TopicsDTO> userTopicsTotalByArticleId = iTopicsService.getTopicsTotalByArticleId(discussEntity.getArticleId());
+ // 已投票房屋面积
+ BigDecimal areaCount = (BigDecimal) userTopicsTotal.get("area");
+ // 已投票房屋数量
+ BigDecimal numberCount = BigDecimal.valueOf((Long) userTopicsTotal.get("number"));
+ // 总房屋数量
+ BigDecimal houseCount = BigDecimal.valueOf((Long) buildingAreaStatistics.get("houseCount"));
+ // 总房屋面积
+ BigDecimal houseAreaCount = (BigDecimal) buildingAreaStatistics.get("houseArea");
+
+ // 已完成房屋投票数量占比
+ if (houseCount.compareTo(BigDecimal.ZERO) > 0) {
+ BigDecimal divide = numberCount.divide(houseCount, 4, BigDecimal.ROUND_HALF_UP);
+ // 将结果乘以100得到百分比形式,然后设置为2位小数
+ // 这里保持了原有的功能和精度要求
+ userTopicsTotal.put("houseProportion", divide.multiply(BigDecimal.valueOf(100)).setScale(2));
+ }
+ if (houseAreaCount.compareTo(BigDecimal.ZERO) > 0) {
+ // 已完成房屋投票面积占比
+ BigDecimal divide1 = areaCount.divide(houseAreaCount, 4, BigDecimal.ROUND_HALF_UP);
+ // 将结果乘以100得到百分比形式,然后设置为2位小数
+ // 这里保持了原有的功能和精度要求
+ userTopicsTotal.put("areaProportion", divide1.multiply(BigDecimal.valueOf(100)).setScale(2));
+ }
+ buildingAreaStatistics.putAll(userTopicsTotal);
+ // 设置小区名称
+ StringBuffer stringBuffer = new StringBuffer();
+ for (DistrictEntity districtEntity : list) {
+ if (stringBuffer.length() > 0) {
+ stringBuffer.append(",");
+ }
+ stringBuffer.append(districtEntity.getName());
+ }
+ buildingAreaStatistics.put("districtName", stringBuffer.toString());
+ // 设置当前时间并且格式化时间
+ buildingAreaStatistics.put("time", DateUtil.format(new Date(), "yyyy-MM-dd"));
+ return buildingAreaStatistics;
+ }
+
+ @Override
+ public List<TopicsDTO> managementProtocol(PublicDiscussVO publicDiscuss, Integer type) {
+ // 参与房屋投票的总数
+ IDistrictService districtService = SpringUtils.getBean(IDistrictService.class);
+ PublicDiscussEntity discussEntity = getOne(Wrappers.<PublicDiscussEntity>lambdaQuery().eq(PublicDiscussEntity::getArticleId, publicDiscuss.getArticleId()));
+ ArticleService articleService = SpringUtils.getBean(ArticleService.class);
+ Article serviceOne = articleService.getOne(Wrappers.<Article>lambdaQuery().eq(Article::getId, publicDiscuss.getArticleId()));
+ String articleRange = serviceOne.getArticleRange();
+ List<String> strings = Func.toStrList(articleRange);
+ // 获取小区信息
+ List<DistrictEntity> list = districtService.list(Wrappers.<DistrictEntity>lambdaQuery()
+ .in(DistrictEntity::getId, strings));
+ List<String> aoiCodeList = list.stream().map(districtEntity -> districtEntity.getAoiCode()).collect(Collectors.toList());
+ // 投票详情统计
+ ITopicsService iTopicsService = SpringUtils.getBean(ITopicsService.class);
+ List<TopicsDTO> userTopicsTotalByArticleId = iTopicsService.getTopicsTotalByArticleId(discussEntity.getArticleId());
+ // 按投票数量排序
+ List<TopicsDTO> collect = userTopicsTotalByArticleId.stream().sorted(Comparator.comparing(TopicsDTO::getNumber).reversed()).collect(Collectors.toList());
+
+ if (type == 2) {
+ // 获取候选人
+ List<TopicsDTO> candidate = collect.stream().filter(topicsDTO ->
+ !(topicsDTO.getDiscussContent().equals("管理规约") || topicsDTO.getDiscussContent().equals("议事规则")))
+ .collect(Collectors.toList());
+ Integer candidateNumber = candidate.stream().map(TopicsDTO::getNumber).reduce(0, Integer::sum);
+ // 计算投票的占比
+ candidate.forEach(topicsDTO -> {
+ BigDecimal number = new BigDecimal(topicsDTO.getNumber());
+ BigDecimal total = new BigDecimal(candidateNumber);
+ if (total.compareTo(BigDecimal.ZERO) > 0) {
+ BigDecimal divide = number.divide(total, 4, BigDecimal.ROUND_HALF_UP);
+ topicsDTO.setProportion(divide.multiply(BigDecimal.valueOf(100)).setScale(2));
+ }
+ });
+ return candidate;
+ } else {
+ // 获取管理规约和议事规则
+ List<TopicsDTO> managementProtocol = collect.stream().filter(topicsDTO ->
+ topicsDTO.getDiscussContent().equals("管理规约") || topicsDTO.getDiscussContent().equals("议事规则"))
+ .collect(Collectors.toList());
+ Integer managementProtocolNumber = managementProtocol.stream().map(TopicsDTO::getNumber).reduce(0, Integer::sum);
+ // 计算投票的占比
+ managementProtocol.forEach(topicsDTO -> {
+ BigDecimal number = new BigDecimal(topicsDTO.getNumber());
+ BigDecimal total = new BigDecimal(managementProtocolNumber);
+ if (total.compareTo(BigDecimal.ZERO) > 0) {
+ BigDecimal divide = number.divide(total, 4, BigDecimal.ROUND_HALF_UP);
+ topicsDTO.setProportion(divide.multiply(BigDecimal.valueOf(100)).setScale(2));
+ }
+ });
+ return managementProtocol;
+ }
+ }
}
diff --git a/src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java b/src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java
index 4d3201f..7febe6a 100644
--- a/src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java
+++ b/src/main/java/org/springblade/modules/discuss/service/impl/TopicsServiceImpl.java
@@ -68,4 +68,9 @@
}
return baseMapper.selectTopicsList(topicsDTO);
}
+
+ @Override
+ public List<TopicsDTO> getTopicsTotalByArticleId(Integer articleId) {
+ return baseMapper.getTopicstotalbyarticleid(articleId);
+ }
}
diff --git a/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java b/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java
index a05a1ed..a72ce12 100644
--- a/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java
+++ b/src/main/java/org/springblade/modules/discuss/service/impl/UserTopicsServiceImpl.java
@@ -64,6 +64,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import java.util.Map;
import java.util.stream.Collectors;
/**
@@ -417,4 +418,9 @@
list.addAll(userTopicsExcels);
return list;
}
+
+ @Override
+ public Map<String, Object> getUserTopicsTotal(Integer articleId) {
+ return baseMapper.getUserTopicsTotal(articleId);
+ }
}
diff --git a/src/main/java/org/springblade/modules/discuss/vo/PublicDiscussVO.java b/src/main/java/org/springblade/modules/discuss/vo/PublicDiscussVO.java
index 13b69aa..2b11f71 100644
--- a/src/main/java/org/springblade/modules/discuss/vo/PublicDiscussVO.java
+++ b/src/main/java/org/springblade/modules/discuss/vo/PublicDiscussVO.java
@@ -16,6 +16,7 @@
*/
package org.springblade.modules.discuss.vo;
+import io.swagger.annotations.ApiModelProperty;
import org.springblade.modules.discuss.entity.PublicDiscussEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
@@ -32,15 +33,25 @@
public class PublicDiscussVO extends PublicDiscussEntity {
private static final long serialVersionUID = 1L;
+ @ApiModelProperty(value = "报名人数")
private Integer enrollCount;
+ @ApiModelProperty(value = "投票人数")
private Integer topsCount;
+ @ApiModelProperty(value = "住户id")
private Long householdId;
+
+ @ApiModelProperty(value = "住户姓名")
private String userName;
+ @ApiModelProperty(value = "地址编码")
private String houseCode;
+ @ApiModelProperty(value = "是否禁用")
private Boolean disabled;
+ @ApiModelProperty(value = "小区id")
+ private String districtId;
+
}
diff --git a/src/main/java/org/springblade/modules/eCallEventTwo/controller/ECallEventTwoController.java b/src/main/java/org/springblade/modules/eCallEventTwo/controller/ECallEventTwoController.java
index 825c388..b608531 100644
--- a/src/main/java/org/springblade/modules/eCallEventTwo/controller/ECallEventTwoController.java
+++ b/src/main/java/org/springblade/modules/eCallEventTwo/controller/ECallEventTwoController.java
@@ -38,6 +38,9 @@
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.temporal.ChronoUnit;
import java.util.List;
import java.util.Map;
@@ -138,7 +141,16 @@
@ApiOperationSupport(order = 8)
@ApiOperation(value = "工单 同步")
public R synchronizeData() {
+ // 创建居住证发送短信定时任务
EcOrderParamDTO ecOrderParamDTO = new EcOrderParamDTO();
+ // 获取当前日期时间
+ LocalDateTime now = LocalDateTime.now();
+ // 获取前一天的开始时间
+ LocalDateTime yesterdayStart = now.minus(1, ChronoUnit.DAYS).with(LocalTime.MIN);
+ // 获取前一天的结束时间
+ LocalDateTime yesterdayEnd = now.minus(1, ChronoUnit.DAYS).with(LocalTime.MAX);
+ ecOrderParamDTO.setEndTime(yesterdayEnd);
+ ecOrderParamDTO.setStartTime(yesterdayStart);
boolean b = ecOrderService.SynchronizeData(ecOrderParamDTO);
return R.status(b);
}
diff --git a/src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrder.java b/src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrder.java
index f02f54e..76a51cd 100644
--- a/src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrder.java
+++ b/src/main/java/org/springblade/modules/eCallEventTwo/entity/EcOrder.java
@@ -384,4 +384,9 @@
@ApiModelProperty(value = "核实/督办(N1/N2)", example = "")
@TableField("tag_redo")
private String tagRedo;
+
+ @ApiModelProperty(value = "导入时间", example = "")
+ @TableField("import_time")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date importTime;
}
diff --git a/src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java b/src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java
index 7639b48..2ff5910 100644
--- a/src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java
+++ b/src/main/java/org/springblade/modules/eCallEventTwo/service/impl/EcOrderServiceImpl.java
@@ -22,6 +22,7 @@
import org.springblade.modules.police.service.IPoliceAffairsGridService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.math.RoundingMode;
@@ -111,13 +112,16 @@
}
@Override
+ @Transactional(rollbackFor = Exception.class)
public boolean SynchronizeData(EcOrderParamDTO ecOrderParamDTO) {
processPages(100, ecOrderParamDTO);
return true;
}
public void processPages(int pageSize, EcOrderParamDTO ecOrderParamDTO) {
- long count = count(new QueryWrapper<>());
+ QueryWrapper<EcOrder> ecOrderQueryWrapper = new QueryWrapper<>();
+ ecOrderQueryWrapper.between("import_time", ecOrderParamDTO.getStartTime(), ecOrderParamDTO.getEndTime());
+ long count = baseMapper.selectCount(ecOrderQueryWrapper);
int totalPages = (int) Math.ceil((double) count / pageSize); // 计算总页数
for (int pageNum = 1; pageNum <= totalPages; pageNum++) {
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.java b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.java
index 97c0892..2bce2d3 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.java
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.java
@@ -162,4 +162,11 @@
* @return
*/
List<HouseVO> getNotBindLabelHouseList(@Param("i") int i,@Param("size") int size);
+
+ /**
+ *
+ * @param aoiCodeList
+ * @return
+ */
+ Map<String, Object> getHoseTotalAndAreaTotalByDistrictCode(List<String> aoiCodeList);
}
diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
index c1a00b2..9fbd3de 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -955,16 +955,37 @@
select house_code from jczz_household where is_deleted = 0 and relationship = 1 and house_code is not null and house_code != '' GROUP BY house_code
) a on a.house_code = jh.house_code
left join
- (
- select house_code from jczz_household where is_deleted = 0 and relationship = 18 and house_code is not null and house_code != '' GROUP BY house_code
- ) b on b.house_code = jh.house_code
+ (select house_code
+ from jczz_household
+ where is_deleted = 0
+ and relationship = 18
+ and house_code is not null
+ and house_code != ''
+ GROUP BY house_code) b on b.house_code = jh.house_code
left join
- (
- select house_code from jczz_household where is_deleted = 0 and relationship is null or (relationship!=1 and relationship!=18) and house_code is not null and house_code != '' GROUP BY house_code
- ) c on c.house_code = jh.house_code
- ) d left join jczz_user_house_label juhl on d.house_code = juhl.house_code and lable_type = 2
- where juhl.id is null and status is not null
- limit #{i},#{size}
+ (select house_code
+ from jczz_household
+ where is_deleted = 0 and relationship is null
+ or (relationship!=1 and relationship!=18) and house_code is not null and house_code != ''
+ GROUP BY house_code) c on c.house_code = jh.house_code) d
+ left join jczz_user_house_label juhl on d.house_code = juhl.house_code and lable_type = 2
+ where juhl.id is null
+ and status is not null
+ limit #{i}
+ , #{size}
+ </select>
+ <select id="getHoseTotalAndAreaTotalByDistrictCode" resultType="java.util.Map">
+
+ SELECT
+ count( 1 ) AS houseCount,
+ IFNULL(sum( area ),0) AS houseArea
+ FROM
+ jczz_house jh
+ WHERE
+ jh.district_code in
+ <foreach collection="aoiCodeList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
</select>
diff --git a/src/main/java/org/springblade/modules/house/service/IHouseService.java b/src/main/java/org/springblade/modules/house/service/IHouseService.java
index 63bad26..91fda94 100644
--- a/src/main/java/org/springblade/modules/house/service/IHouseService.java
+++ b/src/main/java/org/springblade/modules/house/service/IHouseService.java
@@ -144,4 +144,10 @@
* @param householdEntity
*/
void saveOrUpdateUser(HouseholdEntity householdEntity);
+
+ /**
+ * 获取房屋总数和房屋面积总数
+ * @return
+ */
+ Map<String, Object> getHoseTotalAndAreaTotalByDistrictCode(List<String> aoiCodeList);
}
diff --git a/src/main/java/org/springblade/modules/house/service/impl/HouseServiceImpl.java b/src/main/java/org/springblade/modules/house/service/impl/HouseServiceImpl.java
index c769e97..6c4f708 100644
--- a/src/main/java/org/springblade/modules/house/service/impl/HouseServiceImpl.java
+++ b/src/main/java/org/springblade/modules/house/service/impl/HouseServiceImpl.java
@@ -1026,4 +1026,9 @@
}
return true;
}
+
+ @Override
+ public Map<String, Object> getHoseTotalAndAreaTotalByDistrictCode(List<String> aoiCodeList) {
+ return baseMapper.getHoseTotalAndAreaTotalByDistrictCode(aoiCodeList);
+ }
}
diff --git a/src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java b/src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java
index e6c6148..6246fa7 100644
--- a/src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java
+++ b/src/main/java/org/springblade/modules/house/service/impl/HouseholdServiceImpl.java
@@ -455,7 +455,7 @@
}
}
// 判断是否租户导入
- if (StringUtils.isNotBlank(isTenant) || householdEntity.getRelationship() == 18) {
+ if (StringUtils.isNotBlank(isTenant) || (householdEntity.getRelationship() != null && householdEntity.getRelationship() == 18)) {
householdEntity.setRelationship(18);
HouseRentalEntity houseRentalEntity = iHouseRentalService.getOne(Wrappers.<HouseRentalEntity>lambdaQuery()
.eq(HouseRentalEntity::getHouseCode, householdEntity.getHouseCode()).last("limit 1"));
diff --git a/src/main/java/org/springblade/modules/report/controller/ReportController.java b/src/main/java/org/springblade/modules/report/controller/ReportController.java
new file mode 100644
index 0000000..c6e51c6
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/controller/ReportController.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.report.entity.ReportEntity;
+import org.springblade.modules.report.vo.ReportVO;
+import org.springblade.modules.report.wrapper.ReportWrapper;
+import org.springblade.modules.report.service.IReportService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 在线excel设计器 控制器
+ *
+ * @author BladeX
+ * @since 2024-06-27
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("blade-report/report")
+@Api(value = "在线excel设计器", tags = "在线excel设计器接口")
+public class ReportController extends BladeController {
+
+ private final IReportService reportService;
+
+ /**
+ * 在线excel设计器 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入report")
+ public R<ReportVO> detail(ReportEntity report) {
+ ReportEntity detail = reportService.getOne(Condition.getQueryWrapper(report));
+ return R.data(ReportWrapper.build().entityVO(detail));
+ }
+ /**
+ * 在线excel设计器 分页
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入report")
+ public R<IPage<ReportVO>> list(ReportEntity report, Query query) {
+ IPage<ReportEntity> pages = reportService.page(Condition.getPage(query), Condition.getQueryWrapper(report));
+ return R.data(ReportWrapper.build().pageVO(pages));
+ }
+
+ /**
+ * 在线excel设计器 自定义分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入report")
+ public R<IPage<ReportVO>> page(ReportVO report, Query query) {
+ IPage<ReportVO> pages = reportService.selectReportPage(Condition.getPage(query), report);
+ return R.data(pages);
+ }
+
+ /**
+ * 在线excel设计器 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入report")
+ public R save(@Valid @RequestBody ReportEntity report) {
+ return R.status(reportService.save(report));
+ }
+
+ /**
+ * 在线excel设计器 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入report")
+ public R update(@Valid @RequestBody ReportEntity report) {
+ return R.status(reportService.updateById(report));
+ }
+
+ /**
+ * 在线excel设计器 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入report")
+ public R submit(@Valid @RequestBody ReportEntity report) {
+ return R.status(reportService.saveOrUpdate(report));
+ }
+
+ /**
+ * 在线excel设计器 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "逻辑删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(reportService.removeBatchByIds(Func.toStrList(ids)));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/report/controller/ReportDbController.java b/src/main/java/org/springblade/modules/report/controller/ReportDbController.java
new file mode 100644
index 0000000..7457c29
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/controller/ReportDbController.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.report.entity.ReportDbEntity;
+import org.springblade.modules.report.vo.ReportDbVO;
+import org.springblade.modules.report.wrapper.ReportDbWrapper;
+import org.springblade.modules.report.service.IReportDbService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 积木报表表 控制器
+ *
+ * @author BladeX
+ * @since 2024-06-26
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("blade-reportDb/reportDb")
+@Api(value = "积木报表表", tags = "积木报表表接口")
+public class ReportDbController extends BladeController {
+
+ private final IReportDbService reportDbService;
+
+ /**
+ * 积木报表表 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入reportDb")
+ public R<ReportDbVO> detail(ReportDbEntity reportDb) {
+ ReportDbEntity detail = reportDbService.getOne(Condition.getQueryWrapper(reportDb));
+ return R.data(ReportDbWrapper.build().entityVO(detail));
+ }
+ /**
+ * 积木报表表 分页
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入reportDb")
+ public R<IPage<ReportDbVO>> list(ReportDbEntity reportDb, Query query) {
+ IPage<ReportDbEntity> pages = reportDbService.page(Condition.getPage(query), Condition.getQueryWrapper(reportDb));
+ return R.data(ReportDbWrapper.build().pageVO(pages));
+ }
+
+ /**
+ * 积木报表表 自定义分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入reportDb")
+ public R<IPage<ReportDbVO>> page(ReportDbVO reportDb, Query query) {
+ IPage<ReportDbVO> pages = reportDbService.selectReportDbPage(Condition.getPage(query), reportDb);
+ return R.data(pages);
+ }
+
+ /**
+ * 积木报表表 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入reportDb")
+ public R save(@Valid @RequestBody ReportDbEntity reportDb) {
+ return R.status(reportDbService.save(reportDb));
+ }
+
+ /**
+ * 积木报表表 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入reportDb")
+ public R update(@Valid @RequestBody ReportDbEntity reportDb) {
+ return R.status(reportDbService.updateById(reportDb));
+ }
+
+ /**
+ * 积木报表表 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入reportDb")
+ public R submit(@Valid @RequestBody ReportDbEntity reportDb) {
+ return R.status(reportDbService.saveOrUpdate(reportDb));
+ }
+
+ /**
+ * 积木报表表 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "逻辑删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(reportDbService.removeBatchByIds(Func.toLongList(ids)));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/report/dto/ReportDTO.java b/src/main/java/org/springblade/modules/report/dto/ReportDTO.java
new file mode 100644
index 0000000..c09afac
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/dto/ReportDTO.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.dto;
+
+import org.springblade.modules.report.entity.ReportEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 在线excel设计器 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-06-27
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ReportDTO extends ReportEntity {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/report/dto/ReportDbDTO.java b/src/main/java/org/springblade/modules/report/dto/ReportDbDTO.java
new file mode 100644
index 0000000..134ef41
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/dto/ReportDbDTO.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.dto;
+
+import org.springblade.modules.report.entity.ReportDbEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据源 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-06-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ReportDbDTO extends ReportDbEntity {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/report/entity/ReportDbEntity.java b/src/main/java/org/springblade/modules/report/entity/ReportDbEntity.java
new file mode 100644
index 0000000..ed282f9
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/entity/ReportDbEntity.java
@@ -0,0 +1,149 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.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.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 积木报表表 实体类
+ *
+ * @author BladeX
+ * @since 2024-06-26
+ */
+
+/**
+ * 对象 jimu_report_db
+ *
+ * @author ${context.author}
+ * @date 2024-06-26 14:26:27
+ */
+@ApiModel(value = "JimuReportDb对象", description = "")
+@Data
+@TableName("jimu_report_db")
+public class ReportDbEntity implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+
+ @ApiModelProperty(value = "主键ID", example = "")
+ @TableId(value = "id", type = IdType.ASSIGN_UUID)
+ private String id;
+
+ @ApiModelProperty(value = "主键字段", example = "")
+ @TableField("jimu_report_id")
+ private String jimuReportId;
+
+ @ApiModelProperty(value = "创建人登录名称", example = "")
+ @TableField("create_by")
+ private String createBy;
+
+ @ApiModelProperty(value = "更新人登录名称", example = "")
+ @TableField("update_by")
+ private String updateBy;
+
+ @ApiModelProperty(value = "创建日期", example = "")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @TableField("create_time")
+ private Date createTime;
+
+ @ApiModelProperty(value = "更新日期", example = "")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @TableField("update_time")
+ private Date updateTime;
+
+ @ApiModelProperty(value = "数据集编码", example = "")
+ @TableField("db_code")
+ private String dbCode;
+
+ @ApiModelProperty(value = "数据集名字", example = "")
+ @TableField("db_ch_name")
+ private String dbChName;
+
+ @ApiModelProperty(value = "数据源类型", example = "")
+ @TableField("db_type")
+ private String dbType;
+
+ @ApiModelProperty(value = "数据库表名", example = "")
+ @TableField("db_table_name")
+ private String dbTableName;
+
+ @ApiModelProperty(value = "动态查询SQL", example = "")
+ @TableField("db_dyn_sql")
+ private String dbDynSql;
+
+ @ApiModelProperty(value = "数据源KEY", example = "")
+ @TableField("db_key")
+ private String dbKey;
+
+ @ApiModelProperty(value = "填报数据源", example = "")
+ @TableField("tb_db_key")
+ private String tbDbKey;
+
+ @ApiModelProperty(value = "填报数据表", example = "")
+ @TableField("tb_db_table_name")
+ private String tbDbTableName;
+
+ @ApiModelProperty(value = "java类数据集 类型(spring:springkey,class:java类名)", example = "")
+ @TableField("java_type")
+ private String javaType;
+
+ @ApiModelProperty(value = "java类数据源 数值(bean key/java类名)", example = "")
+ @TableField("java_value")
+ private String javaValue;
+
+ @ApiModelProperty(value = "请求地址", example = "")
+ @TableField("api_url")
+ private String apiUrl;
+
+ @ApiModelProperty(value = "请求方法0-get,1-post", example = "")
+ @TableField("api_method")
+ private String apiMethod;
+
+ @ApiModelProperty(value = "是否是列表0否1是 默认0", example = "")
+ @TableField("is_list")
+ private String isList;
+
+ @ApiModelProperty(value = "是否作为分页,0:不分页,1:分页", example = "")
+ @TableField("is_page")
+ private String isPage;
+
+ @ApiModelProperty(value = "数据源", example = "")
+ @TableField("db_source")
+ private String dbSource;
+
+ @ApiModelProperty(value = "数据库类型 MYSQL ORACLE SQLSERVER", example = "")
+ @TableField("db_source_type")
+ private String dbSourceType;
+
+ @ApiModelProperty(value = "json数据,直接解析json内容", example = "")
+ @TableField("json_data")
+ private String jsonData;
+
+ @ApiModelProperty(value = "api转换器", example = "")
+ @TableField("api_convert")
+ private String apiConvert;
+}
+
diff --git a/src/main/java/org/springblade/modules/report/entity/ReportEntity.java b/src/main/java/org/springblade/modules/report/entity/ReportEntity.java
new file mode 100644
index 0000000..458010f
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/entity/ReportEntity.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.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 lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.tenant.mp.TenantEntity;
+
+import java.util.Date;
+
+/**
+ * 在线excel设计器 实体类
+ *
+ * @author BladeX
+ * @since 2024-06-27
+ */
+@Data
+@TableName("jimu_report")
+@ApiModel(value = "Report对象", description = "在线excel设计器")
+public class ReportEntity {
+
+ private static final long serialVersionUID = 1L;
+
+
+ /** 主键 */
+ @ApiModelProperty(value = "主键ID", example = "")
+ @TableId(value = "id", type = IdType.ASSIGN_UUID)
+ private String id;
+
+ /** 编码 */
+ @ApiModelProperty(value = "编码", example = "")
+ @TableField("code")
+ private String code;
+
+ /** 名称 */
+ @ApiModelProperty(value = "名称", example = "")
+ @TableField("name")
+ private String name;
+
+ /** 说明 */
+ @ApiModelProperty(value = "说明", example = "")
+ @TableField("note")
+ private String note;
+
+ /** 状态 */
+ @ApiModelProperty(value = "状态", example = "")
+ @TableField("status")
+ private String status;
+
+ /** 类型 */
+ @ApiModelProperty(value = "类型", example = "")
+ @TableField("type")
+ private String type;
+
+ /** json字符串 */
+ @ApiModelProperty(value = "json字符串", example = "")
+ @TableField("json_str")
+ private String jsonStr;
+
+ /** 请求地址 */
+ @ApiModelProperty(value = "请求地址", example = "")
+ @TableField("api_url")
+ private String apiUrl;
+
+ /** 缩略图 */
+ @ApiModelProperty(value = "缩略图", example = "")
+ @TableField("thumb")
+ private String thumb;
+
+ /** 创建人 */
+ @ApiModelProperty(value = "创建人", example = "")
+ @TableField("create_by")
+ private String createBy;
+
+ /** 创建时间 */
+ @ApiModelProperty(value = "创建时间", example = "")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @TableField("create_time")
+ private Date createTime;
+
+ /** 修改人 */
+ @ApiModelProperty(value = "修改人", example = "")
+ @TableField("update_by")
+ private String updateBy;
+
+ /** 修改时间 */
+ @ApiModelProperty(value = "修改时间", example = "")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @TableField("update_time")
+ private Date updateTime;
+
+ /** 删除标识0-正常,1-已删除 */
+ @ApiModelProperty(value = "删除标识0-正常,1-已删除", example = "")
+ @TableField("del_flag")
+ private Byte delFlag;
+
+ /** 请求方法0-get,1-post */
+ @ApiModelProperty(value = "请求方法0-get,1-post", example = "")
+ @TableField("api_method")
+ private String apiMethod;
+
+ /** 请求编码 */
+ @ApiModelProperty(value = "请求编码", example = "")
+ @TableField("api_code")
+ private String apiCode;
+
+ /** 是否是模板 0-是,1-不是 */
+ @ApiModelProperty(value = "是否是模板 0-是,1-不是", example = "")
+ @TableField("template")
+ private Byte template;
+
+ /** 浏览次数 */
+ @ApiModelProperty(value = "浏览次数", example = "")
+ @TableField("view_count")
+ private Long viewCount;
+
+ /** css增强 */
+ @ApiModelProperty(value = "css增强", example = "")
+ @TableField("css_str")
+ private String cssStr;
+
+ /** js增强 */
+ @ApiModelProperty(value = "js增强", example = "")
+ @TableField("js_str")
+ private String jsStr;
+
+ /** py增强 */
+ @ApiModelProperty(value = "py增强", example = "")
+ @TableField("py_str")
+ private String pyStr;
+
+ /** 多租户标识 */
+ @ApiModelProperty(value = "多租户标识", example = "")
+ @TableField("tenant_id")
+ private String tenantId;
+}
diff --git a/src/main/java/org/springblade/modules/report/mapper/ReportDbMapper.java b/src/main/java/org/springblade/modules/report/mapper/ReportDbMapper.java
new file mode 100644
index 0000000..c424646
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/mapper/ReportDbMapper.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.mapper;
+
+import org.springblade.modules.report.entity.ReportDbEntity;
+import org.springblade.modules.report.vo.ReportDbVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 积木报表表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-06-26
+ */
+public interface ReportDbMapper extends BaseMapper<ReportDbEntity> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param reportDb
+ * @return
+ */
+ List<ReportDbVO> selectReportDbPage(IPage page, ReportDbVO reportDb);
+
+
+}
diff --git a/src/main/java/org/springblade/modules/report/mapper/ReportDbMapper.xml b/src/main/java/org/springblade/modules/report/mapper/ReportDbMapper.xml
new file mode 100644
index 0000000..164adc5
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/mapper/ReportDbMapper.xml
@@ -0,0 +1,15 @@
+<?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.springblade.modules.report.mapper.ReportDbMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="reportDbResultMap" type="org.springblade.modules.report.entity.ReportDbEntity">
+ </resultMap>
+
+
+ <select id="selectReportDbPage" resultMap="reportDbResultMap">
+ select * from jimu_report_db order by create_time desc
+ </select>
+
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/report/mapper/ReportMapper.java b/src/main/java/org/springblade/modules/report/mapper/ReportMapper.java
new file mode 100644
index 0000000..3dbdaa5
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/mapper/ReportMapper.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.mapper;
+
+import org.springblade.modules.report.entity.ReportEntity;
+import org.springblade.modules.report.vo.ReportVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 在线excel设计器 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-06-27
+ */
+public interface ReportMapper extends BaseMapper<ReportEntity> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param report
+ * @return
+ */
+ List<ReportVO> selectReportPage(IPage page, ReportVO report);
+
+
+}
diff --git a/src/main/java/org/springblade/modules/report/mapper/ReportMapper.xml b/src/main/java/org/springblade/modules/report/mapper/ReportMapper.xml
new file mode 100644
index 0000000..8c70609
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/mapper/ReportMapper.xml
@@ -0,0 +1,15 @@
+<?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.springblade.modules.report.mapper.ReportMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="reportResultMap" type="org.springblade.modules.report.entity.ReportEntity">
+ </resultMap>
+
+
+ <select id="selectReportPage" resultMap="reportResultMap">
+ select * from jimu_report order by create_time desc
+ </select>
+
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/report/service/IReportDbService.java b/src/main/java/org/springblade/modules/report/service/IReportDbService.java
new file mode 100644
index 0000000..9702648
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/service/IReportDbService.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.report.entity.ReportDbEntity;
+import org.springblade.modules.report.vo.ReportDbVO;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 积木报表表 服务类
+ *
+ * @author BladeX
+ * @since 2024-06-26
+ */
+public interface IReportDbService extends IService<ReportDbEntity> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param reportDb
+ * @return
+ */
+ IPage<ReportDbVO> selectReportDbPage(IPage<ReportDbVO> page, ReportDbVO reportDb);
+
+
+}
diff --git a/src/main/java/org/springblade/modules/report/service/IReportService.java b/src/main/java/org/springblade/modules/report/service/IReportService.java
new file mode 100644
index 0000000..25d5284
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/service/IReportService.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.report.entity.ReportEntity;
+import org.springblade.modules.report.vo.ReportVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 在线excel设计器 服务类
+ *
+ * @author BladeX
+ * @since 2024-06-27
+ */
+public interface IReportService extends IService<ReportEntity> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param report
+ * @return
+ */
+ IPage<ReportVO> selectReportPage(IPage<ReportVO> page, ReportVO report);
+
+
+}
diff --git a/src/main/java/org/springblade/modules/report/service/impl/ReportDbServiceImpl.java b/src/main/java/org/springblade/modules/report/service/impl/ReportDbServiceImpl.java
new file mode 100644
index 0000000..b4b8a83
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/service/impl/ReportDbServiceImpl.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.report.entity.ReportDbEntity;
+import org.springblade.modules.report.vo.ReportDbVO;
+import org.springblade.modules.report.mapper.ReportDbMapper;
+import org.springblade.modules.report.service.IReportDbService;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 积木报表表 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-06-26
+ */
+@Service
+public class ReportDbServiceImpl extends ServiceImpl<ReportDbMapper, ReportDbEntity> implements IReportDbService {
+
+ @Override
+ public IPage<ReportDbVO> selectReportDbPage(IPage<ReportDbVO> page, ReportDbVO reportDb) {
+ return page.setRecords(baseMapper.selectReportDbPage(page, reportDb));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/report/service/impl/ReportServiceImpl.java b/src/main/java/org/springblade/modules/report/service/impl/ReportServiceImpl.java
new file mode 100644
index 0000000..0524e03
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/service/impl/ReportServiceImpl.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.report.entity.ReportEntity;
+import org.springblade.modules.report.vo.ReportVO;
+import org.springblade.modules.report.mapper.ReportMapper;
+import org.springblade.modules.report.service.IReportService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 在线excel设计器 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-06-27
+ */
+@Service
+public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportEntity> implements IReportService {
+
+ @Override
+ public IPage<ReportVO> selectReportPage(IPage<ReportVO> page, ReportVO report) {
+ return page.setRecords(baseMapper.selectReportPage(page, report));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/report/vo/ReportDbVO.java b/src/main/java/org/springblade/modules/report/vo/ReportDbVO.java
new file mode 100644
index 0000000..fd260c4
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/vo/ReportDbVO.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.vo;
+
+import org.springblade.modules.report.entity.ReportDbEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 积木报表表 视图实体类
+ *
+ * @author BladeX
+ * @since 2024-06-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ReportDbVO extends ReportDbEntity {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/report/vo/ReportVO.java b/src/main/java/org/springblade/modules/report/vo/ReportVO.java
new file mode 100644
index 0000000..fbebe7b
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/vo/ReportVO.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.vo;
+
+import org.springblade.modules.report.entity.ReportEntity;
+import org.springblade.core.tool.node.INode;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 在线excel设计器 视图实体类
+ *
+ * @author BladeX
+ * @since 2024-06-27
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ReportVO extends ReportEntity {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/report/wrapper/ReportDbWrapper.java b/src/main/java/org/springblade/modules/report/wrapper/ReportDbWrapper.java
new file mode 100644
index 0000000..7054e5c
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/wrapper/ReportDbWrapper.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.report.entity.ReportDbEntity;
+import org.springblade.modules.report.vo.ReportDbVO;
+import java.util.Objects;
+
+/**
+ * 数据源 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2024-06-26
+ */
+public class ReportDbWrapper extends BaseEntityWrapper<ReportDbEntity, ReportDbVO> {
+
+ public static ReportDbWrapper build() {
+ return new ReportDbWrapper();
+ }
+
+ @Override
+ public ReportDbVO entityVO(ReportDbEntity reportDb) {
+ ReportDbVO reportDbVO = Objects.requireNonNull(BeanUtil.copy(reportDb, ReportDbVO.class));
+
+ //User createUser = UserCache.getUser(reportDb.getCreateUser());
+ //User updateUser = UserCache.getUser(reportDb.getUpdateUser());
+ //reportDbVO.setCreateUserName(createUser.getName());
+ //reportDbVO.setUpdateUserName(updateUser.getName());
+
+ return reportDbVO;
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/report/wrapper/ReportWrapper.java b/src/main/java/org/springblade/modules/report/wrapper/ReportWrapper.java
new file mode 100644
index 0000000..64770fa
--- /dev/null
+++ b/src/main/java/org/springblade/modules/report/wrapper/ReportWrapper.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.report.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.report.entity.ReportEntity;
+import org.springblade.modules.report.vo.ReportVO;
+import java.util.Objects;
+
+/**
+ * 在线excel设计器 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2024-06-27
+ */
+public class ReportWrapper extends BaseEntityWrapper<ReportEntity, ReportVO> {
+
+ public static ReportWrapper build() {
+ return new ReportWrapper();
+ }
+
+ @Override
+ public ReportVO entityVO(ReportEntity report) {
+ ReportVO reportVO = Objects.requireNonNull(BeanUtil.copy(report, ReportVO.class));
+
+ //User createUser = UserCache.getUser(report.getCreateUser());
+ //User updateUser = UserCache.getUser(report.getUpdateUser());
+ //reportVO.setCreateUserName(createUser.getName());
+ //reportVO.setUpdateUserName(updateUser.getName());
+
+ return reportVO;
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java b/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
index 4672668..7688fe5 100644
--- a/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
+++ b/src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -223,7 +223,7 @@
// 是否加锁成功
logger.info("是否加锁成功:" + isLock);
if (isLock) {
- userDeptService.remove(Wrappers.<UserDept>update().lambda().eq(UserDept::getUserId, user.getId()));
+ // userDeptService.remove(Wrappers.<UserDept>update().lambda().eq(UserDept::getUserId, user.getId()));
result = userDeptService.saveBatch(userDeptList);
}
// 释放锁
diff --git a/src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java b/src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java
index 6cf6630..caef9ee 100644
--- a/src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java
+++ b/src/main/java/org/springblade/xxljob/jobhandler/LabelHandleJob.java
@@ -88,7 +88,7 @@
/**
- * 创建校园安全发送短信定时任务
+ * 创建校园安全发送短信定时任务 0 15 0 * * ?
*/
@XxlJob("ehjbJobHandler")
public void ehjbJobHandler (){
@@ -105,7 +105,6 @@
ecOrderParamDTO.setStartTime(yesterdayStart);
boolean result = ecOrderService.SynchronizeData(ecOrderParamDTO);
XxlJobHelper.log("任务响应结果..." + result);
- // 创建居住证发送短信定时任务
XxlJobHelper.log("E呼即办定时任务-结束自动创建任务...");
}
diff --git a/src/main/java/sql/report.menu.sql b/src/main/java/sql/report.menu.sql
new file mode 100644
index 0000000..8572899
--- /dev/null
+++ b/src/main/java/sql/report.menu.sql
@@ -0,0 +1,10 @@
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1806128994395938817', 1123598815738675201, 'report', '在线excel设计器', 'menu', '/report/report', NULL, 1, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1806128994395938818', '1806128994395938817', 'report_add', '新增', 'add', '/report/report/add', 'plus', 1, 2, 1, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1806128994395938819', '1806128994395938817', 'report_edit', '修改', 'edit', '/report/report/edit', 'form', 2, 2, 2, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1806128994395938820', '1806128994395938817', 'report_delete', '删除', 'delete', '/api/blade-report/report/remove', 'delete', 3, 2, 3, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1806128994395938821', '1806128994395938817', 'report_view', '查看', 'view', '/report/report/view', 'file-text', 4, 2, 2, 1, NULL, 0);
diff --git a/src/main/java/sql/reportdb.menu.sql b/src/main/java/sql/reportdb.menu.sql
new file mode 100644
index 0000000..39470aa
--- /dev/null
+++ b/src/main/java/sql/reportdb.menu.sql
@@ -0,0 +1,10 @@
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1805843789026185217', 1123598815738675201, 'reportDb', '数据源', 'menu', '/reportDb/reportDb', NULL, 1, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1805843789026185218', '1805843789026185217', 'reportDb_add', '新增', 'add', '/reportDb/reportDb/add', 'plus', 1, 2, 1, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1805843789026185219', '1805843789026185217', 'reportDb_edit', '修改', 'edit', '/reportDb/reportDb/edit', 'form', 2, 2, 2, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1805843789026185220', '1805843789026185217', 'reportDb_delete', '删除', 'delete', '/api/blade-reportDb/reportDb/remove', 'delete', 3, 2, 3, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1805843789026185221', '1805843789026185217', 'reportDb_view', '查看', 'view', '/reportDb/reportDb/view', 'file-text', 4, 2, 2, 1, NULL, 0);
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 9d8a2d9..9be8104 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -253,6 +253,10 @@
- /blade-smsSend/smsSend/send
- /blade-system/user/register-user
- /blade-eCallEventTwo/eCallEventTwo/synchronizeData
+ - /jmreport/**
+ - /public_discuss/publicDiscuss/publicDiscussTotal
+ - /public_discuss/publicDiscuss/managementProtocol
+ - /public_discuss/publicDiscuss/candidate
# - /blade-householdLabel/**
# - /blade-system/**
# - /blade-doorplateAddress/doorplateAddress/**
--
Gitblit v1.9.3