Commit 7561c92e authored by 刘林's avatar 刘林

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

parents c7420f55 c60c35d8
......@@ -229,4 +229,10 @@ public class JyjcInspectionApplication extends BaseEntity {
*/
@TableField(value = "is_must_accept")
private Boolean isMustAccept;
/**
* 装置id
*/
@TableField("project_contraption_id")
private String projectContraptionId;
}
......@@ -222,4 +222,10 @@ public class JyjcInspectionResult extends BaseEntity {
*/
@TableField(value = "plan_create_date")
private Date planCreateDate;
/**
* 管理方式: single-单台(套)报检;batch-批量报检
*/
@TableField(value = "manage_type")
private String manageType;
}
......@@ -26,8 +26,7 @@ import java.util.Set;
public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspectionApplication> {
public Page<JyjcInspectionApplicationModel> queryForDataList(Page<JyjcInspectionApplication> page, String applicationNo, String inspectionClassify, String applicationUnitCode, String applicationUnitName, String equipClassify, String inspectionUnitCode, String inspectionUnitName, String applicationDate, String acceptDate, String inspectionChargePerson, String status, String bizType);
// public Page<JyjcInspectionApplicationModel> queryForDataList( Page<JyjcInspectionApplication> page, String applicationNo, String inspectionClassify, String applicationUnitCode,String applicationUnitName, String equipClassify, String inspectionUnitCode,String inspectionUnitName, String applicationDate, String acceptDate, String inspectionChargePerson, String status , String bizType, List<String> roleIds);
Page<JyjcInspectionApplicationModel> queryForDataList(Page<JyjcInspectionApplication> page, String applicationNo, String inspectionClassify, String applicationUnitCode, String applicationUnitName, String equipClassify, String inspectionUnitCode, String inspectionUnitName, String applicationDate, String acceptDate, String inspectionChargePerson, String status, String bizType);
Page<JyjcInspectionApplicationEquipModel> listByCategory(Page<JyjcInspectionApplicationEquipModel> page, @Param("equipClassify") String equipClassify);
......@@ -44,6 +43,7 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti
*/
Set<String> queryRecordInFlowing();
/**
* 查询待受理流流程状态的设备
* @param equips 需要判断的设备
......@@ -110,6 +110,20 @@ public interface JyjcInspectionApplicationMapper extends BaseMapper<JyjcInspecti
Long queryAllFinishedCountForDetail(@Param("dpFilterParamForDetailDto") DPFilterParamForDetailDto dpFilterParamForDetailDto);
List<JyjcInspectionApplicationVo> queryExportInIds(@Param("ids") List<String> ids);
/**
* 查询指定装置下的管道,样式为汇总表样式
* @param projectContraptionSeq 装置id
* @return List<Map<String, Object>>
*/
List<Map<String, Object>> selectPieLineListByProjectId(@Param("projectContraptionSeq") String projectContraptionSeq);
/**
* 查询指定管道的信息,样式为汇总表样式
* @param records 管道ids
* @return List<Map<String, Object>>
*/
List<Map<String, Object>> selectPieLineListOfInspect(@Param("records") List<String> records);
}
......@@ -108,6 +108,13 @@ public class JyjcInspectionApplicationEquipDto {
private String produceUnitName;
@ApiModelProperty(value = "制造日期")
private String produceDate;
@ApiModelProperty(value = "设备唯一标识")
private String record;
@ApiModelProperty(value = "管道编号")
private String pipelineNumber;
// @ApiModelProperty(value = "使用年限")
// private String use;
}
......@@ -113,4 +113,7 @@ public class JyjcInspectionApplicationEquipModel extends BaseModel {
private String produceUnitName;
private String produceDate;
@ApiModelProperty(value = "装置id")
private String projectContraptionId;
}
package com.yeejoin.amos.boot.module.jyjc.api.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -174,6 +175,9 @@ public class JyjcInspectionApplicationModel extends BaseModel {
*/
private Boolean isMustAccept;
@ApiModelProperty(value = "装置id")
private String projectContraptionId;
public String getProcessInstanceId() {
return this.instanceId != null ? this.instanceId : this.processInstanceId;
}
......
package com.yeejoin.amos.boot.module.jyjc.api.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -179,4 +180,11 @@ public class JyjcInspectionResultModel extends BaseModel {
* 安全等级
*/
private String safetyLevel;
/**
* 管理方式: single-单台(套)报检;batch-批量报检
*/
private String manageType;
}
......@@ -635,4 +635,69 @@
</where>
order by tzjia.application_no desc
</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,
-- 历史遗留问题 故 as
pp."PIPE_NAME" as productName,
ri."BRAND_NAME" brandName,
ri."EQU_TYPE" equType,
ri."EQU_CODE_TYPE" equCodeType,
ri."WHETHER_VEHICLE_CYLINDER" whetherVehicleCylinder,
ri."USE_ORG_CODE" useOrgCode,
pp."DEVICE_NAME" deviceName,
(select name from cb_data_dictionary where code = pp."DEVICE_LEVEL" and type = 'GBI') deviceLevel,
pp."PIPE_NAME" pipeName,
pp."PIPELINE_NUMBER" pipelineNumber,
pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness,
pp."PIPE_LENGTH" pipeLength,
pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature,
pp."MEDIUM" medium,
pp."REMARKS" remarks,
pp."WORK_PRESSURE" AS workPressure,
pp."WORK_TEMPERATURE" AS workTemperature,
pp."WORK_MEDIUM" AS workMedium,
(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
idx_biz_jg_use_info ui
LEFT JOIN idx_biz_jg_register_info ri on ri."RECORD" = ui."RECORD"
LEFT JOIN idx_biz_jg_tech_params_pipeline pp ON pp."RECORD" = ui."RECORD"
</sql>
<select id="selectPieLineListByProjectId" resultType="java.util.Map">
select * from (
<include refid="page-list-pipeline"/>
WHERE
ri."EQU_CATEGORY" = '8300'
and ui."PROJECT_CONTRAPTION_ID" = #{projectContraptionSeq}
ORDER BY ui.REC_DATE DESC
)
</select>
<select id="selectPieLineListOfInspect" resultType="java.util.Map">
<include refid="page-list-pipeline"/>
WHERE
ui.record in
<foreach collection="records" item="record" open="(" close=")" separator=",">
#{record}
</foreach>
ORDER BY ui.REC_DATE DESC
</select>
</mapper>
......@@ -106,11 +106,105 @@
LEFT JOIN idx_biz_jg_register_info ibjri ON ibjui.record = ibjri.record
LEFT JOIN idx_biz_jg_other_info ot ON ot.record = ibjri.record
</sql>
<sql id="page-list2">
SELECT
res.sequence_nbr,
res.inspection_unit_code,
res.application_no,
res.application_unit_code,
res.equip_unicode,
res.result_status,
res.license_number,
res.result_no,
res.inspector,
res.inner_person_code,
res.inspection_conclusion,
res.inspection_date,
res.next_inspection_date,
res.inspection_start_date,
res.inspection_end_date,
res.inspection_result_summary,
res.non_conformance,
res.remark,
res.rec_user_id,
res.rec_date,
res.biz_type,
res.equ_category,
res.inspection_type,
res.inspection_type_name,
res.application_date,
res.inspection_unit_name,
res.application_unit_name,
res.inspection_type_name,
ibjui.use_unit_name,
ibjui.use_unit_credit_code,
ibjri.equ_code,
ibjui.use_inner_code,
ibjri.equ_list,
(SELECT NAME FROM tz_equipment_category WHERE code = res.equ_list) AS equ_list_name,
ibjri.use_org_code,
res.equ_define,
res.result_type,
ot.supervisory_code,
concat(ibjui.province_name, ibjui.city_name,ibjui.county_name, ibjui.street_name,ibjui.ADDRESS ) as equUseAddress
FROM
tz_jyjc_inspection_result res
LEFT JOIN idx_biz_jg_use_info ibjui ON ibjui.record = res.equip_unicode
LEFT JOIN idx_biz_jg_register_info ibjri ON ibjui.record = ibjri.record
LEFT JOIN idx_biz_jg_other_info ot ON ot.record = ibjri.record
</sql>
<sql id="page-list3">
SELECT
res.sequence_nbr,
res.inspection_unit_code,
res.application_no,
res.application_unit_code,
res.equip_unicode,
res.result_status,
res.license_number,
res.result_no,
res.inspector,
res.inner_person_code,
res.inspection_conclusion,
res.inspection_date,
res.next_inspection_date,
res.inspection_start_date,
res.inspection_end_date,
res.inspection_result_summary,
res.non_conformance,
res.remark,
res.rec_user_id,
res.rec_date,
res.biz_type,
res.equ_category,
res.inspection_type,
res.inspection_type_name,
res.application_date,
res.inspection_unit_name,
res.application_unit_name,
res.inspection_type_name,
pc.use_unit_name,
pc.use_unit_credit_code,
pc.equ_code,
'' as use_inner_code,
res.equ_list,
(SELECT NAME FROM tz_equipment_category WHERE code = res.equ_list) AS equ_list_name,
pc.use_registration_code as use_org_code,
res.equ_define,
res.result_type,
pc.supervisory_code,
concat_ws('', pc.province_name, pc.city_name,pc.county_name, pc.street_name,pc.address ) as equUseAddress
FROM
tz_jyjc_inspection_result res
LEFT JOIN idx_biz_jg_project_contraption pc ON pc.sequence_nbr = res.equip_unicode
</sql>
<select id="selectForPage"
resultType="com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel">
<include refid="page-list"/>
select * from (
<include refid="page-list2"/>
<where>
res.equ_list != '8000'
<if test="jyjcInspectionResultModel.applicationNo != '' and jyjcInspectionResultModel.applicationNo != null">
and res.application_no like concat('%',#{jyjcInspectionResultModel.applicationNo},'%')
</if>
......@@ -156,7 +250,48 @@
</otherwise>
</choose>
</where>
ORDER BY res.sequence_nbr DESC
union all
<include refid="page-list3"/>
<where>
res.equ_list = '8000'
<if test="jyjcInspectionResultModel.applicationNo != '' and jyjcInspectionResultModel.applicationNo != null">
and res.application_no like concat('%',#{jyjcInspectionResultModel.applicationNo},'%')
</if>
<if test="jyjcInspectionResultModel.applicationDate!=null">
AND res.application_date = #{jyjcInspectionResultModel.applicationDate}
</if>
<if test="jyjcInspectionResultModel.inspectionType != '' and jyjcInspectionResultModel.inspectionType != null">
and res.inspection_type = #{jyjcInspectionResultModel.inspectionType}
</if>
<if test="jyjcInspectionResultModel.applicationUnitName != '' and jyjcInspectionResultModel.applicationUnitName != null">
and res.application_unit_name like concat('%',#{jyjcInspectionResultModel.applicationUnitName},'%')
</if>
<if test="jyjcInspectionResultModel.equList != '' and jyjcInspectionResultModel.equList != null">
and res.equ_list = #{jyjcInspectionResultModel.equList}
</if>
<if test="jyjcInspectionResultModel.useOrgCode != '' and jyjcInspectionResultModel.useOrgCode != null">
and pc.use_registration_code like concat('%',#{jyjcInspectionResultModel.useOrgCode},'%')
</if>
<if test="jyjcInspectionResultModel.inspectionUnitName != '' and jyjcInspectionResultModel.inspectionUnitName != null">
and res.inspection_unit_name like concat('%',#{jyjcInspectionResultModel.inspectionUnitName},'%')
</if>
<choose>
<when test="identity == 'apply'">
and res.application_unit_code = #{jyjcInspectionResultModel.companyCode}
</when>
<when test="identity == 'receive'">
and res.inspection_unit_code = #{jyjcInspectionResultModel.companyCode}
</when>
<when test="identity == 'all'">
and (res.application_unit_code = #{jyjcInspectionResultModel.companyCode} or res.inspection_unit_code = #{jyjcInspectionResultModel.companyCode})
</when>
<otherwise>
1 = 2
</otherwise>
</choose>
</where>
)
ORDER BY sequence_nbr DESC
</select>
<select id="queryInspectionTimelinessTopXX" resultType="com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionTimelinesDto">
select
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jyjc.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;
......@@ -13,6 +14,7 @@ import com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionApplicationPushEven
import com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.EventPublisher;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import com.yeejoin.amos.feign.systemctl.model.DictionarieModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -289,4 +291,27 @@ public class JyjcInspectionApplicationController extends BaseController {
Assert.hasText(ids,"未选择导出数据");
jyjcInspectionApplicationServiceImpl.export(bizType,response, Arrays.asList(ids.split(",")));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/projectContraptionPage")
@ApiOperation(value = "按照检验类型查询可进行检验的装置", notes = "不包括流程中的")
public ResponseModel<IPage<IdxBizJgProjectContraption>> getJgProjectContraptionPage(@RequestParam String inspectionType,
@RequestParam String equCategory,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
ReginParams selectedOrgInfo = getSelectedOrgInfo();
Page<IdxBizJgProjectContraption> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
IPage<IdxBizJgProjectContraption> re = jyjcInspectionApplicationServiceImpl.getJgProjectContraptionPage(inspectionType, page, selectedOrgInfo.getCompany().getCompanyCode(), equCategory);
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(jyjcInspectionApplicationServiceImpl.getDeviceListByProjectContraption(projectContraptionSeq));
}
}
......@@ -10,6 +10,7 @@ import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
......@@ -35,12 +36,11 @@ public class JyjcInspectionApplicationEquipServiceImpl extends BaseService<JyjcI
return this.queryForList("" , false);
}
public List listApplicationEquipByApplicationSeq(Long applicationSeq) {
// this.queryForList 尽量不要重载方法
List<JyjcInspectionApplicationEquip> entitys = this.lambdaQuery().eq(JyjcInspectionApplicationEquip::getApplicationSeq, applicationSeq).list();
if (ValidationUtil.isEmpty(entitys)) {
return Collections.EMPTY_LIST;
public List<JyjcInspectionApplicationEquipModel> listApplicationEquipByApplicationSeq(Long applicationSeq) {
List<JyjcInspectionApplicationEquip> entity = this.lambdaQuery().eq(JyjcInspectionApplicationEquip::getApplicationSeq, applicationSeq).list();
if (ValidationUtil.isEmpty(entity)) {
return new ArrayList<>();
}
return Bean.toModels(entitys, JyjcInspectionApplicationEquipModel.class);
return Bean.toModels(entity, JyjcInspectionApplicationEquipModel.class);
}
}
\ No newline at end of file
......@@ -23,6 +23,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcInspectionResultParam;
import com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum;
import com.yeejoin.amos.boot.module.jyjc.api.enums.EquipCategoryEnum;
import com.yeejoin.amos.boot.module.jyjc.api.enums.ResultStatusEnum;
import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionApplicationMapper;
import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionResultMapper;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultDataModel;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcInspectionResultModel;
......@@ -35,6 +36,7 @@ import com.yeejoin.amos.boot.module.jyjc.biz.event.UseInfoSaveToDbEvent;
import com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.BizEmqPublisher;
import com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.EventPublisher;
import com.yeejoin.amos.boot.module.jyjc.biz.util.JsonUtils;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
......@@ -74,6 +76,8 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
private static final String JYJC_SUBMIT_FILE_PREFIX = "JYJC_";
private static final String JYJC_SUBMIT_FILE_JYBG = "JYBG";
private static final String JYJC_SUBMIT_KEY = "inspectResult";
private static final String JYJC_PIELINE = "pieLine";
private static final String JYJC_RESULT_STATUS = "2";
@Autowired
......@@ -82,9 +86,6 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
@Autowired
private IJyjcInspectionResultParamService iJyjcInspectionResultParamService;
@Autowired
EquipmentCategoryMapper equipmentCategoryMapper;
@Value("classpath:/json/equipCategory.json")
private Resource equipCategory;
......@@ -99,8 +100,6 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
private RedisUtils redisUtils;
@Autowired
UseInfoMapper useInfoMapper;
@Autowired
CategoryOtherInfoMapper categoryOtherInfoMapper;
@Autowired
InspectionDetectionInfoMapper inspectionDetectionInfoMapper;
......@@ -109,9 +108,6 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
private SnowflakeIdUtil sequence;
@Autowired
TzBaseEnterpriseInfoMapper tzBaseEnterpriseInfoMapper;
@Autowired
CommonServiceImpl commonService;
@Autowired
......@@ -126,6 +122,12 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
@Autowired
private ESEquipmentCategory esEquipmentCategory;
@Autowired
JyjcInspectionApplicationMapper inspectionApplicationMapper;
@Autowired
private IdxBizJgProjectContraptionMapper idxBizJgProjectContraptionMapper;
/**
* 检验检测单位分页查询
*/
......@@ -369,7 +371,6 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
}).collect(Collectors.toMap(JyjcInspectionResultAttachment::getAttachmentType, JyjcInspectionResultAttachment::getAttachmentUrlList));
map.putAll(attachmentMap);
}
// 获取技术参数
List<JyjcInspectionResultParam> paramList = iJyjcInspectionResultParamService.getParamByResultSeq(sequenceNbr);
if (!CollectionUtils.isEmpty(paramList)) {
......
package com.yeejoin.amos.boot.module.ymt.api.mapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.ymt.api.entity.IdxBizJgProjectConstruction;
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 +40,15 @@ public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgPro
Integer countContraptionInUseTimesForDelete(@Param("projectContraptionId") Long projectContraptionId);
List<IdxBizJgProjectContraption> selectErrorManagementProject();
/**
* 查询检验的装置
* @param page 分页
* @param inspectionType 检验类型
* @param companyCode 公司code
* @param equCategory 设备类别
* @return 分页
*/
IPage<IdxBizJgProjectContraption> queryJgProjectContraptionPage(Page<IdxBizJgProjectContraption> page, @Param("inspectionType") String inspectionType, @Param("companyCode") String companyCode, @Param("equCategory") String equCategory);
}
......@@ -141,4 +141,35 @@
and p.is_into_management = false
and n.is_delete = false
</select>
<select id="queryJgProjectContraptionPage"
resultType="com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption">
select
*
from
idx_biz_jg_project_contraption pc
where
1=1
<choose>
<when test="inspectionType == 'AZJDJY'">
and pc.usc_unit_credit_code=#{companyCode}
and pc.is_into_management = true
and (pc.use_registration_code is null or pc.use_registration_code = '' )
</when>
<otherwise>
<choose>
<when test="equCategory == '8300'">
and pc.use_unit_credit_code=#{companyCode}
and pc.is_into_management = true
and pc.use_registration_code <![CDATA[<>]]> ''
</when>
<otherwise>
and pc.use_unit_credit_code=#{companyCode}
and pc.is_into_management = true
and exists (select 1 from idx_biz_jg_project_inspection pi where pi."PROJECT_CONTRAPTION_ID" = pc.sequence_nbr)
</otherwise>
</choose>
</otherwise>
</choose>
and not EXISTS (SELECt 1 FROM tz_jyjc_inspection_application a where a.status='6611' and a.application_unit_code=#{companyCode} and a.project_contraption_id = pc.sequence_nbr)
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment