| | |
| | | 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_FirstPieceCheckBillMainList where 1=1 " + sWhere + " order by 日期 "; |
| | | |
| | | ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBillMainList"); |
| | |
| | | long HProcExchEntryID = list[0].HProcExchEntryID;//流转卡子ID |
| | | long HMainSourceInterID = list[0].HMainSourceInterID;//源单ID |
| | | long HMainSourceEntryID = list[0].HMainSourceEntryID;//源单子ID |
| | | string HMainSourceBillNo = list[0].HMainSourceBillNo;//流转卡子ID |
| | | string HMainSourceBillNo = list[0].HMainSourceBillNo;//源单单号 |
| | | string HMainSourceBillType = list[0].HMainSourceBillType;//源单类型 |
| | | |
| | | //表体数据 |
| | | List<Model.ClsQC_FirstPieceCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(msg_entry); |
| | |
| | | oCN.RunProc("Insert Into QC_FirstPieceCheckBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HMaterID,HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchBillNo" + |
| | | ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo)" + |
| | | ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,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 + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "'" + ") "); |
| | | "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'" + ") "); |
| | | |
| | | //插入子表 |
| | | foreach (Model.ClsQC_FirstPieceCheckBillSub oSub in BillNew.DetailColl) |
| | |
| | | ",HQCCheckItemID,HQCStd,HResult" + |
| | | ",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.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HResult + "'" + |
| | | ",'" + oSub.HStatus + |
| | | "'," + oSub.HUnitID + "," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'" + |