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
24c5b8ad
Commit
24c5b8ad
authored
Jan 26, 2021
by
xin.yang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://test.siger-data.com:9000/jiawei.su/Laisi_AutoMES2
parents
2933aeb5
bf400bbc
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
33 deletions
+78
-33
taskList.vue
Html/src/view/fml/statistical_analysis/taskList.vue
+2
-0
AutomationController.cs
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
+44
-16
AutomationOperateController.cs
...s/Siger.ApiACC/Controllers/AutomationOperateController.cs
+23
-15
AutomationStateController.cs
...pis/Siger.ApiACC/Controllers/AutomationStateController.cs
+1
-0
siger_automation_fixture_tools_monitor.cs
...sitory/Entities/siger_automation_fixture_tools_monitor.cs
+4
-0
AutomationTaskListRepository.cs
...ccRepository/Repositories/AutomationTaskListRepository.cs
+1
-1
DB.script
Server/Infrastructure/Script/DB.script
+3
-1
No files found.
Html/src/view/fml/statistical_analysis/taskList.vue
View file @
24c5b8ad
...
@@ -199,6 +199,7 @@ export default {
...
@@ -199,6 +199,7 @@ export default {
{
{
title
:
"任务编号"
,
title
:
"任务编号"
,
key
:
"taskno"
,
key
:
"taskno"
,
width
:
300
},
},
{
{
title
:
"产线层级"
,
title
:
"产线层级"
,
...
@@ -304,6 +305,7 @@ export default {
...
@@ -304,6 +305,7 @@ export default {
this
.
columns1
=
this
.
$time
.
initTableTitle
(
this
.
columns1
);
this
.
columns1
=
this
.
$time
.
initTableTitle
(
this
.
columns1
);
this
.
initlevel
();
this
.
initlevel
();
this
.
iniproducts
();
this
.
iniproducts
();
this
.
search
(
1
,
10
);
},
},
methods
:
{
methods
:
{
search
(
page
,
pagesize
)
{
search
(
page
,
pagesize
)
{
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationController.cs
View file @
24c5b8ad
...
@@ -92,15 +92,23 @@ namespace Siger.ApiACC.Controllers
...
@@ -92,15 +92,23 @@ namespace Siger.ApiACC.Controllers
{
{
if
(
request
.
status
==
(
int
)
Automation
.
MachineStatus
.
Waiting
||
request
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
)
if
(
request
.
status
==
(
int
)
Automation
.
MachineStatus
.
Waiting
||
request
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
)
{
{
var
tasklist
=
_automationTaskList
.
GetList
(
f
=>
f
.
projectId
==
PID
&&
f
.
status
>=
(
int
)
TaskResultStatus
.
Cancel
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
if
(!
tasklist
.
Any
())
{
var
stationDicts
=
_sigerDict
.
GetDataByCat
(
AccDictCost
.
Automation
,
PID
);
var
stationDicts
=
_sigerDict
.
GetDataByCat
(
AccDictCost
.
Automation
,
PID
);
if
(!
stationDicts
.
Any
())
if
(!
stationDicts
.
Any
())
{
{
Logger
.
WriteLineInfo
(
$"AutoProcess 未配置设备类型字典"
);
Logger
.
WriteLineInfo
(
$"AutoProcess 未配置设备类型字典"
);
throw
new
BadRequestException
(
AccEnum
.
AutomationDictNotfound
);
throw
new
BadRequestException
(
AccEnum
.
AutomationDictNotfound
);
}
}
var
uploadStation
=
stationDicts
.
Where
(
f
=>
f
.
dkey
==
DictKeyValConst
.
UploadloadStation
);
var
uploadStations
=
uploadStation
.
Select
(
f
=>
f
.
dval
.
ToInt
()).
ToList
();
if
(!
uploadStations
.
Contains
(
machineAttr
.
station
))
{
var
tasklist
=
_automationTaskList
.
GetList
(
f
=>
f
.
projectId
==
PID
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
if
(!
tasklist
.
Any
())
{
var
section
=
_sigerProjectLevelSection
.
Get
(
f
=>
f
.
id
==
machineAttr
.
station
);
var
section
=
_sigerProjectLevelSection
.
Get
(
f
=>
f
.
id
==
machineAttr
.
station
);
if
(
section
!=
null
)
if
(
section
!=
null
)
{
{
...
@@ -110,6 +118,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -110,6 +118,7 @@ namespace Siger.ApiACC.Controllers
}
}
}
}
}
}
}
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
return
new
ObjectResult
(
CommonEnum
.
Succefull
);
}
}
else
else
...
@@ -161,7 +170,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -161,7 +170,7 @@ namespace Siger.ApiACC.Controllers
throw
new
BadRequestException
(
AccEnum
.
AutomationDictNotfound
);
throw
new
BadRequestException
(
AccEnum
.
AutomationDictNotfound
);
}
}
var
tasklist
=
_automationTaskList
.
GetList
(
f
=>
f
.
projectId
==
PID
&&
f
.
status
>=
(
int
)
TaskResultStatus
.
Cancel
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
var
tasklist
=
_automationTaskList
.
GetList
(
f
=>
f
.
projectId
==
PID
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
if
(!
tasklist
.
Any
())
if
(!
tasklist
.
Any
())
{
{
Logger
.
WriteLineInfo
(
$"LineMode Mode=1 触发自动任务检查"
);
Logger
.
WriteLineInfo
(
$"LineMode Mode=1 触发自动任务检查"
);
...
@@ -231,7 +240,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -231,7 +240,7 @@ namespace Siger.ApiACC.Controllers
}
}
//是否还有未完成任务
//是否还有未完成任务
var
taskDone
=
_automationTaskList
.
Get
(
f
=>
f
.
projectId
==
PID
&&
f
.
status
>
(
int
)
TaskResultStatus
.
Cancel
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
var
taskDone
=
_automationTaskList
.
Get
(
f
=>
f
.
projectId
==
PID
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
if
(
taskDone
!=
null
)
if
(
taskDone
!=
null
)
{
{
//还有未完成任务 退出 等待任务下发
//还有未完成任务 退出 等待任务下发
...
@@ -248,6 +257,14 @@ namespace Siger.ApiACC.Controllers
...
@@ -248,6 +257,14 @@ namespace Siger.ApiACC.Controllers
var
section
=
_sigerProjectLevelSection
.
Get
(
f
=>
f
.
id
==
taskObj
.
sectionid
);
var
section
=
_sigerProjectLevelSection
.
Get
(
f
=>
f
.
id
==
taskObj
.
sectionid
);
if
(
section
!=
null
)
if
(
section
!=
null
)
{
{
var
updownDic
=
stationDicts
.
Where
(
s
=>
s
.
dkey
==
DictKeyValConst
.
UploadloadStation
);
var
uploadStations
=
updownDic
.
Select
(
f
=>
f
.
dval
.
ToInt
()).
ToList
();
var
uploadPostion
=
uploadStations
.
Contains
(
taskObj
.
sectionid
);
if
(
uploadPostion
)
{
Logger
.
WriteLineInfo
(
$"AutoProcess 上料料工站 无需自动创建任务 "
);
break
;
}
AutoProcess
(
section
.
parentid
,
stationDicts
);
AutoProcess
(
section
.
parentid
,
stationDicts
);
}
}
break
;
break
;
...
@@ -292,11 +309,15 @@ namespace Siger.ApiACC.Controllers
...
@@ -292,11 +309,15 @@ namespace Siger.ApiACC.Controllers
var
location
=
_automationLocation
.
Get
(
f
=>
f
.
fixturetools
==
taskObj
.
fixtureguid
);
var
location
=
_automationLocation
.
Get
(
f
=>
f
.
fixturetools
==
taskObj
.
fixtureguid
);
if
(
location
==
null
)
if
(
location
==
null
)
{
{
Logger
.
WriteLineInfo
(
$"PlCfeeback 未找到该工装储位信息"
);
throw
new
BadRequestException
(
AccEnum
.
MachineDisable
);
}
location
.
ordernumber
=
taskObj
.
ordercode
;
location
.
ordernumber
=
taskObj
.
ordercode
;
location
.
productcode
=
taskObj
.
productcode
;
location
.
productid
=
taskObj
.
productid
;
location
.
sn
=
taskObj
.
sn
;
location
.
sn
=
taskObj
.
sn
;
}
}
}
}
}
else
if
(
taskObj
.
action
==
TaskAction
.
Step_LK_CJT
||
taskObj
.
action
==
TaskAction
.
Step_LK_JGZX
||
taskObj
.
action
==
TaskAction
.
Step_LK_SXLW
)
else
if
(
taskObj
.
action
==
TaskAction
.
Step_LK_CJT
||
taskObj
.
action
==
TaskAction
.
Step_LK_JGZX
||
taskObj
.
action
==
TaskAction
.
Step_LK_SXLW
)
{
{
//出库
//出库
...
@@ -304,6 +325,8 @@ namespace Siger.ApiACC.Controllers
...
@@ -304,6 +325,8 @@ namespace Siger.ApiACC.Controllers
if
(
location
==
null
)
if
(
location
==
null
)
{
{
location
.
ordernumber
=
""
;
location
.
ordernumber
=
""
;
location
.
productcode
=
""
;
location
.
productid
=
0
;
location
.
sn
=
""
;
location
.
sn
=
""
;
}
}
...
@@ -477,9 +500,10 @@ namespace Siger.ApiACC.Controllers
...
@@ -477,9 +500,10 @@ namespace Siger.ApiACC.Controllers
/// <param name="locationid">储位ID</param>
/// <param name="locationid">储位ID</param>
void
CreateTask
(
siger_automation_machine_status
machineStatus
,
TaskActionType
actionType
,
TaskAction
taskAction
,
string
guid
,
string
orderno
,
string
sn
,
string
productCode
,
int
locationid
)
void
CreateTask
(
siger_automation_machine_status
machineStatus
,
TaskActionType
actionType
,
TaskAction
taskAction
,
string
guid
,
string
orderno
,
string
sn
,
string
productCode
,
int
locationid
)
{
{
var
taskNo
=
_automationTaskList
.
CrateTaskNumber
(
Automation
.
TaskTrigerType
.
Auto
);
_automationTaskList
.
Insert
(
new
siger_automation_task_list
_automationTaskList
.
Insert
(
new
siger_automation_task_list
{
{
no
=
taskNo
,
projectId
=
PID
,
projectId
=
PID
,
sectionid
=
machineStatus
.
section
,
sectionid
=
machineStatus
.
section
,
trigger
=
TaskTrigerType
.
Auto
,
trigger
=
TaskTrigerType
.
Auto
,
...
@@ -514,7 +538,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -514,7 +538,7 @@ namespace Siger.ApiACC.Controllers
{
{
// 当前空闲设备能加工的产品
// 当前空闲设备能加工的产品
var
beats
=
_productionBeatSet
.
GetList
(
f
=>
f
.
projectID
==
PID
&&
f
.
machineID
==
machine
);
var
beats
=
_productionBeatSet
.
GetList
(
f
=>
f
.
projectID
==
PID
&&
f
.
machineID
==
machine
);
var
productIds
=
beats
.
Select
(
f
=>
f
.
product_name
.
ToInt
()).
ToList
();
var
productIds
=
beats
.
Select
(
f
=>
f
.
product_name
.
ToInt
()).
Distinct
().
ToList
();
// 取产品交期最近的订单
// 取产品交期最近的订单
var
planOrder
=
_automationFixtureToolsProduct
.
GetDeliveryOrder
(
productIds
,
PID
);
var
planOrder
=
_automationFixtureToolsProduct
.
GetDeliveryOrder
(
productIds
,
PID
);
...
@@ -525,18 +549,22 @@ namespace Siger.ApiACC.Controllers
...
@@ -525,18 +549,22 @@ namespace Siger.ApiACC.Controllers
}
}
var
order
=
planOrder
.
FirstOrDefault
();
var
order
=
planOrder
.
FirstOrDefault
();
var
beatset
=
beats
.
Where
(
f
=>
f
.
product_name
==
order
.
productId
.
ToString
());
//TODO 20210126
//var beatset = beats.Where(f => f.product_name == order.productId.ToString());
//var routeIds = beatset.Select(s => s.id).ToList();
//var location = _automationLocation.GetList(f => f.projectId == PID && f.ordernumber== order.ordernumber && productIds.Contains(f.productid));
//if (!location.Any())
//{
// Logger.WriteLineInfo($"SelectLocation 未找到最近交期订单号{order.ordernumber} 对应产品 {order.productName}的储位信息");
// return null;
var
location
=
_automationLocation
.
GetList
(
f
=>
f
.
projectId
==
PID
&&
f
.
ordernumber
==
order
.
ordernumber
&&
productIds
.
Contains
(
f
.
productid
));
//}
//储位有SN 工件
if
(
location
==
null
)
var
location
=
_automationLocation
.
GetList
(
f
=>
f
.
projectId
==
PID
&&
productIds
.
Contains
(
f
.
productid
));
{
var
hasSnloaction
=
location
.
Where
(
f
=>!
string
.
IsNullOrEmpty
(
f
.
sn
));
Logger
.
WriteLineInfo
(
$"SelectLocation 未找到最近交期订单号
{
order
.
ordernumber
}
对应产品
{
order
.
productName
}
的储位信息"
);
if
(!
hasSnloaction
.
Any
())
return
null
;
return
null
;
}
return
location
.
FirstOrDefault
();
return
location
.
FirstOrDefault
();
}
}
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationOperateController.cs
View file @
24c5b8ad
...
@@ -103,7 +103,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -103,7 +103,7 @@ namespace Siger.ApiACC.Controllers
var
machintAttr
=
_sigerProjectMachineAttribution
.
Get
(
f
=>
f
.
station
==
section
.
id
);
var
machintAttr
=
_sigerProjectMachineAttribution
.
Get
(
f
=>
f
.
station
==
section
.
id
);
if
(
machintAttr
==
null
)
if
(
machintAttr
==
null
)
{
{
Logger
.
WriteLineInfo
(
$"GetloadStation 未配置
清洗
工站字典"
);
Logger
.
WriteLineInfo
(
$"GetloadStation 未配置工站字典"
);
continue
;
continue
;
}
}
var
loadStatus
=
(
int
)
Automation
.
MachineStatus
.
Waiting
;
var
loadStatus
=
(
int
)
Automation
.
MachineStatus
.
Waiting
;
...
@@ -118,8 +118,10 @@ namespace Siger.ApiACC.Controllers
...
@@ -118,8 +118,10 @@ namespace Siger.ApiACC.Controllers
section
=
section
.
id
,
section
=
section
.
id
,
updatetime
=
DateTime
.
Now
updatetime
=
DateTime
.
Now
});
});
}
else
}
else
{
{
loadStatus
=
machineStatus
.
status
;
loadStatus
=
machineStatus
.
status
;
}
}
data
.
Add
(
new
ResponseLoadStation
{
data
.
Add
(
new
ResponseLoadStation
{
...
@@ -128,6 +130,8 @@ namespace Siger.ApiACC.Controllers
...
@@ -128,6 +130,8 @@ namespace Siger.ApiACC.Controllers
status
=
loadStatus
status
=
loadStatus
});
});
}
}
_unitOfWork
.
Commit
();
return
new
ObjectResult
(
data
);
return
new
ObjectResult
(
data
);
}
}
...
@@ -145,14 +149,14 @@ namespace Siger.ApiACC.Controllers
...
@@ -145,14 +149,14 @@ namespace Siger.ApiACC.Controllers
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
section
);
var
monitor
=
_automationFixtureMonitor
.
Get
(
f
=>
f
.
section
==
section
);
var
result
=
new
ResponsePlanlFixtureInfo
var
result
=
new
ResponsePlanlFixtureInfo
{
{
OrderNumber
=
monitor
.
ordernumber
,
OrderNumber
=
monitor
!=
null
?
monitor
.
ordernumber
:
""
,
FixtureGuid
=
monitor
.
fixtureguid
,
FixtureGuid
=
monitor
!=
null
?
monitor
.
fixtureguid
:
""
,
FixtureName
=
monitor
.
fixturename
,
FixtureName
=
monitor
!=
null
?
monitor
.
fixturename
:
""
,
ProductCode
=
monitor
.
productCode
,
ProductCode
=
monitor
!=
null
?
monitor
.
productCode
:
""
,
ProductName
=
monitor
.
productName
,
ProductName
=
monitor
!=
null
?
monitor
.
productName
:
""
,
Sn
=
monitor
.
sn
,
Sn
=
monitor
!=
null
?
monitor
.
sn
:
""
,
status
=
monitor
.
status
,
status
=
monitor
!=
null
?
monitor
.
status
:(
int
)
Automation
.
MachineStatus
.
Waiting
,
Location
=
monitor
.
locationId
,
Location
=
monitor
!=
null
?
monitor
.
locationId
:
0
,
};
};
return
new
ObjectResult
(
result
);
return
new
ObjectResult
(
result
);
}
}
...
@@ -200,7 +204,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -200,7 +204,7 @@ namespace Siger.ApiACC.Controllers
section
=
loading
.
section
,
section
=
loading
.
section
,
machineid
=
machineAttr
.
machine
,
machineid
=
machineAttr
.
machine
,
projectId
=
ProjectId
,
projectId
=
ProjectId
,
status
=
(
int
)
Automation
.
MachineStatus
.
Produce
,
status
=
(
int
)
Automation
.
MachineStatus
.
Waiting
,
updatetime
=
DateTime
.
Now
updatetime
=
DateTime
.
Now
});
});
}
}
...
@@ -281,6 +285,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -281,6 +285,7 @@ namespace Siger.ApiACC.Controllers
createtime
=
DateTime
.
Now
,
createtime
=
DateTime
.
Now
,
updatetime
=
DateTime
.
Now
,
updatetime
=
DateTime
.
Now
,
status
=(
int
)
Automation
.
MachineStatus
.
Produce
,
status
=(
int
)
Automation
.
MachineStatus
.
Produce
,
productId
=
plan
.
product_id
,
productCode
=
plan
.
product_code
,
productCode
=
plan
.
product_code
,
productName
=
plan
.
product_name
,
productName
=
plan
.
product_name
,
ordernumber
=
plandts
.
OrderNumber
,
ordernumber
=
plandts
.
OrderNumber
,
...
@@ -293,6 +298,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -293,6 +298,7 @@ namespace Siger.ApiACC.Controllers
monitor
.
section
=
loading
.
section
;
monitor
.
section
=
loading
.
section
;
monitor
.
updatetime
=
DateTime
.
Now
;
monitor
.
updatetime
=
DateTime
.
Now
;
monitor
.
status
=
(
int
)
Automation
.
MachineStatus
.
Produce
;
monitor
.
status
=
(
int
)
Automation
.
MachineStatus
.
Produce
;
monitor
.
productId
=
plan
.
product_id
;
monitor
.
productName
=
plan
.
product_name
;
monitor
.
productName
=
plan
.
product_name
;
monitor
.
productCode
=
plan
.
product_code
;
monitor
.
productCode
=
plan
.
product_code
;
monitor
.
ordernumber
=
plandts
.
OrderNumber
;
monitor
.
ordernumber
=
plandts
.
OrderNumber
;
...
@@ -334,10 +340,10 @@ namespace Siger.ApiACC.Controllers
...
@@ -334,10 +340,10 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
AccEnum
.
MachineOnFree
);
throw
new
BadRequestException
(
AccEnum
.
MachineOnFree
);
}
}
if
(
machineStatus
.
status
==
(
int
)
Automation
.
MachineStatus
.
Complated
)
//
if (machineStatus.status == (int)Automation.MachineStatus.Complated)
{
//
{
throw
new
BadRequestException
(
AccEnum
.
MachineProCompalate
);
//
throw new BadRequestException(AccEnum.MachineProCompalate);
}
//
}
if
(!
_automationTaskList
.
CanTask
(
ProjectId
,
assemble
.
section
))
if
(!
_automationTaskList
.
CanTask
(
ProjectId
,
assemble
.
section
))
{
{
...
@@ -349,6 +355,8 @@ namespace Siger.ApiACC.Controllers
...
@@ -349,6 +355,8 @@ namespace Siger.ApiACC.Controllers
{
{
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
throw
new
BadRequestException
(
AccEnum
.
MonitorNotfound
);
}
}
//移出 上料位
monitor
.
status
=
(
int
)
Automation
.
MachineStatus
.
Waiting
;
...
@@ -368,7 +376,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -368,7 +376,7 @@ namespace Siger.ApiACC.Controllers
completetime
=
DateTime
.
MinValue
,
completetime
=
DateTime
.
MinValue
,
trigger
=
Automation
.
TaskTrigerType
.
Manual
,
trigger
=
Automation
.
TaskTrigerType
.
Manual
,
projectId
=
ProjectId
,
projectId
=
ProjectId
,
productid
=
0
,
productid
=
monitor
.
productId
,
sn
=
monitor
.
sn
,
sn
=
monitor
.
sn
,
ordercode
=
monitor
.
ordernumber
,
ordercode
=
monitor
.
ordernumber
,
fixtureguid
=
monitor
.
fixtureguid
,
fixtureguid
=
monitor
.
fixtureguid
,
...
...
Server/Apis/Siger.ApiACC/Controllers/AutomationStateController.cs
View file @
24c5b8ad
...
@@ -69,6 +69,7 @@ namespace Siger.ApiACC.Controllers
...
@@ -69,6 +69,7 @@ namespace Siger.ApiACC.Controllers
item
.
sn
=
fixture
.
sn
;
item
.
sn
=
fixture
.
sn
;
item
.
fixtureCode
=
fixture
.
fixtureguid
;
item
.
fixtureCode
=
fixture
.
fixtureguid
;
item
.
fixtureName
=
fixture
.
fixturename
;
item
.
fixtureName
=
fixture
.
fixturename
;
item
.
status
=
fixture
.
status
;
}
}
result
.
Add
(
item
);
result
.
Add
(
item
);
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Entities/siger_automation_fixture_tools_monitor.cs
View file @
24c5b8ad
...
@@ -40,6 +40,10 @@ namespace Siger.Middlelayer.AccRepository.Entities
...
@@ -40,6 +40,10 @@ namespace Siger.Middlelayer.AccRepository.Entities
public
DateTime
updatetime
{
get
;
set
;
}
public
DateTime
updatetime
{
get
;
set
;
}
public
string
ordernumber
{
get
;
set
;
}
public
string
ordernumber
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 产品ID
/// </summary>
public
int
productId
{
get
;
set
;
}
/// <summary>
///
///
/// </summary>
/// </summary>
public
string
productCode
{
get
;
set
;
}
public
string
productCode
{
get
;
set
;
}
...
...
Server/Infrastructure/Repositories/Siger.Middlelayer.AccRepository/Repositories/AutomationTaskListRepository.cs
View file @
24c5b8ad
...
@@ -27,7 +27,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
...
@@ -27,7 +27,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
public
bool
CanTask
(
int
projectId
,
int
section
)
public
bool
CanTask
(
int
projectId
,
int
section
)
{
{
var
taskObj
=
_context
.
siger_automation_task_list
.
FirstOrDefault
(
f
=>
f
.
projectId
==
projectId
&&
f
.
status
>=
(
int
)
TaskResultStatus
.
Cancel
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
var
taskObj
=
_context
.
siger_automation_task_list
.
FirstOrDefault
(
f
=>
f
.
projectId
==
projectId
&&
f
.
status
<
(
int
)
TaskResultStatus
.
Complated
);
if
(
taskObj
==
null
)
if
(
taskObj
==
null
)
return
true
;
return
true
;
...
...
Server/Infrastructure/Script/DB.script
View file @
24c5b8ad
...
@@ -267,6 +267,7 @@ CREATE TABLE IF NOT EXISTS `siger_automation_fixture_tools_product` (
...
@@ -267,6 +267,7 @@ CREATE TABLE IF NOT EXISTS `siger_automation_fixture_tools_product` (
-- ----------------------------
-- ----------------------------
CREATE TABLE IF NOT EXISTS `siger_automation_location` (
CREATE TABLE IF NOT EXISTS `siger_automation_location` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`id` int(11) NOT NULL AUTO_INCREMENT,
`guid` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`locationid` int(11) NOT NULL DEFAULT 0 COMMENT '储位位置',
`locationid` int(11) NOT NULL DEFAULT 0 COMMENT '储位位置',
`fixturetools` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装GUID',
`fixturetools` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '工装GUID',
`productid` int(11) NULL DEFAULT 0 COMMENT '产品ID',
`productid` int(11) NULL DEFAULT 0 COMMENT '产品ID',
...
@@ -401,7 +402,7 @@ CREATE TABLE `siger_automation_produce_history` (
...
@@ -401,7 +402,7 @@ CREATE TABLE `siger_automation_produce_history` (
`statusid` int(11) NOT NULL DEFAULT 0 COMMENT '设备状态ID',
`statusid` int(11) NOT NULL DEFAULT 0 COMMENT '设备状态ID',
`section` int(11) NOT NULL DEFAULT 0 COMMENT '产线ID',
`section` int(11) NOT NULL DEFAULT 0 COMMENT '产线ID',
`projectid` int(11) NOT NULL DEFAULT 0,
`projectid` int(11) NOT NULL DEFAULT 0,
`productid` int(1
) NOT NULL DEFAULT 1
COMMENT '产品ID',
`productid` int(1
1) NULL DEFAULT 0
COMMENT '产品ID',
`productcode` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品编号',
`productcode` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品编号',
`productname` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品名称',
`productname` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品名称',
`locationid` int(11) NOT NULL DEFAULT 0 COMMENT '储位ID',
`locationid` int(11) NOT NULL DEFAULT 0 COMMENT '储位ID',
...
@@ -432,6 +433,7 @@ CREATE TABLE `siger_automation_fixture_tools_moniter` (
...
@@ -432,6 +433,7 @@ CREATE TABLE `siger_automation_fixture_tools_moniter` (
`createtime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间',
`createtime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间',
`updatetime` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
`updatetime` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
`ordernumber` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工令单',
`ordernumber` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工令单',
`productid` int(11) NULL DEFAULT 0 COMMENT '产品ID',
`productCode` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品CODE',
`productCode` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品CODE',
`productName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品名称',
`productName` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品名称',
`locationId` int(11) NOT NULL DEFAULT 0,
`locationId` int(11) NOT NULL DEFAULT 0,
...
...
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