Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
48e35ba5
提交
48e35ba5
authored
5月 20, 2022
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(自查模块): 修复了数据存储的bug,以及生成二维码的bug
修复了数据存储的bug,以及生成二维码的bug
上级
b40df250
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
32 行增加
和
20 行删除
+32
-20
QrCodeBillUtil.java
...rc/main/java/com/tykj/dev/misc/qrcode/QrCodeBillUtil.java
+4
-1
SelfCheckController.java
.../dev/device/selfcheck/controller/SelfCheckController.java
+14
-11
SelfCheckBillServiceImpl.java
...vice/selfcheck/service/impl/SelfCheckBillServiceImpl.java
+10
-3
SelfCheckUnitBillServiceImpl.java
.../selfcheck/service/impl/SelfCheckUnitBillServiceImpl.java
+0
-1
SelfCheckBill.java
...ykj/dev/device/selfcheck/subject/domin/SelfCheckBill.java
+1
-1
SelfCheckUnitBill.java
...dev/device/selfcheck/subject/domin/SelfCheckUnitBill.java
+1
-1
SelfCheckSaveVo.java
...tykj/dev/device/selfcheck/subject/vo/SelfCheckSaveVo.java
+2
-2
没有找到文件。
dev-misc/src/main/java/com/tykj/dev/misc/qrcode/QrCodeBillUtil.java
浏览文件 @
48e35ba5
...
...
@@ -34,6 +34,7 @@ public class QrCodeBillUtil {
public
List
<
String
>
createCode
(
TaskData
taskData
){
String
join
=
JacksonUtil
.
toJSon
(
taskData
);
List
<
String
>
code
=
getCodeNum
(
join
);
log
.
info
(
"code:{}"
,
code
);
List
<
String
>
preview
=
new
ArrayList
<>();
//总页数
if
(
code
.
size
()
>
0
)
{
...
...
@@ -47,10 +48,11 @@ public class QrCodeBillUtil {
String
codePath
=
QRCodeUtil
.
encode
(
data
,
null
,
qrCodePath
,
false
);
codePath
=
qrCodePreviewPath
+
codePath
;
preview
.
add
(
codePath
);
return
preview
;
}
catch
(
Exception
e
)
{
}
}
return
preview
;
}
return
new
ArrayList
<>();
}
...
...
@@ -85,6 +87,7 @@ public class QrCodeBillUtil {
public
List
<
String
>
getCodeNum
(
String
data
)
{
//先压缩和加密
String
s
=
GZIPUtils
.
compress
(
data
);
log
.
info
(
"压缩和加密之后的长度:{}"
,
s
.
length
());
//然后截取
return
QrStringSplitUtil
.
stringToList2
(
s
,
900
);
}
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/controller/SelfCheckController.java
浏览文件 @
48e35ba5
...
...
@@ -1004,11 +1004,7 @@ public class SelfCheckController {
TaskDisposeUtil
.
isNotSubmit
(
taskBto
.
getBillStatus
(),
StatusEnum
.
WAIT_SELF_CHECK
);
selfExaminationBillEntity
=
selfExaminationBillService
.
getOne
(
taskBto
.
getBillId
());
selfExaminationBillEntity
.
setCheckTime
(
new
Date
());
//日常检查设备
List
<
DeviceLibrary
>
dayCheckList
=
selfCheckSaveVo
.
getDayCheckList
();
if
(
dayCheckList
!=
null
&&
dayCheckList
.
size
()>
0
){
selfExaminationBillEntity
.
setDayCheckList
(
JacksonUtil
.
toJSon
(
selfCheckSaveVo
.
getDayCheckList
()));
}
BeanUtils
.
copyProperties
(
selfCheckSaveVo
,
selfExaminationBillEntity
);
if
(
selfCheckSaveVo
.
getUnStockDevices
()!=
null
&&
selfCheckSaveVo
.
getUnStockDevices
().
size
()>
0
){
selfExaminationBillEntity
.
setUnStockDetail
(
JacksonUtil
.
toJSon
(
selfCheckSaveVo
.
getUnStockDevices
()));
...
...
@@ -1045,10 +1041,9 @@ public class SelfCheckController {
selfExaminationBillEntity
.
setTaskId
(
taskBto1
.
getId
());
}
}
List
<
DeviceLibrary
>
dayCheckList
=
selfCheckSaveVo
.
getDayCheckList
();
if
(
dayCheckList
!=
null
&&
dayCheckList
.
size
()
>
0
){
selfExaminationBillEntity
.
setDayCheckList
(
JacksonUtil
.
toJSon
(
dayCheckList
));
}
//日常检查设备
String
dayDeviceList
=
selfCheckSaveVo
.
getDayCheckList
();
selfExaminationBillEntity
.
setDayCheckList
(
dayDeviceList
);
selfExaminationBillEntity
.
setUseraId
(
currentUserId
);
selfExaminationBillEntity
.
setCreateUnitId
(
unitId
);
selfExaminationBillService
.
update
(
selfExaminationBillEntity
);
...
...
@@ -1071,8 +1066,16 @@ public class SelfCheckController {
Integer
unitId
=
userUtils
.
getCurrentUnitId
();
SelfCheckUnitBill
checkUnitBill
=
service
.
findByUnitId
(
unitId
);
if
(
checkUnitBill
!=
null
){
checkUnitBill
.
setDeviceLibraryList
(
JacksonUtil
.
readValue
(
checkUnitBill
.
getDayDeviceList
(),
new
TypeReference
<
List
<
DeviceLibrary
>>()
{
}));
//取出设备的id
String
dayDeviceList
=
checkUnitBill
.
getDayDeviceList
();
String
[]
ids
=
dayDeviceList
.
split
(
"x"
);
List
<
Integer
>
deviceIds
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
ids
.
length
;
i
++)
{
int
i1
=
Integer
.
parseInt
(
ids
[
i
]);
deviceIds
.
add
(
i1
);
}
List
<
DeviceLibrary
>
deviceLibraryList
=
deviceLibraryService
.
findAllByIds
(
deviceIds
);
checkUnitBill
.
setDeviceLibraryList
(
deviceLibraryList
);
}
return
ResultUtil
.
success
(
checkUnitBill
);
}
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/impl/SelfCheckBillServiceImpl.java
浏览文件 @
48e35ba5
...
...
@@ -271,9 +271,16 @@ public class SelfCheckBillServiceImpl implements SelfCheckBillService {
SelfCheckBill
checkBill
=
getOne
(
billId
);
//日常设备信息
if
(
checkBill
.
getDayCheckList
()
!=
null
)
{
checkBill
.
setDayDeviceLibraries
(
JacksonUtil
.
readValue
(
checkBill
.
getDayCheckList
(),
new
TypeReference
<
List
<
DeviceLibrary
>>()
{
}));
String
dayDeviceList
=
checkBill
.
getDayCheckList
();
String
[]
ids
=
dayDeviceList
.
split
(
"x"
);
List
<
Integer
>
deviceIds
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
ids
.
length
;
i
++)
{
int
i1
=
Integer
.
parseInt
(
ids
[
i
]);
deviceIds
.
add
(
i1
);
}
List
<
DeviceLibrary
>
deviceLibraryList
=
deviceLibraryService
.
findAllByIds
(
deviceIds
);
checkBill
.
setDayDeviceLibraries
(
deviceLibraryList
);
}
//设备信息
List
<
DeviceLibrary
>
deviceLibraries
=
new
ArrayList
<>();
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/service/impl/SelfCheckUnitBillServiceImpl.java
浏览文件 @
48e35ba5
...
...
@@ -20,7 +20,6 @@ public class SelfCheckUnitBillServiceImpl implements SelfCheckUnitBillService {
@Override
public
SelfCheckUnitBill
add
(
SelfCheckUnitBill
selfCheckUnitBill
)
{
selfCheckUnitBill
.
setDayDeviceList
(
JacksonUtil
.
toJSon
(
selfCheckUnitBill
.
getDeviceLibraryList
()));
return
selfCheckUnitBillDao
.
save
(
selfCheckUnitBill
);
}
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/domin/SelfCheckBill.java
浏览文件 @
48e35ba5
...
...
@@ -155,7 +155,7 @@ public class SelfCheckBill {
// @Column(name = "qr_code_path",columnDefinition = "TEXT")
// private String qrcodePath ;
@ApiModelProperty
(
value
=
"日常检查装备的集合"
)
@ApiModelProperty
(
value
=
"日常检查装备的集合"
,
example
=
"id 以x进行分割 id"
)
@Column
(
name
=
"day_check_list"
,
columnDefinition
=
"TEXT"
)
private
String
dayCheckList
;
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/domin/SelfCheckUnitBill.java
浏览文件 @
48e35ba5
...
...
@@ -47,7 +47,7 @@ public class SelfCheckUnitBill {
/**
* 自查标题
*/
@ApiModelProperty
(
value
=
"装备记录详情"
)
@ApiModelProperty
(
value
=
"装备记录详情"
,
example
=
"id 以x分割"
)
@Column
(
name
=
"day_device_list"
,
columnDefinition
=
"TEXT"
)
private
String
dayDeviceList
;
...
...
dev-selfcheck/src/main/java/com/tykj/dev/device/selfcheck/subject/vo/SelfCheckSaveVo.java
浏览文件 @
48e35ba5
...
...
@@ -70,8 +70,8 @@ public class SelfCheckSaveVo {
@ApiModelProperty
(
value
=
"是否是日常检查"
,
notes
=
"0代表 常规检查, 1代表 日常检查"
)
private
Integer
isDayCheck
=
0
;
@ApiModelProperty
(
value
=
"日常检查装备
的集合
"
)
private
List
<
DeviceLibrary
>
dayCheckList
;
@ApiModelProperty
(
value
=
"日常检查装备"
)
private
String
dayCheckList
;
public
SelfCheckBill
toDo
()
{
SelfCheckBill
selfExaminationBillEntity
=
new
SelfCheckBill
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论