切换导航条
此项目
正在载入...
登录
zhangFan
/
analysis_imf
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
朱兆平
2 years ago
提交
edc9697615ac8b6988864bcc92a89bd8f917592d
1 个父辈
e7b2f80f
关锁业务生产第一环节完结
显示空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
51 行增加
和
8 行删除
src/main/java/com/sy/controller/CustomsLockController.java
src/main/java/com/sy/service/RedisService.java
src/main/java/com/sy/service/impl/GatherInfoHandle.java
src/main/java/com/sy/service/impl/RedisServiceImpl.java
src/main/java/com/sy/service/lock/CustomsLockServiceImpl.java
src/main/java/com/sy/controller/CustomsLockController.java
查看文件 @
edc9697
...
...
@@ -17,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.math.BigDecimal
;
@RestController
@RequestMapping
(
"/lock"
)
@Slf4j
...
...
@@ -37,10 +39,10 @@ public class CustomsLockController {
log
.
info
(
"收到关锁通知"
);
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"施解封时间:"
).
append
(
feedBack
.
locktime
).
append
(
"\n"
)
.
append
(
"关锁秘钥:"
).
append
(
feedBack
.
secret
).
append
(
"\n"
)
.
append
(
"施解封内容:"
).
append
(
feedBack
.
feedbackconten
).
append
(
"\n"
)
.
append
(
"施解封状态:"
).
append
(
feedBack
.
feedbackcode
).
append
(
"\n"
);
// sb.append("施解封时间:").append(feedBack.locktime).append("\n")
// .append("关锁秘钥:").append(feedBack.secret).append("\n")
// .append("施解封内容:").append(feedBack.feedbackconten).append("\n")
// .append("施解封状态:").append(feedBack.feedbackcode).append("\n");
String
LOCK_TYPE_UNLOCK
=
"2"
;
/**
...
...
@@ -77,13 +79,16 @@ public class CustomsLockController {
sb
.
append
(
"关锁缓存信息读取失败"
);
gatherInfo
=
new
GatherInfo
();
gatherInfo
.
setBarcode
(
feedBack
.
barcode
);
gatherInfo
.
setGrosswt
(
new
BigDecimal
(
0
));
commandLogService
.
commandlog
(
gatherInfo
,
false
,
sb
.
toString
(),
null
,
null
,
0.0
,
0.0
,
0.0
,
0.0
);
log
.
info
(
"[LOCK-RSP]-关锁缓存信息读取失败"
);
}
}
else
{
sb
.
append
(
"关锁
缓存信息读取
失败"
);
sb
.
append
(
"关锁
施解封
失败"
);
GatherInfo
gatherInfo
=
new
GatherInfo
();
gatherInfo
.
setBarcode
(
feedBack
.
barcode
);
gatherInfo
.
setGrosswt
(
new
BigDecimal
(
0
));
commandLogService
.
commandlog
(
gatherInfo
,
false
,
sb
.
toString
(),
null
,
null
,
0.0
,
0.0
,
0.0
,
0.0
);
log
.
info
(
"[LOCK-RSP]-关锁施解封失败"
);
}
...
...
src/main/java/com/sy/service/RedisService.java
查看文件 @
edc9697
...
...
@@ -27,4 +27,12 @@ public interface RedisService {
* @return
*/
boolean
set
(
String
key
,
String
value
,
long
time
);
/**
* 计数
* @param key key
* @param delta 步进值
* @return 返回总数
*/
long
incr
(
String
key
,
long
delta
);
}
...
...
src/main/java/com/sy/service/impl/GatherInfoHandle.java
查看文件 @
edc9697
...
...
@@ -634,6 +634,10 @@ public class GatherInfoHandle implements GatherInfoService {
List
<
LandBusinessTypeList
>
r
=
landBusinessTypeListList
.
stream
().
filter
(
item
->{
//判断还有没有没有出区的场站,还有没有出区的场站就不核销
log
.
debug
(
"[releaseFormCheck-Stream-loop]-缓存与已出核碰,缓存元素场站:[{}],已出记录场站:[{}]"
,
item
.
getEndstation
(),
businessTypeList
.
getEndstation
());
//解决缓存那里存储有不一样的把人错的的有问题的点,二维码不一致也把缓存删除
if
(!
item
.
getBarcode
().
equals
(
businessTypeList
.
getBarcode
())){
return
true
;
}
if
(
item
.
getEndstation
().
equals
(
businessTypeList
.
getEndstation
()))
{
log
.
info
(
"[releaseFormCheck-Stream-loop]-缓存元素场站:[{}],已出记录场站:[{}]-核销判定对碰成功"
,
item
.
getEndstation
(),
businessTypeList
.
getEndstation
());
return
true
;
...
...
@@ -692,6 +696,9 @@ public class GatherInfoHandle implements GatherInfoService {
log
.
info
(
"[流转缓存]-{}缓存已核销"
,
vaName
);
//核销记录
releaseRecord
();
//总业务车次计数
gatherInfoHandle
.
redisService
.
incr
(
"kako-barcode-total"
,
1
);
}
/**
...
...
@@ -712,6 +719,8 @@ public class GatherInfoHandle implements GatherInfoService {
if
(
gatherInfoHandle
.
debug
){
if
(
check
)
{
record
();
//总进出车次计数
gatherInfoHandle
.
redisService
.
incr
(
"kako-total"
,
1
);
}
commandlog
(
info
,
check
,
reason
,
land
,
list_infos
);
return
check
;
...
...
@@ -724,6 +733,9 @@ public class GatherInfoHandle implements GatherInfoService {
log
.
info
(
"=============>>>>>>>>放行报文发送成功<<<<<<<<<=============="
);
flag
=
true
;
record
();
//总进出车次计数
gatherInfoHandle
.
redisService
.
incr
(
"kako-total"
,
1
);
}
else
{
CommandClient
.
Client
(
info
,
reason
);
log
.
info
(
"=============>>>>>>>>重量异常报文发送成功<<<<<<<<<=============="
);
...
...
src/main/java/com/sy/service/impl/RedisServiceImpl.java
查看文件 @
edc9697
...
...
@@ -165,6 +165,7 @@ public class RedisServiceImpl implements RedisService {
* @param delta 要增加几(大于0)
* @return
*/
@Override
public
long
incr
(
String
key
,
long
delta
){
if
(
delta
<
0
){
throw
new
RuntimeException
(
"递增因子必须大于0"
);
...
...
src/main/java/com/sy/service/lock/CustomsLockServiceImpl.java
查看文件 @
edc9697
...
...
@@ -89,10 +89,24 @@ public class CustomsLockServiceImpl implements CustomsLockService {
LandBusinessTypeList
landBusinessTypeList
=
landBusListService
.
getLandBusinessTypeListByGather
(
info
);
if
(
landBusinessTypeList
!=
null
){
if
(
"调拨业务"
.
equals
(
landBusinessTypeList
.
getBusinesstype
())
||
"分拨业务"
.
equals
(
landBusinessTypeList
.
getBusinesstype
()))
{
//综保区场站及内三不通知,顺丰场站不通知
String
sfAreaid
=
"4600541001"
;
if
(
"4600329012"
.
equals
(
landBusinessTypeList
.
getEndstation
())
||
"4612199001"
.
equals
(
landBusinessTypeList
.
getEndstation
())
String
zbqAreaid
=
"4600329012"
;
String
zbqN3Areaid
=
"4612199001"
;
String
carEndstationList
=
redisService
.
get
(
info
.
getVename
()
+
"_endstationList"
);
if
(
StringUtils
.
isNotEmpty
(
info
.
getVename
())
&&
StringUtils
.
isNotEmpty
(
carEndstationList
)){
//涉及综保区场站的申请不核验关锁业务.
if
(
carEndstationList
.
contains
(
zbqAreaid
))
{
log
.
info
(
"[LOCK-CHECK]-申报场站列表包含综保区,不处理关锁业务,当前场站:{}"
,
landBusinessTypeList
.
getEndstation
());
return
false
;
}
//综保区场站及内三不通知,顺丰场站不通知
if
(
zbqAreaid
.
equals
(
landBusinessTypeList
.
getEndstation
())
||
zbqN3Areaid
.
equals
(
landBusinessTypeList
.
getEndstation
())
||
sfAreaid
.
equals
(
landBusinessTypeList
.
getEndstation
())
)
{
log
.
info
(
"[LOCK-CHECK]-综保区及内三场站,顺丰场站,不处理关锁业务,当前场站:{}"
,
landBusinessTypeList
.
getEndstation
());
...
...
@@ -115,6 +129,9 @@ public class CustomsLockServiceImpl implements CustomsLockService {
// }
// }
}
}
else
{
return
false
;
}
}
}
else
{
log
.
info
(
"[LOCK-CHECK]-无对应进出场申请"
);
...
...
请
注册
或
登录
后发表评论