| | |
| | | { |
| | | //sCloudModeï¼ç³»ç»åæ° æ¯å¦ä¸ºç§æäºæ¨¡å¼(N为å
¬æäºæ¨¡å¼ï¼Yä¸ºç§æäºæ¨¡å¼)ï¼ |
| | | //sERPModeï¼ç³»ç»åæ° åºåæ§å¶-WMSåºåæ§å¶ERPæ¨¡å¼ (WISEãCLOUDãMES)ï¼ |
| | | //sHTypeï¼å¼ 1 对åºç¼åå表å é¤ï¼å¼ 2 对åºå·²ä¸ä¼ æ¤éï¼ |
| | | //sHTypeï¼å¼ 1 对åºç¼åå表å é¤ï¼å¼ 2 对åºå·²ä¸ä¼ æ¤éï¼å¼ 3 å¯¹åºæ ¡éªæ¨¡åå·²ä¸ä¼ æ¤éï¼ |
| | | |
| | | //å
¬æäºæ¨¡å¼ |
| | | if (sCloudMode == "N") |
| | |
| | | else if (HBillType == "1203") |
| | | { |
| | | sFormId = "STK_MISCELLANEOUS"; |
| | | } |
| | | //åæå å·¥å
¥åºå |
| | | else if (HBillType == "1212") |
| | | { |
| | | sFormId = "STK_OEMInStock"; |
| | | } |
| | | //颿åºåºå |
| | | else if (HBillType == "1204") |
| | |
| | | else if (HBillType == "1255") |
| | | { |
| | | sFormId = "SUB_FEEDMTRL"; |
| | | } |
| | | //åæå å·¥åºåºåï¼åæå å·¥éæï¼ |
| | | else if (HBillType == "1213") |
| | | { |
| | | sFormId = "STK_OEMInStockRETURN"; |
| | | } |
| | | //ç´æ¥è°æ¨å |
| | | else if (HBillType == "1207") |
| | |
| | | var sJson = new |
| | | { |
| | | FormId = sFormId, |
| | | FieldKeys = "FBillNo", |
| | | FieldKeys = "FBillNo,FAPPROVERID", |
| | | FilterString = $@"FBillNo='{HBillNo}'", |
| | | OrderString = "", |
| | | TopRowCount = 0, |
| | |
| | | } |
| | | } |
| | | //sHType = 2对åºå·²ä¸ä¼ æ¤é |
| | | else |
| | | else if(sHType == 2) |
| | | { |
| | | //夿è¿åçæ°ç»æ°æ®ä¸æ¯å¦åå¨"false"ï¼åå¨ä»£è¡¨éå
¥çä¸å¡å¯¹è±¡è¡¨åId䏿£ç¡® |
| | | if (_saveObj[0][0].ToString().Contains("false") == true) |
| | |
| | | return false; |
| | | } |
| | | } |
| | | //sHType = 3å¯¹åºæ ¡éªæ¨¡åå·²ä¸ä¼ æ¤é |
| | | else if (sHType == 3) |
| | | { |
| | | //夿è¿åçæ°ç»æ°æ®ä¸æ¯å¦åå¨"false"ï¼åå¨ä»£è¡¨éå
¥çä¸å¡å¯¹è±¡è¡¨åId䏿£ç¡® |
| | | if (_saveObj[0][0].ToString().Contains("false") == true) |
| | | { |
| | | sErrMsg = "æ¤æ¨¡åæä¸æ¯ææ¤éåè½ï¼"; |
| | | return false; |
| | | } |
| | | else if (_saveObj[0][1].ToString() != "0") |
| | | { |
| | | sErrMsg = "æ ¡éªæ¤éåæ®å¤±è´¥ï¼åæ®å·ï¼" + HBillNo + "ï¼éè¶äºéå·²å®¡æ ¸ï¼ä¸å
许æ¤éï¼"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "sHTypeå¼éå
¥é误ï¼"; |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | //ç§æäºæ¨¡å¼ |
| | | else |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_BillQuery " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + sERPMode + "'," + sHType.ToString(), "h_p_WMS_BillQuery"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | //sHType = 3 æ«ç æ ¡éªæ¨¡å |
| | | if (sHType == 3) |
| | | { |
| | | sErrMsg = "åæ®æ¥è¯¢åçé误ï¼"; |
| | | return false; |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_BillQuery_BillCheck " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + sERPMode + "'", "h_p_WMS_BillQuery_BillCheck"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "åæ®æ¥è¯¢åçé误ï¼"; |
| | | return false; |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | //sHType = 1 æ sHType = 2 æ«ç æ°å¢æ¨¡å |
| | | else |
| | | { |
| | | return true; |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_BillQuery " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + sERPMode + "'," + sHType.ToString(), "h_p_WMS_BillQuery"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "åæ®æ¥è¯¢åçé误ï¼"; |
| | | return false; |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | 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_SaveInceptEntInBill_Json")] |
| | | [HttpPost] |
| | | public object set_SaveInceptEntInBill_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getICStockBillMainByJson(msg1); |
| | | WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain(); |
| | | 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.HStockStyle = lsmain[0].HStockStyle; |
| | | websLsmain.HBillSubType = lsmain[0].HBillSubType; |
| | | if (lsmain[0].HMainSourceBillType == "1130") |
| | | { |
| | | 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_SaveInceptEntInBill_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; |
| | | } |
| | |
| | | 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_SaveInceptEntOutBill_BillCheck_Json")] |
| | | [HttpPost] |
| | | public object set_SaveInceptEntOutBill_BillCheck_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | |
| | | try |
| | | { |
| | | List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getICStockBillMainByJson(msg1); |
| | | WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain(); |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = "1213"; |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; |
| | | |
| | | if (oWebs.set_SaveInceptEntOutBill_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_InceptEntIn_Json")] |
| | | [HttpGet] |
| | | public object get_SourceBarCode_InceptEntIn_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | WebSoBar = oWebs.get_SourceBarCode_InceptEntIn(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HStockOrgID, 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> |
| | |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | } |
| | | //åæå å·¥å
¥åºå |
| | | else if (HBillType == "1212") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_InceptEntInBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | //å
æ«ç©ææ¡ç 模å¼ï¼'Y'ä¸ºä¸æ«ç©ææ¡ç ï¼ |
| | | if (oSystemParameter.omodel.Kf_InceptEntInBillCheck_AutoBarCode.ToUpper() == "Y") |
| | | { |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | } |
| | | //颿åºåºå |
| | | else if (HBillType == "1204") |
| | | { |
| | |
| | | } |
| | | //å
æ«ç©ææ¡ç 模å¼ï¼'Y'ä¸ºä¸æ«ç©ææ¡ç ï¼ |
| | | if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_AutoBarCode.ToUpper() == "Y") |
| | | { |
| | | sAutoBarCode = "Y"; |
| | | } |
| | | } |
| | | //åæå å·¥åºåºå |
| | | else if (HBillType == "1213") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | //å
æ«ç©ææ¡ç 模å¼ï¼'Y'ä¸ºä¸æ«ç©ææ¡ç ï¼ |
| | | if (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_AutoBarCode.ToUpper() == "Y") |
| | | { |
| | | sAutoBarCode = "Y"; |
| | | } |
| | |
| | | { |
| | | sFIFOCtl = "Y"; |
| | | } |
| | | //åæå å·¥åºåºå-å
è¿å
åºæ§å¶ |
| | | if (HBillType == "1213" |
| | | && oSystemParameter.omodel.Kf_InceptEntOutBillCheck_AutoBarCode.ToUpper() == "N" //å
æ«ç©ææ¡ç 模å¼ï¼'Y'ä¸ºä¸æ«ç©ææ¡ç ï¼ |
| | | && oSystemParameter.omodel.Kf_InceptEntOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | && (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_InceptEntOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_InceptEntOutBillCheck_FIFOCtl == "3")) |
| | | { |
| | | sFIFOCtl = "Y"; |
| | | } |
| | | //ç´æ¥è°æ¨å-å
è¿å
åºæ§å¶ |
| | | if (HBillType == "1207" |
| | | && oSystemParameter.omodel.Kf_MoveStockBillCheck_AutoBarCode.ToUpper() == "N" //å
æ«ç©ææ¡ç 模å¼ï¼'Y'ä¸ºä¸æ«ç©ææ¡ç ï¼ |
| | |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //åæå å·¥å
¥åºå |
| | | else if (HBillType == "1212") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_InceptEntInBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //颿åºåºå |
| | | else if (HBillType == "1204") |
| | | { |
| | |
| | | } |
| | | //å
è¿å
åºæ§å¶ |
| | | sFIFOCtl = oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl; |
| | | } |
| | | //åæå å·¥åºåºå |
| | | else if (HBillType == "1213") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | //å
è¿å
åºæ§å¶ |
| | | sFIFOCtl = oSystemParameter.omodel.Kf_InceptEntOutBillCheck_FIFOCtl; |
| | | } |
| | | //ç´æ¥è°æ¨å |
| | | else if (HBillType == "1207") |
| | |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //åæå å·¥å
¥åºå |
| | | else if (HBillType == "1212") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_InceptEntInBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //颿åºåºå |
| | | else if (HBillType == "1204") |
| | | { |
| | |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | | } |
| | | //åæå å·¥åºåºå |
| | | else if (HBillType == "1213") |
| | | { |
| | | //æ ¡éª-æ¯å¦è¿è¡æºåå¯¹åºæ¡ç æ ¸å¯¹ï¼'Y'ä¸ºæ ¸å¯¹ï¼ |
| | | if (oSystemParameter.omodel.Kf_InceptEntOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y") |
| | | { |
| | | sSourceBarCodeCtl = "Y"; |
| | | } |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | //æ¤éå夿éè¶äºä¸åæ®æ¯å¦åå¨ |
| | | if (!GetBillQuery_WMS(HInterID, HBillNo, HBillType, HMaker, oSystemParameter.omodel.WMS_CloudMode, sERPMode, 3, ref sErrMsg)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = sErrMsg; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | try |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region WMSæ¯æ¥è¿è¡ç¶æåæï¼æ¯æ¥å¶åæ°éï¼ |
| | | [Route("WEBSController/GetKf_WMSDailyRunStateReport_Json")] |
| | | [HttpGet] |
| | | public object GetKf_WMSDailyRunStateReport_Json(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | |
| | | Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere); |
| | | |
| | | string HBeginDate = dic["HBeginDate"].ToString(); |
| | | string HEndDate = dic["HEndDate"].ToString(); |
| | | |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCn.RunProcReturn("exec h_p_Kf_WMSDailyRunStateReport '" + HBeginDate + "','" + HEndDate + "'", "h_p_Kf_WMSDailyRunStateReport"); |
| | | |
| | | if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | { |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ°æ®"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Columns.Contains("HBack") && DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "åè") |
| | | { |