取消用户校验

master
zhaoaomin 2 years ago
parent c0b6273a50
commit 23c06a5f17

Binary file not shown.

@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>ih3KkGKpdid9dU5UoQEXXgsZpplgMpRUQ8Tqz1i1/wQ=</dsig:DigestValue>
<dsig:DigestValue>2xT7WSJ3JOGwOwaH5T5VSLO0545A2bhrSpA8Se3jmhE=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

@ -49,7 +49,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>g3bEdlk6z/YhmxjUvrtfWuYKNM4Z225YvrpzH8n8vcI=</dsig:DigestValue>
<dsig:DigestValue>y6yzsU8Eugy+ObfgrPA463CS+Nq1+410yHtpvzJQ8xU=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

@ -14,7 +14,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>ih3KkGKpdid9dU5UoQEXXgsZpplgMpRUQ8Tqz1i1/wQ=</dsig:DigestValue>
<dsig:DigestValue>2xT7WSJ3JOGwOwaH5T5VSLO0545A2bhrSpA8Se3jmhE=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

@ -49,7 +49,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>g3bEdlk6z/YhmxjUvrtfWuYKNM4Z225YvrpzH8n8vcI=</dsig:DigestValue>
<dsig:DigestValue>y6yzsU8Eugy+ObfgrPA463CS+Nq1+410yHtpvzJQ8xU=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>

@ -537,11 +537,11 @@ VALUES
return sqlList;//> 0 ? true : false;
}
public bool ChangeShiftsInfo()
public bool ChangeShiftsInfo(string deviceCode)
{
//
string sql = $@"INSERT INTO [dbo].[mes_changeshift_info] ([id], [shift_code], [change_time], [create_time], [create_by], [last_update], [update_by], [work_date])
VALUES ('{Common.GetUUID()}', '{LoginUser.ShiftCode}', GetDate(), GetDate(), '{LoginUser.UserName}', GetDate(), '{LoginUser.UserName}', '{LoginUser.WorkDate}');";
string sql = $@"INSERT INTO [dbo].[mes_changeshift_info] ([id], [shift_code], [change_time], [create_time], [create_by], [last_update], [update_by], [work_date],[device_code])
VALUES ('{Common.GetUUID()}', '{LoginUser.ShiftCode}', GetDate(), GetDate(), '{LoginUser.UserName}', GetDate(), '{LoginUser.UserName}', '{LoginUser.WorkDate}','{deviceCode}');";
int ret = Utils.netClientDBHelper.executeUpdate(sql);
return ret > 0 ? true : false;
}

@ -261,8 +261,8 @@ namespace XGL.FormItem
byte[] buffer = System.Text.Encoding.ASCII.GetBytes(data);
int timeout = 120;
while (true)
{
//while (true)
//{
PingReply reply = pingSender.Send(ipAddress, timeout, buffer, options);
if (reply.Status != IPStatus.Success)
{
@ -281,7 +281,7 @@ namespace XGL.FormItem
// 可以设定一个间隔时间,然后再次 ping
//System.Threading.Thread.Sleep(5000); // 5 秒
}
//}
}

