强退异常处理

main
yinq 4 days ago
parent 481d9a4229
commit 48b20ad274

@ -91,7 +91,7 @@ namespace SlnMesnac.Business.business
/// </summary> /// </summary>
public void HandleStaffCommute(BaseStaffInfo staff, int isCheckOn) public void HandleStaffCommute(BaseStaffInfo staff, int isCheckOn)
{ {
if(isCheckOn == 0) /* if(isCheckOn == 0)
{ {
RecordStaffCommute recordStaffCommute = new RecordStaffCommute RecordStaffCommute recordStaffCommute = new RecordStaffCommute
{ {
@ -115,7 +115,7 @@ namespace SlnMesnac.Business.business
recordStaffCommute.EndWorkTime = currentTime; recordStaffCommute.EndWorkTime = currentTime;
recordStaffCommute.ClockingRatio = Convert.ToDecimal((DateTime.Parse(recordStaffCommute.EndWorkTime) - DateTime.Parse(recordStaffCommute.StartWorkTime)).TotalHours); recordStaffCommute.ClockingRatio = Convert.ToDecimal((DateTime.Parse(recordStaffCommute.EndWorkTime) - DateTime.Parse(recordStaffCommute.StartWorkTime)).TotalHours);
_recordStaffCommuteService.Update(recordStaffCommute); _recordStaffCommuteService.Update(recordStaffCommute);
} }*/
} }
/// <summary> /// <summary>

@ -315,6 +315,8 @@ namespace SlnMesnac.WPF.ViewModel
/// 主动移除 /// 主动移除
/// </summary> /// </summary>
private void Remove(string staffId) private void Remove(string staffId)
{
try
{ {
MainWindowViewModel.wins = 2; MainWindowViewModel.wins = 2;
if (isUse == false) if (isUse == false)
@ -351,6 +353,11 @@ namespace SlnMesnac.WPF.ViewModel
MessageBox.Show("正在打卡不能强退!"); MessageBox.Show("正在打卡不能强退!");
} }
} }
catch (Exception ex)
{
_logger.LogError($"强退异常:{ex.Message}");
}
}
private void Init() private void Init()
{ {

@ -66,9 +66,13 @@
// "DeviceCode": "XMGR0004", // "DeviceCode": "XMGR0004",
// "ProcessCode": "1002", // "ProcessCode": "1002",
// "ProductLineName": "压延一工位" // "ProductLineName": "压延一工位"
"StationCode": "1023-硫化十一工位", //"StationCode": "1023-硫化十一工位",
//"DeviceCode": "XMGR0030",
//"ProcessCode": "1020",
//"ProductLineName": "硫化十一工位"
"StationCode": "1022-硫化三工位",
"DeviceCode": "XMGR0030", "DeviceCode": "XMGR0030",
"ProcessCode": "1023", "ProcessCode": "1020",
"ProductLineName": "硫化十一工位" "ProductLineName": "硫化工位"
} }
} }

Loading…
Cancel
Save