From 077dd1267cbe547ca584cb7befc99c238c68b08f Mon Sep 17 00:00:00 2001
From: jingh <jingh@LAPTOP-I53VDLOO>
Date: 星期三, 06 十月 2021 09:20:22 +0800
Subject: [PATCH] 控制不良品入库单
---
WebAPI/Controllers/EntrustOutController.cs | 101 ++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 81 insertions(+), 20 deletions(-)
diff --git a/WebAPI/Controllers/EntrustOutController.cs b/WebAPI/Controllers/EntrustOutController.cs
index 0fc68a2..9d29217 100644
--- a/WebAPI/Controllers/EntrustOutController.cs
+++ b/WebAPI/Controllers/EntrustOutController.cs
@@ -27,6 +27,7 @@
public string HDeptName;
public string HWhName;
public string HSPName;
+
public Int64 HInterID;//鏈崟ID
public string HBillNo;
public string HSourceBillNo;
@@ -99,6 +100,71 @@
}
+ ///// <summary>
+ ///// 鍐欏叆涓存椂琛� 鎵簮鍗曠殑鏂规硶
+ ///// </summary>
+ ///// <param name="HSourceBillNo"></param>
+ ///// <returns></returns>
+ //[Route("EntrustOut/set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json")]
+ //[HttpGet]
+ //public object set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json(long sNewInterID, string sNewBillNo,string sSourceBillNo, string HSourceBillType )
+ //{
+ // string sNewBillType = "1211";
+ // string sSourceBillType = "1604";
+ // string sRedBlueflag = "钃濆瓧";
+ // try
+ // {
+
+ // string sWhere = "where 鍗曟嵁鍙� like '%" + sSourceBillNo + "%'";
+ // //ds = BLL.ClsSourceBill.getSourceBillList(sWhere, HSourceBillType);
+ // ds = new BLL.ClsKf_EntrustOutBill().GetWW_WWPPBomList(sWhere, ref DBUtility.ClsPub.sExeReturnInfo);
+ // if (ds == null)
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犳婧愬崟鍙凤紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+
+ // //else
+ // //{
+ // // objJsonResult.code = "0";
+ // // objJsonResult.count = 1;
+ // // objJsonResult.Message = "Success";
+ // // objJsonResult.data = ds;
+ // // return objJsonResult;
+ // //}
+ // DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl();
+ // if (dal.AddNew_Source(sNewInterID, sNewBillNo, sNewBillType, sSourceBillNo, sSourceBillType, sRedBlueflag, ref DBUtility.ClsPub.sExeReturnInfo))
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 1;
+ // objJsonResult.Message = "淇濆瓨鍒板嚭鍏ュ簱鏉$爜涓存椂琛ㄦ垚鍔燂紒";
+ // objJsonResult.data = ds;
+ // return objJsonResult;
+ // }
+ // else
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "淇濆瓨鍒板嚭鍏ュ簱鏉$爜涓存椂琛ㄥけ璐ワ紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+ // }
+ // catch (Exception ex)
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛佸紓甯�"+ex.ToString();
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+ //}
+
+
+
/// <summary>
/// 鍐欏叆涓存椂琛� 鎵簮鍗曠殑鏂规硶
/// </summary>
@@ -106,7 +172,7 @@
/// <returns></returns>
[Route("EntrustOut/set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json")]
[HttpGet]
- public object set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json(long sNewInterID, string sNewBillNo,string sSourceBillNo, string HSourceBillType )
+ public object set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json(string HSourceBillType, string HSourceBillNo, Int64 sInterID, string sBillNo)
{
string sNewBillType = "1211";
string sSourceBillType = "1604";
@@ -114,40 +180,34 @@
try
{
- string sWhere = "where 鍗曟嵁鍙� like '%" + sSourceBillNo + "%'";
- //ds = BLL.ClsSourceBill.getSourceBillList(sWhere, HSourceBillType);
- ds = new BLL.ClsKf_EntrustOutBill().GetWW_WWPPBomList(sWhere, ref DBUtility.ClsPub.sExeReturnInfo);
- if (ds == null)
+ string sWhere = "where 鍗曟嵁鍙� like '%" + HSourceBillNo.Trim() + "%'";
+ ds = webserver.GetWW_WWPPBomList(sWhere);
+ if (ds == null || ds.Tables[0].Rows.Count <= 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳婧愬崟鍙凤紒";
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍,婧愬崟绫诲瀷鏈夐敊璇紒";
objJsonResult.data = null;
return objJsonResult;
}
+ HSupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSupID"]);
+ HSupName = Convert.ToString(ds.Tables[0].Rows[0]["HSupName"]);
+ HDeptID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HDeptID"]);
+ HDeptName = Convert.ToString(ds.Tables[0].Rows[0]["HDeptName"]);
- //else
- //{
- // objJsonResult.code = "0";
- // objJsonResult.count = 1;
- // objJsonResult.Message = "Success";
- // objJsonResult.data = ds;
- // return objJsonResult;
- //}
- DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl();
- if (dal.AddNew_Source(sNewInterID, sNewBillNo, sNewBillType, sSourceBillNo, sSourceBillType, sRedBlueflag, ref DBUtility.ClsPub.sExeReturnInfo))
+ if (webserver.set_SavePonderationBillMain_Temp_Source_Fast(sInterID, sBillNo, HBillType, HSourceBillNo, HSourceBillType, "钃濆瓧", ref DBUtility.ClsPub.sErrInfo))
{
objJsonResult.code = "0";
objJsonResult.count = 1;
- objJsonResult.Message = "淇濆瓨鍒板嚭鍏ュ簱鏉$爜涓存椂琛ㄦ垚鍔燂紒";
- objJsonResult.data = ds;
+ objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
else
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "淇濆瓨鍒板嚭鍏ュ簱鏉$爜涓存椂琛ㄥけ璐ワ紒";
+ objJsonResult.Message = "鍐欏叆涓存椂琛ㄥけ璐ワ紒" + DBUtility.ClsPub.sErrInfo;
objJsonResult.data = null;
return objJsonResult;
}
@@ -156,12 +216,13 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛佸紓甯�"+ex.ToString();
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛佸紓甯�" + ex.ToString();
objJsonResult.data = null;
return objJsonResult;
}
}
+
public bool AddNew_Source(long sNewInterID, string sNewBillNo, string sNewBillType, string sSourceBillNo, string sSourceBillType, string sRedBlueflag, ref string sReturn)
{
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
--
Gitblit v1.9.1