Commit 16295231 authored by 高宇's avatar 高宇

1 优化导出统计

parent 58d1ccc1
package org.rcisoft.bus.jnsp7xtm.controller; package org.rcisoft.bus.jnsp7xtm.controller;
import io.swagger.annotations.ApiOperation; 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.entity.Jnsp7xtm;
import org.rcisoft.bus.jnsp7xtm.service.Jnsp7xtmService; import org.rcisoft.bus.jnsp7xtm.service.Jnsp7xtmService;
import org.rcisoft.core.anno.CyOpeLogAnno; import org.rcisoft.core.anno.CyOpeLogAnno;
...@@ -31,7 +31,7 @@ public class Jnsp7xtmController extends CyPaginationController<Jnsp7xtm> { ...@@ -31,7 +31,7 @@ public class Jnsp7xtmController extends CyPaginationController<Jnsp7xtm> {
@CyOpeLogAnno(title = "system-入库记录管理-查询入库记录", businessType = CyLogTypeEnum.QUERY) @CyOpeLogAnno(title = "system-入库记录管理-查询入库记录", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value="分页查询入库记录集合", notes="分页查询入库记录集合") @ApiOperation(value="分页查询入库记录集合", notes="分页查询入库记录集合")
@GetMapping(value = "/queryJnsp74tmByPaged") @GetMapping(value = "/queryJnsp74tmByPaged")
public CyGridModel listByPagination(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) { public CyGridModel listByPagination(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
jnsp74tmService.findAllByPagination(getPaginationUtility(), jnsp74tmPageRequestDto); jnsp74tmService.findAllByPagination(getPaginationUtility(), jnsp74tmPageRequestDto);
return getGridModelResponse(); return getGridModelResponse();
} }
...@@ -40,7 +40,7 @@ public class Jnsp7xtmController extends CyPaginationController<Jnsp7xtm> { ...@@ -40,7 +40,7 @@ public class Jnsp7xtmController extends CyPaginationController<Jnsp7xtm> {
@CyOpeLogAnno(title = "system-Jnsp7xtm管理-导出详细信息", businessType = CyLogTypeEnum.EXPORT) @CyOpeLogAnno(title = "system-Jnsp7xtm管理-导出详细信息", businessType = CyLogTypeEnum.EXPORT)
@ApiOperation(value = "导出详细信息", notes = "导出详细信息") @ApiOperation(value = "导出详细信息", notes = "导出详细信息")
@GetMapping (value = "/exportUserDetailJnsp74tm") @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 = ""; String excelName = "";
switch (excelId) { switch (excelId) {
case "0": case "0":
...@@ -60,7 +60,7 @@ public class Jnsp7xtmController extends CyPaginationController<Jnsp7xtm> { ...@@ -60,7 +60,7 @@ public class Jnsp7xtmController extends CyPaginationController<Jnsp7xtm> {
@CyOpeLogAnno(title = "system-Jnsp7xtm管理-导出明细信息", businessType = CyLogTypeEnum.EXPORT) @CyOpeLogAnno(title = "system-Jnsp7xtm管理-导出明细信息", businessType = CyLogTypeEnum.EXPORT)
@ApiOperation(value = "导出明细信息", notes = "导出明细信息") @ApiOperation(value = "导出明细信息", notes = "导出明细信息")
@GetMapping(value = "/exportDetailJnsp74tm") @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 = ""; String excelName = "";
switch (excelId) { switch (excelId) {
case "0": case "0":
...@@ -82,7 +82,7 @@ public class Jnsp7xtmController extends CyPaginationController<Jnsp7xtm> { ...@@ -82,7 +82,7 @@ public class Jnsp7xtmController extends CyPaginationController<Jnsp7xtm> {
@CyOpeLogAnno(title = "system-Jnsp7xtm管理-导出统计信息", businessType = CyLogTypeEnum.EXPORT) @CyOpeLogAnno(title = "system-Jnsp7xtm管理-导出统计信息", businessType = CyLogTypeEnum.EXPORT)
@ApiOperation(value = "导出统计信息", notes = "导出统计信息") @ApiOperation(value = "导出统计信息", notes = "导出统计信息")
@GetMapping(value = "/exportTotal") @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 = ""; String excelName = "";
switch (excelId) { switch (excelId) {
case "0": case "0":
......
package org.rcisoft.bus.jnsp7xtm.controller; package org.rcisoft.bus.jnsp7xtm.controller;
import io.swagger.annotations.ApiOperation; 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.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.anno.CyOpeLogAnno;
import org.rcisoft.core.constant.CyMessCons; import org.rcisoft.core.constant.CyMessCons;
import org.rcisoft.core.model.CyPersistModel; import org.rcisoft.core.model.CyPersistModel;
...@@ -22,16 +22,16 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -22,16 +22,16 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@RestController @RestController
@RequestMapping("/jnsp74tmStatistics") @RequestMapping("/jnsp74tmStatistics")
public class Jnsp74tmStatisticsController { public class Jnsp7xtmStatisticsController {
@Autowired @Autowired
private Jnsp74tmStatisticService jnsp74tmStatisticService; private Jnsp7xtmStatisticService jnsp74tmStatisticService;
// 1.查询所有下拉框数据源 // 1.查询所有下拉框数据源
@CyOpeLogAnno(title = "system-DemoData1管理-查询高级搜索", businessType = CyLogTypeEnum.OTHER) @CyOpeLogAnno(title = "system-DemoData1管理-查询高级搜索", businessType = CyLogTypeEnum.OTHER)
@ApiOperation(value = "查询下拉框数据源", notes = "查询下拉框数据源") @ApiOperation(value = "查询下拉框数据源", notes = "查询下拉框数据源")
@GetMapping("/queryAllPullDown") @GetMapping("/queryAllPullDown")
public CyResult queryAllPullDown(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) { public CyResult queryAllPullDown(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
return CyResultGenUtil.builder(new CyPersistModel(1), return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS, CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR, CyMessCons.MESSAGE_ALERT_ERROR,
...@@ -53,7 +53,7 @@ public class Jnsp74tmStatisticsController { ...@@ -53,7 +53,7 @@ public class Jnsp74tmStatisticsController {
@CyOpeLogAnno(title = "system-DemoData1管理-查询统计", businessType = CyLogTypeEnum.OTHER) @CyOpeLogAnno(title = "system-DemoData1管理-查询统计", businessType = CyLogTypeEnum.OTHER)
@ApiOperation(value = "查询统计", notes = "查询统计") @ApiOperation(value = "查询统计", notes = "查询统计")
@GetMapping("/getPageList") @GetMapping("/getPageList")
public CyResult getPageList(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) { public CyResult getPageList(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
return CyResultGenUtil.builder(new CyPersistModel(1), return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS, CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR, CyMessCons.MESSAGE_ALERT_ERROR,
...@@ -64,7 +64,7 @@ public class Jnsp74tmStatisticsController { ...@@ -64,7 +64,7 @@ public class Jnsp74tmStatisticsController {
@CyOpeLogAnno(title = "system-DemoData1管理-查询统计", businessType = CyLogTypeEnum.OTHER) @CyOpeLogAnno(title = "system-DemoData1管理-查询统计", businessType = CyLogTypeEnum.OTHER)
@ApiOperation(value = "查询统计", notes = "查询统计") @ApiOperation(value = "查询统计", notes = "查询统计")
@GetMapping("/queryTotal") @GetMapping("/queryTotal")
public CyResult queryTotal(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) { public CyResult queryTotal(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
return CyResultGenUtil.builder(new CyPersistModel(1), return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS, CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR, CyMessCons.MESSAGE_ALERT_ERROR,
......
...@@ -3,7 +3,7 @@ package org.rcisoft.bus.jnsp7xtm.dao; ...@@ -3,7 +3,7 @@ package org.rcisoft.bus.jnsp7xtm.dao;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; 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.bus.jnsp7xtm.entity.Jnsp7xtm;
import org.rcisoft.core.mapper.CyBaseMapper; import org.rcisoft.core.mapper.CyBaseMapper;
import org.rcisoft.core.model.CyPageInfo; import org.rcisoft.core.model.CyPageInfo;
...@@ -15,16 +15,16 @@ public interface Jnsp7xtmRepository extends CyBaseMapper<Jnsp7xtm> { ...@@ -15,16 +15,16 @@ public interface Jnsp7xtmRepository extends CyBaseMapper<Jnsp7xtm> {
/** /**
* 7.弹出框查询 * 7.弹出框查询
* **/ * **/
IPage<Jnsp7xtm> queryJnsp74tmByPaged(CyPageInfo cyPageInfo, @Param("entity") Jnsp74tmPageRequestDto jnsp74tmPageRequestDto); IPage<Jnsp7xtm> queryJnsp74tmByPaged(CyPageInfo cyPageInfo, @Param("entity") Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
/** /**
* 8.总数 * 8.总数
* **/ * **/
Integer queryAllJnsp74tm(@Param("entity") Jnsp74tmPageRequestDto jnsp74tmPageRequestDto); Integer queryAllJnsp74tm(@Param("entity") Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
/** 9.导出明细 /** 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; ...@@ -2,8 +2,8 @@ package org.rcisoft.bus.jnsp7xtm.dao;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; 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.dto.Jnsp74xmDto; import org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmDto;
import org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm; import org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm;
import java.util.List; import java.util.List;
...@@ -13,7 +13,7 @@ import java.util.Map; ...@@ -13,7 +13,7 @@ import java.util.Map;
* Jnsp74tm统计mapper * Jnsp74tm统计mapper
* **/ * **/
@Mapper @Mapper
public interface Jnsp74tmStatisticsRepository { public interface Jnsp7xtmStatisticsRepository {
// 1.查询全部下拉数据 // 1.查询全部下拉数据
List<String> queryAllPullDown(@Param("key") String key); List<String> queryAllPullDown(@Param("key") String key);
...@@ -25,7 +25,7 @@ public interface Jnsp74tmStatisticsRepository { ...@@ -25,7 +25,7 @@ public interface Jnsp74tmStatisticsRepository {
List<String> getMonths(); List<String> getMonths();
// 4.获取统计总条数 // 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 * @description: 5.获取统计list
...@@ -38,10 +38,10 @@ public interface Jnsp74tmStatisticsRepository { ...@@ -38,10 +38,10 @@ public interface Jnsp74tmStatisticsRepository {
* @param: computedColumn - 计算列 * @param: computedColumn - 计算列
* @return: * @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 查询合计接口 // 6 查询合计接口
List<Jnsp74xmDto> queryTotal(@Param("entity") Jnsp74tmPageRequestDto jnsp74tmPageRequestDto); List<Jnsp7xtmDto> queryTotal(@Param("entity") Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
} }
...@@ -14,7 +14,7 @@ import java.math.BigDecimal; ...@@ -14,7 +14,7 @@ import java.math.BigDecimal;
*/ */
@Data @Data
@JsonPropertyOrder(value = {"nqy","chzs","rmb","xsjg","chzsa","chzsb","zzc","zzcg"}) @JsonPropertyOrder(value = {"nqy","chzs","rmb","xsjg","chzsa","chzsb","zzc","zzcg"})
public class Jnsp74xmDto { public class Jnsp7xtmDto {
/** /**
* @desc * @desc
......
...@@ -12,7 +12,7 @@ import java.util.Map; ...@@ -12,7 +12,7 @@ import java.util.Map;
* @Description: 导出统计 * @Description: 导出统计
*/ */
@Data @Data
public class Jnsp74tmExportTotalDto { public class Jnsp7xtmExportTotalDto {
// 表头 // 表头
private List<ExcelExportEntity> entityList; private List<ExcelExportEntity> entityList;
......
...@@ -16,7 +16,7 @@ import java.util.List; ...@@ -16,7 +16,7 @@ import java.util.List;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@Builder @Builder
public class Jnsp74tmOptionDto { public class Jnsp7xtmOptionDto {
private String label; private String label;
......
...@@ -15,7 +15,7 @@ import java.util.Map; ...@@ -15,7 +15,7 @@ import java.util.Map;
* @Description: 合计统计数据类 * @Description: 合计统计数据类
*/ */
@Data @Data
public class Jnsp74tmPageDto implements Serializable { public class Jnsp7xtmPageDto implements Serializable {
// 维度1 // 维度1
private String dimensionalityOne; private String dimensionalityOne;
...@@ -26,20 +26,20 @@ public class Jnsp74tmPageDto implements Serializable { ...@@ -26,20 +26,20 @@ public class Jnsp74tmPageDto implements Serializable {
// 维度3 // 维度3
private String dimensionalityThree; private String dimensionalityThree;
private List<Jnsp74xmDto> data; private List<Jnsp7xtmDto> data;
@JsonIgnore @JsonIgnore
private Map<String,Integer> map; 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.map = new HashMap();
this.dimensionalityOne = dimensionalityOne; this.dimensionalityOne = dimensionalityOne;
this.dimensionalityTwo = dimensionalityTwo; this.dimensionalityTwo = dimensionalityTwo;
this.dimensionalityThree = dimensionalityThree; this.dimensionalityThree = dimensionalityThree;
this.data = new ArrayList<>(list.size()); this.data = new ArrayList<>(list.size());
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
Jnsp74xmDto infromation = new Jnsp74xmDto(); Jnsp7xtmDto infromation = new Jnsp7xtmDto();
infromation.setNqy(list.get(i)); infromation.setNqy(list.get(i));
if (flag[0]){ if (flag[0]){
infromation.setXsjg(""); infromation.setXsjg("");
......
...@@ -10,9 +10,9 @@ import java.util.List; ...@@ -10,9 +10,9 @@ import java.util.List;
* @Description: 合计分页返回类 * @Description: 合计分页返回类
*/ */
@Data @Data
public class Jnsp74tmPageListDto { public class Jnsp7xtmPageListDto {
private Integer total; private Integer total;
private List<Jnsp74tmPageDto> userDtoList; private List<Jnsp7xtmPageDto> userDtoList;
} }
...@@ -11,7 +11,7 @@ import lombok.NoArgsConstructor; ...@@ -11,7 +11,7 @@ import lombok.NoArgsConstructor;
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class Jnsp74tmPageRequestDto { public class Jnsp7xtmPageRequestDto {
// mySzzt集合 // mySzzt集合
private String mySzzt; private String mySzzt;
......
...@@ -8,7 +8,7 @@ import lombok.Data; ...@@ -8,7 +8,7 @@ import lombok.Data;
* @Description: * @Description:
*/ */
@Data @Data
public class Jnsp74tmTableHeaderDto { public class Jnsp7xtmTableHeaderDto {
private String name; private String name;
......
...@@ -10,7 +10,7 @@ import java.util.List; ...@@ -10,7 +10,7 @@ import java.util.List;
* @Description: 返回合计接口 * @Description: 返回合计接口
*/ */
@Data @Data
public class Jnsp74tmTotalDto { public class Jnsp7xtmTotalDto {
private List<Jnsp74xmDto> jnsp7xtmDtos; private List<Jnsp7xtmDto> jnsp7xtmDtos;
} }
...@@ -11,7 +11,7 @@ import lombok.Data; ...@@ -11,7 +11,7 @@ import lombok.Data;
* @Description: * @Description:
*/ */
@Data @Data
@TableName("jnsp74tm") @TableName("Jnsp7xtm")
public class Jnsp7xtm { public class Jnsp7xtm {
@Excel(name = "nqy", orderNum = "2", width = 20) @Excel(name = "nqy", orderNum = "2", width = 20)
......
package org.rcisoft.bus.jnsp7xtm.service; package org.rcisoft.bus.jnsp7xtm.service;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.bus.jnsp7xtm.entity.Jnsp7xtm;
import org.rcisoft.core.model.CyPageInfo; import org.rcisoft.core.model.CyPageInfo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -12,20 +12,20 @@ public interface Jnsp7xtmService { ...@@ -12,20 +12,20 @@ public interface Jnsp7xtmService {
/** /**
* 7.弹出框查询 * 7.弹出框查询
* **/ * **/
IPage<Jnsp7xtm> findAllByPagination(CyPageInfo<Jnsp7xtm> paginationUtility, Jnsp74tmPageRequestDto jnsp74tmPageRequestDto); IPage<Jnsp7xtm> findAllByPagination(CyPageInfo<Jnsp7xtm> paginationUtility, Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
/** /**
* 8.导出弹框框详情 * 8.导出弹框框详情
* **/ * **/
void exportUserDetailJnsp74tm(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto, String excelName, HttpServletResponse response); void exportUserDetailJnsp74tm(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, String excelName, HttpServletResponse response);
/** /**
* 9.导出明细详情 * 9.导出明细详情
* **/ * **/
void exportDetailJnsp74tm(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto, String excelName, HttpServletResponse response); void exportDetailJnsp74tm(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, String excelName, HttpServletResponse response);
/** /**
* 10.导出统计 * 10.导出统计
* **/ * **/
void exportTotal(HttpServletResponse response, Jnsp74tmPageRequestDto requestDto); void exportTotal(HttpServletResponse response, Jnsp7xtmPageRequestDto requestDto);
} }
...@@ -5,18 +5,18 @@ import org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm; ...@@ -5,18 +5,18 @@ import org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm;
import java.util.List; import java.util.List;
public interface Jnsp74tmStatisticService { public interface Jnsp7xtmStatisticService {
// 1.查询所有下拉框数据源 // 1.查询所有下拉框数据源
List<Jnsp74tmOptionDto> queryAllPullDownData(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto); List<Jnsp7xtmOptionDto> queryAllPullDownData(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
// 2.实时查询下拉框数据 // 2.实时查询下拉框数据
List<Jnsp7xtm> queryKey(Jnsp7xtm jnsp74tm); List<Jnsp7xtm> queryKey(Jnsp7xtm jnsp74tm);
// 3.查询统计 // 3.查询统计
Jnsp74tmPageListDto getPageList(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto); Jnsp7xtmPageListDto getPageList(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
// 4.返回总计接口 // 4.返回总计接口
Jnsp74tmTotalDto queryTotal(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto); Jnsp7xtmTotalDto queryTotal(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto);
} }
...@@ -11,17 +11,18 @@ import lombok.extern.slf4j.Slf4j; ...@@ -11,17 +11,18 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.Workbook;
import org.rcisoft.bus.jnsp7xtm.dao.Jnsp7xtmRepository; import org.rcisoft.bus.jnsp7xtm.dao.Jnsp7xtmRepository;
import org.rcisoft.bus.jnsp7xtm.dao.Jnsp74tmStatisticsRepository; import org.rcisoft.bus.jnsp7xtm.dao.Jnsp7xtmStatisticsRepository;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp74tmExportTotalDto; import org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmExportTotalDto;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp74tmTableHeaderDto; import org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmTableHeaderDto;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp74xmDto; import org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmDto;
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.entity.Jnsp7xtm;
import org.rcisoft.bus.jnsp7xtm.service.Jnsp7xtmService; import org.rcisoft.bus.jnsp7xtm.service.Jnsp7xtmService;
import org.rcisoft.core.exception.CyServiceException; import org.rcisoft.core.exception.CyServiceException;
import org.rcisoft.core.model.CyPageInfo; import org.rcisoft.core.model.CyPageInfo;
import org.rcisoft.util.ExcelExportStatisticStyler; import org.rcisoft.util.ExcelExportStatisticStyler;
import org.rcisoft.util.ExportToExcelUtil; import org.rcisoft.util.ExportToExcelUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -43,13 +44,16 @@ import java.util.stream.Collectors; ...@@ -43,13 +44,16 @@ import java.util.stream.Collectors;
@Slf4j @Slf4j
@Service @Service
@Transactional(readOnly = true, propagation = Propagation.NOT_SUPPORTED) @Transactional(readOnly = true, propagation = Propagation.NOT_SUPPORTED)
public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xtm> implements Jnsp7xtmService { public class Jnsp7xtmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xtm> implements Jnsp7xtmService {
@Autowired @Autowired
private Jnsp7xtmRepository jnsp74tmRepository; private Jnsp7xtmRepository jnsp74tmRepository;
@Autowired @Autowired
private Jnsp74tmStatisticsRepository jnsp74tmStatisticsRepository; private Jnsp7xtmStatisticsRepository jnsp74tmStatisticsRepository;
@Autowired
private Jnsp7xtmStatisticServiceImpl jnsp74tmStatisticService;
// 获取每次写入excel的长度 // 获取每次写入excel的长度
@Value("${export.size}") @Value("${export.size}")
...@@ -62,7 +66,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -62,7 +66,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
* 7.弹出框查询 * 7.弹出框查询
**/ **/
@Override @Override
public IPage<Jnsp7xtm> findAllByPagination(CyPageInfo<Jnsp7xtm> paginationUtility, Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) { public IPage<Jnsp7xtm> findAllByPagination(CyPageInfo<Jnsp7xtm> paginationUtility, Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getClickNqy())) { if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getClickNqy())) {
//设置查询值 //设置查询值
jnsp74tmPageRequestDto.setNqy(jnsp74tmPageRequestDto.getClickNqy()); jnsp74tmPageRequestDto.setNqy(jnsp74tmPageRequestDto.getClickNqy());
...@@ -81,7 +85,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -81,7 +85,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
* 8.导出弹出框信息 * 8.导出弹出框信息
* **/ * **/
@Override @Override
public void exportUserDetailJnsp74tm(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto, String excelName, HttpServletResponse response) { public void exportUserDetailJnsp74tm(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, String excelName, HttpServletResponse response) {
if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getClickNqy())) { if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getClickNqy())) {
//设置查询值 //设置查询值
jnsp74tmPageRequestDto.setNqy(jnsp74tmPageRequestDto.getClickNqy()); jnsp74tmPageRequestDto.setNqy(jnsp74tmPageRequestDto.getClickNqy());
...@@ -117,7 +121,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -117,7 +121,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
* 9.导出明细 * 9.导出明细
* **/ * **/
@Override @Override
public void exportDetailJnsp74tm(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto, String excelName, HttpServletResponse response) { public void exportDetailJnsp74tm(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, String excelName, HttpServletResponse response) {
try { try {
if (lock.tryLock(1000, TimeUnit.MILLISECONDS)) { if (lock.tryLock(1000, TimeUnit.MILLISECONDS)) {
try { try {
...@@ -161,7 +165,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -161,7 +165,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
* 10.导出统计 * 10.导出统计
* **/ * **/
@Override @Override
public void exportTotal(HttpServletResponse response, Jnsp74tmPageRequestDto requestDto) { public void exportTotal(HttpServletResponse response, Jnsp7xtmPageRequestDto requestDto) {
// 1.查询条件 // 1.查询条件
boolean conditionIsNull = boolean conditionIsNull =
requestDto.isRmb() || requestDto.isRmb() ||
...@@ -178,7 +182,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -178,7 +182,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
// 使用逗号连接每个月份字符串 // 使用逗号连接每个月份字符串
.collect(Collectors.joining(",")); .collect(Collectors.joining(","));
// 2.获取动态导出的表头和数据 // 2.获取动态导出的表头和数据
Jnsp74tmExportTotalDto exportTotalDto = outTotalJnsp7xtm(requestDto,months,monthsList); Jnsp7xtmExportTotalDto exportTotalDto = outTotalJnsp7xtm(requestDto,months,monthsList);
if (!exportTotalDto.getDataList().isEmpty()) { if (!exportTotalDto.getDataList().isEmpty()) {
ExportToExcelUtil.exportExcel(response, exportTotalDto.getEntityList(), exportTotalDto.getDataList()); ExportToExcelUtil.exportExcel(response, exportTotalDto.getEntityList(), exportTotalDto.getDataList());
} else { } else {
...@@ -186,7 +190,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -186,7 +190,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
} }
} }
private Workbook jnsp7xtmBigExcel(Integer pageNumber, ExportParams exportParams, Workbook workbook, Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) { private Workbook jnsp7xtmBigExcel(Integer pageNumber, ExportParams exportParams, Workbook workbook, Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
for (int i = 1; i <= pageNumber; i++) { for (int i = 1; i <= pageNumber; i++) {
IPage<Jnsp7xtm> page = new Page<>(i,size); IPage<Jnsp7xtm> page = new Page<>(i,size);
IPage<Jnsp7xtm> iPage = jnsp74tmRepository.queryFindAllList(page, jnsp74tmPageRequestDto); IPage<Jnsp7xtm> iPage = jnsp74tmRepository.queryFindAllList(page, jnsp74tmPageRequestDto);
...@@ -198,14 +202,14 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -198,14 +202,14 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
/** /**
* 获取导出表头和数据 * 获取导出表头和数据
* **/ * **/
private Jnsp74tmExportTotalDto outTotalJnsp7xtm(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto,String months,List<String> monthsList) { public Jnsp7xtmExportTotalDto outTotalJnsp7xtm(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, String months, List<String> monthsList) {
Jnsp74tmExportTotalDto exportTotalDto = new Jnsp74tmExportTotalDto(); Jnsp7xtmExportTotalDto exportTotalDto = new Jnsp7xtmExportTotalDto();
List<Jnsp74tmTableHeaderDto> tableHeaders = new ArrayList<>(); List<Jnsp7xtmTableHeaderDto> tableHeaders = new ArrayList<>();
List<Jnsp74tmTableHeaderDto> sortTableHeaders = new ArrayList<>(); List<Jnsp7xtmTableHeaderDto> sortTableHeaders = new ArrayList<>();
List<Jnsp74tmTableHeaderDto> chzsTableHeaders = new ArrayList<>(); List<Jnsp7xtmTableHeaderDto> chzsTableHeaders = new ArrayList<>();
List<Jnsp74tmTableHeaderDto> rmbTableHeaders = new ArrayList<>(); List<Jnsp7xtmTableHeaderDto> rmbTableHeaders = new ArrayList<>();
List<Jnsp74tmTableHeaderDto> chzsaTableHeaders = new ArrayList<>(); List<Jnsp7xtmTableHeaderDto> chzsaTableHeaders = new ArrayList<>();
List<Jnsp74tmTableHeaderDto> chzsbTableHeaders = new ArrayList<>(); List<Jnsp7xtmTableHeaderDto> chzsbTableHeaders = new ArrayList<>();
/** /**
* 处理表头 * 处理表头
* **/ * **/
...@@ -216,32 +220,48 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -216,32 +220,48 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
chzsbTableHeaders.add(item); chzsbTableHeaders.add(item);
chzsTableHeaders.add(item); chzsTableHeaders.add(item);
}); });
List<Jnsp74xmDto> jnsp74tmDtos = jnsp74tmStatisticsRepository.queryTotal(jnsp74tmPageRequestDto); Jnsp7xtmDto emptyJnsp74xmDto = jnsp74tmStatisticService.getEmptyJnsp74xmDto(jnsp74tmPageRequestDto);
List<Jnsp7xtmDto> tempjnsp74TmDtoList = jnsp74tmStatisticsRepository.queryTotal(jnsp74tmPageRequestDto);
if (!tempjnsp74TmDtoList.isEmpty()) {
// 过滤出没有对应合计值年份
List<String> filteredList = monthsList.stream()
.filter(month -> !tempjnsp74TmDtoList.stream().map(Jnsp7xtmDto::getNqy).collect(Collectors.toList()).contains(month))
.collect(Collectors.toList());
if (!filteredList.isEmpty()) {
for (int i = 0; i < filteredList.size(); i++) {
Jnsp7xtmDto one = new Jnsp7xtmDto();
BeanUtils.copyProperties(emptyJnsp74xmDto, one);
one.setNqy(filteredList.get(i));
tempjnsp74TmDtoList.add(one);
}
}
}
List<Jnsp7xtmDto> jnsp74tmDtos = tempjnsp74TmDtoList.stream().sorted(Comparator.comparing(Jnsp7xtmDto::getNqy)).collect(Collectors.toList());
if (!jnsp74tmDtos.isEmpty()) { if (!jnsp74tmDtos.isEmpty()) {
jnsp74tmDtos.forEach(item -> { jnsp74tmDtos.forEach(item -> {
if (item.getChzs() != null) { if (item.getChzs() != null) {
Jnsp74tmTableHeaderDto tableHeader = getTableHeader("chzs", item); Jnsp7xtmTableHeaderDto tableHeader = getTableHeader("chzs", item);
chzsTableHeaders.add(tableHeader); chzsTableHeaders.add(tableHeader);
sortTableHeaders.add(tableHeader); sortTableHeaders.add(tableHeader);
} }
if (item.getRmb() != null) { if (item.getRmb() != null) {
Jnsp74tmTableHeaderDto tableHeader = getTableHeader("rmb", item); Jnsp7xtmTableHeaderDto tableHeader = getTableHeader("rmb", item);
rmbTableHeaders.add(tableHeader); rmbTableHeaders.add(tableHeader);
sortTableHeaders.add(tableHeader); sortTableHeaders.add(tableHeader);
} }
if (item.getChzsa() != null) { if (item.getChzsa() != null) {
Jnsp74tmTableHeaderDto tableHeader = getTableHeader("chzsa", item); Jnsp7xtmTableHeaderDto tableHeader = getTableHeader("chzsa", item);
chzsaTableHeaders.add(tableHeader); chzsaTableHeaders.add(tableHeader);
sortTableHeaders.add(tableHeader); sortTableHeaders.add(tableHeader);
} }
if (item.getChzsb() != null) { if (item.getChzsb() != null) {
Jnsp74tmTableHeaderDto tableHeader = getTableHeader("chzsb", item); Jnsp7xtmTableHeaderDto tableHeader = getTableHeader("chzsb", item);
chzsbTableHeaders.add(tableHeader); chzsbTableHeaders.add(tableHeader);
sortTableHeaders.add(tableHeader); sortTableHeaders.add(tableHeader);
} }
}); });
} }
List<Jnsp74tmTableHeaderDto> tempList = sortTableHeaders.stream().sorted(Comparator.comparing(Jnsp74tmTableHeaderDto::getOldKey)).collect(Collectors.toList()); List<Jnsp7xtmTableHeaderDto> tempList = sortTableHeaders.stream().sorted(Comparator.comparing(Jnsp7xtmTableHeaderDto::getOldKey)).collect(Collectors.toList());
tempList.stream().forEach(item -> { tempList.stream().forEach(item -> {
tableHeaders.add(item); tableHeaders.add(item);
}); });
...@@ -311,8 +331,8 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -311,8 +331,8 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
/** /**
* 获取动态列的表头 * 获取动态列的表头
* **/ * **/
private Jnsp74tmTableHeaderDto getTableHeader(String tar, Jnsp74xmDto item) { private Jnsp7xtmTableHeaderDto getTableHeader(String tar, Jnsp7xtmDto item) {
Jnsp74tmTableHeaderDto tableHeader = new Jnsp74tmTableHeaderDto(); Jnsp7xtmTableHeaderDto tableHeader = new Jnsp7xtmTableHeaderDto();
String key = item.getNqy() + "_" + tar; String key = item.getNqy() + "_" + tar;
tableHeader.setName(key); tableHeader.setName(key);
tableHeader.setKey(key); tableHeader.setKey(key);
...@@ -322,7 +342,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -322,7 +342,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
/** /**
* 获取处理好的数据 * 获取处理好的数据
* **/ * **/
private void getMap(String dynamicColumn,String statistics,int i, List<Jnsp74tmTableHeaderDto> oneTable,String months,Jnsp74tmPageRequestDto jnsp74tmPageRequestDto,HashMap<String, Object> contentMap) { private void getMap(String dynamicColumn, String statistics, int i, List<Jnsp7xtmTableHeaderDto> oneTable, String months, Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, HashMap<String, Object> contentMap) {
List<Map<String, Object>> maps = jnsp74tmStatisticsRepository.queryList(jnsp74tmPageRequestDto, months, 1, 10, "2", dynamicColumn, statistics); List<Map<String, Object>> maps = jnsp74tmStatisticsRepository.queryList(jnsp74tmPageRequestDto, months, 1, 10, "2", dynamicColumn, statistics);
for (int j = 0; j < oneTable.size(); j++) { for (int j = 0; j < oneTable.size(); j++) {
for (Map.Entry<String, Object> objectEntry :maps.get(i).entrySet()) { for (Map.Entry<String, Object> objectEntry :maps.get(i).entrySet()) {
...@@ -336,7 +356,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -336,7 +356,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
/** /**
* 获取固定列数据 * 获取固定列数据
* **/ * **/
private List<Jnsp74tmTableHeaderDto> getTableHeadeList(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) { private List<Jnsp7xtmTableHeaderDto> getTableHeadeList(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
/* 初始化 固定列的label和value /* 初始化 固定列的label和value
fixedTable key 是数据库中的数据列 value是前端的显示列 fixedTable key 是数据库中的数据列 value是前端的显示列
*/ */
...@@ -346,10 +366,10 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -346,10 +366,10 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
fixedTable.put("jypn","jypn"); fixedTable.put("jypn","jypn");
fixedTable.put("jlpm","jlpm"); fixedTable.put("jlpm","jlpm");
fixedTable.put("xslj","xslj"); fixedTable.put("xslj","xslj");
List<Jnsp74tmTableHeaderDto> list = new ArrayList<>(); List<Jnsp7xtmTableHeaderDto> list = new ArrayList<>();
// 维度一 // 维度一
if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getOneDimensionality())) { if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getOneDimensionality())) {
Jnsp74tmTableHeaderDto oneTableHeader = new Jnsp74tmTableHeaderDto(); Jnsp7xtmTableHeaderDto oneTableHeader = new Jnsp7xtmTableHeaderDto();
oneTableHeader.setName(fixedTable.get(jnsp74tmPageRequestDto.getOneDimensionality())); oneTableHeader.setName(fixedTable.get(jnsp74tmPageRequestDto.getOneDimensionality()));
oneTableHeader.setKey(jnsp74tmPageRequestDto.getOneDimensionality()); oneTableHeader.setKey(jnsp74tmPageRequestDto.getOneDimensionality());
oneTableHeader.setOldKey(jnsp74tmPageRequestDto.getOneDimensionality()); oneTableHeader.setOldKey(jnsp74tmPageRequestDto.getOneDimensionality());
...@@ -357,7 +377,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -357,7 +377,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
} }
// 维度二 // 维度二
if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getTwoDimensionality())) { if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getTwoDimensionality())) {
Jnsp74tmTableHeaderDto oneTableHeader = new Jnsp74tmTableHeaderDto(); Jnsp7xtmTableHeaderDto oneTableHeader = new Jnsp7xtmTableHeaderDto();
oneTableHeader.setName(fixedTable.get(jnsp74tmPageRequestDto.getTwoDimensionality())); oneTableHeader.setName(fixedTable.get(jnsp74tmPageRequestDto.getTwoDimensionality()));
oneTableHeader.setKey(jnsp74tmPageRequestDto.getTwoDimensionality()); oneTableHeader.setKey(jnsp74tmPageRequestDto.getTwoDimensionality());
oneTableHeader.setOldKey(jnsp74tmPageRequestDto.getTwoDimensionality()); oneTableHeader.setOldKey(jnsp74tmPageRequestDto.getTwoDimensionality());
...@@ -365,7 +385,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -365,7 +385,7 @@ public class Jnsp74tmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
} }
// 维度三 // 维度三
if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getThreeDimensionality())) { if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getThreeDimensionality())) {
Jnsp74tmTableHeaderDto oneTableHeader = new Jnsp74tmTableHeaderDto(); Jnsp7xtmTableHeaderDto oneTableHeader = new Jnsp7xtmTableHeaderDto();
oneTableHeader.setName(fixedTable.get(jnsp74tmPageRequestDto.getThreeDimensionality())); oneTableHeader.setName(fixedTable.get(jnsp74tmPageRequestDto.getThreeDimensionality()));
oneTableHeader.setKey(jnsp74tmPageRequestDto.getThreeDimensionality()); oneTableHeader.setKey(jnsp74tmPageRequestDto.getThreeDimensionality());
oneTableHeader.setOldKey(jnsp74tmPageRequestDto.getThreeDimensionality()); oneTableHeader.setOldKey(jnsp74tmPageRequestDto.getThreeDimensionality());
......
...@@ -2,11 +2,11 @@ package org.rcisoft.bus.jnsp7xtm.service.impl; ...@@ -2,11 +2,11 @@ package org.rcisoft.bus.jnsp7xtm.service.impl;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.rcisoft.bus.jnsp7xtm.dao.Jnsp74tmStatisticsRepository; import org.rcisoft.bus.jnsp7xtm.dao.Jnsp7xtmStatisticsRepository;
import org.rcisoft.bus.jnsp7xtm.dto.*; import org.rcisoft.bus.jnsp7xtm.dto.*;
import org.rcisoft.bus.jnsp7xtm.dto.Jnsp74xmDto; import org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmDto;
import org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm; import org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm;
import org.rcisoft.bus.jnsp7xtm.service.Jnsp74tmStatisticService; import org.rcisoft.bus.jnsp7xtm.service.Jnsp7xtmStatisticService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -24,40 +24,40 @@ import java.util.stream.Collectors; ...@@ -24,40 +24,40 @@ import java.util.stream.Collectors;
@Slf4j @Slf4j
@Service @Service
@Transactional(readOnly = true,propagation = Propagation.NOT_SUPPORTED) @Transactional(readOnly = true,propagation = Propagation.NOT_SUPPORTED)
public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService { public class Jnsp7xtmStatisticServiceImpl implements Jnsp7xtmStatisticService {
@Autowired @Autowired
private Jnsp74tmStatisticsRepository jnsp74tmStatisticsRepository; private Jnsp7xtmStatisticsRepository jnsp74tmStatisticsRepository;
// 1.查询所有下拉框数据源 // 1.查询所有下拉框数据源
@Override @Override
public List<Jnsp74tmOptionDto> queryAllPullDownData(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) { public List<Jnsp7xtmOptionDto> queryAllPullDownData(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
List<Jnsp74tmOptionDto> dataList = new ArrayList<>(); List<Jnsp7xtmOptionDto> dataList = new ArrayList<>();
// 1.获取khdm // 1.获取khdm
List<String> khdm = jnsp74tmStatisticsRepository.queryAllPullDown("khdm"); List<String> khdm = jnsp74tmStatisticsRepository.queryAllPullDown("khdm");
Jnsp74tmOptionDto khdmPullDowmData = Jnsp74tmOptionDto.builder().label("khdm").pullDownList(khdm).build(); Jnsp7xtmOptionDto khdmPullDowmData = Jnsp7xtmOptionDto.builder().label("khdm").pullDownList(khdm).build();
dataList.add(khdmPullDowmData); dataList.add(khdmPullDowmData);
// 2.获取Khm // 2.获取Khm
List<String> khm = jnsp74tmStatisticsRepository.queryAllPullDown("khm"); List<String> khm = jnsp74tmStatisticsRepository.queryAllPullDown("khm");
dataList.add(Jnsp74tmOptionDto.builder().label("Khm").pullDownList(khm).build()); dataList.add(Jnsp7xtmOptionDto.builder().label("Khm").pullDownList(khm).build());
// 3.获取pn // 3.获取pn
List<String> pn = jnsp74tmStatisticsRepository.queryAllPullDown("pn"); List<String> pn = jnsp74tmStatisticsRepository.queryAllPullDown("pn");
dataList.add(Jnsp74tmOptionDto.builder().label("pn").pullDownList(pn).build()); dataList.add(Jnsp7xtmOptionDto.builder().label("pn").pullDownList(pn).build());
// 4.获取jlpm // 4.获取jlpm
List<String> jlpm = jnsp74tmStatisticsRepository.queryAllPullDown("jlpm"); List<String> jlpm = jnsp74tmStatisticsRepository.queryAllPullDown("jlpm");
dataList.add(Jnsp74tmOptionDto.builder().label("jlpm").pullDownList(jlpm).build()); dataList.add(Jnsp7xtmOptionDto.builder().label("jlpm").pullDownList(jlpm).build());
// 5.获取zd // 5.获取zd
List<String> zd = jnsp74tmStatisticsRepository.queryAllPullDown("zd"); List<String> zd = jnsp74tmStatisticsRepository.queryAllPullDown("zd");
dataList.add(Jnsp74tmOptionDto.builder().label("zd").pullDownList(zd).build()); dataList.add(Jnsp7xtmOptionDto.builder().label("zd").pullDownList(zd).build());
// 6.获取fnq // 6.获取fnq
List<String> fnq = jnsp74tmStatisticsRepository.queryAllPullDown("fnq"); List<String> fnq = jnsp74tmStatisticsRepository.queryAllPullDown("fnq");
dataList.add(Jnsp74tmOptionDto.builder().label("fnq").pullDownList(fnq).build()); dataList.add(Jnsp7xtmOptionDto.builder().label("fnq").pullDownList(fnq).build());
// 7.获取szzt // 7.获取szzt
List<String> szzt = jnsp74tmStatisticsRepository.queryAllPullDown("szzt"); List<String> szzt = jnsp74tmStatisticsRepository.queryAllPullDown("szzt");
dataList.add(Jnsp74tmOptionDto.builder().label("szzt").pullDownList(szzt).build()); dataList.add(Jnsp7xtmOptionDto.builder().label("szzt").pullDownList(szzt).build());
// 8.获取mksqf // 8.获取mksqf
List<String> mksqf = jnsp74tmStatisticsRepository.queryAllPullDown("mksqf"); List<String> mksqf = jnsp74tmStatisticsRepository.queryAllPullDown("mksqf");
dataList.add(Jnsp74tmOptionDto.builder().label("mksqf").pullDownList(mksqf).build()); dataList.add(Jnsp7xtmOptionDto.builder().label("mksqf").pullDownList(mksqf).build());
return dataList; return dataList;
} }
...@@ -69,7 +69,7 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService { ...@@ -69,7 +69,7 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService {
// 3.查询统计 // 3.查询统计
@Override @Override
public Jnsp74tmPageListDto getPageList(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) { public Jnsp7xtmPageListDto getPageList(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
// 前置查询条件 // 前置查询条件
boolean conditionIsNull = boolean conditionIsNull =
jnsp74tmPageRequestDto.isRmb() || jnsp74tmPageRequestDto.isRmb() ||
...@@ -86,7 +86,7 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService { ...@@ -86,7 +86,7 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService {
.map(month -> "[" + month + "]") .map(month -> "[" + month + "]")
.collect(Collectors.joining(",")); .collect(Collectors.joining(","));
Jnsp74tmPageListDto jnsp74tmPageListDto = new Jnsp74tmPageListDto(); Jnsp7xtmPageListDto jnsp74tmPageListDto = new Jnsp7xtmPageListDto();
if (!StringUtils.isNotBlank(jnsp74tmPageRequestDto.getOneDimensionality()) && !StringUtils.isNotBlank(jnsp74tmPageRequestDto.getTwoDimensionality()) && !StringUtils.isNotBlank(jnsp74tmPageRequestDto.getThreeDimensionality())) { if (!StringUtils.isNotBlank(jnsp74tmPageRequestDto.getOneDimensionality()) && !StringUtils.isNotBlank(jnsp74tmPageRequestDto.getTwoDimensionality()) && !StringUtils.isNotBlank(jnsp74tmPageRequestDto.getThreeDimensionality())) {
jnsp74tmPageRequestDto.setOneDimensionality("khdm"); jnsp74tmPageRequestDto.setOneDimensionality("khdm");
jnsp74tmPageRequestDto.setTwoDimensionality("khm"); jnsp74tmPageRequestDto.setTwoDimensionality("khm");
...@@ -124,15 +124,15 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService { ...@@ -124,15 +124,15 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService {
jnsp74tmPageListDto.setTotal(maps.size()); jnsp74tmPageListDto.setTotal(maps.size());
// 获取list // 获取list
List<Jnsp74tmPageDto> list = getList(jnsp74tmPageRequestDto, months, monthsList,statistics); List<Jnsp7xtmPageDto> list = getList(jnsp74tmPageRequestDto, months, monthsList,statistics);
jnsp74tmPageListDto.setUserDtoList(list); jnsp74tmPageListDto.setUserDtoList(list);
return jnsp74tmPageListDto; return jnsp74tmPageListDto;
} }
// 4.返回总计接口 // 4.返回总计接口
@Override @Override
public Jnsp74tmTotalDto queryTotal(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) { public Jnsp7xtmTotalDto queryTotal(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
Jnsp74tmTotalDto jnsp74tmTotalDto = new Jnsp74tmTotalDto(); Jnsp7xtmTotalDto jnsp74tmTotalDto = new Jnsp7xtmTotalDto();
// 前置查询条件 // 前置查询条件
boolean conditionIsNull = boolean conditionIsNull =
jnsp74tmPageRequestDto.isRmb() || jnsp74tmPageRequestDto.isRmb() ||
...@@ -149,58 +149,31 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService { ...@@ -149,58 +149,31 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService {
jnsp74tmPageRequestDto.setNqy(months); jnsp74tmPageRequestDto.setNqy(months);
} }
// 设置空Jnsp74tm // 设置空Jnsp74tm
Jnsp74xmDto jnsp74TmDto = new Jnsp74xmDto(); Jnsp7xtmDto jnsp74TmDto = getEmptyJnsp74xmDto(jnsp74tmPageRequestDto);
if (jnsp74tmPageRequestDto.isXsjg()) {
jnsp74TmDto.setXsjg("");
}
if (jnsp74tmPageRequestDto.isRmb()) {
jnsp74TmDto.setRmb("");
}
if (jnsp74tmPageRequestDto.isChzs()) {
jnsp74TmDto.setChzs("");
}
if (jnsp74tmPageRequestDto.isChzsa()) {
jnsp74TmDto.setChzsa("");
}
if (jnsp74tmPageRequestDto.isChzsb()) {
jnsp74TmDto.setChzsb("");
}
if (jnsp74tmPageRequestDto.isZzc()) {
jnsp74TmDto.setZzc("");
}
if (jnsp74tmPageRequestDto.isZzcg()) {
jnsp74TmDto.setZzcg("");
}
if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getKhdm())) {
jnsp74tmPageRequestDto.setVagueKhdm("");
}
if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getKhm())) {
jnsp74tmPageRequestDto.setVaguekhm("");
}
// 根据条件查询数据每个年份对应的合计值 // 根据条件查询数据每个年份对应的合计值
List<Jnsp74xmDto> jnsp74TmDtoList = jnsp74tmStatisticsRepository.queryTotal(jnsp74tmPageRequestDto); List<Jnsp7xtmDto> jnsp74TmDtoList = jnsp74tmStatisticsRepository.queryTotal(jnsp74tmPageRequestDto);
if (!jnsp74TmDtoList.isEmpty()) { if (!jnsp74TmDtoList.isEmpty()) {
// 过滤出没有对应合计值年份 // 过滤出没有对应合计值年份
List<String> filteredList = monthsList.stream() List<String> filteredList = monthsList.stream()
.filter(month -> !jnsp74TmDtoList.stream().map(Jnsp74xmDto::getNqy).collect(Collectors.toList()).contains(month)) .filter(month -> !jnsp74TmDtoList.stream().map(Jnsp7xtmDto::getNqy).collect(Collectors.toList()).contains(month))
.collect(Collectors.toList()); .collect(Collectors.toList());
if (!filteredList.isEmpty()) { if (!filteredList.isEmpty()) {
for (int i = 0; i < filteredList.size(); i++) { for (int i = 0; i < filteredList.size(); i++) {
Jnsp74xmDto one = new Jnsp74xmDto(); Jnsp7xtmDto one = new Jnsp7xtmDto();
BeanUtils.copyProperties(jnsp74TmDto, one); BeanUtils.copyProperties(jnsp74TmDto, one);
one.setNqy(filteredList.get(i)); one.setNqy(filteredList.get(i));
jnsp74TmDtoList.add(one); jnsp74TmDtoList.add(one);
} }
} }
} }
List<Jnsp74xmDto> collect = jnsp74TmDtoList.stream().sorted(Comparator.comparing(Jnsp74xmDto::getNqy)).collect(Collectors.toList()); List<Jnsp7xtmDto> collect = jnsp74TmDtoList.stream().sorted(Comparator.comparing(Jnsp7xtmDto::getNqy)).collect(Collectors.toList());
jnsp74tmTotalDto.setJnsp7xtmDtos(collect); jnsp74tmTotalDto.setJnsp7xtmDtos(collect);
return jnsp74tmTotalDto; return jnsp74tmTotalDto;
} }
// 获取统计的list // 获取统计的list
private List<Jnsp74tmPageDto> getList(Jnsp74tmPageRequestDto jnsp74tmPageRequestDto, String months, List<String> monthsList, String statistics) { private List<Jnsp7xtmPageDto> getList(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto, String months, List<String> monthsList, String statistics) {
// 初始化 listrmb 和 listxsjg 的值 // 初始化 listrmb 和 listxsjg 的值
List<Map<String,Object>> listrmb = null; List<Map<String,Object>> listrmb = null;
List<Map<String,Object>> listxsjg = null; List<Map<String,Object>> listxsjg = null;
...@@ -232,9 +205,9 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService { ...@@ -232,9 +205,9 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService {
if (jnsp74tmPageRequestDto.isZzcg()) if (jnsp74tmPageRequestDto.isZzcg())
listzzcg = jnsp74tmStatisticsRepository.queryList(jnsp74tmPageRequestDto,months,pageNo,pageSize,"1","zzcg",statistics); listzzcg = jnsp74tmStatisticsRepository.queryList(jnsp74tmPageRequestDto,months,pageNo,pageSize,"1","zzcg",statistics);
//获取对应关系 //获取对应关系
Map<String, Jnsp74tmPageDto> map = new HashMap(); Map<String, Jnsp7xtmPageDto> map = new HashMap();
//创建填充数据 //创建填充数据
List<Jnsp74tmPageDto> resList = new ArrayList<>(); List<Jnsp7xtmPageDto> resList = new ArrayList<>();
//获取日期参数 //获取日期参数
List<String> nqy = new ArrayList<>(); List<String> nqy = new ArrayList<>();
//判断是否传入日期参数,如果没传入设置默认值 //判断是否传入日期参数,如果没传入设置默认值
...@@ -305,7 +278,7 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService { ...@@ -305,7 +278,7 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService {
return resList; return resList;
} }
private void getObjectByMap(List<Map<String,Object>> listrmb, int i, Map<String, Jnsp74tmPageDto> map, List<String> nqy, boolean[] flag, List<Jnsp74tmPageDto> resList, String tar, Jnsp74tmPageRequestDto jnsp74tmPageRequestDto) { private void getObjectByMap(List<Map<String,Object>> listrmb, int i, Map<String, Jnsp7xtmPageDto> map, List<String> nqy, boolean[] flag, List<Jnsp7xtmPageDto> resList, String tar, Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
Map listMap = listrmb.get(i); Map listMap = listrmb.get(i);
String key = ""; String key = "";
// 维度一 // 维度一
...@@ -341,11 +314,11 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService { ...@@ -341,11 +314,11 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService {
/** /**
* userDto null * userDto null
* **/ * **/
Jnsp74tmPageDto userDto = map.getOrDefault(key, null); Jnsp7xtmPageDto userDto = map.getOrDefault(key, null);
//判断该用户是否创建过 //判断该用户是否创建过
if (userDto == null) { if (userDto == null) {
//创建对象加入到list结果中 //创建对象加入到list结果中
userDto = new Jnsp74tmPageDto(dimensionalityOne, dimensionalityTwo, dimensionalityThree, nqy, flag); userDto = new Jnsp7xtmPageDto(dimensionalityOne, dimensionalityTwo, dimensionalityThree, nqy, flag);
/** /**
* resList = [{dimensionalityOne = '00019200',dimensionalityTwo = '',dimensionalityThree = '',data:[{nqy=202402,chzs=''},{nqy=202403,chzs=''},{nqy=202404,chzs=''},{nqy=202406,chzs=''},{nqy=202407,chzs=''}]},data2 = null,map = {202402 = 0,202403 = 1,202404 = 2,202406 = 3,202407 = 4 }] * resList = [{dimensionalityOne = '00019200',dimensionalityTwo = '',dimensionalityThree = '',data:[{nqy=202402,chzs=''},{nqy=202403,chzs=''},{nqy=202404,chzs=''},{nqy=202406,chzs=''},{nqy=202407,chzs=''}]},data2 = null,map = {202402 = 0,202403 = 1,202404 = 2,202406 = 3,202407 = 4 }]
* map key值年份 value是对应的下坐标 * map key值年份 value是对应的下坐标
...@@ -361,7 +334,7 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService { ...@@ -361,7 +334,7 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService {
/** /**
* data: [{nqy=202402,chzs=''},{nqy=202403,chzs=''},{nqy=202404,chzs=''},{nqy=202406,chzs=''},{nqy=202407,chzs=''}] * data: [{nqy=202402,chzs=''},{nqy=202403,chzs=''},{nqy=202404,chzs=''},{nqy=202406,chzs=''},{nqy=202407,chzs=''}]
* **/ * **/
List<Jnsp74xmDto> data = userDto.getData(); List<Jnsp7xtmDto> data = userDto.getData();
//获取月份对照集合 //获取月份对照集合
/** /**
* month: [{202402 = 0,202403 = 1,202404 = 2,202406 = 3,202407 = 4 }] * month: [{202402 = 0,202403 = 1,202404 = 2,202406 = 3,202407 = 4 }]
...@@ -384,7 +357,7 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService { ...@@ -384,7 +357,7 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService {
//获取月份对应的下标 //获取月份对应的下标
Integer index = month.get(entry.getKey()); Integer index = month.get(entry.getKey());
//获取信息 //获取信息
Jnsp74xmDto jnsp7XtmDto = data.get(index); Jnsp7xtmDto jnsp7XtmDto = data.get(index);
//原则上调用toString方法能解决,但是JIT自动优化了,只能使用上转型 //原则上调用toString方法能解决,但是JIT自动优化了,只能使用上转型
Object value = entry.getValue(); Object value = entry.getValue();
if (tar.equals("CHZS")) { if (tar.equals("CHZS")) {
...@@ -411,4 +384,36 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService { ...@@ -411,4 +384,36 @@ public class Jnsp74tmStatisticServiceImpl implements Jnsp74tmStatisticService {
} }
} }
} }
public Jnsp7xtmDto getEmptyJnsp74xmDto(Jnsp7xtmPageRequestDto jnsp74tmPageRequestDto) {
Jnsp7xtmDto jnsp74TmDto = new Jnsp7xtmDto();
if (jnsp74tmPageRequestDto.isXsjg()) {
jnsp74TmDto.setXsjg("");
}
if (jnsp74tmPageRequestDto.isRmb()) {
jnsp74TmDto.setRmb("");
}
if (jnsp74tmPageRequestDto.isChzs()) {
jnsp74TmDto.setChzs("");
}
if (jnsp74tmPageRequestDto.isChzsa()) {
jnsp74TmDto.setChzsa("");
}
if (jnsp74tmPageRequestDto.isChzsb()) {
jnsp74TmDto.setChzsb("");
}
if (jnsp74tmPageRequestDto.isZzc()) {
jnsp74TmDto.setZzc("");
}
if (jnsp74tmPageRequestDto.isZzcg()) {
jnsp74TmDto.setZzcg("");
}
if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getKhdm())) {
jnsp74tmPageRequestDto.setVagueKhdm("");
}
if (StringUtils.isNotBlank(jnsp74tmPageRequestDto.getKhm())) {
jnsp74tmPageRequestDto.setVaguekhm("");
}
return jnsp74TmDto;
}
} }
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</resultMap> </resultMap>
<select id="queryJnsp74tmByPaged" resultMap="BaseResultMap"> <select id="queryJnsp74tmByPaged" resultMap="BaseResultMap">
SELECT * SELECT *
FROM Jnsp74tm FROM Jnsp7xtm
WHERE WHERE
1=1 1=1
<if test='entity.clickOneDimensionality and entity.type == "1"'> <if test='entity.clickOneDimensionality and entity.type == "1"'>
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
<select id="queryAllJnsp74tm" resultType="java.lang.Integer"> <select id="queryAllJnsp74tm" resultType="java.lang.Integer">
SELECT SELECT
count(*) count(*)
FROM Jnsp74tm FROM Jnsp7xtm
WHERE WHERE
1=1 1=1
<if test='entity.clickOneDimensionality and entity.type == "1"'> <if test='entity.clickOneDimensionality and entity.type == "1"'>
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
</select> </select>
<select id="queryFindAllList" resultType="org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm"> <select id="queryFindAllList" resultType="org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm">
SELECT * SELECT *
FROM Jnsp74tm FROM Jnsp7xtm
WHERE WHERE
1=1 1=1
<if test='entity.clickOneDimensionality and entity.type == "1"'> <if test='entity.clickOneDimensionality and entity.type == "1"'>
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="org.rcisoft.bus.jnsp7xtm.dao.Jnsp7xtmStatisticsRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.bus.jnsp7xtm.dto.Jnsp74xmDto"> <resultMap id="BaseResultMap" type="org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmDto">
<result column="zd" property="zd"/> <result column="zd" property="zd"/>
<result column="nqy" property="nqy"/> <result column="nqy" property="nqy"/>
<result column="ddh" property="ddh"/> <result column="ddh" property="ddh"/>
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<if test='key == "mksqf"'> <if test='key == "mksqf"'>
DISTINCT mksqf DISTINCT mksqf
</if> </if>
FROM jnsp74tm FROM Jnsp7xtm
</select> </select>
<select id="queryKey" resultType="org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm"> <select id="queryKey" resultType="org.rcisoft.bus.jnsp7xtm.entity.Jnsp7xtm">
SELECT SELECT
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
DISTINCT top 20 DISTINCT top 20
pn pn
</if> </if>
FROM jnsp7xtm FROM Jnsp7xtm
where where
1=1 1=1
<if test="khdm != null and khdm != ''"> <if test="khdm != null and khdm != ''">
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
SELECT nqy SELECT nqy
FROM ( FROM (
SELECT DISTINCT nqy, CAST(nqy AS INT) AS month_order SELECT DISTINCT nqy, CAST(nqy AS INT) AS month_order
FROM jnsp7xtm FROM Jnsp7xtm
) AS subquery ) AS subquery
ORDER BY month_order ASC ORDER BY month_order ASC
</select> </select>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
${statistics}, ${statistics},
nqy, nqy,
count(*) AS total count(*) AS total
FROM jnsp74tm FROM Jnsp7xtm
WHERE 1=1 WHERE 1=1
<if test="entity.nqy != null and entity.nqy!= ''"> <if test="entity.nqy != null and entity.nqy!= ''">
and nqy in and nqy in
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
${statistics}, ${statistics},
nqy , nqy ,
SUM(${computedColumn}) AS total SUM(${computedColumn}) AS total
FROM jnsp74tm FROM Jnsp7xtm
WHERE 1=1 WHERE 1=1
<if test="entity.nqy != null and entity.nqy!= ''"> <if test="entity.nqy != null and entity.nqy!= ''">
and nqy in and nqy in
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
FETCH NEXT #{pageSize} ROWS ONLY FETCH NEXT #{pageSize} ROWS ONLY
</if> </if>
</select> </select>
<select id="queryTotal" resultType="org.rcisoft.bus.jnsp7xtm.dto.Jnsp74xmDto"> <select id="queryTotal" resultType="org.rcisoft.bus.jnsp7xtm.dto.Jnsp7xtmDto">
SELECT SELECT
nqy nqy
<if test="entity.xsjg"> <if test="entity.xsjg">
...@@ -297,7 +297,7 @@ ...@@ -297,7 +297,7 @@
,SUM (zzcg) AS zzcg ,SUM (zzcg) AS zzcg
</if> </if>
FROM FROM
jnsp7xtm Jnsp7xtm
WHERE WHERE
1 = 1 1 = 1
<if test="entity.nqy != null and entity.nqy!= ''"> <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