Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e35dcfd1
authored
Aug 17, 2026
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v5.8.5' of
http://192.168.3.233:8090/usedCarAuction/aus
into v5.8.5
2 parents
c707d696
26b8c72e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
34 deletions
aus-core/src/main/java/com/glsx/usedcar/converts/PlatformContractConverter.java
aus-core/src/main/java/com/glsx/usedcar/module/vehicle/entity/TransferMaterials.java
aus-core/src/main/java/com/glsx/usedcar/module/vehicle/service/VehicleService.java
aus-core/src/main/java/com/glsx/usedcar/converts/PlatformContractConverter.java
View file @
e35dcfd
...
@@ -58,7 +58,7 @@ public interface PlatformContractConverter {
...
@@ -58,7 +58,7 @@ public interface PlatformContractConverter {
}
}
return
switch
(
status
)
{
return
switch
(
status
)
{
case
PENDING
->
"待签署"
;
case
PENDING
->
"待签署"
;
case
SIGNING
->
"
签署中
"
;
case
SIGNING
->
"
未签署
"
;
case
SIGNED
->
"已签署"
;
case
SIGNED
->
"已签署"
;
case
EXPIRED
->
"已过期"
;
case
EXPIRED
->
"已过期"
;
case
CANCELLED
->
"已作废"
;
case
CANCELLED
->
"已作废"
;
...
...
aus-core/src/main/java/com/glsx/usedcar/module/vehicle/entity/TransferMaterials.java
View file @
e35dcfd
...
@@ -21,6 +21,22 @@ import java.io.Serializable;
...
@@ -21,6 +21,22 @@ import java.io.Serializable;
* <li>布尔类型使用 TINYINT(1) UNSIGNED,表示"是/否"概念</li>
* <li>布尔类型使用 TINYINT(1) UNSIGNED,表示"是/否"概念</li>
* </ul>
* </ul>
* </p>
* </p>
* <p>
* JSON 字段映射(收车端 electronicContractField):
* <ul>
* <li>motorBook → registrationCertificate(机动车登记本)</li>
* <li>motorRegistrationCertificate → vehicleLicense(机动车行驶证)</li>
* <li>purchaseReceipt → purchaseTaxReceipt(购置税完税收据)</li>
* <li>purchaseInvoice → purchaseInvoice(购车发票)</li>
* <li>trafficScreenshot → trafficAppScreenshot(交管12123截图)</li>
* <li>carKeyCount → carKeyCount(车钥匙数量)</li>
* <li>trafficInsurance → compulsoryInsurance(交强险)</li>
* <li>insuranceCard → commercialInsurance(保险单商业保险卡)</li>
* <li>transferPhoto → transferAuthorizationPhoto(过户授权委托书照片)</li>
* <li>other → otherMaterials(其他)</li>
* <li>otherText → otherMaterialsNote(其他文字说明)</li>
* </ul>
* </p>
*/
*/
@Embeddable
@Embeddable
@Getter
@Getter
...
@@ -32,6 +48,7 @@ public class TransferMaterials implements Serializable {
...
@@ -32,6 +48,7 @@ public class TransferMaterials implements Serializable {
/**
/**
* 机动车登记本(大绿本)
* 机动车登记本(大绿本)
* JSON字段: motorBook
* 1-有, 0-无
* 1-有, 0-无
*/
*/
@Column
(
name
=
"has_registration_certificate"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
@Column
(
name
=
"has_registration_certificate"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
...
@@ -39,6 +56,7 @@ public class TransferMaterials implements Serializable {
...
@@ -39,6 +56,7 @@ public class TransferMaterials implements Serializable {
/**
/**
* 机动车行驶证
* 机动车行驶证
* JSON字段: motorRegistrationCertificate
* 1-有, 0-无
* 1-有, 0-无
*/
*/
@Column
(
name
=
"has_vehicle_license"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
@Column
(
name
=
"has_vehicle_license"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
...
@@ -46,6 +64,7 @@ public class TransferMaterials implements Serializable {
...
@@ -46,6 +64,7 @@ public class TransferMaterials implements Serializable {
/**
/**
* 交管12123截图
* 交管12123截图
* JSON字段: trafficScreenshot
* 1-有, 0-无
* 1-有, 0-无
*/
*/
@Column
(
name
=
"has_traffic_app_screenshot"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
@Column
(
name
=
"has_traffic_app_screenshot"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
...
@@ -53,12 +72,14 @@ public class TransferMaterials implements Serializable {
...
@@ -53,12 +72,14 @@ public class TransferMaterials implements Serializable {
/**
/**
* 车钥匙套数
* 车钥匙套数
* JSON字段: carKeyCount
*/
*/
@Column
(
name
=
"car_key_count"
,
nullable
=
false
,
columnDefinition
=
"TINYINT UNSIGNED DEFAULT 0"
)
@Column
(
name
=
"car_key_count"
,
nullable
=
false
,
columnDefinition
=
"TINYINT UNSIGNED DEFAULT 0"
)
private
int
carKeyCount
=
0
;
private
int
carKeyCount
=
0
;
/**
/**
* 交强险
* 交强险
* JSON字段: trafficInsurance
* 1-有, 0-无
* 1-有, 0-无
*/
*/
@Column
(
name
=
"has_compulsory_insurance"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
@Column
(
name
=
"has_compulsory_insurance"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
...
@@ -66,6 +87,7 @@ public class TransferMaterials implements Serializable {
...
@@ -66,6 +87,7 @@ public class TransferMaterials implements Serializable {
/**
/**
* 过户授权委托书照片
* 过户授权委托书照片
* JSON字段: transferPhoto
* 1-有, 0-无
* 1-有, 0-无
*/
*/
@Column
(
name
=
"has_transfer_authorization_photo"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
@Column
(
name
=
"has_transfer_authorization_photo"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
...
@@ -73,6 +95,7 @@ public class TransferMaterials implements Serializable {
...
@@ -73,6 +95,7 @@ public class TransferMaterials implements Serializable {
/**
/**
* 购置税证及收据
* 购置税证及收据
* JSON字段: purchaseReceipt
* 1-有, 0-无
* 1-有, 0-无
*/
*/
@Column
(
name
=
"has_purchase_tax_receipt"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
@Column
(
name
=
"has_purchase_tax_receipt"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
...
@@ -80,6 +103,7 @@ public class TransferMaterials implements Serializable {
...
@@ -80,6 +103,7 @@ public class TransferMaterials implements Serializable {
/**
/**
* 购车发票
* 购车发票
* JSON字段: purchaseInvoice
* 1-有, 0-无
* 1-有, 0-无
*/
*/
@Column
(
name
=
"has_purchase_invoice"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
@Column
(
name
=
"has_purchase_invoice"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
...
@@ -87,6 +111,7 @@ public class TransferMaterials implements Serializable {
...
@@ -87,6 +111,7 @@ public class TransferMaterials implements Serializable {
/**
/**
* 商业保险单或卡
* 商业保险单或卡
* JSON字段: insuranceCard
* 1-有, 0-无
* 1-有, 0-无
*/
*/
@Column
(
name
=
"has_commercial_insurance"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
@Column
(
name
=
"has_commercial_insurance"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
...
@@ -94,6 +119,7 @@ public class TransferMaterials implements Serializable {
...
@@ -94,6 +119,7 @@ public class TransferMaterials implements Serializable {
/**
/**
* 其他资料
* 其他资料
* JSON字段: other
* 1-有, 0-无
* 1-有, 0-无
*/
*/
@Column
(
name
=
"has_other_materials"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
@Column
(
name
=
"has_other_materials"
,
nullable
=
false
,
columnDefinition
=
"TINYINT(1) UNSIGNED DEFAULT 0"
)
...
@@ -101,8 +127,9 @@ public class TransferMaterials implements Serializable {
...
@@ -101,8 +127,9 @@ public class TransferMaterials implements Serializable {
/**
/**
* 其他资料说明
* 其他资料说明
* JSON字段: otherText
*/
*/
@Column
(
name
=
"other_materials_note"
,
length
=
500
)
@Column
(
name
=
"other_materials_note"
)
private
String
otherMaterialsNote
;
private
String
otherMaterialsNote
;
}
}
aus-core/src/main/java/com/glsx/usedcar/module/vehicle/service/VehicleService.java
View file @
e35dcfd
...
@@ -371,19 +371,24 @@ public class VehicleService {
...
@@ -371,19 +371,24 @@ public class VehicleService {
* <p>
* <p>
* 收车端传递的 electronicContractField JSON 格式示例:
* 收车端传递的 electronicContractField JSON 格式示例:
* {
* {
* "registrationCertificate": true,
* "motorBook": "1",
* "vehicleLicense": true,
* "motorRegistrationCertificate": "1",
* "trafficAppScreenshot": false,
* "idCardFrontBack": "1",
* "purchaseReceipt": "0",
* "purchaseInvoice": "0",
* "trafficScreenshot": "0",
* "carKey": "0",
* "carKeyCount": 2,
* "carKeyCount": 2,
* "compulsoryInsurance": true,
* "trafficInsurance": "0",
* "transferAuthorizationPhoto": true,
* "insuranceCard": "0",
* "purchaseTaxReceipt": false,
* "transferPhoto": "0",
* "purchaseInvoice": true,
* "other": "0",
* "commercialInsurance": false,
* "otherText": ""
* "otherMaterials": false,
* "otherMaterialsNote": "备注说明"
* }
* }
* </p>
* </p>
* <p>
* 字段值说明:勾选为 "1",未勾选为 "0"(字符串类型)
* </p>
*
*
* @param electronicContractField JSON 字符串
* @param electronicContractField JSON 字符串
* @return TransferMaterials 对象
* @return TransferMaterials 对象
...
@@ -398,38 +403,49 @@ public class VehicleService {
...
@@ -398,38 +403,49 @@ public class VehicleService {
try
{
try
{
JSONObject
json
=
JSONUtil
.
parseObj
(
electronicContractField
);
JSONObject
json
=
JSONUtil
.
parseObj
(
electronicContractField
);
if
(
json
.
containsKey
(
"registrationCertificate"
))
{
// 机动车登记本 motorBook → registrationCertificate
transferMaterials
.
setRegistrationCertificate
(
json
.
getBool
(
"registrationCertificate"
,
false
));
if
(
json
.
containsKey
(
"motorBook"
))
{
transferMaterials
.
setRegistrationCertificate
(
parseBoolString
(
json
.
getStr
(
"motorBook"
)));
}
}
if
(
json
.
containsKey
(
"vehicleLicense"
))
{
// 机动车行驶证 motorRegistrationCertificate → vehicleLicense
transferMaterials
.
setVehicleLicense
(
json
.
getBool
(
"vehicleLicense"
,
false
));
if
(
json
.
containsKey
(
"motorRegistrationCertificate"
))
{
transferMaterials
.
setVehicleLicense
(
parseBoolString
(
json
.
getStr
(
"motorRegistrationCertificate"
)));
}
}
if
(
json
.
containsKey
(
"trafficAppScreenshot"
))
{
// 购置税完税收据 purchaseReceipt → purchaseTaxReceipt
transferMaterials
.
setTrafficAppScreenshot
(
json
.
getBool
(
"trafficAppScreenshot"
,
false
));
if
(
json
.
containsKey
(
"purchaseReceipt"
))
{
transferMaterials
.
setPurchaseTaxReceipt
(
parseBoolString
(
json
.
getStr
(
"purchaseReceipt"
)));
}
// 购车发票 purchaseInvoice
if
(
json
.
containsKey
(
"purchaseInvoice"
))
{
transferMaterials
.
setPurchaseInvoice
(
parseBoolString
(
json
.
getStr
(
"purchaseInvoice"
)));
}
}
// 交管12123截图 trafficScreenshot → trafficAppScreenshot
if
(
json
.
containsKey
(
"trafficScreenshot"
))
{
transferMaterials
.
setTrafficAppScreenshot
(
parseBoolString
(
json
.
getStr
(
"trafficScreenshot"
)));
}
// 车钥匙数量 carKeyCount
if
(
json
.
containsKey
(
"carKeyCount"
))
{
if
(
json
.
containsKey
(
"carKeyCount"
))
{
transferMaterials
.
setCarKeyCount
(
json
.
getInt
(
"carKeyCount"
,
0
));
transferMaterials
.
setCarKeyCount
(
json
.
getInt
(
"carKeyCount"
,
0
));
}
}
if
(
json
.
containsKey
(
"compulsoryInsurance"
))
{
// 交强险 trafficInsurance → compulsoryInsurance
transferMaterials
.
setCompulsoryInsurance
(
json
.
getBool
(
"compulsoryInsurance"
,
false
));
if
(
json
.
containsKey
(
"trafficInsurance"
))
{
}
transferMaterials
.
setCompulsoryInsurance
(
parseBoolString
(
json
.
getStr
(
"trafficInsurance"
)));
if
(
json
.
containsKey
(
"transferAuthorizationPhoto"
))
{
transferMaterials
.
setTransferAuthorizationPhoto
(
json
.
getBool
(
"transferAuthorizationPhoto"
,
false
));
}
}
if
(
json
.
containsKey
(
"purchaseTaxReceipt"
))
{
// 保险单商业保险卡 insuranceCard → commercialInsurance
transferMaterials
.
setPurchaseTaxReceipt
(
json
.
getBool
(
"purchaseTaxReceipt"
,
false
));
if
(
json
.
containsKey
(
"insuranceCard"
))
{
transferMaterials
.
setCommercialInsurance
(
parseBoolString
(
json
.
getStr
(
"insuranceCard"
)));
}
}
if
(
json
.
containsKey
(
"purchaseInvoice"
))
{
// 过户授权委托书照片 transferPhoto → transferAuthorizationPhoto
transferMaterials
.
setPurchaseInvoice
(
json
.
getBool
(
"purchaseInvoice"
,
false
));
if
(
json
.
containsKey
(
"transferPhoto"
))
{
transferMaterials
.
setTransferAuthorizationPhoto
(
parseBoolString
(
json
.
getStr
(
"transferPhoto"
)));
}
}
if
(
json
.
containsKey
(
"commercialInsurance"
))
{
// 其他 other → otherMaterials
transferMaterials
.
setCommercialInsurance
(
json
.
getBool
(
"commercialInsurance"
,
false
));
if
(
json
.
containsKey
(
"other"
))
{
transferMaterials
.
setOtherMaterials
(
parseBoolString
(
json
.
getStr
(
"other"
)));
}
}
if
(
json
.
containsKey
(
"otherMaterials"
))
{
// 其他文字 otherText → otherMaterialsNote
transferMaterials
.
setOtherMaterials
(
json
.
getBool
(
"otherMaterials"
,
false
));
if
(
json
.
containsKey
(
"otherText"
))
{
}
transferMaterials
.
setOtherMaterialsNote
(
json
.
getStr
(
"otherText"
));
if
(
json
.
containsKey
(
"otherMaterialsNote"
))
{
transferMaterials
.
setOtherMaterialsNote
(
json
.
getStr
(
"otherMaterialsNote"
));
}
}
log
.
info
(
"解析 electronicContractField 成功: {}"
,
electronicContractField
);
log
.
info
(
"解析 electronicContractField 成功: {}"
,
electronicContractField
);
...
@@ -441,6 +457,16 @@ public class VehicleService {
...
@@ -441,6 +457,16 @@ public class VehicleService {
}
}
/**
/**
* 解析 "0"/"1" 字符串为布尔值
*
* @param value "0" 或 "1" 字符串
* @return "1" 返回 true,其他情况返回 false
*/
private
boolean
parseBoolString
(
String
value
)
{
return
"1"
.
equals
(
value
);
}
/**
* 更新车辆过户资料信息(从收车端同步)
* 更新车辆过户资料信息(从收车端同步)
*
*
* @param vehicleId 车辆ID
* @param vehicleId 车辆ID
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment