liulb@mesnac.com 1 year ago
parent fe8a702e1d
commit 2e952fee38

@ -15,6 +15,11 @@ namespace Admin.Core.IRepository
/// </summary>
ISqlSugarClient Db { get; }
/// <summary>
/// 判断数据库连接状态
/// </summary>
/// <returns></returns>
bool GetConnectionState();
/// <summary>
/// 根据Id查询实体
/// </summary>
/// <param name="objId"></param>

@ -10,11 +10,10 @@ namespace Admin.Core.IService
{
public interface IBaseServices<TEntity> where TEntity : class
{
bool GetConnectionState();
Task<TEntity> QueryByIdAsync(object objId);
Task<TEntity> QueryByIdAsync(object objId, bool blnUseCache = false);
Task<List<TEntity>> QueryByIDsAsync(object[] lstIds);
Task<int> AddAsync(TEntity model);
Task<int> AddAsync(List<TEntity> listEntity);

@ -8,9 +8,6 @@ using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Admin.Core.IRepository;
using NPOI.SS.Formula.Functions;
using Org.BouncyCastle.Crypto;
using Castle.DynamicProxy.Generators.Emitters.SimpleAST;
namespace Admin.Core.Repository
{
@ -54,6 +51,15 @@ namespace Admin.Core.Repository
_dbBase = unitOfWork.GetDbClient();
}
/// <summary>
/// 判断数据库连接状态
/// </summary>
/// <returns></returns>
public bool GetConnectionState()
{
return _db.Ado.IsValidConnection();
}
#region 异步方法
@ -64,7 +70,7 @@ namespace Admin.Core.Repository
public async Task<TEntity> QueryByIdAsync(object objId)
{
//return await Task.Run(() => _db.Queryable<TEntity>().InSingle(objId));
if (GetConnectionState() == false) return null;
return await _db.Queryable<TEntity>().In(objId).SingleAsync();
}
/// <summary>
@ -76,7 +82,7 @@ namespace Admin.Core.Repository
/// <returns>数据实体</returns>
public async Task<TEntity> QueryByIdAsync(object objId, bool blnUseCache = false)
{
//return await Task.Run(() => _db.Queryable<TEntity>().WithCacheIF(blnUseCache).InSingle(objId));
if (GetConnectionState() == false) return null;
return await _db.Queryable<TEntity>().WithCacheIF(blnUseCache).In(objId).SingleAsync();
}
@ -88,7 +94,7 @@ namespace Admin.Core.Repository
/// <returns>数据实体列表</returns>
public async Task<List<TEntity>> QueryByIDsAsync(object[] lstIds)
{
//return await Task.Run(() => _db.Queryable<TEntity>().In(lstIds).ToList());
if (GetConnectionState() == false) return null;
return await _db.Queryable<TEntity>().In(lstIds).ToListAsync();
}
@ -215,6 +221,7 @@ namespace Admin.Core.Repository
/// <returns></returns>
public async Task<TEntity> FirstAsync()
{
if (GetConnectionState() == false) return null;
return await _db.Queryable<TEntity>().FirstAsync();
}
/// <summary>
@ -224,6 +231,7 @@ namespace Admin.Core.Repository
/// <returns></returns>
public async Task<TEntity> FirstAsync(Expression<Func<TEntity, bool>> whereExpression)
{
if (GetConnectionState() == false) return null;
return await _db.Queryable<TEntity>().WhereIF(whereExpression != null, whereExpression).FirstAsync();
}
/// <summary>
@ -269,6 +277,7 @@ namespace Admin.Core.Repository
/// <returns>数据列表</returns>
public async Task<List<TEntity>> QueryAsync()
{
if (GetConnectionState() == false) return null;
return await _db.Queryable<TEntity>().ToListAsync();
}
@ -280,6 +289,7 @@ namespace Admin.Core.Repository
/// <returns>数据列表</returns>
public async Task<List<TEntity>> QueryAsync(string strWhere)
{
if (GetConnectionState() == false) return null;
//return await Task.Run(() => _db.Queryable<TEntity>().WhereIF(!string.IsNullOrEmpty(strWhere), strWhere).ToList());
return await _db.Queryable<TEntity>().WhereIF(!string.IsNullOrEmpty(strWhere), strWhere).ToListAsync();
}
@ -292,6 +302,7 @@ namespace Admin.Core.Repository
/// <returns>数据列表</returns>
public async Task<List<TEntity>> QueryAsync(Expression<Func<TEntity, bool>> whereExpression)
{
if (GetConnectionState() == false) return null;
return await _db.Queryable<TEntity>().WhereIF(whereExpression != null, whereExpression).ToListAsync();
}
@ -304,6 +315,7 @@ namespace Admin.Core.Repository
/// <returns></returns>
public async Task<List<TResult>> QueryAsync<TResult>(Expression<Func<TEntity, TResult>> expression)
{
if (GetConnectionState() == false) return null;
return await _db.Queryable<TEntity>().Select(expression).ToListAsync();
}
@ -318,6 +330,7 @@ namespace Admin.Core.Repository
/// <returns></returns>
public async Task<List<TResult>> QueryAsync<TResult>(Expression<Func<TEntity, TResult>> expression, Expression<Func<TEntity, bool>> whereExpression, string strOrderByFileds)
{
if (GetConnectionState() == false) return null;
return await _db.Queryable<TEntity>().OrderByIF(!string.IsNullOrEmpty(strOrderByFileds), strOrderByFileds).WhereIF(whereExpression != null, whereExpression).Select(expression).ToListAsync();
}
@ -330,6 +343,7 @@ namespace Admin.Core.Repository
/// <returns>数据列表</returns>
public async Task<List<TEntity>> QueryAsync(Expression<Func<TEntity, bool>> whereExpression, string strOrderByFileds)
{
if (GetConnectionState() == false) return null;
//return await Task.Run(() => _db.Queryable<TEntity>().OrderByIF(!string.IsNullOrEmpty(strOrderByFileds), strOrderByFileds).WhereIF(whereExpression != null, whereExpression).ToList());
return await _db.Queryable<TEntity>().WhereIF(whereExpression != null, whereExpression).OrderByIF(strOrderByFileds != null, strOrderByFileds).ToListAsync();
}
@ -342,6 +356,7 @@ namespace Admin.Core.Repository
/// <returns></returns>
public async Task<List<TEntity>> QueryAsync(Expression<Func<TEntity, bool>> whereExpression, Expression<Func<TEntity, object>> orderByExpression, bool isAsc = true)
{
if (GetConnectionState() == false) return null;
//return await Task.Run(() => _db.Queryable<TEntity>().OrderByIF(orderByExpression != null, orderByExpression, isAsc ? OrderByType.Asc : OrderByType.Desc).WhereIF(whereExpression != null, whereExpression).ToList());
return await _db.Queryable<TEntity>().OrderByIF(orderByExpression != null, orderByExpression, isAsc ? OrderByType.Asc : OrderByType.Desc).WhereIF(whereExpression != null, whereExpression).ToListAsync();
}
@ -355,6 +370,7 @@ namespace Admin.Core.Repository
/// <returns>数据列表</returns>
public async Task<List<TEntity>> QueryAsync(string strWhere, string strOrderByFileds)
{
if (GetConnectionState() == false) return null;
//return await Task.Run(() => _db.Queryable<TEntity>().OrderByIF(!string.IsNullOrEmpty(strOrderByFileds), strOrderByFileds).WhereIF(!string.IsNullOrEmpty(strWhere), strWhere).ToList());
return await _db.Queryable<TEntity>().OrderByIF(!string.IsNullOrEmpty(strOrderByFileds), strOrderByFileds).WhereIF(!string.IsNullOrEmpty(strWhere), strWhere).ToListAsync();
}
@ -373,6 +389,7 @@ namespace Admin.Core.Repository
int intTop,
string strOrderByFileds)
{
if (GetConnectionState() == false) return null;
//return await Task.Run(() => _db.Queryable<TEntity>().OrderByIF(!string.IsNullOrEmpty(strOrderByFileds), strOrderByFileds).WhereIF(whereExpression != null, whereExpression).Take(intTop).ToList());
return await _db.Queryable<TEntity>().OrderByIF(!string.IsNullOrEmpty(strOrderByFileds), strOrderByFileds).WhereIF(whereExpression != null, whereExpression).Take(intTop).ToListAsync();
}
@ -390,6 +407,7 @@ namespace Admin.Core.Repository
int intTop,
string strOrderByFileds)
{
if (GetConnectionState() == false) return null;
//return await Task.Run(() => _db.Queryable<TEntity>().OrderByIF(!string.IsNullOrEmpty(strOrderByFileds), strOrderByFileds).WhereIF(!string.IsNullOrEmpty(strWhere), strWhere).Take(intTop).ToList());
return await _db.Queryable<TEntity>().OrderByIF(!string.IsNullOrEmpty(strOrderByFileds), strOrderByFileds).WhereIF(!string.IsNullOrEmpty(strWhere), strWhere).Take(intTop).ToListAsync();
}
@ -402,6 +420,7 @@ namespace Admin.Core.Repository
/// <returns>泛型集合</returns>
public async Task<List<TEntity>> QuerySqlAsync(string strSql, SugarParameter[] parameters = null)
{
if (GetConnectionState() == false) return null;
return await _db.Ado.SqlQueryAsync<TEntity>(strSql, parameters);
}
@ -424,6 +443,7 @@ namespace Admin.Core.Repository
/// <returns>DataTable</returns>
public async Task<DataTable> QueryTableAsync(string strSql, SugarParameter[] parameters = null)
{
if (GetConnectionState() == false) return null;
return await _db.Ado.GetDataTableAsync(strSql, parameters);
}
@ -442,6 +462,7 @@ namespace Admin.Core.Repository
int intPageSize,
string strOrderByFileds)
{
if (GetConnectionState() == false) return null;
//return await Task.Run(() => _db.Queryable<TEntity>().OrderByIF(!string.IsNullOrEmpty(strOrderByFileds), strOrderByFileds).WhereIF(whereExpression != null, whereExpression).ToPageList(intPageIndex, intPageSize));
return await _db.Queryable<TEntity>().OrderByIF(!string.IsNullOrEmpty(strOrderByFileds), strOrderByFileds).WhereIF(whereExpression != null, whereExpression).ToPageListAsync(intPageIndex, intPageSize);
}
@ -462,6 +483,7 @@ namespace Admin.Core.Repository
string strOrderByFileds)
{
if (GetConnectionState() == false) return null;
//return await Task.Run(() => _db.Queryable<TEntity>().OrderByIF(!string.IsNullOrEmpty(strOrderByFileds), strOrderByFileds).WhereIF(!string.IsNullOrEmpty(strWhere), strWhere).ToPageList(intPageIndex, intPageSize));
return await _db.Queryable<TEntity>().OrderByIF(!string.IsNullOrEmpty(strOrderByFileds), strOrderByFileds).WhereIF(!string.IsNullOrEmpty(strWhere), strWhere).ToPageListAsync(intPageIndex, intPageSize);
}
@ -478,6 +500,7 @@ namespace Admin.Core.Repository
/// <returns></returns>
public async Task<PageModel<TEntity>> QueryPageAsync(Expression<Func<TEntity, bool>> whereExpression, int intPageIndex = 1, int intPageSize = 20, string strOrderByFileds = null)
{
if (GetConnectionState() == false) return null;
RefAsync<int> totalCount = 0;
var list = await _db.Queryable<TEntity>()
@ -506,6 +529,7 @@ namespace Admin.Core.Repository
Expression<Func<T, T2, T3, TResult>> selectExpression,
Expression<Func<T, T2, T3, bool>> whereLambda = null) where T : class, new()
{
if (GetConnectionState() == false) return null;
if (whereLambda == null)
{
return await _db.Queryable(joinExpression).Select(selectExpression).ToListAsync();
@ -535,7 +559,7 @@ namespace Admin.Core.Repository
int intPageSize = 20,
string strOrderByFileds = null)
{
if (GetConnectionState() == false) return null;
RefAsync<int> totalCount = 0;
var list = await _db.Queryable<T, T2>(joinExpression)
.Select(selectExpression)
@ -568,6 +592,7 @@ namespace Admin.Core.Repository
int intPageSize = 20,
string strOrderByFileds = null)
{
if (GetConnectionState() == false) return null;
RefAsync<int> totalCount = 0;
var list = await _db.Queryable<T, T2>(joinExpression).GroupBy(groupExpression)

@ -2,6 +2,7 @@
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
using Castle.DynamicProxy.Generators.Emitters.SimpleAST;
using SqlSugar;
using System;
using System.Collections.Generic;
@ -17,12 +18,17 @@ namespace Admin.Core.Service
//public IBaseRepository<TEntity> baseDal = new BaseRepository<TEntity>();
public IBaseRepository<TEntity> BaseDal { get; set; }//通过在子类的构造函数中注入,这里是基类,不用构造函数
public bool GetConnectionState()
{
return BaseDal.GetConnectionState();
}
/// <summary>
/// 正序查询第一条数据
/// </summary>
/// <returns></returns>
public async Task<TEntity> FirstAsync()
{
if (BaseDal.GetConnectionState() == false) return null;
return await BaseDal.FirstAsync();
}
/// <summary>
@ -32,12 +38,14 @@ namespace Admin.Core.Service
/// <returns></returns>
public async Task<TEntity> FirstAsync(Expression<Func<TEntity, bool>> whereExpression)
{
if (BaseDal.GetConnectionState() == false) return null;
return await BaseDal.FirstAsync(whereExpression);
}
public async Task<TEntity> QueryByIdAsync(object objId)
{
if (BaseDal.GetConnectionState() == false) return null;
return await BaseDal.QueryByIdAsync(objId);
}
/// <summary>
@ -49,6 +57,7 @@ namespace Admin.Core.Service
/// <returns>数据实体</returns>
public async Task<TEntity> QueryByIdAsync(object objId, bool blnUseCache = false)
{
if (BaseDal.GetConnectionState() == false) return null;
return await BaseDal.QueryByIdAsync(objId, blnUseCache);
}
@ -60,6 +69,7 @@ namespace Admin.Core.Service
/// <returns>数据实体列表</returns>
public async Task<List<TEntity>> QueryByIDsAsync(object[] lstIds)
{
if (BaseDal.GetConnectionState() == false) return null;
return await BaseDal.QueryByIDsAsync(lstIds);
}

@ -51,6 +51,8 @@ namespace Admin.Core.Service
List<OrderBomInfo> orderBomInfoList = await _orderBomInfoRepository.QueryAsync();
List<PrintOrderInfo> printOrderInfoList = await _printOrderInfoRepository.QueryAsync();
bbinfolist.Clear();
if (orderList == null) return null;
if (orderBomInfoList == null) return null;
foreach (BaseOrderInfo order in orderList)
{
var bomList = await _orderBomInfoRepository.QueryAsync(d => d.ParentId.Equals(order.MaterialCode));

@ -263,25 +263,33 @@ namespace Aucma.Core.BoxFoam.ViewModels
/// <returns></returns>
public async Task InitData()
{
int total = 0;
var list = await _boxFoamDataServices.QueryAsync();
foreach (var item in list)
try
{
if (item.BoxFixturestatus == 1) StatusColor.Add("Green");
if (item.BoxFixturestatus == 0) StatusColor.Add("Red");
FixtureName.Add(item.BoxFixturetype);
Production.Add(item.BoxFixtureproduction.ToString());
FoamVolume.Add(item.FoamVolume);
InternalTemperature.Add(item.BoxClosebetatemperature.ToString());
OutsideTemperature.Add(item.BoxFixturesideplate.ToString());
Beat.Add(item.BoxBeat);
total += item.BoxFixtureproduction;
int total = 0;
var list = await _boxFoamDataServices.QueryAsync();
foreach (var item in list)
{
if (item.BoxFixturestatus == 1) StatusColor.Add("Green");
if (item.BoxFixturestatus == 0) StatusColor.Add("Red");
FixtureName.Add(item.BoxFixturetype);
Production.Add(item.BoxFixtureproduction.ToString());
FoamVolume.Add(item.FoamVolume);
InternalTemperature.Add(item.BoxClosebetatemperature.ToString());
OutsideTemperature.Add(item.BoxFixturesideplate.ToString());
Beat.Add(item.BoxBeat);
total += item.BoxFixtureproduction;
}
Totle = total;
}
catch
{
}
Totle = total;
}
}
}

@ -55,22 +55,30 @@ namespace Aucma.Core.BoxFoam.ViewModels
PlanInfoDataGrid.Clear();
int i = 1;
var list = await _recordInstoreServices.SaveRecordToDb(storeCode, startTime, endTime);
foreach (var item in list.OrderByDescending(d=>d.No))
try
{
PlanInfoDataGrid.Add(new EnterLibView()
var list = await _recordInstoreServices.SaveRecordToDb(storeCode, startTime, endTime);
foreach (var item in list.OrderByDescending(d => d.No))
{
No=i,
PlanCode = item.PlanCode,
MaterialCode = item.MaterialCode,
MaterialName = item.MaterialName,
MaterialBarCode = item.MaterialBarCode,
EnterSpace = item.EnterSpace,
ExecDateTime = item.ExecDateTime,
Status = item.Status
});
i++;
};
PlanInfoDataGrid.Add(new EnterLibView()
{
No = i,
PlanCode = item.PlanCode,
MaterialCode = item.MaterialCode,
MaterialName = item.MaterialName,
MaterialBarCode = item.MaterialBarCode,
EnterSpace = item.EnterSpace,
ExecDateTime = item.ExecDateTime,
Status = item.Status
});
i++;
};
}
catch (Exception ex)
{
throw;
}
//Datalist.Insert(0, Datalist[Datalist.Count - 1]);
//Datalist.RemoveAt(Datalist.Count - 1);
}));

