using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Runtime.ConstrainedExecution;
|
using System.Text;
|
using System.Threading.Tasks;
|
using WIDESEA_Common.MES;
|
using WIDESEA_Core;
|
using WIDESEA_DTO;
|
|
namespace WIDESEA_StoragIntegrationServices
|
{
|
public partial class WCSService
|
{
|
public WebResponseContent TZPassZZ(RequestTaskDto json)
|
{
|
WebResponseContent content = new WebResponseContent();
|
try
|
{
|
var carInfo = _carBodyInfoRepository.QueryFirst(x => x.RFID == json.PVI); ///*x.PalletCode == json.PalletCode ||*/
|
if (carInfo != null) throw new Exception($"涂装直通总装失败:PVI{json.Rfid}已存在。");
|
|
WebResponseContent responseContent = _mesService.issuedCharacter(json.PVI, json.Position, json.PalletCode);
|
if (!responseContent.Status) throw new Exception($"车身信息获取失败:{responseContent.msg}");
|
|
var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == json.Position);
|
if (station == null) throw new Exception("站台未找到");
|
|
//过点信息 -BDC01
|
//json.PVI = json.PVI.Substring(0, 9);
|
json.Position = "RB001";
|
WebResponseContent content1 = _mesService.PassPoint(json);
|
if (!content1.Status) throw new Exception($"BDC02过点失败:{content1.msg}");
|
|
WebResponseContent webResponse = _mesService.bindWorkOrder("EL01RB", json.PVI);
|
if (!webResponse.Status) throw new Exception($"焊涂绑定失败:{webResponse.msg}");
|
|
//过点信息 -BDC02
|
json.Position = "EL01RB";
|
WebResponseContent BDC02 = _mesService.PassPoint(json);
|
if (!BDC02.Status) throw new Exception($"BDC02过点失败:{BDC02.msg}");
|
|
////过点信息 -BDC03
|
json.Position = "EL01RB01";
|
WebResponseContent BDC03 = _mesService.PassPoint(json);
|
if (!BDC03.Status) throw new Exception($"BDC03过点失败:{BDC03.msg}");
|
|
content.OK();
|
}
|
catch (Exception ex)
|
{
|
content.Error(ex.Message);
|
}
|
return content;
|
}
|
}
|
}
|