| | |
| | | <Compile Include="MES\ClsSc_MESMaterToSourceBill .cs" /> |
| | | <Compile Include="人äºç®¡ç\ClsHR_EmpFosterBill.cs" /> |
| | | <Compile Include="人äºç®¡ç\ClsHR_EmpUpChangeBill.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsSc_ProductionReturnBill.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_StepFoldInBill.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_StepFoldOutBill.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_SellOutBillForLayUI.cs" /> |
| | |
| | | <Compile Include="ç³»ç»å
¬ç¨\ClsXt_SystemParameter_Ctl.cs" /> |
| | | <Compile Include="ç³»ç»å
¬ç¨\ClsXt_BillSubType_Ctl.cs" /> |
| | | <Compile Include="计å管ç\ClsGy_MaterialTechParamBillMain.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_NoPassProdConclusionBill.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_NoPassProdDisposeCheckBill.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_NoPassProdDisposeBill.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_NoPassProdRequestBill.cs" /> |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Data; |
| | | |
| | | namespace DAL |
| | | { |
| | | public class ClsSc_ProductionReturnBill : DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Model.ClsSc_ProductionReturnBillMain omodel = new Model.ClsSc_ProductionReturnBillMain(); |
| | | public List<Model.ClsKf_ProductInBillSub> DetailColl = new List<Model.ClsKf_ProductInBillSub>(); |
| | | |
| | | public ClsSc_ProductionReturnBill() |
| | | { |
| | | base.MvarItemKeyForWeb = "h_v_Kf_ProductInBillMain_ForWeb"; |
| | | base.MvarItemKeySubForWeb = "h_v_Kf_ProductInBillSub_ForWeb"; |
| | | base.MvarItemKeySub = "Kf_ICStockBillSub"; |
| | | base.MvarItemKeySub2 = ""; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey = "Kf_ICStockBillMain"; |
| | | base.MvarReportTitle = "产åéåºå"; |
| | | base.BillType = "1245"; |
| | | base.HBillSubType = "1245"; |
| | | |
| | | } |
| | | |
| | | #region åºå®ä»£ç |
| | | |
| | | ~ClsSc_ProductionReturnBill() |
| | | { |
| | | DetailColl = null; |
| | | } |
| | | |
| | | #endregion èªå®ä¹æ¹æ³ |
| | | //ä¿®æ¹åæ® |
| | | public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | // |
| | | oCn.BeginTran(); |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc("UpDate Kf_ICStockBillMain set " + |
| | | " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | | ",HDate='" + omodel.HDate + "'" + |
| | | ",HYear='" + omodel.HYear.ToString() + "'" + |
| | | ",HPeriod='" + omodel.HPeriod.ToString() + "'" + |
| | | ",HRemark='" + omodel.HRemark + "'" + |
| | | ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | //======================================== |
| | | ",HSupID=" + omodel.HSupID.ToString() + |
| | | ",HWHID=" + omodel.HWHID.ToString() + |
| | | ",HSCWHID=" + omodel.HSCWHID.ToString() + |
| | | ",HEmpID=" + omodel.HEmpID.ToString() + |
| | | ",HManagerID=" + omodel.HManagerID.ToString() + |
| | | ",HSecManagerID=" + omodel.HSecManagerID.ToString() + |
| | | ",HKeeperID=" + omodel.HKeeperID.ToString() + |
| | | ",HDeptID=" + omodel.HDeptID.ToString() + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HRedBlueFlag=" + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | | DeleteBillSub(lngBillKey); |
| | | //æå
¥å表 |
| | | omodel.HInterID = lngBillKey; |
| | | foreach (Model.ClsKf_ProductInBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Kf_ICStockBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + |
| | | ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + |
| | | ",HEngineNum,HUnderPanNum,HLeaveFactCard" + |
| | | ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" + |
| | | ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + |
| | | ",'" + oSub.HEngineNum + "','" + oSub.HUnderPanNum + "','" + oSub.HLeaveFactCard + "'" + |
| | | "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" + |
| | | "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + |
| | | ") "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsKf_ProductInBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Kf_ProductInBill_Qty " + oSub.HICMOInterID, ""); |
| | | // if (Ds.Tables[0].Rows.Count == 0) |
| | | // return; |
| | | // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y") |
| | | // { |
| | | // sReturn = "æ±æ¥æ°éè¶
è¿è®¡åæ°éï¼ä¸å
许ä¿å"; |
| | | // return false; |
| | | // } |
| | | //} |
| | | sReturn = "ä¿®æ¹åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | //æ°å¢åæ® |
| | | public override bool AddBill(ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | //主表 |
| | | oCn.RunProc("Insert Into Kf_ICStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsKf_ProductInBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Kf_ICStockBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + |
| | | ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + |
| | | ",HEngineNum,HUnderPanNum,HLeaveFactCard" + |
| | | ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" + |
| | | ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + |
| | | ",'" + oSub.HEngineNum + "','" + oSub.HUnderPanNum + "','" + oSub.HLeaveFactCard + "'" + |
| | | "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" + |
| | | "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + |
| | | ") "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsKf_ProductInBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Kf_ProductInBill_Qty " + oSub.HICMOInterID, ""); |
| | | // if (Ds.Tables[0].Rows.Count == 0) |
| | | // return; |
| | | // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y") |
| | | // { |
| | | // sReturn = "æ±æ¥æ°éè¶
è¿è®¡åæ°éï¼ä¸å
许ä¿å"; |
| | | // return false; |
| | | // } |
| | | //} |
| | | // |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | //æ¾ç¤ºåæ® |
| | | public override bool ShowBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //æ¥è¯¢ä¸»è¡¨ |
| | | DataSet Ds; |
| | | Ds = oCn.RunProcReturn("Select * from Kf_ICStockBillMain Where HInterID=" + lngBillKey.ToString(), "Kf_ICStockBillMain"); |
| | | if (Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "åæ®æªæ¾å°ï¼"; |
| | | return false; |
| | | } |
| | | //åºå®èµå¼=========================================== |
| | | omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]); |
| | | omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]); |
| | | omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]); |
| | | omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]); |
| | | omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]); |
| | | omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]); |
| | | omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim(); |
| | | omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]); |
| | | omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]); |
| | | omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]); |
| | | omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]); |
| | | omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim(); |
| | | omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim(); |
| | | omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim(); |
| | | omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim(); |
| | | omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim(); |
| | | omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim(); |
| | | omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim(); |
| | | omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim(); |
| | | omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim(); |
| | | omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim(); |
| | | omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim(); |
| | | omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]); |
| | | omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim(); |
| | | omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim(); |
| | | //======================================================== |
| | | omodel.HSupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]); |
| | | omodel.HWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWHID"]); |
| | | omodel.HSCWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSCWHID"]); |
| | | omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]); |
| | | omodel.HManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HManagerID"]); |
| | | omodel.HSecManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSecManagerID"]); |
| | | omodel.HKeeperID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HKeeperID"]); |
| | | omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]); |
| | | omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]); |
| | | omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]); |
| | | omodel.HRedBlueFlag = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HRedBlueFlag"]); |
| | | // |
| | | |
| | | //å¾ªç¯ |
| | | DataSet DsSub; |
| | | DsSub = oCn.RunProcReturn("Select * from Kf_ICStockBillSub Where HInterID=" + lngBillKey.ToString(), "Kf_ICStockBillSub"); |
| | | DetailColl.Clear();//æ¸
空 |
| | | for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) |
| | | { |
| | | Model.ClsKf_ProductInBillSub oSub = new Model.ClsKf_ProductInBillSub(); |
| | | // åºå®èµå¼=============================================== |
| | | oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]); |
| | | oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]); |
| | | oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]); |
| | | oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]); |
| | | oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim(); |
| | | oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim(); |
| | | oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]); |
| | | oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]); |
| | | oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]); |
| | | oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]); |
| | | oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]); |
| | | oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim(); |
| | | //=================================================== |
| | | oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]); |
| | | oSub.HPropertyID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPropertyID"]); |
| | | oSub.HSecUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSecUnitID"]); |
| | | oSub.HSecUnitRate = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HSecUnitRate"]); |
| | | oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]); |
| | | oSub.HQtyMust = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQtyMust"]); |
| | | oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]); |
| | | oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]); |
| | | oSub.HMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMoney"]); |
| | | oSub.HWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWHID"]); |
| | | oSub.HSCWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCWHID"]); |
| | | oSub.HSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPID"]); |
| | | oSub.HSCSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCSPID"]); |
| | | oSub.HSPGroupID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPGroupID"]); |
| | | oSub.HBatchNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBatchNo"]); |
| | | oSub.HEngineNum = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HEngineNum"]); |
| | | oSub.HUnderPanNum = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HUnderPanNum"]); |
| | | oSub.HLeaveFactCard = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HLeaveFactCard"]); |
| | | oSub.HPOOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPOOrderInterID"]); |
| | | oSub.HPOOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPOOrderEntryID"]); |
| | | oSub.HPOOrderBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HPOOrderBillNo"]); |
| | | oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderInterID"]); |
| | | oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderEntryID"]); |
| | | oSub.HSeOrderBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSeOrderBillNo"]); |
| | | DetailColl.Add(oSub); |
| | | } |
| | | sReturn = "æ¾ç¤ºåæ®æåï¼"; |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | public bool CheckStockQty(long HMaterID, long HWhID, string sBatchNo) |
| | | { |
| | | try |
| | | { |
| | | //æ¥è¯¢ä¸»è¡¨ |
| | | DataSet Ds; |
| | | Ds = oCn.RunProcReturn("Select 峿¶åºå from h_v_KF_ICInventoryList Where HMaterID=" + HMaterID.ToString() + " and HWHID=" + HWhID.ToString() + " and æ¹æ¬¡='" + sBatchNo + "'", "h_v_KF_ICInventoryList"); |
| | | if (Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | return false; |
| | | } |
| | | //夿æ¯å¦è´åºåæ0åºå |
| | | if (DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0][0]) <= 0) |
| | | { |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | |
| | | //æ¡ç æ«æè®°å½,æ°å¢å°äº§åå
¥åº (æºåï¼ç产任å¡å) |
| | | public bool AddBill_PDA(ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(omodel.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sReturn = s; |
| | | return false; |
| | | } |
| | | omodel.HYear = sYear; |
| | | omodel.HPeriod = sPeriod; |
| | | |
| | | DataSet Ds; |
| | | oCn.BeginTran(); |
| | | //å é¤ä¸»è¡¨ |
| | | oCn.RunProc("Delete From Kf_ICStockBillMain where HInterID=" + omodel.HInterID.ToString()); |
| | | //æå
¥å表 |
| | | oCn.RunProc("EXEC h_p_Kf_ProductInBillSub_Insert " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'"); |
| | | //æå
¥ä¸»è¡¨ |
| | | oCn.RunProc("Insert Into Kf_ICStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "',convert(varchar(10),getdate(),120),'" + omodel.HMainSourceBillType + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ") "); |
| | | //æ´æ°å
³èæ°é |
| | | oCn.RunProc("exec h_p_Sc_UpDateICMORelation_Add " + omodel.HInterID.ToString()); |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + omodel.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + omodel.HInterID.ToString()); |
| | | |
| | | //çæK3åæ® |
| | | //æ°å¢å表ã主表 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProdInBill_Insert " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillerID.ToString()); |
| | | //åå¡«å
³èæ°é |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProdInBill_UpdateBillRelateData " + omodel.HInterID.ToString()); |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProdInBill_Check " + omodel.HInterID.ToString() + "," + omodel.HBillerID.ToString()); |
| | | //æ´æ°åºå |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProdInBill_UpdateStock " + omodel.HInterID.ToString()); |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProdInBill_UpdateOrderStock " + omodel.HInterID.ToString()); |
| | | |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //æ¡ç æ«æè®°å½,æ°å¢å°äº§åå
¥åº (红å) |
| | | public bool AddBill_PDA_Red(ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(omodel.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sReturn = s; |
| | | return false; |
| | | } |
| | | omodel.HYear = sYear; |
| | | omodel.HPeriod = sPeriod; |
| | | |
| | | DataSet Ds; |
| | | oCn.BeginTran(); |
| | | //å é¤ä¸»è¡¨ |
| | | oCn.RunProc("Delete From Kf_ICStockBillMain where HInterID=" + omodel.HInterID.ToString()); |
| | | //æå
¥å表 |
| | | oCn.RunProc("EXEC h_p_Kf_ProductInBillSub_Red_Insert " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'"); |
| | | //æå
¥ä¸»è¡¨ |
| | | oCn.RunProc("Insert Into Kf_ICStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "',convert(varchar(10),getdate(),120),'" + omodel.HMainSourceBillType + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ") "); |
| | | //æ´æ°å
³èæ°é |
| | | oCn.RunProc("exec h_p_Cg_UpDateProductInRelation_Red_Add " + omodel.HInterID.ToString()); |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + omodel.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + omodel.HInterID.ToString()); |
| | | //夿æ¡ç åºåæ¯å¦å¼å¸¸ï¼è´åºåãåºåå¤§äºæ¡ç åå§åï¼ |
| | | Ds = oCn.RunProcReturn("EXEC h_p_KF_ICInventoryBarCodeQtyCtrl " + omodel.HInterID.ToString(), "h_p_KF_ICInventoryBarCodeQtyCtrl"); |
| | | |
| | | if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0][1]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | |
| | | public bool AddBill_StationOut_Bad(string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain,ref string sErrMsg) |
| | | { |
| | | //ä¸ä¼ åå¿
填项夿 |
| | | |
| | | try |
| | | { |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CampanyName == "æå·æºè§" || oSystemParameterMain.WMS_CampanyName == "æå·æ¯è«å°") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | } |
| | | else |
| | | { |
| | | oCn.BeginTran(); |
| | | } |
| | | //çæåºå
¥åºåæ® |
| | | //æå
¥å表 |
| | | DataSet DS2 = oCn.RunProcReturn("EXEC h_p_Kf_ProductInBillSub_Insert_StationOutBad " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + sHSourceType + "'", "h_p_Kf_ProductInBillSub_Insert_StationOutBad"); |
| | | if (DS2 == null || DS2.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "夿åå
¥åè¡¨ç¶æå¤±è´¥ï¼æªç¥é误ï¼"; |
| | | if (oSystemParameterMain.WMS_CampanyName == "æå·æºè§" || oSystemParameterMain.WMS_CampanyName == "æå·æ¯è«å°") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | } |
| | | else |
| | | { |
| | | oCn.RollBack(); |
| | | } |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isStrNull(DS2.Tables[0].Rows[0][0]) != "OK") |
| | | { |
| | | sErrMsg = "åæ®å·ï¼" + omodel.HBillNo + "ï¼åå
¥å表失败ï¼"; |
| | | return false; |
| | | } |
| | | } |
| | | //æå
¥ä¸»è¡¨ |
| | | oCn.RunProc("Insert Into Kf_ICStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1202','1202'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "',convert(varchar(10),getdate(),120),'" + omodel.HMainSourceBillType + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ") "); |
| | | |
| | | //æ°å¢K3å表ã主表 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_Insert_New " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillerID.ToString() + ",'" + sHSourceType + "'"); |
| | | |
| | | //æ´æ°å
³èæ°é |
| | | if (sHSourceType == "3710") //ç产任å¡å |
| | | { |
| | | oCn.RunProc("exec h_p_Sc_UpDateRelation_ICMOToProductIn_Add " + omodel.HInterID.ToString()); |
| | | //åå¡«K3å
³èæ°é |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateBillRelateData_ICMO_New " + omodel.HInterID.ToString()); |
| | | } |
| | | else //æ æºå |
| | | { |
| | | //åå¡«K3å
³èæ°é |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateBillRelateData_New " + omodel.HInterID.ToString()); |
| | | } |
| | | |
| | | //夿åºåæ´æ°æ§å¶ç¶æï¼0ä¸ºå®¡æ ¸æ¹ååºåï¼1为ä¿åæ¹ååºåï¼ |
| | | DataSet DS = oCn.RunProcReturn("exec h_p_IFK3_SaveUpdateStock ", "h_p_IFK3_SaveUpdateStock"); |
| | | if (DS == null || DS.Tables[1].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "夿åºåæ´æ°æ§å¶ç¶æï¼æªç¥é误ï¼"; |
| | | if (oSystemParameterMain.WMS_CampanyName == "æå·æºè§" || oSystemParameterMain.WMS_CampanyName == "æå·æ¯è«å°") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | } |
| | | else |
| | | { |
| | | oCn.RollBack(); |
| | | } |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(DS.Tables[1].Rows[0][0]) == 1) |
| | | { |
| | | //æ´æ°K3åºå |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateStock_New " + omodel.HInterID.ToString()); |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateOrderStock_New " + omodel.HInterID.ToString()); |
| | | //å®¡æ ¸åæ® |
| | | if (oSystemParameterMain.Kf_ProductInBill_AutoCheck == "Y") //ç³»ç»åæ° èªå¨å®¡æ ¸ |
| | | { |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + omodel.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + omodel.HInterID.ToString()); |
| | | |
| | | //å®¡æ ¸K3åæ® |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_Check_New " + omodel.HInterID.ToString() + "," + omodel.HBillerID.ToString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //å®¡æ ¸åæ® |
| | | if (oSystemParameterMain.Kf_ProductInBill_AutoCheck == "Y") //ç³»ç»åæ° èªå¨å®¡æ ¸ |
| | | { |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + omodel.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + omodel.HInterID.ToString()); |
| | | |
| | | //å®¡æ ¸K3åæ® |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_Check_New " + omodel.HInterID.ToString() + "," + omodel.HBillerID.ToString()); |
| | | //æ´æ°K3åºå |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateStock_New " + omodel.HInterID.ToString()); |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateOrderStock_New " + omodel.HInterID.ToString()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | sErrMsg = "æ°å¢åæ®æåï¼"; |
| | | if (oSystemParameterMain.WMS_CampanyName == "æå·æºè§" || oSystemParameterMain.WMS_CampanyName == "æå·æ¯è«å°") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | } |
| | | else |
| | | { |
| | | oCn.Commit(); |
| | | } |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "çæäº§åå
¥åºå失败ï¼" + e.Message; |
| | | if (oSystemParameterMain.WMS_CampanyName == "æå·æºè§" || oSystemParameterMain.WMS_CampanyName == "æå·æ¯è«å°") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | } |
| | | else |
| | | { |
| | | oCn.RollBack(); |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | //æ«éå·¥åºåºç«æ±æ¥åå表 å
¥åºåè½è°ç¨ |
| | | public bool AddBill_StationOut_LastProc(string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | { |
| | | try |
| | | { |
| | | DataSet Ds; |
| | | if (oSystemParameterMain.WMS_CampanyName == "æå·æºè§" || oSystemParameterMain.WMS_CampanyName == "æå·æ¯è«å°") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | } |
| | | else |
| | | { |
| | | oCn.BeginTran(); |
| | | } |
| | | //çæåºå
¥åºåæ® |
| | | //æå
¥å表 |
| | | DataSet DS2 = oCn.RunProcReturn("EXEC h_p_Kf_ProductInBillSub_Insert_StationOutLastProc " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + sHSourceType + "'", "h_p_Kf_ProductInBillSub_Insert_StationOutLastProc"); |
| | | if (DS2 == null || DS2.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "夿åå
¥åè¡¨ç¶æå¤±è´¥ï¼æªç¥é误ï¼"; |
| | | if (oSystemParameterMain.WMS_CampanyName == "æå·æºè§" || oSystemParameterMain.WMS_CampanyName == "æå·æ¯è«å°") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | } |
| | | else |
| | | { |
| | | oCn.RollBack(); |
| | | } |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isStrNull(DS2.Tables[0].Rows[0][0]) != "OK") |
| | | { |
| | | sErrMsg = "åæ®å·ï¼" + omodel.HBillNo + "ï¼åå
¥å表失败ï¼"; |
| | | return false; |
| | | } |
| | | } |
| | | //æå
¥ä¸»è¡¨ |
| | | oCn.RunProc("Insert Into Kf_ICStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('1202','1202'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "',convert(varchar(10),getdate(),120),'" + omodel.HMainSourceBillType + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ") "); |
| | | |
| | | //æ°å¢K3å表ã主表 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_Insert_New " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillerID.ToString() + ",'" + sHSourceType + "'"); |
| | | |
| | | //æ´æ°å
³èæ°é |
| | | if (sHSourceType == "3710") //ç产任å¡å |
| | | { |
| | | oCn.RunProc("exec h_p_Sc_UpDateRelation_ICMOToProductIn_Add " + omodel.HInterID.ToString()); |
| | | //åå¡«K3å
³èæ°é |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateBillRelateData_ICMO_New " + omodel.HInterID.ToString()); |
| | | } |
| | | else //æ æºå |
| | | { |
| | | //åå¡«K3å
³èæ°é |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateBillRelateData_New " + omodel.HInterID.ToString()); |
| | | } |
| | | |
| | | //夿åºåæ´æ°æ§å¶ç¶æï¼0ä¸ºå®¡æ ¸æ¹ååºåï¼1为ä¿åæ¹ååºåï¼ |
| | | DataSet DS = oCn.RunProcReturn("exec h_p_IFK3_SaveUpdateStock ", "h_p_IFK3_SaveUpdateStock"); |
| | | if (DS == null || DS.Tables[1].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "夿åºåæ´æ°æ§å¶ç¶æï¼æªç¥é误ï¼"; |
| | | if (oSystemParameterMain.WMS_CampanyName == "æå·æºè§" || oSystemParameterMain.WMS_CampanyName == "æå·æ¯è«å°") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | } |
| | | else |
| | | { |
| | | oCn.RollBack(); |
| | | } |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(DS.Tables[1].Rows[0][0]) == 1) |
| | | { |
| | | //æ´æ°K3åºå |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateStock_New " + omodel.HInterID.ToString()); |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateOrderStock_New " + omodel.HInterID.ToString()); |
| | | //å®¡æ ¸åæ® |
| | | if (oSystemParameterMain.Kf_ProductInBill_AutoCheck == "Y") //ç³»ç»åæ° èªå¨å®¡æ ¸ |
| | | { |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + omodel.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + omodel.HInterID.ToString()); |
| | | |
| | | //å®¡æ ¸K3åæ® |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_Check_New " + omodel.HInterID.ToString() + "," + omodel.HBillerID.ToString()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //å®¡æ ¸åæ® |
| | | if (oSystemParameterMain.Kf_ProductInBill_AutoCheck == "Y") //ç³»ç»åæ° èªå¨å®¡æ ¸ |
| | | { |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + omodel.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + omodel.HInterID.ToString()); |
| | | |
| | | //å®¡æ ¸K3åæ® |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_Check_New " + omodel.HInterID.ToString() + "," + omodel.HBillerID.ToString()); |
| | | //æ´æ°K3åºå |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateStock_New " + omodel.HInterID.ToString()); |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_ProductInBill_UpdateOrderStock_New " + omodel.HInterID.ToString()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | sErrMsg = "æ°å¢åæ®æåï¼"; |
| | | if (oSystemParameterMain.WMS_CampanyName == "æå·æºè§" || oSystemParameterMain.WMS_CampanyName == "æå·æ¯è«å°") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | } |
| | | else |
| | | { |
| | | oCn.Commit(); |
| | | } |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "çæäº§åå
¥åºå失败ï¼" + e.Message; |
| | | if (oSystemParameterMain.WMS_CampanyName == "æå·æºè§" || oSystemParameterMain.WMS_CampanyName == "æå·æ¯è«å°") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | } |
| | | else |
| | | { |
| | | oCn.RollBack(); |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Data; |
| | | |
| | | namespace DAL |
| | | { |
| | | public class ClsQC_NoPassProdConclusionBill : DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Model.ClsQC_NoPassProdConclusionBillMain omodel = new Model.ClsQC_NoPassProdConclusionBillMain(); |
| | | public List<Model.ClsQC_NoPassProdConclusionBillSub> DetailColl = new List<Model.ClsQC_NoPassProdConclusionBillSub>(); |
| | | |
| | | |
| | | public ClsQC_NoPassProdConclusionBill() |
| | | { |
| | | base.MvarItemKeySub = "QC_NoPassProdConclusionBillSub"; |
| | | base.MvarItemKeySub2 = ""; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey = "QC_NoPassProdConclusionBillMain"; |
| | | base.MvarReportTitle = "ä¸åæ ¼è¯å®¡å¤çå"; |
| | | base.BillType = "7513"; |
| | | base.HBillSubType = "7513"; |
| | | |
| | | } |
| | | |
| | | #region åºå®ä»£ç |
| | | |
| | | ~ClsQC_NoPassProdConclusionBill() |
| | | { |
| | | DetailColl = null; |
| | | } |
| | | |
| | | #endregion èªå®ä¹æ¹æ³ |
| | | //ä¿®æ¹åæ® |
| | | public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //ä¿ååæ§å¶========================================= |
| | | string HBillNote = ""; |
| | | DataSet ds = oCn.RunProcReturn("Exec h_p_QC_NoPassProdConclusionBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_QC_NoPassProdConclusionBill_BeforeSaveCtrl"); |
| | | if (ds == null) |
| | | { |
| | | sReturn = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | sReturn = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | return false; |
| | | } |
| | | //========================================================= |
| | | |
| | | // |
| | | oCn.BeginTran(); |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc("UpDate QC_NoPassProdConclusionBillMain set " + |
| | | " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | | ",HDate='" + omodel.HDate + "'" + |
| | | ",HYear='" + omodel.HYear.ToString() + "'" + |
| | | ",HPeriod='" + omodel.HPeriod.ToString() + "'" + |
| | | ",HRemark='" + omodel.HRemark + "'" + |
| | | ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | ",HMainSourceInterID='" + omodel.HMainSourceInterID.ToString() + "'" + |
| | | ",HMainSourceEntryID='" + omodel.HMainSourceEntryID.ToString() + "'" + |
| | | ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" + |
| | | ",HMainSourceBillType='" + omodel.HMainSourceBillType + "'" + |
| | | //======================================== |
| | | ",HDisposeDeptID='" + omodel.HDisposeDeptID.ToString() + "'" + |
| | | ",HDeptID='" + omodel.HDeptID.ToString() + "'" + |
| | | ",HProcID='" + omodel.HProcID.ToString() + "'" + |
| | | ",HCheckerResult='" + omodel.HCheckerResult + "'" + |
| | | ",HBadTypeID='" + omodel.HBadTypeID.ToString() + |
| | | "',HBadReasonID='" + omodel.HBadReasonID.ToString() + |
| | | "',HDisposeNote='" + omodel.HDisposeNote + "'" + |
| | | ",HSendMan='" + omodel.HSendMan + "'" + |
| | | ",HReceiveMan='" + omodel.HReceiveMan + "'" + |
| | | ",HCopyMan='" + omodel.HCopyMan + "'" + |
| | | |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | | DeleteBillSub(lngBillKey); |
| | | |
| | | //=========================ä¿ååæ§å¶ |
| | | DataSet ds2 = oCn.RunProcReturn("Exec h_p_QC_NoPassProdConclusionBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_QC_NoPassProdConclusionBill_AfterSaveCtrl"); |
| | | if (ds2 == null) |
| | | { |
| | | sReturn = "ä¿ååæ§å¶å¤æå¤±è´¥ï¼"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | sReturn = "ä¿å失败2ï¼" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //============================ |
| | | |
| | | sReturn = "ä¿®æ¹åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | //æ°å¢åæ® |
| | | public override bool AddBill(ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //å¾å°mainid |
| | | //omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | string HBillNote = ""; |
| | | DataSet ds = oCn.RunProcReturn("Exec h_p_QC_NoPassProdConclusionBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_QC_NoPassProdConclusionBill_BeforeSaveCtrl"); |
| | | if (ds == null) |
| | | { |
| | | sReturn = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | sReturn = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | return false; |
| | | } |
| | | //========================================================= |
| | | |
| | | string sql = ""; |
| | | |
| | | sql = "Insert Into QC_NoPassProdConclusionBillMain" + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HYear,HPeriod,HRemark,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType," + |
| | | "HSendMan,HReceiveMan,HCopyMan,HDeptID,HProcID,HDisposeDeptID,HBadTypeID,HBadReasonID,HCheckerResult,HDisposeNote) " + |
| | | " values(" + |
| | | "'" + this.BillType + |
| | | "','" + this.HBillSubType + |
| | | "'," + omodel.HInterID.ToString() + |
| | | ",'" + omodel.HBillNo + |
| | | "','" + omodel.HDate + |
| | | "'," + omodel.HYear + |
| | | "," + omodel.HPeriod + |
| | | ",'" + omodel.HRemark + |
| | | "','" + omodel.HMaker + |
| | | "',getdate()" + |
| | | ",'" + omodel.HMainSourceInterID + |
| | | "','" + omodel.HMainSourceEntryID + |
| | | "','" + omodel.HMainSourceBillNo + |
| | | "','" + omodel.HMainSourceBillType + |
| | | |
| | | "','" + omodel.HSendMan + |
| | | "','" + omodel.HReceiveMan + |
| | | "','" + omodel.HCopyMan + |
| | | "','" + omodel.HDeptID.ToString() + |
| | | "','" + omodel.HProcID.ToString() + |
| | | |
| | | "','" + omodel.HDisposeDeptID.ToString() + |
| | | "','" + omodel.HBadTypeID.ToString() + |
| | | "','" + omodel.HBadReasonID.ToString() + |
| | | "','" + omodel.HCheckerResult + |
| | | "','" + omodel.HDisposeNote + |
| | | |
| | | "') "; |
| | | //主表 |
| | | oCn.RunProc(sql); |
| | | |
| | | //=========================ä¿ååæ§å¶ |
| | | DataSet ds2 = oCn.RunProcReturn("Exec h_p_QC_NoPassProdConclusionBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_QC_NoPassProdConclusionBill_AfterSaveCtrl"); |
| | | if (ds2 == null) |
| | | { |
| | | sReturn = "ä¿ååæ§å¶å¤æå¤±è´¥ï¼"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | sReturn = "ä¿å失败2ï¼" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //============================ |
| | | |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | //æ¾ç¤ºåæ® |
| | | public override bool ShowBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //æ¥è¯¢ä¸»è¡¨ |
| | | DataSet Ds; |
| | | Ds = oCn.RunProcReturn("Select * from QC_NoPassProdConclusionBillMain Where HInterID=" + lngBillKey.ToString(), "QC_NoPassProdConclusionBillMain"); |
| | | if (Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "åæ®æªæ¾å°ï¼"; |
| | | return false; |
| | | } |
| | | //åºå®èµå¼=========================================== |
| | | omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]); |
| | | omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]); |
| | | omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]); |
| | | omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]); |
| | | omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]); |
| | | omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]); |
| | | omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim(); |
| | | omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]); |
| | | omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]); |
| | | omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]); |
| | | omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]); |
| | | omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim(); |
| | | omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim(); |
| | | omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim(); |
| | | omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim(); |
| | | omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim(); |
| | | omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim(); |
| | | omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim(); |
| | | omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim(); |
| | | omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim(); |
| | | omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim(); |
| | | omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim(); |
| | | omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]); |
| | | omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim(); |
| | | omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim(); |
| | | //======================================================== |
| | | //omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]); |
| | | //omodel.HContext = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HContext"]); |
| | | //omodel.HDescription = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HDescription"]); |
| | | //omodel.HSendMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSendMan"]); |
| | | //omodel.HReceiveMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HReceiveMan"]); |
| | | //omodel.HCopyMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCopyMan"]); |
| | | //omodel.HLevel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HLevel"]); |
| | | //omodel.HReTransmitMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HReTransmitMan"]); |
| | | //omodel.HBillTypeName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillTypeName"]); |
| | | //omodel.HPlanBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HPlanBillNo"]); |
| | | //omodel.HMaterName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterName"]); |
| | | //omodel.HMaterModel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterModel"]); |
| | | //omodel.HSendType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSendType"]); |
| | | //omodel.HHasten = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HHasten"]); |
| | | //omodel.HQty = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HQty"]); |
| | | // |
| | | |
| | | //å¾ªç¯ |
| | | DataSet DsSub; |
| | | DsSub = oCn.RunProcReturn("Select * from QC_NoPassProdConclusionBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "QC_NoPassProdConclusionBillSub"); |
| | | DetailColl.Clear();//æ¸
空 |
| | | for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) |
| | | { |
| | | Model.ClsQC_NoPassProdConclusionBillSub oSub = new Model.ClsQC_NoPassProdConclusionBillSub(); |
| | | // åºå®èµå¼=============================================== |
| | | oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]); |
| | | oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]); |
| | | oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]); |
| | | oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]); |
| | | oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim(); |
| | | oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim(); |
| | | oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]); |
| | | oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]); |
| | | oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]); |
| | | oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]); |
| | | oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]); |
| | | oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim(); |
| | | //=================================================== |
| | | //oSub.HDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HDate"]); |
| | | //oSub.HSendStatus = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSendStatus"]); |
| | | //oSub.HSendMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSendMan"]); |
| | | //oSub.HDescription = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HDescription"]); |
| | | |
| | | DetailColl.Add(oSub); |
| | | } |
| | | |
| | | sReturn = "æ¾ç¤ºåæ®æåï¼"; |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_MateOutRequestBillSub.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKF_ChangeBoxBillMain.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKF_ChangeBoxBillSub.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsSc_ProductionReturnBillSub.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsSc_ProductionReturnBillMain.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_StepFoldInBillMain.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_StepFoldInBillSub.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_StepFoldOutBillSub.cs" /> |
| | |
| | | <Compile Include="ç³»ç»å
¬ç¨\ClsXt_SystemParameter_Model.cs" /> |
| | | <Compile Include="计å管ç\ClsGy_MaterialTechParamBillSub.cs" /> |
| | | <Compile Include="计å管ç\ClsGy_MaterialTechParamBillMain.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_NoPassProdConclusionBillMain.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_NoPassProdConclusionBillSub.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_NoPassProdDisposeCheckBillMain.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_NoPassProdDisposeBillMain.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_NoPassProdDisposeCheckBillSub.cs" /> |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsSc_ProductionReturnBillMain : DBUtility.ClsXt_BaseBillMain |
| | | { |
| | | public string HDateForWeb; |
| | | public Int64 HSupID;// int --ä¾åºå |
| | | public Int64 HWHID;// int --ä»åº |
| | | public Int64 HSCWHID;// int --è°åºä»åº |
| | | public Int64 HEmpID;// int --ä¸å¡å |
| | | public Int64 HManagerID;// int --è´è´£äºº |
| | | public Int64 HSecManagerID;// int --éªæ¶ |
| | | public Int64 HKeeperID;// int --ä¿ç®¡å |
| | | public Int64 HDeptID;// int --é¨é¨ |
| | | public Int64 HCurID;// int --å¸å« |
| | | public Single HExRate;// money --æ±ç (éæ©å®å¸å«å¸¦åº) |
| | | public string HExplanation;// varchar(200) --ÕªÒª |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | public bool HRedBlueFlag;// bit --红èå |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsSc_ProductionReturnBillSub : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public Int64 HMaterID;// int --ç©æID |
| | | public Int64 HPropertyID;// int --è¾
å©å±æ§ |
| | | public Int64 HSecUnitID;// int --è¾
å©è®¡éåä½ |
| | | public Single HSecUnitRate;// money --æ¢ç®ç |
| | | public Int64 HUnitID;// int --计éåä½ |
| | | public double HQtyMust;// dec(18,8) --åºæ¶æ°é |
| | | public double HQty;// dec(18,8) --宿¶æ°é |
| | | public double HPrice;// dec(18,8) --åä»· |
| | | public double HMoney;// dec(18,8) --éé¢ |
| | | public Int64 HWHID;// int --æ¶æä»åº |
| | | public Int64 HSCWHID;// int --è°åºä»åºID |
| | | public Int64 HSPID;// int --ä»ä½ID |
| | | public Int64 HSCSPID;// int --è°åºä»ä½ID |
| | | public Int64 HSPGroupID;// int --ä»ä½ç»ID(ä»åºéæ©å®èªå¨å¸¦åº) |
| | | public string HBatchNo;// varchar(50) --æ¹æ¬¡ |
| | | public string HEngineNum;// varchar(50) --å卿ºå· |
| | | public string HUnderPanNum;// varchar(50) --å°çå· |
| | | public string HLeaveFactCard;// varchar(50) --åºåè¯ |
| | | public Int64 HPOOrderInterID;// int --éè´è®¢å主å
ç |
| | | public Int64 HPOOrderEntryID;// int --éè´è®¢ååå
ç |
| | | public string HPOOrderBillNo;// varchar(50) --éè´è®¢åå· |
| | | public Int64 HSeOrderInterID;// int --éå®è®¢å主å
ç |
| | | public Int64 HSeOrderEntryID;// int --éå®è®¢ååå
ç |
| | | public string HSeOrderBillNo;// varchar(50) --éå®è®¢åå· |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsQC_NoPassProdConclusionBillMain : DBUtility.ClsXt_BaseBillMain |
| | | { |
| | | public int HDeptID; // 责任é¨é¨ |
| | | |
| | | public int HDisposeDeptID; // å¤çé¨é¨ |
| | | |
| | | public int HProcID; // è´£ä»»å·¥åº |
| | | |
| | | |
| | | public string HCheckerResult; // å¤å®ç»è®º |
| | | |
| | | public int HBadTypeID; // ä¸è¯ç±»å ï¼Gy_BadTypeï¼ |
| | | |
| | | public int HBadReasonID; //ä¸è¯åå ï¼Gy_BadReasonï¼ |
| | | |
| | | public string HDisposeNote; // å¤çæè§è¯¦æ
|
| | | |
| | | public string HSendMan; // åé人(gy_czygl) |
| | | |
| | | public string HReceiveMan; // æ¥æ¶äºº(gy_czygl) |
| | | |
| | | public string HCopyMan; // æé(gy_czygl) |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsQC_NoPassProdConclusionBillSub : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | |
| | | } |
| | | } |
| | |
| | | public Int64 HSupDealerID;// int --ç»éå |
| | | public Int64 HCurID;// int --å¸å« (Gy_Currency) |
| | | public Int64 HWHID;// int --ä»åº |
| | | public Int64 HProjectID;// int é¡¹ç® |
| | | public Single HExRate;// money --æ±ç (éæ©å®å¸å«å¸¦åº) |
| | | public Int64 HEmpID;// int --ä¸å¡å (Gy_Employee) |
| | | public Int64 HManagerID;// int --主管 (Gy_Employee) |
| | | public Int64 HDeptID;// int --é¨é¨ (Gy_Employee) |
| | | public string HExplanation;// varchar(200) --ÕªÒª |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | public string HInvoiceBillNo;// varchar(50) --å票ç¼å· |
| | | |
| | | |
| | | public Int64 HInterID; |
| | |
| | | public string HERPBillType; |
| | | public Int64 HPURCHASEORGID; |
| | | public Int64 HOrgID; |
| | | public Int64 HWHID; |
| | | public Int64 HProjectID; |
| | | |
| | | public Int64 HPURCHASERGROUPID; //éè´ç» |
| | | public Int64 HPROVIDERID; //ä¾è´§æ¹ |
| | |
| | | public Int64 HVAT;//å¢å¼ç¨ |
| | | public Int64 HSELLERWITHHOLDING;//忹代æ£ä»£ç¼´ |
| | | public Int64 HBUYERWITHHOLDING;//ä¹°æ¹ä»£æ£ä»£ç¼´ |
| | | public Int64 HWHID;//ä»åº |
| | | public string HMATERIALDESC; //ç©æè¯´æ |
| | | } |
| | | } |
| | |
| | | PrintQtyCtl = oSystemParameter.omodel.BarCode_PrintQtyCtl; |
| | | UpdatePrintQtyCtl = oSystemParameter.omodel.BarCode_UpdatePrintQtyCtl; |
| | | } |
| | | //ç³»ç»åæ°ï¼ææºåçææ¡ç ï¼çææ¡ç æ°éå¯å¦è¶
æºåæ°éæ§å¶ï¼N为ä¸å¯è¶
æºåæ°éï¼ |
| | | if (SourceQtyCtl == "N") |
| | | { |
| | | //ç³»ç»åæ°ä¸ºä¸å¯è¶
æºåæ°éæ¶ï¼åæ¬¡å¤æç¨æ·æéæ¯å¦å¯è¶
æºåæ°é |
| | | //夿æé |
| | | if (ClsPub.Security_Log(ModRightNameSourceQty, 3, false, ClsPub.CurUserName)) |
| | | { |
| | | SourceQtyCtl = "Y"; |
| | | } |
| | | } |
| | | |
| | | cmbHWorksNumber.Items.Clear(); |
| | | if (CampanyName == "é£é¾") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° |
| | |
| | | //忮宿´æ§å¤æ æªå®æ |
| | | private bool Sub_AllowSave() |
| | | { |
| | | //ç³»ç»åæ°ï¼ææºåçææ¡ç ï¼çææ¡ç æ°éå¯å¦è¶
æºåæ°éæ§å¶ï¼N为ä¸å¯è¶
æºåæ°éï¼ |
| | | if (SourceQtyCtl=="N") |
| | | { |
| | | //ç³»ç»åæ°ä¸ºä¸å¯è¶
æºåæ°éæ¶ï¼åæ¬¡å¤æç¨æ·æéæ¯å¦å¯è¶
æºåæ°é |
| | | //夿æé |
| | | if (ClsPub.Security_Log(ModRightNameSourceQty, 3, false, ClsPub.CurUserName)) |
| | | { |
| | | SourceQtyCtl = "Y"; |
| | | } |
| | | } |
| | | //æç»è¡¨æ¯å¦ä¸ºé¶è¡ |
| | | bool b = false; |
| | | for (int i = 0; i < grdMain.RowCount; i++) |
| | |
| | | |
| | | if (cmbSourceBillType.Text.Trim() == "ç产订å") |
| | | { |
| | | string sWhere = " and HOrgID =" + HOrgID.ToString(); |
| | | string sWhere = ""; |
| | | //ç³»ç»åæ°ï¼çææ¡ç æ°éå¯å¦è¶
æºåæ°éæ§å¶ï¼N为ä¸å¯è¶
æºåæ°éï¼ |
| | | if (SourceQtyCtl == "N") |
| | | { |
| | | sWhere = " and HOrgID =" + HOrgID.ToString() + " and 任塿°é>0"; |
| | | } |
| | | else |
| | | { |
| | | sWhere = " and HOrgID =" + HOrgID.ToString(); |
| | | } |
| | | |
| | | DAL.Cls_S_IFCLD_ICMOList oIFCLD_ICMOList = new DAL.Cls_S_IFCLD_ICMOList(); |
| | | if (oIFCLD_ICMOList.Refresh(sWhere)) //éæ©åå |
| | | { |
| | |
| | | grdMain.Rows.Add(); |
| | | grdMain.Rows[i].Cells[HTagCol].Value = "*"; |
| | | //å¾å°ä¿¡æ¯ |
| | | Ds = oCn.RunProcReturn("select * from h_v_IFCLD_ICMOList where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IFCLD_ICMOList"); |
| | | Ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBill_ICMOBillList " + oSelectRow.BillMainID.ToString() + "," + oSelectRow.BillSubID.ToString() + ",'" + SourceQtyCtl + "'", "h_p_Gy_BarCodeBill_ICMOBillList"); |
| | | //Ds = oCn.RunProcReturn("select * from h_v_IFCLD_ICMOList where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IFCLD_ICMOList"); |
| | | //åå
¥ä¿¡æ¯ |
| | | Sub_WriteInForm(Ds.Tables[0], i); |
| | | } |
| | |
| | | if (cmbSourceBillType.Text.Trim() == "ç产订å") |
| | | { |
| | | DAL.Cls_S_IFCLD_ICMOList oIFCLD_ICMOList = new DAL.Cls_S_IFCLD_ICMOList(); |
| | | if (oIFCLD_ICMOList.RefreshBySourceBillNo(" Where åæ®å· like '%" + txtHSourceBillNo.Text + "' and HOrgID =" + sHOrgID.ToString())) //éæ©åå |
| | | //ç³»ç»åæ°ï¼çææ¡ç æ°éå¯å¦è¶
æºåæ°éæ§å¶ï¼N为ä¸å¯è¶
æºåæ°éï¼ |
| | | if (SourceQtyCtl == "N") |
| | | { |
| | | FillSelectData(oIFCLD_ICMOList.oBillSelectColl); |
| | | txtHSourceBillNo.Text = ""; |
| | | if (oIFCLD_ICMOList.RefreshBySourceBillNo(" Where åæ®å· like '%" + txtHSourceBillNo.Text + "' and HOrgID =" + sHOrgID.ToString() + " and 任塿°é>0")) //éæ©åå |
| | | { |
| | | FillSelectData(oIFCLD_ICMOList.oBillSelectColl); |
| | | txtHSourceBillNo.Text = ""; |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("æªæ¥è¯¢å°ä»»å¡æ°æ®ï¼è¯·ç¡®è®¤æéç»ç»ãæºåç±»å䏿ºååå·æ¯å¦æ£ç¡®ï¼"); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("æªæ¥è¯¢å°ä»»å¡æ°æ®ï¼è¯·ç¡®è®¤æéç»ç»ãæºåç±»å䏿ºååå·æ¯å¦æ£ç¡®ï¼"); |
| | | return; |
| | | if (oIFCLD_ICMOList.RefreshBySourceBillNo(" Where åæ®å· like '%" + txtHSourceBillNo.Text + "' and HOrgID =" + sHOrgID.ToString())) //éæ©åå |
| | | { |
| | | FillSelectData(oIFCLD_ICMOList.oBillSelectColl); |
| | | txtHSourceBillNo.Text = ""; |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("æªæ¥è¯¢å°ä»»å¡æ°æ®ï¼è¯·ç¡®è®¤æéç»ç»ãæºåç±»å䏿ºååå·æ¯å¦æ£ç¡®ï¼"); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | else if (cmbSourceBillType.Text.Trim() == "çäº§æ±æ¥å") |
| | |
| | | ",HWhID,HWHName,HSupID,HSupName " + |
| | | ",HSCWHID,HSCWHName " + |
| | | ",HCloudUserName,HCloudUserPsd,HUSEORGID,HProcID" + |
| | | ",HGroupID,HSourceID) " + |
| | | ",HGroupID,HSourceID,HCheckEmpID) " + |
| | | "values ('" + lsmain[0].Czybm.ToString() + "','" + lsmain[0].Czymc.ToString() + "','" + ClsPub.StrToPsd(lsmain[0].Czmm.ToString()) + "','" + lsmain[0].Explain.ToString() + "','" + lsmain[0].HEmpID.ToString() + "',"+ lsmain[0].HK3UserID.ToString() + "" + |
| | | ","+ lsmain[0].HKeeperID.ToString() + ",'"+ lsmain[0].HKeeper.ToString() + "',"+ lsmain[0].HSecManagerID.ToString() + ",'"+ lsmain[0].HSecManager.ToString() + "'" + |
| | | "," + lsmain[0].HSellManID.ToString() + ",'" + lsmain[0].HSellMan.ToString() + "'," + lsmain[0].HDeptID.ToString() + ",'" + lsmain[0].HDept.ToString() + "'" + |
| | | "," + lsmain[0].HWhID.ToString() + ",'" + lsmain[0].HWHName.ToString() + "'," + lsmain[0].HSupID.ToString() + ",'" + lsmain[0].HSupName.ToString() + "'" + |
| | | "," + lsmain[0].HSCWHID.ToString() + ",'" + lsmain[0].HSCWHName.ToString() + "'" + |
| | | ",'" + lsmain[0].HCloudUserName.ToString() + "','" + lsmain[0].HCloudUserPsd.ToString() + "',"+ lsmain[0].HOrgID.ToString() + "," + lsmain[0].HProcID.ToString() + "" + |
| | | ","+ lsmain[0].HGroupID.ToString() + ","+ lsmain[0].HSourceID.ToString() + ")"); |
| | | ","+ lsmain[0].HGroupID.ToString() + ","+ lsmain[0].HSourceID.ToString() + "," + lsmain[0].HCheckEmpID.ToString() + ")"); |
| | | |
| | | //æ°å¢åæ¥è¯¢ ç¡®ä¿æ°æ®æ·»å æå |
| | | ds = oCN.RunProcReturn("Select * from Gy_Czygl where Czybm='" + lsmain[0].Czybm.ToString() + "'", "Gy_Czygl"); |
| | |
| | | ",HDeptID=" + lsmain[0].HDeptID.ToString() + |
| | | ",HDept='" + lsmain[0].HDept.ToString() + "'" + |
| | | ",HWhID=" + lsmain[0].HWhID.ToString() + |
| | | ",HCheckEmpID=" + lsmain[0].HCheckEmpID.ToString() + |
| | | ",HWHName='" + lsmain[0].HWHName.ToString() + "'" + |
| | | ",HSCWHID=" + lsmain[0].HSCWHID.ToString() + |
| | | ",HSCWHName='" + lsmain[0].HSCWHName.ToString() + "'" + |
| | |
| | | ",HSellMan='" + lsmain[0].HSellMan.ToString() + "'" + |
| | | ",HDeptID=" + lsmain[0].HDeptID.ToString() + |
| | | ",HDept='" + lsmain[0].HDept.ToString() + "'" + |
| | | ",HCheckEmpID=" + lsmain[0].HCheckEmpID.ToString() + |
| | | ",HWhID=" + lsmain[0].HWhID.ToString() + |
| | | ",HWHName='" + lsmain[0].HWHName.ToString() + "'" + |
| | | ",HSCWHID=" + lsmain[0].HSCWHID.ToString() + |
| | |
| | | Single HExRate = mainList[0].HExRate;//æ±ç |
| | | long HManagerID = mainList[0].HManagerID;//主管 |
| | | long HWHID = mainList[0].HWHID;//ä»åº |
| | | long HProjectID = mainList[0].HProjectID;//é¡¹ç® |
| | | string HMaker = user;//å¶å人 |
| | | string HAddress = mainList[0].HAddress;//å°å |
| | | string HExplanation = mainList[0].HExplanation;//æè¦ |
| | | string HInnerBillNo = mainList[0].HInnerBillNo;//å
é¨åæ®å· |
| | | string HInvoiceBillNo = mainList[0].HInvoiceBillNo;//å票ç¼å· |
| | | |
| | | List<ClsCg_POInStockBillMain> mainList2 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsCg_POInStockBillMain>>(msg2); |
| | | DateTime dt = DateTime.Now; |
| | |
| | | ,HMaker,HMakeDate,HOWNERTYPEID,HOWNERID |
| | | ,HERPInterID,HERPBillType,HPURCHASEORGID,HSTOCKORGID,HREQUIREORGID |
| | | ,HSTOCKGROUPID,HSENDBILLNO,HLADBILLNO,HPURDEPTID,HPURGROUPID,HSUPPLYID |
| | | ,HSETTLEID,HCHARGEID,HBUSINESSTYPE,HSUPPLYADDRESS,HCORRESPONDORGID,HPROVIDERCONTACTID,HCurID,HExRate,HAddress,HWHID,HInnerBillNo) |
| | | ,HSETTLEID,HCHARGEID,HBUSINESSTYPE,HSUPPLYADDRESS,HCORRESPONDORGID,HPROVIDERCONTACTID,HCurID,HExRate,HAddress,HWHID,HInnerBillNo |
| | | ,HProjectID,HInvoiceBillNo) |
| | | values(" + HInterID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + 1103 + "','" + |
| | | HBillSubType + "','" + HDate + "','" + HBillNo + "'," + HBillStatus + "," + HSupID + |
| | | "," + HManagerID + "," + HEmpID + "," + HDeptID + ",'" + HRemark + "','" + HMaker + |
| | | "',getdate()" + ",'" + HOWNERTYPEID + "'," + HOWNERID + "," + HERPInterID + ",'" + HERPBillType + "'," + HPURCHASEORGID + "," + HSTOCKORGID + "," + HREQUIREORGID + "," + |
| | | HSTOCKGROUPID + ",'" + HSENDBILLNO + "','" + HLADBILLNO + "'," + HPURDEPTID + "," + HPURGROUPID + "," + HSUPPLYID + "," + |
| | | HSETTLEID + "," + HCHARGEID + ",'" + HBUSINESSTYPE + "','" + HSUPPLYADDRESS + "'," + HCORRESPONDORGID + "," + HPROVIDERCONTACTID + "," + HCurID + "," + HExRate + ",'" + HAddress + "'," + HWHID + ",'" + HInnerBillNo + "')"; |
| | | HSETTLEID + "," + HCHARGEID + ",'" + HBUSINESSTYPE + "','" + HSUPPLYADDRESS + "'," + HCORRESPONDORGID + "," + HPROVIDERCONTACTID + "," + HCurID + "," + HExRate + ",'" + HAddress + "'," + HWHID + ",'" + HInnerBillNo + "',"+ HProjectID + ",'"+ HInvoiceBillNo + "')"; |
| | | |
| | | oCN.RunProc(sql); |
| | | |
| | |
| | | "HRemark='" + HRemark + "', HUpDater ='" + HMaker + "', HUpDateDate=getdate()" + |
| | | ",HSupID=" + HSupID + ",HCurID=" + HCurID |
| | | + ",HExRate=" + HExRate + ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID |
| | | + ",HAddress='" + HAddress + "',HInnerBillNo='" + HInnerBillNo + "' where HInterID=" + HInterID; |
| | | + ",HAddress='" + HAddress + "',HInnerBillNo='" + HInnerBillNo + "',HProjectID="+ HProjectID + ",HInvoiceBillNo='"+ HInvoiceBillNo + "' where HInterID=" + HInterID; |
| | | |
| | | oCN.RunProc(sql); |
| | | |
| | |
| | | string HAddress = mainList[0].HAddress;//å°å |
| | | string HExplanation = mainList[0].HExplanation;//æè¦ |
| | | string HInnerBillNo = mainList[0].HInnerBillNo;//å
é¨åæ®å· |
| | | long HWHID = mainList[0].HWHID;//ä»åº |
| | | long HProjectID = mainList[0].HProjectID;//ä»åº |
| | | |
| | | List<ClsCg_POOrderBillMain> mainList2 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsCg_POOrderBillMain>>(msg2); |
| | | DateTime dt = DateTime.Now; |
| | |
| | | ,HExRate,HEmpID,HManagerID,HDeptID,HExplanation,HRemark,HInnerBillNo |
| | | ,HMaker,HMakeDate |
| | | ,HERPInterID,HERPBillType,HPURCHASEORGID |
| | | ,HPURCHASERGROUPID,HPROVIDERID,HSETTLEID,HCHARGEID,HBUSINESSTYPE,HPROVIDERADDRESS,HCORRESPONDORGID,HPROVIDERCONTACTID) |
| | | ,HPURCHASERGROUPID,HPROVIDERID,HSETTLEID,HCHARGEID,HBUSINESSTYPE,HPROVIDERADDRESS,HCORRESPONDORGID,HPROVIDERCONTACTID |
| | | ,HWHID,HProjectID) |
| | | values(" + HInterID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + 1102 + "','" + |
| | | 1102 + "','" + HDate + "','" + HBillNo + "','" + HBillStatus + "','" + HAddress + |
| | | "'," + HSSID + ",'" + HSSDate + "'," + HPSStyleID + "," + HSupID + "," + HCurID + |
| | | "," + HExRate + "," + HEmpID + "," + HManagerID + "," + HDeptID + ",'" + HExplanation + "','" + HRemark + "','" + HInnerBillNo + "','" + HMaker + "',getdate()" + "," + HERPInterID + ",'" + HERPBillType + "'," + HPURCHASEORGID + "," + HPURCHASERGROUPID + "," |
| | | + HPROVIDERID + "," + HSETTLEID + "," + HCHARGEID + ",'" + HBUSINESSTYPE + "','" + HPROVIDERADDRESS + "'," |
| | | + HCORRESPONDORGID + "," + HPROVIDERCONTACTID + ")"); |
| | | + HCORRESPONDORGID + "," + HPROVIDERCONTACTID + "," |
| | | + HWHID+","+ HProjectID + ")"); |
| | | } |
| | | else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) |
| | | { //ä¿®æ¹ |
| | |
| | | "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + |
| | | ",HSSID=" + HSSID + ",HPSStyleID=" + HPSStyleID + ",HSupID=" + HSupID + ",HCurID=" + HCurID |
| | | + ",HExRate=" + HExRate + ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID |
| | | + ",HAddress='" + HAddress + "',HSSDate='" + HSSDate + "' where HInterID=" + HInterID); |
| | | + ",HAddress='" + HAddress + "',HSSDate='" + HSSDate + "',HWHID="+ HWHID + ",HProjectID="+ HProjectID + " where HInterID=" + HInterID); |
| | | |
| | | //å é¤å表 |
| | | oCN.RunProc("delete from Cg_POOrderBillSub where HInterID='" + HInterID + "'"); |
| | |
| | | string HMTONo = DetailColl2[0].HMTONo == null ? "''" : DetailColl2[0].HMTONo; |
| | | long HERPInterID = DetailColl2[0].HERPInterID == null ? 0 : DetailColl2[0].HERPInterID; |
| | | long HERPEntryID = DetailColl2[0].HERPEntryID == null ? 0 : DetailColl2[0].HERPEntryID; |
| | | long HWHID = DetailColl2[0].HWHID == null ? 0 : DetailColl2[0].HWHID; |
| | | |
| | | string HSeOrderBillNo = DetailColl2[0].HSeOrderBillNo == null ? "''" : DetailColl2[0].HSeOrderBillNo; |
| | | string HRemark = DetailColl2[0].HRemark == null ? "''" : DetailColl2[0].HRemark; |
| | |
| | | ,HSEQ,HRECEIVEDEPTID,HSUPPLIERLOT,HBOMID,HSTOCKUNITID,HBASEUNITID,HBFLOWID,HGIVEAWAY,HROWTYPE,HBASEUNITQTY,HSTOCKBASEQTY |
| | | ,HREQTRACENO,HTAXNETPRICE,HPRICECOEFFICIENT,HTAXCOMBINATION,HPRICEUNITID,HPRICELISTENTRY,HPAYORGID,HSETTLEMODEID,HSETTLECURRID |
| | | ,HEXCHANGETYPEID,HPAYCONDITIONID,HEXCHANGERATE,HLOCALCURRID,HISINCLUDEDTAX,HISPRICEEXCLUDETAX,HTAXRATEID,HCOSTPERCENT,HCOSTAMOUNT |
| | | ,HVAT,HSELLERWITHHOLDING,HBUYERWITHHOLDING,HMATERIALDESC) |
| | | ,HVAT,HSELLERWITHHOLDING,HBUYERWITHHOLDING,HMATERIALDESC,HWHID) |
| | | values({HInterID},{NewHEntryID},{oSub.HMaterID},{oSub.HUnitID},{(oSub.HQty == null ? 0 : oSub.HQty)} |
| | | ,{oSub.HPrice},{oSub.HTaxPrice},{oSub.HDiscountRate},{oSub.HRelTaxPrice},{oSub.HMoney},{oSub.HTaxRate},{oSub.HTaxMoney},{oSub.HlineTotal},{oSub.HlineTotalBB},'{oSub.HDate}',{oSub.HInStockQty},{oSub.HInvoiceQty},{HSeOrderBillNo},{oSub.HSeOrderInterID},{oSub.HSeOrderEntryID},'{HRemark}',{HSourceInterID},{HSourceEntryID},{HSourceBillNo},{HSourceBillType},{HRelationQty},{HBackRelationQty},{HPropertyID},{HBatChNo}, |
| | | {HAuxPropID},{HMTONo},{HERPInterID},{HERPEntryID},{HSTOCKORGID},{HSEQ},{HRECEIVEDEPTID},'{HSUPPLIERLOT}',{HBOMID},{HSTOCKUNITID},{HBASEUNITID},'{HBFLOWID}',{HGIVEAWAY},{HROWTYPE},{HBASEUNITQTY},{HSTOCKBASEQTY},'{HREQTRACENO}',{HTAXNETPRICE},{HPRICECOEFFICIENT},{HTAXCOMBINATION},{HPRICEUNITID},{HPRICELISTENTRY},{HPAYORGID},{HSETTLEMODEID},{HSETTLECURRID},{HEXCHANGETYPEID},{HPAYCONDITIONID},{HEXCHANGERATE},{HLOCALCURRID},{HISINCLUDEDTAX},{HISPRICEEXCLUDETAX},{HTAXRATEID},{HCOSTPERCENT},{HCOSTAMOUNT},{HVAT},{HSELLERWITHHOLDING},{HBUYERWITHHOLDING},'{HMATERIALDESC}')"); |
| | | {HAuxPropID},{HMTONo},{HERPInterID},{HERPEntryID},{HSTOCKORGID},{HSEQ},{HRECEIVEDEPTID},'{HSUPPLIERLOT}',{HBOMID},{HSTOCKUNITID},{HBASEUNITID},'{HBFLOWID}',{HGIVEAWAY},{HROWTYPE},{HBASEUNITQTY},{HSTOCKBASEQTY},'{HREQTRACENO}',{HTAXNETPRICE},{HPRICECOEFFICIENT},{HTAXCOMBINATION},{HPRICEUNITID},{HPRICELISTENTRY},{HPAYORGID},{HSETTLEMODEID},{HSETTLECURRID},{HEXCHANGETYPEID},{HPAYCONDITIONID},{HEXCHANGERATE},{HLOCALCURRID},{HISINCLUDEDTAX},{HISPRICEEXCLUDETAX},{HTAXRATEID},{HCOSTPERCENT},{HCOSTAMOUNT},{HVAT},{HSELLERWITHHOLDING},{HBUYERWITHHOLDING},'{HMATERIALDESC}',{HWHID})"); |
| | | } |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | |
| | | long HSCWHID = mainList[0].HSCWHID;//è°åºä»åº |
| | | long HSecManagerID = mainList[0].HSecManagerID;//éªæ¶ |
| | | long HKeeperID = mainList[0].HKeeperID;//ä¿ç®¡å |
| | | long HProjectID = mainList[0].HProjectID;//é¡¹ç® |
| | | |
| | | |
| | | |
| | | |
| | | string HInvoiceBillNo = mainList[0].HInvoiceBillNo;//å票ç¼å· |
| | | string HExplanation = mainList[0].HExplanation;//æè¦ |
| | | string HInnerBillNo = mainList[0].HInnerBillNo;//å
é¨åæ®å· |
| | | |
| | |
| | | String sql =$@"Insert Into Kf_ICStockBillMain |
| | | (HInterID,HYear,HPeriod,HBillType,HBillSubType,HDate,HBillNo,HBillStatus |
| | | ,HAddress,HSupID,HCurID,HWHID,HEmpID,HManagerID,HSecManagerID,HKeeperID,HDeptID,HExplanation,HRemark |
| | | ,HInnerBillNo,HSTOCKORGID,HOWNERID,HMaker,HMakeDate) |
| | | ,HInnerBillNo,HSTOCKORGID,HOWNERID,HMaker,HMakeDate,HProjectID,HInvoiceBillNo) |
| | | values(" + HInterID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + 1201 + "','" + |
| | | HBillSubType + "','" + HDate + "','" + HBillNo + "','" + HBillStatus + "','" + HAddress + |
| | | "'," + HSupID + "," + HCurID + "," + HWHID + "," + HEmpID + "," + HManagerID + "," + |
| | | HSecManagerID + ","+ HKeeperID +"," + HDeptID + ",'" + HExplanation + "','" + HRemark |
| | | + "','" + HInnerBillNo + "'," + HSTOCKORGID + "," + HOWNERID + ",'" + HMaker + "',getdate()" +")"; |
| | | + "','" + HInnerBillNo + "'," + HSTOCKORGID + "," + HOWNERID + ",'" + HMaker + "',getdate(),"+ HProjectID + ",'"+ HInvoiceBillNo + "')"; |
| | | |
| | | oCN.RunProc(sql); |
| | | } |
| | |
| | | "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + |
| | | ",HSupID=" + HSupID + ",HCurID=" + HCurID + ",HSecManagerID=" + HSecManagerID + ", HSTOCKORGID=" + HSTOCKORGID + ",HKeeperID=" + HKeeperID + ",HWHID = " + HWHID |
| | | + ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID + ",HOWNERID=" + HOWNERID |
| | | + ",HAddress='" + HAddress + "',HInnerBillNo='" + HInnerBillNo + "' where HInterID=" + HInterID; |
| | | + ",HAddress='" + HAddress + "',HInnerBillNo='" + HInnerBillNo + "',HProjectID="+ HProjectID + ",HInvoiceBillNo='"+ HInvoiceBillNo + "' where HInterID=" + HInterID; |
| | | |
| | | oCN.RunProc(sql); |
| | | //å é¤å表 |
| | |
| | | ,HMoney,HOrderPrice,HWHID,HSPID,HRelationQty,HBatchNo |
| | | ,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType |
| | | ,HPOOrderInterID,HPOOrderEntryID ,HPOOrderBillNo |
| | | ,HPropertyID,HSecUnitID,HSecUnitRate,HPlanMode,HRemark,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo) |
| | | ,HPropertyID,HSecUnitID,HSecUnitRate,HPlanMode,HRemark,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo |
| | | ,HTaxRate,HTaxPrice,HlineTotal) |
| | | values({HInterID},{NewHEntryID},{oSub.HMaterID},{oSub.HUnitID} |
| | | ,{oSub.HQtyMust},{(oSub.HQty == null ? 0 : oSub.HQty)},{oSub.HPrice},{oSub.HMoney},{oSub.HOrderPrice},{oSub.HWHID},{oSub.HSPID},{oSub.HRelationQty} |
| | | ,'{oSub.HBatchNo}',{oSub.HSourceInterID},{oSub.HSourceEntryID},'{oSub.HSourceBillNo}','{oSub.HSourceBillType}' |
| | | ,{oSub.HPOOrderInterID},{oSub.HPOOrderEntryID},'{oSub.HPOOrderBillNo}' |
| | | ,{(oSub.HPropertyID == null ? 0 : oSub.HPropertyID)},{(oSub.HSecUnitID == null ? 0 : oSub.HSecUnitID)},{(oSub.HSecUnitRate == null ? 0 : oSub.HSecUnitRate)} |
| | | ,{(oSub.HPlanMode == null ? 0 : oSub.HPlanMode)},'{oSub.HRemark}',{oSub.HSeOrderInterID},{oSub.HSeOrderEntryID},'{oSub.HSeOrderBillNo}')"; |
| | | ,{(oSub.HPlanMode == null ? 0 : oSub.HPlanMode)},'{oSub.HRemark}',{oSub.HSeOrderInterID},{oSub.HSeOrderEntryID},'{oSub.HSeOrderBillNo}' |
| | | ,{(oSub.HTaxRate == null ? 0 : oSub.HTaxRate)},{(oSub.HTaxPrice == null ? 0 : oSub.HTaxPrice)},{(oSub.HlineTotal == null ? 0 : oSub.HlineTotal)})"; |
| | | |
| | | //string sReturn = ""; |
| | | //ds = oCN.RunProcReturn("exec h_p_Cg_POInStockBillMain " + oSub.HQty + ", '" +oSub.HSourceInterID + "', '" + oSub.HSourceEntryID + "','" + user+" '", "h_p_Cg_POInStockBillMain"); |
| | |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | bool bResult; |
| | | if (oBill.omodel.HInterID == 0) |
| | | if (refSav == "Add") |
| | | { |
| | | |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (bResult) |
| | | { |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public static DataSet Get_TransFerBillList(string sWhere) |
| | | { |
| | |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "OA_ErrMsgBackBillMain"); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region å¼å¸¸åé¦å表PDA |
| | | [Route("Sc_MESTransFerWorkBill/Get_TransFerBillList_PDA")] |
| | | [HttpGet] |
| | | public object Get_TransFerBillList_PDA(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackBillList_PDA order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackBillList_PDA"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_OA_ErrMsgBackBillList_PDA where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackBillList_PDA"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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 ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¼å¸¸åé¦å表ç¼è¾è·åæ°æ® |
| | |
| | | |
| | | [Route("Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackList")] |
| | | [HttpGet] |
| | | public object Get_OA_ErrMsgBackList(string HInterID,string HEntryID, string user,int num) |
| | | public object Get_OA_ErrMsgBackList(string HInterID,string HEntryID, string user,Int64 num) |
| | | { |
| | | try |
| | | { |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (num == 1) //å¼å¸¸åé¦å |
| | | string sql = ""; |
| | | string HViewName = ""; |
| | | switch (num) |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackBillList where HInterID = '" + HInterID + "' and HEntryID = '" + HEntryID + "'"; |
| | | ds = oCN.RunProcReturn(sql, "p_v_OA_ErrMsgBackBillList"); |
| | | case 1: //å¼å¸¸åé¦å |
| | | sql = "select * from h_v_OA_ErrMsgBackBillList where HInterID = '" + HInterID + "' and HEntryID = '" + HEntryID + "'"; |
| | | HViewName = "h_v_OA_ErrMsgBackBillList"; |
| | | break; |
| | | case 2://å¼å¸¸å馿¥æ¶å |
| | | sql = "select * from h_v_OA_ErrMsgBackReceiveBillMainList where hmainid = '" + HInterID + "'"; |
| | | HViewName = "h_v_OA_ErrMsgBackReceiveBillMainList"; |
| | | break; |
| | | case 3://å¼å¸¸åé¦å¤çå |
| | | sql = "select * from h_v_OA_ErrMsgBackHandleBillMainList where hmainid = '" + HInterID + "'"; |
| | | HViewName = "h_v_OA_ErrMsgBackHandleBillMainList"; |
| | | break; |
| | | case 10: //å¼å¸¸åé¦åPDA |
| | | sql = "select * from h_v_OA_ErrMsgBackBillList_PDA where HInterID = '" + HInterID + "' and HEntryID = '" + HEntryID + "'"; |
| | | HViewName = "h_v_OA_ErrMsgBackBillList_PDA"; |
| | | break; |
| | | case 11://å¼å¸¸å馿¥æ¶åPDA |
| | | sql = "select * from h_v_OA_ErrMsgBackReceiveBillList_PDA where hmainid = '" + HInterID + "'"; |
| | | HViewName = "h_v_OA_ErrMsgBackReceiveBillList_PDA"; |
| | | break; |
| | | case 12://å¼å¸¸åé¦å¤çåPDA |
| | | sql = "select * from h_v_OA_ErrMsgBackHandleBillList_PDA where hmainid = '" + HInterID + "'"; |
| | | HViewName = "h_v_OA_ErrMsgBackHandleBillList_PDA"; |
| | | break; |
| | | } |
| | | else if (num==2) //å¼å¸¸å馿¥æ¶å |
| | | if(sql == "") |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackReceiveBillMainList where hmainid = '" + HInterID + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillMainList"); |
| | | } |
| | | else if (num == 3) //å¼å¸¸åé¦å¤çå |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackHandleBillMainList where hmainid = '" + HInterID + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackHandleBillMainList "); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼éå
¥æºåç±»ånum䏿£ç¡®ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn(sql, HViewName); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | |
| | | string sql1 = "select * from h_v_OA_ErrMsgBackReceiveBillMainList where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillMainList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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 ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¼å¸¸å馿¥æ¶åå表PDA |
| | | |
| | | [Route("Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackReceiveBillList_PDA")] |
| | | [HttpGet] |
| | | public object Get_OA_ErrMsgBackReceiveBillList_PDA(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackReceiveBillMain_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackReceiveBillList_PDA order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillList_PDA"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_OA_ErrMsgBackReceiveBillList_PDA where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackReceiveBillList_PDA"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å¼å¸¸åé¦ç¾å°åå表PDA |
| | | |
| | | [Route("Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackSignBillList_PDA")] |
| | | [HttpGet] |
| | | public object Get_OA_ErrMsgBackSignBillList_PDA(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackSignBillMain_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackSignBillList_PDA order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackSignBillList_PDA"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_OA_ErrMsgBackSignBillList_PDA where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackSignBillList_PDA"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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 ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¼å¸¸åé¦ç¾å°å å é¤ |
| | | /// <summary> |
| | | ///åæ°ï¼string HInterIDã |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | #region å¼å¸¸åé¦å¤çåå表PDA |
| | | |
| | | [Route("Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackHandleBillList_PDA")] |
| | | [HttpGet] |
| | | public object Get_OA_ErrMsgBackHandleBillList_PDA(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackHandleBillMain_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackHandleBillList_PDA order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackHandleBillList_PDA"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_OA_ErrMsgBackHandleBillList_PDA where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackHandleBillList_PDA"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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 ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region å¼å¸¸åé¦å¤çå å é¤ |
| | | |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å¼å¸¸åé¦éªæ¶åå表PDA |
| | | |
| | | [Route("Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackCheckBillList_PDA")] |
| | | [HttpGet] |
| | | public object Get_OA_ErrMsgBackCheckBillList_PDA(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackCheckBillMain_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | string sql = "select * from h_v_OA_ErrMsgBackCheckBillList_PDA order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackCheckBillList_PDA"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_OA_ErrMsgBackCheckBillList_PDA where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackCheckBillList_PDA"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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 ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¼å¸¸åé¦éªæ¶å å é¤ |
| | | |
| | | [Route("Sc_MESTransFerWorkBill/DeleteOA_ErrMsgBackCheckBill")] |
| | |
| | | using Pub_Class; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | using Model; |
| | | using Newtonsoft.Json.Linq; |
| | | |
| | | namespace WebAPI.Controllers.SCGL |
| | | { |
| | |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | public WebServer webserver = new WebServer(); |
| | | public DAL.ClsCg_POInStockBill BillOld = new DAL.ClsCg_POInStockBill(); |
| | | //public DAL.ClsCg_POInStockBill BillOld = new DAL.ClsCg_POInStockBill(); |
| | | public DAL.ClsSc_ProductionReturnBill BillOld = new DAL.ClsSc_ProductionReturnBill(); |
| | | |
| | | public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | #region ç产éåºå æ¥æ¾è®°å½åè½ |
| | | /// <summary> |
| | | /// æ ¹æ®åºç¡èµæID æ¥æ¾è®°å½ |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Sc_ProductionReturnBill/cx")] |
| | | [HttpGet] |
| | | public object cx(long HInterID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ProductionReturnList where hmainid=" + HInterID, "h_v_IF_ProductionReturnList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "falseï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// ç产éåºåå表 |
| | |
| | | } |
| | | #endregion |
| | | |
| | | //#region ç产å
¥åºå ä¿å/ç¼è¾åè½ |
| | | //[Route("Kf_ProductInBill/ProductInBillEdit")] |
| | | //[HttpPost] |
| | | //public object ProductInBillEdit([FromBody] JObject sMainSub) |
| | | //{ |
| | | // try |
| | | // { |
| | | // var _value = sMainSub["sMainSub"].ToString(); |
| | | // string msg1 = _value.ToString(); |
| | | // oCN.BeginTran(); |
| | | // //ä¿å主表 |
| | | // objJsonResult = AddBillMain(msg1); |
| | | // if (objJsonResult.code == "0") |
| | | // { |
| | | // oCN.RollBack(); |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = objJsonResult.Message; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // oCN.Commit(); |
| | | // objJsonResult.code = "1"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "åæ®ä¿åæåï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | #region ç产éåºå ä¿å/ç¼è¾åè½ |
| | | [Route("Sc_ProductionReturnBill/ProductionReturnBillEdit")] |
| | | [HttpPost] |
| | | public object ProductionReturnBillEdit([FromBody] JObject sMainSub) |
| | | { |
| | | try |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | oCN.BeginTran(); |
| | | //ä¿å主表 |
| | | objJsonResult = AddBillMain(msg1); |
| | | if (objJsonResult.code == "0") |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = objJsonResult.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åæ®ä¿åæåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // oCN.RollBack(); |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | //} |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | //public json AddBillMain(string msg1) |
| | | //{ |
| | | // string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | // string msg2 = sArray[0].ToString(); //ä¸»è¡¨æ°æ® |
| | | // string msg3 = sArray[1].ToString(); //åè¡¨æ°æ® |
| | | // int OperationType = int.Parse(sArray[2].ToString()); // æ°æ®ç±»å 1æ·»å 3ä¿®æ¹ |
| | | // string user = sArray[3].ToString(); |
| | | // string msg_allVal = sArray[4].ToString(); //主表+åè¡¨æææ°æ® |
| | | public json AddBillMain(string msg1) |
| | | { |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); //ä¸»è¡¨æ°æ® |
| | | string msg3 = sArray[1].ToString(); //åè¡¨æ°æ® |
| | | int OperationType = int.Parse(sArray[2].ToString()); // æ°æ®ç±»å 1æ·»å 3ä¿®æ¹ |
| | | string user = sArray[3].ToString(); |
| | | string msg_allVal = sArray[4].ToString(); //主表+åè¡¨æææ°æ® |
| | | |
| | | // try |
| | | // { |
| | | // msg2 = "[" + msg2.ToString() + "]"; |
| | | // List<ClsKf_ProductInBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsKf_ProductInBillMain>>(msg2); |
| | | try |
| | | { |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<ClsSc_ProductionReturnBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_ProductionReturnBillMain>>(msg2); |
| | | |
| | | // long HInterID = mainList[0].HInterID;//éå
¥typeå¾å°çåæ®ID |
| | | // string HBillNo = mainList[0].HBillNo;//éå
¥typeå¾å°çåæ®å· |
| | | // long HPRDORGID = mainList[0].HPRDORGID;//ç»ç» |
| | | // DateTime HDate = mainList[0].HDate;//æ¥æ |
| | | // string HRemark = mainList[0].HRemark;//夿³¨ |
| | | // long HSupID = mainList[0].HSupID;//ä¾åºå |
| | | // long HEmpID = mainList[0].HEmpID;//ä¸å¡å |
| | | // long HDeptID = mainList[0].HDeptID;//é¨é¨ |
| | | // long HSecManagerID = mainList[0].HSecManagerID;//éªæ¶å |
| | | // long HKeeperID = mainList[0].HKeeperID;//ä¿ç®¡å |
| | | // long HCurID = mainList[0].HCurID;//å¸å« |
| | | // Single HExRate = mainList[0].HExRate;//æ±ç |
| | | // long HManagerID = mainList[0].HManagerID;//主管 |
| | | // long HWHID = mainList[0].HWHID;//ä»åº |
| | | // string HMaker = user;//å¶å人 |
| | | // string HExplanation = mainList[0].HExplanation;//æè¦ |
| | | // string HInnerBillNo = mainList[0].HInnerBillNo;//å
é¨åæ®å· |
| | | long HInterID = mainList[0].HInterID;//éå
¥typeå¾å°çåæ®ID |
| | | string HBillNo = mainList[0].HBillNo;//éå
¥typeå¾å°çåæ®å· |
| | | long HPRDORGID = mainList[0].HPRDORGID;//ç»ç» |
| | | DateTime HDate = mainList[0].HDate;//æ¥æ |
| | | string HRemark = mainList[0].HRemark;//夿³¨ |
| | | long HSupID = mainList[0].HSupID;//ä¾åºå |
| | | long HEmpID = mainList[0].HEmpID;//ä¸å¡å |
| | | long HDeptID = mainList[0].HDeptID;//é¨é¨ |
| | | long HSecManagerID = mainList[0].HSecManagerID;//éªæ¶å |
| | | long HKeeperID = mainList[0].HKeeperID;//ä¿ç®¡å |
| | | long HCurID = mainList[0].HCurID;//å¸å« |
| | | Single HExRate = mainList[0].HExRate;//æ±ç |
| | | long HManagerID = mainList[0].HManagerID;//主管 |
| | | long HWHID = mainList[0].HWHID;//ä»åº |
| | | string HMaker = user;//å¶å人 |
| | | string HExplanation = mainList[0].HExplanation;//æè¦ |
| | | string HInnerBillNo = mainList[0].HInnerBillNo;//å
é¨åæ®å· |
| | | |
| | | // List<ClsCg_POInStockBillMain> mainList2 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsCg_POInStockBillMain>>(msg2); |
| | | // DateTime dt = DateTime.Now; |
| | | // long HCORRESPONDORGID = mainList2[0].HOrgID; |
| | | // long HYear = mainList2[0].HYear == null ? 0 : mainList2[0].HYear; |
| | | // long HPeriod = mainList2[0].HPeriod == null ? 0 : mainList2[0].HPeriod; |
| | | // string HBillType = mainList2[0].HBillType == null ? "''" : mainList2[0].HBillType; |
| | | // string HBillSubType = mainList2[0].HBillSubType == null ? "''" : mainList2[0].HBillSubType; |
| | | // long HBillStatus = mainList2[0].HBillStatus == null ? 0 : mainList2[0].HBillStatus; |
| | | // string HMakeDate = mainList2[0].HMakeDate == null ? "''" : mainList2[0].HMakeDate; |
| | | // string HChecker = mainList2[0].HChecker == null ? "''" : mainList2[0].HChecker; |
| | | // string HCheckDate = mainList2[0].HCheckDate == null ? "''" : mainList2[0].HCheckDate; |
| | | // string HOWNERTYPEID = mainList2[0].HOWNERTYPEID == null ? "''" : mainList2[0].HOWNERTYPEID; |
| | | // long HOWNERID = mainList2[0].HOWNERID == null ? 0 : mainList2[0].HOWNERID; |
| | | // long HERPInterID = mainList2[0].HERPInterID == null ? 0 : mainList2[0].HERPInterID; |
| | | // string HERPBillType = mainList2[0].HERPBillType == null ? "''" : mainList2[0].HERPBillType; |
| | | // long HPURCHASEORGID = mainList2[0].HPURCHASEORGID == null ? 0 : mainList2[0].HPURCHASEORGID; |
| | | // long HSTOCKORGID = mainList2[0].HSTOCKORGID == null ? 0 : mainList2[0].HSTOCKORGID; |
| | | // long HREQUIREORGID = mainList2[0].HREQUIREORGID == null ? 0 : mainList2[0].HREQUIREORGID; |
| | | // long HSTOCKGROUPID = mainList2[0].HSTOCKGROUPID == null ? 0 : mainList2[0].HSTOCKGROUPID; |
| | | // string HSENDBILLNO = mainList2[0].HSENDBILLNO == null ? "''" : mainList2[0].HSENDBILLNO; |
| | | // string HLADBILLNO = mainList2[0].HLADBILLNO == null ? "''" : mainList2[0].HLADBILLNO; |
| | | // long HPURDEPTID = mainList2[0].HPURDEPTID == null ? 0 : mainList2[0].HPURDEPTID; |
| | | // long HPURGROUPID = mainList2[0].HPURGROUPID == null ? 0 : mainList2[0].HPURGROUPID; |
| | | // long HSUPPLYID = mainList2[0].HSUPPLYID == null ? 0 : mainList2[0].HSUPPLYID; |
| | | // long HSETTLEID = mainList2[0].HSETTLEID == null ? 0 : mainList2[0].HSETTLEID; |
| | | // long HCHARGEID = mainList2[0].HCHARGEID == null ? 0 : mainList2[0].HCHARGEID; |
| | | // string HBUSINESSTYPE = mainList2[0].HBUSINESSTYPE == null ? "''" : mainList2[0].HBUSINESSTYPE; |
| | | // string HSUPPLYADDRESS = mainList2[0].HSUPPLYADDRESS == null ? "''" : mainList2[0].HSUPPLYADDRESS; |
| | | // long HPROVIDERCONTACTID = mainList2[0].HPROVIDERCONTACTID == null ? 0 : mainList2[0].HPROVIDERCONTACTID; |
| | | List<ClsCg_POInStockBillMain> mainList2 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsCg_POInStockBillMain>>(msg2); |
| | | DateTime dt = DateTime.Now; |
| | | long HCORRESPONDORGID = mainList2[0].HOrgID; |
| | | long HYear = mainList2[0].HYear == null ? 0 : mainList2[0].HYear; |
| | | long HPeriod = mainList2[0].HPeriod == null ? 0 : mainList2[0].HPeriod; |
| | | string HBillType = mainList2[0].HBillType == null ? "''" : mainList2[0].HBillType; |
| | | string HBillSubType = mainList2[0].HBillSubType == null ? "''" : mainList2[0].HBillSubType; |
| | | long HBillStatus = mainList2[0].HBillStatus == null ? 0 : mainList2[0].HBillStatus; |
| | | string HMakeDate = mainList2[0].HMakeDate == null ? "''" : mainList2[0].HMakeDate; |
| | | string HChecker = mainList2[0].HChecker == null ? "''" : mainList2[0].HChecker; |
| | | string HCheckDate = mainList2[0].HCheckDate == null ? "''" : mainList2[0].HCheckDate; |
| | | string HOWNERTYPEID = mainList2[0].HOWNERTYPEID == null ? "''" : mainList2[0].HOWNERTYPEID; |
| | | long HOWNERID = mainList2[0].HOWNERID == null ? 0 : mainList2[0].HOWNERID; |
| | | long HERPInterID = mainList2[0].HERPInterID == null ? 0 : mainList2[0].HERPInterID; |
| | | string HERPBillType = mainList2[0].HERPBillType == null ? "''" : mainList2[0].HERPBillType; |
| | | long HPURCHASEORGID = mainList2[0].HPURCHASEORGID == null ? 0 : mainList2[0].HPURCHASEORGID; |
| | | long HSTOCKORGID = mainList2[0].HSTOCKORGID == null ? 0 : mainList2[0].HSTOCKORGID; |
| | | long HREQUIREORGID = mainList2[0].HREQUIREORGID == null ? 0 : mainList2[0].HREQUIREORGID; |
| | | long HSTOCKGROUPID = mainList2[0].HSTOCKGROUPID == null ? 0 : mainList2[0].HSTOCKGROUPID; |
| | | string HSENDBILLNO = mainList2[0].HSENDBILLNO == null ? "''" : mainList2[0].HSENDBILLNO; |
| | | string HLADBILLNO = mainList2[0].HLADBILLNO == null ? "''" : mainList2[0].HLADBILLNO; |
| | | long HPURDEPTID = mainList2[0].HPURDEPTID == null ? 0 : mainList2[0].HPURDEPTID; |
| | | long HPURGROUPID = mainList2[0].HPURGROUPID == null ? 0 : mainList2[0].HPURGROUPID; |
| | | long HSUPPLYID = mainList2[0].HSUPPLYID == null ? 0 : mainList2[0].HSUPPLYID; |
| | | long HSETTLEID = mainList2[0].HSETTLEID == null ? 0 : mainList2[0].HSETTLEID; |
| | | long HCHARGEID = mainList2[0].HCHARGEID == null ? 0 : mainList2[0].HCHARGEID; |
| | | string HBUSINESSTYPE = mainList2[0].HBUSINESSTYPE == null ? "''" : mainList2[0].HBUSINESSTYPE; |
| | | string HSUPPLYADDRESS = mainList2[0].HSUPPLYADDRESS == null ? "''" : mainList2[0].HSUPPLYADDRESS; |
| | | long HPROVIDERCONTACTID = mainList2[0].HPROVIDERCONTACTID == null ? 0 : mainList2[0].HPROVIDERCONTACTID; |
| | | |
| | | // ds = oCN.RunProcReturn("select * from h_v_IF_ProductInBillList where hmainid=" + HInterID + " and åæ®å·='" + HBillNo + "'", "h_v_IF_ProductInBillList"); |
| | | // if ((OperationType == 1 || OperationType == 2 || OperationType == 4) && ds.Tables[0].Rows.Count == 0)//æ°å¢ |
| | | // { |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ProductionReturnList where hmainid=" + HInterID + " and åæ®å·='" + HBillNo + "'", "h_v_IF_ProductionReturnList"); |
| | | if ((OperationType == 1 || OperationType == 2 || OperationType == 4) && ds.Tables[0].Rows.Count == 0)//æ°å¢ |
| | | { |
| | | |
| | | // //ä¿ååæ§å¶========================================= |
| | | // ds = oCN.RunProcReturn("exec h_p_Kf_ProductInBill_BeforeSaveCtrl " + HInterID, "h_p_Kf_ProductInBill_BeforeSaveCtrl"); |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ProductionReturnBill_BeforeSaveCtrl " + HInterID, "h_p_Sc_ProductionReturnBill_BeforeSaveCtrl"); |
| | | |
| | | // if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // //========================================================= |
| | | // //主表 |
| | | // string sql = $@"Insert Into Kf_ICStockBillMain |
| | | // (HInterID,HYear,HPeriod,HBillType,HBillSubType,HDate |
| | | // ,HBillNo,HBillStatus,HSupID,HManagerID,HEmpID,HDeptID,HSecManagerID,HKeeperID,HRemark,HMaker,HMakeDate,HCurID,HExRate,HWHID,HInnerBillNo,HExplanation ) |
| | | // values(" + HInterID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + 1202 + "','" + |
| | | // HBillSubType + "','" + HDate + "','" + HBillNo + "'," + HBillStatus + "," + HSupID + |
| | | // "," + HManagerID + "," + HEmpID + "," + HDeptID + "," + HSecManagerID + "," + HKeeperID + ",'" + HRemark + "','" + HMaker + |
| | | // "',getdate()" + "," + HCurID + "," + HExRate + "," + HWHID + ",'" + HInnerBillNo + "','" + HExplanation + "')"; |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | //主表 |
| | | string sql = $@"Insert Into Kf_ICStockBillMain |
| | | (HInterID,HYear,HPeriod,HBillType,HBillSubType,HDate |
| | | ,HBillNo,HBillStatus,HSupID,HManagerID,HEmpID,HDeptID,HSecManagerID,HKeeperID,HRemark,HMaker,HMakeDate,HCurID,HExRate,HWHID,HInnerBillNo,HExplanation ) |
| | | values(" + HInterID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + 1245 + "','" + |
| | | HBillSubType + "','" + HDate + "','" + HBillNo + "'," + HBillStatus + "," + HSupID + |
| | | "," + HManagerID + "," + HEmpID + "," + HDeptID + "," + HSecManagerID + "," + HKeeperID + ",'" + HRemark + "','" + HMaker + |
| | | "',getdate()" + "," + HCurID + "," + HExRate + "," + HWHID + ",'" + HInnerBillNo + "','" + HExplanation + "')"; |
| | | |
| | | // oCN.RunProc(sql); |
| | | oCN.RunProc(sql); |
| | | |
| | | // } |
| | | // else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) |
| | | // { //ä¿®æ¹ |
| | | // string sql = $@"update Kf_ICStockBillMain set " + |
| | | // "HRemark='" + HRemark + "', HUpDater ='" + HMaker + "', HUpDateDate=getdate()" + |
| | | // ",HSupID=" + HSupID + ",HCurID=" + HCurID |
| | | // + ",HExRate=" + HExRate + ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID |
| | | // + ",HInnerBillNo='" + HInnerBillNo + "' where HInterID=" + HInterID; |
| | | } |
| | | else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) |
| | | { //ä¿®æ¹ |
| | | string sql = $@"update Kf_ICStockBillMain set " + |
| | | "HRemark='" + HRemark + "', HUpDater ='" + HMaker + "', HUpDateDate=getdate()" + |
| | | ",HSupID=" + HSupID + ",HCurID=" + HCurID |
| | | + ",HExRate=" + HExRate + ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID |
| | | + ",HInnerBillNo='" + HInnerBillNo + "' where HInterID=" + HInterID; |
| | | |
| | | // oCN.RunProc(sql); |
| | | oCN.RunProc(sql); |
| | | |
| | | |
| | | // //å é¤å表 |
| | | // oCN.RunProc("delete from Kf_ICStockBillSub where HInterID='" + HInterID + "'"); |
| | | // } |
| | | // //ä¿åå表 |
| | | // objJsonResult = AddBillSub(msg3, HInterID, OperationType, user); |
| | | //å é¤å表 |
| | | oCN.RunProc("delete from Kf_ICStockBillSub where HInterID='" + HInterID + "'"); |
| | | } |
| | | //ä¿åå表 |
| | | objJsonResult = AddBillSub(msg3, HInterID, OperationType, user); |
| | | |
| | | // //ç产å
¥åºåæ°å¢åå¡«ç产订åå
³èæ°é |
| | | // oCN.RunProc("exec h_p_Kf_UpDateRelation_ProductInToICMO_Add " + HInterID); |
| | | //ç产éåºåæ°å¢åå¡«ç产订åå
³èæ°é |
| | | oCN.RunProc("exec h_p_Sc_UpDateRelation_ProductionReturnToICMO_Add " + HInterID); |
| | | |
| | | // //ç产å
¥åºåæ°å¢åå¡«çäº§æ±æ¥åå
³èæ°é |
| | | // oCN.RunProc("exec h_p_Kf_UpDateRelation_ProductInToICMOReport_Add " + HInterID); |
| | | //ç产éåºåæ°å¢åå¡«çäº§æ±æ¥åå
³èæ°é |
| | | oCN.RunProc("exec h_p_Sc_UpDateRelation_ProductionReturnToICMOReport_Add " + HInterID); |
| | | |
| | | // if (objJsonResult.code == "0") |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = objJsonResult.Message; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | if (objJsonResult.code == "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = objJsonResult.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | // objJsonResult.code = "1"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = null; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | //} |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = null; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | //public json AddBillSub(string msg3, long HInterID, int OperationType, string user) |
| | | //{ |
| | | // List<ClsKf_ProductInBillSub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsKf_ProductInBillSub>>(msg3); |
| | | public json AddBillSub(string msg3, long HInterID, int OperationType, string user) |
| | | { |
| | | List<ClsSc_ProductionReturnBillSub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_ProductionReturnBillSub>>(msg3); |
| | | |
| | | // List<ClsKf_ProductInBillSub> DetailColl2 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsKf_ProductInBillSub>>(msg3); |
| | | List<ClsSc_ProductionReturnBillSub> DetailColl2 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsSc_ProductionReturnBillSub>>(msg3); |
| | | |
| | | |
| | | // //long HSPID = DetailColl2[0].HSPID == null ? 0 : DetailColl2[0].HSPID; |
| | | // long HSourceInterID = DetailColl2[0].HSourceInterID == null ? 0 : DetailColl2[0].HSourceInterID; |
| | | // long HSourceEntryID = DetailColl2[0].HSourceEntryID == null ? 0 : DetailColl2[0].HSourceEntryID; |
| | | // string HSourceBillNo = DetailColl2[0].HSourceBillNo == null ? "''" : DetailColl2[0].HSourceBillNo; |
| | | // string HSourceBillType = DetailColl2[0].HSourceBillType == null ? "''" : DetailColl2[0].HSourceBillType; |
| | | // string HRemark = DetailColl2[0].HRemark == null ? "''" : DetailColl2[0].HRemark; |
| | | // string HPOOrderBillNo = DetailColl2[0].HPOOrderBillNo == null ? "''" : DetailColl2[0].HPOOrderBillNo; |
| | | //long HSPID = DetailColl2[0].HSPID == null ? 0 : DetailColl2[0].HSPID; |
| | | long HSourceInterID = DetailColl2[0].HSourceInterID == null ? 0 : DetailColl2[0].HSourceInterID; |
| | | long HSourceEntryID = DetailColl2[0].HSourceEntryID == null ? 0 : DetailColl2[0].HSourceEntryID; |
| | | string HSourceBillNo = DetailColl2[0].HSourceBillNo == null ? "''" : DetailColl2[0].HSourceBillNo; |
| | | string HSourceBillType = DetailColl2[0].HSourceBillType == null ? "''" : DetailColl2[0].HSourceBillType; |
| | | string HRemark = DetailColl2[0].HRemark == null ? "''" : DetailColl2[0].HRemark; |
| | | string HPOOrderBillNo = DetailColl2[0].HPOOrderBillNo == null ? "''" : DetailColl2[0].HPOOrderBillNo; |
| | | |
| | | // int i = 0; |
| | | // foreach (ClsKf_ProductInBillSub oSub in DetailColl) |
| | | // { |
| | | // i++; |
| | | // if (oSub.HQty <= 0 || oSub.HQty == null) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "第" + i + "è¡ï¼æ°éä¸è½ä¸º0æè
å°äº0"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | int i = 0; |
| | | foreach (ClsSc_ProductionReturnBillSub oSub in DetailColl) |
| | | { |
| | | i++; |
| | | if (oSub.HQty <= 0 || oSub.HQty == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + i + "è¡ï¼æ°éä¸è½ä¸º0æè
å°äº0"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | // if (oSub.HMaterID == 0) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "第" + i + "è¡ï¼ç©æä¸è½ä¸ºç©º"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | if (oSub.HMaterID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + i + "è¡ï¼ç©æä¸è½ä¸ºç©º"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | // //if (oSub.HSourceID == 0) |
| | | // //{ |
| | | // // objJsonResult.code = "0"; |
| | | // // objJsonResult.count = 0; |
| | | // // objJsonResult.Message = "第" + i + "è¡ï¼çäº§èµæºä¸è½ä¸ºç©º"; |
| | | // // objJsonResult.data = null; |
| | | // // return objJsonResult; |
| | | // //} |
| | | //if (oSub.HSourceID == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "第" + i + "è¡ï¼çäº§èµæºä¸è½ä¸ºç©º"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | // if (oSub.HUnitID == 0) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "第" + i + "è¡ï¼è®¡éåä½ä¸è½ä¸ºç©º"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | if (oSub.HUnitID == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "第" + i + "è¡ï¼è®¡éåä½ä¸è½ä¸ºç©º"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | // DataSet Cs; |
| | | // Int64 NewHEntryID = 1; |
| | | // Cs = oCN.RunProcReturn("select MAX(HEntryID)HEntryID from Kf_ICStockBillSub", "Kf_ICStockBillSub"); |
| | | // if (Cs.Tables[0].Rows.Count != 0 && ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()) != 0) |
| | | // { |
| | | // NewHEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()); |
| | | // NewHEntryID += 1; |
| | | // } |
| | | DataSet Cs; |
| | | Int64 NewHEntryID = 1; |
| | | Cs = oCN.RunProcReturn("select MAX(HEntryID)HEntryID from Kf_ICStockBillSub", "Kf_ICStockBillSub"); |
| | | if (Cs.Tables[0].Rows.Count != 0 && ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()) != 0) |
| | | { |
| | | NewHEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()); |
| | | NewHEntryID += 1; |
| | | } |
| | | |
| | | |
| | | // oCN.RunProc($@"Insert into Kf_ICStockBillSub |
| | | // (HInterID,HEntryID,HMaterID,HUnitID,HQtyMust,HQty,HPrice |
| | | // ,HMoney,HWHID,HSPID,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HPOOrderInterID |
| | | // ,HPOOrderEntryID,HPOORderBillNo,HSecUnitID,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo,HRelationQty,HSecUnitRate,HPropertyID) |
| | | // values({HInterID},{NewHEntryID},{oSub.HMaterID},{oSub.HUnitID},{(oSub.HQtyMust == null ? 0 : oSub.HQtyMust)},{(oSub.HQty == null ? 0 : oSub.HQty)} |
| | | // ,{oSub.HPrice},{oSub.HMoney},{oSub.HWHID},{oSub.HSPID},'{HRemark}',{oSub.HSourceInterID},{oSub.HSourceEntryID},'{HSourceBillNo}',{HSourceBillType}, |
| | | // {oSub.HPOOrderInterID},{oSub.HPOOrderEntryID},'{HPOOrderBillNo}',{oSub.HSecUnitID},{oSub.HSeOrderInterID},{oSub.HSeOrderEntryID},'{oSub.HSeOrderBillNo}',{oSub.HRelationQty},{oSub.HSecUnitRate},{oSub.HSecUnitRate})"); |
| | | oCN.RunProc($@"Insert into Kf_ICStockBillSub |
| | | (HInterID,HEntryID,HMaterID,HUnitID,HQtyMust,HQty,HPrice |
| | | ,HMoney,HWHID,HSPID,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HPOOrderInterID |
| | | ,HPOOrderEntryID,HPOORderBillNo,HSecUnitID,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo,HRelationQty,HSecUnitRate,HPropertyID) |
| | | values({HInterID},{NewHEntryID},{oSub.HMaterID},{oSub.HUnitID},{(oSub.HQtyMust == null ? 0 : oSub.HQtyMust)},{(oSub.HQty == null ? 0 : oSub.HQty)} |
| | | ,{oSub.HPrice},{oSub.HMoney},{oSub.HWHID},{oSub.HSPID},'{HRemark}',{oSub.HSourceInterID},{oSub.HSourceEntryID},'{HSourceBillNo}',{HSourceBillType}, |
| | | {oSub.HPOOrderInterID},{oSub.HPOOrderEntryID},'{HPOOrderBillNo}',{oSub.HSecUnitID},{oSub.HSeOrderInterID},{oSub.HSeOrderEntryID},'{oSub.HSeOrderBillNo}',{oSub.HRelationQty},{oSub.HSecUnitRate},{oSub.HSecUnitRate})"); |
| | | |
| | | // } |
| | | // //ä¿ååæ§å¶========================================= |
| | | // ds = oCN.RunProcReturn("exec h_p_Kf_ProductInBill_AfterSaveCtrl " + HInterID, "h_p_Kf_ProductInBill_AfterSaveCtrl"); |
| | | } |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ProductionReturnBill_AfterSaveCtrl " + HInterID, "h_p_Sc_ProductionReturnBill_AfterSaveCtrl"); |
| | | |
| | | // if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // //========================================================= |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | |
| | | // objJsonResult.code = "1"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = null; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //#endregion |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = null; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region ç产éåºå å®¡æ ¸/åå®¡æ ¸ |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="IsAudit">å®¡æ ¸(0),åå®¡æ ¸(1)</param> |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_ProductionReturn/AuditSc_ProductionReturn")] |
| | | [HttpGet] |
| | | public object AuditSc_ProductionReturn(string HInterID, int Type, string user) |
| | | public object AuditSc_ProductionReturn(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "Kf_ProductionReturnBill_Check"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | | //夿æ¯å¦æå®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_ProductionReturn_Check", 1, false, user)) |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéå®¡æ ¸!"; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //HInterIDæ°æ®å¤æ |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterIDå°äº0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (string.IsNullOrWhiteSpace(HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ClsPub.CurUserName = user; |
| | | BillOld.MvarItemKey = "Kf_ICStockBillMain"; |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterIDè¿è¡ç±»åçè½¬æ¢ |
| | | DAL.ClsSc_ProductionReturnBill oBill = new DAL.ClsSc_ProductionReturnBill(); //å®ä¾ååæ®æä½ç±»ï¼ç¨äºè¿è¡ç¸å
³æä½ |
| | | |
| | | //Type 1 å®¡æ ¸ 2 åå®¡æ ¸ |
| | | if (Type == 1) |
| | | //é对éè¦è¿è¡çæä½ï¼æ£éªå½ååæ®çç¶ææ¯å¦æ¯æéè¦è¿è¡çæä½ |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //æ ¹æ®HInterIDè·åè¯¥åæ®çæ°æ® |
| | | { |
| | | //夿忮æ¯å¦å·²ç»å®¡æ ¸ |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | if (oBill.omodel.HCloseMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨ï¼"; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (IsAudit == 0) //å®¡æ ¸å¤æ |
| | | { |
| | | if (oBill.omodel.HChecker.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å®¡æ ¸åæ® |
| | | if (!BillOld.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //夿忮æ¯å¦å·²ç»åå®¡æ ¸ |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | if (IsAudit == 1) //åå®¡æ ¸å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCloseMan"] != null && ds.Tables[0].Rows[0]["HCloseMan"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½è¿è¡åå®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HDeleteMan"] != null && ds.Tables[0].Rows[0]["HDeleteMan"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½è¿è¡åå®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "") |
| | | if (oBill.omodel.HChecker.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åå®¡æ ¸åæ® |
| | | if (!BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ§è¡æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | //è¿è¡éè¦è¿è¡çå®¡æ ¸/åå®¡æ ¸æä½ |
| | | if (IsAudit == 0) //å®¡æ ¸æäº¤ |
| | | { |
| | | |
| | | //å®¡æ ¸åæ§å¶========================================= |
| | | string sql1 = "exec h_p_Sc_ProductionReturnBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Sc_ProductionReturnBill_BeforeCheckCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :å®¡æ ¸åå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | //å®¡æ ¸æäº¤ |
| | | if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Sc_ProductionReturnBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå®¡æ ¸æäº¤ |
| | | { |
| | | //åå®¡æ ¸åæ§å¶========================================= |
| | | DataSet ds = oCN.RunProcReturn("Exec h_p_Sc_ProductionReturnBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'", "h_p_Sc_ProductionReturnBill_BeforeUnCheckCtrl"); |
| | | if (ds == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + "åå®¡æ ¸åå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | |
| | | //åå®¡æ ¸æäº¤AbandonCheck |
| | | if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Sc_ProductionReturnBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ§è¡å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥æè
åå®¡æ ¸å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | try |
| | | { |
| | | //夿æ¯å¦æå 餿é |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_ProductionReturn_Close", 1, false, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Kf_ProductionReturnBill_Close", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region éè´å
¥åºå ä½åº/åä½åºåè½ |
| | | #region ç产éåºå ä½åº/åä½åºåè½ |
| | | [Route("Sc_ProductionReturn/DropSc_ProductionReturn")] |
| | | [HttpGet] |
| | | public object DropSc_ProductionReturn(string HInterID, int Type, string user) |
| | |
| | | try |
| | | { |
| | | //夿æ¯å¦æä½åºæé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_ProductionReturn_Delete", 1, false, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Kf_ProductionReturnBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region æ ¹æ®ç©æå
ç è·åç©æä¿¡æ¯ |
| | | [Route("Sc_ProductionReturnBill/getMaterialByMaterID")] |
| | | [HttpGet] |
| | | public ApiResult<DataTable> getMaterialByMaterID(Int64 HMaterID) |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | string sql = "select a.HItemID HMaterID,a.HNumber HMaterNumber,a.HName HMaterName,a.HMaterRuleType,a.HModel HMaterModel,a.HUnitID, b.HNumber HUnitNumber, b.HName HUnitName" + |
| | | " from Gy_Material AS a " + |
| | | " LEFT OUTER JOIN Gy_Unit AS b on a.HUnitID = b.HItemID " + |
| | | " where a.HItemID =" + HMaterID; |
| | | |
| | | var dataSet = oCN.RunProcReturn(sql, "Gy_Material"); |
| | | |
| | | |
| | | if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) |
| | | return new ApiResult<DataTable> { code = -1, msg = "ä¸åå¨è¯¥ç©æ" }; |
| | | |
| | | return new ApiResult<DataTable> { code = 1, msg = "æ¥è¯¢æå", data = dataSet.Tables[0] }; |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region ä¸è¯åè¯å®¡ç»è®ºå |
| | | |
| | | #region ä¸è¯åè¯å®¡ç»è®ºå æ°å¢/ç¼è¾ |
| | | [Route("Sc_ProcessMangement/SaveQC_NoPassProdConclusionBill")] |
| | | [HttpPost] |
| | | public object SaveQC_NoPassProdConclusionBill([FromBody] JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | //string msg3 = sArray[1].ToString(); //å表 |
| | | string refSav = sArray[1].ToString();//æä½æ¹å¼æ°æ®ç±»å 1æ·»å 3ä¿®æ¹ 2 å¤å¶ |
| | | string msg4 = sArray[2].ToString();//ç¨æ·å |
| | | |
| | | DBUtility.ClsPub.CurUserName = msg4; |
| | | |
| | | string UserName = ""; |
| | | string s = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("QC_NoPassProdConclusionBillMain_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | // QC_NoPassProdConclusionBill |
| | | DAL.ClsQC_NoPassProdConclusionBill oBill = new DAL.ClsQC_NoPassProdConclusionBill(); |
| | | List<Model.ClsQC_NoPassProdConclusionBillMain> lsmain = new List<Model.ClsQC_NoPassProdConclusionBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_QC_NoPassProdConclusionBill(msg2); |
| | | foreach (Model.ClsQC_NoPassProdConclusionBillMain oItem in lsmain) |
| | | { |
| | | if (refSav == "Add") |
| | | { |
| | | //忮巿¯å¦éå¤ |
| | | if (oBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·éå¤ï¼ä¸å
许ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (refSav == "Update") |
| | | { |
| | | if (oBill.ShowBill(oItem.HInterID, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®æè¯¯ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //夿æ¯å¦å¯ç¼è¾ |
| | | if (oBill.omodel.HChecker != "" && oBill.omodel.HChecker != null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®å·²ç»è¢«å®¡æ ¸ï¼ä¸å
许修æ¹ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HBillStatus > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®å¤äºä¸å¯ç¼è¾ç¶æï¼ä¸å
许修æ¹ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(oBill, ref s)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s + "ï¼ä¸å
许修æ¹"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | UserName = oItem.HMaker; //å¶å人 |
| | | oItem.HBillType = "7513"; |
| | | oItem.HBillSubType = "7513"; |
| | | |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿åå¤±è´¥ï¼æ²¡æåæ®æ¥æï¼æ æ³ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oBill.omodel = oItem; |
| | | } |
| | | |
| | | //ä¿å |
| | | //ä¿å宿¯åéªæ¶ |
| | | bool bResult; |
| | | if (refSav == "Add") |
| | | { |
| | | |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else if (refSav == "Update") |
| | | { |
| | | bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | | { |
| | | bResult = false; |
| | | } |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ä¸è¯åè¯å®¡ç»è®ºå ç¼è¾åæ¾å表 |
| | | |
| | | [Route("Sc_ProcessMangement/Edit_QC_NoPassProdConclusionBill")] |
| | | [HttpGet] |
| | | public object Edit_QC_NoPassProdConclusionBill(string HID) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | string sql = "select * from h_v_QC_NoPassProdConclusionBillMain_Edit where hmainid='" + HID + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_QC_NoPassProdConclusionBillMain_Edit"); |
| | | |
| | | //æ·»å åå |
| | | 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 ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ä¸è¯åè¯å®¡ç»è®ºå å表 |
| | | |
| | | [Route("Sc_ProcessMangement/Get_QC_NoPassProdConclusionBillList")] |
| | | [HttpGet] |
| | | public object Get_QC_NoPassProdConclusionBillList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_NoPassProdConclusionBillMain_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | string sql = "select * from h_v_QC_NoPassProdConclusionBillMainList order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_QC_NoPassProdConclusionBillMainList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_QC_NoPassProdConclusionBillMainList where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_QC_NoPassProdConclusionBillMainList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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 ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ä¸è¯åè¯å®¡ç»è®ºå å é¤ |
| | | |
| | | [Route("Sc_ProcessMangement/DeleteQC_NoPassProdConclusionBill")] |
| | | [HttpGet] |
| | | public object DeleteQC_NoPassProdConclusionBill(string HInterID, string user) |
| | | { |
| | | try |
| | | { |
| | | string s = ""; |
| | | DAL.ClsQC_NoPassProdConclusionBill BillOld = new DAL.ClsQC_NoPassProdConclusionBill(); |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_NoPassProdConclusionBillMain_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (HInterID == null || HInterID.Equals("")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterIDä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®æè¯¯ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //夿æ¯å¦å¯å é¤ |
| | | if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®å·²ç»è¢«å®¡æ ¸ï¼ä¸å
许å é¤ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //å é¤åæ§å¶========================================= |
| | | string sql1 = "exec h_p_QC_NoPassProdConclusionBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_QC_NoPassProdConclusionBill_BeforeDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å é¤å¤±è´¥!åå :å é¤åå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å é¤å¤±è´¥!åå :" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | |
| | | oCN.BeginTran(); |
| | | |
| | | oCN.RunProc("delete from QC_NoPassProdConclusionBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("delete from QC_NoPassProdConclusionBillSub where HInterID= " + HInterID); |
| | | |
| | | //å é¤åæ§å¶================================================================================== |
| | | string sql2 = "exec h_p_QC_NoPassProdConclusionBill_AfterDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_QC_NoPassProdConclusionBill_AfterDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | s = "å é¤åå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å é¤å¤±è´¥!åå :" + s; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | s = ds.Tables[0].Rows[0]["HRemark"].ToString(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å é¤å¤±è´¥!åå :" + s; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //============================================================================================== |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿å"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ä¸è¯åè¯å®¡ç»è®ºå å®¡æ ¸/åå®¡æ ¸ |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="IsAudit">å®¡æ ¸(0),åå®¡æ ¸(1)</param> |
| | | /// <param name="CurUserName">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Sc_ProcessMangement/AuditQC_NoPassProdConclusionBill")] |
| | | [HttpGet] |
| | | public object AuditQC_NoPassProdConclusionBill(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "QC_NoPassProdConclusionBillMain_Check"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //HInterIDæ°æ®å¤æ |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterIDå°äº0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterIDè¿è¡ç±»åçè½¬æ¢ |
| | | DAL.ClsQC_NoPassProdConclusionBill oBill = new DAL.ClsQC_NoPassProdConclusionBill(); //å®ä¾ååæ®æä½ç±»ï¼ç¨äºè¿è¡ç¸å
³æä½ |
| | | |
| | | //é对éè¦è¿è¡çæä½ï¼æ£éªå½ååæ®çç¶ææ¯å¦æ¯æéè¦è¿è¡çæä½ |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //æ ¹æ®HInterIDè·åè¯¥åæ®çæ°æ® |
| | | { |
| | | if (oBill.omodel.HCloseMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (IsAudit == 0) //å®¡æ ¸å¤æ |
| | | { |
| | | if (oBill.omodel.HChecker.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå®¡æ ¸å¤æ |
| | | { |
| | | if (oBill.omodel.HChecker.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå®¡æ ¸!ä¸éè¦åå®¡æ ¸!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | //è¿è¡éè¦è¿è¡çå®¡æ ¸/åå®¡æ ¸æä½ |
| | | if (IsAudit == 0) //å®¡æ ¸æäº¤ |
| | | { |
| | | oCN.BeginTran(); |
| | | |
| | | //è®°å½è¿åä¿¡æ¯ |
| | | string msg = ""; |
| | | |
| | | |
| | | //å®¡æ ¸åæ§å¶========================================= |
| | | string sql1 = "exec h_p_QC_NoPassProdConclusionBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_QC_NoPassProdConclusionBill_BeforeCheckCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :å®¡æ ¸åå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | //å®¡æ ¸æäº¤ |
| | | if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_QC_NoPassProdConclusionBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æåï¼" + msg; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | oCN.RollBack(); |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå®¡æ ¸æäº¤ |
| | | { |
| | | |
| | | //åå®¡æ ¸åæ§å¶========================================= |
| | | string sql1 = "exec h_p_QC_NoPassProdConclusionBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_QC_NoPassProdConclusionBill_BeforeUnCheckCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :åå®¡æ ¸åå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //=========================================================== |
| | | |
| | | //åå®¡æ ¸æäº¤AbandonCheck |
| | | if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_QC_NoPassProdConclusionBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥æè
åå®¡æ ¸å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ä¸è¯åè¯å®¡ç»è®ºå å
³é/åå
³é |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="IsAudit">å
³é(0),åå
³é(1)</param> |
| | | /// <param name="CurUserName">å
³é人</param> |
| | | /// <returns></returns> |
| | | [Route("Sc_ProcessMangement/CloseQC_NoPassProdConclusionBill")] |
| | | [HttpGet] |
| | | public object CloseQC_NoPassProdConclusionBill(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "QC_NoPassProdConclusionBillMain_Close"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | | //æ£æ¥æé |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å
³éå¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //HInterIDæ°æ®å¤æ |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterIDå°äº0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterIDè¿è¡ç±»åçè½¬æ¢ |
| | | DAL.ClsQC_NoPassProdConclusionBill oBill = new DAL.ClsQC_NoPassProdConclusionBill(); //å®ä¾ååæ®æä½ç±»ï¼ç¨äºè¿è¡ç¸å
³æä½ |
| | | |
| | | //é对éè¦è¿è¡çæä½ï¼æ£éªå½ååæ®çç¶ææ¯å¦æ¯æéè¦è¿è¡çæä½ |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //æ ¹æ®HInterIDè·åè¯¥åæ®çæ°æ® |
| | | { |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½è¿è¡å
³éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HChecker.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå®¡æ ¸!ä¸è½è¿è¡å
³éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (IsAudit == 0) //å
³é夿 |
| | | { |
| | | if (oBill.omodel.HCloseMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½å次å
³éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå
³é夿 |
| | | { |
| | | if (oBill.omodel.HCloseMan.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå
³é!ä¸éè¦åå
³éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | //è¿è¡éè¦è¿è¡çå
³é/åå
³éæä½ |
| | | if (IsAudit == 0) //å
³éæäº¤ |
| | | { |
| | | //å
³éæäº¤ |
| | | if (oBill.CloseBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å
³éæå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å
³é失败!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå
³éæäº¤ |
| | | { |
| | | //åå
³éæäº¤ |
| | | if (oBill.CancelClose(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå
³éæå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå
³é失败!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å
³é失败æè
åå
³é失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ä¸è¯åè¯å®¡ç»è®ºå ä½åº/åä½åº |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="IsAudit">ä½åº(0),åä½åº(1)</param> |
| | | /// <param name="CurUserName">ä½åºäºº</param> |
| | | /// <returns></returns> |
| | | [Route("Sc_ProcessMangement/DeleteQC_NoPassProdConclusionBill")] |
| | | [HttpGet] |
| | | public object DeleteQC_NoPassProdConclusionBill(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "QC_NoPassProdConclusionBillMain_Drop"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | | //æ£æ¥æé |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä½åºå¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //HInterIDæ°æ®å¤æ |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterIDå°äº0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterIDè¿è¡ç±»åçè½¬æ¢ |
| | | DAL.ClsQC_NoPassProdConclusionBill oBill = new DAL.ClsQC_NoPassProdConclusionBill(); //å®ä¾ååæ®æä½ç±»ï¼ç¨äºè¿è¡ç¸å
³æä½ |
| | | |
| | | //é对éè¦è¿è¡çæä½ï¼æ£éªå½ååæ®çç¶ææ¯å¦æ¯æéè¦è¿è¡çæä½ |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //æ ¹æ®HInterIDè·åè¯¥åæ®çæ°æ® |
| | | { |
| | | if (oBill.omodel.HChecker.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸!ä¸è½è¿è¡ä½åºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (IsAudit == 0) //ä½åºå¤æ |
| | | { |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½åä½åºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åä½åºå¤æ |
| | | { |
| | | if (oBill.omodel.HDeleteMan.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªä½åº!ä¸éè¦åä½åºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | //è¿è¡éè¦è¿è¡çä½åº/åä½åºæä½ |
| | | if (IsAudit == 0) //ä½åºæäº¤ |
| | | { |
| | | //ä½åºæäº¤ |
| | | if (oBill.Cancelltion(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä½åºæå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä½åºå¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå
³éæäº¤ |
| | | { |
| | | //åå
³éæäº¤ |
| | | if (oBill.AbandonCancelltion(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åä½åºæå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åä½åºå¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä½åºå¤±è´¥æè
åä½åºå¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åçäº§èµæºå表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetSouceList_Json")] |
| | | [HttpGet] |
| | | public object GetSouceList_Json(string HMaterID,string Value, Int64 HOrgID) |
| | | { |
| | | sWhere = " and HStopFlag=0 and HUSEORGID =" + HOrgID + ""; |
| | | if (Value != "" && Value != null) |
| | | { |
| | | sWhere = sWhere + " and ( HNumber like '%" + Value + "%' or HName like '%" + Value + "%' or HUSEORGID like '%" + HOrgID + "%' ) "; |
| | | } |
| | | try |
| | | { |
| | | string sql = "EXEC h_p_Gy_SouceViewList " + HMaterID+",'"+ sWhere + "'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_Gy_SouceViewList"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åæå!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è·åèåå表 |
| | | /// </summary> |
| | |
| | | ",HSubjoin,HSubjoin2,HColor,HVersion,HEngName,HEngModel,HPropertyTypeID,HSPGroupID,HSPID,HMinPickQty,HUSEORGID,HERPItemID" + |
| | | ",HSALEUNITID,HSALEPRICEUNITID,HBASEUNITID,HSTOREUNITID,HCHECKINCOMING,HCHECKPRODUCT,HPERUNITSTANDHOUR" + |
| | | ",HSTDLABORPREPARETIME,HSTDMACHINEPREPARETIME,HWidth,HWeight,HColorRemark,HQCSchemeID_Fst,HQCSchemeID_Proc,HQCSchemeID_Patrol" + |
| | | ",HMaterRuleType,HColorNo,HPieceMaxQty) " + |
| | | ",HMaterRuleType,HColorNo,HPieceMaxQty,HCommonUseFlag,HAvgStockPrice,HFootPrice,HTaxCost,HNoTaxCost) " + |
| | | " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() + |
| | | ", " + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "'" + |
| | | ",'" + oModel.HModel + "'," + oModel.HUnitID.ToString() + "," + oModel.HMaterClsID.ToString() + "," + oModel.HMaterTypeID.ToString() + "," + oModel.HUnitGroupID.ToString() + |
| | |
| | | ", " + oModel.HKeepDays.ToString() + "," + oModel.HPlanPrice.ToString() + "," + oModel.HstdPrice.ToString() + "," + oModel.HQtyMin.ToString() + "," + oModel.HQtyMax.ToString() + |
| | | ",'" + oModel.HSubjoin + "','" + oModel.HSubjoin2 + "','" + oModel.HColor + "','" + oModel.HVersion + "','" + oModel.HEngName + "','" + oModel.HEngModel + "'," + oModel.HPropertyTypeID.ToString() + "," + oModel.HSPGroupID.ToString() + "," + oModel.HSPID.ToString() + "," + oModel.HMinPickQty.ToString() + "," + oModel.HUSEORGID + "," + oModel.HERPItemID + "," + oModel.HSALEUNITID + "," + oModel.HSALEPRICEUNITID + "," + oModel.HBASEUNITID + "," + oModel.HSTOREUNITID + "," + oModel.HCHECKINCOMING + "," + oModel.HCHECKPRODUCT + "," + oModel.HPERUNITSTANDHOUR + "," + oModel.HSTDLABORPREPARETIME + "," + oModel.HSTDMACHINEPREPARETIME + ","+ oModel.HWidth + "," + oModel.HWeight + ",'"+ oModel.HColorRemark + "'," + oModel.HQCSchemeID_Fst + "," |
| | | + oModel.HQCSchemeID_Proc + "," + oModel.HQCSchemeID_Patrol + "" + |
| | | ",'"+ oModel.HMaterRuleType + "','"+ oModel.HColorNo + "','" + oModel.HPieceMaxQty.ToString() + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | ",'"+ oModel.HMaterRuleType + "','"+ oModel.HColorNo + "','" + oModel.HPieceMaxQty.ToString() + "','" + oModel.HCommonUseFlag.ToString() + "','" + oModel.HAvgStockPrice.ToString() + "','" + oModel.HFootPrice.ToString() + "','" + oModel.HTaxCost.ToString() + "','" + oModel.HNoTaxCost.ToString() + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.Commit(); |
| | |
| | | ",HWhID,HRoutingID,HBomID,HSecUnitID,HSecUnitRate" + |
| | | ",HHighStock,HLowStock,HSafeStock,HOrderPrice,HSalePrice" + |
| | | ",HKeepDays,HPlanPrice,HstdPrice,HQtyMin,HQtyMax" + |
| | | ",HSubjoin,HSubjoin2,HColor,HVersion,HEngName,HEngModel,HPropertyTypeID,HSPGroupID,HSPID,HMinPickQty,HCREATEORGID,HUSEORGID,HERPItemID,HBatchManager,HOldMaterNumber,HPieceMaxQty) " + |
| | | ",HSubjoin,HSubjoin2,HColor,HVersion,HEngName,HEngModel,HPropertyTypeID,HSPGroupID,HSPID,HMinPickQty,HCREATEORGID,HUSEORGID,HERPItemID,HBatchManager,HOldMaterNumber,HPieceMaxQty,HCommonUseFlag,HAvgStockPrice,HFootPrice,HTaxCost,HNoTaxCost) " + |
| | | " Values('" + oModel.HItemID + "','" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() + |
| | | ", " + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "'" + |
| | | ",'" + oModel.HModel + "'," + oModel.HUnitID.ToString() + "," + oModel.HMaterClsID.ToString() + "," + oModel.HMaterTypeID.ToString() + "," + oModel.HUnitGroupID.ToString() + |
| | | ", " + oModel.HWhID.ToString() + "," + oModel.HRoutingID.ToString() + "," + oModel.HBomID.ToString() + "," + oModel.HSecUnitID.ToString() + "," + oModel.HSecUnitRate.ToString() + |
| | | ", " + oModel.HHighStock.ToString() + "," + oModel.HLowStock.ToString() + "," + oModel.HSafeStock.ToString() + "," + oModel.HOrderPrice.ToString() + ",'" + oModel.HSalePrice + "'" + |
| | | ", " + oModel.HKeepDays.ToString() + "," + oModel.HPlanPrice.ToString() + "," + oModel.HstdPrice.ToString() + "," + oModel.HQtyMin.ToString() + "," + oModel.HQtyMax.ToString() + |
| | | ",'" + oModel.HSubjoin + "','" + oModel.HSubjoin2 + "','" + oModel.HColor + "','" + oModel.HVersion + "','" + oModel.HEngName + "','" + oModel.HEngModel + "'," + oModel.HPropertyTypeID.ToString() + "," + oModel.HSPGroupID.ToString() + "," + oModel.HSPID.ToString() + "," + oModel.HMinPickQty.ToString() + "," + oModel.HCREATEORGID + "," + oModel.HUSEORGID + "," + oModel.HERPItemID + "," + oModel.HBatchManager + ",'" + oModel.HOldMaterNumber + "','" + oModel.HPieceMaxQty.ToString() + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | ",'" + oModel.HSubjoin + "','" + oModel.HSubjoin2 + "','" + oModel.HColor + "','" + oModel.HVersion + "','" + oModel.HEngName + "','" + oModel.HEngModel + "'," + oModel.HPropertyTypeID.ToString() + "," + oModel.HSPGroupID.ToString() + "," + oModel.HSPID.ToString() + "," + oModel.HMinPickQty.ToString() + "," + oModel.HCREATEORGID + "," + oModel.HUSEORGID + "," + oModel.HERPItemID + "," + oModel.HBatchManager + ",'" + oModel.HOldMaterNumber + "','" + oModel.HPieceMaxQty.ToString() + "','" + oModel.HCommonUseFlag.ToString() + "','" + oModel.HAvgStockPrice.ToString() + "','" + oModel.HFootPrice.ToString() + "','" + oModel.HTaxCost.ToString() + "','" + oModel.HNoTaxCost.ToString() + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | sql = "set identity_insert gy_material off"; |
| | | oCn.RunProc(sql); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | |
| | | ",HQCSchemeID_Proc= " + oModel.HQCSchemeID_Proc + |
| | | ",HQCSchemeID_Patrol= " + oModel.HQCSchemeID_Patrol + |
| | | ",HPieceMaxQty=" + oModel.HPieceMaxQty.ToString() + |
| | | ",HCommonUseFlag=" + oModel.HCommonUseFlag.ToString() + |
| | | ",HAvgStockPrice=" + oModel.HAvgStockPrice.ToString() + |
| | | ",HFootPrice=" + oModel.HFootPrice.ToString() + |
| | | ",HTaxCost=" + oModel.HTaxCost.ToString() + |
| | | ",HNoTaxCost=" + oModel.HNoTaxCost.ToString() + |
| | | ",HSTDMACHINEPREPARETIME=" + oModel.HSTDMACHINEPREPARETIME.ToString() + "Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹å项ç®ä»£ç |
| | | oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | |
| | | try |
| | | { |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | //主表 |
| | |
| | | ",HContext,HDeptID,HDescription,HSendMan,HReceiveMan" + |
| | | ",HCopyMan,HHasten,HLevel,HReTransmitMan,HBillTypeName"+ |
| | | ",HPlanBillNo,HMaterName,HMaterModel,HQty,HSendType"+ |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRecDeptID,HMaterNumber" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRecDeptID,HMaterNumber,HErrMsgBackTypeID" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | |
| | | ",'" + omodel.HCopyMan + "'," + omodel.HHasten.ToString() + ",'" + omodel.HLevel + "','" + omodel.HReTransmitMan + "','" + omodel.HBillTypeName + "'" + |
| | | ",'" + omodel.HPlanBillNo + "','" + omodel.HMaterName + "','" + omodel.HMaterModel + "'," + omodel.HQty.ToString() + ",'" + omodel.HSendType + "'" + |
| | | ",'" + omodel.HMainSourceInterID + "','" + omodel.HMainSourceEntryID + "','" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'" + |
| | | "," + omodel.HRecDeptID + ",'" + omodel.HMaterNumber + "'" + |
| | | "," + omodel.HRecDeptID + ",'" + omodel.HMaterNumber + "'," + omodel.HErrMsgBackTypeID + |
| | | ") "); |
| | | //æå
¥å表 |
| | | //foreach (Models.ClsOA_ErrMsgBackBillSub oSub in DetailColl) |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¤çæ°å¢ä¸è¯åè¯å®¡ç»è®ºå表çjson |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | | /// <returns></returns> |
| | | public List<Model.ClsQC_NoPassProdConclusionBillMain> getObjectByJson_QC_NoPassProdConclusionBill(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsQC_NoPassProdConclusionBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_NoPassProdConclusionBillMain>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¤çæ°å¢é¨é¨åºç¡èµæçJSON |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | |
| | | public string HColorNo;//é¢è²è²å· |
| | | public double HPieceMaxQty; //åä»¶æå¤§ä¸é |
| | | |
| | | public int HCommonUseFlag; // æ¯å¦ä¸å¸¸ç¨ææ |
| | | |
| | | public double HAvgStockPrice; // å æå¹³åä»· |
| | | |
| | | public double HFootPrice; // ç»ç®ä»· |
| | | |
| | | public double HTaxCost; // å«ç¨ææ¬ä»· |
| | | |
| | | public double HNoTaxCost; // ä¸å«ç¨ææ¬ä»· |
| | | |
| | | } |
| | | } |
| | |
| | | public Int64 HManagerID; // int --è´è´£äººï¼ä¸»ç®¡ï¼ |
| | | public Int64 HSecManagerID; // int --éªæ¶ |
| | | public Int64 HKeeperID; // int --ä¿ç®¡å |
| | | public Int64 HProjectID; // int --é¡¹ç® |
| | | public Int64 HDeptID; // int --é¨é¨ |
| | | public Int64 HCurID; // int --å¸å«( çé¢ä¸ä¸éè¦æ¾ç¤ºï¼å0è¿å») |
| | | public string HExplanation; // varchar(200) --ÕªÒª |
| | |
| | | public string HOWNERTYPEID; // varchar(100) --货主类å |
| | | public Int64 HOrgID; |
| | | public string HStockStyle; // varchar(100) --åºåç±»å |
| | | public string HInvoiceBillNo; // varchar(100) --å票ç¼å· |
| | | //æºåä¿¡æ¯ |
| | | public string HSourceBillNo; |
| | | public string HSourceBillType; |
| | |
| | | public Int64 HSourceInterID; |
| | | public Int64 HSourceEntryID; |
| | | public Int64 HAuxPropID; |
| | | public Int64 HlineTotal; |
| | | |
| | | public object HContainerNum { get; internal set; } |
| | | public object HPVC { get; internal set; } |
| | |
| | | |
| | | public string HMaterNumber;// varchar(100) ç©æç¼ç |
| | | public Int64 HRecDeptID;// int --æ¥æ¶é¨é¨ |
| | | |
| | | public Int64 HErrMsgBackTypeID; //å¼å¸¸ç±»å |
| | | } |
| | | } |
| | |
| | | public int HProcID; |
| | | public int HGroupID; |
| | | public int HSourceID; |
| | | public int HCheckEmpID; |
| | | } |
| | | } |
| | |
| | | <!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>--> |
| | | <!--<add key="FileIP" value="http://localhost:8080/" />--> |
| | | <!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/> --> |
| | | <add key="sUrl" value="http://192.168.63.53/WEBS-WMS/WebService1.asmx"/> <!--é¢å°å¼æº--> |
| | | <!--add key="sUrl" value="http://192.168.63.53/WEBS-WMS/WebService1.asmx"/> é¢å°å¼æº--> |
| | | <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> å¤å®--> |
| | | <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> --> |
| | | <!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/> åæ¥ç§æ--> |
| | |
| | | <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS-WMS/WebService1.asmx"/> å®çæå¡å¨--> |
| | | <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> --> <!--æµè¯æå¡å¨--> |
| | | <!--<add key="sUrl" value="http://localhost:8082/WEBS/WebService1.asmx"/> æ¬å°--> |
| | | <!--<add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/> éé¯éæ¬å°é
ç½®--> |
| | | <add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/> <!--éé¯éæ¬å°é
ç½®--> |
| | | <!--<add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/>ä¹è±--> |
| | | |
| | | <add key="webpages:Version" value="3.0.0.0" /> |