now Caching Preorder load + auto updating attrib inhouse_cabling_supplied
This commit is contained in:
@@ -149,7 +149,11 @@ class AddressDB {
|
||||
$log = mfLoghandler::singleton();
|
||||
$log->debug(__METHOD__.": =============================== in handleRimoStatusUpdate");
|
||||
|
||||
$wohneinheit = new ADBWohneinheit($wohneinheit_id);
|
||||
$wohneinheit = mfValuecache::singleton()->get("mfObjectmodel-adb_wohneinheit-$wohneinheit_id");
|
||||
if(!$wohneinheit) {
|
||||
$wohneinheit = new ADBWohneinheit($wohneinheit_id);
|
||||
if($wohneinheit->id) mfValuecache::singleton()->set("mfObjectmodel-adb_wohneinheit-$wohneinheit_id", $wohneinheit);
|
||||
}
|
||||
if(!$wohneinheit->id) {
|
||||
//echo "no wohneinheit\n";
|
||||
return false;
|
||||
|
||||
@@ -999,6 +999,9 @@ class AddressDBController extends mfBaseController {
|
||||
case 'findBuildings':
|
||||
$return = $this->findBuildingsApi();
|
||||
break;
|
||||
case 'countWithFilter':
|
||||
$return = $this->countWithFilter();
|
||||
break;
|
||||
case 'getUnit':
|
||||
$return = $this->getUnitApi();
|
||||
break;
|
||||
@@ -1020,6 +1023,14 @@ class AddressDBController extends mfBaseController {
|
||||
$this->returnJson($data);
|
||||
}
|
||||
|
||||
|
||||
private function countWithFilter() {
|
||||
$filter = $this->getPreparedFilter($this->request->filter);
|
||||
$filter["netzgebiet_id"] = true;
|
||||
|
||||
return ["count" => ADBHausnummerModel::count($filter)];
|
||||
}
|
||||
|
||||
private function updateAddressStatusApi() {
|
||||
$address_id = $this->request->id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user