Commit 5955715d authored by 韩桐桐's avatar 韩桐桐

fix(jg):1,安装告知压力管道刷入调整后新结构的数据;

2,查询工程装置下的所有未做安装告知、不在安装告知流程、安装告知作废的设备接口
parent 7514da46
......@@ -44,4 +44,8 @@ public interface JgInstallationNoticeMapper extends CustomBaseMapper<JgInstallat
List<CompanyEquipCountDto> queryForFlowingEquipList();
List<InstallationVo> queryInstallationInIds(@Param("ids") List<String> ids);
List<Map<String, Object>> getDeviceListByProjectContraption(@Param("projectContraption") String projectContraption);
Map<String, Object> getPipelineEquInfoByRecord(@Param("record") String record);
}
......@@ -86,4 +86,6 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
JgInstallationNotice cancelApplication(Long sequenceNbr, String cancelReason);
Boolean historyDataRepair();
Object getDeviceListByProjectContraption(String projectContraption);
}
......@@ -200,4 +200,107 @@
isn.create_date DESC, isn.apply_no DESC
</select>
<sql id="page-list-pipeline">
SELECT ui."USE_UNIT_NAME" useUnitName,
ui."USE_UNIT_CREDIT_CODE" useUnitCreditCode,
to_char(ui."USE_DATE", 'YYYY-MM') useDate,
(SELECT DESIGN_UNIT_NAME from idx_biz_jg_design_info where "RECORD" = ui."RECORD") designUnitName,
(SELECT USC_UNIT_NAME
from idx_biz_jg_construction_info
where "RECORD" = ui."RECORD"
ORDER BY USC_DATE DESC
limit 1) uscUnitName,
to_char((SELECT USC_DATE
from idx_biz_jg_construction_info
where "RECORD" = ui."RECORD"
ORDER BY USC_DATE DESC
limit 1), 'YYYY-MM') uscDate,
ui."RECORD" record,
ri."EQU_CODE" equCode,
ri."EQU_LIST" equList,
(select name from tz_equipment_category where code = ri."EQU_LIST") equListName,
ri."EQU_CATEGORY" equCategory,
(select name from tz_equipment_category where code = ri."EQU_CATEGORY") equCategoryName,
ri."EQU_DEFINE" equDefine,
(select name from tz_equipment_category where code = ri."EQU_DEFINE") equDefineName,
ri."PRODUCT_NAME" productName,
ri."BRAND_NAME" brandName,
ri."EQU_TYPE" equType,
ri."EQU_CODE_TYPE" equCodeType,
ri."WHETHER_VEHICLE_CYLINDER" whetherVehicleCylinder,
pp."DEVICE_NAME" deviceName,
(select name from cb_data_dictionary where code = pp."DEVICE_LEVEL" and type = 'GBI') deviceLevel,
pp."PIPE_NAME" pipeName,
pp."PIPELINE_NUMBER" pipelineNumber,
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness,
pp."PIPE_LENGTH" pipeLength,
pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature,
pp."MEDIUM" medium,
pp."REMARKS" remarks,
(select INSPECT_ORG_NAME
from idx_biz_jg_inspection_detection_info
where "RECORD" = ui."RECORD"
ORDER BY REC_DATE DESC
limit 1) inspectOrgName,
(select name
from cb_data_dictionary
where type = 'JYJL'
and code = (select INSPECT_CONCLUSION
from idx_biz_jg_inspection_detection_info
where "RECORD" = ui."RECORD"
ORDER BY REC_DATE DESC
limit 1)) inspectConclusion,
to_char((select NEXT_INSPECT_DATE
from idx_biz_jg_inspection_detection_info
where "RECORD" = ui."RECORD"
ORDER BY REC_DATE DESC
limit 1), 'YYYY-MM-DD') nextInspectDate
FROM idx_biz_jg_use_info ui
LEFT JOIN idx_biz_jg_register_info ri on ri."RECORD" = ui."RECORD"
LEFT JOIN idx_biz_jg_tech_params_pipeline pp ON pp."RECORD" = ui."RECORD"
</sql>
<select id="getDeviceListByProjectContraption" resultType="java.util.Map">
<include refid="page-list-pipeline"/>
<where>
ri."EQU_CATEGORY" = '8300'
and ui."DATA_SOURCE" like 'jg%' and ui."DATA_SOURCE" not like 'jg_his%'
<if test="projectContraption != null and projectContraption != ''">
and ui."PROJECT_CONTRAPTION" = #{projectContraption}
</if>
-- 排除 已经做过安装告知的
AND NOT EXISTS (
SELECT 1
FROM
tzs_jg_installation_notice n,
tzs_jg_installation_notice_eq ne
WHERE
n.sequence_nbr = ne.equip_transfer_id
AND ne.equ_id = ui."RECORD"
AND (
n.notice_status = '6621'
OR n.notice_status = '6612'
OR n.notice_status = '6614'
OR n.notice_status = '6615'
OR n.notice_status = '6616'
OR n.notice_status = '6618'
)
AND n.is_delete = 0
)
</where>
</select>
<select id="getPipelineEquInfoByRecord" resultType="java.util.Map">
<include refid="page-list-pipeline"/>
<where>
<if test="record != null and record != ''">
and ui."RECORD" = #{record}
</if>
</where>
</select>
</mapper>
......@@ -169,4 +169,12 @@ public class JgInstallationNoticeController extends BaseController {
public ResponseModel<Boolean> historyDataRepair() {
return ResponseHelper.buildResponse(iJgInstallationNoticeService.historyDataRepair());
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询工程装置下的所有未做安装告知、不在安装告知流程、安装告知作废的设备",
notes = "查询工程装置下的所有未做安装告知、不在安装告知流程、安装告知作废的设备")
@GetMapping(value = "/getDeviceListByProjectContraption")
public ResponseModel<Object> getDeviceListByProjectContraption(@RequestParam("projectContraption") String projectContraption) {
return ResponseHelper.buildResponse(iJgInstallationNoticeService.getDeviceListByProjectContraption(projectContraption));
}
}
......@@ -34,10 +34,11 @@ public class EquipTechParamPipeline extends AbstractEquipBaseEntity {
@TableField(value = "\"STATUS\"")
private String status;
/**
* * 工程(装置)名称
* * 工程(装置)名称--废弃,以use_info表为准
*/
@Deprecated
@TableField(value = "\"DEVICE_NAME\"")
private String deviceName;
/**
......
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