now Caching Preorder load + auto updating attrib inhouse_cabling_supplied

This commit is contained in:
Frank Schubert
2025-09-26 18:36:01 +02:00
parent 1a66a6aa9f
commit 5d9ae37d83
5 changed files with 88 additions and 8 deletions

View File

@@ -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;

View File

@@ -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;