WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/LMESController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/MateOutController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Models/Gy_RoutingBillSub_WorkQty.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/WebAPI.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -569,6 +569,107 @@ return objJsonResult; } //å·¥èºè·¯çº¿å表 æ°å¢ [Route("Gy_RoutingBillSub/AddWorkQty")] [HttpPost] public object AddWorkQty([FromBody] JObject sMainSub) { try { var _value = sMainSub["sMainSub"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string user = sArray[1].ToString(); //夿æ¯å¦æç¼è¾æé if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Edit", 1, false, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å·¥èºè·¯çº¿æ æéç¼è¾!"; objJsonResult.data = null; return objJsonResult; } List<Gy_RoutingBillSub_WorkQty> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_RoutingBillSub_WorkQty>>(msg2); int i = 0; oCN.BeginTran();//å¼å§äºç© foreach (Gy_RoutingBillSub_WorkQty oSub in DetailColl) { i++; if (i == 1) { //å å é¤åå²ç»å®æ°æ®åå¨éæ°ä¿å oCN.RunProc("delete from Gy_RoutingBillSub_WorkQty where HInterID = " + oSub.HInterID + " and HEntryID = " + oSub.HEntryID); }; oCN.RunProc($"insert into Gy_RoutingBillSub_WorkQty" + $"(HInterID,HEntryID,HEntrySubID,HSourceID,HWorkQty_Source,HEntryStdEmpQty,HEntryStdEmpAvg,HSortNum,HRemark)" + $"values({oSub.HInterID},{oSub.HEntryID},{i},{oSub.HSourceID},{oSub.HWorkQty_Source},{oSub.HEntryStdEmpQty}" + $",{oSub.HEntryStdEmpAvg},{oSub.HSortNum},'{oSub.HRemark}')"); } 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 å·¥èºè·¯çº¿å表ç¼è¾è·åæ°æ® [Route("Gy_RoutingBill/EditWorkQty")] [HttpGet] public object EditWorkQty(long HInterID,long HEntryID) { try { ds = oCN.RunProcReturn($"select * from h_v_Gy_RoutingBillSub_WorkQtyEdit where hmainid={HInterID} and hsubid={HEntryID} order by HEntrySubID asc", "h_v_Gy_RoutingBillSub_WorkQtyEdit"); 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 #region 临æ¶å®é¢æ¥è¡¨ WebAPI/Controllers/LMESController.cs
@@ -1777,6 +1777,39 @@ #endregion #region å·¥èºè·¯çº¿æ¹æ¹å°æ¶äº§è½ [Route("Gy_RoutingBill/BulkWorkQty")] [HttpGet] public object BulkWorkQty(string HMaterNumber1, string HMaterNumber2,string HProcID, string HWorkQty) { try { oCN.BeginTran(); string sql = $"update b set b.HWorkQty = {HWorkQty} from Gy_RoutingBillMain a left join Gy_RoutingBillSub b on a.HInterID = b.HInterID left join Gy_Material m on a.HMaterID = m.HItemID where m.HNumber between '{HMaterNumber1}' and '{HMaterNumber2}' and b.HProcID = {HProcID} and a.HCloseMan = ''"; //æ§è¡æ´æ°ä¸çå·¥æ¶è¯å¥ oCN.RunProc(sql); 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 #endregion /// <summary> WebAPI/Controllers/MateOutController.cs
@@ -2267,7 +2267,7 @@ /// </summary> [Route("Sc_BadReasonReport/list")] [HttpGet] public object list(string sWhere, string user) public object list(string sWhere, string user,string HGroupID) { try { @@ -2291,7 +2291,7 @@ } else { ds = oCN.RunProcReturn("exec h_p_Sc_BadReasonReport '" + sWhere + "'", "h_p_Sc_BadReasonReport"); ds = oCN.RunProcReturn("exec h_p_Sc_BadReasonReport '" + sWhere + "','" + HGroupID + "'", "h_p_Sc_BadReasonReport"); } //æ·»å åå @@ -2726,6 +2726,38 @@ } #endregion #region 工忥忹æ¹ä¸çå·¥æ¶ [Route("Gy_PlanShifts/BulkWorkTime")] [HttpGet] public object BulkWorkTime(string HSourceNumber1, string HSourceNumber2, string HBeginDate, string HEndDate,string HWorkTime) { try { oCN.BeginTran(); string sql = $"update a set HOverTimes = {HWorkTime} from Gy_PlanShifts a left join Gy_Source b on a.HSourceID = b.HItemID where b.HNumber between '{HSourceNumber1}' and '{HSourceNumber2}' and CONVERT(varchar(120),a.HDate,23) between CONVERT(varchar(120),'{HBeginDate}',23) and CONVERT(varchar(120),'{HEndDate}',23)"; //æ§è¡æ´æ°ä¸çå·¥æ¶è¯å¥ oCN.RunProc(sql); 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 å¶æçæç»æ¥è¡¨ [Route("MaterOutEntryReport/Sc_ProductedRateReport")] WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_DayPlanPlatFormBillController.cs
@@ -169,6 +169,9 @@ try { Stopwatch sw = new Stopwatch();//计æ¶å¨ sw.Start();//å¼å§è®¡æ¶ if (!DBUtility.ClsPub.Security_Log("Sc_WorkBillSortBill_Edit", 1, false, user)) { objJsonResult.code = "0"; @@ -198,9 +201,8 @@ string sReturn = ""; oSystemParameter.ShowBill(ref sReturn); for (int i = 0; i < list.Count; i++) { { TrueCount = 0; SumCount = 0; long HInterID = 0; @@ -248,10 +250,10 @@ objJsonResult.data = null; return objJsonResult; } } } ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain 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"; @@ -393,6 +395,8 @@ objJsonResult.data = null; return objJsonResult; } } LogService.CustomWriteLog("2.5:", DateTime.Now.ToString("yyyy-MM-dd")); @@ -401,6 +405,8 @@ 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; @@ -444,6 +450,15 @@ "HMasterDate,HQty,HUseTimes)" + $"values({HInterID}, {(ds.Tables[0].Rows.Count + 1)}," + $" '{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"; @@ -2618,6 +2633,58 @@ } #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] WebAPI/Models/Gy_RoutingBillSub_WorkQty.cs
New file @@ -0,0 +1,18 @@ using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace WebAPI.Models { public class Gy_RoutingBillSub_WorkQty : DBUtility.ClsXt_BaseBillSub { public Int64 HEntrySubID { get; set; }//å表ID public Int64 HSourceID { get; set; }//çäº§èµæºID public Decimal HWorkQty_Source { get; set; }//çäº§èµæºäº§è½ public Decimal HEntryStdEmpQty { get; set; }//çäº§èµæºæ åäººæ° public Decimal HEntryStdEmpAvg { get; set; }//çäº§èµæºäººåäº§è½ public Int64 HSortNum { get; set; }//ä¼å 级 } } WebAPI/WebAPI.csproj
@@ -827,6 +827,7 @@ <Compile Include="Models\ClsSc_AssemblyBillSub.cs" /> <Compile Include="Models\ClsSc_MESBeginWorkBillSub_RelationBill.cs" /> <Compile Include="Models\Gy_MouldFileSub_SubMater.cs" /> <Compile Include="Models\Gy_RoutingBillSub_WorkQty.cs" /> <Compile Include="Models\QC_OutCompCheckBillSub_ValueGrid.cs" /> <Compile Include="Models\SBGL\SBBB\Sb_EquipMentCollectionTechParam_Temp.cs" /> <Compile Include="Models\SBGL\SBBB\Sb_EquipMentCollectionTechParam.cs" />