|
|
@ -258,13 +258,19 @@ public class DataCenterRest { |
|
|
|
projectEngineeringProgressVo.setUrls(urlVos); |
|
|
|
} |
|
|
|
} |
|
|
|
IndexQuery query2 =new IndexQuery(); |
|
|
|
query2.setPage("1"); |
|
|
|
query2.setLimit("10"); |
|
|
|
query2.setOrder_type("10"); |
|
|
|
query2.setOrder_id(projectDetailsVo.getWarehouseCode()); |
|
|
|
BaseResponse<BaseResponseListObj<OrderIndexVo>> vos=ShRequester.getsystem$order$index(query2); |
|
|
|
IndexQuery query1=new IndexQuery(); |
|
|
|
query1.setLimit("20"); |
|
|
|
query1.setPage("1"); |
|
|
|
query1.setSearch_no(projectDetailsVo.getWarehouseCode()); |
|
|
|
query1.setSearch_no(vos.getData().getList().get(0).getOrder_no()); |
|
|
|
BaseResponseListObj<OrderIndexVo> indexVoBaseResponseListObj =ShRequester.get_order_list(query1).getData(); |
|
|
|
if(indexVoBaseResponseListObj.getCount()!=0){ |
|
|
|
projectDetailsVo.setTotalDayPower(indexVoBaseResponseListObj.getList().get(0).getTotal_day_power()); |
|
|
|
projectDetailsVo.setTotalDayPower(indexVoBaseResponseListObj.getList().get(0).getTotal_day_power().equals(null)?"0":indexVoBaseResponseListObj.getList().get(0).getTotal_day_power()); |
|
|
|
} |
|
|
|
if(info!=null){ |
|
|
|
List<UrlsVo> list=crmMapper.getProjectFilesByMainSid(info.getProjectSid()); |
|
|
@ -496,10 +502,10 @@ public class DataCenterRest { |
|
|
|
|
|
|
|
Map<String,Object> map=new HashMap<>(); |
|
|
|
List<String> title=new ArrayList<>(); |
|
|
|
title.add("贷款支持-折"); |
|
|
|
title.add("贷款支持-柱"); |
|
|
|
title.add("总投资-折"); |
|
|
|
title.add("总投资-柱"); |
|
|
|
title.add("总投资-折"); |
|
|
|
title.add("贷款支持-柱"); |
|
|
|
title.add("贷款支持-折"); |
|
|
|
map.put("titile",title); |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
String EndDate=sdf.format(DateUtil.offsetMonth(DateUtil.parse(query.getDate()),-7)); |
|
|
@ -511,21 +517,25 @@ public class DataCenterRest { |
|
|
|
List<String> ztz=new ArrayList<>(); |
|
|
|
for(int k=0;k<i+1;k++){ |
|
|
|
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM"); |
|
|
|
String dates=sdf.format(DateUtil.offsetMonth(DateUtil.parse(EndDate),k)); |
|
|
|
// String date=sdf1.format(DateUtil.offsetMonth(DateUtil.parse(query.getDate()),-k));
|
|
|
|
String date=sdf1.format(DateUtil.offsetMonth(DateUtil.parse(EndDate),k)); |
|
|
|
int date1=DateUtil.month(DateUtil.offsetMonth(DateUtil.parseDate(EndDate),k))+1; |
|
|
|
a.add(String.valueOf(date1)+"月"); |
|
|
|
ShGmVo vo=crmMapper.getGm(date); |
|
|
|
if(null!=vo){ |
|
|
|
dkzcCount.add(vo.getDkzcCount().toString()); |
|
|
|
dkzc.add(vo.getDkzc().divide(new BigDecimal(10000)).toString()); |
|
|
|
ztzCount.add(vo.getZtzCount().toString()); |
|
|
|
ztz.add(vo.getZtz().divide(new BigDecimal(10000)).toString()); |
|
|
|
}else{ |
|
|
|
dkzcCount.add("0"); |
|
|
|
dkzc.add("0"); |
|
|
|
ztzCount.add("0"); |
|
|
|
ztz.add("0"); |
|
|
|
int c =DateUtil.parse(dates).compareTo(DateUtil.parse("2024-05-31")); |
|
|
|
if(c==1){ |
|
|
|
a.add(String.valueOf(date1)+"月"); |
|
|
|
ShGmVo vo=crmMapper.getGm(date); |
|
|
|
if(null!=vo){ |
|
|
|
dkzcCount.add(vo.getDkzcCount().toString()); |
|
|
|
dkzc.add(vo.getDkzc().divide(new BigDecimal(10000)).toString()); |
|
|
|
ztzCount.add(vo.getZtzCount().toString()); |
|
|
|
ztz.add(vo.getZtz().divide(new BigDecimal(10000)).toString()); |
|
|
|
}else{ |
|
|
|
dkzcCount.add("0"); |
|
|
|
dkzc.add("0"); |
|
|
|
ztzCount.add("0"); |
|
|
|
ztz.add("0"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
map.put("date",a); |
|
|
@ -640,13 +650,19 @@ public class DataCenterRest { |
|
|
|
projectDetailsVo.setProjectSupervisionLog(vo33.get(0)); |
|
|
|
} |
|
|
|
} |
|
|
|
IndexQuery query2 =new IndexQuery(); |
|
|
|
query2.setPage("1"); |
|
|
|
query2.setLimit("10"); |
|
|
|
query2.setOrder_type("10"); |
|
|
|
query2.setOrder_id(projectDetailsVo.getWarehouseCode()); |
|
|
|
BaseResponse<BaseResponseListObj<OrderIndexVo>> vos=ShRequester.getsystem$order$index(query2); |
|
|
|
IndexQuery query1=new IndexQuery(); |
|
|
|
query1.setLimit("20"); |
|
|
|
query1.setPage("1"); |
|
|
|
query1.setSearch_no(projectDetailsVo.getWarehouseCode()); |
|
|
|
query1.setSearch_no(vos.getData().getList().get(0).getOrder_no()); |
|
|
|
BaseResponseListObj<OrderIndexVo> indexVoBaseResponseListObj =ShRequester.get_order_list(query1).getData(); |
|
|
|
if(indexVoBaseResponseListObj.getCount()!=0){ |
|
|
|
projectDetailsVo.setTotalDayPower(indexVoBaseResponseListObj.getList().get(0).getTotal_day_power()); |
|
|
|
projectDetailsVo.setTotalDayPower(indexVoBaseResponseListObj.getList().get(0).getTotal_day_power().equals(null)?"0":indexVoBaseResponseListObj.getList().get(0).getTotal_day_power()); |
|
|
|
} |
|
|
|
if(info!=null){ |
|
|
|
List<UrlsVo> list=crmMapper.getProjectFilesByMainSid(info.getProjectSid()); |
|
|
@ -673,7 +689,7 @@ public class DataCenterRest { |
|
|
|
@Scheduled(cron = "1 0 0 * * ? ") |
|
|
|
public void rr(){ |
|
|
|
//山海系统
|
|
|
|
String a ="63_17_0_2069_1,63_17_0_2048_1,63_17_0_2049_1,63_17_0_2070_1,63_17_0_2073_1,63_17_0_2075_1,63_17_0_2078_1,63_17_0_2080_1,63_17_0_2087_1,63_17_0_2090_1"; |
|
|
|
String a ="63_17_0_2070_1,63_17_0_2073_1,63_17_0_2075_1"; |
|
|
|
List<String> list=new ArrayList<>(); |
|
|
|
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
String format = sdf.format(new Date()); |
|
|
@ -692,13 +708,15 @@ public class DataCenterRest { |
|
|
|
List<OrderIndexVo > c =vos.getData().getList(); |
|
|
|
for (OrderIndexVo orderIndexVo : c) { |
|
|
|
String d=""; |
|
|
|
if(orderIndexVo.getAll_power().substring(orderIndexVo.getAll_power().length()-2).equals("MW")){ |
|
|
|
// if(orderIndexVo.getAll_power().substring(orderIndexVo.getAll_power().length()-2).equals("MW")){
|
|
|
|
if(orderIndexVo.getAll_power().contains("MW")){ |
|
|
|
d =orderIndexVo.getAll_power().replace("MW",""); |
|
|
|
BigDecimal bigDecimal=new BigDecimal(d); |
|
|
|
bigDecimal=bigDecimal.multiply(new BigDecimal(1000000)); |
|
|
|
bigDecimal=bigDecimal.multiply(new BigDecimal(3)); |
|
|
|
ztz=ztz.add(bigDecimal); |
|
|
|
}else if(orderIndexVo.getAll_power().substring(orderIndexVo.getAll_power().length()-2).equals("KW")){ |
|
|
|
// }else if(orderIndexVo.getAll_power().substring(orderIndexVo.getAll_power().length()-2).equals("KW")){
|
|
|
|
}else if(orderIndexVo.getAll_power().contains("KW")){ |
|
|
|
d =orderIndexVo.getAll_power().replace("KW",""); |
|
|
|
BigDecimal bigDecimal=new BigDecimal(d); |
|
|
|
bigDecimal=bigDecimal.multiply(new BigDecimal(1000)); |
|
|
@ -713,7 +731,7 @@ public class DataCenterRest { |
|
|
|
String url ="https://wms.yxtsoft.com/apiv1/external/apiadmin/warehouseinfo/list"; |
|
|
|
RestTemplate restTemplate = new RestTemplate(); |
|
|
|
Map<String, Object> sendBodyMM = new HashMap<>(); |
|
|
|
sendBodyMM.put("engTime",format); |
|
|
|
sendBodyMM.put("endTime",format); |
|
|
|
sendBodyMM.put("orgPath","0d19bc72-9370-45d3-bfda-5662eab34e4b"); |
|
|
|
ResponseEntity<String> forEntity = restTemplate.postForEntity(url,sendBodyMM,String.class); |
|
|
|
List<ProjectDetailsVo> vos= d.getList(forEntity,ProjectDetailsVo.class); |
|
|
@ -721,20 +739,20 @@ public class DataCenterRest { |
|
|
|
Integer dkzcCount =0; |
|
|
|
for (ProjectDetailsVo orderIndexVo : vos) { |
|
|
|
String g=""; |
|
|
|
if(orderIndexVo.getSquareMeter().substring(orderIndexVo.getSquareMeter().length()-2).equals("MW")){ |
|
|
|
if(orderIndexVo.getSquareMeter().contains("MW")){ |
|
|
|
g =orderIndexVo.getSquareMeter().replace("MW",""); |
|
|
|
BigDecimal bigDecimal=new BigDecimal(g); |
|
|
|
bigDecimal=bigDecimal.multiply(new BigDecimal(1000000)); |
|
|
|
bigDecimal=bigDecimal.multiply(new BigDecimal(1)); |
|
|
|
dkzc=dkzc.add(bigDecimal); |
|
|
|
}else if(orderIndexVo.getSquareMeter().substring(orderIndexVo.getSquareMeter().length()-2).equals("KW")){ |
|
|
|
}else if(orderIndexVo.getSquareMeter().contains("KW")){ |
|
|
|
g =orderIndexVo.getSquareMeter().replace("KW",""); |
|
|
|
BigDecimal bigDecimal=new BigDecimal(g); |
|
|
|
bigDecimal=bigDecimal.multiply(new BigDecimal(1000)); |
|
|
|
bigDecimal=bigDecimal.multiply(new BigDecimal(1)); |
|
|
|
dkzc=dkzc.add(bigDecimal); |
|
|
|
}else{ |
|
|
|
// g =orderIndexVo.getSquareMeter().replace("MW","");
|
|
|
|
g =orderIndexVo.getSquareMeter(); |
|
|
|
BigDecimal bigDecimal=new BigDecimal(g); |
|
|
|
bigDecimal=bigDecimal.multiply(new BigDecimal(1000000)); |
|
|
|
bigDecimal=bigDecimal.multiply(new BigDecimal(1)); |
|
|
@ -757,7 +775,7 @@ public class DataCenterRest { |
|
|
|
@GetMapping("/rr1") |
|
|
|
public void rr(@RequestParam("orderDate")String orderDate){ |
|
|
|
//山海系统
|
|
|
|
String a ="63_17_0_2069_1,63_17_0_2048_1,63_17_0_2049_1,63_17_0_2070_1,63_17_0_2073_1,63_17_0_2075_1,63_17_0_2078_1,63_17_0_2080_1,63_17_0_2087_1,63_17_0_2090_1"; |
|
|
|
String a ="63_17_0_2070_1,63_17_0_2073_1,63_17_0_2075_1"; |
|
|
|
List<String> list=new ArrayList<>(); |
|
|
|
// SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
// String format = sdf.format(new Date());
|
|
|
@ -799,7 +817,8 @@ public class DataCenterRest { |
|
|
|
String url ="https://wms.yxtsoft.com/apiv1/external/apiadmin/warehouseinfo/list"; |
|
|
|
RestTemplate restTemplate = new RestTemplate(); |
|
|
|
Map<String, Object> sendBodyMM = new HashMap<>(); |
|
|
|
sendBodyMM.put("engTime",orderDate); |
|
|
|
sendBodyMM.put("endTime",orderDate); |
|
|
|
sendBodyMM.put("orgPath","0d19bc72-9370-45d3-bfda-5662eab34e4b"); |
|
|
|
ResponseEntity<String> forEntity = restTemplate.postForEntity(url,sendBodyMM,String.class); |
|
|
|
List<ProjectDetailsVo> vos= d.getList(forEntity,ProjectDetailsVo.class); |
|
|
|
BigDecimal dkzc=new BigDecimal(0); |
|
|
@ -822,7 +841,7 @@ public class DataCenterRest { |
|
|
|
bigDecimal=bigDecimal.multiply(new BigDecimal(1)); |
|
|
|
dkzc=dkzc.add(bigDecimal); |
|
|
|
}else{ |
|
|
|
// g =orderIndexVo.getSquareMeter().replace("MW","");
|
|
|
|
g =orderIndexVo.getSquareMeter(); |
|
|
|
BigDecimal bigDecimal=new BigDecimal(g); |
|
|
|
bigDecimal=bigDecimal.multiply(new BigDecimal(1000000)); |
|
|
|
bigDecimal=bigDecimal.multiply(new BigDecimal(1)); |
|
|
|