自己学习BCDL 2

--贷方金额是支付出去的钱
--借方金额是收到的钱

--企业账单,银行账单校验方法
AuditCorpBookDaoImpl.java
企业账发送银行的记录 稽核的方法
loadSendCorpBookDetail
String hql = "select distinct a,tl.requTime,tl.respTime,tl.payeeAccountNO " +
" from AuditCorpBook a,PaymentList pl,TransferBill t,TransferBillList tl" +
" where a.isBatch=0 and a.voucherDetailNO = pl.voucherDetailNO " +
"and a.voucherNO = pl.voucherNO and a.voucherDate = pl.voucherDate " +
"and pl.paySerial = t.paySerialNO" +
" and t.transferBillID = tl.transferBill.transferBillID and a.isAudit = 0" +
" and a.bankAccount.accountID = :subjectId and pl.isUsed = " + PaymentList.USED +
" and a.voucherDate >= :beginDate and a.voucherDate < :endDate" +
" and t.dataState.stateID = "+ DataState.STATE_APPROVAL_SUCCESS +
" and t.transferType.typeID = " + TransferType.Type_DWZF +
" and tl.bankState.bankStateID = " + BankState.STATE_ZHILING_SUCCESS+
" and t.transferWay="+TransferBill.TransferWay_DZ;

转换后的SQL:
select distinct acb.*, tbl.requTime, tbl.respTime, tbl.payeeAccountNO
  from CMCS3_AUDIT_CORP_BOOK      acb,
   cmcs3_payment_list       pl,
   cmcs3_transfer_bill      tb,
   cmcs3_transfer_bill_list tbl
where acb.isBatch = 0 and acb.voucherNO = pl.voucherID
and pl.paySerial = tb.paySerialNO
and tb.transferBillID = tbl.transferBillID
and acb.isaudit = 0
and acb.accountID = ? and pl.isUsed = 1
and acb.voucherDate >= to_date('2012-04-01','yyyy-mm-dd') and acb.voucherDate < to_date('2012-05-01','yyyy-mm-dd')
and tb.stateID = 2
and tb.typeID = 3
and tbl.bankStateID = 3
and tb.transferWay = 1;

--根据省市得到地区编码方法
select * from Cmcs3_Bank_Area;
this.getAreas().getArea(province, city); 后台方法也可以直接用这个

--能制单的出纳
select u.username from cmcs3_payment_list pl ,cmcs3_user u
where pl.userid = u.userid and pl.isused = 0
group by u.username;

--回单确认失败会在 cmcs3_transfer_error 增长一条数据
select e.* from cmcs3_transfer_error e
where e.billid = 278125 ;  278125 代表transferbillID

--支付结果查询,拥有查询权限的账号
select u.username
  from cmcs3_bank_account ba, cmcs3_user_account ua, cmcs3_user u
where ba.accountid = ua.accountid
   and ua.userid = u.userid
   and ua.powertype = 0
   and ua.isaudit = 1
   group by u.username;

--重置密码
MD5Encrypt

public static void main(String[] args) {
  String a = encrypt("[email protected]","888888","2010-12-15 19:03:45");
  System.out.print(a);
}
把密文和明文跟新到数据库就行了
用户锁定 就将userstate改为 0

--用SQL更改,重置密码
update cmcs3_user o set o.password = 'c2e2d18d690e900c5659843e8ff8648e',
o.pwdupdatetime=to_date('2013-08-01 16:08:00','yyyy-mm-dd hh24:mi:ss')
where o.username = '[email protected]';
commit;


电信 M8 同步凭证
移动 MIS 同步凭证

猜你喜欢

转载自2594082lhj.iteye.com/blog/1694225