@ -22,12 +22,12 @@ namespace Aucma.Core.BoxFoam.ViewModels
public LinerInventoryViewModel() {
_spaceInfoService = App.ServiceProvider.GetService<IBaseSpaceInfoServices>();
_spaceDetailService = App.ServiceProvider.GetService<IBaseSpaceDetailServices>();
Task.WaitAll(Query());
Query();
}
private async Task Query()
private async void Query()
{
var storeCode = Appsettings.app("StoreInfo", "StoreCode");
var storeCode = Appsettings.app("StoreInfo", "LinerInventory");
List<BaseSpaceInfo> info = await _spaceInfoService.QueryAsync(d => d.StoreCode.Equals(storeCode));
if (info != null)
{
@ -45,7 +45,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
private async void SpaceDetail(object obj)
{
string info = obj as string;
var storeCode = Appsettings.app("StoreInfo", "StoreCode");
var storeCode = Appsettings.app("StoreInfo", "LinerInventory");//内胆库号
List<BaseSpaceDetail> list =await _spaceDetailService.GetSpaceDetailsBySpaceCode(storeCode, info);
RefreshSpaceDetails(list);

@ -30,6 +30,10 @@ namespace Aucma.Core.BoxFoam.ViewModels
List<BaseSpaceInfo> info = await _spaceInfoService.QueryAsync(d => d.StoreCode.Equals(storeCode));
if (info != null)
{
if (shapes.Count > 0)
{
shapes.Clear();
}
foreach (BaseSpaceInfo info2 in info)
{
shapes.Add(info2);

@ -146,11 +146,11 @@
<StackPanel Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" >
<TextBlock Text="输入压力" FontSize="18" Foreground="White"/>
</StackPanel>
<WrapPanel Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding PolInputPressure1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White" />
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding IsoInputPressure1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -159,11 +159,11 @@
<WrapPanel Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="输出压力" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding PolOutputPressure1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding IsoOutputPressure1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -171,11 +171,11 @@
<WrapPanel Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="流量" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding PolFlow1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="g/s" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding IsoFlow1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="g/s" FontSize="18" Foreground="White" />
</WrapPanel>
@ -183,11 +183,11 @@
<WrapPanel Grid.Column="0" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="温度" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding PoleTmperature1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="℃" FontSize="18" Foreground="White" />
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding IsoTemperature1}" FontSize="18" Margin="0 0 18 0" Foreground="Black"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -195,11 +195,11 @@
<WrapPanel Grid.Column="0" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="料位" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding PolMaterialLevel1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="%" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding IsoMaterialLevel1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="%" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -210,7 +210,7 @@
<WrapPanel Grid.Column="0" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="压力" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding Pressure1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -218,7 +218,7 @@
<WrapPanel Grid.Column="0" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="温度" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding Temperature1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -245,11 +245,11 @@
<WrapPanel Grid.Column="0" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="POL压力" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLPressure1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLPressure1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -257,11 +257,11 @@
<WrapPanel Grid.Column="0" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="POL温度" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLTemperature1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLTemperature11}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -269,23 +269,22 @@
<WrapPanel Grid.Column="0" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="ISO压力" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOPressure1}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOPressure11}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="0" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="ISO温度" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOTemperature11}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOTemperature11}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -302,7 +301,7 @@
<RowDefinition />
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="0" Background="#1157b9" Margin="1,1,5,5" >
<TextBlock Text="1系统" FontSize="23" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="2系统" FontSize="23" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1,1,5,5">
<Grid>
@ -343,11 +342,11 @@
<StackPanel Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" >
<TextBlock Text="输入压力" FontSize="18" Foreground="White"/>
</StackPanel>
<WrapPanel Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding PolInputPressure2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White" />
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding IsoInputPressure2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -356,11 +355,11 @@
<WrapPanel Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="输出压力" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding PolOutputPressure2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding IsoOutputPressure2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -368,11 +367,11 @@
<WrapPanel Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="流量" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding PolFlow2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="g/s" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding IsoFlow2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="g/s" FontSize="18" Foreground="White" />
</WrapPanel>
@ -380,11 +379,11 @@
<WrapPanel Grid.Column="0" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="温度" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding PoleTmperature2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="℃" FontSize="18" Foreground="White" />
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding IsoTemperature2}" FontSize="18" Margin="0 0 18 0" Foreground="Black"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -392,11 +391,11 @@
<WrapPanel Grid.Column="0" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="料位" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding PolMaterialLevel2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="%" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding IsoMaterialLevel2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="%" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -407,7 +406,7 @@
<WrapPanel Grid.Column="0" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="压力" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="7" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding Pressure2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -415,7 +414,7 @@
<WrapPanel Grid.Column="0" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="温度" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="8" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding Temperature2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -432,10 +431,10 @@
<WrapPanel Grid.Column="0" Grid.Row="10" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="状态" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="10" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding Status2}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="50"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="10" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="10" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10 0 0 0">
<TextBlock Text="{Binding Status22}" FontSize="18" Margin="0 0 18 0" Foreground="White" Width="50"/>
</WrapPanel>
@ -446,11 +445,11 @@
<WrapPanel Grid.Column="0" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="POL压力" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLPressure2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="11" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLPressure22}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -458,11 +457,11 @@
<WrapPanel Grid.Column="0" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="POL温度" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLTemperature2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="12" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding POLTemperature22}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -470,11 +469,11 @@
<WrapPanel Grid.Column="0" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="ISO压力" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOPressure2}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="13" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOPressure22}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="MPa" FontSize="18" Foreground="White"/>
</WrapPanel>
@ -482,11 +481,11 @@
<WrapPanel Grid.Column="0" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="ISO温度" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="1" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="1" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOTemperature22}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>
<WrapPanel Grid.Column="2" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Center">
<WrapPanel Grid.Column="2" Grid.Row="14" VerticalAlignment="Center" HorizontalAlignment="Left">
<TextBlock Text="{Binding ISOTemperature222}" FontSize="18" Margin="0 0 18 0" Foreground="Black" Width="50"/>
<TextBlock Text="℃" FontSize="18" Foreground="White"/>
</WrapPanel>

