Commit 4513ad3d by yiyu.li
parents c48ab48c 0079fa2d
......@@ -1251,7 +1251,7 @@ export default {
this.loading3 = true;
axios
.request({
url: "/qms/ManualCollection/Add",
url: "/acc/QmsCheck/AddManual",
data,
method: "post",
})
......
......@@ -485,7 +485,16 @@ namespace Siger.ApiACC.Controllers
[HttpGet]
public IActionResult GetFixtureToolList(string categoryid)
{
var list = _toolsRepository.GetDataList(categoryid.ToInt(), ProjectId);
var categorys = _toolsCategoryRepository.GetList(q => q.projectId == ProjectId && q.status == (int)RowState.Valid).ToList();
var categoryIds = new List<int>();
if (categoryid.ToInt() > 0)
{
var cate = categorys.FirstOrDefault(q => q.id == categoryid.ToInt());
var sonCates = GetSonCategoryList(cate.guid, categorys);
categoryIds = sonCates.Select(q => q.id).ToList();
categoryIds.Add(categoryid.ToInt());
}
var list = _toolsRepository.GetDataList(categoryIds, ProjectId);
return new ObjectResult(list);
}
}
......
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Microsoft.AspNetCore.Mvc;
using Siger.ApiCommon.Result;
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
using Siger.Middlelayer.AccRepository.Response;
using Siger.Middlelayer.AccRepository.Request;
using Siger.Middlelayer.Common;
using Siger.Middlelayer.Common.Extensions;
using Siger.Middlelayer.Repository.Repositories.Interface;
using Siger.Middlelayer.Repository;
using Siger.Middlelayer.Repository.Extensions;
using System.Linq;
using Siger.Middlelayer.Repository.Entities;
using Siger.Middlelayer.Common.Helpers;
using Siger.Middlelayer.Utility.ImportEntities;
using Siger.Middlelayer.Utility.Helpers;
using System.IO;
using Siger.Middlelayer.Log;
using Siger.Middlelayer.Common.ModuleEnum;
using Siger.Middlelayer.Share.Enum.ModuleEnum;
namespace Siger.ApiACC.Controllers
{
public class QmsCheckController : BaseController
{
private readonly IUnitOfWork _unitOfWork;
private readonly IAutomationFixtureToolsProductRepository _automationFixtureToolsProduct;
private readonly ISigerProjectProductRepository _productRepository;
private readonly ISigerProjectLevelRepository _levelRepository;
private readonly ISigerProjectLevelSectionRepository _levelSectionRepository;
private readonly IInspectStandardRepository _inspectStandard;
private readonly ICheckSnTraceInspectionRepository _traceInspectionRepository;
private readonly ICheckSnTraceDetailRepository _traceDetailRepository;
private readonly ICheckSnListRepository _snListRepository;
private readonly ISigerTrMaterialsRepository _materialsRepository;
private readonly IAutomationTaskListRepository _automationTaskList;
private readonly IAutomationFixtureMonitor _fixtureMonitor;
public QmsCheckController(IUnitOfWork unitOfWork, IAutomationFixtureToolsProductRepository automationFixtureToolsProduct,
ISigerProjectProductRepository productRepository, ISigerProjectLevelRepository levelRepository,
ISigerProjectLevelSectionRepository levelSectionRepository, IInspectStandardRepository inspectStandard,
ICheckSnTraceInspectionRepository traceInspectionRepository, ICheckSnTraceDetailRepository traceDetailRepository,
ICheckSnListRepository checkSnListRepository, ISigerTrMaterialsRepository materialsRepository,
IAutomationTaskListRepository automationTaskListRepository, IAutomationFixtureMonitor fixtureMonitor)
{
_unitOfWork = unitOfWork;
_automationFixtureToolsProduct = automationFixtureToolsProduct;
_productRepository = productRepository;
_levelRepository = levelRepository;
_levelSectionRepository = levelSectionRepository;
_inspectStandard = inspectStandard;
_traceInspectionRepository = traceInspectionRepository;
_traceDetailRepository = traceDetailRepository;
_snListRepository = checkSnListRepository;
_materialsRepository = materialsRepository;
_automationTaskList = automationTaskListRepository;
_fixtureMonitor = fixtureMonitor;
}
[HttpPost]
public IActionResult AddManual([FromBody]RequestAddDataCollection req)
{
var product = _productRepository.Get(t => t.projectid == ProjectId && t.status == (int)RowState.Valid &&
t.id == req.productid);
if (product == null)
{
throw new BadRequestException(RequestEnum.ProductNotFound);
}
var maxLevel = _levelRepository.GetList(t => t.status == (int)RowState.Valid && t.projectid == ProjectId).Max(q => q.id);
var section = _levelSectionRepository.Get(t => t.status == (int)RowState.Valid && t.projectid == ProjectId && t.id == req.sectionid);
if (section == null || section.levelid != maxLevel)
{
throw new ServerException(1052);
}
var machine = _inspectStandard.GetMachineBySectionId(section.id, ProjectId);
if (string.IsNullOrEmpty(req.result))
{
throw new BadRequestException(RequestEnum.SelectCheckResult);
}
if(req.result == ((int)SendTestType.DeviationRelease).ToString() && (string.IsNullOrEmpty(req.quantity) || req.quantity.ToInt() < 1))
{
throw new BadRequestException(RequestEnum.DeviationReleaseQuantityNotNull);
}
var items = _inspectStandard.GetList(t => req.details.Select(q => q.itemid).Contains(t.id)).ToList();
var indexs = req.details.Select(t => t.index).Distinct().ToList();
foreach (var index in indexs)//验证传入参数
{
var traceDetails = req.details.Where(t => t.index == index).OrderBy(t => t.index).ToList();
if (traceDetails.Any())
{
foreach (var detail in traceDetails)
{
var item = items.FirstOrDefault(t => t.id == detail.itemid);
if (item == null)
{
throw new BadRequestException(RequestEnum.ParameterMiss);
}
if (item.value_category == (int)ValueCategory.Maxmin && (detail.lowerlimit.HasValue &&
!detail.upperlimit.HasValue || detail.upperlimit.HasValue && !detail.lowerlimit.HasValue ||
(detail.upperlimit.HasValue && detail.lowerlimit.HasValue && detail.upperlimit.Value < detail.lowerlimit.Value)))
{
throw new BadRequestException(RequestEnum.MaxMinError);
}
}
}
}
var traceResult = "";//检验结果可以传OK,2,NG,也可以传1,2,3
if (req.result.ToUpper() == "OK" || req.result.ToUpper() == "NG")
{
traceResult = req.result.ToUpper();
}
else
{
if (req.result.ToInt() == (int)SendTestType.Qalified || req.result.ToInt() == (int)SendTestType.DeviationRelease)
{
traceResult = "OK";
}
else
{
traceResult = "NG";
}
}
var insertDetailList = new List<SnTraceDetailList>();
foreach (var index in indexs)
{
var traceDetails = req.details.Where(t => t.index == index).OrderBy(t => t.index).ToList();
foreach (var detail in traceDetails)
{
var item = items.FirstOrDefault(t => t.id == detail.itemid);
if (item == null)
{
continue;
}
if (item.value_type == (int)ValueTypeStatus.O)
{
if (string.IsNullOrWhiteSpace(detail.result))
{
continue;
}
insertDetailList.Add(new SnTraceDetailList
{
TraceID = "",
ItemID = detail.itemid,
Result = detail.result,
Value = detail.value,
ItemName = item.item_en,
SN = req.sn ?? "",
NumberIndex = detail.index,
LowerLimit = detail.lowerlimit,
UpperLimit = detail.upperlimit,
});
}
else if (item.value_type == (int)ValueTypeStatus.V)
{
if (detail.value == null && item.value_category != (int)ValueCategory.Maxmin)
{
continue;
}
var detailResult = "";
if (item.value_category == (int)ValueCategory.Maxmin && !detail.upperlimit.HasValue && !detail.lowerlimit.HasValue)
{
continue;
}
if (item.value_category == (int)ValueCategory.Maxmin)
{
var range = detail.upperlimit.Value - detail.lowerlimit.Value;
detail.value = (detail.upperlimit.Value + detail.lowerlimit.Value) / 2;
detailResult = "OK";
if (detail.upperlimit.Value > item.max_value || detail.lowerlimit.Value < item.min_value ||
range > item.range || detail.value.Value > item.max_value || detail.value.Value < item.min_value ||
detail.upperlimit.Value < item.min_value || detail.lowerlimit.Value > item.max_value)
{
detailResult = "NG";
}
}
else
{
detailResult = (detail.value.Value <= item.max_value && detail.value.Value >= item.min_value) ? "OK" : "NG";
}
insertDetailList.Add(new SnTraceDetailList
{
TraceID = "",
ItemID = detail.itemid,
Result = detailResult,
Value = detail.value,
ItemName = item.item_en,
SN = req.sn ?? "",
NumberIndex = detail.index,
LowerLimit = detail.lowerlimit,
UpperLimit = detail.upperlimit
});
}
}
}
var trace_id = Guid.NewGuid().ToString();
#region 插入检验扩展表
if (req.result.ToUpper() == "OK")
{
req.result = ((int)SendTestType.Qalified).ToString();
}
else if (req.result.ToUpper() == "NG")
{
req.result = ((int)SendTestType.Unqualified).ToString();
}
var nowTime = DateTime.Now;
//插入中间层库的trace表
var inspection = new siger_check_sn_trace_inspection
{
trace_id = trace_id,
testroom = "",
productid = req.productid,
materialid = req.materialid.ToInt(),
sectionid = req.sectionid,
sn = req.sn ?? "",
routeid = req.routeid.ToInt(),
check_type = req.checktype,
check_status = (int)SendCheckStatus.Completed,
result = req.result,
send_mid = UserId,
send_time = nowTime,
check_mid = UserId,
check_time = nowTime,
inspection_type = (int)InspectionType.ManualCollection,
projectId = ProjectId,
reason = req.reason ?? "",
workorder = "",
number = req.number.ToInt(),
quantity = req.quantity.ToInt()
};
_traceInspectionRepository.Insert(inspection);
//插入中间层库的 检验详情表
foreach (var detail in insertDetailList)
{
var model = new siger_check_sn_trace_detail
{
TraceID = inspection.trace_id,
ItemID = detail.ItemID,
Result = detail.Result,
Value = detail.Value,
ItemName = detail.ItemName,
SN = req.sn ?? "",
NumberIndex = detail.NumberIndex,
LowerLimit = detail.LowerLimit,
UpperLimit = detail.UpperLimit,
projectId = ProjectId,
CreateTime = nowTime
};
_traceDetailRepository.Insert(model);
}
if (_unitOfWork.Commit() > 0)
{
try
{
CreateTaskList(req.sectionid, req.productid, product.code, req.sn, req.routeid.ToInt());
AddSnList(req.materialid.ToInt(), inspection, product.code, section.parentid);//把二维码插入到 sn_list表
}
catch(Exception ex)
{
Logger.WriteLineError(ex.ToString());
}
return new ObjectResult(CommonEnum.Succefull);
}
else
{
throw new BadRequestException(CommonEnum.Fail);
}
#endregion
}
private void AddSnList(int materialid, siger_check_sn_trace_inspection trace, string code, int lineId)
{
var snEntity = _snListRepository.Get(t => t.projectId == ProjectId && t.status == (int)RowState.Valid &&
t.SN == trace.sn && !string.IsNullOrWhiteSpace(trace.sn));
if (snEntity == null)
{
var stateCode = "000";
var eventNoObj = _snListRepository.GetEventNoByResult(trace.sn, ProjectId);
if (eventNoObj != null)
{
//出站信息获取
var outObj = _snListRepository.GetOutStationByEventNo(eventNoObj.EventNo, trace.sectionid, ProjectId);
if (outObj != null)
{
stateCode = outObj.ResultStatus;
}
}
var material = _materialsRepository.Get(t => t.projectId == ProjectId && t.status == (int)RowState.Valid &&
t.id == materialid);
var snListObj = new siger_check_sn_list
{
SN = trace.sn,
BatchNumber = "",
ProductID = trace.productid,
ProductCode = code,
LineID = lineId,
WorkOrder = trace.workorder,
MaterialID = material?.id ?? 0,
PartNumber = material?.pn ?? "",
StateCode = stateCode,
CreateTime = DateTime.Now,
projectId = ProjectId
};
_snListRepository.Insert(snListObj);
_unitOfWork.Commit();
}
}
private void CreateTaskList(int section, int productid, string productcode, string sn, int routeid)
{
if (section <= 0 || string.IsNullOrEmpty(sn) || string.IsNullOrEmpty(productcode) || productid <= 0)
{
return;
}
var monitor = _fixtureMonitor.GetList(q => q.section == section && q.sn == sn).OrderByDescending(q => q.updatetime).FirstOrDefault();
if (monitor == null)
{
return;
}
var taskNo = _automationTaskList.CrateTaskNumber(Automation.TaskTrigerType.Manual);
_automationTaskList.Insert(new siger_automation_task_list
{
no = taskNo,
action = Automation.TaskAction.Step_CJT_SXLW,
actiontype = Automation.ExcueType.None,
triggertime = DateTime.MinValue,
tasktype = Automation.TaskActionType.Unload,
operater = UserId,
operatetime = DateTime.Now,
sectionid = section,
send = 0,
status = 1,
completetime = DateTime.MinValue,
trigger = Automation.TaskTrigerType.Manual,
projectId = ProjectId,
productid = productid,
sn = sn,
ordercode = "",
fixtureguid = monitor.fixtureguid,
locationid = monitor.locationId,
productcode = productcode,
processid = routeid,
programnumber = "",
remark = "质量检验",
});
_unitOfWork.Commit();
}
}
}
......@@ -85,7 +85,7 @@ namespace Siger.Middlelayer.Utility.ImportEntities
[ExcelColumn("*工装名称")]
public string FixtureTool { get; set; }
[ExcelColumn("*产品名称")]
[ExcelColumn("*产品编号")]
public string Product { get; set; }
[ExcelColumn("备注")]
......
using System;
namespace Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// snList
/// </summary>
public class siger_check_sn_list : AccEntityBase
{
public string SN { get; set; }
public string BatchNumber { get; set; }
public int ProductID { get; set; }
public string ProductCode { get; set; }
public int MaterialID { get; set; }
public string PartNumber { get; set; }
public int LineID { get; set; }
public string StateCode { get; set; }
public string WorkOrder { get; set; }
public DateTime CreateTime { get; set; }
}
}
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// siger_check_sn_trace_detail
/// </summary>
public class siger_check_sn_trace_detail : AccEntityBase
{
[NotMapped]
public int id { get; set; }
[Key]
public long ID { get; set; }
public int MachineID { get; set; }
public string TraceID { get; set; }
public string SN { get; set; }
public int ItemID { get; set; }
public string ItemName { get; set; }
public double? Value { get; set; }
public string Result { get; set; }
public DateTime CreateTime { get; set; }
public double? LowerLimit { get; set; }
public double? UpperLimit { get; set; }
public int NumberIndex { get; set; }
/// <summary>
/// 쳣״̬ abnomal_rulekey
/// </summary>
public string abnomal_status { get; set; }
}
}
namespace Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// 检验数据附件
/// </summary>
public class siger_check_sn_trace_file : AccEntityBase
{
public int trace_id { get; set; }
public string url { get; set; }
public string name { get; set; }
public int size { get; set; }
public int file_type { get; set; }
/// <summary>
/// 检验方式1->进料检验2->送检检验3->人工检验
/// </summary>
public int trace_type { get; set; }
}
}
using System;
namespace Siger.Middlelayer.AccRepository.Entities
{
/// <summary>
/// trace扩展表
/// </summary>
public class siger_check_sn_trace_inspection : AccEntityBase
{
public string trace_id { get; set; }
/// <summary>
/// 检测室字典key
/// </summary>
public string testroom { get; set; }
/// <summary>
///
/// </summary>
public int productid { get; set; }
public int materialid { get; set; }
/// <summary>
/// 工位ID
/// </summary>
public int sectionid { get; set; }
/// <summary>
/// 二维码
/// </summary>
public string sn { get; set; }
/// <summary>
/// 工序ID
/// </summary>
public int routeid { get; set; }
/// <summary>
/// 检验类型
/// </summary>
public int check_type { get; set; }
/// <summary>
/// 1->待接收2->检测完成3->待检验4->检验中
/// </summary>
public int check_status { get; set; }
/// <summary>
/// 结果
/// </summary>
public string result { get; set; }
/// <summary>
/// 送检人
/// </summary>
public int send_mid { get; set; }
/// <summary>
/// 送检时间
/// </summary>
public DateTime send_time { get; set; }
/// <summary>
/// 检验人
/// </summary>
public int check_mid { get; set; }
/// <summary>
/// 检验时间
/// </summary>
public DateTime? check_time { get; set; }
/// <summary>
/// 扩展表类别 1->送检检验2->人工检验
/// </summary>
public int inspection_type { get; set; }
public int number { get; set; }
/// <summary>
/// 送检原因
/// </summary>
public string reason { get; set; }
public string workorder { get; set; }
/// <summary>
/// 偏差放行数量
/// </summary>
public int quantity { get; set; }
/// <summary>
/// 接收人
/// </summary>
public int recieve_mid { get; set; }
/// <summary>
/// 接收时间
/// </summary>
public DateTime? recieve_time { get; set; }
/// <summary>
/// 开始检验人
/// </summary>
public int checking_mid { get; set; }
/// <summary>
/// 开始检验时间
/// </summary>
public DateTime? checking_time { get; set; }
}
}
......@@ -131,5 +131,7 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// 是否触发安灯0不触发 1触发
/// </summary>
public int trigger_andon { get; set; }
public string image { get; set; }
}
}
......@@ -152,7 +152,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
rowIndex++;
if (string.IsNullOrEmpty(item.FixtureTool) || string.IsNullOrEmpty(item.Product) || string.IsNullOrEmpty(item.Product))
if (string.IsNullOrEmpty(item.FixtureTool) || string.IsNullOrEmpty(item.Product))
{
errors.Add($"{rowIndex},{(int)RequestEnum.ParameterMiss}");
}
......@@ -161,7 +161,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{
errors.Add($"{rowIndex},{(int)RequestEnum.FixtureToolNotFound}");
}
var product = _context.siger_project_product.FirstOrDefault(q => q.projectid == projectid && q.status == (int)RowState.Valid && q.name == item.Product);
var product = _context.siger_project_product.FirstOrDefault(q => q.projectid == projectid && q.status == (int)RowState.Valid && q.code == item.Product);
if (product == null)
{
errors.Add($"{rowIndex},{(int)RequestEnum.ProductNotFound}");
......
......@@ -87,7 +87,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
}
public IEnumerable<ResponseFixtureTools> GetDataList(int categoryid, int projectid)
public IEnumerable<ResponseFixtureTools> GetDataList(List<int> categoryid, int projectid)
{
var query = from q in _context.siger_automation_fixture_tools
join p in _context.siger_automation_fixture_tools_category on q.category equals p.guid
......@@ -109,9 +109,9 @@ namespace Siger.Middlelayer.AccRepository.Repositories
status = q.status,
updatetime = q.updatetime.HasValue && q.updatetime > DateTime.MinValue ? q.updatetime.Value.ToString(ParameterConstant.DateTimeFormat) : ""
};
if (categoryid > 0)
if (categoryid.Any())
{
query = query.Where(q => q.categoryid == categoryid);
query = query.Where(q => categoryid.Contains(q.categoryid));
}
var entities = query.OrderByDescending(q => q.id).AsNoTracking().ToList();
return entities;
......
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.Common;
using System.Linq;
namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
internal class CheckSnListRepository : AccRepositoryBase<siger_check_sn_list>, ICheckSnListRepository
{
private readonly ApiAccDbContext _context;
public CheckSnListRepository(ApiAccDbContext context) : base(context)
{
_context = context;
}
public SigerTrRoutingEventNo GetEventNoByResult(string result, int projectId)
{
return _context.siger_tr_routing_eventno.FirstOrDefault(t => t.projectId == projectId &&
t.status == (int)RowState.Valid && t.Descr == result);
}
public SigerTrRoutingOutStation GetOutStationByEventNo(int eventno, int sectionId, int projectId)
{
return _context.siger_tr_routing_outstation.FirstOrDefault(t => t.projectId == projectId &&
t.status == (int)RowState.Valid && t.EventNo == eventno && t.Station == sectionId);
}
}
}
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
namespace Siger.Middlelayer.AccRepository.Repositories
{
internal class CheckSnTraceDetailRepository : AccRepositoryBase<siger_check_sn_trace_detail>, ICheckSnTraceDetailRepository
{
private readonly ApiAccDbContext _context;
public CheckSnTraceDetailRepository(ApiAccDbContext context) : base(context)
{
_context = context;
}
}
}
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
namespace Siger.Middlelayer.AccRepository.Repositories
{
internal class CheckSnTraceFileRepository : AccRepositoryBase<siger_check_sn_trace_file>, ICheckSnTraceFileRepository
{
private readonly ApiAccDbContext _context;
public CheckSnTraceFileRepository(ApiAccDbContext context) : base(context)
{
_context = context;
}
}
}
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
namespace Siger.Middlelayer.AccRepository.Repositories
{
internal class CheckSnTraceInspectionRepository : AccRepositoryBase<siger_check_sn_trace_inspection>, ICheckSnTraceInspectionRepository
{
private readonly ApiAccDbContext _context;
public CheckSnTraceInspectionRepository(ApiAccDbContext context) : base(context)
{
_context = context;
}
}
}
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.AccRepository.Repositories.Interface;
using Siger.Middlelayer.Common;
using Siger.Middlelayer.Repository.Response;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Siger.Middlelayer.AccRepository.Repositories
{
internal class InspectStandardRepository : AccRepositoryBase<siger_qms_inspection_standard>, IInspectStandardRepository
{
private ApiAccDbContext accDbContext;
private ApiAccDbContext _context;
public InspectStandardRepository(ApiAccDbContext context) : base(context)
{
accDbContext = context;
_context = context;
}
public ResponseIdName GetMachineBySectionId(int sectionId, int projectId)
{
var query = _context.siger_project_machine_attribution.FirstOrDefault(q =>
q.station == sectionId && q.status == (int)RowState.Valid && q.attribution == (int)MachineAttributionEnum.equipment);
if (query == null)
{
return null;
}
var machine = _context.siger_project_machine.FirstOrDefault(q =>
q.projectid == projectId && q.status == (int)RowState.Valid
&& q.id == query.machine);
if (machine == null)
{
return null;
}
return new ResponseIdName { id = machine.id, name = machine.title };
}
}
}
......@@ -12,7 +12,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
IPagedCollectionResult<ResponseFixtureTools> GetPagedList(List<int> category, string code, string name, int state,
int projectid, int page, int pagesize, string toexcel = "");
IEnumerable<ResponseFixtureTools> GetDataList(int categoryid, int projectid);
IEnumerable<ResponseFixtureTools> GetDataList(List<int> categoryid, int projectid);
ResponseProductFixtureInfo GetProductFixtureLocation(int projectId, string guid);
......
using Siger.Middlelayer.AccRepository.Entities;
namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
public interface ICheckSnListRepository : IAccRepositoryBase<siger_check_sn_list>
{
SigerTrRoutingEventNo GetEventNoByResult(string result, int projectId);
SigerTrRoutingOutStation GetOutStationByEventNo(int eventno, int sectionId, int projectId);
}
}
using Siger.Middlelayer.AccRepository.Entities;
namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
public interface ICheckSnTraceDetailRepository : IAccRepositoryBase<siger_check_sn_trace_detail>
{
}
}
using Siger.Middlelayer.AccRepository.Entities;
namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
public interface ICheckSnTraceFileRepository : IAccRepositoryBase<siger_check_sn_trace_file>
{
}
}
using Siger.Middlelayer.AccRepository.Entities;
namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
public interface ICheckSnTraceInspectionRepository : IAccRepositoryBase<siger_check_sn_trace_inspection>
{
}
}
using Siger.Middlelayer.AccRepository.Entities;
using Siger.Middlelayer.Repository.Response;
using System;
using System.Collections.Generic;
using System.Text;
......@@ -7,5 +8,6 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
public interface IInspectStandardRepository : IAccRepositoryBase<siger_qms_inspection_standard>
{
ResponseIdName GetMachineBySectionId(int sectionId, int projectId);
}
}
using System;
using System.Collections.Generic;
namespace Siger.Middlelayer.AccRepository.Request
{
public class RequestAddDataCollection
{
public List<DataCollectionDetail> details { get; set; } = new List<DataCollectionDetail>();
public int productid { get; set; }
public string materialid { get; set; }
public int sectionid { get; set; }
public string routeid { get; set; }
public string workorder { get; set; }
public string sn { get; set; }
public string result { get; set; }
public int checktype { get; set; }
public string reason { get; set; }
public string number { get; set; }
public string quantity { get; set; }
}
public class DataCollectionDetail
{
public int index { get; set; }
public int id { get; set; }
public int itemid { get; set; }
public int checktype { get; set; }
public string result { get; set; }
public double? value { get; set; }
public double? lowerlimit { get; set; }
public double? upperlimit { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Siger.Middlelayer.AccRepository.Response
{
public class SnTrace
{
public string ID { get; set; }
public int ProductID { get; set; }
public int MaterialID { get; set; }
public int SectionID { get; set; }
public int MachineID { get; set; }
public string WorkOrder { get; set; }
public string SN { get; set; }
public string Result { get; set; }
public int UserID { get; set; }
public int RouteID { get; set; }
public DateTime CreateTime { get; set; }
public int CheckType { get; set; }
public string ItemName { get; set; } = string.Empty;
}
public class SnTraceDetail
{
public long ID { get; set; }
public string TraceID { get; set; }
public int ItemID { get; set; }
public string ItemName { get; set; } = string.Empty;
public string Result { get; set; }
public double? Value { get; set; }
public string SN { get; set; }
}
public class SnTraceDetailList : SnTraceDetail
{
public int NumberIndex { get; set; }
public double? LowerLimit { get; set; }
public double? UpperLimit { get; set; }
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment