| | |
| | | using Newtonsoft.Json.Linq; |
| | | using System.Diagnostics; |
| | | using System.Threading; |
| | | |
| | | using System.Globalization; |
| | | namespace WebAPI.Controllers.SCGL.æ¥è®¡å管ç |
| | | { |
| | | public class JIT_DayPlanPlatFormBillController : ApiController |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®ç¹å»è¡æ 颿¶é´æ¥è¯¢ç¼ºæåæ |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <param name="user"></param> |
| | | /// <returns></returns> |
| | | [Route("JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHDateTimeList")] |
| | | [HttpGet] |
| | | public object JIT_DayPlanPlatFormBillHDateTimeList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | MaterialShorAnalysis Report = JsonConvert.DeserializeObject<MaterialShorAnalysis>(sWhere); |
| | | |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_MaterialShorAnalysisReportList {Report.HORGID},'{Report.HBEGINDATE}','{Report.HENDDATE}' ", "h_p_JIT_PODemandPlanBill_ReportList"); |
| | | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | //objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产æ¥è®¡åå¹³å° ä¿å |
| | |
| | | |
| | | try |
| | | { |
| | | Stopwatch sw = new Stopwatch();//计æ¶å¨ |
| | | sw.Start();//å¼å§è®¡æ¶ |
| | | |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_WorkBillSortBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | LogService.CustomWriteLog("2:", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | int TrueCount = 0, SumCount = 0; |
| | | LogService.CustomWriteLog("list.Count:"+ list.Count, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | | string sReturn = ""; |
| | | oSystemParameter.ShowBill(ref sReturn); |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | { |
| | | TrueCount = 0; |
| | | SumCount = 0; |
| | | long HInterID = 0; |
| | |
| | | var HMainSourceInterID = list[i]["æºå主å
ç "].ToString(); |
| | | var HMainSourceEntryID = list[i]["æºååå
ç "].ToString(); |
| | | var HPlanQty = list[i]["è®¡åæ°é"].ToString(); |
| | | var HEmpID = list[i]["HEmpID"].ToString(); |
| | | var HWorkQty = list[i]["å°æ¶äº§è½"].ToString(); |
| | | |
| | | LogService.CustomWriteLog("2.05:" + i, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | | if (HSourceID == ""|| HSourceID == "0") |
| | | if (oSystemParameter.omodel.WMS_CampanyName != "æ·»åº·ç§æ") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i + 1}è¡çäº§èµæºä¸è½ä¸ºç©º!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | if (HSourceID == "" || HSourceID == "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i + 1}è¡çäº§èµæºä¸è½ä¸ºç©º!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" + |
| | | ds = oCN.RunProcReturn($"select HInterID,HICMOBillNo from Sc_WorkBillSortBillMain with(nolock) where HMainSourceInterID={HMainSourceInterID}" + |
| | | $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | " HOrderNeedQty, HSplitQty, HDayPlanSumQty,HPlanBeginDate," + |
| | | "HSeOrderBillNo,HICMOBillType,HSourceStockInQty,HLeftPlanQty,HOrderLev,HPreparatDate," + |
| | | "HMainSourceInterID,HMainSourceEntryID,HICMOInterID_Sec,HICMOEntryID_Sec,HPlanQty" + |
| | | ",HICMOInterID,HICMOEntryID,HPlanEndDate)values" + |
| | | ",HICMOInterID,HICMOEntryID,HPlanEndDate,HEmpID,HWorkQty)values" + |
| | | $"({HInterID},'{HBillNo}',{DateTime.Now.Year},{DateTime.Now.Month},'{BillType}'," + |
| | | $"'{BillType}',GETDATE(),1,'{user}',getdate(),'{HICMOBillNo}','{HOrderType}'," + |
| | | $"{(HICMOEntrySEQ == "" ? 0.ToString() : HICMOEntrySEQ)},{(HWorkShopID == "" ? 0.ToString() : HWorkShopID)},{(HSourceID == "" ? 0.ToString() : HSourceID)}, {(HYX == "" ? 0.ToString() : HYX)}, {(HProdORGID == "" ? 0.ToString() : HProdORGID)}," + |
| | |
| | | $" 0, {(HSplitQty == "" ? 0.ToString() : HSplitQty)}, {(HDayPlanSumQty == "" ? 0.ToString() : HDayPlanSumQty)},'{HPlanBeginDate}'," + |
| | | $"'{HSeOrderBillNo}','{HICMOBillType}',{(HSourceStockInQty == "" ? 0.ToString() : HSourceStockInQty)},{(HLeftPlanQty == "" ? 0.ToString() : HLeftPlanQty)},'{HOrderLev}',getdate()," + |
| | | $"{HMainSourceInterID},{HMainSourceEntryID},{HMainSourceInterID},{HMainSourceEntryID},{HPlanQty}," + |
| | | $"{HMainSourceInterID},{HMainSourceEntryID},'{HPlanEndDate}')"; |
| | | $"{HMainSourceInterID},{HMainSourceEntryID},'{HPlanEndDate}','{HEmpID}','{HWorkQty}')"; |
| | | |
| | | //LogService.Write("sql:" + sql); |
| | | //主表 |
| | |
| | | var HSplitQty = list[i]["æåæ°é"].ToString(); |
| | | |
| | | LogService.CustomWriteLog("2.1:"+i, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | |
| | | if (HSourceID == "" || HSourceID == "0") |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName != "æ·»åº·ç§æ") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i + 1}è¡çäº§èµæºä¸è½ä¸ºç©º!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | if (HSourceID == "" || HSourceID == "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i + 1}è¡çäº§èµæºä¸è½ä¸ºç©º!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | var str = 0; |
| | | if (!int.TryParse(HYX, out str)) |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" + |
| | | ds = oCN.RunProcReturn($"select HInterID,HICMOBillNo from Sc_WorkBillSortBillMain with(nolock) where HMainSourceInterID={HMainSourceInterID}" + |
| | | $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 1) |
| | |
| | | |
| | | oCN.RunProc($"update Sc_WorkBillSortBillMain set HDayPlanSumQty={list[i]["æ¥è®¡åæ°éæ»é"].ToString()} where HInterID={(HInterID==0?int.Parse(list[i]["hmainid"].ToString()):HInterID)} and HBillNo='{(HBillNo==""?list[i]["åæ®å·"].ToString(): HBillNo)}'"); |
| | | |
| | | int SumDay = 31; //卿䏤æä¹å·® DateTime.Now.AddMonths(1).AddDays(-1).Subtract(DateTime.Now).Days; |
| | | int SumDay = 0; //卿䏤æä¹å·® DateTime.Now.AddMonths(1).AddDays(-1).Subtract(DateTime.Now).Days; |
| | | |
| | | // ç»è®¡æ»å¤©æ° |
| | | HashSet<DateTime> uniqueDates = new HashSet<DateTime>(); |
| | | |
| | | foreach (var key in list[i].Keys) |
| | | { |
| | | if (DateTime.TryParseExact(key, "yyyy-M-d", CultureInfo.InvariantCulture, DateTimeStyles.None, out DateTime date)) |
| | | { |
| | | uniqueDates.Add(date); |
| | | } |
| | | } |
| | | |
| | | SumDay = uniqueDates.Count; |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "æ·»åº·ç§æ") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | SumDay = 180; |
| | | } |
| | | |
| | | LogService.CustomWriteLog("2.3:" + i, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | for (int j = 0; j < SumDay; j++) |
| | |
| | | } |
| | | } |
| | | //ä¸»è¡¨ææ°æ® åè¡¨æ æ°æ® |
| | | if (j == 30 && SumCount == 0 && HInterID != 0 && HBillNo != "") |
| | | if (j == SumDay-1 && SumCount == 0 && HInterID != 0 && HBillNo != "") |
| | | { |
| | | //LogService.CustomWriteLog("3:"+ HInterID+","+ HBillNo, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | objJsonResult = AddBillSub(HInterID.ToString(), HBillNo, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd").ToString()), 0, list[i]); |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | LogService.CustomWriteLog("2.5:", DateTime.Now.ToString("yyyy-MM-dd")); |
| | |
| | | oCN.RunProc("exec REALESE_SC_ICMOBILLSTATUS_TMP"); |
| | | |
| | | LogService.CustomWriteLog("2.6:", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | sw.Stop();//ç»æè®¡æ¶ |
| | | LogService.Write($"========================1.æäº§è®¢åæ»ç¨æ¶ï¼" + sw.Elapsed); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | public json AddBillSub(string HInterID, string HBillNo, DateTime date, double HQTY, Dictionary<string, string> dic) |
| | | { |
| | | //è·åè¡¨æ ¼æ°æ® |
| | | ds = oCN.RunProcReturn($"select * from h_v_JIT_Sc_WorkBillSortBillList where åæ®å·='{HBillNo}'", "h_v_JIT_Sc_WorkBillSortBillList"); |
| | | ds = oCN.RunProcReturn($"select * from h_v_JIT_Sc_WorkBillSortBill_PC where åæ®å·='{HBillNo}'", "h_v_JIT_Sc_WorkBillSortBill_PC"); |
| | | int count = 0; |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | |
| | | oCN.RunProc("insert into Sc_WorkBillSortBillSub(HInterID,HSEQ," + |
| | | "HMasterDate,HQty,HUseTimes)" + |
| | | $"values({HInterID}, {(ds.Tables[0].Rows.Count + 1)}," + |
| | | $" '{date}', {HQTY},{(dic["å°æ¶äº§è½"] == "0" ? 0 : HQTY / float.Parse(dic["å°æ¶äº§è½"].ToString()))})"); |
| | | $" '{date}', {HQTY},{ ((dic["å°æ¶äº§è½"] == "0.0000" ? 0 : dic["å°æ¶äº§è½"] == "0" ? 0 : HQTY / float.Parse(dic["å°æ¶äº§è½"].ToString())).ToString() == "éæ°å" ? 0 : dic["å°æ¶äº§è½"] == "0.0000" ? 0 : dic["å°æ¶äº§è½"] == "0" ? 0 : HQTY / float.Parse(dic["å°æ¶äº§è½"].ToString())) })"); |
| | | } |
| | | |
| | | string sReturn = ""; |
| | | oSystemParameter.ShowBill(ref sReturn); |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "æ·»åº·ç§æ") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | //ææäº§è®¢åå®å·¥æ¥æååå°éè¶éå®è®¢åä¸ |
| | | string sql = "exec h_p_JIT_UpdateEndDateToERP " + HInterID + ",'" + HBillNo + "'"; |
| | | oCN.RunProc(sql); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | |
| | | //LogService.Write("é½å¥åæsql:" + sql); |
| | | List<PRD_PPBOM> BomList = new List<PRD_PPBOM>(); |
| | | DataTable resulTable = ds.Tables[0]; |
| | | |
| | | if (ds.Tables[0].Rows.Count < 1 || ds == null) |
| | | { |
| | | //éæ¾é½å¥æä½ é¿å
å¤äººåæ¶è¿è¡é½å¥åæ |
| | | oCN.RunProc($"update T_PRD_QTFX set FSTATUS = 0 where FPRDORGID ={omdelMian.HProdORGID} and FSTATUS = 1 "); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "没æéè¦è¿è¡é½å¥åæçæ°æ®"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (resulTable.Rows[0][0].ToString().Contains("失败")) |
| | | { |
| | | //éæ¾é½å¥æä½ é¿å
å¤äººåæ¶è¿è¡é½å¥åæ |
| | |
| | | sw.Start();//å¼å§è®¡æ¶ |
| | | |
| | | //è·åå½å峿¶åºå åºåæ°é+åºåç»ç»+ç©æ+货主+ä»åº |
| | | //åæ¥è¯¢å³æ¶åºåæ¹å¼ï¼select * from h_v_jit_InventoryList |
| | | ds = oCN.RunProcReturn(@" |
| | | select * from h_v_jit_InventoryList |
| | | ", "h_v_jit_InventoryList"); |
| | | exec h_p_jit_Inventory_UsableList |
| | | ", "h_p_jit_Inventory_UsableList"); |
| | | ListInventory = ds.ToModelList<PRD_Inventory>(); |
| | | //è½¦é´ ä»åºå¯¹ç
§å表 |
| | | ds = oCN.RunProcReturn(@" |
| | |
| | | { |
| | | sqlName = "AIS20210820164804"; |
| | | } |
| | | else if (oSystemParameter.omodel.WMS_CampanyName == "æ·»åº·ç§æ") |
| | | { |
| | | sqlName = "AIS20240809105013"; |
| | | } |
| | | else if (oSystemParameter.omodel.WMS_CampanyName == "å®å·¥") |
| | | { |
| | | sqlName = "AIS20250102123554"; |
| | | } |
| | | else |
| | | { |
| | | sqlName = "AIS20210811135644"; |
| | | } |
| | | } |
| | | |
| | | |
| | | if (HTLType == "缺æ") |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产æ¥è®¡åå¹³å° éå®å·¥å |
| | | [Route("JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHLockedOrder")] |
| | | [HttpGet] |
| | | public object JIT_DayPlanPlatFormBillHLockedOrder(string HInterIDs) |
| | | { |
| | | try |
| | | { |
| | | oCN.RunProc($"update Sc_WorkBillSortBillMain set HLockOrder = 1 where HInterID in ({HInterIDs})"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产æ¥è®¡åå¹³å° è§£éå·¥å |
| | | [Route("JIT_DayPlanPlatFormBill/JIT_DayPlanPlatFormBillHUnlockOrder")] |
| | | [HttpGet] |
| | | public object JIT_DayPlanPlatFormBillHUnlockOrder(string HInterIDs) |
| | | { |
| | | try |
| | | { |
| | | oCN.RunProc($"update Sc_WorkBillSortBillMain set HLockOrder = 0 where HInterID in ({HInterIDs})"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产æ¥è®¡åå¹³å° çäº§è®¢åæ¥è¯¢ |
| | | [Route("JIT_DayPlanPlatFormBill/JIT_ICMOBillList")] |
| | | [HttpGet] |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产æ¥è®¡åå¹³å° æ ¹æ®è½¦é´æ·»å æªæäº§ç产订å |
| | | [Route("JIT_DayPlanPlatFormBill/JIT_ICMOBillListByDept")] |
| | | [HttpGet] |
| | | public object JIT_ICMOBillListByDept(string HDeptID) |
| | | { |
| | | try |
| | | { |
| | | //è·åæ¾ç¤ºç³»ç»åæ° |
| | | string sReturn = ""; |
| | | oSystemParameter.ShowBill(ref sReturn); |
| | | |
| | | //æ¥è¯¢éæ©è½¦é´ä¸æªæäº§è¿çç产订åä¿¡æ¯ï¼æ·»åº·ç§æ--ç产订åç¶æä¸ºä¸è¾¾ï¼ |
| | | ds = oCN.RunProcReturn($"exec h_p_JIT_ICMOBillListByDept '{HDeptID}'", "h_p_JIT_ICMOBillListByDept"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0 && ds != null) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "æ·»åº·ç§æ") //ç³»ç»åæ° å®¢æ·å®å¶ååç§° 空ç½ä¸ºéç¨ |
| | | { |
| | | //æ°æ®è¡¨æ ¼æ·»å å¨ææ¥æ |
| | | for (int j = 1; j <= 180; j++) |
| | | { |
| | | ds.Tables[0].Columns.Add(DateTime.Now.AddDays(j - 1).ToString("yyyy-MM-dd"), typeof(Int32)); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //æ°æ®è¡¨æ ¼æ·»å å¨ææ¥æ |
| | | for (int j = 1; j <= 31; j++) |
| | | { |
| | | ds.Tables[0].Columns.Add(DateTime.Now.AddDays(j - 1).ToString("yyyy-MM-dd"), typeof(Int32)); |
| | | } |
| | | } |
| | | |
| | | 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 = ""; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产æ¥è®¡åå¹³å° è·åå®å·¥æ¥æ |
| | | [Route("JIT_DayPlanPlatFormBill/GetICMOCompletionDate")] |
| | | [HttpGet] |
| | | public object GetICMOCompletionDate(string HDeptID) |
| | | { |
| | | try |
| | | { |
| | | //æ´æ°æ¥è®¡åå·¥åçå®å·¥æ¥æ |
| | | oCN.RunProc($"exec h_p_JIT_GetICMOCompletionDate '{HDeptID}'"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åå®å·¥æ¥ææåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产æ¥è®¡åå¹³å° è·åææ©å¼å·¥æ¥æ |
| | | [Route("JIT_DayPlanPlatFormBill/GetICMOEarlyDate")] |
| | | [HttpGet] |
| | | public object GetICMOEarlyDate(string HDeptID) |
| | | { |
| | | try |
| | | { |
| | | //æ´æ°ç产订åçææ©å¼å·¥æ¥æ |
| | | oCN.RunProc($"exec h_p_JIT_GetICMOEarlyDate '{HDeptID}'"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åææ©å¼å·¥æ¥ææåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region éè¿ç©æå¹é
产åå¨å
·æ¸
å |
| | | [Route("JIT_DayPlanPlatFormBill/GetMouldByMater")] |
| | | [HttpGet] |
| | | public object GetMouldByMater(string HMaterID,string HSourceID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Gy_MaterialMouldByMater " + HMaterID + "," + HSourceID, "h_p_Gy_MaterialMouldByMater"); |
| | | |
| | | 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 |
| | | |
| | | #region éè¿èµæºå¹é
èµæºå¨å
·æ¸
å |
| | | [Route("JIT_DayPlanPlatFormBill/GetMouldBySource")] |
| | | [HttpGet] |
| | | public object GetMouldBySource(string HSourceID, string HMouldID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_SourceMouldBillMainList where HSourceID = " + HSourceID + " and HMouldID = " + HMouldID, "h_v_Gy_SourceMouldBillMainList"); |
| | | |
| | | 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 |
| | | |
| | | #region æäº§åå°å¨å
·å ç¨æ¶é´åå
¥æ°æ®åº |
| | | [Route("JIT_DayPlanPlatFormBill/AddMouldOccupancyTime")] |
| | | [HttpGet] |
| | | public object AddMouldOccupancyTime(string HMouldID, string HSourceID, string HICMOInterID, string HICMOEntryID, string HMouldPCTime) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_JIT_AddMouldOccupancyTime " + HMouldID + "," + HSourceID + "," + HICMOInterID + "," + HICMOEntryID + ",'" + HMouldPCTime + "'", "h_p_JIT_AddMouldOccupancyTime"); |
| | | |
| | | 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 |
| | | |
| | | } |
| | | } |