@ -218,8 +218,24 @@ public class DataCenterRest {
List < ProjectInfo > projectInfo = crmMapper . getEnterByProjetSid ( query . getProjectSid ( ) ) ;
sendBodyMM . put ( "orgPath" , projectInfo . get ( 0 ) . getEnterpriseSid ( ) ) ;
List < ProjectDetailsVo > projectDetailsVos = c . getList ( new RestTemplate ( ) . postForEntity ( a , sendBodyMM , String . class ) , ProjectDetailsVo . class ) ;
for ( ProjectDetailsVo projectDetailsVo : projectDetailsVos ) {
ProjectInfo info = crmMapper . getProjectByShSid ( projectDetailsVo . getSid ( ) ) ;
return rb . success ( ) . setData ( projectDetailsVos ) ;
}
//@Todo 山海光伏大屏数据接口
@ApiOperation ( "获取仓库地址及经纬度" )
@PostMapping ( "/getWarehouseAddressDetail/{shSid}" )
public ResultBean getWarehouseAddressDetail ( @PathVariable ( "shSid" ) String shSid ) {
ResultBean rb = new ResultBean ( ) . fail ( ) ;
A c = new A ( ) ;
String a = "https://wms.yxtsoft.com/apiv1/external/apiadmin/warehouseinfo/getWarehouseBySid/" + shSid ;
// String a ="http://192.168.0.105:6023/apiadmin/warehouseinfo/list";
ProjectDetailsVo projectDetailsVo = ( ProjectDetailsVo ) c . getObject ( new RestTemplate ( ) . getForEntity ( a , String . class ) , ProjectDetailsVo . class ) ;
List < ProjectInfo > infos = crmMapper . getProjectByShSid ( projectDetailsVo . getSid ( ) ) ;
List < String > sids = new ArrayList < > ( ) ;
for ( ProjectInfo info : infos ) {
if ( info ! = null ) {
String nodde = crmMapper . getNodeValueByProjectSid ( info . getProjectSid ( ) ) ;
projectDetailsVo . setCreditStage ( nodde ) ;
@ -227,11 +243,12 @@ public class DataCenterRest {
if ( null ! = info ) {
List < ShCreditBalanceCrmVo > vos = crmMapper . getBalanceByProjectSid ( info . getProjectSid ( ) ) ;
List < String > s = new ArrayList < > ( ) ;
for ( ShCreditBalanceCrmVo vo : vos ) {
if ( vo . getType ( ) . equals ( "1" ) ) {
// String nodde=crmMapper.getNodeValueByProjectSid(info.getSid());
projectDetailsVo . setExpectedCompletionDate ( vo . getExpectedCompletionDate ( ) ) ;
projectDetailsVo . setExpectedDeliveryDate ( vo . getExpectedDeliveryDate ( ) ) ;
projectDetailsVo . setExpectedCompletionDate ( DateUtil . parse ( vo . getExpectedCompletionDate ( ) ) ) ;
projectDetailsVo . setExpectedDeliveryDate ( DateUtil . parse ( vo . getExpectedDeliveryDate ( ) ) ) ;
// projectDetailsVo.setCreditStage(nodde);
projectDetailsVo . setCreditNature ( vo . getCreditNature ( ) ) ;
projectDetailsVo . setTbdate ( vo . getTbdate ( ) ) ;
@ -258,6 +275,8 @@ public class DataCenterRest {
projectEngineeringProgressVo . setUrls ( urlVos ) ;
}
}
sids . add ( info . getProjectSid ( ) ) ;
}
IndexQuery query2 = new IndexQuery ( ) ;
query2 . setPage ( "1" ) ;
query2 . setLimit ( "10" ) ;
@ -272,20 +291,15 @@ public class DataCenterRest {
if ( indexVoBaseResponseListObj . getCount ( ) ! = 0 ) {
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 ( ) ) ;
List < UrlsVo > list = crmMapper . getProjectFilesByMainSid ( sids . toArray ( ) ) ;
if ( list . size ( ) ! = 0 ) {
projectDetailsVo . setUrlsVos ( list ) ;
}
}
}
return rb . success ( ) . setData ( projectDetailsVos ) ;
return rb . success ( ) . setData ( projectDetailsVo ) ;
}
@ApiOperation ( "项目概况" )
@PostMapping ( "/projectOverview" )
public ResultBean < ShDateCenterVo > projectOverview ( @RequestBody DataCenterQuery query ) {
@ -607,7 +621,9 @@ public class DataCenterRest {
projectDetailsVos . add ( d ) ;
}
for ( ProjectDetailsVo projectDetailsVo : projectDetailsVos ) {
ProjectInfo info = crmMapper . getProjectByShSid ( projectDetailsVo . getSid ( ) ) ;
List < ProjectInfo > infos = crmMapper . getProjectByShSid ( projectDetailsVo . getSid ( ) ) ;
List < String > sids = new ArrayList < > ( ) ;
for ( ProjectInfo info : infos ) {
if ( null ! = info ) {
List < ShCreditBalanceCrmVo > vos = crmMapper . getBalanceByProjectSid ( info . getProjectSid ( ) ) ;
if ( info ! = null ) {
@ -617,8 +633,8 @@ public class DataCenterRest {
List < String > s = new ArrayList < > ( ) ;
for ( ShCreditBalanceCrmVo vo : vos ) {
if ( vo . getType ( ) . equals ( "1" ) ) {
projectDetailsVo . setExpectedCompletionDate ( vo . getExpectedCompletionDate ( ) ) ;
projectDetailsVo . setExpectedDeliveryDate ( vo . getExpectedDeliveryDate ( ) ) ;
projectDetailsVo . setExpectedCompletionDate ( DateUtil . parse ( vo . getExpectedCompletionDate ( ) ) ) ;
projectDetailsVo . setExpectedDeliveryDate ( DateUtil . parse ( vo . getExpectedDeliveryDate ( ) ) ) ;
projectDetailsVo . setCreditNature ( vo . getCreditNature ( ) ) ;
projectDetailsVo . setMoney ( projectDetailsVo . getMoney ( ) . add ( vo . getMoney ( ) ) ) ;
projectDetailsVo . setTbdate ( vo . getTbdate ( ) ) ;
@ -650,6 +666,8 @@ public class DataCenterRest {
projectDetailsVo . setProjectSupervisionLog ( vo33 . get ( 0 ) ) ;
}
}
sids . add ( info . getProjectSid ( ) ) ;
}
IndexQuery query2 = new IndexQuery ( ) ;
query2 . setPage ( "1" ) ;
query2 . setLimit ( "10" ) ;
@ -664,13 +682,11 @@ public class DataCenterRest {
if ( indexVoBaseResponseListObj . getCount ( ) ! = 0 ) {
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 ( ) ) ;
List < UrlsVo > list = crmMapper . getProjectFilesByMainSid ( sids . toArray ( ) ) ;
if ( list . size ( ) ! = 0 ) {
projectDetailsVo . setUrlsVos ( list ) ;
}
}
}
js1 . setRecords ( projectDetailsVos ) ;
js2 . setData ( js1 ) ;
return js2 ;