Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
civil-bigdata
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
civil
civil-bigdata
Commits
b9e0efa2
Commit
b9e0efa2
authored
Jan 13, 2022
by
zlr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
志愿者接口
parent
8cb5b69d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
269 additions
and
4 deletions
+269
-4
sync-server/src/main/java/com/zq/sync/controller/VolunteerController.java
+4
-3
sync-server/src/main/java/com/zq/sync/dao/VolunteerDao.java
+8
-0
sync-server/src/main/java/com/zq/sync/entity/Volunteer.java
+97
-0
sync-server/src/main/java/com/zq/sync/service/VolunteerService.java
+47
-1
sync-server/src/main/java/com/zq/sync/vo/VolunteerVo.java
+113
-0
No files found.
sync-server/src/main/java/com/zq/sync/controller/VolunteerController.java
View file @
b9e0efa2
...
...
@@ -4,6 +4,7 @@ import com.zq.common.utils.AssertUtils;
import
com.zq.common.vo.ResultVo
;
import
com.zq.sync.service.VolunteerService
;
import
com.zq.sync.vo.GroupProSearchVo
;
import
com.zq.sync.vo.VolunteerVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -21,9 +22,9 @@ public class VolunteerController {
* @return
*/
@GetMapping
(
value
=
"/zyz"
)
public
ResultVo
volunteer
(
)
{
volunteerService
.
volunteer
(
);
return
ResultVo
.
success
(
"成功"
)
;
public
VolunteerVo
volunteer
(
String
id
)
{
VolunteerVo
VolunteerVo
=
volunteerService
.
volunteer
(
id
);
return
VolunteerVo
;
}
/**
...
...
sync-server/src/main/java/com/zq/sync/dao/VolunteerDao.java
0 → 100644
View file @
b9e0efa2
package
com
.
zq
.
sync
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.zq.sync.entity.Volunteer
;
public
interface
VolunteerDao
extends
BaseMapper
<
Volunteer
>
{
}
sync-server/src/main/java/com/zq/sync/entity/Volunteer.java
0 → 100644
View file @
b9e0efa2
package
com
.
zq
.
sync
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
public
class
Volunteer
{
/**
* ID
*/
@ApiModelProperty
(
"ID"
)
private
String
id
;
/**
* 上级机构id
*/
@ApiModelProperty
(
"上级机构id"
)
private
String
parentId
;
/**
* 机构(部门)名称
*/
@ApiModelProperty
(
"机构(部门)名称"
)
private
String
deptName
;
/**
* 机构类型:1 业务处室 2二层机构 3 二层机构业务科室
*/
@ApiModelProperty
(
"机构类型:1 业务处室 2二层机构 3 二层机构业务科室"
)
private
Integer
deptType
;
/**
* 部门的统一信用代码
*/
@ApiModelProperty
(
"部门的统一信用代码"
)
private
String
creditCode
;
/**
* 行政区域编号
*/
@ApiModelProperty
(
"行政区域编号"
)
private
String
areaCode
;
/**
* 地址
*/
@ApiModelProperty
(
"地址"
)
private
String
address
;
/**
* 联系电话
*/
@ApiModelProperty
(
"联系电话"
)
private
String
tel
;
/**
* 编制(人员数量)
*/
@ApiModelProperty
(
"编制(人员数量)"
)
private
Integer
totalOrgStaff
;
/**
* 在编(人员数量)
*/
@ApiModelProperty
(
"在编(人员数量)"
)
private
Integer
currOrgStaff
;
/**
* 主要职责
*/
@ApiModelProperty
(
"主要职责"
)
private
String
responsibility
;
/**
* 排序编号,默认为0
*/
@ApiModelProperty
(
"排序编号,默认为0"
)
private
Integer
orderNum
;
/**
* 创建时间
*/
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
/**
* 更新时间
*/
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
/**
* 上级机构名称
*/
@ApiModelProperty
(
"上级机构名称"
)
private
String
parentName
;
}
sync-server/src/main/java/com/zq/sync/service/VolunteerService.java
View file @
b9e0efa2
package
com
.
zq
.
sync
.
service
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.http.HttpRequest
;
import
cn.hutool.http.HttpResponse
;
import
cn.hutool.json.JSONArray
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.zq.common.utils.AssertUtils
;
import
com.zq.sync.dao.GroupProSearchDao
;
import
com.zq.sync.dao.VolunteerDao
;
import
com.zq.sync.entity.GroupProject
;
import
com.zq.sync.entity.ReportError
;
import
com.zq.sync.entity.Volunteer
;
import
com.zq.sync.vo.GroupProSearchVo
;
import
com.zq.sync.vo.GroupProVo
;
import
com.zq.sync.vo.VolunteerVo
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
java.util.Comparator
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Slf4j
@Service
...
...
@@ -19,10 +31,44 @@ import java.util.List;
public
class
VolunteerService
{
private
final
GroupProSearchDao
groupProSearchDao
;
private
final
VolunteerDao
volunteerDao
;
public
void
volunteer
()
{
private
void
reportCommon
(
HttpRequest
request
)
{
HttpResponse
response
=
request
.
execute
();
if
(
response
.
getStatus
()
!=
200
)
{
log
.
error
(
"接口请求失败 => {}"
,
request
);
}
String
body
=
response
.
body
();
JSONObject
obj
=
JSONUtil
.
parseObj
(
body
);
String
code
=
obj
.
getStr
(
"code"
);
if
(
code
==
null
||
!
"0"
.
equals
(
code
))
{
log
.
warn
(
"校验错误:{}, => {}"
,
request
.
getUrl
(),
body
);
}
String
msg
=
obj
.
getStr
(
"msg"
);
if
(
msg
!=
null
&&
!
"成功"
.
equals
(
msg
))
{
log
.
warn
(
"校验错误:{}, => {}"
,
request
.
getUrl
(),
body
);
}
log
.
warn
(
"成功!:{}, => {}"
,
request
.
getUrl
(),
body
);
}
public
VolunteerVo
volunteer
(
String
id
)
{
//Map<String, VolunteerVo> str = new HashMap<>();
// VolunteerVo VolunteerVo = volunteerDao.selectById(Wrappers.lambdaQuery(Volunteer.builder().id("id").build()));
//str.put("bean",VolunteerVo);
// HttpRequest request = HttpRequest.post("https://wuhan.yxybb.com/NVSI/restservices/api/nvsi_VolunteerInfoWeb/")
// .contentType("application/json;charset=UTF-8")
// .form("bean", JSONUtil.toJsonStr(VolunteerVo));
// reportCommon(request);
//
// return VolunteerVo;
return
null
;
}
public
void
zyteam
()
{
}
...
...
sync-server/src/main/java/com/zq/sync/vo/VolunteerVo.java
0 → 100644
View file @
b9e0efa2
package
com
.
zq
.
sync
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
* 机构表(OrgDept)实体类
*
* @author makejava
* @since 2021-08-19 11:28:38
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
VolunteerVo
{
/**
* ID
*/
@ApiModelProperty
(
"ID"
)
private
String
id
;
/**
* 上级机构id
*/
@ApiModelProperty
(
"上级机构id"
)
private
String
parentId
;
/**
* 机构(部门)名称
*/
@ApiModelProperty
(
"机构(部门)名称"
)
private
String
deptName
;
/**
* 机构类型:1 业务处室 2二层机构 3 二层机构业务科室
*/
@ApiModelProperty
(
"机构类型:1 业务处室 2二层机构 3 二层机构业务科室"
)
private
Integer
deptType
;
/**
* 部门的统一信用代码
*/
@ApiModelProperty
(
"部门的统一信用代码"
)
private
String
creditCode
;
/**
* 行政区域编号
*/
@ApiModelProperty
(
"行政区域编号"
)
private
String
areaCode
;
/**
* 地址
*/
@ApiModelProperty
(
"地址"
)
private
String
address
;
/**
* 联系电话
*/
@ApiModelProperty
(
"联系电话"
)
private
String
tel
;
/**
* 编制(人员数量)
*/
@ApiModelProperty
(
"编制(人员数量)"
)
private
Integer
totalOrgStaff
;
/**
* 在编(人员数量)
*/
@ApiModelProperty
(
"在编(人员数量)"
)
private
Integer
currOrgStaff
;
/**
* 主要职责
*/
@ApiModelProperty
(
"主要职责"
)
private
String
responsibility
;
/**
* 排序编号,默认为0
*/
@ApiModelProperty
(
"排序编号,默认为0"
)
private
Integer
orderNum
;
/**
* 创建时间
*/
@ApiModelProperty
(
"创建时间"
)
private
Date
createTime
;
/**
* 更新时间
*/
@ApiModelProperty
(
"更新时间"
)
private
Date
updateTime
;
/**
* 上级机构名称
*/
@ApiModelProperty
(
"上级机构名称"
)
private
String
parentName
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment