Commit 4998a2b4 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://39.100.92.250:5000/moa/amos-boot-biz into develop_tzs_register
parents 134a0ff9 1496e4ea
......@@ -2961,12 +2961,12 @@ public class CommonServiceImpl implements ICommonService {
log.error("日期转换失败:", e);
}
ResponseModel<String> responseModel = null;
if (isValidCreditCode(receiveCompanyCode)) {
if (StringUtils.isNotBlank(receiveCompanyCode) && isValidCreditCode(receiveCompanyCode)) {
String equCode = Optional.ofNullable(equType.get("equDefineCode")).orElse(equType.get("equCategoryCode"));
String registrationCode = equCode + receiveCompanyCode + ym;
responseModel = tzsServiceFeignClient.deviceRegistrationCode(registrationCode);
}
return responseModel.getResult();
return Optional.ofNullable(responseModel).map(ResponseModel::getResult).orElse("");
}
// 校验信用代码是否符合要求
......
......@@ -951,7 +951,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (dataSource.contains("his")) {
String VIN = (String) equipmentInfoForm.get("identificationCode");
String useRegistrationCode = (String) equipmentInfoForm.get("useRegistrationCode");
if (!ValidationUtil.isEmpty(VIN) || !ValidationUtil.isEmpty(useRegistrationCode)) {
if (!ValidationUtil.isEmpty(VIN) && !ValidationUtil.isEmpty(useRegistrationCode)) {
ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
String companyType = reginParams.getCompany().getCompanyType();
String companyCode = "个人主体".equals(companyType) ? reginParams.getCompany().getCompanyCode().split("_")[1] : reginParams.getCompany().getCompanyCode();
......@@ -4504,7 +4504,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
checkNotBlank(data.getInspectStaff(), "检测人员名称不能为空;", result);
checkNotBlank(data.getInspectDate(), "检测日期不能为空;", result);
checkNotBlank(data.getInspectReportNo(), "检验报告编号不能为空;", result);
checkDateFormatCorrect(data.getInspectDate(), "检测日期格式不正确;", result);
Optional.ofNullable(data.getInspectDate()).ifPresent(v -> checkDateFormatCorrect(v, "检测日期格式不正确;", result));
checkNotBlank(data.getSingleBottleVolume(), "单瓶容积不能为空;", result);
checkNotBlank(data.getChargingMedium(), "充装介质不能为空;", result);
checkNotBlank(data.getNominalWorkingPressure(), "公称工作压力不能为空;", result);
......
......@@ -249,11 +249,11 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
.collect(Collectors.toList())
);
if (inspectionDetectionInfoList.stream().anyMatch(info ->
ObjectUtils.isEmpty(info) || ObjectUtils.isEmpty(info.getInspectType()) ||
ObjectUtils.isEmpty(info.getInspectConclusion()) || ObjectUtils.isEmpty(info.getInspectOrgCode()))) {
throw new BadRequest("请补充设备检验检测信息后提交!");
}
// if (inspectionDetectionInfoList.stream().anyMatch(info ->
// ObjectUtils.isEmpty(info) || ObjectUtils.isEmpty(info.getInspectType()) ||
// ObjectUtils.isEmpty(info.getInspectConclusion()) || ObjectUtils.isEmpty(info.getInspectOrgCode()))) {
// throw new BadRequest("请补充设备检验检测信息后提交!");
// }
vehicleInfoDto.setNextInspectionDate(inspectionDetectionInfoList.stream()
.map(IdxBizJgInspectionDetectionInfo::getNextInspectDate)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment