|
|
|
@ -198,7 +198,6 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public void importDriverArtery(List<BasicdataDriverArteryImproterExcel> data) { |
|
|
|
|
log.info("传入参数>>>>>>>>>>>>>>>>>>>>>>>{}", data); |
|
|
|
|
outerLoop: |
|
|
|
|
for (BasicdataDriverArteryImproterExcel datum : data) { |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
@ -214,8 +213,8 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
|
|
|
|
|
if (!ObjectUtils.isEmpty(datum.getPhone())) { |
|
|
|
|
String phone = datum.getPhone(); |
|
|
|
|
BasicdataDriverArteryEntity arteryEntity = baseMapper.findEntityByPhone(phone); |
|
|
|
|
if(!Objects.isNull(arteryEntity)){ |
|
|
|
|
throw new ServiceException(phone+"手机号码已存在!"); |
|
|
|
|
if (!Objects.isNull(arteryEntity)) { |
|
|
|
|
throw new ServiceException(phone + "手机号码已存在!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
R<User> userR = userClient.userInfoByPhone("627683", datum.getPhone()); |
|
|
|
@ -257,11 +256,11 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
|
|
|
|
|
List<JSONObject> warehouseList = new ArrayList<>(); |
|
|
|
|
if (!ObjectUtils.isEmpty(datum.getWarehouseName())) { |
|
|
|
|
String warehouseNames = datum.getWarehouseName(); |
|
|
|
|
warehouseNames = warehouseNames.replaceAll(",",","); |
|
|
|
|
warehouseNames = warehouseNames.replaceAll(",", ","); |
|
|
|
|
List<String> warehouseNameList = new ArrayList<>(); |
|
|
|
|
if(warehouseNames.contains(",")){ |
|
|
|
|
if (warehouseNames.contains(",")) { |
|
|
|
|
warehouseNameList = Arrays.asList(warehouseNames.split(",")); |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
warehouseNameList.add(warehouseNames); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -272,8 +271,8 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl<BasicdataD
|
|
|
|
|
throw new ServiceException("未找到仓库!"); |
|
|
|
|
} else { |
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
jsonObject.put("warehouseId",byName.getId()); |
|
|
|
|
jsonObject.put("warehouseName",wn); |
|
|
|
|
jsonObject.put("warehouseId", byName.getId()); |
|
|
|
|
jsonObject.put("warehouseName", wn); |
|
|
|
|
warehouseList.add(jsonObject); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|