DAL/采购管理/ClsCg_POOrderBill.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DBUtility/业务单据/ClsXt_BaseBill.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/基础资料/基础资料/Xt_CheckFlowProgressBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
DAL/²É¹º¹ÜÀí/ClsCg_POOrderBill.cs
@@ -310,94 +310,6 @@ } } //åèµ·å®¡æ¹ public bool startCheckFlow(Int64 lngBillKey, Int64 HCheckFlowID_select, ref string sReturn) { try { string HBillNo = ""; //åæ®å· string HCheckFlowID = ""; //å®¡æ¹æµID string HCheckItemNowID = ""; //å½åå®¡æ ¸é¡¹ç®ID string HCheckItemNextID = ""; //å¾ å®¡æ ¸é¡¹ç®ID //夿æ¯å¦å·²ç»åèµ·å®¡æ¹ string sql0 = "select * from Xt_BillCheckFlowStatus where HBillInterID = " + lngBillKey + " and HBillTypeID = '" + this.BillType + "'"; DataSet ds0 = oCn.RunProcReturn(sql0, "Xt_BillCheckFlowStatus"); if (ds0 != null && ds0.Tables[0].Rows.Count > 0) { sReturn = "忮已å起审æ¹ï¼ä¸å¯éå¤å®¡æ¹ï¼"; return false; } //è·ååæ®æ°æ® string sql = "select * from " + this.MvarItemKey + " where HInterID = " + lngBillKey; DataSet ds = oCn.RunProcReturn(sql, this.MvarItemKey); if (ds == null || ds.Tables[0].Rows.Count == 0) { sReturn = "åæ®ä¸åå¨ï¼"; return false; } HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString(); //è·ååæ®ç±»å对åºçé»è®¤å®¡æ¹æµ string sql1 = "select b.HInterID,b.HCheckItemID from Xt_CheckFlowMain as a " + "inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " + "where a.HBillTypeID = '" + this.BillType + "' " + "and a.HInterID = " + HCheckFlowID_select + " " + "order by b.HFlowNo asc"; DataSet ds1 = oCn.RunProcReturn(sql1, "Xt_CheckFlowMain"); if (ds1 == null || ds1.Tables[0].Rows.Count == 0) { sReturn = "é»è®¤å®¡æ¹æµä¸åå¨ï¼"; return false; } HCheckFlowID = ds1.Tables[0].Rows[0]["HInterID"].ToString(); HCheckItemNowID = ds1.Tables[0].Rows[0]["HCheckItemID"].ToString(); if (ds1.Tables[0].Rows.Count >= 2) { HCheckItemNextID = ds1.Tables[0].Rows[1]["HCheckItemID"].ToString(); } else { HCheckItemNextID = "0"; } oCn.BeginTran(); //å¢å 忮审æ¹ç¶æè¡¨ æ°æ® for (int i = 0; i < ds1.Tables[0].Rows.Count; i++) { string sql2 = "insert into Xt_BillCheckFlowStatus" + "(HBillTypeID,HBillInterID,HBillNo,HCheckFlowID,HCheckItemID,HChecker,HCheckDate,HCheckNote) " + "values(" + "'" + this.BillType + "'," + "" + lngBillKey + "," + "'" + HBillNo + "'," + "" + ds1.Tables[0].Rows[i]["HInterID"].ToString() + "," + "" + ds1.Tables[0].Rows[i]["HCheckItemID"].ToString() + "," + "" + "''" + "," + "" + "''" + "," + "" + "''" + "" + ")"; oCn.RunProc(sql2); } //æ´æ°ä¸»è¡¨ å®¡æ¹æµ æ°æ® string sql3 = "update " + this.MvarItemKey + " set HCheckFlowID = " + HCheckFlowID + ",HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey; oCn.RunProc(sql3); oCn.Commit(); return true; } catch (Exception e) { sReturn += e.Message; return false; } } } } DBUtility/ÒµÎñµ¥¾Ý/ClsXt_BaseBill.cs
@@ -372,6 +372,166 @@ } } //åèµ·å¤çº§å®¡æ¹ public bool startCheckFlow(Int64 lngBillKey, Int64 HCheckFlowID_select, ref string sReturn) { try { string HBillNo = ""; //åæ®å· string HCheckFlowID = ""; //å®¡æ¹æµID string HCheckItemNowID = ""; //å½åå®¡æ ¸é¡¹ç®ID string HCheckItemNextID = ""; //å¾ å®¡æ ¸é¡¹ç®ID //夿æ¯å¦å·²ç»åèµ·å®¡æ¹ string sql0 = "select * from Xt_BillCheckFlowStatus where HBillInterID = " + lngBillKey + " and HBillTypeID = '" + this.BillType + "'"; DataSet ds0 = oCn.RunProcReturn(sql0, "Xt_BillCheckFlowStatus"); if (ds0 != null && ds0.Tables[0].Rows.Count > 0) { sReturn = "忮已å起审æ¹ï¼ä¸å¯éå¤å®¡æ¹ï¼"; return false; } //è·ååæ®æ°æ® string sql = "select * from " + this.MvarItemKey + " where HInterID = " + lngBillKey; DataSet ds = oCn.RunProcReturn(sql, this.MvarItemKey); if (ds == null || ds.Tables[0].Rows.Count == 0) { sReturn = "åæ®ä¸åå¨ï¼"; return false; } HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString(); //è·ååæ®ç±»å对åºçé»è®¤å®¡æ¹æµ string sql1 = "select b.HInterID,b.HCheckItemID from Xt_CheckFlowMain as a " + "inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " + "where a.HBillTypeID = '" + this.BillType + "' " + "and a.HInterID = " + HCheckFlowID_select + " " + "order by b.HFlowNo asc"; DataSet ds1 = oCn.RunProcReturn(sql1, "Xt_CheckFlowMain"); if (ds1 == null || ds1.Tables[0].Rows.Count == 0) { sReturn = "é»è®¤å®¡æ¹æµä¸åå¨ï¼"; return false; } HCheckFlowID = ds1.Tables[0].Rows[0]["HInterID"].ToString(); HCheckItemNowID = ds1.Tables[0].Rows[0]["HCheckItemID"].ToString(); if (ds1.Tables[0].Rows.Count >= 2) { HCheckItemNextID = ds1.Tables[0].Rows[1]["HCheckItemID"].ToString(); } else { HCheckItemNextID = "0"; } oCn.BeginTran(); //å¢å 忮审æ¹ç¶æè¡¨ æ°æ® for (int i = 0; i < ds1.Tables[0].Rows.Count; i++) { string sql2 = "insert into Xt_BillCheckFlowStatus" + "(HBillTypeID,HBillInterID,HBillNo,HCheckFlowID,HCheckItemID,HChecker,HCheckDate,HCheckNote) " + "values(" + "'" + this.BillType + "'," + "" + lngBillKey + "," + "'" + HBillNo + "'," + "" + ds1.Tables[0].Rows[i]["HInterID"].ToString() + "," + "" + ds1.Tables[0].Rows[i]["HCheckItemID"].ToString() + "," + "" + "''" + "," + "" + "''" + "," + "" + "''" + "" + ")"; oCn.RunProc(sql2); } //æ´æ°ä¸»è¡¨ å®¡æ¹æµ æ°æ® string sql3 = "update " + this.MvarItemKey + " set HCheckFlowID = " + HCheckFlowID + ",HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + ",HBillStatus=" + 6 + " where HInterID = " + lngBillKey; oCn.RunProc(sql3); oCn.Commit(); return true; } catch (Exception e) { sReturn += e.Message; return false; } } //驳å public bool RejectCheckFlowProgress(Int64 lngBillKey, string HBillNo,string sUser, ref string sReturn) { if (isUse(lngBillKey, ref sReturn)) { return false; } try { //å¼å¯äºå¡ oCn.BeginTran(); //夿æ¯å¦åå¨å®¡æ ¸è¿çé¡¹ç® string sql0 = "select * from Xt_BillCheckFlowStatus where HBillInterID = " + lngBillKey + " and HBillTypeID = '" + this.BillType + "' and ISNULL(HChecker,'') <> ''"; DataSet ds0 = oCn.RunProcReturn(sql0, "Xt_BillCheckFlowStatus"); if (ds0 != null && ds0.Tables[0].Rows.Count == 0) { sReturn = "åæ®ä¸åå¨å·²ç»å®¡æ ¸ç项ç®ï¼"; return false; } //è·åéè¦é©³åçå®¡æ ¸é¡¹ç® sql0 = "select c.* from Xt_CheckFlowMain as a " + "inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " + "inner join Xt_BillCheckFlowStatus as c on a.HBillTypeID = c.HBillTypeID and b.HCheckItemID = c.HCheckItemID " + "where c.HBillTypeID = '" + this.BillType + "' and c.HBillInterID = " + lngBillKey + " " + "order by b.HFlowNo asc"; ds0 = oCn.RunProcReturn(sql0, "Xt_BillCheckFlowStatus"); if (ds0 == null || ds0.Tables[0].Rows.Count == 0) { sReturn = "驳å失败!åå :æªå起审æ¹ï¼ï¼"; return false; } //è·åå½åå®¡æ ¸é¡¹ç® string HCheckFlowID = ds0.Tables[0].Rows[0]["HCheckFlowID"].ToString(); //å®¡æ¹æµå ç sql0 = "select * from " + MvarItemKey + " where HInterID = " + lngBillKey; ds0 = oCn.RunProcReturn(sql0, MvarItemKey); string HCheckItemNowID = ds0.Tables[0].Rows[0]["HCheckItemNowID"].ToString(); //å½å审æ¹é¡¹ç®å ç //æ¥æ¾æ¯å¦ææé string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + sUser + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + ""; DataSet ds01 = oCn.RunProcReturn(sql01, "Xt_CheckUserRight"); if (ds01.Tables[0].Rows.Count == 0) { sReturn = "æ æéï¼"; return false; } //æ´æ° 驳åå é¤å®¡æ ¸æµç¶æè¡¨ string sql02 = "Delete Xt_BillCheckFlowStatus where HBillTypeID = '" + this.BillType + "' and HBillInterID=" + lngBillKey + " and HCheckFlowID=" + HCheckFlowID; oCn.RunProc(sql02); oCn.RunProc(" Update " + MvarItemKey + " set HChecker='',HCheckDate=null,HBillStatus=5 Where HInterID=" + lngBillKey.ToString()); //åå ¥æ¥å¿ string WorkList = "驳ååæ®ï¼åæ®å·ï¼" + HBillNo; string SystemName = "LMES-" + MvarReportTitle + "模å"; oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " + "(getdate(),'" + sUser + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','" + IPAddress + "','驳å')" ); sReturn = "åå®¡æ ¸åæ®æåï¼"; oCn.Commit(); return true; } catch (Exception e) { oCn.RollBack(); sReturn = e.Message; throw (e); } } //å®¡æ¹æµ-åå®¡æ ¸(å å«åå®¡æ ¸åæ§å¶ãåå ¥æ¥å¿) 2024-01-31 public bool AbandonCheck(SQLHelper.ClsCN oCN,Int64 lngBillKey, string HBillNo, string procName, string sUser, ref string sReturn) { WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
@@ -2399,6 +2399,66 @@ #endregion #region éè´è®¢å驳å [Route("Cg_POOrderBill/RejectCheckFlow_POOrderBill")] [HttpGet] public object RejectCheckFlow_POOrderBill(string HInterID,string CurUserID) { try { Int64 lngBillKey = 0; lngBillKey = DBUtility.ClsPub.isLong(HInterID); //对HInterIDè¿è¡ç±»åçè½¬æ¢ DAL.ClsCg_POOrderBill oBill = new DAL.ClsCg_POOrderBill(); //å®ä¾ååæ®æä½ç±»ï¼ç¨äºè¿è¡ç¸å ³æä½ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //æ ¹æ®HInterIDè·åè¯¥åæ®çæ°æ® { if (oBill.omodel.HBillStatus != 6) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "åæ®æªå¨å®¡æ ¸ä¸ä¸è½é©³å"; objJsonResult.data = null; return objJsonResult; } //å起驳å if (oBill.RejectCheckFlowProgress(lngBillKey, oBill.omodel.HBillNo,CurUserID, ref DBUtility.ClsPub.sExeReturnInfo) == true) { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "驳åæå"; 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 = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; 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("Cg_POOrderBill/StartCheckFlow_POOrderBill")] [HttpGet] @@ -2469,9 +2529,9 @@ /// <param name="IsAudit">å®¡æ ¸(0),åå®¡æ ¸(1)</param> /// <param name="CurUserName">å®¡æ ¸äºº</param> /// <returns></returns> [Route("Cg_POOrderBill/AuditXs_POOrderBill_Flow")] [Route("Cg_POOrderBill/AuditCg_POOrderBill_Flow")] [HttpGet] public object AuditXs_POOrderBill_Flow(int HInterID, int IsAudit, string CurUserName, string CurUserID) public object AuditCg_POOrderBill_Flow(int HInterID, int IsAudit, string CurUserName, string CurUserID) { //string ModRightNameCheck = "Cg_POOrderBill_Check"; DBUtility.ClsPub.CurUserName = CurUserName; @@ -2756,7 +2816,7 @@ string HCheckFlowID = ds0.Tables[0].Rows[0]["HCheckFlowID"].ToString(); //å®¡æ¹æµå ç string HCheckItemNowID = "0"; //å½å审æ¹é¡¹ç®å ç string HCheckItemNextID = "0"; //å¾ å®¡æ¹é¡¹ç®å ç if (oBill.omodel.HBillStatus <= 1) if (oBill.omodel.HBillStatus == 6) { for (int i = 0; i < ds0.Tables[0].Rows.Count; i++) { @@ -2801,7 +2861,7 @@ oCN.RunProc(sql02); //夿åå®¡æ ¸çåæ®æ¯å¦å·²ç»å®¡æ ¸å®æï¼è¥å®¡æ ¸å®æï¼åå®¡æ ¸éè¦åæ´åæ®ç¶æã if (oBill.omodel.HBillStatus <= 1) if (oBill.omodel.HBillStatus == 6) { //æ´æ°åæ®ä¸»è¡¨çå®¡æ¹æµæ°æ® string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey; @@ -2815,13 +2875,13 @@ } else { //æ´æ°åæ®ä¸»è¡¨çå®¡æ¹æµæ°æ® string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey; oCN.RunProc(sql04); //åå®¡æ ¸æäº¤AbandonCheck if (oBill.AbandonCheck(oCN, oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Xs_SeOrderBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true) { //æ´æ°åæ®ä¸»è¡¨çå®¡æ¹æµæ°æ® string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + ",HBillStatus=6 "+" where HInterID = " + lngBillKey; oCN.RunProc(sql04); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "åå®¡æ ¸æå"; WebAPI/Controllers/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/Xt_CheckFlowProgressBillController.cs
@@ -8,6 +8,7 @@ using System.Net.Http; using System.Web.Http; using WebAPI.Models; using System.Windows.Forms; namespace WebAPI.Controllers.åºç¡èµæ.åºç¡èµæ { @@ -130,5 +131,6 @@ } } #endregion } } WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -23,12 +23,12 @@ <File Include="bin/BLL.dll"> <publishTime>11/09/2022 16:02:08</publishTime> <publishTime>11/02/2022 22:03:01</publishTime> <publishTime>08/02/2024 14:00:28</publishTime> <publishTime>08/05/2024 14:51:12</publishTime> </File> <File Include="bin/BLL.pdb"> <publishTime>11/09/2022 16:02:08</publishTime> <publishTime>11/02/2022 22:03:01</publishTime> <publishTime>08/02/2024 14:00:28</publishTime> <publishTime>08/05/2024 14:51:12</publishTime> </File> <File Include="bin/BouncyCastle.Crypto.dll"> <publishTime>12/18/2020 05:32:28</publishTime> @@ -36,12 +36,12 @@ <File Include="bin/DAL.dll"> <publishTime>11/09/2022 16:02:06</publishTime> <publishTime>11/02/2022 22:02:58</publishTime> <publishTime>08/02/2024 14:00:25</publishTime> <publishTime>08/05/2024 14:51:10</publishTime> </File> <File Include="bin/DAL.pdb"> <publishTime>11/09/2022 16:02:06</publishTime> <publishTime>11/02/2022 22:02:58</publishTime> <publishTime>08/02/2024 14:00:25</publishTime> <publishTime>08/05/2024 14:51:10</publishTime> </File> <File Include="bin/Dapper.dll"> <publishTime>07/22/2016 22:52:40</publishTime> @@ -49,12 +49,12 @@ <File Include="bin/DBUtility.dll"> <publishTime>11/02/2022 22:02:56</publishTime> <publishTime>11/15/2022 13:55:23</publishTime> <publishTime>08/02/2024 14:00:20</publishTime> <publishTime>08/05/2024 14:51:05</publishTime> </File> <File Include="bin/DBUtility.pdb"> <publishTime>11/09/2022 16:01:58</publishTime> <publishTime>11/02/2022 22:02:56</publishTime> <publishTime>08/02/2024 14:00:20</publishTime> <publishTime>08/05/2024 14:51:05</publishTime> </File> <File Include="bin/Grpc.Core.Api.dll"> <publishTime>03/22/2022 13:17:26</publishTime> @@ -110,12 +110,12 @@ <File Include="bin/Model.dll"> <publishTime>11/09/2022 16:02:01</publishTime> <publishTime>11/02/2022 22:02:56</publishTime> <publishTime>08/02/2024 14:00:21</publishTime> <publishTime>08/05/2024 14:51:05</publishTime> </File> <File Include="bin/Model.pdb"> <publishTime>11/09/2022 16:02:01</publishTime> <publishTime>11/02/2022 22:02:56</publishTime> <publishTime>08/02/2024 14:00:21</publishTime> <publishTime>08/05/2024 14:51:05</publishTime> </File> <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> <publishTime>04/15/2024 12:55:45</publishTime> @@ -150,33 +150,33 @@ <File Include="bin/Pub_Class.dll"> <publishTime>11/09/2022 16:01:56</publishTime> <publishTime>11/02/2022 22:02:54</publishTime> <publishTime>08/02/2024 14:00:19</publishTime> <publishTime>08/05/2024 14:51:03</publishTime> </File> <File Include="bin/Pub_Class.pdb"> <publishTime>11/09/2022 16:01:56</publishTime> <publishTime>11/02/2022 22:02:54</publishTime> <publishTime>08/02/2024 14:00:19</publishTime> <publishTime>08/05/2024 14:51:03</publishTime> </File> <File Include="bin/Pub_Control.dll"> <publishTime>11/09/2022 16:01:57</publishTime> <publishTime>11/02/2022 22:02:55</publishTime> <publishTime>08/02/2024 14:00:19</publishTime> <publishTime>08/05/2024 14:51:04</publishTime> </File> <File Include="bin/Pub_Control.pdb"> <publishTime>11/09/2022 16:01:57</publishTime> <publishTime>11/02/2022 22:02:55</publishTime> <publishTime>08/02/2024 14:00:19</publishTime> <publishTime>08/05/2024 14:51:04</publishTime> </File> <File Include="bin/RestSharp.dll"> <publishTime>08/31/2012 06:22:50</publishTime> </File> <File Include="bin/SQLHelper.dll"> <publishTime>08/02/2024 14:00:20</publishTime> <publishTime>08/05/2024 14:51:04</publishTime> </File> <File Include="bin/SQLHelper.pdb"> <publishTime>11/09/2022 16:01:57</publishTime> <publishTime>11/02/2022 22:02:55</publishTime> <publishTime>08/02/2024 14:00:20</publishTime> <publishTime>08/05/2024 14:51:04</publishTime> </File> <File Include="bin/stdole.dll"> <publishTime>05/09/2021 13:35:37</publishTime> @@ -295,7 +295,7 @@ <File Include="bin/WebAPI.dll"> <publishTime>11/14/2022 11:23:59</publishTime> <publishTime>11/02/2022 22:03:04</publishTime> <publishTime>08/02/2024 14:00:35</publishTime> <publishTime>08/05/2024 14:51:19</publishTime> </File> <File Include="bin/WebAPI.dll.config"> <publishTime>12/15/2021 17:59:43</publishTime> @@ -303,7 +303,7 @@ <File Include="bin/WebAPI.pdb"> <publishTime>11/14/2022 11:23:59</publishTime> <publishTime>11/02/2022 22:03:04</publishTime> <publishTime>08/02/2024 14:00:35</publishTime> <publishTime>08/05/2024 14:51:19</publishTime> </File> <File Include="bin/WebGrease.dll"> <publishTime>07/18/2013 01:03:52</publishTime> @@ -512,7 +512,7 @@ <File Include="Web.config"> <publishTime>11/14/2022 11:24:08</publishTime> <publishTime>11/02/2022 22:03:20</publishTime> <publishTime>08/02/2024 14:01:43</publishTime> <publishTime>08/05/2024 14:53:24</publishTime> </File> </ItemGroup> </Project>