wtt
2025-11-07 f95cc9aa0dae0ab3b7ec8b213c8be18ca47bfac2
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
7个文件已修改
116 ■■■■ 已修改文件
DAL/质检管理/ClsQC_FirstPieceCheckBill.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/质检管理/ClsQC_FirstPieceCheckBillMain.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/质检管理/ClsQC_FirstPieceCheckBillSub.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/质检管理/ClsQC_PatrolProcCheckBillMain.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/质检管理/ClsQC_PatrolProcCheckBillSub.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/品质管理/首件检验单/QC_FirstPieceCheckBillController.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsQC_PatrolProcCheckBill.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/Öʼì¹ÜÀí/ClsQC_FirstPieceCheckBill.cs
@@ -97,6 +97,7 @@
                ",HShiftsID=" + omodel.HShiftsID.ToString() +
                ",HErrTreatment='" + omodel.HErrTreatment + "'" +
                ",HBatchNo='" + omodel.HBatchNo + "'" +
                ",HRemarkSN='" + omodel.HRemarkSN + "'" +
                " where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
@@ -112,13 +113,13 @@
                      ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                      ",HQCCheckItemID,HQCStd,HUnit,HQCNote,HResult" +
                      ",HMax,HMin,HAvg,HInspectVal,HUpLimit,HDownLimit,HInspectInstruMentID" +
                      ",HQualityStdID, HInspectMethodID, HInspectBasisID, HCompareSymbol" +
                      ") values("
                      + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" +
                      ",getdate()," + 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.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HUnit + "','" + oSub.HQCNote + "','" + oSub.HResult +"'"+
                      ",'" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HAvg + "','"+ oSub.HInspectVal + "','" + oSub.HUpLimit + "','" + oSub.HDownLimit + "','" + oSub.HInspectInstruMentID + "'" +
                      ") ");
                      ",'" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HAvg + "','"+ oSub.HInspectVal + "','" + oSub.HUpLimit + "','" + oSub.HDownLimit + "','" + oSub.HInspectInstruMentID + "'," + oSub.HQualityStdID + "," + oSub.HInspectMethodID + "," + oSub.HInspectBasisID + ",'" + oSub.HCompareSymbol + "') ");
                }
                //foreach (Model.ClsQC_FirstPieceCheckBillSub_Item oSub2 in DetailColl1)
                //{
@@ -210,14 +211,14 @@
                ",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" +
                ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HLastResult" +
                ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID,HShiftsID,HErrTreatment,HBatchNo" +
                ",HTakeSampleCheckBillID,HTakeSampleCheckBillNo,HProcID" +
                ",HTakeSampleCheckBillID,HTakeSampleCheckBillNo,HProcID,HRemarkSN" +
                ") " +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
                "," + omodel.HSourceID.ToString() + "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HICMOQty.ToString() + "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() +
                ",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() + ", " + DBUtility.ClsPub.BoolToString(omodel.HLastResult) +
                "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType  + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID + "," + omodel.HShiftsID + ",'" + omodel.HErrTreatment + "','" + omodel.HBatchNo + "'" +
                ","+ omodel.HTakeSampleCheckBillID + ",'"+ omodel.HTakeSampleCheckBillNo + "','" + omodel.HProcID + "'" +
                ","+ omodel.HTakeSampleCheckBillID + ",'"+ omodel.HTakeSampleCheckBillNo + "','" + omodel.HProcID + "','" + omodel.HRemarkSN + "'" +
                ") ");
                //插入子表
                foreach (Model.ClsQC_FirstPieceCheckBillSub oSub in DetailColl)
@@ -230,6 +231,7 @@
                      ",HMax,HMin,HAvg,HSampleSchemeID,HSampleQty,HSampleDamageQty,HAcceptQty" +
                      ",HRejectQty,HSampleUnRightQty,HStatus,HUnitID,HInspectVal,HTargetVal" +
                      ",HUpLimit,HDownLimit,HUpOffSet,HDownOffSet,HKeyInspect,HAnalysisMethod,HInspectInstruMentID,HInspectResult" +
                      ",HQualityStdID, HInspectMethodID, HInspectBasisID, HCompareSymbol" +
                      ") values("
                      + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" +
                      ",getdate()," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'," + oSub.HSourceInterID.ToString() +