@ -72,7 +72,7 @@
<RowDefinition Height="12*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
<!--<TextBlock Text="泡后库实时库存" FontSize="18" FontWeight="Bold" Foreground="White"/>-->
<TextBlock Text="泡后库实时库存" FontSize="18" FontWeight="Bold" Foreground="White"/>
</StackPanel>
<Border Grid.Row="1">
<Grid>
@ -95,7 +95,7 @@
<!--控件模板-->
<ItemsControl.ItemTemplate>
<DataTemplate>
<Control x:Name="ctrl" Width="900" Height="200" ></Control>
<Control x:Name="ctrl" Width="450" Height="200" ></Control>
<DataTemplate.Triggers>
<!--根据不同类型选择不同模板-->
<DataTrigger Binding="{Binding spaceType}" Value="1">

@ -67,11 +67,11 @@
<Grid Margin="5,5">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="12*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="泡前库实时库存" FontSize="18" FontWeight="Bold" Foreground="White"/>
<!--<TextBlock Text="泡前库实时库存" FontSize="18" FontWeight="Bold" Foreground="White"/>-->
</StackPanel>
<Border Grid.Row="1">
<Grid>
@ -94,7 +94,7 @@
<!--控件模板-->
<ItemsControl.ItemTemplate>
<DataTemplate>
<Control x:Name="ctrl" Width="450" Height="200" ></Control>
<Control x:Name="ctrl" Width="900" Height="200" ></Control>
<DataTemplate.Triggers>
<!--根据不同类型选择不同模板-->
<DataTrigger Binding="{Binding spaceType}" Value="1">

