Commit e65d25da authored by suhuiguang's avatar suhuiguang

1.使用单位分页查询,,设备的使用信息还没写入,应该查询单据的数据

parent 6b2beef6
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
where sequence_nbr = #{id} where sequence_nbr = #{id}
</update> </update>
<sql id="page-list"> <sql id="page-list">
select ur.sequence_nbr as sequenceNbr, select
ur.sequence_nbr as sequenceNbr,
ur.audit_status as auditStatus, ur.audit_status as auditStatus,
date_format(ur.reg_date,'%Y-%m-%d') as regDate, date_format(ur.reg_date,'%Y-%m-%d') as regDate,
ur.use_unit_name as useUnitName, ur.use_unit_name as useUnitName,
...@@ -17,7 +18,6 @@ ...@@ -17,7 +18,6 @@
ur.apply_no as applyNo, ur.apply_no as applyNo,
ur.next_execute_ids as nextExecuteIds, ur.next_execute_ids as nextExecuteIds,
ur.promoter, ur.promoter,
GROUP_CONCAT(DISTINCT other.supervisory_code) as supervisoryCode,
ur.use_registration_code as useRegistrationCode, ur.use_registration_code as useRegistrationCode,
date_format(ur.audit_pass_date,'%Y-%m-%d') as auditPassDate, date_format(ur.audit_pass_date,'%Y-%m-%d') as auditPassDate,
date_format(ur.create_date,'%Y-%m-%d') as createDate, date_format(ur.create_date,'%Y-%m-%d') as createDate,
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
ur.rec_date as recDate, ur.rec_date as recDate,
ur.manage_type as manageType, ur.manage_type as manageType,
ur.reg_type as regType, ur.reg_type as regType,
ur.use_address as fullAddress,
ur.cancel_reason as cancelReason,
GROUP_CONCAT(DISTINCT other.supervisory_code) as supervisoryCode,
GROUP_CONCAT(DISTINCT other.CODE96333) AS code96333, GROUP_CONCAT(DISTINCT other.CODE96333) AS code96333,
GROUP_CONCAT(DISTINCT (SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY)) as equCategory, GROUP_CONCAT(DISTINCT (SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY)) as equCategory,
GROUP_CONCAT(DISTINCT (SELECT name from tz_equipment_category where code = jri.EQU_DEFINE)) as equDefine, GROUP_CONCAT(DISTINCT (SELECT name from tz_equipment_category where code = jri.EQU_DEFINE)) as equDefine,
...@@ -37,16 +40,12 @@ ...@@ -37,16 +40,12 @@
GROUP_CONCAT(DISTINCT jri.EQU_CODE) AS equCode, GROUP_CONCAT(DISTINCT jri.EQU_CODE) AS equCode,
GROUP_CONCAT(DISTINCT jri.EQU_LIST) AS equList, GROUP_CONCAT(DISTINCT jri.EQU_LIST) AS equList,
GROUP_CONCAT(DISTINCT (SELECT name from tz_equipment_category where code = jri.EQU_LIST)) AS equListName, GROUP_CONCAT(DISTINCT (SELECT name from tz_equipment_category where code = jri.EQU_LIST)) AS equListName,
GROUP_CONCAT(DISTINCT use.USE_INNER_CODE) AS innerCode,
GROUP_CONCAT(DISTINCT re.equ_id) AS equipId, GROUP_CONCAT(DISTINCT re.equ_id) AS equipId,
concat(use."PROVINCE_NAME", '', use."CITY_NAME", '', use."COUNTY_NAME", '', use."STREET_NAME") as fullAddress, GROUP_CONCAT(DISTINCT ibjsi.ORG_BRANCH_NAME) AS orgBranchName
use."ADDRESS" as detailedAddress, from
ibjsi.ORG_BRANCH_NAME as orgBranchName, tzs_jg_use_registration ur
ur.cancel_reason as cancelReason
from tzs_jg_use_registration ur
LEFT JOIN tzs_jg_use_registration_eq re on ur.sequence_nbr = re.equip_transfer_id LEFT JOIN tzs_jg_use_registration_eq re on ur.sequence_nbr = re.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri on re.equ_id = jri.RECORD LEFT JOIN idx_biz_jg_register_info jri on re.equ_id = jri.RECORD
LEFT JOIN idx_biz_jg_use_info use on re.equ_id = use.RECORD
LEFT JOIN idx_biz_jg_other_info other on re.equ_id = other.RECORD LEFT JOIN idx_biz_jg_other_info other on re.equ_id = other.RECORD
LEFT JOIN idx_biz_jg_supervision_info ibjsi on re.equ_id = ibjsi.RECORD LEFT JOIN idx_biz_jg_supervision_info ibjsi on re.equ_id = ibjsi.RECORD
</sql> </sql>
......
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