Commit 482461bb authored by hcing's avatar hcing

台套认领bugfix-手动迁移到bugfix分支

parent 6a28c37e
...@@ -2312,7 +2312,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -2312,7 +2312,7 @@ public class CommonServiceImpl implements ICommonService {
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*000$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*000$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break; break;
case "2": case "2":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*00$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\0]*00$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break; break;
case "3": case "3":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0A-Za-z]*[A-Za-z0-9]*[^0]0$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0A-Za-z]*[A-Za-z0-9]*[^0]0$").matcher(category.getCode()).matches()).collect(Collectors.toList());
...@@ -2342,7 +2342,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -2342,7 +2342,7 @@ public class CommonServiceImpl implements ICommonService {
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*000$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*000$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break; break;
case "2": case "2":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*00$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\0]*00$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break; break;
case "3": case "3":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0A-Za-z]*[A-Za-z0-9]*[^0]0$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0A-Za-z]*[A-Za-z0-9]*[^0]0$").matcher(category.getCode()).matches()).collect(Collectors.toList());
...@@ -2360,7 +2360,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -2360,7 +2360,7 @@ public class CommonServiceImpl implements ICommonService {
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*000$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*000$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break; break;
case "2": case "2":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*00$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\0]*00$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break; break;
case "3": case "3":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0A-Za-z]*[A-Za-z0-9]*[^0]0$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0A-Za-z]*[A-Za-z0-9]*[^0]0$").matcher(category.getCode()).matches()).collect(Collectors.toList());
...@@ -2378,7 +2378,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -2378,7 +2378,7 @@ public class CommonServiceImpl implements ICommonService {
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*000$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*000$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break; break;
case "2": case "2":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*00$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\0]*00$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break; break;
case "3": case "3":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0A-Za-z]*[A-Za-z0-9]*[^0]0$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0A-Za-z]*[A-Za-z0-9]*[^0]0$").matcher(category.getCode()).matches()).collect(Collectors.toList());
......
...@@ -24,6 +24,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgResumeInfoDto; ...@@ -24,6 +24,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgResumeInfoDto;
import com.yeejoin.amos.boot.module.jg.api.entity.*; import com.yeejoin.amos.boot.module.jg.api.entity.*;
import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum; import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum; import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.UseRegisterCancelEquipEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient; import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
...@@ -332,6 +333,9 @@ public class EquipClaimServiceImpl { ...@@ -332,6 +333,9 @@ public class EquipClaimServiceImpl {
JSONObject equipParams = JSON.parseObject(toJSONString(json.get(EQUIP_PARAMS_FORM_ID))); JSONObject equipParams = JSON.parseObject(toJSONString(json.get(EQUIP_PARAMS_FORM_ID)));
CompanyBo company = getSelectedOrgInfo().getCompany(); CompanyBo company = getSelectedOrgInfo().getCompany();
String useRegistrationCode = Objects.toString(equipInfo.get(USE_REGISTRATION_CODE), null); String useRegistrationCode = Objects.toString(equipInfo.get(USE_REGISTRATION_CODE), null);
// 屏蔽掉气瓶的认领
this.interceptGasCylinderClaim(equipInfo);
// 参数校验 - 同 设备录入的逻辑 // 参数校验 - 同 设备录入的逻辑
this.checkParams(new LinkedHashMap<>(equipInfo)); this.checkParams(new LinkedHashMap<>(equipInfo));
...@@ -363,6 +367,21 @@ public class EquipClaimServiceImpl { ...@@ -363,6 +367,21 @@ public class EquipClaimServiceImpl {
} }
/** /**
* 屏蔽掉气瓶的认领
*
* @param equipInfo
*/
private void interceptGasCylinderClaim(JSONObject equipInfo) {
// 设备种类
String equList = Objects.toString(equipInfo.get(EQU_LIST));
// 设备类别
String equCategory = Objects.toString(equipInfo.get(EQU_CATEGORY));
if (!StringUtils.isEmpty(equList) && equList.equals(EquipmentClassifityEnum.YLRQ.getCode()) && !StringUtils.isEmpty(equCategory) && equCategory.equals(UseRegisterCancelEquipEnum.qp.getCode())) {
throw new BadRequest("气瓶设备认领暂未开放!");
}
}
/**
* 台套历史设备登记 * 台套历史设备登记
* *
* @param equipInfo * @param equipInfo
...@@ -668,8 +687,10 @@ public class EquipClaimServiceImpl { ...@@ -668,8 +687,10 @@ public class EquipClaimServiceImpl {
.approvalUnitCode(useRegistration.getReceiveOrgName()) .approvalUnitCode(useRegistration.getReceiveOrgName())
.status("正常") .status("正常")
.changeContent(businessTypeEnum.getName() + "业务") .changeContent(businessTypeEnum.getName() + "业务")
.routePath(null)
.build(); .build();
if (!ObjectUtils.isEmpty(useRegistration.getSequenceNbr())) {
resumeInfoDto.setRoutePath(useRegistrationService.buildTaskModel(useRegistration, equipInfo, getSelectedOrgInfo()));
}
JgResumeInfo resumeInfo = new JgResumeInfo(); JgResumeInfo resumeInfo = new JgResumeInfo();
BeanUtils.copyProperties(resumeInfoDto, resumeInfo); BeanUtils.copyProperties(resumeInfoDto, resumeInfo);
jgResumeInfoService.save(resumeInfo); jgResumeInfoService.save(resumeInfo);
...@@ -681,8 +702,14 @@ public class EquipClaimServiceImpl { ...@@ -681,8 +702,14 @@ public class EquipClaimServiceImpl {
public void checkParams(LinkedHashMap equipInfo) { public void checkParams(LinkedHashMap equipInfo) {
String dataSource = (String) equipInfo.get(DATA_SOURCE); String dataSource = (String) equipInfo.get(DATA_SOURCE);
String record = (String) equipInfo.get(RECORD); String record = (String) equipInfo.get(RECORD);
String useRegistrationCode = Optional.ofNullable(equipInfo.get("useRegistrationCode"))
.map(String::valueOf)
.map(String::trim)
.orElse(null);
// 使用登记证校验 // 使用登记证校验
jgRegisterInfoService.checkUseRegistrationCode(equipInfo); if (!ObjectUtils.isEmpty(useRegistrationCode)) {
jgRegisterInfoService.checkUseRegistrationCode(equipInfo);
}
// 设备代码 字段的唯一性校验 // 设备代码 字段的唯一性校验
jgRegisterInfoService.checkEquCodeUniqueness(equipInfo); jgRegisterInfoService.checkEquCodeUniqueness(equipInfo);
// 车用气瓶业务里面的 产品编号 校验唯一性(产品编号在车用气瓶范围内全局唯一) // 车用气瓶业务里面的 产品编号 校验唯一性(产品编号在车用气瓶范围内全局唯一)
...@@ -720,6 +747,10 @@ public class EquipClaimServiceImpl { ...@@ -720,6 +747,10 @@ public class EquipClaimServiceImpl {
useInfo.setUseUnitCreditCode(company.getCompanyCode()); useInfo.setUseUnitCreditCode(company.getCompanyCode());
useInfo.setUseUnitName(company.getCompanyName()); useInfo.setUseUnitName(company.getCompanyName());
useInfo.setSequenceNbr(Objects.toString(equipInfo.get("USEINFO_SEQ"))); useInfo.setSequenceNbr(Objects.toString(equipInfo.get("USEINFO_SEQ")));
if (ObjectUtils.isEmpty(useInfo.getEquState()) && isIntoManagement) {
// 有证纳管状态 没填写 给默认值
useInfo.setEquState(EquimentEnum.ZAIYONG.getCode().toString());
}
idxBizJgUseInfoService.saveOrUpdateData(useInfo); idxBizJgUseInfoService.saveOrUpdateData(useInfo);
// 设计信息 // 设计信息
IdxBizJgDesignInfo designInfo = JSON.parseObject(toJSONString(equipInfo), IdxBizJgDesignInfo.class); IdxBizJgDesignInfo designInfo = JSON.parseObject(toJSONString(equipInfo), IdxBizJgDesignInfo.class);
......
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