From c8d8f25fd2b1a5d5db0a59225ee5c7d6795e6f3e Mon Sep 17 00:00:00 2001 From: YL <YL@LAPTOP-SE03PLUR> Date: 星期二, 07 十二月 2021 18:50:17 +0800 Subject: [PATCH] 雅琪诺报工台切出页面(走工序) --- WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs | 2 WebAPI/Models/工资管理/ClsPay_GroupBalBillMain.cs | 19 ++++++ WebAPI/Models/工资管理/ClsPay_GroupBalBillSub.cs | 28 +++++++++ WebAPI/WebAPI.csproj | 5 + WebAPI/Controllers/Sc_MouldOtherInBillController.cs | 5 - WebAPI/DLL/工资管理/ClsPay_GroupBalBill.cs | 22 +++--- WebAPI/Models/工资管理/ClsPay_GroupBalBillEmp.cs | 26 ++++++++ WebAPI/Controllers/工资管理/Pay_GroupBalBillController.cs | 26 +++++--- 8 files changed, 107 insertions(+), 26 deletions(-) diff --git a/WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs index 6dc9035..71dc105 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs @@ -17,7 +17,7 @@ private json objJsonResult = new json(); public DataSet ds = new DataSet(); public WebServer webserver = new WebServer(); - public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); public DAL.ClsSc_MouldScrapInBill BillNew0 = new DAL.ClsSc_MouldScrapInBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫� public DAL.ClsSc_MouldScrapInBill BillOld0 = new DAL.ClsSc_MouldScrapInBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫� diff --git a/WebAPI/Controllers/Sc_MouldOtherInBillController.cs b/WebAPI/Controllers/Sc_MouldOtherInBillController.cs index 765566a..beff831 100644 --- a/WebAPI/Controllers/Sc_MouldOtherInBillController.cs +++ b/WebAPI/Controllers/Sc_MouldOtherInBillController.cs @@ -17,7 +17,7 @@ private json objJsonResult = new json(); public DataSet ds = new DataSet(); public WebServer webserver = new WebServer(); - + public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); public DAL.ClsSc_MouldScrapInBill BillNew0 = new DAL.ClsSc_MouldScrapInBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫� public DAL.ClsSc_MouldScrapInBill BillOld0 = new DAL.ClsSc_MouldScrapInBill(); //妯″叿鎶ュ簾鍏ュ簱瀵瑰簲鍗曟嵁绫� @@ -320,8 +320,7 @@ if (bResult) { string sql = $"exec h_p_Sc_MouldChangeFileStatus 'in','{oBill.omodel.HInterID.ToString()}' "; - SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - oCN.RunProc(sql); + oCn.RunProc(sql); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; diff --git a/WebAPI/Controllers/Pay_GroupBalBillController.cs "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs" similarity index 84% rename from WebAPI/Controllers/Pay_GroupBalBillController.cs rename to "WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs" index 69329ae..5a974ca 100644 --- a/WebAPI/Controllers/Pay_GroupBalBillController.cs +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs" @@ -27,7 +27,7 @@ ///鍙傛暟锛歴tring sql銆� ///杩斿洖鍊硷細object銆� /// </summary> - [Route("Pay_GroupBalBill/GetGroupBalBill")] + [Route("Pay_GroupBalBill/GetGroupBalBill")] [HttpGet] public object GetGroupBalBill(string sWhere) { @@ -65,7 +65,7 @@ } } - + #region[宸ヨ祫缁撶畻闆嗕綋鍗曠紪杈戞椂鑾峰彇琛ㄥご鏁版嵁] [Route("Pay_GroupBalBill/Pay_GroupBalBillListCheckDetail")] [HttpGet] @@ -89,19 +89,25 @@ public object Pay_GroupBalBillListProjectDetai(string sqlWhere) { DataSet ds; + DataSet ds1; + List<object> list = new List<object>(); try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - string sql1 = "SELECT HMaterID,HMaterCode,HMaterName, HDeptID,閮ㄩ棬浠g爜,閮ㄩ棬" + - ",HGroupID,鐝粍浠g爜,鐝粍,鎽樿,鍐呴儴鍗曟嵁鍙�,琛ㄥご澶囨敞,鍒跺崟浜�,鍒跺崟鏃ユ湡" + - ",瀹℃牳浜�,瀹℃牳鏃ユ湡,淇敼浜�,淇敼鏃ユ湡,鍏抽棴浜�, 鍏抽棴鏃ユ湡,HProcID,HProcNumber,HProcName" + - ",鏁伴噺,閲戦 FROM h_v_Pay_GroupBalBillList where 1 = 1 "; - string sql = sql1 + sqlWhere; + string sql = @"SELECT HMaterID,HMaterCode,HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,HUnitID,HUnitNumber,HUnitName + HProcID,HProcNumber,HProcName,HSourceID,HSourceNumber,HSourceName,宸ユ椂 HTimes,鏁伴噺 HQty,宸ヤ环 HPrice,閲戦 HMoney, HSumMoney,HOtherSubsidy,HOtherDeduct,HPayMoney FROM h_v_Pay_GroupBalBillList where 1 = 1 " + sqlWhere; ds = oCN.RunProcReturn(sql, "h_v_Pay_GroupBalBillList"); + string sql1 = @"select + HEmpID ,b.HNumber HEmpNumber, b.HName HEmpName, b.HEmpRate HEmpRate, HBaseTimes, HMoney, HOtherSubsidy, HOtherSubsidy, HYF,'' HISZF ,'' HISFT , a.HRemark +from Pay_GroupBalBillEmp a + left join Gy_Employee b on a.HEmpID = b.HItemID " + sqlWhere.Replace("hmainid", "HInterID"); + ds1 = oCN.RunProcReturn(sql1, "Pay_GroupBalBillEmp"); + list.Add(ds.Tables[0]); + list.Add(ds1.Tables[0]); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; + objJsonResult.list = list; } catch (Exception e) { @@ -113,7 +119,7 @@ return objJsonResult; } #endregion - + /// <summary> ///宸ヨ祫缁撶畻涓汉鍗曞垹闄ゅ姛鑳� /// </summary> @@ -148,7 +154,7 @@ [Route("Pay_GroupBalBill/getGroupBalBillPrice")] [HttpGet] - public object getGroupBalBillPrice(string HMaterID,string HProcID) + public object getGroupBalBillPrice(string HMaterID, string HProcID) { try { diff --git "a/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBill.cs" "b/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBill.cs" index a1c1f2c..0ccab1b 100644 --- "a/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBill.cs" +++ "b/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBill.cs" @@ -7,9 +7,9 @@ { public class ClsPay_GroupBalBill : DBUtility.ClsXt_BaseBill { - public Model.ClsPay_GroupBalBillMain omodel = new Model.ClsPay_GroupBalBillMain(); - public List<Model.ClsPay_GroupBalBillSub> DetailColl = new List<Model.ClsPay_GroupBalBillSub>(); - public List<Model.ClsPay_GroupBalBillEmp> DetailEmpColl = new List<Model.ClsPay_GroupBalBillEmp>(); + public Models.ClsPay_GroupBalBillMain omodel = new Models.ClsPay_GroupBalBillMain(); + public List<Models.ClsPay_GroupBalBillSub> DetailColl = new List<Models.ClsPay_GroupBalBillSub>(); + public List<Models.ClsPay_GroupBalBillEmp> DetailEmpColl = new List<Models.ClsPay_GroupBalBillEmp>(); public ClsPay_GroupBalBill() { @@ -66,7 +66,7 @@ DeleteBillSub2(lngBillKey); //鎻掑叆瀛愯〃 omodel.HInterID = lngBillKey; - foreach (Model.ClsPay_GroupBalBillSub oSub in DetailColl) + foreach (Models.ClsPay_GroupBalBillSub oSub in DetailColl) { oCn.RunProc("Insert into Pay_GroupBalBillSub " + " (HInterID,HEntryID,HRemark" + @@ -84,7 +84,7 @@ } // //鎻掑叆瀛愯〃2 - foreach (Model.ClsPay_GroupBalBillEmp oSubSec in DetailEmpColl) + foreach (Models.ClsPay_GroupBalBillEmp oSubSec in DetailEmpColl) { oCn.RunProc("Insert into Pay_GroupBalBillEmp " + " (HInterID,HEntryID,HRemark" + @@ -102,7 +102,7 @@ "," + oSubSec.HBaseDays.ToString() + "," + oSubSec.HOverDays.ToString() + "," + oSubSec.HLeaveDays.ToString() + "," + oSubSec.HYf.ToString() + "," + oSubSec.HMoney.ToString() + "," + oSubSec.HOtherSubsidy.ToString() + "," + oSubSec.HOtherDeduct.ToString() + "," + Convert.ToString(oSubSec.HIsPay ? 1 : 0) + "," + Convert.ToString(oSubSec.HAvgFlag ? 1 : 0) + ") "); } - //foreach (Model.ClsPay_GroupBalBillSub oSub in DetailColl) + //foreach (Models.ClsPay_GroupBalBillSub oSub in DetailColl) //{ // Ds = oCn.RunProcReturn("exec h_p_Pay_GroupBalBill_Qty " + oSub.HICMOInterID, ""); // if (Ds.Tables[0].Rows.Count == 0) @@ -149,7 +149,7 @@ ") "); // //鎻掑叆瀛愯〃 - foreach (Model.ClsPay_GroupBalBillSub oSub in DetailColl) + foreach (Models.ClsPay_GroupBalBillSub oSub in DetailColl) { oCn.RunProc("Insert into Pay_GroupBalBillSub " + " (HInterID,HEntryID,HRemark" + @@ -167,7 +167,7 @@ } // //鎻掑叆瀛愯〃2 - foreach (Model.ClsPay_GroupBalBillEmp oSubSec in DetailEmpColl) + foreach (Models.ClsPay_GroupBalBillEmp oSubSec in DetailEmpColl) { oCn.RunProc("Insert into Pay_GroupBalBillEmp " + " (HInterID,HEntryID,HRemark" + @@ -186,7 +186,7 @@ "," + oSubSec.HMoney.ToString() + "," + oSubSec.HOtherSubsidy.ToString() + "," + oSubSec.HOtherDeduct.ToString() + "," + Convert.ToString(oSubSec.HIsPay ? 1 : 0) + "," + Convert.ToString(oSubSec.HAvgFlag ? 1 : 0) + ") "); } // - //foreach (Model.ClsPay_GroupBalBillSub oSub in DetailColl) + //foreach (Models.ClsPay_GroupBalBillSub oSub in DetailColl) //{ // Ds = oCn.RunProcReturn("exec h_p_Pay_GroupBalBill_Qty " + oSub.HICMOInterID, ""); // if (Ds.Tables[0].Rows.Count == 0) @@ -266,7 +266,7 @@ DetailColl.Clear();//娓呯┖ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) { - Model.ClsPay_GroupBalBillSub oSub = new Model.ClsPay_GroupBalBillSub(); + Models.ClsPay_GroupBalBillSub oSub = new Models.ClsPay_GroupBalBillSub(); // 鍥哄畾璧嬪��=============================================== oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]); oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]); @@ -306,7 +306,7 @@ DetailEmpColl.Clear();//娓呯┖ for (int i = 0; i < DsSubSec.Tables[0].Rows.Count; i++) { - Model.ClsPay_GroupBalBillEmp oSubSec = new Model.ClsPay_GroupBalBillEmp(); + Models.ClsPay_GroupBalBillEmp oSubSec = new Models.ClsPay_GroupBalBillEmp(); // 鍥哄畾璧嬪��=============================================== oSubSec.HInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HInterID"]); oSubSec.HEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HEntryID"]); diff --git "a/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBillEmp.cs" "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBillEmp.cs" new file mode 100644 index 0000000..30c47e3 --- /dev/null +++ "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBillEmp.cs" @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace WebAPI.Models +{ + public class ClsPay_GroupBalBillEmp:DBUtility.ClsXt_BaseBillSub + { + public DateTime HEntryCloseDate;// datetime --行关闭 (默认为'') new + public Int64 HEmpID; + public double HEmpRate; //职员系数 + public double HBaseTimes; //基本工时 + public double HOverTimes; //加班工时 + public double HLeaveTimes; //请假工时 + public Int64 HCTPrjID; //核算方式ID + public double HBaseDays; //基本天数 + public double HOverDays; //加班天数 + public double HLeaveDays; //请假天数 + public double HMoney; //计件工资 + public double HOtherSubsidy; //其他补贴 + public double HOtherDeduct; //其他扣款 + public double HYf; //应付工资 + public bool HIsPay; //是否支付 + public bool HAvgFlag; + } +} diff --git "a/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBillMain.cs" "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBillMain.cs" new file mode 100644 index 0000000..4cde26a --- /dev/null +++ "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBillMain.cs" @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace WebAPI.Models +{ + public class ClsPay_GroupBalBillMain:DBUtility.ClsXt_BaseBillMain + { + public Int64 HDeptID; + public Int64 HGroupID; + public Int64 HPayType; + public double HOtherDeduct; + public double HOtherSubsidy; + public double HPayMoney; + public double HSumMoney; + public string HExplanation; + public string HInnerBillNo; + } +} diff --git "a/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBillSub.cs" "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBillSub.cs" new file mode 100644 index 0000000..47f00c8 --- /dev/null +++ "b/WebAPI/Models/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_GroupBalBillSub.cs" @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace WebAPI.Models +{ + public class ClsPay_GroupBalBillSub:DBUtility.ClsXt_BaseBillSub + { + public DateTime HEntryCloseDate;// datetime --行关闭 (默认为'') new + public Int64 HMaterID;// int --物料ID + public Int64 HProcID;// int --工序ID + public Int64 HUnitID;// int --单位ID + public Int64 HSourceID;// int --资源ID + public double HTimes;// decimal(18,8) --工时 + public double HQty;// decimal(18,8) --数量 + public double HPrice;// decimal(18,8) --工价 + public double HMoney;// decimal(18,8) --金额 + public Int64 HICMOInterID;// int --生产任务单ID + public string HICMOBillNo;// varchar(50) --生产任务单号 + public Int64 HProcReportInterID;// int --工序汇报单ID + public Int64 HProcReportEntryID;// int --工序汇报单子ID + public string HProcReportBillNo;// varchar(50) --工序汇报单号 + public Int64 HProcPlanInterID;// int --工序计划单ID + public Int64 HProcPlanEntryID;// int --工序计划单子ID + public string HProcPlanBillNo;// varchar(50) --工序计划单号 + public double HSqty; + } +} diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index 090b563..d8587dc 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -349,7 +349,7 @@ <Compile Include="Controllers\Open_PrintTemController.cs" /> <Compile Include="Controllers\ReportStepPlatFormController.cs" /> <Compile Include="Controllers\宸ヨ祫绠$悊\Pay_OtherBalBillController.cs" /> - <Compile Include="Controllers\Pay_GroupBalBillController.cs" /> + <Compile Include="Controllers\宸ヨ祫绠$悊\Pay_GroupBalBillController.cs" /> <Compile Include="Controllers\PurchaseOrderController.cs" /> <Compile Include="Controllers\QC_POStockInCheckBillController.cs" /> <Compile Include="Controllers\Pay_WorkTimesBillController.cs" /> @@ -445,6 +445,9 @@ <Compile Include="DLL\ClsSc_MouldOtherInBill.cs" /> <Compile Include="DLL\ClsSc_MouldMoveStockStepOutBill.cs" /> <Compile Include="DLL\宸ヨ祫绠$悊\ClsPay_GroupBalBill.cs" /> + <Compile Include="Models\宸ヨ祫绠$悊\ClsPay_GroupBalBillEmp.cs" /> + <Compile Include="Models\宸ヨ祫绠$悊\ClsPay_GroupBalBillMain.cs" /> + <Compile Include="Models\宸ヨ祫绠$悊\ClsPay_GroupBalBillSub.cs" /> <Compile Include="DLL\宸ヨ祫绠$悊\ClsPay_SingleBalBill.cs" /> <Compile Include="DLL\ClsSc_MouldProdBackBill.cs" /> <Compile Include="DLL\宸ヨ祫绠$悊\ClsPay_OtherBalBill.cs" /> -- Gitblit v1.9.1