@@ -238,8 +240,9 @@
                      ",'" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HAvg + "'" + "," + oSub.HSampleSchemeID + "," + oSub.HSampleQty + 
                      "," + oSub.HSampleDamageQty + "," + oSub.HAcceptQty + "," + oSub.HRejectQty + "," + oSub.HSampleUnRightQty + ",'" + oSub.HStatus +
                      "'," + oSub.HUnitID + ",'" + oSub.HInspectVal + "','" + oSub.HTargetVal + "','" + oSub.HUpLimit + "','" + oSub.HDownLimit +
                      "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "'," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'" + ") ");
    }
                      "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "'," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'," + oSub.HQualityStdID + "," + oSub.HInspectMethodID + "," + oSub.HInspectBasisID + ",'" + oSub.HCompareSymbol +  "') ");
                }
                //foreach (Model.ClsQC_FirstPieceCheckBillSub_Item oSub2 in DetailColl1)
                //{
                //    oCn.RunProc("Insert into QC_FirstPieceCheckBillSub_Item " +
Model/Öʼì¹ÜÀí/ClsQC_FirstPieceCheckBillMain.cs
@@ -30,5 +30,6 @@
        public string HBatchNo;
        public string HTakeSampleCheckBillNo;
        public string HRemarkSN;
    }
}
Model/Öʼì¹ÜÀí/ClsQC_FirstPieceCheckBillSub.cs
@@ -35,6 +35,11 @@
        public Int64 HKeyInspect;
        public Int64 HInspectInstruMentID;
        public String HInspectResult;
        public Int64 HQualityStdID;//
        public Int64 HInspectMethodID;//
        public Int64 HInspectBasisID;//
        public String HCompareSymbol;//
        //public HSamplingType;
        //public HInspectionLevel;
        //public HStrictness;
Model/Öʼì¹ÜÀí/ClsQC_PatrolProcCheckBillMain.cs
@@ -10,6 +10,7 @@
        //
        public Int64 HSourceID;
        public Int64 HICMOInterID;
        public Int64 HICMOEntryID;
        public String HICMOBillNo;
        public Int64 HICMOQty;
        public Int64 HProcExchInterID;
@@ -23,5 +24,6 @@
        public Int64 HShiftsID;
        public string HErrTreatment;
        public Int64 HQCSchemeID;
    }
}
Model/Öʼì¹ÜÀí/ClsQC_PatrolProcCheckBillSub.cs
@@ -20,5 +20,16 @@
        public String HQCNote8;
        public String HQCNote9;
        public String HQCNote10;
        public String HQCNote1_SN;
        public String HQCNote2_SN;
        public String HQCNote3_SN;
        public String HQCNote4_SN;
        public String HQCNote5_SN;
        public String HQCNote6_SN;
        public String HQCNote7_SN;
        public String HQCNote8_SN;
        public String HQCNote9_SN;
        public String HQCNote10_SN;
    }
}
WebAPI/Controllers/Æ·ÖʹÜÀí/Ê×¼þ¼ìÑéµ¥/QC_FirstPieceCheckBillController.cs
@@ -202,7 +202,7 @@
                List<object> columnNameList = new List<object>();
                string sql1 = "select * from h_v_QC_FirstPieceCheckBill_Edit where 1 = 1  ";
                string sql = sql1 + sWhere + " order by hmainid desc";
                string sql = sql1 + sWhere + " order by hmainid desc,hsubid asc";
                ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBill_Edit");
                //添加列名
