|
@@ -43,12 +43,12 @@ namespace MySystem
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
|
|
|
//统计发货量
|
|
|
- DataTable dt = CustomerSqlConn.dtable("select CONCAT('update Users set ThisMonthSend=(select count(Id) from StoreStockChange where CreateDate>=\'" + DateTime.Now.ToString("yyyy-MM") + "-01 00:00:00\' and TransType in (10,11) and OpId=',Id,') where Id=',Id,';') from Users where UserType=1", MysqlConn.SqlConnStr);
|
|
|
+ DataTable dt = CustomerSqlConn.dtable("select CONCAT('update Users set ThisMonthSend=(select count(Id) from StoreStockChange where CreateDate>=\\'" + DateTime.Now.ToString("yyyy-MM") + "-01 00:00:00\\' and TransType in (10,11) and OpId=',Id,') where Id=',Id,';') from Users where UserType=1", MysqlConn.SqlConnStr);
|
|
|
foreach(DataRow dr in dt.Rows)
|
|
|
{
|
|
|
CustomerSqlConn.op(dr[0].ToString(), MysqlConn.SqlConnStr);
|
|
|
}
|
|
|
- dt = CustomerSqlConn.dtable("select distinct CONCAT('update Users set ThisMonthSend=(select count(Id) from StoreStockChange where CreateDate>=\'" + DateTime.Now.ToString("yyyy-MM") + "-01 00:00:00\' and TransType in (10,11) and StoreId in (select Id from StoreHouse where UserId=',QueryCount,') and OpId=',OpId,') where Id=', QueryCount,';') from StoreForOperate where Sort=0 and Status>-1", MysqlConn.OpSqlConnStr);
|
|
|
+ dt = CustomerSqlConn.dtable("select distinct CONCAT('update Users set ThisMonthSend=(select count(Id) from StoreStockChange where CreateDate>=\\'" + DateTime.Now.ToString("yyyy-MM") + "-01 00:00:00\\' and TransType in (10,11) and StoreId in (select Id from StoreHouse where UserId=',QueryCount,') and OpId=',OpId,') where Id=', QueryCount,';') from StoreForOperate where Sort=0 and Status>-1", MysqlConn.OpSqlConnStr);
|
|
|
foreach(DataRow dr in dt.Rows)
|
|
|
{
|
|
|
CustomerSqlConn.op(dr[0].ToString(), MysqlConn.SqlConnStr);
|