Commit 93087354 authored by 刘林's avatar 刘林

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

parents d44c4f97 b2cceecc
package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto;
......@@ -9,10 +10,12 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgEnableDisableDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgEnableDisable;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import com.yeejoin.amos.boot.module.jg.api.vo.tableDataExportVo.EnableDisableVo;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Mapper 接口
......@@ -36,4 +39,8 @@ public interface JgEnableDisableMapper extends BaseMapper<JgEnableDisable> {
List<EquipBizCountDto> queryStoppedDeviceStaticListData(DPFilterParamDto dpFilterParamDto);
List<CompanyEquipCountDto> queryForFlowingEquipList();
IPage<IdxBizJgProjectContraption> queryJgProjectContraptionPage(@Param("page") Page<IdxBizJgProjectContraption> page, @Param("useUnitCreditCode") String useUnitCreditCode, @Param("proIds") Set<String> proIds);
IPage<Map<String, Object>> selectPipeLinePage(@Param("page") Page<Map<String, Object>> page, @Param("projectContraptionId") String projectContraptionId, @Param("applyType") String applyType);
}
......@@ -152,4 +152,104 @@
and a.audit_status in ('待受理')
GROUP BY a.use_unit_credit_code
</select>
</mapper>
<select id="queryJgProjectContraptionPage"
resultType="com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption">
select
pc.sequence_nbr,
pc.project_contraption,
pc.project_contraption_no,
pc.address,
pc.supervisory_code,
pc.use_registration_code,
pc.province_name,
pc.city_name,
pc.county_name,
pc.street_name
from
idx_biz_jg_project_contraption pc,
tzs_jg_use_registration_manage m
where
pc.is_into_management = true
and pc.use_registration_code = m.use_registration_code
and m.certificate_status = '已登记'
and m.is_delete = '0'
and pc.use_unit_credit_code=#{useUnitCreditCode}
and (pc.project_contraption_parent_id is null or pc.project_contraption_parent_id = '')
and pc.equ_category = '8300'
<if test="proIds != null and proIds.size() > 0">
and pc.sequence_nbr not in
<foreach collection="proIds" item="projectContraptionId" open="(" close=")" separator=",">
#{projectContraptionId}
</foreach>
</if>
</select>
<sql id="page-list-pipeline">
SELECT
ui."USE_UNIT_NAME" useUnitName,
ui."USE_UNIT_CREDIT_CODE" useUnitCreditCode,
ui."PROJECT_CONTRAPTION_ID" as projectContraptionId,
to_char(ui."USE_DATE", 'YYYY-MM') useDate,
(SELECT DESIGN_UNIT_NAME from idx_biz_jg_design_info where "RECORD" = ui."RECORD") designUnitName,
(SELECT USC_UNIT_NAME from idx_biz_jg_construction_info where "RECORD" = ui."RECORD" ORDER BY USC_DATE DESC limit 1) uscUnitName,
to_char((SELECT USC_DATE from idx_biz_jg_construction_info where "RECORD" = ui."RECORD" ORDER BY USC_DATE DESC limit 1), 'YYYY-MM') uscDate,
ui."RECORD" record,
ui.IS_INTO_MANAGEMENT as isIntoManagement,
ri."EQU_CODE" equCode,
ri."EQU_LIST" equList,
(select name from tz_equipment_category where code = ri."EQU_LIST") equListName,
ri."EQU_CATEGORY" equCategory,
(select name from tz_equipment_category where code = ri."EQU_CATEGORY") equCategoryName,
ri."EQU_DEFINE" equDefine,
(select name from tz_equipment_category where code = ri."EQU_DEFINE") equDefineName,
pp."PIPE_NAME" as productName,
ri."BRAND_NAME" brandName,
ri."EQU_TYPE" equType,
ri."EQU_CODE_TYPE" equCodeType,
ri."WHETHER_VEHICLE_CYLINDER" whetherVehicleCylinder,
ri."USE_ORG_CODE" useOrgCode,
pp."DEVICE_NAME" deviceName,
(select name from cb_data_dictionary where code = pp."DEVICE_LEVEL" and type in ('GYGDHIS','8100','8200','8300')) deviceLevel,
pp."PIPE_NAME" pipeName,
pp."PIPELINE_NUMBER" pipelineNumber,
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness,
pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH_TEXT" AS pipeLengthText,
pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature,
pp."MEDIUM" medium,
pp."REMARKS" remarks,
pp."WORK_PRESSURE" AS workPressure,
pp."WORK_TEMPERATURE" AS workTemperature,
pp."WORK_MEDIUM" AS workMedium,
ui."EQU_STATE" as equState,
ui."REC_DATE",
(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,
(select INSPECT_REPORT from idx_biz_jg_inspection_detection_info where "RECORD" = ui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) inspectReport
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="selectPipeLinePage" resultType="java.util.Map">
select * from (
<include refid="page-list-pipeline"/>
WHERE
ui."PROJECT_CONTRAPTION_ID" = #{projectContraptionId}
<choose>
<when test='applyType == "0"'>
and ui.EQU_STATE = '1'
</when>
<when test='applyType == "SB_TY"'>
and ui.EQU_STATE = '1'
</when>
<otherwise>
and ui.EQU_STATE = '2'
</otherwise>
</choose>
)
ORDER BY REC_DATE DESC
</select>
</mapper>
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.alibaba.fastjson.JSONObject;
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;
......@@ -8,6 +9,8 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jg.api.dto.JgEnableDisableDto;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgEnableDisableServiceImpl;
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 io.swagger.annotations.ApiParam;
......@@ -54,14 +57,14 @@ public class JgEnableDisableController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "使用登记设备关系表分页查询", notes = "使用登记设备关系表分页查询")
public ResponseModel<Page<Map<String, Object>>> page(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
@RequestParam(value = "sort",required = false) String sort,
@RequestParam(value = "sort", required = false) String sort,
@ApiParam(value = "客户端类型: jgAudit-监管审核;jgLook-监管查看")
@RequestParam(value = "client", required = false, defaultValue = "jgAudit") String client,
@RequestParam(value = "client", required = false, defaultValue = "jgAudit") String client,
JgEnableDisableDto dto) {
Page<Map<String, Object>> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(jgEnableDisableServiceImpl.pageList(page,sort, dto, client));
return ResponseHelper.buildResponse(jgEnableDisableServiceImpl.pageList(page, sort, dto, client));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......@@ -103,6 +106,7 @@ public class JgEnableDisableController extends BaseController {
/**
* 处理设备启用停用流程结束,业务未结束单子问题
*
* @param applyNo 申请单号
* @return s
*/
......@@ -113,4 +117,49 @@ public class JgEnableDisableController extends BaseController {
jgEnableDisableServiceImpl.handleEnableDisableWrongData(applyNo);
return ResponseHelper.buildResponse("ok");
}
/**
* 查询使用登记证状态为已登记的装置列表
*
* @param current 当前页
* @param size 每页数
* @return page
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/jgProjectContraptionPage")
@ApiOperation(value = "查询使用登记证状态为已登记的装置列表", notes = "查询使用登记证状态为已登记的装置列表")
public ResponseModel<IPage<IdxBizJgProjectContraption>> getJgProjectContraptionPage(@RequestParam(required = false) String sequenceNbr,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
Page<IdxBizJgProjectContraption> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
IPage<IdxBizJgProjectContraption> re = jgEnableDisableServiceImpl.getJgProjectContraptionPage(getSelectedOrgInfo().getCompany().getCompanyCode(), page, sequenceNbr);
return ResponseHelper.buildResponse(re);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/projectContraption")
@ApiOperation(value = "装置详情", notes = "装置详情")
public ResponseModel<IdxBizJgProjectContraptionDto> findOneProjectContraption(@RequestParam("record") Long sequenceNbr) {
IdxBizJgProjectContraptionDto idxBizJgProjectContraptionDto = jgEnableDisableServiceImpl.findOneProjectContraption(sequenceNbr);
return ResponseHelper.buildResponse(idxBizJgProjectContraptionDto);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/pipeline/page")
@ApiOperation(value = "查询装置下可做启停的管道", notes = "查询装置下可做启停的管道")
public ResponseModel<IPage<Map<String, Object>>> findPipeLinePage(
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
@RequestParam String projectContraptionId,
@RequestParam String applyType) {
Page<Map<String, Object>> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
IPage<Map<String, Object>> re = jgEnableDisableServiceImpl.findPipeLinePage(page, projectContraptionId, applyType);
return ResponseHelper.buildResponse(re);
}
}
......@@ -69,6 +69,10 @@ public class IdxBizJgProjectContraptionDto extends BaseDto {
@ApiModelProperty(value = "其他附件")
private JSONArray otherAccessories;
@ApiModelProperty(value = "其他附件")
private JSONArray proOtherAccessories;
@ApiModelProperty(value = "属地监管单位代码")
private String orgCode;
......@@ -140,4 +144,11 @@ public class IdxBizJgProjectContraptionDto extends BaseDto {
@ApiModelProperty("证书打印标记")
private String certificatePrintTag;
@ApiModelProperty(value = "工程装置id")
private Long projectContraptionId;
public Long getProjectContraptionId(){
return this.sequenceNbr;
}
}
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