105040 Update 增加更新线为已完成功能
This commit is contained in:
parent
86bb90145f
commit
cbda1c9f8f
|
@ -10,6 +10,8 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.Models
|
||||||
{
|
{
|
||||||
|
|
||||||
public string CableLectotypeId { get; set; }
|
public string CableLectotypeId { get; set; }
|
||||||
|
public string LectotypeLineId { get; set; }
|
||||||
|
/// <summary>
|
||||||
/// 机械机构号
|
/// 机械机构号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string MechanicalNo { get; set; }
|
public string MechanicalNo { get; set; }
|
||||||
|
@ -460,7 +462,7 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.Models
|
||||||
{
|
{
|
||||||
return MotorExcelHelper.Instance.GetBomList(drawingNo).Where(it =>
|
return MotorExcelHelper.Instance.GetBomList(drawingNo).Where(it =>
|
||||||
{
|
{
|
||||||
return it.Name == "编码器线" || it.Name == "动力线";
|
return it.Name == "编码器线" || it.Name == "动力线" || it.Name == "刹车线";
|
||||||
}).Select(it => new LectotypeLineModel
|
}).Select(it => new LectotypeLineModel
|
||||||
{
|
{
|
||||||
SeqNo = 0,
|
SeqNo = 0,
|
||||||
|
|
|
@ -92,6 +92,7 @@ namespace Sinvo.EplanHpD.Plugin.Service
|
||||||
viewModel.SelectedLines = selectedLines.Select(line => new LectotypeLineModel
|
viewModel.SelectedLines = selectedLines.Select(line => new LectotypeLineModel
|
||||||
{
|
{
|
||||||
CableLectotypeId = line.CableLectotypeId,
|
CableLectotypeId = line.CableLectotypeId,
|
||||||
|
LectotypeLineId = line.LectotypeLineId,
|
||||||
SeqNo = line.SeqNo,
|
SeqNo = line.SeqNo,
|
||||||
AxisNo = line.AxisNo,
|
AxisNo = line.AxisNo,
|
||||||
CableConnectionClass = line.CableConnectionClass,
|
CableConnectionClass = line.CableConnectionClass,
|
||||||
|
@ -248,6 +249,27 @@ namespace Sinvo.EplanHpD.Plugin.Service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int SetLineDone(string motorId,string lineId)
|
||||||
|
{
|
||||||
|
var db = DBHelper.DB;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
db.BeginTran();
|
||||||
|
|
||||||
|
int changeCount = db.Updateable<LectotypeLine>()
|
||||||
|
.Where(mt => mt.MotorId == motorId && mt.LectotypeLineId == lineId)
|
||||||
|
.SetColumns(it => it.IsChecked == true)
|
||||||
|
.ExecuteCommand();
|
||||||
|
|
||||||
|
db.CommitTran();
|
||||||
|
return changeCount;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
db.RollbackTran();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue