|
@@ -89,14 +89,18 @@ public class CustomerTask {
|
|
|
String cu_code = baseDao.sGetMaxNumber("PreCustomer", 2);
|
|
String cu_code = baseDao.sGetMaxNumber("PreCustomer", 2);
|
|
|
//field_giBJk__c:收货人 UDSText5__c:送货地址 UDSText1__c:法定代表人 UDSText2__c:注册资金
|
|
//field_giBJk__c:收货人 UDSText5__c:送货地址 UDSText1__c:法定代表人 UDSText2__c:注册资金
|
|
|
String sql="insert into PreCustomer(cu_id,cu_code,cu_name,cu_shortname,cu_add2,cu_sellercode,cu_sellername,cu_servicecode,cu_servicename,cu_kind," +
|
|
String sql="insert into PreCustomer(cu_id,cu_code,cu_name,cu_shortname,cu_add2,cu_sellercode,cu_sellername,cu_servicecode,cu_servicename,cu_kind," +
|
|
|
- "cu_contact,cu_add1,cu_lawman,cu_regamount,cu_rate,cu_wbsk_user,cu_paymentid,cu_paymentscode,cu_payments,cu_level,cu_industry,cu_mainbusiness,cu_turnSAP,cu_currency,cu_taxrate," +
|
|
|
|
|
|
|
+ "cu_contact,cu_add1,cu_lawman,cu_regamount,cu_rate,cu_wbsk_user," +
|
|
|
|
|
+ //"cu_paymentid,cu_paymentscode,cu_payments," +
|
|
|
|
|
+ "cu_level,cu_industry,cu_mainbusiness,cu_turnSAP,cu_currency,cu_taxrate," +
|
|
|
"cu_dealstatus,cu_Shipmentamount,cu_receivable,cu_businessRegister,cu_recordType," +
|
|
"cu_dealstatus,cu_Shipmentamount,cu_receivable,cu_businessRegister,cu_recordType," +
|
|
|
"cu_mobile,cu_email,cu_recordman,cu_recorddate,cu_lastdate,cu_auditstatus,cu_auditstatuscode,cu_remark,CU_FXXKID)" +
|
|
"cu_mobile,cu_email,cu_recordman,cu_recorddate,cu_lastdate,cu_auditstatus,cu_auditstatuscode,cu_remark,CU_FXXKID)" +
|
|
|
"values(PRECUSTOMER_SEQ.nextval,'"+cu_code+"','"+name+"','"+dataList.get(i).get("UDSText3__c")+"','"+ dataList.get(i).get("address")+"'," +
|
|
"values(PRECUSTOMER_SEQ.nextval,'"+cu_code+"','"+name+"','"+dataList.get(i).get("UDSText3__c")+"','"+ dataList.get(i).get("address")+"'," +
|
|
|
"'"+(cu_sellercode==null?"":cu_sellercode)+"','"+owner+"','"+em_code+"','"+dataList.get(i).get("field_w9e4q__c")+"','"+cuKind+"'," +
|
|
"'"+(cu_sellercode==null?"":cu_sellercode)+"','"+owner+"','"+em_code+"','"+dataList.get(i).get("field_w9e4q__c")+"','"+cuKind+"'," +
|
|
|
"'"+getNotNull(dataList,i,"field_giBJk__c")+"','"+getNotNull(dataList,i,"UDSText5__c")+"'," +
|
|
"'"+getNotNull(dataList,i,"field_giBJk__c")+"','"+getNotNull(dataList,i,"UDSText5__c")+"'," +
|
|
|
"'"+getNotNull(dataList,i,"UDSText1__c")+"','"+getNotNull(dataList,i,"UDSText2__c")+"','" +
|
|
"'"+getNotNull(dataList,i,"UDSText1__c")+"','"+getNotNull(dataList,i,"UDSText2__c")+"','" +
|
|
|
- getNotNull(dataList,i,"field_1l3xo__c")+"','"+wbsk_user+"','"+paID+"','"+paCode+"','"+wbsk_user+"','"+cu_level+"','"+cu_industry+"'," +
|
|
|
|
|
|
|
+ getNotNull(dataList,i,"field_1l3xo__c")+"','"+wbsk_user+"','"
|
|
|
|
|
+ //+paID+"','"+paCode+"','"+wbsk_user+"','"
|
|
|
|
|
+ +cu_level+"','"+cu_industry+"'," +
|
|
|
"'"+getNotNull(dataList,i,"UDSText4__c")+"','"+cu_turnSAP+"','"+cu_currency+"',"+cu_taxrate+",'"+getNotNull(dataList,i,"deal_status")+"'," +
|
|
"'"+getNotNull(dataList,i,"UDSText4__c")+"','"+cu_turnSAP+"','"+cu_currency+"',"+cu_taxrate+",'"+getNotNull(dataList,i,"deal_status")+"'," +
|
|
|
"'"+getNotNull(dataList,i,"field_Ezg0w__c")+"','"+getNotNull(dataList,i,"field_59oLF__c")+"','"+getNotNull(dataList,i,"biz_reg_name")+"','"+cu_recordType+"',"+
|
|
"'"+getNotNull(dataList,i,"field_Ezg0w__c")+"','"+getNotNull(dataList,i,"field_59oLF__c")+"','"+getNotNull(dataList,i,"biz_reg_name")+"','"+cu_recordType+"',"+
|
|
|
"'"+dataList.get(i).get("tel")+"','"+dataList.get(i).get("email")+"'," +
|
|
"'"+dataList.get(i).get("tel")+"','"+dataList.get(i).get("email")+"'," +
|
|
@@ -167,13 +171,15 @@ public class CustomerTask {
|
|
|
if(errorCode == 0) {
|
|
if(errorCode == 0) {
|
|
|
Map<String, Object> data = crmQueryResult.getData();
|
|
Map<String, Object> data = crmQueryResult.getData();
|
|
|
List<Map<String, Object>> dataList = (List<Map<String, Object>>) data.get("dataList");
|
|
List<Map<String, Object>> dataList = (List<Map<String, Object>>) data.get("dataList");
|
|
|
- Object user_id = dataList.get(0).get("user_id");
|
|
|
|
|
- if(user_id!=null){
|
|
|
|
|
- baseDao.execute("update employee set em_fxxkid='"+user_id+"' where em_id="+rs.getGeneralInt("em_id"));
|
|
|
|
|
- baseDao.execute("insert into FXXKDockingErrorlog(ml_id,ml_date,ml_result,ml_type,ml_code) values(FXXKDOCKINGERRORLOG_SEQ.nextval,sysdate,'人员资料纷享销客主键下载成功','人员资料纷享销客主键下载','"+rs.getGeneralString("em_code")+"')");
|
|
|
|
|
- }else{
|
|
|
|
|
- baseDao.execute("insert into FXXKDockingErrorlog(ml_id,ml_date,ml_result,ml_type,ml_code) values(FXXKDOCKINGERRORLOG_SEQ.nextval,sysdate,'"+crmQueryResult.getErrorMessage()+"','人员资料纷享销客主键下载','"+rs.getGeneralString("em_code")+"')");
|
|
|
|
|
- logger.info("异常信息:crm不存在该人员资料");
|
|
|
|
|
|
|
+ if(dataList.size()>0){
|
|
|
|
|
+ Object user_id = dataList.get(0).get("user_id");
|
|
|
|
|
+ if(user_id!=null){
|
|
|
|
|
+ baseDao.execute("update employee set em_fxxkid='"+user_id+"' where em_id="+rs.getGeneralInt("em_id"));
|
|
|
|
|
+ baseDao.execute("insert into FXXKDockingErrorlog(ml_id,ml_date,ml_result,ml_type,ml_code) values(FXXKDOCKINGERRORLOG_SEQ.nextval,sysdate,'人员资料纷享销客主键下载成功','人员资料纷享销客主键下载','"+rs.getGeneralString("em_code")+"')");
|
|
|
|
|
+ }else{
|
|
|
|
|
+ baseDao.execute("insert into FXXKDockingErrorlog(ml_id,ml_date,ml_result,ml_type,ml_code) values(FXXKDOCKINGERRORLOG_SEQ.nextval,sysdate,'"+crmQueryResult.getErrorMessage()+"','人员资料纷享销客主键下载','"+rs.getGeneralString("em_code")+"')");
|
|
|
|
|
+ logger.info("异常信息:crm不存在该人员资料");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
baseDao.execute("insert into FXXKDockingErrorlog(ml_id,ml_date,ml_result,ml_type,ml_code) values(FXXKDOCKINGERRORLOG_SEQ.nextval,sysdate,'"+crmQueryResult.getErrorMessage()+"','人员资料纷享销客主键下载','"+rs.getGeneralString("em_code")+"')");
|
|
baseDao.execute("insert into FXXKDockingErrorlog(ml_id,ml_date,ml_result,ml_type,ml_code) values(FXXKDOCKINGERRORLOG_SEQ.nextval,sysdate,'"+crmQueryResult.getErrorMessage()+"','人员资料纷享销客主键下载','"+rs.getGeneralString("em_code")+"')");
|