Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
18c4d60d
提交
18c4d60d
authored
12月 03, 2020
作者:
133
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[用户] [清退] [专管员统计] 代码提交
上级
690435a5
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
59 行增加
和
22 行删除
+59
-22
BlockchaController.java
.../com/tykj/dev/blockcha/controller/BlockchaController.java
+23
-0
ApiSignatureUtil.java
...j/dev/blockcha/subject/service/impl/ApiSignatureUtil.java
+0
-1
BlockChainUtilImpl.java
...dev/blockcha/subject/service/impl/BlockChainUtilImpl.java
+4
-3
LogType.java
dev-config/src/main/java/com/tykj/dev/config/LogType.java
+3
-5
Param.java
dev-config/src/main/java/com/tykj/dev/config/Param.java
+3
-0
TrainThemeServiceImpl.java
.../dev/device/train/service/impl/TrainThemeServiceImpl.java
+11
-7
pom.xml
dev-union/pom.xml
+1
-1
LogAspect.java
dev-union/src/main/java/com/tykj/dev/union/LogAspect.java
+3
-3
UserServiceImpl.java
...dev/device/user/subject/service/impl/UserServiceImpl.java
+10
-0
VenitalisServiceImpl.java
...evice/user/subject/service/impl/VenitalisServiceImpl.java
+1
-1
pom.xml
pom.xml
+0
-1
没有找到文件。
dev-blockcha/src/main/java/com/tykj/dev/blockcha/controller/BlockchaController.java
浏览文件 @
18c4d60d
...
...
@@ -63,6 +63,29 @@ public class BlockchaController {
return
ResponseEntity
.
ok
(
blockChainUtil
.
sendHash
(
code
,
"8a4df5a249be4b3890eeea22bd238feb"
));
}
@ApiOperation
(
value
=
"文本添加"
)
@GetMapping
(
value
=
"/sendHash1/{code}/{content}"
)
public
ResponseEntity
sendHash1
(
@PathVariable
Integer
code
,
@PathVariable
String
content
){
// content= HexUtil.string2HexUTF8(content);
return
ResponseEntity
.
ok
(
blockChainUtil
.
sendText
(
code
,
content
));
}
@ApiOperation
(
value
=
"文本最佳添加"
)
@GetMapping
(
value
=
"/sendHash2/{id}/{content}"
)
public
ResponseEntity
sendHash2
(
@PathVariable
String
id
,
@PathVariable
String
content
){
// content= HexUtil.string2HexUTF8(content);
return
ResponseEntity
.
ok
(
blockChainUtil
.
appendText
(
content
,
id
));
}
@ApiOperation
(
value
=
"文本篡改验证"
)
@GetMapping
(
value
=
"/sendHash3/{id}/{content}"
)
public
ResponseEntity
sendHash3
(
@PathVariable
String
id
,
@PathVariable
String
content
){
// content= HexUtil.string2HexUTF8(content);
return
ResponseEntity
.
ok
(
blockChainUtil
.
verifyText
(
content
,
id
));
}
@GetMapping
(
value
=
"/fetchRecord/{id}"
)
@ApiOperation
(
value
=
"查询接口"
)
public
ResponseEntity
fetchRecord
(
@PathVariable
String
id
){
...
...
dev-blockcha/src/main/java/com/tykj/dev/blockcha/subject/service/impl/ApiSignatureUtil.java
浏览文件 @
18c4d60d
...
...
@@ -19,7 +19,6 @@ class ApiSignatureUtil {
* @param key SECRET_KEY
*/
static
String
getApiSignature
(
SortedMap
<
Object
,
Object
>
map
,
String
key
)
{
StringBuilder
sb
=
new
StringBuilder
();
map
.
forEach
((
k
,
v
)
->
sb
.
append
(
k
).
append
(
"="
).
append
(
v
).
append
(
"&"
));
String
str
=
sb
.
toString
();
...
...
dev-blockcha/src/main/java/com/tykj/dev/blockcha/subject/service/impl/BlockChainUtilImpl.java
浏览文件 @
18c4d60d
...
...
@@ -27,9 +27,9 @@ import java.util.UUID;
@Component
public
class
BlockChainUtilImpl
implements
BlockChainUtil
{
private
final
static
String
SECRET_KEY
=
"
aLTEmMyIfAWzVCIy8EKI0uGFThrR20dR12C62ENZ16RAX5TNTLUC4CCP
"
;
private
final
static
String
SECRET_ID
=
"
tLNj025SOWTWv56ORlRdGA
"
;
private
final
static
String
BLOCK_CHAIN_URL
=
"http://192.168.
3.2
"
;
private
final
static
String
SECRET_KEY
=
"
3RJWStDCXN7mqJyZAB8rF59f87arGShdk9aKyDN3wKbzq9JnaXom1Hpe6mHT1k2yx9zfE7VFWidqwuxyT7DtPjCs
"
;
private
final
static
String
SECRET_ID
=
"
JAjQyTZdR8bmbHaU6iiFGvrCuUik4cG4U4ostk8KKrbS
"
;
private
final
static
String
BLOCK_CHAIN_URL
=
"http://192.168.
0.80:8076
"
;
@Override
...
...
@@ -84,6 +84,7 @@ public class BlockChainUtilImpl implements BlockChainUtil {
request
.
put
(
"content"
,
HexUtil
.
hex64
(
content
));
request
.
put
(
"subCode"
,
subCode
);
String
s
=
ApiSignatureUtil
.
getApiSignature
(
request
,
SECRET_KEY
);
log
.
info
(
"apiSignature:{}"
,
s
);
request
.
put
(
"apiSignature"
,
s
);
return
new
RestTemplate
().
postForObject
(
BLOCK_CHAIN_URL
+
BcUrl
.
SEND_HASH
,
...
...
dev-config/src/main/java/com/tykj/dev/config/LogType.java
浏览文件 @
18c4d60d
...
...
@@ -153,11 +153,9 @@ public enum LogType {
TRAIN8
(
68
,
TRAIN1007
.
id
,
END
.
id
,
"省培训完成"
),
SEND_BACK_1
(
69
,
ORIGIN_STATUS
.
id
,
SEND_BACK_1200
.
id
,
"清退任务创建完成,等待下属单位把装备退回"
),
SEND_BACK_2
(
70
,
ORIGIN_STATUS
.
id
,
SEND_BACK_1203
.
id
,
"装备出库校验完成,等待出库"
),
SEND_BACK_3
(
71
,
SEND_BACK_1203
.
id
,
SEND_BACK_1202
.
id
,
"装备出库完成,等待审核"
),
SEND_BACK_4
(
72
,
SEND_BACK_1202
.
id
,
SEND_BACK_1206
.
id
,
"清退装备出库审核通过,等待签收"
),
SEND_BACK_5
(
73
,
SEND_BACK_1206
.
id
,
SEND_BACK_1204
.
id
,
"签收成功等待入库审核"
),
SEND_BACK_6
(
74
,
SEND_BACK_1204
.
id
,
END
.
id
,
"入库审核通过"
),
SEND_BACK_2
(
70
,
ORIGIN_STATUS
.
id
,
SEND_BACK_1203
.
id
,
"等待装备清退出库"
),
SEND_BACK_3
(
71
,
SEND_BACK_1203
.
id
,
SEND_BACK_1206
.
id
,
"(%sendUnit)装备清退出库完成,向(%receiveUnit)发起清退装备,等待签收"
),
SEND_BACK_4
(
72
,
SEND_BACK_1206
.
id
,
END
.
id
,
"(%receiveUnit)签收(%sendUnit)单位清退的装备,装备入库成功"
),
SEND_BACK_7
(
75
,
ORIGIN_STATUS
.
id
,
SEND_BACK_1205
.
id
,
"异常装备任务生成,等待填写装备异常信息"
),
SEND_BACK_8
(
76
,
SEND_BACK_1205
.
id
,
END
.
id
,
"异常装备处理完成"
),
SEND_BACK_9
(
77
,
ORIGIN_STATUS
.
id
,
SEND_BACK_1207
.
id
,
"异常装备的确认任务"
),
...
...
dev-config/src/main/java/com/tykj/dev/config/Param.java
浏览文件 @
18c4d60d
...
...
@@ -13,4 +13,7 @@ public class Param {
*/
private
String
receiveUnit
;
private
String
sendUnit
;
}
dev-train/src/main/java/com/tykj/dev/device/train/service/impl/TrainThemeServiceImpl.java
浏览文件 @
18c4d60d
...
...
@@ -17,6 +17,7 @@ import com.tykj.dev.misc.base.BusinessEnum;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
com.tykj.dev.misc.utils.StringSplitUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
...
...
@@ -40,6 +41,7 @@ import java.util.Optional;
* @createTime 2020年08月13日 15:25:00
*/
@Service
@Slf4j
public
class
TrainThemeServiceImpl
implements
TrainThemeService
{
@Autowired
...
...
@@ -152,16 +154,18 @@ public class TrainThemeServiceImpl implements TrainThemeService {
@Override
public
TrainThemePage
findTrainPageVo
(
ConditionsTrainVo
conditionsTrainVo
)
{
Pageable
pageable
=
PageRequest
.
of
(
conditionsTrainVo
.
getPage
(),
conditionsTrainVo
.
getSize
(),
Sort
.
Direction
.
ASC
,
"trainTime"
);
Page
<
TrainTheme
>
all
=
getContacts
(
conditionsTrainVo
,
pageable
);
Page
<
TrainTheme
>
all
=
getContacts
(
conditionsTrainVo
,
pageable
);
List
<
TrainThemeVo
>
list
=
new
ArrayList
<>();
all
.
get
().
forEach
(
all
.
get
Content
().
forEach
(
trainTheme
->
{
TaskBto
taskBto
=
trainTaskService
.
selectFatherIsNullAndBillidAndBillType
(
trainTheme
.
getTrainId
(),
BusinessEnum
.
TRAIN
.
id
);
TrainThemeVo
trainThemeVo
=
trainTheme
.
toTrainThemeVo
();
trainThemeVo
.
setTaskId
(
taskBto
.
getId
());
list
.
add
(
trainThemeVo
);
if
(
trainTheme
!=
null
)
{
log
.
info
(
"train id{}"
,
trainTheme
.
getTrainId
());
TaskBto
taskBto
=
trainTaskService
.
selectFatherIsNullAndBillidAndBillType
(
trainTheme
.
getTrainId
(),
BusinessEnum
.
TRAIN
.
id
);
TrainThemeVo
trainThemeVo
=
trainTheme
.
toTrainThemeVo
();
trainThemeVo
.
setTaskId
(
taskBto
.
getId
());
list
.
add
(
trainThemeVo
);
}
}
);
...
...
dev-union/pom.xml
浏览文件 @
18c4d60d
...
...
@@ -32,7 +32,7 @@
<profile>
<id>
local
</id>
<properties>
<pom.package>
j
ar
</pom.package>
<pom.package>
w
ar
</pom.package>
<activatedProperties>
local
</activatedProperties>
</properties>
</profile>
...
...
dev-union/src/main/java/com/tykj/dev/union/LogAspect.java
浏览文件 @
18c4d60d
...
...
@@ -392,11 +392,11 @@ public class LogAspect {
if
(
sendBackBillDao
!=
null
&&
sendBackBillDetailDao
!=
null
)
{
SendBackBill
sendBackBill
=
sendBackBillDao
.
getOne
(
outPutTask
.
getBillId
());
SendBackBillDetail
sendBackBillDetail
=
sendBackBillDetailDao
.
findSendBackBillDetailById
(
sendBackBill
.
getFormId
());
getFieldsParam
(
sendBackBill
);
if
((
this
.
oldStatus
.
equals
(
StatusEnum
.
SEND_BACK_1203
.
id
)
&&
this
.
newStatus
.
equals
(
StatusEnum
.
SEND_BACK_120
2
.
id
)))
{
getFieldsParam
(
sendBackBill
Detail
);
if
((
this
.
oldStatus
.
equals
(
StatusEnum
.
SEND_BACK_1203
.
id
)
&&
this
.
newStatus
.
equals
(
StatusEnum
.
SEND_BACK_120
6
.
id
)))
{
this
.
fileVos
.
add
(
new
FileVo
(
"出库确认单"
,
sendBackBillDetail
.
getFileName
(),
sendBackBillDetail
.
getFileUrl
()));
}
if
((
this
.
oldStatus
.
equals
(
StatusEnum
.
SEND_BACK_1206
.
id
)
&&
this
.
newStatus
.
equals
(
StatusEnum
.
SEND_BACK_1204
.
id
)))
{
if
((
this
.
oldStatus
.
equals
(
StatusEnum
.
SEND_BACK_1206
.
id
)
&&
this
.
newStatus
.
equals
(
StatusEnum
.
END
.
id
)))
{
this
.
fileVos
.
add
(
new
FileVo
(
"清退单"
,
sendBackBillDetail
.
getBillFileName
(),
sendBackBillDetail
.
getBillFileUrl
()));
}
}
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/UserServiceImpl.java
浏览文件 @
18c4d60d
...
...
@@ -9,9 +9,11 @@ import com.tykj.dev.device.user.subject.service.AreaService;
import
com.tykj.dev.device.user.subject.service.UnitsService
;
import
com.tykj.dev.device.user.subject.service.UserLogService
;
import
com.tykj.dev.device.user.subject.service.UserService
;
import
com.tykj.dev.misc.exception.ApiException
;
import
com.tykj.dev.misc.utils.JacksonUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.stereotype.Service
;
...
...
@@ -53,6 +55,7 @@ public class UserServiceImpl implements UserService {
public
User
save
(
User
user
,
SecurityUser
securityUser
)
{
String
encode
=
bCryptPasswordEncoder
.
encode
(
"qwer1234"
);
user
.
setPassword
(
encode
);
user
.
setNoPassword
(
"qwer1234"
);
Units
units
=
unitsService
.
findById
(
user
.
getUnitsId
());
User
user1
=
userDao
.
save
(
user
);
switch
(
units
.
getLevel
()){
...
...
@@ -118,6 +121,13 @@ public class UserServiceImpl implements UserService {
@Override
public
User
update
(
User
user
)
{
Optional
<
User
>
userOptional
=
userDao
.
findById
(
user
.
getUserId
());
if
(
userOptional
.
isPresent
()){
User
user1
=
userOptional
.
get
();
user
.
setNoPassword
(
user1
.
getNoPassword
());
}
else
{
throw
new
ApiException
(
ResponseEntity
.
status
(
500
).
body
(
"没找到对应的用户id"
));
}
return
userDao
.
save
(
user
);
}
...
...
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/VenitalisServiceImpl.java
浏览文件 @
18c4d60d
...
...
@@ -39,7 +39,7 @@ public class VenitalisServiceImpl implements VenitalisService {
private
UserLogDao
userLogDao
;
private
final
static
String
http
=
"http://1
92.168.0.80
:8081"
;
private
final
static
String
http
=
"http://1
0.153.4.11
:8081"
;
private
final
static
String
REGISTERE
=
"/api/v2/auth/register"
;
private
final
static
String
CONTRAST
=
"/api/v2/auth/identify"
;
@Override
...
...
pom.xml
浏览文件 @
18c4d60d
...
...
@@ -43,7 +43,6 @@
<module>
dev-user
</module>
<module>
dev-usereport
</module>
<module>
dev-statistical
</module>
<module>
dev-read
</module>
</modules>
<properties>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论