From 1f49f98a07ae1c31a1967c5c36b382d6c855becd Mon Sep 17 00:00:00 2001
From: jhz <jinghz@oceic.com>
Date: 星期二, 26 七月 2022 09:59:37 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/基础资料/基础资料/Gy_StockCheckItemBillController.cs | 84 ++++++++++++++++++++++++++++++++++++------
1 files changed, 72 insertions(+), 12 deletions(-)
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
index 175185b..72ad2b7 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
@@ -211,7 +211,7 @@
")", ref DBUtility.ClsPub.sExeReturnInfo);
//淇敼涓婄骇涓洪潪鏈骇浠g爜
oCn.RunProc("Update Gy_StockCheckItem set HEndflag=0 where HItemID=" + oBill.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
-
+
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
@@ -252,6 +252,46 @@
}
#endregion
+ #region 鐩樼偣鍒嗘瀽鍒楄〃鍒ゆ柇褰撳墠閫夋嫨鐨勭洏鐐规柟妗堟槸鍚︾敓鎴愯繃鍗曟嵁
+ [Route("Gy_StockCheckItemBill/StockItemSubIsExistence")]
+ [HttpGet]
+ public object StockItemSubIsExistence(string sID)
+ {
+ try
+ {
+ DataSet ds;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ string sql;
+ sql = string.Format(@"select * from Gy_StockCheckItemSub where HInterID=" + sID);
+ ds = oCN.RunProcReturn(sql, "Gy_StockCheckItemSub");
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏆傛湭鐢熸垚";
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "宸茬敓鎴�";
+ return objJsonResult;
+ }
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+
+
#region 鐩樼偣鍒嗘瀽鍒楄〃
[Route("Gy_StockCheckItemBill/Get_InventoryAnalysisList")]
[HttpGet]
@@ -263,15 +303,30 @@
try
{
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- if (sID == null || sID == "")
+ //鍒ゆ柇鏄惁閫夋嫨鐩樼偣鏂规锛屾槸=>锛堢敤鐩樼偣鏂规瀛愯〃鍋氬姣旓級锛屽惁=>锛堢敤鍣ㄥ叿妗f鍋氬姣旓級
+ if (sID==null|| sID == "")
{
- sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisList where " + sWhere + " order by HItemID desc ");
+ if (sWhere=="pk")
+ {
+ sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisPK");
+ }
+ else
+ {
+ sql = string.Format($"exec h_p_Sc_MouldInventoryAnalysisList2 '{sWhere}'");
+ }
}
else
{
- sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisList where " + sWhere + " and HSourceInterID=(select HItemID from Gy_StockCheckItem where HItemID=" + sID + ") and HMakeDate<=(select HEndDate from Gy_StockCheckItem where HItemID=" + sID + ") order by HItemID desc ");
+ if (sWhere == "pk")
+ {
+ sql = string.Format(@"select * from h_v_Sc_MouldInventoryAnalysisPK2 WHERE HInterID="+ sID);
+ }
+ else
+ {
+ sql = string.Format($"exec h_p_Sc_MouldInventoryAnalysisList '{sID}','{sWhere}'");
+ }
}
- ds = oCN.RunProcReturn(sql, "Sc_MouldStockBillMain_Temp");
+ ds = oCN.RunProcReturn(sql, "h_p_Sc_MouldInventoryAnalysisList");
list.Add(ds.Tables[0]);
objJsonResult.code = "1";
@@ -406,6 +461,7 @@
{
var HBarCode = item.HBarCode;
var HItemID = item.HItemID;
+ string HDate = item.HMakeDate;
string HBillNo = "";
Int64 HInterID = 0;//鏄剧ず鐨勫瓧娈�
DataSet ds1 = new DataSet();
@@ -422,7 +478,7 @@
",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
") " +
- " values('3814','3814'," + HInterID + ",'" + HBillNo + "','2022-01-02'" +
+ " values('3814','3814'," + HInterID + ",'" + HBillNo + "','" + HDate+"'"+
", '" + user + "',getdate()" +
", " + dr["HSupID"].ToString() + ", 1," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
", 0," + dr["HDeptID"].ToString() + ",' ',0" +
@@ -490,10 +546,11 @@
var HBarCode = item.HBarCode;
var HItemID = item.HItemID;
string HBillNo = "";
+ string HDate = item.HMakeDate;
Int64 HInterID = 0;//鏄剧ず鐨勫瓧娈�
DataSet ds1 = new DataSet();
- ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='W11201609050013'", "Gy_MouldFileMain");
- ds1 = oCn.RunProcReturn("select top 1 * from Sc_MouldStockBillMain_Temp where HBarCode='W11201609050013' and HItemID='38'", "Sc_MouldStockBillMain_Temp");
+ ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain");
+ ds1 = oCn.RunProcReturn("select top 1 * from Sc_MouldStockBillMain_Temp where HBarCode='" + HBarCode + "' and HItemID='" + HItemID + "'", "Sc_MouldStockBillMain_Temp");
DataRow dr = ds.Tables[0].Rows[0];
DataRow dr1 = ds1.Tables[0].Rows[0];
HInterID = DBUtility.ClsPub.CreateBillID("3827", ref DBUtility.ClsPub.sExeReturnInfo);
@@ -504,7 +561,7 @@
",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
") " +
- " values('3827','3827'," + HInterID + ",'" + HBillNo + "','2022-01-02'" +
+ " values('3827','3827'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
", '" + user + "',getdate()" +
", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + ",isnull('" + dr["HNowSupID"].ToString() + "',0),0,0,0,0" +
", 0," + dr["HDeptID"].ToString() + ",'',0" +
@@ -572,6 +629,7 @@
var HBarCode = item.HBarCode;
var HItemID = item.HItemID;
string HBillNo = "";
+ string HDate = item.HMakeDate;
Int64 HInterID = 0;//鏄剧ず鐨勫瓧娈�
DataSet ds1 = new DataSet();
ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain");
@@ -587,7 +645,7 @@
",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
") " +
- " values('3832','3832'," + HInterID + ",'" + HBillNo + "','2022-01-02'" +
+ " values('3832','3832'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
", '" + user + "',getdate()" +
", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
", 0," + dr["HDeptID"].ToString() + ",' ',0" +
@@ -653,6 +711,7 @@
var HBarCode = item.HBarCode;
var HItemID = item.HItemID;
string HBillNo = "";
+ string HDate = item.HMakeDate;
Int64 HInterID = 0;//鏄剧ず鐨勫瓧娈�
DataSet ds1 = new DataSet();
ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain");
@@ -668,7 +727,7 @@
",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
") " +
- " values('3802','3802'," + HInterID + ",'" + HBillNo + "','2022-01-02'" +
+ " values('3802','3802'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
", '" + user + "',getdate()" +
", " + dr1["HCorrespondentID"].ToString() + "," + dr1["HCorrespondentTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
", 0," + dr["HDeptID"].ToString() + ",' ',0" +
@@ -733,6 +792,7 @@
var HBarCode = item.HBarCode;
var HItemID = item.HItemID;
string HBillNo = "";
+ string HDate = item.HMakeDate;
Int64 HInterID = 0;//鏄剧ず鐨勫瓧娈�
DataSet ds1 = new DataSet();
ds = oCn.RunProcReturn("select * from Gy_MouldFileMain where HBarCode='" + HBarCode + "'", "Gy_MouldFileMain");
@@ -748,7 +808,7 @@
",HSupID,HSupTypeID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
",HKeeperID,HDeptID,HInnerBillNo,HRedBlueFlag" +
") " +
- " values('3803','3803'," + HInterID + ",'" + HBillNo + "','2022-01-02'" +
+ " values('3803','3803'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
", '" + user + "',getdate()" +
", " + dr["HNowSupID"].ToString() + "," + dr["HNowSupTypeID"].ToString() + "," + dr["HNowSupID"].ToString() + ",0,0,0,0" +
", 0," + dr["HDeptID"].ToString() + ",' ',0" +
--
Gitblit v1.9.1