|
@@ -86,20 +86,21 @@ public class StoreApplyHelper
|
|
dataDic[store.UserId] += AmountMore;
|
|
dataDic[store.UserId] += AmountMore;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // TODO: 上个月申请了但未发货的额度,要减掉
|
|
foreach(int UserId in dataDic.Keys)
|
|
foreach(int UserId in dataDic.Keys)
|
|
{
|
|
{
|
|
decimal Amount = dataDic[UserId];
|
|
decimal Amount = dataDic[UserId];
|
|
decimal AmountMore = 0;
|
|
decimal AmountMore = 0;
|
|
- // DataTable dtmore = OtherMySqlConn.dtable("select count(Id)*200 from PosMachinesTwo pos where StoreId in (select Id from StoreHouse where UserId=" + UserId + ") and BuyUserId=0 and BrandId in (1,2,4,6,7,8) and `Status`>-1");
|
|
|
|
- // if(dtmore.Rows.Count > 0)
|
|
|
|
- // {
|
|
|
|
- // AmountMore += decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
|
|
|
|
- // }
|
|
|
|
- // dtmore = OtherMySqlConn.dtable("select count(Id)*300 from PosMachinesTwo pos where StoreId in (select Id from StoreHouse where UserId=" + UserId + ") and BuyUserId=0 and BrandId in (3,5,9) and `Status`>-1");
|
|
|
|
- // if(dtmore.Rows.Count > 0)
|
|
|
|
- // {
|
|
|
|
- // AmountMore += decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
|
|
|
|
- // }
|
|
|
|
|
|
+ DataTable dtmore = OtherMySqlConn.dtable("select count(Id)*200 from PosMachinesTwo pos where StoreId in (select Id from StoreHouse where UserId=" + UserId + ") and BuyUserId=0 and BrandId in (1,2,4,6,7,8) and `Status`>-1");
|
|
|
|
+ if(dtmore.Rows.Count > 0)
|
|
|
|
+ {
|
|
|
|
+ AmountMore += decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
|
|
|
|
+ }
|
|
|
|
+ dtmore = OtherMySqlConn.dtable("select count(Id)*300 from PosMachinesTwo pos where StoreId in (select Id from StoreHouse where UserId=" + UserId + ") and BuyUserId=0 and BrandId in (3,5,9) and `Status`>-1");
|
|
|
|
+ if(dtmore.Rows.Count > 0)
|
|
|
|
+ {
|
|
|
|
+ AmountMore += decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
|
|
|
|
+ }
|
|
if(Amount < 10000 && SpecialUsers10000().Contains(UserId))
|
|
if(Amount < 10000 && SpecialUsers10000().Contains(UserId))
|
|
{
|
|
{
|
|
Amount = 10000;
|
|
Amount = 10000;
|