From 7505e7dea488bfcd595a5d2c71e2e3d991544359 Mon Sep 17 00:00:00 2001
From: ouyangqing <ouyangqing@DESKTOP-B85SG1D>
Date: 星期四, 21 一月 2021 22:18:49 +0800
Subject: [PATCH] nothing
---
WebAPI/Service/YqnQbService.cs | 41 ++++++++++++++++++++
WebAPI/Controllers/NewApiController.cs | 23 +++++++++++
2 files changed, 63 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/NewApiController.cs b/WebAPI/Controllers/NewApiController.cs
index db83415..333d6b7 100644
--- a/WebAPI/Controllers/NewApiController.cs
+++ b/WebAPI/Controllers/NewApiController.cs
@@ -110,5 +110,28 @@
{
return YqnQbService.SetStationOutBill(oMain);
}
+ /// <summary>
+ /// 鑾峰彇娴佽浆鍗″垪琛�
+ /// </summary>
+ /// <param name="sWhere"></param>
+ /// <returns></returns>
+ [Route("api/newBill/getStationMainList")]
+ [HttpGet]
+ public static ApiResult<DataSet> GetPorcessMainList(string sWhere)
+ {
+ return YqnQbService.GetPorcessMainList(sWhere);
+ }
+ /// <summary>
+ /// 鑾峰彇娴佽浆鍗″瓙琛ㄥ垪琛�
+ /// </summary>
+ /// <param name="sWhere"></param>
+ /// <returns></returns>
+ [Route("api/newBill/getPorcessSubList")]
+ [HttpGet]
+ public static ApiResult<DataSet> GetPorcessSubList(int hInterId)
+ {
+ return YqnQbService.GetPorcessSubList(hInterId);
+
+ }
}
}
diff --git a/WebAPI/Service/YqnQbService.cs b/WebAPI/Service/YqnQbService.cs
index dfaf774..36f90f6 100644
--- a/WebAPI/Service/YqnQbService.cs
+++ b/WebAPI/Service/YqnQbService.cs
@@ -95,7 +95,7 @@
return new ApiResult { code = -1, msg = "鏈嶅姟鍣ㄧ箒蹇�" };
try
{
- if (oMain.HProcID == 0 || oMain.HQty == 0 || oMain.HEmpID == 0||string.IsNullOrEmpty(oMain.HICMOBillNo)||string.IsNullOrEmpty(oMain.HProcExchBillNo)||oMain.HQty==0||oMain.HICMOInterID==0||string.IsNullOrEmpty(oMain.HBillNo))
+ if (oMain.HProcID == 0 || oMain.HQty == 0 ||string.IsNullOrEmpty(oMain.HProcExchBillNo)||oMain.HQty==0||string.IsNullOrEmpty(oMain.HBillNo))
return new ApiResult { code = 1, msg = "鍙傛暟涓嶅叏" };
var stationInList = YqnDal.GetStationInBillMailList(oMain.HICMOBillNo);//鑾峰緱璇ユ祦杞崱鎵�鏈夎繘绔欏崟
if (stationInList.Count > 0)
@@ -158,6 +158,30 @@
return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
}
/// <summary>
+ /// 鑾峰彇娴佽浆鍗″垪琛�
+ /// </summary>
+ /// <param name="sWhere"></param>
+ /// <returns></returns>
+ public static ApiResult<DataSet> GetPorcessMainList(string sWhere)
+ {
+ var dataSet = GetProcessMain(sWhere);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "鏈煡璇㈠埌鏁版嵁" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+ /// <summary>
+ /// 鑾峰彇娴佽浆鍗″瓙琛ㄥ垪琛�
+ /// </summary>
+ /// <param name="sWhere"></param>
+ /// <returns></returns>
+ public static ApiResult<DataSet> GetPorcessSubList(int hInterId)
+ {
+ var dataSet = GetProcessSubList(hInterId);
+ if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+ return new ApiResult<DataSet> { code = -1, msg = "鏈煡璇㈠埌鏁版嵁" };
+ return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+ }
+ /// <summary>
/// 鍑虹珯鎺ユ敹鍗�
/// </summary>
public static ApiResult SetStationOutBill(StationOutBillView omodel)
@@ -190,6 +214,21 @@
var dataSet = oCN.RunProcReturn(sql, "h_v_MES_StationInBillList");
return dataSet;
}
+ public static DataSet GetProcessSubList(int hInterId)
+ {
+ var sql = "select a.HProcNo 娴佹按鍙�,a.HProcNumber as 宸ュ簭浠g爜,b.HName 宸ュ簭鍚嶇О,c.HName 宸ヤ綔涓績,a.HQty 娴佽浆鍗℃暟閲� from Sc_ProcessExchangeBillSub a left join Gy_Process b on b.HItemID = a.HProcID left join Gy_WorkCenter c on c.HItemID = a.HCenterID where 1=1 and a.HInterID=" + hInterId;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn(sql, "Sc_ProcessExchangeBillSub");
+ return dataSet;
+ }
+ public static DataSet GetProcessMain(string strWhere)
+ {
+ var sql = "select a.HBillNo 鍗曟嵁鍙�, a.HDate 鏃ユ湡, HInterID, a.HICMOBillNo 鐢熶骇璁㈠崟, b.HName 浜у搧鍚嶇О, b.HNumber 浜у搧浠g爜, a.HPlanQty 娴佽浆鍗℃暟閲�, c.HName 鍗曚綅, a.HPlanBeginDate 璁″垝寮�宸ユ棩鏈�, a.HPlanEndDate 璁″垝瀹屽伐鏃ユ湡, a.HRemark 澶囨敞" +
+ " from Sc_ProcessExchangeBillMain a left join Gy_Material b on a.HMaterID = b.HItemID left join Gy_Unit c on c.HItemID = a.HUnitID where 1=1 " + strWhere;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ var dataSet = oCN.RunProcReturn(sql, "Sc_ProcessExchangeBillMain");
+ return dataSet;
+ }
public static DataSet GetBarCodeDb(string billBarCode)
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
--
Gitblit v1.9.1