Commit c3b004fb authored by zhangyi's avatar zhangyi

update

parent e1c88436
...@@ -83,8 +83,33 @@ public class EnterpriseService { ...@@ -83,8 +83,33 @@ public class EnterpriseService {
} }
public R statistic(EnterpriseStatisticBody body) throws Exception { public R statistic(EnterpriseStatisticBody body) throws Exception {
Map<String, Object> map = dskOpenApiUtil.requestBody("/api/jsk/enterprise/statistic", BeanUtil.beanToMap(body, false, false)); Map<String, Object> statisticMap = dskOpenApiUtil.requestBody("/api/jsk/enterprise/statistic", BeanUtil.beanToMap(body, false, false));
return BeanUtil.toBean(map, R.class);
Integer statisticMapCode = MapUtils.getInteger(statisticMap, "code", 300);
if (200 != statisticMapCode) throw new RuntimeException();
Map statisticMapData = MapUtils.getMap(statisticMap, "data", null);
if (MapUtils.isEmpty(statisticMapData)) return R.ok();
Map performance = MapUtils.getMap(statisticMapData, "performance");
Map business = MapUtils.getMap(statisticMapData, "business");
HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("cid", body.getCompanyId());
Map<String, Object> projectStatisticMap = dskOpenApiUtil.requestBody("/operate/enterpriseProject/statistic", paramMap);
Integer projectStatisticMapCode = MapUtils.getInteger(projectStatisticMap, "code", 300);
if (200 != projectStatisticMapCode) return R.ok(statisticMapData);
Map projectStatisticMapData = MapUtils.getMap(projectStatisticMap, "data", null);
performance.put("specialDebt", MapUtils.getInteger(projectStatisticMapData, "specialDebt", 0));
performance.put("bidPlan", MapUtils.getInteger(projectStatisticMapData, "bidPlan", 0));
business.put("historySend", MapUtils.getInteger(projectStatisticMapData, "historySend", 0));
statisticMapData.put("performance", performance);
statisticMapData.put("business", business);
return R.ok(statisticMapData);
} }
public R bidDataGroup(EnterpriseBidDataGroupBody body) throws Exception { public R bidDataGroup(EnterpriseBidDataGroupBody body) throws Exception {
......
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