瀏覽代碼

删除多余代码

沈静伟 4 年之前
父節點
當前提交
4c3296d3b5

+ 0 - 32
src/dsb/com/cnd3b/service/DataStatusChange.java

@@ -1,32 +0,0 @@
-package com.cnd3b.service;
-
-import com.cnd3b.common.BaseClass;
-import com.cnd3b.common.data.db.DBConnect;
-import com.cnd3b.common.data.db.SQLiteJDBC;
-
-public class DataStatusChange extends BaseClass implements Runnable {
-
-    @Override
-    public void run() {
-        try {
-            if (new SQLiteJDBC().checkServicesUsed("DataStatusChange",true)) {
-                agentActivities();
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    /**
-     * 经销商推广活动到期
-     */
-    public void agentActivities() {
-        try {
-            DBConnect dbConnect = new DBConnect();
-            dbConnect.runSqlUpdate("update tagentactivities set fstatus='到期' where convert(varchar(10),fenddate,120)<=getdate() and fstatus!='到期'");
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-}

+ 0 - 88
src/dsb/com/cnd3b/service/MessageSendService.java

@@ -1,88 +0,0 @@
-package com.cnd3b.service;
-
-import com.cnd3b.common.BaseClass;
-import com.cnd3b.common.data.SQLFactory;
-import com.cnd3b.common.data.db.DBConnect;
-import com.cnd3b.common.data.db.SQLiteJDBC;
-
-import java.util.Calendar;
-
-public class MessageSendService extends BaseClass implements Runnable {
-    public static boolean message1_sendflag = true;
-    public static boolean message2_sendflag = true;
-    public static boolean message3_sendflag = true;
-    public static boolean message4_sendflag = true;
-
-    @Override
-    public void run() {
-        try {
-            if (new SQLiteJDBC().checkServicesUsed("MessageSendService",true)) {
-                Calendar calendar = Calendar.getInstance();
-                int hour = calendar.get(Calendar.HOUR_OF_DAY);
-                int minute = calendar.get(Calendar.MINUTE);
-                message1(hour, minute);
-                message2(hour, minute);
-                message3(hour, minute);
-                message4(hour, minute);
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    public void message1(int hour, int minute) {
-        if (hour >= 17 && minute >= 30) {
-            if (message1_sendflag) {
-                SQLFactory factory = new SQLFactory(this, "当天无录入记录经销商提醒");
-                String status = new DBConnect().runSqlUpdate(factory.getSQL());
-                if ("true".equals(status)) {
-                    message1_sendflag = false;
-                }
-            }
-        } else if (hour < 17) {
-            message1_sendflag = true;
-        }
-    }
-
-    public void message2(int hour, int minute) {
-        if (hour >= 18 && minute >= 30) {
-            if (message2_sendflag) {
-                SQLFactory factory = new SQLFactory(this, "代理商当天无数据录入业务员提醒");
-                String status = new DBConnect().runSqlUpdate(factory.getSQL());
-                if ("true".equals(status)) {
-                    message2_sendflag = false;
-                }
-            }
-        } else if (hour < 18) {
-            message2_sendflag = true;
-        }
-    }
-
-    public void message3(int hour, int minute) {
-        if (hour >= 20 && minute >= 30) {
-            if (message3_sendflag) {
-                SQLFactory factory = new SQLFactory(this, "代理商三天无数据录入业务员提醒");
-                String status = new DBConnect().runSqlUpdate(factory.getSQL());
-                if ("true".equals(status)) {
-                    message3_sendflag = false;
-                }
-            }
-        } else if (hour < 20) {
-            message3_sendflag = true;
-        }
-    }
-
-    public void message4(int hour, int minute) {
-        if (hour >= 20 && minute >= 30) {
-            if (message4_sendflag) {
-                SQLFactory factory = new SQLFactory(this, "代理商七天无数据录入业务员提醒");
-                String status = new DBConnect().runSqlUpdate(factory.getSQL());
-                if ("true".equals(status)) {
-                    message4_sendflag = false;
-                }
-            }
-        } else if (hour < 20) {
-            message4_sendflag = true;
-        }
-    }
-}

+ 0 - 14
src/dsb/com/cnd3b/service/SQL/代理商七天无数据录入业务员提醒.sql

@@ -1,14 +0,0 @@
-declare @tmessageid bigint
-set @tmessageid=(select isnull(MAX(tmessageid),0) from tmessage)
-insert into tmessage
-(tmessageid, siteid, createdate, rmkenable, fmessage, ftype, fisread, freaddate, tenterprise_userid)
-select @tmessageid+ROW_NUMBER()over(order by t1.fphonenumber), t1.siteid, getDate(), 0, '提醒:区域有'+convert(varchar(20),count(t2.tagentsid))+'个代理商七天未录入数据!', '系统', 0, null, t1.tenterprise_userid
-from tenterprise_users t1
-         inner join tagents t2 on t1.siteid=t2.siteid and t1.tenterprise_userid=t2.fsaleruserid
-         left join tcustomer_reception t3 on t1.siteid=t3.siteid and t2.tagentsid=t3.tagentsid and convert(varchar(10),t3.createdate,120)= convert(varchar(10),DATEADD(DD,-6, GETDATE()),120)
-         left join tsaleevent t4 on t1.siteid=t4.siteid and t2.tagentsid=t4.tagentsid and convert(varchar(10),t4.createdate,120)= convert(varchar(10),DATEADD(DD,-6, GETDATE()),120)
-         left join tagents_cost t5 on t1.siteid=t5.siteid and t2.tagentsid=t5.tagentsid and convert(varchar(10),t5.createdate,120)= convert(varchar(10),DATEADD(DD,-6, GETDATE()),120)
-         inner join tappmodelauth t6 on t1.siteid=t6.siteid and t6.fisdefault=1
-where t1.fphonenumber is not null and t1.fusertype='企业' and (t2.fappmodel='专业版' or (t2.fappmodel is null and t6.fappmodel='专业版')) and t3.tcustomer_receptid is null and t4.tsaleeventid is null and t5.tagents_costid is null
-group by t1.tenterprise_userid,t1.fphonenumber,t1.siteid
-

+ 0 - 14
src/dsb/com/cnd3b/service/SQL/代理商三天无数据录入业务员提醒.sql

@@ -1,14 +0,0 @@
-declare @tmessageid bigint
-set @tmessageid=(select isnull(MAX(tmessageid),0) from tmessage)
-insert into tmessage
-(tmessageid, siteid, createdate, rmkenable, fmessage, ftype, fisread, freaddate, tenterprise_userid)
-select @tmessageid+ROW_NUMBER()over(order by t1.fphonenumber), t1.siteid, getDate(), 0, '提醒:区域有'+convert(varchar(20),count(t2.tagentsid))+'个代理商三天未录入数据!', '系统', 0, null, t1.tenterprise_userid
-from tenterprise_users t1
-         inner join tagents t2 on t1.siteid=t2.siteid and t1.tenterprise_userid=t2.fsaleruserid
-         left join tcustomer_reception t3 on t1.siteid=t3.siteid and t2.tagentsid=t3.tagentsid and convert(varchar(10),t3.createdate,120)= convert(varchar(10),DATEADD(DD,-2, GETDATE()),120)
-         left join tsaleevent t4 on t1.siteid=t4.siteid and t2.tagentsid=t4.tagentsid and convert(varchar(10),t4.createdate,120)= convert(varchar(10),DATEADD(DD,-2, GETDATE()),120)
-         left join tagents_cost t5 on t1.siteid=t5.siteid and t2.tagentsid=t5.tagentsid and convert(varchar(10),t5.createdate,120)= convert(varchar(10),DATEADD(DD,-2, GETDATE()),120)
-         inner join tappmodelauth t6 on t1.siteid=t6.siteid and t6.fisdefault=1
-where t1.fphonenumber is not null and t1.fusertype='企业' and (t2.fappmodel='专业版' or (t2.fappmodel is null and t6.fappmodel='专业版'))and t3.tcustomer_receptid is null and t4.tsaleeventid is null and t5.tagents_costid is null
-group by t1.tenterprise_userid,t1.fphonenumber,t1.siteid
-

+ 0 - 14
src/dsb/com/cnd3b/service/SQL/代理商当天无数据录入业务员提醒.sql

@@ -1,14 +0,0 @@
-declare @tmessageid bigint
-set @tmessageid=(select isnull(MAX(tmessageid),0) from tmessage)
-insert into tmessage
-(tmessageid, siteid, createdate, rmkenable, fmessage, ftype, fisread, freaddate, tenterprise_userid)
-select @tmessageid+ROW_NUMBER()over(order by t1.fphonenumber), t1.siteid, getDate(), 0, '提醒:区域有'+convert(varchar(20),count(t2.tagentsid))+'个代理商今天未录入数据!', '系统', 0, null, t1.tenterprise_userid
-from tenterprise_users t1
-         inner join tagents t2 on t1.siteid=t2.siteid and t1.tenterprise_userid=t2.fsaleruserid
-         left join tcustomer_reception t3 on t1.siteid=t3.siteid and t2.tagentsid=t3.tagentsid and convert(varchar(10),t3.createdate,120)= convert(varchar(10),GETDATE(),120)
-         left join tsaleevent t4 on t1.siteid=t4.siteid and t2.tagentsid=t4.tagentsid and convert(varchar(10),t4.createdate,120)= convert(varchar(10),GETDATE(),120)
-         left join tagents_cost t5 on t1.siteid=t5.siteid and t2.tagentsid=t5.tagentsid and convert(varchar(10),t5.createdate,120)= convert(varchar(10),GETDATE(),120)
-         inner join tappmodelauth t6 on t1.siteid=t6.siteid and t6.fisdefault=1
-where t1.fphonenumber is not null and t1.fusertype='企业' and (t2.fappmodel='专业版' or (t2.fappmodel is null and t6.fappmodel='专业版')) and t3.tcustomer_receptid is null and t4.tsaleeventid is null and t5.tagents_costid is null
-group by t1.tenterprise_userid,t1.fphonenumber,t1.siteid
-

+ 0 - 12
src/dsb/com/cnd3b/service/SQL/当天无录入记录经销商提醒.sql

@@ -1,12 +0,0 @@
-declare @tmessageid bigint
-set @tmessageid=(select isnull(MAX(tmessageid),0) from tmessage)
-insert into tmessage
-(tmessageid, siteid, createdate, rmkenable, fmessage, ftype, fisread, freaddate, tenterprise_userid)
-select @tmessageid+ROW_NUMBER()over(order by t1.fphonenumber), t1.siteid, getDate(), 0, '呜~~,别把我忘了,今天的数据还没有录入。', '系统', 0, null, t1.tenterprise_userid
-from tenterprise_users t1
-left join tcustomer_reception t2 on t1.siteid=t2.siteid and t1.tagentsid=t2.tagentsid and t1.fname=t2.createby and convert(varchar(10),t2.createdate,120)= convert(varchar(10),GETDATE(),120)
-left join tsaleevent t3 on t1.siteid=t3.siteid and t1.tagentsid=t3.tagentsid and t1.fname=t3.createby and convert(varchar(10),t3.createdate,120)= convert(varchar(10),GETDATE(),120)
-left join tagents_cost t4 on t1.siteid=t4.siteid and t1.tagentsid=t4.tagentsid and t1.fname=t4.createby and convert(varchar(10),t4.createdate,120)= convert(varchar(10),GETDATE(),120)
-inner join tagents t5 on t1.siteid=t5.siteid and t1.tagentsid=t5.tagentsid
-inner join tappmodelauth t6 on t1.siteid=t6.siteid and t6.fisdefault=1
-where t1.fphonenumber is not null and t1.fusertype='经销商' and isnull(t1.frole,'') not in ('工人','推广人') and (t5.fappmodel='专业版'or (t5.fappmodel is null and t6.fappmodel='专业版'))  and t2.tcustomer_receptid is null and t3.tsaleeventid is null and t4.tagents_costid is null