Ver Fonte

Merge branch 'master' of ssh://biuro.biall-net.pl:2222/plabudda/se

Piotr Labudda há 9 anos atrás
pai
commit
be85dbfb72

+ 1 - 1
SE/se-lib/Api/WfsGeomTypeConverter.php

@@ -84,7 +84,7 @@ class Api_WfsGeomTypeConverter {
 		 *
 		 * Point:
 			<gml:Point xmlns:gml="http://www.opengis.net/gml" srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
-				<gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs=" " ts=",">100,200</gml:coordinates>
+				<gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs=" " ts=",">100 200</gml:coordinates>
 			</gml:Point>
 		 *
 		 */

+ 12 - 7
SE/se-lib/Route/UrlAction/WmsGenerate.php

@@ -72,10 +72,15 @@ class Route_UrlAction_WmsGenerate extends RouteBase {
 				foreach ($DataSources as $DataSource) {
 					$DataSourceArr=explode('|',$DataSource);
 					$DataSource=$DataSourceArr[0];
-					$file=basename($DataSource,".shp");
-					foreach ($suffixes as $suffix) {
-						if(is_file($destFolderPath."/".$file.$suffix)) $filesToCopy[]=$file.$suffix;
-						else $missingFiles[]=$file.$suffix;
+					$pathinfo = pathinfo($DataSource);
+					if (in_array($pathinfo['extension'], array("tif","tiff","TIF","TIFF"))) {
+						$filesToCopy[] = basename($DataSource);
+					} else {
+						$file=basename($DataSource,".shp");
+						foreach ($suffixes as $suffix) {
+							if(is_file($destFolderPath."/".$file.$suffix)) $filesToCopy[]=$file.$suffix;
+							else $missingFiles[]=$file.$suffix;
+						}
 					}
 				}
 				if ($missingFiles) throw new Exception('Nie znaleziono poniższych plików wymaganych przez plik projetku QGIS:<br/>'.implode('<br/>',$missingFiles));
@@ -358,7 +363,7 @@ openOnFocus: false
 					//$mapLayer->datasource=$destFolderPath.'/.wms/'.basename($mapLayer->datasource);
 					$bash='
 tmp=`mktemp -d`
-/opt/local/bin/ogr2ogr -s_srs EPSG:'.$mapLayer->srs->spatialrefsys->srid.' -t_srs EPSG:4236 "$tmp/tmp.shp" "'.$mapLayer->datasource.'" >/dev/null 2>&1
+/opt/local/bin/ogr2ogr -s_srs EPSG:'.$mapLayer->srs->spatialrefsys->srid.' -t_srs EPSG:4326 "$tmp/tmp.shp" "'.$mapLayer->datasource.'" >/dev/null 2>&1
 extent=`/opt/local/bin/ogrinfo -al -so "$tmp/tmp.shp" | grep Extent | sed "s/[(),\-]//g;s/  / /g;s/Extent: //g"`
 echo "${extent} "
 rm -rf $tmp
@@ -418,7 +423,7 @@ rm -rf $tmp
       WMS_TITLE "__NAME__"
       WMS_ENABLE_REQUEST "*"
 #     WMS_ONLINERESOURCE "https://__SERVER_NAME__/wms/.single/__ID__"
-      MS_ONLINERESOURCE "http://127.0.0.1:34580/wms/.single/__ID__"
+      WMS_ONLINERESOURCE "http://127.0.0.1:34580/wms/.single/__ID__"
       WMS_SRS "EPSG:__EPSG__"
     END
   END
@@ -603,7 +608,7 @@ END
   END
 
   PROJECTION
-    "init=epsg:4236"
+    "init=epsg:4326"
   END
 ';
 			$mapHeadSearch=array('__NAME__','__MAP_URL__','__EPSGS__');

BIN
SE/stuff/jre-8u112-macosx-x64.tar.gz


+ 35 - 0
SE/superedit-DB_PROCEDURES_CREATE.php

@@ -1022,6 +1022,41 @@ LEFT JOIN IN7_MK_BAZA_DYSTRYBUCJI AS t2 ON t1.ID = t2.ID;";
 
 
 
+//! POPC_UPDATE eventy stats
+
+$sql['POPC_UPDATE_event_drop']="DROP EVENT if exists POPC_UPDATE";
+
+
+$sql['POPC_UPDATE_event']="CREATE EVENT `POPC_UPDATE` ON SCHEDULE EVERY 1 DAY STARTS '2015-05-12 00:04:30' ON COMPLETION NOT PRESERVE ENABLE DO
+BEGIN
+create temporary table ST_POPC_AKT as
+select  t1.ID, count(t2.ID) as cache_count_POPC , 
+sum(if(t2.Rodzaj_obiektu like '%Plac%owa',t2.Liczba_placowek_publicznych,0)) as cache_count_POPC_plac ,
+sum(if(t2.Rodzaj_obiektu like '%Plac%owa%A',t2.Liczba_placowek_publicznych,0)) as cache_count_POPC_plac_os_A ,
+sum(t2.Liczba_lokali) as cache_count_POPC_lokali 
+from MK_Rewiry as t1 
+join MK_BIALE_PLAMY as t2 on ST_Contains(t1.the_geom, t2.the_geom)
+-- where t2.NAZWA_OBSZARU like 'GDA%KI I TR%KI' 
+group by t1.ID ;
+update MK_Rewiry as t1, ST_POPC_AKT as t2 set t1.cache_count_POPC=t2.cache_count_POPC ,
+t1.cache_count_POPC_plac=t2.cache_count_POPC_plac , 
+t1.cache_count_POPC_plac_os_A=t2.cache_count_POPC_plac_os_A , 
+t1.cache_count_POPC_lokali=t2.cache_count_POPC_lokali
+where t1.ID=t2.ID;
+END
+";
+
+// EOF POPC_UPDATE eventy stats
+
+
+//! ST__MK_Rewiry_to_BUILDINGS
+$sql['ST__MK_Rewiry_to_BUILDINGS_event_drop']="DROP EVENT if exists ST__MK_Rewiry_to_BUILDINGS";
+$sql['ST__MK_Rewiry_to_BUILDINGS_event']="CREATE EVENT `ST__MK_Rewiry_to_BUILDINGS` ON SCHEDULE EVERY 1 DAY STARTS '2015-05-12 00:04:30' ON COMPLETION NOT PRESERVE ENABLE DO
+update BUILDINGS as t1, MK_Rewiry as t2 , USERS2_MARKETING t3 set t1.M_REWIR=t2.NAZWA_REWI , t3.M_REWIR=t2.NAZWA_REWI
+where  ST_Contains(t2.the_geom, t1.the_geom) and t3.T_TELBOX_BUILDING_IN=t1.S_ADDRESS_STREET
+";
+// EOF ST__MK_Rewiry_to_BUILDINGS
+
 
 //! bzyka funkcje @2015-07 do tree zasobow aliasow
 $sql['drop_function_ALIAS_CHILDS_FROM_CRM_LISTA_ZASOBOW']="drop function if exists ALIAS_CHILDS_FROM_CRM_LISTA_ZASOBOW";

+ 8 - 0
SE/superedit-INSTALL_SES_PROCESY_A.php

@@ -577,6 +577,14 @@ function INSTALL_GETCOMMANDS_XSL_ENGINES($ADMIN_USERNAME,$SERVER_ADDRESS_IP,$ADM
  ./xrepo create /opt/local/share/expath/repo
 
  ';
+  $cmd[]['scp']=array($INSTALL_ROOT,'stuff/jre-8u112-macosx-x64.tar.gz','/Library/Server/Web/Data/Sites/Default/SE/stuff/jre-8u112-macosx-x64.tar.gz');
+  $cmd[]['rsh']='cd /Library/Server/Web/Data/Sites/Default/SE/stuff/ && tar -xzf `ls -1 jre-8u*-macosx-x64.tar.gz | sort -rn -t u -k 2 | head -1`';
+  $cmd[]['rsh']='cd /Library/Server/Web/Data/Sites/Default/SE/stuff/ && cd `ls -1d jre1.8.*.jre/ | sort -rn -t _  -k 1.8 -k 2 | head -1` && defaults write `pwd`/Contents/Info.plist JavaVM -dict-add \'JVMCapabilities\' \'<array><string>JNI</string><string>BundledApp</string><string>CommandLine</string></array>\' ';
+  $cmd[]['rsh']='cd /Library/Server/Web/Data/Sites/Default/SE/stuff/ && cd `ls -1d jre1.8.*.jre/ | sort -rn -t _  -k 1.8 -k 2 | head -1` && chmod 0664 Contents/Info.plist ';
+  $cmd[]['rsh']='cd /Library/Server/Web/Data/Sites/Default/SE/stuff/ && cd `ls -1d jre1.8.*.jre/ | sort -rn -t _  -k 1.8 -k 2 | head -1` && plutil -convert xml1 Contents/Info.plist '; 
+  $cmd[]['rsh']='cd /Library/Server/Web/Data/Sites/Default/SE/stuff/ && cd `ls -1d jre1.8.*.jre/ | sort -rn -t _  -k 1.8 -k 2 | head -1` && mv `pwd` /Library/Java/JavaVirtualMachines/ '; 
+  $cmd[]['rsh']='cd /Library/Server/Web/Data/Sites/Default/SE/stuff/ && cd `ls -1d jre1.8.*.jre/ | sort -rn -t _  -k 1.8 -k 2 | head -1` && mkdir -p Contents/Home/bundle/Libraries'; 
+  $cmd[]['rsh']='cd /Library/Server/Web/Data/Sites/Default/SE/stuff/ && cd `ls -1d jre1.8.*.jre/ | sort -rn -t _  -k 1.8 -k 2 | head -1` && cd Contents/Home/bundle/Libraries && ln -s ../../lib/server/libjvm.dylib libserver.dylib'; 
  return $cmd;
 }
 

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
SE/superedit-SQIX_STRUCTURE_DB_SYNC.php


+ 49 - 10
SE/superedit-STATYSTYKA_TABELE.php

@@ -133,11 +133,50 @@ function STATYSTYKA_TABELE() {
 		 $sqlList[]="update BUILDINGS t1, Rozdzielcza_Kabel_Swiatlowodowy_wsg84 t2 set t1.__Rozdzielcza_Kabel_Swiatlowodowy_wsg84=t2.ID where t1.ID=t2.ID_BUILDINGS ; ";
 		 $sqlList[]="update BUILDINGS t1, MK_Rewiry t2 set t1.`__MK_Rewiry__STATUS`=t2.A_STATUS where t1.M_REWIR=t2.NAZWA_REWI ; ";
 
-		 		
-		
 
- 			}
+		 $sqlList[]=" update USERS2_MARKETING set T_OPER='NIEWIADOMO' where T_OPER=''";
+		 $sqlList[]=" update USERS2_MARKETING set TV_OPER='NIEWIADOMO' where TV_OPER=''";
+		 $sqlList[]=" update USERS2_MARKETING set I_OPER='NIEWIADOMO' where I_OPER=''";
+		 	
+		 	
+		 			
 
+ 			}
+ 			
+
+ 			{ //posprzatanie filtrow operatorow - todo tabela konkurencji
+	 		$oper_fix['%ORAN%']='ORANGE';
+		 	$oper_fix['%T%MOBLILE%']='T-MOBLILE';
+		 	$oper_fix['%TP%LIVE%BOX%']='ORANGE';
+		 	$oper_fix['%TP%ORANE%']='ORANGE';
+		 	$oper_fix['%BRAK%']='BRAK';
+		 	$oper_fix['CANAL%']='CANAL-PLUS';
+		 	$oper_fix['%CYFRA%']='CYFRA-PLUS';
+		 	$oper_fix['KABL%WKA']='INNY';
+		 	$oper_fix['NAZ%EMNA']='DVBC';
+		 	$oper_fix['NC%']='NC-PLUS';
+		 	$oper_fix['POLSAT%']='POLSAT';
+		 	$oper_fix['POLAT']='POLSAT';
+		 	$oper_fix['SATELITA%']='DVB-S';
+		 	$oper_fix['POLAT']='POLSAT';
+		 	$oper_fix['S__UZBOWY']='INNY';
+		 	$oper_fix['POLAT']='POLSAT';
+		 	$oper_fix['NA_KART%']='INNY';
+		 	$oper_fix['%BRAK%DANYCH%']='NIEWIADOMO';
+		 	$oper_fix['%CYFROWA%NAZIEMNA%']='DVBC';
+		 	$oper_fix['KABL__WKA']='INNY';
+		 	$oper_fix['%YOUTUBE%']='YOUTUBE';
+		 	$oper_fix['_']='NIEWIADOMO';
+
+		 	
+
+	 		  foreach($oper_fix as $filtr=>$set) {
+		 		  $sqlList[]="update USERS2_MARKETING set I_OPER='".$set."' where I_OPER like '".$filtr."'" ;
+		 		  $sqlList[]="update USERS2_MARKETING set TV_OPER='".$set."' where TV_OPER like '".$filtr."'" ;
+		 		  $sqlList[]="update USERS2_MARKETING set T_OPER='".$set."' where T_OPER like '".$filtr."'" ;
+	 		  }
+	 			
+ 			}
 
 
  			{ //stworzenie widoku bledow w USERS2_MARKETING dot budynkow
@@ -358,16 +397,16 @@ function STATYSTYKA_TABELE() {
 			 $res_OPERS=$db->query($sql_OPERS);
 			 while($row_OPERS=$db->fetch($res_OPERS)) {
 				if(strlen($row_OPERS->OPERS)>0) 
-					if(!in_array(strtolower(preg_replace('/[^a-zA-Z0-9\-_]/','_',$row_OPERS->OPERS), $COLSFORSTATS_OPERS)))
-						 if(!in_array(strtoupper(preg_replace('/[^a-zA-Z0-9\-_]/','_',$row_OPERS->OPERS), $COLSFORSTATS_OPERS)))
-						 	if(!in_array(preg_replace('/[^a-zA-Z0-9\-_]/','_',$row_OPERS->OPERS, $COLSFORSTATS_OPERS))) {
+					if(!in_array(strtolower(preg_replace('/[^a-zA-Z0-9_\-]/','_',$row_OPERS->OPERS), $COLSFORSTATS_OPERS)))
+						 if(!in_array(strtoupper(preg_replace('/[^a-zA-Z0-9_\-]/','_',$row_OPERS->OPERS), $COLSFORSTATS_OPERS)))
+						 	if(!in_array(preg_replace('/[^a-zA-Z0-9_\-]/','_',$row_OPERS->OPERS, $COLSFORSTATS_OPERS))) {
 							 	//echo "dodaje ".strtoupper(preg_replace('/[^a-zA-Z0-9\-_]/','_',$row_OPERS->OPERS));
-						 		$COLSFORSTATS_OPERS[]=strtoupper(preg_replace('/[^a-zA-Z0-9\-_]/','_',$row_OPERS->OPERS));
+						 		$COLSFORSTATS_OPERS[]=strtoupper(preg_replace('/[^a-zA-Z0-9_]/','_',$row_OPERS->OPERS));
 						 	}
-				if($row_OPERS->OPERS!=preg_replace('/[^a-zA-Z0-9\-_]/','_',$row_OPERS->OPERS)) {
+				if($row_OPERS->OPERS!=preg_replace('/[^a-zA-Z0-9_\-]/','_',$row_OPERS->OPERS)) {
 					//aktualizacja w bazie nazwy operatora aby byla bez dziwnych znakow
 					foreach($COLSFORSTATS as $FFS) {
-						$sql_upd="update USERS2_MARKETING set `{$FFS}_OPER`='".strtoupper(preg_replace('/[^a-zA-Z0-9\-_]/','_',$row_OPERS->OPERS))."' where `{$FFS}_OPER`='".$row_OPERS->OPERS."'";
+						$sql_upd="update USERS2_MARKETING set `{$FFS}_OPER`='".strtoupper(preg_replace('/[^a-zA-Z0-9_\-]/','_',$row_OPERS->OPERS))."' where `{$FFS}_OPER`='".$row_OPERS->OPERS."'";
 						$res = $db->query($sql_upd);
 						if ($db->has_errors()) {
 							$errors = true;
@@ -466,7 +505,7 @@ function STATYSTYKA_TABELE() {
 				where
 					USERS2_MARKETING.A_STATUS!='DELETED'
 					and BUILDINGS.A_STATUS!='DELETED'
-				group by USERS2_MARKETING.T_TELBOX_BUILDING_IN
+				group by USERS2_MARKETING.T_TELBOX_BUILDING_IN and 1=1
 				order by USERS2_MARKETING.M_REWIR DESC, USERS2_MARKETING.T_TELBOX_BUILDING_IN
 			";
 			$sqlList[] = " create table `USERS2_MARKETING_OVERWIEV` \n {$sql} \n limit 1";

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff