|
|
@@ -2677,7 +2677,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
string maxcuid = dh.getFieldDataByCondition("customer", "nvl(max(cu_id),0)", "1=1").ToString();
|
|
|
|
|
|
- // 调苍穹客户信息查询接口 POST /kapi/v2/basedata/bd_customer/query
|
|
|
+ // 调客户信息查询接口 POST /kapi/v2/basedata/bd_customer/query
|
|
|
// 请求体: pageSize/pageNo 在根级(层级0), 查询条件 status 等包在 data 对象里(层级1, 无 queryDTO 中间层)
|
|
|
// 返回: {data:{rows:[{id,number,name,simplename,bizpartner_address,createorg_id,...}], totalCount}, status, errorCode}
|
|
|
var allRows = new List<JObject>();
|
|
|
@@ -2698,7 +2698,7 @@ namespace UAS_LabelMachine
|
|
|
bool ok = (st != null && st.Type == JTokenType.Boolean) ? st.Value<bool>()
|
|
|
: string.Equals((string)st, "true", StringComparison.OrdinalIgnoreCase);
|
|
|
if (!ok)
|
|
|
- throw new Exception("苍穹客户查询失败: " + (string)jo["message"] + "(errorCode=" + (string)jo["errorCode"] + ")");
|
|
|
+ throw new Exception("客户查询失败: " + (string)jo["message"] + "(errorCode=" + (string)jo["errorCode"] + ")");
|
|
|
|
|
|
JToken respData = jo["data"];
|
|
|
JArray rows = null;
|
|
|
@@ -2735,7 +2735,7 @@ namespace UAS_LabelMachine
|
|
|
// 新接口 bizpartner_address(详细地址); 兼容旧接口 address
|
|
|
cu_add.Add(GetJsonVal(row, "bizpartner_address", "address"));
|
|
|
// 创建组织ID: 新接口 createorg_id 是 Long 直接字段; 兼容旧接口 createorg.id 嵌套对象
|
|
|
- // 注意: merge 条件 cu_source='103097' 是星空历史值, 苍穹 createorg_id 为 Long 内码,
|
|
|
+ // 注意: merge 条件 cu_source='103097' 是星空历史值, createorg_id 为 Long 内码,
|
|
|
// 若匹配不到需改用 createorg_number 或调整 merge 条件(待确认)
|
|
|
cu_source.Add(GetJsonVal(row, "createorg_id", "createorg.id"));
|
|
|
}
|
|
|
@@ -2747,7 +2747,7 @@ namespace UAS_LabelMachine
|
|
|
dh.BatchInsert(sql.ToString(), new string[] { "cu_id", "cu_code", "cu_shortname", "cu_name", "cu_add1", "cu_source" }, cu_id.ToArray(), cu_code1.ToArray(), cu_name.ToArray(), cu_shortname.ToArray(), cu_add.ToArray(), cu_source.ToArray());
|
|
|
|
|
|
sql.Clear();
|
|
|
- sql.Append("merge into customer using (select * from TEMP_CUSTOMER where cu_source='103097')A on (customer.cu_code=A.cu_code)");
|
|
|
+ sql.Append("merge into customer using (select * from TEMP_CUSTOMER where cu_source='100000')A on (customer.cu_code=A.cu_code)");
|
|
|
sql.Append("when matched then update set customer.cu_add1=A.cu_add1,customer.cu_name=A.cu_name,customer.cu_shortname=A.cu_shortname ");
|
|
|
sql.Append("when not matched then insert (cu_id,cu_code,cu_name,cu_shortname,cu_add1,cu_auditstatus,cu_auditstatuscode)");
|
|
|
sql.Append("values(customer_seq.nextval,A.cu_code,A.cu_name,A.cu_shortname,A.CU_ADD1,'已审核','AUDITED')");
|