@ -579,7 +579,7 @@ VALUES
{
if (CustomMessageBox.Show("交接班后产量会计入下一班次,您确定要交接班吗?", CustomMessageBoxButton.OKCancel, CustomMessageBoxIcon.Warning) == CustomMessageBoxResult.OK)
{
formingMachineService.ChangeShiftsInfo();
formingMachineService.ChangeShiftsInfo(deviceCode);
//因为程序多开受限制,先启动一个中间程序,再启动本程序
//设置要启动的应用程序名称和参数
string appName = "RestartApp.exe"; // 替换为你的目标控制台应用程序的名称

@ -243,16 +243,17 @@ namespace XGL.Views
private async void btnStartOrders_Click(object sender, RoutedEventArgs e)
{
CheckUserWin checkUserWin = new CheckUserWin();
checkUserWin.ShowDialog();
if (!checkUserWin.loginFlag)
{
CustomMessageBox.Show("请先校验用户!",CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
//陈恒杰在2024-01-07日与榄菊的苏振华确认不需要用户验证
//CheckUserWin checkUserWin = new CheckUserWin();
//checkUserWin.ShowDialog();
//if (!checkUserWin.loginFlag)
//{
// CustomMessageBox.Show("请先校验用户!",CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
// return;
//}
if (WorkOrder.SelectedItems.Count == 0)
{
CustomMessageBox.Show("请选择要开始的工单!", CustomMessageBoxIcon.Warning);
CustomMessageBox.Show("请选择要开始的工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
string orderID = (WorkOrder.SelectedItem as WetMaterialModel).id;

@ -10,9 +10,9 @@
<!--车间编码-->
<add key="SiteCode" value="1000" />
<!--设备编码-->
<add key="DeviceCode" value="XL08" />
<add key="DeviceCode" value="XL01" />
<!--上位机类型 0:工单准备1成型机\shoupei2烘房,3:人员登录-->
<add key="ClientMode" value="1" />
<add key="ClientMode" value="0" />
<add key="SerialPort" value="COM5" />

@ -393,9 +393,7 @@
Height="90">
<Button
x:Name="btnFirstCheck"
Width="170"
Height="60"
Margin="10,5"
Style="{StaticResource btnKey}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Background="#2B7EE6" Click="btnFirstCheck_Click">
@ -414,8 +412,7 @@
Grid.Column="8"
>
<Button
x:Name="btnRefresh"
x:Name="btnRefresh"
Style="{StaticResource btnKey}"
HorizontalAlignment="Right"
VerticalAlignment="Center"

@ -4,6 +4,7 @@ using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Threading.Tasks;
using System.Timers;
using System.Windows;
using System.Windows.Controls;
@ -550,18 +551,19 @@ namespace XGLFinishPro.Views
HFPlcWin.ShowDialog();
}
private void btnPause1_Click(object sender, RoutedEventArgs e)
private async void btnPause1_Click(object sender, RoutedEventArgs e)
{
CheckUserWin checkUserWin = new CheckUserWin();
checkUserWin.ShowDialog();
if (!checkUserWin.loginFlag)
{
CustomMessageBox.Show("请先校验用户!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
//陈恒杰在2024-01-07日与榄菊的苏振华确认不需要用户验证
//CheckUserWin checkUserWin = new CheckUserWin();
//checkUserWin.ShowDialog();
//if (!checkUserWin.loginFlag)
//{
// CustomMessageBox.Show("请先校验用户!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
// return;
//}
if (dgWorkOrderInfo.SelectedItems.Count == 0)
{
CustomMessageBox.Show("请选择要开始的工单!", CustomMessageBoxIcon.Warning);
CustomMessageBox.Show("请选择要开始的工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
@ -584,9 +586,11 @@ namespace XGLFinishPro.Views
}
else
{
//巡检
string materialCode = (dgWorkOrderInfo.SelectedItem as DataRowView)["product_code"].ToString();
string materialDesc = (dgWorkOrderInfo.SelectedItem as DataRowView)["product_name"].ToString();
userDbWareHouse.InsertOperationLog(workorderID, "w2", "", "开始工单", deviceCode, materialCode, materialDesc);
await CallCheckApi("checkTypeSCXJ");
TimerDeciveState_Elapsed(null,null);
}
}
@ -672,61 +676,8 @@ namespace XGLFinishPro.Views
return;
}
}
string workorderCode = (dgWorkOrderInfo.SelectedItem as DataRowView)["workorder_code"].ToString();
string workorderID= (dgWorkOrderInfo.SelectedItem as DataRowView)["workorder_id"].ToString();
string batchCode = (dgWorkOrderInfo.SelectedItem as DataRowView)["batch_code"].ToString();
//调用首件检验接口
string apiUrl = formingMachineService.GetInterfaceUrl("createCheckProduceTask");
FirstCheckModel firstCheck = new FirstCheckModel();
firstCheck.factoryCode = Utils.GetAppSetting("SiteCode");
firstCheck.incomeBatchNo = (dgWorkOrderInfo.SelectedItem as DataRowView)["batch_code"].ToString();
firstCheck.orderNo = workorderCode;
firstCheck.materialName = (dgWorkOrderInfo.SelectedItem as DataRowView)["product_name"].ToString();
firstCheck.materialCode = (dgWorkOrderInfo.SelectedItem as DataRowView)["product_code"].ToString();
firstCheck.checkType = "checkTypeSC";
firstCheck.quality = (dgWorkOrderInfo.SelectedItem as DataRowView)["quantity_split"].ToString();
firstCheck.unit = (dgWorkOrderInfo.SelectedItem as DataRowView)["unit"].ToString();
//根据线体编码获取车间编码
DataTable dtCar = userDbWareHouse.GetCarInfo(deviceCode);
string carCode = dtCar.Rows[0][0].ToString();
string carName = dtCar.Rows[0][1].ToString();
firstCheck.carName = carName;
firstCheck.carCode = carCode;
firstCheck.produceDate = (dgWorkOrderInfo.SelectedItem as DataRowView)["plan_time"].ToString();
firstCheck.checkManName = LoginUser.UserName;
firstCheck.checkManCode = LoginUser.UserCode;
firstCheck.checkLoc = deviceCode;
// 将要发送的数据序列化为JSON格式
var jsonContent = JsonConvert.SerializeObject(firstCheck);
LogHelper.instance.log.Info("开始首检>>" + jsonContent);
RestHelper restClient = new RestHelper();
//var response =;
Rootobjectresu result = Utils.DeJson<Rootobjectresu>(await restClient.PostAsync(apiUrl, jsonContent));
if (result.code == 200)
{
//调用首件检验接口
bool isSuccess = formingMachineService.UpdateFirstCheckTask(workorderID, batchCode);
if (isSuccess)
{
CustomMessageBox.Show("首件检验任务创建成功", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Success);
LogHelper.instance.log.Info("首检检验成功>>" + result.msg);
GetWorkOrderInfo();
}
else
{
CustomMessageBox.Show("更新首检任务状态失败", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
LogHelper.instance.log.Info("更新首检任务状态失败>>" + result.msg);
}
}
else
{
LogHelper.instance.log.Info("首检检验失败>>" + result.msg);
CustomMessageBox.Show("调用首件检验接口失败:" + result.msg, CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
}
//首件检验
await CallCheckApi("checkTypeSC");
}
catch (Exception ex)
{
@ -735,6 +686,94 @@ namespace XGLFinishPro.Views
}
}
/// <summary>
/// 首检/巡检
/// </summary>
/// <param name="checkType"></param>
/// <returns></returns>
private async Task CallCheckApi(string checkType)
{
string workorderCode = (dgWorkOrderInfo.SelectedItem as DataRowView)["workorder_code"].ToString();
string workorderID = (dgWorkOrderInfo.SelectedItem as DataRowView)["workorder_id"].ToString();
string batchCode = (dgWorkOrderInfo.SelectedItem as DataRowView)["batch_code"].ToString();
//调用首件检验接口
string apiUrl = formingMachineService.GetInterfaceUrl("createCheckProduceTask");
FirstCheckModel firstCheck = new FirstCheckModel();
firstCheck.factoryCode = Utils.GetAppSetting("SiteCode");
string taskName = "";
if (checkType.Equals("checkTypeSCXJ"))
{
taskName = "巡检任务";
firstCheck.incomeBatchNo = null;
}
else
{
taskName = "首件检验任务";
firstCheck.incomeBatchNo = (dgWorkOrderInfo.SelectedItem as DataRowView)["batch_code"].ToString();
}
firstCheck.orderNo = workorderCode;
firstCheck.materialName = (dgWorkOrderInfo.SelectedItem as DataRowView)["product_name"].ToString();
firstCheck.materialCode = (dgWorkOrderInfo.SelectedItem as DataRowView)["product_code"].ToString();
firstCheck.checkType = checkType;//"checkTypeSC";
firstCheck.quality = (dgWorkOrderInfo.SelectedItem as DataRowView)["quantity_split"].ToString();
firstCheck.unit = (dgWorkOrderInfo.SelectedItem as DataRowView)["unit"].ToString();
//根据线体编码获取车间编码
DataTable dtCar = userDbWareHouse.GetCarInfo(deviceCode);
string carCode = dtCar.Rows[0][0].ToString();
string carName = dtCar.Rows[0][1].ToString();
firstCheck.carName = carName;
firstCheck.carCode = carCode;
firstCheck.produceDate = (dgWorkOrderInfo.SelectedItem as DataRowView)["plan_time"].ToString();
firstCheck.checkManName = LoginUser.UserName;
firstCheck.checkManCode = LoginUser.UserCode;
firstCheck.checkLoc = deviceCode;
// 将要发送的数据序列化为JSON格式
var jsonContent = JsonConvert.SerializeObject(firstCheck);
LogHelper.instance.log.Info($"开始{taskName}>>" + jsonContent);
RestHelper restClient = new RestHelper();
//var response =;
Rootobjectresu result = Utils.DeJson<Rootobjectresu>(await restClient.PostAsync(apiUrl, jsonContent));
if (result.code == 200)
{
//巡检
if (checkType.Equals("checkTypeSCXJ"))
{
CustomMessageBox.Show($"{taskName}创建成功", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Success);
LogHelper.instance.log.Info($"{taskName}创建成功>>" + result.msg);
GetWorkOrderInfo();
}
else
{
//调用首件检验
bool isSuccess = formingMachineService.UpdateFirstCheckTask(workorderID, batchCode);
if (isSuccess)
{
CustomMessageBox.Show($"{taskName}创建成功", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Success);
LogHelper.instance.log.Info($"{taskName}创建成功>>" + result.msg);
GetWorkOrderInfo();
}
else
{
CustomMessageBox.Show($"更新{taskName}状态失败", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
LogHelper.instance.log.Info($"更新{taskName}状态失败>>" + result.msg);
}
}
}
else
{
LogHelper.instance.log.Info($"{taskName}失败>>" + result.msg);
CustomMessageBox.Show($"调用{taskName}接口失败:" + result.msg, CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
}
}
}
public class ReportWorkModel
{

@ -388,15 +388,19 @@
Binding="{Binding workorder_code}"
Header="订单码" />
<DataGridTextColumn
Width="150"
Width="450"
Binding="{Binding product_name}"
Header="产品名称" />
<DataGridTextColumn
Width="200"
Width="250"
Binding="{Binding product_code}"
Header="产品型号" />
Header="产品型号" />
<DataGridTextColumn
Width="1350"
Width="100"
Binding="{Binding quantity_split}"
Header="数量" />
<DataGridTextColumn
Width="250"
Binding="{Binding prod_line_code}"
Header="设备" />

@ -1,15 +1,18 @@
using CentralControl.BaseData;
using CommonFunc;
using CommonFunc.Tools;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Threading.Tasks;
using System.Timers;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using XGL.Data.DBService;
using XGL.Dats.DBServiceFinishProd;
using XGL.Models.Model.OrderPrepare;
using XGL.Thrift;
@ -21,6 +24,7 @@ namespace XGLFinishPro.Views
/// </summary>
public partial class LanJu_Prepare : UserControl
{
FormingMachineService formingMachineService = new FormingMachineService();
Timer timerDeciveState = new Timer();
string deviceCode = Utils.GetAppSetting("DeviceCode");
@ -34,8 +38,8 @@ namespace XGLFinishPro.Views
FinishProdDBService userDbWareHouse = new FinishProdDBService();
WorkOrder list_modelWareHouse = new WorkOrder();
string messageOrderCode = "";
DataTable dt;
List<BaseEquipment> eqment;
@ -50,11 +54,11 @@ namespace XGLFinishPro.Views
try
{
List<WetMaterialModel> wetList = new List<WetMaterialModel>();
//modelWareHouse = new List<WorkOrder>();
//userDbWareHouse = new DBService();
string date = this.dateStart.SelectedDate.ToString() == "" ? DateTime.Now.ToString() : this.dateStart.SelectedDate.ToString();
dt = userDbWareHouse.GetWetPlanInfo(deviceCode,date);
dt = userDbWareHouse.GetWetPlanInfo(deviceCode, date);
//eqment = userDbWareHouse.GeteqmentInfo();
if (dt == null)
{
@ -97,7 +101,7 @@ namespace XGLFinishPro.Views
// // modelWareHouse.Add(list_modelWareHouse);
// LogHelper.instance.log.Info(wet.prod_line_code);
//}
}
catch (Exception ex)
{
@ -159,20 +163,20 @@ namespace XGLFinishPro.Views
try
{
if (Utils.isAnyBodyPerating) return;
List<WetMaterialModel> wetList = new List<WetMaterialModel>();
List<WetMaterialModel> wetList = new List<WetMaterialModel>();
string date = "";
//使用Dispatcher来在UI线程上更新UI
this.Dispatcher.Invoke(
new Action(() =>
{
date = this.dateStart.SelectedDate.ToString() == "" ? DateTime.Now.ToString() : this.dateStart.SelectedDate.ToString();
date = this.dateStart.SelectedDate.ToString() == "" ? DateTime.Now.ToString() : this.dateStart.SelectedDate.ToString();
}
),
System.Windows.Threading.DispatcherPriority.Render);
dt = userDbWareHouse.GetWetPlanInfo(deviceCode,date);
dt = userDbWareHouse.GetWetPlanInfo(deviceCode, date);
if (dt == null) return;
if (wetList != null)
{
//使用Dispatcher来在UI线程上更新UI
@ -195,21 +199,22 @@ namespace XGLFinishPro.Views
private async void btnStartOrders_Click(object sender, RoutedEventArgs e)
{
CheckUserWin checkUserWin = new CheckUserWin();
checkUserWin.ShowDialog();
if (!checkUserWin.loginFlag)
{
CustomMessageBox.Show("请先校验用户!",CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
//陈恒杰在2024-01-07日与榄菊的苏振华确认不需要用户验证
//CheckUserWin checkUserWin = new CheckUserWin();
//checkUserWin.ShowDialog();
//if (!checkUserWin.loginFlag)
//{
// CustomMessageBox.Show("请先校验用户!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
// return;
//}
if (WorkOrder.SelectedItems.Count == 0)
{
CustomMessageBox.Show("请选择要开始的工单!", CustomMessageBoxIcon.Warning);
CustomMessageBox.Show("请选择要开始的工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
string workorderID = (WorkOrder.SelectedItem as DataRowView)["workorder_code"].ToString();
string status = (WorkOrder.SelectedItem as DataRowView)["status"].ToString();
if (!status.Equals("w1"))
@ -218,7 +223,7 @@ namespace XGLFinishPro.Views
{
CustomMessageBox.Show("该工单不符合条件,请选择其他的工单!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
return;
}
}
}
var selectedRow = (WorkOrder.SelectedItem as DataRowView);
@ -239,12 +244,13 @@ namespace XGLFinishPro.Views
if (!UpdateOrderStatus(workorderID))
{
CustomMessageBox.Show("开始工单失败!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
}
}
else
{
{
string materialCode = selectedRow["product_code"].ToString();
string materialDesc = selectedRow["product_name"].ToString();
userDbWareHouse.InsertOperationLog(workorderID, "w2", "","开始工单", deviceCode, materialCode, materialDesc);
userDbWareHouse.InsertOperationLog(workorderID, "w2", "", "开始工单", deviceCode, materialCode, materialDesc);
await CallCheckApi("checkTypeSCXJ");
GetWorkOrder();
}
@ -347,10 +353,69 @@ namespace XGLFinishPro.Views
}
private async Task CallCheckApi(string checkType)
{
string workorderCode = (WorkOrder.SelectedItem as DataRowView)["workorder_code"].ToString();
string workorderID = (WorkOrder.SelectedItem as DataRowView)["workorder_id"].ToString();
//string batchCode = (WorkOrder.SelectedItem as DataRowView)["batch_code"].ToString();
//调用首件检验接口
string apiUrl = formingMachineService.GetInterfaceUrl("createCheckProduceTask");
FirstCheckModel firstCheck = new FirstCheckModel();
firstCheck.factoryCode = Utils.GetAppSetting("SiteCode");
if (checkType.Equals("checkTypeSCXJ"))
{
firstCheck.incomeBatchNo = null;
}
else
{
firstCheck.incomeBatchNo = null;//(WorkOrder.SelectedItem as DataRowView)["batch_code"].ToString();
}
firstCheck.orderNo = workorderCode;
firstCheck.materialName = (WorkOrder.SelectedItem as DataRowView)["product_name"].ToString();
firstCheck.materialCode = (WorkOrder.SelectedItem as DataRowView)["product_code"].ToString();
firstCheck.checkType = checkType;//"checkTypeSC";
firstCheck.quality = (WorkOrder.SelectedItem as DataRowView)["quantity_split"].ToString();
firstCheck.unit = (WorkOrder.SelectedItem as DataRowView)["unit"].ToString();
//根据线体编码获取车间编码
DataTable dtCar = userDbWareHouse.GetCarInfo(deviceCode);
string carCode = dtCar.Rows[0][0].ToString();
string carName = dtCar.Rows[0][1].ToString();
firstCheck.carName = carName;
firstCheck.carCode = carCode;
firstCheck.produceDate = (WorkOrder.SelectedItem as DataRowView)["plan_time"].ToString();
firstCheck.checkManName = LoginUser.UserName;
firstCheck.checkManCode = LoginUser.UserCode;
firstCheck.checkLoc = deviceCode;
// 将要发送的数据序列化为JSON格式
var jsonContent = JsonConvert.SerializeObject(firstCheck);
LogHelper.instance.log.Info("开始巡检>>" + jsonContent);
RestHelper restClient = new RestHelper();
//var response =;
Rootobjectresu result = Utils.DeJson<Rootobjectresu>(await restClient.PostAsync(apiUrl, jsonContent));
if (result.code == 200)
{
CustomMessageBox.Show("巡检任务创建成功", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Success);
LogHelper.instance.log.Info("首检检验成功>>" + result.msg);
GetWorkOrder();
}
else
{
LogHelper.instance.log.Info("巡检任务创建失败>>" + result.msg);
CustomMessageBox.Show("调用巡检任务接口失败:" + result.msg, CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
}
}
private bool UpdateOrderStatus(string workorderID)
{
//更新工单状态
var updatestatus = userDbWareHouse.UpdateSycnFlag(workorderID,deviceCode);
var updatestatus = userDbWareHouse.UpdateSycnFlag(workorderID, deviceCode);
if (!updatestatus)
{
CustomMessageBox.Show("开始工单失败!", CustomMessageBoxButton.OK, CustomMessageBoxIcon.Warning);
@ -365,7 +430,7 @@ namespace XGLFinishPro.Views
UpdateOrderStatus(subOrder["workorder_code"].ToString());
}
}
return true;
}
@ -432,9 +497,9 @@ namespace XGLFinishPro.Views
dt = userDbWareHouse.GetMaterialInfo(processid);
LanJu_Material sopInfoWin = new LanJu_Material(dt);
sopInfoWin.ShowDialog();
}
private void btnRefresh_Click(object sender, RoutedEventArgs e)
{
@ -452,7 +517,7 @@ namespace XGLFinishPro.Views
}
private void WorkOrder_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
{
try
{
var selectedRow = (WorkOrder.SelectedItem as DataRowView);//WorkOrder.SelectedItem as WetMaterialModel;
@ -466,11 +531,11 @@ namespace XGLFinishPro.Views
else
{
this.dgMaterialInfo.ItemsSource = dt.DefaultView;
}
}
}
catch (Exception ex)
{
CustomMessageBox.Show(ex.Message,CustomMessageBoxButton.OK,CustomMessageBoxIcon.Error);
CustomMessageBox.Show(ex.Message, CustomMessageBoxButton.OK, CustomMessageBoxIcon.Error);
LogHelper.instance.log.Error("获取工单齐套信息时发生异常:" + ex.Message);
}
}

Loading…
Cancel
Save