将合同详情与打印接入目标库并验收 9528

This commit is contained in:
Developer
2026-12-05 12:15:43 +08:00
parent c9e745b23e
commit b4dc1c1deb
11 changed files with 335 additions and 97 deletions

View File

@@ -159,6 +159,9 @@ namespace Jingyao.AIEmployee
{ "ai_报价管理_历史报价", new[] { "/erp/quotations" } },
{ "ai_报价管理_历史报价_明细", new[] { "/erp/quotations" } },
{ "ai_报价管理_正式报价", new[] { "/erp/contracts", "/erp/quotations", "/erp/sales-orders" } },
{ "ai_合同管理_历史合同_合同资料", new[] { "/erp/contracts" } },
{ "ai_合同管理_历史合同_产品明细", new[] { "/erp/contracts" } },
{ "ai_合同管理_正式合同_打印快照", new[] { "/erp/contracts" } },
{ "ai_合同管理_正式合同", new[] { "/erp/contracts", "/erp/quotations", "/erp/sales-orders" } },
{ "ai_销售订单_订单详情_产品明细", new[] { "/erp/sales-orders" } },
{ "ai_销售订单_正式订单", new[] { "/erp/contracts", "/erp/quotations", "/erp/sales-orders" } },
@@ -203,6 +206,9 @@ namespace Jingyao.AIEmployee
case "ai_报价管理_历史报价": fields = new string[] { "关键词", "状态", "负责人" }; break;
case "ai_报价管理_历史报价_明细": fields = new string[] { "报价单流水号" }; break;
case "ai_报价管理_正式报价": fields = new string[] { "报价流水号", "需求流水号", "客户流水号", "关键词", "状态" }; break;
case "ai_合同管理_历史合同_合同资料": fields = new string[] { "项目流水号", "合同编号" }; break;
case "ai_合同管理_历史合同_产品明细": fields = new string[] { "项目流水号", "合同编号", "类型" }; break;
case "ai_合同管理_正式合同_打印快照": fields = new string[] { "合同流水号", "需求流水号", "客户流水号" }; break;
case "ai_合同管理_正式合同": fields = new string[] { "合同流水号", "需求流水号", "客户流水号", "关键词", "状态" }; break;
case "ai_销售订单_订单详情_产品明细":
fields = new string[] { "销售订单流水号", "来源合同流水号", "需求流水号", "客户流水号" };
@@ -216,11 +222,16 @@ namespace Jingyao.AIEmployee
default: throw BadInput();
}
Only(inputs, fields);
if (name == "ai_合同管理_历史合同_合同资料" || name == "ai_合同管理_历史合同_产品明细" || name == "ai_合同管理_正式合同_打印快照")
foreach (string field in fields)
if (!inputs.ContainsKey(field) || inputs[field] == null || String.IsNullOrWhiteSpace(Convert.ToString(inputs[field],Invariant))) throw BadInput();
foreach (string key in fields) {
object value;
if (!inputs.TryGetValue(key, out value) || value == null || Object.Equals(value, "")) continue;
if (key.EndsWith("流水号",StringComparison.Ordinal))
command.Parameters.Add("@"+key,SqlDbType.BigInt).Value = Positive(inputs,key,Int64.MaxValue,0);
else if (name=="ai_合同管理_历史合同_产品明细" && key=="类型")
command.Parameters.Add("@类型",SqlDbType.Int).Value=(int)Positive(inputs,key,5,0);
else if (key=="仅正式档案") {
string flag=Convert.ToString(value,Invariant);
if (flag!="0" && flag!="1") throw BadInput();