where cust是什么意思_no like ...

/ swpt_sys
项目语言:JAVA
权限:read-only(如需更高权限请先加入项目)
Index: BN_Intervalflow.java
===================================================================
--- BN_Intervalflow.java (revision 0)
+++ BN_Intervalflow.java (revision 2)
@@ -0,0 +1,281 @@
+package com.hnyc.graphicalanalysis.
+import com.lxj.supp.BN_R
+public class BN_Intervalflow extends BN_Row
private static final long serialVersionUID = 1L;
public String getCust_name()
Object tmp = getColumnValue(&cust_name&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setCust_name(String cust_name)
setColumnValue(&cust_name&, cust_name);
public String getCust_addr() {
Object tmp = getColumnValue(&cust_addr&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setCust_addr(String cust_addr) {
setColumnValue(&cust_addr&, cust_addr);
public String getCOUNTY_CODE() {
Object tmp = getColumnValue(&COUNTY_CODE&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setCOUNTY_CODE(String cOUNTY_CODE) {
setColumnValue(&COUNTY_CODE&, cOUNTY_CODE);
public String getCust_no() {
Object tmp = getColumnValue(&cust_no&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setCust_no(String cust_no) {
setColumnValue(&cust_no&, cust_no);
public String getUse_attr() {
Object tmp = getColumnValue(&use_attr&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setUse_attr(String use_attr) {
setColumnValue(&use_attr&, use_attr);
public double getTotal() {
Object tmp = getColumnValue(&total&);
return !isNull(tmp) ? Double.parseDouble(tmp.toString()) : 0;
public void setTotal(double total) {
setColumnValue(&total&, total);
public double getLasttotal() {
Object tmp = getColumnValue(&lasttotal&);
return !isNull(tmp) ? Double.parseDouble(tmp.toString()) : 0;
public void setLasttotal(double lasttotal) {
setColumnValue(&lasttotal&, lasttotal);
public String getData_time() {
Object tmp = getColumnValue(&data_time&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setData_time(String data_time) {
setColumnValue(&data_time&, data_time);
public String getStime() {
Object tmp = getColumnValue(&stime&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setStime(String stime) {
setColumnValue(&stime&, stime);
public String getStime1() {
Object tmp = getColumnValue(&stime1&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setStime1(String stime1) {
setColumnValue(&stime1&, stime1);
public String getStime2() {
Object tmp = getColumnValue(&stime2&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setStime2(String stime2) {
setColumnValue(&stime2&, stime2);
public String getEtime() {
Object tmp = getColumnValue(&etime&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setEtime(String etime) {
setColumnValue(&etime&, etime);
public String getEtime1() {
Object tmp = getColumnValue(&etime1&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setEtime1(String etime1) {
setColumnValue(&etime1&, etime1);
public String getEtime2() {
Object tmp = getColumnValue(&etime2&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setEtime2(String etime2) {
setColumnValue(&etime2&, etime2);
public String getCreate_time() {
Object tmp = getColumnValue(&create_time&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setCreate_time(String create_time) {
setColumnValue(&create_time&, create_time);
public String getJgsj() {
Object tmp = getColumnValue(&jgsj&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setJgsj(String jgsj) {
setColumnValue(&jgsj&, jgsj);
public double getInterval() {
Object tmp = getColumnValue(&interval&);
return !isNull(tmp) ? Double.parseDouble(tmp.toString()) : 0;
public void setInterval(double interval) {
setColumnValue(&interval&, interval);
public String getItype() {
Object tmp = getColumnValue(&itype&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setItype(String itype) {
setColumnValue(&itype&, itype);
public String getDz() {
Object tmp = getColumnValue(&dz&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setDz(String dz) {
setColumnValue(&dz&, dz);
public String getLog_module_name()
Object tmp = getColumnValue(&log_module_name&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setLog_module_name(String log_module_name)
setColumnValue(&log_module_name&, log_module_name);
public String getLog_object_id()
Object tmp = getColumnValue(&log_object_id&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setLog_object_id(String log_object_id)
setColumnValue(&log_object_id&, log_object_id);
public String getLog_object_code()
Object tmp = getColumnValue(&log_object_code&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setLog_object_code(String log_object_code)
setColumnValue(&log_object_code&, log_object_code);
public String getLog_object_name()
Object tmp = getColumnValue(&log_object_name&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setLog_object_name(String log_object_name)
setColumnValue(&log_object_name&, log_object_name);
public String getLog_op_name()
Object tmp = getColumnValue(&log_op_name&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setLog_op_name(String log_op_name)
setColumnValue(&log_op_name&, log_op_name);
public String getLog_ip()
Object tmp = getColumnValue(&log_ip&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setLog_ip(String log_ip)
setColumnValue(&log_ip&, log_ip);
public String getRemark()
Object tmp = getColumnValue(&remark&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setRemark(String remark)
setColumnValue(&remark&, remark);
public String getCreate_id()
Object tmp = getColumnValue(&create_id&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setCreate_id(String create_id)
setColumnValue(&create_id&, create_id);
public String getCreate_name()
Object tmp = getColumnValue(&create_name&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setCreate_name(String create_name)
setColumnValue(&create_name&, create_name);
public String getCreate_time()
Object tmp = getColumnValue(&create_time&);
return !isNull(tmp) ? tmp.toString() : &&;
public String getCreate_time(String format)
Object tmp = getColumnValue(&create_time&);
return !isNull(tmp) ? dateFormat(tmp.toString(),format) : &&;
public void setCreate_time(String create_time)
setColumnValue(&create_time&, create_time);
public String getOp_id()
Object tmp = getColumnValue(&op_id&);
return !isNull(tmp) ? tmp.toString() : &&;
public void setOp_id(String op_id)
setColumnValue(&op_id&, op_id);
Index: DAO_Intervalflow.java
===================================================================
--- DAO_Intervalflow.java (revision 0)
+++ DAO_Intervalflow.java (revision 2)
@@ -0,0 +1,172 @@
+package com.hnyc.graphicalanalysis.
+import java.sql.C
+import java.sql.SQLE
+import java.util.ArrayL
+import java.util.L
+import javax.servlet.http.HttpServletR
+import org.apache.struts2.ServletActionC
+import com.lxj.cache.UserS
+import com.lxj.manage.module.BN_M
+import com.lxj.manage.module.DAO_M
+import com.lxj.manage.user.BN_U
+import com.lxj.manage.user.DAO_U
+import com.lxj.supp.BN_P
+import com.lxj.supp.BN_R
+import com.lxj.supp.DAOR
+import com.lxj.supp.ResultH
+import com.lxj.supp.ResultHandler.ListH
+import com.lxj.supp.TransactionH
+import com.lxj.util.IPU
+import com.lxj.util.StringU
+ * Title: 日志 DAO
+ * Description:
+ * Copyright: Copyright (c) 2013
+ * Company:
+ * @author 李小家
+ * @version 1.0
+public class DAO_Intervalflow {
+ private static ListHandler listHandler = new ResultHandler.ListHandler(
DAO_Intervalflow.class);
+ private static final String TABLE = &vw_waterquery&;
+ public static String getTableName(){
return TABLE;
+ private DAO_Intervalflow()
+ public static boolean doInsert(final String table, final BN_Intervalflow log) {
return DAORunner.insertRow(table,log) != -1 ? true :
+ public static List doSelect(String preSql, Object[] values) {
return DAORunner.selectList(preSql, values, listHandler);
+ public static BN_Page getPage(BN_Page page) {
return DAORunner.selectPage(new ResultHandler.PageHandler(page,
BN_Intervalflow.class));
* 清除模块日志
* @param tableName
* @param module
+// public static boolean doClear(final String tableName, final String module) {
return DAORunner.runTransaction(new TransactionHandler() {
public void process(Connection connections) throws SQLException {
DAORunner.runUpdate(&DELETE FROM & + tableName
WHERE LOG_MODULE_ID =? &,
new Object[]{module}, connections);
* 批量删除
* @param opIds
* 用逗号分隔的主键字符串
* @param moduleId
+// public static boolean doDelete(final String opIds, final String moduleId) {
boolean result = DAORunner.runTransaction(new TransactionHandler() {
public void process(Connection connection) throws SQLException {
String[] idArr = opIds.split(&,&);
for (int i = 0; i & idArr. i++) {
if (!&&.equals(idArr[i].trim())) {
DAORunner.runUpdate(&delete from & + TABLE
+ & where op_id= ? &,
new Object[] { idArr[i] }, connection);
* 用户级操作
* @param moduleId
* @param log_object_id
* @param log_object_code 对象编号
* @param log_object_name 对象名称
* @param log_op_name
* @param remark
+// public static boolean doLogUser(String moduleId, String log_object_id, String log_object_code,
String log_object_name, String log_op_name, String remark) {
HttpServletRequest request = ServletActionContext.getRequest();
BN_User user = UserSession.getUser(request.getSession());
BN_Module module = DAO_Module.doSelect(moduleId);
BN_Waterquery log = new BN_Waterquery();
log.setLog_module_id(module.getOp_id());
log.setLog_module_name(module.getOp_name());
log.setLog_object_id(log_object_id);
log.setLog_object_code(log_object_code);
log.setLog_object_name(log_object_name);
log.setLog_op_name(log_op_name);
log.setLog_ip(IPUtil.getIpAddr(request));
log.setCreate_id(user.getOp_id());
log.setCreate_name(user.getOp_name());
log.setCreate_time(BN_Row.getNowInput());
log.setRemark(remark);
log.setOp_id(StringUtil.getUUID());
return DAO_Waterquery.doInsert(TABLE, log);
* 系统级执行
* @param moduleId
* @param log_object_id
* @param log_object_code
* @param log_object_name
* @param log_op_name
* @param remark
+// public static boolean doLogSys(String moduleId, String log_object_id, String log_object_code,
String log_object_name, String log_op_name, String remark) {
BN_Module module = DAO_Module.doSelect(moduleId);
BN_Waterquery log = new BN_Waterquery();
log.setLog_module_id(module.getOp_id());
log.setLog_module_name(module.getOp_name());
log.setLog_object_id(log_object_id);
log.setLog_object_code(log_object_code);
log.setLog_object_name(log_object_name);
log.setLog_op_name(log_op_name);
log.setLog_ip(&127.0.0.1&);
log.setCreate_id(&system&);
log.setCreate_name(&系统&);
log.setCreate_time(BN_Row.getNowInput());
log.setRemark(remark);
log.setOp_id(StringUtil.getUUID());
return DAO_Waterquery.doInsert(TABLE, log);
Index: ACT_Intervalflow.java
===================================================================
--- ACT_Intervalflow.java (revision 0)
+++ ACT_Intervalflow.java (revision 2)
@@ -0,0 +1,517 @@
+package com.hnyc.graphicalanalysis.
+import java.text.ParseE
+import java.text.SimpleDateF
+import java.util.ArrayL
+import java.util.C
+import java.util.D
+import java.util.HashM
+import java.util.L
+import java.util.M
+import java.util.logging.L
+import java.util.logging.L
+import net.sf.json.JSONA
+import net.sf.json.JSONO
+import com.hnyc.graphicalanalysis.cumulativeflow.DAO_C
+import com.hnyc.waterquery.waterquery.DAO_W
+import com.lxj.supp.ACT_C
+import com.lxj.supp.BN_P
+import com.lxj.util.DateU
+ * Title:间隔 流量分析图
+ * Copyright: Copyright (c) 2013
+ * Company:
+ * @author 李小家
+ * @version 1.0
+public class ACT_Intervalflow extends ACT_Common {
+ private static final Logger logger = Logger.getLogger(ACT_Intervalflow.class
.getName());
+ private BN_Page pageData =
+ private BN_Intervalflow bean = new BN_Intervalflow();
+ //返回结果给客户端
+ private JSONObject jsonR
+ private JSONArray jsonA
* 列表视图
+ public String doList() {
return &doList&;
+ public String getTablename(String begintime,String endtime,String itype){
List&String& monthlist = DateUtil.getMonthsBetween(begintime, endtime);
List&String& monthsqlList = new ArrayList&String&(0);
for(int i=0;i&monthlist.size();i++){
String sql = &SELECT
count(*) FROM dbo.SysObjects WHERE ID = object_id(N'[t_data_&+monthlist.get(i)+&]') AND OBJECTPROPERTY(ID, 'IsTable') = 1&;
int l = DAO_Waterquery.count(sql,new Object[]{});//0-13
String s = &SELECT
b.water_sealno, b.cust_addr, b.cust_no, b.use_attr, b.cust_name, CAST(ABS(a.ftotal) + ABS(a.rtotal) AS decimal(10, 2)) AS total, a.data_time, &+
&a.create_time, CAST(a.interval AS decimal(10, 2)) AS interval,CAST(a.lasttotal AS decimal(10, 2)) AS lasttotal, a.itype, b.county_code FROM t_data_&+monthlist.get(i)+&
a , t_cust_dev
where a.sim = b.sim_no
and itype = &+itype+& and a.data_time between '&+
begintime.substring(0,14)+&' and '&+endtime.substring(0,14)+&'&;
monthsqlList.add(s);
String tablename = &&;
if(monthsqlList.size()&0){
for(int i=0;i&monthsqlList.size();i++){
+= &(&+monthsqlList.get(i)+&)&;
if(i&monthsqlList.size()-1){
tablename+=& union &;
return &(&+tablename+&) t &;
//String sql = &SELECT
* FROM dbo.SysObjects WHERE ID = object_id(N'['+@tablename+']') AND OBJECTPROPERTY(ID, 'IsTable') = 1&;
return &( SELECT
b.water_sealno, b.cust_addr, b.cust_no, b.use_attr, b.cust_name, CAST(ABS(a.ftotal) + ABS(a.rtotal) AS decimal(10, 2)) AS total, a.data_time, a.create_time, '0' as
interval, '0'as itype, '0' as county_code FROM t_data_201404
a , t_cust_dev
where 1=2 ) t &;
* 列表数据
+ public String doPage() {
//HttpServletResponse response = ServletActionContext.getResponse();
String cust_no = bean.getCust_no();
String cust_name= bean.getCust_name();
String stime= bean.getStime();
String stime1= bean.getStime1();
String stime2= bean.getStime2();
String etime= bean.getEtime();
String etime1= bean.getEtime1();
String etime2= bean.getEtime2();
String jgsj= bean.getJgsj();
String cust_addr = bean.getCust_addr();
String Stime =&&;
String Etime = &&;
stime=stime.trim()+& &+stime1+&:&+stime2+&:&+&00& ;;
if(stime != null && !&&.equals(stime)){
for(int i=0;i&stime.length();i++){
if(stime.charAt(i)&=48 && stime.charAt(i)&=57){
Stime+=stime.charAt(i);
etime=etime.trim()+& &+etime1+&:&+etime2+&:&+&59&;
if(etime != null && !&&.equals(etime)){
for(int i=0;i&etime.length();i++){
if(etime.charAt(i)&=48 && etime.charAt(i)&=57){
Etime+=etime.charAt(i);
//设置显示个数
rows = &288&;
order =&asc&;
sort = &data_time&;
logger.,&问题&+cust_no+cust_name+stime+etime+jgsj);
whereCond =& where itype ='&+jgsj+&' &;
if(cust_no!=&&)
whereCond +=&and cust_no = '&+cust_no+&'&;
if(cust_name!=&&)
whereCond +=&and cust_name = '&+cust_name+&'&;
if(cust_addr!=&&)
whereCond +=&and cust_addr = '&+cust_addr+&'&;
//whereCond =&where cust_no like '%&+cust_no+&%' and cust_name like '%&+cust_name+&%' and itype ='&+jgsj+&' &+&' and cust_addr like '%&+cust_addr+&%'& ;
whereCond +=& and (data_time&='&+Stime+&' and data_time&'&+Etime+&')&;
switch(Integer.parseInt(jgsj)){
whereCond +=& and (data_time&='&+Stime+&' and data_time&'&+Etime+&')&;
whereCond2(Stime,Etime);
whereCond3(Stime,Etime);
whereCond4(Stime,Etime);
whereCond5(Stime,Etime);
whereCond6(Stime,Etime);
whereCond7(Stime,Etime);
whereCond8(Stime,Etime);
String talblename = this.getTablename(Stime , Etime , jgsj);
pageData = new BN_Page(&op_id&, talblename, rows, page, sort, order, whereCond);
pageData = DAO_Intervalflow.getPage(pageData);
Map&String, Object& jsonMap = new HashMap&String, Object&();//定义map
jsonMap.put(&total&,pageData.getRowCount());
jsonMap.put(&rows&, pageData.getData());
jsonResult = JSONObject.fromObject(jsonMap);
logger.,&问题&+jsonResult.toString());
return &doJSON&;
+ // 1, 5分钟 , 2, &1小时
3, 6小时 4, 12小时
5, 24小时 6, 周
public void whereCond2(String begintime,String endtime){
Date dt1 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(begintime.substring(0,14));
Date dt2 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(endtime.substring(0,14));
Calendar cal1=Calendar.getInstance();
cal1.setTime(dt1);
Calendar cal2=Calendar.getInstance();
cal2.setTime(dt2);
List&String& orList = new ArrayList&String&();
SimpleDateFormat sdf = new SimpleDateFormat(&yyyyMMddHHmmss&);
while(cal1.getTimeInMillis()&cal2.getTimeInMillis()){
String str = &&;
String begin = sdf.format(cal1.getTime());
cal1.add(cal1.MINUTE, 5);
String end = sdf.format(cal1.getTime());
str+= &(data_time&='&+begin+&' and data_time&'&+end+&')&;
orList.add(str);
cal1.add(cal1.MINUTE, 55);
if(orList.size()&0){
String w = & and (&;
for(int i=0;i&orList.size();i++){
w+=orList.get(i);
if(i==orList.size()-1){
w+=& or &;
whereCond+=w;
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
// 1, 5分钟 , 2, &1小时
3, 6小时 4, 12小时
5, 24小时 6, 周
public void whereCond3(String begintime,String endtime){
Date dt1 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(begintime.substring(0,14));
Date dt2 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(endtime.substring(0,14));
Calendar cal1=Calendar.getInstance();
cal1.setTime(dt1);
Calendar cal2=Calendar.getInstance();
cal2.setTime(dt2);
List&String& orList = new ArrayList&String&();
SimpleDateFormat sdf = new SimpleDateFormat(&yyyyMMddHHmmss&);
while(cal1.getTimeInMillis()&cal2.getTimeInMillis()){
String str = &&;
String begin = sdf.format(cal1.getTime());
cal1.add(cal1.MINUTE, 5);
String end = sdf.format(cal1.getTime());
str+= &(data_time&='&+begin+&' and data_time&'&+end+&')&;
orList.add(str);
cal1.add(cal1.MINUTE, 55);
cal1.add(cal1.HOUR, 5);
if(orList.size()&0){
String w = & and (&;
for(int i=0;i&orList.size();i++){
w+=orList.get(i);
if(i==orList.size()-1){
w+=& or &;
whereCond+=w;
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
// 1, 5分钟 , 2, &1小时
3, 6小时 4, 12小时
5, 24小时 6, 周
public void whereCond4(String begintime,String endtime){
Date dt1 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(begintime.substring(0,14));
Date dt2 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(endtime.substring(0,14));
Calendar cal1=Calendar.getInstance();
cal1.setTime(dt1);
Calendar cal2=Calendar.getInstance();
cal2.setTime(dt2);
List&String& orList = new ArrayList&String&();
SimpleDateFormat sdf = new SimpleDateFormat(&yyyyMMddHHmmss&);
while(cal1.getTimeInMillis()&cal2.getTimeInMillis()){
String str = &&;
String begin = sdf.format(cal1.getTime());
cal1.add(cal1.MINUTE, 5);
String end = sdf.format(cal1.getTime());
str+= &(data_time&='&+begin+&' and data_time&'&+end+&')&;
orList.add(str);
cal1.add(cal1.MINUTE, 55);
cal1.add(cal1.HOUR, 11);
if(orList.size()&0){
String w = & and (&;
for(int i=0;i&orList.size();i++){
w+=orList.get(i);
if(i==orList.size()-1){
w+=& or &;
whereCond+=w;
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
// 1, 5分钟 , 2, &1小时
3, 6小时 4, 12小时
5, 24小时 6, 周
public void whereCond5(String begintime,String endtime){
Date dt1 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(begintime.substring(0,14));
Date dt2 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(endtime.substring(0,14));
Calendar cal1=Calendar.getInstance();
cal1.setTime(dt1);
Calendar cal2=Calendar.getInstance();
cal2.setTime(dt2);
List&String& orList = new ArrayList&String&();
SimpleDateFormat sdf = new SimpleDateFormat(&yyyyMMddHHmmss&);
while(cal1.getTimeInMillis()&cal2.getTimeInMillis()){
String str = &&;
String begin = sdf.format(cal1.getTime());
cal1.add(cal1.MINUTE, 5);
String end = sdf.format(cal1.getTime());
str+= &(data_time&='&+begin+&' and data_time&'&+end+&')&;
orList.add(str);
cal1.add(cal1.MINUTE, 55);
cal1.add(cal1.HOUR, 23);
if(orList.size()&0){
String w = & and (&;
for(int i=0;i&orList.size();i++){
w+=orList.get(i);
if(i==orList.size()-1){
w+=& or &;
whereCond+=w;
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
// 1, 5分钟 , 2, &1小时
3, 6小时 4, 12小时
5, 24小时 6, 周
public void whereCond6(String begintime,String endtime){
Date dt1 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(begintime.substring(0,14));
Date dt2 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(endtime.substring(0,14));
Calendar cal1=Calendar.getInstance();
cal1.setTime(dt1);
Calendar cal2=Calendar.getInstance();
cal2.setTime(dt2);
List&String& orList = new ArrayList&String&();
SimpleDateFormat sdf = new SimpleDateFormat(&yyyyMMddHHmmss&);
while(cal1.getTimeInMillis()&cal2.getTimeInMillis()){
String str = &&;
String begin = sdf.format(cal1.getTime());
cal1.add(cal1.MINUTE, 5);
String end = sdf.format(cal1.getTime());
str+= &(data_time&='&+begin+&' and data_time&'&+end+&')&;
orList.add(str);
cal1.add(cal1.MINUTE, 55);
cal1.add(cal1.HOUR, 23);
cal1.add(cal1.DATE, 6);
if(orList.size()&0){
String w = & and (&;
for(int i=0;i&orList.size();i++){
w+=orList.get(i);
if(i==orList.size()-1){
w+=& or &;
whereCond+=w;
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
// 1, 5分钟 , 2, &1小时
3, 6小时 4, 12小时
5, 24小时 6, 周
public void whereCond7(String begintime,String endtime){
Date dt1 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(begintime.substring(0,14));
Date dt2 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(endtime.substring(0,14));
Calendar cal1=Calendar.getInstance();
cal1.setTime(dt1);
Calendar cal2=Calendar.getInstance();
cal2.setTime(dt2);
List&String& orList = new ArrayList&String&();
SimpleDateFormat sdf = new SimpleDateFormat(&yyyyMMddHHmmss&);
while(cal1.getTimeInMillis()&cal2.getTimeInMillis()){
String str = &&;
String begin = sdf.format(cal1.getTime());
cal1.add(cal1.MINUTE, 5);
String end = sdf.format(cal1.getTime());
str+= &(data_time&='&+begin+&' and data_time&'&+end+&')&;
orList.add(str);
cal1.add(cal1.MINUTE, -5);
cal1.add(cal1.MONTH, 1);
if(orList.size()&0){
String w = & and (&;
for(int i=0;i&orList.size();i++){
w+=orList.get(i);
if(i==orList.size()-1){
w+=& or &;
whereCond+=w;
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
// 1, 5分钟 , 2, &1小时
3, 6小时 4, 12小时
5, 24小时 6, 周
public void whereCond8(String begintime,String endtime){
Date dt1 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(begintime.substring(0,14));
Date dt2 = new SimpleDateFormat(&yyyyMMddHHmmss&).parse(endtime.substring(0,14));
Calendar cal1=Calendar.getInstance();
cal1.setTime(dt1);
Calendar cal2=Calendar.getInstance();
cal2.setTime(dt2);
List&String& orList = new ArrayList&String&();
SimpleDateFormat sdf = new SimpleDateFormat(&yyyyMMddHHmmss&);
while(cal1.getTimeInMillis()&cal2.getTimeInMillis()){
String str = &&;
String begin = sdf.format(cal1.getTime());
cal1.add(cal1.MINUTE, 5);
String end = sdf.format(cal1.getTime());
str+= &(data_time&='&+begin+&' and data_time&'&+end+&')&;
orList.add(str);
cal1.add(cal1.MINUTE, -5);
cal1.add(cal1.YEAR, 1);
if(orList.size()&0){
String w = & and (&;
for(int i=0;i&orList.size();i++){
w+=orList.get(i);
if(i==orList.size()-1){
w+=& or &;
whereCond+=w;
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
+// public String doDelete() {
boolean result = DAO_Waterquery.doDelete(opIds, module);
Map&String, Object& jsonMap = new HashMap&String, Object&();//定义map
jsonMap.put(&result&, result);
jsonResult = JSONObject.fromObject(jsonMap);
return &doJSON&;
+ public BN_Intervalflow getBean() {
+ public void setBean(BN_Intervalflow bean) {
this.bean =
+ public JSONObject getJsonResult() {
return jsonR
+ public void setJsonResult(JSONObject jsonResult) {
this.jsonResult = jsonR
+ public JSONArray getJsonArray() {
return jsonA
+ public void setJsonArray(JSONArray jsonArray) {
this.jsonArray = jsonA
(C)&&2013&&Alibaba&&Inc.&&All&&rights&&resvered.
Powered by

我要回帖

更多关于 cust是什么意思 的文章

 

随机推荐