Commit 1603d4f0 authored by hezhuozhi's avatar hezhuozhi

气瓶数据项调整 / 使用登记页面调整

parent c35e0bf4
......@@ -940,21 +940,21 @@
LEFT JOIN idx_biz_jg_other_info oi ON oi."RECORD" = ui."RECORD"
</sql>
<select id="queryForUnitVesselEquipmentPage" resultType="com.alibaba.fastjson.JSONObject">
select * FROM ( <include refid="page-list-vessel"/>
SELECT * FROM ( SELECT * FROM ( <include refid="page-list-vessel"/>
WHERE
ri."EQU_CATEGORY" = '2300'
and ui."DATA_SOURCE" like 'jg%'
and (ri.whether_vehicle_cylinder is null or ri.whether_vehicle_cylinder != 1)
<if test="jsonObject.chargingMedium == null or jsonObject.chargingMedium == ''">
and pv."CHARGING_MEDIUM" like concat('%',#{jsonObject.chargingMedium},'%')
<if test="jsonObject.chargingMedium != null and jsonObject.chargingMedium != ''">
and pv."CHARGING_MEDIUM" = #{jsonObject.chargingMedium}
</if>
<if test="jsonObject.useInnerCode == null or jsonObject.useInnerCode == ''">
<if test="jsonObject.useInnerCode != null and jsonObject.useInnerCode != ''">
and ui."USE_INNER_CODE" like concat('%',#{jsonObject.useInnerCode},'%')
</if>
<if test="jsonObject.informationSituation == null or jsonObject.informationSituation == ''">
<if test="jsonObject.informationSituation != null and jsonObject.informationSituation != ''">
and oi.INFORMATION_SITUATION =#{jsonObject.informationSituation}
</if>
<if test="jsonObject.informationManageCode == null or jsonObject.informationManageCode == ''">
<if test="jsonObject.informationManageCode != null and jsonObject.informationManageCode != ''">
and oi.INFORMATION_MANAGE_CODE like concat('%',#{jsonObject.informationManageCode},'%')
</if>
<if test="jsonObject.DATA_SOURCE == null or jsonObject.DATA_SOURCE == ''">
......@@ -997,24 +997,37 @@
ORDER BY ui.REC_DATE DESC
) aa
<where>
<if test="jsonObject.equDefineName == null or jsonObject.equDefineName == ''">
<if test="jsonObject.equDefineName != null and jsonObject.equDefineName != ''">
and aa.equDefineName like concat('%',#{jsonObject.equDefineName},'%')
</if>
<if test="jsonObject.factoryNum == null or jsonObject.factoryNum == ''">
<if test="jsonObject.factoryNum != null and jsonObject.factoryNum != ''">
and aa.factoryNum like concat('%',#{jsonObject.factoryNum},'%')
</if>
<if test="jsonObject.nextInspectDate == null or jsonObject.nextInspectDate == ''">
<if test="jsonObject.nextInspectDate != null and jsonObject.nextInspectDate != ''">
and aa.nextInspectDate =#{jsonObject.nextInspectDate}
</if>
</where>
)
</select>
<select id="queryForEquipUsedByVehiclePageHistory" resultType="com.alibaba.fastjson.JSONObject">
<include refid="page-list-vessel"/>
SELECT * FROM ( SELECT * FROM ( <include refid="page-list-vessel"/>
WHERE
ri."EQU_DEFINE" = '23T0'
and ui."DATA_SOURCE" like 'jg_his%'
and ri.whether_vehicle_cylinder = 1
<if test="jsonObject.chargingMedium != null and jsonObject.chargingMedium != ''">
and pv."CHARGING_MEDIUM" = #{jsonObject.chargingMedium}
</if>
<if test="jsonObject.useInnerCode != null and jsonObject.useInnerCode != ''">
and ui."USE_INNER_CODE" like concat('%',#{jsonObject.useInnerCode},'%')
</if>
<if test="jsonObject.informationSituation != null and jsonObject.informationSituation != ''">
and oi.INFORMATION_SITUATION =#{jsonObject.informationSituation}
</if>
<if test="jsonObject.informationManageCode != null and jsonObject.informationManageCode != ''">
and oi.INFORMATION_MANAGE_CODE like concat('%',#{jsonObject.informationManageCode},'%')
</if>
-- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备
<if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null">
and ui."USE_UNIT_CREDIT_CODE" = #{jsonObject.useUnitCreditCode}
......@@ -1034,14 +1047,39 @@
!='一级受理已驳回' and v.status !='使用单位已撤回' and v.status !='已作废' )
</if>
ORDER BY ui.REC_DATE DESC
) aa
<where>
<if test="jsonObject.equDefineName != null and jsonObject.equDefineName != ''">
and aa.equDefineName like concat('%',#{jsonObject.equDefineName},'%')
</if>
<if test="jsonObject.factoryNum != null and jsonObject.factoryNum != ''">
and aa.factoryNum like concat('%',#{jsonObject.factoryNum},'%')
</if>
<if test="jsonObject.nextInspectDate != null and jsonObject.nextInspectDate != ''">
and aa.nextInspectDate =#{jsonObject.nextInspectDate}
</if>
</where>
)
</select>
<select id="queryForEquipUsedByVehiclePage" resultType="com.alibaba.fastjson.JSONObject">
<include refid="page-list-vessel"/>
SELECT * FROM ( SELECT * FROM ( <include refid="page-list-vessel"/>
WHERE
ri."EQU_DEFINE" = '23T0'
and ui."DATA_SOURCE" like 'jg%'
and ui."DATA_SOURCE" not like 'jg_his%'
and ri.whether_vehicle_cylinder = 1
<if test="jsonObject.chargingMedium != null and jsonObject.chargingMedium != ''">
and pv."CHARGING_MEDIUM" = #{jsonObject.chargingMedium}
</if>
<if test="jsonObject.useInnerCode != null and jsonObject.useInnerCode != ''">
and ui."USE_INNER_CODE" like concat('%',#{jsonObject.useInnerCode},'%')
</if>
<if test="jsonObject.informationSituation != null and jsonObject.informationSituation != ''">
and oi.INFORMATION_SITUATION =#{jsonObject.informationSituation}
</if>
<if test="jsonObject.informationManageCode != null and jsonObject.informationManageCode != ''">
and oi.INFORMATION_MANAGE_CODE like concat('%',#{jsonObject.informationManageCode},'%')
</if>
-- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备
<if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null">
and ui."USE_UNIT_CREDIT_CODE" = #{jsonObject.useUnitCreditCode}
......@@ -1055,6 +1093,19 @@
!='一级受理已驳回' and v.status !='使用单位已撤回' and v.status !='已作废' )
</if>
ORDER BY ui.REC_DATE DESC
) aa
<where>
<if test="jsonObject.equDefineName != null and jsonObject.equDefineName != ''">
and aa.equDefineName like concat('%',#{jsonObject.equDefineName},'%')
</if>
<if test="jsonObject.factoryNum != null and jsonObject.factoryNum != ''">
and aa.factoryNum like concat('%',#{jsonObject.factoryNum},'%')
</if>
<if test="jsonObject.nextInspectDate != null and jsonObject.nextInspectDate != ''">
and aa.nextInspectDate =#{jsonObject.nextInspectDate}
</if>
</where>
)
</select>
<select id="queryForUnitVesselEquipment" resultType="java.util.Map">
<include refid="page-list-vessel"/>
......
......@@ -3623,6 +3623,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
Page<JSONObject> result = jgUseRegistrationMapper.queryForEquipUsedByVehiclePage(page, jsonObject);
result.getRecords().forEach(i -> {
i.put("chargingMedium", fillingMediumMap.get(i.get("chargingMedium")));
i.put("productPhoto", JSONArray.parseArray(i.getString("productPhoto")));
i.put("cylinderStampAttachment", JSONArray.parseArray(i.getString("cylinderStampAttachment")));
i.put("informationSituation",InformationManageTypeEnum.getName(i.getString("informationSituation")));
});
return result;
}
......@@ -3642,6 +3645,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
Page<JSONObject> result = jgUseRegistrationMapper.queryForEquipUsedByVehiclePageHistory(page, jsonObject);
result.getRecords().forEach(i -> {
i.put("chargingMedium", fillingMediumMap.get(i.get("chargingMedium")));
i.put("productPhoto", JSONArray.parseArray(i.getString("productPhoto")));
i.put("cylinderStampAttachment", JSONArray.parseArray(i.getString("cylinderStampAttachment")));
i.put("informationSituation",InformationManageTypeEnum.getName(i.getString("informationSituation")));
});
return result;
}
......
......@@ -2171,6 +2171,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
List<Map<String, Object>> result = jgUseRegistrationMapper.queryForUnitVesselEquipment(records);
result.forEach(i -> {
i.put("chargingMedium", fillingMediumMap.get(i.get("chargingMedium")));
i.put("productPhoto", JSONArray.parseArray((String) i.get("productPhoto")));
i.put("cylinderStampAttachment", JSONArray.parseArray((String) i.get("cylinderStampAttachment")));
i.put("informationSituation", InformationManageTypeEnum.getName((String) i.get("informationSituation")));
});
jsonObject.put("equipmentLists", result);
}
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -9,6 +10,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
import com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.InformationManageTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
......@@ -83,6 +85,9 @@ public class UseRegisterUpdateService {
List<Map<String, Object>> result = useRegistrationService.getBaseMapper().queryForUnitVesselEquipment(records);
result.forEach(i -> {
i.put("chargingMedium", fillingMediumMap.get(i.get("chargingMedium")));
i.put("productPhoto", JSONArray.parseArray((String) i.get("productPhoto")));
i.put("cylinderStampAttachment", JSONArray.parseArray((String) i.get("cylinderStampAttachment")));
i.put("informationSituation", InformationManageTypeEnum.getName((String) i.get("informationSituation")));
});
jsonObject.put("equipmentLists", result);
} else {
......
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