Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
2a158411
由
张雷
编写于
2024-11-22 15:47:34 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
运营分析专题修改
1 个父辈
70cbeeb7
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
31 行增加
和
13 行删除
sk-base-common/src/main/java/com/skua/common/constant/ReportConstant.java
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/FactoryOperateCenterMapper.java
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/xml/FactoryOperateCenterMapper.xml
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/impl/FactoryOperateCenterServiceImpl.java
sk-module-datafill/src/main/java/com/skua/modules/job/NFDataSyncJob.java
sk-base-common/src/main/java/com/skua/common/constant/ReportConstant.java
查看文件 @
2a15841
...
...
@@ -20,6 +20,9 @@ public interface ReportConstant {
//供水日报
public
static
final
String
view6643
=
"6643ef559d863f57de5fd33220c773c4"
;
//周报
public
static
final
String
view30a8
=
"30a80f54ff288ede9d2df2ddd073b6c3"
;
//药剂字段
public
static
final
String
fieldYj
=
"PAMZ,PAMF,PAMRJ,SCLPAMZ,SCLPAMF,NACLO,PACGT,PACYT,PFS,FHTY,RYXNJ,"
+
"YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2"
;
...
...
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/FactoryOperateCenterMapper.java
查看文件 @
2a15841
...
...
@@ -25,7 +25,7 @@ public interface FactoryOperateCenterMapper {
List
<
Map
<
String
,
Object
>>
getFlowData
(
@Param
(
"departId"
)
String
departId
,
@Param
(
"month"
)
String
month
);
List
<
Map
<
String
,
String
>>
getReportCount
(
@Param
(
"departId"
)
String
departId
,
@Param
(
"month"
)
String
month
,
List
<
Map
<
String
,
Object
>>
getReportCount
(
@Param
(
"departId"
)
String
departId
,
@Param
(
"month"
)
String
month
,
@Param
(
"reportName"
)
String
reportName
);
@Anonymous
...
...
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/mapper/xml/FactoryOperateCenterMapper.xml
查看文件 @
2a15841
...
...
@@ -121,12 +121,15 @@
<select
id=
"getReportCount"
resultType=
"java.util.HashMap"
>
SELECT
time
v.
time
FROM
${reportName}
${reportName}
v
WHERE
depart_id = #{departId}
AND time LIKE CONCAT(#{month},'%')
v.depart_id in
<foreach
item=
"item"
index=
"index"
collection=
"departId.split(',')"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
AND v.time LIKE CONCAT(#{month},'%')
</select>
<select
id=
"getSdyData"
resultType=
"java.util.HashMap"
>
...
...
sk-module-datafill/src/main/java/com/skua/modules/dataAnalysis/service/impl/FactoryOperateCenterServiceImpl.java
查看文件 @
2a15841
...
...
@@ -300,10 +300,14 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer
double
ndmb
=
100
;
int
ndmbd
=
1
;
int
ndmbs
=
1
;
double
scyb
=
100
;
int
scybd
=
1
;
int
scybs
=
1
;
double
zhf
=
100
;
List
<
Map
<
String
,
String
>>
nhList
=
factoryOperateCenterMapper
.
getReportCount
(
departId
,
month
,
"view_3a24"
);
//能耗日报表
List
<
Map
<
String
,
String
>>
yyzbList
=
factoryOperateCenterMapper
.
getReportCount
(
departId
,
month
,
"view_30a8"
);
//运营周报表
List
<
Map
<
String
,
String
>>
scybList
=
factoryOperateCenterMapper
.
getReportCount
(
departId
,
month
,
"view_4411"
);
//月度生产数据报表
List
<
Map
<
String
,
String
>>
hyList
=
factoryOperateCenterMapper
.
getReportCount
(
departId
,
month
,
"view_9bff"
);
//化验数据日报表
String
dataViewName3a24
=
ReportViewUtil
.
buildViewLike
(
ReportConstant
.
view3a24
,
""
,
departId
,
month
);
List
<
Map
<
String
,
Object
>>
nhList
=
factoryOperateCenterMapper
.
getReportCount
(
departId
,
month
,
dataViewName3a24
);
//能耗日报表
String
dataViewName30a8
=
ReportViewUtil
.
buildViewLike
(
ReportConstant
.
view30a8
,
""
,
departId
,
month
);
List
<
Map
<
String
,
Object
>>
yyzbList
=
factoryOperateCenterMapper
.
getReportCount
(
departId
,
month
,
dataViewName30a8
);
//运营周报表
String
dataViewName4411
=
ReportViewUtil
.
buildViewLike
(
ReportConstant
.
view4411
,
""
,
departId
,
month
);
List
<
Map
<
String
,
Object
>>
scybList
=
factoryOperateCenterMapper
.
getReportCount
(
departId
,
month
,
dataViewName4411
);
//月度生产数据报表
String
dataViewName9bff
=
ReportViewUtil
.
buildViewLike
(
ReportConstant
.
view9bff
,
""
,
departId
,
month
);
List
<
Map
<
String
,
Object
>>
hyList
=
factoryOperateCenterMapper
.
getReportCount
(
departId
,
month
,
dataViewName9bff
);
//化验数据日报表
//能耗报表
nhd
=
nhList
.
size
();
nh
=
DoubleOperaUtils
.
bigDecimalRound
((
100
*
nhd
)/
dayCount
,
0
);
...
...
sk-module-datafill/src/main/java/com/skua/modules/job/NFDataSyncJob.java
查看文件 @
2a15841
...
...
@@ -26,6 +26,11 @@ public class NFDataSyncJob implements Job {
@Autowired
private
IReportDataService
reportDataService
;
//污水水质
private
static
String
wsFields
=
"JSCOD,JSAD,JSPH,JSZD,JSZL,JSSS,CSCOD,CSAD,CSPH,CSTN,CSZL,CSSS"
;
//供水指标
private
static
String
gsFields
=
"GSL,YSSD,CCSWD,YSWD,CCSPH,YSPH,CCSAD,YSAD,CCSHYL,YSHYL,CCSSD,"
+
"YSNRDCGJQ,CCSRYHT,YSRYHT,CCSNRDCGJQ,CCSZDCGJQ,CCSJLZS,YSZDCGJQ,YSJLZS,CCSRYKJD,YSRYKJD,CCSCHW,YSCHW,CCSHZD,YSHZD"
;
/**
* 若参数变量名修改 QuartzJobController中也需对应修改
...
...
@@ -61,14 +66,17 @@ public class NFDataSyncJob implements Job {
data
.
put
(
"reportId"
,
ReportConstant
.
view2119
);
reportDataService
.
insertOrUpdateReportData
(
departId
,
time
,
data
,
ReportConstant
.
view2119
);
}
else
if
(
"hyrb"
.
equals
(
itemType
)){
String
indexs
=
"JSCOD,JSAD,JSPH,JSZD,JSZL,JSSS,CSCOD,CSAD,CSPH,CSTN,CSZL,CSSS"
;
if
(
indexs
.
indexOf
(
itemCode
)
>
0
){
if
(
wsFields
.
indexOf
(
itemCode
)
>
0
){
data
.
put
(
itemCode
+
"HY"
,
itemValue
);
data
.
put
(
"reportId"
,
ReportConstant
.
view9bff
);
reportDataService
.
insertOrUpdateReportData
(
departId
,
time
,
data
,
ReportConstant
.
view9bff
);
}
else
if
(
gsFields
.
indexOf
(
itemCode
)
>
0
){
data
.
put
(
itemCode
,
itemValue
);
data
.
put
(
"reportId"
,
ReportConstant
.
view6643
);
reportDataService
.
insertOrUpdateReportData
(
departId
,
time
,
data
,
ReportConstant
.
view6643
);
}
else
{
data
.
put
(
itemCode
,
itemValue
);
}
data
.
put
(
"reportId"
,
ReportConstant
.
view9bff
);
reportDataService
.
insertOrUpdateReportData
(
departId
,
time
,
data
,
ReportConstant
.
view9bff
);
}
else
{
log
.
info
(
"恩菲【"
+
itemType
+
"】类型数据未进行数据同步"
);
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论