Commit 816766fb by xin.yang

some update

parent 33bf46cc
......@@ -1251,7 +1251,7 @@ export default {
this.loading3 = true;
axios
.request({
url: "/qms/ManualCollection/Add",
url: "/acc/QmsCheck/AddManual",
data,
method: "post",
})
......
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; }
}
}
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 };
}
}
}
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