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
f222fca0
Commit
f222fca0
authored
Jan 22, 2021
by
jiawei.su
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://test.siger-data.com:9000/jiawei.su/Laisi_AutoMES2
parents
1000243c
c9e15cb6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
62 deletions
+88
-62
collection.vue
Html/src/view/qms/manual/collection.vue
+3
-6
AutomationLocationController.cs
.../Siger.ApiACC/Controllers/AutomationLocationController.cs
+1
-2
SectionPropertyController.cs
...pis/Siger.ApiACC/Controllers/SectionPropertyController.cs
+60
-0
ManualCollectionController.cs
...is/Siger.ApiQMS/Controllers/ManualCollectionController.cs
+16
-32
SendTestCollectionController.cs
.../Siger.ApiQMS/Controllers/SendTestCollectionController.cs
+8
-22
No files found.
Html/src/view/qms/manual/collection.vue
View file @
f222fca0
...
...
@@ -54,7 +54,7 @@
@
click=
"materialchange(index)"
:class=
"
{ active: d == index }"
>
{{
item
.
name
+
"【"
+
item
.
pn
+
"】"
}}
{{
item
.
name
}}
</p>
</div>
</div>
...
...
@@ -672,7 +672,7 @@ export default {
axios
.
request
({
url
:
"
/acc/AutomationOperate/GetloadStation
"
"
http://localhost:8105/acc/SectionProperty/GetSections
"
,
params
,
method
:
"get"
,
...
...
@@ -730,10 +730,7 @@ export default {
axios
.
request
({
url
:
"/qms/ManufacturingMaterial/GetMaterialByCell?productId="
+
productid
+
"§ion="
+
sectionid
,
"/acc/SectionProperty/GetRouteByProduct?productId="
+
productid
,
method
:
"get"
,
})
.
then
((
res
)
=>
{
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationLocationController.cs
View file @
f222fca0
...
...
@@ -23,7 +23,6 @@ namespace Siger.ApiACC.Controllers
private
readonly
IAutomationFixtureToolsCategoryRepository
_toolsCategoryRepository
;
private
readonly
IAutomationFixtureToolsRepository
_toolsRepository
;
private
readonly
IAutomationLocationRepository
_autoLocationRepository
;
private
readonly
ISigerTrMaterialsRepository
_materialsRepository
;
public
AutomationLocationController
(
IUnitOfWork
unitOfWork
,
IAutomationFixtureToolsCategoryRepository
toolsCategoryRepository
,
IAutomationFixtureToolsRepository
toolsRepository
,
IAutomationLocationRepository
autoLocationRepository
)
...
...
@@ -90,7 +89,7 @@ namespace Siger.ApiACC.Controllers
[
HttpPost
]
public
IActionResult
Update
([
FromBody
]
RequestUpdateAutomationLocation
req
)
{
if
(
string
.
IsNullOrEmpty
(
req
.
locationid
)
||
string
.
IsNullOrEmpty
(
req
.
fixturetoolid
)
||
string
.
IsNullOrEmpty
(
req
.
materialid
)
)
if
(
string
.
IsNullOrEmpty
(
req
.
locationid
)
||
string
.
IsNullOrEmpty
(
req
.
fixturetoolid
))
{
throw
new
BadRequestException
(
RequestEnum
.
ParameterMiss
);
}
...
...
Server/Apis/Siger.ApiACC/Controllers/SectionPropertyController.cs
0 → 100644
View file @
f222fca0
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
;
namespace
Siger.ApiACC.Controllers
{
public
class
SectionPropertyController
:
BaseController
{
private
readonly
IUnitOfWork
_unitOfWork
;
private
readonly
IAutomationSectionPropertyRepository
_sectionPropertyRepository
;
private
readonly
ISigerProjectLevelSectionRepository
_levelSectionRepository
;
private
readonly
IProductionBeatSetRepository
_beatSetRepository
;
public
SectionPropertyController
(
IUnitOfWork
unitOfWork
,
IAutomationSectionPropertyRepository
sectionPropertyRepository
,
ISigerProjectLevelSectionRepository
levelSectionRepository
,
IProductionBeatSetRepository
beatSetRepository
)
{
_unitOfWork
=
unitOfWork
;
_sectionPropertyRepository
=
sectionPropertyRepository
;
_levelSectionRepository
=
levelSectionRepository
;
_beatSetRepository
=
beatSetRepository
;
}
[
HttpGet
]
public
IActionResult
GetSections
(
string
line
)
{
var
sectionIds
=
_levelSectionRepository
.
GetLevelSectionIds
(
line
.
ToInt
(),
ProjectId
);
var
sectionids
=
_sectionPropertyRepository
.
GetList
(
q
=>
q
.
projectId
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
sectionIds
.
Contains
(
q
.
sectionid
)).
Select
(
q
=>
q
.
sectionid
).
ToList
();
var
sections
=
_levelSectionRepository
.
GetList
(
q
=>
q
.
projectid
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
sectionids
.
Contains
(
q
.
id
)).
Select
(
q
=>
new
{
q
.
id
,
q
.
title
}).
ToList
();
return
new
ObjectResult
(
sections
);
}
public
IActionResult
GetRouteByProduct
(
string
productId
)
{
var
list
=
_beatSetRepository
.
GetList
(
q
=>
q
.
projectID
==
ProjectId
&&
q
.
status
==
(
int
)
RowState
.
Valid
&&
q
.
product_name
.
ToInt
()
==
productId
.
ToInt
()).
Select
(
q
=>
new
{
q
.
id
,
name
=
q
.
route_name
,
q
.
route_number
}).
ToList
();
return
new
ObjectResult
(
list
);
}
}
}
Server/Apis/Siger.ApiQMS/Controllers/ManualCollectionController.cs
View file @
f222fca0
...
...
@@ -165,21 +165,7 @@ namespace Siger.ApiQMS.Controllers
traceResult
=
"NG"
;
}
}
//插入大数据库的trace表
var
trace
=
new
SnTrace
{
MaterialID
=
req
.
materialid
.
ToInt
(),
ProductID
=
req
.
productid
,
SectionID
=
req
.
sectionid
,
MachineID
=
machine
?.
id
??
0
,
WorkOrder
=
req
.
workorder
??
""
,
SN
=
req
.
sn
??
""
,
Result
=
traceResult
,
UserID
=
UserId
,
RouteID
=
req
.
routeid
.
ToInt
(),
CreateTime
=
DateTime
.
Now
,
CheckType
=
req
.
checktype
};
var
insertDetailList
=
new
List
<
SnTraceDetailList
>();
foreach
(
var
index
in
indexs
)
{
...
...
@@ -265,6 +251,7 @@ namespace Siger.ApiQMS.Controllers
{
req
.
result
=
((
int
)
SendTestType
.
Unqualified
).
ToString
();
}
var
nowTime
=
DateTime
.
Now
;
//插入中间层库的trace表
var
inspection
=
new
siger_check_sn_trace_inspection
{
...
...
@@ -279,9 +266,9 @@ namespace Siger.ApiQMS.Controllers
check_status
=
(
int
)
SendCheckStatus
.
Completed
,
result
=
req
.
result
,
send_mid
=
UserId
,
send_time
=
trace
.
Create
Time
,
send_time
=
now
Time
,
check_mid
=
UserId
,
check_time
=
trace
.
Create
Time
,
check_time
=
now
Time
,
inspection_type
=
(
int
)
InspectionType
.
ManualCollection
,
projectid
=
ProjectId
,
reason
=
req
.
reason
??
""
,
...
...
@@ -305,7 +292,7 @@ namespace Siger.ApiQMS.Controllers
LowerLimit
=
detail
.
LowerLimit
,
UpperLimit
=
detail
.
UpperLimit
,
projectid
=
ProjectId
,
CreateTime
=
trace
.
Create
Time
CreateTime
=
now
Time
};
_traceDetailRepository
.
Insert
(
model
);
}
...
...
@@ -314,7 +301,7 @@ namespace Siger.ApiQMS.Controllers
{
try
{
AddSnList
(
req
.
materialid
.
ToInt
(),
trace
,
product
.
code
,
section
.
parentid
);
//把二维码插入到 sn_list表
AddSnList
(
req
.
materialid
.
ToInt
(),
inspection
,
product
.
code
,
section
.
parentid
);
//把二维码插入到 sn_list表
var
abnormalCheckHelper
=
new
AbnormalCheckHelper
(
_unitOfWork
,
_abnormalRuleRepository
,
_projectUserRepository
,
_traceDetailRepository
,
_inspectStandard
,
_traceInspectionRepository
,
_sigerDict
,
CompanyId
,
ProjectId
,
UserId
);
...
...
@@ -764,12 +751,9 @@ namespace Siger.ApiQMS.Controllers
req
.
result
=
((
int
)
SendTestType
.
Unqualified
).
ToString
();
}
else
{
inspection
.
result
=
req
.
result
;
inspection
.
quantity
=
req
.
quantity
.
ToInt
();
_traceInspectionRepository
.
Update
(
inspection
);
}
inspection
.
result
=
req
.
result
;
inspection
.
quantity
=
req
.
quantity
.
ToInt
();
_traceInspectionRepository
.
Update
(
inspection
);
foreach
(
var
delDetail
in
delTraceDetails
)
{
...
...
@@ -808,18 +792,18 @@ namespace Siger.ApiQMS.Controllers
#
endregion
}
private
void
AddSnList
(
int
materialid
,
SnTrace
trace
,
string
code
,
int
lineId
)
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
));
t
.
SN
==
trace
.
sn
&&
!
string
.
IsNullOrWhiteSpace
(
trace
.
sn
));
if
(
snEntity
==
null
)
{
var
stateCode
=
"000"
;
var
eventNoObj
=
_snListRepository
.
GetEventNoByResult
(
trace
.
SN
,
ProjectId
);
var
eventNoObj
=
_snListRepository
.
GetEventNoByResult
(
trace
.
sn
,
ProjectId
);
if
(
eventNoObj
!=
null
)
{
//出站信息获取
var
outObj
=
_snListRepository
.
GetOutStationByEventNo
(
eventNoObj
.
EventNo
,
trace
.
SectionID
,
ProjectId
);
var
outObj
=
_snListRepository
.
GetOutStationByEventNo
(
eventNoObj
.
EventNo
,
trace
.
sectionid
,
ProjectId
);
if
(
outObj
!=
null
)
{
stateCode
=
outObj
.
ResultStatus
;
...
...
@@ -829,12 +813,12 @@ namespace Siger.ApiQMS.Controllers
t
.
id
==
materialid
);
var
snListObj
=
new
siger_check_sn_list
{
SN
=
trace
.
SN
,
SN
=
trace
.
sn
,
BatchNumber
=
""
,
ProductID
=
trace
.
ProductID
,
ProductID
=
trace
.
productid
,
ProductCode
=
code
,
LineID
=
lineId
,
WorkOrder
=
trace
.
WorkO
rder
,
WorkOrder
=
trace
.
worko
rder
,
MaterialID
=
material
?.
id
??
0
,
PartNumber
=
material
?.
pn
??
""
,
StateCode
=
stateCode
,
...
...
Server/Apis/Siger.ApiQMS/Controllers/SendTestCollectionController.cs
View file @
f222fca0
...
...
@@ -342,20 +342,6 @@ namespace Siger.ApiQMS.Controllers
var
machine
=
_inspectStandard
.
GetMachineBySectionId
(
sendTest
.
sectionid
,
ProjectId
);
var
trace
=
new
SnTrace
{
MaterialID
=
sendTest
.
materialid
,
ProductID
=
sendTest
.
productid
,
SectionID
=
sendTest
.
sectionid
,
MachineID
=
machine
?.
id
??
0
,
WorkOrder
=
""
,
SN
=
sendTest
.
sn
??
""
,
Result
=
(
result
==
(
int
)
SendTestType
.
Qalified
||
result
==
(
int
)
SendTestType
.
DeviationRelease
)
?
"OK"
:
"NG"
,
UserID
=
UserId
,
RouteID
=
sendTest
.
routeid
,
CreateTime
=
DateTime
.
Now
,
CheckType
=
sendTest
.
check_type
};
var
insertDetailList
=
new
List
<
SnTraceDetailList
>();
foreach
(
var
index
in
indexs
)
{
...
...
@@ -490,7 +476,7 @@ namespace Siger.ApiQMS.Controllers
{
try
{
AddSnList
(
sendTest
,
trace
);
AddSnList
(
sendTest
);
var
abnormalCheckHelper
=
new
AbnormalCheckHelper
(
_unitOfWork
,
_abnormalRuleRepository
,
_projectUserRepository
,
_traceDetailRepository
,
_inspectStandard
,
_traceInspectionRepository
,
_sigerDict
,
CompanyId
,
ProjectId
,
UserId
);
...
...
@@ -1035,16 +1021,16 @@ namespace Siger.ApiQMS.Controllers
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
}
private
void
AddSnList
(
siger_check_sn_trace_inspection
sendTest
,
SnTrace
trace
)
private
void
AddSnList
(
siger_check_sn_trace_inspection
sendTest
)
{
var
snEntity
=
_snListRepository
.
Get
(
t
=>
t
.
projectid
==
ProjectId
&&
t
.
status
==
(
int
)
RowState
.
Valid
&&
t
.
SN
==
trace
.
SN
&&
!
string
.
IsNullOrWhiteSpace
(
trace
.
SN
));
t
.
SN
==
sendTest
.
sn
&&
!
string
.
IsNullOrWhiteSpace
(
sendTest
.
sn
));
var
stateCode
=
"000"
;
var
eventNoObj
=
_snListRepository
.
GetEventNoByResult
(
trace
.
SN
,
ProjectId
);
var
eventNoObj
=
_snListRepository
.
GetEventNoByResult
(
sendTest
.
sn
,
ProjectId
);
if
(
eventNoObj
!=
null
)
{
//出站信息获取
var
outObj
=
_snListRepository
.
GetOutStationByEventNo
(
eventNoObj
.
EventNo
,
trace
.
SectionID
,
ProjectId
);
var
outObj
=
_snListRepository
.
GetOutStationByEventNo
(
eventNoObj
.
EventNo
,
sendTest
.
sectionid
,
ProjectId
);
if
(
outObj
!=
null
)
{
stateCode
=
outObj
.
ResultStatus
;
...
...
@@ -1062,12 +1048,12 @@ namespace Siger.ApiQMS.Controllers
{
var
snListObj
=
new
siger_check_sn_list
{
SN
=
trace
.
SN
??
""
,
SN
=
sendTest
.
sn
??
""
,
BatchNumber
=
""
,
ProductID
=
trace
.
ProductID
,
ProductID
=
sendTest
.
productid
,
ProductCode
=
product
.
code
,
LineID
=
section
.
parentid
,
WorkOrder
=
trace
.
WorkO
rder
,
WorkOrder
=
sendTest
.
worko
rder
,
MaterialID
=
material
?.
id
??
0
,
PartNumber
=
material
?.
pn
??
""
,
StateCode
=
stateCode
,
...
...
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