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
cac90faa
Commit
cac90faa
authored
Jan 27, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some update
parent
cca0688f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
4 deletions
+60
-4
AutoQmsSnHelper.cs
Server/Apis/Siger.ApiDashboard/Tasks/Task/AutoQmsSnHelper.cs
+2
-0
AutoQmsSnHelperSchedule.cs
...Siger.Schedule.DashboardModule/AutoQmsSnHelperSchedule.cs
+2
-0
AutoTaskJobcsSchedule.cs
...e/Siger.Schedule.DashboardModule/AutoTaskJobcsSchedule.cs
+56
-4
No files found.
Server/Apis/Siger.ApiDashboard/Tasks/Task/AutoQmsSnHelper.cs
View file @
cac90faa
...
...
@@ -12,6 +12,8 @@ using Siger.Middlelayer.Redis;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
siger_check_sn_trace_detail
=
Siger
.
Middlelayer
.
QmsRepository
.
Entities
.
siger_check_sn_trace_detail
;
using
siger_check_sn_trace_inspection
=
Siger
.
Middlelayer
.
QmsRepository
.
Entities
.
siger_check_sn_trace_inspection
;
namespace
Siger.ApiACC.Tasks
{
...
...
Server/Schedule/Siger.Schedule.DashboardModule/AutoQmsSnHelperSchedule.cs
View file @
cac90faa
...
...
@@ -13,6 +13,8 @@ using Siger.Middlelayer.Redis;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
siger_check_sn_trace_detail
=
Siger
.
Middlelayer
.
QmsRepository
.
Entities
.
siger_check_sn_trace_detail
;
using
siger_check_sn_trace_inspection
=
Siger
.
Middlelayer
.
QmsRepository
.
Entities
.
siger_check_sn_trace_inspection
;
namespace
Siger.Schedule.DashboardModule
{
...
...
Server/Schedule/Siger.Schedule.DashboardModule/AutoTaskJobcsSchedule.cs
View file @
cac90faa
...
...
@@ -13,7 +13,6 @@ using Siger.Middlelayer.Dapper;
using
Siger.Middlelayer.DashboardRepository.Response
;
using
Siger.Middlelayer.Common.Helpers
;
using
Siger.Middlelayer.Common.ModuleEnum
;
using
Siger.Middlelayer.Dapper.CheckTrace.Repostriories
;
using
Siger.Middlelayer.TpmRepository
;
using
Siger.Middlelayer.QmsRepository
;
using
Siger.Middlelayer.Share.Enum.ModuleEnum
;
...
...
@@ -24,6 +23,10 @@ using Siger.ApiDashboard.Utilities;
using
Siger.Middlelayer.Common.Extensions
;
using
Siger.DataSchedule.Infrastructure.Extend
;
using
Siger.ApiDashboard.Tasks
;
using
Siger.Middlelayer.QmsRepository.Response
;
using
Siger.Middlelayer.QmsRepository.Entities
;
using
Siger.Middlelayer.Repository.Extensions
;
using
siger_andon_info
=
Siger
.
Middlelayer
.
TpmRepository
.
Entities
.
siger_andon_info
;
namespace
Siger.Schedule.DashboardModule
{
...
...
@@ -259,11 +262,9 @@ namespace Siger.Schedule.DashboardModule
{
try
{
var
_traceRepostory
=
new
TraceDetailRepository
(
companyId
,
projectId
);
var
_yieldRepository
=
new
LocationYieldRepository
(
companyId
,
projectId
);
var
data
=
_traceRepostory
.
GetSnTracePageList
(
new
List
<
int
>
{
},
0
,
0
,
0
,
0
,
""
,
""
,
new
List
<
long
>
{
},
begin
.
ToString
(
ParameterConstant
.
DateTimeFormat
),
end
.
ToString
(
ParameterConstant
.
DateTimeFormat
),
1
,
10
,
projectId
,
"1"
,
0
).
ToList
();
var
data
=
GetSnTraceList
(
new
List
<
int
>
{
},
0
,
0
,
0
,
begin
.
ToString
(
ParameterConstant
.
DateTimeFormat
),
end
.
ToString
(
ParameterConstant
.
DateTimeFormat
),
projectId
).
ToList
();
var
lines
=
GetLine
(
projectId
).
ToList
();
foreach
(
var
line
in
lines
)
{
...
...
@@ -304,6 +305,57 @@ namespace Siger.Schedule.DashboardModule
}
}
private
IEnumerable
<
SnTrace
>
GetSnTraceList
(
List
<
int
>
sectionIds
,
int
productid
,
int
materialid
,
int
checktype
,
string
starttime
,
string
endtime
,
int
projectid
)
{
var
query
=
from
q
in
_qmsDbContext
.
siger_check_sn_trace_inspection
//join t in _context.siger_check_sn_trace_inspection on q.TraceID equals t.trace_id
where
q
.
projectid
==
productid
&&
q
.
status
==
(
int
)
RowState
.
Valid
//&& t.status == (int)RowState.Valid && q.projectid == productid
&&
q
.
check_status
==
(
int
)
SendCheckStatus
.
Completed
select
new
SnTrace
{
ID
=
q
.
trace_id
,
ProductID
=
q
.
productid
,
MaterialID
=
q
.
materialid
,
SectionID
=
q
.
sectionid
,
WorkOrder
=
q
.
workorder
,
SN
=
q
.
sn
,
Result
=
q
.
result
==
((
int
)
SendTestType
.
Unqualified
).
ToString
()
?
"NG"
:
"OK"
,
UserID
=
q
.
checking_mid
,
CreateTime
=
q
.
check_time
>
DateTime
.
MinValue
?
q
.
check_time
.
Value
:
DateTime
.
MinValue
,
RouteID
=
q
.
routeid
,
CheckType
=
q
.
check_type
,
};
Expression
<
Func
<
SnTrace
,
bool
>>
materialExpression
=
q
=>
true
;
if
(
materialid
>
0
)
{
materialExpression
=
q
=>
q
.
MaterialID
==
materialid
;
}
Expression
<
Func
<
SnTrace
,
bool
>>
sectionExpression
=
q
=>
true
;
if
(
sectionIds
.
Any
())
{
sectionExpression
=
q
=>
sectionIds
.
Contains
(
q
.
SectionID
);
}
Expression
<
Func
<
SnTrace
,
bool
>>
productExpression
=
q
=>
true
;
if
(
productid
>
0
)
{
productExpression
=
q
=>
q
.
ProductID
==
productid
;
}
Expression
<
Func
<
SnTrace
,
bool
>>
checkTypeExpression
=
q
=>
true
;
if
(
checktype
>
0
)
{
checkTypeExpression
=
q
=>
q
.
CheckType
==
checktype
;
}
Expression
<
Func
<
SnTrace
,
bool
>>
timeExpression
=
q
=>
true
;
if
(!
string
.
IsNullOrEmpty
(
starttime
)
&&
!
string
.
IsNullOrEmpty
(
endtime
))
{
timeExpression
=
q
=>
q
.
CreateTime
<=
endtime
.
ToDateTime
()
&&
q
.
CreateTime
>=
starttime
.
ToDateTime
();
}
var
expression
=
materialExpression
.
And
(
sectionExpression
).
And
(
productExpression
).
And
(
checkTypeExpression
).
And
(
timeExpression
);
return
query
.
Where
(
expression
);
}
/// <summary>
/// 设备MTTR,MTBF,停机时间,设备维护用时比
/// </summary>
...
...
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