@ -173,34 +173,24 @@
<TextBlock Text="状态" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Column="1" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.UpdateInStoreFlagCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding spaceCode}" Style="{StaticResource BUTTON_AGREE}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<TextBlock Text="入库" Foreground="{Binding inStoreFlag,Converter={StaticResource StatusLabelConverter}}" FontSize="18" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Button>
</Border>
<Border Grid.Column="2" BorderBrush="White" BorderThickness="1">
</Border>
<Border Grid.Column="3" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.UpdateUnusualFlagCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding spaceCode}" Style="{StaticResource BUTTON_AGREE}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<TextBlock Text="异常" Foreground="{Binding unusualFlag,Converter={StaticResource StatusLabelConverter}}" FontSize="18" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Button>
</Border>
<Border Grid.Column="4" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.UpdateSpaceStatusCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding spaceCode}" Style="{StaticResource BUTTON_AGREE}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<TextBlock Text="禁用" Foreground="{Binding spaceStatus,Converter={StaticResource StatusLabelConverter}}" FontSize="18" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Button>
</Border>
<Border Grid.Column="5" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.SpaceDetailCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding spaceCode}" Style="{StaticResource BUTTON_AGREE}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<TextBlock Text="明细" FontSize="18" Foreground="Green" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Button>
</Border>
<Border Grid.Column="6" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.OutOnlyOneCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding spaceCode}" Style="{StaticResource BUTTON_AGREE}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<TextBlock Text="出一个" Foreground="Green" FontSize="17" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Button>
</Border>
</Grid>
</Border>
@ -210,13 +200,11 @@
</Setter.Value>
</Setter>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Border>
<Border Grid.Column="1" BorderBrush="#0288d1" BorderThickness="1" Margin="5">
@ -225,13 +213,14 @@
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="13*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="货道明细" Foreground="#FFFFFF" FontSize="15"/>
</StackPanel>
<DataGrid Grid.Row="1" ItemsSource="{Binding SpaceDetailDataGrid}" Background="Transparent"
FontSize="15" ColumnHeaderHeight="35"
RowHeight="31" AutoGenerateColumns="False" RowHeaderWidth="0"

