|
@@ -45,7 +45,7 @@ namespace MySystem
|
|
|
result += rightString;
|
|
result += rightString;
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
result += "{title: '基本权限', id: '" + sub3.Id + "_base'}";
|
|
result += "{title: '基本权限', id: '" + sub3.Id + "_base'}";
|
|
|
}
|
|
}
|
|
|
result += "]},";
|
|
result += "]},";
|
|
@@ -136,7 +136,7 @@ namespace MySystem
|
|
|
result += rightString;
|
|
result += rightString;
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
result += "{title: '基本权限', id: '" + sub3.Id + "_base'}";
|
|
result += "{title: '基本权限', id: '" + sub3.Id + "_base'}";
|
|
|
}
|
|
}
|
|
|
result += "]},";
|
|
result += "]},";
|
|
@@ -356,7 +356,7 @@ namespace MySystem
|
|
|
private static double EARTH_RADIUS = 6378.137;
|
|
private static double EARTH_RADIUS = 6378.137;
|
|
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
#region 短信条数
|
|
#region 短信条数
|
|
|
|
|
|
|
|
public int SMSCount()
|
|
public int SMSCount()
|
|
@@ -370,7 +370,7 @@ namespace MySystem
|
|
|
#region 短信消耗
|
|
#region 短信消耗
|
|
|
|
|
|
|
|
public void UseSMS()
|
|
public void UseSMS()
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
SystemSet check = db.SystemSet.FirstOrDefault();
|
|
SystemSet check = db.SystemSet.FirstOrDefault();
|
|
|
if (check != null)
|
|
if (check != null)
|
|
|
{
|
|
{
|
|
@@ -383,7 +383,7 @@ namespace MySystem
|
|
|
|
|
|
|
|
#region 获取OSS开关
|
|
#region 获取OSS开关
|
|
|
public string GetOssStatus()
|
|
public string GetOssStatus()
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
SystemSet set = db.SystemSet.FirstOrDefault() ?? new SystemSet();
|
|
SystemSet set = db.SystemSet.FirstOrDefault() ?? new SystemSet();
|
|
|
return set.UploadOss == 1 ? "-oss" : "";
|
|
return set.UploadOss == 1 ? "-oss" : "";
|
|
|
}
|
|
}
|
|
@@ -395,7 +395,7 @@ namespace MySystem
|
|
|
string tag = function.MD5_16(buttonId);
|
|
string tag = function.MD5_16(buttonId);
|
|
|
string param = RedisDbconn.Instance.Get<string>("btn:" + tag);
|
|
string param = RedisDbconn.Instance.Get<string>("btn:" + tag);
|
|
|
if (!string.IsNullOrEmpty(param))
|
|
if (!string.IsNullOrEmpty(param))
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
return param;
|
|
return param;
|
|
|
}
|
|
}
|
|
|
SystemSet set = db.SystemSet.FirstOrDefault() ?? new SystemSet();
|
|
SystemSet set = db.SystemSet.FirstOrDefault() ?? new SystemSet();
|
|
@@ -409,7 +409,7 @@ namespace MySystem
|
|
|
string tag = function.MD5_16(buttonId);
|
|
string tag = function.MD5_16(buttonId);
|
|
|
string param = RedisDbconn.Instance.Get<string>("btn:" + tag);
|
|
string param = RedisDbconn.Instance.Get<string>("btn:" + tag);
|
|
|
if (string.IsNullOrEmpty(param))
|
|
if (string.IsNullOrEmpty(param))
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
SystemSet set = db.SystemSet.FirstOrDefault() ?? new SystemSet();
|
|
SystemSet set = db.SystemSet.FirstOrDefault() ?? new SystemSet();
|
|
|
param = "{width:" + set.UploadAutoZoomWidth + ",height:" + set.UploadAutoZoomHeight + ",quality:" + set.UploadAutoZoomQuality + "},{max_file_size:" + set.UploadMaxSize + "}";
|
|
param = "{width:" + set.UploadAutoZoomWidth + ",height:" + set.UploadAutoZoomHeight + ",quality:" + set.UploadAutoZoomQuality + "},{max_file_size:" + set.UploadMaxSize + "}";
|
|
|
}
|
|
}
|
|
@@ -419,12 +419,12 @@ namespace MySystem
|
|
|
int max_file_size = int.Parse(size["max_file_size"]) / 1024;
|
|
int max_file_size = int.Parse(size["max_file_size"]) / 1024;
|
|
|
string unit = "KB";
|
|
string unit = "KB";
|
|
|
if (max_file_size / 1024 > 0)
|
|
if (max_file_size / 1024 > 0)
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
max_file_size = max_file_size / 1024;
|
|
max_file_size = max_file_size / 1024;
|
|
|
unit = "MB";
|
|
unit = "MB";
|
|
|
}
|
|
}
|
|
|
if (max_file_size / 1024 > 0)
|
|
if (max_file_size / 1024 > 0)
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
max_file_size = max_file_size / 1024;
|
|
max_file_size = max_file_size / 1024;
|
|
|
unit = "GB";
|
|
unit = "GB";
|
|
|
}
|
|
}
|
|
@@ -498,7 +498,7 @@ namespace MySystem
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
function.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "获取Excel文件内容异常");
|
|
function.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "获取Excel文件内容异常");
|
|
|
}
|
|
}
|
|
|
return dtTable;
|
|
return dtTable;
|
|
@@ -530,7 +530,7 @@ namespace MySystem
|
|
|
}).Entity;
|
|
}).Entity;
|
|
|
db.SaveChanges();
|
|
db.SaveChanges();
|
|
|
}
|
|
}
|
|
|
- if(Count < 0)
|
|
|
|
|
|
|
+ if (Count < 0)
|
|
|
{
|
|
{
|
|
|
MachineData.TotalMachineCount -= Math.Abs(Count);
|
|
MachineData.TotalMachineCount -= Math.Abs(Count);
|
|
|
MachineData.UnBindCount -= Math.Abs(Count);
|
|
MachineData.UnBindCount -= Math.Abs(Count);
|
|
@@ -551,24 +551,24 @@ namespace MySystem
|
|
|
public static void ClearPosHistory(WebCMSEntities db, string PosSn)
|
|
public static void ClearPosHistory(WebCMSEntities db, string PosSn)
|
|
|
{
|
|
{
|
|
|
PreSendStockDetail prepos = db.PreSendStockDetail.FirstOrDefault(m => m.SnNo == PosSn && m.Status == 1);
|
|
PreSendStockDetail prepos = db.PreSendStockDetail.FirstOrDefault(m => m.SnNo == PosSn && m.Status == 1);
|
|
|
- if(prepos != null)
|
|
|
|
|
|
|
+ if (prepos != null)
|
|
|
{
|
|
{
|
|
|
prepos.Status = -1;
|
|
prepos.Status = -1;
|
|
|
prepos.ApplyFlag = 0;
|
|
prepos.ApplyFlag = 0;
|
|
|
SmallStoreHouse sstore = db.SmallStoreHouse.FirstOrDefault(m => m.UserId == prepos.ToUserId);
|
|
SmallStoreHouse sstore = db.SmallStoreHouse.FirstOrDefault(m => m.UserId == prepos.ToUserId);
|
|
|
- if(sstore != null)
|
|
|
|
|
|
|
+ if (sstore != null)
|
|
|
{
|
|
{
|
|
|
sstore.LaveNum += 1;
|
|
sstore.LaveNum += 1;
|
|
|
sstore.TotalNum -= 1;
|
|
sstore.TotalNum -= 1;
|
|
|
}
|
|
}
|
|
|
StoreHouse store = db.StoreHouse.FirstOrDefault(m => m.UserId == prepos.FromStoreId);
|
|
StoreHouse store = db.StoreHouse.FirstOrDefault(m => m.UserId == prepos.FromStoreId);
|
|
|
- if(store != null)
|
|
|
|
|
|
|
+ if (store != null)
|
|
|
{
|
|
{
|
|
|
store.LaveNum += 1;
|
|
store.LaveNum += 1;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
MachineApply apply = db.MachineApply.FirstOrDefault(m => m.SwapSnExpand.Contains(PosSn));
|
|
MachineApply apply = db.MachineApply.FirstOrDefault(m => m.SwapSnExpand.Contains(PosSn));
|
|
|
- if(apply != null)
|
|
|
|
|
|
|
+ if (apply != null)
|
|
|
{
|
|
{
|
|
|
apply.SwapSnExpand = apply.SwapSnExpand.Replace(PosSn, PosSn.Substring(0, 3) + "d" + PosSn.Substring(4));
|
|
apply.SwapSnExpand = apply.SwapSnExpand.Replace(PosSn, PosSn.Substring(0, 3) + "d" + PosSn.Substring(4));
|
|
|
}
|
|
}
|
|
@@ -594,13 +594,13 @@ namespace MySystem
|
|
|
public static Dictionary<string, Dictionary<string, string>> OpTables = new Dictionary<string, Dictionary<string, string>>();//运营中心数据模型
|
|
public static Dictionary<string, Dictionary<string, string>> OpTables = new Dictionary<string, Dictionary<string, string>>();//运营中心数据模型
|
|
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
#region 发送分表数据
|
|
#region 发送分表数据
|
|
|
|
|
|
|
|
public static void SplitTradeRecord(TradeRecord obj, string TradeMonth = "")
|
|
public static void SplitTradeRecord(TradeRecord obj, string TradeMonth = "")
|
|
|
{
|
|
{
|
|
|
- if(string.IsNullOrEmpty(TradeMonth))
|
|
|
|
|
|
|
+ if (string.IsNullOrEmpty(TradeMonth))
|
|
|
{
|
|
{
|
|
|
TradeMonth = DateTime.Now.ToString("yyyyMM");
|
|
TradeMonth = DateTime.Now.ToString("yyyyMM");
|
|
|
}
|
|
}
|
|
@@ -609,7 +609,7 @@ namespace MySystem
|
|
|
|
|
|
|
|
public static void SplitUserAccountRecord(UserAccountRecord obj, string TradeMonth = "")
|
|
public static void SplitUserAccountRecord(UserAccountRecord obj, string TradeMonth = "")
|
|
|
{
|
|
{
|
|
|
- if(string.IsNullOrEmpty(TradeMonth))
|
|
|
|
|
|
|
+ if (string.IsNullOrEmpty(TradeMonth))
|
|
|
{
|
|
{
|
|
|
TradeMonth = DateTime.Now.ToString("yyyyMM");
|
|
TradeMonth = DateTime.Now.ToString("yyyyMM");
|
|
|
}
|
|
}
|
|
@@ -617,6 +617,34 @@ namespace MySystem
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ #region 设置押金添加记录公共方法
|
|
|
|
|
+ public static void MerchantDepositSet(int BrandId, int UserId, int SnId, string SnNo, int BeforeDeposit, decimal DepositAmount, string ReturnNote)
|
|
|
|
|
+ {
|
|
|
|
|
+ try
|
|
|
|
|
+ {
|
|
|
|
|
+ WebCMSEntities maindb = new WebCMSEntities();
|
|
|
|
|
+ MerchantDepositSet query = maindb.MerchantDepositSet.Add(new MerchantDepositSet()
|
|
|
|
|
+ {
|
|
|
|
|
+ CreateDate = DateTime.Now, //创建时间
|
|
|
|
|
+ Sort = BrandId,//品牌
|
|
|
|
|
+ SeoTitle = BeforeDeposit.ToString(),//变更前押金
|
|
|
|
|
+ DepositAmount = DepositAmount,//押金
|
|
|
|
|
+ ReturnNote = ReturnNote,//返回信息
|
|
|
|
|
+ SnNo = SnNo,//机具Sn
|
|
|
|
|
+ UserId = UserId,//创客Id
|
|
|
|
|
+ }).Entity;
|
|
|
|
|
+ maindb.SaveChanges();
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ catch (Exception ex)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ function.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + ":" + ex.ToString(), "设置押金队列异常");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ #endregion
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|