作者:光头之祖_617 | 来源:互联网 | 2023-10-14 10:31
控制器中存储叫修单(新增保存)[HttpPost]publicstringCallRepairSubmit(stringsRepair_Type,stringsCallRepair
控制器中
//存储叫修单(新增保存)
[HttpPost]
public string CallRepairSubmit(string sRepair_Type, string sCallRepairNo, int sLine_Id, string sCall_Location, string sMachineNo, string sMachine_Name, string sDefect_Types, string sDefect_Desc_Pluss)
{
string sRetMsg = “OK”;
var handler = new RepairHandler();
//检查设备是否被叫修
var MachineSt = handler.getMachineCount(sMachineNo);
if (MachineSt >= 1) return “你是外星来的小baby么”;
sCallRepairNo = handler.GetNew_TLId();var result = handler.CallRepairSubmit(sRepair_Type, sCallRepairNo, sLine_Id, sCall_Location, sMachineNo, sMachine_Name, sDefect_Types, sDefect_Desc_Pluss);if (result != "OK")sRetMsg = result;return sRetMsg;}
//取Machine表已被叫修数据信息public int getMachineCount( string sMachineNo){var MachineSt = db.MACHINE.Where(x => x.PLANTID == UserSession.Plant.Id && x.DELETEFLAG == 0 && x.CUSTODYNO == sMachineNo&& x.R_STATUS==1).Count();return MachineSt;}