From 9579db7cd380d246ba9f89f7a53ea431b18b915c Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期四, 09 五月 2024 17:08:42 +0800 Subject: [PATCH] 网页版 和 PDA版 设备点检表和器具点检表 增加 字段,新增器具点检PDA模块 --- Model/生产管理/设备管理/ClsSb_EquipDotCheckBillSub.cs | 5 Model/生产管理/模具管理/ClsSc_MouldDotCheckBillSub.cs | 3 DAL/生产管理/设备管理/ClsSb_EquipDotCheckBill.cs | 36 ++++--- WebAPI/DLL/ClsSb_EquipDotCheckBill.cs | 6 DAL/生产管理/模具管理/ClsSc_MouldDotCheckBill.cs | 37 ++++--- Model/生产管理/设备管理/ClsSb_EquipDotCheckBillMain.cs | 6 + WebAPI/Models/ClsSb_EquipDotCheckBillMain.cs | 6 + Model/生产管理/模具管理/ClsSc_MouldDotCheckBillMain.cs | 6 + WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs | 6 WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 47 ++++++++ WebAPI/Controllers/WebAPIController.cs | 113 ++++++++++++++++++++++ WebAPI/Models/ClsSb_EquipDotCheckBillSub.cs | 3 12 files changed, 234 insertions(+), 40 deletions(-) diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBill.cs" index c6f2d8d..5634a35 100644 --- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBill.cs" +++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBill.cs" @@ -60,7 +60,11 @@ ",HExplanation='" + omodel.HExplanation + "'" + ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + - + ",HLastResult='" + omodel.HLastResult + "'" + + ",HErrNote='" + omodel.HErrNote + "'" + + ",HBigSafeNote='" + omodel.HBigSafeNote + "'" + + ",HShiftsID=" + omodel.HShiftsID + + ",HDotCheckNote='" + omodel.HDotCheckNote + "'" + " where HInterID=" + lngBillKey.ToString()); //鍒犻櫎鍏宠仈 DeleteRelation(ref sReturn, lngBillKey); @@ -73,18 +77,19 @@ foreach (Model.ClsSc_MouldDotCheckBillSub oSub in DetailColl) { oCn.RunProc("Insert into Sc_MouldDotCheckBillSub " + - " (HInterID,HEntryID" + - ",HManagerID" + - ",HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim" + - ",HCloseMan,HCloseType,HRemark" + - ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + - ") values(" - + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + - "," + oSub.HManagerID.ToString() + "," + oSub.HDotCheckItemID.ToString() + - ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'" + - ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + - "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + - ") "); + " (HInterID,HEntryID" + + ",HManagerID" + + ",HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim" + + ",HCloseMan,HCloseType,HRemark" + + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + + ",HDotCheckItemClassID,HDotCheckItemMethodID,HDotCheckResult" + + ") values(" + + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + + "," + oSub.HManagerID.ToString() + "," + oSub.HDotCheckItemID.ToString() + + ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'" + + ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + + "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID + ",'" + oSub.HDotCheckResult + "'" + + ") "); } ////閰嶄欢椤圭洰 @@ -141,12 +146,13 @@ ",HMouldID,HBeginDate"+ ",HEndDate,HPlanNo,HPlanInterID" + ",HInnerBillNo,HExplanation,HMouldDotCheckRuleID" + + ",HLastResult,HErrNote,HBigSafeNote,HShiftsID,HDotCheckNote" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" + "," + omodel.HMouldID.ToString() + ",'" + omodel.HBeginDate + "'" + ",'" + omodel.HEndDate + "','" + omodel.HPlanNo + "'," + omodel.HPlanInterID.ToString() + - ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'," + omodel.HMouldDotCheckRuleID + + ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'," + omodel.HMouldDotCheckRuleID + ",'" + omodel.HLastResult + "','" + omodel.HErrNote + "','" + omodel.HBigSafeNote + "'," + omodel.HShiftsID + ",'" + omodel.HDotCheckNote + "'" + ") "); //鎻掑叆瀛愯〃 foreach (Model.ClsSc_MouldDotCheckBillSub oSub in DetailColl) @@ -157,12 +163,13 @@ ",HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim" + ",HCloseMan,HCloseType,HRemark" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + + ",HDotCheckItemClassID,HDotCheckItemMethodID,HDotCheckResult" + ") values(" + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HManagerID.ToString() +","+ oSub.HDotCheckItemID.ToString()+ ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + "'" + ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + - "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + + "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID + ",'" + oSub.HDotCheckResult + "'" + ") "); } diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBill.cs" index 0668574..08979c9 100644 --- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBill.cs" +++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBill.cs" @@ -70,6 +70,11 @@ ",HExplanation='" + omodel.HExplanation+"'" + ",HInnerBillNo='" + omodel.HInnerBillNo+"'" + ",HEquipDotCheckRuleInterID="+omodel.HEquipDotCheckRuleInterID+ + ",HLastResult='" + omodel.HLastResult + "'" + + ",HErrNote='" + omodel.HErrNote + "'" + + ",HBigSafeNote='" + omodel.HBigSafeNote + "'" + + ",HShiftsID=" + omodel.HShiftsID + + ",HDotCheckNote='" + omodel.HDotCheckNote + "'" + " where HInterID=" + lngBillKey.ToString()); //鍒犻櫎鍏宠仈 DeleteRelation(ref sReturn, lngBillKey); @@ -80,18 +85,18 @@ foreach (Model.ClsSb_EquipDotCheckBillSub oSub in DetailColl) { oCn.RunProc("Insert into Sb_EquipDotCheckBillSub " + - " (HInterID,HEntryID," + - "HCloseMan,HEntryCloseDate,HCloseType,HRemark," + - "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," + - "HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim," + - "HManagerID,HManagerNumber" + - ") values(" - + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + - ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + - "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + - ",'" + oSub.HDotCheckItemID + "','" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + - "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'" + - ") "); + " (HInterID,HEntryID," + + "HCloseMan,HEntryCloseDate,HCloseType,HRemark," + + "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," + + "HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim," + + "HManagerID,HManagerNumber,HDotCheckItemClassID,HDotCheckItemMethodID,HDotCheckResult" + + ") values(" + + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + + "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + + ",'" + oSub.HDotCheckItemID + "','" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + + "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID + ",'" + oSub.HDotCheckResult + "'" + + ") "); } // //foreach (Model.ClsSb_EquipDotCheckBillSub oSub in DetailColl) @@ -165,10 +170,11 @@ "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + ",HYear,HPeriod,HRemark,HEquipID" + ",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo,HEquipDotCheckRuleInterID" + + ",HLastResult,HErrNote,HBigSafeNote,HShiftsID,HDotCheckNote" + ") "+ " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() + - ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," +omodel.HEquipDotCheckRuleInterID.ToString()+ + ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," +omodel.HEquipDotCheckRuleInterID.ToString() + ",'" + omodel.HLastResult + "','" + omodel.HErrNote + "','" + omodel.HBigSafeNote + "'," + omodel.HShiftsID + ",'" + omodel.HDotCheckNote + "'" + ") "); //鎻掑叆瀛愯〃 foreach (Model.ClsSb_EquipDotCheckBillSub oSub in DetailColl) @@ -178,13 +184,13 @@ "HCloseMan,HEntryCloseDate,HCloseType,HRemark," + "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," + "HDotCheckItemID,HDotCheckItem,HDotCheckPart,HClaim," + - "HManagerID,HManagerNumber" + + "HManagerID,HManagerNumber,HDotCheckItemClassID,HDotCheckItemMethodID,HDotCheckResult" + ") values(" + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + ",'" + oSub.HDotCheckItemID+"','"+oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + - "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'" + + "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID + ",'" + oSub.HDotCheckResult + "'" + ") "); } //鐐规瀹屾垚锛屽弽鍐欒澶囩偣妫�璁″垝鍗曞瓙琛ㄦ槸鍚︾偣妫�鏍囪 diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBillMain.cs" index 36bbb4f..64d5123 100644 --- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBillMain.cs" +++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBillMain.cs" @@ -14,5 +14,11 @@ public string HExplanation;// varchar(500) --摘要 public string HInnerBillNo;// varchar(50) --内部单据号 public string HMouldDotCheckRuleID;// 器具点检规程ID + + public string HLastResult;// 最终结论(OK,NG) + public string HErrNote;// 异常情况记录 + public string HBigSafeNote;// 重大安全隐患记录 + public Int64 HShiftsID;// 生产班次(Gy_Shifts) + public string HDotCheckNote;// 点检数据 } } diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBillSub.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBillSub.cs" index c8989f3..19f28fa 100644 --- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBillSub.cs" +++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldDotCheckBillSub.cs" @@ -13,5 +13,8 @@ public string HClaim;// varchar(100) --具体要求 public long HManagerID;// int --负责人id(h_v_IF_Employee) + public Int64 HDotCheckItemClassID;// 点检项目分类(gy_DotCheckItemClass) + public Int64 HDotCheckItemMethodID;// 点检方法(gy_DotCheckItemMethod) + public string HDotCheckResult;// 点检结果(?,X) } } diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBillMain.cs" index af51b09..6025add 100644 --- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBillMain.cs" +++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBillMain.cs" @@ -19,5 +19,11 @@ public int HEquipDotCheckPlanInterID; //设备点检计划单(Sb_EquipDotCheckPlanBillSub_Plan)主内码 public int HEquipDotCheckPlanEntryID; //设备点检计划单(Sb_EquipDotCheckPlanBillSub_Plan)子内码 + public string HLastResult;// 最终结论(OK,NG) + public string HErrNote;// 异常情况记录 + public string HBigSafeNote;// 重大安全隐患记录 + public Int64 HShiftsID;// 生产班次(Gy_Shifts) + public string HDotCheckNote;// 点检数据 + } } diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBillSub.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBillSub.cs" index c7e8bc9..16650dc 100644 --- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBillSub.cs" +++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckBillSub.cs" @@ -25,7 +25,10 @@ public string HUnitName; public Int64 HManagerID; public string HManagerNumber; - public string HManagerName; + public string HManagerName; + public Int64 HDotCheckItemClassID;// 点检项目分类(gy_DotCheckItemClass) + public Int64 HDotCheckItemMethodID;// 点检方法(gy_DotCheckItemMethod) + public string HDotCheckResult;// 点检结果(?,X) } } diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs index 1910c73..b5fb9f7 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs @@ -382,7 +382,7 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sqlWhere == null || sqlWhere.Equals("")) { - ds = oCN.RunProcReturn("select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 as HDotCheckCode ,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart ,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,璐熻矗浜篒D HManagerID,璐熻矗浜虹紪鐮� HManagerCode,璐熻矗浜� HManagerName from h_v_Sb_EquipDotCheckBillList", "h_v_Sb_EquipDotCheckBillList"); + ds = oCN.RunProcReturn("select * from h_v_Sb_EquipDotCheckBill_Edit", "h_v_Sb_EquipDotCheckBill_Edit"); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; @@ -390,9 +390,9 @@ } else { - string sql1 = "select 鐐规椤圭洰ID HDotCheckItemID,鐐规椤圭洰浠g爜 as HDotCheckCode ,鐐规椤圭洰 HDotCheckItem,鐐规閮ㄤ綅 HDotCheckPart,鍏蜂綋瑕佹眰 HClaim,琛ㄤ綋澶囨敞 HRemark,璐熻矗浜篒D HManagerID,璐熻矗浜虹紪鐮� HManagerCode,璐熻矗浜� HManagerName from h_v_Sb_EquipDotCheckBillList where 1 = 1 "; + string sql1 = "select * from h_v_Sb_EquipDotCheckBill_Edit where 1 = 1 "; string sql = sql1 + sqlWhere; - ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList"); + ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBill_Edit"); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs index e622a38..3ee0f6d 100644 --- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs +++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs @@ -5798,7 +5798,7 @@ { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); //鑾峰彇鐐规椤圭洰缂栬緫鏁版嵁 - ds = oCN.RunProcReturn("select HDotCheckItem, HDotCheckPart , HClaim, a.HRemark,a.HManagerID,e.HNumber HManagerCode,e.HName HManagerName from Sc_MouldDotCheckBillSub a left join Gy_Employee e on a.HManagerID=e.HItemID where 1=1 " + sqlWhere, "Sc_MouldDotCheckBillSub"); + ds = oCN.RunProcReturn("select * from h_v_Sc_MouldDotCheckBill_Edit where 1=1 " + sqlWhere, "h_v_Sc_MouldDotCheckBill_Edit"); //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁 ds1 = oCN.RunProcReturn(@"select b.HMaterID, mt.Hnumber HMaterNumber ,mt.HName HMaterName, b.HUnitID ,u2.hnumber HUnitNumber,u2.HName HUnitName,b.HQty,b.HQtyMust,b.HRemark @@ -5811,7 +5811,7 @@ objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; - objJsonResult.data = null; + objJsonResult.data = ds.Tables[0]; objJsonResult.list = list; } @@ -6244,7 +6244,48 @@ #endregion - + #region 鏍规嵁鍣ㄥ叿鏉$爜鏌ユ壘鍣ㄥ叿妗f淇℃伅PDA + [Route("QJ_PDA_MouldDotCheckBill/txtHBarCode_KeyDown")] + [HttpGet] + public object txtHBarCode_KeyDown(string HBarCode) + { + try + { + if (HBarCode == null || HBarCode.Equals("")) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏉″舰鐮佷笉鑳戒负绌猴紒"; + objJsonResult.data = null; + return objJsonResult; + } + //寰楀埌淇℃伅 + ds = oCN.RunProcReturn("select top 1 * from Gy_MouldFileMain where HNumber= '" + HBarCode + "'", "Gy_MouldFileMain"); + //鍐欏叆淇℃伅 + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏈煡璇㈠埌鍣ㄥ叿淇℃伅锛�"; + objJsonResult.data = null; + return objJsonResult; + } + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion #region 妯″叿鎶ュ簾鍏ュ簱鍗� diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs index 681f05e..bf9e9ce 100644 --- a/WebAPI/Controllers/WebAPIController.cs +++ b/WebAPI/Controllers/WebAPIController.cs @@ -11469,6 +11469,117 @@ } /// <summary> + /// 鏍规嵁鍣ㄥ叿甯﹀嚭椤圭洰 + /// </summary> + /// <returns></returns> + [Route("Web/GetItemByMouldFile")] + [HttpGet] + public object GetItemByMouldFile(int MouldProjectID, string Type, string HDate) + { + if (MouldProjectID <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "浜у搧鍣ㄥ叿鏈�夋嫨"; + objjson.data = null; + return objjson; + } + try + { + string HView = ""; + switch (Type) + { + case "DJ": + HView = "h_v_QJ_GetDotCheckItemList"; + break; + default: + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "璁惧妯″潡绫诲瀷閿欒锛�"; + objjson.data = null; + return objjson; + } + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + //string sql = string.Format(@"select * from " + HView + " where HInterID = " + EquipProjectID); + string sql = string.Format(@"Exec h_p_Sb_GetCheckItem_PDA '" + MouldProjectID + "','" + Type + "','" + HDate + "'"); + ds = oCN.RunProcReturn(sql, HView); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触,鏌ユ棤鏁版嵁" + DBUtility.ClsPub.sErrInfo; + objjson.data = null; + return objjson; + } + else + { + objjson.code = "1"; + objjson.count = 1; + objjson.Message = "鑾峰彇鎴愬姛!"; + objjson.data = ds.Tables[0]; + return objjson; + } + } + catch (Exception ex) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + + /// <summary> + /// 鏍规嵁鍣ㄥ叿鐐规璁″垝甯﹀嚭椤圭洰 + /// </summary> + /// <returns></returns> + [Route("Web/GetItemByMouldDotCheckPlan")] + [HttpGet] + public object GetItemByMouldDotCheckPlan(int HInterID) + { + if (HInterID <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "浜у搧鍣ㄥ叿鐐规璁″垝鏈�夋嫨"; + objjson.data = null; + return objjson; + } + try + { + + string sql = string.Format(@"select * from h_v_QJ_GetDotCheckItemList where 鐐规璁″垝ID = " + HInterID ); + ds = oCN.RunProcReturn(sql, "h_v_QJ_GetDotCheckItemList"); + if (ds == null || ds.Tables[0].Rows.Count <= 0) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触,鏌ユ棤鏁版嵁" + DBUtility.ClsPub.sErrInfo; + objjson.data = null; + return objjson; + } + else + { + objjson.code = "1"; + objjson.count = 1; + objjson.Message = "鑾峰彇鎴愬姛!"; + objjson.data = ds.Tables[0]; + return objjson; + } + } + catch (Exception ex) + { + objjson.code = "0"; + objjson.count = 0; + objjson.Message = "鑾峰彇澶辫触" + ex.ToString(); + objjson.data = null; + return objjson; + } + } + + /// <summary> /// 鏌ヨ鍚勭被璁惧鍗曟嵁鍒楄〃锛堣澶囩偣妫�锛岃澶囩淮淇紝璁惧淇濆吇......锛� /// </summary> /// <returns></returns> @@ -11575,7 +11686,7 @@ string sql = string.Format(@"select b.HDotCheckItemID HDotCheckItemID,c.HNumber HDotCheckCode,b.HDotCheckItem,b.HDotCheckPart,b.HClaim, b.HManagerID,e.HNumber HManagerCode,e.HName HManagerName,b.HRemark from Sb_EquipDotCheckRuleBillMain a left join Sb_EquipDotCheckRuleBillSub b on a.HInterID=b.HInterID - left join Gy_QCCheckItem c on c.HItemID=b.HDotCheckItemID + left join Gy_DotCheck c on c.HItemID=b.HDotCheckItemID left join Gy_Employee e on e.HItemID=b.HManagerID where a.HInterID=" + HDotCheckRuleInterID); ds = oCN.RunProcReturn(sql, "Sb_EquipDotCheckRuleBillMain"); diff --git a/WebAPI/DLL/ClsSb_EquipDotCheckBill.cs b/WebAPI/DLL/ClsSb_EquipDotCheckBill.cs index a6b7346..87f7edc 100644 --- a/WebAPI/DLL/ClsSb_EquipDotCheckBill.cs +++ b/WebAPI/DLL/ClsSb_EquipDotCheckBill.cs @@ -115,11 +115,12 @@ ",HYear,HPeriod,HRemark,HEquipID" + ",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo" + ",HDeptID,HQty,HEquipDotCheckRuleInterID" + + ",HLastResult,HErrNote,HBigSafeNote,HShiftsID,HDotCheckNote" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() + ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" + - ",'" + omodel.HDeptID + "'," + omodel.HQty + "," + omodel.HEquipDotCheckRuleInterID + + ",'" + omodel.HDeptID + "'," + omodel.HQty + "," + omodel.HEquipDotCheckRuleInterID + ",'" + omodel.HLastResult + "','" + omodel.HErrNote + "','" + omodel.HBigSafeNote + "'," + omodel.HShiftsID + ",'" + omodel.HDotCheckNote + "'" + ") "); //鎻掑叆瀛愯〃 foreach (Models.ClsSb_EquipDotCheckBillSub oSub in DetailColl) @@ -130,12 +131,13 @@ "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," + "HDotCheckItem,HDotCheckPart,HClaim," + "HManagerID,HManagerNumber,HDotCheckResult,HDotCheckItemID " + + ",HDotCheckItemClassID,HDotCheckItemMethodID" + ") values(" + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + ",'" + oSub.HDotCheckItem + "','" + oSub.HDotCheckPart + "','" + oSub.HClaim + - "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "','" + oSub.HDotCheckResult + "'," + oSub.HDotCheckItemID + + "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "','" + oSub.HDotCheckResult + "'," + oSub.HDotCheckItemID + "," + oSub.HDotCheckItemClassID + "," + oSub.HDotCheckItemMethodID + ") "); } //鏇存柊鐐规璁″垝瀛愯〃鍏宠仈鏍囪 diff --git a/WebAPI/Models/ClsSb_EquipDotCheckBillMain.cs b/WebAPI/Models/ClsSb_EquipDotCheckBillMain.cs index b9ca54a..d02bcc2 100644 --- a/WebAPI/Models/ClsSb_EquipDotCheckBillMain.cs +++ b/WebAPI/Models/ClsSb_EquipDotCheckBillMain.cs @@ -17,5 +17,11 @@ public long HDeptID;// int --部门ID public decimal HQty; //数量 public Int64 HEquipDotCheckRuleInterID; //点检规程 + + public string HLastResult;// 最终结论(OK,NG) + public string HErrNote;// 异常情况记录 + public string HBigSafeNote;// 重大安全隐患记录 + public Int64 HShiftsID;// 生产班次(Gy_Shifts) + public string HDotCheckNote;// 点检数据 } } diff --git a/WebAPI/Models/ClsSb_EquipDotCheckBillSub.cs b/WebAPI/Models/ClsSb_EquipDotCheckBillSub.cs index 59fba3c..9d0a780 100644 --- a/WebAPI/Models/ClsSb_EquipDotCheckBillSub.cs +++ b/WebAPI/Models/ClsSb_EquipDotCheckBillSub.cs @@ -27,5 +27,8 @@ public string HManagerNumber; public string HManagerName; public string HDotCheckResult; + + public Int64 HDotCheckItemClassID;// 点检项目分类(gy_DotCheckItemClass) + public Int64 HDotCheckItemMethodID;// 点检方法(gy_DotCheckItemMethod) } } -- Gitblit v1.9.1