|
@@ -89,6 +89,12 @@ public class AppDeviceServiceImp extends JpaServiceImp<AppDevice, String> implem
|
|
|
if (!org.apache.commons.lang3.StringUtils.isNotBlank(device.getPackModel())){
|
|
|
throw new ApiRuntimeException("包型号缺失");
|
|
|
}
|
|
|
+ if (!device.getImei().substring(1, 3).equals(device.getPackModel().substring(0, 2))) {
|
|
|
+ throw new ApiRuntimeException("包型号与imei对应关系错误");
|
|
|
+ }
|
|
|
+ if (!device.getImei().substring(3, 6).equals(device.getCellModel().substring(0, 3))) {
|
|
|
+ throw new ApiRuntimeException("单体型号与imei对应关系错误");
|
|
|
+ }
|
|
|
PackModel packModel = packModelService.getOne(Arrays.asList(QueryParamExp.eq("cellModel", device.getCellModel()),
|
|
|
QueryParamExp.eq("packModel", device.getPackModel())));
|
|
|
if (packModel==null){
|