Commit 6365c013 authored by suhuiguang's avatar suhuiguang

1.管道刷历史数据

parent 0a13d7b5
package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
/**
* 安装告知设备关系表 Mapper 接口
......@@ -11,4 +13,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface JgInstallationNoticeEqMapper extends CustomBaseMapper<JgInstallationNoticeEq> {
/**
* 查询安装告知完成但是纳管状态非已纳管的管道
*
* @return List<JgInstallationNoticeEq> 管道record数组
*/
List<JgInstallationNoticeEq> selectErrorRecordOfInIntoManage();
}
......@@ -52,4 +52,11 @@ public interface JgInstallationNoticeMapper extends CustomBaseMapper<JgInstallat
List<Map<String, Object>> getDeviceListByProjectContraption(@Param("projectContraptionSeq") String projectContraptionSeq);
List<Map<String, Object>> getPipelineEquInfoByRecords(@Param("records") List<String> records);
/**
* 安装使用登记查询关联的安装告知
* @param useRegisterId 使用登记id
* @return 登记关联的告知
*/
JgInstallationNotice selectNoticeDataByUseRegisterId(@Param("useRegisterId") String useRegisterId );
}
......@@ -121,4 +121,5 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
* @return List<Map<String, Object>>
*/
List<Map<String, Object>> selectPieLineListByOfCanReg(@Param("projectContraptionSeq") String projectContraptionSeq);
}
......@@ -2,4 +2,18 @@
<!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.jg.api.mapper.JgInstallationNoticeEqMapper">
<select id="selectErrorRecordOfInIntoManage" resultType="com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq">
SELECT
ne.equ_id
FROM
"tzs_jg_installation_notice" n,
tzs_jg_installation_notice_eq ne,
"idx_biz_jg_use_info" u
WHERE
n.notice_status = '6616'
and ne.equip_transfer_id = n.sequence_nbr
and ne.equ_id = u."RECORD"
and (u."IS_INTO_MANAGEMENT" = false or u."IS_INTO_MANAGEMENT" is null)
and n.project_contraption <![CDATA[<>]]> ''
</select>
</mapper>
......@@ -315,6 +315,25 @@
</where>
</select>
<select id="selectNoticeDataByUseRegisterId" resultType="com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice">
SELECT
n.sequence_nbr,
n.project_contraption,
n.project_contraption_id,
ne.equ_id as remark
FROM
"tzs_jg_installation_notice" n,
tzs_jg_installation_notice_eq ne
WHERE
n.notice_status = '6616'
and ne.equip_transfer_id = n.sequence_nbr
and ne.equ_id = (
select
re.equ_id
from
tzs_jg_use_registration_eq re
where
re.equip_transfer_id = #{useRegisterId} limit 1
)
</select>
</mapper>
......@@ -69,4 +69,21 @@ public class DataHandlerController extends BaseController {
return ResponseHelper.buildResponse(true);
}
@ApiOperation(httpMethod = "PUT", value = "安装告知缺少装置id、装置未创建、安装告知完成但是设备状态为未纳管数据处理", notes = "历史数据处理")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/v3/projectContraption/notice")
public ResponseModel<Boolean> projectContraptionNoticeDataDealV3(){
dataHandlerService.projectContraptionNoticeDataDeal();
return ResponseHelper.buildResponse(true);
}
@ApiOperation(httpMethod = "PUT", value = "使用登记缺少装置id数据处理", notes = "历史数据处理,依赖/v3/projectContraption/notice作为基础数据")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/v3/projectContraption/useRegister")
public ResponseModel<Boolean> projectContraptionUseRegisterDataDealV3(){
dataHandlerService.projectContraptionUseRegisterDataDeal();
return ResponseHelper.buildResponse(true);
}
}
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