@@ -326,6 +326,7 @@
                BillNew.omodel.HBatchNo = ClsPub.isStrNull(mainList[0].HBatchNo);
                BillNew.omodel.HTakeSampleCheckBillID = ClsPub.isLong(mainList[0].HTakeSampleCheckBillID);
                BillNew.omodel.HTakeSampleCheckBillNo = ClsPub.isStrNull(mainList[0].HTakeSampleCheckBillNo);
                BillNew.omodel.HRemarkSN = mainList[0].HRemarkSN;
                List<Model.ClsQC_FirstPieceCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(msg3);
                BillNew.DetailColl = new List<Model.ClsQC_FirstPieceCheckBillSub>();
                for (int i = 0; i < subList.ToArray().Length; i++)
@@ -372,6 +373,13 @@
                        oSub.HKeyInspect = DBUtility.ClsPub.isLong(subList[i].HKeyInspect);
                        oSub.HInspectInstruMentID = DBUtility.ClsPub.isLong(subList[i].HInspectInstruMentID);
                        oSub.HInspectResult = DBUtility.ClsPub.isStrNull(subList[i].HResult);
                        oSub.HQualityStdID = DBUtility.ClsPub.isLong(subList[i].HQualityStdID);//
                        oSub.HInspectMethodID = DBUtility.ClsPub.isLong(subList[i].HInspectMethodID);//
                        oSub.HInspectBasisID = DBUtility.ClsPub.isLong(subList[i].HInspectBasisID);//
                        oSub.HCompareSymbol = DBUtility.ClsPub.isStrNull(subList[i].HCompareSymbol);//
                        BillNew.DetailColl.Add(oSub);
                    }
                    else
@@ -1654,5 +1662,58 @@
        }
        #endregion
        #region å·¡æ£€æ£€éªŒå•根据源单类型获取信息-源单为生产订单
        [Route("QC_PatrolProcCheckBill/get_ICMOBill")]
        [HttpGet]
        public object get_ICMOBill_PatrolProcCheck(string HICMOInterID, string HICMOEntryID, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sReturn = "";
                string sql = "";
                if (oSystemParameter.ShowBill(ref sReturn))
                {
                    switch (oSystemParameter.omodel.QC_PatrolProcCheckBill_QCSchemeSource)
                    {
                        case "物料":
                            sql = "exec h_p_QC_PatrolProcCheck_GetICMOBillList " + "'物料','" + HICMOInterID + "','" + HICMOEntryID + "'";
                            break;
                        case "工艺路线":
                            sql = "exec h_p_QC_PatrolProcCheck_GetICMOBillList " + "'工艺路线','" + HICMOInterID + "','" + HICMOEntryID + "'";
                            break;
                    }
                }
                ds = oCN.RunProcReturn(sql, "h_p_QC_PatrolProcCheck_GetICMOBillList");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/DLL/ClsQC_PatrolProcCheckBill.cs
@@ -96,6 +96,7 @@
                ",HMainProcID=" + omodel.HMainProcID.ToString() +
                ",HShiftsID=" + omodel.HShiftsID.ToString() +
                ",HErrTreatment='" + omodel.HErrTreatment + "'" +
                ",HQCSchemeID='" + omodel.HQCSchemeID + "'" +
                " where HInterID=" + lngBillKey.ToString();
                //更新主表
                oCn.RunProc(sqlerro);
@@ -116,13 +117,15 @@
                      ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                      ",HQCCheckItemID,HQCStd,HQCNote1,HQCNote2,HQCNote3,HQCNote4" +
                      ",HQCNote5,HQCNote6,HQCNote7,HQCNote8,HQCNote9,HQCNote10" +
                      ",HQCNote1_SN,HQCNote2_SN,HQCNote3_SN,HQCNote4_SN,HQCNote5_SN" +
                      ",HQCNote6_SN,HQCNote7_SN,HQCNote8_SN,HQCNote9_SN,HQCNote10_SN" +
                      ") values("
                      + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" +
                      ",getdate()," + 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.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCNote1 + "','" + oSub.HQCNote2 + "','" + oSub.HQCNote3 + "','" + oSub.HQCNote4 + "'" +
                      ",'" + oSub.HQCNote5 + "','" + oSub.HQCNote6 + "','" + oSub.HQCNote7 + "','" + oSub.HQCNote8 + "','" + oSub.HQCNote9 + "','" + oSub.HQCNote10 + "'" +
                      ") ");
                      ",'" + oSub.HQCNote5 + "','" + oSub.HQCNote6 + "','" + oSub.HQCNote7 + "','" + oSub.HQCNote8 + "','" + oSub.HQCNote9 + "','" + oSub.HQCNote10 + "','" + oSub.HQCNote1_SN + "','" + oSub.HQCNote2_SN + "','" + oSub.HQCNote3_SN + "','" + oSub.HQCNote4_SN + "','" + oSub.HQCNote5_SN + "','" + oSub.HQCNote6_SN + "','" + oSub.HQCNote7_SN + "','" + oSub.HQCNote8_SN + "','" + oSub.HQCNote9_SN + "','" + oSub.HQCNote10_SN + "'" +
                      ") ");
                }
                //插入子表2
