Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
e7954a0b
提交
e7954a0b
authored
5月 26, 2023
作者:
zjm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
指静脉ip修改
上级
888dcaa0
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
79 行增加
和
23 行删除
+79
-23
FileController.java
...a/com/tykj/dev/device/file/Controller/FileController.java
+4
-5
DocumentDevice.java
.../java/com/tykj/dev/device/file/entity/DocumentDevice.java
+4
-6
JavaToPdfHtmlFreeMarker.java
...om/tykj/dev/device/file/util/JavaToPdfHtmlFreeMarker.java
+3
-2
application-dev.properties
dev-union/src/main/resources/application-dev.properties
+3
-1
application-prodM.properties
dev-union/src/main/resources/application-prodM.properties
+3
-2
application-prodT.properties
dev-union/src/main/resources/application-prodT.properties
+3
-2
application-test.properties
dev-union/src/main/resources/application-test.properties
+3
-2
VenitalisService.java
...ykj/dev/device/user/subject/service/VenitalisService.java
+11
-0
VenitalisServiceImpl.java
...evice/user/subject/service/impl/VenitalisServiceImpl.java
+45
-3
没有找到文件。
dev-file/src/main/java/com/tykj/dev/device/file/Controller/FileController.java
浏览文件 @
e7954a0b
...
@@ -224,11 +224,11 @@ public class FileController {
...
@@ -224,11 +224,11 @@ public class FileController {
documents
.
setTitle
(
"密码装备清退单"
);
documents
.
setTitle
(
"密码装备清退单"
);
documents
.
setId
(
null
);
documents
.
setId
(
null
);
List
<
DocumentDevice
>
documentDevices
=
new
ArrayList
<>();
List
<
DocumentDevice
>
documentDevices
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
20
;
i
++){
for
(
int
i
=
0
;
i
<
1
;
i
++){
DocumentDevice
documentDevice
=
new
DocumentDevice
();
DocumentDevice
documentDevice
=
new
DocumentDevice
();
documentDevice
.
setCount
(
i
);
documentDevice
.
setCount
(
i
);
documentDevice
.
setModel
(
"
MM001
"
);
documentDevice
.
setModel
(
"
ZJM-123123
"
);
documentDevice
.
setRemark
(
"
备注
"
);
documentDevice
.
setRemark
(
"
<1231231231>312312312321312
"
);
documentDevice
.
setApplicationField
(
"省一级"
);
documentDevice
.
setApplicationField
(
"省一级"
);
documentDevice
.
setDeviceSerialNumber
(
"asdq1231232"
);
documentDevice
.
setDeviceSerialNumber
(
"asdq1231232"
);
// documentDevice.setProductionSerialNumber("12312312312");
// documentDevice.setProductionSerialNumber("12312312312");
...
@@ -240,8 +240,7 @@ public class FileController {
...
@@ -240,8 +240,7 @@ public class FileController {
documents
.
setDocumentDevices
(
documentDevices
);
documents
.
setDocumentDevices
(
documentDevices
);
// String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRender(documents,url+"htmlModel/");
// String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRender(documents,url+"htmlModel/");
String
[]
content
=
JavaToPdfHtmlFreeMarker
.
freeMarkerRenderRepair
(
documents
,
url
+
"htmlModel/"
);
String
[]
content
=
JavaToPdfHtmlFreeMarker
.
freeMarkerRenderRepair
(
documents
,
url
+
"htmlModel/"
);
log
.
info
(
"[file] 调用了生成出入单据对接口 出入库单据"
);
log
.
info
(
"[file] 调用了生成出入单据对接口 documents"
);
return
ResponseEntity
.
ok
(
JavaToPdfHtmlFreeMarker
.
createPdf
(
content
,
url
,
preview
,
"documents/"
));
return
ResponseEntity
.
ok
(
JavaToPdfHtmlFreeMarker
.
createPdf
(
content
,
url
,
preview
,
"documents/"
));
}
}
...
...
dev-file/src/main/java/com/tykj/dev/device/file/entity/DocumentDevice.java
浏览文件 @
e7954a0b
...
@@ -92,14 +92,12 @@ public class DocumentDevice {
...
@@ -92,14 +92,12 @@ public class DocumentDevice {
}
}
public
String
changeWord
(
String
keyword
)
{
public
String
changeWord
(
String
keyword
)
{
System
.
out
.
println
(
keyword
);
if
(
StringUtils
.
isNotBlank
(
keyword
))
{
if
(
StringUtils
.
isNotBlank
(
keyword
))
{
if
(
keyword
.
contains
(
"<br
/>"
)){
if
(
keyword
.
contains
(
"<br/>"
)){
keyword
=
keyword
.
replace
(
"<br
/>"
,
"Ǵ"
);
keyword
=
keyword
.
replace
(
"<br/>"
,
"Ǵ"
);
}
}
if
(
keyword
.
contains
(
"&"
))
{
keyword
=
keyword
.
replace
(
"&"
,
"&"
);
}
if
(
keyword
.
contains
(
"<"
))
{
if
(
keyword
.
contains
(
"<"
))
{
keyword
=
keyword
.
replace
(
"<"
,
"<"
);
keyword
=
keyword
.
replace
(
"<"
,
"<"
);
...
@@ -108,7 +106,7 @@ public class DocumentDevice {
...
@@ -108,7 +106,7 @@ public class DocumentDevice {
keyword
=
keyword
.
replace
(
">"
,
">"
);
keyword
=
keyword
.
replace
(
">"
,
">"
);
}
}
}
}
keyword
=
keyword
.
replace
(
"Ǵ"
,
"<br
/>"
);
keyword
=
keyword
.
replace
(
"Ǵ"
,
"<br/>"
);
return
keyword
;
return
keyword
;
}
}
...
...
dev-file/src/main/java/com/tykj/dev/device/file/util/JavaToPdfHtmlFreeMarker.java
浏览文件 @
e7954a0b
...
@@ -253,6 +253,7 @@ public class JavaToPdfHtmlFreeMarker {
...
@@ -253,6 +253,7 @@ public class JavaToPdfHtmlFreeMarker {
for
(
int
i
=
1
;
i
<=
3
;
i
++){
for
(
int
i
=
1
;
i
<=
3
;
i
++){
Integer
page
=
1
;
Integer
page
=
1
;
for
(
List
<
DocumentDevice
>
list1:
listList
)
{
for
(
List
<
DocumentDevice
>
list1:
listList
)
{
String
htmlname
=
htmlPath
+
UUID
.
randomUUID
().
toString
()+
".html"
;
String
htmlname
=
htmlPath
+
UUID
.
randomUUID
().
toString
()+
".html"
;
// 合并数据模型与模板
// 合并数据模型与模板
FileWriter
fileWriter
=
new
FileWriter
(
new
File
(
htmlname
));
FileWriter
fileWriter
=
new
FileWriter
(
new
File
(
htmlname
));
...
@@ -266,7 +267,7 @@ public class JavaToPdfHtmlFreeMarker {
...
@@ -266,7 +267,7 @@ public class JavaToPdfHtmlFreeMarker {
return
strings
;
return
strings
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"[freeMarkerRender] 方法找不到地址:{}"
,
htmlPath
);
log
.
error
(
"[freeMarkerRender] 方法找不到地址:{}"
,
htmlPath
);
log
.
error
(
"{}"
,
e
);
}
finally
{
}
finally
{
try
{
try
{
out
.
close
();
out
.
close
();
...
@@ -348,7 +349,7 @@ public class JavaToPdfHtmlFreeMarker {
...
@@ -348,7 +349,7 @@ public class JavaToPdfHtmlFreeMarker {
documentDevice
.
setModel
(
String
.
join
(
""
,
modelList
.
subList
(
0
,
differ
)));
documentDevice
.
setModel
(
String
.
join
(
""
,
modelList
.
subList
(
0
,
differ
)));
documentDevice1
.
setModel
(
String
.
join
(
""
,
modelList
.
subList
(
differ
,
modelList
.
size
())));
documentDevice1
.
setModel
(
String
.
join
(
""
,
modelList
.
subList
(
differ
,
modelList
.
size
())));
}
else
{
}
else
{
documentDevice
.
setModel
(
String
.
join
(
""
,
modelList
.
subList
(
0
,
differ
)));
documentDevice
.
setModel
(
String
.
join
(
""
,
modelList
.
subList
(
0
,
modelList
.
size
()
)));
}
}
if
(
seqList
.
size
()>
differ
){
if
(
seqList
.
size
()>
differ
){
...
...
dev-union/src/main/resources/application-dev.properties
浏览文件 @
e7954a0b
...
@@ -14,7 +14,7 @@ spring.jpa.hibernate.ddl-auto=update
...
@@ -14,7 +14,7 @@ spring.jpa.hibernate.ddl-auto=update
#file.path=C:/Users/dengdiyi/Documents/file/
#file.path=C:/Users/dengdiyi/Documents/file/
# spring boot admin
# spring boot admin
#file.path=/Users/ozoz/data/
#file.path=/Users/ozoz/data/
file.path
=
/Users/zhoushaopan/Desktop/data
/
file.path
=
C:/ZB
/
preview.path
=
http://192.168.102.169:8087/file/
preview.path
=
http://192.168.102.169:8087/file/
spring.boot.admin.client.url
=
http://localhost:8769
spring.boot.admin.client.url
=
http://localhost:8769
spring.boot.admin.client.instance.serviceBaseUrl
=
http://localhost:8087
spring.boot.admin.client.instance.serviceBaseUrl
=
http://localhost:8087
...
@@ -26,3 +26,5 @@ qrcode.preview.path=http://192.168.101.133:8087/code/
...
@@ -26,3 +26,5 @@ qrcode.preview.path=http://192.168.101.133:8087/code/
carrier.url
=
http://192.168.0.30:8087/configuration/saveConfiguration
carrier.url
=
http://192.168.0.30:8087/configuration/saveConfiguration
file.matching.excel
=
/Users/zhoushaopan/excel/
file.matching.excel
=
/Users/zhoushaopan/excel/
ven.http
=
dev-union/src/main/resources/application-prodM.properties
浏览文件 @
e7954a0b
...
@@ -10,4 +10,5 @@ preview.path=http://10.153.4.11:8088/equip/file/
...
@@ -10,4 +10,5 @@ preview.path=http://10.153.4.11:8088/equip/file/
block.flag
=
true
block.flag
=
true
carrier.url
=
http://10.153.4.11:8088/carrier/configuration/saveConfiguration
carrier.url
=
http://10.153.4.11:8088/carrier/configuration/saveConfiguration
file.matching.excel
=
/data/equip/matching/excel/
file.matching.excel
=
/data/equip/matching/excel/
\ No newline at end of file
ven.http
=
http://10.153.4.10:8081
\ No newline at end of file
dev-union/src/main/resources/application-prodT.properties
浏览文件 @
e7954a0b
...
@@ -11,4 +11,5 @@ block.flag=false
...
@@ -11,4 +11,5 @@ block.flag=false
qrcode.path
=
/opt/qrcode/
qrcode.path
=
/opt/qrcode/
qrcode.preview.path
=
http://10.153.4.11:8088/equipTest/code/
qrcode.preview.path
=
http://10.153.4.11:8088/equipTest/code/
carrier.url
=
http://10.153.4.11:8088/carrierTest/configuration/saveConfiguration
carrier.url
=
http://10.153.4.11:8088/carrierTest/configuration/saveConfiguration
file.matching.excel
=
/data/equipTest/matching/excel/
file.matching.excel
=
/data/equipTest/matching/excel/
\ No newline at end of file
ven.http
=
http://10.153.4.10:8081
\ No newline at end of file
dev-union/src/main/resources/application-test.properties
浏览文件 @
e7954a0b
...
@@ -18,4 +18,5 @@ qrcode.preview.path=http://10.153.4.80/equip/code/
...
@@ -18,4 +18,5 @@ qrcode.preview.path=http://10.153.4.80/equip/code/
carrier.url
=
http://10.153.4.80:8088/carrier/configuration/saveConfiguration
carrier.url
=
http://10.153.4.80:8088/carrier/configuration/saveConfiguration
file.matching.excel
=
/data/equip/excel/
file.matching.excel
=
/data/equip/excel/
\ No newline at end of file
ven.http
=
http://10.153.4.80:8081
\ No newline at end of file
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/VenitalisService.java
浏览文件 @
e7954a0b
...
@@ -22,4 +22,15 @@ public interface VenitalisService {
...
@@ -22,4 +22,15 @@ public interface VenitalisService {
* 特征对比
* 特征对比
*/
*/
Integer
contrastRet
(
String
deviceType
,
String
value
);
Integer
contrastRet
(
String
deviceType
,
String
value
);
/**
* 删除特征
*/
RegistereRetVo
delFeature
(
Integer
userId
,
String
featureItem
);
/**
* 查询特征
*/
String
featureQuery
(
Integer
userId
);
}
}
dev-user/src/main/java/com/tykj/dev/device/user/subject/service/impl/VenitalisServiceImpl.java
浏览文件 @
e7954a0b
...
@@ -14,12 +14,14 @@ import com.tykj.dev.misc.utils.JacksonUtil;
...
@@ -14,12 +14,14 @@ import com.tykj.dev.misc.utils.JacksonUtil;
import
com.tykj.dev.misc.utils.httpclientutil.HttpClientUtil
;
import
com.tykj.dev.misc.utils.httpclientutil.HttpClientUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
/**
/**
* @author zjm
* @author zjm
...
@@ -36,10 +38,16 @@ public class VenitalisServiceImpl implements VenitalisService {
...
@@ -36,10 +38,16 @@ public class VenitalisServiceImpl implements VenitalisService {
@Autowired
@Autowired
private
UserLogDao
userLogDao
;
private
UserLogDao
userLogDao
;
private
final
static
String
http
=
"http://10.153.6.10:8081"
;
@Value
(
"${ven.http}"
)
// private final static String http="http://192.168.0.80:8081";
private
String
http
;
// private final static String http="http://10.153.4.80:8081";
private
final
static
String
REGISTERE
=
"/api/v2/auth/register"
;
private
final
static
String
REGISTERE
=
"/api/v2/auth/register"
;
private
final
static
String
CONTRAST
=
"/api/v2/auth/identify"
;
private
final
static
String
CONTRAST
=
"/api/v2/auth/identify"
;
private
final
static
String
Feature
=
"/api/v2/auth/delFeature"
;
private
final
static
String
FEATUREQUERY
=
"/api/v2/auth/featureQuery"
;
@Override
@Override
public
RegistereRetVo
registeredRet
(
VenitalisVo
venitalisVo
)
{
public
RegistereRetVo
registeredRet
(
VenitalisVo
venitalisVo
)
{
User
user
=
userDao
.
findById
(
venitalisVo
.
getUserId
()).
get
();
User
user
=
userDao
.
findById
(
venitalisVo
.
getUserId
()).
get
();
...
@@ -65,7 +73,7 @@ public class VenitalisServiceImpl implements VenitalisService {
...
@@ -65,7 +73,7 @@ public class VenitalisServiceImpl implements VenitalisService {
registereRetVo
.
setRet
(
true
);
registereRetVo
.
setRet
(
true
);
userLogDao
.
save
(
new
UserLog
(
venitalisVo
.
getUserId
(),
new
Date
(),
user
.
getName
()+
"注册了指静脉"
));
userLogDao
.
save
(
new
UserLog
(
venitalisVo
.
getUserId
(),
new
Date
(),
user
.
getName
()+
"注册了指静脉"
));
return
registereRetVo
;
return
registereRetVo
;
}
else
{
}
else
{
registereRetVo
.
setRet
(
false
);
registereRetVo
.
setRet
(
false
);
return
registereRetVo
;
return
registereRetVo
;
}
}
...
@@ -89,4 +97,38 @@ public class VenitalisServiceImpl implements VenitalisService {
...
@@ -89,4 +97,38 @@ public class VenitalisServiceImpl implements VenitalisService {
}
}
}
}
@Override
public
RegistereRetVo
delFeature
(
Integer
userId
,
String
featureItem
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"username"
,
"lingo"
);
params
.
put
(
"password"
,
"511B0D5F341BDDBD9A5348923B48D14C"
);
params
.
put
(
"id_type"
,
"06"
);
params
.
put
(
"device_type"
,
"tg.VM661J.img"
);
params
.
put
(
"uid"
,
userId
);
params
.
put
(
"feature_item"
,
featureItem
);
String
ret
=
HttpClientUtil
.
httpPostRequest
(
http
+
Feature
,
params
);
RegisteredRet
registeredRet
=
JacksonUtil
.
readValue
(
ret
,
RegisteredRet
.
class
);
RegistereRetVo
registereRetVo
=
new
RegistereRetVo
();
if
(
Objects
.
requireNonNull
(
registeredRet
).
getResult_code
().
equals
(
"200"
)){
registereRetVo
.
setRet
(
true
);
}
else
{
registereRetVo
.
setRet
(
false
);
}
return
registereRetVo
;
}
@Override
public
String
featureQuery
(
Integer
userId
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"username"
,
"lingo"
);
params
.
put
(
"password"
,
"511B0D5F341BDDBD9A5348923B48D14C"
);
params
.
put
(
"id_type"
,
"06"
);
params
.
put
(
"device_type"
,
"tg.VM661J.img"
);
params
.
put
(
"uid"
,
userId
);
String
ret
=
HttpClientUtil
.
httpPostRequest
(
http
+
FEATUREQUERY
,
params
);
return
ret
;
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论