Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
63546ee0
由
张雷
编写于
2025-03-27 18:25:30 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge remote-tracking branch 'origin/master' into master
2 个父辈
1a41cb3b
efe583e9
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
49 行增加
和
24 行删除
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/MaterialINServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/statistics/vo/ReportTargetStatisticsVO.java
sk-module-datafill/src/main/java/com/skua/modules/report/controller/MajorIssuesProcessController.java
sk-module-datafill/src/main/java/com/skua/modules/report/entity/MajorIssuesProcess.java
sk-module-datafill/src/main/java/com/skua/modules/report/service/impl/OperationReportServiceImpl.java
sk-module-datafill/src/main/java/com/skua/modules/report/vo/ProductDataVO.java
sk-module-biz/src/main/java/com/skua/modules/erp/service/impl/MaterialINServiceImpl.java
查看文件 @
63546ee
...
...
@@ -173,7 +173,7 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia
@Transactional
public
String
auditMaterialIn
(
String
id
,
String
approveState
,
String
approveMessage
)
throws
Exception
{
String
errMsg
=
null
;
boolean
inAndOutStock
=
false
;
boolean
inAndOutStock
=
false
;
//保存
MaterialIN
materialINTemp
=
this
.
baseMapper
.
queryById
(
id
);
if
(!
"3"
.
equals
(
materialINTemp
.
getAuditStatus
())){
...
...
sk-module-biz/src/main/java/com/skua/modules/statistics/vo/ReportTargetStatisticsVO.java
查看文件 @
63546ee
package
com
.
skua
.
modules
.
statistics
.
vo
;
import
cn.jiguang.common.utils.StringUtils
;
import
com.skua.core.aspect.annotation.Dict
;
import
com.skua.tool.util.JSUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/controller/MajorIssuesProcessController.java
查看文件 @
63546ee
package
com
.
skua
.
modules
.
report
.
controller
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
com.skua.core.api.vo.Result
;
...
...
@@ -150,9 +151,11 @@ public class MajorIssuesProcessController {
}
else
{
if
(
StringUtils
.
isNotEmpty
(
status
)){
majorIssuesProcess
.
setStatus
(
status
);
}
else
{
majorIssuesProcess
.
setStatus
(
"2"
);
}
majorIssuesProcess
.
setEndProgressTime
(
new
Date
());
//设置事项结束时间
majorIssuesProcessService
.
updateById
(
majorIssuesProcess
);
result
.
setResult
(
majorIssuesProcess
);
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/entity/MajorIssuesProcess.java
查看文件 @
63546ee
...
...
@@ -75,6 +75,12 @@ public class MajorIssuesProcess {
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
currentProgressTime
;
@ApiModelProperty
(
value
=
"事项结束时间"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
endProgressTime
;
@Excel
(
name
=
"状态"
,
width
=
15
)
@ApiModelProperty
(
value
=
"状态: 未开始 0 ; 进行中 1 ; 已结束 2"
)
@Dict
(
dicCode
=
"meetting_status"
)
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/service/impl/OperationReportServiceImpl.java
查看文件 @
63546ee
...
...
@@ -107,11 +107,25 @@ public class OperationReportServiceImpl implements IOperationReportService {
//目标水量
sql
=
"select sum(ifnull(target_water,0)) target_water from report_target_config where 1=1 "
;
if
(
StringUtils
.
isNotEmpty
(
departId
)){
sql
+=
" and depart_id in ("
+
JSUtils
.
quoteEach
(
departId
,
","
)+
")"
;
//根据开始时间、结束时间判断;如果是同一个月,那么就获取月度目标,不在一个月那就获取年度目标
String
target_water
=
null
;
if
(
startMonth
.
equals
(
endMonth
)){
//获取月度目标
sql
=
"select sum(ifnull(target_value,0)) target_water from report_target_config_sub where target_type='sl' and target_time = '"
+
endMonth
+
"' "
;
if
(
StringUtils
.
isNotEmpty
(
departId
)){
sql
+=
" and depart_id in ("
+
JSUtils
.
quoteEach
(
departId
,
","
)+
")"
;
}
target_water
=
getJdbcTemplate
().
queryForObject
(
sql
,
String
.
class
);
}
else
{
//获取年度目标
sql
=
"select sum(ifnull(target_water,0)) target_water from report_target_config where 1=1 and target_year = '"
+
year
+
"' "
;
if
(
StringUtils
.
isNotEmpty
(
departId
)){
sql
+=
" and depart_id in ("
+
JSUtils
.
quoteEach
(
departId
,
","
)+
")"
;
}
target_water
=
getJdbcTemplate
().
queryForObject
(
sql
,
String
.
class
);
}
String
target_water
=
getJdbcTemplate
().
queryForObject
(
sql
,
String
.
class
);
productDataVO
.
setAvgDayWaterVolume
(
JSUtils
.
divide
(
ysfsl
,
dayNum
)
);
String
completeRatio
=
JSUtils
.
multiply
(
JSUtils
.
divide
(
ysfsl
,
target_water
),
100
);
productDataVO
.
setCompleteRatio
(
completeRatio
);
//完成率
...
...
@@ -144,11 +158,11 @@ public class OperationReportServiceImpl implements IOperationReportService {
List
<
FReportWaterMonthDataVO
>
waterMonthDataList
=
getJdbcTemplate
().
query
(
sql
,
new
BeanPropertyRowMapper
<
FReportWaterMonthDataVO
>(
FReportWaterMonthDataVO
.
class
));
productDataVO
.
setWaterDeptartList
(
waterMonthDataList
);
//水电耗高于控制目标--水务公司列表 YYYY-MM
//水电耗高于控制目标--水务公司列表 YYYY-MM
月电耗
dataViewName4411
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view4411
,
"ydh,dhcmbzyy"
,
departId
,
startMonth
,
endMonth
);
sql
=
"select * from ( "
;
sql
+=
" select d.depart_name 'departName', aaa.depart_id , round(avg(aaa.ydh),2) realConsume , IFNULL(tc.target_power,2) 'targetConsume' ,GROUP_CONCAT(aaa.dhcmbzyy SEPARATOR '') 'causeAnalysis' from "
+
dataViewName4411
+
" aaa"
;;
sql
+=
" left join report_target_config tc on (tc.depart_id = aaa.depart_id and tc.target_year='
2024
')"
;
sql
+=
" left join report_target_config tc on (tc.depart_id = aaa.depart_id and tc.target_year='
"
+
year
+
"
')"
;
sql
+=
" left join sys_depart d on d.id = aaa.depart_id "
;
sql
+=
" group by aaa.depart_id )bbb where bbb.realConsume > bbb.targetConsume "
;
List
<
FReportPowerMonthDataVO
>
dhMonthDataList
=
getJdbcTemplate
().
query
(
sql
,
new
BeanPropertyRowMapper
<
FReportPowerMonthDataVO
>(
FReportPowerMonthDataVO
.
class
));
...
...
@@ -159,7 +173,7 @@ public class OperationReportServiceImpl implements IOperationReportService {
dataViewName4411
=
ReportViewUtil
.
buildView
(
ReportConstant
.
view4411
,
"yyh,yhcyqyy"
,
departId
,
startMonth
,
endMonth
);
sql
=
"select * from ( "
;
sql
+=
" select d.depart_name 'departName', aaa.depart_id , round(avg(aaa.yyh),2) realConsume , IFNULL(tc.target_drug,2) 'targetConsume' ,GROUP_CONCAT(aaa.yhcyqyy SEPARATOR '') 'causeAnalysis' from "
+
dataViewName4411
+
" aaa"
;;
sql
+=
" left join report_target_config tc on (tc.depart_id = aaa.depart_id and tc.target_year='
2024
')"
;
sql
+=
" left join report_target_config tc on (tc.depart_id = aaa.depart_id and tc.target_year='
"
+
year
+
"
')"
;
sql
+=
" left join sys_depart d on d.id = aaa.depart_id "
;
sql
+=
" group by aaa.depart_id )bbb where bbb.realConsume > bbb.targetConsume "
;
List
<
FReportPowerMonthDataVO
>
yyhMonthDataList
=
getJdbcTemplate
().
query
(
sql
,
new
BeanPropertyRowMapper
<
FReportPowerMonthDataVO
>(
FReportPowerMonthDataVO
.
class
));
...
...
sk-module-datafill/src/main/java/com/skua/modules/report/vo/ProductDataVO.java
查看文件 @
63546ee
...
...
@@ -98,21 +98,23 @@ public class ProductDataVO {
public
String
getWaterDeptartName
()
{
return
getDeptName
(
waterDeptartList
);
}
public
String
getPowerDeptartName
()
{
return
getDeptName2
(
powerDeptartList
);
}
String
deptName
=
""
;
if
(
waterDeptartList
!=
null
&&
!
waterDeptartList
.
isEmpty
()
){
for
(
FReportWaterMonthDataVO
dataVO
:
waterDeptartList
){
if
(
deptName
.
length
()
>
0
)
deptName
+=
"、"
;
if
(
StringUtils
.
isNotEmpty
(
dataVO
.
getDepartName
())){
deptName
+=
dataVO
.
getDepartName
();
}
public
String
getDrugDeptartName
()
{
return
getDeptName2
(
drugDeptartList
);
}
}
return
deptName
;
}
p
rivate
String
getDeptName
(
List
<
FReportWaterMonthDataVO
>
deptartList
)
{
p
ublic
String
getPowerDeptartName
()
{
String
deptName
=
""
;
if
(
deptartList
!=
null
&&
!
d
eptartList
.
isEmpty
()
){
for
(
FReport
WaterMonthDataVO
dataVO
:
d
eptartList
){
if
(
powerDeptartList
!=
null
&&
!
powerD
eptartList
.
isEmpty
()
){
for
(
FReport
PowerMonthDataVO
dataVO
:
powerD
eptartList
){
if
(
deptName
.
length
()
>
0
)
deptName
+=
"、"
;
if
(
StringUtils
.
isNotEmpty
(
dataVO
.
getDepartName
())){
deptName
+=
dataVO
.
getDepartName
();
...
...
@@ -122,19 +124,20 @@ public class ProductDataVO {
}
return
deptName
;
}
private
String
getDeptName2
(
List
<
FReportPowerMonthDataVO
>
deptartList
){
public
String
getDrugDeptartName
()
{
String
deptName
=
""
;
if
(
d
eptartList
!=
null
&&
!
d
eptartList
.
isEmpty
()
){
for
(
FReportPowerMonthDataVO
dataVO
:
deptartList
){
if
(
d
rugDeptartList
!=
null
&&
!
drugD
eptartList
.
isEmpty
()
){
for
(
FReportPowerMonthDataVO
dataVO
:
d
rugD
eptartList
){
if
(
deptName
.
length
()
>
0
)
deptName
+=
"、"
;
if
(
StringUtils
.
isNotEmpty
(
dataVO
.
getDepartName
())){
deptName
+=
dataVO
.
getDepartName
();
}
}
}
return
deptName
;
}
public
ProductDataVO
()
{
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论