增加插入AddWorkPlan
This commit is contained in:
@@ -28,7 +28,17 @@ namespace ZR.Admin.WebApi.Controllers.MES.pro
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
[HttpPost("addworkplan")]
|
||||
public IActionResult AddWorkPlan(ProWorkplan proWorkplan)
|
||||
{
|
||||
int data = 0;
|
||||
if (proWorkplan!=null)
|
||||
{
|
||||
data = proWorkplanService.AddWorkPlan(proWorkplan);
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,5 +13,7 @@ namespace ZR.Service.mes.pro.IService
|
||||
{
|
||||
|
||||
public (List<ProWorkplan>,int) GetAllData(int pageNum, int pageSize, int year, int week, string partNumber, string color);
|
||||
|
||||
public int AddWorkPlan(ProWorkplan proWorkplan);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,13 @@ namespace ZR.Service.mes.pro
|
||||
[AppService(ServiceType = typeof(IProWorkplanService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class ProWorkplanService : BaseService<ProWorkplan>, IProWorkplanService
|
||||
{
|
||||
public int AddWorkPlan(ProWorkplan proWorkplan)
|
||||
{
|
||||
|
||||
proWorkplan.Id = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||||
return Context.Insertable(proWorkplan).ExecuteCommand();
|
||||
}
|
||||
|
||||
public (List<ProWorkplan>, int) GetAllData(int pageNum, int pageSize, int year, int week, string partNumber, string color)
|
||||
{
|
||||
var predicate = Expressionable.Create<ProWorkplan>()
|
||||
|
||||
Reference in New Issue
Block a user