@ -1,4 +1,5 @@
using System;
using Aucma.Core.BoxFoam.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -23,6 +24,7 @@ namespace Aucma.Core.BoxFoam.Views.UserPage
public LinerInventory()
{
InitializeComponent();
this.DataContext = new LinerInventoryViewModel();
}
}
}

@ -4,9 +4,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Aucma.Core.BoxFoam.Views.UserPage"
mc:Ignorable="d" FontFamily="Microsoft YaHei"
d:DesignHeight="450" d:DesignWidth="800">
mc:Ignorable="d" Background="#1152AC" FontFamily="Microsoft YaHei"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
@ -67,11 +67,11 @@
<Grid Margin="5,5">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="12*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="箱壳库实时库存" FontSize="18" FontWeight="Bold" Foreground="White"/>
<!--<TextBlock Text="内胆库实时库存" FontSize="18" FontWeight="Bold" Foreground="White"/>-->
</StackPanel>
<Border Grid.Row="1">
<Grid>
@ -179,9 +179,6 @@
</Border>
<Border Grid.Column="2" BorderBrush="White" BorderThickness="1">
<Button Command="{Binding DataContext.UpdateOutStoreFlagCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}" CommandParameter="{Binding spaceCode}" Style="{StaticResource BUTTON_AGREE}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent">
<TextBlock Text="出库" Foreground="{Binding outStoreFlag,Converter={StaticResource StatusLabelConverter}}" FontSize="18" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Button>
</Border>
<Border Grid.Column="3" BorderBrush="White" BorderThickness="1">
@ -228,13 +225,14 @@
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="13*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="货道明细" Foreground="#FFFFFF" FontSize="15"/>
</StackPanel>
<DataGrid Grid.Row="1" ItemsSource="{Binding SpaceDetailDataGrid}" Background="Transparent"
FontSize="15" ColumnHeaderHeight="35"
RowHeight="31" AutoGenerateColumns="False" RowHeaderWidth="0"

