|
|
@ -25,10 +25,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.validation.Valid;
|
|
|
|
import javax.validation.Valid;
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 计划企业表(BPlanEnterprise)表控制层
|
|
|
|
* 计划企业表(BPlanEnterprise)表控制层
|
|
|
@ -68,12 +65,12 @@ public class BPlanEnterpriseController extends BaseController {
|
|
|
|
@GetMapping("/list")
|
|
|
|
@GetMapping("/list")
|
|
|
|
public AjaxResult list(BPlanEnterprise bPlanEnterprise) {
|
|
|
|
public AjaxResult list(BPlanEnterprise bPlanEnterprise) {
|
|
|
|
List<BPlanEnterprise> list = bPlanEnterpriseService.selectBPlanEnterpriseList(bPlanEnterprise);
|
|
|
|
List<BPlanEnterprise> list = bPlanEnterpriseService.selectBPlanEnterpriseList(bPlanEnterprise);
|
|
|
|
for (BPlanEnterprise a :list){
|
|
|
|
for (BPlanEnterprise a : list) {
|
|
|
|
String enterPriseId = String.valueOf(a.getEnterpriseId());
|
|
|
|
String enterPriseId = String.valueOf(a.getEnterpriseId());
|
|
|
|
BKeyEnterprise count = bKeyEnterpriseService.getByentCode(enterPriseId);
|
|
|
|
BKeyEnterprise count = bKeyEnterpriseService.getByentCode(enterPriseId);
|
|
|
|
if (count != null) {
|
|
|
|
if (count != null) {
|
|
|
|
a.setIsPoint(1);
|
|
|
|
a.setIsPoint(1);
|
|
|
|
}else{
|
|
|
|
} else {
|
|
|
|
a.setIsPoint(2);
|
|
|
|
a.setIsPoint(2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -85,7 +82,7 @@ public class BPlanEnterpriseController extends BaseController {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询首页
|
|
|
|
* 查询首页
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ApiOperation(value = "查询首页",response =BPlanEnterPriseTreeResponse.class )
|
|
|
|
@ApiOperation(value = "查询首页", response = BPlanEnterPriseTreeResponse.class)
|
|
|
|
@GetMapping("/tree")
|
|
|
|
@GetMapping("/tree")
|
|
|
|
public TableDataInfo tree(BPlanEnterprisePageRequest req) {
|
|
|
|
public TableDataInfo tree(BPlanEnterprisePageRequest req) {
|
|
|
|
|
|
|
|
|
|
|
@ -96,7 +93,7 @@ public class BPlanEnterpriseController extends BaseController {
|
|
|
|
int checkEnterpriseCountSum = list.stream()
|
|
|
|
int checkEnterpriseCountSum = list.stream()
|
|
|
|
.mapToInt(BPlanEnterPriseTreeResponse::getCheckEnterpriseCount)
|
|
|
|
.mapToInt(BPlanEnterPriseTreeResponse::getCheckEnterpriseCount)
|
|
|
|
.sum();
|
|
|
|
.sum();
|
|
|
|
double ptSum = (double) checkEnterpriseCountSum /plannedEnterpriseCountSum;
|
|
|
|
double ptSum = (double) checkEnterpriseCountSum / plannedEnterpriseCountSum;
|
|
|
|
BPlanEnterPriseTreeResponse resultObject = new BPlanEnterPriseTreeResponse();
|
|
|
|
BPlanEnterPriseTreeResponse resultObject = new BPlanEnterPriseTreeResponse();
|
|
|
|
resultObject.setInstitutionName("苏州市");
|
|
|
|
resultObject.setInstitutionName("苏州市");
|
|
|
|
resultObject.setPlannedEnterpriseCount(plannedEnterpriseCountSum);
|
|
|
|
resultObject.setPlannedEnterpriseCount(plannedEnterpriseCountSum);
|
|
|
@ -229,12 +226,20 @@ public class BPlanEnterpriseController extends BaseController {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@ApiOperation(value = "导出计划管理")
|
|
|
|
@ApiOperation(value = "导出计划管理")
|
|
|
|
@PostMapping("/exportplan")
|
|
|
|
@PostMapping("/exportplan")
|
|
|
|
public void exportplan(HttpServletResponse response, BPlanEnterprise bPlanEnterprise)
|
|
|
|
public void exportplan(HttpServletResponse response, BPlanEnterprise bPlanEnterprise) {
|
|
|
|
{
|
|
|
|
|
|
|
|
List<BPlanEnterprise> list = bPlanEnterpriseService.selectBPlanEnterpriseList(bPlanEnterprise);
|
|
|
|
List<BPlanEnterprise> list = bPlanEnterpriseService.selectBPlanEnterpriseList(bPlanEnterprise);
|
|
|
|
|
|
|
|
for (BPlanEnterprise a : list) {
|
|
|
|
|
|
|
|
String district = a.getDistrict();
|
|
|
|
|
|
|
|
String county = district.substring(0, 7);
|
|
|
|
|
|
|
|
String paddedString = String.format("%s%s", county, "000000000");
|
|
|
|
|
|
|
|
List<String> countyList= bAdministrativeService.getBydistinct(district,paddedString);
|
|
|
|
|
|
|
|
String formattedData = String.join("-", countyList);
|
|
|
|
|
|
|
|
a.setDistrict(formattedData);
|
|
|
|
|
|
|
|
}
|
|
|
|
ExcelUtil<BPlanEnterprise> util = new ExcelUtil<BPlanEnterprise>(BPlanEnterprise.class);
|
|
|
|
ExcelUtil<BPlanEnterprise> util = new ExcelUtil<BPlanEnterprise>(BPlanEnterprise.class);
|
|
|
|
util.exportExcel(response, list, "计划管理数据");
|
|
|
|
util.exportExcel(response,list, "计划管理数据");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查看计划明细
|
|
|
|
* 查看计划明细
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|