写入生产汇报单时新增任务单主内码,子内吗,单号字段
| | |
| | | { |
| | | ds = oCN.RunProcReturn(string.Format(@"SELECT HMaterID,ç©æä»£ç HMaterCode,ç©æåç§° HMaterName,è§æ ¼åå· HMaterSpec, |
| | | HUnitID, 计éåä½ä»£ç HUnitCode, 计éåä½ HUnitName,HSourceID,çäº§èµæºä»£ç HSourceCode,çäº§èµæº HSourceName, |
| | | HWorkerid,æä½å代ç HWorkerCode,æä½å HWorkerName,ç产æ°é HQty,表ä½å¤æ³¨ HRemark |
| | | HWorkerid,æä½å代ç HWorkerCode,æä½å HWorkerName,ç产æ°é HQty,表ä½å¤æ³¨ HRemark,HICMOInterID,HICMOEntryID,HICMOBillNo |
| | | FROM h_v_IF_ICMOReportBillList_Edit"), "h_v_IF_ICMOReportBillList_Edit"); |
| | | |
| | | objJsonResult.code = "0"; |
| | |
| | | //string sql1 = "select HRepairCheckID,HRepairCheckContent,HManagerID,HRemark from Sc_MouldRepairCheckBillSub where 1 = 1 "; |
| | | string sql1 = string.Format(@"SELECT HMaterID,ç©æä»£ç HMaterCode,ç©æåç§° HMaterName,è§æ ¼åå· HMaterSpec, |
| | | HUnitID, 计éåä½ä»£ç HUnitCode, 计éåä½ HUnitName,HSourceID,çäº§èµæºä»£ç HSourceCode,çäº§èµæº HSourceName, |
| | | HWorkerid,æä½å代ç HWorkerCode,æä½å HWorkerName,ç产æ°é HQty,表ä½å¤æ³¨ HRemark |
| | | HWorkerid,æä½å代ç HWorkerCode,æä½å HWorkerName,ç产æ°é HQty,表ä½å¤æ³¨ HRemark,HICMOInterID,HICMOEntryID,HICMOBillNo |
| | | FROM h_v_IF_ICMOReportBillList_Edit where 1 = 1 "); |
| | | string sql = sql1 + sqlWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOReportBillList_Edit"); |
| | |
| | | oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItemSub.HCloseType = false; //å
³éç±»å |
| | | //oItemSub.HRemark = ""; //夿³¨ |
| | | oItemSub.HSourceInterID = 0; // æºå主å
ç |
| | | oItemSub.HSourceEntryID = 0; //æºååå
ç |
| | | //oItemSub.HSourceInterID = 0; // æºå主å
ç |
| | | //oItemSub.HSourceEntryID = 0; //æºååå
ç |
| | | //oItemSub.HSourceBillNo = ""; //æºååå· |
| | | //oItemSub.HSourceBillType = ""; //æºåç±»å |
| | | //oItemSub.HRelationQty = 0; //å
³èæ°é |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" + |
| | | ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain a inner join Sc_WorkBillSortBillSub b on a.HInterID = b.HInterID where HMainSourceInterID={HMainSourceInterID}" + |
| | | $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //忥æ¥è®¡åå·¥å |
| | | oCN.RunProc("exec REALESE_SC_ICMOBILLSTATUS_TMP"); |
| | | |
| | |
| | | "HCloseMan,HCloseType,HRemark," + |
| | | "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | ",HICMOInterID,HICMOBillNo,HBarCode" + |
| | | ",HICMOInterID,HICMOBillNo,HBarCode,HICMOEntryID" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber +"'"+ |
| | | "," + oSub.HQty.ToString() + "," + oSub.HUnitID.ToString() + ",'" + oSub.HUnitNumber + "'," + oSub.HTimes.ToString() + "," + oSub.HSourceID.ToString() + |
| | |
| | | ",'" + 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.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + |
| | | "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "','" + oSub.HBarCode + "'" + |
| | | "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "','" + oSub.HBarCode + "'," + oSub.HICMOEntryID + |
| | | ") "); |
| | | } |
| | | if (omodel.HCheckType == "åæ ¼") |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCn.RollBack(); |
| | | sReturn = e.Message; |
| | | throw (e); |
| | | } |
| | |
| | | { |
| | | oCn.BeginTran(); |
| | | //æ¥è¯¢çäº§æ±æ¥å表æ°é |
| | | DataSet ds = oCn.RunProcReturn("select a.HBillNo,b.HSourceInterID,b.HSourceEntryID from Sc_ICMOReportBillMain a inner join Sc_ICMOReportBillSub b on a.HInterID = b.HInterID where a.HInterID = '" + lngBillKey + "'", "Sc_ICMOReportBillMain"); |
| | | DataSet ds = oCn.RunProcReturn("select a.HBillNo,b.HICMOInterID,b.HICMOEntryID from Sc_ICMOReportBillMain a inner join Sc_ICMOReportBillSub b on a.HInterID = b.HInterID where a.HInterID = '" + lngBillKey + "'", "Sc_ICMOReportBillMain"); |
| | | string HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString(); |
| | | string HSourceInterID = ds.Tables[0].Rows[0]["HSourceInterID"].ToString(); |
| | | string HSourceEntryID = ds.Tables[0].Rows[0]["HSourceEntryID"].ToString(); |
| | | string HICMOInterID = ds.Tables[0].Rows[0]["HICMOInterID"].ToString(); |
| | | string HICMOEntryID = ds.Tables[0].Rows[0]["HICMOEntryID"].ToString(); |
| | | // |
| | | //æ´æ°äº§éæ±æ¥ä¸´æ¶è¡¨æ¯å¦æ¥æ£ç³è¯·ç¶æ |
| | | string sql1 = string.Format(@"update Sc_ICMOBillWorkQtyStatus_Tmp set HRelationInterID='0' where HICMOReportBillNo='"+ HBillNo + "' and HICMOInterID='"+ HSourceInterID + "' and HICMOEntryID='"+ HSourceEntryID + "'"); |
| | | string sql1 = string.Format(@"update Sc_ICMOBillWorkQtyStatus_Tmp set HRelationInterID='0',HRelationEntryID='0',HICMOReportBillNo=null where HICMOReportBillNo='" + HBillNo + "' and HICMOInterID='"+ HICMOInterID + "' and HICMOEntryID='"+ HICMOEntryID + "'"); |
| | | oCn.RunProc(sql1); |
| | | |
| | | //æ´æ°è´¨éæ±æ¥ä¸´æ¶è¡¨æ¯å¦æ¥æ£ç³è¯·ç¶æ |
| | | string sql2 = string.Format(@"update Sc_ICMOBillQualityStatus_Tmp set HRelationInterID='0',HRelationBillNo='' where HRelationBillNo='" + HBillNo + "' and HRelationInterID='" + lngBillKey + "'"); |
| | | oCn.RunProc(sql2); |
| | | |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å 餿ç»è¡¨ |