From d7b5a0a931eaeaa1332370a857d0024cb4c93c3e Mon Sep 17 00:00:00 2001 From: 王 垚 <1402714037@qq.com> Date: 星期一, 22 十一月 2021 13:41:01 +0800 Subject: [PATCH] 生产退料单 LIst --- WebAPI/ListModels.cs | 28 + WebAPI/Controllers/仓存管理/ClsKf_MateOutBackBillController.cs | 699 ++++++++++++++++++++++++++++++++++++++++++++++ WebAPI/DLL/ClsKf_MateOutBackBill.cs | 14 WebAPI/WebAPI.csproj | 2 WebAPI/Controllers/PublicPageMethodController.cs | 76 ++-- WebAPI/Controllers/仓存管理/Kf_MateOutBillController.cs | 28 6 files changed, 782 insertions(+), 65 deletions(-) diff --git a/WebAPI/Controllers/PublicPageMethodController.cs b/WebAPI/Controllers/PublicPageMethodController.cs index dc37059..9f9d590 100644 --- a/WebAPI/Controllers/PublicPageMethodController.cs +++ b/WebAPI/Controllers/PublicPageMethodController.cs @@ -29,7 +29,7 @@ { try { - ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Customer "+ sWhere + " Order by HItemID ", "h_v_IF_Customer"); + ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Customer " + sWhere + " Order by HItemID ", "h_v_IF_Customer"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -103,7 +103,7 @@ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); - ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Customer " + sWhere+"", "h_v_IF_Customer"); + ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Customer " + sWhere + "", "h_v_IF_Customer"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -134,8 +134,8 @@ { try { - - ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Emp "+sWhere+" Order by HItemID ", "h_v_IF_Emp"); + + ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Emp " + sWhere + " Order by HItemID ", "h_v_IF_Emp"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -209,7 +209,7 @@ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); - ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Emp " + sWhere+"", "h_v_IF_Emp"); + ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Emp " + sWhere + "", "h_v_IF_Emp"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -240,7 +240,7 @@ { try { - ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Warehouse "+sWhere+" Order by HItemID ", "h_v_IF_Warehouse"); + ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Warehouse " + sWhere + " Order by HItemID ", "h_v_IF_Warehouse"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -314,7 +314,7 @@ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); - ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Warehouse "+sWhere+"", "h_v_IF_Warehouse"); + ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Warehouse " + sWhere + "", "h_v_IF_Warehouse"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -345,7 +345,7 @@ { try { - ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_StockPlace "+sWhere+" Order by HItemID ", "Gy_StockPlace"); + ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_StockPlace " + sWhere + " Order by HItemID ", "Gy_StockPlace"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -419,7 +419,7 @@ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); - ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_StockPlace "+sWhere+"", "Gy_StockPlace"); + ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_StockPlace " + sWhere + "", "Gy_StockPlace"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -450,7 +450,7 @@ { try { - ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Department "+sWhere+" Order by HItemID ", "h_v_IF_Department"); + ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Department " + sWhere + " Order by HItemID ", "h_v_IF_Department"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -524,7 +524,7 @@ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); - ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Department "+sWhere+"", "h_v_IF_Department"); + ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Department " + sWhere + "", "h_v_IF_Department"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -1110,7 +1110,7 @@ { try { - ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Supplier "+sWhere+" Order by HItemID", "Gy_Supplier"); + ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Supplier " + sWhere + " Order by HItemID", "Gy_Supplier"); //if (ds == null || ds.Tables[0].Rows.Count == 0) //{ // objJsonResult.code = "0"; @@ -1121,11 +1121,11 @@ //} //else //{ - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; //} } catch (Exception e) @@ -1184,7 +1184,7 @@ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); - ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_Supplier "+sWhere+"", "Gy_Supplier"); + ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_Supplier " + sWhere + "", "Gy_Supplier"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -1899,23 +1899,14 @@ { try { - ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName,HModel from h_v_IF_Material "+sWhere+" Order by HItemID", "h_v_IF_Material"); - if (ds == null || ds.Tables[0].Rows.Count == 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "false锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName,HModel from h_v_IF_Material " + sWhere + " Order by HItemID", "h_v_IF_Material"); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } catch (Exception e) { @@ -1973,7 +1964,7 @@ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); - ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Material "+sWhere+"", "h_v_IF_Material"); + ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Material " + sWhere + "", "h_v_IF_Material"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -3360,7 +3351,7 @@ #region 鏉′欢鏌ヨ鏉冮檺鍒楄〃 [Route("PublicPageMethod/PowerList")] [HttpGet] - public object PowerList(string czybm,string sGnbm) + public object PowerList(string czybm, string sGnbm) { try { @@ -3371,11 +3362,12 @@ { sName = ""; } - else { + else + { sName = sGnbm; } } - + ds = oCN.RunProcReturn("select * from Gy_Czygl where czybm='" + czybm + "'", "Gy_Czygl"); string AuthorityID = ClsPub.isStrNull(ds.Tables[0].Rows[0]["AuthorityID"]); ds = oCN.RunProcReturn("SELECT id hid,case when id<=" + AuthorityID.Length + " then case when SUBSTRING('" + AuthorityID + "',id,1)=1 then 1 else 0 end else 0 end AuthorityID,'' AuthorityHID, gnms ,gnbm hgnbm FROM xt_xtgnb where useflag=1 and sjgnbm='" + sName + "' and rightflag=1 order by gnbm", "xt_xtgnb"); @@ -3512,7 +3504,7 @@ } } } - oDs = null; + oDs = null; } oCN.RunProc("UPDATE Gy_Czygl SET AuthorityID='" + Auth_str + "' WHERE czybm='" + msg4.Trim() + "'"); objJsonResult.code = "1"; @@ -3525,13 +3517,13 @@ objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = e.Message; - objJsonResult.data =null; + objJsonResult.data = null; } return objJsonResult; } - + #endregion #endregion diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/ClsKf_MateOutBackBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/ClsKf_MateOutBackBillController.cs" new file mode 100644 index 0000000..bcf927a --- /dev/null +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/ClsKf_MateOutBackBillController.cs" @@ -0,0 +1,699 @@ +锘縰sing DBUtility; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using WebAPI.Models; + +namespace WebAPI.Controllers +{ + public class ClsKf_MateOutBackBillController : ApiController + { + public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛� + private json objJsonResult = new json(); + public DataSet ds = new DataSet(); + public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + public DLL.ClsKf_MateOutBackBill BillNew0 = new DLL.ClsKf_MateOutBackBill(); // + public DLL.ClsKf_MateOutBackBill BillOld0 = new DLL.ClsKf_MateOutBackBill(); // + + #region 鐢熶骇閫�鏂欏崟鍒楄〃 + + [Route("Kf_MateOutBackBill/GetMateOutBillList")] + [HttpGet] + public object GetMateOutBillList(string sWhere) + { + try + { + ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBackBillList order by 鏃ユ湡 desc", "h_v_IF_MateOutBackBillList"); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + catch (Exception ex) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + #region [鐢熶骇閫�鏂欏崟鍒犻櫎鍔熻兘] + /// <summary> + /// 鐢熶骇閫�鏂欏崟鍒犻櫎鍔熻兘 + /// </summary> + /// <returns></returns> + [Route("Kf_MateOutBackBill/set_DeleteBill")] + [HttpGet] + public object set_DeleteBill(string HInterID,string user) + { + //缂栬緫鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Delete", 1, true, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + string s = ""; + Int64 lngBillKey = 0; + lngBillKey = DBUtility.ClsPub.isLong(HInterID); + if (lngBillKey == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�"; + objJsonResult.data = null; + return objJsonResult; + } + DLL.ClsKf_MateOutBackBill oBill = new DLL.ClsKf_MateOutBackBill(); + if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) + { + if (oBill.omodel.HBillStatus > 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵��,涓嶈兘鍒犻櫎锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (oBill.omodel.HChecker != ""&& oBill.omodel.HChecker !=null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (!DBUtility.Xt_BaseBillFun.Fun_AllowDeleteBill(oBill, ref s)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = s + "锛屼笉鍏佽鍒犻櫎"; + objJsonResult.data = null; + return objJsonResult; + } + bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo); + if (IsDete) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏈壘鍒�"; + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + #region [鐢熶骇閫�鏂欏崟瀹℃牳銆佸弽瀹℃牳] + /// <summary> + /// 瀹℃牳 + /// </summary> + /// <param name="HInterID">鍗曟嵁ID</param> + /// <param name="CurUserName">瀹℃牳浜�</param> + /// <returns></returns> + [Route("Kf_MateOutBackBill/set_CheckBill")] + [HttpGet] + public object set_CheckBill(int HInterID, string CurUserName) + { + string ModRightNameCheck = "Kf_MateOutBackBill_Check"; + DBUtility.ClsPub.CurUserName = CurUserName; + DLL.ClsKf_MateOutBackBill oBill = new DLL.ClsKf_MateOutBackBill(); + try + { + //瀹℃牳鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�"; + objJsonResult.data = null; + return objJsonResult; + } + //瀹℃牳鍓嶅垽鏂槸鍚﹀厑璁� + string s = ""; + if (!DBUtility.Xt_BaseBillFun.Fun_AllowCheckBill(oBill, ref s)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = s + "锛屼笉鍏佽瀹℃牳"; + objJsonResult.data = null; + return objJsonResult; + } + if (HInterID <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "HInterID灏忎簬0锛�"; + objJsonResult.data = null; + return objJsonResult; + } + Int64 lngBillKey = 0; + lngBillKey = DBUtility.ClsPub.isLong(HInterID); + //鏌ョ湅鏄惁宸插鏍�,鍏抽棴,浣滃簾 + if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) + { + if (oBill.omodel.HCloseMan.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (oBill.omodel.HDeleteMan.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�"; + objJsonResult.data = null; + return objJsonResult; + } + if (oBill.omodel.HChecker.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�"; + objJsonResult.data = null; + return objJsonResult; + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + //瀹℃牳鎻愪氦 + if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "瀹℃牳鎴愬姛"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + /// <summary> + /// 鍙嶅鏍� + /// </summary> + /// <param name="HInterID">鍗曟嵁ID</param> + /// <param name="CurUserName">瀹℃牳浜�</param> + /// <returns></returns> + [Route("Kf_MateOutBackBill/set_AbandonCheck")] + [HttpGet] + public object set_AbandonCheck(int HInterID, string CurUserName) + { + string ModRightNameCheck = "Kf_MateOutBackBill_Check"; + DBUtility.ClsPub.CurUserName = CurUserName; + DLL.ClsKf_MateOutBackBill oBill = new DLL.ClsKf_MateOutBackBill(); + try + { + //瀹℃牳鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍙嶅鏍稿け璐ワ紒鏃犳潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + //鍙嶅鏍稿墠鍒ゆ柇 + string s = ""; + if (!DBUtility.Xt_BaseBillFun.Fun_AllowCheckBill(oBill, ref s)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = s + "锛屼笉鍏佽鍙嶅鏍�"; + objJsonResult.data = null; + return objJsonResult; + } + if (HInterID <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "HInterID灏忎簬0锛�"; + objJsonResult.data = null; + return objJsonResult; + } + Int64 lngBillKey = 0; + lngBillKey = DBUtility.ClsPub.isLong(HInterID); + //鏌ョ湅鏄惁宸插鏍�,鍏抽棴,浣滃簾 + if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) + { + if (oBill.omodel.HCloseMan.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆鍙嶅鏍革紒"; + objJsonResult.data = null; + return objJsonResult; + } + if (oBill.omodel.HDeleteMan.Trim() != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆鍙嶅鏍革紒"; + objJsonResult.data = null; + return objJsonResult; + } + if (oBill.omodel.HChecker.Trim() == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!"; + objJsonResult.data = null; + return objJsonResult; + } + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + //鍙嶅鏍告彁浜bandonCheck + if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶅鏍告垚鍔�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍙嶅鏍稿け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region[鐢熶骇閫�鏂欏崟缂栬緫鏃惰幏鍙栬〃澶存暟鎹甝 + [Route("Kf_MateOutBackBill/Kf_MateOutBackBillListCheckDetai")] + [HttpGet] + public ApiResult<DataSet> Kf_MateOutBackBillListCheckDetai(string HID) + { + if (string.IsNullOrEmpty(HID)) + return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" }; + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + + var dataSet = oCN.RunProcReturn("select top 1 * from h_v_IF_MateOutBackBillList where hmainid= " + HID + " ", "h_v_IF_MateOutBackBillList"); + 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 }; + } + #endregion + + #region[鐢熶骇閫�鏂欏崟缂栬緫鏃惰幏鍙栬〃浣撴暟鎹甝 + [Route("Kf_MateOutBackBill/Kf_MateOutBackBillListProjectDetai")] + [HttpGet] + public object Kf_MateOutBackBillListProjectDetai(string sqlWhere) + { + DataSet ds; + DataSet ds1; + List<object> list = new List<object>(); + try + { + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + if (sqlWhere == null || sqlWhere.Equals("")) + { + ds = oCN.RunProcReturn(string.Format(@"select HMaterID ,鐗╂枡浠g爜 HMaterCode ,鐗╂枡鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,HUnitID,璁¢噺鍗曚綅浠g爜 HUnitCode,璁¢噺鍗曚綅 HUnitName,搴旀敹鏁伴噺 HQtyMust,瀹炴敹鏁伴噺 HQty,鍗曚环 HPrice,閲戦 HMoney,HWHID,棰嗘枡浠撳簱浠g爜 HWHCode,棰嗘枡浠撳簱 HWHName,琛ㄤ綋澶囨敞 HRemark +from h_v_IF_MateOutBackBillList"), "h_v_IF_MateOutBackBillList"); + + } + else + { + string sql1 = string.Format(@"select HMaterID ,鐗╂枡浠g爜 HMaterCode ,鐗╂枡鍚嶇О HMaterName,瑙勬牸鍨嬪彿 HMaterSpec,HUnitID,璁¢噺鍗曚綅浠g爜 HUnitCode,璁¢噺鍗曚綅 HUnitName,搴旀敹鏁伴噺 HQtyMust,瀹炴敹鏁伴噺 HQty,鍗曚环 HPrice,閲戦 HMoney,HWHID,棰嗘枡浠撳簱浠g爜 HWHCode,棰嗘枡浠撳簱 HWHName,琛ㄤ綋澶囨敞 HRemark +from h_v_IF_MateOutBackBillList WHERE 1=1"); + string sql = sql1 + sqlWhere; + ds = oCN.RunProcReturn(sql, "h_v_IF_MateOutBackBillList"); + } + //鏌ユ眹鎬� + ds1 = oCN.RunProcReturn(string.Format(@"select 鐗╂枡浠g爜,max(鐗╂枡鍚嶇О)鐗╂枡鍚嶇О,瑙勬牸鍨嬪彿,max(鍗曟嵁鍙�)鍗曟嵁鍙�,鎵规,sum(瀹炴敹鏁伴噺)瀹炴敹鏁伴噺, + hwhid1,max(鏀舵枡浠撳簱浠g爜)鏀舵枡浠撳簱浠g爜,max(鏀舵枡浠撳簱)鏀舵枡浠撳簱,琛ㄤ綋澶囨敞 from h_v_Sc_MouldProdInHouseBillList + where 1=1 " + sqlWhere + " group by 鐗╂枡浠g爜,瑙勬牸鍨嬪彿,hwhid1,鎵规,琛ㄤ綋澶囨敞"), "h_v_IF_MateOutBackBillList"); + + list.Add(ds.Tables[0]); + list.Add(ds1.Tables[0]); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�"; + objJsonResult.list = list; + + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.data = null; + } + return objJsonResult; + } + #endregion + + #region 鐢熶骇閫�鏂欏崟淇濆瓨/缂栬緫 + /// <summary> + /// 淇濆瓨鐢熶骇閫�鏂欏崟 + /// </summary> + /// <param name="msg"></param> + /// <returns></returns> + [Route("Kf_MateOutBackBill/SaveGetMateOutBillList")] + [HttpPost] + public object SaveGetMateOutBillList([FromBody] JObject msg) + { + var _value = msg["msg"].ToString(); + string msg1 = _value.ToString(); + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); + string msg3 = sArray[1].ToString(); + string refSav = sArray[2].ToString(); + string msg4 = sArray[3].ToString(); + + string UserName = ""; + string s = ""; + ListModels oListModels = new ListModels(); + try + { + //缂栬緫鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Edit", 1, true, msg4)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + DLL.ClsKf_MateOutBackBill oBill = new DLL.ClsKf_MateOutBackBill(); + List<Models.ClsKf_ICStockBillMain> lsmain = new List<Models.ClsKf_ICStockBillMain>(); + msg2 = msg2.Replace("\\", ""); + msg2 = msg2.Replace("\n", ""); //\n + lsmain = oListModels.getObjectByJson_Kf_ICStockBillMain(msg2); + foreach (Models.ClsKf_ICStockBillMain oItem in lsmain) + { + if (refSav == "Add") + { + //鍗曟嵁鍙锋槸鍚﹂噸澶� + if (BillNew0.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld0.omodel.HInterID)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒"; + objJsonResult.data = 1; + return objJsonResult; + } + } + if (refSav == "Update") + { + if (BillOld0.ShowBill(oItem.HInterID, ref s) == false) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "姝ゅ崟鎹湁璇紒"; + objJsonResult.data = 1; + return objJsonResult; + } + //鍒ゆ柇鏄惁鍙紪杈� + if (BillOld0.omodel.HChecker != "" && BillOld0.omodel.HChecker != null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + if (BillOld0.omodel.HBillStatus > 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "姝ゅ崟鎹浜庝笉鍙紪杈戠姸鎬侊紝涓嶅厑璁镐慨鏀癸紒"; + objJsonResult.data = 1; + return objJsonResult; + } + if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld0, ref s)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = s + "锛屼笉鍏佽淇敼"; + objJsonResult.data = 1; + return objJsonResult; + } + } + //oItem.HMaker = ""; + UserName = oItem.HMaker; //鍒跺崟浜� + oItem.HBillType = "1244"; + oItem.HBillSubType = "1244"; + //oItem.HBillNo = ""; //鍗曟嵁鍙� + //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡 + //oItem.HInnerBillNo = ""; // --鍐呴儴鍗曟嵁鍙� + oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); + oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); + oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); + //oItem.HEquipID = 0; //璁惧ID(Gy_EquipMent) + //oItem.HPeriod = 0; + //oItem.HCheckBeginDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); // --缁翠慨鏃ユ湡 + //oItem.HCheckResult = ""; //楠屾敹缁撹--(姝e父锛屽紓甯�) + //oItem.HEmpID = 0; //楠屾敹浜�(Gy_Employee) + //oItem.HManagerID = 0; //璐熻矗浜�(Gy_Employee) + //oItem.HDeptID = 0; //楠屾敹閮ㄩ棬(Gy_Department) + //oItem.HExplanation = ""; //鎽樿(鏁呴殰鎻忚堪) + //oItem.HRemark = ""; //澶囨敞 + + //oItem.HMainSourceInterID = oItem.HInterID; + + //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo); + if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + oBill.omodel = oItem; + } + //琛ㄤ綋鏁版嵁 + //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆� + msg3 = msg3.Substring(1, msg3.Length - 2); + msg3 = msg3.Replace("\\", ""); + msg3 = msg3.Replace("\n", ""); //\n + //msg2 = msg2.Replace("'", "鈥�"); + List<Models.ClsKf_ICStockBillSub> ls = new List<Models.ClsKf_ICStockBillSub>(); + ls = oListModels.getObjectByJson_Kf_ICStockBillMSub(msg3); + int i = 0; + foreach (Models.ClsKf_ICStockBillSub oItemSub in ls) + { + + i++; + oItemSub.HEntryID = i; + + //oItemSub.HRepairCheckID = 0; //楠屾敹椤圭洰ID + //oItemSub.HRepairCheckContent = ""; //楠屾敹鍐呭 + //oItemSub.HManagerID = 0; //璐熻矗浜篒D + //oItemSub.HCloseMan = ""; //琛屽叧闂� + oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); + oItemSub.HCloseType = false; //鍏抽棴绫诲瀷 + //oItemSub.HRemark = ""; //澶囨敞 + oItemSub.HSourceInterID = 0; // 婧愬崟涓诲唴鐮� + oItemSub.HSourceEntryID = 0; //婧愬崟瀛愬唴鐮� + //oItemSub.HSourceBillNo = ""; //婧愬崟鍗曞彿 + //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷 + //oItemSub.HRelationQty = 0; //鍏宠仈鏁伴噺 + //oItemSub.HRelationMoney = 0; //鍏宠仈閲戦 + //oItemSub.HRepairID = 0; //缁翠慨椤圭洰 + //oItemSub.HRepairExplanation =""; //缁翠慨瑕佹眰 + //oItemSub.HMoney = 0; //缁翠慨璐圭敤 + oBill.DetailColl.Add(oItemSub); + + } + //淇濆瓨 + //淇濆瓨瀹屾瘯鍚庡鐞� + bool bResult; + if (oBill.omodel.HInterID == 0) + { + // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); + bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); + } + else + { + bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); + } + if (bResult) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; + //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�"); + objJsonResult.data = 1; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = 1; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString(); + objJsonResult.data = 1; + return objJsonResult; + } + } + #endregion + + #region 鍣ㄥ叿閲囪喘鍏ュ簱鍗曞鏍�/鍙嶅鏍� + [Route("Sc_MouldProdInHouseBill/AuditMouldProdInHouseBill")] + [HttpGet] + public object AuditMouldProdInHouseBill(string HInterID, string user, int flag) + { + //flag=1 瀹℃牳锛� flag=2 鍙嶅鏍� + //缂栬緫鏉冮檺 + if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Check", 1, true, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犲鏍告潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + Int64 lngBillKey = 0; + lngBillKey = DBUtility.ClsPub.isLong(HInterID); + if (lngBillKey == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�"; + objJsonResult.data = null; + return objJsonResult; + } + DLL.ClsSc_MouldProdOutBill oBill = new DLL.ClsSc_MouldProdOutBill(); + if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) + { + if (flag == 1) + { + if (oBill.omodel.HBillStatus == 2) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "褰撳墠鍗曟嵁宸插鏍革紝鏃犻渶鍐嶆瀹℃牳"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + string HCheckDate = DateTime.Now.Date.ToString(); + oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker='" + user + "',HCheckDate='" + HCheckDate + "',HBillStatus=2 Where HBillType='3801' and HInterID=" + HInterID); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "瀹℃牳鎴愬姛锛�"; + objJsonResult.data = 1; + return objJsonResult; + } + } + else + { + if (oBill.omodel.HBillStatus == 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "褰撳墠鍗曟嵁鏈鏍革紝鏃犻渶鍙嶅鏍�"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + string HCheckDate = DateTime.Now.Date.ToString(); + oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker=' ',HCheckDate=' ',HBillStatus=1 Where HBillType='3801' and HInterID=" + HInterID); + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍙嶅鏍告垚鍔燂紒"; + objJsonResult.data = 1; + return objJsonResult; + } + } + + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鏈壘鍒�"; + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + } +} diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/Kf_MateOutBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/Kf_MateOutBillController.cs" index 851281a..097ea57 100644 --- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/Kf_MateOutBillController.cs" +++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/Kf_MateOutBillController.cs" @@ -52,12 +52,12 @@ /// 鐢熶骇棰嗘枡鍗曞垹闄ゅ姛鑳� /// </summary> /// <returns></returns> - [Route("Sc_MouldProdInBill/set_DeleteBill")] + [Route("Kf_MateOutBill/set_DeleteBill")] [HttpGet] public object set_DeleteBill(string HInterID,string user) { //缂栬緫鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdInBill_Delete", 1, true, user)) + if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBill_Delete", 1, true, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -77,7 +77,7 @@ objJsonResult.data = null; return objJsonResult; } - DLL.ClsSc_MouldProdInBill oBill = new DLL.ClsSc_MouldProdInBill(); + DLL.ClsKf_MateOutBill oBill = new DLL.ClsKf_MateOutBill(); if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) { if (oBill.omodel.HBillStatus > 1) @@ -141,13 +141,13 @@ /// <param name="HInterID">鍗曟嵁ID</param> /// <param name="CurUserName">瀹℃牳浜�</param> /// <returns></returns> - [Route("Sc_MouldProdInBill/set_CheckBill")] + [Route("Kf_MateOutBill/set_CheckBill")] [HttpGet] public object set_CheckBill(int HInterID, string CurUserName) { - string ModRightNameCheck = "Sc_MouldProdInBill_Check"; + string ModRightNameCheck = "Kf_MateOutBill_Check"; DBUtility.ClsPub.CurUserName = CurUserName; - DLL.ClsSc_MouldProdInBill oBill = new DLL.ClsSc_MouldProdInBill(); + DLL.ClsKf_MateOutBill oBill = new DLL.ClsKf_MateOutBill(); try { //瀹℃牳鏉冮檺 @@ -248,13 +248,13 @@ /// <param name="HInterID">鍗曟嵁ID</param> /// <param name="CurUserName">瀹℃牳浜�</param> /// <returns></returns> - [Route("Sc_MouldProdInBill/set_AbandonCheck")] + [Route("Kf_MateOutBill/set_AbandonCheck")] [HttpGet] public object set_AbandonCheck(int HInterID, string CurUserName) { - string ModRightNameCheck = "Sc_MouldProdInBill_Check"; + string ModRightNameCheck = "Kf_MateOutBill_Check"; DBUtility.ClsPub.CurUserName = CurUserName; - DLL.ClsSc_MouldProdInBill oBill = new DLL.ClsSc_MouldProdInBill(); + DLL.ClsKf_MateOutBill oBill = new DLL.ClsKf_MateOutBill(); try { //瀹℃牳鏉冮檺 @@ -442,7 +442,7 @@ try { //缂栬緫鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdInBill_Edit", 1, true, msg4)) + if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBill_Edit", 1, true, msg4)) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -455,7 +455,7 @@ List<Models.ClsKf_MateOutBillMain> lsmain = new List<Models.ClsKf_MateOutBillMain>(); msg2 = msg2.Replace("\\", ""); msg2 = msg2.Replace("\n", ""); //\n - lsmain = oListModels.getObjectByJson_Kf_ICStockBillMain(msg2); + lsmain = oListModels.getObjectByJson_Kf_MateOutBillMain(msg2); foreach (Models.ClsKf_MateOutBillMain oItem in lsmain) { if (refSav == "Add") @@ -508,8 +508,8 @@ } //oItem.HMaker = ""; UserName = oItem.HMaker; //鍒跺崟浜� - oItem.HBillType = "3801"; - oItem.HBillSubType = "3801"; + oItem.HBillType = "1204"; + oItem.HBillSubType = "1204"; //oItem.HBillNo = ""; //鍗曟嵁鍙� //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --鏃ユ湡 //oItem.HInnerBillNo = ""; // --鍐呴儴鍗曟嵁鍙� @@ -621,7 +621,7 @@ { //flag=1 瀹℃牳锛� flag=2 鍙嶅鏍� //缂栬緫鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdInBill_Check", 1, true, user)) + if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBill_Check", 1, true, user)) { objJsonResult.code = "0"; objJsonResult.count = 0; diff --git a/WebAPI/DLL/ClsKf_MateOutBackBill.cs b/WebAPI/DLL/ClsKf_MateOutBackBill.cs index c4f803e..96919a4 100644 --- a/WebAPI/DLL/ClsKf_MateOutBackBill.cs +++ b/WebAPI/DLL/ClsKf_MateOutBackBill.cs @@ -7,9 +7,9 @@ { public class ClsKf_MateOutBackBill:DBUtility.ClsXt_BaseBill { - public Model.ClsKf_ICStockBillMain omodel = new Model.ClsKf_ICStockBillMain(); - public List<Model.ClsKf_ICStockBillSub> DetailColl = new List<Model.ClsKf_ICStockBillSub>(); - public List<Model.ClsKf_ICStockBillScheme> DetailSubColl = new List<Model.ClsKf_ICStockBillScheme>(); + public Models.ClsKf_ICStockBillMain omodel = new Models.ClsKf_ICStockBillMain(); + public List<Models.ClsKf_ICStockBillSub> DetailColl = new List<Models.ClsKf_ICStockBillSub>(); + public List<Models.ClsKf_ICStockBillScheme> DetailSubColl = new List<Models.ClsKf_ICStockBillScheme>(); public ClsKf_MateOutBackBill() { @@ -68,7 +68,7 @@ DeleteBillSub(lngBillKey); //鎻掑叆瀛愯〃 omodel.HInterID = lngBillKey; - foreach (Model.ClsKf_ICStockBillSub oSub in DetailColl) + foreach (Models.ClsKf_ICStockBillSub oSub in DetailColl) { oCn.RunProc("Insert into Kf_ICStockBillSub " + " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + @@ -130,7 +130,7 @@ ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + ") "); //鎻掑叆瀛愯〃 - foreach (Model.ClsKf_ICStockBillSub oSub in DetailColl) + foreach (Models.ClsKf_ICStockBillSub oSub in DetailColl) { oCn.RunProc("Insert into Kf_ICStockBillSub " + " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + @@ -218,7 +218,7 @@ DetailColl.Clear();//娓呯┖ for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) { - Model.ClsKf_ICStockBillSub oSub = new Model.ClsKf_ICStockBillSub(); + Models.ClsKf_ICStockBillSub oSub = new Models.ClsKf_ICStockBillSub(); // 鍥哄畾璧嬪��=============================================== oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]); oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]); @@ -277,7 +277,7 @@ DetailSubColl.Clear();//娓呯┖ for (int i = 0; i < DsSubSec.Tables[0].Rows.Count; i++) { - Model.ClsKf_ICStockBillScheme oSubSec = new Model.ClsKf_ICStockBillScheme(); + Models.ClsKf_ICStockBillScheme oSubSec = new Models.ClsKf_ICStockBillScheme(); oSubSec.HInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HInterID"].ToString()); oSubSec.HEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HEntryID"].ToString()); oSubSec.HItemID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HItemID"].ToString()); diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs index 6a31c40..f11da88 100644 --- a/WebAPI/ListModels.cs +++ b/WebAPI/ListModels.cs @@ -1716,7 +1716,7 @@ /// </summary> /// <param name="jsonString"></param> /// <returns></returns> - public List<Models.ClsKf_MateOutBillMain> getObjectByJson_Kf_ICStockBillMain(string jsonString) + public List<Models.ClsKf_MateOutBillMain> getObjectByJson_Kf_MateOutBillMain(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Models.ClsKf_MateOutBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsKf_MateOutBillMain>>(jsonString); @@ -1735,5 +1735,31 @@ List<Models.ClsKf_MateOutBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsKf_MateOutBillSub>>(jsonString); return list; } + + + /// <summary> + /// + /// </summary> + /// <param name="jsonString"></param> + /// <returns></returns> + public List<Models.ClsKf_ICStockBillMain> getObjectByJson_Kf_ICStockBillMain(string jsonString) + { + jsonString = "[" + jsonString.ToString() + "]"; + List<Models.ClsKf_ICStockBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsKf_ICStockBillMain>>(jsonString); + return list; + } + + + /// <summary> + /// + /// </summary> + /// <param name="jsonString"></param> + /// <returns></returns> + public List<Models.ClsKf_ICStockBillSub> getObjectByJson_Kf_ICStockBillMSub(string jsonString) + { + jsonString = "[" + jsonString.ToString() + "]"; + List<Models.ClsKf_ICStockBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsKf_ICStockBillSub>>(jsonString); + return list; + } } } \ No newline at end of file diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index a65bbd9..7fe8d77 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -388,6 +388,7 @@ <Compile Include="Controllers\XSGL\Xs_SeOutStockBackBillController.cs" /> <Compile Include="Controllers\XSGL\Xs_SeOutStockBillController.cs" /> <Compile Include="Controllers\XSGL\Xs_SeOrderBillController.cs" /> + <Compile Include="Controllers\浠撳瓨绠$悊\ClsKf_MateOutBackBillController.cs" /> <Compile Include="Controllers\浠撳瓨绠$悊\Kf_MateOutBillController.cs" /> <Compile Include="Controllers\鍝佽川绠$悊\宸ュ簭妫�楠屽崟\QC_ProcessCheckBillController.cs" /> <Compile Include="Controllers\鍝佽川绠$悊\棣栦欢妫�楠屽崟\QC_FirstPieceCheckBillController.cs" /> @@ -612,7 +613,6 @@ <Compile Include="Controllers\EntrustOutController.cs" /> <Compile Include="Controllers\Kf_EntrustInBillController.cs" /> <Compile Include="Controllers\MateOutController.cs" /> - <Compile Include="Controllers\MoveStockBillController.cs" /> <Compile Include="Controllers\OtherOutBillController.cs" /> <Compile Include="Controllers\OtherInStockController.cs" /> <Compile Include="Controllers\POStockInBackBillController.cs" /> -- Gitblit v1.9.1