Commit 0731dbc2 authored by suhuiguang's avatar suhuiguang

1.压力管道按照装置报检

parent c60c35d8
package com.yeejoin.amos.boot.module.jyjc.api.entity;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 检验检测历史数据表
*
* @author system_generator
* @date 2025-01-14
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "tz_jyjc_inspection_history", autoResultMap = true)
public class JyjcInspectionHistory extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 来源seq
*/
@TableField("s_seq")
private Long sSeq;
/**
* 推送数据
*/
@TableField(value = "history_data", typeHandler = JacksonTypeHandler.class)
private JSONObject historyData;
/**
* 备注
*/
@TableField("remark")
private String remark;
/**
* 来源类型
*/
@TableField("s_type")
private String sType;
}
...@@ -124,6 +124,13 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti ...@@ -124,6 +124,13 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti
* @return List<Map<String, Object>> * @return List<Map<String, Object>>
*/ */
List<Map<String, Object>> selectPieLineListOfInspect(@Param("records") List<String> records); List<Map<String, Object>> selectPieLineListOfInspect(@Param("records") List<String> records);
/**
* 查询指定管道的信息,样式为汇总表样式-无检验信息
* @param records 管道ids
* @return List<Map<String, Object>>
*/
List<Map<String, Object>> selectPieLineListOfNoInspectInfo(@Param("records") List<String> records);
} }
package com.yeejoin.amos.boot.module.jyjc.api.mapper;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionHistory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 检验检测历史数据表 Mapper 接口
*
* @author system_generator
* @date 2025-01-14
*/
public interface JyjcInspectionHistoryMapper extends BaseMapper<JyjcInspectionHistory> {
}
package com.yeejoin.amos.boot.module.jyjc.api.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.typroject.tyboot.core.rdbms.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 检验检测历史数据表
*
* @author system_generator
* @date 2025-01-14
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="JyjcInspectionHistoryModel", description="检验检测历史数据表")
public class JyjcInspectionHistoryModel extends BaseModel {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "来源seq")
private Long sSeq;
@ApiModelProperty(value = "推送数据")
private String historyData;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "来源类型")
private String sType;
}
package com.yeejoin.amos.boot.module.jyjc.api.service;
/**
* 检验检测历史数据表接口类
*
* @author system_generator
* @date 2025-01-14
*/
public interface IJyjcInspectionHistoryService {}
...@@ -25,4 +25,11 @@ public interface IJyjcInspectionResultParamService { ...@@ -25,4 +25,11 @@ public interface IJyjcInspectionResultParamService {
* @return 字段列表 * @return 字段列表
*/ */
List<Map<String,Object>> getParamByEquipTypeCode(String equipTypeCode); List<Map<String,Object>> getParamByEquipTypeCode(String equipTypeCode);
/**
* 根据
* @param sequenceNbr
* @return
*/
JyjcInspectionResultParam getOneParamByResultSeq(Long sequenceNbr);
} }
...@@ -682,6 +682,50 @@ ...@@ -682,6 +682,50 @@
LEFT JOIN idx_biz_jg_register_info ri on ri."RECORD" = ui."RECORD" 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" LEFT JOIN idx_biz_jg_tech_params_pipeline pp ON pp."RECORD" = ui."RECORD"
</sql> </sql>
<sql id="page-list-pipeline-no-inspect">
SELECT
ui."USE_UNIT_NAME" useUnitName,
ui."USE_UNIT_CREDIT_CODE" useUnitCreditCode,
ui."PROJECT_CONTRAPTION_ID" as projectContraptionId,
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,
ui.IS_INTO_MANAGEMENT as isIntoManagement,
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,
-- 历史遗留问题 故 as
pp."PIPE_NAME" as productName,
ri."BRAND_NAME" brandName,
ri."EQU_TYPE" equType,
ri."EQU_CODE_TYPE" equCodeType,
ri."WHETHER_VEHICLE_CYLINDER" whetherVehicleCylinder,
ri."USE_ORG_CODE" useOrgCode,
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,
pp."WORK_PRESSURE" AS workPressure,
pp."WORK_TEMPERATURE" AS workTemperature,
pp."WORK_MEDIUM" AS workMedium
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="selectPieLineListByProjectId" resultType="java.util.Map"> <select id="selectPieLineListByProjectId" resultType="java.util.Map">
select * from ( select * from (
<include refid="page-list-pipeline"/> <include refid="page-list-pipeline"/>
...@@ -700,4 +744,13 @@ ...@@ -700,4 +744,13 @@
</foreach> </foreach>
ORDER BY ui.REC_DATE DESC ORDER BY ui.REC_DATE DESC
</select> </select>
<select id="selectPieLineListOfNoInspectInfo" resultType="java.util.Map">
<include refid="page-list-pipeline-no-inspect"/>
WHERE
ui.record in
<foreach collection="records" item="record" open="(" close=")" separator=",">
#{record}
</foreach>
ORDER BY ui.REC_DATE DESC
</select>
</mapper> </mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionHistoryMapper">
</mapper>
package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionHistory;
import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionHistoryMapper;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionHistoryModel;
import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionHistoryService;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.Date;
/**
* 检验检测历史数据表服务实现类
*
* @author system_generator
* @date 2025-01-14
*/
@Service
public class JyjcInspectionHistoryServiceImpl extends BaseService<JyjcInspectionHistoryModel, JyjcInspectionHistory, JyjcInspectionHistoryMapper> implements IJyjcInspectionHistoryService {
public JyjcInspectionHistory getBySSeq(Long sSeq) {
return this.getOne(new LambdaQueryWrapper<JyjcInspectionHistory>().eq(JyjcInspectionHistory::getSSeq, sSeq));
}
public void saveBySeq(Long sSeq, JSONObject hisData, String sType) {
JyjcInspectionHistory history = this.getBySSeq(sSeq);
if (history != null) {
history.setHistoryData(hisData);
this.updateById(history);
} else {
history = new JyjcInspectionHistory();
history.setHistoryData(hisData);
history.setSSeq(sSeq);
history.setRecDate(new Date());
history.setSType(sType);
super.saveOrUpdate(history);
}
}
}
\ No newline at end of file
...@@ -60,4 +60,11 @@ public class JyjcInspectionResultParamServiceImpl extends BaseService<JyjcInspec ...@@ -60,4 +60,11 @@ public class JyjcInspectionResultParamServiceImpl extends BaseService<JyjcInspec
} }
return paramList; return paramList;
} }
@Override
public JyjcInspectionResultParam getOneParamByResultSeq(Long sequenceNbr) {
LambdaQueryWrapper<JyjcInspectionResultParam> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(JyjcInspectionResultParam::getResultSeq, sequenceNbr);
return this.baseMapper.selectOne(wrapper);
}
} }
\ No newline at end of file
...@@ -171,5 +171,6 @@ ...@@ -171,5 +171,6 @@
</otherwise> </otherwise>
</choose> </choose>
and not EXISTS (SELECt 1 FROM tz_jyjc_inspection_application a where a.status='6611' and a.application_unit_code=#{companyCode} and a.project_contraption_id = pc.sequence_nbr) and not EXISTS (SELECt 1 FROM tz_jyjc_inspection_application a where a.status='6611' and a.application_unit_code=#{companyCode} and a.project_contraption_id = pc.sequence_nbr)
and (pc.project_contraption_parent_id is null or pc.project_contraption_parent_id = '')
</select> </select>
</mapper> </mapper>
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