Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
be66f3ab
由
康伟
编写于
2025-03-08 16:53:53 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge remote-tracking branch 'origin/master'
2 个父辈
69681c61
88172627
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
88 行增加
和
59 行删除
sk-module-biz/src/main/java/com/skua/modules/ajh/controller/AjhRectificationInfoController.java
sk-module-biz/src/main/java/com/skua/modules/ajh/controller/AjhWasteReportController.java
sk-module-biz/src/main/java/com/skua/modules/ajh/entity/AjhWasteMonthReport.java
sk-module-biz/src/main/java/com/skua/modules/ajh/entity/AjhWasteYearReport.java
sk-module-biz/src/main/java/com/skua/modules/ajh/mapper/AjhWasteProduceMapper.java
sk-module-biz/src/main/java/com/skua/modules/ajh/mapper/xml/AjhWasteProduceMapper.xml
sk-module-biz/src/main/java/com/skua/modules/realtimedata/service/IRealTimeDataService.java
sk-module-biz/src/main/java/com/skua/modules/realtimedata/service/impl/RealTimeDataServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/threedimensional/service/impl/ScreenDataServiceImpl.java
sk-module-biz/src/main/resources/application-prod.yml
sk-module-equipment/src/main/java/com/skua/modules/equipment/entity/EquipmentMaintainTask.java
sk-module-equipment/src/main/java/com/skua/modules/equipment/mapper/xml/EquipmentMaintainTaskMapper.xml
sk-module-system/src/main/java/com/skua/modules/system/controller/SysUserController.java
sk-module-system/src/main/java/com/skua/modules/system/mapper/xml/SysDepartMapper.xml
sk-module-biz/src/main/java/com/skua/modules/ajh/controller/AjhRectificationInfoController.java
查看文件 @
be66f3a
...
...
@@ -349,8 +349,10 @@ public class AjhRectificationInfoController {
@ApiOperation
(
value
=
"安全态势总览数据统计:统计教育+题库"
,
notes
=
"安全态势总览数据统计:统计教育+题库"
)
@RequestMapping
(
value
=
"/jyCensus"
,
method
=
RequestMethod
.
GET
)
public
Map
<
String
,
Object
>
jyCensus
(
@RequestParam
(
name
=
"now"
,
required
=
true
)
String
now
)
{
Map
<
String
,
Object
>
result
=
ajhRectificationInfoService
.
jyCensus
(
now
);
public
Result
<
Map
<
String
,
Object
>>
jyCensus
(
@RequestParam
(
name
=
"now"
,
required
=
true
)
String
now
)
{
Result
<
Map
<
String
,
Object
>>
result
=
new
Result
<
Map
<
String
,
Object
>>();
Map
<
String
,
Object
>
map
=
ajhRectificationInfoService
.
jyCensus
(
now
);
result
.
setResult
(
map
);
return
result
;
}
}
...
...
sk-module-biz/src/main/java/com/skua/modules/ajh/controller/AjhWasteReportController.java
查看文件 @
be66f3a
...
...
@@ -93,7 +93,7 @@ public class AjhWasteReportController {
if
(
reportYear
==
null
){
reportYear
=
String
.
valueOf
(
Year
.
now
().
getValue
());
}
IPage
<
AjhWasteYearReport
>
pageList
=
wasteReportService
.
queryPageListByYear
(
page
,
departId
,
reportYear
);
IPage
<
AjhWasteYearReport
>
pageList
=
wasteReportService
.
queryPageListByYear
(
page
,
departId
,
reportYear
);
result
.
setSuccess
(
true
);
result
.
setResult
(
pageList
);
return
result
;
...
...
sk-module-biz/src/main/java/com/skua/modules/ajh/entity/AjhWasteMonthReport.java
查看文件 @
be66f3a
...
...
@@ -9,6 +9,8 @@ import lombok.Data;
import
org.apache.commons.lang3.StringUtils
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
import
java.text.DecimalFormat
;
/**
* 危险废物台账月报报表
*/
...
...
@@ -57,11 +59,11 @@ public class AjhWasteMonthReport {
@ApiModelProperty
(
value
=
"贮存量"
)
private
String
monthKeep
;
public
String
getStockOnHand
()
{
//数据之间应进行逻辑验算:期初量+入库量-出库量=在存量。
if
(
StringUtils
.
isEmpty
(
stockOnHand
)){
stockOnHand
=
ConvertUtils
.
getDouble
(
monthProduce
,
0
d
)
+
ConvertUtils
.
getDouble
(
monthKeep
,
0
d
)
-
ConvertUtils
.
getDouble
(
monthOut
,
0
d
)+
""
;
DecimalFormat
df
=
new
DecimalFormat
(
"#.##"
);
stockOnHand
=
df
.
format
(
ConvertUtils
.
getDouble
(
monthKeep
,
0
d
)
-
ConvertUtils
.
getDouble
(
monthOut
,
0
d
))
;
}
return
stockOnHand
;
}
...
...
sk-module-biz/src/main/java/com/skua/modules/ajh/entity/AjhWasteYearReport.java
查看文件 @
be66f3a
package
com
.
skua
.
modules
.
ajh
.
entity
;
import
java.text.DecimalFormat
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.skua.core.aspect.annotation.Dict
;
import
com.skua.core.util.ConvertUtils
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.jeecgframework.poi.excel.annotation.Excel
;
...
...
@@ -56,11 +59,23 @@ public class AjhWasteYearReport {
@ApiModelProperty
(
value
=
"年度贮存量"
)
private
String
yearKeep
;
@TableField
(
exist
=
false
)
@Excel
(
name
=
"在存量"
,
width
=
15
)
@ApiModelProperty
(
value
=
"在存量"
)
private
String
stockOnHand
;
/**出库量*/
@TableField
(
exist
=
false
)
@Excel
(
name
=
"出库量"
,
width
=
15
)
@ApiModelProperty
(
value
=
"出库量"
)
private
String
yearOut
;
public
String
getStockOnHand
()
{
//数据之间应进行逻辑验算:期初量+入库量-出库量=在存量。
if
(
StringUtils
.
isEmpty
(
stockOnHand
)){
DecimalFormat
df
=
new
DecimalFormat
(
"#.##"
);
stockOnHand
=
df
.
format
(
ConvertUtils
.
getDouble
(
yearKeep
,
0
d
)
-
ConvertUtils
.
getDouble
(
yearOut
,
0
d
))
;
}
return
stockOnHand
;
}
}
...
...
sk-module-biz/src/main/java/com/skua/modules/ajh/mapper/AjhWasteProduceMapper.java
查看文件 @
be66f3a
...
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.skua.modules.ajh.entity.AjhWasteMonthReport
;
import
com.skua.modules.ajh.entity.AjhWasteYearReport
;
import
com.skua.tool.annotation.Anonymous
;
import
org.apache.ibatis.annotations.Param
;
import
com.skua.modules.ajh.entity.AjhWasteProduce
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -14,6 +15,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* 危废产生记录表
*/
public
interface
AjhWasteProduceMapper
extends
BaseMapper
<
AjhWasteProduce
>
{
/***
* 月报
* @param page
...
...
sk-module-biz/src/main/java/com/skua/modules/ajh/mapper/xml/AjhWasteProduceMapper.xml
查看文件 @
be66f3a
...
...
@@ -46,20 +46,19 @@
<select
id=
"queryPageListByYear"
resultType=
"com.skua.modules.ajh.entity.AjhWasteYearReport"
>
SELECT
p.id,
p.waste_code,
p.waste_name,
LEFT ( p.pro_out_date, 4 ) AS report_year,
ROUND(ifnull(SUM( p.pro_come_count ),0) , 2) AS year_produce,
ROUND(ifnull(SUM( k.keep_out_count ),0) , 2) AS year_out,
ROUND(ifnull(SUM( k.keep_in_count ),0) , 2) AS year_keep,
d.depart_name AS depart_name,
d.id as depart_id
p.id,
p.waste_code,
p.waste_name,
LEFT ( p.pro_out_date, 4 ) AS report_year,
ROUND(ifnull(SUM( p.pro_come_count ),0) , 2) AS year_produce,
ROUND(ifnull(SUM( k.keep_out_count ),0) , 2) AS year_out,
ROUND(ifnull(SUM( k.keep_in_count ),0) , 2) AS year_keep,
d.depart_name AS depart_name,
d.id as depart_id
FROM
ajh_waste_produce p
ajh_waste_produce p
LEFT JOIN ( SELECT * FROM ajh_waste_keep WHERE LEFT ( keep_in_date, 4 ) = #{reportYear} ) k ON p.depart_id = k.depart_id
AND p.waste_code = k.waste_code
AND p.waste_name = k.waste_name
AND p.waste_code = k.waste_code AND p.waste_name = k.waste_name
LEFT JOIN sys_depart d ON p.depart_id = d.id
WHERE
LEFT ( p.pro_out_date, 4 ) = #{reportYear}
...
...
@@ -70,8 +69,8 @@
</foreach>
</if>
GROUP BY
p.depart_id,
p.waste_code,
p.waste_name
p.depart_id,
p.waste_code,
p.waste_name
</select>
</mapper>
...
...
sk-module-biz/src/main/java/com/skua/modules/realtimedata/service/IRealTimeDataService.java
查看文件 @
be66f3a
...
...
@@ -5,9 +5,9 @@ import java.util.Map;
public
interface
IRealTimeDataService
{
List
<
Map
<
String
,
Object
>>
queryRealTimeData
(
String
factory
Id
,
String
type
,
String
structId
,
String
nmName
);
List
<
Map
<
String
,
Object
>>
queryRealTimeData
(
String
depart
Id
,
String
type
,
String
structId
,
String
nmName
);
List
<
Map
<
String
,
Object
>>
queryStructData
(
String
factory
Id
);
List
<
Map
<
String
,
Object
>>
queryStructData
(
String
depart
Id
);
/**
...
...
@@ -17,7 +17,7 @@ public interface IRealTimeDataService {
* @Param [factoryId]
* @return java.util.Map<java.lang.String, java.lang.Object>
**/
Map
<
String
,
Object
>
getFacInfoByFactoryId
(
String
factory
Id
);
Map
<
String
,
Object
>
getFacInfoByFactoryId
(
String
depart
Id
);
...
...
@@ -34,10 +34,10 @@ public interface IRealTimeDataService {
*
* @Description web趋势
* @Date 2022-03-24 10:12
* @Param [
factory
Id, timeType, startTime, endTime, id]
* @Param [
depart
Id, timeType, startTime, endTime, id]
* @return java.util.Map<java.lang.String, java.lang.Object>
**/
Map
<
String
,
Object
>
getSZTreadWeb
(
String
factory
Id
,
String
timeType
,
String
startTime
,
String
endTime
,
String
id
);
Map
<
String
,
Object
>
getSZTreadWeb
(
String
depart
Id
,
String
timeType
,
String
startTime
,
String
endTime
,
String
id
);
/**
* <pre>
...
...
@@ -71,7 +71,7 @@ public interface IRealTimeDataService {
*/
Map
<
String
,
Object
>
getProjectInfo
();
List
<
Map
<
String
,
Object
>>
queryStructDataApp
(
String
factory
Id
);
List
<
Map
<
String
,
Object
>>
queryStructDataApp
(
String
depart
Id
);
List
<
Map
<
String
,
Object
>>
queryRealTimeDataApp
(
String
factory
Id
,
String
type
,
String
structId
,
String
sortType
,
String
nmName
);
List
<
Map
<
String
,
Object
>>
queryRealTimeDataApp
(
String
depart
Id
,
String
type
,
String
structId
,
String
sortType
,
String
nmName
);
}
...
...
sk-module-biz/src/main/java/com/skua/modules/realtimedata/service/impl/RealTimeDataServiceImpl.java
查看文件 @
be66f3a
此文件的差异被折叠,
点击展开。
sk-module-biz/src/main/java/com/skua/modules/threedimensional/service/impl/ScreenDataServiceImpl.java
查看文件 @
be66f3a
...
...
@@ -196,20 +196,19 @@ public class ScreenDataServiceImpl implements IScreenDataService {
if
(
StringUtil
.
isNotBlank
(
sb
.
toString
()))
{
appendSql
=
"and a.id in ("
+
sb
.
substring
(
1
)
+
")"
;
}
}
return
masterDB
.
queryForList
(
"select t.*,\n"
+
"round(avg(t.indexValue/t.proScale),2) as fhl\n
"
+
"
, round(sum(t.indexValue),2) totalCLSL\n
"
+
"
from(\n
"
+
"
SELECT a.id as departId,a.depart_name as departName,b.index_tag as indexTag,b.index_value as indexValue,
"
+
"
(select c.pro_scale*10000 from sys_factory_info c where a.id = c.depart_id) as proScale\n
"
+
"
FROM sys_depart a LEFT JOIN sys_data_calculation b ON a.id = b.depart_id \n
"
+
"
where a.del_flag= 1 and a.depart_type = 1 and b.index_tag = 'JSLJLL'\n
"
+
"
\tand ts LIKE '"
+
month
+
"%' \n"
+
appendSql
+
"
\tGROUP BY a.id, b.ts)t GROUP BY t.departId"
);
String
dataViewName2119
=
ReportViewUtil
.
buildViewLike
(
ReportConstant
.
view2119
,
"CSL"
,
departId
,
month
);
String
sql
=
"select t.*,
"
+
"
round(avg(t.indexValue/t.proScale),2) as fhl,
"
+
"
round(sum(t.indexValue),2) totalCLSL
"
+
"
from(
"
+
"
SELECT a.id as departId,a.depart_name as departName,'JSLJLL' as indexTag,b.CSL as indexValue,
"
+
"
(select c.pro_scale*10000 from sys_factory_info c where a.id = c.depart_id) as proScale
"
+
"
FROM sys_depart a
"
+
"
LEFT JOIN (select v2.time,v2.CSL,v2.depart_id from "
+
dataViewName2119
+
" v2 where v2.time like '"
+
month
+
"%') b ON a.id = b.depart_id"
+
"
where a.del_flag= 1 and a.depart_type = 1 "
+
appendSql
+
" GROUP BY a.id, b.time)t GROUP BY t.departId"
;
return
masterDB
.
queryForList
(
sql
);
}
@Override
...
...
sk-module-biz/src/main/resources/application-prod.yml
查看文件 @
be66f3a
...
...
@@ -162,11 +162,11 @@ skua:
isRunTimeInterval
:
3600
#视频对接相关配置,未使用,待完善
video
:
lan
:
20.0.99.6
ip
:
11
3.249.91.27
lan
:
112.123.135.139
ip
:
11
2.123.135.139
port
:
8667
appkey
:
2
1656155
secretkey
:
llQvkzDIzmYnNiXNYxDN
appkey
:
2
9461614
secretkey
:
RkJhpwVKJyf0FbDwQpbP
#消息推送
push
:
#是否开启流程消息推送
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/entity/EquipmentMaintainTask.java
查看文件 @
be66f3a
...
...
@@ -103,4 +103,7 @@ public class EquipmentMaintainTask {
@ApiModelProperty
(
value
=
"维保类型"
)
@Dict
(
dicCode
=
"maintenance_type"
)
private
String
maintenanceType
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"预估费用"
)
private
String
planCost
;
}
...
...
sk-module-equipment/src/main/java/com/skua/modules/equipment/mapper/xml/EquipmentMaintainTaskMapper.xml
查看文件 @
be66f3a
...
...
@@ -26,6 +26,7 @@
emt.picture_url AS pictureUrl,
emt.equipment_id AS equipmentId,
emt.results_enforcement AS resultsEnforcement,
emp.plan_cost AS planCost,
emp.plan_accepter_id AS planAccepterId,
emp.plan_arranger_id,
emt.device_administrator_id AS deviceAdministratorId,
...
...
sk-module-system/src/main/java/com/skua/modules/system/controller/SysUserController.java
查看文件 @
be66f3a
...
...
@@ -1121,20 +1121,21 @@ public class SysUserController {
String
newCid
=
loginUser
.
getCid
();
if
(
StrUtil
.
isNotBlank
(
newCid
))
{
//修改手机cid
String
oldCid
=
oldUser
.
getCid
();
if
(
StringUtils
.
isBlank
(
oldCid
))
{
oldUser
.
setCid
(
loginUser
.
getCid
());
}
else
{
String
[]
split
=
oldCid
.
split
(
","
);
Set
<
String
>
sets
=
new
HashSet
<>(
Arrays
.
asList
(
split
));
sets
.
add
(
loginUser
.
getCid
());
StringBuilder
stringBuilder
=
new
StringBuilder
();
for
(
String
set
:
sets
)
{
stringBuilder
.
append
(
set
+
","
);
}
stringBuilder
.
deleteCharAt
(
stringBuilder
.
length
()
-
1
);
oldUser
.
setCid
(
stringBuilder
.
toString
());
}
oldUser
.
setCid
(
loginUser
.
getCid
());
// String oldCid = oldUser.getCid();
// if (StringUtils.isBlank(oldCid)) {
// oldUser.setCid(loginUser.getCid());
// } else {
// String[] split = oldCid.split(",");
// Set<String> sets = new HashSet<>(Arrays.asList(split));
// sets.add(loginUser.getCid());
// StringBuilder stringBuilder = new StringBuilder();
// for (String set : sets) {
// stringBuilder.append(set + ",");
// }
// stringBuilder.deleteCharAt(stringBuilder.length() - 1);
// oldUser.setCid(stringBuilder.toString());
// }
sysBaseAPI
.
updateUser
(
oldUser
);
result
.
success
(
"cid修改成功"
);
}
...
...
sk-module-system/src/main/java/com/skua/modules/system/mapper/xml/SysDepartMapper.xml
查看文件 @
be66f3a
...
...
@@ -255,6 +255,11 @@
'${item}'
</foreach>
)
OR parent_id IN ( SELECT id from sys_depart WHERE parent_id IN(SELECT id FROM sys_depart WHERE parent_id IN
<foreach
item=
"item"
index=
"index"
collection=
"departIds.split(',')"
open=
"("
separator=
","
close=
")"
>
'${item}'
</foreach>
))
ORDER BY
depart_type,
depart_order
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论