WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_Cg_PODemandPlanBillController.cs
@@ -281,11 +281,11 @@ if (ds.Tables[0].Rows.Count > 0) { if (ds.Tables[0].Rows[0]["åæ®ç¶æ"].ToString() == "2") if (ds.Tables[0].Rows[0]["åæ®ç¶æ"].ToString() == "3") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å½ååæ®æ£å¨å®¡æ ¸,ä¸è½å ³éï¼"; objJsonResult.Message = "å½ååæ®å·²å ³é!"; objJsonResult.data = null; return objJsonResult; } @@ -321,8 +321,70 @@ } #endregion #region ææè®¡åå åå ³é [Route("JIT_Cg_PODemandPlanBill/CancelClosePODemandPlanBillList")] [HttpGet] public object CancelClosePODemandPlanBillList(string HInterID, string User) { try { //å ³éæé if (!DBUtility.ClsPub.Security_Log_second("JIT_Cg_PODemandPlanBill_Close", 1, false, User)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ æéå ³éï¼"; objJsonResult.data = null; return objJsonResult; } ds = oCN.RunProcReturn("select * from h_v_JIT_Cg_PODemandPlanBillList where 1=1 and hmainid=" + HInterID, "h_v_JIT_Cg_PODemandPlanBillList"); if (ds.Tables[0].Rows.Count > 0) { if (ds.Tables[0].Rows[0]["åæ®ç¶æ"].ToString() != "3") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å½ååæ®æ²¡æå¤äºå ³éç¶æ!"; objJsonResult.data = null; return objJsonResult; } oCN.BeginTran();//å¼å¯äºå¡ string HBillStatus = ds.Tables[0].Rows[0]["å®¡æ ¸äºº"].ToString() == "" ? "1" : "2"; oCN.RunProc($"update JIT_Cg_PODemandPlanBillMain set HBillStatus='{HBillStatus}',HCloseMan='',HCloseDate=null where HInterID={HInterID}"); oCN.Commit();//ç»æäºå¡ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "å ³éæåï¼"; objJsonResult.data = null; return objJsonResult; } objJsonResult.code = "0"; objJsonResult.count = 0; 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; } } #endregion #region ææè®¡åå ææè®¡åæ¥è¡¨(éè´è®¢å维度) public class ReportPODemandPlanBill public class ReportPODemandPlanBill { public int? HORGID; public DateTime HBEGINDATE; WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_DayPlanPlatFormImportController.cs
@@ -105,8 +105,10 @@ ds = oCN.RunProcReturn(sql1, "h_v_IF_ICMOBillList"); if (ds.Tables[0].Rows.Count == 0) { error += $"没æç产订åä¿¡æ¯ï¼ç产订åå·:{ tb2.Rows[i]["ç产订åå·*"].ToString()},ç产车é´ç¼ç :{tb2.Rows[i]["ç产车é´ç¼ç *"].ToString()}" + $",ç产订åæç»è¡å·:{ tb2.Rows[i]["ç产订åæç»è¡å·*"].ToString()},ç©æç¼ç :{ tb2.Rows[i]["ç©æç¼ç *"].ToString()}"; $",ç产订åæç»è¡å·:{ tb2.Rows[i]["ç产订åæç»è¡å·*"].ToString()},ç©æç¼ç :{ tb2.Rows[i]["ç©æç¼ç *"].ToString()}"; } if (error.Length > 0) { WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/Sc_WorkBillSortBillController.cs
@@ -367,11 +367,11 @@ if (ds.Tables[0].Rows.Count > 0) { if (ds.Tables[0].Rows[0]["åæ®ç¶æ"].ToString() == "2") if (ds.Tables[0].Rows[0]["åæ®ç¶æ"].ToString() == "3") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å½ååæ®æ£å¨å®¡æ ¸,ä¸è½å ³éï¼"; objJsonResult.Message = "å½ååæ®å·²å ³éï¼"; objJsonResult.data = null; return objJsonResult; } @@ -406,5 +406,66 @@ } } #endregion #region æ¥è®¡åå·¥å åå ³é [Route("Sc_WorkBillSortBill/CancelCloseBillWorkBillSortBillList")] [HttpGet] public object CancelCloseBillWorkBillSortBillList(string HInterID, string User) { try { //å ³éæé if (!DBUtility.ClsPub.Security_Log_second("Sc_WorkBillSortBill_Close", 1, false, User)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ æéå ³éï¼"; objJsonResult.data = null; return objJsonResult; } ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkBillSortBillList where 1=1 and hmainid=" + HInterID, "h_v_JIT_Sc_WorkBillSortBillList"); if (ds.Tables[0].Rows.Count > 0) { if (ds.Tables[0].Rows[0]["åæ®ç¶æ"].ToString() != "3") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å½ååæ®æ²¡æå¤äºå ³éç¶æï¼"; objJsonResult.data = null; return objJsonResult; } oCN.BeginTran();//å¼å¯äºå¡ string HBillStatus = ds.Tables[0].Rows[0]["å®¡æ ¸äºº"].ToString() == "" ? "1" : "2"; oCN.RunProc("update Sc_WorkBillSortBillMain set HBillStatus='" + HBillStatus + "',HCloseMan='',HCloseDate=null where HInterID=" + HInterID + ""); oCN.Commit();//ç»æäºå¡ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "å ³éæåï¼"; objJsonResult.data = null; return objJsonResult; } objJsonResult.code = "0"; objJsonResult.count = 0; 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; } } #endregion } } WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/Sc_WorkDemandPlanBillController.cs
@@ -280,11 +280,11 @@ if (ds.Tables[0].Rows.Count > 0) { if (ds.Tables[0].Rows[0]["åæ®ç¶æ"].ToString() == "2") if (ds.Tables[0].Rows[0]["åæ®ç¶æ"].ToString() == "3") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å½ååæ®æ£å¨å®¡æ ¸,ä¸è½å ³éï¼"; objJsonResult.Message = "å½ååæ®å·²å ³é!"; objJsonResult.data = null; return objJsonResult; } @@ -320,6 +320,68 @@ } #endregion #region è¦æè®¡åå åå ³é [Route("Sc_WorkDemandPlanBill/CancelCloseWorkDemandPlanBillList")] [HttpGet] public object CancelCloseWorkDemandPlanBillList(string HInterID, string User) { try { //å ³éæé if (!DBUtility.ClsPub.Security_Log_second("Sc_WorkDemandPlanBill_Close", 1, false, User)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "æ æéå ³éï¼"; objJsonResult.data = null; return objJsonResult; } ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkDemandPlanBillList where 1=1 and hmainid=" + HInterID, "h_v_JIT_Sc_WorkDemandPlanBillList"); if (ds.Tables[0].Rows.Count > 0) { if (ds.Tables[0].Rows[0]["åæ®ç¶æ"].ToString() != "3") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "å½ååæ®æ²¡æå¤äºå ³éç¶æ!"; objJsonResult.data = null; return objJsonResult; } oCN.BeginTran();//å¼å¯äºå¡ string HBillStatus = ds.Tables[0].Rows[0]["å®¡æ ¸äºº"].ToString() == "" ? "1" : "2"; oCN.RunProc($"update Sc_WorkDemandPlanBillMain set HBillStatus='{HBillStatus}',HCloseMan='',HCloseDate=null where HInterID={HInterID}"); oCN.Commit();//ç»æäºå¡ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "å ³éæåï¼"; objJsonResult.data = null; return objJsonResult; } objJsonResult.code = "0"; objJsonResult.count = 0; 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; } } #endregion #region è¦æè®¡åå è¦æè®¡åæ¥è¡¨ public class ReportWorkDemandPlanBill {