Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
device-back
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Matrix
device-back
Commits
af9d4789
提交
af9d4789
authored
12月 03, 2021
作者:
zhoushaopan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(配发模块,装备模块): 修服了横向配发500。以及缓存
修服了横向配发500。以及缓存
上级
fde15867
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
29 行增加
和
32 行删除
+29
-32
AllotBillController.java
...tykj/dev/device/allot/controller/AllotBillController.java
+10
-1
DeviceLibraryController.java
...ev/device/library/controller/DeviceLibraryController.java
+2
-0
ReadController.java
...ain/java/com/tykj/dev/rfid/controller/ReadController.java
+3
-5
ReadUtils.java
...d/src/main/java/com/tykj/dev/rfid/timeTask/ReadUtils.java
+14
-26
没有找到文件。
dev-allot/src/main/java/com/tykj/dev/device/allot/controller/AllotBillController.java
浏览文件 @
af9d4789
...
...
@@ -226,7 +226,6 @@ public class AllotBillController {
//从草稿发起
else
{
TaskBto
taskBto
=
taskService
.
get
(
allotBillSaveVo
.
getTaskId
());
// taskBto.setTitle("["+allotBillSaveVo.getReceiveUnit().substring(0,3) + "]型号" + StringSplitUtil.stringListToString(allotBillSaveVo.getScriptSaveVos().stream().map(ScriptSaveVo::getModel).distinct().collect(Collectors.toList())) + "的装备共" + allotBillSaveVo.getAllotCount() + "件");
taskBto
.
setTitle
(
"["
+
DeviceModelSort
.
unitNameToDisName
(
allotBillSaveVo
.
getReceiveUnit
())
+
"]型号"
+
StringSplitUtil
.
stringListToString
(
allotBillSaveVo
.
getScriptSaveVos
().
stream
().
map
(
ScriptSaveVo:
:
getModel
)
.
distinct
().
collect
(
Collectors
.
toList
()))
+
"的装备共"
+
allotBillSaveVo
.
getAllotCount
()
+
"件"
);
...
...
@@ -278,6 +277,16 @@ public class AllotBillController {
//推动任务到配发中状态
saveEntity
=
taskService
.
moveToSpecial
(
taskBto1
,
StatusEnum
.
WAIT_UPLOAD_CROSS_FILE
,
userId
);
}
TaskBto
taskBto2
=
new
TaskBto
(
StatusEnum
.
WAIT_UPLOAD_ALLOT_FILE
.
id
,
"["
+
DeviceModelSort
.
unitNameToDisName
(
allotBillSaveVo
.
getReceiveUnit
())
+
"]型号"
+
StringSplitUtil
.
stringListToString
(
allotBillSaveVo
.
getScriptSaveVos
()
.
stream
().
map
(
ScriptSaveVo:
:
getModel
).
distinct
().
collect
(
Collectors
.
toList
()))
+
"的装备共"
+
allotBillSaveVo
.
getAllotCount
()
+
"件"
,
saveEntity
.
getId
(),
saveEntity
.
getNodeIdDetail
()
+
saveEntity
.
getId
()
+
"."
,
saveEntity
.
getBillId
(),
3
,
allotBillSaveVo
.
getSendUnitId
(),
0
,
null
,
Collections
.
singletonList
(
0
));
taskService
.
start
(
taskBto2
);
}
List
<
FileVo
>
fileVoList
=
new
ArrayList
<>();
//分解装备id字符串
...
...
dev-library/src/main/java/com/tykj/dev/device/library/controller/DeviceLibraryController.java
浏览文件 @
af9d4789
...
...
@@ -28,12 +28,14 @@ import com.tykj.dev.misc.utils.PageUtil;
import
com.tykj.dev.misc.utils.ResultUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Synchronized
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.jpa.repository.Lock
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.validation.annotation.Validated
;
...
...
dev-rfid/src/main/java/com/tykj/dev/rfid/controller/ReadController.java
浏览文件 @
af9d4789
package
com
.
tykj
.
dev
.
rfid
.
controller
;
import
com.tykj.dev.config.swagger.AutoDocument
;
import
com.tykj.dev.rfid.entity.domin.AccessControlName
;
import
com.tykj.dev.rfid.timeTask.ReadUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @author zsp
* @create 2021/12/2 10:39
*/
@RestController
@Api
(
tags
=
"读写机模块"
,
value
=
"读写机模块"
)
@Api
(
tags
=
"读写机模块"
,
description
=
"读写机模块"
)
@AutoDocument
@RequestMapping
(
"/readMachine"
)
@Slf4j
...
...
@@ -34,6 +30,8 @@ public class ReadController {
readUtils
.
testinitreader
();
//开始盘存
readUtils
.
testinventory1
();
//关闭
readUtils
.
getJreader
().
CloseReader
();
return
ResponseEntity
.
ok
(
"读写成功"
);
}
}
dev-rfid/src/main/java/com/tykj/dev/rfid/timeTask/ReadUtils.java
浏览文件 @
af9d4789
...
...
@@ -2,8 +2,9 @@ package com.tykj.dev.rfid.timeTask;
import
com.uhf.api.cls.Reader
;
import
com.uhf.api.cls.Reader.*
;
import
lombok.Data
;
@Data
public
class
ReadUtils
{
/**
...
...
@@ -20,8 +21,7 @@ public class ReadUtils {
Jreader
=
new
Reader
();
}
public
void
testtran
()
{
public
void
testtran
(){
byte
[]
hex
=
new
byte
[]{(
byte
)
0xA2
,(
byte
)
0xC8
,(
byte
)
0xD4
,(
byte
)
0xE5
};
int
len
=
4
;
char
[]
str
=
new
char
[
4
*
2
];
...
...
@@ -47,8 +47,7 @@ public class ReadUtils {
System
.
out
.
println
(
hexbuf
[
i
]);
}
public
void
testpsam
()
{
public
void
testpsam
(){
int
soltid
=
1
;
int
coslen
=
2
;
byte
[]
cos
=
new
byte
[]{
0x11
,
0x22
,
0x33
,
0x44
,
0x55
,
0x66
,
0x77
,(
byte
)
0x88
,(
byte
)
0x99
,
0x12
,
0x34
};
...
...
@@ -60,8 +59,7 @@ public class ReadUtils {
errcode
,
(
short
)
1000
);
}
public
void
testcustomcmd
()
{
public
void
testcustomcmd
()
{
//m4 qt
IMPINJM4QtPara
CustomPara
=
Jreader
.
new
IMPINJM4QtPara
();
CustomPara
.
TimeOut
=
800
;
...
...
@@ -103,8 +101,7 @@ public class ReadUtils {
}
public
void
testreadandwrite
()
{
public
void
testreadandwrite
(){
/*
* READER_ERR WriteTagData(int ant,char bank,int address, byte[] data, int datalen, byte[] accesspasswd,short timeout);
* ant ???????????
...
...
@@ -160,8 +157,7 @@ public class ReadUtils {
}
public
void
testblockop
()
{
public
void
testblockop
()
{
String
pwd
=
"11000000"
;
byte
[]
data
=
new
byte
[
4
];
Jreader
.
Str2Hex
(
pwd
,
pwd
.
length
(),
data
);
...
...
@@ -171,7 +167,6 @@ public class ReadUtils {
//????????
Jreader
.
BlockPermaLock
(
1
,
1
,
2
,
6
,
new
byte
[]{(
byte
)
0xff
,(
byte
)
0xff
},
data
,
(
short
)
1000
);
}
public
void
testinitreader
()
{
...
...
@@ -237,8 +232,7 @@ public class ReadUtils {
er
=
Jreader
.
ParamSet
(
Mtr_Param
.
MTR_PARAM_READER_IS_CHK_ANT
,
0
);
}
public
void
testinventory1
()
{
public
void
testinventory1
()
{
/*
*
* ???????????????????????????????????
...
...
@@ -286,8 +280,7 @@ public class ReadUtils {
}
public
void
testdataonreader
()
{
public
void
testdataonreader
()
{
byte
[]
data3
=
new
byte
[
100
];
READER_ERR
er
=
Jreader
.
ReadDataOnReader
(
0
,
data3
,
100
);
er
=
Jreader
.
SaveDataOnReader
(
0
,
data3
,
100
);
...
...
@@ -296,16 +289,14 @@ public class ReadUtils {
er
=
Jreader
.
EraseDataOnReader
();
}
public
void
testkilltag
()
{
public
void
testkilltag
()
{
String
pwd
=
"11000000"
;
byte
[]
data
=
new
byte
[
4
];
Jreader
.
Str2Hex
(
pwd
,
pwd
.
length
(),
data
);
READER_ERR
er
=
Jreader
.
KillTag
(
1
,
data
,
(
short
)
1000
);
}
public
void
testlocktag
()
{
public
void
testlocktag
()
{
String
pwd
=
"12340000"
;
// READER_ERR er=Jreader.Lock180006BTag(1, 2, 6, (short) 1000);
byte
[]
data
=
new
byte
[
4
];
...
...
@@ -326,8 +317,7 @@ public class ReadUtils {
er
=
Jreader
.
LockTag
(
1
,
(
byte
)
Lock_Obj
.
LOCK_OBJECT_BANK1
.
value
(),
(
short
)
Lock_Type
.
BANK1_UNLOCK
.
value
(),
data
,
(
short
)
1000
);
}
public
void
testsetip
()
{
public
void
testsetip
()
{
Reader_Ip
rip
=
Jreader
.
new
Reader_Ip
();
/*
rip.ip=new byte[]{'1','9','2','.','1','6','8','.','1','.','1','0','1'};
...
...
@@ -343,8 +333,7 @@ public class ReadUtils {
READER_ERR
er
=
Jreader
.
ParamSet
(
Mtr_Param
.
MTR_PARAM_READER_IP
,
rip
);
}
public
void
testrparams
()
{
public
void
testrparams
()
{
HoptableData_ST
hdst
=
Jreader
.
new
HoptableData_ST
();
hdst
.
lenhtb
=
5
;
hdst
.
htb
[
0
]=
915250
;
...
...
@@ -578,8 +567,7 @@ public class ReadUtils {
er
=
Jreader
.
ParamGet
(
Mtr_Param
.
MTR_PARAM_TRANSMIT_MODE
,
val2
);
}
public
void
testgpio
()
{
public
void
testgpio
()
{
READER_ERR
er
=
Jreader
.
SetGPO
(
1
,
1
);
er
=
Jreader
.
SetGPO
(
2
,
0
);
er
=
Jreader
.
SetGPO
(
3
,
0
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论