| | |
| | | <Compile Include="ç产管ç\模å
·ç®¡ç\ClsSc_MouldRepairInBill.cs" /> |
| | | <Compile Include="ç产管ç\模å
·ç®¡ç\ClsSc_MouldRepairOutBill.cs" /> |
| | | <Compile Include="ç产管ç\模å
·ç®¡ç\ClsSc_MouldStatusChangeBill.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipWorkBeforeCheckBill.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipStockInCheckBill.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipSparepartsBill.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipSparepartsChangeBill.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_FirstPieceCheckBill.cs" /> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Data; |
| | | |
| | | namespace DAL |
| | | { |
| | | public class ClsSb_EquipStockInCheckBill : DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Model.ClsSb_EquipStockInCheckBillMain omodel = new Model.ClsSb_EquipStockInCheckBillMain(); |
| | | public List<Model.ClsSb_EquipStockInCheckBillSub> DetailColl = new List<Model.ClsSb_EquipStockInCheckBillSub>(); |
| | | |
| | | public ClsSb_EquipStockInCheckBill() |
| | | { |
| | | base.MvarItemKeySub = "Sb_EquipStockInCheckBillSub"; |
| | | base.MvarItemKeySub2 = ""; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey= "Sb_EquipStockInCheckBillMain"; |
| | | base.MvarReportTitle= "设å¤å
¥åºæ£éªéªæ¶å"; |
| | | base.BillType = "3914"; |
| | | base.HBillSubType = "3914"; |
| | | |
| | | } |
| | | |
| | | #region åºå®ä»£ç |
| | | |
| | | ~ClsSb_EquipStockInCheckBill() |
| | | { |
| | | DetailColl = null; |
| | | } |
| | | |
| | | #endregion èªå®ä¹æ¹æ³ |
| | | //ä¿®æ¹åæ® |
| | | public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | // |
| | | oCn.BeginTran(); |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc("UpDate Sb_EquipStockInCheckBillMain set " + |
| | | " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | | //",HDate='" + omodel.HDate + "'" + |
| | | ",HYear='" + omodel.HYear.ToString() + "'" + |
| | | ",HPeriod='" + omodel.HPeriod.ToString() + "'" + |
| | | ",HRemark='" + omodel.HRemark + "'" + |
| | | ",HCheckerResult='" + omodel.HCheckerResult + "'" + |
| | | ",HUpDater='" + omodel.HMaker + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | //======================================== |
| | | ",HEquipID=" + omodel.HEquipID.ToString() + |
| | | ",HSupID=" + omodel.HSupID.ToString() + |
| | | ",HFirstCheckEmp=" + omodel.HFirstCheckEmp.ToString() + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | | DeleteBillSub(lngBillKey); |
| | | //æå
¥å表 |
| | | omodel.HInterID = lngBillKey; |
| | | foreach (Model.ClsSb_EquipStockInCheckBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Sb_EquipStockInCheckBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan, HEntryCloseDate, HCloseType" + |
| | | ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" + |
| | | ", HRelationQty, HRelationMoney,HQCCheckClassID, HQCCheckItemID, HQCStd" + |
| | | ", HQCRelValue, HResult, HProcCheckEmp, HProcCheckTime, HBillNo_bak) values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + 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.HQCCheckClassID + "','" + oSub.HQCCheckItemID + "','" + oSub.HQCStd + |
| | | "','" + oSub.HQCRelValue + "','" + oSub.HResult.ToString() + "','" + oSub.HProcCheckEmp + "','" + oSub.HProcCheckTime + "','') "); |
| | | } |
| | | |
| | | 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 Sb_EquipStockInCheckBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo , HDate, HMaker, HMakeDate" + |
| | | ", HYear, HPeriod , HRemark, HEquipID, HSupID, HFirstCheckEmp, HCheckerResult" + |
| | | ", HBackRemark, HMainSourceBillType, HMainSourceInterID, HMainSourceEntryID, HMainSourceBillNo) " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() + |
| | | ",'" + omodel.HSupID + "','" + omodel.HFirstCheckEmp + "','" + omodel.HCheckerResult + "'" + |
| | | ",'','',0,0,'') "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsSb_EquipStockInCheckBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Sb_EquipStockInCheckBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan, HEntryCloseDate, HCloseType" + |
| | | ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" + |
| | | ", HRelationQty, HRelationMoney,HQCCheckClassID, HQCCheckItemID, HQCStd" + |
| | | ", HQCRelValue, HResult, HProcCheckEmp, HProcCheckTime, HBillNo_bak) values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + 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.HQCCheckClassID + "','" + oSub.HQCCheckItemID + "','" + oSub.HQCStd + |
| | | "','" + oSub.HQCRelValue + "','" + oSub.HResult.ToString() + "','" + oSub.HProcCheckEmp + "','" + oSub.HProcCheckTime + "','') "); |
| | | } |
| | | |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Data; |
| | | |
| | | namespace DAL |
| | | { |
| | | public class ClsSb_EquipWorkBeforeCheckBill : DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Model.ClsSb_EquipWorkBeforeCheckBillMain omodel = new Model.ClsSb_EquipWorkBeforeCheckBillMain(); |
| | | public List<Model.ClsSb_EquipWorkBeforeCheckBillSub> DetailColl = new List<Model.ClsSb_EquipWorkBeforeCheckBillSub>(); |
| | | |
| | | public ClsSb_EquipWorkBeforeCheckBill() |
| | | { |
| | | base.MvarItemKeySub = "Sb_EquipWorkBeforeCheckBillSub"; |
| | | base.MvarItemKeySub2 = ""; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey= "Sb_EquipWorkBeforeCheckBillMain"; |
| | | base.MvarReportTitle= "è®¾å¤æäº§æ£éªéªæ¶å"; |
| | | base.BillType = "3915"; |
| | | base.HBillSubType = "3915"; |
| | | |
| | | } |
| | | |
| | | #region åºå®ä»£ç |
| | | |
| | | ~ClsSb_EquipWorkBeforeCheckBill() |
| | | { |
| | | DetailColl = null; |
| | | } |
| | | |
| | | #endregion èªå®ä¹æ¹æ³ |
| | | //ä¿®æ¹åæ® |
| | | public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | // |
| | | oCn.BeginTran(); |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc("UpDate Sb_EquipWorkBeforeCheckBillMain set " + |
| | | " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | | //",HDate='" + omodel.HDate + "'" + |
| | | ",HYear='" + omodel.HYear.ToString() + "'" + |
| | | ",HPeriod='" + omodel.HPeriod.ToString() + "'" + |
| | | ",HRemark='" + omodel.HRemark + "'" + |
| | | ",HCheckerResult='" + omodel.HCheckerResult + "'" + |
| | | ",HUpDater='" + omodel.HMaker + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | //======================================== |
| | | ",HEquipID=" + omodel.HEquipID.ToString() + |
| | | ",HSupID=" + omodel.HSupID.ToString() + |
| | | ",HFirstCheckEmp=" + omodel.HFirstCheckEmp.ToString() + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | | DeleteBillSub(lngBillKey); |
| | | //æå
¥å表 |
| | | omodel.HInterID = lngBillKey; |
| | | foreach (Model.ClsSb_EquipWorkBeforeCheckBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Sb_EquipWorkBeforeCheckBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan, HEntryCloseDate, HCloseType" + |
| | | ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" + |
| | | ", HRelationQty, HRelationMoney,HQCCheckClassID, HQCCheckItemID, HQCStd" + |
| | | ", HQCRelValue, HResult, HProcCheckEmp, HProcCheckTime, HBillNo_bak) values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + 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.HQCCheckClassID + "','" + oSub.HQCCheckItemID + "','" + oSub.HQCStd + |
| | | "','" + oSub.HQCRelValue + "','" + oSub.HResult.ToString() + "','" + oSub.HProcCheckEmp + "','" + oSub.HProcCheckTime + "','') "); |
| | | } |
| | | |
| | | 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 Sb_EquipWorkBeforeCheckBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo , HDate, HMaker, HMakeDate" + |
| | | ", HYear, HPeriod , HRemark, HEquipID, HSupID, HFirstCheckEmp, HCheckerResult" + |
| | | ", HBackRemark, HMainSourceBillType, HMainSourceInterID, HMainSourceEntryID, HMainSourceBillNo) " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() + |
| | | ",'" + omodel.HSupID + "','" + omodel.HFirstCheckEmp + "','" + omodel.HCheckerResult + "'" + |
| | | ",'','',0,0,'') "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsSb_EquipWorkBeforeCheckBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Sb_EquipWorkBeforeCheckBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan, HEntryCloseDate, HCloseType" + |
| | | ", HRemark, HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType" + |
| | | ", HRelationQty, HRelationMoney,HQCCheckClassID, HQCCheckItemID, HQCStd" + |
| | | ", HQCRelValue, HResult, HProcCheckEmp, HProcCheckTime, HBillNo_bak) values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + 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.HQCCheckClassID + "','" + oSub.HQCCheckItemID + "','" + oSub.HQCStd + |
| | | "','" + oSub.HQCRelValue + "','" + oSub.HResult.ToString() + "','" + oSub.HProcCheckEmp + "','" + oSub.HProcCheckTime + "','') "); |
| | | } |
| | | |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | <Compile Include="ç产管ç\模å
·ç®¡ç\ClsSc_MouldStockBillSub.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipConkBookBillMain.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipConkBookBillSub.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipWorkBeforeCheckBillMain.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipWorkBeforeCheckBillSub.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipStockInCheckBillSub.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipStockInCheckBillMain.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipDotCheckBillMain.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipDotCheckBillSub.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipDotCheckPlanBillMain.cs" /> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsSb_EquipStockInCheckBillMain : DBUtility.ClsXt_BaseBillMain |
| | | { |
| | | public Int64 HSupID; |
| | | public Int64 HEquipID; |
| | | public Int64 HFirstCheckEmp; |
| | | public string HCheckerResult; |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsSb_EquipStockInCheckBillSub : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | |
| | | public Int64 HQCCheckClassID; |
| | | public Int64 HQCCheckItemID; |
| | | public Int64 HProcCheckEmp; |
| | | public string HQCStd; |
| | | public string HQCRelValue; |
| | | public string HResult; |
| | | public DateTime HProcCheckTime; |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsSb_EquipWorkBeforeCheckBillMain : DBUtility.ClsXt_BaseBillMain |
| | | { |
| | | public Int64 HSupID; |
| | | public Int64 HEquipID; |
| | | public Int64 HFirstCheckEmp; |
| | | public string HCheckerResult; |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsSb_EquipWorkBeforeCheckBillSub : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | |
| | | public Int64 HQCCheckClassID; |
| | | public Int64 HQCCheckItemID; |
| | | public Int64 HProcCheckEmp; |
| | | public string HQCStd; |
| | | public string HQCRelValue; |
| | | public string HResult; |
| | | public DateTime HProcCheckTime; |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers.SBGL |
| | | { |
| | | public class Sb_EquipStockInCheckBillController : ApiController |
| | | { |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | #region 设å¤å
¥åºæ£éªéªæ¶å å表 |
| | | /// <summary> |
| | | /// 设å¤å
¥åºæ£éªéªæ¶åå表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Sb_EquipStockInCheckBill/Sb_EquipStockInCheckBillList")] |
| | | [HttpGet] |
| | | public object Sb_EquipStockInCheckBillList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (!DBUtility.ClsPub.Security_Log("Sb_EquipStockInCheckBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Sb_EquipStockInCheckBillList where 1=1 "+ sWhere, "h_v_Sb_EquipStockInCheckBillList"); |
| | | |
| | | //æ·»å åå |
| | | 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 = "è¿åè®°å½æåï¼"; |
| | | 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> |
| | | /// 设å¤å
¥åºæ£éªéªæ¶å ä¿å |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | | [Route("Sb_EquipStockInCheckBill/SaveEquipStockInCheckBill")] |
| | | [HttpPost] |
| | | public object SaveEquipStockInCheckBill([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 msg4 = sArray[2].ToString(); |
| | | |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sb_EquipStockInCheckBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DAL.ClsSb_EquipStockInCheckBill oBill = new DAL.ClsSb_EquipStockInCheckBill(); |
| | | List<Model.ClsSb_EquipStockInCheckBillMain> lsmain = new List<Model.ClsSb_EquipStockInCheckBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_ClsSb_EquipStockInCheckBillMain(msg2); |
| | | foreach (Model.ClsSb_EquipStockInCheckBillMain oItem in lsmain) |
| | | { |
| | | //oItem.HMaker = ""; |
| | | UserName = oItem.HMaker; //å¶å人 |
| | | oItem.HBillType = "3914"; |
| | | oItem.HBillSubType = "3914"; |
| | | oItem.HBillStatus = 1; |
| | | DBUtility.ClsPub.CurUserName = UserName; |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿åå¤±è´¥ï¼æ²¡æåæ®æ¥æï¼æ æ³ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oBill.omodel = oItem; |
| | | } |
| | | //è¡¨ä½æ°æ® |
| | | //æ },{æ¥æåæ°ç» //廿ãåã |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | msg3 = msg3.Replace("\\", ""); |
| | | msg3 = msg3.Replace("\n", ""); //\n |
| | | //msg2 = msg2.Replace("'", "â"); |
| | | List<Model.ClsSb_EquipStockInCheckBillSub> ls = new List<Model.ClsSb_EquipStockInCheckBillSub>(); |
| | | ls = oListModels.getObjectByJson_ClsSb_EquipStockInCheckBillSub(msg3); |
| | | int i = 0; |
| | | foreach (Model.ClsSb_EquipStockInCheckBillSub oItemSub in ls) |
| | | { |
| | | |
| | | i++; |
| | | oItemSub.HEntryID = i; |
| | | //oItemSub.HCloseMan = ""; //è¡å
³é |
| | | oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItemSub.HCloseType = false; //å
³éç±»å |
| | | //oItemSub.HRemark = ""; //夿³¨ |
| | | oItemSub.HSourceInterID = 0; // æºå主å
ç |
| | | oItemSub.HSourceEntryID = 0; //æºååå
ç |
| | | //oItemSub.HSourceBillNo = ""; //æºååå· |
| | | //oItemSub.HSourceBillType = ""; //æºåç±»å |
| | | oItemSub.HRelationQty = 0; //å
³èæ°é |
| | | //oItemSub.HRelationMoney = 0; //å
³èéé¢ |
| | | //HMaterID = "";//é
件代ç |
| | | //HUnitID = "";//åä½ä»£ç |
| | | //HQty = "";//å®é
ç¨é |
| | | //HQtyMust = "";//åä½ç¨é |
| | | //HRemark = "";//夿³¨ |
| | | |
| | | oBill.DetailColl.Add(oItemSub); |
| | | |
| | | } |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | bool bResult; |
| | | if (oBill.omodel.HInterID == 0) |
| | | { |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | | { |
| | | bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | 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 设å¤å
¥åºæ£éªéªæ¶å å é¤ |
| | | /// <summary> |
| | | /// 设å¤å
¥åºæ£éªéªæ¶åå é¤ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Sb_EquipStockInCheckBill/DelEquipStockInCheckBill")] |
| | | [HttpGet] |
| | | public object DelEquipStockInCheckBill(string HInterID, string user) |
| | | { |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sb_EquipStockInCheckBill_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); |
| | | if (lngBillKey == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DAL.ClsSb_EquipStockInCheckBill oBill = new DAL.ClsSb_EquipStockInCheckBill(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from Sb_EquipStockInCheckBillMain where HInterID="+ lngBillKey, "Sb_EquipStockInCheckBillMain"); |
| | | if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) >1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å½åå¤äºä¸è½å é¤ç¶æ,ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ç»å®¡æ ¸,ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (IsDete) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªæ¾å°"; |
| | | 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("Sb_EquipStockInCheckBill/AuditEquipStockInCheckBill")] |
| | | [HttpGet] |
| | | public object AuditEquipStockInCheckBill(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "Sb_EquipStockInCheckBill_Check"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | 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); |
| | | DAL.ClsSb_EquipStockInCheckBill oBill = new DAL.ClsSb_EquipStockInCheckBill(); |
| | | ds = oCN.RunProcReturn("select * from Sb_EquipStockInCheckBillMain where HInterID=" + lngBillKey, "Sb_EquipStockInCheckBillMain"); |
| | | //æ¥çæ¯å¦å·²å®¡æ ¸,å
³é,ä½åº |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (IsAudit == 0) //å®¡æ ¸å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HChecker"].ToString().Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå®¡æ ¸å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HChecker"].ToString().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.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå®¡æ ¸æäº¤ |
| | | { |
| | | //åå®¡æ ¸æäº¤AbandonCheck |
| | | if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | 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 |
| | | } |
| | | } |
New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers.SBGL |
| | | { |
| | | public class Sb_EquipWorkBeforeCheckBillController : ApiController |
| | | { |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | #region è®¾å¤æäº§æ£éªéªæ¶å å表 |
| | | /// <summary> |
| | | /// è®¾å¤æäº§æ£éªéªæ¶åå表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Sb_EquipWorkBeforeCheckBill/Sb_EquipWorkBeforeCheckBillList")] |
| | | [HttpGet] |
| | | public object Sb_EquipWorkBeforeCheckBillList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (!DBUtility.ClsPub.Security_Log("Sb_EquipWorkBeforeCheckBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Sb_EquipWorkBeforeCheckBillList where 1=1 "+ sWhere, "h_v_Sb_EquipWorkBeforeCheckBillList"); |
| | | |
| | | //æ·»å åå |
| | | 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 = "è¿åè®°å½æåï¼"; |
| | | 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> |
| | | /// è®¾å¤æäº§æ£éªéªæ¶å ä¿å |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | | [Route("Sb_EquipWorkBeforeCheckBill/SaveEquipWorkBeforeCheckBill")] |
| | | [HttpPost] |
| | | public object SaveEquipWorkBeforeCheckBill([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 msg4 = sArray[2].ToString(); |
| | | |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sb_EquipWorkBeforeCheckBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DAL.ClsSb_EquipWorkBeforeCheckBill oBill = new DAL.ClsSb_EquipWorkBeforeCheckBill(); |
| | | List<Model.ClsSb_EquipWorkBeforeCheckBillMain> lsmain = new List<Model.ClsSb_EquipWorkBeforeCheckBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_ClsSb_EquipWorkBeforeCheckBillMain(msg2); |
| | | foreach (Model.ClsSb_EquipWorkBeforeCheckBillMain oItem in lsmain) |
| | | { |
| | | //oItem.HMaker = ""; |
| | | UserName = oItem.HMaker; //å¶å人 |
| | | oItem.HBillType = "3915"; |
| | | oItem.HBillSubType = "3915"; |
| | | oItem.HBillStatus = 1; |
| | | DBUtility.ClsPub.CurUserName = UserName; |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿åå¤±è´¥ï¼æ²¡æåæ®æ¥æï¼æ æ³ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oBill.omodel = oItem; |
| | | } |
| | | //è¡¨ä½æ°æ® |
| | | //æ },{æ¥æåæ°ç» //廿ãåã |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | msg3 = msg3.Replace("\\", ""); |
| | | msg3 = msg3.Replace("\n", ""); //\n |
| | | //msg2 = msg2.Replace("'", "â"); |
| | | List<Model.ClsSb_EquipWorkBeforeCheckBillSub> ls = new List<Model.ClsSb_EquipWorkBeforeCheckBillSub>(); |
| | | ls = oListModels.getObjectByJson_ClsSb_EquipWorkBeforeCheckBillSub(msg3); |
| | | int i = 0; |
| | | foreach (Model.ClsSb_EquipWorkBeforeCheckBillSub oItemSub in ls) |
| | | { |
| | | |
| | | i++; |
| | | oItemSub.HEntryID = i; |
| | | //oItemSub.HCloseMan = ""; //è¡å
³é |
| | | oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItemSub.HCloseType = false; //å
³éç±»å |
| | | //oItemSub.HRemark = ""; //夿³¨ |
| | | oItemSub.HSourceInterID = 0; // æºå主å
ç |
| | | oItemSub.HSourceEntryID = 0; //æºååå
ç |
| | | //oItemSub.HSourceBillNo = ""; //æºååå· |
| | | //oItemSub.HSourceBillType = ""; //æºåç±»å |
| | | oItemSub.HRelationQty = 0; //å
³èæ°é |
| | | //oItemSub.HRelationMoney = 0; //å
³èéé¢ |
| | | //HMaterID = "";//é
件代ç |
| | | //HUnitID = "";//åä½ä»£ç |
| | | //HQty = "";//å®é
ç¨é |
| | | //HQtyMust = "";//åä½ç¨é |
| | | //HRemark = "";//夿³¨ |
| | | |
| | | oBill.DetailColl.Add(oItemSub); |
| | | |
| | | } |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | bool bResult; |
| | | if (oBill.omodel.HInterID == 0) |
| | | { |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | | { |
| | | bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | 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 è®¾å¤æäº§æ£éªéªæ¶å å é¤ |
| | | /// <summary> |
| | | /// è®¾å¤æäº§æ£éªéªæ¶åå é¤ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Sb_EquipWorkBeforeCheckBill/DelEquipWorkBeforeCheckBill")] |
| | | [HttpGet] |
| | | public object DelEquipWorkBeforeCheckBill(string HInterID, string user) |
| | | { |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sb_EquipWorkBeforeCheckBill_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); |
| | | if (lngBillKey == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DAL.ClsSb_EquipWorkBeforeCheckBill oBill = new DAL.ClsSb_EquipWorkBeforeCheckBill(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from Sb_EquipWorkBeforeCheckBillMain where HInterID="+ lngBillKey, "Sb_EquipWorkBeforeCheckBillMain"); |
| | | if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) >1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å½åå¤äºä¸è½å é¤ç¶æ,ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ç»å®¡æ ¸,ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (IsDete) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªæ¾å°"; |
| | | 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("Sb_EquipWorkBeforeCheckBill/AuditEquipWorkBeforeCheckBill")] |
| | | [HttpGet] |
| | | public object AuditEquipWorkBeforeCheckBill(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "Sb_EquipWorkBeforeCheckBill_Check"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | 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); |
| | | DAL.ClsSb_EquipWorkBeforeCheckBill oBill = new DAL.ClsSb_EquipWorkBeforeCheckBill(); |
| | | ds = oCN.RunProcReturn("select * from Sb_EquipWorkBeforeCheckBillMain where HInterID=" + lngBillKey, "Sb_EquipWorkBeforeCheckBillMain"); |
| | | //æ¥çæ¯å¦å·²å®¡æ ¸,å
³é,ä½åº |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (IsAudit == 0) //å®¡æ ¸å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HChecker"].ToString().Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå®¡æ ¸å¤æ |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HChecker"].ToString().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.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (IsAudit == 1) //åå®¡æ ¸æäº¤ |
| | | { |
| | | //åå®¡æ ¸æäº¤AbandonCheck |
| | | if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | 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 |
| | | } |
| | | } |
| | |
| | | return list; |
| | | } |
| | | |
| | | ///设å¤å
¥åºæ£éªéªæ¶å å表 |
| | | ///ClsSb_EquipStockInCheckBillSub |
| | | public List<Model.ClsSb_EquipStockInCheckBillSub> getObjectByJson_ClsSb_EquipStockInCheckBillSub(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsSb_EquipStockInCheckBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipStockInCheckBillSub>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | ///设å¤å
¥åºæ£éªéªæ¶å 主表 |
| | | ///ClsSb_EquipStockInCheckBillMain |
| | | public List<Model.ClsSb_EquipStockInCheckBillMain> getObjectByJson_ClsSb_EquipStockInCheckBillMain(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsSb_EquipStockInCheckBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipStockInCheckBillMain>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | ///è®¾å¤æäº§æ£éªéªæ¶å å表 |
| | | ///ClsSb_EquipWorkBeforeCheckBillSub |
| | | public List<Model.ClsSb_EquipWorkBeforeCheckBillSub> getObjectByJson_ClsSb_EquipWorkBeforeCheckBillSub(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsSb_EquipWorkBeforeCheckBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipWorkBeforeCheckBillSub>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | ///è®¾å¤æäº§æ£éªéªæ¶å 主表 |
| | | ///ClsSb_EquipWorkBeforeCheckBillMain |
| | | public List<Model.ClsSb_EquipWorkBeforeCheckBillMain> getObjectByJson_ClsSb_EquipWorkBeforeCheckBillMain(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsSb_EquipWorkBeforeCheckBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipWorkBeforeCheckBillMain>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 设å¤ä¿å
»è®¡å 主表 |
| | | /// </summary> |
| | |
| | | <Compile Include="Controllers\SBGL\Sb_EquipSparepartsBillController.cs" /> |
| | | <Compile Include="Controllers\SBGL\Sb_EquipSparepartsChangeBillController.cs" /> |
| | | <Compile Include="Controllers\SBGL\Sb_EquipStatusChangeBillController.cs" /> |
| | | <Compile Include="Controllers\SBGL\Sb_EquipWorkBeforeCheckBillController.cs" /> |
| | | <Compile Include="Controllers\SBGL\Sb_EquipStockInCheckBillController.cs" /> |
| | | <Compile Include="Controllers\SCGL\Sc_ComplementGoodBill_ZXBZController.cs" /> |
| | | <Compile Include="Controllers\SCGL\æ¥è®¡å管ç\DataHelper.cs" /> |
| | | <Compile Include="Controllers\SCGL\æ¥è®¡å管ç\JIT_Cg_PODemandPlanBillController.cs" /> |
| | |
| | | <Folder Include="Views\Sb_EquipSparepartsBill\" /> |
| | | <Folder Include="Views\Sb_EquipSparepartsChangeBill\" /> |
| | | <Folder Include="Views\Sb_EquipStatusChangeBill\" /> |
| | | <Folder Include="Views\Sb_EquipStockInCheckBill\" /> |
| | | <Folder Include="Views\Sc_CallGoodsBackRequestBill\" /> |
| | | <Folder Include="Views\Sc_ComplementGoodBill\" /> |
| | | <Folder Include="Views\Sc_ComplementGoodBill_ZXBZ\" /> |