Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ai-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
ai-api
Commits
003151c3
Commit
003151c3
authored
Nov 14, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部分接口返回参数
parent
24a6f2ae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
48 deletions
+1
-48
src/main/java/com/lilosoft/api/controller/MqConsumer.java
src/main/java/com/lilosoft/api/controller/MqConsumer.java
+1
-19
src/main/java/com/lilosoft/api/service/ComplexService.java
src/main/java/com/lilosoft/api/service/ComplexService.java
+0
-10
src/main/java/com/lilosoft/complex/AbstractComplexService.java
...ain/java/com/lilosoft/complex/AbstractComplexService.java
+0
-4
src/main/java/com/lilosoft/complex/matter/service/impl/ComplexMatterServiceImpl.java
...complex/matter/service/impl/ComplexMatterServiceImpl.java
+0
-15
No files found.
src/main/java/com/lilosoft/api/controller/MqConsumer.java
View file @
003151c3
...
...
@@ -22,9 +22,6 @@ import java.util.HashMap;
@Slf4j
public
class
MqConsumer
{
@Autowired
private
ApplyService
applyService
;
@Autowired
private
ComplexService
complexService
;
...
...
@@ -36,7 +33,6 @@ public class MqConsumer {
@JmsListener
(
destination
=
"${api.mq}"
,
containerFactory
=
"jmsListenerContainerQueue"
)
public
void
receiveMsg
(
HashMap
<
String
,
String
>
text
)
{
// log.info("receive msg==>{}", JSONUtil.toJsonStr(text));
RobotCaseRecord
caseRecord
=
new
RobotCaseRecord
();
caseRecord
.
setId
(
IdUtil
.
simpleUUID
());
caseRecord
.
setContent
(
text
.
get
(
"content"
));
...
...
@@ -45,20 +41,9 @@ public class MqConsumer {
caseRecord
.
setUpdateTime
(
new
Date
());
try
{
robotApi
.
saveRecord
(
caseRecord
);
String
content
=
text
.
get
(
"content"
);
ReceiveMsgInfo
receiveMsgInfo
=
JSON
.
parseObject
(
content
,
ReceiveMsgInfo
.
class
);
// HashMap<String, Object> entries = JSONUtil.toBean(text.get("content"), HashMap.class);
// String apply = applyService.webApply(entries);
String
apply
=
complexService
.
windowApply
(
receiveMsgInfo
);
/* if (ObjectUtils.isEmpty(apply)) {
caseRecord.setSendFlag("2");
caseRecord.setMsg("success");
} else {
caseRecord.setSendFlag("1");
caseRecord.setMsg(apply);
}*/
complexService
.
windowApply
(
receiveMsgInfo
);
robotApi
.
saveRecord
(
caseRecord
);
}
catch
(
Exception
e
)
{
caseRecord
.
setSendFlag
(
"1"
);
...
...
@@ -66,8 +51,5 @@ public class MqConsumer {
robotApi
.
saveRecord
(
caseRecord
);
log
.
error
(
e
.
getMessage
());
}
}
}
src/main/java/com/lilosoft/api/service/ComplexService.java
View file @
003151c3
...
...
@@ -34,7 +34,6 @@ import java.util.Map;
@Slf4j
public
class
ComplexService
extends
PublicService
{
@Autowired
private
OcrApi
ocrApi
;
...
...
@@ -51,21 +50,17 @@ public class ComplexService extends PublicService {
* 综窗申报
*/
public
String
windowApply
(
ReceiveMsgInfo
receiveMsgInfo
)
throws
Exception
{
logger
.
info
(
JSONUtil
.
toJsonStr
(
receiveMsgInfo
));
Boolean
success
=
receiveMsgInfo
.
getSuccess
();
if
(
success
)
{
ComplexWindowAbstract
complexWindowAbstract
=
ComplexWindowAbstract
.
newType
(
receiveMsgInfo
.
getItemCode
());
CommonData
commonData
=
new
CommonData
();
commonData
.
setRobertServerUrl
(
robertServerUrl
);
commonData
.
setComplexServerUrl
(
complexServerUrl
);
commonData
.
setDeviceLogo
(
deviceCode
);
commonData
.
setFileData
(
receiveMsgInfo
.
getFileData
());
//设置申请人信息
Map
<
String
,
String
>
userData
=
receiveMsgInfo
.
getUserData
();
//申请人信息
commonData
.
setApplicantName
(
userData
.
getOrDefault
(
"applicantName"
,
""
));
//申请人性别
...
...
@@ -76,20 +71,15 @@ public class ComplexService extends PublicService {
commonData
.
setApplicantPhone
(
userData
.
getOrDefault
(
"applicantPhone"
,
""
));
//申请人证件
commonData
.
setApplicantDocumentId
(
"111"
);
//设置法人信息
commonData
.
setLegalName
(
userData
.
getOrDefault
(
"legalName"
,
""
));
//营业执照法人姓名
commonData
.
setLegalIdNumber
(
userData
.
getOrDefault
(
"legalIdNumber"
,
""
));
//法人id号
commonData
.
setLegalSex
(
userData
.
getOrDefault
(
"legalSex"
,
""
));
//法人性别
commonData
.
setLegalDocumentId
(
"111"
);
//commonData.setUserMap();
complexWindowAbstract
.
doHandleWork
(
commonData
);
}
else
{
log
.
info
(
"预审事项未通过"
);
}
String
result
=
""
;
//返回结果
boolean
check
=
true
;
//事项是否查找到,默认事项已经查找到
return
result
;
...
...
src/main/java/com/lilosoft/complex/AbstractComplexService.java
View file @
003151c3
...
...
@@ -26,10 +26,6 @@ public abstract class AbstractComplexService implements IComplexMatterService {
//综窗接件token deviceCode--对应tokenMap
public
static
Map
<
String
,
String
>
tokenMap
=
new
HashMap
<>();
//综窗接件token
public
String
token
;
@Override
public
String
getToken
(
String
deviceLogo
)
{
try
{
...
...
src/main/java/com/lilosoft/complex/matter/service/impl/ComplexMatterServiceImpl.java
View file @
003151c3
...
...
@@ -60,9 +60,7 @@ public class ComplexMatterServiceImpl extends AbstractComplexService implements
String
uploadApi
=
host
+
"common/uploadFileToFtp?conversionImage=Y"
;
HttpRequest
request
=
HttpRequest
.
post
(
uploadApi
);
String
deviceToken
=
checkToken
(
deviceLogo
);
request
.
form
(
"file"
,
bytes
,
fileName
);
String
uploadRest
=
request
.
header
(
"X-Access-Token"
,
deviceToken
).
execute
().
body
();
ComplexApiRest
<
String
>
complexApiRest
=
JSON
.
parseObject
(
uploadRest
,
new
TypeReference
<
ComplexApiRest
<
String
>>()
{
...
...
@@ -76,15 +74,12 @@ public class ComplexMatterServiceImpl extends AbstractComplexService implements
@Override
public
Rest
<
List
<
AcceptRspInfo
>>
accept
(
String
deviceLogo
,
AcceptReq
acceptReq
)
{
String
deviceLoginApi
=
host
+
"self-device-info/acceptHandling"
;
log
.
info
(
"accept req==>{}"
,
JSON
.
toJSONString
(
acceptReq
));
String
deviceToken
=
checkToken
(
deviceLogo
);
String
rest
=
HttpUtil
.
createPost
(
deviceLoginApi
)
.
header
(
"X-Access-Token"
,
deviceToken
)
.
body
(
JSON
.
toJSONString
(
acceptReq
))
.
execute
().
body
();
log
.
info
(
"accept resp==>{}"
,
rest
);
ComplexApiRest
<
List
<
AcceptRspInfo
>>
complexApiRest
=
JSON
.
parseObject
(
rest
,
new
TypeReference
<
ComplexApiRest
<
List
<
AcceptRspInfo
>>>()
{
});
...
...
@@ -98,7 +93,6 @@ public class ComplexMatterServiceImpl extends AbstractComplexService implements
@Override
public
Rest
<
MatterListInfo
>
findMatters
(
String
deviceLogo
,
ImplementationReq
implementationReq
)
{
String
mattersApi
=
host
+
"event-implementation/list"
;
Map
<
String
,
String
>
paramMap
=
new
HashMap
<>();
// 将Map中的属性值转为字符串
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
BeanUtil
.
beanToMap
(
implementationReq
,
false
,
true
).
entrySet
())
{
...
...
@@ -107,14 +101,11 @@ public class ComplexMatterServiceImpl extends AbstractComplexService implements
String
stringValue
=
String
.
valueOf
(
value
);
paramMap
.
put
(
key
,
stringValue
);
}
String
deviceToken
=
checkToken
(
deviceLogo
);
String
rest
=
HttpUtil
.
createGet
(
mattersApi
)
.
header
(
"X-Access-Token"
,
deviceToken
)
.
formStr
(
paramMap
)
.
execute
().
body
();
ComplexApiRest
<
MatterListInfo
>
complexApiRest
=
JSON
.
parseObject
(
rest
,
new
TypeReference
<
ComplexApiRest
<
MatterListInfo
>>()
{
});
if
(
complexApiRest
.
getCode
()
==
200
)
{
...
...
@@ -126,10 +117,8 @@ public class ComplexMatterServiceImpl extends AbstractComplexService implements
@Override
public
Rest
<
MatterWorkInfo
>
doWorkMatterSearch
(
String
deviceLogo
,
String
eventIds
)
{
String
mattersApi
=
host
+
"bus-situation-material/getSituationMaterialTreeByEventIds"
;
Map
<
String
,
String
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"eventIds"
,
eventIds
);
String
deviceToken
=
checkToken
(
deviceLogo
);
String
rest
=
HttpUtil
.
createGet
(
mattersApi
)
.
header
(
"X-Access-Token"
,
deviceToken
)
...
...
@@ -151,17 +140,13 @@ public class ComplexMatterServiceImpl extends AbstractComplexService implements
@Override
public
Rest
<
WorkInfo
>
getWorkMatter
(
String
deviceLogo
,
String
eventIds
)
{
String
mattersApi
=
host
+
"event-implementation/getDynamicFormByEventIds"
;
ArrayList
<
String
>
list
=
new
ArrayList
<>();
list
.
add
(
eventIds
);
String
deviceToken
=
checkToken
(
deviceLogo
);
String
rest
=
HttpUtil
.
createPost
(
mattersApi
)
.
header
(
"X-Access-Token"
,
deviceToken
)
.
body
(
JSON
.
toJSONString
(
list
))
.
execute
().
body
();
ComplexApiRest
<
WorkInfo
>
complexApiRest
=
JSON
.
parseObject
(
rest
,
new
TypeReference
<
ComplexApiRest
<
WorkInfo
>>()
{
});
if
(
complexApiRest
.
getCode
()
==
200
)
{
...
...
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