| | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | //WebAPIController.Add_Log("éè´§å䏿¨", UserName, "çæéè´§å"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | |
| | | return Result_Ob; |
| | | } |
| | | |
| | | |
| | | #region ä½ä¸æå¯¼ä¹¦ç¼è¾ |
| | | |
| | | [Route("Gy_SOPBill/GetGy_SOPEdit")] |
| | | [HttpGet] |
| | | public object GetSB_EquipICMOTechParamBill_Json(Int64 HInterID, string HMaker) |
| | | { |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_SOPBill_Edit", 3, false, HMaker)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¨æ²¡æè¯¥æ¨¡åç¼è¾æé,请ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //è¿ååè¡¨ä¿¡æ¯ |
| | | ds = oCN.RunProcReturn("exec h_p_Gy_SOPBill_Edit " + HInterID, "h_p_Gy_SOPBill_Edit"); |
| | | 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]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¿åä½ä¸æå¯¼ä¹¦ä¿¡æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åæ®å·æ¥æ¾ä¸ä¼ æä»¶å表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | [Route("Gy_SOPBill/GetFilelist")] |
| | | [HttpGet] |
| | | public object GetFilelist(string HBillNo,string HInterID) |
| | | { |
| | | string Ret = ""; |
| | | var url = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "æå·æ¯è«å°") |
| | | { |
| | | url = "D:/ç½ç«åå¸/MES/MESæµè¯/LAYUI/Files/SOP/" + HBillNo + "/" ; |
| | | } |
| | | else |
| | | { |
| | | url = "/files/SOP/" + HBillNo + "/"; |
| | | } |
| | | } |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select *,'" + url + "'+CAST(HFileName as varchar(200))as url from Gy_SOPBillSub2 where HInterID='" + HInterID + "'", "Gy_SOPBillSub2"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®IDï¼å 餿件 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | [Route("Gy_SOPBillEditController/DeleteFile")] |
| | | [HttpGet] |
| | | public object DeleteFile(string HFileID, string HPath) |
| | | { |
| | | try |
| | | { |
| | | // å 餿°æ®åºè®°å½ |
| | | oCN.RunProc("delete from Gy_SOPBillSub2 where HItemID =" + HFileID); |
| | | |
| | | //File.Delete(HPath); //å 餿宿件 |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |