跳到主要内容

抄表待办

功能描述

Pc端下发抄表数据后,对用户进行机表离线抄表操作 抄表完成后状态是‘已抄表’,没有审核功能

项目:ReadMeterClient

组件:PhoneHandManagerNotOnline

组件别名:phone-hand-manage-notonline

查询条件

条件描述实际取值字段
抄表册f_book_name
用户证号f_book_no
客户编号f_userinfo_code
客户姓名f_user_name
客户地址f_address
小区f_residential_area
楼栋f_building
单元f_unit
门牌f_room
楼层f_floor
表号f_meternumber
调压箱号f_adjustable_name
调压箱f_adjustable_name
表册开始位置f_meter_book_sort_begin
表册结束位置f_meter_book_sort_end
起时间startDate
止时间endDate
抄表状态f_meter_state

查询列表

,,,,,,,,,,,

字段名称实际取值字段
客户编号f_userinfo_code
客户名称f_user_name
客户地址f_address
客户电话f_user_phone
表箱号f_adjustable_id
表类型f_meter_classify
下发时间f_hand_date
上次抄表时间f_last_input_date
账户结余f_balance
表号f_meternumber
上期抄表始数f_last_startbase
上期用气量f_last_gas
上期底数f_last_tablebase
上次安检时间f_last_checkdate
Details

刷新主要sql getPcHandMeter


select h.*,
dp.f_price,
case when dp.f_price is not null then Convert(decimal(18,2),isnull(h.f_oughtamount,0)*isnull(dp.f_price,0))
else 0 end f_ought_money,
case when isnull(uf.f_capacity, 0) > 0 then uf.f_capacity else gm.f_capacity end f_capacity, --表最大量程
ui.f_comments f_phone_comments,
ui.f_book_no,
ui.f_user_level,
ui.f_rent_phone,
isnull(h4.f_last_startbase,0) f_last_startbase,
isnull(h4.f_last_gas,0) f_last_gas,
h2.f_last_oughtamount f_last_oughtamount,
ave1.f_ave_gas f_ave_gas,
h5.f_oughtfee as f_real_oughtfee
from(
select * from t_handplan
where f_inputtor = '{f_inputtor}'
and SUBSTRING(CONVERT(varchar,f_hand_date,23),0,5) = year(getdate())
and f_meter_state = '未抄表'
and f_hand_state = '有效'
) h left join
(
select f_user_level,f_rent_phone,f_comments,f_userinfo_id,f_book_no from t_userinfo where f_user_state='正常'
) ui on h.f_userinfo_id=ui.f_userinfo_id
left join (
select f_userfiles_id,

cast(sum(f_oughtamount)/(isnull(DATEDIFF (month , min(f_input_date),max(f_input_date)),0)+1) as numeric(9,2))
f_ave_gas,

max(id) maxid
from t_handplan
where f_hand_state='有效' and f_meter_state='已抄表' group by f_userfiles_id
)ave1 on h.f_userfiles_id=ave1.f_userfiles_id
left join (select id,f_oughtamount f_last_oughtamount from t_handplan)h2 on ave1.maxid=h2.id
left join (
select
f_last_tablebase f_last_startbase,f_oughtamount f_last_gas,f_userfiles_id
from t_handplan t2
where id in (select max(id)
from t_handplan
where f_userfiles_id = t2.f_userfiles_id and f_hand_state = '有效' and f_meter_state='已抄表'
GROUP BY f_userfiles_id)
) h4 on h.f_userfiles_id = h4.f_userfiles_id
left join t_userfiles uf on h.f_userfiles_id=uf.f_userfiles_id
left join (
select
f_userfiles_id,
sum(f_oughtfee) f_oughtfee,
0 f_overdue
from (
select
h.f_userfiles_id,
h.f_oughtamount,
isnull(f_debt_money,0) f_debt_money,
h.f_oughtfee-isnull(f_debt_money,0) f_oughtfee,
u.f_balance,
u.f_userinfo_code
from t_handplan h left join (
select f_hand_id,sum(f_debt_money) f_debt_money
from t_sellinghand group by f_hand_id
) sh on h.id = sh.f_hand_id
left join t_userinfo u on h.f_userinfo_id = u.f_userinfo_id
where f_whether_pay='否' and f_meter_state='已抄表' and f_hand_state='有效'
) s
group by s.f_userfiles_id
) h5 on uf.f_userfiles_id = h5.f_userfiles_id
left join t_gasmodel gm on uf.f_gasmodel_id = gm.id
left join (select * from t_stairprice where f_state='有效' and f_price_type='固定气价' and getdate()>=f_perform_date and getdate()<=f_end_date) sp on uf.f_price_id=sp.f_price_id
LEFT JOIN t_detailprice dp ON sp.id = dp.f_stairprice_id and dp.f_price_name='1'
where f_table_state='正常'

查询主要sql getHand.sql


select *,
case when instr(f_adjustable_id,'-')>1 then
case when (cast(SUBSTR(f_adjustable_id,1,instr(f_adjustable_id,'-')-1)+0 as varchar) =SUBSTR(f_adjustable_id,1,instr(f_adjustable_id,'-')-1))=1 then cast(SUBSTR(f_adjustable_id,1,instr(f_adjustable_id,'-')-1) as float)
else 99999 end
else 99999 end ad_id1,
case when instr(f_adjustable_id,'-')>0 then
case when (cast(SUBSTR(f_adjustable_id,instr(f_adjustable_id,'-')+1,LENGTH(f_adjustable_id))+0 as varchar)=SUBSTR(f_adjustable_id,instr(f_adjustable_id,'-')+1,LENGTH(f_adjustable_id)) )= 1
then cast(SUBSTR(f_adjustable_id,instr(f_adjustable_id,'-')+1,LENGTH(f_adjustable_id)) as float) else 99999 end else 99999
end ad_id2
from t_phonehandplan
where {condition}
and f_hand_date >= '{startDate} 00:00:00' and f_hand_date <= '{endDate} 23:59:59' and f_inputtor = '{f_inputtor}'
order by f_book_name,f_meter_book_sort,ad_id1,LENGTH(ad_id2),ad_id2,id,f_address {sort}

按钮操作

查询

发送请求从手机端本地查询未抄表用户

清空

清空查询条件

刷新

发送请求从数据库获取未抄表用户

列表操作

单击

单击表单进入抄表页面抄表

配置说明

没有特殊暂不阐述