Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
data-acquisition
Project
Project
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
竹天卫
data-acquisition
Commits
3c3eec9c
Commit
3c3eec9c
authored
Jun 09, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
装车 运输工序 查询当天工作两 功能优化
parent
0d6730f3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
16 deletions
+42
-16
TProcessesBlastdesignHoleServiceImpl.java
...ss/service/impl/TProcessesBlastdesignHoleServiceImpl.java
+3
-3
TProcessesDiggingServiceImpl.java
...n/business/service/impl/TProcessesDiggingServiceImpl.java
+19
-6
TProcessesTruckServiceImpl.java
...ion/business/service/impl/TProcessesTruckServiceImpl.java
+19
-6
TProcessesBlastdesignHoleMapper.xml
...ition/business/mapper/TProcessesBlastdesignHoleMapper.xml
+1
-1
No files found.
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TProcessesBlastdesignHoleServiceImpl.java
View file @
3c3eec9c
...
...
@@ -258,9 +258,9 @@ public class TProcessesBlastdesignHoleServiceImpl extends ServiceImpl<TProcesses
}
//判断爆区是否存在
QueryWrapper
<
TProcessesBlastdesignHole
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
new
StringBuilder
(
ProjectEnum
.
TableAlias
.
A
.
getLabel
()).
append
(
ProjectEnum
.
TProcessesBlastdesignHole
.
STEP_NAME
.
getLabel
()).
toString
(),
query
.
getStepName
());
queryWrapper
.
eq
(
new
StringBuilder
(
ProjectEnum
.
TableAlias
.
A
.
getLabel
()).
append
(
ProjectEnum
.
TProcessesBlastdesignHole
.
STOPE_NAME
.
getLabel
()).
toString
(),
query
.
getStopeName
());
queryWrapper
.
eq
(
new
StringBuilder
(
ProjectEnum
.
TableAlias
.
A
.
getLabel
()).
append
(
ProjectEnum
.
TProcessesBlastdesignHole
.
Blast_Area_Name
.
getLabel
()).
toString
(),
query
.
getBlastAreaName
());
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlastdesignHole
.
STEP_NAME
.
getLabel
(),
query
.
getStepName
());
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlastdesignHole
.
STOPE_NAME
.
getLabel
(),
query
.
getStopeName
());
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesBlastdesignHole
.
Blast_Area_Name
.
getLabel
(),
query
.
getBlastAreaName
());
TProcessesBlastdesignHoleVo
holeVo
=
baseMapper
.
getByQuery
(
queryWrapper
);
if
(
holeVo
!=
null
)
{
return
R
.
failed
(
"炮孔设计中->泡孔设计中爆区已存在,StopeName,StepName,BlastAreaName"
);
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TProcessesDiggingServiceImpl.java
View file @
3c3eec9c
...
...
@@ -56,15 +56,28 @@ public class TProcessesDiggingServiceImpl extends ServiceImpl<TProcessesDiggingM
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
QueryWrapper
<
TProcessesDigging
>
qw
=
new
QueryWrapper
<>();
if
(
StringUtils
.
isNoneBlank
(
digDate
))
{
qw
.
apply
(
"DATE(DigDate) = digDate"
);
try
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
startDate
=
digDate
+
" 00:00:00"
;
String
endDate
=
digDate
+
" 23:59:59"
;
qw
.
between
(
"DigDate"
,
formatter
.
parse
(
startDate
),
formatter
.
parse
(
endDate
));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
else
{
qw
.
apply
(
"D
ATE(DigDate) = DATE(now())
"
);
qw
.
apply
(
"D
igDate BETWEEN CONVERT(varchar(100), GETDATE(), 23) +' 00:00:00' AND CONVERT(varchar(100), GETDATE(), 23) +' 23:59:59'
"
);
}
List
<
TProcessesDigging
>
list
=
processesDiggingMapper
.
selectList
(
qw
);
Float
workTimes
=
list
.
stream
().
map
(
p
->
p
.
getWorkTime
()).
reduce
(
Float:
:
sum
).
get
();
Double
workLoads
=
list
.
stream
().
mapToDouble
(
TProcessesDigging:
:
getWorkload
).
sum
();
map
.
put
(
"workTimes"
,
workTimes
);
map
.
put
(
"workLoads"
,
workLoads
);
if
(
list
!=
null
&&
list
.
size
()>
0
){
Float
workTimes
=
list
.
stream
().
map
(
p
->
p
.
getWorkTime
()).
reduce
(
Float:
:
sum
).
get
();
Double
workLoads
=
list
.
stream
().
mapToDouble
(
TProcessesDigging:
:
getWorkload
).
sum
();
map
.
put
(
"workTimes"
,
workTimes
);
map
.
put
(
"workLoads"
,
workLoads
);
}
else
{
map
.
put
(
"workTimes"
,
0
);
map
.
put
(
"workLoads"
,
0
);
}
return
R
.
ok
(
map
);
}
...
...
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TProcessesTruckServiceImpl.java
View file @
3c3eec9c
...
...
@@ -53,15 +53,28 @@ public class TProcessesTruckServiceImpl extends ServiceImpl<TProcessesTruckMappe
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
QueryWrapper
<
TProcessesTruck
>
qw
=
new
QueryWrapper
<>();
if
(
StringUtils
.
isNoneBlank
(
deliveryDate
)){
qw
.
apply
(
"DATE(DeliveryDate) = deliveryDate"
);
try
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
startDate
=
deliveryDate
+
" 00:00:00"
;
String
endDate
=
deliveryDate
+
" 23:59:59"
;
qw
.
between
(
"DeliveryDate"
,
formatter
.
parse
(
startDate
),
formatter
.
parse
(
endDate
));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
else
{
qw
.
apply
(
"D
ATE(DeliveryDate) = DATE(now())
"
);
qw
.
apply
(
"D
eliveryDate BETWEEN CONVERT(varchar(100), GETDATE(), 23) +' 00:00:00' AND CONVERT(varchar(100), GETDATE(), 23) +' 23:59:59'
"
);
}
List
<
TProcessesTruck
>
list
=
processesTruckMapper
.
selectList
(
qw
);
Integer
cshjs
=
list
.
stream
().
map
(
p
->
p
.
getCshj
()).
reduce
(
Integer:
:
sum
).
get
();
Double
dwhjs
=
list
.
stream
().
mapToDouble
(
TProcessesTruck:
:
getDwhj
).
sum
();
map
.
put
(
"cshjs"
,
cshjs
);
map
.
put
(
"dwhjs"
,
dwhjs
);
if
(
list
!=
null
&&
list
.
size
()>
0
){
Integer
cshjs
=
list
.
stream
().
map
(
p
->
p
.
getCshj
()).
reduce
(
Integer:
:
sum
).
get
();
Double
dwhjs
=
list
.
stream
().
mapToDouble
(
TProcessesTruck:
:
getDwhj
).
sum
();
map
.
put
(
"cshjs"
,
cshjs
);
map
.
put
(
"dwhjs"
,
dwhjs
);
}
else
{
map
.
put
(
"workTimes"
,
0
);
map
.
put
(
"workLoads"
,
0
);
}
return
R
.
ok
(
map
);
}
...
...
acquisition-business/target/classes/cn/wise/sc/acquisition/business/mapper/TProcessesBlastdesignHoleMapper.xml
View file @
3c3eec9c
...
...
@@ -58,7 +58,7 @@
</select>
<!-- 获取所有get
Page
列表 -->
<!-- 获取所有get
ByQuery
列表 -->
<select
id=
"getByQuery"
resultType=
"cn.wise.sc.acquisition.business.model.vo.TProcessesBlastdesignHoleVo"
>
SELECT
<include
refid=
"TProcessesBlastdesignVolumeColumns"
/>
...
...
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