From 5fe0467e751a5138536785212f25b1bd177a526d Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期日, 18 二月 2024 17:28:30 +0800 Subject: [PATCH] 月度阶段计划与工作周总结,编辑回显,审核反审核,关闭,反关闭,查询数据 --- WebAPI/Controllers/条码管理/WEBSController.cs | 294 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 292 insertions(+), 2 deletions(-) diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" index e594ec6..75bd2fb 100644 --- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" +++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" @@ -121,8 +121,44 @@ { try { - if (oWebs.CheckModRight(ModRightName, HUserName, ref DBUtility.ClsPub.sErrInfo)) + //鑾峰彇绯荤粺鍙傛暟 + string sErrMsg = ""; + if (oSystemParameter.ShowBill(ref sErrMsg) == true) { + //鍒ゆ柇鏉冮檺 + if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HUserName)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鎮ㄦ病鏈夊搴旀ā鍧楁潈闄�,璇蜂笌绠$悊鍛樿仈绯伙紒"; + objJsonResult.data = null; + return objJsonResult; + } + + if (oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode.ToUpper() == "WISE") + { + ds = oCn.RunProcReturn("exec h_p_K3_User '" + HUserName + "'", "h_p_K3_User"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鎮ㄧ殑鐢ㄦ埛娌℃湁缁戝畾閲戣澏璐﹀彿,璇蜂笌绠$悊鍛樿仈绯伙紒"; + objJsonResult.data = null; + return objJsonResult; + } + } + else if (oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode.ToUpper() == "CLOUD") + { + //鍒ゆ柇鐢ㄦ埛璐﹀彿瀵嗙爜锛圵ISE銆丆LOUD锛夋槸鍚︽纭� + if (!oWebs.CheckUser(HUserName, ref DBUtility.ClsPub.sErrInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛� + objJsonResult.data = null; + return objJsonResult; + } + } objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "鎴愬姛锛�"; @@ -133,7 +169,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛� + objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg; objJsonResult.data = null; return objJsonResult; } @@ -1245,11 +1281,265 @@ #region 鐢熶骇鍏ュ簱 涓婁紶鐢熷崟 + #region 鐢熶骇鍏ュ簱 鏂板妯″紡 + + /// <summary> + /// 鐢熶骇鍏ュ簱鏂板涓婁紶 + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_SaveProductInBill_Json")] + [HttpPost] + public object set_SaveProductInBill_Json([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + try + { + List<Model.ClsKf_ProductInBillMain> lsmain = new List<Model.ClsKf_ProductInBillMain>(); + ListModels oListModels = new ListModels(); + lsmain = oListModels.getProductInBillMainByJson(msg1); + WebS.ClsKf_ProductInBillMain websLsmain = new WebS.ClsKf_ProductInBillMain(); + string sSourceType = lsmain[0].HMainSourceBillType; + websLsmain.HInterID = lsmain[0].HInterID; + websLsmain.HBillNo = lsmain[0].HBillNo; + websLsmain.HBillType = lsmain[0].HBillType; + websLsmain.HDate = lsmain[0].HDate; + websLsmain.HDeptID = lsmain[0].HDeptID; + websLsmain.HWHID = lsmain[0].HWHID; + websLsmain.HSCWHID = lsmain[0].HSCWHID; + websLsmain.HSupID = lsmain[0].HSupID; + websLsmain.HKeeperID = lsmain[0].HKeeperID; + websLsmain.HSecManagerID = lsmain[0].HSecManagerID; + websLsmain.HEmpID = lsmain[0].HEmpID; + websLsmain.HManagerID = lsmain[0].HManagerID; + websLsmain.HRemark = lsmain[0].HRemark; + websLsmain.HExplanation = lsmain[0].HExplanation; + websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo; + websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag; + websLsmain.HBillSubType = lsmain[0].HBillSubType; + if (lsmain[0].HMainSourceBillType == "3710") + { + websLsmain.HMainSourceBillType = "鐢熶骇璁㈠崟"; + } + else if (lsmain[0].HMainSourceBillType == "3711") + { + websLsmain.HMainSourceBillType = "鐢熶骇姹囨姤鍗�"; + } + else if (lsmain[0].HMainSourceBillType == "3714") + { + websLsmain.HMainSourceBillType = "宸ュ簭姹囨姤鍗�"; + } + else + { + websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆"; + } + websLsmain.HMaker = lsmain[0].HMaker; + websLsmain.HBillerID = lsmain[0].HBillerID; + websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; + websLsmain.HOWNERID = lsmain[0].HSTOCKORGID; + + if (oWebs.set_SaveProductInBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛� + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛� + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鐢熶骇鍏ュ簱鍗曚笂浼犲け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion #endregion #region 閲囪喘鍏ュ簱 涓婁紶鐢熷崟 + #region 閲囪喘鍏ュ簱 鏂板妯″紡 + + /// <summary> + /// 閲囪喘鍏ュ簱鏂板涓婁紶 + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_SavePOStockInBill_Json")] + [HttpPost] + public object set_SavePOStockInBill_Json([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + try + { + List<Model.ClsKf_POStockInBillMain> lsmain = new List<Model.ClsKf_POStockInBillMain>(); + ListModels oListModels = new ListModels(); + lsmain = oListModels.getPOStockInBillMainByJson(msg1); + WebS.ClsKf_POStockInBillMain websLsmain = new WebS.ClsKf_POStockInBillMain(); + string sSourceType = lsmain[0].HMainSourceBillType; + websLsmain.HInterID = lsmain[0].HInterID; + websLsmain.HBillNo = lsmain[0].HBillNo; + websLsmain.HBillType = lsmain[0].HBillType; + websLsmain.HDate = lsmain[0].HDate; + websLsmain.HDeptID = lsmain[0].HDeptID; + websLsmain.HWHID = lsmain[0].HWHID; + websLsmain.HSCWHID = lsmain[0].HSCWHID; + websLsmain.HSupID = lsmain[0].HSupID; + websLsmain.HKeeperID = lsmain[0].HKeeperID; + websLsmain.HSecManagerID = lsmain[0].HSecManagerID; + websLsmain.HEmpID = lsmain[0].HEmpID; + websLsmain.HManagerID = lsmain[0].HManagerID; + websLsmain.HRemark = lsmain[0].HRemark; + websLsmain.HExplanation = lsmain[0].HExplanation; + websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo; + websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag; + websLsmain.HBillSubType = lsmain[0].HBillSubType; + if (lsmain[0].HMainSourceBillType == "1102") + { + websLsmain.HMainSourceBillType = "閲囪喘璁㈠崟"; + } + else if (lsmain[0].HMainSourceBillType == "1103") + { + websLsmain.HMainSourceBillType = "鏀舵枡閫氱煡鍗�"; + } + else + { + websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆"; + } + websLsmain.HMaker = lsmain[0].HMaker; + websLsmain.HBillerID = lsmain[0].HBillerID; + websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; + websLsmain.HOWNERID = lsmain[0].HSTOCKORGID; + + if (oWebs.set_SavePOStockInBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛� + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛� + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "閲囪喘鍏ュ簱鍗曚笂浼犲け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + + + #endregion + + #region 濮斿鍏ュ簱 涓婁紶鐢熷崟 + + #region 濮斿鍏ュ簱 鏂板妯″紡 + + /// <summary> + /// 濮斿鍏ュ簱鏂板涓婁紶 + /// </summary> + /// <returns></returns> + [Route("WEBSController/set_SaveEntrustInBill_Json")] + [HttpPost] + public object set_SaveEntrustInBill_Json([FromBody] JObject oMain) + { + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + try + { + List<Model.ClsKf_EntrustInBillMain> lsmain = new List<Model.ClsKf_EntrustInBillMain>(); + ListModels oListModels = new ListModels(); + lsmain = oListModels.getEntrustInBillMainByJson(msg1); + WebS.ClsKf_EntrustInBillMain websLsmain = new WebS.ClsKf_EntrustInBillMain(); + string sSourceType = lsmain[0].HMainSourceBillType; + websLsmain.HInterID = lsmain[0].HInterID; + websLsmain.HBillNo = lsmain[0].HBillNo; + websLsmain.HBillType = lsmain[0].HBillType; + websLsmain.HDate = lsmain[0].HDate; + websLsmain.HDeptID = lsmain[0].HDeptID; + websLsmain.HWHID = lsmain[0].HWHID; + websLsmain.HSCWHID = lsmain[0].HSCWHID; + websLsmain.HSupID = lsmain[0].HSupID; + websLsmain.HKeeperID = lsmain[0].HKeeperID; + websLsmain.HSecManagerID = lsmain[0].HSecManagerID; + websLsmain.HEmpID = lsmain[0].HEmpID; + websLsmain.HMangerID = lsmain[0].HMangerID; + websLsmain.HRemark = lsmain[0].HRemark; + websLsmain.HExplanation = lsmain[0].HExplanation; + websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo; + websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag; + websLsmain.HBillSubType = lsmain[0].HBillSubType; + if (lsmain[0].HMainSourceBillType == "1601") + { + websLsmain.HMainSourceBillType = "濮斿璁㈠崟"; + } + else if (lsmain[0].HMainSourceBillType == "1103") + { + websLsmain.HMainSourceBillType = "鏀舵枡閫氱煡鍗�"; + } + else + { + websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆"; + } + websLsmain.HMaker = lsmain[0].HMaker; + websLsmain.HBillerID = lsmain[0].HBillerID; + websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; + websLsmain.HOWNERID = lsmain[0].HSTOCKORGID; + + if (oWebs.set_SaveEntrustInBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛� + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛� + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "濮斿鍏ュ簱鍗曚笂浼犲け璐ワ紒" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion + #endregion -- Gitblit v1.9.1