ShuanghongS hace 1 mes
padre
commit
ab08984bf7
Se han modificado 2 ficheros con 12 adiciones y 10 borrados
  1. 3 2
      service/destination_delivery.class.php
  2. 9 8
      utils/common.class.php

+ 3 - 2
service/destination_delivery.class.php

@@ -177,7 +177,7 @@ class destination_delivery {
             //if(!empty($delivery_serial_no)){
                 $sql = "SELECT addr1,addr2,addr3,addr4,
                             ctry_code,city_code,postal_code,
-                            '' as contact_person,'' as contact_number,
+                            attn as contact_person,tel as contact_number,
                             create_user,contact_id,sync_key,
                             from_station,
                             'from Ksmart' as op_action
@@ -189,7 +189,8 @@ class destination_delivery {
                         union all
                         SELECT addr1,addr2,addr3,addr4,
                                 ctry_code,city_code,postal_code,
-                                contact_person,contact_number,
+                                attn as contact_person,
+                                tel as contact_number,
                                 create_user,contact_id,sync_key,
                                 from_station,
                                 action as op_action

+ 9 - 8
utils/common.class.php

@@ -3854,7 +3854,7 @@ class common {
                             addr_type,contact_id, addr1, addr2,addr3, addr4, 
                             ctry_code, city_code, postal_code,  
                             create_user, create_date, modify_user, modify_date,
-                            is_sync_country, sync_key, from_station,contact_person,contact_number)
+                            is_sync_country, sync_key, from_station,attn,tel)
                     VALUES ('$delivery_serial_no','$_contact_type',
                             'D','$_consignee_id','$_address_1','$_address_2','$_address_3','$_address_4',
                             '$_country','$_city','$_postal_code',
@@ -3880,7 +3880,7 @@ class common {
                                 addr_type,contact_id, addr1, addr2,addr3, addr4, 
                                 ctry_code, city_code, postal_code,  
                                 create_user, create_date, modify_user, modify_date,
-                                is_sync_country, sync_key, from_station,contact_person,contact_number,is_delete)
+                                is_sync_country, sync_key, from_station,attn,tel,is_delete)
                         VALUES ('$delivery_serial_no','$_contact_type',
                                 'D','$_contact_id','$_address_1','$_address_2','$_address_3','$_address_4',
                                 '$_country','$_city','$_postal_code',
@@ -3897,7 +3897,7 @@ class common {
                             SET delivery_serial_no = '$delivery_serial_no',addr1='$_address_1', addr2='$_address_2', addr3='$_address_3', addr4='$_address_4',
                                 ctry_code='$_country', city_code='$_city', postal_code='$_postal_code', 
                                 modify_user='$_add_create_user', modify_date=now(),
-                                contact_person='$_contact_person', contact_number='$_contact_number',
+                                attn='$_contact_person', tel='$_contact_number',
                                 action='$temp_action', is_delete = '$_is_delete'
                             WHERE sync_key = '$_sync_key';";
                     }
@@ -3917,7 +3917,7 @@ class common {
         //deliver address is new
         $addressSql = "";
         $address_country = json_decode($address_country,true);
-
+        //onine_address 这个是查询出来的attn 不变
         foreach($onine_address as $key => $_onine_address){
             $_address_1 = common::check_input($_onine_address['addr1']); 
             $_address_2 = common::check_input($_onine_address['addr2']);
@@ -3926,8 +3926,8 @@ class common {
             $_ctry_code = common::check_input($_onine_address['ctry_code']); 
             $_city_code = common::check_input($_onine_address['city_code']); 
             $_postal_code = common::check_input($_onine_address['postal_code']); 
-            $_contact_person = common::check_input($_onine_address['contact_person']); 
-            $_contact_number = common::check_input($_onine_address['contact_number']); 
+            $_attn = common::check_input($_onine_address['attn']); 
+            $_tel = common::check_input($_onine_address['tel']); 
 
             $_contact_id = common::check_input($_onine_address['contact_id']);
             $_sync_key = common::check_input($_onine_address['sync_key']);
@@ -3957,6 +3957,7 @@ class common {
                         $addressSql .= "UPDATE public.contacts_address
                             SET addr1='$_address_1', addr2='$_address_2', 
                                 ctry_code='$_ctry_code', city_code='$_city_code', postal_code='$_postal_code',  
+                                attn = '$_attn',tel = '$_tel',
                                 modify_user='"._getLoginName()."', modify_date=now()
                             WHERE sync_key = '$_sync_key';";
                     } else {
@@ -3964,11 +3965,11 @@ class common {
                                 addr_type,contact_id, addr1, addr2,addr3, addr4, 
                                 ctry_code, city_code, postal_code,  
                                 create_user, create_date, modify_user, modify_date,
-                                is_sync_country, sync_key, from_station)
+                                is_sync_country, sync_key, from_station,attn,tel)
                         VALUES ('D','$_contact_id','$_address_1','$_address_2','$_address_3','$_address_4',
                                 '$_ctry_code','$_city_code','$_postal_code',
                                 '$_add_create_user',now(),'$_add_create_user',now(),
-                                true,'$_sync_key_new','$from_station');";
+                                true,'$_sync_key_new','$from_station','$_attn','$_tel');";
                     }
                 } else {
                     //除开当前编辑的提交的,就只有用户自己删除要处理,其他的修改最后未选的情况留在本地管理