Commit 69f2a90e authored by Lambertliu's avatar Lambertliu

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

parents 17856b4c 2385740f
......@@ -514,6 +514,7 @@
NEXT_INSPECT_DATE as nextInspectDate,
INSPECT_REPORT as inspectReport,
INSPECT_ORG_CODE as inspectOrgCode,
INSPECT_REPORT_NO as inspectReportNo,
SEQUENCE_NBR as jySeq
from idx_biz_jg_inspection_detection_info
where
......@@ -596,7 +597,8 @@
INSPECT_DATE as inspectDate,
INSPECT_STAFF as inspectStaff,
NEXT_INSPECT_DATE as nextInspectDate,
INSPECT_REPORT as inspectReport
INSPECT_REPORT as inspectReport,
INSPECT_REPORT_NO as inspectReportNo
FROM "idx_biz_jg_inspection_detection_info"
where
RECORD = #{id}
......
......@@ -55,7 +55,7 @@
and spt.principal_unit like CONCAT('%', #{problemModel.principalUnit}, '%')
</if>
<if test="problemModel.principalUnitType != null and problemModel.principalUnitType != ''">
and spt.principal_unit_type = #{problemModel.principalUnitType}
and spt.principal_unit_type = like CONCAT('%', #{problemModel.principalUnitType}, '%')
</if>
<if test="problemModel.hiddenDangersLevel != null and problemModel.hiddenDangersLevel != ''">
and spt.problem_status_code = #{problemModel.hiddenDangersLevel}
......
......@@ -2280,7 +2280,7 @@ public class CommonServiceImpl implements ICommonService {
formData.put("productName", formData.getString("projectContraption"));
}
//单位模版 部分字段需从设备列表中获取
if (formData.containsKey("equipmentLists") && manageType.equals(UNIT) ){
if (formData.containsKey("equipmentLists") ){
JSONArray equipmentLists = formData.getJSONArray("equipmentLists");
List<Map<String, Object>> equips = equipmentLists.stream()
.filter(obj -> obj instanceof Map)
......@@ -2290,7 +2290,27 @@ public class CommonServiceImpl implements ICommonService {
formData.put("equNum",equipmentLists.size());
//设备品种
formData.put("equDefine",equips.get(0).get("equDefineName"));
}else if (manageType.equals(UNIT) && !CollectionUtils.isEmpty(equips)){
Set<String> productNameSet = equips.stream()
.filter(Objects::nonNull) // 过滤掉equip为null的情况
.map(e -> e.get("productName")) // 获取productName
.filter(Objects::nonNull) // 过滤掉productName为null的情况
.map(Object::toString) // 转换为String类型
.collect(Collectors.toSet()); // 收集到Set中
// 将set转成字符串逗号拼接
String productName="";
List<String> sortedProductNameList = new
ArrayList<>(productNameSet);
if (sortedProductNameList.size() > 3
) {
productName = String.join(",", sortedProductNameList.subList(0, 3)) + ",...";
} else
{
productName = String.join(",", sortedProductNameList);
}
formData.put("productName",equips.get(0).get("productName"));
}else if (manageType.equals(VEHICLE) && !CollectionUtils.isEmpty(equips)){
//气瓶数量
formData.put("gasNum",equips.size());
//设备品种
......
......@@ -2830,10 +2830,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 基本信息 + 制造信息 + 设计信息
fillLastEquipBaseInfo(jsonObject, record);
// 安装信息
Map<String, Object> installDetail = this.baseMapper.getiInstallDetail(record);
// 历史设备登记来的数据没有安装业务信息 从一码通数据拿
if (ValidationUtil.isEmpty(installDetail)) {
installDetail = this.baseMapper.getiInstallDetailByIdx(record);
if(!jsonObject.containsKey("installationIsComplete")) {
Map<String, Object> installDetail = this.baseMapper.getiInstallDetail(record);
// 历史设备登记来的数据没有安装业务信息 从一码通数据拿
if (ValidationUtil.isEmpty(installDetail)) {
installDetail = this.baseMapper.getiInstallDetailByIdx(record);
}
if (!ObjectUtils.isEmpty(installDetail)) {
jsonObject.putAll(installDetail);
}
}
// 维保信息
Map<String, Object> maintenanceDetail = this.baseMapper.getMaintenanceDetail(record);
......@@ -2844,9 +2849,6 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if (!ObjectUtils.isEmpty(maintenanceDetail)) {
jsonObject.putAll(maintenanceDetail);
}
if (!ObjectUtils.isEmpty(installDetail)) {
jsonObject.putAll(installDetail);
}
}
public void fillLastEquipBaseInfo(JSONObject jsonObject, String record) {
......
......@@ -2191,7 +2191,7 @@
<w:spacing w:val="-1"/>
<w:lang w:val="en-US" w:eastAsia="zh-CN"/>
</w:rPr>
<w:t>${(resultNo)!''}</w:t>
<w:t>${(inspectReportNo)!''}</w:t>
</w:r>
</w:p>
</w:tc>
......
......@@ -543,7 +543,7 @@
<w:sz w:val="21"/>
<w:sz-cs w:val="21"/>
</w:rPr>
<w:t>${(registrationType)!''}</w:t>
<w:t>${(registrationType)!'新设备首次启用'}</w:t>
</w:r>
</w:p>
<w:p>
......
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