Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
a38b192a38
10
pom.xml
10
pom.xml
|
@ -146,11 +146,11 @@
|
||||||
<artifactId>mybatis-generator-core</artifactId>
|
<artifactId>mybatis-generator-core</artifactId>
|
||||||
<version>1.3.6</version>
|
<version>1.3.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>com.alibaba</groupId>-->
|
<groupId>com.alibaba</groupId>
|
||||||
<!-- <artifactId>easyexcel</artifactId>-->
|
<artifactId>easyexcel</artifactId>
|
||||||
<!-- <version>${easyexcel.version}</version>-->
|
<version>${easyexcel.version}</version>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-beanutils</groupId>
|
<groupId>commons-beanutils</groupId>
|
||||||
<artifactId>commons-beanutils</artifactId>
|
<artifactId>commons-beanutils</artifactId>
|
||||||
|
|
|
@ -2,14 +2,21 @@ package com.szr.zdryztpg.controller;
|
||||||
|
|
||||||
import com.szr.common.model.BaseResponse;
|
import com.szr.common.model.BaseResponse;
|
||||||
import com.szr.common.model.PageUtil;
|
import com.szr.common.model.PageUtil;
|
||||||
|
import com.szr.zdryztpg.entity.ZdryJcjdztpgInfo;
|
||||||
import com.szr.zdryztpg.model.*;
|
import com.szr.zdryztpg.model.*;
|
||||||
import com.szr.zdryztpg.service.ZdryJcjdztpgInfoService;
|
import com.szr.zdryztpg.service.ZdryJcjdztpgInfoService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang.time.DateFormatUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.alibaba.excel.EasyExcel;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重点人员监控检查质态评估
|
* 重点人员监控检查质态评估
|
||||||
|
@ -38,4 +45,24 @@ public class ZdryztpgController {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/dataExport")
|
||||||
|
@ApiOperation(value = "质态评估数据导出")
|
||||||
|
public void dataExport(@RequestBody ZtpgPageListDTO params, HttpServletResponse response) throws Exception {
|
||||||
|
List<ZdryJcjdztpgInfo> ztpgPageListVOS = zdryJcjdztpgInfoService.queryList(params);
|
||||||
|
response.setContentType("application/vnd.ms-excel");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
//防止中文乱码
|
||||||
|
String fileName = generateFileName();
|
||||||
|
fileName = URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "%20");
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||||
|
// 这里需要设置不关闭流
|
||||||
|
EasyExcel.write(response.getOutputStream(), ZdryztpgExportModel.class).autoCloseStream(Boolean.FALSE).sheet("警情巡查数据")
|
||||||
|
.doWrite(ztpgPageListVOS);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String generateFileName() {
|
||||||
|
//自定义文件名
|
||||||
|
return "重点人员检查监督-质态评估" + DateFormatUtils.format(new Date(), "yyyyMMddhhmmssSSS");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,4 +99,6 @@ public interface ZdryJcjdztpgInfoMapper {
|
||||||
int countByParams(ZtpgPageListDTO params);
|
int countByParams(ZtpgPageListDTO params);
|
||||||
|
|
||||||
List<ZdryJcjdztpgInfo> queryListByPage(ZtpgPageListDTO params);
|
List<ZdryJcjdztpgInfo> queryListByPage(ZtpgPageListDTO params);
|
||||||
|
|
||||||
|
List<ZdryJcjdztpgInfo> queryList(ZtpgPageListDTO params);
|
||||||
}
|
}
|
|
@ -0,0 +1,105 @@
|
||||||
|
package com.szr.zdryztpg.model;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName ZdryztpgExportModel
|
||||||
|
* @Description TODO
|
||||||
|
* @Author ly
|
||||||
|
* @Date 2024/05/15 16:41
|
||||||
|
* @Version 1.0
|
||||||
|
**/
|
||||||
|
public class ZdryztpgExportModel {
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "人员类型" ,index = 0)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String rylx;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "管控类型" ,index = 1)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String gklx;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "身份号码" ,index = 2)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String sfzhm;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "姓名" ,index = 3)
|
||||||
|
private String ryxm;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"风险评估", "填写内容"} ,index = 4)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String fxpgtxnr;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"风险评估", "检查结果"} ,index = 5)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String fxpgjcjg;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"现实表现", "填写内容"} ,index = 6)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String xsbxtxnr;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"现实表现", "检查结果"} ,index = 7)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String xsbxjcjg;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"活动地", "填写内容"} ,index = 8)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String hdztxnr;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"活动地", "检查结果"} ,index = 9)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String hdzjcjg;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"在控情况", "填写内容"} ,index = 10)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String zkqktxnr;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"在控情况", "检查结果"} ,index = 11)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String zkqkjcjg;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"现实表现近三次情况", "填写内容"} ,index = 12)
|
||||||
|
@ColumnWidth(14)
|
||||||
|
private String jscqktxnr;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"现实表现近三次情况", "检查结果"} ,index = 13)
|
||||||
|
@ColumnWidth(14)
|
||||||
|
private String jscqkjcjg;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"是否见面&现实表现", "填写内容"} ,index = 14)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String sfjmtxnr;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"是否见面&现实表现", "检查结果"} ,index = 15)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String sfjmjcjg;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private String xsbxfxpgtxnr;
|
||||||
|
|
||||||
|
@ExcelIgnore
|
||||||
|
private String xsbxfxpgjcjg;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"附件", "附件名称"} ,index = 16)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String fjmc;
|
||||||
|
|
||||||
|
@ExcelProperty(value = {"附件", "检查结果"} ,index = 17)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private String fjjcjg;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "检查时间" ,index = 18)
|
||||||
|
@ColumnWidth(12)
|
||||||
|
private Date jcsj;
|
||||||
|
|
||||||
|
}
|
|
@ -1,9 +1,12 @@
|
||||||
package com.szr.zdryztpg.service;
|
package com.szr.zdryztpg.service;
|
||||||
|
|
||||||
import com.szr.common.model.PageUtil;
|
import com.szr.common.model.PageUtil;
|
||||||
|
import com.szr.zdryztpg.entity.ZdryJcjdztpgInfo;
|
||||||
import com.szr.zdryztpg.model.ZtpgPageListDTO;
|
import com.szr.zdryztpg.model.ZtpgPageListDTO;
|
||||||
import com.szr.zdryztpg.model.ZtpgPageListVO;
|
import com.szr.zdryztpg.model.ZtpgPageListVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重点人员质态评估 service
|
* 重点人员质态评估 service
|
||||||
*
|
*
|
||||||
|
@ -13,4 +16,6 @@ import com.szr.zdryztpg.model.ZtpgPageListVO;
|
||||||
public interface ZdryJcjdztpgInfoService {
|
public interface ZdryJcjdztpgInfoService {
|
||||||
|
|
||||||
PageUtil<ZtpgPageListVO> queryPageList(ZtpgPageListDTO params);
|
PageUtil<ZtpgPageListVO> queryPageList(ZtpgPageListDTO params);
|
||||||
|
|
||||||
|
List<ZdryJcjdztpgInfo> queryList(ZtpgPageListDTO params);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.szr.zdryztpg.service.impl;
|
package com.szr.zdryztpg.service.impl;
|
||||||
|
|
||||||
import com.szr.common.model.PageUtil;
|
import com.szr.common.model.PageUtil;
|
||||||
|
import com.szr.data.scope.annotation.DataScope;
|
||||||
import com.szr.zdryztpg.entity.ZdryJcjdztpgInfo;
|
import com.szr.zdryztpg.entity.ZdryJcjdztpgInfo;
|
||||||
import com.szr.zdryztpg.mapper.ZdryJcjdztpgInfoMapper;
|
import com.szr.zdryztpg.mapper.ZdryJcjdztpgInfoMapper;
|
||||||
import com.szr.zdryztpg.model.ZtpgPageListDTO;
|
import com.szr.zdryztpg.model.ZtpgPageListDTO;
|
||||||
|
@ -25,6 +26,7 @@ public class ZdryJcjdztpgServiceImpl implements ZdryJcjdztpgInfoService {
|
||||||
private ZdryJcjdztpgInfoMapper zdryJcjdztpgInfoMapper;
|
private ZdryJcjdztpgInfoMapper zdryJcjdztpgInfoMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@DataScope(mainAlias = "zji")
|
||||||
public PageUtil<ZtpgPageListVO> queryPageList(ZtpgPageListDTO params) {
|
public PageUtil<ZtpgPageListVO> queryPageList(ZtpgPageListDTO params) {
|
||||||
int beginIndex = (params.getPage() - 1) * params.getPageSize() + 1;
|
int beginIndex = (params.getPage() - 1) * params.getPageSize() + 1;
|
||||||
int endIndex = params.getPage() * params.getPageSize();
|
int endIndex = params.getPage() * params.getPageSize();
|
||||||
|
@ -39,4 +41,11 @@ public class ZdryJcjdztpgServiceImpl implements ZdryJcjdztpgInfoService {
|
||||||
|
|
||||||
return new PageUtil<>(counts, params.getPage(), params.getPageSize(), checkInfoPageListVOS);
|
return new PageUtil<>(counts, params.getPage(), params.getPageSize(), checkInfoPageListVOS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@DataScope(mainAlias = "zji")
|
||||||
|
public List<ZdryJcjdztpgInfo> queryList(ZtpgPageListDTO params) {
|
||||||
|
List<ZdryJcjdztpgInfo> zdryJcjdztpgInfos = zdryJcjdztpgInfoMapper.queryList(params);
|
||||||
|
return zdryJcjdztpgInfos;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,17 @@ spring:
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 50.34.174.7:8848
|
# server-addr: 50.34.174.7:8848
|
||||||
namespace: 3f984aeb-5ff9-4ac1-b154-6f9e1f10175a
|
# namespace: 3f984aeb-5ff9-4ac1-b154-6f9e1f10175a
|
||||||
|
# 鼓楼
|
||||||
|
server-addr: 50.32.58.101:8848
|
||||||
|
namespace: e2cee560-834b-4de8-9603-71100a82ba79
|
||||||
group: DEFAULT_GROUP
|
group: DEFAULT_GROUP
|
||||||
config:
|
config:
|
||||||
namespace: 3f984aeb-5ff9-4ac1-b154-6f9e1f10175a
|
namespace: e2cee560-834b-4de8-9603-71100a82ba79
|
||||||
group: DEFAULT_GROUP
|
group: DEFAULT_GROUP
|
||||||
# 配置中心的地址
|
# 配置中心的地址
|
||||||
server-addr: 50.34.174.7:8848
|
server-addr: 50.32.58.101:8848
|
||||||
# 默认加载与服务名相同文件 优先级最高
|
# 默认加载与服务名相同文件 优先级最高
|
||||||
prefix: ${spring.application.name}
|
prefix: ${spring.application.name}
|
||||||
file-extension: yaml
|
file-extension: yaml
|
||||||
|
|
|
@ -639,7 +639,7 @@
|
||||||
and (zji.ryxm like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
and (zji.ryxm like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
||||||
zji.sfzhm like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
zji.sfzhm like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
||||||
zji.rylx like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
zji.rylx like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
||||||
zji.gklx like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or)
|
zji.gklx like '%'||#{keyWord,jdbcType=VARCHAR}||'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="rylx!=null and rylx!=''">
|
<if test="rylx!=null and rylx!=''">
|
||||||
and zji.rylx = #{rylx,jdbcType=VARCHAR}
|
and zji.rylx = #{rylx,jdbcType=VARCHAR}
|
||||||
|
@ -659,6 +659,9 @@
|
||||||
<if test="jcjssj!=null and jcjssj!=''">
|
<if test="jcjssj!=null and jcjssj!=''">
|
||||||
and to_char(zji.jcsj,'yyyy-MM-dd HH:mm:ss') <![CDATA[<=]]> #{jcjssj,jdbcType=VARCHAR}
|
and to_char(zji.jcsj,'yyyy-MM-dd HH:mm:ss') <![CDATA[<=]]> #{jcjssj,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params!=null and params!=''">
|
||||||
|
${params.dataScope}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by zji.jcsj desc
|
order by zji.jcsj desc
|
||||||
limit #{pageSize} offset (#{pageSize} * (#{page}-1))
|
limit #{pageSize} offset (#{pageSize} * (#{page}-1))
|
||||||
|
@ -673,7 +676,7 @@
|
||||||
and (zji.ryxm like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
and (zji.ryxm like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
||||||
zji.sfzhm like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
zji.sfzhm like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
||||||
zji.rylx like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
zji.rylx like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
||||||
zji.gklx like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or)
|
zji.gklx like '%'||#{keyWord,jdbcType=VARCHAR}||'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="rylx!=null and rylx!=''">
|
<if test="rylx!=null and rylx!=''">
|
||||||
and zji.rylx = #{rylx,jdbcType=VARCHAR}
|
and zji.rylx = #{rylx,jdbcType=VARCHAR}
|
||||||
|
@ -693,6 +696,44 @@
|
||||||
<if test="jcjssj!=null and jcjssj!=''">
|
<if test="jcjssj!=null and jcjssj!=''">
|
||||||
and to_char(zji.jcsj,'yyyy-MM-dd HH:mm:ss') <![CDATA[<=]]> #{jcjssj,jdbcType=VARCHAR}
|
and to_char(zji.jcsj,'yyyy-MM-dd HH:mm:ss') <![CDATA[<=]]> #{jcjssj,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params!=null and params!=''">
|
||||||
|
${params.dataScope}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryList" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from zdry_jcjdztpg_info zji
|
||||||
|
<where>
|
||||||
|
<if test="keyWord!=null and keyWord!=''">
|
||||||
|
and (zji.ryxm like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
||||||
|
zji.sfzhm like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
||||||
|
zji.rylx like '%'||#{keyWord,jdbcType=VARCHAR}||'%' or
|
||||||
|
zji.gklx like '%'||#{keyWord,jdbcType=VARCHAR}||'%')
|
||||||
|
</if>
|
||||||
|
<if test="rylx!=null and rylx!=''">
|
||||||
|
and zji.rylx = #{rylx,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="sfzhm!=null and sfzhm!=''">
|
||||||
|
and zji.sfzhm = #{sfzhm,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="ryxm!=null and ryxm!=''">
|
||||||
|
and zji.ryxm = #{ryxm,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="gklx!=null and gklx!=''">
|
||||||
|
and zji.gklx = #{gklx,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="jckssj!=null and jckssj!=''">
|
||||||
|
and to_char(zji.jcsj,'yyyy-MM-dd HH:mm:ss') <![CDATA[>]]> #{jckssj,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="jcjssj!=null and jcjssj!=''">
|
||||||
|
and to_char(zji.jcsj,'yyyy-MM-dd HH:mm:ss') <![CDATA[<=]]> #{jcjssj,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="params!=null and params!=''">
|
||||||
|
${params.dataScope}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by zji.jcsj desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue