Merge branch 'master' of http://47.115.223.229:8888/yangjun/huanzi-java
This commit is contained in:
commit
d3e2a17019
|
@ -0,0 +1,117 @@
|
||||||
|
package org.jeecg.modules.zh.view.housingestateInfo.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.zh.view.housingestateInfo.entity.BlHousingestateInfo;
|
||||||
|
import org.jeecg.modules.zh.view.housingestateInfo.service.IBlHousingestateInfoService;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecg.modules.zh.view.hy.entity.Hy;
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 小区信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-07-02
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="小区信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/housingestateInfo/blHousingestateInfo")
|
||||||
|
@Slf4j
|
||||||
|
public class BlHousingestateInfoController extends JeecgController<BlHousingestateInfo, IBlHousingestateInfoService> {
|
||||||
|
@Autowired
|
||||||
|
private IBlHousingestateInfoService blHousingestateInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小区分页列表查询
|
||||||
|
*
|
||||||
|
* @param blHousingestateInfo
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "小区信息-分页列表查询")
|
||||||
|
@ApiOperation(value="小区信息-分页列表查询", notes="小区信息-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<BlHousingestateInfo>> queryPageList(BlHousingestateInfo blHousingestateInfo,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<BlHousingestateInfo> queryWrapper = QueryGenerator.initQueryWrapper(blHousingestateInfo, req.getParameterMap());
|
||||||
|
Page<BlHousingestateInfo> page = new Page<BlHousingestateInfo>(pageNo, pageSize);
|
||||||
|
IPage<BlHousingestateInfo> pageList = blHousingestateInfoService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小区导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param blHousingestateInfo
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, BlHousingestateInfo blHousingestateInfo) {
|
||||||
|
return super.exportXls(request, blHousingestateInfo, BlHousingestateInfo.class, "小区信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小区新增会员统计
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/queryXqHyXzList", method = RequestMethod.GET)
|
||||||
|
public Result queryHyXzList(Hy hy) {
|
||||||
|
List<Hy> list = service.queryXqHyXzList(hy);
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小区会员投递次数排行榜
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/queryXqHyTdcsList", method = RequestMethod.GET)
|
||||||
|
public Result queryXqHyTdcsList(Hy hy) {
|
||||||
|
List<Hy> list = service.queryXqHyTdcsList(hy);
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小区会员投递重量排行榜
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/queryXqHyTdzlList", method = RequestMethod.GET)
|
||||||
|
public Result queryXqHyTdzlList(Hy hy) {
|
||||||
|
List<Hy> list = service.queryXqHyTdzlList(hy);
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,76 @@
|
||||||
|
package org.jeecg.modules.zh.view.housingestateInfo.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 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.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 小区信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-07-02
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("bl_housingestate_info")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="bl_housingestate_info对象", description="小区信息")
|
||||||
|
public class BlHousingestateInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Integer id;
|
||||||
|
/**小区ID*/
|
||||||
|
@Excel(name = "小区标识", width = 15)
|
||||||
|
@ApiModelProperty(value = "小区标识")
|
||||||
|
private String housingestateId;
|
||||||
|
/**小区名称*/
|
||||||
|
@Excel(name = "小区名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "小区名称")
|
||||||
|
private String name;
|
||||||
|
/**地址*/
|
||||||
|
@Excel(name = "地址", width = 15)
|
||||||
|
@ApiModelProperty(value = "地址")
|
||||||
|
private String address;
|
||||||
|
/**状态*/
|
||||||
|
@Excel(name = "状态", width = 15)
|
||||||
|
@ApiModelProperty(value = "状态")
|
||||||
|
private String status;
|
||||||
|
/**类型*/
|
||||||
|
@Excel(name = "类型", width = 15)
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
private String type;
|
||||||
|
/**定位经纬度*/
|
||||||
|
@ApiModelProperty(value = "定位经纬度")
|
||||||
|
private String location;
|
||||||
|
/**设备数量*/
|
||||||
|
@Excel(name = "设备数量", width = 15)
|
||||||
|
@ApiModelProperty(value = "设备数量")
|
||||||
|
private String dtusCount;
|
||||||
|
/**创建时间*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
/**更新时间*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
package org.jeecg.modules.zh.view.housingestateInfo.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.zh.view.housingestateInfo.entity.BlHousingestateInfo;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.zh.view.hy.entity.Hy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 小区信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-07-02
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface BlHousingestateInfoMapper extends BaseMapper<BlHousingestateInfo> {
|
||||||
|
|
||||||
|
List<Hy> queryXqHyTdzlList(Hy hy);
|
||||||
|
|
||||||
|
List<Hy> queryXqHyXzList(Hy hy);
|
||||||
|
|
||||||
|
List<Hy> queryXqHyTdcsList(Hy hy);
|
||||||
|
}
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?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.zh.view.housingestateInfo.mapper.BlHousingestateInfoMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="queryXqHyTdzlList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||||
|
select round(sum(a.weight),2) as cn ,b.`name` as shortHour
|
||||||
|
from bl_order_info a , bl_housingestate_info b
|
||||||
|
where a.housingestate_id = b.housingestate_id
|
||||||
|
and a.add_time >= #{beginTime}
|
||||||
|
and a.add_time <= #{endTime}
|
||||||
|
GROUP BY a.housingestate_id
|
||||||
|
ORDER BY sum(a.weight) desc limit 10
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryXqHyXzList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||||
|
select b.name as shortDay,count(*) as cn
|
||||||
|
from bl_user_info a , bl_housingestate_info b
|
||||||
|
where a.housingestate_id = b.housingestate_id
|
||||||
|
and a.register_date >= #{beginTime}
|
||||||
|
and a.register_date <= #{endTime}
|
||||||
|
group by a.housingestate_id
|
||||||
|
ORDER BY count(*) desc limit 10
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryXqHyTdcsList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||||
|
select
|
||||||
|
b.name as phone,
|
||||||
|
count(*) as cn
|
||||||
|
from bl_order_info a , bl_housingestate_info b
|
||||||
|
where a.housingestate_id = b.housingestate_id
|
||||||
|
and a.add_time >= #{beginTime}
|
||||||
|
and a.add_time <= #{endTime}
|
||||||
|
group by a.housingestate_id
|
||||||
|
order by count(*) desc limit 10
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,22 @@
|
||||||
|
package org.jeecg.modules.zh.view.housingestateInfo.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.zh.view.housingestateInfo.entity.BlHousingestateInfo;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.zh.view.hy.entity.Hy;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 小区信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-07-02
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IBlHousingestateInfoService extends IService<BlHousingestateInfo> {
|
||||||
|
|
||||||
|
List<Hy> queryXqHyTdzlList(Hy hy);
|
||||||
|
|
||||||
|
List<Hy> queryXqHyTdcsList(Hy hy);
|
||||||
|
|
||||||
|
List<Hy> queryXqHyXzList(Hy hy);
|
||||||
|
}
|
|
@ -0,0 +1,36 @@
|
||||||
|
package org.jeecg.modules.zh.view.housingestateInfo.service.impl;
|
||||||
|
|
||||||
|
import org.jeecg.modules.zh.view.housingestateInfo.entity.BlHousingestateInfo;
|
||||||
|
import org.jeecg.modules.zh.view.housingestateInfo.mapper.BlHousingestateInfoMapper;
|
||||||
|
import org.jeecg.modules.zh.view.housingestateInfo.service.IBlHousingestateInfoService;
|
||||||
|
import org.jeecg.modules.zh.view.hy.entity.Hy;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 小区信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-07-02
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BlHousingestateInfoServiceImpl extends ServiceImpl<BlHousingestateInfoMapper, BlHousingestateInfo> implements IBlHousingestateInfoService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Hy> queryXqHyTdzlList(Hy hy) {
|
||||||
|
return baseMapper.queryXqHyTdzlList(hy);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Hy> queryXqHyTdcsList(Hy hy) {
|
||||||
|
return baseMapper.queryXqHyTdcsList(hy);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Hy> queryXqHyXzList(Hy hy) {
|
||||||
|
return baseMapper.queryXqHyXzList(hy);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue