Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
ee540fd2d3
@ -2,6 +2,7 @@ package com.xdap.self_development.controller;
|
||||
|
||||
import com.definesys.mpaas.common.http.Response;
|
||||
import com.xdap.self_development.controller.request.AnalysisRequest;
|
||||
import com.xdap.self_development.controller.request.ReportRequest;
|
||||
import com.xdap.self_development.pojo.view.AnalysisModelParamterView;
|
||||
import com.xdap.self_development.service.AnalysisCommonParametersService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -23,10 +24,10 @@ public class AnalysisCommonController {
|
||||
}
|
||||
|
||||
|
||||
//统计分析图标
|
||||
//统计分析图表
|
||||
@PostMapping("/showReport")
|
||||
public Response showReport(@RequestBody AnalysisRequest analysisRequest) {
|
||||
ArrayList<AnalysisModelParamterView> lists = analysisCommonParametersService.selectModelParamByCommon(analysisRequest);
|
||||
public Response showReport(@RequestBody ReportRequest request) {
|
||||
ArrayList<AnalysisModelParamterView> lists = analysisCommonParametersService.showReport(request);
|
||||
return Response.ok().data(lists);
|
||||
}
|
||||
|
||||
|
||||
@ -74,6 +74,20 @@ public class DataEntryEngineModelDto extends MpaasBasePojo {
|
||||
* 品牌
|
||||
*/
|
||||
private String brand;
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String emission;
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String burnType;
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String engineCapacity;
|
||||
|
||||
/**
|
||||
* 生产日期
|
||||
|
||||
@ -3,6 +3,7 @@ package com.xdap.self_development.service;
|
||||
|
||||
import com.xdap.self_development.controller.request.AnalysisRequest;
|
||||
import com.xdap.self_development.controller.request.ApprovalNodeRequest;
|
||||
import com.xdap.self_development.controller.request.ReportRequest;
|
||||
import com.xdap.self_development.pojo.dto.ActivitiDataAndRecordDTO;
|
||||
import com.xdap.self_development.pojo.dto.ActivitiDataDTO;
|
||||
import com.xdap.self_development.pojo.dto.HandleApprovalDTO;
|
||||
@ -15,4 +16,6 @@ import java.util.List;
|
||||
public interface AnalysisCommonParametersService {
|
||||
//查询常用参数返回机型数据
|
||||
ArrayList<AnalysisModelParamterView> selectModelParamByCommon(AnalysisRequest analysisRequest);
|
||||
|
||||
ArrayList<AnalysisModelParamterView> showReport(ReportRequest analysisRequest);
|
||||
}
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
package com.xdap.self_development.service.impl;
|
||||
|
||||
|
||||
import com.definesys.mpaas.query.db.PageQueryResult;
|
||||
import com.xdap.api.moudle.department.pojo.entity.XdapDepartments;
|
||||
import com.xdap.api.moudle.user.pojo.XdapUsers;
|
||||
import com.xdap.self_development.config.BusinessDatabase;
|
||||
import com.xdap.self_development.controller.request.AnalysisRequest;
|
||||
import com.xdap.self_development.controller.request.ModelRolesRequest;
|
||||
import com.xdap.self_development.controller.request.RolePerJoinRequest;
|
||||
import com.xdap.self_development.controller.request.UserRoleBindingRequest;
|
||||
import com.xdap.self_development.controller.request.*;
|
||||
import com.xdap.self_development.enums.ParamPermissionEnum;
|
||||
import com.xdap.self_development.exception.CommonException;
|
||||
import com.xdap.self_development.pojo.*;
|
||||
@ -23,6 +21,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@ -64,11 +63,40 @@ public class AnalysisCommonParametersServiceImpl implements AnalysisCommonParame
|
||||
AnalysisModelParamterView analysisModelParamterView = new AnalysisModelParamterView();
|
||||
DataEntryEngineModelPojo dataEntryEngineModelPojo = dataEntryEngineModelService.selectBymodelId(modelId);
|
||||
analysisModelParamterView.setModelID(modelId);
|
||||
analysisModelParamterView.setModelName(ObjectUtils.isEmpty(dataEntryEngineModelPojo.getModelName())?"":dataEntryEngineModelPojo.getModelName());
|
||||
analysisModelParamterView.setModelName(ObjectUtils.isEmpty(dataEntryEngineModelPojo.getModelName()) ? "" : dataEntryEngineModelPojo.getModelName());
|
||||
analysisModelParamterView.setPojos(pojoListAll);
|
||||
analysisModelParamterViews.add(analysisModelParamterView);
|
||||
|
||||
}
|
||||
return analysisModelParamterViews;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<AnalysisModelParamterView> showReport(ReportRequest request) {
|
||||
|
||||
List<DataEntryEngineModelPojo> queryResult = businessDatabase.getBusinessDatabase()
|
||||
// .eq("yc_or_oth", request.getYcOrOth())
|
||||
.like("model_name", request.getModelName())
|
||||
// .like("product_number", request.getProductNumber())
|
||||
.like("plate", request.getPlate())
|
||||
.like("platform", request.getPlatform())
|
||||
.like("series", request.getSeries())
|
||||
// .like("market_segment", request.getMarketSegment())
|
||||
.like("project_name", request.getProjectName())
|
||||
.like("project_number", request.getProjectNumber())
|
||||
.like("emission", request.getEmission())
|
||||
.like("burn_type", request.getBurnType())
|
||||
.doQuery(DataEntryEngineModelPojo.class);
|
||||
|
||||
String engineCapacityMin = request.getEngineCapacityMin();
|
||||
String engineCapacityMax = request.getEngineCapacityMax();
|
||||
// queryResult.stream().filter(new Predicate<DataEntryEngineModelPojo>() {
|
||||
// @Override
|
||||
// public boolean test(DataEntryEngineModelPojo dataEntryEngineModelPojo) {
|
||||
// dataEntryEngineModelPojo.get
|
||||
// return false;
|
||||
// }
|
||||
// })
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,19 +122,27 @@ public class EngineParamDetailServiceImpl implements EngineParamDetailService {
|
||||
String projectNumber = dataEntryEngineModelPojo.getProjectNumber();
|
||||
//品牌
|
||||
String brand = dataEntryEngineModelPojo.getBrand();
|
||||
//排放
|
||||
String emission = dataEntryEngineModelPojo.getEmission();
|
||||
String burnType = dataEntryEngineModelPojo.getBurnType();
|
||||
String engineCapacity = dataEntryEngineModelPojo.getEngineCapacity();
|
||||
ArrayList<String> strings = new ArrayList<>();
|
||||
if (dataEntryEngineModelPojo.getYcOrOth().equals("玉柴")) {
|
||||
strings.add("状态代号:" + productNumber);
|
||||
} else {
|
||||
strings.add("产品编号:" + productNumber);
|
||||
strings.add("品牌:" + brand);
|
||||
}
|
||||
strings.add("产品型号:" + dataEntryEngineModelPojo.getModelName());
|
||||
strings.add("板块:" + plate);
|
||||
strings.add("平台:" + platform);
|
||||
strings.add("系列:" + series);
|
||||
strings.add("细分市场:" + marketSegment);
|
||||
strings.add("项目名称:" + projectName);
|
||||
strings.add("项目编号:" + projectNumber);
|
||||
strings.add("品牌:" + brand);
|
||||
strings.add("排放:" + emission);
|
||||
strings.add("燃烧类型:" + burnType);
|
||||
strings.add("排量:" + engineCapacity);
|
||||
|
||||
collect.put("整车参数", strings);
|
||||
}
|
||||
@ -155,7 +163,7 @@ public class EngineParamDetailServiceImpl implements EngineParamDetailService {
|
||||
public Map<String, HashMap<String, List<String>>> selectParamListAndModel(String modelID) {
|
||||
HashMap<String, HashMap<String, List<String>>> map = new HashMap<>();
|
||||
DataEntryEngineModelPojo dataEntryEngineModelPojo = dataEntryEngineModelService.selectBymodelId(modelID);
|
||||
String s = dataEntryEngineModelPojo.getModelName() + "+" + dataEntryEngineModelPojo.getProductNumber();
|
||||
String s =dataEntryEngineModelPojo.getProductNumber();
|
||||
HashMap<String, List<String>> stringListMap = selectParamList(modelID);
|
||||
map.put(s, stringListMap);
|
||||
return map;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user