Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
Laisi_AutoMES2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiawei.su
Laisi_AutoMES2
Commits
816766fb
Commit
816766fb
authored
Jan 26, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some update
parent
33bf46cc
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
821 additions
and
3 deletions
+821
-3
collection.vue
Html/src/view/qms/manual/collection.vue
+1
-1
QmsCheckController.cs
Server/Apis/Siger.ApiACC/Controllers/QmsCheckController.cs
+364
-0
siger_check_sn_list.cs
...Middlelayer.AccRepository/Entities/siger_check_sn_list.cs
+31
-0
siger_check_sn_trace_detail.cs
...yer.AccRepository/Entities/siger_check_sn_trace_detail.cs
+46
-0
siger_check_sn_trace_file.cs
...layer.AccRepository/Entities/siger_check_sn_trace_file.cs
+24
-0
siger_check_sn_trace_inspection.cs
...AccRepository/Entities/siger_check_sn_trace_inspection.cs
+108
-0
siger_qms_inspection_standard.cs
...r.AccRepository/Entities/siger_qms_inspection_standard.cs
+2
-0
CheckSnListRepository.cs
...layer.AccRepository/Repositories/CheckSnListRepository.cs
+27
-0
CheckSnTraceDetailRepository.cs
...ccRepository/Repositories/CheckSnTraceDetailRepository.cs
+14
-0
CheckSnTraceFileRepository.cs
....AccRepository/Repositories/CheckSnTraceFileRepository.cs
+14
-0
CheckSnTraceInspectionRepository.cs
...pository/Repositories/CheckSnTraceInspectionRepository.cs
+14
-0
InspectStandardRepository.cs
...r.AccRepository/Repositories/InspectStandardRepository.cs
+25
-2
ICheckSnListRepository.cs
...pository/Repositories/Interface/ICheckSnListRepository.cs
+11
-0
ICheckSnTraceDetailRepository.cs
...y/Repositories/Interface/ICheckSnTraceDetailRepository.cs
+9
-0
ICheckSnTraceFileRepository.cs
...ory/Repositories/Interface/ICheckSnTraceFileRepository.cs
+8
-0
ICheckSnTraceInspectionRepository.cs
...positories/Interface/ICheckSnTraceInspectionRepository.cs
+9
-0
IInspectStandardRepository.cs
...tory/Repositories/Interface/IInspectStandardRepository.cs
+2
-0
RequestAddQmsCheck.cs
...r.Middlelayer.AccRepository/Request/RequestAddQmsCheck.cs
+51
-0
ResponseQmsCheck.cs
...er.Middlelayer.AccRepository/Response/ResponseQmsCheck.cs
+61
-0
No files found.
Html/src/view/qms/manual/collection.vue
View file @
816766fb
...
@@ -1251,7 +1251,7 @@ export default {
...
@@ -1251,7 +1251,7 @@ export default {
this
.
loading3
=
true
;
this
.
loading3
=
true
;
axios
axios
.
request
({
.
request
({
url
:
"/
qms/ManualCollection/Add
"
,
url
:
"/
acc/QmsCheck/AddManual
"
,
data
,
data
,
method
:
"post"
,
method
:
"post"
,
})
})
...
...
Server/Apis/Siger.ApiACC/Controllers/QmsCheckController.cs
0 → 100644
View file @
816766fb
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
();
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_check_sn_list.cs
0 → 100644
View file @
816766fb
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
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_check_sn_trace_detail.cs
0 → 100644
View file @
816766fb
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
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_check_sn_trace_file.cs
0 → 100644
View file @
816766fb
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
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_check_sn_trace_inspection.cs
0 → 100644
View file @
816766fb
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
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_qms_inspection_standard.cs
View file @
816766fb
...
@@ -131,5 +131,7 @@ namespace Siger.Middlelayer.AccRepository.Entities
...
@@ -131,5 +131,7 @@ namespace Siger.Middlelayer.AccRepository.Entities
/// 是否触发安灯0不触发 1触发
/// 是否触发安灯0不触发 1触发
/// </summary>
/// </summary>
public
int
trigger_andon
{
get
;
set
;
}
public
int
trigger_andon
{
get
;
set
;
}
public
string
image
{
get
;
set
;
}
}
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/CheckSnListRepository.cs
0 → 100644
View file @
816766fb
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
);
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/CheckSnTraceDetailRepository.cs
0 → 100644
View file @
816766fb
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
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/CheckSnTraceFileRepository.cs
0 → 100644
View file @
816766fb
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
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/CheckSnTraceInspectionRepository.cs
0 → 100644
View file @
816766fb
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
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/InspectStandardRepository.cs
View file @
816766fb
using
Siger.Middlelayer.AccRepository.Entities
;
using
Siger.Middlelayer.AccRepository.Entities
;
using
Siger.Middlelayer.AccRepository.Repositories.Interface
;
using
Siger.Middlelayer.AccRepository.Repositories.Interface
;
using
Siger.Middlelayer.Common
;
using
Siger.Middlelayer.Repository.Response
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
namespace
Siger.Middlelayer.AccRepository.Repositories
namespace
Siger.Middlelayer.AccRepository.Repositories
{
{
internal
class
InspectStandardRepository
:
AccRepositoryBase
<
siger_qms_inspection_standard
>,
IInspectStandardRepository
internal
class
InspectStandardRepository
:
AccRepositoryBase
<
siger_qms_inspection_standard
>,
IInspectStandardRepository
{
{
private
ApiAccDbContext
accDbC
ontext
;
private
ApiAccDbContext
_c
ontext
;
public
InspectStandardRepository
(
ApiAccDbContext
context
)
:
base
(
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
};
}
}
}
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/ICheckSnListRepository.cs
0 → 100644
View file @
816766fb
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
);
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/ICheckSnTraceDetailRepository.cs
0 → 100644
View file @
816766fb
using
Siger.Middlelayer.AccRepository.Entities
;
namespace
Siger.Middlelayer.AccRepository.Repositories.Interface
{
public
interface
ICheckSnTraceDetailRepository
:
IAccRepositoryBase
<
siger_check_sn_trace_detail
>
{
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/ICheckSnTraceFileRepository.cs
0 → 100644
View file @
816766fb
using
Siger.Middlelayer.AccRepository.Entities
;
namespace
Siger.Middlelayer.AccRepository.Repositories.Interface
{
public
interface
ICheckSnTraceFileRepository
:
IAccRepositoryBase
<
siger_check_sn_trace_file
>
{
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/ICheckSnTraceInspectionRepository.cs
0 → 100644
View file @
816766fb
using
Siger.Middlelayer.AccRepository.Entities
;
namespace
Siger.Middlelayer.AccRepository.Repositories.Interface
{
public
interface
ICheckSnTraceInspectionRepository
:
IAccRepositoryBase
<
siger_check_sn_trace_inspection
>
{
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/Interface/IInspectStandardRepository.cs
View file @
816766fb
using
Siger.Middlelayer.AccRepository.Entities
;
using
Siger.Middlelayer.AccRepository.Entities
;
using
Siger.Middlelayer.Repository.Response
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.Text
;
...
@@ -7,5 +8,6 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
...
@@ -7,5 +8,6 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
{
public
interface
IInspectStandardRepository
:
IAccRepositoryBase
<
siger_qms_inspection_standard
>
public
interface
IInspectStandardRepository
:
IAccRepositoryBase
<
siger_qms_inspection_standard
>
{
{
ResponseIdName
GetMachineBySectionId
(
int
sectionId
,
int
projectId
);
}
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Request/RequestAddQmsCheck.cs
0 → 100644
View file @
816766fb
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
;
}
}
}
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Response/ResponseQmsCheck.cs
0 → 100644
View file @
816766fb
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
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment