Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
windows
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanhai
windows
Commits
eebb161b
Commit
eebb161b
authored
Oct 23, 2023
by
张庆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增挡板规则
parent
039cf557
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
27 deletions
+47
-27
CreditSubmitCommand.java
...in/java/com/jqtx/windows/command/CreditSubmitCommand.java
+43
-27
IdentifyInfoModel.java
...infrastructure/feign/model/wakanda/IdentifyInfoModel.java
+4
-0
No files found.
src/main/java/com/jqtx/windows/command/CreditSubmitCommand.java
View file @
eebb161b
...
...
@@ -3,6 +3,7 @@ package com.jqtx.windows.command;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.lang.UUID
;
import
cn.hutool.core.util.IdcardUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.http.HttpRequest
;
import
cn.hutool.http.HttpResponse
;
...
...
@@ -58,25 +59,24 @@ public class CreditSubmitCommand extends AbstractCommand {
@Override
public
JsonResult
execute
()
{
String
requestBody
=
RuntimeContextHolder
.
currentRuntimeContext
().
getRequestBody
();
CreditSubmitRequest
request
=
JSON
.
parseObject
(
requestBody
,
CreditSubmitRequest
.
class
);
CreditSubmitRequest
request
=
JSON
.
parseObject
(
requestBody
,
CreditSubmitRequest
.
class
);
CreditModel
order
=
creditComponent
.
getByOrderNo
(
request
.
getOrderNo
());
if
(
ObjectUtil
.
isNotNull
(
order
))
{
if
(
ObjectUtil
.
isNotNull
(
order
))
{
return
JsonResult
.
success
();
}
CreditModel
insert
=
new
CreditModel
();
insert
.
setOrderNo
(
request
.
getOrderNo
());
this
.
convert
(
request
,
insert
);
ClientInfoModel
infoModel
=
this
.
convertCredit
(
request
,
insert
);
CreditModel
creditModel
=
new
CreditModel
();
creditModel
.
setOrderNo
(
request
.
getOrderNo
());
this
.
convert
(
request
,
creditModel
);
ClientInfoModel
infoModel
=
this
.
convertCredit
(
request
,
creditModel
);
JsonResult
result
=
iWakandaFeignService
.
clientCredit
(
infoModel
);
result
.
apiCheck
();
creditComponent
.
insert
(
insert
);
creditComponent
.
insert
(
creditModel
);
return
JsonResult
.
success
();
}
private
ClientInfoModel
convertCredit
(
CreditSubmitRequest
request
,
CreditModel
model
){
ClientInfoModel
clientInfoModel
=
new
ClientInfoModel
();
private
ClientInfoModel
convertCredit
(
CreditSubmitRequest
request
,
CreditModel
model
)
{
ClientInfoModel
clientInfoModel
=
new
ClientInfoModel
();
CreditInformationModel
infoModel
=
request
.
getCreditData
();
clientInfoModel
.
setCertNo
(
infoModel
.
getBasicInfo
().
getIdCard
());
clientInfoModel
.
setClientName
(
infoModel
.
getBasicInfo
().
getName
());
...
...
@@ -91,61 +91,77 @@ public class CreditSubmitCommand extends AbstractCommand {
return
clientInfoModel
;
}
private
CreditModel
convert
(
CreditSubmitRequest
request
,
CreditModel
model
)
{
private
CreditModel
convert
(
CreditSubmitRequest
request
,
CreditModel
model
)
{
StringBuilder
filePath
=
new
StringBuilder
();
filePath
.
append
(
"CREDIT_DATA"
).
append
(
"/"
).
append
(
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
)).
append
(
"/"
).
append
(
request
.
getOrderNo
()).
append
(
".json"
);
filePath
.
append
(
"CREDIT_DATA"
).
append
(
"/"
).
append
(
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
)).
append
(
"/"
).
append
(
request
.
getOrderNo
()).
append
(
".json"
);
model
.
setCreditDetailUrl
(
filePath
.
toString
());
CreditInformationModel
infoModel
=
request
.
getCreditData
();
IdentifyInfoModel
idModel
=
infoModel
.
getIdentifyInfo
();
BasicInfoModel
basicModel
=
infoModel
.
getBasicInfo
();
String
marry
=
basicModel
.
getMarriage
();
String
marry
=
basicModel
.
getMarriage
();
basicModel
.
setBirthday
(
IdcardUtil
.
getBirth
(
basicModel
.
getIdCard
()));
//basicModel.setSex(IdcardUtil.getGenderByIdCard(basicModel.getIdCard())==1?);
basicModel
.
setDuty
(
"9"
);
basicModel
.
setMarriage
(
"99"
);
basicModel
.
setHaveCar
(
0
);
basicModel
.
setHaveHouse
(
0
);
DeviceInfoModel
deviceInfoModel
=
infoModel
.
getDeviceInfo
();
if
(
"02"
.
equals
(
deviceInfoModel
.
getDeviceType
()))
{
if
(
"02"
.
equals
(
deviceInfoModel
.
getDeviceType
()))
{
deviceInfoModel
.
setDeviceType
(
"ios"
);
}
else
{
}
else
{
deviceInfoModel
.
setDeviceType
(
"android"
);
}
if
(
StringUtils
.
isNotBlank
(
marry
))
{
if
(
StringUtils
.
isNotBlank
(
marry
))
{
basicModel
.
setMarriage
(
ZNMarryEnum
.
getByCode
(
marry
).
getMsg
());
}
String
first
=
basicModel
.
getFirstRelation
();
String
first
=
basicModel
.
getFirstRelation
();
basicModel
.
setFirstRelation
(
"其他"
);
if
(
StringUtils
.
isNotBlank
(
first
))
{
if
(
StringUtils
.
isNotBlank
(
first
))
{
basicModel
.
setFirstRelation
(
ZNRelationEnum
.
getByCode
(
first
).
getMsg
());
}
String
second
=
basicModel
.
getSecondRelation
();
String
second
=
basicModel
.
getSecondRelation
();
basicModel
.
setSecondRelation
(
"其他"
);
if
(
StringUtils
.
isNotBlank
(
second
))
{
if
(
StringUtils
.
isNotBlank
(
second
))
{
basicModel
.
setSecondRelation
(
ZNRelationEnum
.
getByCode
(
second
).
getMsg
());
}
String
eduCode
=
basicModel
.
getEducationCode
();
String
eduCode
=
basicModel
.
getEducationCode
();
basicModel
.
setEducationCode
(
"40"
);
if
(
StringUtils
.
isNotBlank
(
eduCode
))
{
if
(
StringUtils
.
isNotBlank
(
eduCode
))
{
basicModel
.
setEducationCode
(
ZNEduEnum
.
getByCode
(
eduCode
).
getMsg
());
//basicModel.setEducation(ZNEduEnum.getByCode(eduCode).getMsg());
}
String
income
=
basicModel
.
getFamilyMonthlyIncome
();
String
income
=
basicModel
.
getFamilyMonthlyIncome
();
basicModel
.
setFamilyMonthlyIncome
(
"8000"
);
if
(
StringUtils
.
isNotBlank
(
income
))
{
if
(
StringUtils
.
isNotBlank
(
income
))
{
basicModel
.
setFamilyMonthlyIncome
(
ZNInComeEnum
.
getByCode
(
income
).
getMsg
());
}
StringBuilder
frontUrl
=
new
StringBuilder
();
frontUrl
.
append
(
"USERCREDIT"
).
append
(
"/"
).
append
(
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
)).
append
(
"/front_"
).
append
(
request
.
getOrderNo
()).
append
(
".jpg"
);
frontUrl
.
append
(
"USERCREDIT"
).
append
(
"/"
).
append
(
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
)).
append
(
"/front_"
).
append
(
request
.
getOrderNo
()).
append
(
".jpg"
);
HttpResponse
frontResponse
=
HttpRequest
.
get
(
idModel
.
getFrontFile
()).
setConnectionTimeout
(
5000
).
execute
();
ossUtils
.
ossUpload
(
frontUrl
.
toString
(),
frontResponse
.
bodyStream
());
idModel
.
setFrontFile
(
ossProperties
.
getPrivateDomain
()
+
frontUrl
);
StringBuilder
backUrl
=
new
StringBuilder
();
backUrl
.
append
(
"USERCREDIT"
).
append
(
"/"
).
append
(
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
)).
append
(
"/back_"
).
append
(
request
.
getOrderNo
()).
append
(
".jpg"
);
backUrl
.
append
(
"USERCREDIT"
).
append
(
"/"
).
append
(
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
)).
append
(
"/back_"
).
append
(
request
.
getOrderNo
()).
append
(
".jpg"
);
HttpResponse
backResponse
=
HttpRequest
.
get
(
idModel
.
getBackFile
()).
setConnectionTimeout
(
5000
).
execute
();
ossUtils
.
ossUpload
(
backUrl
.
toString
(),
backResponse
.
bodyStream
());
idModel
.
setBackFile
(
ossProperties
.
getPrivateDomain
()
+
backUrl
);
StringBuilder
bestUrl
=
new
StringBuilder
();
bestUrl
.
append
(
"USERCREDIT"
).
append
(
"/"
).
append
(
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
)).
append
(
"/nature_"
).
append
(
request
.
getOrderNo
()).
append
(
".jpg"
);
bestUrl
.
append
(
"USERCREDIT"
).
append
(
"/"
).
append
(
DateUtil
.
format
(
new
Date
(),
"yyyyMMdd"
)).
append
(
"/nature_"
).
append
(
request
.
getOrderNo
()).
append
(
".jpg"
);
HttpResponse
natureResponse
=
HttpRequest
.
get
(
idModel
.
getNatureFile
()).
setConnectionTimeout
(
5000
).
execute
();
ossUtils
.
ossUpload
(
bestUrl
.
toString
(),
natureResponse
.
bodyStream
());
idModel
.
setNatureFile
(
ossProperties
.
getPrivateDomain
()
+
bestUrl
);
String
startDate
=
DateUtil
.
format
(
DateUtil
.
parseDate
(
infoModel
.
getIdentifyInfo
().
getStartDate
()),
"yyyy.MM.dd"
);
String
endDate
=
""
;
if
(
"长期"
.
equals
(
infoModel
.
getIdentifyInfo
().
getEndDate
()))
{
endDate
=
"长期"
;
}
else
{
endDate
=
DateUtil
.
format
(
DateUtil
.
parseDate
(
infoModel
.
getIdentifyInfo
().
getEndDate
()),
"yyyy.MM.dd"
);
}
idModel
.
setValidDate
(
startDate
+
"-"
+
endDate
);
infoModel
.
setDeviceInfo
(
deviceInfoModel
);
infoModel
.
setIdentifyInfo
(
idModel
);
...
...
src/main/java/com/jqtx/windows/infrastructure/feign/model/wakanda/IdentifyInfoModel.java
View file @
eebb161b
...
...
@@ -28,4 +28,8 @@ public class IdentifyInfoModel {
private
String
panoramaImgPath
;
private
String
randomImgPath
;
private
String
startDate
;
private
String
endDate
;
}
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