设置工单状态
This commit is contained in:
parent
808f9ece25
commit
cba0d7d86e
@ -14,6 +14,7 @@ using Microsoft.AspNetCore.Http;
|
||||
using Aliyun.OSS;
|
||||
using System;
|
||||
using DOAN.Infrastructure;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
|
||||
//创建时间:2024-07-16
|
||||
namespace DOAN.Admin.WebApi.Controllers
|
||||
@ -192,6 +193,23 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置工单状态:1 init,2 start 3 end 4pause
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("setWorkorderStatus")]
|
||||
[Log(Title = "设置工单状态", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult SetWorkorderStatus(ProWorkorderStatusDto param)
|
||||
{
|
||||
if (string.IsNullOrEmpty(param.Id))
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var response = _ProWorkorderService.SetWorkorderStatus(param);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生产工单导入模板下载 workorder 启用(9/14)
|
||||
/// </summary>
|
||||
|
||||
@ -259,6 +259,20 @@ namespace DOAN.Model.MES.product.Dto
|
||||
/// </summary>
|
||||
public string IsMatch_Unit { get; set; }
|
||||
}
|
||||
|
||||
public class ProWorkorderStatusDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 工单id
|
||||
/// </summary>
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工单状态
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 工单BOM 及其所需数量
|
||||
/// </summary>
|
||||
|
||||
@ -38,6 +38,8 @@ namespace DOAN.Service.MES.product.IService
|
||||
|
||||
int MoveWorkorder(string id, int type);
|
||||
|
||||
int SetWorkorderStatus(ProWorkorderStatusDto param);
|
||||
|
||||
int ImportData(IFormFile formFile,string username);
|
||||
|
||||
|
||||
|
||||
@ -417,13 +417,24 @@ namespace DOAN.Service.MES.product
|
||||
result += Context.Updateable(exchange).ExecuteCommand();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置工单状态:1 init,2 start 3 end 4pause
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="status"></param>
|
||||
/// <returns></returns>
|
||||
public int SetWorkorderStatus(ProWorkorderStatusDto param)
|
||||
{
|
||||
return Context.Updateable<ProWorkorder>()
|
||||
.SetColumns(it => it.Status == param.Status)
|
||||
.SetColumns(it => it.UpdatedTime == DateTime.Now)
|
||||
.Where(it => it.Id == param.Id).ExecuteCommand();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导入工单 必须整删除 整改
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user