| | |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipRepairRequestBillSub.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipRepairSendWorkBillMain.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipRepairSendWorkBillSub.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipRepairWorkBillSub_Mater.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSc_EquipMaintainBillSub_Item.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSc_EquipMaintainPlanBillSub_Item.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSc_ICMOBillMain.cs" /> |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsSb_EquipRepairWorkBillSub_Mater : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public Int64 HMaterID { get; set; } |
| | | public string HMaterNumber { get; set; } |
| | | public string HMaterName{ get; set; } |
| | | public string HMaterModel{ get; set; } |
| | | public double HQty{ get; set; } |
| | | public double HQtyMust{ get; set; } |
| | | public Int64 HUnitID{ get; set; } |
| | | public string HUnitNumber{ get; set; } |
| | | public string HUnitName{ get; set; } |
| | | public Int64 HManagerID{ get; set; } |
| | | public string HManagerNumber{ get; set; } |
| | | public string HManagerName{ get; set; } |
| | | } |
| | | } |
| | |
| | | { |
| | | |
| | | //å¾å°ä¿¡æ¯ |
| | | ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillQuerySub_Mould where hmainid= " + HProcExchHinteID , "h_v_Sc_ProcessExchangeBillQuerySub_Mould"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuerySub_Mould where hmainid= " + HProcExchHinteID , "h_v_Sc_ProcessExchangeBillQuerySub_Mould"); |
| | | //åå
¥ä¿¡æ¯ |
| | | //if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | //{ |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_EquipMaintainPlan"); |
| | | } |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | | //{ |
| | | //objJsonResult.code = "0"; |
| | | //objJsonResult.count = 0; |
| | | //objJsonResult.Message = "æ æ°æ®"; |
| | | //objJsonResult.data = null; |
| | | //return objJsonResult; |
| | | //} |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | string msg5 = sArray[3].ToString(); |
| | | |
| | | |
| | | //string UserName = ""; |
| | |
| | | oBill.DetailColl.Add(oItemSub); |
| | | |
| | | } |
| | | |
| | | //é
ä»¶è¡¨ä½æ°æ® |
| | | //æ },{æ¥æåæ°ç» //廿ãåã |
| | | //msg5 = msg5.Substring(1, msg5.Length - 2); |
| | | msg5 = msg5.Replace("\\", ""); |
| | | msg5 = msg5.Replace("\n", ""); //\n |
| | | //msg2 = msg2.Replace("'", "â"); |
| | | List<Model.ClsSb_EquipRepairWorkBillSub_Mater> ls1 = new List<Model.ClsSb_EquipRepairWorkBillSub_Mater>(); |
| | | ls1 = JsonConvert.DeserializeObject<List<Model.ClsSb_EquipRepairWorkBillSub_Mater>>(msg5); |
| | | int j = 0; |
| | | foreach (Model.ClsSb_EquipRepairWorkBillSub_Mater oItemSub in ls1) |
| | | { |
| | | |
| | | j++; |
| | | oItemSub.HEntryID = i; |
| | | oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItemSub.HCloseType = false; //å
³éç±»å |
| | | oItemSub.HSourceInterID = 0; // æºå主å
ç |
| | | oItemSub.HSourceEntryID = 0; //æºååå
ç |
| | | oItemSub.HRelationQty = 0; //å
³èæ°é |
| | | oBill.DetailColl_Mater.Add(oItemSub); |
| | | |
| | | } |
| | | |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | bool bResult; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region[设å¤ç»´ä¿®å表ç¼è¾æ¶è·åè¡¨ä½æ°æ®] |
| | | #region[设å¤ç»´ä¿®å表ç¼è¾æ¶è·åè¡¨ä½æ°æ®(ç»´ä¿®å表ãé
ä»¶å表)] |
| | | [Route("Sb_EqpRepairWorkBill/Sb_EqpRepairWorkBillListProjectDetai")] |
| | | [HttpGet] |
| | | public object Sb_EqpRepairWorkBillListProjectDetai(string sqlWhere) |
| | | public object Sb_EqpRepairWorkBillListProjectDetai(string HInterID) |
| | | { |
| | | DataSet ds; |
| | | DataSet ds, ds1; |
| | | List<object> list = new List<object>(); |
| | | string sqlWhere = ""; |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sqlWhere == null || sqlWhere.Equals("")) |
| | | if (HInterID != "" || HInterID != null) |
| | | { |
| | | //ds = oCN.RunProcReturn("select HRepairID,HRepairExplanation,HManagerID,HMoney,HRemark from Sc_MouldRepairWorkBillSub", "Sc_MouldRepairWorkBillSub"); |
| | | ds = oCN.RunProcReturn("select HRepairID,维修项ç®ä»£ç HRepairCode,ç»´ä¿®é¡¹ç® HRepairName,HManagerID1 HManagerID,表ä½è´è´£äººä»£ç HManagerCode,表ä½è´è´£äºº HManagerName,HRepairID1 HRepairID, 表ä½ç»´ä¿®é¡¹ç®ä»£ç HRepairCode,表ä½ç»´ä¿®é¡¹ç® HRepairName,表ä½ç»´ä¿®è¦æ± HRepairExplanation,表ä½å¤æ³¨ HRemark,æºå主å
ç HSourceInterID,æºååå
ç HSourceEntryID,æºååå· HSourceBillNo,æºåç±»å HSourceBillType from h_v_Sc_EquipRepairWorkBillList_Edit", "h_v_Sc_EquipRepairWorkBillList_Edit"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | sqlWhere = " and hmainid='" + HInterID + "'"; |
| | | } |
| | | else |
| | | { |
| | | //string sql1 = "select HRepairID,HRepairExplanation,HManagerID,HMoney,HRemark from Sc_MouldRepairWorkBillSub where 1 = 1 "; |
| | | string sql1 = "select HRepairID,维修项ç®ä»£ç HRepairCode,ç»´ä¿®é¡¹ç® HRepairName,HManagerID1 HManagerID,表ä½è´è´£äººä»£ç HManagerCode,表ä½è´è´£äºº HManagerName,HRepairID1 HRepairID, 表ä½ç»´ä¿®é¡¹ç®ä»£ç HRepairCode,表ä½ç»´ä¿®é¡¹ç® HRepairName,表ä½ç»´ä¿®è¦æ± HRepairExplanation,表ä½å¤æ³¨ HRemark ,æºå主å
ç HSourceInterID,æºååå
ç HSourceEntryID,æºååå· HSourceBillNo,æºåç±»å HSourceBillType from h_v_Sc_EquipRepairWorkBillList_Edit where 1 = 1 "; |
| | | string sql = sql1 + sqlWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_EquipRepairWorkBillList_Edit"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | sqlWhere = HInterID; |
| | | } |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | ds = oCN.RunProcReturn("select HRepairID,维修项ç®ä»£ç HRepairCode,ç»´ä¿®é¡¹ç® HRepairName,HManagerID1 HManagerID,表ä½è´è´£äººä»£ç HManagerCode,表ä½è´è´£äºº HManagerName,HRepairID1 HRepairID, 表ä½ç»´ä¿®é¡¹ç®ä»£ç HRepairCode,表ä½ç»´ä¿®é¡¹ç® HRepairName,表ä½ç»´ä¿®è¦æ± HRepairExplanation,表ä½å¤æ³¨ HRemark,æºå主å
ç HSourceInterID,æºååå
ç HSourceEntryID,æºååå· HSourceBillNo,æºåç±»å HSourceBillType from h_v_Sc_EquipRepairWorkBillList_Edit where 1 = 1 " + sqlWhere , "h_v_Sc_EquipRepairWorkBillList_Edit"); |
| | | string sql1 = "select * from h_v_Sb_EquipRepairWorkBillSub_Mater where 1 = 1 " + sqlWhere; |
| | | ds1 = oCN.RunProcReturn(sql1, "h_v_Sb_EquipRepairWorkBillSub_Mater"); |
| | | list.Add(ds.Tables[0]); |
| | | list.Add(ds1.Tables[0]); |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.list = list; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | |
| | | ds = Sc_MouldDotCheckPlanBillList_s(sWhere); |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | | //{ |
| | | //objJsonResult.code = "0"; |
| | | //objJsonResult.count = 0; |
| | | //objJsonResult.Message = "æ æ°æ®"; |
| | | //objJsonResult.data = null; |
| | | //return objJsonResult; |
| | | //} |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | /// <returns></returns> |
| | | [Route("Web/GetMaintainItemtemByEquipProjectID")] |
| | | [HttpGet] |
| | | public object GetMaintainItemtemByEquipProjectID(int EquipProjectID) |
| | | public object GetMaintainItemtemByEquipProjectID(string EquipProjectID) |
| | | { |
| | | if (EquipProjectID <= 0) |
| | | if (EquipProjectID == null) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | |
| | | { |
| | | public Models.ClsSb_EquipRepairWorkBillMain omodel = new Models.ClsSb_EquipRepairWorkBillMain(); |
| | | public List<Models.ClsSb_EquipRepairWorkBillSub> DetailColl = new List<Models.ClsSb_EquipRepairWorkBillSub>(); |
| | | public List<Model.ClsSb_EquipRepairWorkBillSub_Mater> DetailColl_Mater = new List<Model.ClsSb_EquipRepairWorkBillSub_Mater>(); |
| | | |
| | | public ClsSb_EquipRepairWorkBill() |
| | | { |
| | |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | | DeleteBillSub(lngBillKey); |
| | | //å é¤é
ä»¶æ°æ® |
| | | oCn.RunProc("delete from Sb_EquipRepairWorkBillSub_Mater where HInterID="+ lngBillKey); |
| | | //æå
¥å表 |
| | | omodel.HInterID = lngBillKey; |
| | | foreach (Models.ClsSb_EquipRepairWorkBillSub oSub in DetailColl) |
| | |
| | | "," + oSub.HRepairID.ToString() + ",'"+ oSub.HManagerID.ToString() + "','" + oSub.HRepairExplanation + "'," + oSub.HEmpID.ToString() + |
| | | ") "); |
| | | } |
| | | |
| | | foreach (Model.ClsSb_EquipRepairWorkBillSub_Mater oSub in DetailColl_Mater) |
| | | { |
| | | oCn.RunProc("Insert into Sb_EquipRepairWorkBillSub_Mater " + |
| | | " (HInterID,HEntryID," + |
| | | "HCloseMan,HEntryCloseDate,HCloseType,HRemark," + |
| | | "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," + |
| | | "HQty,HMaterID,HUnitID,HQtyMust," + |
| | | "HManagerID ) 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.HQty.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HManagerID.ToString() + ") "); |
| | | } |
| | | |
| | | // |
| | | //foreach (Model.ClsSb_EquipRepairWorkBillSub oSub in DetailColl) |
| | | //{ |
| | |
| | | "," + oSub.HRepairID.ToString() + ",'"+ oSub.HManagerID.ToString() + "','" + oSub.HRepairExplanation + "'," + oSub.HEmpID.ToString() + |
| | | ") "); |
| | | } |
| | | |
| | | foreach (Model.ClsSb_EquipRepairWorkBillSub_Mater oSub in DetailColl_Mater) |
| | | { |
| | | oCn.RunProc("Insert into Sb_EquipRepairWorkBillSub_Mater " + |
| | | " (HInterID,HEntryID," + |
| | | "HCloseMan,HEntryCloseDate,HCloseType,HRemark," + |
| | | "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," + |
| | | "HQty,HMaterID,HUnitID,HQtyMust," + |
| | | "HManagerID ) 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.HQty.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HManagerID.ToString() + ") "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsSb_EquipRepairWorkBillSub oSub in DetailColl) |
| | | //{ |
| | |
| | | <LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration> |
| | | <LastUsedPlatform>x86</LastUsedPlatform> |
| | | <PublishProvider>FileSystem</PublishProvider> |
| | | <PublishUrl>E:\ç½é¡µåå¸\WEBAPI</PublishUrl> |
| | | <PublishUrl>D:\ç½ç«åå¸\æºäºMESWMS\API</PublishUrl> |
| | | <WebPublishMethod>FileSystem</WebPublishMethod> |
| | | <SiteUrlToLaunchAfterPublish /> |
| | | </PropertyGroup> |