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
4c472374
Commit
4c472374
authored
Dec 13, 2022
by
赵剑炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正所有报表中错误的物资排序
parent
62993ca6
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
24 行增加
和
13 行删除
+24
-13
InventoryController.cs
JunmpPoliceStation/Controllers/InventoryController.cs
+1
-5
TjController.cs
JunmpPoliceStation/Controllers/TjController.cs
+23
-8
没有找到文件。
JunmpPoliceStation/Controllers/InventoryController.cs
View file @
4c472374
...
...
@@ -9184,7 +9184,6 @@ namespace JunmpPoliceStation.Controllers
"EquipmentSizecodeNavigation.Detail"
,
"EquipmentCodeNavigation"
,
"WarehouseCodeNavigation"
,
"WarehouseCodeNavigation.Orgization"
,
"CommonJpEquipmentStates"
,
"SupplierCodeNavigation"
,
"Cabinet"
,
...
...
@@ -9338,10 +9337,7 @@ namespace JunmpPoliceStation.Controllers
}
var
EquipmentList
=
_unitOfWork
.
EquipmentInventoryRepository
.
GetList
(
expression
,
c
=>
c
.
CreateTime
,
false
,
param
)
.
OrderBy
(
x
=>
x
.
EquipmentCode
)
.
ThenBy
(
x
=>
x
.
EquipmentSizecode
)
.
ThenBy
(
x
=>
x
.
WarehouseCodeNavigation
.
Orgization
.
Code
)
.
ThenBy
(
x
=>
x
.
WarehouseCode
)
.
OrderBy
(
x
=>
x
.
EquipmentCodeNavigation
.
Code
)
.
ToList
();
var
datas
=
EquipmentList
.
Select
(
equipment
=>
new
...
...
JunmpPoliceStation/Controllers/TjController.cs
View file @
4c472374
...
...
@@ -647,7 +647,7 @@ namespace JunmpPoliceStation.Controllers
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
(),
priceCount
=
c
.
Where
(
f
=>
!
f
.
CurrentState
.
Equals
(
6
)
&&
f
.
Price
!=
null
).
Sum
(
k
=>
k
.
Price
),
children
=
c
.
OrderBy
(
z
=>
z
.
TypeOneId
).
GroupBy
(
a
=>
a
.
EquipmentCode
).
Select
(
c
=>
new
children
=
c
.
OrderBy
(
z
=>
z
.
TypeOneId
).
ThenBy
(
z
=>
z
.
TypeTwoId
).
ThenBy
(
z
=>
z
.
TypeThreeId
).
GroupBy
(
a
=>
a
.
EquipmentCode
).
Select
(
c
=>
new
{
id
=
c
.
FirstOrDefault
().
EquipmentCode
,
name
=
c
.
FirstOrDefault
().
EquipmentName
,
...
...
@@ -690,7 +690,7 @@ namespace JunmpPoliceStation.Controllers
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
(),
priceCount
=
c
.
Where
(
f
=>
!
f
.
CurrentState
.
Equals
(
6
)
&&
f
.
Price
!=
null
).
Sum
(
k
=>
k
.
Price
),
children
=
c
.
OrderBy
(
z
=>
z
.
TypeOneId
).
GroupBy
(
a
=>
a
.
EquipmentCode
).
Select
(
c
=>
new
children
=
c
.
OrderBy
(
z
=>
z
.
TypeOneId
).
ThenBy
(
z
=>
z
.
TypeTwoId
).
ThenBy
(
z
=>
z
.
TypeThreeId
).
GroupBy
(
a
=>
a
.
EquipmentCode
).
Select
(
c
=>
new
{
id
=
c
.
FirstOrDefault
().
EquipmentCode
,
name
=
c
.
FirstOrDefault
().
EquipmentName
,
...
...
@@ -784,12 +784,13 @@ namespace JunmpPoliceStation.Controllers
OrgId
=
entity
.
orgId
;
}
var
param
=
new
string
[]
{
"EquipmentCodeNavigation"
,
"EquipmentCodeNavigation"
,
"Org"
,
"Org.BaseJpCabinetOutinlogs"
,
"CommonJpEquipmentStates"
};
"CommonJpEquipmentStates"
,
};
var
Infoparam
=
new
string
[]
{
};
Expression
<
Func
<
CommonJpEquipmentInventory
,
bool
>>
expression
=
t
=>
OrgId
==
t
.
OrgId
&&
(!
t
.
InventoryState
.
Equals
(
"loss"
));
...
...
@@ -799,17 +800,31 @@ namespace JunmpPoliceStation.Controllers
string
equipmentCode
=
entity
.
equipmentCode
;
expression
=
LambdaExtensions
.
AndAlso
(
expression
,
t
=>
t
.
EquipmentCode
.
Equals
(
equipmentCode
));
}
//var infoList=_unitOfWork.EquipmentInfoRepository.GetList(t=>t.Id!=null).ToList();
//var query = from t1 in infoList
// join t2 in infoList
// on t1.ParentId equals t2.Id
// join t3 in infoList
// on t2.ParentId equals t3.Id
// select new ViewEquipment
// {
// TypeOneId = t1.Id,
// TypeTwoId = t2.Id,
// TypeThreeId = t3.Id,
// };
var
EquipmentList
=
_unitOfWork
.
EquipmentInventoryRepository
.
GetList
(
expression
,
null
,
false
,
param
).
ToList
();
var
datas
=
EquipmentList
.
GroupBy
(
p
=>
p
.
EquipmentCode
).
Select
(
c
=>
new
{
code
=
c
.
FirstOrDefault
().
EquipmentCodeNavigation
?.
Equipment
?.
Code
,
equipmentCode
=
c
.
Key
,
equipmentName
=
c
.
FirstOrDefault
().
EquipmentCodeNavigation
.
Name
,
sumCount
=
c
.
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
())
}).
OrderBy
Descending
(
f
=>
f
.
syCount
).
ToList
();
}).
OrderBy
(
f
=>
f
.
code
).
ToList
();
//var content = new
//{
...
...
@@ -1150,7 +1165,7 @@ namespace JunmpPoliceStation.Controllers
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
(),
yearDelCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)
&&
f
.
CreateTime
?.
Year
==
year
).
Count
(),
children
=
c
.
OrderBy
(
z
=>
z
.
TypeOneId
).
GroupBy
(
a
=>
a
.
EquipmentCode
).
Select
(
c
=>
new
children
=
c
.
OrderBy
(
z
=>
z
.
TypeOneId
).
ThenBy
(
z
=>
z
.
TypeTwoId
).
ThenBy
(
z
=>
z
.
TypeThreeId
).
GroupBy
(
a
=>
a
.
EquipmentCode
).
Select
(
c
=>
new
{
id
=
c
.
FirstOrDefault
().
EquipmentCode
,
name
=
c
.
FirstOrDefault
().
EquipmentName
,
...
...
@@ -1196,7 +1211,7 @@ namespace JunmpPoliceStation.Controllers
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
(),
yearDelCount
=
c
.
Where
(
f
=>
f
.
CurrentState
.
Equals
(
6
)
&&
f
.
CreateTime
?.
Year
==
year
).
Count
(),
children
=
c
.
OrderBy
(
z
=>
z
.
TypeOneId
).
GroupBy
(
a
=>
a
.
EquipmentCode
).
Select
(
c
=>
new
children
=
c
.
OrderBy
(
z
=>
z
.
TypeOneId
).
ThenBy
(
z
=>
z
.
TypeTwoId
).
ThenBy
(
z
=>
z
.
TypeThreeId
).
GroupBy
(
a
=>
a
.
EquipmentCode
).
Select
(
c
=>
new
{
id
=
c
.
FirstOrDefault
().
EquipmentCode
,
name
=
c
.
FirstOrDefault
().
EquipmentName
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论