Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c174d0b1
由
zshaohui
编写于
2025-04-10 15:09:44 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.获取eto/etn文件夹的修改时间
1 个父辈
2b73af30
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
67 行增加
和
3 行删除
src/main/java/com/neotel/smfcore/custom/fuji/bean/dto/FujiConfigDto.java
src/main/java/com/neotel/smfcore/custom/fuji/controller/FujiController.java
src/main/java/com/neotel/smfcore/custom/fuji/bean/dto/FujiConfigDto.java
0 → 100644
查看文件 @
c174d0b
package
com
.
neotel
.
smfcore
.
custom
.
fuji
.
bean
.
dto
;
import
com.neotel.smfcore.custom.fuji.bean.FujiConfig
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
FujiConfigDto
extends
FujiConfig
{
private
String
etoUpdateDateStr
;
private
String
etnUpdateDateStr
;
}
src/main/java/com/neotel/smfcore/custom/fuji/controller/FujiController.java
查看文件 @
c174d0b
...
@@ -11,6 +11,7 @@ import com.neotel.smfcore.core.order.service.po.LiteOrder;
...
@@ -11,6 +11,7 @@ import com.neotel.smfcore.core.order.service.po.LiteOrder;
import
com.neotel.smfcore.core.order.service.po.LiteOrderItem
;
import
com.neotel.smfcore.core.order.service.po.LiteOrderItem
;
import
com.neotel.smfcore.custom.fuji.FujiApi
;
import
com.neotel.smfcore.custom.fuji.FujiApi
;
import
com.neotel.smfcore.custom.fuji.bean.FujiConfig
;
import
com.neotel.smfcore.custom.fuji.bean.FujiConfig
;
import
com.neotel.smfcore.custom.fuji.bean.dto.FujiConfigDto
;
import
com.neotel.smfcore.custom.fuji.config.FujiCacheConfig
;
import
com.neotel.smfcore.custom.fuji.config.FujiCacheConfig
;
import
com.neotel.smfcore.custom.fuji.order.service.JobService
;
import
com.neotel.smfcore.custom.fuji.order.service.JobService
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
...
@@ -21,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -21,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.io.File
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -71,7 +74,19 @@ public class FujiController {
...
@@ -71,7 +74,19 @@ public class FujiController {
if
(
config
==
null
)
{
if
(
config
==
null
)
{
config
=
new
FujiConfig
();
config
=
new
FujiConfig
();
}
}
return
ResultBean
.
newOkResult
(
config
);
FujiConfigDto
dto
=
new
FujiConfigDto
();
dto
.
setAuthUrl
(
config
.
getAuthUrl
());
dto
.
setGetDidInfoUrl
(
config
.
getGetDidInfoUrl
());
dto
.
setRegisterDidInfoUrl
(
config
.
getRegisterDidInfoUrl
());
dto
.
setResult
(
config
.
getResult
());
dto
.
setLastUpdateTime
(
config
.
getLastUpdateTime
());
dto
.
setInputEto
(
config
.
getInputEto
());
dto
.
setOutputEtn
(
config
.
getOutputEtn
());
dto
.
setTime
(
config
.
getTime
());
dto
.
setEtnUpdateDateStr
(
getUpdateDate
(
config
.
getOutputEtn
()));
dto
.
setEtoUpdateDateStr
(
getUpdateDate
(
config
.
getInputEto
()));
return
ResultBean
.
newOkResult
(
dto
);
}
}
@ApiOperation
(
"did注册"
)
@ApiOperation
(
"did注册"
)
...
@@ -97,7 +112,7 @@ public class FujiController {
...
@@ -97,7 +112,7 @@ public class FujiController {
@ApiOperation
(
"job出库"
)
@ApiOperation
(
"job出库"
)
@RequestMapping
(
"/jobCheckOut"
)
@RequestMapping
(
"/jobCheckOut"
)
@AnonymousAccess
//
@AnonymousAccess
public
synchronized
ResultBean
jobCheckOut
(
String
orderNo
)
{
public
synchronized
ResultBean
jobCheckOut
(
String
orderNo
)
{
LiteOrder
liteOrder
=
liteOrderCache
.
getLiteOrder
(
orderNo
);
LiteOrder
liteOrder
=
liteOrderCache
.
getLiteOrder
(
orderNo
);
if
(
liteOrder
==
null
){
if
(
liteOrder
==
null
){
...
@@ -117,7 +132,7 @@ public class FujiController {
...
@@ -117,7 +132,7 @@ public class FujiController {
@ApiOperation
(
"获取需要出库/正在执行中的job任务"
)
@ApiOperation
(
"获取需要出库/正在执行中的job任务"
)
@RequestMapping
(
"/jobInfo"
)
@RequestMapping
(
"/jobInfo"
)
@AnonymousAccess
//
@AnonymousAccess
public
ResultBean
getJobInfo
()
{
public
ResultBean
getJobInfo
()
{
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
Collection
<
LiteOrder
>
allLiteOrder
=
liteOrderCache
.
getAllLiteOrder
();
Collection
<
LiteOrder
>
allLiteOrder
=
liteOrderCache
.
getAllLiteOrder
();
...
@@ -172,4 +187,41 @@ public class FujiController {
...
@@ -172,4 +187,41 @@ public class FujiController {
}
}
return
ResultBean
.
newOkResult
(
resultList
);
return
ResultBean
.
newOkResult
(
resultList
);
}
}
@ApiOperation
(
"获取文件修改时间"
)
@RequestMapping
(
"/getFileUpdateDate"
)
//@AnonymousAccess
public
ResultBean
getFileUpdateDate
(
String
param
)
{
FujiConfig
config
=
dataCache
.
getCache
(
FujiCacheConfig
.
FujiConfig_Cache_Name
);
if
(
config
==
null
)
{
config
=
new
FujiConfig
();
}
String
updateStr
=
""
;
String
fileName
=
""
;
if
(
param
.
contains
(
"eto"
))
{
fileName
=
config
.
getInputEto
();
updateStr
=
getUpdateDate
(
config
.
getInputEto
());
}
else
if
(
param
.
contains
(
"etn"
))
{
fileName
=
config
.
getOutputEtn
();
updateStr
=
getUpdateDate
(
config
.
getOutputEtn
());
}
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"updateDate"
,
updateStr
);
resultMap
.
put
(
"fileName"
,
fileName
);
return
ResultBean
.
newOkResult
(
resultMap
);
}
private
String
getUpdateDate
(
String
fileName
)
{
if
(
StringUtils
.
isNotEmpty
(
fileName
))
{
File
file
=
new
File
(
fileName
);
if
(
file
.
exists
())
{
long
lastModified
=
file
.
lastModified
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
return
sdf
.
format
(
new
Date
(
lastModified
));
}
}
return
""
;
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论