@@ -224,13 +227,13 @@
                oCn.RunProc("Insert Into QC_PatrolProcCheckBillMain " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
                ",HYear,HPeriod,HRemark" +
                ",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" +
                ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HMainProcID,HLastResult,HShiftsID,HErrTreatment" +
                ",HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" +
                ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HMainProcID,HLastResult,HShiftsID,HErrTreatment,HQCSchemeID" +
                ") " +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
                "," + omodel.HSourceID.ToString() + "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HICMOQty.ToString() + "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() +
                ",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() + "," + omodel.HMainProcID +" ,"+ omodel.HLastResult + "," + omodel.HShiftsID + ",'" + omodel.HErrTreatment + "'" +
                "," + omodel.HSourceID.ToString() + "," + omodel.HICMOInterID.ToString() + "," + omodel.HICMOEntryID + ",'" + omodel.HICMOBillNo + "'," + omodel.HICMOQty.ToString() + "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() +
                ",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() + "," + omodel.HMainProcID +" ,"+ omodel.HLastResult + "," + omodel.HShiftsID + ",'" + omodel.HErrTreatment + "'," + omodel.HQCSchemeID +
                ") ");
                //插入子表
                foreach (Model.ClsQC_PatrolProcCheckBillSub oSub in DetailColl)
@@ -241,12 +244,14 @@
                      ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                      ",HQCCheckItemID,HQCStd,HQCNote1,HQCNote2,HQCNote3,HQCNote4" +
                      ",HQCNote5,HQCNote6,HQCNote7,HQCNote8,HQCNote9,HQCNote10" +
                      ",HQCNote1_SN,HQCNote2_SN,HQCNote3_SN,HQCNote4_SN,HQCNote5_SN" +
                      ",HQCNote6_SN,HQCNote7_SN,HQCNote8_SN,HQCNote9_SN,HQCNote10_SN" +
                      ") values("
                      + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" +
                      ",getdate()," + 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.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCNote1 + "','" + oSub.HQCNote2 + "','" + oSub.HQCNote3 + "','" + oSub.HQCNote4 + "'" +
                      ",'" + oSub.HQCNote5 + "','" + oSub.HQCNote6 + "','" + oSub.HQCNote7 + "','" + oSub.HQCNote8 + "','" + oSub.HQCNote9 + "','" + oSub.HQCNote10 + "'" +
                      ",'" + oSub.HQCNote5 + "','" + oSub.HQCNote6 + "','" + oSub.HQCNote7 + "','" + oSub.HQCNote8 + "','" + oSub.HQCNote9 + "','" + oSub.HQCNote10 + "','" + oSub.HQCNote1_SN + "','" + oSub.HQCNote2_SN + "','" + oSub.HQCNote3_SN + "','" + oSub.HQCNote4_SN + "','" + oSub.HQCNote5_SN + "','" + oSub.HQCNote6_SN + "','" + oSub.HQCNote7_SN + "','" + oSub.HQCNote8_SN + "','" + oSub.HQCNote9_SN + "','" + oSub.HQCNote10_SN + "'" +
                      ") ");
                }
                //插入子表2