PosMachinesTwoUtil.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using Library;
  2. using MySystem.Models.Main;
  3. using MySystem.Service.Main;
  4. using System;
  5. using System.Collections.Generic;
  6. namespace MySystem
  7. {
  8. /// <summary>
  9. /// 机具库工具类
  10. /// </summary>
  11. public class PosMachinesTwoUtil
  12. {
  13. #region 修改机具信息(仓库出货)
  14. /// <summary>
  15. /// 修改机具信息(仓库出货)
  16. /// </summary>
  17. /// <param name="PosId">机具Id</param>
  18. /// <param name="OrderId">订单Id</param>
  19. /// <param name="BuyUserId">购买创客Id</param>
  20. /// <param name="UserId">所属创客Id</param>
  21. /// <param name="TransferTime">划拨时间</param>
  22. /// <param name="RecycEndDate">循环截止时间</param>
  23. /// <param name="PosSnType">机具类型</param>
  24. /// <param name="LeaderUserId">盟主创客Id</param>
  25. public static void EditPosInfo(int PosId, int OrderId, int BuyUserId, int UserId, DateTime? TransferTime, DateTime? RecycEndDate, int PosSnType, int LeaderUserId)
  26. {
  27. Dictionary<string, object> posData = new Dictionary<string, object>();
  28. posData.Add("OrderId", OrderId);
  29. posData.Add("BuyUserId", BuyUserId);
  30. posData.Add("UserId", UserId);
  31. posData.Add("TransferTime", TransferTime);
  32. posData.Add("RecycEndDate", RecycEndDate);
  33. posData.Add("PosSnType", PosSnType);
  34. posData.Add("LeaderUserId", LeaderUserId);
  35. PosMachinesTwoService.Edit(posData, PosId);
  36. }
  37. #endregion
  38. #region 赋值机具预发机所属人信息
  39. /// <summary>
  40. /// 赋值机具预发机所属人信息
  41. /// </summary>
  42. /// <param name="SnId">机具Id</param>
  43. /// <param name="PreUserId">预发机所属人</param>
  44. public static void SetPosMachinesTwoValue(int SnId, int PreUserId)
  45. {
  46. PosMachinesTwo pos = new PosMachinesTwo();
  47. pos.Id = SnId;
  48. pos.PreUserId = PreUserId; //预发机所属人
  49. PreSendStockDetailUtil.LPos.Add(pos);
  50. }
  51. #endregion
  52. #region 修改机具预发机所属人标记
  53. /// <summary>
  54. /// 修改机具预发机所属人标记
  55. /// </summary>
  56. public static void EditPosPreUserIdValue(List<PosMachinesTwo> LPos)
  57. {
  58. foreach (var item in LPos)
  59. {
  60. Dictionary<string, object> query = new Dictionary<string, object>();
  61. query.Add("PreUserId", item.PreUserId); //预发机所属人
  62. PreSendStockDetailService.Edit(query,item.Id);
  63. }
  64. }
  65. #endregion
  66. }
  67. }