You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
3.4 KiB

1 year ago
1 year ago
  1. using Newtonsoft.Json.Linq;
  2. using Newtonsoft.Json;
  3. using NFine.Application.WMS;
  4. using NFine.Code;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Configuration;
  8. using System.Data;
  9. using System.Linq;
  10. using System.Web;
  11. using System.Web.Mvc;
  12. using NFine.Application.OMAY;
  13. namespace NFine.Web.Areas.OMAY.Controllers
  14. {
  15. public class ICSInvCodeHCController : ControllerBase
  16. {
  17. ICSInvCodeHCApp App = new ICSInvCodeHCApp();
  18. // GET: OMAY/ICSInvCodeHC
  19. public ActionResult Index()
  20. {
  21. return View();
  22. }
  23. //包装容器关联条码
  24. public ActionResult GetSendContainerLot(Pagination pagination, string queryJson)
  25. {
  26. DataTable ListData = App.GetSendContainerLot(ref pagination, queryJson);
  27. var JsonData = new
  28. {
  29. total = pagination.total,
  30. page = pagination.page,
  31. records = pagination.records,
  32. rows = ListData,
  33. };
  34. return Content(JsonData.ToJson());
  35. }
  36. //副产品调用接口来显示本次可生产数量
  37. [HttpGet]
  38. [HandlerAjaxOnly]
  39. public ActionResult GetLotInfo(string keyValue)
  40. {
  41. var rows = App.GetLotInfo(keyValue);
  42. return Content(rows.ToJson());
  43. }
  44. [HttpGet]
  45. [HandlerAjaxOnly]
  46. public ActionResult GetLotLocationCode( string keySendLocationCode)
  47. {
  48. var rows = App.GetLotLocationCode( keySendLocationCode);
  49. return Content(rows.ToJson());
  50. }
  51. [HttpPost]
  52. [HandlerAjaxOnly]
  53. public ActionResult BindingICSInvCodeHC(string ICSASN)
  54. {
  55. string msg = App.BindingICSInvCodeHC(ICSASN);
  56. if (!string.IsNullOrEmpty(msg))
  57. {
  58. return Error(msg);
  59. }
  60. else
  61. {
  62. return Success("回仓成功!");
  63. }
  64. }
  65. /// <summary>
  66. /// 获取库位条码信息调接口
  67. /// </summary>
  68. /// <param name="id"></param>
  69. /// <returns></returns>
  70. //public ActionResult GetLocationAndBarCodeInformation(int id)
  71. //{
  72. // string json = JsonConvert.SerializeObject(list);
  73. // string msg = "";
  74. // string APIURL = ConfigurationManager.ConnectionStrings["ERPAPIURL"].ConnectionString + "BarCodeInformation/Get";
  75. // string result = DeciliterApp.HttpPost(APIURL, json);
  76. // JObject Obj = (JObject)JsonConvert.DeserializeObject(result);//或者JObject jo = JObject.Parse(jsonText);
  77. // string MessAge = Obj["Message"].ToString();
  78. // string Success = Obj["Success"].ToString();
  79. // if (Success.ToUpper() == "FALSE")
  80. // {
  81. // throw new Exception(MessAge);
  82. // }
  83. // string Data = Obj["Data"].ToString();
  84. // if (string.IsNullOrWhiteSpace(Data))
  85. // {
  86. // throw new Exception("获取现存量失败!");
  87. // }
  88. // var dataSet = JsonConvert.DeserializeObject<DataSet>(Data);
  89. // DataTable dt = dataSet.Tables[0];
  90. // var JsonData = new
  91. // {
  92. // Flag = true,
  93. // msg = msg,
  94. // FileName = FileName,
  95. // PathName = PathName,
  96. // Type = Type,
  97. // };
  98. // return Content(JsonData.ToJson());
  99. //}
  100. }
  101. }