zhangtao
dongdingding 1 year ago
parent 6ad37798e0
commit f6a6411a32

@ -87,7 +87,8 @@ public class BPlanEnterpriseController extends BaseController {
*/ */
@ApiOperation(value = "查询首页",response =BPlanEnterPriseTreeResponse.class ) @ApiOperation(value = "查询首页",response =BPlanEnterPriseTreeResponse.class )
@GetMapping("/tree") @GetMapping("/tree")
public AjaxResult tree(BPlanEnterprisePageRequest req) { public TableDataInfo tree(BPlanEnterprisePageRequest req) {
List<BPlanEnterPriseTreeResponse> list = bAdministrativeService.selectBPlanEnterPriseTreeRequestRequestList(req); List<BPlanEnterPriseTreeResponse> list = bAdministrativeService.selectBPlanEnterPriseTreeRequestRequestList(req);
int plannedEnterpriseCountSum = list.stream() int plannedEnterpriseCountSum = list.stream()
.mapToInt(BPlanEnterPriseTreeResponse::getPlannedEnterpriseCount) .mapToInt(BPlanEnterPriseTreeResponse::getPlannedEnterpriseCount)
@ -102,8 +103,7 @@ public class BPlanEnterpriseController extends BaseController {
resultObject.setCheckEnterpriseCount(checkEnterpriseCountSum); resultObject.setCheckEnterpriseCount(checkEnterpriseCountSum);
resultObject.setPt(ptSum); resultObject.setPt(ptSum);
list.add(resultObject); list.add(resultObject);
return getDataTable(list);
return success(list);
// List<List<BPlanEnterPriseTreeResponse>> groupedList = list.stream() // List<List<BPlanEnterPriseTreeResponse>> groupedList = list.stream()
// .collect(Collectors.groupingBy(BPlanEnterPriseTreeResponse::getCounty)) // .collect(Collectors.groupingBy(BPlanEnterPriseTreeResponse::getCounty))
// .values() // .values()
@ -223,6 +223,17 @@ public class BPlanEnterpriseController extends BaseController {
util.exportExcel(response, list, "导出计划管理"); util.exportExcel(response, list, "导出计划管理");
} }
/**
*
*/
@ApiOperation(value = "导出计划管理")
@PostMapping("/exportplan")
public void exportplan(HttpServletResponse response, BPlanEnterprise bPlanEnterprise)
{
List<BPlanEnterprise> list = bPlanEnterpriseService.selectBPlanEnterpriseList(bPlanEnterprise);
ExcelUtil<BPlanEnterprise> util = new ExcelUtil<BPlanEnterprise>(BPlanEnterprise.class);
util.exportExcel(response, list, "计划管理数据");
}
/** /**
* *
*/ */

@ -16,4 +16,5 @@ public class BPlanEnterprisePageRequest {
*/ */
@ApiModelProperty(value = "计划年份") @ApiModelProperty(value = "计划年份")
private String plannedYear; private String plannedYear;
} }

@ -73,11 +73,11 @@
LEFT JOIN sz_enfor_examine c ON b.enterprise_id = c.USC_CODE LEFT JOIN sz_enfor_examine c ON b.enterprise_id = c.USC_CODE
<where> <where>
<if test="req.plannedYear!=null and req.plannedYear!=''"> <if test="req.plannedYear!=null and req.plannedYear!=''">
b.planned_year#{req.plannedYear} b.planned_year=#{req.plannedYear}
</if> </if>
</where> </where>
GROUP BY SUBSTRING(a.county, 1, 8) )s GROUP BY SUBSTRING(a.county, 1, 8) )s
where s. institutionName!='苏州市' where s.institutionName!='苏州市'
</select> </select>

Loading…
Cancel
Save