Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
4cb9519b
由
张雷
编写于
2025-01-08 17:30:10 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
安环及报表问题修改
1 个父辈
1cf23567
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
41 行增加
和
25 行删除
sk-module-biz/src/main/java/com/skua/modules/ajh/controller/AjhRectificationInfoController.java
sk-module-biz/src/main/java/com/skua/modules/ajh/entity/AjhRectificationInfo.java
sk-module-datafill/src/main/java/com/skua/modules/custom/service/impl/FCustomReportDatasetServiceImpl.java
sk-module-datafill/src/main/java/com/skua/modules/report/controller/ReportDataController.java
sk-module-datafill/src/main/java/com/skua/modules/report/service/IReportDataService.java
sk-module-datafill/src/main/java/com/skua/modules/report/service/impl/ReportDataServiceImpl.java
sk-module-system/src/main/java/com/skua/modules/system/controller/SysFactoryInfoController.java
sk-module-system/src/main/java/com/skua/modules/system/mapper/xml/SysDepartMapper.xml
sk-module-system/src/main/java/com/skua/modules/system/service/impl/SysFactoryInfoServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/ajh/controller/AjhRectificationInfoController.java
查看文件 @
4cb9519
...
...
@@ -8,6 +8,7 @@ import com.skua.core.api.vo.Result;
import
com.skua.core.aspect.annotation.AutoLog
;
import
com.skua.core.context.BaseContextHandler
;
import
com.skua.core.query.QueryGenerator
;
import
com.skua.core.util.ConvertUtils
;
import
com.skua.modules.ajh.dto.AjhRectificationInfoAnalyseQueryDto
;
import
com.skua.modules.ajh.dto.AjhRectificationInfoMendDto
;
import
com.skua.modules.ajh.entity.AjhRectificationInfo
;
...
...
@@ -72,6 +73,7 @@ public class AjhRectificationInfoController {
ajhRectificationInfo
.
setDepartId
(
BaseContextHandler
.
getDeparts
());
}
QueryWrapper
<
AjhRectificationInfo
>
queryWrapper
=
QueryGenerator
.
initQueryWrapper
(
ajhRectificationInfo
,
req
.
getParameterMap
());
queryWrapper
.
eq
(
ConvertUtils
.
isNotEmpty
(
ajhRectificationInfo
.
getDangerId
()),
"danger_id"
,
ajhRectificationInfo
.
getDangerId
());
queryWrapper
.
orderByDesc
(
"rec_ord_level"
);
//重大风险排前面
Page
<
AjhRectificationInfo
>
page
=
new
Page
<
AjhRectificationInfo
>(
pageNo
,
pageSize
);
IPage
<
AjhRectificationInfo
>
pageList
=
ajhRectificationInfoService
.
page
(
page
,
queryWrapper
);
...
...
sk-module-biz/src/main/java/com/skua/modules/ajh/entity/AjhRectificationInfo.java
查看文件 @
4cb9519
...
...
@@ -55,6 +55,7 @@ public class AjhRectificationInfo extends FlowEntity {
/**风险库关联ID*/
@Excel
(
name
=
"风险库关联ID"
,
width
=
15
)
@ApiModelProperty
(
value
=
"风险库关联ID"
)
@Dict
(
dicCode
=
"id"
,
dictTable
=
"danger_level_manage"
,
dicText
=
"danger_name"
)
private
String
dangerId
;
/**验收人*/
@Excel
(
name
=
"验收人"
,
width
=
15
)
...
...
sk-module-datafill/src/main/java/com/skua/modules/custom/service/impl/FCustomReportDatasetServiceImpl.java
查看文件 @
4cb9519
...
...
@@ -91,7 +91,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
String
dataViewName3a24
=
ReportViewUtil
.
buildViewLike
(
ReportConstant
.
view3a24
,
field3a24
,
departId
,
dataTime
);
String
dataViewName3a24tb
=
ReportViewUtil
.
buildViewLike
(
ReportConstant
.
view3a24
,
field3a24
,
departId
,
tbYear
);
String
field4411
=
"yslwcbl,ysjsldyqntqyy,qntqsfsl,ysfsl,sfsldbbhl,sldyyqyy,dhgyqntqyy,yyf,yhgyqntqyy,dhcmbzyy,yhcyqyy"
;
String
field4411
=
"yslwcbl,ysjsldyqntqyy,qntqsfsl,ysfsl,sfsldbbhl,sldyyqyy,dhgyqntqyy,yyf,yhgyqntqyy,dhcmbzyy,yhcyqyy
,df,sbwhf
"
;
String
dataViewName4411
=
ReportViewUtil
.
buildViewLike
(
ReportConstant
.
view4411
,
field4411
,
departId
,
dataTime
);
String
dataViewName4411tb
=
ReportViewUtil
.
buildViewLike
(
ReportConstant
.
view4411
,
"qntqsfsl"
,
departId
,
tbYear
);
//主库数据源
...
...
@@ -118,7 +118,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
" v6.yhgyqntqyy, "
+
" rtc.target_power as bndhmb, "
+
" round(y.dlhj_year/sum(v1.CSL),2) as bnsjdh, "
+
" v6.dhcmbzyy, "
+
" v6.dhcmbzyy,
v6.df,v6.sbwhf,
"
+
" rtc.target_drug as bnyhmb, "
+
" round(y.yjhl_year/sum(v1.CSL),2) as bnsjyh, "
+
" v6.yhcyqyy "
+
...
...
@@ -153,7 +153,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
" ) v5 on v5.month_tb = right(left(v1.time,7),2) "
+
" left join ( "
+
" select v4411.time,v4411.yslwcbl,v4411.ysjsldyqntqyy,v4411.qntqsfsl,v4411.ysfsl,v4411.sfsldbbhl,v4411.sldyyqyy,"
+
" v4411.dhgyqntqyy,v4411.yyf,v4411.yhgyqntqyy,v4411.dhcmbzyy,v4411.yhcyqyy "
+
" v4411.dhgyqntqyy,v4411.yyf,v4411.yhgyqntqyy,v4411.dhcmbzyy,v4411.yhcyqyy
,v4411.df,v4411.sbwhf
"
+
" from "
+
dataViewName4411
+
" v4411 "
+
" where v4411.depart_id = '"
+
departId
+
"' and v4411.time like CONCAT('"
+
dataTime
+
"','%')) v6 on right(left(v6.time,7),2)=right(left(v1.time,7),2) "
+
" left join ( "
+
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/controller/ReportDataController.java
查看文件 @
4cb9519
...
...
@@ -59,7 +59,7 @@ public class ReportDataController {
}
//同步修改生产运营月报
if
(
dataList
.
size
()
>
0
){
reportDataService
.
syncUpdateScybData
(
dataList
.
get
(
0
).
get
(
"departId"
),
dataList
.
get
(
0
).
get
(
"time"
));
reportDataService
.
syncUpdateScybData
(
dataList
.
get
(
0
).
get
(
"departId"
),
dataList
.
get
(
0
).
get
(
"time"
)
,
ReportConstant
.
view4411
);
}
return
Result
.
ok
(
"报表批量添加成功"
);
}
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/service/IReportDataService.java
查看文件 @
4cb9519
...
...
@@ -11,5 +11,5 @@ public interface IReportDataService {
void
insertOrUpdateReportData
(
String
departId
,
String
time
,
Map
<
String
,
String
>
data
,
String
reportId
);
@Async
void
syncUpdateScybData
(
String
departId
,
String
time
);
void
syncUpdateScybData
(
String
departId
,
String
time
,
String
reportId
);
}
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/service/impl/ReportDataServiceImpl.java
查看文件 @
4cb9519
...
...
@@ -94,7 +94,7 @@ public class ReportDataServiceImpl implements IReportDataService {
}
@Override
public
void
syncUpdateScybData
(
String
departId
,
String
dataTime
)
{
public
void
syncUpdateScybData
(
String
departId
,
String
dataTime
,
String
reportId
)
{
String
year
=
dataTime
.
split
(
"-"
)[
0
];
List
<
Map
<
String
,
Object
>>
valueList
=
fCustomReportDatasetService
.
getDataFromHY
(
year
,
departId
);
List
<
Map
<
String
,
String
>>
list
=
new
ArrayList
<>();
...
...
@@ -109,7 +109,6 @@ public class ReportDataServiceImpl implements IReportDataService {
list
.
add
(
newMap
);
}
for
(
Map
<
String
,
String
>
data
:
list
)
{
String
reportId
=
ConvertUtils
.
getString
(
data
.
get
(
"reportId"
));
String
time
=
ConvertUtils
.
getString
(
data
.
get
(
"time"
));
insertOrUpdateReportData
(
departId
,
time
,
data
,
reportId
);
}
...
...
sk-module-system/src/main/java/com/skua/modules/system/controller/SysFactoryInfoController.java
查看文件 @
4cb9519
...
...
@@ -13,6 +13,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
com.alibaba.fastjson.JSONObject
;
import
com.skua.core.util.ConvertUtils
;
import
com.skua.modules.common.service.ICommonSqlService
;
import
com.skua.modules.system.service.ISysAreaService
;
import
com.skua.modules.system.service.ISysDictService
;
...
...
@@ -481,6 +482,19 @@ public class SysFactoryInfoController {
@GetMapping
(
value
=
"/queryByDepartId"
)
public
Result
queryByDepartId
(
@RequestParam
(
name
=
"departId"
,
required
=
true
)
String
departId
)
{
Result
result
=
new
Result
();
SysFactoryInfoVO
sysFactoryInfo
=
sysFactoryInfoService
.
getByDepartId
(
departId
);
JSONObject
jsonObject
=
sysDictService
.
translateTDictValue
(
sysFactoryInfo
);
if
(
sysFactoryInfo
==
null
)
{
departId
=
getDepart
(
BaseContextHandler
.
getRealDepartId
());
sysFactoryInfo
=
sysFactoryInfoService
.
getByDepartId
(
departId
);
jsonObject
=
sysDictService
.
translateTDictValue
(
sysFactoryInfo
);
}
result
.
setResult
(
jsonObject
);
result
.
setSuccess
(
true
);
return
result
;
}
private
String
getDepart
(
String
departId
)
{
String
departs
=
iCommonSqlService
.
getChildFactorys
(
departId
);
if
(
StringUtils
.
isNotEmpty
(
departs
)){
String
[]
departArray
=
departs
.
split
(
","
);
...
...
@@ -488,17 +502,10 @@ public class SysFactoryInfoController {
departId
=
departs
.
split
(
","
)[
0
];
}
}
SysFactoryInfoVO
sysFactoryInfo
=
sysFactoryInfoService
.
getByDepartId
(
departId
);
JSONObject
jsonObject
=
sysDictService
.
translateTDictValue
(
sysFactoryInfo
);
if
(
sysFactoryInfo
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
result
.
setResult
(
jsonObject
);
result
.
setSuccess
(
true
);
}
return
result
;
return
departId
;
}
@AutoLog
(
value
=
"查询污水厂设计规模"
)
@ApiOperation
(
value
=
"查询污水厂设计规模"
,
notes
=
"查询污水厂设计规模"
)
@GetMapping
(
value
=
"/queryFactoryDesignScale"
)
...
...
sk-module-system/src/main/java/com/skua/modules/system/mapper/xml/SysDepartMapper.xml
查看文件 @
4cb9519
...
...
@@ -255,6 +255,9 @@
'${item}'
</foreach>
)
ORDER BY
depart_type,
depart_order
</select>
<select
id=
"queryDeptAndUserTreeList"
parameterType=
"java.lang.String"
resultType=
"com.skua.modules.system.vo.SysDeptUserVO"
>
SELECT
...
...
@@ -356,6 +359,9 @@
'${item}'
</foreach>
))
ORDER BY
depart_type,
depart_order
</select>
<select
id=
"queryDepartsByIds"
resultType=
"com.skua.modules.system.entity.SysDepart"
>
...
...
@@ -368,5 +374,8 @@
<foreach
item=
"item"
index=
"index"
collection=
"ids.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
ORDER BY
depart_type,
depart_order
</select>
</mapper>
...
...
sk-module-system/src/main/java/com/skua/modules/system/service/impl/SysFactoryInfoServiceImpl.java
查看文件 @
4cb9519
...
...
@@ -73,13 +73,13 @@ public class SysFactoryInfoServiceImpl extends ServiceImpl<SysFactoryInfoMapper,
@Override
public
SysFactoryInfoVO
getByDepartId
(
String
departId
)
{
SysFactoryInfoVO
sysFactoryInfo
=
new
SysFactoryInfoVO
();
String
departs
=
commonSqlMapper
.
getChildFactorys
(
departId
);
if
(
StringUtils
.
isNotEmpty
(
departs
)){
String
[]
departArray
=
departs
.
split
(
","
);
if
(
departArray
.
length
>
1
){
departId
=
departs
.
split
(
","
)[
0
];
}
}
//
String departs = commonSqlMapper.getChildFactorys(departId);
//
if(StringUtils.isNotEmpty(departs)){
//
String[] departArray = departs.split(",");
//
if(departArray.length>1){
//
departId = departs.split(",")[0];
//
}
//
}
//获取厂站基本信息
sysFactoryInfo
=
sysFactoryInfoMapper
.
getByDepartId
(
departId
);
SysDepart
sysDepart
=
sysDepartService
.
getById
(
departId
);
...
...
@@ -87,8 +87,6 @@ public class SysFactoryInfoServiceImpl extends ServiceImpl<SysFactoryInfoMapper,
List
<
SysDepart
>
departList
=
sysDepartService
.
list
(
new
QueryWrapper
<
SysDepart
>().
eq
(
"depart_type"
,
1
).
eq
(
"del_flag"
,
1
));
QueryWrapper
<
SysDepart
>
sysDepartQueryWrapper
=
new
QueryWrapper
<>();
sysDepartQueryWrapper
.
eq
(
"depart_type"
,
1
).
eq
(
"del_flag"
,
1
);
//List<Map<String, Object>> departList = sysDepartService.queryFactoryDevice(sysDepartQueryWrapper);
//List<String> departIds = departList.stream().filter(depart-> ObjectUtil.isNotEmpty(depart.get("deviceId"))).map(depart -> String.valueOf(depart.get("departId"))).collect(Collectors.toList());
List
<
String
>
departIds
=
departList
.
stream
().
map
(
depart
->
depart
.
getId
()).
collect
(
Collectors
.
toList
());
List
<
SysFactoryInfo
>
sysFactoryInfos
=
this
.
list
(
new
QueryWrapper
<
SysFactoryInfo
>().
in
(
"depart_id"
,
departIds
));
double
ProScaleSum
=
sysFactoryInfos
.
stream
().
filter
(
info
->
StringUtils
.
isNotBlank
(
info
.
getProScale
())).
mapToDouble
(
info
->
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论