| | |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | |
| | | |
| | | #region åºç¡èµæ |
| | | |
| | | #region ä»åºèµæ |
| | | |
| | | //æ ¹æ®ä»åºIDãç»ç»IDï¼è¿åä»åºä¿¡æ¯ |
| | | public Model.ClsGy_Warehouse_Model GetWhInfoByIDandOrg(long sHWhID, long HUSEORGID, ref string sErr) |
| | | { |
| | | DAL.ClsIF_Warehouse_View dal = new DAL.ClsIF_Warehouse_View(); |
| | | if (dal.GetInfoByIDandOrgID(sHWhID, HUSEORGID)) |
| | | { |
| | | return dal.omodel; |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ä»ä½èµæ |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region å·²ä¸ä¼ æ¥è¯¢çé¢ï¼æ ¹æ®åæ®å·ãæºåå·æ¥è¯¢å·²ä¸ä¼ åæ®ä¿¡æ¯ |
| | | |
| | | /// <summary> |
| | | /// å·²ä¸ä¼ æ¥è¯¢çé¢ï¼æ ¹æ®åæ®å·ãæºåå·æ¥è¯¢å·²ä¸ä¼ åæ®ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetKf_ICStockBillQueryList_Json")] |
| | | [HttpGet] |
| | | public object GetKf_ICStockBillQueryList_Json(string HBillType, string HBillNo, string HSourceBillNo) |
| | | { |
| | | try |
| | | { |
| | | ds = oWebs.GetKf_ICStockBillQueryList(HBillType, HBillNo, HSourceBillNo); |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢ä¸å°è¯¥åæ®è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·ååæ®ä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åå·²ä¸ä¼ åæ®ä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region å·²ä¸ä¼ å表çé¢ï¼æ¤éåè½ï¼å é¤WMSè¡¨åæ¬å°åºå
¥åºåè®°å½ï¼å¹¶æ´æ°TEMP表ä¸çä¸ä¼ åæ®µ HRelationInterID=0 |
| | | |
| | | /// <summary> |
| | | /// å·²ä¸ä¼ å表çé¢ï¼æ¤éåè½ï¼å é¤WMSè¡¨åæ¬å°åºå
¥åºåè®°å½ï¼å¹¶æ´æ°TEMP表ä¸çä¸ä¼ åæ®µ HRelationInterID=0 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/DeleteICStockBillAndWMS_Json")] |
| | | [HttpGet] |
| | | public object DeleteICStockBillAndWMS_Json(Int64 HInterID, string HBillNo, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.DeleteICStockBillAndWMS(HInterID, HBillNo, HBillType, 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 |
| | | |
| | | |
| | | #region å 餿¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | |
| | | /// <summary> |
| | | /// æ«ç 模åï¼å é¤éä¸è¡æ¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json")] |
| | | [HttpGet] |
| | | public object set_DelPonderationBillMain_Temp_InterIDAndSource_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.set_DelPonderationBillMain_Temp_InterIDAndSource(HInterID, HMaterID, HAuxPropID, HMTONo, HSourceInterID, HSourceEntryID, HBillType, 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; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ®ID,å 餿¡ç åºå
¥åºä¸´æ¶è¡¨è®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/DeleteBillList_Json")] |
| | | [HttpGet] |
| | | public object DeleteBillList_Json(long HInterID) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.DeleteBillList(HInterID, 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 |
| | | |
| | | |
| | | #region å é¤å
è¿å
åºä¸´æ¶è¡¨ï¼æ´æ° HlineStatus =1ï¼ |
| | | |
| | | /// <summary> |
| | | /// å é¤å
è¿å
åºä¸´æ¶è¡¨ï¼æ´æ° HlineStatus =1ï¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/set_DelPonderationBillMain_Temp_FIFO_Json")] |
| | | [HttpGet] |
| | | public object set_DelPonderationBillMain_Temp_FIFO_Json(long HInterID, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | if (oWebs.set_DelPonderationBillMain_Temp_FIFO(HInterID, HBillType, 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 = "æ´æ°å
è¿å
åºä¸´æ¶è¡¨HlineStatuså¼å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region æäº¤çåå¤çæ¹æ³ |
| | |
| | | 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_SaveMateReplenishOutBill_BillCheck_Json")] |
| | | [HttpPost] |
| | | public object set_SaveMateReplenishOutBill_BillCheck_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | |
| | | try |
| | | { |
| | | List<Model.ClsKf_MateReplenishOutBillMain> lsmain = new List<Model.ClsKf_MateReplenishOutBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getMateReplenishOutBillMainByJson(msg1); |
| | | |
| | | WebAPI.WebS.ClsKf_MateReplenishOutBillMain websLsmain = new WebS.ClsKf_MateReplenishOutBillMain(); |
| | | |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = "1254"; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | |
| | | if (oWebs.set_SaveMateReplenishOutBill_BillCheck(websLsmain, 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 |
| | | |
| | | #region å
¶ä»åºåº æ«ææºåæ¡ç |
| | | |
| | | /// <summary> |
| | | /// å
¶ä»åºåº æ«ææºåæ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/get_SourceBarCode_OtherOut_Json")] |
| | | [HttpGet] |
| | | public object get_SourceBarCode_OtherOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBarCode_OtherOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HOWNERID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææºåæ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ç´æ¥è°æ¨ æ«ææºåæ¡ç |
| | | |
| | | /// <summary> |
| | | /// ç´æ¥è°æ¨ æ«ææºåæ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/get_SourceBarCode_MoveStock_Json")] |
| | | [HttpGet] |
| | | public object get_SourceBarCode_MoveStock_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HOWNERID) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBarCode_MoveStock(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HOWNERID, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | 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> |
| | | /// ç©ææ¡ç ææ¬æ¡ æ«ç è°ç¨ |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region ç©ææ¡ç å¤çæ¹æ³ è°æ¨æ¨¡å |
| | | |
| | | /// <summary> |
| | | /// ç©ææ¡ç ææ¬æ¡ æ«ç è°ç¨ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/get_BarCode_MoveStock_Json")] |
| | | [HttpGet] |
| | | public Object get_BarCode_MoveStock_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockInOrgID, Int64 HStockOutOrgID, string HScanStyle) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_BarCode_MoveStock(sBarCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æå"; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«ææ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region åæ®æ°å¢æ¨¡å è·ååæ®å表信æ¯å¤çæ¹æ³ |
| | | |
| | |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetBillEntryTmpList_Json")] |
| | | [HttpGet] |
| | | public object GetBillEntryTmpList(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID, string sMouldManagerCtl, string sFIFOCtl) |
| | | public object GetBillEntryTmpList(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | string sSimpleMode = "N"; //æ¯å¦å¯ç¨æ«ç ç®ææ¨¡å¼ï¼åªæ¾ç¤ºå·²æ«ç æºåè®°å½(Y,N) |
| | | string sReturn = ""; |
| | | |
| | | //è·åç³»ç»åæ° |
| | | if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sReturn) == true) |
| | | { |
| | | //夿æ¯å¦å¯ç¨å¨å
·ç®¡ç(Y,N) |
| | | if (oSystemParameter.omodel.WMS_MouldManagerCtl == "Y") //å¯ç¨æ¨¡æ²»å
·ç®¡ç |
| | | { |
| | | sMouldManagerCtl = "Y"; |
| | | } |
| | | |
| | | //夿æ¯å¦å¯ç¨å
è¿å
åºç®¡ç(Y,N)ï¼æ¯å¦å¯ç¨æ«ç ç®ææ¨¡å¼ï¼åªæ¾ç¤ºå·²æ«ç æºåè®°å½(Y,N) |
| | | if (HBillType == "1204") //çäº§é¢æå |
| | | { |
| | | if (oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MateOutBill_FIFOList == "Y") //çäº§é¢æå-å
è¿å
åºæ§å¶ |
| | | { |
| | | sFIFOCtl = "Y"; |
| | | } |
| | | if (oSystemParameter.omodel.Kf_MateOutBill_SimpleMode == "Y") //çäº§é¢æå-æ«ç ç®ææ¨¡å¼ |
| | | { |
| | | sSimpleMode = "Y"; |
| | | } |
| | | } |
| | | else if (HBillType == "1205" && (oSystemParameter.omodel.Kf_SellOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_SellOutBill_FIFOList == "Y")) //éå®åºåºå-å
è¿å
åºæ§å¶ |
| | | { |
| | | sFIFOCtl = "Y"; |
| | | } |
| | | else if (HBillType == "1211" && (oSystemParameter.omodel.Kf_EntrustOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_EntrustOutBill_FIFOList == "Y")) //å§å¤åºåºå-å
è¿å
åºæ§å¶ |
| | | { |
| | | sFIFOCtl = "Y"; |
| | | } |
| | | else if (HBillType == "1207" && (oSystemParameter.omodel.Kf_MoveStockBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MoveStockBill_FIFOList == "Y")) //ç´æ¥è°æ¨å-å
è¿å
åºæ§å¶ |
| | | { |
| | | sFIFOCtl = "Y"; |
| | | } |
| | | else if (HBillType == "1250" && (oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOCtl == "Y" || oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOList == "Y")) //忥å¼è°åºå-å
è¿å
åºæ§å¶ |
| | | { |
| | | sFIFOCtl = "Y"; |
| | | } |
| | | |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_WMS_BillEntryTmpList_LayUI " + HInterID.ToString() + ",'" + HBillType + "','" + sMouldManagerCtl + "','" + sFIFOCtl + "','" + sSimpleMode + "'", "h_p_WMS_BillEntryTmpList_LayUI"); |
| | | |
| | | string sMouldManagerCtl = "N"; //æ¯å¦å¯ç¨å¨å
·ç®¡ç |
| | | string sFIFOCtl = "N"; //æ¯å¦å¯ç¨å
è¿å
åºç®¡ç |
| | | ds = oWebs.GetBillEntryTmpList(HInterID, HBillNo, HBillType, HStockOrgID, ref sMouldManagerCtl, ref sFIFOCtl, ref DBUtility.ClsPub.sErrInfo); |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.data = new |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·ï¼" + HBillNo + "ï¼åæ®IDï¼" + HInterID + "ï¼è¿åç©ææç»å表æ¶è·åç³»ç»åæ°å¤±è´¥ï¼ " + sReturn; |
| | | objJsonResult.data = null; |
| | | Materlist = ds.Tables[0], //è¿åç©ææç»å表信æ¯ï¼0ï¼ |
| | | Mouldlist = ds.Tables[1], //è¿å模治å
·å表信æ¯ï¼1ï¼ |
| | | FIFOlist = ds.Tables[2], //è¿åå
è¿å
åºå表信æ¯ï¼2ï¼ |
| | | BarCodelist = ds.Tables[3], //è¿åæ¡ç æç»å表信æ¯ï¼3ï¼ |
| | | ICMOReportlist = ds.Tables[4], //è¿åæºåçäº§æ±æ¥åæ¡ç æç»å表信æ¯ï¼4ï¼ |
| | | BarCodeDetailslist = ds.Tables[5] //è¿åå½åææ«ææ¡ç æç»ä¿¡æ¯ï¼5ï¼ |
| | | }; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region å¤çæ¹æ³ |
| | | #region è¿ååæ®åè¡¨ä¿¡æ¯ |
| | | |
| | | /// <summary> |
| | | /// è¿ååæ®åè¡¨ä¿¡æ¯ æ ¡éªæ¨¡å¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetKf_PonderationBillMain_Temp_BillCheck_Json")] |
| | | [HttpGet] |
| | | public object GetKf_PonderationBillMain_Temp_BillCheck_Json(long HInterID, string HBillType, string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oWebs.GetKf_PonderationBillMain_Temp_BillCheck(HInterID, HBillType, sWhere); |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åå表信æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region è¿åç¼ååè¡¨ä¿¡æ¯ |
| | | |
| | | /// <summary> |
| | | /// è¿åç¼ååè¡¨ä¿¡æ¯ æ ¡éªæ¨¡å¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("WEBSController/GetKf_PonderationBillMain_TempList_BillCheck_Json")] |
| | | [HttpGet] |
| | | public object GetKf_PonderationBillMain_TempList_BillCheck_Json(string HBillType, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oWebs.GetKf_PonderationBillMain_TempList_BillCheck(HBillType, HMaker, HStockOrgID); |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æ ç¼åè®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åç¼åä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åç¼åå表信æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |