Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
8f8f02cf
由
张雷
编写于
2025-01-22 09:54:31 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
数据BUG修改
1 个父辈
0e101d37
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
51 行增加
和
8 行删除
sk-module-datafill/src/main/java/com/skua/modules/custom/handle/impl/ScybReportHandle.java
sk-module-datafill/src/main/java/com/skua/modules/custom/mapper/xml/FCustomReportDatasetMapper.xml
sk-module-datafill/src/main/java/com/skua/modules/report/controller/FReportHeaderConfigController.java
sk-module-equipment/src/main/java/com/skua/modules/equipment/controller/EquipmentController.java
sk-module-equipment/src/main/java/com/skua/modules/equipment/service/IEquipmentInfoService.java
sk-module-equipment/src/main/java/com/skua/modules/equipment/service/impl/EquipmentInfoServiceImpl.java
sk-module-datafill/src/main/java/com/skua/modules/custom/handle/impl/ScybReportHandle.java
查看文件 @
8f8f02c
...
...
@@ -53,6 +53,8 @@ public class ScybReportHandle implements ICustomHandle{
dataFieldDict
.
put
(
"time"
,
"时间"
);
dataFieldDict
.
put
(
"paramDepart"
,
"参数机构"
);
dataFieldDict
.
put
(
"depart_id"
,
"厂站编码"
);
dataFieldDict
.
put
(
"yddf"
,
"电费"
);
dataFieldDict
.
put
(
"wxfy"
,
"设备维修费"
);
//获取填报数据
String
dataViewName4411
=
ReportViewUtil
.
buildViewLike
(
ReportConstant
.
view4411
,
""
,
departIds
,
month
);
//结果集
...
...
sk-module-datafill/src/main/java/com/skua/modules/custom/mapper/xml/FCustomReportDatasetMapper.xml
查看文件 @
8f8f02c
...
...
@@ -837,10 +837,15 @@
v4.dhcmbzyy,
v4.bnyhmb,
v4.bnsjyh,
v4.yhcyqyy
v4.yhcyqyy,
c.cost AS yddf,
r.total_cost AS wxfy
FROM
sys_depart d
LEFT JOIN ( SELECT * FROM ${dataViewName4411} v WHERE v.time = #{month} ) v4 ON v4.depart_id = d.id
LEFT JOIN ( SELECT cost,depart_id FROM report_electric_cost WHERE month = #{month} ) c ON c.depart_id = d.id
LEFT JOIN ( SELECT ROUND(SUM(total_cost),2) AS total_cost,depart_id FROM equipment_repair
WHERE LEFT(repair_date,7) = #{month} GROUP BY LEFT(repair_date,7),depart_id ) r ON r.depart_id = d.id
WHERE
d.id IN
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/controller/FReportHeaderConfigController.java
查看文件 @
8f8f02c
...
...
@@ -175,6 +175,13 @@ public class FReportHeaderConfigController {
list
=
fReportHeaderConfigService
.
list
(
queryWrapper
);
if
(
list
.
size
()
==
0
){
List
<
FReportItem
>
itemList
=
fReportItemService
.
getListByReportId
(
fReportHeaderConfig
.
getReportId
());
FReportHeaderConfig
timeHeader
=
new
FReportHeaderConfig
();
timeHeader
.
setReportId
(
fReportHeaderConfig
.
getReportId
());
timeHeader
.
setDepartId
(
fReportHeaderConfig
.
getDepartId
());
timeHeader
.
setItemCode
(
"time"
);
timeHeader
.
setItemName
(
"时间"
);
timeHeader
.
setSortNum
(
0
);
list
.
add
(
timeHeader
);
for
(
FReportItem
reportItem
:
itemList
)
{
FReportHeaderConfig
config
=
new
FReportHeaderConfig
();
config
.
setReportId
(
fReportHeaderConfig
.
getReportId
());
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/controller/EquipmentController.java
查看文件 @
8f8f02c
...
...
@@ -3,14 +3,11 @@ package com.skua.modules.equipment.controller;
import
java.io.*
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.skua.core.context.BaseContextHandler
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.ss.usermodel.Sheet
;
...
...
@@ -268,7 +265,7 @@ public class EquipmentController {
@AutoLog
(
value
=
"设备台账-设备使用状态统计"
)
@ApiOperation
(
value
=
"设备台账-设备使用状态统计"
,
notes
=
"设备台账-设备使用状态统计"
)
@GetMapping
(
value
=
"/equipmentStatus"
)
public
Result
<
Object
>
equipmentStatusCtrl
(
String
isSpecial
)
throws
Exception
{
public
Result
<
Object
>
equipmentStatusCtrl
(
String
isSpecial
,
String
departId
)
throws
Exception
{
Result
<
Object
>
result
=
new
Result
<>();
// equipmentStatus: 设备类型value:key的转换
Map
<
String
,
String
>
equipmentStatusVal2KeyMap
=
EquipmentUtils
.
convertFunc
(
"equipmentStatus"
,
false
);
...
...
@@ -284,10 +281,21 @@ public class EquipmentController {
flag
=
true
;
equipmentInfo
.
setIsSpecial
(
isSpecial
);
}
if
(
ConvertUtils
.
isNotEmpty
(
departId
)){
equipmentInfo
.
setDepartId
(
departId
);
}
else
{
}
equipment
.
setEquipmentInfo
(
equipmentInfo
);
String
sql
=
JoinSqlUtils
.
multiJoinSqlQuery
(
equipment
);
sql
=
"select res.EquipmentInfo_equipmentStatus, count(*) as total from ("
+
sql
+
") as res"
;
QueryWrapper
<?>
queryWrapper
=
new
QueryWrapper
<>();
if
(
ConvertUtils
.
isNotEmpty
(
departId
)){
queryWrapper
.
eq
(
"EquipmentInfo_departId"
,
departId
);
}
else
{
String
departs
=
BaseContextHandler
.
getDeparts
();
queryWrapper
.
in
(
"EquipmentInfo_departId"
,
Arrays
.
asList
(
departs
.
split
(
","
)));
}
queryWrapper
.
eq
(
flag
,
"EquipmentInfo_isSpecial"
,
isSpecial
)
.
groupBy
(
"EquipmentInfo_equipmentStatus"
);
//EquipmentInfo_isSpecial
List
<
Map
<
String
,
Object
>>
countMapList
=
iCommonSqlService
.
queryWrapperForList
(
sql
,
queryWrapper
);
...
...
@@ -359,6 +367,16 @@ public class EquipmentController {
return
result
;
}
@AutoLog
(
value
=
"设备台账-重建二维码"
)
@ApiOperation
(
value
=
"设备台账-重建二维码"
,
notes
=
"设备台账-重建二维码"
)
@GetMapping
(
value
=
"/reCreateQrCode"
)
public
Result
<
String
>
reCreateQrCode
(
String
id
)
{
Result
<
String
>
result
=
new
Result
<>();
String
qrCodePath
=
equipmentInfoService
.
reCreateQrCode
(
id
);
result
.
setResult
(
qrCodePath
);
result
.
setSuccess
(
true
);
return
result
;
}
@CustomExceptionAnno
(
description
=
"设备台账-批量添加运行点"
)
@AutoLog
(
value
=
"设备台账-批量添加运行点"
)
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/service/IEquipmentInfoService.java
查看文件 @
8f8f02c
...
...
@@ -82,4 +82,6 @@ public interface IEquipmentInfoService extends IService<EquipmentInfo> {
List
<
Map
<
String
,
Object
>>
getEquipmentLifeTree
(
String
id
,
String
eventType
);
void
importExcel
(
MultipartFile
file
,
String
departId
)
throws
Exception
;
String
reCreateQrCode
(
String
id
);
}
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/service/impl/EquipmentInfoServiceImpl.java
查看文件 @
8f8f02c
...
...
@@ -331,4 +331,13 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E
}
}
@Override
public
String
reCreateQrCode
(
String
id
)
{
EquipmentInfo
equipmentInfo
=
equipmentInfoMapper
.
selectById
(
id
);
String
qrCodePath
=
createQrCode
(
equipmentInfo
.
getId
());
equipmentInfo
.
setQrCode
(
qrCodePath
);
equipmentInfoMapper
.
updateById
(
equipmentInfo
);
return
qrCodePath
;
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论