Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
a41fb46f
Commit
a41fb46f
authored
Oct 11, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_bugfix@dl' into develop_bugfix@dl
parents
40d40a63
ba25aa32
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
23 deletions
+37
-23
PluginInterceptor.java
...oin/equipmanage/common/interceptor/PluginInterceptor.java
+0
-3
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+3
-1
SourcesStatisticsImpl.java
...ejoin/equipmanage/service/impl/SourcesStatisticsImpl.java
+1
-0
PluginInterceptor.java
...oin/amos/knowledgebase/interceptor/PluginInterceptor.java
+0
-3
WlSpareEquipmentMapper.xml
...quip/src/main/resources/mapper/WlSpareEquipmentMapper.xml
+33
-16
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/interceptor/PluginInterceptor.java
View file @
a41fb46f
...
...
@@ -35,8 +35,6 @@ public class PluginInterceptor implements Interceptor {
* @throws Throwable
*/
public
Object
intercept
(
Invocation
invocation
)
throws
Throwable
{
System
.
out
.
println
(
"====intercept======"
);
Object
[]
args
=
invocation
.
getArgs
();
MappedStatement
mappedStatement
=
(
MappedStatement
)
args
[
0
];
Object
parameter
=
args
[
1
];
...
...
@@ -101,7 +99,6 @@ public class PluginInterceptor implements Interceptor {
}
public
Object
plugin
(
Object
target
)
{
System
.
out
.
println
(
"-----------------------------plugin-------------------------"
);
return
Plugin
.
wrap
(
target
,
this
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
a41fb46f
...
...
@@ -2583,6 +2583,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
List
<
Object
>
values
=
new
ArrayList
<>();
BigDecimal
lastNum
=
BigDecimal
.
ZERO
;
for
(
int
i
=
0
;
i
<
allTimeList
.
size
();
i
++)
{
List
<
BigDecimal
>
orDefault
=
stringIntegerHashMap
.
getOrDefault
(
allTimeList
.
get
(
i
),
new
ArrayList
<>());
// 计算非空值的总和
...
...
@@ -2597,12 +2598,13 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
BigDecimal
divide
;
if
(
count
==
0
)
{
// 如果非空值数量为0,可以选择返回0或其他默认值
divide
=
BigDecimal
.
ZERO
;
divide
=
lastNum
;
}
else
{
// 否则,进行除法运算
divide
=
sum
.
divide
(
new
BigDecimal
(
count
),
2
,
RoundingMode
.
HALF_UP
);
}
values
.
add
(
divide
);
lastNum
=
divide
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
lastNum
:
divide
;
}
yaxisList
.
add
(
values
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/SourcesStatisticsImpl.java
View file @
a41fb46f
...
...
@@ -26,6 +26,7 @@ public class SourcesStatisticsImpl implements ISourceStatistics {
public
int
equipCategoryStatistics
(
String
bizOrgCode
,
SourceTypeEnum
sourceType
,
String
categoryCode
)
{
// 计算处通用code,用来上下级匹配如12001010000->1200101
String
treeCode
=
subStringZero
(
categoryCode
);
treeCode
=
treeCode
.
length
()
%
2
==
0
?
treeCode
:
treeCode
+
"0"
;
Set
<
String
>
keys
=
redisUtil
.
getKeys
(
buildPattenKey
(
bizOrgCode
,
sourceType
.
getCode
(),
treeCode
));
if
(
keys
.
size
()
>
0
)
{
//求和
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/interceptor/PluginInterceptor.java
View file @
a41fb46f
...
...
@@ -31,8 +31,6 @@ public class PluginInterceptor implements Interceptor {
* @throws Throwable
*/
public
Object
intercept
(
Invocation
invocation
)
throws
Throwable
{
System
.
out
.
println
(
"====intercept======"
);
Object
[]
args
=
invocation
.
getArgs
();
MappedStatement
mappedStatement
=
(
MappedStatement
)
args
[
0
];
Object
parameter
=
args
[
1
];
...
...
@@ -87,7 +85,6 @@ public class PluginInterceptor implements Interceptor {
}
public
Object
plugin
(
Object
target
)
{
System
.
out
.
println
(
"-----------------------------plugin-------------------------"
);
return
Plugin
.
wrap
(
target
,
this
);
}
...
...
amos-boot-system-equip/src/main/resources/mapper/WlSpareEquipmentMapper.xml
View file @
a41fb46f
...
...
@@ -15,8 +15,14 @@
<if
test=
"dto.name != null and dto.name != ''"
>
AND `name` LIKE CONCAT('%', #{dto.name}, '%')
</if>
<if
test=
"dto.code != null and dto.code != ''"
>
AND `equip_model_code` LIKE concat('%', #{dto.code}, '%')
<!-- <if test="dto.code != null and dto.code != ''">-->
<!-- AND `equip_model_code` LIKE concat('%', #{dto.code}, '%')-->
<!-- </if>-->
<if
test=
"dto.code == 'BPBJ'"
>
AND LEFT(equip_model_code, 1) = '4'
</if>
<if
test=
"dto.code == 'KCQC'"
>
AND LEFT(equip_model_code, 1) != '4'
</if>
<if
test=
"codeHead != null and codeHead != ''"
>
AND LEFT (equip_model_code, #{hierarchy}) = #{codeHead}
...
...
@@ -35,26 +41,37 @@
</select>
<select
id=
"countSpareEquip"
resultType=
"java.util.Map"
>
select
a.equip_model_name AS `name`,
sum( a.stock_num ) AS `value`,
a.unit AS unit,
IFNULL( ifnull( b.img, b.shbz_img ), '' ) AS icon,
a.equip_model_id AS equipmentModelId,
a.equip_model_code AS equipmentModelCode
SELECT
'备品备件' AS name,
'BPBJ' AS code,
count( 1 ) AS value
FROM
wl_spare_equipment a
LEFT JOIN wl_equipment b ON b.id = a.equip_model_id
<where>
LEFT JOIN wl_equipment b ON b.id = a.equip_model_id
WHERE
a.is_delete = 0
AND a.stock_num != 0
AND LEFT(a.equip_model_code, 1) = '4'
<if
test=
"bizOrgCode != '' and bizOrgCode != null"
>
AND a.`biz_org_code` LIKE concat(#{bizOrgCode}, '%')
</if>
UNION ALL
SELECT
'库存器材' AS name,
'KCQC' AS code,
count(1) AS value
FROM
wl_spare_equipment a
LEFT JOIN wl_equipment b ON b.id = a.equip_model_id
WHERE
a.is_delete = 0
AND a.stock_num != 0
AND LEFT(a.equip_model_code, 1) != '4'
<if
test=
"bizOrgCode != '' and bizOrgCode != null"
>
AND a.`biz_org_code` LIKE concat(#{bizOrgCode}, '%')
</if>
</where>
GROUP BY
a.equip_model_id
HAVING
sum( a.stock_num ) != 0
</select>
<select
id=
"exportList"
resultType=
"com.yeejoin.equipmanage.common.entity.WlSpareEquipment"
>
...
...
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