Commit d81ee883 authored by 刘凡's avatar 刘凡

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents 7dcc26d1 47e4b052
...@@ -158,4 +158,10 @@ public class ESEquipmentCategoryDto { ...@@ -158,4 +158,10 @@ public class ESEquipmentCategoryDto {
@Field(type = FieldType.Keyword) @Field(type = FieldType.Keyword)
private String USE_SITE_CODE; private String USE_SITE_CODE;
/**
* 工程装置(工业管道使用)
*/
@Field(type = FieldType.Keyword)
private String PROJECT_CONTRAPTION;
} }
...@@ -154,11 +154,11 @@ ...@@ -154,11 +154,11 @@
<select id="queryForFlowingEquipList" resultType="com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto"> <select id="queryForFlowingEquipList" resultType="com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto">
select a.use_unit_credit_code as companyCode, select a.use_unit_credit_code as companyCode,
group_concat(b.certificate_seq) as records group_concat(b.equ_id) as records
from tzs_jg_change_registration_name a, from tzs_jg_enable_disable a,
tzs_jg_change_registration_name_eq b tzs_jg_enable_disable_eq b
where a.sequence_nbr = b.name_change_registration_id where a.sequence_nbr = b.enable_disable_apply_id
and a.audit_status in ('三级待受理', '二级待受理', '一级待受理') and a.audit_status in ('待受理')
GROUP BY a.use_unit_credit_code GROUP BY a.use_unit_credit_code
</select> </select>
</mapper> </mapper>
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
tzs_jg_maintain_notice_eq b tzs_jg_maintain_notice_eq b
where where
a.sequence_nbr = b.equip_transfer_id a.sequence_nbr = b.equip_transfer_id
and a.notice_status not in('6614','6615','6610','6617','6616') and a.notice_status = '6612'
GROUP BY a.install_unit_credit_code GROUP BY a.install_unit_credit_code
</select> </select>
</mapper> </mapper>
...@@ -453,7 +453,7 @@ ...@@ -453,7 +453,7 @@
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, (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 limit 1)) inspectConclusion, (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 DESC REC_DATE 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 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 FROM
idx_biz_jg_use_info ui idx_biz_jg_use_info ui
...@@ -461,6 +461,7 @@ ...@@ -461,6 +461,7 @@
LEFT JOIN idx_biz_jg_tech_params_pipeline pp ON pp."RECORD" = ui."RECORD" LEFT JOIN idx_biz_jg_tech_params_pipeline pp ON pp."RECORD" = ui."RECORD"
</sql> </sql>
<select id="queryForUnitPipelineEquipmentPage" resultType="com.alibaba.fastjson.JSONObject"> <select id="queryForUnitPipelineEquipmentPage" resultType="com.alibaba.fastjson.JSONObject">
select * from (
<include refid="page-list-pipeline"/> <include refid="page-list-pipeline"/>
WHERE WHERE
ri."EQU_CATEGORY" = '8300' ri."EQU_CATEGORY" = '8300'
...@@ -487,6 +488,7 @@ ...@@ -487,6 +488,7 @@
!='一级受理已驳回' and v.status !='使用单位已撤回' and v.status !='已作废' ) !='一级受理已驳回' and v.status !='使用单位已撤回' and v.status !='已作废' )
</if> </if>
ORDER BY ui.REC_DATE DESC ORDER BY ui.REC_DATE DESC
) where uscUnitName is not null
</select> </select>
<select id="queryForUnitPipelineEquipment" resultType="java.util.Map"> <select id="queryForUnitPipelineEquipment" resultType="java.util.Map">
......
...@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.jg.biz.controller; ...@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
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.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService; import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel; import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -215,4 +217,24 @@ public class IdxBizJqEquipmentRegisterController extends BaseController { ...@@ -215,4 +217,24 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
throw new Exception("系统异常"); throw new Exception("系统异常");
} }
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getProjectContraption")
@ApiOperation(httpMethod = "GET", value = "查询当前单位下工程装置信息", notes = "查询当前单位下工程装置信息")
public ResponseModel<Object> queryEquipCanUsedByVesselPageHistory() {
ReginParams info = getSelectedOrgInfo();
if (info.getCompany().getLevel().equals(BaseController.COMPANY_TYPE_COMPANY)) {
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.getProjectContraption(info.getCompany().getCompanyCode()));
} else {
return ResponseHelper.buildResponse(new ArrayList<String>());
}
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/esSynchronousProjectContraption")
@ApiOperation(httpMethod = "GET", value = "ES历史数据同步工程装置字段值", notes = "ES历史数据同步工程装置字段值")
public ResponseModel<Object> esSynchronousProjectContraption() {
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.esSynchronousProjectContraption());
}
} }
...@@ -44,4 +44,8 @@ public interface IIdxBizJgRegisterInfoService { ...@@ -44,4 +44,8 @@ public interface IIdxBizJgRegisterInfoService {
Object importPressureData(MultipartFile multipartFile) throws Exception; Object importPressureData(MultipartFile multipartFile) throws Exception;
Object savePressureVesselData(Map<String, Object> paramMap); Object savePressureVesselData(Map<String, Object> paramMap);
Object getProjectContraption(String uscUnitCreditCode);
Boolean esSynchronousProjectContraption();
} }
...@@ -22,6 +22,7 @@ import com.yeejoin.amos.feign.systemctl.Systemctl; ...@@ -22,6 +22,7 @@ import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.RegionModel; import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.lucene.queryparser.classic.QueryParser;
import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RequestOptions;
...@@ -293,7 +294,7 @@ public class DPStatisticsServiceImpl { ...@@ -293,7 +294,7 @@ public class DPStatisticsServiceImpl {
request.indices("idx_biz_view_jg_all"); request.indices("idx_biz_view_jg_all");
BoolQueryBuilder boolMust = QueryBuilders.boolQuery(); BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
// 按照管辖机构区域信息模糊查询 // 按照管辖机构区域信息模糊查询
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", orgCode + "*")); boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(orgCode) + "*"));
// 设备类别精确查询气瓶 // 设备类别精确查询气瓶
boolMust.must(QueryBuilders.termsQuery("EQU_CATEGORY_CODE", EQU_CATEGORY_CYLINDER)); boolMust.must(QueryBuilders.termsQuery("EQU_CATEGORY_CODE", EQU_CATEGORY_CYLINDER));
// 纳管状态为已纳管 // 纳管状态为已纳管
...@@ -324,7 +325,7 @@ public class DPStatisticsServiceImpl { ...@@ -324,7 +325,7 @@ public class DPStatisticsServiceImpl {
request.indices("idx_biz_view_jg_all"); request.indices("idx_biz_view_jg_all");
BoolQueryBuilder boolMust = QueryBuilders.boolQuery(); BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
// 按照管辖机构区域信息模糊查询 // 按照管辖机构区域信息模糊查询
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", orgCode + "*")); boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(orgCode) + "*"));
// 纳管状态为已纳管 // 纳管状态为已纳管
boolMust.must(QueryBuilders.termQuery("IS_INTO_MANAGEMENT", true)); boolMust.must(QueryBuilders.termQuery("IS_INTO_MANAGEMENT", true));
SearchSourceBuilder builder = new SearchSourceBuilder(); SearchSourceBuilder builder = new SearchSourceBuilder();
...@@ -514,12 +515,15 @@ public class DPStatisticsServiceImpl { ...@@ -514,12 +515,15 @@ public class DPStatisticsServiceImpl {
} }
private long countEquipNumFromES(DPFilterParamDto dpFilterParamDto, Integer... states) { private long countEquipNumFromES(DPFilterParamDto dpFilterParamDto, Integer... states) {
String orgCode = getAndSetOrgCode(dpFilterParamDto.getCityCode());
long num; long num;
CountRequest request = new CountRequest(); CountRequest request = new CountRequest();
request.indices("idx_biz_view_jg_all"); request.indices("idx_biz_view_jg_all");
BoolQueryBuilder boolMust = QueryBuilders.boolQuery(); BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
// 区域信息模糊查询 // 按照管辖机构区域信息模糊查询
boolMust.must(QueryBuilders.wildcardQuery("USE_PLACE_CODE", "*" + dpFilterParamDto.getCityCode() + "*")); boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(orgCode) + "*"));
// 纳管状态为已纳管
boolMust.must(QueryBuilders.termQuery("IS_INTO_MANAGEMENT", true));
// 设备状态过滤 // 设备状态过滤
boolMust.must(QueryBuilders.termsQuery("EQU_STATE", states)); boolMust.must(QueryBuilders.termsQuery("EQU_STATE", states));
request.query(boolMust); request.query(boolMust);
...@@ -597,7 +601,7 @@ public class DPStatisticsServiceImpl { ...@@ -597,7 +601,7 @@ public class DPStatisticsServiceImpl {
private long countCompanyByOperatingStatus(DPFilterParamDto dpFilterParamDto, String operatingStatus) { private long countCompanyByOperatingStatus(DPFilterParamDto dpFilterParamDto, String operatingStatus) {
String orgCode = getAndSetOrgCode(dpFilterParamDto.getCityCode()); String orgCode = getAndSetOrgCode(dpFilterParamDto.getCityCode());
return enterpriseInfoMapper.countByOperatingStatusAndOrgCode(orgCode, operatingStatus); return enterpriseInfoMapper.countByOperatingStatusAndOrgCode(orgCode, operatingStatus, dpFilterParamDto.getCityCode());
} }
private Map<String, CountDto> countUserNum(DPFilterParamDto dpFilterParamDto) { private Map<String, CountDto> countUserNum(DPFilterParamDto dpFilterParamDto) {
...@@ -1365,12 +1369,31 @@ public class DPStatisticsServiceImpl { ...@@ -1365,12 +1369,31 @@ public class DPStatisticsServiceImpl {
regionCodeOrgCodeMap.put(dpFilterParamDto.getCityCode(), orgCode); regionCodeOrgCodeMap.put(dpFilterParamDto.getCityCode(), orgCode);
} }
Long certificateCount = jgUseRegistrationManageMapper.countCertificateByReginCode(orgCode); Long certificateCount = jgUseRegistrationManageMapper.countCertificateByReginCode(orgCode);
Long deviceCount = equipmentCategoryMapper.countEquipByReginCode(orgCode); Long deviceCount = countEquipByReginCode(orgCode);
result.put(DPMapStatisticsItemEnum.CERTIFICATE_COUNT.getCode(), certificateCount); result.put(DPMapStatisticsItemEnum.CERTIFICATE_COUNT.getCode(), certificateCount);
result.put(DPMapStatisticsItemEnum.DEVICE_COUNT.getCode(), deviceCount); result.put(DPMapStatisticsItemEnum.DEVICE_COUNT.getCode(), deviceCount);
return result; return result;
} }
private Long countEquipByReginCode(String orgCode) {
long num = 0;
CountRequest request = new CountRequest();
request.indices("idx_biz_view_jg_all");
BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
// 按照管辖机构区域信息模糊查询
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", orgCode + "*"));
// 纳管状态为已纳管
boolMust.must(QueryBuilders.termQuery("IS_INTO_MANAGEMENT", true));
request.query(boolMust);
try {
CountResponse response = restHighLevelClient.count(request, RequestOptions.DEFAULT);
num = response.getCount();
} catch (IOException e) {
throw new RuntimeException(e);
}
return num;
}
public Map<String, Object> dataStatisticCountByReginCode(DPFilterParamDto dpFilterParamDto) { public Map<String, Object> dataStatisticCountByReginCode(DPFilterParamDto dpFilterParamDto) {
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
List<Map<String, Object>> mapList = this.dataStatisticByReginCode(dpFilterParamDto); List<Map<String, Object>> mapList = this.dataStatisticByReginCode(dpFilterParamDto);
......
...@@ -3043,4 +3043,25 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper; ...@@ -3043,4 +3043,25 @@ private SafetyProblemTracingMapper safetyProblemTracingMapper;
.findFirst(); .findFirst();
return optional.map(map -> (String) map.get("useCode")).orElse(null); return optional.map(map -> (String) map.get("useCode")).orElse(null);
} }
@Override
public Object getProjectContraption(String uscUnitCreditCode) {
return this.baseMapper.getProjectContraption(uscUnitCreditCode);
}
@Override
public Boolean esSynchronousProjectContraption() {
List<Map<String, Object>> list = this.baseMapper.esSynchronousProjectContraption();
if (!ObjectUtils.isEmpty(list)) {
HashMap<String, Map<String, Object>> objMap = new HashMap<>();
list.forEach(item -> {
HashMap<String, Object> param = new HashMap<>();
param.put("PROJECT_CONTRAPTION", item.get("PROJECT_CONTRAPTION"));
objMap.put(item.get("SEQUENCE_NBR").toString(), param);
});
// 更新es
tzsServiceFeignClient.commonUpdateEsDataByIds(objMap);
}
return Boolean.TRUE;
}
} }
\ No newline at end of file
...@@ -72,6 +72,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -72,6 +72,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
private static final String SUBMIT_TYPE_FLOW = "1"; private static final String SUBMIT_TYPE_FLOW = "1";
private static final String PROCESS_DEFINITION_KEY = "maintainNotice"; private static final String PROCESS_DEFINITION_KEY = "maintainNotice";
private static final String TABLE_PAGE_ID = "maintainInfo"; private static final String TABLE_PAGE_ID = "maintainInfo";
private final List<String> NOT_FLOWING_STATE = Arrays.asList("6610", "6614", "6615", "6617", "6616");
@Autowired @Autowired
IJgInstallationNoticeService iJgInstallationNoticeService; IJgInstallationNoticeService iJgInstallationNoticeService;
...@@ -199,16 +200,20 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -199,16 +200,20 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
private void repeatUsedEquipCheck(List<Map<String, Object>> equipList, String companyCode) { private void repeatUsedEquipCheck(List<Map<String, Object>> equipList, String companyCode) {
equipList.forEach(equipMap -> EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_DEFINITION_KEY).equipRepeatUsedCheck(String.valueOf(equipMap.get("SEQUENCE_NBR")), companyCode)); equipList.forEach(equipMap -> EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_DEFINITION_KEY).equipRepeatUsedCheck(String.valueOf(equipMap.get("SEQUENCE_NBR")), companyCode));
} }
/** /**
* 删除 redis校验重复引用设备的数据 * 删除 redis校验重复引用设备的数据
*/ */
private void delRepeatUseEquipData(JgMaintainNotice notice) { private void delRepeatUseEquipData(JgMaintainNotice notice) {
if (NOT_FLOWING_STATE.contains(notice.getNoticeStatus())) {
LambdaQueryWrapper<JgMaintainNoticeEq> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<JgMaintainNoticeEq> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(JgMaintainNoticeEq::getEquipTransferId, notice.getSequenceNbr()); queryWrapper.eq(JgMaintainNoticeEq::getEquipTransferId, notice.getSequenceNbr());
JgMaintainNoticeEq noticeEq = jgMaintainNoticeEqMapper.selectOne(queryWrapper); JgMaintainNoticeEq noticeEq = jgMaintainNoticeEqMapper.selectOne(queryWrapper);
EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_DEFINITION_KEY) EquipUsedCheckStrategyContext.getUsedStrategy(PROCESS_DEFINITION_KEY)
.delDataForCheckEquipRepeatUsed(Collections.singletonList(noticeEq.getEquId()), notice.getInstallUnitCreditCode()); .delDataForCheckEquipRepeatUsed(Collections.singletonList(noticeEq.getEquId()), notice.getInstallUnitCreditCode());
} }
}
private void rollBackForDelRedisData() { private void rollBackForDelRedisData() {
FlowingEquipRedisContext.getContext().forEach(e -> { FlowingEquipRedisContext.getContext().forEach(e -> {
...@@ -932,9 +937,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto ...@@ -932,9 +937,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
jgMaintainNotice.setNextExecuteUserIds(workflowResultDto.getNextExecutorUserIds()); jgMaintainNotice.setNextExecuteUserIds(workflowResultDto.getNextExecutorUserIds());
jgMaintainNotice.setNextTaskId(workflowResultDto.getNextTaskId()); jgMaintainNotice.setNextTaskId(workflowResultDto.getNextTaskId());
jgMaintainNoticeMapper.updateById(jgMaintainNotice); jgMaintainNoticeMapper.updateById(jgMaintainNotice);
this.delRepeatUseEquipData(jgMaintainNotice);
} }
commonService.saveExecuteFlowData2Redis(instanceId, this.buildInstanceRuntimeData(jgMaintainNotice)); commonService.saveExecuteFlowData2Redis(instanceId, this.buildInstanceRuntimeData(jgMaintainNotice));
this.delRepeatUseEquipData(jgMaintainNotice);
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
......
...@@ -307,7 +307,7 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -307,7 +307,7 @@ public class TzBaseEnterpriseInfoServiceImpl
TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto = detail(tzBaseEnterpriseInfo.getSequenceNbr()); TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto = detail(tzBaseEnterpriseInfo.getSequenceNbr());
RegUnitIcDto regUnitIcDto = tzBaseEnterpriseInfoDto.getRegUnitIcDto(); RegUnitIcDto regUnitIcDto = tzBaseEnterpriseInfoDto.getRegUnitIcDto();
String creditCode = tzBaseEnterpriseInfoDto.getUseCode(); String creditCode = tzBaseEnterpriseInfoDto.getUseCode();
if (tzBaseEnterpriseInfo.getRegisterType().contains(UnitTypeEnum.grzt.getName())) { if (!ObjectUtils.isEmpty(tzBaseEnterpriseInfo.getRegisterType()) && tzBaseEnterpriseInfo.getRegisterType().contains(UnitTypeEnum.grzt.getName())) {
// 个人主体时截取证件号码(eg. 6600_210423195703287959 证件类型_证件号码) // 个人主体时截取证件号码(eg. 6600_210423195703287959 证件类型_证件号码)
if (creditCode.split("_").length > 1) { if (creditCode.split("_").length > 1) {
creditCode = creditCode.split("_")[1]; creditCode = creditCode.split("_")[1];
......
...@@ -90,6 +90,5 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> { ...@@ -90,6 +90,5 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
List<String> selectXiXianNew(); List<String> selectXiXianNew();
Long countEquipByReginCode(String orgCode);
} }
...@@ -6,6 +6,7 @@ import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel; ...@@ -6,6 +6,7 @@ import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 注册登记信息表 Mapper 接口 * 注册登记信息表 Mapper 接口
...@@ -24,5 +25,10 @@ public interface IdxBizJgRegisterInfoMapper extends BaseMapper<IdxBizJgRegisterI ...@@ -24,5 +25,10 @@ public interface IdxBizJgRegisterInfoMapper extends BaseMapper<IdxBizJgRegisterI
@Select("select code as dictDataKey,name as dictDataValue from tz_equipment_category where parent_id = ( SELECT sub.id from tz_equipment_category as sub where sub.code = #{equipCode})") @Select("select code as dictDataKey,name as dictDataValue from tz_equipment_category where parent_id = ( SELECT sub.id from tz_equipment_category as sub where sub.code = #{equipCode})")
List<DictionarieValueModel> queryAllEquCategoriesUnderTheEquList(@Param("equipCode") String equipCode); List<DictionarieValueModel> queryAllEquCategoriesUnderTheEquList(@Param("equipCode") String equipCode);
@Select("SELECT jui.PROJECT_CONTRAPTION as value FROM idx_biz_jg_construction_info jci LEFT JOIN idx_biz_jg_use_info jui on jci.RECORD = jui.RECORD where jci.USC_UNIT_CREDIT_CODE = #{uscUnitCreditCode} and jui.PROJECT_CONTRAPTION is not null GROUP BY jui.PROJECT_CONTRAPTION")
List<Map<String, Object>> getProjectContraption(@Param("uscUnitCreditCode")String uscUnitCreditCode);
@Select("SELECT SEQUENCE_NBR,REC_DATE,ORG_BRANCH_NAME,ORG_BRANCH_CODE,USE_UNIT_NAME,USE_UNIT_CREDIT_CODE,EQU_LIST_CODE,EQU_LIST,EQU_CATEGORY,EQU_CATEGORY_CODE,USE_ORG_CODE,CODE96333,EQU_CODE,SUPERVISORY_CODE,USE_PLACE,ADDRESS,EQU_STATE,STATUS,USE_INNER_CODE,FACTORY_NUM,PRODUCE_UNIT_NAME,INSPECT_REPORT,NEXT_INSPECT_DATE,CONSTRUCTION_TYPE,USC_UNIT_CREDIT_CODE,USC_UNIT_NAME,EQU_DEFINE,EQU_DEFINE_CODE,PRODUCT_NAME,BRAND_NAME,EQU_TYPE,DATA_SOURCE,IS_INTO_MANAGEMENT,WHETHER_VEHICLE_CYLINDER,WHETHER_SKID_MOUNTED_PRESSURE_VESSEL,DATE_FORMAT(PRODUCE_DATE,'%Y-%m-%d %H:%i:%s')as PRODUCE_DATE,PROJECT_CONTRAPTION from idx_biz_view_jg_all WHERE PROJECT_CONTRAPTION is not null")
List<Map<String, Object>> esSynchronousProjectContraption();
} }
...@@ -75,7 +75,8 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI ...@@ -75,7 +75,8 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
* *
* @param orgCode 公司的orgCode * @param orgCode 公司的orgCode
* @param operatingStatus 营业状态 * @param operatingStatus 营业状态
* @param cityCode 区域code
* @return Long 统计数量 * @return Long 统计数量
*/ */
Long countByOperatingStatusAndOrgCode(@Param("orgCode") String orgCode, @Param("operatingStatus") String operatingStatus); Long countByOperatingStatusAndOrgCode(@Param("orgCode") String orgCode, @Param("operatingStatus") String operatingStatus, @Param("cityCode") String cityCode);
} }
...@@ -104,7 +104,8 @@ ...@@ -104,7 +104,8 @@
IS_INTO_MANAGEMENT, IS_INTO_MANAGEMENT,
WHETHER_VEHICLE_CYLINDER, WHETHER_VEHICLE_CYLINDER,
WHETHER_SKID_MOUNTED_PRESSURE_VESSEL, WHETHER_SKID_MOUNTED_PRESSURE_VESSEL,
DATE_FORMAT(PRODUCE_DATE, '%Y-%m-%d %H:%i:%s') as PRODUCE_DATE DATE_FORMAT(PRODUCE_DATE, '%Y-%m-%d %H:%i:%s') as PRODUCE_DATE,
PROJECT_CONTRAPTION
from idx_biz_view_jg_all from idx_biz_view_jg_all
WHERE SEQUENCE_NBR = #{id} WHERE SEQUENCE_NBR = #{id}
</select> </select>
......
...@@ -680,15 +680,4 @@ ...@@ -680,15 +680,4 @@
AND ( ibjoi."CODE96333" NOT LIKE'31%' OR ibjoi."CODE96333" IS NULL ) AND ( ibjoi."CODE96333" NOT LIKE'31%' OR ibjoi."CODE96333" IS NULL )
AND "CLAIM_STATUS" = '已认领'; AND "CLAIM_STATUS" = '已认领';
</select> </select>
<select id="countEquipByReginCode" resultType="java.lang.Long">
select
count(1)
from
idx_biz_jg_use_info ibjui,
idx_biz_jg_supervision_info ibjsi
where
ibjui."RECORD" = ibjsi."RECORD"
and ibjsi."ORG_BRANCH_CODE" like concat (#{reginCode},'%')
and ibjui."IS_INTO_MANAGEMENT" = true
</select>
</mapper> </mapper>
...@@ -221,7 +221,8 @@ ...@@ -221,7 +221,8 @@
FROM FROM
"tz_base_enterprise_info" "tz_base_enterprise_info"
where where
supervise_org_code like concat(#{orgCode},'%') 1=1
and ((supervise_org_code != '50' and supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (supervise_org_code = '50' and office_region LIKE CONCAT ('%', #{cityCode}, '%')))
and operating_status = #{operatingStatus} and operating_status = #{operatingStatus}
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment