To run the example project, clone the repo, and run pod install
from the Example directory first.
MJAiSearchSDK is available through CocoaPods. To install it, simply add the following line to your Podfile:
platform:ios, '9.0' # 仅支持iOS9.0及以上设备
use_frameworks!
target 'TargetName' do
pod 'MJAiSearchSDK'
end
如果搜索不到,请运行pod repo update --verbose
更新cocoapods仓库。
- 提供语义查询配件服务
- 提供定损服务
本SDK开发旨在提供方便快捷地获取汽车配件信息,通过VIN码或汽车品牌配置信息进行车辆定型后即可使用圈选或者配件名、OE等形式获取配件信息。
本SDK使用时需要获取license。商务合作请联系明觉科技,SDK仅提供合作客户使用,违用必究!
- MJVinParseLib.framework -- VIN定型服务模块,提供VIN定型相关功能,原则上推荐所有用户选用。
- MJAreaSearchPartLib.framework -- 圈选小汽车得到相应区域配件信息,推荐所有用户使用。
- MJSearchPartLib.framework -- 配件搜索服务模块,提供配件名、配件OE搜索配件,推荐所有用户使用。 4. MJSearchEPCPartLib.framework -- EPC图选服务模块,提供查询周围配件功能。
- MJDataLib.framework -- 基础通讯模块,原则上必须接入。
- 使用cocoapods集成SDK
- 初始化SDK。userinfo格式请参考Demo工程。
[[MJDamageAssessmentManager sharedInstance] configureWithUserInfo:userInfo complete:^(BOOL success) {}];
- 愉快使用SDK其他功能。
+ (void)vinParseWithVinCode:(nonnull NSString *)vinCode completion:(_Nullable ServiceResponseBlock)completion;
+ (void)checkVINTop3:(nonnull NSString*)vintop3 completion:(_Nullable
ServiceResponseBlock)completion;
+ (void)getMyAuthBrandsCompletion:(_Nullable ServiceResponseBlock)completion;
+ (void)getPlanBBrandsWithBrand:(nonnull NSString*)brand completion:(_Nullable ServiceResponseBlock)completion;
@param brand 车辆品牌 -从+ (void)getPlanBBrandsWithBrand:(nonnull NSString*)brand completion:(_Nullable ServiceResponseBlock)completion;接口中获取到的数据
@param maker 制造商 -从+ (void)getPlanBBrandsWithBrand:(nonnull NSString*)brand completion:(_Nullable ServiceResponseBlock)completion;接口中获取到的数据
@param vehicleChn 车型 -从+ (void)getPlanBBrandsWithBrand:(nonnull NSString*)brand completion:(_Nullable ServiceResponseBlock)completion;接口中获取到的数据
@param body 车体 -从+ (void)getPlanBBrandsWithBrand:(nonnull NSString*)brand completion:(_Nullable ServiceResponseBlock)completion;接口中获取到的数据
@param completion 返回数据
*/
+ (void)getPlanBBrandDetailWithBrand:(nonnull NSString*)brand maker:(nonnull NSString*)maker vehicleChn:(nonnull NSString*)vehicleChn body:(nonnull NSString*)body completion:(ServiceResponseBlock)completion;
+ (void)ocrServiceWithImage:(nonnull UIImage*)image completion:(_Nullable ServiceResponseBlock)completion;
MJDrawCircleSearchPartController* draw = [[MJDrawCircleSearchPartController alloc]init];
draw.delegate = self;
[self addChildViewController:draw]; [self.view addSubview:draw.view];
[draw didMoveToParentViewController:self];
上面方法将MJDrawCircleSearchPartController中的view添加到您自己的viewcontroller中,方便使用,在添加代理之后,圈选得到的配件会在代理方法中返回,代理方法如下:
- (void)canvasCircleSelectedPartsCompletion:(NSArray<MJPart *> *)parts;
当然,我们在请求开始以及结束的时候也提供了代理方法:
/**
圈选之后开始请求
*/
- (void)canvasCircleRequestStart;
/**
圈选请求结束
*/
- (void)canvasCircleRequestEnd;
+ (void)firstLetterRecommendWithText:(nonnull NSString*)text completion:(_Nullable ServiceResponseBlock)completion;
该接口提供语义定损服务,返回数据不仅包含配件数据,也将包含用户输入的语义工项 返回的数据是MJPart的对象
+ (void)searchPartWithKey:(nonnull NSString*)key query:(MJSearchQurey)query completion:(_Nullable ServiceResponseBlock)completion;
[MJSearchPartService searchPartWithKey:@"换前保险杠皮拆左前大灯壳右前大灯维修前盖更换发动机" query:(MJSearchQureyManuel) completion:^(id _Nullable response, BOOL success, NSError * _Nullable error) {
}];
该方法提供二次推荐:上拉加载更多配件
+ (void)researchPartCompletion:(_Nullable ServiceResponseBlock)completion;
该方法提供二次推荐:上拉加载更多配件
+ (void)researchPartWithSelectedParts:( NSArray<MJPart *> * _Nullable )parts Completion:(_Nullable ServiceResponseBlock)completion;
+ (void)requestImageWithImageName:(nonnull NSString *)imageName
completion:(_Nullable ServiceResponseBlock)completion;
+ (void)requestImageWithPart:(nonnull MJPart*)part completion:(_Nullable ServiceResponseBlock)completion;
+ (void)requestImageWithImageName:(nonnull NSString *)imageName imagepath:(nonnull NSString *)imagepath
completion:(_Nullable ServiceResponseBlock)completion;
+ (void)requestEpcImageWithPart:(nonnull MJPart*)part
completion:(_Nullable ServiceResponseBlock)completion;
+ (void)searchRelatedPartsWithImageName:(nonnull NSString *)imageName imagepath: (nonnull NSString *)imagePath oeNumber:(nonnull NSString *)oeNumber completion: (_Nullable ServiceResponseBlock)completion;
+ (void)searchRelatedPartsWithPart:(nonnull MJPart *)part
completion:(_Nullable ServiceResponseBlock)completion;
+ (void)assessmentWithParts:(nonnull NSArray *)parts completion: (_Nullable ServiceResponseBlock)completion;
注意事项: 传入的MJPart需要设定工项为YES:
字段 | 描述 |
---|---|
replaceStatus | 更换状态,是否更换 |
paintStatus | 喷漆状态,是否喷漆 |
fitStatus | 拆卸状态,是否拆卸 |
panelStatus | 维修状态,是否维修,注意维修状态需要同时设置damageDegree,可选值为:轻度、中度、重度 ,默认中度 |
auxiliaryStatus | 维修状态,是否辅料 |
outRepairStatus | 维修状态,是否外修 |
electroMechanicalStatus | 维修状态,是否机电 |
accessoryStatus | 拆装附件状态,是否拆装附件 |
其中estimateChooseList为已选配件的工时工项信息,estimateOtherList为推荐的工项工时信息,字典详细解释如下
key | 解释 |
---|---|
chooseList | 已选工项 |
deleteList | 推荐剔除工项 |
partId | 配件ID |
partName | 配件名称 |
recommendList | 推荐选择工项 |
labor | 工时金额 |
option | 工项 |
ErrorCode | ErrorDesc |
---|---|
9001 | 警告!非法请求! |
50001 | 请先进行VIN定型 |
50002 | VIN码错误 |
50003 | 请填入正确的搜索渠道 |
50004 | OE号错误 |
50005 | 图片名错误 |
50006 | 请至少先进行圈选或者搜索 |
50009 | 请求出错 |
50010 | 没有配件 |
90001 | 传入非法的MJPart |
袁兴杨, [email protected]