首检添加数据看板
This commit is contained in:
@@ -1,11 +1,4 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Model;
|
||||
using ZR.Model.MES.mm;
|
||||
using ZR.Model.MES.mm;
|
||||
using ZR.Model.MES.mm.Dto;
|
||||
using ZR.Model.MES.pro;
|
||||
|
||||
@@ -26,7 +19,7 @@ namespace ZR.Service.mes.mm.IService
|
||||
|
||||
string[] Getfabgopoints();
|
||||
|
||||
string AGV_schedule(string start_point, string end_point,string agvCode);
|
||||
string AGV_schedule(string start_point, string end_point, string agvCode);
|
||||
string EmergencyStopAgv(string reqCode);
|
||||
|
||||
int FinishBatchingTask(string start_point, string end_point, string taskId);
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using ZR.Model;
|
||||
using ZR.Model.Dto;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using ZR.Model.MES.mm;
|
||||
|
||||
namespace ZR.Service.mes.mm.IService
|
||||
@@ -20,11 +17,11 @@ namespace ZR.Service.mes.mm.IService
|
||||
|
||||
int UpdateMmAgvLocation(MmAgvLocation parm);
|
||||
|
||||
List<(int,string)> ListAreaOptions();
|
||||
List<(int, string)> ListAreaOptions();
|
||||
|
||||
int Updatestatus(int index, int status);
|
||||
|
||||
AGVstatus CallagvStatus(int agvCode);
|
||||
AGVstatus CallagvStatus(int agvCode);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ZR.Service.mes.mm.IService
|
||||
namespace ZR.Service.mes.mm.IService
|
||||
{
|
||||
public interface IMmFinishedwarehouseService
|
||||
{
|
||||
string[] Finish_point();
|
||||
string[] Finish_point_pack();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,15 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Model.MES.op.ZR.Model.mes.md;
|
||||
using ZR.Service.MES.op.IService;
|
||||
using ZR.Service;
|
||||
using ZR.Service.mes.mm.IService;
|
||||
|
||||
using ZR.Model.MES.mm;
|
||||
using ZR.Model.MES.pro;
|
||||
using System.Globalization;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
using ZR.Model.MES.mm.Dto;
|
||||
using Infrastructure;
|
||||
using Infrastructure.Attribute;
|
||||
using SqlSugar;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using ZR.Model;
|
||||
using ZR.Model.MES.wms;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using Infrastructure;
|
||||
using ZR.Repository;
|
||||
using System.Numerics;
|
||||
using ZR.Model.mes.pro;
|
||||
using ZR.Model.MES.mm;
|
||||
using ZR.Model.MES.mm.Dto;
|
||||
using ZR.Model.MES.pro;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Service.mes.mm.IService;
|
||||
|
||||
namespace ZR.Service.mes.mm
|
||||
{
|
||||
@@ -80,7 +66,7 @@ namespace ZR.Service.mes.mm
|
||||
/// <returns></returns>
|
||||
public (List<ProWorkorder_v2>, int) Getworkorderlist(WorkorderqueryDto query)
|
||||
{
|
||||
|
||||
|
||||
DateTime datetimespan = new DateTime(query.datetimespan.Year, query.datetimespan.Month, query.datetimespan.Day, 0, 0, 0);
|
||||
|
||||
// 获取年份和周数
|
||||
@@ -91,7 +77,7 @@ namespace ZR.Service.mes.mm
|
||||
// 获取这一周中的第几天
|
||||
DayOfWeek dayOfWeek = datetimespan.DayOfWeek;
|
||||
int dayOfWeekNumber = (int)dayOfWeek; // 将 DayOfWeek 枚举转换为从 1 开始的数字
|
||||
Console.WriteLine("<-获取工单列表-> "+ year+"年"+week+"周"+ dayOfWeekNumber+"日");
|
||||
Console.WriteLine("<-获取工单列表-> " + year + "年" + week + "周" + dayOfWeekNumber + "日");
|
||||
logger.Error("<-获取工单列表-> " + year + "年" + week + "周" + dayOfWeekNumber + "日");
|
||||
//todo 已经和正在配料的工单号和毛坯号不能变??????
|
||||
int total = 0;
|
||||
@@ -147,7 +133,7 @@ namespace ZR.Service.mes.mm
|
||||
|
||||
int skip = ((query.pageNum ?? 1) - 1) * (query.pageSize ?? 10);
|
||||
var returndata = WorkorderList
|
||||
.OrderBy(it=>it.Sort)
|
||||
.OrderBy(it => it.Sort)
|
||||
.Skip(skip)
|
||||
.Take(query.pageSize ?? 10)
|
||||
.ToList();
|
||||
@@ -271,7 +257,7 @@ namespace ZR.Service.mes.mm
|
||||
/// <param name="start_point"></param>
|
||||
/// <param name="end_point"></param>
|
||||
/// <returns></returns>
|
||||
public string AGV_schedule(string start_point, string end_point,string agvCode= "1743")
|
||||
public string AGV_schedule(string start_point, string end_point, string agvCode = "1743")
|
||||
{
|
||||
// Context.Updateable<MmAgvLocation>().Where(it => it.Coordinate == start_point).SetColumns(it => it.Status == 0).ExecuteCommand();
|
||||
// Context.Updateable<MmAgvLocation>().Where(it => it.Coordinate == end_point).SetColumns(it => it.Status == 1).ExecuteCommand();
|
||||
@@ -288,7 +274,7 @@ namespace ZR.Service.mes.mm
|
||||
if (end_point == "R1" || start_point == "R1")
|
||||
{
|
||||
task.taskTyp = "KLC";
|
||||
|
||||
|
||||
}
|
||||
|
||||
task.positionCodePath = new List<AGV_location_third>
|
||||
@@ -379,8 +365,8 @@ namespace ZR.Service.mes.mm
|
||||
if (!string.IsNullOrEmpty(task.Blanknumber))
|
||||
{
|
||||
//1 扣除库存
|
||||
Context.Updateable<WmBlankInventory>().SetColumns(it=>it.Quantity== it.Quantity-task.PreviousNumbered)
|
||||
.Where(it=>it.BlankNum==task.Blanknumber).ExecuteCommand();
|
||||
Context.Updateable<WmBlankInventory>().SetColumns(it => it.Quantity == it.Quantity - task.PreviousNumbered)
|
||||
.Where(it => it.BlankNum == task.Blanknumber).ExecuteCommand();
|
||||
//2 增加库存记录
|
||||
WmBlankRecord res = new WmBlankRecord();
|
||||
res.Id = SnowFlakeSingle.Instance.NextId().ToString();
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
using System;
|
||||
using SqlSugar;
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Extensions;
|
||||
using SqlSugar;
|
||||
using System.Linq;
|
||||
using ZR.Model;
|
||||
using ZR.Model.Dto;
|
||||
|
||||
using ZR.Repository;
|
||||
|
||||
using System.Linq;
|
||||
using ZR.Model.MES.mm;
|
||||
using ZR.Repository;
|
||||
using ZR.Service.mes.mm.IService;
|
||||
|
||||
namespace ZR.Service.Business
|
||||
@@ -27,7 +23,7 @@ namespace ZR.Service.Business
|
||||
public PagedInfo<MmAgvLocationDto> GetList(MmAgvLocationQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<MmAgvLocation>()
|
||||
.AndIF(parm.areaCode!=0,it=>it.AreaCode==parm.areaCode);
|
||||
.AndIF(parm.areaCode != 0, it => it.AreaCode == parm.areaCode);
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
@@ -89,7 +85,7 @@ namespace ZR.Service.Business
|
||||
/// 获取地域选择
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<(int, string)> ListAreaOptions()
|
||||
public List<(int, string)> ListAreaOptions()
|
||||
{
|
||||
// 使用 LINQ 查询获取结果
|
||||
var queryResult = Context.Queryable<MmAgvLocation>()
|
||||
@@ -118,7 +114,7 @@ namespace ZR.Service.Business
|
||||
/// <returns></returns>
|
||||
public int Updatestatus(int index, int status)
|
||||
{
|
||||
return Context.Updateable<MmAgvLocation>().Where(it=>it.Id==index).SetColumns(it=>it.Status==status).ExecuteCommand();
|
||||
return Context.Updateable<MmAgvLocation>().Where(it => it.Id == index).SetColumns(it => it.Status == status).ExecuteCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ZR.Model.MES.mm;
|
||||
using ZR.Service.mes.mm.IService;
|
||||
|
||||
@@ -19,7 +13,7 @@ namespace ZR.Service.mes.mm
|
||||
public string[] Finish_point()
|
||||
{
|
||||
List<MmAgvLocation> positions = Context.Queryable<MmAgvLocation>()
|
||||
.Where(it => it.AreaCode == 4|| it.AreaCode == 5|| it.AreaCode == 8)
|
||||
.Where(it => it.AreaCode == 4 || it.AreaCode == 5 || it.AreaCode == 8)
|
||||
.ToList();
|
||||
|
||||
string[] cors = new string[positions.Count];
|
||||
|
||||
Reference in New Issue
Block a user