Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
JunmpPoliceStation
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
zxw
JunmpPoliceStation
Commits
c734d17c
Commit
c734d17c
authored
Dec 29, 2022
by
zxw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单警柜切换模式
物资详情换orgid 第三方停启用状态 第三方批量完成打印单 统计导出调整
parent
4366ac90
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
139 行增加
和
25 行删除
+139
-25
CabinetController.cs
JunmpPoliceStation/Controllers/CabinetController.cs
+10
-2
InventoryController.cs
JunmpPoliceStation/Controllers/InventoryController.cs
+11
-4
OrganizationController.cs
JunmpPoliceStation/Controllers/OrganizationController.cs
+32
-5
PrintController.cs
JunmpPoliceStation/Controllers/PrintController.cs
+71
-1
TjController.cs
JunmpPoliceStation/Controllers/TjController.cs
+15
-13
没有找到文件。
JunmpPoliceStation/Controllers/CabinetController.cs
View file @
c734d17c
...
@@ -274,7 +274,7 @@ namespace JunmpPoliceStation.Controllers
...
@@ -274,7 +274,7 @@ namespace JunmpPoliceStation.Controllers
/// <param name="jdata"></param>
/// <param name="jdata"></param>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
(
"ChangeCabinetType"
)]
[
HttpPost
(
"ChangeCabinetType"
)]
[
NoSign
]
public
async
Task
<
HttpResponseMessage
>
ChangeCabinetType
([
FromBody
]
JObject
jdata
)
public
async
Task
<
HttpResponseMessage
>
ChangeCabinetType
([
FromBody
]
JObject
jdata
)
{
{
return
await
Task
.
Run
(()
=>
return
await
Task
.
Run
(()
=>
...
@@ -317,12 +317,20 @@ namespace JunmpPoliceStation.Controllers
...
@@ -317,12 +317,20 @@ namespace JunmpPoliceStation.Controllers
var
innerInv
=
updateInv
.
Where
(
x
=>
x
.
CurrentState
==
3
).
ToList
();
var
innerInv
=
updateInv
.
Where
(
x
=>
x
.
CurrentState
==
3
).
ToList
();
if
(
innerInv
.
Count
>
0
)
if
(
innerInv
.
Count
>
0
)
{
{
return
JsonManager
.
SimpleStatusResponse
(
ResultCode
.
CABINET_INVENTORY_EXIST
);
//return JsonManager.SimpleStatusResponse(ResultCode.CABINET_INVENTORY_EXIST);
//清除物资绑定
foreach
(
var
inventory
in
innerInv
)
{
inventory
.
CabinetId
=
null
;
inventory
.
CurrentState
=
8
;
updateInvs
.
Add
(
inventory
);
}
}
}
var
outInv
=
updateInv
.
Where
(
x
=>
x
.
CurrentState
==
7
).
ToList
();
var
outInv
=
updateInv
.
Where
(
x
=>
x
.
CurrentState
==
7
).
ToList
();
foreach
(
var
Inv
in
outInv
)
foreach
(
var
Inv
in
outInv
)
{
{
Inv
.
CabinetId
=
null
;
Inv
.
CabinetId
=
null
;
Inv
.
CurrentState
=
8
;
updateInvs
.
Add
(
Inv
);
updateInvs
.
Add
(
Inv
);
}
}
}
}
...
...
JunmpPoliceStation/Controllers/InventoryController.cs
View file @
c734d17c
...
@@ -9222,11 +9222,11 @@ namespace JunmpPoliceStation.Controllers
...
@@ -9222,11 +9222,11 @@ namespace JunmpPoliceStation.Controllers
{
{
if
(
entity
.
level
==
"本级"
)
if
(
entity
.
level
==
"本级"
)
{
{
expression
=
t
=>
t
.
WarehouseCodeNavigation
.
Orgization
Id
.
Equals
(
OrgId
);
expression
=
t
=>
t
.
Org
Id
.
Equals
(
OrgId
);
}
}
else
else
{
{
expression
=
t
=>
dataList
.
Select
(
c
=>
c
.
Id
).
Contains
(
t
.
WarehouseCodeNavigation
.
Orgization
Id
);
expression
=
t
=>
dataList
.
Select
(
c
=>
c
.
Id
).
Contains
(
t
.
Org
Id
);
}
}
}
}
else
else
...
@@ -9289,11 +9289,18 @@ namespace JunmpPoliceStation.Controllers
...
@@ -9289,11 +9289,18 @@ namespace JunmpPoliceStation.Controllers
expression
=
LambdaExtensions
.
AndAlso
(
expression
,
t
=>
t
.
CurrentState
!=
6
&&
t
.
IsFixed
==
true
);
expression
=
LambdaExtensions
.
AndAlso
(
expression
,
t
=>
t
.
CurrentState
!=
6
&&
t
.
IsFixed
==
true
);
break
;
break
;
}
}
case
"单警柜装备"
:
case
"单警柜中"
:
case
"单警柜中"
:
{
{
expression
=
LambdaExtensions
.
AndAlso
(
expression
,
t
=>
t
.
CurrentState
==
3
||
t
.
CurrentState
==
7
);
expression
=
LambdaExtensions
.
AndAlso
(
expression
,
t
=>
t
.
CurrentState
==
3
||
t
.
CurrentState
==
7
);
break
;
break
;
}
}
case
"仓库装备"
:
{
//(不包括单警柜的装备)
expression
=
LambdaExtensions
.
AndAlso
(
expression
,
t
=>
t
.
CurrentState
!=
3
&&
t
.
CurrentState
!=
7
);
break
;
}
default
:
default
:
break
;
break
;
}
}
...
@@ -9399,8 +9406,8 @@ namespace JunmpPoliceStation.Controllers
...
@@ -9399,8 +9406,8 @@ namespace JunmpPoliceStation.Controllers
equipment
.
EquipmentCode
,
equipment
.
EquipmentCode
,
warehouseName
=
equipment
.
WarehouseCodeNavigation
?.
Name
,
warehouseName
=
equipment
.
WarehouseCodeNavigation
?.
Name
,
equipment
.
WarehouseCode
,
equipment
.
WarehouseCode
,
equipment
.
WarehouseCodeNavigation
?.
Orgization
?.
Name
,
equipment
.
Org
?.
Name
,
equipment
.
WarehouseCodeNavigation
?.
Orgization
Id
,
equipment
.
Org
Id
,
supplierName
=
equipment
.
SupplierCodeNavigation
?.
Name
,
supplierName
=
equipment
.
SupplierCodeNavigation
?.
Name
,
equipment
.
SupplierCode
,
equipment
.
SupplierCode
,
cabinetID
=
equipment
.
Cabinet
?.
Id
,
cabinetID
=
equipment
.
Cabinet
?.
Id
,
...
...
JunmpPoliceStation/Controllers/OrganizationController.cs
View file @
c734d17c
...
@@ -16,6 +16,9 @@ using System.Linq.Expressions;
...
@@ -16,6 +16,9 @@ using System.Linq.Expressions;
using
System.Net.Http
;
using
System.Net.Http
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
JmpCommon.Tools
;
using
JmpCommon.Tools
;
using
System.Configuration
;
using
Microsoft.Extensions.Configuration
;
using
Microsoft.Extensions.DependencyInjection
;
namespace
JunmpPoliceStation.Controllers
namespace
JunmpPoliceStation.Controllers
{
{
...
@@ -243,6 +246,10 @@ namespace JunmpPoliceStation.Controllers
...
@@ -243,6 +246,10 @@ namespace JunmpPoliceStation.Controllers
string
id
=
entity
.
id
;
string
id
=
entity
.
id
;
string
state
=
entity
.
state
;
string
state
=
entity
.
state
;
using
(
var
scope
=
_unitOfWork
.
BeginTransaction
())
{
try
{
var
OrgInfo
=
_unitOfWork
.
OrganizationRepository
.
Get
(
p
=>
p
.
Id
.
Equals
(
id
));
var
OrgInfo
=
_unitOfWork
.
OrganizationRepository
.
Get
(
p
=>
p
.
Id
.
Equals
(
id
));
if
(
OrgInfo
!=
null
)
if
(
OrgInfo
!=
null
)
{
{
...
@@ -250,21 +257,34 @@ namespace JunmpPoliceStation.Controllers
...
@@ -250,21 +257,34 @@ namespace JunmpPoliceStation.Controllers
bool
result
=
_unitOfWork
.
OrganizationRepository
.
Update
(
OrgInfo
,
true
);
bool
result
=
_unitOfWork
.
OrganizationRepository
.
Update
(
OrgInfo
,
true
);
if
(
result
)
if
(
result
)
{
{
return
JsonManager
.
SimpleStatusResponse
(
ResultCode
.
OPERATE_SUCCESS
);
//更新第三方停启用状态
using
(
var
dbContext
=
new
ApiSysDbContext
())
{
dbContext
.
Database
.
ExecuteSqlRaw
(
"update api_org set state={0} WHERE id={1}"
,
OrgInfo
.
State
,
OrgInfo
.
Id
);
}
}
scope
.
Commit
();
return
JsonManager
.
SimpleStatusResponse
(
ResultCode
.
OPERATE_SUCCESS
);
}
else
else
{
{
scope
.
Rollback
();
return
JsonManager
.
SimpleStatusResponse
(
ResultCode
.
OPERATE_FAILED
);
return
JsonManager
.
SimpleStatusResponse
(
ResultCode
.
OPERATE_FAILED
);
}
}
}
}
else
else
{
{
scope
.
Rollback
();
return
JsonManager
.
SimpleStatusResponse
(
ResultCode
.
ORGANIZATION_ERROR
);
return
JsonManager
.
SimpleStatusResponse
(
ResultCode
.
ORGANIZATION_ERROR
);
}
}
}
catch
(
Exception
e
)
{
scope
.
Rollback
();
throw
;
}
}
}
}
else
else
{
{
...
@@ -1453,6 +1473,13 @@ namespace JunmpPoliceStation.Controllers
...
@@ -1453,6 +1473,13 @@ namespace JunmpPoliceStation.Controllers
#
endregion
#
endregion
}
}
public
class
ApiSysDbContext
:
DbContext
{
protected
override
void
OnConfiguring
(
DbContextOptionsBuilder
optionsBuilder
)
{
var
configuration
=
Startup
.
ServiceLocator
.
Instance
.
GetService
<
IConfiguration
>();
optionsBuilder
.
UseSqlServer
(
configuration
.
GetConnectionString
(
"ApiSysConnection"
));
}
}
}
}
JunmpPoliceStation/Controllers/PrintController.cs
View file @
c734d17c
...
@@ -21,6 +21,7 @@ using JunmpPoliceStation.Extensions;
...
@@ -21,6 +21,7 @@ using JunmpPoliceStation.Extensions;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Logging
;
using
MySqlX.XDevAPI.Common
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
Newtonsoft.Json.Linq
;
using
Rextec.SOA.Infrastructure
;
using
Rextec.SOA.Infrastructure
;
...
@@ -744,6 +745,75 @@ namespace JunmpPoliceStation.Controllers
...
@@ -744,6 +745,75 @@ namespace JunmpPoliceStation.Controllers
}
}
/// <summary>
/// <summary>
/// 批量更新EPC打印状态(第三方使用)
/// </summary>
/// <param name="jdata"></param>
/// <returns></returns>
/// <remarks>
/// /// ## 例子
///
/// {
/// "idList":["111","222"],
/// }
/// </remarks>
[
HttpPost
(
"UpdateRangeEpcStateDevelop"
)]
[
ServiceFilter
(
typeof
(
ActionLimitAttribute
))]
//[NoSign]
public
async
Task
<
HttpResponseMessage
>
UpdateRangeEpcStateDevelop
([
FromBody
]
JObject
jdata
)
{
return
await
Task
.
Run
(()
=>
{
try
{
if
(
jdata
!=
null
)
{
var
entity
=
JsonManager
.
GetJsonEntity
(
jdata
);
if
(!
entity
.
idList
is
IEnumerable
)
{
return
JsonManager
.
SimpleCustResponse
(
$"idList is require"
);
}
var
list
=
new
List
<
string
>();
foreach
(
var
id
in
entity
.
idList
)
{
list
.
Add
(
id
.
ToString
());
}
var
epcs
=
_unitOfWork
.
DbContext
.
CommonJpPurchaseEpcs
.
Where
(
t
=>
list
.
Contains
(
t
.
Id
)
&&
(
t
.
CurrentState
==
0
||
t
.
CurrentState
==
1
)
//允许重复执行打印绑定操作
)
.
ToList
();
if
(
epcs
.
Count
>
0
)
{
foreach
(
var
epc
in
epcs
)
{
epc
.
CurrentState
=
1
;
}
}
bool
result
=
_unitOfWork
.
PurchaseEpcsRepository
.
Update
(
epcs
);
return
JsonManager
.
SimpleStatusResponse
(
ResultCode
.
OPERATE_SUCCESS
);
}
else
{
return
JsonManager
.
SimpleStatusResponse
(
ResultCode
.
REQUEST_DATA_ERROR
);
}
}
catch
(
Exception
ex
)
{
//_logger.LogError("Login/SignIn 错误:" + ex.ToString());
return
JsonManager
.
SimpleStatusResponse
(
ResultCode
.
OPERATE_FAILED
);
}
});
}
/// <summary>
/// 获取装备号型、供应商
/// 获取装备号型、供应商
/// </summary>
/// </summary>
/// <param name="jdata"></param>
/// <param name="jdata"></param>
...
@@ -3793,7 +3863,7 @@ namespace JunmpPoliceStation.Controllers
...
@@ -3793,7 +3863,7 @@ namespace JunmpPoliceStation.Controllers
/// <param name="jdata"></param>
/// <param name="jdata"></param>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
(
"EditInventory"
)]
[
HttpPost
(
"EditInventory"
)]
[
SwaggerIgnore
]
//
[SwaggerIgnore]
public
async
Task
<
HttpResponseMessage
>
EditInventory
([
FromBody
]
JObject
jdata
)
public
async
Task
<
HttpResponseMessage
>
EditInventory
([
FromBody
]
JObject
jdata
)
{
{
return
await
Task
.
Run
(()
=>
return
await
Task
.
Run
(()
=>
...
...
JunmpPoliceStation/Controllers/TjController.cs
View file @
c734d17c
...
@@ -642,7 +642,7 @@ namespace JunmpPoliceStation.Controllers
...
@@ -642,7 +642,7 @@ namespace JunmpPoliceStation.Controllers
c
.
FirstOrDefault
().
OrgName
,
c
.
FirstOrDefault
().
OrgName
,
c
.
FirstOrDefault
().
FindCode
,
c
.
FirstOrDefault
().
FindCode
,
c
.
FirstOrDefault
().
OrgCode
,
c
.
FirstOrDefault
().
OrgCode
,
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
&&
f
.
CurrentState
!=
null
),
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
&&
f
.
CurrentState
!=
null
),
zkCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)).
Count
(),
zkCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)).
Count
(),
ckCount
=
c
.
Where
(
f
=>
!(
f
.
CurrentState
==
null
||
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)
||
f
.
CurrentState
.
Equals
(
6
))).
Count
(),
ckCount
=
c
.
Where
(
f
=>
!(
f
.
CurrentState
==
null
||
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)
||
f
.
CurrentState
.
Equals
(
6
))).
Count
(),
bfCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)).
Count
(),
bfCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)).
Count
(),
...
@@ -820,7 +820,7 @@ namespace JunmpPoliceStation.Controllers
...
@@ -820,7 +820,7 @@ namespace JunmpPoliceStation.Controllers
code
=
c
.
FirstOrDefault
().
EquipmentCodeNavigation
?.
Equipment
?.
Code
,
code
=
c
.
FirstOrDefault
().
EquipmentCodeNavigation
?.
Equipment
?.
Code
,
equipmentCode
=
c
.
Key
,
equipmentCode
=
c
.
Key
,
equipmentName
=
c
.
FirstOrDefault
().
EquipmentCodeNavigation
.
Name
,
equipmentName
=
c
.
FirstOrDefault
().
EquipmentCodeNavigation
.
Name
,
sumCount
=
c
.
Where
(
p
=>
p
.
CurrentState
!=
6
).
Count
(),
sumCount
=
c
.
Where
(
p
=>
p
.
CurrentState
!=
6
).
Count
(),
syCount
=
c
.
Sum
(
c
=>
c
.
Org
.
BaseJpCabinetOutinlogs
.
Where
(
p
=>
p
.
State
==
"out"
&&
p
.
OperationTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
p
.
OperationTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
())
+
c
.
Sum
(
c
=>
c
.
CommonJpEquipmentStates
.
Where
(
f
=>
(
f
.
ActionState
.
Equals
(
2
)
||
f
.
ActionState
.
Equals
(
3
)
||
f
.
ActionState
.
Equals
(
5
)
||
f
.
ActionState
.
Equals
(
14
)
||
f
.
ActionState
.
Equals
(
15
))
&&
f
.
OutTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
f
.
OutTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
()),
syCount
=
c
.
Sum
(
c
=>
c
.
Org
.
BaseJpCabinetOutinlogs
.
Where
(
p
=>
p
.
State
==
"out"
&&
p
.
OperationTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
p
.
OperationTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
())
+
c
.
Sum
(
c
=>
c
.
CommonJpEquipmentStates
.
Where
(
f
=>
(
f
.
ActionState
.
Equals
(
2
)
||
f
.
ActionState
.
Equals
(
3
)
||
f
.
ActionState
.
Equals
(
5
)
||
f
.
ActionState
.
Equals
(
14
)
||
f
.
ActionState
.
Equals
(
15
))
&&
f
.
OutTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
f
.
OutTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
()),
wxCount
=
c
.
Sum
(
c
=>
c
.
CommonJpEquipmentStates
.
Where
(
f
=>
f
.
ActionState
.
Equals
(
6
)
&&
f
.
OutTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
f
.
OutTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
())
wxCount
=
c
.
Sum
(
c
=>
c
.
CommonJpEquipmentStates
.
Where
(
f
=>
f
.
ActionState
.
Equals
(
6
)
&&
f
.
OutTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
f
.
OutTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
())
...
@@ -890,7 +890,7 @@ namespace JunmpPoliceStation.Controllers
...
@@ -890,7 +890,7 @@ namespace JunmpPoliceStation.Controllers
string
OrgId
=
Guid
.
Empty
.
ToString
();
string
OrgId
=
Guid
.
Empty
.
ToString
();
string
startTime
=
entity
.
startTime
;
string
startTime
=
entity
.
startTime
;
string
endTime
=
entity
.
endTime
;
string
endTime
=
Convert
.
ToDateTime
(
entity
.
endTime
).
AddDays
(
1
).
ToString
()
;
...
@@ -916,7 +916,9 @@ namespace JunmpPoliceStation.Controllers
...
@@ -916,7 +916,9 @@ namespace JunmpPoliceStation.Controllers
"EquipmentCodeNavigation"
,
"EquipmentCodeNavigation"
,
"WarehouseCodeNavigation"
,
"WarehouseCodeNavigation"
,
"WarehouseCodeNavigation.Orgization"
,
"WarehouseCodeNavigation.Orgization"
,
"CommonJpEquipmentStates"
"CommonJpEquipmentStates"
,
"Org"
,
"Org.BaseJpCabinetOutinlogs"
,
};
};
Expression
<
Func
<
CommonJpEquipmentInventory
,
bool
>>
expression
=
t
=>
IdList
.
Contains
(
t
.
WarehouseCodeNavigation
.
OrgizationId
)
&&
(!
t
.
InventoryState
.
Equals
(
"loss"
));
Expression
<
Func
<
CommonJpEquipmentInventory
,
bool
>>
expression
=
t
=>
IdList
.
Contains
(
t
.
WarehouseCodeNavigation
.
OrgizationId
)
&&
(!
t
.
InventoryState
.
Equals
(
"loss"
));
...
@@ -937,14 +939,14 @@ namespace JunmpPoliceStation.Controllers
...
@@ -937,14 +939,14 @@ namespace JunmpPoliceStation.Controllers
orgName
=
x
.
FirstOrDefault
().
WarehouseCodeNavigation
.
Orgization
.
Name
,
orgName
=
x
.
FirstOrDefault
().
WarehouseCodeNavigation
.
Orgization
.
Name
,
orgCode
=
x
.
FirstOrDefault
().
WarehouseCodeNavigation
.
Orgization
.
Code
,
orgCode
=
x
.
FirstOrDefault
().
WarehouseCodeNavigation
.
Orgization
.
Code
,
sumCount
=
x
.
Count
(),
sumCount
=
x
.
Count
(),
syCount
=
x
.
Sum
(
c
=>
c
.
CommonJpEquipmentStates
.
Where
(
f
=>
(
f
.
State
.
Equals
(
1
)
||
f
.
State
.
Equals
(
3
))
&&
(
f
.
ActionState
.
Equals
(
2
)
||
f
.
ActionState
.
Equals
(
3
)
||
f
.
ActionState
.
Equals
(
5
)
||
f
.
ActionState
.
Equals
(
14
)
||
f
.
ActionState
.
Equals
(
15
))
&&
f
.
OutTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
f
.
OutTime
<=
Convert
.
ToDateTime
(
endTime
).
AddDays
(
1
)).
Count
()),
syCount
=
x
.
Sum
(
c
=>
c
.
Org
.
BaseJpCabinetOutinlogs
.
Where
(
p
=>
p
.
State
==
"out"
&&
p
.
OperationTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
p
.
OperationTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
())
+
x
.
Sum
(
c
=>
c
.
CommonJpEquipmentStates
.
Where
(
f
=>
(
f
.
ActionState
.
Equals
(
2
)
||
f
.
ActionState
.
Equals
(
3
)
||
f
.
ActionState
.
Equals
(
5
)
||
f
.
ActionState
.
Equals
(
14
)
||
f
.
ActionState
.
Equals
(
15
))
&&
f
.
OutTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
f
.
OutTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
()),
wxCount
=
x
.
Sum
(
c
=>
c
.
CommonJpEquipmentStates
.
Where
(
f
=>
f
.
ActionState
.
Equals
(
6
)
&&
f
.
OutTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
f
.
OutTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
()),
wxCount
=
x
.
Sum
(
c
=>
c
.
CommonJpEquipmentStates
.
Where
(
f
=>
f
.
ActionState
.
Equals
(
6
)
&&
f
.
OutTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
f
.
OutTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
()),
children
=
x
.
GroupBy
(
a
=>
a
.
EquipmentCode
).
Select
(
c
=>
new
children
=
x
.
GroupBy
(
a
=>
a
.
EquipmentCode
).
Select
(
c
=>
new
{
{
equipmentCode
=
c
.
Key
,
equipmentCode
=
c
.
Key
,
equipmentName
=
c
.
FirstOrDefault
().
EquipmentCodeNavigation
.
Name
,
equipmentName
=
c
.
FirstOrDefault
().
EquipmentCodeNavigation
.
Name
,
sumCount
=
c
.
Count
(),
sumCount
=
c
.
Count
(),
syCount
=
c
.
Sum
(
c
=>
c
.
CommonJpEquipmentStates
.
Where
(
f
=>
(
f
.
State
.
Equals
(
1
)
||
f
.
State
.
Equals
(
3
))
&&
(
f
.
ActionState
.
Equals
(
2
)
||
f
.
ActionState
.
Equals
(
3
)
||
f
.
ActionState
.
Equals
(
5
)
||
f
.
ActionState
.
Equals
(
14
)
||
f
.
ActionState
.
Equals
(
15
))
&&
f
.
OutTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
f
.
OutTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
()),
syCount
=
c
.
Sum
(
c
=>
c
.
Org
.
BaseJpCabinetOutinlogs
.
Where
(
p
=>
p
.
State
==
"out"
&&
p
.
OperationTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
p
.
OperationTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
())
+
c
.
Sum
(
c
=>
c
.
CommonJpEquipmentStates
.
Where
(
f
=>
(
f
.
ActionState
.
Equals
(
2
)
||
f
.
ActionState
.
Equals
(
3
)
||
f
.
ActionState
.
Equals
(
5
)
||
f
.
ActionState
.
Equals
(
14
)
||
f
.
ActionState
.
Equals
(
15
))
&&
f
.
OutTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
f
.
OutTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
()),
wxCount
=
c
.
Sum
(
c
=>
c
.
CommonJpEquipmentStates
.
Where
(
f
=>
f
.
ActionState
.
Equals
(
6
)
&&
f
.
OutTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
f
.
OutTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
())
wxCount
=
c
.
Sum
(
c
=>
c
.
CommonJpEquipmentStates
.
Where
(
f
=>
f
.
ActionState
.
Equals
(
6
)
&&
f
.
OutTime
>=
Convert
.
ToDateTime
(
startTime
)
&&
f
.
OutTime
<=
Convert
.
ToDateTime
(
endTime
)).
Count
())
}).
OrderByDescending
(
f
=>
f
.
syCount
).
ToList
()
}).
OrderByDescending
(
f
=>
f
.
syCount
).
ToList
()
}).
OrderBy
(
c
=>
c
.
orgCode
).
ToList
().
Where
(
c
=>
c
.
syCount
>
0
);
}).
OrderBy
(
c
=>
c
.
orgCode
).
ToList
().
Where
(
c
=>
c
.
syCount
>
0
);
...
@@ -1172,7 +1174,7 @@ namespace JunmpPoliceStation.Controllers
...
@@ -1172,7 +1174,7 @@ namespace JunmpPoliceStation.Controllers
yearEndPrice
=
c
.
Where
(
f
=>
!
f
.
CurrentState
.
Equals
(
6
)
&&
f
.
Price
!=
null
&&
f
.
CreateTime
?.
Year
<=
year
).
Sum
(
k
=>
k
.
Price
),
yearEndPrice
=
c
.
Where
(
f
=>
!
f
.
CurrentState
.
Equals
(
6
)
&&
f
.
Price
!=
null
&&
f
.
CreateTime
?.
Year
<=
year
).
Sum
(
k
=>
k
.
Price
),
yearAddCount
=
c
.
Where
(
f
=>
!
f
.
CurrentState
.
Equals
(
6
)
&&
f
.
CreateTime
?.
Year
==
year
).
Count
(),
yearAddCount
=
c
.
Where
(
f
=>
!
f
.
CurrentState
.
Equals
(
6
)
&&
f
.
CreateTime
?.
Year
==
year
).
Count
(),
yearDelCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)
&&
f
.
CreateTime
?.
Year
==
year
).
Count
(),
yearDelCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)
&&
f
.
CreateTime
?.
Year
==
year
).
Count
(),
children
=
c
.
OrderBy
(
z
=>
z
.
TypeOneId
).
ThenBy
(
z
=>
z
.
TypeTwoId
).
ThenBy
(
z
=>
z
.
TypeThreeId
).
ThenBy
(
z
=>
z
.
EquipmentCode1
).
GroupBy
(
a
=>
a
.
EquipmentCode
).
Select
(
c
=>
new
children
=
c
.
OrderBy
(
z
=>
z
.
TypeOneId
).
ThenBy
(
z
=>
z
.
TypeTwoId
).
ThenBy
(
z
=>
z
.
TypeThreeId
).
ThenBy
(
z
=>
z
.
EquipmentCode1
).
GroupBy
(
a
=>
a
.
EquipmentCode
).
Select
(
c
=>
new
{
{
id
=
c
.
FirstOrDefault
().
EquipmentCode
,
id
=
c
.
FirstOrDefault
().
EquipmentCode
,
name
=
c
.
FirstOrDefault
().
EquipmentName
,
name
=
c
.
FirstOrDefault
().
EquipmentName
,
...
@@ -1529,7 +1531,7 @@ namespace JunmpPoliceStation.Controllers
...
@@ -1529,7 +1531,7 @@ namespace JunmpPoliceStation.Controllers
ParentName
=
c
.
FirstOrDefault
().
Name
,
ParentName
=
c
.
FirstOrDefault
().
Name
,
EquipmentName
=
c
.
FirstOrDefault
().
EquipmentName
,
EquipmentName
=
c
.
FirstOrDefault
().
EquipmentName
,
SizeName
=
c
.
FirstOrDefault
().
SizeName
,
SizeName
=
c
.
FirstOrDefault
().
SizeName
,
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
),
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
),
Price
=
c
.
FirstOrDefault
().
Price
,
Price
=
c
.
FirstOrDefault
().
Price
,
sumPrice
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
)
*
c
.
Key
.
Price
,
sumPrice
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
)
*
c
.
Key
.
Price
,
}
}
...
@@ -1654,7 +1656,7 @@ namespace JunmpPoliceStation.Controllers
...
@@ -1654,7 +1656,7 @@ namespace JunmpPoliceStation.Controllers
rowNumber
=
(
idx
+
1
)
+
""
,
rowNumber
=
(
idx
+
1
)
+
""
,
id
=
c
.
FirstOrDefault
().
TypeOneId
,
id
=
c
.
FirstOrDefault
().
TypeOneId
,
name
=
c
.
FirstOrDefault
().
ParentName
,
name
=
c
.
FirstOrDefault
().
ParentName
,
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
),
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
&&
f
.
CurrentState
!=
null
),
zkCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)).
Count
(),
zkCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)).
Count
(),
ckCount
=
c
.
Where
(
f
=>
!(
f
.
CurrentState
==
null
||
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)
||
f
.
CurrentState
.
Equals
(
6
))).
Count
(),
ckCount
=
c
.
Where
(
f
=>
!(
f
.
CurrentState
==
null
||
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)
||
f
.
CurrentState
.
Equals
(
6
))).
Count
(),
bfCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)).
Count
(),
bfCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)).
Count
(),
...
@@ -1663,7 +1665,7 @@ namespace JunmpPoliceStation.Controllers
...
@@ -1663,7 +1665,7 @@ namespace JunmpPoliceStation.Controllers
rowNumber
=
(
idx
+
1
)
+
"."
+
(
idx1
+
1
),
rowNumber
=
(
idx
+
1
)
+
"."
+
(
idx1
+
1
),
id
=
c
.
FirstOrDefault
().
TypeTwoId
,
id
=
c
.
FirstOrDefault
().
TypeTwoId
,
name
=
c
.
FirstOrDefault
().
TypeName
,
name
=
c
.
FirstOrDefault
().
TypeName
,
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
),
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
&&
f
.
CurrentState
!=
null
),
zkCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)).
Count
(),
zkCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)).
Count
(),
ckCount
=
c
.
Where
(
f
=>
!(
f
.
CurrentState
==
null
||
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)
||
f
.
CurrentState
.
Equals
(
6
))).
Count
(),
ckCount
=
c
.
Where
(
f
=>
!(
f
.
CurrentState
==
null
||
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)
||
f
.
CurrentState
.
Equals
(
6
))).
Count
(),
bfCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)).
Count
(),
bfCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)).
Count
(),
...
@@ -1672,7 +1674,7 @@ namespace JunmpPoliceStation.Controllers
...
@@ -1672,7 +1674,7 @@ namespace JunmpPoliceStation.Controllers
rowNumber
=
(
idx
+
1
)
+
"."
+
(
idx1
+
1
)
+
"."
+
(
idx2
+
1
),
rowNumber
=
(
idx
+
1
)
+
"."
+
(
idx1
+
1
)
+
"."
+
(
idx2
+
1
),
id
=
c
.
FirstOrDefault
().
TypeThreeId
,
id
=
c
.
FirstOrDefault
().
TypeThreeId
,
name
=
c
.
FirstOrDefault
().
Name
,
name
=
c
.
FirstOrDefault
().
Name
,
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
),
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
&&
f
.
CurrentState
!=
null
),
zkCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)).
Count
(),
zkCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)).
Count
(),
ckCount
=
c
.
Where
(
f
=>
!(
f
.
CurrentState
==
null
||
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)
||
f
.
CurrentState
.
Equals
(
6
))).
Count
(),
ckCount
=
c
.
Where
(
f
=>
!(
f
.
CurrentState
==
null
||
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)
||
f
.
CurrentState
.
Equals
(
6
))).
Count
(),
bfCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)).
Count
(),
bfCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)).
Count
(),
...
@@ -1681,7 +1683,7 @@ namespace JunmpPoliceStation.Controllers
...
@@ -1681,7 +1683,7 @@ namespace JunmpPoliceStation.Controllers
rowNumber
=
(
idx
+
1
)
+
"."
+
(
idx1
+
1
)
+
"."
+
(
idx2
+
1
)
+
"."
+
(
idx3
+
1
),
rowNumber
=
(
idx
+
1
)
+
"."
+
(
idx1
+
1
)
+
"."
+
(
idx2
+
1
)
+
"."
+
(
idx3
+
1
),
id
=
c
.
FirstOrDefault
().
EquipmentCode
,
id
=
c
.
FirstOrDefault
().
EquipmentCode
,
name
=
c
.
FirstOrDefault
().
EquipmentName
,
name
=
c
.
FirstOrDefault
().
EquipmentName
,
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
),
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
&&
f
.
CurrentState
!=
null
),
zkCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)).
Count
(),
zkCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)).
Count
(),
ckCount
=
c
.
Where
(
f
=>
!(
f
.
CurrentState
==
null
||
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)
||
f
.
CurrentState
.
Equals
(
6
))).
Count
(),
ckCount
=
c
.
Where
(
f
=>
!(
f
.
CurrentState
==
null
||
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)
||
f
.
CurrentState
.
Equals
(
6
))).
Count
(),
bfCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)).
Count
(),
bfCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)).
Count
(),
...
@@ -1694,7 +1696,7 @@ namespace JunmpPoliceStation.Controllers
...
@@ -1694,7 +1696,7 @@ namespace JunmpPoliceStation.Controllers
suplierName
=
c
.
Key
.
SupplierName
,
suplierName
=
c
.
Key
.
SupplierName
,
price
=
c
.
Key
.
Price
,
price
=
c
.
Key
.
Price
,
sumPrice
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
null
)
*
c
.
Key
.
Price
,
sumPrice
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
null
)
*
c
.
Key
.
Price
,
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
),
zsCount
=
c
.
Count
(
f
=>
f
.
CurrentState
!=
6
&&
f
.
CurrentState
!=
null
),
zkCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)).
Count
(),
zkCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)).
Count
(),
ckCount
=
c
.
Where
(
f
=>
!(
f
.
CurrentState
==
null
||
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)
||
f
.
CurrentState
.
Equals
(
6
))).
Count
(),
ckCount
=
c
.
Where
(
f
=>
!(
f
.
CurrentState
==
null
||
f
.
CurrentState
.
Equals
(
0
)
||
f
.
CurrentState
.
Equals
(
3
)
||
f
.
CurrentState
.
Equals
(
6
))).
Count
(),
bfCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)).
Count
()
bfCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)).
Count
()
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论