1
zrg
2025-11-05 080398b3ec314095e2fd5cccd3590e42815cc6c8
WebAPI/Controllers/Æ·ÖʹÜÀí/¹¤Ðò¼ìÑéµ¥/QC_ProcessCheckBillController.cs
@@ -860,6 +860,7 @@
                BillNew.omodel.HBillNo = mainList[0].HBillNo;//递入type得到的单据号
                BillNew.omodel.HDate = HDate;
                BillNew.omodel.HRemark = mainList[0].HRemark;//备注
                BillNew.omodel.HRemarkSN = mainList[0].HRemarkSN;//SN备注
                BillNew.omodel.HMaker = mainList[0].HMaker;
                BillNew.omodel.HSourceID = ClsPub.isLong(mainList[0].HSourceID);
                BillNew.omodel.HICMOInterID = ClsPub.isLong(mainList[0].HICMOInterID);
@@ -929,6 +930,11 @@
                        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);
                    }
@@ -1366,7 +1372,7 @@
            }
        }
        
        #region é¦–件检验单根据源单类型获取信息-源单为工序出站单
        #region æœ«ä»¶æ£€éªŒå•根据源单类型获取信息-源单为工序出站单
        [Route("QC_ProcessCheckBill/get_StationOutBill")]
        [HttpGet]
        public object get_StationOutBill(string HInterID, string user)
@@ -1508,5 +1514,58 @@
            }
        }
        #endregion
        #region å·¥åºæ£€éªŒå•根据源单类型获取信息-源单为生产订单
        [Route("QC_ProcessCheckBill/get_ICMOBill")]
        [HttpGet]
        public object get_ICMOBill(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_FirstPieceCheckBill_QCSchemeSource)
                    {
                        case "物料":
                            sql = "exec h_p_QC_ProcessCheck_GetICMOBillList " + "'物料','" + HICMOInterID + "','" + HICMOEntryID + "'";
                            break;
                        case "工艺路线":
                            sql = "exec h_p_QC_ProcessCheckB_GetICMOBillList " + "'工艺路线','" + HICMOInterID + "','" + HICMOEntryID + "'";
                            break;
                    }
                }
                ds = oCN.RunProcReturn(sql, "h_p_QC_ProcessCheckB_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
    }
}