同步 ERP 经营办理与验收站工具、MES 制造执行及 PLM 页面更新

This commit is contained in:
Developer
2026-12-06 16:19:58 +08:00
parent cde72c1163
commit b209487661
234 changed files with 41794 additions and 258 deletions

View File

@@ -0,0 +1,398 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Globalization;
namespace Jingyao.AIEmployee
{
public sealed partial class PersonalInboxHandler
{
static bool ApsWindowOpen()
{
return String.Equals(System.Configuration.ConfigurationManager.AppSettings["MesApsWriteWindow"], "enabled", StringComparison.Ordinal);
}
static void RegisterMesCrossDomain()
{
RegisterSeikoDrill();
RegisterAssemblyDisposition();
NavigationRoutes.Add("ai_组装排产与派工_送检交接_查询",new[] { "/mes/assembly-schedule" });
MesResultSets.Add("ai_组装排产与派工_送检交接_查询",new[] { "context","rows","lines","page" });
MesWorkRoutes.Add("ai_组装排产与派工_送检交接_发出","/mes/assembly-schedule");
MesWorkRoutes.Add("ai_报工质量终判_组装送检_接收","/qms/final-decision");
NavigationRoutes.Add("ai_报工质量终判_组装送检_查询",new[] { "/qms/final-decision" });
MesResultSets.Add("ai_报工质量终判_组装送检_查询",new[] { "context","rows","lines","page" });
NavigationRoutes.Add("ai_报工质量终判_组装质量处置_查询",new[] { "/qms/final-decision" });
MesResultSets.Add("ai_报工质量终判_组装质量处置_查询",new[] { "rows","summary" });
NavigationRoutes.Add("ai_报工质量终判_组装检验_查询",new[] { "/qms/final-decision" });
MesResultSets.Add("ai_报工质量终判_组装检验_查询",new[] { "source","plans","results" });
NavigationRoutes.Add("ai_报工质量终判_组装质量链_查询",new[] { "/qms/final-decision" });
MesResultSets.Add("ai_报工质量终判_组装质量链_查询",new[] { "context","nodes","events","dispositions" });
NavigationRoutes.Add("ai_报工质量终判_组装质量处置_详情",new[] { "/qms/final-decision" });
MesResultSets.Add("ai_报工质量终判_组装质量处置_详情",new[] { "context","plan","result","requests","workers","scrapHistory","scrapSummary" });
NavigationRoutes.Add("ai_MES跨系统办理_本人权限与职责", new[] { "/wms/replenishment", "/aps/readiness-preparation", "/aps/mes-handoff-request", "/qms/seiko-process-release", "/qms/final-decision", "/qms/ncr-disposition", "/qms/rework-reinspection" });
MesResultSets.Add("ai_MES跨系统办理_本人权限与职责", new[] { "permissions", "duties" });
NavigationRoutes.Add("ai_补料管理_补货物料_查询", new[] { "/wms/replenishment" });
MesResultSets.Add("ai_补料管理_补货物料_查询", new[] { "rows", "page" });
NavigationRoutes.Add("ai_补料管理_补货草稿_查询", new[] { "/wms/replenishment" });
MesResultSets.Add("ai_补料管理_补货草稿_查询", new[] { "rows", "history" });
MesWorkRoutes.Add("ai_补料管理_补货草稿_保存", "/wms/replenishment");
MesWorkRoutes.Add("ai_补料管理_补货草稿_移除", "/wms/replenishment");
MesWorkRoutes.Add("ai_补料管理_补货申请_提交", "/wms/replenishment");
MesWorkRoutes.Add("ai_补料管理_外购补货_纠偏并交接采购", "/wms/replenishment");
MesWorkRoutes.Add("ai_排产准备检查_排产准备_登记检查", "/aps/readiness-preparation");
MesWorkRoutes.Add("ai_排产准备检查_工程定义绑定_创建", "/aps/readiness-preparation");
MesWorkRoutes.Add("ai_排产准备检查_排产准备_创建", "/aps/readiness-preparation");
MesWorkRoutes.Add("ai_排产准备检查_排产准备_生成草案", "/aps/readiness-preparation");
NavigationRoutes.Add("ai_排产准备检查_工程定义门禁_查询", new[] { "/aps/readiness-preparation" });
MesResultSets.Add("ai_排产准备检查_工程定义门禁_查询", new[] { "gate", "candidates", "events" });
NavigationRoutes.Add("ai_排产准备检查_交接箱_查询", new[] { "/aps/readiness-preparation" });
MesResultSets.Add("ai_排产准备检查_交接箱_查询", new[] { "rows", "page", "lines" });
NavigationRoutes.Add("ai_排产准备检查_排产准备_查询", new[] { "/aps/readiness-preparation" });
MesResultSets.Add("ai_排产准备检查_排产准备_查询", new[] { "rows", "page" });
NavigationRoutes.Add("ai_排产准备检查_资源候选_查询", new[] { "/aps/readiness-preparation" });
MesResultSets.Add("ai_排产准备检查_资源候选_查询", new[] { "devices", "people", "skills", "skillSummary" });
NavigationRoutes.Add("ai_APS转MES下达申请_本机发布台账_查询", new[] { "/aps/mes-handoff-request" });
MesResultSets.Add("ai_APS转MES下达申请_本机发布台账_查询", new[] { "rows", "page" });
NavigationRoutes.Add("ai_APS转MES下达申请_APS转MES下达申请_查询", new[] { "/aps/mes-handoff-request" });
MesResultSets.Add("ai_APS转MES下达申请_APS转MES下达申请_查询", new[] { "rows", "page" });
MesWorkRoutes.Add("ai_APS转MES下达申请_转MES下达申请_创建", "/aps/mes-handoff-request");
MesWorkRoutes.Add("ai_APS转MES下达申请_转MES下达申请_流转", "/aps/mes-handoff-request");
NavigationRoutes.Add("ai_报工质量终判_MES报工申请_查询", new[] { "/qms/final-decision" });
MesResultSets.Add("ai_报工质量终判_MES报工申请_查询", new[] { "rows", "page" });
NavigationRoutes.Add("ai_报工质量终判_QMS质量终判_查询", new[] { "/qms/final-decision", "/qms/ncr-disposition" });
MesResultSets.Add("ai_报工质量终判_QMS质量终判_查询", new[] { "rows", "page" });
MesWorkRoutes.Add("ai_报工质量终判_质量终判_创建", "/qms/final-decision");
MesWorkRoutes.Add("ai_报工质量终判_质量终判_登记检验", "/qms/final-decision");
MesWorkRoutes.Add("ai_报工质量终判_质量终判_流转", "/qms/final-decision");
NavigationRoutes.Add("ai_NCR责任判定与处置_QMS_NCR处置_查询", new[] { "/qms/ncr-disposition" });
MesResultSets.Add("ai_NCR责任判定与处置_QMS_NCR处置_查询", new[] { "rows", "page" });
MesWorkRoutes.Add("ai_NCR责任判定与处置_NCR处置_创建", "/qms/ncr-disposition");
MesWorkRoutes.Add("ai_NCR责任判定与处置_NCR处置_登记方案", "/qms/ncr-disposition");
MesWorkRoutes.Add("ai_NCR责任判定与处置_NCR处置_流转", "/qms/ncr-disposition");
NavigationRoutes.Add("ai_返工复检与NCR关闭_MES返工接收_查询", new[] { "/qms/rework-reinspection" });
MesResultSets.Add("ai_返工复检与NCR关闭_MES返工接收_查询", new[] { "rows", "page" });
NavigationRoutes.Add("ai_返工复检与NCR关闭_返工复检_查询", new[] { "/qms/rework-reinspection" });
MesResultSets.Add("ai_返工复检与NCR关闭_返工复检_查询", new[] { "rows", "page" });
MesWorkRoutes.Add("ai_返工复检与NCR关闭_返工复检_创建", "/qms/rework-reinspection");
MesWorkRoutes.Add("ai_返工复检与NCR关闭_返工复检_登记结果", "/qms/rework-reinspection");
MesWorkRoutes.Add("ai_返工复检与NCR关闭_返工复检_流转", "/qms/rework-reinspection");
}
static void CrossDate(SqlCommand command, Dictionary<string,object> inputs, string field)
{
DateTime date;
if (!DateTime.TryParseExact(Text(inputs,field,10,null), "yyyy-MM-dd", Invariant, DateTimeStyles.None, out date)) throw BadInput();
command.Parameters.Add("@"+field, SqlDbType.Date).Value=date;
}
static bool BindMesCrossDomain(SqlCommand command, string name, Dictionary<string,object> inputs, Dictionary<string,object> body)
{
if (BindAssemblyForm(command,name,inputs)) return true;
string route;
if (MesWorkRoutes.TryGetValue(name, out route) && route.StartsWith("/aps/", StringComparison.Ordinal) && !ApsWindowOpen())
throw new ApiFailure(403, "本站的 APS 办理窗口尚未开启");
switch (name) {
case "ai_通用件装配返工_返工任务_查询":
Only(inputs,"返工任务流水号");
ReworkKey(command,inputs,"返工任务流水号");
return true;
case "ai_组装排产与派工_送检交接_发出":
case "ai_报工质量终判_组装送检_接收":
bool accepting = name=="ai_报工质量终判_组装送检_接收";
if(accepting) {
Only(inputs,"装配计划流水号","装配执行流水号","预期计划版本","预期执行版本","组装送检流水号","预期任务版本","依据","确认声明","幂等键");
ReworkKey(command,inputs,"组装送检流水号");
MesVersion(command,inputs,"预期任务版本");
} else Only(inputs,"装配计划流水号","装配执行流水号","预期计划版本","预期执行版本","依据","确认声明","幂等键");
ReworkKey(command,inputs,"装配计划流水号"); ReworkKey(command,inputs,"装配执行流水号");
MesVersion(command,inputs,"预期计划版本"); MesVersion(command,inputs,"预期执行版本");
AddText(command,inputs,"依据",1000,"");
AddText(command,inputs,"确认声明",30,null,"CONFIRMED");
string handoffKey=Text(inputs,"幂等键",100,null);
if (!System.Text.RegularExpressions.Regex.IsMatch(handoffKey,@"\A[A-Za-z0-9_.:-]+\z")) throw BadInput();
command.Parameters.Add("@幂等键",SqlDbType.NVarChar,100).Value=handoffKey;
return true;
case "ai_组装排产与派工_送检交接_查询":
case "ai_报工质量终判_组装送检_查询":
Only(inputs,"装配计划流水号");
MesOptional(command,inputs,"装配计划流水号",SqlDbType.BigInt);
command.Parameters.Add("@页码",SqlDbType.Int).Value=(int)Positive(body,"pageList",100000,1);
command.Parameters.Add("@每页条数",SqlDbType.Int).Value=(int)Positive(body,"pageSize",50,25);
return true;
case "ai_报工质量终判_组装质量处置_查询":
Only(inputs,"状态");
string status=Text(inputs,"状态",10,"PENDING");
if(status!="PENDING" && status!="ALL") throw BadInput();
command.Parameters.Add("@待审批",SqlDbType.Bit).Value=status=="PENDING";
command.Parameters.Add("@页码",SqlDbType.Int).Value=(int)Positive(body,"pageList",100000,1);
command.Parameters.Add("@每页条数",SqlDbType.Int).Value=(int)Positive(body,"pageSize",50,25);
return true;
case "ai_报工质量终判_组装检验_查询":
Only(inputs,"送检流水号");
ReworkKey(command,inputs,"送检流水号");
return true;
case "ai_报工质量终判_组装质量链_查询":
Only(inputs,"送检流水号");
ReworkKey(command,inputs,"送检流水号");
return true;
case "ai_报工质量终判_组装质量处置_详情":
Only(inputs,"送检流水号","报废页码","报废每页条数");
ReworkKey(command,inputs,"送检流水号");
command.Parameters.Add("@报废页码",SqlDbType.Int).Value=(int)Positive(inputs,"报废页码",100000,1);
command.Parameters.Add("@报废每页条数",SqlDbType.Int).Value=(int)Positive(inputs,"报废每页条数",50,25);
return true;
case "ai_MES跨系统办理_本人权限与职责":
Only(inputs);
return true;
case "ai_补料管理_补货物料_查询":
Only(inputs, "补货类型", "关键词");
AddText(command, inputs, "补货类型", 20, null, "PURCHASE", "SELF_MADE");
AddText(command, inputs, "关键词", 100, "");
command.Parameters.Add("@页码", SqlDbType.Int).Value = (int)Positive(body, "pageList", 100000, 1);
command.Parameters.Add("@每页条数", SqlDbType.Int).Value = (int)Positive(body, "pageSize", 300, 100);
return true;
case "ai_补料管理_补货草稿_查询":
Only(inputs, "补货类型");
AddText(command, inputs, "补货类型", 20, null, "PURCHASE", "SELF_MADE");
return true;
case "ai_补料管理_补货草稿_保存":
Only(inputs, "补货类型", "物料流水号", "补货数量", "确认声明", "幂等键");
AddText(command, inputs, "补货类型", 20, null, "PURCHASE", "SELF_MADE");
command.Parameters.Add("@物料流水号", SqlDbType.Int).Value = (int)Positive(inputs, "物料流水号", Int32.MaxValue, 0);
command.Parameters.Add("@补货数量", SqlDbType.Int).Value = (int)Positive(inputs, "补货数量", 1000000, 0);
AddText(command, inputs, "确认声明", 100, "");
BindIdempotency(command, inputs, true);
return true;
case "ai_补料管理_补货草稿_移除":
Only(inputs, "补货草稿明细流水号", "确认声明", "幂等键");
ReworkKey(command, inputs, "补货草稿明细流水号");
AddText(command, inputs, "确认声明", 100, "");
BindIdempotency(command, inputs, true);
return true;
case "ai_补料管理_补货申请_提交":
Only(inputs, "补货类型", "补货期限", "申请说明", "确认声明", "幂等键");
AddText(command, inputs, "补货类型", 20, null, "PURCHASE", "SELF_MADE");
CrossDate(command, inputs, "补货期限");
AddText(command, inputs, "申请说明", 1000, null);
AddText(command, inputs, "确认声明", 100, "");
BindIdempotency(command, inputs, true);
return true;
case "ai_补料管理_外购补货_纠偏并交接采购":
Only(inputs, "补货申请流水号", "处置原因", "确认声明", "幂等键");
ReworkKey(command, inputs, "补货申请流水号");
AddText(command, inputs, "处置原因", 500, null);
AddText(command, inputs, "确认声明", 100, "");
BindIdempotency(command, inputs, true);
return true;
case "ai_排产准备检查_排产准备_登记检查":
Only(inputs, "排产准备流水号", "检查项", "结论", "依据", "幂等键");
ReworkKey(command, inputs, "排产准备流水号");
AddText(command, inputs, "检查项", 20, null, "PROCESS_BOM", "MATERIAL", "CAPACITY", "DUE_DATE");
AddText(command, inputs, "结论", 10, null, "PASS", "FAIL");
AddText(command, inputs, "依据", 500, null);
BindIdempotency(command, inputs, true);
return true;
case "ai_排产准备检查_工程定义绑定_创建":
Only(inputs, "排产准备流水号", "工程定义快照流水号", "别名映射状态流水号", "绑定原因", "确认声明", "幂等键");
ReworkKey(command, inputs, "排产准备流水号");
ReworkKey(command, inputs, "工程定义快照流水号");
ReworkKey(command, inputs, "别名映射状态流水号");
AddText(command, inputs, "绑定原因", 500, null);
AddText(command, inputs, "确认声明", 100, "");
BindIdempotency(command, inputs, true);
command.Parameters.Add("@关联标识", SqlDbType.UniqueIdentifier).Value = Guid.NewGuid();
return true;
case "ai_排产准备检查_排产准备_创建":
Only(inputs, "APS交接流水号", "幂等键");
ReworkKey(command, inputs, "APS交接流水号");
BindIdempotency(command, inputs, true);
return true;
case "ai_排产准备检查_排产准备_生成草案":
Only(inputs, "排产准备流水号", "幂等键");
ReworkKey(command, inputs, "排产准备流水号");
BindIdempotency(command, inputs, true);
return true;
case "ai_排产准备检查_工程定义门禁_查询":
Only(inputs, "排产准备流水号");
ReworkKey(command, inputs, "排产准备流水号");
return true;
case "ai_排产准备检查_交接箱_查询":
Only(inputs, "APS交接流水号", "生产需求流水号", "状态", "关键字");
MesOptional(command, inputs, "APS交接流水号", SqlDbType.BigInt);
MesOptional(command, inputs, "生产需求流水号", SqlDbType.BigInt);
AddText(command, inputs, "状态", 30, "");
AddText(command, inputs, "关键字", 200, "");
command.Parameters.Add("@页码", SqlDbType.Int).Value = (int)Positive(body, "pageList", 100000, 1);
command.Parameters.Add("@每页条数", SqlDbType.Int).Value = (int)Positive(body, "pageSize", 200, 50);
return true;
case "ai_排产准备检查_排产准备_查询":
Only(inputs, "排产准备流水号", "APS交接流水号", "状态", "关键字");
MesOptional(command, inputs, "排产准备流水号", SqlDbType.BigInt);
MesOptional(command, inputs, "APS交接流水号", SqlDbType.BigInt);
AddText(command, inputs, "状态", 20, "");
AddText(command, inputs, "关键字", 200, "");
command.Parameters.Add("@页码", SqlDbType.Int).Value = (int)Positive(body, "pageList", 100000, 1);
command.Parameters.Add("@每页条数", SqlDbType.Int).Value = (int)Positive(body, "pageSize", 200, 50);
return true;
case "ai_排产准备检查_资源候选_查询":
Only(inputs, "关键字");
AddText(command, inputs, "关键字", 100, "");
return true;
case "ai_APS转MES下达申请_本机发布台账_查询":
Only(inputs, "发布执行流水号", "发布审批流水号", "状态");
MesOptional(command, inputs, "发布执行流水号", SqlDbType.BigInt);
MesOptional(command, inputs, "发布审批流水号", SqlDbType.BigInt);
AddText(command, inputs, "状态", 30, "");
command.Parameters.Add("@页码", SqlDbType.Int).Value = (int)Positive(body, "pageList", 100000, 1);
command.Parameters.Add("@每页条数", SqlDbType.Int).Value = (int)Positive(body, "pageSize", 200, 50);
return true;
case "ai_APS转MES下达申请_APS转MES下达申请_查询":
Only(inputs, "MES下达申请流水号", "发布执行流水号", "状态");
MesOptional(command, inputs, "MES下达申请流水号", SqlDbType.BigInt);
MesOptional(command, inputs, "发布执行流水号", SqlDbType.BigInt);
AddText(command, inputs, "状态", 30, "");
command.Parameters.Add("@页码", SqlDbType.Int).Value = (int)Positive(body, "pageList", 100000, 1);
command.Parameters.Add("@每页条数", SqlDbType.Int).Value = (int)Positive(body, "pageSize", 200, 50);
return true;
case "ai_APS转MES下达申请_转MES下达申请_创建":
Only(inputs, "发布执行流水号", "幂等键");
ReworkKey(command, inputs, "发布执行流水号");
BindIdempotency(command, inputs, true);
return true;
case "ai_APS转MES下达申请_转MES下达申请_流转":
Only(inputs, "MES下达申请流水号", "动作", "意见", "幂等键");
ReworkKey(command, inputs, "MES下达申请流水号");
AddText(command, inputs, "动作", 20, null);
AddText(command, inputs, "意见", 1000, "");
BindIdempotency(command, inputs, true);
return true;
case "ai_报工质量终判_MES报工申请_查询":
Only(inputs, "报工申请流水号", "开工门禁流水号", "状态");
MesOptional(command, inputs, "报工申请流水号", SqlDbType.BigInt);
MesOptional(command, inputs, "开工门禁流水号", SqlDbType.BigInt);
AddText(command, inputs, "状态", 40, "");
command.Parameters.Add("@页码", SqlDbType.Int).Value = (int)Positive(body, "pageList", 100000, 1);
command.Parameters.Add("@每页条数", SqlDbType.Int).Value = (int)Positive(body, "pageSize", 300, 300);
return true;
case "ai_报工质量终判_QMS质量终判_查询":
Only(inputs, "质量终判流水号", "报工申请流水号", "状态");
MesOptional(command, inputs, "质量终判流水号", SqlDbType.BigInt);
MesOptional(command, inputs, "报工申请流水号", SqlDbType.BigInt);
AddText(command, inputs, "状态", 40, "");
command.Parameters.Add("@页码", SqlDbType.Int).Value = (int)Positive(body, "pageList", 100000, 1);
command.Parameters.Add("@每页条数", SqlDbType.Int).Value = (int)Positive(body, "pageSize", 300, 300);
return true;
case "ai_报工质量终判_质量终判_创建":
Only(inputs, "报工申请流水号", "预期报工版本", "预期门禁版本", "幂等键");
ReworkKey(command, inputs, "报工申请流水号");
MesVersion(command, inputs, "预期报工版本");
MesVersion(command, inputs, "预期门禁版本");
BindIdempotency(command, inputs, true);
return true;
case "ai_报工质量终判_质量终判_登记检验":
Only(inputs, "质量终判流水号", "质量终判明细流水号", "检验结论", "终判合格数量", "终判不合格数量", "缺陷代码", "缺陷说明", "检验证据", "预期版本", "预期明细版本", "预期报工版本", "预期报工明细版本", "预期门禁版本", "幂等键");
ReworkKey(command, inputs, "质量终判流水号");
ReworkKey(command, inputs, "质量终判明细流水号");
AddText(command, inputs, "检验结论", 20, null);
MesQuantity(command, inputs, "终判合格数量", 4);
MesQuantity(command, inputs, "终判不合格数量", 4);
AddText(command, inputs, "缺陷代码", 100, "");
AddText(command, inputs, "缺陷说明", 1000, "");
AddText(command, inputs, "检验证据", 1000, null);
MesVersion(command, inputs, "预期版本");
MesVersion(command, inputs, "预期明细版本");
MesVersion(command, inputs, "预期报工版本");
MesVersion(command, inputs, "预期报工明细版本");
MesVersion(command, inputs, "预期门禁版本");
BindIdempotency(command, inputs, true);
return true;
case "ai_报工质量终判_质量终判_流转":
Only(inputs, "质量终判流水号", "动作", "意见", "确认声明", "预期版本", "预期报工版本", "预期门禁版本", "幂等键");
ReworkKey(command, inputs, "质量终判流水号");
AddText(command, inputs, "动作", 30, null);
AddText(command, inputs, "意见", 1000, "");
AddText(command, inputs, "确认声明", 100, "");
MesVersion(command, inputs, "预期版本");
MesVersion(command, inputs, "预期报工版本");
MesVersion(command, inputs, "预期门禁版本");
BindIdempotency(command, inputs, true);
return true;
case "ai_NCR责任判定与处置_QMS_NCR处置_查询":
Only(inputs, "NCR处置流水号", "NCR候选流水号", "状态");
MesOptional(command, inputs, "NCR处置流水号", SqlDbType.BigInt);
MesOptional(command, inputs, "NCR候选流水号", SqlDbType.BigInt);
AddText(command, inputs, "状态", 40, "");
command.Parameters.Add("@页码", SqlDbType.Int).Value = (int)Positive(body, "pageList", 100000, 1);
command.Parameters.Add("@每页条数", SqlDbType.Int).Value = (int)Positive(body, "pageSize", 300, 300);
return true;
case "ai_NCR责任判定与处置_NCR处置_创建":
Only(inputs, "NCR候选流水号", "幂等键");
ReworkKey(command, inputs, "NCR候选流水号");
BindIdempotency(command, inputs, true);
return true;
case "ai_NCR责任判定与处置_NCR处置_登记方案":
Only(inputs, "NCR处置流水号", "处置方式", "责任部门", "原因判定", "纠正要求", "计划完成日期", "处置证据", "幂等键");
ReworkKey(command, inputs, "NCR处置流水号");
AddText(command, inputs, "处置方式", 30, null);
AddText(command, inputs, "责任部门", 100, null);
AddText(command, inputs, "原因判定", 1000, null);
AddText(command, inputs, "纠正要求", 1000, null);
CrossDate(command, inputs, "计划完成日期");
AddText(command, inputs, "处置证据", 1000, null);
BindIdempotency(command, inputs, true);
return true;
case "ai_NCR责任判定与处置_NCR处置_流转":
Only(inputs, "NCR处置流水号", "动作", "意见", "确认声明", "幂等键");
ReworkKey(command, inputs, "NCR处置流水号");
AddText(command, inputs, "动作", 30, null);
AddText(command, inputs, "意见", 1000, "");
AddText(command, inputs, "确认声明", 100, "");
BindIdempotency(command, inputs, true);
return true;
case "ai_返工复检与NCR关闭_MES返工接收_查询":
Only(inputs, "返工接收流水号", "返工候选流水号", "状态");
MesOptional(command, inputs, "返工接收流水号", SqlDbType.BigInt);
MesOptional(command, inputs, "返工候选流水号", SqlDbType.BigInt);
AddText(command, inputs, "状态", 40, "");
command.Parameters.Add("@页码", SqlDbType.Int).Value = (int)Positive(body, "pageList", 100000, 1);
command.Parameters.Add("@每页条数", SqlDbType.Int).Value = (int)Positive(body, "pageSize", 300, 300);
return true;
case "ai_返工复检与NCR关闭_返工复检_查询":
Only(inputs, "返工复检流水号", "复检候选流水号", "状态");
MesOptional(command, inputs, "返工复检流水号", SqlDbType.BigInt);
MesOptional(command, inputs, "复检候选流水号", SqlDbType.BigInt);
AddText(command, inputs, "状态", 40, "");
command.Parameters.Add("@页码", SqlDbType.Int).Value = (int)Positive(body, "pageList", 100000, 1);
command.Parameters.Add("@每页条数", SqlDbType.Int).Value = (int)Positive(body, "pageSize", 300, 300);
return true;
case "ai_返工复检与NCR关闭_返工复检_创建":
Only(inputs, "复检候选流水号", "幂等键");
ReworkKey(command, inputs, "复检候选流水号");
BindIdempotency(command, inputs, true);
return true;
case "ai_返工复检与NCR关闭_返工复检_登记结果":
Only(inputs, "返工复检流水号", "复检结论", "合格数量", "不合格数量", "缺陷代码", "缺陷说明", "复检证据", "幂等键");
ReworkKey(command, inputs, "返工复检流水号");
AddText(command, inputs, "复检结论", 20, null);
MesQuantity(command, inputs, "合格数量", 4);
MesQuantity(command, inputs, "不合格数量", 4);
AddText(command, inputs, "缺陷代码", 100, "");
AddText(command, inputs, "缺陷说明", 1000, "");
AddText(command, inputs, "复检证据", 1000, null);
BindIdempotency(command, inputs, true);
return true;
case "ai_返工复检与NCR关闭_返工复检_流转":
Only(inputs, "返工复检流水号", "动作", "意见", "确认声明", "幂等键");
ReworkKey(command, inputs, "返工复检流水号");
AddText(command, inputs, "动作", 30, null);
AddText(command, inputs, "意见", 1000, "");
AddText(command, inputs, "确认声明", 100, "");
BindIdempotency(command, inputs, true);
return true;
default: return false;
}
}
}
}