认证-参数项收集-参考列-引用参考参数列表
This commit is contained in:
+55
-3
@@ -5,8 +5,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
|
import com.jero.modules.cert.report.entity.ParamsReportConfigEO;
|
||||||
import com.jero.modules.cert.report.entity.ParamsReportEO;
|
import com.jero.modules.cert.report.entity.ParamsReportEO;
|
||||||
import com.jero.modules.cert.report.entity.ParamsReportExportHistoryEO;
|
import com.jero.modules.cert.report.entity.ParamsReportExportHistoryEO;
|
||||||
|
import com.jero.modules.cert.report.service.IParamsReportConfigEOService;
|
||||||
import com.jero.modules.cert.report.service.IParamsReportEOService;
|
import com.jero.modules.cert.report.service.IParamsReportEOService;
|
||||||
import com.jero.modules.cert.report.service.IParamsReportExportHistoryEOService;
|
import com.jero.modules.cert.report.service.IParamsReportExportHistoryEOService;
|
||||||
import com.jero.modules.system.util.StringUtils;
|
import com.jero.modules.system.util.StringUtils;
|
||||||
@@ -21,11 +23,11 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.*;
|
||||||
import java.util.List;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 上报库
|
* @Description: 上报库
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2022-05-18
|
* @Date: 2022-05-18
|
||||||
@@ -41,6 +43,9 @@ public class ParamsReportEOController extends JeroController<ParamsReportEO, IPa
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IParamsReportExportHistoryEOService paramsReportExportHistoryEOService;
|
private IParamsReportExportHistoryEOService paramsReportExportHistoryEOService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IParamsReportConfigEOService paramsReportConfigEOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
@@ -76,6 +81,53 @@ public class ParamsReportEOController extends JeroController<ParamsReportEO, IPa
|
|||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param paramsReportEO
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "上报库-参数收集的分页列表查询")
|
||||||
|
@ApiOperation(value="上报库-参数收集的分页列表查询", notes="上报库-参数收集的分页列表查询")
|
||||||
|
@GetMapping(value = "/pageForManifest")
|
||||||
|
@RequiresPermissions("params:report:page")
|
||||||
|
public Result<?> queryPageListForManifest(ParamsReportEO paramsReportEO,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
if (StringUtils.isNotEmpty(paramsReportEO.getProjectName())) {
|
||||||
|
paramsReportEO.setProjectName(paramsReportEO.getProjectName().replace("%", "\\%"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotEmpty(paramsReportEO.getTitle())) {
|
||||||
|
paramsReportEO.setTitle(paramsReportEO.getTitle().replace("%", "\\%"));
|
||||||
|
}
|
||||||
|
|
||||||
|
IPage page = new Page(pageNo, pageSize);
|
||||||
|
IPage pageList = paramsReportEOService.pageInfo(page, paramsReportEO);
|
||||||
|
List<ParamsReportEO> rows = pageList.getRecords();
|
||||||
|
for (ParamsReportEO row : rows) {
|
||||||
|
// 项目名称-国家-清单名称
|
||||||
|
row.setPageName(row.getProjectName() + "-" + row.getTargetMarket() + "-" + row.getTitle());
|
||||||
|
// 设置配置
|
||||||
|
List<ParamsReportConfigEO> paramsReportConfigEOList = paramsReportConfigEOService.queryList(row.getId()).stream()
|
||||||
|
.sorted(Comparator.comparing(ParamsReportConfigEO::getDisplaySeq))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<HashMap<String, String>> mapList = new ArrayList<>();
|
||||||
|
paramsReportConfigEOList.forEach(paramsReportConfigEO -> {
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("label", paramsReportConfigEO.getConfigName());
|
||||||
|
map.put("value", paramsReportConfigEO.getId());
|
||||||
|
mapList.add(map);
|
||||||
|
});
|
||||||
|
row.setConfigList(mapList);
|
||||||
|
}
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
|
|||||||
+5
@@ -14,6 +14,8 @@ import org.jeecgframework.poi.excel.annotation.Excel;
|
|||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -82,4 +84,7 @@ public class ParamsReportEO implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String pageName; // 项目名称-国家-清单名称
|
private String pageName; // 项目名称-国家-清单名称
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<HashMap<String, String>> configList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user