From fb21c32041a7bd6a2cfce0f05f9340eea9dd49fa Mon Sep 17 00:00:00 2001 From: ch <37327@LLOOCCY> Date: 星期四, 15 九月 2022 09:58:13 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/DLL/ClsSc_MESBeginWorkBill.cs | 4 Pub_Class/CustomerCls/ClsXt_SystemParameter.cs | 4 DBUtility/业务单据/ClsXt_BaseBillMain.cs | 1 WebAPI/Controllers/LMESController.cs | 34 ++-- Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs | 1 WebAPI/Models/其它/ReciveBill_FastModel.cs | 16 ++ WebAPI/WebAPI.csproj | 1 WebAPI/Models/ClsSc_MESBeginWorkBillMain.cs | 3 WebAPI/Controllers/POStockInBillController.cs | 186 ++++++++++++++++++++++++++++++ WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs | 81 ++++++++----- WebAPI/Models/动态列/OptionListModel.cs | 13 + 11 files changed, 285 insertions(+), 59 deletions(-) diff --git "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBillMain.cs" "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBillMain.cs" index 6ad2004..398a4e7 100644 --- "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBillMain.cs" +++ "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBillMain.cs" @@ -45,5 +45,6 @@ public Int64 HPRDORGID; //有效状态 public bool HUseFlag; + } } diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs index f948345..a1dc33f 100644 --- a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs +++ b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs @@ -743,6 +743,10 @@ { omodel.Kf_MoveStockStepInBill_FIFOCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); } + if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_MoveStockStepInBill_SourceBarCodeCtl") + { + omodel.Kf_MoveStockStepInBill_SourceBarCodeCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); + } //采购退料单 if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Kf_POStockInBackBill_AutoCheck") diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs index 1cefeaa..c0021e9 100644 --- a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs +++ b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs @@ -194,6 +194,7 @@ public string Kf_MoveStockStepInBill_SourceWHSPCtl; //是否取源单中仓库仓位('Y'为是) public string Kf_MoveStockStepInBill_FIFOList; //先进先出下架清单 public string Kf_MoveStockStepInBill_FIFOCtl; //先进先出控制 + public string Kf_MoveStockStepInBill_SourceBarCodeCtl; //是否进行源单对应条码核对('Y'为核对) //采购退料 public string Kf_POStockInBackBill_AutoCheck; //是否自动审核 diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs index b74aeeb..22b9f58 100644 --- a/WebAPI/Controllers/LMESController.cs +++ b/WebAPI/Controllers/LMESController.cs @@ -60,14 +60,14 @@ try { //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� - if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; - objJsonResult.data = null; - return objJsonResult; - } + //if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; + // objJsonResult.data = null; + // return objJsonResult; + //} SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere+ " order by hmainid desc ", "h_v_Sc_ProcessExchangeBillQuery"); @@ -140,15 +140,15 @@ DataSet ds; try { - //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� - if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; - objJsonResult.data = null; - return objJsonResult; - } + ////鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + //if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳煡璇㈡潈闄�!"; + // objJsonResult.data = null; + // return objJsonResult; + //} SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeIssueBillQuery where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeIssueBillQuery"); objJsonResult.code = "1"; diff --git a/WebAPI/Controllers/POStockInBillController.cs b/WebAPI/Controllers/POStockInBillController.cs index fec76fe..aa1353d 100644 --- a/WebAPI/Controllers/POStockInBillController.cs +++ b/WebAPI/Controllers/POStockInBillController.cs @@ -847,8 +847,6 @@ return objJsonResult; } } - - [Route("POStockInBill/Delete_Json")] [HttpGet] public object Delete_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string sHBillType) @@ -985,7 +983,6 @@ } catch (Exception) { - objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "鍒犻櫎澶辫触锛�"; @@ -1413,6 +1410,11 @@ return HInterID; } + /// <summary> + /// 鍒拌揣纭鎵敹鏂欓�氱煡鍗曞彿 鑾峰彇琛ㄤ綋鍜岃〃澶存暟鎹� + /// </summary> + /// <param name="HBarCode"></param> + /// <returns></returns> public json Get_ReciveBillCheckDate(string HBarCode) { json objjson = new json(); @@ -1459,6 +1461,184 @@ } } + [Route("POStockInBillList/AuditPOInStockBillPost")] + [HttpPost] + public object AuditPOInStockBill([FromBody] JObject msg) + { + try + { + string _msg = msg["msg"].ToString(); + _msg = _msg.Replace("\\", ""); + _msg = _msg.Replace("\n", ""); + List<Models.ReciveBill_FastModel> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ReciveBill_FastModel>>(_msg); + DAL.ClsCg_POInStockBill oBill = new DAL.ClsCg_POInStockBill(); + var hinterID = list[0].HInterID; + var FID = list[0].FID; + oCn.BeginTran(); + string sql = string.Empty; + foreach (var item in list) + { + if (item.HSQty == 0) + continue; + sql = $"update Cg_POInStockBillSub set Hqty = {item.HSQty} where HInterID ={item.HInterID} and HEntryID = {item.HEntryID}"; + oCn.RunProc(sql); + } + oCn.RunProc("exec h_p_Cg_UpDatePOOrderRelation_Del " + hinterID);//鍒犻櫎鍏宠仈鍏崇郴 + + JObject jsonRoot = new JObject(); + jsonRoot.Add("Creator", ""); + jsonRoot.Add("NeedUpDateFields", new JArray()); + jsonRoot.Add("NeedReturnFields", new JArray()); + jsonRoot.Add("IsDeleteEntry", "false"); + jsonRoot.Add("SubSystemId", ""); + jsonRoot.Add("IsVerifyBaseDataField", ""); + + JObject jsonModel = new JObject(); + jsonModel.Add("FID", FID); + JArray Entry = new JArray(); + foreach (var item in list) + { + if (item.HSQty == 0) + continue; + JObject jsonFPOOrderEntry = new JObject(); + jsonFPOOrderEntry.Add("FEntryID", item.FEntryID); + jsonFPOOrderEntry.Add("FHQty ", item.HSQty); ; + Entry.Add(jsonFPOOrderEntry); + } + jsonModel.Add("FEntity", Entry); + jsonRoot.Add("Model", jsonModel); + var loginRet = InvokeHelper.Login(); + var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); + if (isSuccess <= 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = loginRet; + objJsonResult.data = null; + return objJsonResult; + } + var result = InvokeHelper.Save("PUR_ReceiveBill", jsonRoot.ToString()); + //LogService.Write(result); + if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() == "TRUE") + { + LogService.Write("鏀舵枡閫氱煡鍗曚慨鏀瑰け璐sonRoot:" + jsonRoot.ToString()); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曟洿鏂板け璐�" + result; + objJsonResult.data = null; + return objJsonResult; + } + var json = new + { + Ids = FID, + }; + //鎻愪氦 + var _result = InvokeHelper.Submit("PUR_ReceiveBill", JsonConvert.SerializeObject(json)); + var _saveObj = JObject.Parse(_result); + if (_saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") + { + LogService.Write("鏀舵枡閫氱煡鍗曟彁浜ゅけ璐sonRoot:" + jsonRoot.ToString()); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曟彁浜ゅけ璐�" + _result; + objJsonResult.data = null; + return objJsonResult; + + } + //瀹℃牳 + _result = InvokeHelper.Audit("PUR_ReceiveBill", JsonConvert.SerializeObject(json)); + _saveObj = JObject.Parse(_result); + if (_saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") + { + LogService.Write("鏀舵枡閫氱煡鍗曞鏍稿け璐sonRoot:" + jsonRoot.ToString()); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "閲戣澏鏀舵枡閫氱煡鍗曞鏍稿け璐sonRoot" + _result; + objJsonResult.data = null; + return objJsonResult; + + } + + sql = string.Format(@"update Cg_POInStockBillMain set +HBillStatus = 2 , +HCheckDate = getdate() +where HInterID in ({0})", HInterID); + oCn.RunProc(sql);//鏇存柊mes鐘舵�� + //鏇存柊鎴愬姛鍚� 鍚屾鏇存柊閲戣澏 + oCn.Commit(); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鎿嶄綔鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + catch (Exception e) + { + oCn.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "寮傚父锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + + } + + /// <summary> + /// 鍒拌揣纭 鎵潯鐮� 鏍¢獙 + /// </summary> + /// <param name="HBarcode"></param> + /// <param name="HInterID"></param> + /// <returns></returns> + [Route("POStockInBillList/Get_ReciveBillByBarcode")] + [HttpGet] + public object Get_ReciveBillByBarcode(string HBarcode, string HInterID) + { + try + { + //鏍¢獙鏉$爜鏄惁瀛樺湪 + string sql = $"select* from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode}'"; + DataSet ds = oCn.RunProcReturn(sql, "H_v_SRM_POOrderBillList"); + if (ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏉$爜涓嶅瓨鍦紒"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + //string sql = $"select * from H_v_SRM_POInStockBillList where 鍗曟嵁鍙� ='{HBillno}'"; + //ds = oCn.RunProcReturn(sql, "H_v_SRM_POInStockBillList"); + //if (ds == null || ds.Tables[0].Rows.Count == 0) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + // objJsonResult.data = null; + // return objJsonResult; + //} + //else + //{ + + //} + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + //鏀舵枡閫氱煡鍗曞鏍� 瀹℃牳鎻愪氦 [Route("POStockInBillList/Exec_ReciveBillCheck")] [HttpGet] diff --git a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs index 2131d79..76a04e3 100644 --- a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs +++ b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs @@ -201,7 +201,7 @@ /// <returns></returns> [Route("Sc_MESBeginWorkBill/DeltetMESBeginWorkBill")] [HttpGet] - public object DeltetMESBeginWorkBill(string HInterID,string UserName) + public object DeltetMESBeginWorkBill(string HInterID, string UserName) { DBUtility.ClsPub.CurUserName = UserName; //缂栬緫鏉冮檺 @@ -287,7 +287,7 @@ [HttpGet] public object AuditProcessReportList(int HInterID, int IsAudit, string CurUserName) { - string ModRightNameCheck = "MES_MESBeginWorkBill_Check"; + string ModRightNameCheck = "MES_MESBeginWorkBill_Check"; DBUtility.ClsPub.CurUserName = CurUserName; try { @@ -467,7 +467,7 @@ [HttpPost] public object SaveGetMESBeginWorkFrom([FromBody] JObject msg) { - + var _value = msg["msg"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); @@ -496,7 +496,7 @@ objJsonResult.data = null; return objJsonResult; } - + ListModels oListModels = new ListModels(); try { @@ -555,8 +555,19 @@ return objJsonResult; } } - - DBUtility.ClsPub.CurUserName =oItem.HMaker; + ClsXt_SystemParameter oClsXt_SystemParameter = new ClsXt_SystemParameter(); + string sCapName = oClsXt_SystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo); + if (sCapName.Contains("鍑礉")) + { + DataTable dt = getInfodatanow(oItem.HSourceID.ToString()); + if (dt.Rows.Count > 0) + { + DataRow dr = dt.Rows[0]; + oItem.HRunStatus = dr["runStu"].ToString(); + oItem.HSourceBeginQty = Convert.ToDecimal(dr["countAll"]); + } + } + DBUtility.ClsPub.CurUserName = oItem.HMaker; oItem.HBillType = "3787"; oItem.HBillSubType = "3787"; oItem.HBillStatus = 1; //鍗曟嵁鐘舵�侊紙1鏈锛�2瀹℃牳閫氳繃锛�3鍏抽棴锛�4浣滃簾锛�5瀹℃牳閫�鍥�,6瀹℃牳涓�,7宸查槄锛�8宸插洖澶嶏紝9缁撴锛�10楠岃瘉,11涓嬭揪锛�12寮�宸�,13鐢宠瀹℃壒,15鐢宠妫�楠岋紝16 鍒ゅ畾鍚堟牸锛�17鍒ゅ畾涓嶅悎鏍硷級 @@ -579,9 +590,9 @@ bool bResult; if (oBill.omodel.HInterID == 0) { - + bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); - if (bResult) + if (bResult) { objJsonResult.HInterID = DBUtility.ClsPub.sExeReturnInfo; //杩斿洖涓籌D //绯荤粺鍙傛暟 鑷姩瀹℃牳 @@ -598,7 +609,7 @@ } } } - + } else { @@ -607,7 +618,7 @@ } if (bResult) { - + objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "淇濆瓨鎴愬姛锛�"; @@ -633,6 +644,14 @@ } } #endregion + + public DataTable getInfodatanow(string hsoucreID) + { + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + string sql = $" select HMacAddr, isnull(runStu,'')runStu, isnull(countAll,0)countAll from Gy_Source t1 left join HX_LIOTsys..Info_data_now t2 on t1.HMacAddr = t2.hid where t1.hitemid={hsoucreID}"; + DataTable dt = oCn.RunProcReturn(sql, "dt").Tables[0]; + return dt; + } #region 鎶ュ伐骞冲彴楠岃瘉鍗曟嵁鐘舵�� [Route("Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus")] @@ -709,7 +728,7 @@ return new SQLHelper.ClsCN().RunProcReturn(sql, "Sc_ICMOBillWorkQtyStatus_Tmp"); } #endregion - + #region 鎶ュ伐骞冲彴浜ч噺姹囬獙璇佹眹鎶ユ暟閲忔槸鍚﹁秴鍑鸿鍒掓暟閲忚緫 /// <summary> /// @@ -849,7 +868,7 @@ if (bResult) { objJsonResult.HInterID = DBUtility.ClsPub.sExeReturnInfo; //杩斿洖涓籌D - //绯荤粺鍙傛暟 鑷姩瀹℃牳 + //绯荤粺鍙傛暟 鑷姩瀹℃牳 string sReturn = ""; if (oSystemParameter.ShowBill(ref sReturn) == true) { @@ -907,7 +926,7 @@ /// <returns></returns> [Route("Sc_MESBeginWorkBill/MESProductAuditProcessReportList")] [HttpGet] - public object MESProductAuditProcessReportList(int HSourceID,int HSourceInterID,int HSourceEntryID,string HSourceBillNo, int HICMOInterID,int HICMOEntryID, int HInterID, int IsAudit, string CurUserName) + public object MESProductAuditProcessReportList(int HSourceID, int HSourceInterID, int HSourceEntryID, string HSourceBillNo, int HICMOInterID, int HICMOEntryID, int HInterID, int IsAudit, string CurUserName) { string ModRightNameCheck = "MES_ProcExchReport_Check"; DBUtility.ClsPub.CurUserName = CurUserName; @@ -915,7 +934,7 @@ { string StrMessage = ""; //瀹℃牳鏉冮檺 - if (!WebClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName,ref StrMessage)) + if (!WebClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName, ref StrMessage)) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -987,7 +1006,7 @@ if (IsAudit == 0) //瀹℃牳鎻愪氦 { //瀹℃牳鎻愪氦 - if (oBill.CheckBill(HSourceID, HSourceInterID,HSourceEntryID,HSourceBillNo,HICMOInterID, HICMOEntryID, lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) + if (oBill.CheckBill(HSourceID, HSourceInterID, HSourceEntryID, HSourceBillNo, HICMOInterID, HICMOEntryID, lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) { objJsonResult.code = "1"; objJsonResult.count = 1; @@ -1040,19 +1059,19 @@ #region 鎶ュ伐骞冲彴浜ч噺姹囨姤鍒犻櫎 [Route("Sc_MESBeginWorkBill/DeltetMESProductReportBill")] [HttpGet] - public object DeleteGetLineBindBillList(string HInterID,string HICMOInterID,string HICMOEntryID,string UserName) + public object DeleteGetLineBindBillList(string HInterID, string HICMOInterID, string HICMOEntryID, string UserName) { try { oCN.BeginTran(); //鏌ヨ浜ч噺姹囨姤涓存椂琛ㄦ暟閲� ds = oCN.RunProcReturn("select isnull(HQty,0) HQty,isnull(HWasterQty,0) HWasterQty,isnull(HBadQty,0) HBadQty from Sc_ICMOBillWorkQtyStatus_Tmp where HInterID='" + HInterID + "' and HICMOInterID='" + HICMOInterID + "' and HICMOEntryID='" + HICMOEntryID + "'", "Sc_ICMOBillWorkQtyStatus_Tmp"); - double HQty =double.Parse(ds.Tables[0].Rows[0]["HQty"].ToString()); + double HQty = double.Parse(ds.Tables[0].Rows[0]["HQty"].ToString()); double HWasterQty = double.Parse(ds.Tables[0].Rows[0]["HWasterQty"].ToString()); double HBadQty = double.Parse(ds.Tables[0].Rows[0]["HBadQty"].ToString()); double sumqty = HQty + HBadQty + HWasterQty; //姹囨姤鏁伴噺+涓嶈壇+鎶ュ簾 - //鏇存柊浜ч噺瑁呴噺涓存椂琛ㄥ凡姹囨姤鏁伴噺 - string sql1 = string.Format(@"update Sc_ICMOBillStatus_Tmp set HICMOStatus='1',HFinishFlag='0', HRelationInterID=0,HSplitRelationQty=HSplitRelationQty-" + sumqty + ",HDateFinishQty=HDateFinishQty-"+ sumqty + " where HICMOInterID='"+ HICMOInterID + "' and HICMOEntryID='"+ HICMOEntryID + "'"); + //鏇存柊浜ч噺瑁呴噺涓存椂琛ㄥ凡姹囨姤鏁伴噺 + string sql1 = string.Format(@"update Sc_ICMOBillStatus_Tmp set HICMOStatus='1',HFinishFlag='0', HRelationInterID=0,HSplitRelationQty=HSplitRelationQty-" + sumqty + ",HDateFinishQty=HDateFinishQty-" + sumqty + " where HICMOInterID='" + HICMOInterID + "' and HICMOEntryID='" + HICMOEntryID + "'"); oCN.RunProc(sql1); //鏇存柊鍒囨崲鐘舵�佸�� string sql = string.Format(@"delete Sc_ICMOBillWorkQtyStatus_Tmp where HInterID='" + HInterID + "'"); @@ -1081,8 +1100,8 @@ #region 鎶ュ伐骞冲彴鎶ユ鐢宠淇濆瓨 [Route("Sc_MESBeginWorkBill/SaveGetMESProductReportBillList")] [HttpGet] - public object SaveGetMESProductReportBillList(string ScMaxWork,string HSourceBillType, string workcode,int HSourceID,int HICMOInterID,int HICMOEntryID,string HMaker,string Czybm) - { + public object SaveGetMESProductReportBillList(string ScMaxWork, string HSourceBillType, string workcode, int HSourceID, int HICMOInterID, int HICMOEntryID, string HMaker, string Czybm) + { ListModels oListModels = new ListModels(); try { @@ -1110,9 +1129,9 @@ //} string sHSourceType = HSourceBillType; - string BillType = "3711"; //鍗曟嵁绫诲瀷 (鐢熶骇姹囨姤鍗�) - //寰楀埌mainid - long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); + string BillType = "3711"; //鍗曟嵁绫诲瀷 (鐢熶骇姹囨姤鍗�) + //寰楀埌mainid + long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); //oCN.BeginTran(); //鏍规嵁鍗曞彿銆佽祫婧怚D銆佽鍗曚富ID銆佽鍗曞瓙ID銆佸埗鍗曚汉杩囨护浜ч噺姹囨姤鎶ユ鐢宠鎻愪氦鏁版嵁 //string sql = string.Format(@"update Sc_ICMOBillWorkQtyStatus_Tmp set @@ -1126,14 +1145,14 @@ //ds = oCN.RunProcReturn("select top 1 * from Sc_ICMOBillWorkQtyStatus_Tmp where HICMOReportInterID='" + HInterID + "' and HICMOReportBillNo='" + ScMaxWork + "'", "Sc_ICMOBillWorkQtyStatus_Tmp"); //if (ds.Tables[0].Rows.Count <= 0) //{ - //oCN.RollBack(); + //oCN.RollBack(); // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "褰撳墠鍗曟嵁鏃犱骇閲忔眹鎶ヨ褰曪紒"; // objJsonResult.data = null; // return objJsonResult; //} - + WebS.ClsSc_ICMOReportBillMain model = new WebS.ClsSc_ICMOReportBillMain(); model.HInterID = HInterID; model.HBillNo = ScMaxWork; @@ -1148,9 +1167,9 @@ //model.HPRDORGID = DBUtility.ClsPub.isLong(ds0.Tables[0].Rows[0]["HPRDORGID"]); model.HMainSourceInterID = HICMOInterID; model.HMainSourceEntryID = HICMOEntryID; - + //oWebs.Timeout = 30000; - bool flag=oWebs.set_SaveICMOProductReportBill_Layui(model,workcode,HSourceID, sHSourceType, ref DBUtility.ClsPub.sErrInfo); + bool flag = oWebs.set_SaveICMOProductReportBill_Layui(model, workcode, HSourceID, sHSourceType, ref DBUtility.ClsPub.sErrInfo); if (flag) { //oCN.Commit(); @@ -1160,12 +1179,12 @@ objJsonResult.data = 1; return objJsonResult; } - else + else { //oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "淇濆瓨澶辫触锛�"+ flag+ ";"+ DBUtility.ClsPub.sErrInfo; + objJsonResult.Message = "淇濆瓨澶辫触锛�" + flag + ";" + DBUtility.ClsPub.sErrInfo; objJsonResult.data = null; return objJsonResult; } @@ -1184,6 +1203,6 @@ - + } } diff --git a/WebAPI/DLL/ClsSc_MESBeginWorkBill.cs b/WebAPI/DLL/ClsSc_MESBeginWorkBill.cs index a45d9db..6e1cf5f 100644 --- a/WebAPI/DLL/ClsSc_MESBeginWorkBill.cs +++ b/WebAPI/DLL/ClsSc_MESBeginWorkBill.cs @@ -163,7 +163,7 @@ ",HProcExchBillNo,HMaterID,HProcID,HICMOQty,HPlanQty,HBeginWorkTime,HSourceID" + ",HSourceInterID_Main,HSourceEntryID_Main,HSourceBillNo_Main,HSourceBillType_Main" + ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" + - ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate" + + ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate,HRunStatus,HSourceBeginQty" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",getdate(),'" + omodel.HMaker+ "',getdate()" + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" + @@ -171,7 +171,7 @@ ",'" + omodel.HProcExchBillNo + "'," + omodel.HMaterID.ToString() + "," + omodel.HProcID.ToString() + "," + omodel.HICMOQty.ToString() + "," + omodel.HPlanQty.ToString() + ",getdate()," + omodel.HSourceID.ToString() + ",'" + omodel.HMainSourceInterID.ToString() + "'," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo.ToString() + "','" + omodel.HMainSourceBillType.ToString() + "'" + ",'" + omodel.HMainSourceInterID.ToString() + "'," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo.ToString() + "','" + omodel.HMainSourceBillType.ToString() + "'" + - "," + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + ",'" + omodel.HBarCode + "','" + omodel.HAddr + "','" + omodel.HBarCodeMaker + "',getdate()" + + "," + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + ",'" + omodel.HBarCode + "','" + omodel.HAddr + "','" + omodel.HBarCodeMaker + "',getdate(),'"+ omodel.HRunStatus + "','"+ omodel.HSourceBeginQty.ToString() + "'" + ") "); //鍐嶆楠岃瘉 淇濆瓨鏄惁 鍚堢悊 diff --git a/WebAPI/Models/ClsSc_MESBeginWorkBillMain.cs b/WebAPI/Models/ClsSc_MESBeginWorkBillMain.cs index 7acc39c..3ebdd91 100644 --- a/WebAPI/Models/ClsSc_MESBeginWorkBillMain.cs +++ b/WebAPI/Models/ClsSc_MESBeginWorkBillMain.cs @@ -31,7 +31,8 @@ public String HBarCodeMaker; public DateTime HBarCodeMakeDate; new public string HMainSourceEntryID; - + public string HRunStatus; + public decimal HSourceBeginQty; //public int HSourceInterID_Main; //public int HSourceEntryID_Main; //public string HSourceBillNo_Main; diff --git "a/WebAPI/Models/\345\205\266\345\256\203/ReciveBill_FastModel.cs" "b/WebAPI/Models/\345\205\266\345\256\203/ReciveBill_FastModel.cs" new file mode 100644 index 0000000..6723b97 --- /dev/null +++ "b/WebAPI/Models/\345\205\266\345\256\203/ReciveBill_FastModel.cs" @@ -0,0 +1,16 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace WebAPI.Models +{ + public class OptionListModel + { + public string field { get; set; } + public string title { get; set; } + public bool sort { get; set; } + public bool hide { get; set; } + + } +} \ No newline at end of file diff --git "a/WebAPI/Models/\345\212\250\346\200\201\345\210\227/OptionListModel.cs" "b/WebAPI/Models/\345\212\250\346\200\201\345\210\227/OptionListModel.cs" index 6723b97..8137209 100644 --- "a/WebAPI/Models/\345\212\250\346\200\201\345\210\227/OptionListModel.cs" +++ "b/WebAPI/Models/\345\212\250\346\200\201\345\210\227/OptionListModel.cs" @@ -5,12 +5,15 @@ namespace WebAPI.Models { - public class OptionListModel + public class ReciveBill_FastModel { - public string field { get; set; } - public string title { get; set; } - public bool sort { get; set; } - public bool hide { get; set; } + public string HInterID { get; set; } + public string HEntryID { get; set; } + public decimal HQty { get; set; } + public decimal HSQty { get; set; } + public string FID { get; set; } + public string FEntryID { get; set; } + } } \ No newline at end of file diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index 0138426..7a9497b 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -580,6 +580,7 @@ <Compile Include="Models\Sc_WorkBillSortBillSub.cs" /> <Compile Include="Models\Sc_WorkDemandPlanBillMain.cs" /> <Compile Include="Models\Sc_WorkDemandPlanBillSub.cs" /> + <Compile Include="Models\鍏跺畠\ReciveBill_FastModel.cs" /> <Compile Include="Models\鍔ㄦ�佸垪\OptionListModel.cs" /> <Compile Include="Models\鍩虹璧勬枡\Gy_ClassTimePrj.cs" /> <Compile Include="Models\宸ヨ祫绠$悊\ClsGy_ClassTimePrj_Model.cs" /> -- Gitblit v1.9.1