public int getMaxRow(String brchNo,
String sDate, String eDate, String carID, String statusInput,
String companyNo, String codeNo) {
try {
Session session = getHibernateTemplate().getSessionFactory()
.getCurrentSession();
if(carID == null)
carID = "-";
if(carID.length() == 0)
carID = "-";
String queryString = "";
if (codeNo.equals("0"))
queryString = "select count(*) from T33CarinsuranceOrder t, customerQT t1, CarInsurCompany t2 where t1.shenfenID = t.ownerid and t1.carNum = t.carnumber and t.companyid = t2.company_id and t.companyid = '"
+ "02"
+ "' and ((t.carnumber = '"
+ carID
+ "') or ('"
+ carID
+ "' = '-')) and t.orderstatus in ('05', '06') and ((t.datezhifu between '"
+ "20010101"
+ "' and '"
+ "20800101"
+ "') or (t.dateshoukuan between '"
+ "20010101"
+ "' and '"
+ "20800101"
+ "')) and (t.txnbranch in (select t6.brchNo from TBrchMng t6 where t6.counBrch = '"
+ brchNo
+ "') or t.txnbranch in (select t7.brchNo from TBrchMng t7 where t7.cityBrch = '"
+ brchNo
+ "') or t.txnbranch in (select t8.brchNo from TBrchMng t8 where t8.provBrch = '"
+ brchNo
+ "') or t.txnbranch in (select t9.brchNo from TBrchMng t9 where t9.brchNo = '"
+ brchNo + "')) ";
/*
* private String applicantmobile; private String recipientadress;
* private String PKG_NAME; private String productId;
*/
System.out.println(queryString);
Query query = session.createQuery(queryString);
Long count = ((Long)query.iterate().next()).longValue();
//Integer count = (Integer) it.next();
//String count = (String) object[0];
System.out.println("记录条数" + count.intValue());
return (count).intValue();
} catch (RuntimeException re) {
log.error("查询订单和车辆信息失败", re);
// log.error("find by property name failed", re);
throw re;
}
}
String sDate, String eDate, String carID, String statusInput,
String companyNo, String codeNo) {
try {
Session session = getHibernateTemplate().getSessionFactory()
.getCurrentSession();
if(carID == null)
carID = "-";
if(carID.length() == 0)
carID = "-";
String queryString = "";
if (codeNo.equals("0"))
queryString = "select count(*) from T33CarinsuranceOrder t, customerQT t1, CarInsurCompany t2 where t1.shenfenID = t.ownerid and t1.carNum = t.carnumber and t.companyid = t2.company_id and t.companyid = '"
+ "02"
+ "' and ((t.carnumber = '"
+ carID
+ "') or ('"
+ carID
+ "' = '-')) and t.orderstatus in ('05', '06') and ((t.datezhifu between '"
+ "20010101"
+ "' and '"
+ "20800101"
+ "') or (t.dateshoukuan between '"
+ "20010101"
+ "' and '"
+ "20800101"
+ "')) and (t.txnbranch in (select t6.brchNo from TBrchMng t6 where t6.counBrch = '"
+ brchNo
+ "') or t.txnbranch in (select t7.brchNo from TBrchMng t7 where t7.cityBrch = '"
+ brchNo
+ "') or t.txnbranch in (select t8.brchNo from TBrchMng t8 where t8.provBrch = '"
+ brchNo
+ "') or t.txnbranch in (select t9.brchNo from TBrchMng t9 where t9.brchNo = '"
+ brchNo + "')) ";
/*
* private String applicantmobile; private String recipientadress;
* private String PKG_NAME; private String productId;
*/
System.out.println(queryString);
Query query = session.createQuery(queryString);
Long count = ((Long)query.iterate().next()).longValue();
//Integer count = (Integer) it.next();
//String count = (String) object[0];
System.out.println("记录条数" + count.intValue());
return (count).intValue();
} catch (RuntimeException re) {
log.error("查询订单和车辆信息失败", re);
// log.error("find by property name failed", re);
throw re;
}
}