Compare commits
10 Commits
6abe7bf5c6
...
a798b3fb8e
Author | SHA1 | Date |
---|---|---|
|
a798b3fb8e | 2 months ago |
|
859d097977 | 6 months ago |
|
9dff42b945 | 6 months ago |
|
9f8c3344df | 8 months ago |
|
9ee4f9dff8 | 8 months ago |
|
c0d65301a7 | 8 months ago |
|
63540f27e8 | 8 months ago |
|
d46e20ede0 | 9 months ago |
|
750eb80fa8 | 9 months ago |
|
38ed1f0a4d | 9 months ago |
@ -0,0 +1,43 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="appsettings.json" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="appsettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SlnMesnac.Business\SlnMesnac.Business.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Common\SlnMesnac.Common.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Config\SlnMesnac.Config.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Extensions\SlnMesnac.Extensions.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Generate\SlnMesnac.Generate.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Ioc\SlnMesnac.Ioc.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Model\SlnMesnac.Model.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Mqtt\SlnMesnac.Mqtt.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Plc\SlnMesnac.Plc.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Quartz\SlnMesnac.Quartz.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Redis\SlnMesnac.Redis.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Repository\SlnMesnac.Repository.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Rfid\SlnMesnac.Rfid.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.Serilog\SlnMesnac.Serilog.csproj" />
|
||||
<ProjectReference Include="..\SlnMesnac.TouchSocket\SlnMesnac.TouchSocket.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -0,0 +1,89 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"AppConfig": {
|
||||
"logPath": "F:\\Mesnac\\2023部门项目\\奥特佳-滁州3期\\源码\\HightWay_Middle_Ware\\ConsoleApp\\bin\\Debug\\net6.0\\log",
|
||||
"SqlConfig": [
|
||||
{
|
||||
"configId": "mes",
|
||||
"dbType": 1,
|
||||
"connStr": "server=192.168.1.120;uid=sa;pwd=123456;database=ATJ_581_DB"
|
||||
},
|
||||
//{
|
||||
// "configId": "mcs",
|
||||
// "dbType": 3,
|
||||
// "connStr": "Data Source=175.27.215.92/helowin;User ID=aucma_scada;Password=aucma"
|
||||
//},
|
||||
{
|
||||
"configId": "Local",
|
||||
"dbType": 2,
|
||||
"connStr": "Data Source=F:\\Mesnac\\2023部门项目\\奥特佳-滁州3期\\源码\\HightWay_Middle_Ware\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows\\data\\LSHData.db3"
|
||||
}
|
||||
],
|
||||
"PlcConfig": [
|
||||
{
|
||||
"configId": 1,
|
||||
"plcType": "MelsecBinaryPlc",
|
||||
"plcIp": "127.0.0.1",
|
||||
"plcPort": 6000,
|
||||
"plcKey": "mcs",
|
||||
"isFlage": true
|
||||
},
|
||||
{
|
||||
"configId": 2,
|
||||
"plcType": "MelsecBinaryPlc",
|
||||
"plcIp": "127.0.0.1",
|
||||
"plcPort": 6001,
|
||||
"plcKey": "cwss",
|
||||
"isFlage": true
|
||||
}
|
||||
],
|
||||
"RfidConfig": [
|
||||
{
|
||||
"configId": 1,
|
||||
"equipIp": "127.0.0.1",
|
||||
"equipPort": 6003,
|
||||
"equipKey": "test1",
|
||||
"isFlage": true
|
||||
},
|
||||
{
|
||||
"configId": 2,
|
||||
"equipIp": "127.0.0.1",
|
||||
"equipPort": 6004,
|
||||
"equipKey": "test2",
|
||||
"isFlage": true
|
||||
}
|
||||
],
|
||||
"visionConfig": [
|
||||
{
|
||||
"VisionId": 1,
|
||||
"VisionIp": "127.0.0.1",
|
||||
"VisionPort": 7001,
|
||||
"AGVID": "1",
|
||||
"VisionState": "1",
|
||||
"IsFlag": true
|
||||
},
|
||||
{
|
||||
"VisionId": 2,
|
||||
"VisionIp": "127.0.0.1",
|
||||
"VisionPort": 7002,
|
||||
"AGVID": "2",
|
||||
"VisionState": "1",
|
||||
"IsFlag": true
|
||||
}
|
||||
],
|
||||
"AMRIP": "127.0.0.1",
|
||||
|
||||
|
||||
"redisConfig": "175.27.215.92:6379,password=redis@2023",
|
||||
"AGVIpConfig": "http://192.168.40.81:5102",
|
||||
"TCPVisionConfig": "127.0.0.1:6000"
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface Idata1_TableService: IBaseService<data1_Table>
|
||||
{
|
||||
Task<List<data1_Table>> Getdata1TableListAsync();
|
||||
|
||||
Task<bool> UpdateAsync(data1_Table record);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface Idata2_TableService: IBaseService<data2_Table>
|
||||
{
|
||||
Task<List<data2_Table>> Getdata2TableListAsync(DateTime start,DateTime end);
|
||||
Task<bool> UpdateAsync(data2_Table record);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface Idata3_TableService: IBaseService<data3_Table>
|
||||
{
|
||||
Task<List<data3_Table>> GetTableListAsync(DateTime start, DateTime end);
|
||||
|
||||
Task<bool> UpdateAsync(data3_Table record);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface Idata4_TableService: IBaseService<data4_Table>
|
||||
{
|
||||
Task<List<data4_Table>> GetTableListAsync(DateTime start, DateTime end);
|
||||
|
||||
Task<bool> UpdateAsync(data4_Table record);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using ATC_MaterialBind.Entity;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface IStationQualityInfoService : IBaseService<StationQualityInfo>
|
||||
{
|
||||
Task<List<StationQualityInfo>> GetProductQuality(string P_Bar_Code, string P_StationCode);
|
||||
string GetNewMainBarcode();
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface Isys_dict_dataService: IBaseService<sys_dict_data>
|
||||
{
|
||||
Task<List<sys_dict_data>> GetProductType();
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface IT_RP_InventoryConsume_RecordService: IBaseService<T_RP_InventoryConsume_Record>
|
||||
{
|
||||
Task<bool> InsertAsync(T_RP_InventoryConsume_Record record);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface IT_RP_ProductChangeInfoService: IBaseService<T_RP_ProductChangeInfo>
|
||||
{
|
||||
T_RP_ProductChangeInfo GetProductType();
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface IT_RP_StationPara_110_1Service: IBaseService<T_RP_StationPara_110_1>
|
||||
{
|
||||
Task<bool> AddTaskAsync(List<T_RP_StationPara_110_1> record);
|
||||
Task<T_RP_StationPara_110_1> GetResultAsync(string jpcode, string dpcode);
|
||||
Task<bool> UpdateResultAsync(T_RP_StationPara_110_1 t_RP_StationPara_110_1);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface IT_RP_StationPara_110_2Service: IBaseService<T_RP_StationPara_110_2>
|
||||
{
|
||||
Task<bool> AddTaskAsync(T_RP_StationPara_110_2 record);
|
||||
Task<T_RP_StationPara_110_2> GetResultAsync(string record);
|
||||
Task<bool> UpdateResultAsync(T_RP_StationPara_110_2 t_RP_StationPara_110_2);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface IT_RP_StationPara_130Service: IBaseService<T_RP_StationPara_130>
|
||||
{
|
||||
Task<bool> AddTaskAsync(List<T_RP_StationPara_130> record);
|
||||
Task<T_RP_StationPara_130> GetResultAsync(string jpcode );
|
||||
Task<bool> UpdateResultAsync(T_RP_StationPara_130 T_RP_StationPara_130);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface IT_RP_StationPara_160_1Service: IBaseService<T_RP_StationPara_160_1>
|
||||
{
|
||||
Task<bool> AddTaskAsync(List<T_RP_StationPara_160_1> record);
|
||||
Task<T_RP_StationPara_160_1> GetResultAsync(string jpcode);
|
||||
Task<bool> UpdateResultAsync(T_RP_StationPara_160_1 T_RP_StationPara_130);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service
|
||||
{
|
||||
public interface IT_SY_TraceStateService: IBaseService<T_SY_TraceState>
|
||||
{
|
||||
T_SY_TraceState GetByProductCode(string ProductCode);
|
||||
Task<bool> InsertAsync(T_SY_TraceState record);
|
||||
|
||||
Task<bool> UpdateAsync(T_SY_TraceState record);
|
||||
|
||||
T_SY_TraceState GetRelationShipByProductCodeAndIsdis(string ProductCode, string MaterialType, string StationCode);
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Model.Enum;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using SlnMesnac.Common;
|
||||
using static Dm.net.buffer.ByteArrayBuffer;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class data1_TableServiceImpl : BaseServiceImpl<data1_Table>, Idata1_TableService
|
||||
{
|
||||
private Repository<data1_Table> _repository;
|
||||
private ILogger<data1_TableServiceImpl> _logger;
|
||||
public data1_TableServiceImpl(Repository<data1_Table> repository, ILogger<data1_TableServiceImpl> logger) :base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task<List<data1_Table>> Getdata1TableListAsync()
|
||||
{
|
||||
List<data1_Table> list = null;
|
||||
try
|
||||
{
|
||||
Expression<Func<data1_Table, bool>> exp = x => true;
|
||||
exp = exp.And(x =>
|
||||
(x.flag != "F")
|
||||
);
|
||||
list = _repository.GetList(exp);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError($"量仪数据获取错误:{ex.Message}");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
public async Task<bool> UpdateAsync(data1_Table record)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _rep.UpdateAsync(record);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError($"量仪数据获取错误:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Common;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class data2_TableServiceImpl : BaseServiceImpl<data2_Table>, Idata2_TableService
|
||||
{
|
||||
private Repository<data2_Table> _repository2;
|
||||
private ILogger<data2_TableServiceImpl> _logger;
|
||||
public data2_TableServiceImpl(Repository<data2_Table> repository, ILogger<data2_TableServiceImpl> logger) :base(repository)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository2 = repository;
|
||||
}
|
||||
public async Task<bool> UpdateAsync(data2_Table record)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _rep.UpdateAsync(record);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError($"量仪数据获取错误:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
public async Task<List<data2_Table>> Getdata2TableListAsync(DateTime start, DateTime end)
|
||||
{
|
||||
List<data2_Table> list = null;
|
||||
try
|
||||
{
|
||||
Expression<Func<data2_Table, bool>> exp = x => true;
|
||||
exp = exp.And(x =>
|
||||
(x.flag != "F" && x.time >= start && x.time < end)
|
||||
);
|
||||
list = _repository2.GetList(exp);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError($"量仪数据获取错误:{ex.Message}");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Common;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class data3_TableServiceImpl : BaseServiceImpl<data3_Table>, Idata3_TableService
|
||||
{
|
||||
private Repository<data3_Table> _repository;
|
||||
private ILogger<data3_TableServiceImpl> _logger;
|
||||
public data3_TableServiceImpl(Repository<data3_Table> repository, ILogger<data3_TableServiceImpl> logger) :base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
_logger = logger;
|
||||
}
|
||||
public async Task<List<data3_Table>> GetTableListAsync(DateTime start,DateTime end)
|
||||
{
|
||||
List<data3_Table> list = null;
|
||||
try
|
||||
{
|
||||
Expression<Func<data3_Table, bool>> exp = x => true;
|
||||
exp = exp.And(x =>
|
||||
(x.flag != "F" && x.time >= start && x.time < end)
|
||||
);
|
||||
list = _repository.GetList(exp);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError($"量仪数据获取错误:{ex.Message}");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
public async Task<bool> UpdateAsync(data3_Table record)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _rep.UpdateAsync(record);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError($"量仪数据获取错误:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Common;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class data4_TableServiceImpl : BaseServiceImpl<data4_Table>, Idata4_TableService
|
||||
{
|
||||
private Repository<data4_Table> _repository;
|
||||
private ILogger<data4_TableServiceImpl> _logger;
|
||||
public data4_TableServiceImpl(Repository<data4_Table> repository, ILogger<data4_TableServiceImpl> logger) :base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task<List<data4_Table>> GetTableListAsync(DateTime start ,DateTime end)
|
||||
{
|
||||
List<data4_Table> list = null;
|
||||
try
|
||||
{
|
||||
Expression<Func<data4_Table, bool>> exp = x => true;
|
||||
exp = exp.And(x =>
|
||||
(x.flag != "F" && x.time >= start && x.time < end)
|
||||
);
|
||||
list = _repository.GetList(exp);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError($"量仪数据获取错误:{ex.Message}");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
public async Task<bool> UpdateAsync(data4_Table record)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _rep.UpdateAsync(record);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError($"量仪数据获取错误:{ex.Message}");
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
using ATC_MaterialBind.Entity;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class StationQualityInfoServiceImpl : BaseServiceImpl<StationQualityInfo>, IStationQualityInfoService
|
||||
{
|
||||
private Repository<StationQualityInfo> _repository;
|
||||
public StationQualityInfoServiceImpl(Repository<StationQualityInfo> repository ):base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
}
|
||||
|
||||
public async Task<List<StationQualityInfo>> GetProductQuality(string P_Bar_Code, string P_StationCode)
|
||||
{
|
||||
List<StationQualityInfo> stationQualityList = null;
|
||||
try
|
||||
{
|
||||
var parameter1 = new SugarParameter("@BarCode", P_Bar_Code);
|
||||
var parameter2 = new SugarParameter("@StationCode", P_StationCode);//ÉèÖÃΪoutput
|
||||
stationQualityList = _repository.Context.Ado.UseStoredProcedure().SqlQuery<StationQualityInfo>("pro_AllProductionQualityInfo", parameter1, parameter2);
|
||||
return stationQualityList;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return stationQualityList;
|
||||
}
|
||||
}
|
||||
public string GetNewMainBarcode()
|
||||
{
|
||||
try
|
||||
{
|
||||
var parameter1 = new SugarParameter("@Head", "M");
|
||||
var dt = _rep.Context.Ado.UseStoredProcedure().GetString("SP_Pro_GetNewMainBarcode", parameter1);
|
||||
return dt;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
using ATC_MaterialBind.Entity;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class sys_dict_dataServiceImpl : BaseServiceImpl<sys_dict_data>, Isys_dict_dataService
|
||||
{
|
||||
public sys_dict_dataServiceImpl(Repository<sys_dict_data> repository):base(repository)
|
||||
{
|
||||
}
|
||||
public async Task<List<sys_dict_data>> GetProductType()
|
||||
{
|
||||
List<sys_dict_data> ProductTypeList = null;
|
||||
try
|
||||
{
|
||||
ProductTypeList = _rep.GetList(x=>x.dictType == "productType");
|
||||
return ProductTypeList;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ProductTypeList;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class T_RP_InventoryConsume_RecordServiceImpl : BaseServiceImpl<T_RP_InventoryConsume_Record>, IT_RP_InventoryConsume_RecordService
|
||||
{
|
||||
public T_RP_InventoryConsume_RecordServiceImpl(Repository<T_RP_InventoryConsume_Record> repository):base(repository)
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<bool> InsertAsync(T_RP_InventoryConsume_Record record)
|
||||
{
|
||||
bool result = await _rep.InsertAsync(record);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class T_RP_ProductChangeInfoServiceImpl : BaseServiceImpl<T_RP_ProductChangeInfo>, IT_RP_ProductChangeInfoService
|
||||
{
|
||||
public T_RP_ProductChangeInfoServiceImpl(Repository<T_RP_ProductChangeInfo> repository):base(repository)
|
||||
{
|
||||
|
||||
}
|
||||
public T_RP_ProductChangeInfo GetProductType()
|
||||
{
|
||||
try
|
||||
{
|
||||
T_RP_ProductChangeInfo t_RP_Product = null;
|
||||
t_RP_Product = _rep.GetFirst(x => x.id == 1);
|
||||
return t_RP_Product;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class T_RP_StationMaterialInventoryServiceImpl : BaseServiceImpl<T_RP_StationMaterialInventory>, IT_RP_StationMaterialInventoryService
|
||||
{
|
||||
public T_RP_StationMaterialInventoryServiceImpl(Repository<T_RP_StationMaterialInventory> repository):base(repository)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public T_RP_StationMaterialInventory GetBatchNoByMaterialTypeID(string material_type_id, int stationid)
|
||||
{
|
||||
T_RP_StationMaterialInventory t_RP_StationMaterialInventory = null;
|
||||
string sql = "";
|
||||
try
|
||||
{
|
||||
sql = "select objid,stationid,material_type_id, batchno ,inputcount,create_time from T_RP_StationMaterialInventory where material_type_id = '" + material_type_id + "' and inputcount > 0 and stationid = " + stationid+" order by create_time asc";
|
||||
t_RP_StationMaterialInventory = base._rep.AsTenant().GetConnection("mes").Ado.SqlQuerySingle<T_RP_StationMaterialInventory>(sql);
|
||||
return t_RP_StationMaterialInventory;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return t_RP_StationMaterialInventory;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public List<T_RP_StationMaterialInventory> GetMaterialShip(int stationid)
|
||||
{
|
||||
List<T_RP_StationMaterialInventory> MaterialShipInfos = null;
|
||||
try
|
||||
{
|
||||
String sql = "select t2.material_type_id,t3.working_procedure_id as remark from (select material_type_id from( select material_type_id from T_RP_StationMaterialInventory where stationid = " + stationid +") t1 group by material_type_id) t2 left join base_materialtype_info t3 on t2.material_type_id = t3.material_type_id ";
|
||||
MaterialShipInfos = base._rep.AsTenant().GetConnection("mes").Ado.SqlQuery<T_RP_StationMaterialInventory>(sql);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//_logger.LogError($"»ñÈ¡AGVÈÎÎñÐÅÏ¢Òì³£:{ex.Message}");
|
||||
}
|
||||
return MaterialShipInfos;
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateAsync(T_RP_StationMaterialInventory record)
|
||||
{
|
||||
bool result = await _rep.UpdateAsync(record);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Common;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class T_RP_StationPara_110_1ServiceImpl : BaseServiceImpl<T_RP_StationPara_110_1>, IT_RP_StationPara_110_1Service
|
||||
{
|
||||
private Repository<T_RP_StationPara_110_1> _repository;
|
||||
private ILogger<T_RP_StationPara_110_1ServiceImpl> _logger;
|
||||
public T_RP_StationPara_110_1ServiceImpl(Repository<T_RP_StationPara_110_1> repository, ILogger<T_RP_StationPara_110_1ServiceImpl> logger) :base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task<bool> AddTaskAsync(List<T_RP_StationPara_110_1> record)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _repository.InsertRangeAsync(record);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
public async Task<T_RP_StationPara_110_1> GetResultAsync(string jpcode,string dpcode)
|
||||
{
|
||||
try
|
||||
{
|
||||
Expression<Func<T_RP_StationPara_110_1, bool>> exp = x => true;
|
||||
exp = exp.And(x =>
|
||||
(x.scanbarcode == jpcode && x.semibarcode == dpcode)
|
||||
);
|
||||
var result = await _repository.GetFirstAsync(exp);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateResultAsync(T_RP_StationPara_110_1 t_RP_StationPara_110_1)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _repository.UpdateAsync(t_RP_StationPara_110_1);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Common;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class T_RP_StationPara_110_2ServiceImpl : BaseServiceImpl<T_RP_StationPara_110_2>, IT_RP_StationPara_110_2Service
|
||||
{
|
||||
private Repository<T_RP_StationPara_110_2> _repository;
|
||||
private ILogger<T_RP_StationPara_110_2ServiceImpl> _logger;
|
||||
public T_RP_StationPara_110_2ServiceImpl(Repository<T_RP_StationPara_110_2> repository, ILogger<T_RP_StationPara_110_2ServiceImpl> logger) :base(repository)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
}
|
||||
public async Task<bool> AddTaskAsync(T_RP_StationPara_110_2 record)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _repository.InsertAsync(record);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
public async Task<T_RP_StationPara_110_2> GetResultAsync(string record)
|
||||
{
|
||||
try
|
||||
{
|
||||
Expression<Func<T_RP_StationPara_110_2, bool>> exp = x => true;
|
||||
exp = exp.And(x =>
|
||||
(x.scanbarcode == record)
|
||||
);
|
||||
var result = await _repository.GetFirstAsync(exp);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateResultAsync(T_RP_StationPara_110_2 t_RP_StationPara_110_2)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _repository.UpdateAsync(t_RP_StationPara_110_2);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Common;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
|
||||
public class T_RP_StationPara_130ServiceImpl : BaseServiceImpl<T_RP_StationPara_130>, IT_RP_StationPara_130Service
|
||||
{
|
||||
private Repository<T_RP_StationPara_130> _repository;
|
||||
private ILogger<T_RP_StationPara_130ServiceImpl> _logger;
|
||||
public T_RP_StationPara_130ServiceImpl(Repository<T_RP_StationPara_130> repository, ILogger<T_RP_StationPara_130ServiceImpl> logger) :base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
|
||||
public async Task<bool> AddTaskAsync(List<T_RP_StationPara_130> record)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _repository.InsertRangeAsync(record);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
public async Task<T_RP_StationPara_130> GetResultAsync(string jpcode)
|
||||
{
|
||||
try
|
||||
{
|
||||
Expression<Func<T_RP_StationPara_130, bool>> exp = x => true;
|
||||
exp = exp.And(x =>
|
||||
(x.scanbarcode == jpcode)
|
||||
);
|
||||
var result = await _repository.GetFirstAsync(exp);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateResultAsync(T_RP_StationPara_130 t_RP_StationPara_110_1)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _repository.UpdateAsync(t_RP_StationPara_110_1);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SlnMesnac.Common;
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class T_RP_StationPara_160_1ServiceImpl : BaseServiceImpl<T_RP_StationPara_160_1>, IT_RP_StationPara_160_1Service
|
||||
{
|
||||
private Repository<T_RP_StationPara_160_1> _repository;
|
||||
private ILogger<T_RP_StationPara_160_1ServiceImpl> _logger;
|
||||
public T_RP_StationPara_160_1ServiceImpl(Repository<T_RP_StationPara_160_1> repository, ILogger<T_RP_StationPara_160_1ServiceImpl> logger) :base(repository)
|
||||
{
|
||||
_repository = repository;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task<bool> AddTaskAsync(List<T_RP_StationPara_160_1> record)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _repository.InsertRangeAsync(record);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
public async Task<T_RP_StationPara_160_1> GetResultAsync(string jpcode)
|
||||
{
|
||||
try
|
||||
{
|
||||
Expression<Func<T_RP_StationPara_160_1, bool>> exp = x => true;
|
||||
exp = exp.And(x =>
|
||||
(x.scanbarcode == jpcode)
|
||||
);
|
||||
var result = await _repository.GetFirstAsync(exp);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> UpdateResultAsync(T_RP_StationPara_160_1 t_RP_StationPara_110_1)
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result = await _repository.UpdateAsync(t_RP_StationPara_110_1);
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
using SlnMesnac.Model.domain;
|
||||
using SlnMesnac.Repository.service.@base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SlnMesnac.Repository.service.Impl
|
||||
{
|
||||
public class T_SY_TraceStateServiceImpl : BaseServiceImpl<T_SY_TraceState>, IT_SY_TraceStateService
|
||||
{
|
||||
public T_SY_TraceStateServiceImpl(Repository<T_SY_TraceState> repository):base(repository)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据条码查询实体
|
||||
/// </summary>
|
||||
/// <param name="ProductCode"></param>
|
||||
/// <returns></returns>
|
||||
public T_SY_TraceState GetByProductCode(string ProductCode)
|
||||
{
|
||||
T_SY_TraceState traceState = null;
|
||||
traceState = _rep.GetFirst(x => x.productbarcode == ProductCode);
|
||||
return traceState;
|
||||
}
|
||||
public T_SY_TraceState GetRelationShipByProductCodeAndIsdis(string ProductCode,string MaterialType,string StationCode)
|
||||
{
|
||||
T_SY_TraceState traceState = null;
|
||||
//控制器
|
||||
if (MaterialType == "0")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.semibarcode2 == ProductCode && x.isdis == "0");
|
||||
}
|
||||
//壳体
|
||||
else if (MaterialType == "1")
|
||||
{
|
||||
if (StationCode == "80_3")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.productbarcode == ProductCode && x.semibarcodeA != null && x.isdis == "0");
|
||||
}
|
||||
else if (StationCode == "120_2")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.productbarcode == ProductCode && x.semibarcodeB != null && x.isdis == "0");
|
||||
}
|
||||
else if (StationCode == "150")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.productbarcode == ProductCode && x.semibarcodeC != null && x.isdis == "0");
|
||||
}
|
||||
else
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.productbarcode == ProductCode && x.semibarcode2 != null && x.isdis == "0");
|
||||
}
|
||||
}
|
||||
//前盖
|
||||
else if (MaterialType == "2")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.semibarcodeA == ProductCode && x.isdis == "0");
|
||||
}
|
||||
//静盘
|
||||
else if (MaterialType == "3")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.semibarcodeB == ProductCode && x.isdis == "0");
|
||||
}
|
||||
//后盖
|
||||
else if (MaterialType == "4")
|
||||
{
|
||||
traceState = _rep.GetFirst(x => x.semibarcodeC == ProductCode && x.isdis == "0");
|
||||
}
|
||||
return traceState;
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="record"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> UpdateAsync(T_SY_TraceState record)
|
||||
{
|
||||
bool result = await _rep.UpdateAsync(record);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增
|
||||
/// </summary>
|
||||
/// <param name="record"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> InsertAsync(T_SY_TraceState record)
|
||||
{
|
||||
bool result = await _rep.InsertAsync(record);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,155 @@
|
||||
<UserControl x:Class="SlnMesnac.WPF.Page.IndexPage.ChangeType"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:SlnMesnac.WPF.Page.IndexPage"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="900" d:DesignWidth="1620" Background="#FF031B3D">
|
||||
<UserControl.Resources>
|
||||
|
||||
<!--<converters:IsCheckedConverter x:Key="IsCheckedConverter"/>-->
|
||||
|
||||
|
||||
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="18"/>
|
||||
</Style>
|
||||
<Style TargetType="DataGrid">
|
||||
<!--网格线颜色-->
|
||||
<Setter Property="CanUserResizeColumns" Value="false"/>
|
||||
<Setter Property="Background" Value="#1152AC" />
|
||||
<Setter Property="BorderBrush" Value="#4285DE" />
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<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="BorderBrush" Value="#dddddd" />
|
||||
<Setter Property="Height" Value="40"/>
|
||||
<Setter Property="FontSize" Value="18"/>
|
||||
<Setter Property="Background" Value="#4285DE"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</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="12"/>
|
||||
<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="#dddddd"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
|
||||
<Border Grid.Row="1" Grid.Column="1" BorderBrush="#0288d1" BorderThickness="2" CornerRadius="5" Background="Transparent" Margin="5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="#1157b9" Margin="1,1,5,5" >
|
||||
<TextBlock Text="型号配置" FontSize="25" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Border>
|
||||
<Border Grid.Row="1" BorderBrush="Green" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1,1,5,5">
|
||||
<Grid Margin="10,5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="4*"/>
|
||||
<RowDefinition Height="4*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="horizontal" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center">
|
||||
<Label Content="组件型号:" FontSize="20" Foreground="White"/>
|
||||
<TextBox Text="{Binding ProductType,Mode=TwoWay}" Width="250" FontSize="20" Foreground="White" Margin="0 0 30 0" />
|
||||
<Label Content="壳体型号:" FontSize="20" Foreground="White"/>
|
||||
<TextBox Text="{Binding KTProductType,Mode=TwoWay}" Width="250" FontSize="20" Foreground="White" Margin="0 0 30 0" />
|
||||
<!--<Button
|
||||
Content="查 询" Command="{Binding QueryCommand}"
|
||||
Style="{StaticResource MaterialDesignRaisedSecondaryDarkButton}" Background="Green" Margin="0 0 100 0"/>
|
||||
<Button
|
||||
Content="同步型号" Command="{Binding SyncCommand}" Margin="40 0 0 0"
|
||||
Style="{StaticResource MaterialDesignRaisedSecondaryDarkButton}" Background="#FF1CC57B"/>-->
|
||||
</StackPanel>
|
||||
<UniformGrid Grid.Row="1">
|
||||
<DataGrid x:Name="listDataGrid" Grid.Row="0" ItemsSource="{Binding ChangeTypePanel}" 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 dictValue}" Header="组件型号编号" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
||||
<DataGridTextColumn Binding="{Binding dictLabel}" Header="组件型号" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
|
||||
<DataGridTemplateColumn Header="操作" Width="1.5*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="切换" Height="40" Width="100" Command="{Binding DataContext.UpdateCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
||||
CommandParameter="{Binding dictLabel}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
|
||||
</UniformGrid>
|
||||
<UniformGrid Grid.Row="2">
|
||||
<DataGrid x:Name="listDataGrid1" Grid.Row="0" ItemsSource="{Binding ChangeTypePanel}" 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 dictValue}" Header="壳体型号编号" Width="2*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
||||
<DataGridTextColumn Binding="{Binding dictLabel}" Header="壳体型号" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
|
||||
<DataGridTemplateColumn Header="操作" Width="1.5*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="切换" Height="40" Width="100" Command="{Binding DataContext.UpdateCommand, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
||||
CommandParameter="{Binding dictLabel}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
|
||||
</UserControl>
|
@ -0,0 +1,198 @@
|
||||
<UserControl x:Class="SlnMesnac.WPF.Page.IndexPage.MaterialBind"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:SlnMesnac.WPF.Page.IndexPage" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:converters="clr-namespace:SlnMesnac.WPF.Converter.Generate"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1080" d:DesignWidth="1920" Background="#FF031B3D">
|
||||
|
||||
<UserControl.Resources>
|
||||
<converters:ConfigToDynamicGridViewConverter x:Key="ConfigToDynamicGridViewConverter"/>
|
||||
<DataTemplate x:Key="LogMsgTemplate">
|
||||
<TextBlock Text="{Binding}" FontSize="20" Foreground="White" TextWrapping="Wrap" MaxWidth="800"/>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="FlightTemplate">
|
||||
<StackPanel Margin="10,0,0,0">
|
||||
<Button Content="{Binding StationName}" Foreground="Black"/>
|
||||
</StackPanel>
|
||||
|
||||
</DataTemplate>
|
||||
</UserControl.Resources>
|
||||
<Grid Margin="1 5 1 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" Grid.Column="0" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="Transparent" Margin="3,1,5,5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="9*"/>
|
||||
</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" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" FontWeight="Bold"/>
|
||||
</Border>
|
||||
<!--扫描信息-->
|
||||
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1,1,3,5">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<Border BorderThickness="0" Background="Transparent" CornerRadius="5" Margin="10,10,0,0" Grid.ColumnSpan="2">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.7*"/>
|
||||
|
||||
<RowDefinition Height="1.7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" >
|
||||
<TextBlock Text="壳体条码" FontSize="22" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0 0 30 0"/>
|
||||
<TextBox FontSize="20" Text="{Binding KTBoxCode,Mode=TwoWay}" BorderBrush="White" Foreground="White" Width="250" IsReadOnly="True" Margin="0 0 10 0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
|
||||
<TextBox FontSize="20" Text="{Binding KTBoxTime,Mode=TwoWay}" BorderBrush="White" Foreground="White" Width="200" IsReadOnly="True" Margin="10 0 0 0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
|
||||
<TextBlock Visibility="{Binding OKIsVis}" Grid.Row="0" Text="OK" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10 0 0 0" FontWeight="Bold" Foreground="LightGreen"></TextBlock>
|
||||
<TextBox FontSize="20" Text="{Binding OKCount,Mode=TwoWay}" BorderBrush="White" Foreground="White" Width="60" IsReadOnly="True" Margin="10 0 0 0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
|
||||
<Button Content="清 空" Command="{Binding ResetCommand}" Background="#FF1CC57B" Width="50" Margin="5 0 0 0"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" >
|
||||
<TextBlock x:Name="tb_MaterialCode" Text="组件条码" FontSize="22" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0 0 30 0"/>
|
||||
<TextBox FontSize="20" Text="{Binding ZJBoxCode,Mode=TwoWay}" BorderBrush="White" Foreground="White" Width="250" IsReadOnly="True" Margin="0 0 10 0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
|
||||
<TextBox FontSize="20" Text="{Binding ZJBoxTime,Mode=TwoWay}" BorderBrush="White" Foreground="White" Width="200" IsReadOnly="True" Margin="10 0 0 0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
|
||||
<TextBlock Visibility="{Binding NGIsVis}" Grid.Row="1" Text="NG" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10 0 0 0" FontWeight="Bold" Foreground="OrangeRed"></TextBlock>
|
||||
<TextBox FontSize="20" Text="{Binding NGCount,Mode=TwoWay}" BorderBrush="White" Foreground="White" Width="60" IsReadOnly="True" Margin="10 0 0 0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<Border Grid.Row="2" BorderBrush="#1254AB" BorderThickness="2" Margin="0,10,0,0">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Text="日志信息" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
|
||||
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
|
||||
<ItemsControl ItemsSource="{Binding LogMessages}" ItemTemplate="{StaticResource LogMsgTemplate}" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!--<StackPanel Grid.Row="2" Grid.RowSpan="2" Margin="0 40 0 0" >
|
||||
|
||||
<TextBlock Text="提示信息:" FontSize="22" Foreground="White"/>
|
||||
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
|
||||
<ItemsControl ItemsSource="{Binding LogMessages}" ItemTemplate="{StaticResource LogMsgTemplate}" />
|
||||
</ScrollViewer>
|
||||
--><!--<TextBox FontSize="18" BorderBrush="White" BorderThickness="1"
|
||||
MinHeight="70" IsReadOnly="True" Foreground="{Binding MsgColor}" Margin="0 5 0 0"
|
||||
AcceptsReturn="True" Text="{Binding Message,Mode=TwoWay}"
|
||||
|
||||
TextWrapping="Wrap"
|
||||
VerticalScrollBarVisibility="Auto" Height="70" />--><!--
|
||||
</StackPanel>-->
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Grid.ColumnSpan="2" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="#FF031B3D" Margin="3,1,3,5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="9*"/>
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
|
||||
<TextBlock Text="扫描记录" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</Border>
|
||||
|
||||
<!--计划列表-->
|
||||
<Border x:Name="ScanPanel" Grid.Row="1" Grid.Column="0" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1,1,5,5">
|
||||
|
||||
|
||||
|
||||
<Grid>
|
||||
<ListView Background="#FF031B3D" Foreground="White" FontSize="18" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}" ItemsSource="{Binding TaskInfoDataGrid}" View="{Binding ColumnConfig,Converter={StaticResource ConfigToDynamicGridViewConverter}}">
|
||||
</ListView>
|
||||
<!--<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<DataGrid x:Name="dg_TaskInfo" Grid.Row="0" ItemsSource="{Binding TaskInfoDataGrid}" Background="#00000000"
|
||||
ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}"
|
||||
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" FontSize="18"
|
||||
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto" LoadingRow="dgv_LoadingRow"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
|
||||
Foreground="White" >
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="55" Header="序号" >
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow}}, Path=Header}" FontSize="18" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"></TextBlock>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Binding="{Binding TaskNo}" Header="任务编号" Width="2*" />
|
||||
<DataGridTextColumn Binding="{Binding KBarCode}" Header="壳体条码" Width="2*" />
|
||||
<DataGridTextColumn Binding="{Binding QBarCode}" Header="前盖条码" Width="2*" />
|
||||
<DataGridTextColumn Binding="{Binding Station1}" Header="前盖轴封" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding Station2}" Header="曲轴压入转子" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding Station3}" Header="曲轴压入前盖" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding Station4}" Header="电机壳压轴承" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding Station5}" Header="前盖轴封检漏" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding Station6}" Header="转子充磁" Width="*" />
|
||||
<DataGridTextColumn Binding="{Binding RecordTime,StringFormat=\{0:yyyy-MM-dd HH:mm:ss\}}" Header="扫描时间" Width="1.7*" />
|
||||
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>-->
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
<!--日志信息-->
|
||||
<Border Grid.Row="0" Grid.Column="1" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="#FF031B3D" Margin="3,1,3,5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<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" >
|
||||
<Grid>
|
||||
<TextBlock Text="工位信息" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="10" Background="Transparent" Margin="5,1,5,5">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel x:Name="stackpanel1">
|
||||
|
||||
</StackPanel>
|
||||
<!--<ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
|
||||
<ItemsControl ItemsSource="{Binding StationQualityInfos}" ItemTemplate="{StaticResource FlightTemplate}"/>
|
||||
</ScrollViewer>-->
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue