Commit 415bc1ca authored by yangyang's avatar yangyang

Merge remote-tracking branch 'origin/develop_tzs_bugfix' into develop_tzs_bugfix

parents 79fe85a8 482461bb
......@@ -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());
break;
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;
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());
......@@ -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());
break;
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;
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());
......@@ -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());
break;
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;
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());
......@@ -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());
break;
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;
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());
......
......@@ -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.enums.BusinessTypeEnum;
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.JgVehicleInformationMapper;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
......@@ -332,6 +333,9 @@ public class EquipClaimServiceImpl {
JSONObject equipParams = JSON.parseObject(toJSONString(json.get(EQUIP_PARAMS_FORM_ID)));
CompanyBo company = getSelectedOrgInfo().getCompany();
String useRegistrationCode = Objects.toString(equipInfo.get(USE_REGISTRATION_CODE), null);
// 屏蔽掉气瓶的认领
this.interceptGasCylinderClaim(equipInfo);
// 参数校验 - 同 设备录入的逻辑
this.checkParams(new LinkedHashMap<>(equipInfo));
......@@ -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
......@@ -668,8 +687,10 @@ public class EquipClaimServiceImpl {
.approvalUnitCode(useRegistration.getReceiveOrgName())
.status("正常")
.changeContent(businessTypeEnum.getName() + "业务")
.routePath(null)
.build();
if (!ObjectUtils.isEmpty(useRegistration.getSequenceNbr())) {
resumeInfoDto.setRoutePath(useRegistrationService.buildTaskModel(useRegistration, equipInfo, getSelectedOrgInfo()));
}
JgResumeInfo resumeInfo = new JgResumeInfo();
BeanUtils.copyProperties(resumeInfoDto, resumeInfo);
jgResumeInfoService.save(resumeInfo);
......@@ -681,8 +702,14 @@ public class EquipClaimServiceImpl {
public void checkParams(LinkedHashMap equipInfo) {
String dataSource = (String) equipInfo.get(DATA_SOURCE);
String record = (String) equipInfo.get(RECORD);
String useRegistrationCode = Optional.ofNullable(equipInfo.get("useRegistrationCode"))
.map(String::valueOf)
.map(String::trim)
.orElse(null);
// 使用登记证校验
if (!ObjectUtils.isEmpty(useRegistrationCode)) {
jgRegisterInfoService.checkUseRegistrationCode(equipInfo);
}
// 设备代码 字段的唯一性校验
jgRegisterInfoService.checkEquCodeUniqueness(equipInfo);
// 车用气瓶业务里面的 产品编号 校验唯一性(产品编号在车用气瓶范围内全局唯一)
......@@ -720,6 +747,10 @@ public class EquipClaimServiceImpl {
useInfo.setUseUnitCreditCode(company.getCompanyCode());
useInfo.setUseUnitName(company.getCompanyName());
useInfo.setSequenceNbr(Objects.toString(equipInfo.get("USEINFO_SEQ")));
if (ObjectUtils.isEmpty(useInfo.getEquState()) && isIntoManagement) {
// 有证纳管状态 没填写 给默认值
useInfo.setEquState(EquimentEnum.ZAIYONG.getCode().toString());
}
idxBizJgUseInfoService.saveOrUpdateData(useInfo);
// 设计信息
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