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.

32 lines
946 B

3 years ago
  1. using Aborlen.Model;
  2. using SqlSugar;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using WorkStationBase;
  9. namespace Aborlen.WorkStation
  10. {
  11. public partial class WorkStation09 : StationBase
  12. {
  13. public override void StationInit()
  14. {
  15. int tuopanId = Convert.ToInt32(Read(2180));
  16. //查询订单(根据质量数据查询)
  17. var datas = Deploy_Data.Query().Where(p => p.process_state < 4 && p.tuopan_id == tuopanId).OrderBy(p => p.Id, OrderByType.Desc);
  18. if (datas.Count() > 0)
  19. {
  20. PresentOrder = ProductOrder.Query().Where(p => p.plan_id == datas.First().plan_id).OrderBy(p => p.id, OrderByType.Desc).First();
  21. }
  22. else
  23. {
  24. PresentOrder = ProductOrder.Query().OrderBy(p => p.id, OrderByType.Desc).First();
  25. }
  26. }
  27. }
  28. }