From 762269970fb44873dea05b0ec448a05593b340e3 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期三, 12 十月 2022 18:53:12 +0800 Subject: [PATCH] 1 --- Pub_Class/CustomerCls/ClsXt_SystemParameter.cs | 14 + WebAPI/Controllers/Pay_ReportController.cs | 372 ++++++++++++++++++++++++++++++++++++++++++++++ APSM/装配智能排程/Sc_ICMOAutoSortBill.cs | 4 APSM/装配智能排程/Sc_ICMOAutoSortBill.designer.cs | 9 + Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs | 5 WebAPI/WebAPI.csproj | 2 APSM/Sc_ICMOSortBillFun.cs | 4 APSM/装配智能排程/Sc_ICMOAutoSortBill.resx | 12 WarM/条码打印/Gy_BarCodeBill.cs | 8 9 files changed, 414 insertions(+), 16 deletions(-) diff --git a/APSM/Sc_ICMOSortBillFun.cs b/APSM/Sc_ICMOSortBillFun.cs index 39d6cdb..31418ba 100644 --- a/APSM/Sc_ICMOSortBillFun.cs +++ b/APSM/Sc_ICMOSortBillFun.cs @@ -2002,7 +2002,7 @@ { if (sLeftQty > 0) { - if (DBUtility.ClsPub.isDate(ds.Tables[0].Rows[i]["日期"]) == DBUtility.ClsPub.isDate(grd.Columns[j].Tag)) + if (DBUtility.ClsPub.isDate(ds.Tables[0].Rows[i]["日期"]) == DBUtility.ClsPub.isDate(grd.Columns[j].Tag)) //表格的标题上 保存了日期; { //如果时间被 上道余量占用 则 跳过 b = false; @@ -2044,7 +2044,7 @@ oClsGridValues.Add(oSub); } } - else + else //卓力不需要考虑加班,下面的这一段不需要 { if (sLeftQty > sWorkQty * DBUtility.ClsPub.isSingle(ds.Tables[0].Rows[i]["最大剩余工时"])) { diff --git "a/APSM/\350\243\205\351\205\215\346\231\272\350\203\275\346\216\222\347\250\213/Sc_ICMOAutoSortBill.cs" "b/APSM/\350\243\205\351\205\215\346\231\272\350\203\275\346\216\222\347\250\213/Sc_ICMOAutoSortBill.cs" index 18e8fa9..ffc531e 100644 --- "a/APSM/\350\243\205\351\205\215\346\231\272\350\203\275\346\216\222\347\250\213/Sc_ICMOAutoSortBill.cs" +++ "b/APSM/\350\243\205\351\205\215\346\231\272\350\203\275\346\216\222\347\250\213/Sc_ICMOAutoSortBill.cs" @@ -692,7 +692,7 @@ //判断资源剩余工时,是否大于 生产周期 if (DBUtility.ClsPub.isSingle(ds.Tables[0].Rows[j]["剩余工时"]) > sLeftProdTimes) { - if (iLeftQty > 0) + if (iLeftQty > 0) // 生产订单剩余数量 { //在本资源上生产 //获取该生产资源的剩余工时进行排程。 @@ -705,7 +705,7 @@ dsSub = Sc_ICMOSortBillFun.GetWorkSourceTimeBySource(oCn, lSourceID); if (dsSub == null || dsSub.Tables[0].Rows.Count == 0) { - continue; + continue;//如果没有剩余则 执行下一个生产订单 } if (dsSub != null )//不加班排程 { diff --git "a/APSM/\350\243\205\351\205\215\346\231\272\350\203\275\346\216\222\347\250\213/Sc_ICMOAutoSortBill.designer.cs" "b/APSM/\350\243\205\351\205\215\346\231\272\350\203\275\346\216\222\347\250\213/Sc_ICMOAutoSortBill.designer.cs" index f05e6a7..396a38b 100644 --- "a/APSM/\350\243\205\351\205\215\346\231\272\350\203\275\346\216\222\347\250\213/Sc_ICMOAutoSortBill.designer.cs" +++ "b/APSM/\350\243\205\351\205\215\346\231\272\350\203\275\346\216\222\347\250\213/Sc_ICMOAutoSortBill.designer.cs" @@ -107,6 +107,7 @@ this.Tool.SuspendLayout(); this.pPic.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.spc1)).BeginInit(); this.spc1.Panel1.SuspendLayout(); this.spc1.Panel2.SuspendLayout(); this.spc1.SuspendLayout(); @@ -866,12 +867,13 @@ this.grdSourceBill.Margin = new System.Windows.Forms.Padding(4); this.grdSourceBill.Name = "grdSourceBill"; this.grdSourceBill.ReadOnly = true; + this.grdSourceBill.RowHeadersWidth = 51; this.grdSourceBill.RowTemplate.Height = 23; this.grdSourceBill.Size = new System.Drawing.Size(1571, 745); this.grdSourceBill.TabIndex = 20; this.grdSourceBill.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.grdSourceBill_CellBeginEdit); - this.grdSourceBill.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdSourceBill_CellEndEdit); this.grdSourceBill.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdSourceBill_CellClick); + this.grdSourceBill.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdSourceBill_CellEndEdit); this.grdSourceBill.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.grdSourceBill_EditingControlShowing); this.grdSourceBill.KeyDown += new System.Windows.Forms.KeyEventHandler(this.grdSourceBill_KeyDown); // @@ -898,6 +900,7 @@ this.grdMain.Margin = new System.Windows.Forms.Padding(4); this.grdMain.Name = "grdMain"; this.grdMain.ReadOnly = true; + this.grdMain.RowHeadersWidth = 51; this.grdMain.RowTemplate.Height = 23; this.grdMain.Size = new System.Drawing.Size(1571, 745); this.grdMain.TabIndex = 21; @@ -941,6 +944,7 @@ this.grdSource.Margin = new System.Windows.Forms.Padding(4); this.grdSource.Name = "grdSource"; this.grdSource.ReadOnly = true; + this.grdSource.RowHeadersWidth = 51; this.grdSource.RowTemplate.Height = 23; this.grdSource.Size = new System.Drawing.Size(1571, 0); this.grdSource.TabIndex = 0; @@ -968,6 +972,7 @@ this.grdICMO.Margin = new System.Windows.Forms.Padding(4); this.grdICMO.Name = "grdICMO"; this.grdICMO.ReadOnly = true; + this.grdICMO.RowHeadersWidth = 51; this.grdICMO.RowTemplate.Height = 23; this.grdICMO.Size = new System.Drawing.Size(1571, 0); this.grdICMO.TabIndex = 1; @@ -994,6 +999,7 @@ this.grdProcFlow.Margin = new System.Windows.Forms.Padding(4); this.grdProcFlow.Name = "grdProcFlow"; this.grdProcFlow.ReadOnly = true; + this.grdProcFlow.RowHeadersWidth = 51; this.grdProcFlow.RowTemplate.Height = 23; this.grdProcFlow.Size = new System.Drawing.Size(1579, 7); this.grdProcFlow.TabIndex = 2; @@ -1022,6 +1028,7 @@ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.spc1.Panel1.ResumeLayout(false); this.spc1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.spc1)).EndInit(); this.spc1.ResumeLayout(false); this.tabControl1.ResumeLayout(false); this.tabPage3.ResumeLayout(false); diff --git "a/APSM/\350\243\205\351\205\215\346\231\272\350\203\275\346\216\222\347\250\213/Sc_ICMOAutoSortBill.resx" "b/APSM/\350\243\205\351\205\215\346\231\272\350\203\275\346\216\222\347\250\213/Sc_ICMOAutoSortBill.resx" index 607f103..07005d2 100644 --- "a/APSM/\350\243\205\351\205\215\346\231\272\350\203\275\346\216\222\347\250\213/Sc_ICMOAutoSortBill.resx" +++ "b/APSM/\350\243\205\351\205\215\346\231\272\350\203\275\346\216\222\347\250\213/Sc_ICMOAutoSortBill.resx" @@ -112,15 +112,15 @@ <value>2.0</value> </resheader> <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <metadata name="Tool.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <metadata name="Tool.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> - <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="Tool.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> /9j/4AAQSkZJRgABAQEASABIAAD/4QSARXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAAAAB @@ -4204,10 +4204,10 @@ //////////////////////////////////////////////////////////////////////8A </value> </data> - <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>95, 17</value> </metadata> - <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>25</value> </metadata> </root> \ No newline at end of file diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs index a1dc33f..99bd236 100644 --- a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs +++ b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs @@ -135,7 +135,19 @@ { omodel.Sc_ICMOReportBill_MESFlag = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); } - + //收料通知单(送货单、到货确认) + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Cg_POInStockBill_BarCodeCtl") + { + omodel.Cg_POInStockBill_BarCodeCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Cg_POInStockBill_AutoCheck") + { + omodel.Cg_POInStockBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Cg_POInStockBill_ERPMode") + { + omodel.Cg_POInStockBill_ERPMode = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } //采购入库单 if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_POStockInBill_AutoCheck") { diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs index c0021e9..ae55eff 100644 --- a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs +++ b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs @@ -22,6 +22,11 @@ public string Sc_ICMOReportBill_UpdateSourceInterID; //上传后回填条码档案源单信息 public string Sc_ICMOReportBill_MESFlag; //生产汇报单同步MES标记,Y为同步 + //收料通知单(送货单、到货确认) + public string Cg_POInStockBill_AutoCheck; //是否自动审核 + public string Cg_POInStockBill_ERPMode; //WMS系统同步至ERP的类型(WISE、CLOUD) + public string Cg_POInStockBill_BarCodeCtl; //到货确认必须扫码箱条码 + //采购入库 public string Kf_POStockInBill_AutoCheck; //是否自动审核 public string Kf_POStockInBill_ERPMode; //WMS系统同步至ERP的类型(WISE、CLOUD) diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" index 8573a6b..73b5cbf 100644 --- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" +++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" @@ -824,9 +824,9 @@ //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); LSHlen = 4; - if (sTMNumber.Length != 16) + if (sTMNumber.Length != 16 && sTMNumber.Length != 15) { - MessageBox.Show("鏉$爜闀垮害涓嶅16浣嶏紝鏄惁鏁版嵁涓嶅叏锛佸埗閫犳湰閮�1浣�:[0] + 鏈哄瀷浠g爜5浣�:[" + HModelName + "] + 骞存湀鏃�5浣�:["+ HBarCodeDate + "] + 鎵规鍙�2浣�:[" + HBarCodeBatchNo + "]+ 鍘嬬缉鏈�1浣�:["+ HYasuoji + "]+00 ; "); + MessageBox.Show("鏉$爜闀垮害涓嶅15鎴�16浣嶏紝鏄惁鏁版嵁涓嶅叏锛佸埗閫犳湰閮�1浣�:[0] + 鏈哄瀷浠g爜5浣�:[" + HModelName + "] + 骞存湀鏃�4鎴�5浣�:["+ HBarCodeDate + "] + 鎵规鍙�2浣�:[" + HBarCodeBatchNo + "]+ 鍘嬬缉鏈�1浣�:["+ HYasuoji + "]+00 ; "); return; } } @@ -839,9 +839,9 @@ //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'"); LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); LSHlen = 4; - if (sTMNumber.Length != 18) + if (sTMNumber.Length != 18 && sTMNumber.Length != 17) { - MessageBox.Show("鏉$爜闀垮害涓嶅18浣嶏紝鏄惁鏁版嵁涓嶅叏锛佺墿鏂欎唬鐮�11浣�:["+ HMaterNumber.Replace(".", "") + "]+骞存湀鏃�5浣�:["+ HBarCodeDate + "]+鎵规鍙�2浣�:[" + HBarCodeBatchNo + "];"); + MessageBox.Show("鏉$爜闀垮害涓嶅17鎴�18浣嶏紝鏄惁鏁版嵁涓嶅叏锛佺墿鏂欎唬鐮�11浣�:["+ HMaterNumber.Replace(".", "") + "]+骞存湀鏃�4鎴�5浣�:["+ HBarCodeDate + "]+鎵规鍙�2浣�:[" + HBarCodeBatchNo + "];"); return; } } diff --git a/WebAPI/Controllers/Pay_ReportController.cs b/WebAPI/Controllers/Pay_ReportController.cs new file mode 100644 index 0000000..18881ba --- /dev/null +++ b/WebAPI/Controllers/Pay_ReportController.cs @@ -0,0 +1,372 @@ +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using Pub_Class; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Web.Http; +using WebAPI.Models; + +namespace WebAPI.Controllers +{ + /// <summary> + /// 宸ヨ祫鎶ヨ〃鑿滃崟鍚勬ā鍧楁帴鍙� + /// </summary> + public class Pay_ReportController : ApiController + { + public DBUtility.ClsPub.Enum_BillStatus BillStatus; + + private json objJsonResult = new json(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + DataSet ds; + + + #region [鑱屽憳鏄庣粏鍒楄〃] + [Route("Pay_EmpDet/list")] + [HttpGet] + public object PayEmpDetList(string HBDate, string HEDate, string HBENumber, string HEENumber, string HBMNumber, string HEMNumber, string HBPNumber, string HEPNumber) + { + List<object> columnNameList = new List<object>(); + try + { + ds = oCN.RunProcReturn("exec h_p_Pay_EmpWorkQtyEntryReport '" + HBDate + "','" + HEDate + "','" + HBENumber + "','" + HEENumber + "','" + HBMNumber + "','" + HEMNumber + "','" + HBPNumber + "','" + HEPNumber + "'", "h_p_Pay_EmpWorkQtyEntryReport"); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //foreach (DataColumn col in ds.Tables[1].Columns) + //{ + + // Type dataType = col.DataType; + // string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + // columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + //} + + //if (ds.Tables[1].Rows.Count > 0) + //{ + // objJsonResult.code = "1"; + // objJsonResult.count = ds.Tables[0].Rows.Count; + // objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�"; + // objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[1], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //搴忓垪鍖朌ataSet涓殑鏃堕棿鏍煎紡锛岀劧鍚庡啀鍙嶅簭鍒楀寲鍥炴潵 + // objJsonResult.list = columnNameList; + // return objJsonResult; + //} + //else + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳暟鎹紒"; + // objJsonResult.data = null; + // objJsonResult.list = columnNameList; + // return objJsonResult; + //} + } + catch (Exception e) + { + + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = e.Message.ToString(); + objJsonResult.data = null; + objJsonResult.list = columnNameList; + } + return objJsonResult; + } + #endregion + + #region [閮ㄩ棬鍙戞斁娓呭崟] + [Route("Pay_Department/list")] + [HttpGet] + public object PayDepartment(int HYear,int HPeriod,int DeptID) + { + List<object> columnNameList = new List<object>(); + try + { + ds = oCN.RunProcReturn("exec h_p_Pay_PayMentDeptSendList '" + HYear + "','" + HPeriod + "','" + DeptID + "'", "h_p_Pay_PayMentDeptSendList"); + + 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 = e.Message.ToString(); + objJsonResult.data = null; + objJsonResult.list = columnNameList; + } + return objJsonResult; + } + #endregion + + #region [閮ㄩ棬骞村害鍒嗘瀽] + [Route("Pay_DepYearAnalyze/list")] + [HttpGet] + public object PayDepYearAnalyze(string DeptID,string EDeptID,int Year) + { + List<object> columnNameList = new List<object>(); + try + { + ds = oCN.RunProcReturn("exec h_p_PayMentDeptYearReport '" + DeptID + "','" + EDeptID + "','" + Year + "'", "h_p_PayMentDeptYearReport"); + + 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 = e.Message.ToString(); + objJsonResult.data = null; + objJsonResult.list = columnNameList; + } + return objJsonResult; + } + #endregion + + #region [宸ヨ祫鍙戞斁娓呭崟] + [Route("Pay_Wages/list")] + [HttpGet] + public object PayWages(int HYear, int HPeriod, int DeptID) + { + List<object> columnNameList = new List<object>(); + try + { + ds = oCN.RunProcReturn("exec h_p_Pay_PayMentSendList '" + HYear + "','" + HPeriod + "','" + DeptID + "'", "h_p_Pay_PayMentSendList"); + + 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 = e.Message.ToString(); + objJsonResult.data = null; + objJsonResult.list = columnNameList; + } + return objJsonResult; + } + #endregion + + #region [宸ヨ祫骞存姤琛╙ + [Route("Pay_YearReport/list")] + [HttpGet] + public object PayYearReport(string DeptID, string EDeptID, int Year) + { + List<object> columnNameList = new List<object>(); + try + { + ds = oCN.RunProcReturn("exec h_p_PayMentYearReport '" + DeptID + "','" + EDeptID + "','" + Year + "'", "h_p_PayMentYearReport"); + + 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 = e.Message.ToString(); + objJsonResult.data = null; + objJsonResult.list = columnNameList; + } + return objJsonResult; + } + #endregion + + #region [鑰冨嫟姹囨�昏〃] + [Route("Pay_Attendance/list")] + [HttpGet] + public object PayAttendance(int HYear,int HPeriod, int DeptID, string HStatus,string HType) + { + List<object> columnNameList = new List<object>(); + try + { + ds = oCN.RunProcReturn("exec h_p_Pay_WorkTimesList '" + HYear + "','" + HPeriod + "','" + DeptID + "','" + HStatus + "','" + HType+ "'", "h_p_Pay_WorkTimesList"); + + 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 = e.Message.ToString(); + objJsonResult.data = null; + objJsonResult.list = columnNameList; + } + return objJsonResult; + } + #endregion + + #region [璁′欢宸ヨ祫姹囨�诲垎鏋怾 + [Route("Pay_ByThePiece_SumAna/list")] + [HttpGet] + public object PayByThePieceSum(int HYear,int HPeriod,string DeptNumber, string DeptNumber2, string GroupNumber, string GroupNumber2) + { + List<object> columnNameList = new List<object>(); + try + { + ds = oCN.RunProcReturn("exec h_p_Pay_EmpPayMentSumReport '" + HYear + "','" + HPeriod + "','" + DeptNumber + "','" + DeptNumber2 + "','" + GroupNumber + "','" + GroupNumber2 + "'", "h_p_Pay_EmpPayMentSumReport"); + + 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 = e.Message.ToString(); + objJsonResult.data = null; + objJsonResult.list = columnNameList; + } + return objJsonResult; + } + #endregion + + #region [璁℃椂宸ヨ祫鏄庣粏琛╙ + [Route("Pay_ByTheTime_Detail/list")] + [HttpGet] + public object PayByTheTimeDetail(string HBDate, string HEDate, string HBDeptNumber, string HEDeptNumber, string HBEmpNumber, string HEEmpNumber) + { + List<object> columnNameList = new List<object>(); + try + { + ds = oCN.RunProcReturn("exec h_p_Pay_WorkTimesPayMentEntryReport '" + HBDate + "','" + HEDate + "','" + HBDeptNumber + "','" + HEDeptNumber + "','" + HBEmpNumber + "','" + HEEmpNumber + "'", "h_p_Pay_WorkTimesPayMentEntryReport"); + + 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 = e.Message.ToString(); + objJsonResult.data = null; + objJsonResult.list = columnNameList; + } + return objJsonResult; + } + #endregion + + #region [璁℃椂宸ヨ祫姹囨�昏〃] + [Route("Pay_ByTheTime_Sum/list")] + [HttpGet] + public object PayByTheTimeSum(string HBDate, string HEDate, string HBDeptNumber, string HEDeptNumber, string HBEmpNumber, string HEEmpNumber) + { + List<object> columnNameList = new List<object>(); + try + { + ds = oCN.RunProcReturn("exec h_p_Pay_WorkTimesPayMentSumReport '" + HBDate + "','" + HEDate + "','" + HBDeptNumber + "','" + HEDeptNumber + "','" + HBEmpNumber + "','" + HEEmpNumber + "'", "h_p_Pay_WorkTimesPayMentSumReport"); + + 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 = e.Message.ToString(); + objJsonResult.data = null; + objJsonResult.list = columnNameList; + } + return objJsonResult; + } + #endregion + + #region [璁′欢宸ヨ祫鏄庣粏琛╙ + [Route("Pay_ByThePiece_Detail/list")] + [HttpGet] + public object PayByThePieceDetail(string HBDate, string HEDate, string HBDeptNumber, string HEDeptNumber, string HBEmpNumber, string HEEmpNumber) + { + List<object> columnNameList = new List<object>(); + try + { + ds = oCN.RunProcReturn("exec h_p_Pay_SingleBalBillEntryReport '" + HBDate + "','" + HEDate + "','" + HBDeptNumber + "','" + HEDeptNumber + "','" + HBEmpNumber + "','" + HEEmpNumber + "'", "h_p_Pay_SingleBalBillEntryReport"); + + 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 = e.Message.ToString(); + objJsonResult.data = null; + objJsonResult.list = columnNameList; + } + return objJsonResult; + } + #endregion + + #region [璁′欢宸ヨ祫姹囨�昏〃] + [Route("Pay_ByThePiece_Sum/list")] + [HttpGet] + public object PayByThePieceSum(string HBDate, string HEDate, string HBDeptNumber, string HEDeptNumber, string HBEmpNumber, string HEEmpNumber) + { + List<object> columnNameList = new List<object>(); + try + { + ds = oCN.RunProcReturn("exec h_p_Pay_SingleBalBillSumReport '" + HBDate + "','" + HEDate + "','" + HBDeptNumber + "','" + HEDeptNumber + "','" + HBEmpNumber + "','" + HEEmpNumber + "'", "h_p_Pay_SingleBalBillSumReport"); + + 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 = e.Message.ToString(); + objJsonResult.data = null; + objJsonResult.list = columnNameList; + } + return objJsonResult; + } + #endregion + } +} \ No newline at end of file diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index d3e9070..7652f0c 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -384,6 +384,7 @@ <Compile Include="Controllers\CJGL\Cj_StationEntrustOutBillController.cs" /> <Compile Include="Controllers\CJGL\Sc_WorkBillAutoSortBillMainController.cs" /> <Compile Include="Controllers\Gy_MateMouldController.cs" /> + <Compile Include="Controllers\Pay_ReportController.cs" /> <Compile Include="Controllers\SCGL\鏃ヨ鍒掔鐞哱DataHelper.cs" /> <Compile Include="Controllers\SCGL\鏃ヨ鍒掔鐞哱JIT_Cg_PODemandPlanBillController.cs" /> <Compile Include="Controllers\SCGL\Sc_CallGoodsBackRequestBillController.cs" /> @@ -864,6 +865,7 @@ <Folder Include="Views\Kf_StepFoldOutBill\" /> <Folder Include="Views\Mes_OrderProcFlowAllReport\" /> <Folder Include="Views\MoveStockBill\" /> + <Folder Include="Views\Pay_Report\" /> <Folder Include="Views\ProductionPlanReport\" /> <Folder Include="Views\ProductionReturnBill\" /> <Folder Include="Views\QC_Management\" /> -- Gitblit v1.9.1