Commit a097b80c authored by tianbo's avatar tianbo

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

# Conflicts: # amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
parents bf511c66 ed7514ab
...@@ -65,12 +65,12 @@ public class ChangeFieldWatchConstants { ...@@ -65,12 +65,12 @@ public class ChangeFieldWatchConstants {
static { static {
Map<String, Set<String>> map = new LinkedHashMap<>(); Map<String, Set<String>> map = new LinkedHashMap<>();
map.put("USE_CERT", USE_CERT_MONITORED_FIELDS);
map.put("USE_FLAG", USE_FLAG_MONITORED_FIELDS); map.put("USE_FLAG", USE_FLAG_MONITORED_FIELDS);
map.put("USE_FLAG_VEHICLE", USE_FLAG_VEHICLE_MONITORED_FIELDS); map.put("USE_FLAG_VEHICLE", USE_FLAG_VEHICLE_MONITORED_FIELDS);
map.put("PIPELINE_SUMMARY", PIPELINE_SUMMARY_TABLE_MONITORED_FIELDS); map.put("PIPELINE_SUMMARY", PIPELINE_SUMMARY_TABLE_MONITORED_FIELDS);
map.put("USE_CYLINDER_SUMMARY", USE_CYLINDER_SUMMARY_TABLE_MONITORED_FIELDS); map.put("USE_CYLINDER_SUMMARY", USE_CYLINDER_SUMMARY_TABLE_MONITORED_FIELDS);
map.put("NOTICE", NOTICE_MONITORED_FIELDS); map.put("NOTICE", NOTICE_MONITORED_FIELDS);
map.put("USE_CERT", USE_CERT_MONITORED_FIELDS);
FIELD_MAP = Collections.unmodifiableMap(map); FIELD_MAP = Collections.unmodifiableMap(map);
} }
......
...@@ -232,8 +232,15 @@ public class ChangeEquipImpactCertListener { ...@@ -232,8 +232,15 @@ public class ChangeEquipImpactCertListener {
private void handleDefaultRegistration(BaseBizDataChangeEvent event) { private void handleDefaultRegistration(BaseBizDataChangeEvent event) {
if (event.getBizRelationData().getBizIsFinished()){ if (event.getBizRelationData().getBizIsFinished()){
String equId = Stream.concat(
Optional.ofNullable(event.getBizRelationData().getProjectContraptionIds()).orElse(Collections.emptySet()).stream(),
Optional.ofNullable(event.getBizRelationData().getRecords()).orElse(Collections.emptySet()).stream()
).findFirst().orElse(null);
LambdaQueryWrapper<IdxBizJgRegisterInfo> queryRegisterWrapper = new QueryWrapper<IdxBizJgRegisterInfo>().lambda();
queryRegisterWrapper.eq(IdxBizJgRegisterInfo::getRecord, equId);
IdxBizJgRegisterInfo registerInfo = registerInfoMapper.selectOne(queryRegisterWrapper);
JgUseRegistrationManage jgUseRegistrationManage = jgUseRegistrationManageService.lambdaQuery() JgUseRegistrationManage jgUseRegistrationManage = jgUseRegistrationManageService.lambdaQuery()
.eq(JgUseRegistrationManage::getApplyNo, event.getBizRelationData().getBizId()) .eq(JgUseRegistrationManage::getUseRegistrationCode, registerInfo.getUseOrgCode())
.eq(JgUseRegistrationManage::getIsDelete, 0) .eq(JgUseRegistrationManage::getIsDelete, 0)
.one(); .one();
this.handleFieldChange(event.getData(), jgUseRegistrationManage); this.handleFieldChange(event.getData(), jgUseRegistrationManage);
......
...@@ -346,42 +346,42 @@ public class CommonEquipDataProcessService { ...@@ -346,42 +346,42 @@ public class CommonEquipDataProcessService {
// 锅炉 // 锅炉
IdxBizJgTechParamsBoiler boiler = iIdxBizJgTechParamsBoilerService.getOneData(record); IdxBizJgTechParamsBoiler boiler = iIdxBizJgTechParamsBoilerService.getOneData(record);
// 技术参数对象转换为全部技术参数 ,其他无用字段去掉 // 技术参数对象转换为全部技术参数 ,其他无用字段去掉
return BeanUtil.copyProperties(boiler, TechParamsBoilerChangeFieldDto.class); return boiler == null ? new TechParamsBoilerChangeFieldDto() : BeanUtil.copyProperties(boiler, TechParamsBoilerChangeFieldDto.class);
case YLRQ: case YLRQ:
// 压力容器 // 压力容器
IdxBizJgTechParamsVessel techParamsVessel = iIdxBizJgTechParamsVesselService.getOneData(record); IdxBizJgTechParamsVessel techParamsVessel = iIdxBizJgTechParamsVesselService.getOneData(record);
// 技术参数对象转换为全部技术参数 ,其他无用字段去掉 // 技术参数对象转换为全部技术参数 ,其他无用字段去掉
return BeanUtil.copyProperties(techParamsVessel, TechParamsVesselChangeFieldDto.class); return techParamsVessel == null ? new TechParamsVesselChangeFieldDto() : BeanUtil.copyProperties(techParamsVessel, TechParamsVesselChangeFieldDto.class);
case DT: case DT:
// 电梯 // 电梯
IdxBizJgTechParamsElevator techParamsElevator = iIdxBizJgTechParamsElevatorService.getOneData(record); IdxBizJgTechParamsElevator techParamsElevator = iIdxBizJgTechParamsElevatorService.getOneData(record);
// 技术参数对象转换为全部技术参数 ,其他无用字段去掉 // 技术参数对象转换为全部技术参数 ,其他无用字段去掉
return BeanUtil.copyProperties(techParamsElevator, TechParamsElevatorChangeFieldDto.class); return techParamsElevator == null ? new TechParamsElevatorChangeFieldDto() : BeanUtil.copyProperties(techParamsElevator, TechParamsElevatorChangeFieldDto.class);
case QZJX: case QZJX:
// 起重机械 // 起重机械
IdxBizJgTechParamsLifting techParamsLifting = iIdxBizJgTechParamsLiftingService.getOneData(record); IdxBizJgTechParamsLifting techParamsLifting = iIdxBizJgTechParamsLiftingService.getOneData(record);
// 技术参数对象转换为全部技术参数 ,其他无用字段去掉 // 技术参数对象转换为全部技术参数 ,其他无用字段去掉
return BeanUtil.copyProperties(techParamsLifting, TechParamsLiftingChangeFieldDto.class); return techParamsLifting == null ? new TechParamsLiftingChangeFieldDto() : BeanUtil.copyProperties(techParamsLifting, TechParamsLiftingChangeFieldDto.class);
case CC: case CC:
// 场(厂)内专用机动车辆 // 场(厂)内专用机动车辆
IdxBizJgTechParamsVehicle techParamsVehicle = iIdxBizJgTechParamsVehicleService.getOneData(record); IdxBizJgTechParamsVehicle techParamsVehicle = iIdxBizJgTechParamsVehicleService.getOneData(record);
// 技术参数对象转换为全部技术参数 ,其他无用字段去掉 // 技术参数对象转换为全部技术参数 ,其他无用字段去掉
return BeanUtil.copyProperties(techParamsVehicle, TechParamsVehicleChangeFieldDto.class); return techParamsVehicle == null ? new TechParamsVehicleChangeFieldDto() : BeanUtil.copyProperties(techParamsVehicle, TechParamsVehicleChangeFieldDto.class);
case YLSS: case YLSS:
// 大型游乐设施 // 大型游乐设施
IdxBizJgTechParamsRides techParamsRides = iIdxBizJgTechParamsRidesService.getOneData(record); IdxBizJgTechParamsRides techParamsRides = iIdxBizJgTechParamsRidesService.getOneData(record);
// 技术参数对象转换为全部技术参数 ,其他无用字段去掉 // 技术参数对象转换为全部技术参数 ,其他无用字段去掉
return BeanUtil.copyProperties(techParamsRides, TechParamsRidesChangeFieldDto.class); return techParamsRides == null ? new TechParamsRidesChangeFieldDto() : BeanUtil.copyProperties(techParamsRides, TechParamsRidesChangeFieldDto.class);
case YLGD: case YLGD:
// 压力管道 // 压力管道
IdxBizJgTechParamsPipeline techParamsPipeline = iIdxBizJgTechParamsPipelineService.getOneData(record); IdxBizJgTechParamsPipeline techParamsPipeline = iIdxBizJgTechParamsPipelineService.getOneData(record);
// 技术参数对象转换为全部技术参数 ,其他无用字段去掉 // 技术参数对象转换为全部技术参数 ,其他无用字段去掉
return BeanUtil.copyProperties(techParamsPipeline, TechParamsPipelineChangeFieldDto.class); return techParamsPipeline == null ? new TechParamsPipelineChangeFieldDto() : BeanUtil.copyProperties(techParamsPipeline, TechParamsPipelineChangeFieldDto.class);
case KYSD: case KYSD:
// 客运索道 // 客运索道
IdxBizJgTechParamsRopeway techParamsRopeway = iIdxBizJgTechParamsRopewayService.getOneData(record); IdxBizJgTechParamsRopeway techParamsRopeway = iIdxBizJgTechParamsRopewayService.getOneData(record);
// 技术参数对象转换为全部技术参数 ,其他无用字段去掉 // 技术参数对象转换为全部技术参数 ,其他无用字段去掉
return BeanUtil.copyProperties(techParamsRopeway, TechParamsRopewayChangeFieldDto.class); return techParamsRopeway == null ? new TechParamsRopewayChangeFieldDto() : BeanUtil.copyProperties(techParamsRopeway, TechParamsRopewayChangeFieldDto.class);
default: default:
break; break;
} }
...@@ -806,6 +806,7 @@ public class CommonEquipDataProcessService { ...@@ -806,6 +806,7 @@ public class CommonEquipDataProcessService {
result.put("record", useInfo.getRecord()); result.put("record", useInfo.getRecord());
// 设备来源,前端无法判断,故后端进行判断,分为新设备(new)、历史有证设备(his)、历史无证设备(black) // 设备来源,前端无法判断,故后端进行判断,分为新设备(new)、历史有证设备(his)、历史无证设备(black)
result.put("dataSourceClassify", this.genDataSource(useInfo.getDataSource())); result.put("dataSourceClassify", this.genDataSource(useInfo.getDataSource()));
result.replaceAll((key, value) -> "null".equals(value) ? null : value);
return result; return result;
} }
......
...@@ -315,6 +315,9 @@ public class EquipChangeDataUpdateServiceImpl { ...@@ -315,6 +315,9 @@ public class EquipChangeDataUpdateServiceImpl {
esEquipmentCategoryDto.setUSE_UNIT_CREDIT_CODE(equipUseInfoChangeDataDto.getUseUnitCreditCode()); esEquipmentCategoryDto.setUSE_UNIT_CREDIT_CODE(equipUseInfoChangeDataDto.getUseUnitCreditCode());
esEquipmentCategoryDto.setUSC_UNIT_NAME(equipUseInfoChangeDataDto.getUseUnitName()); esEquipmentCategoryDto.setUSC_UNIT_NAME(equipUseInfoChangeDataDto.getUseUnitName());
esEquipmentCategoryDto.setUSE_INNER_CODE(equipUseInfoChangeDataDto.getUseInnerCode()); esEquipmentCategoryDto.setUSE_INNER_CODE(equipUseInfoChangeDataDto.getUseInnerCode());
esEquipmentCategoryDto.setUSE_PLACE(equipUseInfoChangeDataDto.getProvinceName() + "/" + equipUseInfoChangeDataDto.getCityName() + "/" + equipUseInfoChangeDataDto.getCountyName() + "/" + equipUseInfoChangeDataDto.getStreetName());
esEquipmentCategoryDto.setUSE_PLACE_CODE(equipUseInfoChangeDataDto.getProvince() + "#" + equipUseInfoChangeDataDto.getCity() + "#" + equipUseInfoChangeDataDto.getCounty() + "#" + equipUseInfoChangeDataDto.getFactoryUseSiteStreet());
esEquipmentCategoryDto.setADDRESS(equipUseInfoChangeDataDto.getAddress());
esEquipmentCategory.save(esEquipmentCategoryDto); esEquipmentCategory.save(esEquipmentCategoryDto);
} }
} }
......
...@@ -598,7 +598,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -598,7 +598,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration.setRegDate(new Date()); jgUseRegistration.setRegDate(new Date());
jgUseRegistration.setCreateDate(new Date()); jgUseRegistration.setCreateDate(new Date());
LambdaQueryWrapper<IdxBizJgOtherInfo> otherLambda = new QueryWrapper<IdxBizJgOtherInfo>().lambda(); LambdaQueryWrapper<IdxBizJgOtherInfo> otherLambda = new QueryWrapper<IdxBizJgOtherInfo>().lambda();
otherLambda.eq(IdxBizJgOtherInfo::getRecord, map.get("equipId")); otherLambda.eq(IdxBizJgOtherInfo::getRecord, equipId);
IdxBizJgOtherInfo otherInfo = otherInfoMapper.selectOne(otherLambda); IdxBizJgOtherInfo otherInfo = otherInfoMapper.selectOne(otherLambda);
if (otherInfo != null) { if (otherInfo != null) {
String supervisoryCode = otherInfo.getSupervisoryCode(); String supervisoryCode = otherInfo.getSupervisoryCode();
...@@ -4021,6 +4021,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -4021,6 +4021,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if (equipId == null) { if (equipId == null) {
throw new BadRequest("请选择设备后进行暂存!"); throw new BadRequest("请选择设备后进行暂存!");
} }
if (useRegistrationCode == null) {
throw new BadRequest("请先填写使用登记证编号!");
}
//校验使用登记证编号的唯一性 //校验使用登记证编号的唯一性
if (useRegistrationCode != null) { if (useRegistrationCode != null) {
if (Boolean.TRUE.equals(commonServiceImpl.useRegistrationCertificateAccountUnique(useRegistrationCode, equipId))) { if (Boolean.TRUE.equals(commonServiceImpl.useRegistrationCertificateAccountUnique(useRegistrationCode, equipId))) {
...@@ -4043,8 +4047,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -4043,8 +4047,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class); ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
CompanyBo company = reginParams.getCompany(); CompanyBo company = reginParams.getCompany();
// 使用登记信息 String sequenceNbr = Objects.toString(map.get("sequenceNbr"),null);
JgUseRegistration jgUseRegistration = new JgUseRegistration(); JgUseRegistration jgUseRegistration = ValidationUtil.isEmpty(sequenceNbr) ? new JgUseRegistration() : this.getBaseMapper().selectById(Long.valueOf(sequenceNbr));
jgUseRegistration.setRegDate(ValidationUtil.isEmpty(map.get("oRegDate")) ? new Date() : jgUseRegistration.setRegDate(ValidationUtil.isEmpty(map.get("oRegDate")) ? new Date() :
DateUtils.dateParse((String) map.get("oRegDate"), DateUtils.DATE_PATTERN)); DateUtils.dateParse((String) map.get("oRegDate"), DateUtils.DATE_PATTERN));
jgUseRegistration.setInputUnitNo(Objects.toString(map.get("oRegUnit"))); jgUseRegistration.setInputUnitNo(Objects.toString(map.get("oRegUnit")));
......
...@@ -373,9 +373,9 @@ public class JGDPStatisticsServiceImpl { ...@@ -373,9 +373,9 @@ public class JGDPStatisticsServiceImpl {
return setDefaultCount(result); return setDefaultCount(result);
} }
// 1.气瓶数量统计 // 1.气瓶数量统计
long cylinderNum = stCommonService.staticsCenterMapCountDataForCylinder(result, orgCode, true, true, false); long cylinderNum = stCommonService.staticsCenterMapCountDataForCylinder(result, orgCode, true, false, false);
//1.8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量 //1.8大类设备数量统计,压力容器里包括气瓶所以需要特殊处理,在统计压力容器时去掉气瓶的数量
stCommonService.staticsCenterMapCountDataForEquip(result, cylinderNum, orgCode, true, true, false); stCommonService.staticsCenterMapCountDataForEquip(result, cylinderNum, orgCode, true, false, false);
//2.压力管道长度统计 //2.压力管道长度统计
stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode, true, false); stCommonService.staticsCenterMapCountDataForPipeline(result, orgCode, true, false);
//3.单位数量统计 //3.单位数量统计
......
...@@ -21,6 +21,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.UserPermissionDto; ...@@ -21,6 +21,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.UserPermissionDto;
import com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher; import com.yeejoin.amos.boot.module.common.biz.event.CommonPublisher;
import com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent; import com.yeejoin.amos.boot.module.common.biz.refresh.DataRefreshEvent;
import com.yeejoin.amos.boot.module.tcm.api.dto.*; import com.yeejoin.amos.boot.module.tcm.api.dto.*;
import com.yeejoin.amos.boot.module.tcm.api.dto.*;
import com.yeejoin.amos.boot.module.tcm.api.entity.*; import com.yeejoin.amos.boot.module.tcm.api.entity.*;
import com.yeejoin.amos.boot.module.tcm.api.enums.EnterpriseEnums; import com.yeejoin.amos.boot.module.tcm.api.enums.EnterpriseEnums;
import com.yeejoin.amos.boot.module.tcm.api.enums.LicenceTypeEnum; import com.yeejoin.amos.boot.module.tcm.api.enums.LicenceTypeEnum;
...@@ -149,6 +150,10 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -149,6 +150,10 @@ public class TzBaseEnterpriseInfoServiceImpl
COMPANY_TYPE_CERT_TYPE_MAP.put("安装改造维修单位", "1231,1234,1235,1236"); COMPANY_TYPE_CERT_TYPE_MAP.put("安装改造维修单位", "1231,1234,1235,1236");
// 充装单位 // 充装单位
COMPANY_TYPE_CERT_TYPE_MAP.put("充装单位", "1231,1234,1235,1236"); COMPANY_TYPE_CERT_TYPE_MAP.put("充装单位", "1231,1234,1235,1236");
// 制造单位
COMPANY_TYPE_CERT_TYPE_MAP.put("制造单位", "1231,1234,1235,1236");
// 设计单位
COMPANY_TYPE_CERT_TYPE_MAP.put("设计单位", "1231,1234,1235,1236");
} }
/** /**
......
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