| | |
| | | public string SeOrderBillNo;//(éå®è®¢åå·) |
| | | } |
| | | |
| | | //æ¡ç æç»æ¥è¯¢ åå¨è¿ç¨ æ°æ®ç±» |
| | | public class BarCodeDetail |
| | | { |
| | | public BarCodeDetail() |
| | | { |
| | | |
| | | } |
| | | public int HInterID; |
| | | public string HBillType; |
| | | public string HBillNo; |
| | | } |
| | | |
| | | |
| | | #region åºå
¥åºè®°å½æ¥è¯¢ |
| | | [Route("Kf_ICStockInOutBill/StockInOutBillList")] |
| | | [HttpGet] |
| | |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region åºå
¥åºåæ®æ¡ç æç»æ¥è¯¢ |
| | | [Route("Kf_ICStockInOutBill/Kf_BarCodeDetailQuery")] |
| | | [HttpGet] |
| | | public object Kf_BarCodeDetailQuery(string sWhere) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | try |
| | | { |
| | | //var data = JsonConvert.DeserializeObject<BarCodeDetail>(sWhere); |
| | | //sWhere = "12727077,'1207','DB00000475'"; |
| | | ds = oCN.RunProcReturn("exec h_p_Kf_BarCodeDetailQuery "+sWhere, "h_p_Kf_BarCodeDetailQuery"); |
| | | |
| | | 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.Tables[0].Rows.Count > 0) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = ds.Tables[0].Rows.Count; |
| | | objJsonResult.Message = "è·åèµæºç»å®æ°æ®æåï¼"; |
| | | objJsonResult.data = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(ds.Tables[0], new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-dd HH:mm:ss" })); //åºååDataSetä¸çæ¶é´æ ¼å¼ï¼ç¶ååååºåå忥 |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "ææ èµæºç»å®ï¼"; |
| | | // objJsonResult.data = null; |
| | | // objJsonResult.list = columnNameList; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region æ¡ç åºå
¥åºç¼å |
| | | #region æ¡ç åºå
¥åºç¼åå表 |
| | | [Route("Kf_ICStockInOutBill/GetPonderationBillMain_Temp")] |
| | | [HttpGet] |
| | | public object GetPonderationBillMain_Temp(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_BarCodeBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DataSet ds = new DataSet(); |
| | | string sql1 = string.Format(@"select * from h_v_KF_PonderationBillMain_Temp2 where 1=1 "); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds= oCN.RunProcReturn(sql1 + "order by HInterID desc", "h_v_KF_PonderationBillMain_Temp2"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + "order by HInterID desc", "h_v_KF_PonderationBillMain_Temp2"); |
| | | } |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region æ¡ç åºå
¥åºç¼åå é¤ |
| | | [Route("Kf_ICStockInOutBill/DelectPonderationBillMain_TempByID")] |
| | | [HttpGet] |
| | | public object DelectPonderationBillMain_TempByID(string HInterID, string user) |
| | | { |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_BarCodeBillList_Delete", 1, false, 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; |
| | | } |
| | | DataSet ds = new DataSet(); |
| | | DataSet ds1 = new DataSet(); |
| | | ds = oCN.RunProcReturn("select * from KF_PonderationBillMain_Temp where HInterID="+ HInterID, "KF_PonderationBillMain_Temp"); |
| | | if (ds.Tables[0].Rows.Count!=0) |
| | | { |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿å"; |
| | | objJsonResult.data = null; |
| | | oCN.Commit(); |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªæ¾å°"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region æ«ç è®°å½ç¼åå表 |
| | | [Route("Kf_ICStockInOutBill/GetKF_PonderationBillMain_Temp")] |
| | | [HttpGet] |
| | | public object GetKF_PonderationBillMain_Temp(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | DataSet ds = new DataSet(); |
| | | string sql1 = string.Format(@"select * from h_v_KF_PonderationBillList_Query where 1=1 "); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn(sql1 + "order by å¶åæ¥æ desc", "h_v_KF_PonderationBillList_Query"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + "order by å¶åæ¥æ desc", "h_v_KF_PonderationBillList_Query"); |
| | | } |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |