Commit 440f3c02 authored by 韩桐桐's avatar 韩桐桐

fix(jg):车用气瓶个人的流程限制

parent bece4637
...@@ -185,6 +185,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -185,6 +185,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
public List<JgVehicleInformation> save(String submit, JSONObject map) { public List<JgVehicleInformation> save(String submit, JSONObject map) {
try { try {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())) + "", ReginParams.class); ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())) + "", ReginParams.class);
CompanyBo company = reginParams.getCompany();
JgVehicleInformationDto vehicleInfoDto = JSON.parseObject(JSON.toJSONString(map), JgVehicleInformationDto.class); JgVehicleInformationDto vehicleInfoDto = JSON.parseObject(JSON.toJSONString(map), JgVehicleInformationDto.class);
List<Map<String, Object>> equipmentLists = (List<Map<String, Object>>) map.get("equipmentLists"); List<Map<String, Object>> equipmentLists = (List<Map<String, Object>>) map.get("equipmentLists");
...@@ -193,7 +195,9 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -193,7 +195,9 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
throw new BadRequest(CollectionUtils.isEmpty(equipmentLists) ? "请选择设备信息!" : "请选择相同充装介质设备!"); throw new BadRequest(CollectionUtils.isEmpty(equipmentLists) ? "请选择设备信息!" : "请选择相同充装介质设备!");
} }
if (SUBMIT_TYPE_FLOW.equals(submit)) { if (SUBMIT_TYPE_FLOW.equals(submit)) {
this.repeatUsedEquipCheck(equipmentLists, reginParams.getCompany().getCompanyCode()); // 个人主体的身份证(6600_620422199903010258) 特殊处理 只取_后的身份证号码
this.repeatUsedEquipCheck(equipmentLists,
CompanyTypeEnum.INDIVIDUAL.getName().equals(company.getCompanyType()) ? company.getCompanyCode().split("_")[1] : company.getCompanyCode());
} }
List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList = idxBizJgInspectionDetectionInfoService.checkInspectionInfo( List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList = idxBizJgInspectionDetectionInfoService.checkInspectionInfo(
equipmentLists.stream() equipmentLists.stream()
...@@ -213,7 +217,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -213,7 +217,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
.min(Date::compareTo) .min(Date::compareTo)
.orElse(null)); .orElse(null));
CompanyBo company = reginParams.getCompany();
vehicleInfoDto.setCreateDate(new Date()); vehicleInfoDto.setCreateDate(new Date());
vehicleInfoDto.setPromoter(reginParams.getUserModel().getUserId()); vehicleInfoDto.setPromoter(reginParams.getUserModel().getUserId());
......
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