Commit 621ac8ae authored by Lambertliu's avatar Lambertliu

fix(jg):管道使用登记功能监管码生成规则修改

parent f6c1e8fc
...@@ -964,6 +964,7 @@ public class DataHandlerServiceImpl { ...@@ -964,6 +964,7 @@ public class DataHandlerServiceImpl {
List<JgUseRegistration> useRegistrations = useRegistrationService.list( List<JgUseRegistration> useRegistrations = useRegistrationService.list(
new LambdaQueryWrapper<JgUseRegistration>() new LambdaQueryWrapper<JgUseRegistration>()
.isNotNull(JgUseRegistration::getProjectContraptionId) .isNotNull(JgUseRegistration::getProjectContraptionId)
.isNull(JgUseRegistration::getOriginProjectContraptionIds)
.select(BaseEntity::getSequenceNbr, JgUseRegistration::getProjectContraptionId) .select(BaseEntity::getSequenceNbr, JgUseRegistration::getProjectContraptionId)
); );
......
...@@ -11,6 +11,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -11,6 +11,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo; import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory; import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
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.EquipSourceEnum; import com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum;
...@@ -108,6 +110,8 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP ...@@ -108,6 +110,8 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
private IdxBizJgConstructionInfoServiceImpl idxBizJgConstructionInfoService; private IdxBizJgConstructionInfoServiceImpl idxBizJgConstructionInfoService;
@Autowired @Autowired
private ESEquipmentCategory esEquipmentCategory; private ESEquipmentCategory esEquipmentCategory;
@Autowired
private DataDictionaryServiceImpl dataDictionaryServiceImpl;
@Override @Override
public boolean saveOrUpdateData(IdxBizJgProjectContraption projectContraption) { public boolean saveOrUpdateData(IdxBizJgProjectContraption projectContraption) {
...@@ -598,13 +602,13 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP ...@@ -598,13 +602,13 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
} }
public Map<String, Object> getNewInspectionDetailByRecord(String record) { public Map<String, Object> getNewInspectionDetailByRecord(String record) {
// 检验检测【一对多,暂时只取最新一条数据】 IdxBizJgInspectionDetectionInfo info = detectionInfoService.queryNewestDetailByRecord(record);
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = detectionInfoService.queryNewestDetailByRecord(record); if (info == null) return Collections.emptyMap();
Map<String, Object> inspectionDetectionInfoMap = Collections.emptyMap(); Map<String, Object> result = new HashMap<>(Bean.BeantoMap(info));
if (!ValidationUtil.isEmpty(inspectionDetectionInfo)) { result.put("inspectReport", JSON.parseArray(info.getInspectReport()));
inspectionDetectionInfoMap = Bean.BeantoMap(inspectionDetectionInfo); result.put("inspectConclusionCode", info.getInspectConclusion());
inspectionDetectionInfoMap.put("inspectReport", JSON.parseArray(inspectionDetectionInfo.getInspectReport())); result.put("inspectConclusion", Optional.ofNullable(dataDictionaryServiceImpl.getByCode(info.getInspectConclusion(), "JYJL"))
} .map(DataDictionary::getName).orElse(""));
return inspectionDetectionInfoMap; return result;
} }
} }
\ No newline at end of file
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