Commit e65d25da authored by suhuiguang's avatar suhuiguang

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

parent 6b2beef6
......@@ -6,7 +6,8 @@
where sequence_nbr = #{id}
</update>
<sql id="page-list">
select ur.sequence_nbr as sequenceNbr,
select
ur.sequence_nbr as sequenceNbr,
ur.audit_status as auditStatus,
date_format(ur.reg_date,'%Y-%m-%d') as regDate,
ur.use_unit_name as useUnitName,
......@@ -17,7 +18,6 @@
ur.apply_no as applyNo,
ur.next_execute_ids as nextExecuteIds,
ur.promoter,
GROUP_CONCAT(DISTINCT other.supervisory_code) as supervisoryCode,
ur.use_registration_code as useRegistrationCode,
date_format(ur.audit_pass_date,'%Y-%m-%d') as auditPassDate,
date_format(ur.create_date,'%Y-%m-%d') as createDate,
......@@ -28,6 +28,9 @@
ur.rec_date as recDate,
ur.manage_type as manageType,
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 (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,
......@@ -37,16 +40,12 @@
GROUP_CONCAT(DISTINCT jri.EQU_CODE) AS equCode,
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 use.USE_INNER_CODE) AS innerCode,
GROUP_CONCAT(DISTINCT re.equ_id) AS equipId,
concat(use."PROVINCE_NAME", '', use."CITY_NAME", '', use."COUNTY_NAME", '', use."STREET_NAME") as fullAddress,
use."ADDRESS" as detailedAddress,
ibjsi.ORG_BRANCH_NAME as orgBranchName,
ur.cancel_reason as cancelReason
from tzs_jg_use_registration ur
GROUP_CONCAT(DISTINCT ibjsi.ORG_BRANCH_NAME) AS orgBranchName
from
tzs_jg_use_registration ur
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_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_supervision_info ibjsi on re.equ_id = ibjsi.RECORD
</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