@ -164,6 +164,8 @@
],
"StoreInfo": {
"StationCode": "1001",
"LinerInventory": "NDJCK-001",
"ShellInventory": "XKJCK-001",
"BeforeStoreCode": "PBSCK-001",
"AfterStoreCode": "FPJCK-001"
},

@ -22,9 +22,11 @@ namespace Aucma.Core.DoorFoam.ViewModels
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(IndexPageViewModel));
private ObservableCollection<dynamic> listItems = new ObservableCollection<dynamic>();
private readonly IDoorFoamRecordServices? _doorFoamRecordServices;
public IndexPageViewModel()
{
_doorFoamRecordServices = App.ServiceProvider.GetService<IDoorFoamRecordServices>();
//var state = _doorFoamRecordServices.GetConnectionState();
StationName = "门体发泡";
MaterialName = "SC-AUCMA-农夫山泉SC 门体";
OrderNo = "8512365486";

@ -33,6 +33,8 @@ namespace Aucma.Core.DoorFoam.ViewModels
DateTime endTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
var list=await _doorFoamRecordServices.QueryAsync(d=>d.BeginTime>= startTime&&d.EndTime<= endTime);
if (list == null) return;
foreach (var item in list)
{
DoorDataGrid.Add(new DoorFoamRecordModel()

@ -11,10 +11,66 @@
<UserControl.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="20"/>
</Style>
<Style x:Key="ColumnHeaderStyle" TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="#dddddd"/>
<Style TargetType="DataGrid">
<!--网格线颜色-->
<Setter Property="CanUserResizeColumns" Value="false"/>
<Setter Property="Background" Value="#1152AC" />
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="HorizontalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#4285DE"/>
</Setter.Value>
</Setter>
<Setter Property="VerticalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#1152AC"/>
</Setter.Value>
</Setter>
</Style>
<!--列头标题栏样式-->
<Style TargetType="DataGridColumnHeader">
<!--<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>-->
<!--<Setter Property="Background" Value="#dddddd"/>
<Setter Property="Foreground" Value="Black"/>-->
<!--<Setter Property="BorderThickness" Value="1" />-->
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontFamily" Value="Microsoft YaHei"/>
</Style>
<!--单元格样式-->
<Style TargetType="DataGridCell">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}" >
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
<DataTrigger Binding="{Binding ExecuteStatus}" Value="2">
<Setter Property="Background" Value="Green" />
</DataTrigger>
</Style.Triggers>
</Style>
</UserControl.Resources>
<Grid Margin="0 15 0 0">
@ -35,7 +91,7 @@
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="#1157b9" Margin="1,1,3,5" >
<TextBlock Text="发泡信息" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="实时监控" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<!--扫描信息-->
@ -52,32 +108,7 @@
<Border Grid.Column="1" BorderThickness="0" Background="Transparent" CornerRadius="5" Margin="0,10,0,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" >
<TextBlock Text="工位名称" FontSize="15" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0 0 30 0"/>
<TextBox FontSize="15" Text="{Binding StationName}" Foreground="White" BorderBrush="White" Width="300" IsReadOnly="True" Margin="0 0 10 0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" >
<TextBlock Text="订单编码" FontSize="15" Foreground="White" HorizontalAlignment="Left"/>
<TextBox FontSize="15" Text="{Binding OrderNo}" Foreground="White" BorderBrush="White" Width="300" IsReadOnly="True" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" >
<TextBlock Text="产品型号" FontSize="15" Foreground="White"/>
<TextBox FontSize="15" Text="{Binding MaterialName}" Foreground="White" BorderBrush="White" Width="300" IsReadOnly="True" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Row="3" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" >
<TextBlock Text="开始时间" FontSize="15" Foreground="White"/>
<TextBox FontSize="15" Text="{Binding BeginTime}" Foreground="White" BorderBrush="White" Width="300" IsReadOnly="True" Margin="30,0,0,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
</Grid>
@ -85,7 +116,7 @@
</Grid>
</Border>
<!--日志信息-->
<!--箱体队列-->
<Border Grid.Row="0" Grid.Column="1" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="#1157b9" Margin="3,1,3,5">
<Grid>
<Grid.RowDefinitions>
@ -93,30 +124,25 @@
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,1,5" >
<TextBlock Text="小时产量" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock Text="箱体队列" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<!--小时产量-->
<Border x:Name="HeightHelperPanel" Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="25,1,5,5">
<lvc:CartesianChart Series="{Binding Achievement, UpdateSourceTrigger=PropertyChanged}">
<lvc:CartesianChart.AxisX>
<lvc:Axis Labels="{Binding ProductionHourList}" FontSize="15">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1.5" StrokeDashArray="0" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisX>
<lvc:CartesianChart.AxisY>
<lvc:Axis FontSize="15">
<lvc:Axis.Separator>
<lvc:Separator Visibility="Hidden" StrokeThickness="1" StrokeDashArray="3" Stroke="#404F56" >
</lvc:Separator>
</lvc:Axis.Separator>
</lvc:Axis>
</lvc:CartesianChart.AxisY>
</lvc:CartesianChart>
<Border x:Name="HeightHelperPanel" Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" >
<DataGrid Grid.Row="0" ItemsSource="{Binding PlanInfoDataGrid}" Background="#00000000"
ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" FontSize="20"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White">
<!--修改选中字体颜色-->
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="编号" Width="auto" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding PlanCode}" Header="计划编号" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="物料编码" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn Binding="{Binding MaterialName}" Header="物料名称" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
</DataGrid.Columns>
</DataGrid>
</Border>
</Grid>
</Border>

@ -67,8 +67,9 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" Height="50" Orientation="Horizontal" Margin="5 0" HorizontalAlignment="Left">
<Button Content="实时监控" x:Name="FirstPage" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FirstPage}" Margin="5 0" />
<Button Content="发泡记录" x:Name="RecordPage" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=RecordPage}" />
<Button Content="发泡线监控" x:Name="FoamLinePage" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FoamLinePage}" Margin="5 0" />
<Button Content="发泡机监控" x:Name="FoamMachinesPage" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FoamMachinesPage}" />
<Button Content="生产统计" x:Name="FirstPage" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=RecordPage}" />
<Button Content="键 盘" x:Name="TabTip" Margin="5 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TabTip}" />
<Button Content="最小化" x:Name="Minimized" Margin="5 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Width="100" Background="#FF9900" BorderBrush="#FF9900" />
<Button Content="退 出" x:Name="Exit" Margin="5 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Width="100" Background="#FF0033" BorderBrush="#FF0033" />

@ -32,14 +32,15 @@ namespace Aucma.Core.PrintTo.ViewModels
PrintIsEnabled = "True";
WeakReferenceMessenger.Default.Register<string>(this, Recive);
//Task.WaitAll(LoadData());
Task.WaitAll(LoadData());
}
#region 加载DataGrid数据
private async Task LoadData()
{
Datalist.Clear();
var list = await _baseOrderInfoServices.QueryPrintInfo();
List<PrintPlanInfoView> list = await _baseOrderInfoServices.QueryPrintInfo();
if (list == null) return;
foreach (var item in list)
{
Datalist.Add(new OrderInfo()

Loading…
Cancel
Save