Commit 1675b6a3 authored by tianbo's avatar tianbo

Merge branch 'develop_tzs_register' into develop_tzs_bugfix

parents 09a0b393 9440143b
...@@ -5,6 +5,9 @@ import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto; ...@@ -5,6 +5,9 @@ import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
@Repository @Repository
public interface ESEquipmentCategory extends PagingAndSortingRepository<ESEquipmentCategoryDto, String> { public interface ESEquipmentCategory extends PagingAndSortingRepository<ESEquipmentCategoryDto, String> {
List<ESEquipmentCategoryDto> findAllByProjectContraptionId(String PROJECT_CONTRAPTION_ID);
} }
...@@ -173,4 +173,10 @@ public class ESEquipmentCategoryDto { ...@@ -173,4 +173,10 @@ public class ESEquipmentCategoryDto {
@Field(type = FieldType.Text) @Field(type = FieldType.Text)
private String INFORMATION_SITUATION; private String INFORMATION_SITUATION;
/**
* 工程装置id(工业管道使用)
*/
@Field(type = FieldType.Keyword, name = "PROJECT_CONTRAPTION_ID")
private String projectContraptionId;
} }
package com.yeejoin.amos.boot.module.jg.api.dto; package com.yeejoin.amos.boot.module.jg.api.dto;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
...@@ -323,4 +324,31 @@ public class JgInstallationNoticeDto extends BaseDto { ...@@ -323,4 +324,31 @@ public class JgInstallationNoticeDto extends BaseDto {
* 冗余设备种类 * 冗余设备种类
*/ */
private String equListCode; private String equListCode;
/**
* 管道工程装置编号
*/
private String projectContraptionNo;
/**
* 管道工程装置设备数量(m)
*/
private String pipelineLength;
/**
* 管道工程装置id
*/
private String projectContraptionId;
/**
* 装置起始位置-压力管道使用
*/
@ApiModelProperty("start_latitude_longitude")
private JSONObject startLatitudeLongitude;
/**
* 装置结束位置-压力管道使用
*/
@ApiModelProperty("end_latitude_longitude")
private JSONObject endLatitudeLongitude;
} }
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine;
import com.yeejoin.amos.boot.biz.common.annotation.Group;
import lombok.Data;
import lombok.EqualsAndHashCode;
@EqualsAndHashCode(callSuper = true)
@Data
@Group(value = "equip_design_info")
public class PieLineDesignChangeDataDto extends BaseChangeDataDto {
@FieldDisplayDefine(value = "设计单位名称")
private String designUnitName;
}
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine;
import com.yeejoin.amos.boot.biz.common.annotation.Group;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 安全追溯-压力管道
*
* @author system_generator
* @date 2023-08-17
*/
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@Group(value = "PipelineChangeItemDto")
public class PipelineChangeItemDto extends TechParamsPipelineChangeFieldDto {
@FieldDisplayDefine(value = "设计单位名称")
private String designUnitName;
}
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine;
import com.yeejoin.amos.boot.biz.common.annotation.Group;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 管道工程装置表
*
* @author system_generator
* @date 2024-12-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Group(value = "idx_biz_jg_project_contraption")
@ApiModel(value = "ProjectContraptionChangeFieldDto", description = "管道工程装置表")
public class ProjectContraptionChangeDataDto extends BaseChangeDataDto {
@FieldDisplayDefine(value = "主键", isExist = false)
private String projectContraptionId;
private static final long serialVersionUID = 1L;
@FieldDisplayDefine(value = "工程装置名称")
private String projectContraption;
@FieldDisplayDefine(value = "工程装置编号")
private String projectContraptionNo;
@FieldDisplayDefine(value = "设备品种代码")
private String equDefineCode;
@FieldDisplayDefine(value = "设备品种名称")
private String equDefine;
@FieldDisplayDefine(value = "装置管道总长度(m)", isExist = false)
private Double pipelineLength;
@FieldDisplayDefine(value = "产品照片附件", type = JSON.class)
private String productPhoto;
@FieldDisplayDefine(value = "其他附件", type = JSON.class)
private String otherAccessories;
@FieldDisplayDefine(value = "产品质量合格证明", type = JSON.class)
private String productQualificationCertificate;
}
...@@ -69,4 +69,11 @@ public class TaskMessageDto { ...@@ -69,4 +69,11 @@ public class TaskMessageDto {
* 登记类型(新增使用登记,历史使用登记,特殊使用登记) * 登记类型(新增使用登记,历史使用登记,特殊使用登记)
*/ */
String regType; String regType;
/**
* 设备种类code
*/
String EQU_LIST_CODE;
} }
package com.yeejoin.amos.boot.module.jg.api.dto; package com.yeejoin.amos.boot.module.jg.api.dto;
import com.alibaba.fastjson.JSON;
import com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine; import com.yeejoin.amos.boot.biz.common.annotation.FieldDisplayDefine;
import com.yeejoin.amos.boot.biz.common.annotation.Group; import com.yeejoin.amos.boot.biz.common.annotation.Group;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
/** /**
...@@ -12,14 +12,19 @@ import lombok.experimental.Accessors; ...@@ -12,14 +12,19 @@ import lombok.experimental.Accessors;
* @author system_generator * @author system_generator
* @date 2023-08-17 * @date 2023-08-17
*/ */
@EqualsAndHashCode(callSuper = true)
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@Group(value = "tech_params_pipeline") @Group(value = "tech_params_pipeline")
public class TechParamsPipelineChangeFieldDto extends BaseTechParamsFieldDto { public class TechParamsPipelineChangeFieldDto extends BaseTechParamsFieldDto {
@FieldDisplayDefine(value = "管道类别") @FieldDisplayDefine(value = "w唯一标识", isExist = false)
private String pipelineClass; private String record;
@FieldDisplayDefine(value = "管道名称(登记单元)")
private String pipeName;
@FieldDisplayDefine(value = "管道编号") @FieldDisplayDefine(value = "管道编号")
...@@ -39,27 +44,31 @@ public class TechParamsPipelineChangeFieldDto extends BaseTechParamsFieldDto { ...@@ -39,27 +44,31 @@ public class TechParamsPipelineChangeFieldDto extends BaseTechParamsFieldDto {
@FieldDisplayDefine(value = "管道长度") @FieldDisplayDefine(value = "管道长度")
private String pipeLength; private Double pipeLength;
@FieldDisplayDefine(value = "起/始位置", type = JSON.class)
private String startePosition;
@FieldDisplayDefine(value = "压力") @FieldDisplayDefine(value = "设计压力")
private String pressure; private String pressure;
@FieldDisplayDefine(value = "温度") @FieldDisplayDefine(value = "设计温度")
private String temperature; private String temperature;
@FieldDisplayDefine(value = "介质") @FieldDisplayDefine(value = "设计介质")
private String medium; private String medium;
@FieldDisplayDefine(value = "工作压力")
private String workPressure;
@FieldDisplayDefine(value = "工作温度")
private String workTemperature;
@FieldDisplayDefine(value = "工作介质")
private String workMedium;
@FieldDisplayDefine(value = "备注") @FieldDisplayDefine(value = "备注")
private String remarks; private String remarks;
} }
...@@ -487,4 +487,21 @@ public class JgInstallationNotice extends BaseEntity { ...@@ -487,4 +487,21 @@ public class JgInstallationNotice extends BaseEntity {
*/ */
@TableField("equ_list_code") @TableField("equ_list_code")
private String equListCode; private String equListCode;
/**
* 工程装置主键-压力管道使用
*/
@TableField("project_contraption_id")
private String projectContraptionId;
/**
* 装置起始位置-压力管道使用
*/
@TableField("start_latitude_longitude")
private String startLatitudeLongitude;
/**
* 装置结束位置-压力管道使用
*/
@TableField("end_latitude_longitude")
private String endLatitudeLongitude;
} }
...@@ -261,4 +261,10 @@ public class JgUseRegistration extends BaseEntity { ...@@ -261,4 +261,10 @@ public class JgUseRegistration extends BaseEntity {
*/ */
@TableField("supervision_org_code") @TableField("supervision_org_code")
private String supervisionOrgCode; private String supervisionOrgCode;
/**
* 工程装置id
*/
@TableField("project_contraption_id")
private String projectContraptionId;
} }
...@@ -44,4 +44,8 @@ public interface JgInstallationNoticeMapper extends CustomBaseMapper<JgInstallat ...@@ -44,4 +44,8 @@ public interface JgInstallationNoticeMapper extends CustomBaseMapper<JgInstallat
List<CompanyEquipCountDto> queryForFlowingEquipList(); List<CompanyEquipCountDto> queryForFlowingEquipList();
List<InstallationVo> queryInstallationInIds(@Param("ids") List<String> ids); List<InstallationVo> queryInstallationInIds(@Param("ids") List<String> ids);
List<Map<String, Object>> getDeviceListByProjectContraption(@Param("projectContraptionSeq") String projectContraptionSeq);
List<Map<String, Object>> getPipelineEquInfoByRecords(@Param("records") List<String> records);
} }
package com.yeejoin.amos.boot.module.jg.api.mapper; package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgResumeInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgResumeInfo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/** /**
* Mapper 接口 * Mapper 接口
...@@ -13,5 +14,5 @@ import java.util.List; ...@@ -13,5 +14,5 @@ import java.util.List;
*/ */
public interface JgResumeInfoMapper extends BaseMapper<JgResumeInfo> { public interface JgResumeInfoMapper extends BaseMapper<JgResumeInfo> {
void deleteBatchByBusinessId(@Param("idList") List<String> idList); void deleteBatchByBusinessId(@Param("idList") Set<String> idList);
} }
...@@ -77,6 +77,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> { ...@@ -77,6 +77,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
@MapKey("records") @MapKey("records")
List<Map<String, Object>> queryForUnitPipelineEquipment(@Param("records") List<String> records); List<Map<String, Object>> queryForUnitPipelineEquipment(@Param("records") List<String> records);
List<Map<String, Object>> queryForUnitPipelineEquipmentForEdit(@Param("records") List<String> records);
@MapKey("id") @MapKey("id")
List<Map<String, Object>> selectEquipList(@Param("id") Long id); List<Map<String, Object>> selectEquipList(@Param("id") Long id);
...@@ -110,4 +112,11 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> { ...@@ -110,4 +112,11 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
List<Map> stopStateCount(@Param("orgCode") String orgCode); List<Map> stopStateCount(@Param("orgCode") String orgCode);
List<Map> cancelStateCount(@Param("orgCode") String orgCode, @Param("cancelType") int cancelType); List<Map> cancelStateCount(@Param("orgCode") String orgCode, @Param("cancelType") int cancelType);
/**
* 查询指定装置下可做使用登记的的管道,样式为汇总表样式
* @param projectContraptionSeq 装置id
* @return List<Map<String, Object>>
*/
List<Map<String, Object>> selectPieLineListByOfCanReg(@Param("projectContraptionSeq") String projectContraptionSeq);
} }
...@@ -85,5 +85,5 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot ...@@ -85,5 +85,5 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
*/ */
JgInstallationNotice cancelApplication(Long sequenceNbr, String cancelReason); JgInstallationNotice cancelApplication(Long sequenceNbr, String cancelReason);
Boolean historyDataRepair(); Object getDeviceListByProjectContraption(String projectContraptionSeq);
} }
...@@ -200,4 +200,114 @@ ...@@ -200,4 +200,114 @@
isn.create_date DESC, isn.apply_no DESC isn.create_date DESC, isn.apply_no DESC
</select> </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."WORK_PRESSURE" workPressure,
pp."WORK_TEMPERATURE" workTemperature,
pp."WORK_MEDIUM" workMedium,
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="projectContraptionSeq != null and projectContraptionSeq != ''">
and ui."PROJECT_CONTRAPTION_ID" = #{projectContraptionSeq}
</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="getPipelineEquInfoByRecords" resultType="java.util.Map">
<include refid="page-list-pipeline"/>
<where>
<if test="records != null and !records.isEmpty()">
and ui."RECORD" in
<foreach collection="records" item="record" open="(" close=")" separator=",">
#{record}
</foreach>
</if>
</where>
</select>
</mapper> </mapper>
...@@ -223,8 +223,8 @@ ...@@ -223,8 +223,8 @@
WHERE LENGTH(t.use_registration_code) = 14 WHERE LENGTH(t.use_registration_code) = 14
AND SUBSTR(t.use_registration_code, 1, 1) IN ('容', '锅', '管', '瓶', '梯', '起', '索', '游', '车') AND SUBSTR(t.use_registration_code, 1, 1) IN ('容', '锅', '管', '瓶', '梯', '起', '索', '游', '车')
AND TRIM(t.use_registration_code) LIKE concat('%(',#{year},')') AND TRIM(t.use_registration_code) LIKE concat('%(',#{year},')')
and tjur.reg_type is null AND (tjur.reg_type IS NULL OR tjur.reg_type = 2)
and tjur.is_delete = 0 AND tjur.is_delete = 0
GROUP BY SUBSTR(t.use_registration_code, 1, 5) GROUP BY SUBSTR(t.use_registration_code, 1, 5)
HAVING code <![CDATA[ <> ]]> '00000' HAVING code <![CDATA[ <> ]]> '00000'
ORDER BY prefix ORDER BY prefix
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
ur.cancel_reason as cancelReason, ur.cancel_reason as cancelReason,
(select group_concat(re.equ_id) from tzs_jg_use_registration_eq re where ur.sequence_nbr = re.equip_transfer_id) as equipId, (select group_concat(re.equ_id) from tzs_jg_use_registration_eq re where ur.sequence_nbr = re.equip_transfer_id) as equipId,
(SELECT (SELECT
group_concat(other.supervisory_code) group_concat(DISTINCT other.supervisory_code)
from from
idx_biz_jg_register_info jri idx_biz_jg_register_info jri
LEFT JOIN idx_biz_jg_other_info other on jri.RECORD = other.RECORD where jri.RECORD in (select re.equ_id from tzs_jg_use_registration_eq re where ur.sequence_nbr = re.equip_transfer_id)) as supervisoryCode , LEFT JOIN idx_biz_jg_other_info other on jri.RECORD = other.RECORD where jri.RECORD in (select re.equ_id from tzs_jg_use_registration_eq re where ur.sequence_nbr = re.equip_transfer_id)) as supervisoryCode ,
...@@ -500,9 +500,11 @@ ...@@ -500,9 +500,11 @@
ibjui."CITY_NAME" as installCity, ibjui."CITY_NAME" as installCity,
ibjui."COUNTY_NAME" as installCounty, ibjui."COUNTY_NAME" as installCounty,
ibjci."USC_UNIT_CREDIT_CODE" as uscUnitCreditCode, ibjci."USC_UNIT_CREDIT_CODE" as uscUnitCreditCode,
ibjci."USC_UNIT_NAME" as uscUnitName ibjci."USC_UNIT_NAME" as uscUnitName,
re."INSTALLATION_IS_COMPLETE" as installationIsComplete
FROM "idx_biz_jg_construction_info" AS ibjci FROM "idx_biz_jg_construction_info" AS ibjci
left join "idx_biz_jg_use_info" as ibjui on ibjui."RECORD" = ibjci."RECORD" left join "idx_biz_jg_use_info" as ibjui on ibjui."RECORD" = ibjci."RECORD"
left join "idx_biz_jg_register_info" as re on re."RECORD" = ibjci."RECORD"
WHERE ibjci."RECORD" = #{id} WHERE ibjci."RECORD" = #{id}
ORDER BY ibjci."rec_date" desc ORDER BY ibjci."rec_date" desc
LIMIT 1 LIMIT 1
...@@ -590,11 +592,13 @@ ...@@ -590,11 +592,13 @@
SELECT SELECT
ui."USE_UNIT_NAME" useUnitName, ui."USE_UNIT_NAME" useUnitName,
ui."USE_UNIT_CREDIT_CODE" useUnitCreditCode, ui."USE_UNIT_CREDIT_CODE" useUnitCreditCode,
ui."PROJECT_CONTRAPTION_ID" as projectContraptionId,
to_char(ui."USE_DATE", 'YYYY-MM') useDate, to_char(ui."USE_DATE", 'YYYY-MM') useDate,
(SELECT DESIGN_UNIT_NAME from idx_biz_jg_design_info where "RECORD" = ui."RECORD") designUnitName, (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, (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, 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."RECORD" record,
ui.IS_INTO_MANAGEMENT as isIntoManagement,
ri."EQU_CODE" equCode, ri."EQU_CODE" equCode,
ri."EQU_LIST" equList, ri."EQU_LIST" equList,
(select name from tz_equipment_category where code = ri."EQU_LIST") equListName, (select name from tz_equipment_category where code = ri."EQU_LIST") equListName,
...@@ -602,11 +606,13 @@ ...@@ -602,11 +606,13 @@
(select name from tz_equipment_category where code = ri."EQU_CATEGORY") equCategoryName, (select name from tz_equipment_category where code = ri."EQU_CATEGORY") equCategoryName,
ri."EQU_DEFINE" equDefine, ri."EQU_DEFINE" equDefine,
(select name from tz_equipment_category where code = ri."EQU_DEFINE") equDefineName, (select name from tz_equipment_category where code = ri."EQU_DEFINE") equDefineName,
ri."PRODUCT_NAME" productName, -- 历史遗留问题 故 as
pp."PIPE_NAME" as productName,
ri."BRAND_NAME" brandName, ri."BRAND_NAME" brandName,
ri."EQU_TYPE" equType, ri."EQU_TYPE" equType,
ri."EQU_CODE_TYPE" equCodeType, ri."EQU_CODE_TYPE" equCodeType,
ri."WHETHER_VEHICLE_CYLINDER" whetherVehicleCylinder, ri."WHETHER_VEHICLE_CYLINDER" whetherVehicleCylinder,
ri."USE_ORG_CODE" useOrgCode,
pp."DEVICE_NAME" deviceName, pp."DEVICE_NAME" deviceName,
(select name from cb_data_dictionary where code = pp."DEVICE_LEVEL" and type = 'GBI') deviceLevel, (select name from cb_data_dictionary where code = pp."DEVICE_LEVEL" and type = 'GBI') deviceLevel,
pp."PIPE_NAME" pipeName, pp."PIPE_NAME" pipeName,
...@@ -618,9 +624,12 @@ ...@@ -618,9 +624,12 @@
pp."TEMPERATURE" temperature, pp."TEMPERATURE" temperature,
pp."MEDIUM" medium, pp."MEDIUM" medium,
pp."REMARKS" remarks, 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, pp."WORK_PRESSURE" AS workPressure,
(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, pp."WORK_TEMPERATURE" AS workTemperature,
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 pp."WORK_MEDIUM" AS workMedium,
(select INSPECT_ORG_NAME from idx_biz_jg_inspection_detection_info where "RECORD" = ui."RECORD" ORDER BY INSPECT_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 INSPECT_DATE DESC limit 1)) inspectConclusion,
to_char((select NEXT_INSPECT_DATE from idx_biz_jg_inspection_detection_info where "RECORD" = ui."RECORD" ORDER BY INSPECT_DATE DESC limit 1), 'YYYY-MM-DD') nextInspectDate
FROM FROM
idx_biz_jg_use_info ui idx_biz_jg_use_info ui
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"
...@@ -669,6 +678,34 @@ ...@@ -669,6 +678,34 @@
</foreach> </foreach>
ORDER BY ui.REC_DATE DESC ORDER BY ui.REC_DATE DESC
</select> </select>
<select id="queryForUnitPipelineEquipmentForEdit" resultType="java.util.Map">
SELECT
ibjtpp."PIPE_NAME" AS pipeName,
ibjtpp."PIPELINE_NUMBER" AS pipelineNumber,
ibjtpp."DEVICE_LEVEL" AS deviceLevel,
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PRESSURE" AS pressure,
ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."MEDIUM" AS medium,
ibjtpp."WORK_PRESSURE" AS workPressure,
ibjtpp."WORK_TEMPERATURE" AS workTemperature,
ibjtpp."WORK_MEDIUM" AS workMedium,
ibjtpp."REMARKS" AS remarks,
ibjdi."DESIGN_UNIT_NAME" AS designUnitName,
ibjui."USE_DATE" AS useDate,
ibjui."RECORD" AS record
FROM idx_biz_jg_use_info ibjui
LEFT JOIN idx_biz_jg_tech_params_pipeline ibjtpp ON ibjui.RECORD = ibjtpp.RECORD
LEFT JOIN idx_biz_jg_design_info ibjdi ON ibjui.RECORD = ibjdi.RECORD
WHERE
ibjui.record in
<foreach collection="records" item="record" open="(" close=")" separator=",">
#{record}
</foreach>
ORDER BY ibjui.REC_DATE DESC
</select>
<sql id="page-list-vessel"> <sql id="page-list-vessel">
SELECT SELECT
ui."USE_UNIT_NAME" useUnitName, ui."USE_UNIT_NAME" useUnitName,
...@@ -1009,6 +1046,17 @@ ...@@ -1009,6 +1046,17 @@
GROUP BY GROUP BY
EQU_CATEGORY EQU_CATEGORY
</select> </select>
<select id="selectPieLineListByOfCanReg" resultType="java.util.Map">
select * from (
<include refid="page-list-pipeline"/>
WHERE
ri."EQU_CATEGORY" = '8300'
and ui."PROJECT_CONTRAPTION_ID" = #{projectContraptionSeq}
AND ui.IS_INTO_MANAGEMENT = true
and (length(ri.USE_ORG_CODE) = 0 or ri.USE_ORG_CODE is null)
ORDER BY ui.REC_DATE DESC
)
</select>
<sql id="list-cylinder"> <sql id="list-cylinder">
SELECT SELECT
......
...@@ -45,6 +45,4 @@ public class BizDataChangeController { ...@@ -45,6 +45,4 @@ public class BizDataChangeController {
@RequestParam(required = false) String bizId) { @RequestParam(required = false) String bizId) {
return ResponseHelper.buildResponse(bizDataChangeService.queryDetail(applyNo, bizType, model, bizId)); return ResponseHelper.buildResponse(bizDataChangeService.queryDetail(applyNo, bizType, model, bizId));
} }
} }
...@@ -196,6 +196,31 @@ public class CommonController extends BaseController { ...@@ -196,6 +196,31 @@ public class CommonController extends BaseController {
return ResponseHelper.buildResponse(commonService.equipmentClassification(type)); return ResponseHelper.buildResponse(commonService.equipmentClassification(type));
} }
/**
* 设备分类 去掉管道分类
*
* @param type 1,设备种类 2,设备类别 3,设备品种
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equipmentClassificationNoPipeline")
@ApiOperation(httpMethod = "GET", value = "设备分类", notes = "1,设备种类 2,设备类别 3,设备品种")
public ResponseModel<List<EquipmentCategoryDto>> equipmentClassificationNoPipeline(@RequestParam(value = "type") String type) {
return ResponseHelper.buildResponse(commonService.equipmentClassificationNoPipeline(type));
}
/**
* 设备品种
*
* @param parentId 父级ID
* @return list
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getEquDefineByParentId")
@ApiOperation(httpMethod = "GET", value = "根据父级ID查询设备品种", notes = "根据父级ID查询设备品种")
public ResponseModel<List<EquipmentCategoryDto>> getEquDefineByParentId(@RequestParam(value = "parentId") String parentId) {
return ResponseHelper.buildResponse(commonService.getEquDefineByParentId(parentId));
}
/** /**
* 查询安全管理员的基本信息 * 查询安全管理员的基本信息
......
package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.DataHandlerServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.annotation.Resource;
/**
* 用于业务变更过程中历史数据处理的控制层
*/
@Api(tags = "用于业务变更过程中历史数据处理的控制层")
@RestController
@RequestMapping(value = "/dataHandler")
public class DataHandlerController extends BaseController {
@Resource
private DataHandlerServiceImpl dataHandlerService;
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "安装告知压力管道历史数据修复-详情中的设备列表修改为汇总表格式", notes = "安装告知压力管道历史数据修复-详情中的设备列表修改为汇总表格式")
@GetMapping(value = "/installNotice/deviceListInForm")
public ResponseModel<Boolean> deviceListInFormWithInstallNotice() {
return ResponseHelper.buildResponse(dataHandlerService.deviceListInFormWithInstallNotice());
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "向新增的工程装置表刷入数据", notes = "向新增的工程装置表刷入数据")
@GetMapping(value = "/projectContraption/writeData")
public ResponseModel<Boolean> writeData2ProjectContraption() {
return ResponseHelper.buildResponse(dataHandlerService.writeData2ProjectContraption());
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "刷入工程装置id到es的idx_biz_view_jg_all索引", notes = "刷入工程装置id到es的idx_biz_view_jg_all索引")
@GetMapping(value = "/jgAllIndex/writeProjectContraptionId")
public ResponseModel<String> writeProjectContraptionId() {
return ResponseHelper.buildResponse(dataHandlerService.writeProjectContraptionId());
}
}
package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectContraptionDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
import java.util.Map;
/**
* 管道工程装置表
*
* @author system_generator
* @date 2024-12-11
*/
@RestController
@Api(tags = "管道工程装置表Api")
@RequestMapping(value = "/idx-biz-jg-project-contraption")
public class IdxBizJgProjectContraptionController extends BaseController {
@Autowired
IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionServiceImpl;
/**
* 新增管道工程装置表
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增管道工程装置表", notes = "新增管道工程装置表")
public ResponseModel<IdxBizJgProjectContraptionDto> save(@RequestBody IdxBizJgProjectContraptionDto model) {
model = idxBizJgProjectContraptionServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新管道工程装置表", notes = "根据sequenceNbr更新管道工程装置表")
public ResponseModel<IdxBizJgProjectContraptionDto> updateBySequenceNbrIdxBizJgProjectContraption(@RequestBody IdxBizJgProjectContraptionDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除管道工程装置表及设备信息", notes = "根据sequenceNbr删除管道工程装置表及设备信息")
public ResponseModel<Boolean> deleteBySequenceNbr(@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.deleteProjectAndEquInfoBySeq(sequenceNbr));
}
/**
* 根据入参 分页查询(当前)单位下的工程管道
*
* @param params - isIntoManagement 是否是否纳管 true/false
* - useRegistrationCode 使用登记编号 string()
* - regCodeIsNull 使用登记编号是否为空 true/false
* @param current 当前页
* @param size 每页大小
* @return result
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/pageByParams")
@ApiOperation(httpMethod = "GET", value = "根据入参 分页查询(当前)单位下的工程管道", notes = "根据入参 分页查询(当前)单位下的工程管道")
public ResponseModel<IPage<IdxBizJgProjectContraption>> proConPageByParams(
@RequestParam Map<String, String> params,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
Page<IdxBizJgProjectContraption> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
ReginParams reginParams = getSelectedOrgInfo();
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.proConPageByParams(params, page, reginParams));
}
/**
* 根据入参 列表查询(当前)单位下的工程管道
*
* @param params - isIntoManagement 是否是否纳管 true/false
* - useRegistrationCode 使用登记编号 string()
* - regCodeIsNull 使用登记编号是否为空 true/false
* @return result
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/listByParams")
@ApiOperation(httpMethod = "GET", value = "根据入参 列表查询(当前)单位下的工程管道", notes = "根据入参 列表查询(当前)单位下的工程管道")
public ResponseModel<List<IdxBizJgProjectContraption>> proConListByParams(@RequestParam Map<String, String> params) {
ReginParams reginParams = getSelectedOrgInfo();
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.proConListByParams(params, reginParams));
}
/**
* 根据sequenceNbr查询详情
*
* @param sequenceNbr 主键
* @return ResponseModel
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/details")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个管道工程装置表", notes = "根据sequenceNbr查询单个管道工程装置表")
public ResponseModel<Map<String, Map<String, Object>>> selectOne(@RequestParam("sequenceNbr") String sequenceNbr) {
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.details(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "管道工程装置表分页查询", notes = "管道工程装置表分页查询")
public ResponseModel<Page<IdxBizJgProjectContraptionDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<IdxBizJgProjectContraptionDto> page = new Page<IdxBizJgProjectContraptionDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.queryForIdxBizJgProjectContraptionPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "管道工程装置表列表全部数据查询", notes = "管道工程装置表列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<IdxBizJgProjectContraptionDto>> selectForList() {
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.queryForIdxBizJgProjectContraptionList());
}
}
...@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.component.event.RestEventTrigger; import org.typroject.tyboot.component.event.RestEventTrigger;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
...@@ -162,11 +163,12 @@ public class JgInstallationNoticeController extends BaseController { ...@@ -162,11 +163,12 @@ public class JgInstallationNoticeController extends BaseController {
return ResponseHelper.buildResponse(result); return ResponseHelper.buildResponse(result);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "安装告知历史数据修复", notes = "安装告知历史数据修复") @ApiOperation(httpMethod = "GET", value = "查询工程装置下的所有未做安装告知、不在安装告知流程、安装告知作废的设备",
@GetMapping(value = "/historyDataRepair") notes = "查询工程装置下的所有未做安装告知、不在安装告知流程、安装告知作废的设备")
public ResponseModel<Boolean> historyDataRepair() { @GetMapping(value = "/getDeviceListByProjectContraptionSeq")
return ResponseHelper.buildResponse(iJgInstallationNoticeService.historyDataRepair()); public ResponseModel<Object> getDeviceListByProjectContraption(@RequestParam Map<String, Object> params) {
String projectContraptionSeq = ValidationUtil.isEmpty(params.get("sequenceNbr")) ? String.valueOf(params.get("record")) : params.get("sequenceNbr").toString();
return ResponseHelper.buildResponse(iJgInstallationNoticeService.getDeviceListByProjectContraption(projectContraptionSeq));
} }
} }
package com.yeejoin.amos.boot.module.jg.biz.controller; package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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;
...@@ -8,6 +9,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto; ...@@ -8,6 +9,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration; import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
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.biz.service.impl.JgUseRegistrationServiceImpl; import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.component.feign.utils.FeignUtil; import com.yeejoin.amos.component.feign.utils.FeignUtil;
import com.yeejoin.amos.feign.privilege.Privilege; import com.yeejoin.amos.feign.privilege.Privilege;
...@@ -25,6 +27,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType; ...@@ -25,6 +27,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.text.ParseException; import java.text.ParseException;
...@@ -341,4 +344,25 @@ public class JgUseRegistrationController extends BaseController { ...@@ -341,4 +344,25 @@ public class JgUseRegistrationController extends BaseController {
return ResponseHelper.buildResponse(jgUseRegistrationServiceImpl.updateCylinderCategoryByEquCodeBatch(cylinderCategory, equCodeList)); return ResponseHelper.buildResponse(jgUseRegistrationServiceImpl.updateCylinderCategoryByEquCodeBatch(cylinderCategory, equCodeList));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/jgProjectContraptionPage")
@ApiOperation(value = "查询指定使用单位下的可用装置,已纳管且使用登记证编号为空或者null", notes = "不包括流程中的")
public ResponseModel<IPage<IdxBizJgProjectContraption>> getJgProjectContraptionPage(@RequestParam String useUnitCreditCode,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
Page<IdxBizJgProjectContraption> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
IPage<IdxBizJgProjectContraption> re = jgUseRegistrationServiceImpl.getJgProjectContraptionPage(useUnitCreditCode, page);
return ResponseHelper.buildResponse(re);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询工程装置下的所有做过安装告知但是为做使用登记的管道", notes = "查询工程装置下的所有做过安装告知但是为做使用登记的管道")
@GetMapping(value = "/getDeviceListByProjectContraptionSeq")
public ResponseModel<Object> getDeviceListByProjectContraption(@RequestParam("record") String projectContraptionSeq) {
return ResponseHelper.buildResponse(jgUseRegistrationServiceImpl.getDeviceListByProjectContraption(projectContraptionSeq));
}
} }
...@@ -17,7 +17,7 @@ public interface IChangeDataProcessStrategy { ...@@ -17,7 +17,7 @@ public interface IChangeDataProcessStrategy {
List<ChangeDataDto> handle(Map<String, Object> changeData, String defaultChangeId); List<ChangeDataDto> handle(Map<String, Object> changeData, String defaultChangeId);
Map<String, ?> getDetail(String applyNo, String bizId); Map<String, Object> getDetail(String applyNo, String bizId);
/** /**
* 可处理类型 * 可处理类型
......
...@@ -237,4 +237,8 @@ public interface ICommonService { ...@@ -237,4 +237,8 @@ public interface ICommonService {
* @return * @return
*/ */
Boolean useRegistrationCertificateAccountUnique(String useRegistrationCode, String equipId); Boolean useRegistrationCertificateAccountUnique(String useRegistrationCode, String equipId);
List<EquipmentCategoryDto> equipmentClassificationNoPipeline(String type);
List<EquipmentCategoryDto> getEquDefineByParentId(String parentId);
} }
...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service; ...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo;
import java.util.List;
/** /**
* 施工信息表接口类 * 施工信息表接口类
* *
...@@ -13,5 +15,7 @@ public interface IIdxBizJgConstructionInfoService extends IService<IdxBizJgConst ...@@ -13,5 +15,7 @@ public interface IIdxBizJgConstructionInfoService extends IService<IdxBizJgConst
boolean saveOrUpdateData(IdxBizJgConstructionInfo constructionInfo); boolean saveOrUpdateData(IdxBizJgConstructionInfo constructionInfo);
boolean saveOrUpdateBatch(List<IdxBizJgConstructionInfo> constructionInfoList);
IdxBizJgConstructionInfo queryNewestDetailByRecord(String record); IdxBizJgConstructionInfo queryNewestDetailByRecord(String record);
} }
...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service; ...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgDesignInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgDesignInfo;
import java.util.List;
/** /**
* 安全追溯-设计信息表接口类 * 安全追溯-设计信息表接口类
* *
...@@ -13,5 +15,7 @@ public interface IIdxBizJgDesignInfoService { ...@@ -13,5 +15,7 @@ public interface IIdxBizJgDesignInfoService {
boolean saveOrUpdateData(IdxBizJgDesignInfo designInfo); boolean saveOrUpdateData(IdxBizJgDesignInfo designInfo);
boolean saveOrUpdateBatch(List<IdxBizJgDesignInfo> designInfoList);
IdxBizJgDesignInfo getOneData(String record); IdxBizJgDesignInfo getOneData(String record);
} }
...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service; ...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgFactoryInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgFactoryInfo;
import java.util.List;
/** /**
* 安全追溯-制造信息接口类 * 安全追溯-制造信息接口类
* *
...@@ -14,4 +16,6 @@ public interface IIdxBizJgFactoryInfoService { ...@@ -14,4 +16,6 @@ public interface IIdxBizJgFactoryInfoService {
boolean saveOrUpdateData(IdxBizJgFactoryInfo factoryInfo); boolean saveOrUpdateData(IdxBizJgFactoryInfo factoryInfo);
IdxBizJgFactoryInfo getOneData(String record); IdxBizJgFactoryInfo getOneData(String record);
boolean saveOrUpdateBatch(List<IdxBizJgFactoryInfo> factoryInfoList);
} }
...@@ -15,4 +15,6 @@ public interface IIdxBizJgInspectionDetectionInfoService { ...@@ -15,4 +15,6 @@ public interface IIdxBizJgInspectionDetectionInfoService {
IdxBizJgInspectionDetectionInfo queryNewestDetailByRecord(String record); IdxBizJgInspectionDetectionInfo queryNewestDetailByRecord(String record);
List<IdxBizJgInspectionDetectionInfo> checkInspectionInfo(List<String> records); List<IdxBizJgInspectionDetectionInfo> checkInspectionInfo(List<String> records);
boolean saveOrUpdateBatch(List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList);
} }
...@@ -17,4 +17,6 @@ public interface IIdxBizJgOtherInfoService { ...@@ -17,4 +17,6 @@ public interface IIdxBizJgOtherInfoService {
IdxBizJgOtherInfo getOneData(String record); IdxBizJgOtherInfo getOneData(String record);
void saveBatch(List<IdxBizJgOtherInfo> otherInfoList); void saveBatch(List<IdxBizJgOtherInfo> otherInfoList);
boolean saveOrUpdateBatch(List<IdxBizJgOtherInfo> otherInfoList);
} }
package com.yeejoin.amos.boot.module.jg.biz.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import java.util.List;
import java.util.Map;
/**
* 管道工程装置表接口类
*
* @author system_generator
* @date 2024-12-11
*/
public interface IIdxBizJgProjectContraptionService {
boolean saveOrUpdateData(IdxBizJgProjectContraption projectContraption);
Boolean deleteProjectAndEquInfoBySeq(Long sequenceNbr);
IPage<IdxBizJgProjectContraption> proConPageByParams(Map<String, String> params, Page<IdxBizJgProjectContraption> page, ReginParams reginParams);
List<IdxBizJgProjectContraption> proConListByParams(Map<String, String> params, ReginParams reginParams);
}
\ No newline at end of file
...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service; ...@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgSupervisionInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgSupervisionInfo;
import java.util.List;
/** /**
* 监督管理信息表接口类 * 监督管理信息表接口类
* *
...@@ -14,4 +16,6 @@ public interface IIdxBizJgSupervisionInfoService { ...@@ -14,4 +16,6 @@ public interface IIdxBizJgSupervisionInfoService {
boolean saveOrUpdateData(IdxBizJgSupervisionInfo supervisionInfo); boolean saveOrUpdateData(IdxBizJgSupervisionInfo supervisionInfo);
IdxBizJgSupervisionInfo getOneData(String record); IdxBizJgSupervisionInfo getOneData(String record);
boolean saveOrUpdateBatch(List<IdxBizJgSupervisionInfo> supervisionInfoList);
} }
...@@ -21,4 +21,6 @@ public interface IIdxBizJgUseInfoService extends IService<IdxBizJgUseInfo> { ...@@ -21,4 +21,6 @@ public interface IIdxBizJgUseInfoService extends IService<IdxBizJgUseInfo> {
List<IdxBizJgUseInfo> getUseInfoListByEquIds(List<String> equIds); List<IdxBizJgUseInfo> getUseInfoListByEquIds(List<String> equIds);
boolean saveBatch(List<IdxBizJgUseInfo> useInfoList); boolean saveBatch(List<IdxBizJgUseInfo> useInfoList);
boolean saveOrUpdateBatch(List<IdxBizJgUseInfo> useInfoList);
} }
package com.yeejoin.amos.boot.module.jg.biz.service.impl; package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.yeejoin.amos.boot.module.jg.api.dto.RequestChangeData; import com.yeejoin.amos.boot.module.jg.api.dto.RequestChangeData;
import com.yeejoin.amos.boot.module.jg.biz.context.BizDataHandleStrategyContext;
import com.yeejoin.amos.boot.module.jg.api.service.IBizDataChangeHandleStrategy; import com.yeejoin.amos.boot.module.jg.api.service.IBizDataChangeHandleStrategy;
import com.yeejoin.amos.boot.module.jg.biz.context.BizDataHandleStrategyContext;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -11,6 +11,7 @@ import java.util.Map; ...@@ -11,6 +11,7 @@ import java.util.Map;
@Service @Service
public class BizDataChangeServiceImpl { public class BizDataChangeServiceImpl {
/** /**
* 变更保存 * 变更保存
* *
...@@ -31,4 +32,5 @@ public class BizDataChangeServiceImpl { ...@@ -31,4 +32,5 @@ public class BizDataChangeServiceImpl {
IBizDataChangeHandleStrategy handleStrategy = BizDataHandleStrategyContext.getStrategy(bizType); IBizDataChangeHandleStrategy handleStrategy = BizDataHandleStrategyContext.getStrategy(bizType);
return handleStrategy.getDetail(applyNo, model, bizId); return handleStrategy.getDetail(applyNo, model, bizId);
} }
} }
...@@ -68,7 +68,6 @@ public class CommonEquipDataProcessService { ...@@ -68,7 +68,6 @@ public class CommonEquipDataProcessService {
this.equipChangeDataUpdateService = equipChangeDataUpdateService; this.equipChangeDataUpdateService = equipChangeDataUpdateService;
} }
public <T extends BaseChangeDataDto> T castMap2Bean(Map<String, Object> map, Class<T> clazz) { public <T extends BaseChangeDataDto> T castMap2Bean(Map<String, Object> map, Class<T> clazz) {
try { try {
T t = clazz.newInstance(); T t = clazz.newInstance();
...@@ -80,6 +79,7 @@ public class CommonEquipDataProcessService { ...@@ -80,6 +79,7 @@ public class CommonEquipDataProcessService {
} }
public void checkValidField(String record, BaseChangeDataDto changeDataDto, String equList, String equCategory, String equDefine) { public void checkValidField(String record, BaseChangeDataDto changeDataDto, String equList, String equCategory, String equDefine) {
// 注册信息 // 注册信息
if (changeDataDto instanceof EquipRegisterChangeDataDto) { if (changeDataDto instanceof EquipRegisterChangeDataDto) {
...@@ -142,7 +142,7 @@ public class CommonEquipDataProcessService { ...@@ -142,7 +142,7 @@ public class CommonEquipDataProcessService {
} }
private List<ChangeDataDto> mergeChangeFields(List<ChangeDataDto> changeDataNew, List<ChangeDataDto> changeDataOld) { public List<ChangeDataDto> mergeChangeFields(List<ChangeDataDto> changeDataNew, List<ChangeDataDto> changeDataOld) {
Map<String, ChangeDataDto> oldKv = changeDataOld.stream().collect(Collectors.toMap(ChangeDataDto::getColumnKey, Function.identity())); Map<String, ChangeDataDto> oldKv = changeDataOld.stream().collect(Collectors.toMap(ChangeDataDto::getColumnKey, Function.identity()));
changeDataNew.forEach(o -> { changeDataNew.forEach(o -> {
// 正常不会出现此情况,old数据 大于等于 new 数据的key // 正常不会出现此情况,old数据 大于等于 new 数据的key
...@@ -323,19 +323,7 @@ public class CommonEquipDataProcessService { ...@@ -323,19 +323,7 @@ public class CommonEquipDataProcessService {
// 压力管道 // 压力管道
TechParamsPipelineChangeFieldDto newPipeline = new TechParamsPipelineChangeFieldDto(); TechParamsPipelineChangeFieldDto newPipeline = new TechParamsPipelineChangeFieldDto();
BeanUtil.copyProperties(JSON.parse(JSONObject.toJSONString(changeData)), newPipeline, true); BeanUtil.copyProperties(JSON.parse(JSONObject.toJSONString(changeData)), newPipeline, true);
savePieLineTechParam(record, allChange, newPipeline);
IdxBizJgTechParamsPipeline techParamsPipeline = iIdxBizJgTechParamsPipelineService.getOneData(record);
// 技术参数对象转换为全部技术参数 ,其他无用字段去掉
TechParamsPipelineChangeFieldDto oldPipeline = BeanUtil.copyProperties(techParamsPipeline, TechParamsPipelineChangeFieldDto.class);
// 字段行转列
List<ChangeDataDto> newPipelineChangeData = this.convertBeanField2Column2(newPipeline, record);
List<ChangeDataDto> oldPipelineChangeData = this.convertBeanField2Column2(oldPipeline, record);
// 比对
List<ChangeDataDto> pipelineChangeFields = this.mergeChangeFields(newPipelineChangeData, oldPipelineChangeData);
// 业务处理
equipChangeDataUpdateService.updateTechParamByRecord(this.buildTableName(TechParamsPipelineChangeFieldDto.class), record, pipelineChangeFields);
// 日志数据记录
allChange.addAll(pipelineChangeFields);
break; break;
case KYSD: case KYSD:
// 客运索道 // 客运索道
...@@ -360,7 +348,22 @@ public class CommonEquipDataProcessService { ...@@ -360,7 +348,22 @@ public class CommonEquipDataProcessService {
} }
} }
private List<ChangeDataDto> convertBeanField2Column2(Object beanData, String record) { public void savePieLineTechParam(String record, List<ChangeDataDto> allChange, TechParamsPipelineChangeFieldDto newPipeline) {
IdxBizJgTechParamsPipeline techParamsPipeline = iIdxBizJgTechParamsPipelineService.getOneData(record);
// 技术参数对象转换为全部技术参数 ,其他无用字段去掉
TechParamsPipelineChangeFieldDto oldPipeline = BeanUtil.copyProperties(techParamsPipeline, TechParamsPipelineChangeFieldDto.class);
// 字段行转列
List<ChangeDataDto> newPipelineChangeData = this.convertBeanField2Column2(newPipeline, record);
List<ChangeDataDto> oldPipelineChangeData = this.convertBeanField2Column2(oldPipeline, record);
// 比对
List<ChangeDataDto> pipelineChangeFields = this.mergeChangeFields(newPipelineChangeData, oldPipelineChangeData);
// 业务处理
equipChangeDataUpdateService.updateTechParamByRecord(this.buildTableName(TechParamsPipelineChangeFieldDto.class), record, pipelineChangeFields);
// 日志数据记录
allChange.addAll(pipelineChangeFields);
}
public List<ChangeDataDto> convertBeanField2Column2(Object beanData, String changeId) {
List<ChangeDataDto> changeData = new ArrayList<>(); List<ChangeDataDto> changeData = new ArrayList<>();
Group group = beanData.getClass().getAnnotation(Group.class); Group group = beanData.getClass().getAnnotation(Group.class);
Field[] fields = beanData.getClass().getDeclaredFields(); Field[] fields = beanData.getClass().getDeclaredFields();
...@@ -374,7 +377,7 @@ public class CommonEquipDataProcessService { ...@@ -374,7 +377,7 @@ public class CommonEquipDataProcessService {
changeDataDto.setColumnKey(field.getName()); changeDataDto.setColumnKey(field.getName());
changeDataDto.setColumnFamily(group.value()); changeDataDto.setColumnFamily(group.value());
changeDataDto.setColumnLabel(fieldName); changeDataDto.setColumnLabel(fieldName);
changeDataDto.setChangeId(record); changeDataDto.setChangeId(changeId);
Object oV = field.get(beanData); Object oV = field.get(beanData);
if (oV instanceof String) { if (oV instanceof String) {
String value = (String) field.get(beanData); String value = (String) field.get(beanData);
...@@ -395,7 +398,7 @@ public class CommonEquipDataProcessService { ...@@ -395,7 +398,7 @@ public class CommonEquipDataProcessService {
} }
private List<ChangeDataDto> buildDesignInfoNew(EquipDesignChangeDataDto changeDataDto, String record) { public List<ChangeDataDto> buildDesignInfoNew(Object changeDataDto, String record) {
return this.convertBeanField2Column2(changeDataDto, record); return this.convertBeanField2Column2(changeDataDto, record);
} }
...@@ -407,7 +410,7 @@ public class CommonEquipDataProcessService { ...@@ -407,7 +410,7 @@ public class CommonEquipDataProcessService {
return this.convertBeanField2Column2(changeDataDto, record); return this.convertBeanField2Column2(changeDataDto, record);
} }
private List<ChangeDataDto> buildDesignInfoOld(String record) { public List<ChangeDataDto> buildDesignInfoOld(String record) {
EquipDesignChangeDataDto changeDataDto = new EquipDesignChangeDataDto(); EquipDesignChangeDataDto changeDataDto = new EquipDesignChangeDataDto();
IdxBizJgDesignInfo designInfo = idxBizJgDesignInfoMapper.selectOne(new LambdaQueryWrapper<IdxBizJgDesignInfo>().eq(IdxBizJgDesignInfo::getRecord, record)); IdxBizJgDesignInfo designInfo = idxBizJgDesignInfoMapper.selectOne(new LambdaQueryWrapper<IdxBizJgDesignInfo>().eq(IdxBizJgDesignInfo::getRecord, record));
BeanUtil.copyProperties(designInfo, changeDataDto); BeanUtil.copyProperties(designInfo, changeDataDto);
......
...@@ -1348,8 +1348,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -1348,8 +1348,7 @@ public class CommonServiceImpl implements ICommonService {
flowTaskVo.setAssignee(assignee); flowTaskVo.setAssignee(assignee);
ProcessTaskDTO processTaskDTO = cmWorkflowService.assign(flowTaskVo); ProcessTaskDTO processTaskDTO = cmWorkflowService.assign(flowTaskVo);
// 修改待办 // 修改待办
List<TaskV2Model> result = taskV2FeignService.selectListByRelationId(instanceId).getResult(); List<TaskV2Model> collect = taskV2FeignService.selectListByRelationId(instanceId).getResult();
List<TaskV2Model> collect = result.stream().sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r1.getSequenceNbr())).collect(Collectors.toList());
if (collect.isEmpty()) { if (collect.isEmpty()) {
return null; return null;
} }
...@@ -1648,8 +1647,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -1648,8 +1647,7 @@ public class CommonServiceImpl implements ICommonService {
*/ */
public void rollbackTask(String id, JSONObject obj) { public void rollbackTask(String id, JSONObject obj) {
List<TaskV2Model> result = taskV2FeignService.selectListByRelationId(id).getResult(); List<TaskV2Model> list = taskV2FeignService.selectListByRelationId(id).getResult();
List<TaskV2Model> list = result.stream().sorted((r1, r2) -> r2.getSequenceNbr().compareTo(r1.getSequenceNbr())).collect(Collectors.toList());
TaskV2Model model = list.get(0); TaskV2Model model = list.get(0);
taskV2FeignService.delete(String.valueOf(model.getSequenceNbr())); taskV2FeignService.delete(String.valueOf(model.getSequenceNbr()));
...@@ -2070,12 +2068,34 @@ public class CommonServiceImpl implements ICommonService { ...@@ -2070,12 +2068,34 @@ public class CommonServiceImpl implements ICommonService {
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*00$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*00$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break; break;
case "3": case "3":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*0$").matcher(category.getCode()).matches()).collect(Collectors.toList()); result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0A-Za-z]*[A-Za-z0-9]*[^0]0$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break; break;
} }
return result; return result;
} }
@Override
public List<EquipmentCategoryDto> equipmentClassificationNoPipeline(String type) {
List<EquipmentCategoryDto> categoryList = equipmentCategoryMapper.selectClassifyNoStart7And8();
List<EquipmentCategoryDto> result = Collections.emptyList();
switch (type) {
case "1":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*000$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break;
case "2":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*00$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break;
case "3":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0A-Za-z]*[A-Za-z0-9]*[^0]0$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break;
}
return result;
}
@Override
public List<EquipmentCategoryDto> getEquDefineByParentId(String parentId) {
return equipmentCategoryMapper.getEquDefineByParentId(parentId);
}
/** /**
* 排序 :页面列表排序功能支持,将 "字段,ascend" 或 "字段,descend" 转化为对应JSONObject * 排序 :页面列表排序功能支持,将 "字段,ascend" 或 "字段,descend" 转化为对应JSONObject
......
...@@ -22,6 +22,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -22,6 +22,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -136,6 +137,17 @@ public class EquipChangeDataUpdateService { ...@@ -136,6 +137,17 @@ public class EquipChangeDataUpdateService {
} }
} }
public void updateRegisterEsDataPieLine(ProjectContraptionChangeDataDto registerChangeDataDto) {
// es 数据更新
List<ESEquipmentCategoryDto> pieLines = esEquipmentCategory.findAllByProjectContraptionId(registerChangeDataDto.getProjectContraptionId());
for(ESEquipmentCategoryDto esEquipmentCategoryDto: pieLines) {
esEquipmentCategoryDto.setPROJECT_CONTRAPTION(registerChangeDataDto.getProjectContraption());
}
if(!pieLines.isEmpty()){
esEquipmentCategory.saveAll(pieLines);
}
}
private EquipmentCategory getEquipmentCategory(EquipRegisterChangeDataDto registerChangeDataDto) { private EquipmentCategory getEquipmentCategory(EquipRegisterChangeDataDto registerChangeDataDto) {
return equipmentCategoryMapper.selectOne(new LambdaQueryWrapper<EquipmentCategory>().eq(EquipmentCategory::getCode, registerChangeDataDto.getEquDefine())); return equipmentCategoryMapper.selectOne(new LambdaQueryWrapper<EquipmentCategory>().eq(EquipmentCategory::getCode, registerChangeDataDto.getEquDefine()));
} }
...@@ -191,4 +203,12 @@ public class EquipChangeDataUpdateService { ...@@ -191,4 +203,12 @@ public class EquipChangeDataUpdateService {
public void checkDesignChangeData(String record, EquipDesignChangeDataDto equipDesignChangeDataDto) { public void checkDesignChangeData(String record, EquipDesignChangeDataDto equipDesignChangeDataDto) {
} }
public void updatePieLineDesignData(String record, PieLineDesignChangeDataDto equipDesignChangeDataDto) {
LambdaUpdateWrapper<IdxBizJgDesignInfo> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(IdxBizJgDesignInfo::getRecord, record);
updateWrapper.set(IdxBizJgDesignInfo::getDesignUnitName, equipDesignChangeDataDto.getDesignUnitName());
updateWrapper.set(IdxBizJgDesignInfo::getRecDate, new Date());
idxBizJgDesignInfoMapper.update(null, updateWrapper);
}
} }
...@@ -25,6 +25,11 @@ public class IdxBizJgConstructionInfoServiceImpl extends BaseService<IdxBizJgCon ...@@ -25,6 +25,11 @@ public class IdxBizJgConstructionInfoServiceImpl extends BaseService<IdxBizJgCon
return this.saveOrUpdate(constructionInfo); return this.saveOrUpdate(constructionInfo);
} }
@Override
public boolean saveOrUpdateBatch(List<IdxBizJgConstructionInfo> constructionInfoList) {
return super.saveOrUpdateBatch(constructionInfoList);
}
//查询最新的记录 //查询最新的记录
public IdxBizJgConstructionInfo queryNewestDetailByRecord(String record) { public IdxBizJgConstructionInfo queryNewestDetailByRecord(String record) {
IdxBizJgConstructionInfo result = new IdxBizJgConstructionInfo(); IdxBizJgConstructionInfo result = new IdxBizJgConstructionInfo();
......
...@@ -24,6 +24,11 @@ public class IdxBizJgDesignInfoServiceImpl extends BaseService<IdxBizJgDesignInf ...@@ -24,6 +24,11 @@ public class IdxBizJgDesignInfoServiceImpl extends BaseService<IdxBizJgDesignInf
} }
@Override @Override
public boolean saveOrUpdateBatch(List<IdxBizJgDesignInfo> designInfoList) {
return super.saveOrUpdateBatch(designInfoList);
}
@Override
public IdxBizJgDesignInfo getOneData(String record) { public IdxBizJgDesignInfo getOneData(String record) {
return this.getOne(new QueryWrapper<IdxBizJgDesignInfo>().eq("RECORD", record)); return this.getOne(new QueryWrapper<IdxBizJgDesignInfo>().eq("RECORD", record));
} }
......
...@@ -27,4 +27,9 @@ public class IdxBizJgFactoryInfoServiceImpl extends BaseService<IdxBizJgFactoryI ...@@ -27,4 +27,9 @@ public class IdxBizJgFactoryInfoServiceImpl extends BaseService<IdxBizJgFactoryI
public IdxBizJgFactoryInfo getOneData(String record) { public IdxBizJgFactoryInfo getOneData(String record) {
return this.getOne(new QueryWrapper<IdxBizJgFactoryInfo>().eq("RECORD", record)); return this.getOne(new QueryWrapper<IdxBizJgFactoryInfo>().eq("RECORD", record));
} }
@Override
public boolean saveOrUpdateBatch(List<IdxBizJgFactoryInfo> factoryInfoList) {
return super.saveOrUpdateBatch(factoryInfoList);
}
} }
\ No newline at end of file
...@@ -52,4 +52,9 @@ public class IdxBizJgInspectionDetectionInfoServiceImpl extends BaseService<IdxB ...@@ -52,4 +52,9 @@ public class IdxBizJgInspectionDetectionInfoServiceImpl extends BaseService<IdxB
} }
return result; return result;
} }
@Override
public boolean saveOrUpdateBatch(List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList) {
return super.saveOrUpdateBatch(inspectionDetectionInfoList);
}
} }
\ No newline at end of file
...@@ -32,4 +32,9 @@ public class IdxBizJgOtherInfoServiceImpl extends BaseService<IdxBizJgOtherInfoD ...@@ -32,4 +32,9 @@ public class IdxBizJgOtherInfoServiceImpl extends BaseService<IdxBizJgOtherInfoD
public void saveBatch(List<IdxBizJgOtherInfo> otherInfoList) { public void saveBatch(List<IdxBizJgOtherInfo> otherInfoList) {
super.saveBatch(otherInfoList); super.saveBatch(otherInfoList);
} }
@Override
public boolean saveOrUpdateBatch(List<IdxBizJgOtherInfo> otherInfoList) {
return super.saveOrUpdateBatch(otherInfoList);
}
} }
\ No newline at end of file
...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgSupervisionInfo; ...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgSupervisionInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgSupervisionInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgSupervisionInfoMapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.List;
/** /**
* 监督管理信息表服务实现类 * 监督管理信息表服务实现类
...@@ -26,4 +27,8 @@ public class IdxBizJgSupervisionInfoServiceImpl extends BaseService<IdxBizJgSupe ...@@ -26,4 +27,8 @@ public class IdxBizJgSupervisionInfoServiceImpl extends BaseService<IdxBizJgSupe
return this.getOne(new QueryWrapper<IdxBizJgSupervisionInfo>().eq("RECORD", record)); return this.getOne(new QueryWrapper<IdxBizJgSupervisionInfo>().eq("RECORD", record));
} }
@Override
public boolean saveOrUpdateBatch(List<IdxBizJgSupervisionInfo> supervisionInfoList) {
return super.saveOrUpdateBatch(supervisionInfoList);
}
} }
\ No newline at end of file
...@@ -39,4 +39,9 @@ public class IdxBizJgUseInfoServiceImpl extends BaseService<IdxBizJgUseInfoDto,I ...@@ -39,4 +39,9 @@ public class IdxBizJgUseInfoServiceImpl extends BaseService<IdxBizJgUseInfoDto,I
public boolean saveBatch(List<IdxBizJgUseInfo> useInfoList) { public boolean saveBatch(List<IdxBizJgUseInfo> useInfoList) {
return super.saveBatch(useInfoList); return super.saveBatch(useInfoList);
} }
@Override
public boolean saveOrUpdateBatch(List<IdxBizJgUseInfo> useInfoList) {
return super.saveOrUpdateBatch(useInfoList);
}
} }
\ No newline at end of file
...@@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jg.api.dto.*; import com.yeejoin.amos.boot.module.jg.api.dto.*;
import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract; import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract;
import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq; import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq;
...@@ -31,7 +30,6 @@ import com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher; ...@@ -31,7 +30,6 @@ import com.yeejoin.amos.boot.module.jg.biz.event.publisher.EventPublisher;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient; import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
import com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService; import com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService;
import com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis; import com.yeejoin.amos.boot.module.jg.biz.service.ICompensateFlowDataOfRedis;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgUseInfoService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum;
import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum; import com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum;
...@@ -42,7 +40,6 @@ import com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO; ...@@ -42,7 +40,6 @@ import com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO;
import com.yeejoin.amos.feign.workflow.model.TaskResultDTO; import com.yeejoin.amos.feign.workflow.model.TaskResultDTO;
import io.seata.spring.annotation.GlobalTransactional; import io.seata.spring.annotation.GlobalTransactional;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import org.elasticsearch.client.RestHighLevelClient;
import org.redisson.api.RLock; import org.redisson.api.RLock;
import org.redisson.api.RedissonClient; import org.redisson.api.RedissonClient;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -894,9 +891,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC ...@@ -894,9 +891,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
// 删除在审批完成时写入的设备维保记录 // 删除在审批完成时写入的设备维保记录
idxBizJgMaintenanceRecordInfoService.remove(new LambdaQueryWrapper<IdxBizJgMaintenanceRecordInfo>().eq(IdxBizJgMaintenanceRecordInfo::getSourceId, maintenanceContract.getSequenceNbr())); idxBizJgMaintenanceRecordInfoService.remove(new LambdaQueryWrapper<IdxBizJgMaintenanceRecordInfo>().eq(IdxBizJgMaintenanceRecordInfo::getSourceId, maintenanceContract.getSequenceNbr()));
// 删除批量业务ID信息 // 删除批量业务ID信息
List<String> equipTransferIds = Collections.singletonList(maintenanceContract.getSequenceNbr().toString()); Set<String> equipTransferIds = Collections.singleton(maintenanceContract.getSequenceNbr().toString());
jgResumeInfoService.deleteBatchByBusinessId(equipTransferIds); jgResumeInfoService.deleteBatchByBusinessId(equipTransferIds);
jgResumeInfoService.deleteBatchByBusinessId(equipmentLists.stream().filter(t -> t.getEquipTransferId() != null).map(JgMaintenanceContractEq::getEquId).collect(Collectors.toList())); jgResumeInfoService.deleteBatchByBusinessId(equipmentLists.stream().filter(t -> t.getEquipTransferId() != null).map(JgMaintenanceContractEq::getEquId).collect(Collectors.toSet()));
} }
} }
......
...@@ -9,8 +9,10 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgResumeInfoService; ...@@ -9,8 +9,10 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgResumeInfoService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -58,7 +60,7 @@ public class JgResumeInfoServiceImpl extends BaseService<JgResumeInfoDto, JgResu ...@@ -58,7 +60,7 @@ public class JgResumeInfoServiceImpl extends BaseService<JgResumeInfoDto, JgResu
* 根据业务id进行删除 * 根据业务id进行删除
* @param idList 业务id * @param idList 业务id
*/ */
public void deleteBatchByBusinessId(List<String> idList) { public void deleteBatchByBusinessId(Set<String> idList) {
this.baseMapper.deleteBatchByBusinessId(idList); this.baseMapper.deleteBatchByBusinessId(idList);
} }
} }
\ No newline at end of file
...@@ -44,6 +44,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -44,6 +44,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -61,6 +62,7 @@ import java.text.SimpleDateFormat; ...@@ -61,6 +62,7 @@ import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.util.*; import java.util.*;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.alibaba.fastjson.JSON.parseArray; import static com.alibaba.fastjson.JSON.parseArray;
...@@ -765,8 +767,30 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr ...@@ -765,8 +767,30 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
} }
public void initUseRegistrationCodeIntoRedis() { public void initUseRegistrationCodeIntoRedis() {
jgUseRegistrationManageMapper.initUseRegistrationCodeIntoRedis(String.valueOf(LocalDate.now().getYear() % 100)) // 获取当前年份的两位数
.forEach(resultMap -> redisTemplate.opsForValue().set(resultMap.get("prefix"), resultMap.get("code"))); String currentYearSuffix = String.valueOf(LocalDate.now().getYear() % 100);
Date endOfYear = com.yeejoin.amos.boot.module.ymt.api.common.DateUtils.calculateEndOfYear(new Date());
// 从数据库中加载数据并批量设置到 Redis
jgUseRegistrationManageMapper.initUseRegistrationCodeIntoRedis(currentYearSuffix)
.forEach(resultMap ->
Optional.ofNullable(resultMap)
.ifPresent(map -> setValueWithExpiration(map.get("prefix"), map.get("code"), endOfYear))
);
}
/**
* redis设置key
*
* @param key key
* @param value value
* @param expirationDate 过期时间
*/
public void setValueWithExpiration(String key, String value, Date expirationDate) {
ValueOperations<String, String> valueOps = redisTemplate.opsForValue();
valueOps.set(key, value);
long expirationTimeInSeconds = expirationDate.getTime() - System.currentTimeMillis();
redisTemplate.expire(key, expirationTimeInSeconds, TimeUnit.MILLISECONDS);
} }
public Object handleErrorDeviceCode(String applyNo) { public Object handleErrorDeviceCode(String applyNo) {
......
...@@ -1496,10 +1496,10 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -1496,10 +1496,10 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// 4.es的EQU_STATE, USE_ORG_CODE、ORG_BRANCH_CODE、ORG_BRANCH_NAME、STATUS // 4.es的EQU_STATE, USE_ORG_CODE、ORG_BRANCH_CODE、ORG_BRANCH_NAME、STATUS
this.rollBackForEquipEsInfo(record); this.rollBackForEquipEsInfo(record);
}); });
List<String> equipTransferIds = eqList.stream() Set<String> equipTransferIds = eqList.stream()
.map(JgVehicleInformationEq::getVehicleId) .map(JgVehicleInformationEq::getVehicleId)
.filter(Objects::nonNull) .filter(Objects::nonNull)
.collect(Collectors.toList()); .collect(Collectors.toSet());
if (!equipTransferIds.isEmpty()) { if (!equipTransferIds.isEmpty()) {
jgResumeInfoService.deleteBatchByBusinessId(equipTransferIds); jgResumeInfoService.deleteBatchByBusinessId(equipTransferIds);
} }
...@@ -1932,6 +1932,10 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform ...@@ -1932,6 +1932,10 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
.map(x -> new BigDecimal(String.valueOf(x.get("singleBottleVolume")))) .map(x -> new BigDecimal(String.valueOf(x.get("singleBottleVolume"))))
.reduce(BigDecimal.ZERO, BigDecimal::add); .reduce(BigDecimal.ZERO, BigDecimal::add);
vehicleInformation.setVolume(totalVolume.toPlainString()); vehicleInformation.setVolume(totalVolume.toPlainString());
vehicleInformation.setFillingMedium(equipmentLists.stream()
.findFirst()
.map(equipment -> String.valueOf(equipment.get("chargingMedium")))
.orElse(""));
vehicleInformation.setAuditPassDate(new Date()); vehicleInformation.setAuditPassDate(new Date());
// 登记证记录表主键 // 登记证记录表主键
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.jg.api.dto.ChangeDataDto;
import com.yeejoin.amos.boot.module.jg.api.dto.PieLineDesignChangeDataDto;
import com.yeejoin.amos.boot.module.jg.api.dto.PipelineChangeItemDto;
import com.yeejoin.amos.boot.module.jg.api.dto.ProjectContraptionChangeDataDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class PieLineDataChangeServiceImpl {
private final CommonEquipDataProcessService commonEquipDataProcessService;
private final IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionServiceImpl;
private final EquipChangeDataUpdateService equipChangeDataUpdateService;
public PieLineDataChangeServiceImpl(CommonEquipDataProcessService commonEquipDataProcessService, IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionServiceImpl, EquipChangeDataUpdateService equipChangeDataUpdateService) {
this.commonEquipDataProcessService = commonEquipDataProcessService;
this.idxBizJgProjectContraptionServiceImpl = idxBizJgProjectContraptionServiceImpl;
this.equipChangeDataUpdateService = equipChangeDataUpdateService;
}
public void update(ProjectContraptionChangeDataDto projectContraptionChangeDataDtoNew, List<ChangeDataDto> allChangeColumns) {
// 原有对象行转列
ProjectContraptionChangeDataDto projectContraptionChangeDataDtoOld = getOldProjectContratData(projectContraptionChangeDataDtoNew);
List<ChangeDataDto> newProjectContraptionChangeData = commonEquipDataProcessService.convertBeanField2Column2(projectContraptionChangeDataDtoNew, projectContraptionChangeDataDtoNew.getProjectContraptionId());
// 新对象构造行转列
List<ChangeDataDto> oldProjectContraptionChangeData = commonEquipDataProcessService.convertBeanField2Column2(projectContraptionChangeDataDtoOld, projectContraptionChangeDataDtoNew.getProjectContraptionId());
// 数据比对记录变化字段列表
allChangeColumns.addAll(commonEquipDataProcessService.mergeChangeFields(newProjectContraptionChangeData, oldProjectContraptionChangeData));
// 数据入库
LambdaUpdateWrapper<IdxBizJgProjectContraption> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(BaseEntity::getSequenceNbr, projectContraptionChangeDataDtoNew.getProjectContraptionId());
updateWrapper.set(IdxBizJgProjectContraption::getProjectContraption, projectContraptionChangeDataDtoNew.getProjectContraption());
updateWrapper.set(IdxBizJgProjectContraption::getProjectContraptionNo, projectContraptionChangeDataDtoNew.getProjectContraptionNo());
updateWrapper.set(IdxBizJgProjectContraption::getPipelineLength, projectContraptionChangeDataDtoNew.getPipelineLength());
updateWrapper.set(IdxBizJgProjectContraption::getProductPhoto, projectContraptionChangeDataDtoNew.getProductPhoto());
updateWrapper.set(IdxBizJgProjectContraption::getOtherAccessories, projectContraptionChangeDataDtoNew.getOtherAccessories());
updateWrapper.set(IdxBizJgProjectContraption::getProductQualificationCertificate, projectContraptionChangeDataDtoNew.getProductQualificationCertificate());
idxBizJgProjectContraptionServiceImpl.update(null, updateWrapper);
}
private ProjectContraptionChangeDataDto getOldProjectContratData(ProjectContraptionChangeDataDto projectContraptionChangeDataDtoNew) {
IdxBizJgProjectContraption projectContraption = idxBizJgProjectContraptionServiceImpl.getById(projectContraptionChangeDataDtoNew.getProjectContraptionId());
return BeanUtil.copyProperties(projectContraption, ProjectContraptionChangeDataDto.class);
}
public void saveDesignForPieLine(String record, List<ChangeDataDto> allChangeColumns, PipelineChangeItemDto pipelineChangeItemDto) {
// 1.记录变化的数据对象
PieLineDesignChangeDataDto pieLineDesignChangeDataDto = BeanUtil.copyProperties(pipelineChangeItemDto, PieLineDesignChangeDataDto.class);
// 构造新对象行转列
List<ChangeDataDto> designInfoNew = commonEquipDataProcessService.buildDesignInfoNew(pieLineDesignChangeDataDto, record);
// 老数据查询行转列
List<ChangeDataDto> designInfoOld = commonEquipDataProcessService.buildDesignInfoOld(record);
allChangeColumns.addAll(commonEquipDataProcessService.mergeChangeFields(designInfoNew, designInfoOld));
// 2.更新管道的设计单位名称
equipChangeDataUpdateService.updatePieLineDesignData(record, pieLineDesignChangeDataDto);
}
public void updateEs(ProjectContraptionChangeDataDto projectContraptionChangeDataDto) {
equipChangeDataUpdateService.updateRegisterEsDataPieLine(projectContraptionChangeDataDto);
}
}
...@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory; import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration; 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.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.entity.IdxBizJgRegisterInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper;
import com.yeejoin.amos.feign.systemctl.Systemctl; import com.yeejoin.amos.feign.systemctl.Systemctl;
...@@ -30,10 +31,13 @@ public class UseRegisterUpdateService { ...@@ -30,10 +31,13 @@ public class UseRegisterUpdateService {
private final JgRegistrationHistoryServiceImpl jgRegistrationHistoryService; private final JgRegistrationHistoryServiceImpl jgRegistrationHistoryService;
public UseRegisterUpdateService(IdxBizJgRegisterInfoMapper idxBizJgRegisterInfoMapper, JgUseRegistrationServiceImpl useRegistrationService, JgRegistrationHistoryServiceImpl jgRegistrationHistoryService) { private final IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionService;
public UseRegisterUpdateService(IdxBizJgRegisterInfoMapper idxBizJgRegisterInfoMapper, JgUseRegistrationServiceImpl useRegistrationService, JgRegistrationHistoryServiceImpl jgRegistrationHistoryService, IdxBizJgProjectContraptionServiceImpl idxBizJgProjectContraptionService) {
this.idxBizJgRegisterInfoMapper = idxBizJgRegisterInfoMapper; this.idxBizJgRegisterInfoMapper = idxBizJgRegisterInfoMapper;
this.useRegistrationService = useRegistrationService; this.useRegistrationService = useRegistrationService;
this.jgRegistrationHistoryService = jgRegistrationHistoryService; this.jgRegistrationHistoryService = jgRegistrationHistoryService;
this.idxBizJgProjectContraptionService = idxBizJgProjectContraptionService;
} }
public void updateHisData(String applyNo) { public void updateHisData(String applyNo) {
...@@ -82,6 +86,11 @@ public class UseRegisterUpdateService { ...@@ -82,6 +86,11 @@ public class UseRegisterUpdateService {
}); });
jsonObject.put("equipmentLists", result); jsonObject.put("equipmentLists", result);
} else { } else {
// 管道逻辑 更新装置、管道有关数据
IdxBizJgProjectContraption projectContraption = idxBizJgProjectContraptionService.getById(jgUseRegistration.getProjectContraptionId());
jsonObject.put("pipelineLength", projectContraption.getPipelineLength());
jsonObject.put("projectContraption",projectContraption.getProjectContraption());
jsonObject.put("projectContraptionNo", projectContraption.getProjectContraptionNo());
jsonObject.put("equipmentLists", useRegistrationService.getBaseMapper().queryForUnitPipelineEquipment(records)); jsonObject.put("equipmentLists", useRegistrationService.getBaseMapper().queryForUnitPipelineEquipment(records));
} }
} }
......
...@@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
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.entity.DataDictionary; import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.excel.ExcelUtil;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl; import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
...@@ -53,18 +52,14 @@ import org.springframework.stereotype.Service; ...@@ -53,18 +52,14 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.exception.BaseException;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.exception.instance.TooManyRequests; import org.typroject.tyboot.core.restful.exception.instance.TooManyRequests;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException; import java.text.ParseException;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.function.Predicate;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -134,7 +129,7 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -134,7 +129,7 @@ public class TzBaseEnterpriseInfoServiceImpl
// 使用单位资质 // 使用单位资质
COMPANY_TYPE_CERT_TYPE_MAP.put("使用单位", "1232"); COMPANY_TYPE_CERT_TYPE_MAP.put("使用单位", "1232");
// 检验检测机构资质:细分为1233-1、1233-2 // 检验检测机构资质:细分为1233-1、1233-2
COMPANY_TYPE_CERT_TYPE_MAP.put("检验检测机构", "1233"); COMPANY_TYPE_CERT_TYPE_MAP.put("检验检测机构", "1233-1,1233-2");
// 安装改造维修单位身份资质:充装单位-1231 制造单位-1236 设计单位-1235 安装改造维修单位-1234 // 安装改造维修单位身份资质:充装单位-1231 制造单位-1236 设计单位-1235 安装改造维修单位-1234
COMPANY_TYPE_CERT_TYPE_MAP.put("安装改造维修单位", "1231,1234,1235,1236"); COMPANY_TYPE_CERT_TYPE_MAP.put("安装改造维修单位", "1231,1234,1235,1236");
} }
...@@ -713,14 +708,21 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -713,14 +708,21 @@ public class TzBaseEnterpriseInfoServiceImpl
private void saveLicenceData(Map<String, Object> map) { private void saveLicenceData(Map<String, Object> map) {
List<BaseUnitLicence> licences = Lists.newArrayList(); List<BaseUnitLicence> licences = Lists.newArrayList();
List<DataDictionary> dictionaries = regUnitInfoService.initAllDataDictionaryList(); List<DataDictionary> dictionaries = regUnitInfoService.initAllDataDictionaryList();
JSON.parseArray(JSON.toJSONString(map.get("unitLicences"))).forEach(obj -> { Object unitLicences = map.get("unitLicences");
BaseUnitLicence baseUnitLicence = JSON.toJavaObject((JSONObject)obj, BaseUnitLicence.class); if (unitLicences instanceof Collection && !((Collection<?>) unitLicences).isEmpty()) {
baseUnitLicence.setUnitCode(ObjectUtils.isEmpty(map.get("useCode")) ? null : (String)map.get("useCode")); JSON.parseArray(JSON.toJSONString(unitLicences)).forEach(obj -> {
baseUnitLicence.setUnitName(ObjectUtils.isEmpty(map.get("useUnit")) ? null : (String)map.get("useUnit")); BaseUnitLicence baseUnitLicence = JSON.toJavaObject((JSONObject) obj, BaseUnitLicence.class);
// 处理许可字典值对应名称 if (ObjectUtils.isEmpty(baseUnitLicence.getCertTypeCode())) {
handleDictName(baseUnitLicence, dictionaries); throw new BadRequest("请完善资质/许可信息后保存!");
licences.add(baseUnitLicence); }
}); baseUnitLicence.setUnitCode(ObjectUtils.isEmpty(map.get("useCode")) ? null : (String) map.get("useCode"));
baseUnitLicence.setUnitName(ObjectUtils.isEmpty(map.get("useUnit")) ? null : (String) map.get("useUnit"));
// 处理许可字典值对应名称
handleDictName(baseUnitLicence, dictionaries);
// 添加到结果集合
licences.add(baseUnitLicence);
});
}
if (!ValidationUtil.isEmpty(licences)){ if (!ValidationUtil.isEmpty(licences)){
baseUnitLicenceService.saveOrUpdateBatch(licences); baseUnitLicenceService.saveOrUpdateBatch(licences);
} }
......
package com.yeejoin.amos.boot.module.ymt.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 工程装置-施工信息表
*
* @author system_generator
* @date 2024-12-12
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "IdxBizJgProjectConstructionDto", description = "工程装置-施工信息表")
public class IdxBizJgProjectConstructionDto extends BaseDto {
private static final long serialVersionUID = 1L;
private String record;
private Date recDate;
private String recUserId;
private String instanceId;
private String status;
@ApiModelProperty(value = "施工类型")
private String constructionType;
@ApiModelProperty(value = "施工单位统一社会信用代码")
private String uscUnitCreditCode;
@ApiModelProperty(value = "施工单位名称")
private String uscUnitName;
@ApiModelProperty(value = "施工时间")
private Date uscDate;
@ApiModelProperty(value = "工程装置唯一标识")
private String sequenceCode;
@ApiModelProperty(value = "告知业务id")
private String noticeId;
@ApiModelProperty(value = "告知书编号")
private String informCode;
@ApiModelProperty(value = "告知书路径")
private String informFilePath;
@ApiModelProperty(value = "施工负责人ID")
private String constructionLeaderId;
@ApiModelProperty(value = "施工负责人")
private String constructionLeaderName;
@ApiModelProperty(value = "施工负责人手机")
private String constructionLeaderPhone;
@ApiModelProperty(value = "施工委托书图片")
private String proxyStatementAttachment;
@ApiModelProperty(value = "施工合同照片")
private String constructionContractAttachment;
@ApiModelProperty(value = "其他附件")
private String constructionOtherAccessories;
@ApiModelProperty(value = "关联设备ids")
private String equipRecords;
@ApiModelProperty(value = "工程装置ID")
private String projectContraptionId;
@ApiModelProperty(value = "使用详细地址")
private String address;
@ApiModelProperty(value = "使用地点_省")
private String provinceName;
@ApiModelProperty(value = "使用地点_市")
private String cityName;
@ApiModelProperty(value = "使用地点_区")
private String countyName;
@ApiModelProperty(value = "使用地点_街道")
private String streetName;
@ApiModelProperty(value = "是否西咸:0-否;1-是")
private String isXixian;
}
package com.yeejoin.amos.boot.module.ymt.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 管道工程装置表
*
* @author system_generator
* @date 2024-12-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "IdxBizJgProjectContraptionDto", description = "管道工程装置表")
public class IdxBizJgProjectContraptionDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "工程装置名称")
private String projectContraption;
@ApiModelProperty(value = "工程装置编号")
private String projectContraptionNo;
@ApiModelProperty(value = "使用单位名称")
private String useUnitCreditCode;
@ApiModelProperty(value = "使用单位统一信用代码")
private String useUnitName;
@ApiModelProperty(value = "施工单位统一信用代码")
private String uscUnitCreditCode;
@ApiModelProperty(value = "施工单位名称")
private String uscUnitName;
@ApiModelProperty(value = "设备种类代码")
private String equListCode;
@ApiModelProperty(value = "设备种类")
private String equList;
@ApiModelProperty(value = "设备类别代码")
private String equCategoryCode;
@ApiModelProperty(value = "设备代码")
private String equCategory;
@ApiModelProperty(value = "设备品种代码")
private String equDefineCode;
@ApiModelProperty(value = "设备品种")
private String equDefine;
@ApiModelProperty(value = "设备汇总表信息")
private String content;
@ApiModelProperty(value = "装置管道总长度(m)")
private Double pipelineLength;
@ApiModelProperty(value = "产品照片附件")
private String productPhoto;
@ApiModelProperty(value = "其他附件")
private String otherAccessories;
@ApiModelProperty(value = "属地监管单位代码")
private String orgCode;
@ApiModelProperty(value = "属地监管单位名称")
private String orgName;
@ApiModelProperty(value = "产品质量合格证明")
private String productQualificationCertificate;
@ApiModelProperty(value = "使用地点代码_省")
private String province;
@ApiModelProperty(value = "使用地点代码_市")
private String city;
@ApiModelProperty(value = "使用地点代码_区(县)")
private String county;
@ApiModelProperty(value = "使用地点代码_街道(镇)")
private String street;
@ApiModelProperty(value = "使用详细地址")
private String address;
@ApiModelProperty(value = "使用地点_省")
private String provinceName;
@ApiModelProperty(value = "使用地点_市")
private String cityName;
@ApiModelProperty(value = "使用地点_区")
private String countyName;
@ApiModelProperty(value = "使用地点_街道")
private String streetName;
@ApiModelProperty(value = "装置起始位置")
private String startLatitudeLongitude;
@ApiModelProperty(value = "装置结束位置")
private String endLatitudeLongitude;
@ApiModelProperty(value = "监管码")
private String supervisoryCode;
@ApiModelProperty(value = "使用登记证编号")
private String useRegistrationCode;
@ApiModelProperty("是否是否纳管:true - 已纳管 false-未纳管")
private Boolean isIntoManagement;
@ApiModelProperty("数据来源(新增:0、导入:1、复制:复制数据的id 、jg:从监管加入的设备)")
private String dataSource;
@ApiModelProperty("设备代码")
private String equCode;
@ApiModelProperty("投入日期")
private String useDate;
}
package com.yeejoin.amos.boot.module.ymt.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 工程装置-检验检测信息表
*
* @author system_generator
* @date 2024-12-12
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "IdxBizJgProjectInspectionDto", description = "工程装置-检验检测信息表")
public class IdxBizJgProjectInspectionDto extends BaseDto {
private static final long serialVersionUID = 1L;
private String record;
private Date recDate;
private String recUserId;
private String instanceId;
private String status;
@ApiModelProperty(value = "检验类型")
private String inspectType;
@ApiModelProperty(value = "检验机构名称")
private String inspectOrgName;
@ApiModelProperty(value = "检验报告")
private String inspectReport;
@ApiModelProperty(value = "检验人员")
private String inspectStaff;
@ApiModelProperty(value = "检验日期")
private Date inspectDate;
@ApiModelProperty(value = "检验结论")
private String inspectConclusion;
@ApiModelProperty(value = "安全状况等级")
private String safetyLevel;
@ApiModelProperty(value = "检验问题备注")
private String problemRemark;
@ApiModelProperty(value = "下次检验日期")
private Date nextInspectDate;
@ApiModelProperty(value = "工程装置唯一标识")
private String sequenceCode;
@ApiModelProperty(value = "检验机构统一信用代码")
private String inspectOrgCode;
@ApiModelProperty(value = "检验报告编号")
private String inspectReportNo;
@ApiModelProperty(value = "检验人员主键多个逗号分割")
private String inspectStaffCode;
@ApiModelProperty(value = "关联设备ids")
private String equipRecord;
@ApiModelProperty(value = "检验申请单编号")
private String inspectApplyNo;
@ApiModelProperty(value = "工程装置ID")
private String projectContraptionId;
}
package com.yeejoin.amos.boot.module.ymt.api.dto; package com.yeejoin.amos.boot.module.ymt.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -92,4 +91,8 @@ public class IdxBizJgRegisterInfoDto extends BaseDto { ...@@ -92,4 +91,8 @@ public class IdxBizJgRegisterInfoDto extends BaseDto {
@ApiModelProperty(value = "检验是否在有限期内:1-有限期内 ;2-不在有效期内【历史无证设备需要】") @ApiModelProperty(value = "检验是否在有限期内:1-有限期内 ;2-不在有效期内【历史无证设备需要】")
private String inInspectionPeriod; private String inInspectionPeriod;
@ApiModelProperty(value = "安装资料是否完整齐全:1-齐全;2-不齐全【历史无证设备需要】")
private String installationIsComplete;
} }
...@@ -34,10 +34,11 @@ public class EquipTechParamPipeline extends AbstractEquipBaseEntity { ...@@ -34,10 +34,11 @@ public class EquipTechParamPipeline extends AbstractEquipBaseEntity {
@TableField(value = "\"STATUS\"") @TableField(value = "\"STATUS\"")
private String status; private String status;
/** /**
* * 工程(装置)名称 * * 工程(装置)名称--废弃,以use_info表为准
*/ */
@Deprecated
@TableField(value = "\"DEVICE_NAME\"") @TableField(value = "\"DEVICE_NAME\"")
private String deviceName; private String deviceName;
/** /**
......
package com.yeejoin.amos.boot.module.ymt.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 工程装置-施工信息表
*
* @author system_generator
* @date 2024-12-12
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("idx_biz_jg_project_construction")
public class IdxBizJgProjectConstruction extends TzsBaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField("\"RECORD\"")
private String record;
/**
*
*/
@TableField("\"INSTANCE_ID\"")
private String instanceId;
/**
*
*/
@TableField("\"STATUS\"")
private String status;
/**
* 施工类型
*/
@TableField("\"CONSTRUCTION_TYPE\"")
private String constructionType;
/**
* 施工单位统一社会信用代码
*/
@TableField("\"USC_UNIT_CREDIT_CODE\"")
private String uscUnitCreditCode;
/**
* 施工单位名称
*/
@TableField("\"USC_UNIT_NAME\"")
private String uscUnitName;
/**
* 施工时间
*/
@TableField("\"USC_DATE\"")
private Date uscDate;
/**
* 工程装置唯一标识
*/
@TableField("\"SEQUENCE_CODE\"")
private String sequenceCode;
/**
* 告知业务id
*/
@TableField("\"NOTICE_ID\"")
private String noticeId;
/**
* 告知书编号
*/
@TableField("\"INFORM_CODE\"")
private String informCode;
/**
* 告知书路径
*/
@TableField("\"INFORM_FILE_PATH\"")
private String informFilePath;
/**
* 施工负责人ID
*/
@TableField("\"CONSTRUCTION_LEADER_ID\"")
private String constructionLeaderId;
/**
* 施工负责人
*/
@TableField("\"CONSTRUCTION_LEADER_NAME\"")
private String constructionLeaderName;
/**
* 施工负责人手机
*/
@TableField("\"CONSTRUCTION_LEADER_PHONE\"")
private String constructionLeaderPhone;
/**
* 施工委托书图片
*/
@TableField("\"PROXY_STATEMENT_ATTACHMENT\"")
private String proxyStatementAttachment;
/**
* 施工合同照片
*/
@TableField("\"CONSTRUCTION_CONTRACT_ATTACHMENT\"")
private String constructionContractAttachment;
/**
* 其他附件
*/
@TableField("\"CONSTRUCTION_OTHER_ACCESSORIES\"")
private String constructionOtherAccessories;
/**
* 关联设备ids
*/
@TableField("\"EQUIP_RECORDS\"")
private String equipRecords;
/**
* 工程装置ID
*/
@TableField("\"PROJECT_CONTRAPTION_ID\"")
private String projectContraptionId;
/**
* 使用详细地址
*/
@TableField("\"ADDRESS\"")
private String address;
/**
* 使用地点_省
*/
@TableField("\"PROVINCE_NAME\"")
private String provinceName;
/**
* 使用地点_市
*/
@TableField("\"CITY_NAME\"")
private String cityName;
/**
* 使用地点_区
*/
@TableField("\"COUNTY_NAME\"")
private String countyName;
/**
* 使用地点_街道
*/
@TableField("\"STREET_NAME\"")
private String streetName;
/**
* 是否西咸:0-否;1-是
*/
@TableField("\"IS_XIXIAN\"")
private String isXixian;
}
package com.yeejoin.amos.boot.module.ymt.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.*;
import lombok.experimental.Accessors;
/**
* 管道工程装置表
*
* @author system_generator
* @date 2024-12-11
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("idx_biz_jg_project_contraption")
public class IdxBizJgProjectContraption extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 工程装置名称
*/
@TableField("project_contraption")
private String projectContraption;
/**
* 工程装置编号
*/
@TableField("project_contraption_no")
private String projectContraptionNo;
/**
* 使用单位名称
*/
@TableField("use_unit_credit_code")
private String useUnitCreditCode;
/**
* 使用单位统一信用代码
*/
@TableField("use_unit_name")
private String useUnitName;
/**
* 施工单位统一信用代码
*/
@TableField("usc_unit_credit_code")
private String uscUnitCreditCode;
/**
* 施工单位名称
*/
@TableField("usc_unit_name")
private String uscUnitName;
/**
* 设备种类名称
*/
@TableField("equ_list_name")
private String equListName;
/**
* 设备种类
*/
@TableField("equ_list")
private String equList;
/**
* 设备类别名称
*/
@TableField("equ_category_name")
private String equCategoryName;
/**
* 设备代码
*/
@TableField("equ_category")
private String equCategory;
/**
* 设备品种名称
*/
@TableField("equ_define_name")
private String equDefineName;
/**
* 设备品种
*/
@TableField("equ_define")
private String equDefine;
/**
* 设备汇总表信息
*/
@TableField("content")
private String content;
/**
* 装置管道总长度(m)
*/
@TableField("pipeline_length")
private Double pipelineLength;
/**
* 产品照片附件
*/
@TableField("product_photo")
private String productPhoto;
/**
* 其他附件
*/
@TableField("other_accessories")
private String otherAccessories;
/**
* 属地监管单位代码
*/
@TableField("org_code")
private String orgCode;
/**
* 属地监管单位名称
*/
@TableField("org_name")
private String orgName;
/**
* 产品质量合格证明
*/
@TableField("product_qualification_certificate")
private String productQualificationCertificate;
/**
* 使用地点代码_省
*/
@TableField("province")
private String province;
/**
* 使用地点代码_市
*/
@TableField("city")
private String city;
/**
* 使用地点代码_区(县)
*/
@TableField("county")
private String county;
/**
* 使用地点代码_街道(镇)
*/
@TableField("street")
private String street;
/**
* 使用详细地址
*/
@TableField("address")
private String address;
/**
* 使用地点_省
*/
@TableField("province_name")
private String provinceName;
/**
* 使用地点_市
*/
@TableField("city_name")
private String cityName;
/**
* 使用地点_区
*/
@TableField("county_name")
private String countyName;
/**
* 使用地点_街道
*/
@TableField("street_name")
private String streetName;
/**
* 装置起始位置
*/
@TableField("start_latitude_longitude")
private String startLatitudeLongitude;
/**
* 装置结束位置
*/
@TableField("end_latitude_longitude")
private String endLatitudeLongitude;
/**
* 监管码
*/
@TableField("supervisory_code")
private String supervisoryCode;
/**
* 使用登记证编号
*/
@TableField("use_registration_code")
private String useRegistrationCode;
/**
* 是否是否纳管:true - 已纳管 false-未纳管
*/
@TableField("is_into_management")
private Boolean isIntoManagement;
/**
* 数据来源(新增:0、导入:1、复制:复制数据的id 、jg:从监管加入的设备)
*/
@TableField("data_source")
private String dataSource;
/**
* 数据来源名字
*/
@TableField(exist = false)
private String dataSourceName;
/**
* 是否可编辑
*/
@TableField(exist = false)
private Boolean canEdit;
/**
* 是否可删除
*/
@TableField(exist = false)
private Boolean canDelete;
/**
* 使用地址
*/
@TableField(exist = false)
private String fullAddress;
/**
* 工程装置设备代码
*/
@TableField("equ_code")
private String equCode;
/**
* 投入日期
*/
@TableField("use_date")
private String useDate;
}
package com.yeejoin.amos.boot.module.ymt.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 工程装置-检验检测信息表
*
* @author system_generator
* @date 2024-12-12
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("idx_biz_jg_project_inspection")
public class IdxBizJgProjectInspection extends TzsBaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField("\"RECORD\"")
private String record;
/**
*
*/
@TableField("\"INSTANCE_ID\"")
private String instanceId;
/**
*
*/
@TableField("\"STATUS\"")
private String status;
/**
* 检验类型
*/
@TableField("\"INSPECT_TYPE\"")
private String inspectType;
/**
* 检验机构名称
*/
@TableField("\"INSPECT_ORG_NAME\"")
private String inspectOrgName;
/**
* 检验报告
*/
@TableField("\"INSPECT_REPORT\"")
private String inspectReport;
/**
* 检验人员
*/
@TableField("\"INSPECT_STAFF\"")
private String inspectStaff;
/**
* 检验日期
*/
@TableField("\"INSPECT_DATE\"")
private Date inspectDate;
/**
* 检验结论
*/
@TableField("\"INSPECT_CONCLUSION\"")
private String inspectConclusion;
/**
* 安全状况等级
*/
@TableField("\"SAFETY_LEVEL\"")
private String safetyLevel;
/**
* 检验问题备注
*/
@TableField("\"PROBLEM_REMARK\"")
private String problemRemark;
/**
* 下次检验日期
*/
@TableField("\"NEXT_INSPECT_DATE\"")
private Date nextInspectDate;
/**
* 工程装置唯一标识
*/
@TableField("\"SEQUENCE_CODE\"")
private String sequenceCode;
/**
* 检验机构统一信用代码
*/
@TableField("\"INSPECT_ORG_CODE\"")
private String inspectOrgCode;
/**
* 检验报告编号
*/
@TableField("\"INSPECT_REPORT_NO\"")
private String inspectReportNo;
/**
* 检验人员主键多个逗号分割
*/
@TableField("\"INSPECT_STAFF_CODE\"")
private String inspectStaffCode;
/**
* 关联设备ids
*/
@TableField("\"EQUIP_RECORD\"")
private String equipRecord;
/**
* 检验申请单编号
*/
@TableField("\"INSPECT_APPLY_NO\"")
private String inspectApplyNo;
/**
* 工程装置ID
*/
@TableField("\"PROJECT_CONTRAPTION_ID\"")
private String projectContraptionId;
}
...@@ -216,5 +216,11 @@ public class IdxBizJgRegisterInfo extends TzsBaseEntity { ...@@ -216,5 +216,11 @@ public class IdxBizJgRegisterInfo extends TzsBaseEntity {
@TableField("\"IN_INSPECTION_PERIOD\"") @TableField("\"IN_INSPECTION_PERIOD\"")
private String inInspectionPeriod; private String inInspectionPeriod;
/**
* 安装资料是否完整齐全:1-齐全;2-不齐全【历史无证设备需要】
*/
@TableField("\"INSTALLATION_IS_COMPLETE\"")
private String installationIsComplete;
} }
...@@ -111,19 +111,19 @@ public class IdxBizJgTechParamsPipeline extends TzsBaseEntity { ...@@ -111,19 +111,19 @@ public class IdxBizJgTechParamsPipeline extends TzsBaseEntity {
private String endPosition; private String endPosition;
/** /**
* * 设计-介质
*/ */
@TableField("\"PRESSURE\"") @TableField("\"PRESSURE\"")
private String pressure; private String pressure;
/** /**
* * 设计-介质
*/ */
@TableField("\"TEMPERATURE\"") @TableField("\"TEMPERATURE\"")
private String temperature; private String temperature;
/** /**
* * 设计-介质
*/ */
@TableField("\"MEDIUM\"") @TableField("\"MEDIUM\"")
private String medium; private String medium;
......
...@@ -273,4 +273,10 @@ public class IdxBizJgUseInfo extends TzsBaseEntity { ...@@ -273,4 +273,10 @@ public class IdxBizJgUseInfo extends TzsBaseEntity {
@TableField("\"O_REG_DATE\"") @TableField("\"O_REG_DATE\"")
private String oRegDate; private String oRegDate;
/**
* 工程装置ID
*/
@TableField("\"PROJECT_CONTRAPTION_ID\"")
private String projectContraptionId;
} }
...@@ -26,6 +26,8 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> { ...@@ -26,6 +26,8 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
@Select("SELECT * FROM tz_equipment_category WHERE code NOT LIKE '7%' ORDER BY parent_id") @Select("SELECT * FROM tz_equipment_category WHERE code NOT LIKE '7%' ORDER BY parent_id")
List<EquipmentCategoryDto> selectClassifyNoStart7(); List<EquipmentCategoryDto> selectClassifyNoStart7();
@Select("SELECT * FROM tz_equipment_category WHERE code NOT LIKE '7%' AND code NOT LIKE '8%' ORDER BY parent_id")
List<EquipmentCategoryDto> selectClassifyNoStart7And8();
@Select("select * from tz_equipment_category where code in('1000','2000','3000','4000','5000','6000','8000','9000')") @Select("select * from tz_equipment_category where code in('1000','2000','3000','4000','5000','6000','8000','9000')")
List<EquipmentCategoryDto> selectClassify(); List<EquipmentCategoryDto> selectClassify();
...@@ -96,5 +98,7 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> { ...@@ -96,5 +98,7 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
List<String> selectXiXianNew(); List<String> selectXiXianNew();
@Select("SELECT * FROM tz_equipment_category WHERE parent_id = #{parentId}")
List<EquipmentCategoryDto> getEquDefineByParentId(String parentId);
} }
package com.yeejoin.amos.boot.module.ymt.api.mapper;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectConstruction;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 工程装置-施工信息表 Mapper 接口
*
* @author system_generator
* @date 2024-12-12
*/
public interface IdxBizJgProjectConstructionMapper extends BaseMapper<IdxBizJgProjectConstruction> {
}
package com.yeejoin.amos.boot.module.ymt.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 管道工程装置表 Mapper 接口
*
* @author system_generator
* @date 2024-12-11
*/
public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgProjectContraption> {
Map<String, Object> getDetail(@Param("sequenceNbr") String sequenceNbr);
List<Map<String, Object>> selectEquipList(@Param("sequenceNbr") String sequenceNbr);
/**
* 统计工程装置的引用次数(非待提交、非已撤回、非已驳回)
*
* @param projectContraptionId 工程装置唯一标识
* @return 被引用次数 > 0 则设备不可编辑
*/
Integer countContraptionInUseTimesForEdit(@Param("projectContraptionId") Long projectContraptionId);
/**
* 统计设备被引用的次数(只有存在就算引用-作废除外)
* @param projectContraptionId 设备唯一标识
* @return 被引用次数 > 0 则设备不可删除
*/
Integer countContraptionInUseTimesForDelete(@Param("projectContraptionId") Long projectContraptionId);
}
package com.yeejoin.amos.boot.module.ymt.api.mapper;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectInspection;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 工程装置-检验检测信息表 Mapper 接口
*
* @author system_generator
* @date 2024-12-12
*/
public interface IdxBizJgProjectInspectionMapper extends BaseMapper<IdxBizJgProjectInspection> {
}
package com.yeejoin.amos.boot.module.ymt.api.service;
/**
* 工程装置-施工信息表接口类
*
* @author system_generator
* @date 2024-12-12
*/
public interface IIdxBizJgProjectConstructionService {
}
package com.yeejoin.amos.boot.module.ymt.api.service;
/**
* 工程装置-检验检测信息表接口类
*
* @author system_generator
* @date 2024-12-12
*/
public interface IIdxBizJgProjectInspectionService {
}
<?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.ymt.api.mapper.IdxBizJgProjectConstructionMapper">
</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.ymt.api.mapper.IdxBizJgProjectContraptionMapper">
<select id="getDetail" resultType="java.util.Map">
SELECT
SEQUENCE_NBR,
USE_UNIT_CREDIT_CODE,
EQU_LIST,
EQU_CATEGORY,
EQU_DEFINE,
EQU_LIST_NAME,
EQU_CATEGORY_NAME,
EQU_DEFINE_NAME,
CITY,
COUNTY,
PRODUCT_QUALIFICATION_CERTIFICATE,
EQU_LIST_NAME,
CONTENT,
STREET_NAME,
OTHER_ACCESSORIES,
CITY_NAME,
PROVINCE,
STREET,
ORG_CODE,
USC_UNIT_CREDIT_CODE,
EQU_CATEGORY_NAME,
REC_USER_NAME,
COUNTY_NAME,
REC_USER_ID,
PROJECT_CONTRAPTION,
USE_REGISTRATION_CODE,
ADDRESS,
ORG_NAME,
PRODUCT_PHOTO,
IS_DELETE,
START_LATITUDE_LONGITUDE,
PIPELINE_LENGTH,
END_LATITUDE_LONGITUDE,
IS_INTO_MANAGEMENT,
REC_DATE,
PROJECT_CONTRAPTION_NO,
USC_UNIT_NAME,
SUPERVISORY_CODE,
PROVINCE_NAME,
DATA_SOURCE,
USE_UNIT_NAME,
USE_DATE
FROM
IDX_BIZ_JG_PROJECT_CONTRAPTION ibjpc
WHERE
ibjpc.SEQUENCE_NBR = #{sequenceNbr}
</select>
<select id="selectEquipList" resultType="java.util.Map">
SELECT ibjtpp."PIPE_NAME" AS pipeName,
ibjtpp."PIPELINE_NUMBER" AS pipelineNumber,
ibjtpp."DEVICE_LEVEL" AS deviceLevel,
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PRESSURE" AS pressure,
ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."MEDIUM" AS medium,
ibjtpp."WORK_PRESSURE" AS workPressure,
ibjtpp."WORK_TEMPERATURE" AS workTemperature,
ibjtpp."WORK_MEDIUM" AS workMedium,
ibjtpp."REMARKS" AS remarks,
(select INSPECT_ORG_NAME from idx_biz_jg_inspection_detection_info where "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) inspectOrgName,
(select INSPECT_CONCLUSION from idx_biz_jg_inspection_detection_info where "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) inspectConclusion,
(select NEXT_INSPECT_DATE from idx_biz_jg_inspection_detection_info where "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) nextInspectDate,
(select USC_UNIT_NAME from idx_biz_jg_construction_info jci where ibjui.RECORD = jci.RECORD ORDER BY jci."USC_DATE" DESC limit 1) as uscUnitName,
(select USC_DATE from idx_biz_jg_construction_info jci where ibjui.RECORD = jci.RECORD ORDER BY jci."USC_DATE" DESC limit 1) as uscDate,
ibjdi."DESIGN_UNIT_NAME" AS designUnitName,
ibjui."USE_DATE" AS useDate,
ibjui."RECORD" AS record
FROM idx_biz_jg_use_info ibjui
LEFT JOIN idx_biz_jg_tech_params_pipeline ibjtpp ON ibjui.RECORD = ibjtpp.RECORD
LEFT JOIN idx_biz_jg_design_info ibjdi ON ibjui.RECORD = ibjdi.RECORD
WHERE ibjui.project_contraption_id = #{sequenceNbr}
</select>
<select id="countContraptionInUseTimesForEdit" resultType="java.lang.Integer">
SELECT
SUM(inUseNumber)
FROM (
SELECT
COUNT(1) as inUseNumber
FROM
tzs_jg_use_registration a
WHERE a.project_contraption_id = #{projectContraptionId}
AND a.is_delete = 0
AND (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废')
UNION
SELECT
COUNT(1) as inUseNumber
FROM
tzs_jg_installation_notice a
WHERE a.project_contraption_id = #{projectContraptionId}
AND a.notice_status <![CDATA[ <> ]]> '6610'
AND a.notice_status <![CDATA[ <> ]]> '6615'
AND a.notice_status <![CDATA[ <> ]]> '6614'
)
</select>
<select id="countContraptionInUseTimesForDelete" resultType="java.lang.Integer">
SELECT
SUM(inUseNumber)
FROM (
SELECT
COUNT(1) AS inUseNumber
FROM
tzs_jg_use_registration a
WHERE a.project_contraption_id = #{projectContraptionId}
AND a.is_delete = 0
AND ( a.status <![CDATA[ <> ]]> '已作废')
UNION
SELECT
COUNT(1) AS inUseNumber
FROM
tzs_jg_installation_notice a
WHERE a.project_contraption_id = #{projectContraptionId}
AND (a.notice_status <![CDATA[ <> ]]> '6617')
)
</select>
</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.ymt.api.mapper.IdxBizJgProjectInspectionMapper">
</mapper>
package com.yeejoin.amos.boot.module.ymt.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.ymt.biz.service.impl.IdxBizJgProjectConstructionServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectConstructionDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* 工程装置-施工信息表
*
* @author system_generator
* @date 2024-12-12
*/
@RestController
@Api(tags = "工程装置-施工信息表Api")
@RequestMapping(value = "/idx-biz-jg-project-construction")
public class IdxBizJgProjectConstructionController extends BaseController {
@Autowired
IdxBizJgProjectConstructionServiceImpl idxBizJgProjectConstructionServiceImpl;
/**
* 新增工程装置-施工信息表
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增工程装置-施工信息表", notes = "新增工程装置-施工信息表")
public ResponseModel<IdxBizJgProjectConstructionDto> save(@RequestBody IdxBizJgProjectConstructionDto model) {
model = idxBizJgProjectConstructionServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新工程装置-施工信息表", notes = "根据sequenceNbr更新工程装置-施工信息表")
public ResponseModel<IdxBizJgProjectConstructionDto> updateBySequenceNbrIdxBizJgProjectConstruction(@RequestBody IdxBizJgProjectConstructionDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(idxBizJgProjectConstructionServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除工程装置-施工信息表", notes = "根据sequenceNbr删除工程装置-施工信息表")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(idxBizJgProjectConstructionServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个工程装置-施工信息表", notes = "根据sequenceNbr查询单个工程装置-施工信息表")
public ResponseModel<IdxBizJgProjectConstructionDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(idxBizJgProjectConstructionServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "工程装置-施工信息表分页查询", notes = "工程装置-施工信息表分页查询")
public ResponseModel<Page<IdxBizJgProjectConstructionDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<IdxBizJgProjectConstructionDto> page = new Page<IdxBizJgProjectConstructionDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(idxBizJgProjectConstructionServiceImpl.queryForIdxBizJgProjectConstructionPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "工程装置-施工信息表列表全部数据查询", notes = "工程装置-施工信息表列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<IdxBizJgProjectConstructionDto>> selectForList() {
return ResponseHelper.buildResponse(idxBizJgProjectConstructionServiceImpl.queryForIdxBizJgProjectConstructionList());
}
}
package com.yeejoin.amos.boot.module.ymt.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.ymt.biz.service.impl.IdxBizJgProjectInspectionServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectInspectionDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* 工程装置-检验检测信息表
*
* @author system_generator
* @date 2024-12-12
*/
@RestController
@Api(tags = "工程装置-检验检测信息表Api")
@RequestMapping(value = "/idx-biz-jg-project-inspection")
public class IdxBizJgProjectInspectionController extends BaseController {
@Autowired
IdxBizJgProjectInspectionServiceImpl idxBizJgProjectInspectionServiceImpl;
/**
* 新增工程装置-检验检测信息表
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增工程装置-检验检测信息表", notes = "新增工程装置-检验检测信息表")
public ResponseModel<IdxBizJgProjectInspectionDto> save(@RequestBody IdxBizJgProjectInspectionDto model) {
model = idxBizJgProjectInspectionServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新工程装置-检验检测信息表", notes = "根据sequenceNbr更新工程装置-检验检测信息表")
public ResponseModel<IdxBizJgProjectInspectionDto> updateBySequenceNbrIdxBizJgProjectInspection(@RequestBody IdxBizJgProjectInspectionDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(idxBizJgProjectInspectionServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除工程装置-检验检测信息表", notes = "根据sequenceNbr删除工程装置-检验检测信息表")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(idxBizJgProjectInspectionServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个工程装置-检验检测信息表", notes = "根据sequenceNbr查询单个工程装置-检验检测信息表")
public ResponseModel<IdxBizJgProjectInspectionDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(idxBizJgProjectInspectionServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "工程装置-检验检测信息表分页查询", notes = "工程装置-检验检测信息表分页查询")
public ResponseModel<Page<IdxBizJgProjectInspectionDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<IdxBizJgProjectInspectionDto> page = new Page<IdxBizJgProjectInspectionDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(idxBizJgProjectInspectionServiceImpl.queryForIdxBizJgProjectInspectionPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "工程装置-检验检测信息表列表全部数据查询", notes = "工程装置-检验检测信息表列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<IdxBizJgProjectInspectionDto>> selectForList() {
return ResponseHelper.buildResponse(idxBizJgProjectInspectionServiceImpl.queryForIdxBizJgProjectInspectionList());
}
}
package com.yeejoin.amos.boot.module.ymt.biz.service.impl;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectConstruction;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectConstructionMapper;
import com.yeejoin.amos.boot.module.ymt.api.service.IIdxBizJgProjectConstructionService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectConstructionDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* 工程装置-施工信息表服务实现类
*
* @author system_generator
* @date 2024-12-12
*/
@Service
public class IdxBizJgProjectConstructionServiceImpl extends BaseService<IdxBizJgProjectConstructionDto,IdxBizJgProjectConstruction,IdxBizJgProjectConstructionMapper> implements IIdxBizJgProjectConstructionService {
/**
* 分页查询
*/
public Page<IdxBizJgProjectConstructionDto> queryForIdxBizJgProjectConstructionPage(Page<IdxBizJgProjectConstructionDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<IdxBizJgProjectConstructionDto> queryForIdxBizJgProjectConstructionList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.ymt.biz.service.impl;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectInspection;
import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectInspectionMapper;
import com.yeejoin.amos.boot.module.ymt.api.service.IIdxBizJgProjectInspectionService;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectInspectionDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* 工程装置-检验检测信息表服务实现类
*
* @author system_generator
* @date 2024-12-12
*/
@Service
public class IdxBizJgProjectInspectionServiceImpl extends BaseService<IdxBizJgProjectInspectionDto,IdxBizJgProjectInspection,IdxBizJgProjectInspectionMapper> implements IIdxBizJgProjectInspectionService {
/**
* 分页查询
*/
public Page<IdxBizJgProjectInspectionDto> queryForIdxBizJgProjectInspectionPage(Page<IdxBizJgProjectInspectionDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<IdxBizJgProjectInspectionDto> queryForIdxBizJgProjectInspectionList() {
return this.queryForList("" , false);
}
}
\ 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