Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
20a50c69
由
张雷
编写于
2025-01-07 16:39:10 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
隐患排查功能流程修改
1 个父辈
0ee986ad
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
53 行增加
和
8 行删除
sk-module-biz/src/main/java/com/skua/modules/flow/FlowBussinessDescManageServiceImpl.java
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/EnvironmentTargetServiceImpl.java
sk-module-biz/src/main/resources/application-prod.yml
sk-module-system/src/main/java/com/skua/modules/system/controller/SysFactoryUserInfoController.java
sk-module-biz/src/main/java/com/skua/modules/flow/FlowBussinessDescManageServiceImpl.java
查看文件 @
20a50c6
...
...
@@ -150,9 +150,11 @@ public class FlowBussinessDescManageServiceImpl implements IFlowBusinessDescServ
List
<
String
>
avgIndexCodeArray
=
Arrays
.
asList
(
ids
.
split
(
","
));
String
inSqlPart
=
avgIndexCodeArray
.
stream
().
map
(
s
->
"'"
+
s
.
trim
()
+
"'"
).
collect
(
Collectors
.
joining
(
","
));
String
sql
=
"SELECT a.id,"
+
" CONCAT(
a.create_by,'-考核评价审批') as title
"
+
" CONCAT(
d.depart_name, '-', a.assessment_date, '-考核评价审批' ) AS title
"
+
"FROM "
+
" data_assessment_socre_master a "
+
" LEFT JOIN sys_depart d ON a.assessment_depart = d.id "
+
" LEFT JOIN sys_user u ON a.create_by = u.username "
+
"WHERE "
+
" a.id in ("
+
inSqlPart
+
")"
;
List
<
Map
<
String
,
Object
>>
dataList
=
masterDB
.
queryForList
(
sql
);
...
...
sk-module-biz/src/main/java/com/skua/modules/safe/service/impl/EnvironmentTargetServiceImpl.java
查看文件 @
20a50c6
...
...
@@ -66,7 +66,7 @@ public class EnvironmentTargetServiceImpl extends ServiceImpl<EnvironmentTargetM
environmentTarget
.
setSuddenlyNum
(
oldEnvironmentTarget
.
getSuddenlyNum
());
environmentTarget
.
setNewCaseNum
(
oldEnvironmentTarget
.
getNewCaseNum
());
environmentTarget
.
setExamScore
(
oldEnvironmentTarget
.
getExamScore
());
environmentTargetMapper
.
updateById
(
oldE
nvironmentTarget
);
environmentTargetMapper
.
updateById
(
e
nvironmentTarget
);
}
else
{
environmentTargetMapper
.
insert
(
environmentTarget
);
}
...
...
@@ -74,8 +74,27 @@ public class EnvironmentTargetServiceImpl extends ServiceImpl<EnvironmentTargetM
//计算评分等级
private
String
countLevel
(
String
leaderScore
)
{
String
level
=
"A"
;
return
level
;
String
level
=
"A"
;
boolean
isNumeric
=
false
;
try
{
Integer
.
parseInt
(
leaderScore
);
isNumeric
=
true
;
}
catch
(
NumberFormatException
e
)
{
isNumeric
=
false
;
}
if
(
isNumeric
)
{
int
number
=
Integer
.
parseInt
(
leaderScore
);
if
(
number
>
80
)
{
level
=
"A"
;
// 数字大于等于80,返回 A 级
}
else
if
(
number
>
60
)
{
level
=
"B"
;
// 数字大于等于60并小于80,返回 B 级
}
else
if
(
number
>
40
)
{
level
=
"C"
;
// 数字大于等于40并小于60,返回 C 级
}
else
{
level
=
"D"
;
// 数字小于40,返回 D 级
}
}
return
level
;
}
}
...
...
sk-module-biz/src/main/resources/application-prod.yml
查看文件 @
20a50c6
...
...
@@ -89,19 +89,19 @@ spring:
connectionProperties
:
druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource
:
master
:
url
:
jdbc:mysql://
113.249.91.27
:3306/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false
url
:
jdbc:mysql://
20.0.99.3
:3306/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false
username
:
root
password
:
jkauto@123
driver-class-name
:
com.mysql.jdbc.Driver
# 恩菲数据同步
nf-db
:
url
:
jdbc:mysql://
113.249.91.27
:3306/zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false
url
:
jdbc:mysql://
20.0.99.3
:3306/zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false
username
:
root
password
:
jkauto@123
driver-class-name
:
com.mysql.jdbc.Driver
# 多数据源配置
pg-db
:
url
:
jdbc:postgresql://
113.249.91.27
:10086/postgres?useUnicode=true&characterEncoding=UTF8
url
:
jdbc:postgresql://
20.0.99.4
:10086/postgres?useUnicode=true&characterEncoding=UTF8
username
:
postgres
password
:
jkauto@123
driver-class-name
:
org.postgresql.Driver
...
...
sk-module-system/src/main/java/com/skua/modules/system/controller/SysFactoryUserInfoController.java
查看文件 @
20a50c6
...
...
@@ -3,6 +3,7 @@ package com.skua.modules.system.controller;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
import
java.text.SimpleDateFormat
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -68,6 +69,8 @@ public class SysFactoryUserInfoController {
private
ISysUserService
sysUserService
;
@Autowired
private
ISequenceService
sequenceService
;
// 定义日期格式
private
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
/**
* 分页列表查询
* @param sysFactoryUserInfo
...
...
@@ -152,7 +155,13 @@ public class SysFactoryUserInfoController {
sysFactoryUserInfo
.
setUserName
(
user
.
getRealname
());
sysFactoryUserInfo
.
setEmail
(
user
.
getEmail
());
sysFactoryUserInfo
.
setTelephone
(
user
.
getPhone
());
sysFactoryUserInfo
.
setSex
(
user
.
getSalt
());
if
(
ConvertUtils
.
isNotEmpty
(
user
.
getSex
())){
sysFactoryUserInfo
.
setSex
(
user
.
getSex
().
toString
());
}
if
(
ConvertUtils
.
isNotEmpty
(
user
.
getBirthday
())){
String
birthday
=
sdf
.
format
(
user
.
getBirthday
());
sysFactoryUserInfo
.
setUserAge
(
birthday
);
}
}
}
sysFactoryUserInfo
.
setId
(
String
.
valueOf
(
sequenceService
.
nextId
()));
...
...
@@ -179,6 +188,21 @@ public class SysFactoryUserInfoController {
if
(
sysFactoryUserInfoEntity
==
null
)
{
result
.
error500
(
"未找到对应实体"
);
}
else
{
if
(
StringUtils
.
isNotEmpty
(
sysFactoryUserInfo
.
getUserId
())){
SysUser
user
=
sysUserService
.
getById
(
sysFactoryUserInfo
.
getUserId
());
if
(
ConvertUtils
.
isNotEmpty
(
user
)){
sysFactoryUserInfo
.
setUserName
(
user
.
getRealname
());
sysFactoryUserInfo
.
setEmail
(
user
.
getEmail
());
sysFactoryUserInfo
.
setTelephone
(
user
.
getPhone
());
if
(
ConvertUtils
.
isNotEmpty
(
user
.
getSex
())){
sysFactoryUserInfo
.
setSex
(
user
.
getSex
().
toString
());
}
if
(
ConvertUtils
.
isNotEmpty
(
user
.
getBirthday
())){
String
birthday
=
sdf
.
format
(
user
.
getBirthday
());
sysFactoryUserInfo
.
setUserAge
(
birthday
);
}
}
}
boolean
ok
=
sysFactoryUserInfoService
.
updateById
(
sysFactoryUserInfo
);
if
(
ok
)
{
result
.
success
(
"修改成功!"
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论