版本结束
This commit is contained in:
@@ -42,7 +42,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
|
||||
|
||||
[HttpGet("getWorkoderList_piliang")]
|
||||
@@ -66,6 +66,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
return ExportExcel(result.Item2, result.Item1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
@@ -82,10 +85,10 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
int year = 0;
|
||||
int week = 0;
|
||||
int date = 0;
|
||||
if (!Directory.Exists(target))
|
||||
if (!Directory.Exists(Path.Combine(webHostEnvironment.WebRootPath, "workorder")))
|
||||
{
|
||||
// 如果目录不存在就创建
|
||||
Directory.CreateDirectory(target);
|
||||
Directory.CreateDirectory(Path.Combine(webHostEnvironment.WebRootPath, "workorder"));
|
||||
|
||||
}
|
||||
using (var stream = formFile.OpenReadStream())
|
||||
@@ -100,8 +103,6 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//读取列表数据
|
||||
try
|
||||
{
|
||||
@@ -236,7 +237,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 更新生产计划
|
||||
/// 更新生产计划
|
||||
/// </summary>
|
||||
/// <param name="proWorkplan">生产计划对象</param>
|
||||
/// <returns></returns>
|
||||
@@ -256,7 +257,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除本周所有计划
|
||||
/// 根据工单顺序 排序
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
@@ -268,6 +269,8 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
{
|
||||
|
||||
data = proWorkorderService.UpdateworkorderSort(id, (int)sort);
|
||||
|
||||
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
|
||||
@@ -169,9 +169,9 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
IWebHostEnvironment webHostEnvironment = (IWebHostEnvironment)App.ServiceProvider.GetService(typeof(IWebHostEnvironment));
|
||||
string sFileName = DateTime.Now.ToString("yyyyMMddHHmmss") + formFile.FileName;
|
||||
string target = Path.Combine(webHostEnvironment.WebRootPath, "workplan", sFileName);
|
||||
if (!Directory.Exists(target))
|
||||
if (!Directory.Exists(Path.Combine(webHostEnvironment.WebRootPath, "workplan")))
|
||||
{
|
||||
Directory.CreateDirectory(target);
|
||||
Directory.CreateDirectory(Path.Combine(webHostEnvironment.WebRootPath, "workplan"));
|
||||
}
|
||||
int year = 0;
|
||||
int week = 0;
|
||||
@@ -196,7 +196,6 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
//读取第一行 解析 年和月
|
||||
var row = stream.Query().Take(1).First();
|
||||
year = Convert.ToInt32(row.A);
|
||||
|
||||
week = Convert.ToInt32(row.B);
|
||||
var list = stream.Query<ProWorklplan_v2>(sheetName: "Sheet1", startCell: "B3")
|
||||
.Where(it => it.Partnumber != null)
|
||||
|
||||
@@ -6,6 +6,7 @@ using Microsoft.AspNetCore.SignalR;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Org.BouncyCastle.Asn1.X509;
|
||||
using System.Text.Json;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Hubs;
|
||||
@@ -77,42 +78,118 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前工单
|
||||
/// 获取当前工单 一检
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getcurrentWorkorder")]
|
||||
public IActionResult GetcurrentWorkorder()
|
||||
[HttpGet("getcurrentWorkorder_first")]
|
||||
public IActionResult GetcurrentWorkorder_first()
|
||||
{
|
||||
|
||||
QcCurrentWorkorderDto workorder= fQCService.GetcurrentWorkorder();
|
||||
QcCurrentWorkorderDto workorder= fQCService.GetcurrentWorkorder_first();
|
||||
|
||||
return SUCCESS(workorder);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取下一个工单
|
||||
/// 获取当前工单 二检
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getcurrentWorkorder_next")]
|
||||
public IActionResult GetcurrentWorkorder_next()
|
||||
[HttpGet("getcurrentWorkorder_again")]
|
||||
public IActionResult GetcurrentWorkorder_again()
|
||||
{
|
||||
|
||||
QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_next();
|
||||
QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_again();
|
||||
|
||||
return SUCCESS(workorder);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前工单 三检
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getcurrentWorkorder_thirty")]
|
||||
public IActionResult GetcurrentWorkorder_thirty()
|
||||
{
|
||||
|
||||
QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_thirty();
|
||||
|
||||
return SUCCESS(workorder);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取上一个工单
|
||||
/// 获取下一个工单 一检
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getcurrentWorkorder_previous")]
|
||||
public IActionResult GetcurrentWorkorder_previous()
|
||||
[HttpGet("getcurrentWorkorder_next_first")]
|
||||
public IActionResult GetcurrentWorkorder_next_first()
|
||||
{
|
||||
|
||||
QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_previous();
|
||||
QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_next_first();
|
||||
|
||||
return SUCCESS(workorder);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取下一个工单 二检
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getcurrentWorkorder_next_again")]
|
||||
public IActionResult GetcurrentWorkorder_next_again()
|
||||
{
|
||||
|
||||
QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_next_again();
|
||||
|
||||
return SUCCESS(workorder);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取下一个工单 三检
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getcurrentWorkorder_next_thirty")]
|
||||
public IActionResult GetcurrentWorkorder_next_thirty()
|
||||
{
|
||||
|
||||
QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_next_thirty();
|
||||
|
||||
return SUCCESS(workorder);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取上一个工单 一检
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getcurrentWorkorder_previous_first")]
|
||||
public IActionResult GetcurrentWorkorder_previous_first()
|
||||
{
|
||||
|
||||
QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_previous_first();
|
||||
|
||||
return SUCCESS(workorder);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取上一个工单 二检
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getcurrentWorkorder_previous_again")]
|
||||
public IActionResult GetcurrentWorkorder_previous_again()
|
||||
{
|
||||
|
||||
QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_previous_again();
|
||||
|
||||
return SUCCESS(workorder);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取上一个工单 三检
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getcurrentWorkorder_previous_thirty")]
|
||||
public IActionResult GetcurrentWorkorder_previous_thirty()
|
||||
{
|
||||
|
||||
QcCurrentWorkorderDto workorder = fQCService.GetcurrentWorkorder_previous_thirty();
|
||||
|
||||
return SUCCESS(workorder);
|
||||
}
|
||||
@@ -122,16 +199,18 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC
|
||||
/// </summary>
|
||||
/// <param name="workorder_id"></param>
|
||||
/// <param name="checkid"></param>
|
||||
/// <param name="counter"></param>
|
||||
/// <param name="number">要累加的值</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("accumulator_query_first")]
|
||||
public IActionResult Accumulator_first(string workorder_id,int checkid,int counter)
|
||||
public IActionResult Accumulator_first(string workorder_id,int checkid,int number, string inspectionModule)
|
||||
{
|
||||
|
||||
int result= fQCService.Accumulator_first(workorder_id, checkid, counter, HttpContext.GetName());
|
||||
int result= fQCService.Accumulator_first(workorder_id, checkid, number, inspectionModule, HttpContext.GetName());
|
||||
|
||||
return SUCCESS(counter);
|
||||
return SUCCESS(result);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 二检累加器
|
||||
/// </summary>
|
||||
@@ -140,12 +219,12 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC
|
||||
/// <param name="counter"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("accumulator_query_again")]
|
||||
public IActionResult Accumulator_again(string workorder_id, int checkid, int counter)
|
||||
public IActionResult Accumulator_again(string workorder_id, int checkid, int number, string inspectionModule)
|
||||
{
|
||||
|
||||
int result = fQCService.Accumulator_again(workorder_id, checkid, counter, HttpContext.GetName());
|
||||
int result = fQCService.Accumulator_again(workorder_id, checkid, number, inspectionModule, HttpContext.GetName());
|
||||
|
||||
return SUCCESS(counter);
|
||||
return SUCCESS(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -156,12 +235,12 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC
|
||||
/// <param name="counter"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("accumulator_query_thirty")]
|
||||
public IActionResult Accumulator_thirty(string workorder_id, int checkid, int counter)
|
||||
public IActionResult Accumulator_thirty(string workorder_id, int checkid, int number, string inspectionModule)
|
||||
{
|
||||
|
||||
int result = fQCService.Accumulator_thirty(workorder_id, checkid, counter, HttpContext.GetName());
|
||||
int result = fQCService.Accumulator_thirty(workorder_id, checkid, number, inspectionModule, HttpContext.GetName());
|
||||
|
||||
return SUCCESS(counter);
|
||||
return SUCCESS(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -180,6 +259,8 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC
|
||||
|
||||
return SUCCESS(AllNumber);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 计算当前工单下的包装投入数==一次合格+抛光合格
|
||||
/// </summary>
|
||||
@@ -194,5 +275,14 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC
|
||||
}
|
||||
|
||||
|
||||
// 更改工单状态为完成态
|
||||
[HttpGet("update_workorder_status")]
|
||||
public IActionResult UpdateWorkorderStatus(string workorderID)
|
||||
{
|
||||
int result= fQCService.UpdateWorkorderStatus(workorderID);
|
||||
return SUCCESS(result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user