1
This commit is contained in:
@@ -353,5 +353,31 @@ namespace WebAPI.Controllers
|
||||
}
|
||||
return respone;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public Model.ResponeData saveUsingMat(string usingPlanId, string unitStoreCode, string amount)
|
||||
{
|
||||
Model.ResponeData respone = new ResponeData();
|
||||
try
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(BLL.Funs.ConnString))
|
||||
{
|
||||
var unitStore = db.Weld_UnitStore.FirstOrDefault(x => x.UnitStoreCode == unitStoreCode);
|
||||
if (unitStore == null)
|
||||
{
|
||||
respone.code = 0;
|
||||
respone.message = "对应编码的仓库不存在!";
|
||||
return respone;
|
||||
}
|
||||
return APIWeldServices.saveUsingMat(usingPlanId, unitStore.UnitStoreId, amount);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
respone.code = 0;
|
||||
respone.message = e.Message;
|
||||
}
|
||||
return respone;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user