zrg
2024-03-07 355dec078e44db52fc6c6371debbe44898e6f1f1
WebAPI/Controllers/Æ·ÖʹÜÀí/¹¤Ðò¼ìÑéµ¥/MES_ProcessCheckBill_PDAController.cs
@@ -68,6 +68,10 @@
                bool HLastResult = list[0].HLastResult;//试样结论
                Int64 HProcExchInterID = list[0].HProcExchInterID;//指引卡ID
                Int64 HProcExchEntryID = list[0].HProcExchEntryID;//指引卡子ID
                long HMainSourceInterID = list[0].HMainSourceInterID;//源单ID
                long HMainSourceEntryID = list[0].HMainSourceEntryID;//源单子ID
                string HMainSourceBillNo = list[0].HMainSourceBillNo;//源单单号
                string HMainSourceBillType = list[0].HMainSourceBillType;//源单类型
                //表体数据
                List<Model.ClsQC_ProcessCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_ProcessCheckBillSub>>(msg_entry);
@@ -154,10 +158,11 @@
                    oCN.RunProc("Insert Into QC_ProcessCheckBillMain " +
                    "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
                    ",HYear,HPeriod,HMaterID,HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchBillNo" +
                    ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HProcID)" +
                    ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HProcID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType)" +
                    " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" +
                    "," + HYear + "," + HPeriod + ",'" + HMaterID + "','" + HSourceID + "'," + HICMOInterID + "," + HICMOEntryID + ",'" + HICMOBillNo + "','" + HProcExchBillNo + "'" +
                    "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HProcID + ") ");
                    "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HProcID + "," + HMainSourceInterID +
                    "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'" + ") ");
                    //插入子表
                    foreach (Model.ClsQC_ProcessCheckBillSub oSub in BillNew.DetailColl)
@@ -169,8 +174,8 @@
                          ",HQCCheckClassID,HQCCheckItemID,HQCStd,HQCRelValue,HResult" +
                          ",HProcCheckEmp,HProcCheckTime,HStatus,HUnitID,HKeyInspect,HAnalysisMethod,HInspectInstruMentID,HInspectResult" +
                          ") values("
                          + HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() +  ",'" + oSub.HRemark + "'," + HICMOInterID.ToString() +
                          "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                          + HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() +  ",'" + oSub.HRemark + "'," + HMainSourceInterID.ToString() +
                          "," + HMainSourceEntryID.ToString() + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                          "," + oSub.HQCCheckClassID.ToString() + "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCRelValue + "','" + oSub.HResult + "'" +
                          "," + oSub.HProcCheckEmp.ToString() + ",GETDATE()"  + ",'"  + oSub.HStatus +
                          "'," + oSub.HUnitID + "," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'"  +
@@ -225,6 +230,13 @@
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn("select ManagerFlag from gy_czygl where czymc='" + user.Trim() + "'", "gy_czygl");
                if (!(bool)ds.Tables[0].Rows[0]["ManagerFlag"])  //是否管理员
                {
                    //不是管理员
                    sWhere += " and åˆ¶å•人 = '" + user + "'";
                }
                string sql = "select * from  h_v_QC_ProcessCheckBillMainList where 1=1  " + sWhere + " order by æ—¥æœŸ ";
                ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessCheckBillMainList");