查询详情

This commit is contained in:
qianhao.xu 2024-11-18 13:56:59 +08:00
parent 11c5289ed4
commit 43035bfa0a
7 changed files with 184 additions and 15 deletions

View File

@ -20,5 +20,91 @@ namespace DOAN.WebApi.Controllers.MES.BigScreen
{
productBigScreenService = _product2BigScreenService;
}
/// <summary>
/// 数字牌
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle01")]
public IActionResult GetMoudle01()
{
var response = productBigScreenService.GetMoudle01();
return SUCCESS(response);
}
/// <summary>
/// 班组进度统计
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle02")]
public IActionResult GetMoudle02()
{
var response = productBigScreenService.GetMoudle02();
return SUCCESS(response);
}
/// <summary>
/// 昨天 班组报工数 和计划数对比
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle03")]
public IActionResult GetMoudle03()
{
var response = productBigScreenService.GetMoudle03();
return SUCCESS(response);
}
/// <summary>
/// 上周 班组报工数 和计划数对比
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle04")]
public IActionResult GetMoudle04()
{
var response = productBigScreenService.GetMoudle04();
return SUCCESS(response);
}
/// <summary>
/// 今天异常工单
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle05")]
public IActionResult GetMoudle05()
{
var response = productBigScreenService.GetMoudle05();
return SUCCESS(response);
}
/// <summary>
/// 近7天 异常工单占比
/// </summary>
/// <returns></returns>
[HttpGet("getMoudle06")]
public IActionResult GetMoudle06()
{
var response = productBigScreenService.GetMoudle06();
return SUCCESS(response);
}
[HttpGet("getMoudle07")]
public IActionResult GetMoudle07()
{
var response = productBigScreenService.GetMoudle07();
return SUCCESS(response);
}
[HttpGet("getMoudle08")]
public IActionResult GetMoudle08()
{
var response = productBigScreenService.GetMoudle08();
return SUCCESS(response);
}
}
}

View File

@ -37,17 +37,29 @@ namespace DOAN.Admin.WebApi.Controllers
}
//TODO 获取盘点详情
[HttpPost("get_detail")]
public IActionResult GetDetail(string id)
{
if(string.IsNullOrEmpty(id)) throw new CustomException("id is empty");
var response = _mmLinesidebarInventoryCheckService.GetDetail(id);
return SUCCESS(response);
}
//TODO 校正
[HttpGet("correcting")]
public IActionResult Correcting(string id)
public IActionResult Correcting(string[] ids)
{
if (string.IsNullOrEmpty(id)) throw new CustomException("id is empty");
var response = _mmLinesidebarInventoryCheckService.Correcting(id);
if (ids==null||ids.Length==0) throw new CustomException("id is empty");
var response = _mmLinesidebarInventoryCheckService.Correcting(ids);
return SUCCESS(response);
}
//TODO 修改
//TODO 修改 用于填写实际数量,和异常原因备注
[HttpPut]
[Log(Title = "线边库库存盘点", BusinessType = BusinessType.UPDATE)]

View File

@ -1,6 +1,16 @@
using DOAN.Model.mes.echarts;
using DOAN.Model.MES.product;
namespace DOAN.Service.MES.bigScreen.IService;
public interface IProduct2BigScreenService : IBaseService<ProWorkorder>
{}
{
EchartsOptions GetMoudle01();
EchartsOptions GetMoudle02();
EchartsOptions GetMoudle03();
EchartsOptions GetMoudle04();
EchartsOptions GetMoudle05();
EchartsOptions GetMoudle06();
EchartsOptions GetMoudle07();
EchartsOptions GetMoudle08();
}

View File

@ -1,16 +1,70 @@
using DOAN.Model.mes.echarts;
using DOAN.Model.MES.product;
using DOAN.Service.MES.bigScreen.IService;
using Infrastructure.Attribute;
namespace DOAN.Service.MES.bigScreen
{
/// <summary>
/// 生产大屏
/// 生产大屏 2
/// </summary>
[AppService(ServiceType = typeof(IProduct2BigScreenService), ServiceLifetime = LifeTime.Transient)]
public class Product2BigScreenService : BaseService<ProWorkorder>, IProduct2BigScreenService
{}
{
public EchartsOptions GetMoudle01()
{
return null;
}
public EchartsOptions GetMoudle02()
{
return null;
}
public EchartsOptions GetMoudle03()
{
return null;
}
public EchartsOptions GetMoudle04()
{
return null;
}
public EchartsOptions GetMoudle05()
{
return null;
}
public EchartsOptions GetMoudle06()
{
return null;
}
public EchartsOptions GetMoudle07()
{
return null;
}
public EchartsOptions GetMoudle08()
{
return null;
}
public EchartsOptions GetMoudle09()
{
return null;
}
public EchartsOptions GetMoudle10()
{
return null;
}
}
}

View File

@ -11,7 +11,9 @@ namespace DOAN.Service.MES.mm.IService
PagedInfo<MmInventoryCheckLogDto> GetList(MmInventoryCheckLogQueryDto parm);
bool Correcting(string id);
MmInventoryCheckLog GetDetail(string id);
bool Correcting(string[] ids);
int UpdateMmInventoryCheckLog(MmInventoryCheckLog model);
}

View File

@ -69,30 +69,35 @@ namespace DOAN.Service.MES.mm
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public bool Correcting(string id)
public bool Correcting(string[] ids)
{
bool result = false;
UseTran2(() =>
{
Context.Updateable<MmInventoryCheckLogDto>().Where(it => it.LineCode == id)
Context.Updateable<MmInventoryCheckLogDto>().Where(it => ids.Contains(it.Id))
.SetColumns(it => it.IsCorrecting == 1)
.ExecuteCommand();
result = Context.Updateable<MmLinesidebarInventory>().Where(it =>
it.LineCode == SqlFunc.Subqueryable<MmInventoryCheckLogDto>().Where(it => it.Id == id)
it.LineCode == SqlFunc.Subqueryable<MmInventoryCheckLogDto>().Where(it => ids.Contains(it.Id))
.Select(it => it.LineCode))
.Where(it => it.MaterialCode == SqlFunc.Subqueryable<MmInventoryCheckLogDto>()
.Where(it => it.Id == id)
.Where(it => ids.Contains(it.Id))
.Select(it => it.MaterialCode))
.SetColumns(it => it.LogicQuantity == SqlFunc.Subqueryable<MmInventoryCheckLogDto>()
.Where(it => it.Id == id).Select(it => it.ActualQuantity))
.Where(it =>ids.Contains(it.Id)).Select(it => it.ActualQuantity))
.ExecuteCommandHasChange();
});
return result;
}
public MmInventoryCheckLog GetDetail(string id)
{
return Queryable().Where(it => it.Id == id).First();
}
public int UpdateMmInventoryCheckLog(MmInventoryCheckLog model)
{
return Update(model, true);

View File

@ -38,7 +38,7 @@ namespace DOAN.Service.Mobile
else
{
//新增
var handle_workorder= Context.Queryable<ProWorkorder>().Where(it => it.Workorder == wokorder).First();
var handle_workorder= Context.Queryable<ProWorkorder>().Where(it => it.Workorder == wokorder).First();
var reportWork = new ProReportwork();
reportWork.Id = XueHua;
reportWork.FkWorkorder = wokorder;