ComMscRJgBLL.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using Core.Mes.Client.Comm.Format;
  2. using Core.Mes.Client.Comm.Server;
  3. using Core.Mes.Client.Comm.Tool;
  4. using Core.StlMes.Client.Qcm.model;
  5. using CoreFS.CA06;
  6. using System.Collections;
  7. using System.Collections.Generic;
  8. namespace Core.StlMes.Client.Qcm.BLL
  9. {
  10. public class ComMscRJgBLL
  11. {
  12. private OpeBase ob;
  13. public ComMscRJgBLL(OpeBase ob)
  14. {
  15. this.ob = ob;
  16. }
  17. public List<ComMscRJgEntity> GetMscRJgBySpec(string ordLnPk)
  18. {
  19. return EntityHelper.GetData<ComMscRJgEntity>("com.steering.pss.qcm.DAL.ComMscRJgDAL.getMscRJgBySpec",
  20. new object[] { ordLnPk }, ob);
  21. }
  22. /// <summary>
  23. /// 插入到质量设计接箍和冶金关系表
  24. /// </summary>
  25. /// <param name="mscRJgList"></param>
  26. public void InsertDesignMscRJg(List<SlmOrdDesignMscJgEntity> mscRJgList, string ordLnPk, bool isCraft)
  27. {
  28. ArrayList list = new ArrayList();
  29. foreach (SlmOrdDesignMscJgEntity mscRJgEntity in mscRJgList)
  30. {
  31. list.Add(JSONFormat.Format(mscRJgEntity));
  32. }
  33. ServerHelper.SetData("com.steering.pss.qcm.DAL.ComMscRJgDAL.insertDesignMscRJg",
  34. new object[] { list, ordLnPk, isCraft.ToString() }, ob);
  35. }
  36. /// <summary>
  37. /// 通过合同行主键查询设定接箍
  38. /// </summary>
  39. /// <param name="ordLnPk"></param>
  40. /// <returns></returns>
  41. public SlmOrdDesignMscJgEntity GetKeyJgByOrdLnPk(string ordLnPk, bool isCraft)
  42. {
  43. List<SlmOrdDesignMscJgEntity> designMscJgList = EntityHelper.GetData<SlmOrdDesignMscJgEntity>(
  44. "com.steering.pss.qcm.DAL.ComMscRJgDAL.getKeyJgByOrdLnPk",
  45. new object[] { ordLnPk, isCraft.ToString() }, ob);
  46. if (designMscJgList.Count > 0)
  47. {
  48. return designMscJgList[0];
  49. }
  50. else
  51. {
  52. return null;
  53. }
  54. }
  55. }
  56. }