Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
aroad_aqsc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
许言琪
aroad_aqsc
Commits
38a5fa3e
提交
38a5fa3e
authored
6月 26, 2019
作者:
朱运伟
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug 修复,项目完善
上级
9f9a10cf
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
50 行增加
和
17 行删除
+50
-17
GetZhjsInterfaceData.java
.../module/common/getInterfaceData/GetZhjsInterfaceData.java
+5
-2
HttpClient.java
...laxy/aroad/module/common/getInterfaceData/HttpClient.java
+9
-5
ZhjgDckhRwController.java
...xy/aroad/module/zhjg/controller/ZhjgDckhRwController.java
+1
-0
ZhjgDckhRwFkController.java
.../aroad/module/zhjg/controller/ZhjgDckhRwFkController.java
+8
-0
ZhjgDckhRw.java
...framework/galaxy/aroad/module/zhjg/entity/ZhjgDckhRw.java
+4
-0
ZhjsGcxmServiceImpl.java
...y/aroad/module/zhjs/service/impl/ZhjsGcxmServiceImpl.java
+15
-7
application-dev.yml
src/main/resources/application-dev.yml
+7
-3
ZhjgDckhRwMapper.xml
src/main/resources/mapper/zhjg/ZhjgDckhRwMapper.xml
+1
-0
没有找到文件。
src/main/java/com/elephant/framework/galaxy/aroad/module/common/getInterfaceData/GetZhjsInterfaceData.java
浏览文件 @
38a5fa3e
...
...
@@ -21,7 +21,10 @@ import org.springframework.stereotype.Component;
import
java.util.Calendar
;
import
java.util.Iterator
;
/***
* 从工程计量与支付系统拉取智慧建设数据
* 定时任务
*/
@Component
@Configuration
@EnableScheduling
...
...
@@ -34,7 +37,7 @@ public class GetZhjsInterfaceData {
private
final
ZhjsZqzfzsService
zhjsZqzfzsService
;
private
final
ZhjsZqzfzsMxService
zhjsZqzfzsMxService
;
@Scheduled
(
cron
=
"
59 59 23
? * *"
)
@Scheduled
(
cron
=
"
00 28 17
? * *"
)
// @Scheduled(cron = "0/5 * * * * ?")
public
void
scheduledSaveEvent
()
throws
Exception
{
String
token
=
zhjsGcxmService
.
getTokenData
();
...
...
src/main/java/com/elephant/framework/galaxy/aroad/module/common/getInterfaceData/HttpClient.java
浏览文件 @
38a5fa3e
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
common
.
getInterfaceData
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
@Service
@Component
public
class
HttpClient
{
@Value
(
"${jlzf.url}"
)
private
String
jlzf_url
;
public
String
client
(
String
token
)
{
RestTemplate
template
=
new
RestTemplate
();
String
url
=
"http://118.24.7.48:8088
/updateAccessTokenSysInterfaceEnterprise.action?refreshtoken="
+
token
;
String
url
=
jlzf_url
+
"
/updateAccessTokenSysInterfaceEnterprise.action?refreshtoken="
+
token
;
ResponseEntity
<
String
>
response
=
template
.
getForEntity
(
url
,
String
.
class
);
return
response
.
getBody
();
}
public
static
String
callOtherInterface
(
String
propUrl
,
String
token
,
String
createData
)
{
public
String
callOtherInterface
(
String
propUrl
,
String
token
,
String
createData
)
{
RestTemplate
rest
=
new
RestTemplate
();
String
json
=
"{
'createDate':"
+
createData
+
"}"
;
String
url
=
"http://118.24.7.48:8088/"
+
propUrl
+
"?access_token="
+
token
+
"&key={json}"
;
String
json
=
"{
\"createDate\":\""
+
createData
+
"\
"}"
;
String
url
=
jlzf_url
+
propUrl
+
"?access_token="
+
token
+
"&key="
+
json
;
ResponseEntity
<
String
>
res
=
rest
.
getForEntity
(
url
,
String
.
class
,
json
);
return
res
.
getBody
();
}
...
...
src/main/java/com/elephant/framework/galaxy/aroad/module/zhjg/controller/ZhjgDckhRwController.java
浏览文件 @
38a5fa3e
...
...
@@ -129,6 +129,7 @@ public class ZhjgDckhRwController extends BaseController {
@SysLog
(
"新增督查情况任务表"
)
@PostMapping
public
R
save
(
@RequestBody
ZhjgDckhRw
zhjgDckhRw
)
{
zhjgDckhRw
.
setFkzt
(
"0"
);
boolean
rw
=
zhjgDckhRwService
.
save
(
zhjgDckhRw
);
return
new
R
<>(
rw
);
}
...
...
src/main/java/com/elephant/framework/galaxy/aroad/module/zhjg/controller/ZhjgDckhRwFkController.java
浏览文件 @
38a5fa3e
...
...
@@ -2,6 +2,8 @@ package com.elephant.framework.galaxy.aroad.module.zhjg.controller;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.elephant.framework.galaxy.aroad.module.zhjg.entity.ZhjgDckhRw
;
import
com.elephant.framework.galaxy.aroad.module.zhjg.service.ZhjgDckhRwService
;
import
com.elephant.framework.galaxy.aroad.response.R
;
import
com.elephant.framework.galaxy.aroad.module.common.annotation.SysLog
;
import
com.elephant.framework.galaxy.aroad.module.zhjg.entity.ZhjgDckhRwFk
;
...
...
@@ -26,6 +28,7 @@ import java.time.LocalDateTime;
public
class
ZhjgDckhRwFkController
extends
BaseController
{
private
final
ZhjgDckhRwFkService
zhjgDckhRwFkService
;
private
final
ZhjgDckhRwService
zhjgDckhRwService
;
/**
* 分页查询
...
...
@@ -60,6 +63,11 @@ public class ZhjgDckhRwFkController extends BaseController {
Integer
deptId
=
SecurityUtils
.
getUser
().
getDeptId
();
zhjgDckhRwFk
.
setFkdw
(
deptId
);
zhjgDckhRwFk
.
setFksj
(
LocalDateTime
.
now
());
ZhjgDckhRw
rw
=
zhjgDckhRwService
.
getById
(
zhjgDckhRwFk
.
getRwid
());
if
(
rw
!=
null
){
rw
.
setFkzt
(
"1"
);
zhjgDckhRwService
.
updateById
(
rw
);
}
return
new
R
<>(
zhjgDckhRwFkService
.
save
(
zhjgDckhRwFk
));
}
...
...
src/main/java/com/elephant/framework/galaxy/aroad/module/zhjg/entity/ZhjgDckhRw.java
浏览文件 @
38a5fa3e
...
...
@@ -124,6 +124,10 @@ public class ZhjgDckhRw extends Model<ZhjgDckhRw> {
* 备注信息
*/
private
String
remarks
;
/**
* 反馈状态
*/
private
String
fkzt
;
@TableField
(
exist
=
false
)
private
String
[]
cydws
;
...
...
src/main/java/com/elephant/framework/galaxy/aroad/module/zhjs/service/impl/ZhjsGcxmServiceImpl.java
浏览文件 @
38a5fa3e
...
...
@@ -12,7 +12,11 @@ import com.elephant.framework.galaxy.aroad.module.zhjs.service.ZhjsGcxmService;
import
com.elephant.framework.galaxy.aroad.module.zhjs.service.ZhjsTokenService
;
import
lombok.AllArgsConstructor
;
import
net.sf.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.client.RestTemplate
;
...
...
@@ -28,12 +32,16 @@ import java.util.List;
* @date 2019-04-08 18:14:32
*/
@Service
@
AllArgsConstructor
@
Component
public
class
ZhjsGcxmServiceImpl
extends
ServiceImpl
<
ZhjsGcxmMapper
,
ZhjsGcxm
>
implements
ZhjsGcxmService
{
final
ZhjsGcxmMapper
zhjsGcxmMapper
;
final
HttpClient
httpClient
;
final
ZhjsTokenService
zhjsTokenService
;
@Autowired
private
ZhjsGcxmMapper
zhjsGcxmMapper
;
@Autowired
private
HttpClient
httpClient
;
@Autowired
private
ZhjsTokenService
zhjsTokenService
;
@Value
(
"${jlzf.url}"
)
private
String
jlzf_url
;
private
static
String
[]
citys
=
new
String
[]{
"济南"
,
"青岛"
,
"淄博"
,
"枣庄"
,
"东营"
,
"烟台"
,
"潍坊"
,
"济宁"
,
"泰安"
,
"威海"
,
"日照"
,
"滨州"
,
"德州"
,
"聊城"
,
"临沂"
,
"菏泽"
,
"莱芜"
};
...
...
@@ -54,7 +62,7 @@ public class ZhjsGcxmServiceImpl extends ServiceImpl<ZhjsGcxmMapper, ZhjsGcxm> i
JSONObject
jsonObject
=
JSONObject
.
fromObject
(
httpClient
.
client
(
zhjsToken
.
getToken
()));
if
(
"1"
.
equals
(
jsonObject
.
getString
(
"code"
)))
{
zhjsToken
.
setToken
(
JSONObject
.
fromObject
(
jsonObject
.
getString
(
"data"
)).
getString
(
"token"
));
zhjsToken
.
setCreatetime
(
new
java
.
text
.
SimpleDateFormat
(
"yyyy-MM-dd
hh
:mm:ss"
).
format
(
new
Date
()));
zhjsToken
.
setCreatetime
(
new
java
.
text
.
SimpleDateFormat
(
"yyyy-MM-dd
HH
:mm:ss"
).
format
(
new
Date
()));
System
.
out
.
println
(
zhjsToken
);
zhjsTokenService
.
setZhjsToken
(
token
,
zhjsToken
);
System
.
out
.
println
(
"更新token成功,值为:"
+
zhjsToken
.
getToken
());
...
...
@@ -72,7 +80,7 @@ public class ZhjsGcxmServiceImpl extends ServiceImpl<ZhjsGcxmMapper, ZhjsGcxm> i
public
String
getHzmxByProId
(
String
token
,
String
proId
)
{
RestTemplate
rest
=
new
RestTemplate
();
String
json
=
"{'pro_id':'"
+
proId
+
"'}"
;
String
url
=
"http://118.24.7.48:8088
/getSummaryListTestInterfaces.action?access_token="
+
token
+
"&key={json}"
;
String
url
=
jlzf_url
+
"
/getSummaryListTestInterfaces.action?access_token="
+
token
+
"&key={json}"
;
ResponseEntity
<
String
>
res
=
rest
.
getForEntity
(
url
,
String
.
class
,
json
);
return
JSONObject
.
fromObject
(
res
.
getBody
()).
getString
(
"data"
);
}
...
...
src/main/resources/application-dev.yml
浏览文件 @
38a5fa3e
...
...
@@ -50,12 +50,16 @@ fdfs:
width
:
60
height
:
60
tracker-list
:
# tracker地址
-
47.105.47.32:22122
-
47.105.47.32:22122
connect
:
host_1
:
192.168.7.200
host_2
:
192.168.7.210
host_3
:
192.168.7.220
port_net
:
9300
shape
:
url
:
http://47.105.99.44:8080/sdlkapi/LRS/GetAmapGeometry?geometry=
identify-url
:
http://47.105.99.44:8080/sdlkapi/LRS/IdentifyM?longitude=
\ No newline at end of file
identify-url
:
http://47.105.99.44:8080/sdlkapi/LRS/IdentifyM?longitude=
#计量与支付系统拉取数据地址
jlzf
:
url
:
http://118.24.7.48:8088
\ No newline at end of file
src/main/resources/mapper/zhjg/ZhjgDckhRwMapper.xml
浏览文件 @
38a5fa3e
...
...
@@ -28,6 +28,7 @@
<result
property=
"updatePerson"
column=
"update_person"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"fkzt"
column=
"fkzt"
/>
<result
property=
"delFlag"
column=
"del_flag"
/>
<result
property=
"remarks"
column=
"remarks"
/>
</resultMap>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论