Commit 16295231 authored by 高宇's avatar 高宇

1 优化导出统计

parent 58d1ccc1
package org.rcisoft.bus.jnsp7xtm.controller;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp74tmPageRequestDto;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmPageRequestDto;
import org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm;
import org.rcisoft.bus.jnsp7xtm.service.Jnsp7xtmService;
import org.rcisoft.core.anno.CyOpeLogAnno;
......@@ -31,7 +31,7 @@ public class Jnsp7xtmController extends CyPaginationController<Jnsp7xtm> {
@CyOpeLogAnno(title = "system-入库记录管理-查询入库记录", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value="分页查询入库记录集合", notes="分页查询入库记录集合")
@GetMapping(value = "/queryJnsp74tmByPaged")
public CyGridModel listByPagination(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) {
public CyGridModel listByPagination(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
jnsp74tmService.findAllByPagination(getPaginationUtility(), jnsp74tmPageRequestDto);
return getGridModelResponse();
}
......@@ -40,7 +40,7 @@ public class Jnsp7xtmController extends CyPaginationController<Jnsp7xtm> {
@CyOpeLogAnno(title = "system-Jnsp7xtm管理-导出详细信息", businessType = CyLogTypeEnum.EXPORT)
@ApiOperation(value = "导出详细信息", notes = "导出详细信息")
@GetMapping (value = "/exportUserDetailJnsp74tm")
public void exportUserDetailJnsp74tm(HttpServletResponse response,Jnsp74tmPageRequestDto jnsp74tmPageRequestDto, @PathVariable @RequestParam(defaultValue = "0") String excelId) {
public void exportUserDetailJnsp74tm(HttpServletResponse response, Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, @PathVariable @RequestParam(defaultValue = "0") String excelId) {
String excelName = "";
switch (excelId) {
case "0":
......@@ -60,7 +60,7 @@ public class Jnsp7xtmController extends CyPaginationController<Jnsp7xtm> {
@CyOpeLogAnno(title = "system-Jnsp7xtm管理-导出明细信息", businessType = CyLogTypeEnum.EXPORT)
@ApiOperation(value = "导出明细信息", notes = "导出明细信息")
@GetMapping(value = "/exportDetailJnsp74tm")
public void exportDetailJnsp74tm(HttpServletResponse response,Jnsp74tmPageRequestDto jnsp74tmPageRequestDto, @PathVariable @RequestParam(defaultValue = "0") String excelId) {
public void exportDetailJnsp74tm(HttpServletResponse response, Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, @PathVariable @RequestParam(defaultValue = "0") String excelId) {
String excelName = "";
switch (excelId) {
case "0":
......@@ -82,7 +82,7 @@ public class Jnsp7xtmController extends CyPaginationController<Jnsp7xtm> {
@CyOpeLogAnno(title = "system-Jnsp7xtm管理-导出统计信息", businessType = CyLogTypeEnum.EXPORT)
@ApiOperation(value = "导出统计信息", notes = "导出统计信息")
@GetMapping(value = "/exportTotal")
public void exportTotal(HttpServletResponse response,Jnsp74tmPageRequestDto jnsp74tmPageRequestDto, @PathVariable @RequestParam(defaultValue = "0") String excelId) {
public void exportTotal(HttpServletResponse response, Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, @PathVariable @RequestParam(defaultValue = "0") String excelId) {
String excelName = "";
switch (excelId) {
case "0":
......
package org.rcisoft.bus.jnsp7xtm.controller;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp74tmPageRequestDto;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmPageRequestDto;
import org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm;
import org.rcisoft.bus.jnsp7xtm.service.Jnsp74tmStatisticService;
import org.rcisoft.bus.jnsp7xtm.service.Jnsp7xtmStatisticService;
import org.rcisoft.core.anno.CyOpeLogAnno;
import org.rcisoft.core.constant.CyMessCons;
import org.rcisoft.core.model.CyPersistModel;
......@@ -22,16 +22,16 @@ import org.springframework.web.bind.annotation.RestController;
*/
@RestController
@RequestMapping("/jnsp74tmStatistics")
public class Jnsp74tmStatisticsController {
public class Jnsp7xtmStatisticsController {
@Autowired
private Jnsp74tmStatisticService jnsp74tmStatisticService;
private Jnsp7xtmStatisticService jnsp74tmStatisticService;
// 1.查询所有下拉框数据源
@CyOpeLogAnno(title = "system-DemoData1管理-查询高级搜索", businessType = CyLogTypeEnum.OTHER)
@ApiOperation(value = "查询下拉框数据源", notes = "查询下拉框数据源")
@GetMapping("/queryAllPullDown")
public CyResult queryAllPullDown(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) {
public CyResult queryAllPullDown(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
......@@ -53,7 +53,7 @@ public class Jnsp74tmStatisticsController {
@CyOpeLogAnno(title = "system-DemoData1管理-查询统计", businessType = CyLogTypeEnum.OTHER)
@ApiOperation(value = "查询统计", notes = "查询统计")
@GetMapping("/getPageList")
public CyResult getPageList(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) {
public CyResult getPageList(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
......@@ -64,7 +64,7 @@ public class Jnsp74tmStatisticsController {
@CyOpeLogAnno(title = "system-DemoData1管理-查询统计", businessType = CyLogTypeEnum.OTHER)
@ApiOperation(value = "查询统计", notes = "查询统计")
@GetMapping("/queryTotal")
public CyResult queryTotal(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) {
public CyResult queryTotal(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
......
......@@ -3,7 +3,7 @@ package org.rcisoft.bus.jnsp7xtm.dao;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp74tmPageRequestDto;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmPageRequestDto;
import org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm;
import org.rcisoft.core.mapper.CyBaseMapper;
import org.rcisoft.core.model.CyPageInfo;
......@@ -15,16 +15,16 @@ public interface Jnsp7xtmRepository extends CyBaseMapper<Jnsp7xtm> {
/**
* 7.弹出框查询
* **/
IPage<Jnsp7xtm> queryJnsp74tmByPaged(CyPageInfo cyPageInfo, @Param("entity") Jnsp74tmPageRequestDto jnsp74tmPageRequestDto);
IPage<Jnsp7xtm> queryJnsp74tmByPaged(CyPageInfo cyPageInfo, @Param("entity") Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
/**
* 8.总数
* **/
Integer queryAllJnsp74tm(@Param("entity") Jnsp74tmPageRequestDto jnsp74tmPageRequestDto);
Integer queryAllJnsp74tm(@Param("entity") Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
/** 9.导出明细
* **/
IPage<Jnsp7xtm> queryFindAllList(IPage<Jnsp7xtm> page, @Param("entity") Jnsp74tmPageRequestDto jnsp74tmPageRequestDto);
IPage<Jnsp7xtm> queryFindAllList(IPage<Jnsp7xtm> page, @Param("entity") Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
}
......@@ -2,8 +2,8 @@ package org.rcisoft.bus.jnsp7xtm.dao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp74tmPageRequestDto;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp74xmDto;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmPageRequestDto;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmDto;
import org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm;
import java.util.List;
......@@ -13,7 +13,7 @@ import java.util.Map;
* Jnsp74tm统计mapper
* **/
@Mapper
public interface Jnsp74tmStatisticsRepository {
public interface Jnsp7xtmStatisticsRepository {
// 1.查询全部下拉数据
List<String> queryAllPullDown(@Param("key") String key);
......@@ -25,7 +25,7 @@ public interface Jnsp74tmStatisticsRepository {
List<String> getMonths();
// 4.获取统计总条数
List<Map<String,Object>> queryStatisticsCount(@Param("entity") Jnsp74tmPageRequestDto jnsp74tmPageRequestDto, @Param("monthList") String months, @Param("statistics") String statistics);
List<Map<String,Object>> queryStatisticsCount(@Param("entity") Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, @Param("monthList") String months, @Param("statistics") String statistics);
/**
* @description: 5.获取统计list
......@@ -38,10 +38,10 @@ public interface Jnsp74tmStatisticsRepository {
* @param: computedColumn - 计算列
* @return:
**/
List<Map<String,Object>> queryList(@Param("entity") Jnsp74tmPageRequestDto jnsp74tmPageRequestDto, @Param("monthList") String months, @Param("pageNo") int pageNo, @Param("pageSize") int pageSize, @Param("isPage") String isPage, @Param("computedColumn") String computedColumn, @Param("statistics") String statistics);
List<Map<String,Object>> queryList(@Param("entity") Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, @Param("monthList") String months, @Param("pageNo") int pageNo, @Param("pageSize") int pageSize, @Param("isPage") String isPage, @Param("computedColumn") String computedColumn, @Param("statistics") String statistics);
// 6 查询合计接口
List<Jnsp74xmDto> queryTotal(@Param("entity") Jnsp74tmPageRequestDto jnsp74tmPageRequestDto);
List<Jnsp7xtmDto> queryTotal(@Param("entity") Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
}
......@@ -14,7 +14,7 @@ import java.math.BigDecimal;
*/
@Data
@JsonPropertyOrder(value = {"nqy","chzs","rmb","xsjg","chzsa","chzsb","zzc","zzcg"})
public class Jnsp74xmDto {
public class Jnsp7xtmDto {
/**
* @desc
......
......@@ -12,7 +12,7 @@ import java.util.Map;
* @Description: 导出统计
*/
@Data
public class Jnsp74tmExportTotalDto {
public class Jnsp7xtmExportTotalDto {
// 表头
private List<ExcelExportEntity> entityList;
......
......@@ -16,7 +16,7 @@ import java.util.List;
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Jnsp74tmOptionDto {
public class Jnsp7xtmOptionDto {
private String label;
......
......@@ -15,7 +15,7 @@ import java.util.Map;
* @Description: 合计统计数据类
*/
@Data
public class Jnsp74tmPageDto implements Serializable {
public class Jnsp7xtmPageDto implements Serializable {
// 维度1
private String dimensionalityOne;
......@@ -26,20 +26,20 @@ public class Jnsp74tmPageDto implements Serializable {
// 维度3
private String dimensionalityThree;
private List<Jnsp74xmDto> data;
private List<Jnsp7xtmDto> data;
@JsonIgnore
private Map<String,Integer> map;
public Jnsp74tmPageDto(String dimensionalityOne, String dimensionalityTwo, String dimensionalityThree, List<String> list, boolean[] flag) {
public Jnsp7xtmPageDto(String dimensionalityOne, String dimensionalityTwo, String dimensionalityThree, List<String> list, boolean[] flag) {
this.map = new HashMap();
this.dimensionalityOne = dimensionalityOne;
this.dimensionalityTwo = dimensionalityTwo;
this.dimensionalityThree = dimensionalityThree;
this.data = new ArrayList<>(list.size());
for (int i = 0; i < list.size(); i++) {
Jnsp74xmDto infromation = new Jnsp74xmDto();
Jnsp7xtmDto infromation = new Jnsp7xtmDto();
infromation.setNqy(list.get(i));
if (flag[0]){
infromation.setXsjg("");
......
......@@ -10,9 +10,9 @@ import java.util.List;
* @Description: 合计分页返回类
*/
@Data
public class Jnsp74tmPageListDto {
public class Jnsp7xtmPageListDto {
private Integer total;
private List<Jnsp74tmPageDto> userDtoList;
private List<Jnsp7xtmPageDto> userDtoList;
}
......@@ -11,7 +11,7 @@ import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Jnsp74tmPageRequestDto {
public class Jnsp7xtmPageRequestDto {
// mySzzt集合
private String mySzzt;
......
......@@ -8,7 +8,7 @@ import lombok.Data;
* @Description:
*/
@Data
public class Jnsp74tmTableHeaderDto {
public class Jnsp7xtmTableHeaderDto {
private String name;
......
......@@ -10,7 +10,7 @@ import java.util.List;
* @Description: 返回合计接口
*/
@Data
public class Jnsp74tmTotalDto {
public class Jnsp7xtmTotalDto {
private List<Jnsp74xmDto> jnsp7xtmDtos;
private List<Jnsp7xtmDto> jnsp7xtmDtos;
}
......@@ -11,7 +11,7 @@ import lombok.Data;
* @Description:
*/
@Data
@TableName("jnsp74tm")
@TableName("Jnsp7xtm")
public class Jnsp7xtm {
@Excel(name = "nqy", orderNum = "2", width = 20)
......
package org.rcisoft.bus.jnsp7xtm.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp74tmPageRequestDto;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmPageRequestDto;
import org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm;
import org.rcisoft.core.model.CyPageInfo;
import javax.servlet.http.HttpServletResponse;
......@@ -12,20 +12,20 @@ public interface Jnsp7xtmService {
/**
* 7.弹出框查询
* **/
IPage<Jnsp7xtm> findAllByPagination(CyPageInfo<Jnsp7xtm> paginationUtility, Jnsp74tmPageRequestDto jnsp74tmPageRequestDto);
IPage<Jnsp7xtm> findAllByPagination(CyPageInfo<Jnsp7xtm> paginationUtility, Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
/**
* 8.导出弹框框详情
* **/
void exportUserDetailJnsp74tm(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto, String excelName, HttpServletResponse response);
void exportUserDetailJnsp74tm(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, String excelName, HttpServletResponse response);
/**
* 9.导出明细详情
* **/
void exportDetailJnsp74tm(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto, String excelName, HttpServletResponse response);
void exportDetailJnsp74tm(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, String excelName, HttpServletResponse response);
/**
* 10.导出统计
* **/
void exportTotal(HttpServletResponse response, Jnsp74tmPageRequestDto requestDto);
void exportTotal(HttpServletResponse response, Jnsp7xtmPageRequestDto requestDto);
}
......@@ -5,18 +5,18 @@ import org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm;
import java.util.List;
public interface Jnsp74tmStatisticService {
public interface Jnsp7xtmStatisticService {
// 1.查询所有下拉框数据源
List<Jnsp74tmOptionDto> queryAllPullDownData(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto);
List<Jnsp7xtmOptionDto> queryAllPullDownData(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
// 2.实时查询下拉框数据
List<Jnsp7xtm> queryKey(Jnsp7xtm jnsp74tm);
// 3.查询统计
Jnsp74tmPageListDto getPageList(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto);
Jnsp7xtmPageListDto getPageList(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
// 4.返回总计接口
Jnsp74tmTotalDto queryTotal(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto);
Jnsp7xtmTotalDto queryTotal(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
}
......@@ -30,7 +30,7 @@
</resultMap>
<select id="queryJnsp74tmByPaged" resultMap="BaseResultMap">
SELECT *
FROM Jnsp74tm
FROM Jnsp7xtm
WHERE
1=1
<if test='entity.clickOneDimensionality and entity.type == "1"'>
......@@ -113,7 +113,7 @@
<select id="queryAllJnsp74tm" resultType="java.lang.Integer">
SELECT
count(*)
FROM Jnsp74tm
FROM Jnsp7xtm
WHERE
1=1
<if test='entity.clickOneDimensionality and entity.type == "1"'>
......@@ -194,7 +194,7 @@
</select>
<select id="queryFindAllList" resultType="org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm">
SELECT *
FROM Jnsp74tm
FROM Jnsp7xtm
WHERE
1=1
<if test='entity.clickOneDimensionality and entity.type == "1"'>
......
<?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.rcisoft.bus.jnsp7xtm.dao.Jnsp74tmStatisticsRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.bus.jnsp7xtm.dto.Jnsp74xmDto">
<mapper namespace="org.rcisoft.bus.jnsp7xtm.dao.Jnsp7xtmStatisticsRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmDto">
<result column="zd" property="zd"/>
<result column="nqy" property="nqy"/>
<result column="ddh" property="ddh"/>
......@@ -54,7 +54,7 @@
<if test='key == "mksqf"'>
DISTINCT mksqf
</if>
FROM jnsp74tm
FROM Jnsp7xtm
</select>
<select id="queryKey" resultType="org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm">
SELECT
......@@ -70,7 +70,7 @@
DISTINCT top 20
pn
</if>
FROM jnsp7xtm
FROM Jnsp7xtm
where
1=1
<if test="khdm != null and khdm != ''">
......@@ -87,7 +87,7 @@
SELECT nqy
FROM (
SELECT DISTINCT nqy, CAST(nqy AS INT) AS month_order
FROM jnsp7xtm
FROM Jnsp7xtm
) AS subquery
ORDER BY month_order ASC
</select>
......@@ -98,7 +98,7 @@
${statistics},
nqy,
count(*) AS total
FROM jnsp74tm
FROM Jnsp7xtm
WHERE 1=1
<if test="entity.nqy != null and entity.nqy!= ''">
and nqy in
......@@ -185,7 +185,7 @@
${statistics},
nqy ,
SUM(${computedColumn}) AS total
FROM jnsp74tm
FROM Jnsp7xtm
WHERE 1=1
<if test="entity.nqy != null and entity.nqy!= ''">
and nqy in
......@@ -269,7 +269,7 @@
FETCH NEXT #{pageSize} ROWS ONLY
</if>
</select>
<select id="queryTotal" resultType="org.rcisoft.bus.jnsp7xtm.dto.Jnsp74xmDto">
<select id="queryTotal" resultType="org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmDto">
SELECT
nqy
<if test="entity.xsjg">
......@@ -297,7 +297,7 @@
,SUM (zzcg) AS zzcg
</if>
FROM
jnsp7xtm
Jnsp7xtm
WHERE
1 = 1
<if test="entity.nqy != null and entity.nqy!= ''">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment