Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
8timerv2
8timerapiv200
Commits
f763d687
Commit
f763d687
authored
4 years ago
by
邓实川
Committed by
chenzg
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电子合同优化
parent
131442a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
22 deletions
+83
-22
src/main/java/cn/timer/api/controller/dzht/DzhtController.java
+54
-22
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
+29
-0
No files found.
src/main/java/cn/timer/api/controller/dzht/DzhtController.java
View file @
f763d687
...
...
@@ -332,12 +332,19 @@ public class DzhtController {
@PostMapping
(
"/rzUserNow"
)
@ApiOperation
(
value
=
"发起当前公司用户的e签宝个人帐户认证"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
rzUserNow
(
@CurrentUser
UserBean
userBean
,
Integer
empNum
)
{
if
(
empNum
==
null
||
empNum
<=
0
)
return
ResultUtil
.
error
(
"请输入正确的员工信息"
);
DzhtAssoGrrz
grrz
=
new
DzhtAssoGrrz
();
grrz
.
setType
(
0
);
System
.
err
.
println
(
empNum
);
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
select
(
"phone"
)
.
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
eq
(
"emp_num"
,
empNum
));
System
.
err
.
println
(
yg
);
if
(
yg
==
null
)
return
ResultUtil
.
error
(
"请确认员工是否存在"
);
String
phone
=
yg
.
getPhone
();
if
(
phone
==
null
)
return
ResultUtil
.
error
(
"请确认员工手机号是否存在"
);
grrz
.
setMobileNo
(
yg
.
getPhone
());
DzhtAssoGrzc
grzc
=
DzhtAssoGrzc
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
DzhtAssoGrzc
>()
...
...
@@ -565,31 +572,56 @@ public class DzhtController {
}
}
// 查询认证信息
// // 查询认证信息(当前用户所有公司)
// @GetMapping("/detail")
// @ApiOperation(value = "查询最新认证信息", httpMethod = "GET", notes = "接口发布说明")
// public Result<Object> detail(@CurrentUser UserBean userBean) {
// ResponseEntity<JSONObject> a = null;
// String code = null;
// List<JSONObject> returnList = new ArrayList<JSONObject>();
//
// List<QyzxEmpEntAsso> list = QyzxEmpEntAsso.builder().build()
// .selectList(new QueryWrapper<QyzxEmpEntAsso>().eq("emp_num", userBean.getEmpNum()));
//
// List<Integer> orgCodeList = Lists.transform(list, newList -> newList.getOrgCode());
//
// for (Integer orgCode : orgCodeList) {
// DzhtAssoQyrz qyrz = DzhtAssoQyrz.builder().build().selectOne(new QueryWrapper<DzhtAssoQyrz>()
// .eq("org_code", orgCode).select("flow_id").orderByDesc("id").last("limit 1"));
// if (qyrz != null) {
// String flowId = qyrz.getFlowId();
// HttpEntity<?> entity = new HttpEntity<>(headers());
// a = restTemplate.exchange(ConfigConstant.host + "/v2/identity/auth/api/common/" + flowId + "/detail",
// HttpMethod.GET, entity, JSONObject.class);
//
// code = a.getBody().get("code").toString();
// returnList.add(a.getBody());
// }
// }
// if (code.equals("0")) {
// return ResultUtil.data(returnList);
// } else {
// return ResultUtil.data(returnList, "查询失败");
// }
// }
// 查询认证信息(当前公司)
@GetMapping
(
"/detail"
)
@ApiOperation
(
value
=
"查询最新认证信息"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
detail
(
@CurrentUser
UserBean
userBean
)
{
ResponseEntity
<
JSONObject
>
a
=
null
;
String
code
=
null
;
List
<
JSONObject
>
returnList
=
new
ArrayList
<
JSONObject
>();
List
<
QyzxEmpEntAsso
>
list
=
QyzxEmpEntAsso
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
eq
(
"emp_num"
,
userBean
.
getEmpNum
()));
List
<
Integer
>
orgCodeList
=
Lists
.
transform
(
list
,
newList
->
newList
.
getOrgCode
());
for
(
Integer
orgCode
:
orgCodeList
)
{
DzhtAssoQyrz
qyrz
=
DzhtAssoQyrz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
DzhtAssoQyrz
>()
.
eq
(
"org_code"
,
orgCode
).
select
(
"flow_id"
).
orderByDesc
(
"id"
).
last
(
"limit 1"
));
if
(
qyrz
!=
null
)
{
String
flowId
=
qyrz
.
getFlowId
();
HttpEntity
<?>
entity
=
new
HttpEntity
<>(
headers
());
a
=
restTemplate
.
exchange
(
ConfigConstant
.
host
+
"/v2/identity/auth/api/common/"
+
flowId
+
"/detail"
,
HttpMethod
.
GET
,
entity
,
JSONObject
.
class
);
code
=
a
.
getBody
().
get
(
"code"
).
toString
();
returnList
.
add
(
a
.
getBody
());
}
DzhtAssoQyrz
qyrz
=
DzhtAssoQyrz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
DzhtAssoQyrz
>()
.
eq
(
"org_code"
,
userBean
.
getOrgCode
()).
select
(
"flow_id"
).
orderByDesc
(
"id"
).
last
(
"limit 1"
));
if
(
qyrz
!=
null
)
{
String
flowId
=
qyrz
.
getFlowId
();
HttpEntity
<?>
entity
=
new
HttpEntity
<>(
headers
());
a
=
restTemplate
.
exchange
(
ConfigConstant
.
host
+
"/v2/identity/auth/api/common/"
+
flowId
+
"/detail"
,
HttpMethod
.
GET
,
entity
,
JSONObject
.
class
);
code
=
a
.
getBody
().
get
(
"code"
).
toString
();
returnList
.
add
(
a
.
getBody
());
}
if
(
code
.
equals
(
"0"
))
{
return
ResultUtil
.
data
(
returnList
);
...
...
@@ -665,7 +697,7 @@ public class DzhtController {
File
file
=
new
File
(
filePath
);
boolean
delete
=
file
.
delete
();
System
.
err
.
println
(
delete
);
return
ResultUtil
.
data
(
a
);
}
else
{
return
ResultUtil
.
data
(
a
,
"创建失败"
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
View file @
f763d687
...
...
@@ -42,6 +42,7 @@ import cn.timer.api.bean.dzht.DzhtAssoQyyz;
import
cn.timer.api.bean.dzht.DzhtAssoQyzc
;
import
cn.timer.api.bean.dzht.DzhtAssoSdgzq
;
import
cn.timer.api.bean.dzht.DzhtAssoTpyz
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.businessService.QyzxRemainingQuantity
;
import
cn.timer.api.bean.qyzx.businessService.QyzxUseRecord
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
...
...
@@ -197,6 +198,34 @@ public class DzhtController2 {
return
ResultUtil
.
data
(
j
,
"查詢成功"
);
}
// 查询企业信息s
@GetMapping
(
"/getOrganizations"
)
@ApiOperation
(
value
=
"查询企业信息s"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getOrganizations
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxEmpEntAsso
>
list
=
QyzxEmpEntAsso
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
eq
(
"emp_num"
,
userBean
.
getEmpNum
()));
List
<
Integer
>
orgCodeList
=
Lists
.
transform
(
list
,
newList
->
newList
.
getOrgCode
());
List
<
String
>
orgIds
=
new
ArrayList
<
String
>();
for
(
Integer
orgCode
:
orgCodeList
)
{
DzhtAssoQyzc
qyzc
=
DzhtAssoQyzc
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
DzhtAssoQyzc
>().
lambda
()
.
eq
(
DzhtAssoQyzc:
:
getOrgCode
,
orgCode
).
select
(
DzhtAssoQyzc:
:
getOrgId
));
if
(
qyzc
!=
null
)
orgIds
.
add
(
qyzc
.
getOrgId
());
}
JSONObject
j
=
null
;
List
<
JSONObject
>
result
=
new
ArrayList
<
JSONObject
>();
try
{
TokenHelper
.
getTokenData
();
for
(
String
orgId
:
orgIds
)
{
j
=
AccountHelper
.
qryOrgAcctByOrgId
(
orgId
);
result
.
add
(
j
);
}
}
catch
(
DefineException
e
)
{
e
.
printStackTrace
();
}
return
ResultUtil
.
data
(
result
,
"查詢成功"
);
}
// 创建机构印章
@PostMapping
(
"/orgTemplate"
)
@ApiOperation
(
value
=
"创建机构模板印章"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
...
...
This diff is collapsed.
Click to expand it.
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