فهرست منبع

关闭新建客户同步新建地址

HULEI 6 روز پیش
والد
کامیت
b2377b6422

+ 39 - 39
com.awspaas.user.apps.donenow_crm/src/com/awspaas/user/apps/donenow_crm/event/FormAfterSaveEvent.java

@@ -73,35 +73,35 @@ public class FormAfterSaveEvent
 				//˵���ǿͻ���������
 				if (CrmConstant.BO_EU_DNCRM_ACCOUNT.equals(boName)) {
 					//����ַ��ͬ������
-					List<BO> list = SDK.getBOAPI().query(CrmConstant.BO_EU_DNCRM_LOCATION).bindId(accountBo.getBindId()).addQuery("IS_DEFAULT=", Integer.valueOf(1)).list();
-					//�Ѿ�����Ĭ�ϵ�ַ
-					if(list.size()>0) {
-						for (BO bo : list) {
-							bo.set("COUNTRY_ID", accountBo.get("COUNTRY_ID"));
-							bo.set("DISTRICT_ID", accountBo.get("DISTRICT_ID"));
-							bo.set("ADDRESS", accountBo.get("ADDRESS"));
-							bo.set("POSTAL_CODE", accountBo.get("POSTAL_CODE"));
-							bo.set("CATE_ID", accountBo.get("CATE_ID"));
-							SDK.getBOAPI().update(CrmConstant.BO_EU_DNCRM_LOCATION, bo);
-
-						}
-					}else {
-						//����ַ������������
-						BO bo=new BO();
-						bo.setBindId(accountBo.getBindId());
-						bo.set("COUNTRY_ID", accountBo.get("COUNTRY_ID"));
-						bo.set("DISTRICT_ID", accountBo.get("DISTRICT_ID"));
-						bo.set("ADDRESS", accountBo.get("ADDRESS"));
-						bo.set("POSTAL_CODE", accountBo.get("POSTAL_CODE"));
-						bo.set("IS_DEFAULT", 1);
-						bo.set("ACCOUNT_ID", accountBo.getId());
-						bo.set("CATE_ID", CrmConstant.OFFICELOCATION);
-						bo.set("ID", UUIDGener.getUUID());
-						SDK.getBOAPI().create(CrmConstant.BO_EU_DNCRM_LOCATION, bo,SDK.getProcessAPI().getInstanceById(accountBo.getBindId()), uc);
-						//���¿ͻ�����LocationId�ֶ�
-						accountBo.set("LOCATION_ID", bo.getId());
-						SDK.getBOAPI().update(CrmConstant.BO_EU_DNCRM_ACCOUNT, bo);
-					}
+//					List<BO> list = SDK.getBOAPI().query(CrmConstant.BO_EU_DNCRM_LOCATION).bindId(accountBo.getBindId()).addQuery("IS_DEFAULT=", Integer.valueOf(1)).list();
+//					//�Ѿ�����Ĭ�ϵ�ַ
+//					if(list.size()>0) {
+//						for (BO bo : list) {
+//							bo.set("COUNTRY_ID", accountBo.get("COUNTRY_ID"));
+//							bo.set("DISTRICT_ID", accountBo.get("DISTRICT_ID"));
+//							bo.set("ADDRESS", accountBo.get("ADDRESS"));
+//							bo.set("POSTAL_CODE", accountBo.get("POSTAL_CODE"));
+//							bo.set("CATE_ID", accountBo.get("CATE_ID"));
+//							SDK.getBOAPI().update(CrmConstant.BO_EU_DNCRM_LOCATION, bo);
+//
+//						}
+//					}else {
+//						//����ַ������������
+//						BO bo=new BO();
+//						bo.setBindId(accountBo.getBindId());
+//						bo.set("COUNTRY_ID", accountBo.get("COUNTRY_ID"));
+//						bo.set("DISTRICT_ID", accountBo.get("DISTRICT_ID"));
+//						bo.set("ADDRESS", accountBo.get("ADDRESS"));
+//						bo.set("POSTAL_CODE", accountBo.get("POSTAL_CODE"));
+//						bo.set("IS_DEFAULT", 1);
+//						bo.set("ACCOUNT_ID", accountBo.getId());
+//						bo.set("CATE_ID", CrmConstant.OFFICELOCATION);
+//						bo.set("ID", UUIDGener.getUUID());
+//						SDK.getBOAPI().create(CrmConstant.BO_EU_DNCRM_LOCATION, bo,SDK.getProcessAPI().getInstanceById(accountBo.getBindId()), uc);
+//						//���¿ͻ�����LocationId�ֶ�
+//						accountBo.set("LOCATION_ID", bo.getId());
+//						SDK.getBOAPI().update(CrmConstant.BO_EU_DNCRM_ACCOUNT, bo);
+//					}
 
 					//����ϵ�˱�ͬ������
 					List<BO> mainList = SDK.getBOAPI().query(CrmConstant.BO_EU_DNCRM_CONTACT).addQuery("ACCOUNT_ID=", accountBo.getId()).addQuery("IS_PRIMARY_CONTACT=", 1).list();
@@ -137,16 +137,16 @@ public class FormAfterSaveEvent
 				}
 
 				//˵���ǵ�ַ��������
-				else if (CrmConstant.BO_EU_DNCRM_LOCATION.equals(boName)) {
-					BO locationBo = process.getBO(CrmConstant.BO_EU_DNCRM_LOCATION);
-					if (locationBo != null && "1".equals(locationBo.getString("IS_DEFAULT"))) {
-						accountBo.set("COUNTRY_ID", locationBo.get("COUNTRY_ID"));
-						accountBo.set("DISTRICT_ID", locationBo.get("DISTRICT_ID"));
-						accountBo.set("ADDRESS", locationBo.get("ADDRESS"));
-						accountBo.set("POSTAL_CODE", locationBo.get("POSTAL_CODE"));
-						SDK.getBOAPI().update(CrmConstant.BO_EU_DNCRM_ACCOUNT, accountBo);
-					}
-				}
+//				else if (CrmConstant.BO_EU_DNCRM_LOCATION.equals(boName)) {
+//					BO locationBo = process.getBO(CrmConstant.BO_EU_DNCRM_LOCATION);
+//					if (locationBo != null && "1".equals(locationBo.getString("IS_DEFAULT"))) {
+//						accountBo.set("COUNTRY_ID", locationBo.get("COUNTRY_ID"));
+//						accountBo.set("DISTRICT_ID", locationBo.get("DISTRICT_ID"));
+//						accountBo.set("ADDRESS", locationBo.get("ADDRESS"));
+//						accountBo.set("POSTAL_CODE", locationBo.get("POSTAL_CODE"));
+//						SDK.getBOAPI().update(CrmConstant.BO_EU_DNCRM_ACCOUNT, accountBo);
+//					}
+//				}
 			}
 		} catch (Exception e) {
 			// TODO Auto-generated catch block