Merge branch 'production' of https://gitee.com/doan-tech/shanghaigangxiangtuzhuangMES
# Conflicts: # ZR.Admin.WebApi/appsettings.development.json
This commit is contained in:
@@ -298,11 +298,12 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.IQC
|
||||
}
|
||||
|
||||
|
||||
// 更改工单状态为完成态
|
||||
// 生成质量统计报表
|
||||
[HttpGet("generateQualityStatisticsTable")]
|
||||
public IActionResult GenerateQualityStatisticsTable(string workorderID,string team, DateTime firstQuality_time)
|
||||
{
|
||||
int result = fQCService.GenerateQualityStatisticsTable(workorderID, team, firstQuality_time);
|
||||
|
||||
int result = fQCService.GenerateQualityStatisticsTable(workorderID, team, firstQuality_time.ToLocalTime());
|
||||
return SUCCESS(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
using Infrastructure.Extensions;
|
||||
using JinianNet.JNTemplate;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Model.Dto;
|
||||
using ZR.Model.MES.qu;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Service.mes.wms;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 退库模块
|
||||
/// </summary>
|
||||
[Route("/mes/wm/exitwarehouse")]
|
||||
public class WMExitwarehouseController : BaseController
|
||||
{
|
||||
private readonly IWMExitwarehouseService Exitwarehouse;
|
||||
public WMExitwarehouseController(IWMExitwarehouseService Exitwarehouse) {
|
||||
this.Exitwarehouse = Exitwarehouse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 一般退库
|
||||
/// </summary>
|
||||
/// <param name="original"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("common")]
|
||||
public IActionResult ExitwarehouseCommmon(string originalCode)
|
||||
{
|
||||
string msg = null;
|
||||
bool data = Exitwarehouse.ExitwarehouseCommmon(originalCode);
|
||||
if (data)
|
||||
{
|
||||
msg = "退库成功";
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = "箱子不在仓库中";
|
||||
}
|
||||
return ToResponse(new ApiResult(200, msg, data));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 7 判断箱子是否存在成品库仓库里
|
||||
/// </summary>
|
||||
/// <param name="PatchCode"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("is_existed_warehouse")]
|
||||
public IActionResult IsExistedWarehouse(string originalCode = "")
|
||||
{
|
||||
if (string.IsNullOrEmpty(originalCode))
|
||||
{
|
||||
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
}
|
||||
string msg = null;
|
||||
bool data = this.Exitwarehouse.IsExistedWarehouse(originalCode);
|
||||
if (data)
|
||||
{
|
||||
msg = "存在";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = "不存在";
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, msg, data));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,15 @@
|
||||
using Infrastructure.Extensions;
|
||||
using JinianNet.JNTemplate;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Model.Dto;
|
||||
using ZR.Model.MES.qu;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
{
|
||||
@@ -18,7 +23,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
private readonly IWMentryWarehousing_productService wm_entryWarehousing_productService;
|
||||
public WMentryWarehousing_productController(IWMentryWarehousing_productService wm_entryWarehousing_productService)
|
||||
{
|
||||
this.wm_entryWarehousing_productService = wm_entryWarehousing_productService;
|
||||
this.wm_entryWarehousing_productService = wm_entryWarehousing_productService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -26,9 +31,14 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("is_production_location")]
|
||||
[Log(Title = "判断是否为库位码")]
|
||||
public IActionResult IsProductionLocation(string production_location_code = "")
|
||||
{
|
||||
if (string.IsNullOrEmpty(production_location_code))
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
|
||||
}
|
||||
// 查询 wm_info 表,根据库位码,查询在表中是否存在,true false
|
||||
bool state = this.wm_entryWarehousing_productService.IsProductionLoacation(production_location_code);
|
||||
|
||||
@@ -40,9 +50,27 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("is_production_package")]
|
||||
[Log(Title = "判断是否为成品库箱子码")]
|
||||
public IActionResult IsProductionPackage(string package_code = "")
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "success", true));
|
||||
if (string.IsNullOrEmpty(package_code))
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
|
||||
}
|
||||
int state = this.wm_entryWarehousing_productService.isProductionPackage(package_code);
|
||||
string msg = null;
|
||||
if (state == 0)
|
||||
msg = "外箱标签码不存在";
|
||||
else if (state == 1)
|
||||
msg = "success";
|
||||
|
||||
else if (state == 2)
|
||||
msg = "误扫码,不是外箱标签码";
|
||||
|
||||
|
||||
return ToResponse(new ApiResult(200, msg, state));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -50,10 +78,125 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("is_full_package")]
|
||||
[Log(Title = "判断是否为满箱")]
|
||||
public IActionResult IsFullPackage(string package_code = "")
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "success", true));
|
||||
|
||||
if (string.IsNullOrEmpty(package_code))
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
|
||||
}
|
||||
bool state = this.wm_entryWarehousing_productService.isFullPackage(package_code);
|
||||
string msg = null;
|
||||
if (state)
|
||||
{
|
||||
msg = "满箱";
|
||||
}else
|
||||
{
|
||||
msg = "零头箱";
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, msg, state));
|
||||
}
|
||||
/// <summary>
|
||||
/// 4.入库
|
||||
/// </summary>
|
||||
/// <param name="wmgoodsDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("into_product_warehouse")]
|
||||
[Log(Title = "入库")]
|
||||
public IActionResult IntoProductwarehouse([FromBody] WmgoodsDto wmgoodsDto)
|
||||
{
|
||||
if (wmgoodsDto == null)
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
}
|
||||
string msg = "";
|
||||
|
||||
string createName = HttpContext.GetName();
|
||||
|
||||
int num = this.wm_entryWarehousing_productService.IntoProductwarehouse(wmgoodsDto, createName);
|
||||
if (num == 0)
|
||||
{
|
||||
msg = "数据插入异常";
|
||||
|
||||
|
||||
}
|
||||
else if (num >= 1)
|
||||
{
|
||||
msg = "成功入库"+num+"个";
|
||||
|
||||
|
||||
}
|
||||
return ToResponse(new ApiResult(200, msg, num));
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取库位已经存在箱子
|
||||
/// </summary>
|
||||
/// <param name="locationcode"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("packagelist")]
|
||||
[Log(Title = "获取库位已经存在箱子")]
|
||||
public IActionResult Getpackagelist(string locationcode)
|
||||
{
|
||||
if (string.IsNullOrEmpty(locationcode))
|
||||
{
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
}
|
||||
string msg = null;
|
||||
|
||||
List<WmGoodsNowProduction> productionList = this.wm_entryWarehousing_productService.Getpackagelist(locationcode);
|
||||
|
||||
return ToResponse(new ApiResult(200, msg, productionList));
|
||||
}
|
||||
/// <summary>
|
||||
/// 解析外标签码
|
||||
/// </summary>
|
||||
/// <param name="code"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("resolution_package")]
|
||||
public IActionResult ResolutionPackage(string code = "")
|
||||
{
|
||||
if (string.IsNullOrEmpty(code))
|
||||
{
|
||||
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
}
|
||||
ResultionPackageCodeDto data = this.wm_entryWarehousing_productService.ResolutionPackage(code);
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 7 判断箱子是否存在成品库仓库里
|
||||
/// </summary>
|
||||
/// <param name="PatchCode"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("is_existed_warehouse")]
|
||||
public IActionResult IsExistedWarehouse(string originalCode = "")
|
||||
{
|
||||
if (string.IsNullOrEmpty(originalCode))
|
||||
{
|
||||
|
||||
return ToResponse(new ApiResult(200, "传入为空", false));
|
||||
}
|
||||
string msg = null;
|
||||
bool data = this.wm_entryWarehousing_productService.IsExistedWarehouse(originalCode);
|
||||
if (data)
|
||||
{
|
||||
msg = "存在";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = "不存在";
|
||||
}
|
||||
|
||||
return ToResponse(new ApiResult(200, msg, data));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using Microsoft.IdentityModel.Tokens;
|
||||
using ZR.Model.MES.qu;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
using static System.Runtime.InteropServices.JavaScript.JSType;
|
||||
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
{
|
||||
@@ -13,7 +14,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
public class WMlocationInfoController : BaseController
|
||||
{
|
||||
|
||||
private readonly IWMlocationInfoService wm_locationInfoService;
|
||||
private readonly IWMlocationInfoService wm_locationInfoService;
|
||||
public WMlocationInfoController(IWMlocationInfoService wm_locationInfoService)
|
||||
{
|
||||
this.wm_locationInfoService = wm_locationInfoService;
|
||||
@@ -25,11 +26,25 @@ namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("production_warehouse_info")]
|
||||
public IActionResult Queryproduction_warehouse_info(string shelf = "", int layer = 0,int pageNum=0,int pageSize=0)
|
||||
public IActionResult Queryproduction_warehouse_info(string shelf = "", int layer = 0, int pageNum = 0, int pageSize = 0)
|
||||
{
|
||||
(List<WmInfo>, int) data = wm_locationInfoService.Getwminfo_product(shelf, layer, pageNum, pageSize);
|
||||
return ToResponse(new ApiResult(200, "success", data));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取库位信息
|
||||
/// </summary>
|
||||
[HttpGet("get_location_info")]
|
||||
public IActionResult Querylocationinfo(int warehouse_num, string locationcode = "")
|
||||
{
|
||||
|
||||
WmInfo wmInfo= wm_locationInfoService.Getlocationinfo(warehouse_num, locationcode);
|
||||
return ToResponse(new ApiResult(200, "success", wmInfo));
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
111
ZR.Admin.WebApi/Controllers/mes/wms/WmCustomController.cs
Normal file
111
ZR.Admin.WebApi/Controllers/mes/wms/WmCustomController.cs
Normal file
@@ -0,0 +1,111 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Model.Dto;
|
||||
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Model.MES.wms;
|
||||
|
||||
//创建时间:2024-03-17
|
||||
namespace ZR.Admin.WebApi.Controllers.mes.wms
|
||||
{
|
||||
/// <summary>
|
||||
/// 客户信息
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("/mes/wm/WmCustom")]
|
||||
public class WmCustomController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 客户信息接口
|
||||
/// </summary>
|
||||
private readonly IWmCustomService _WmCustomService;
|
||||
|
||||
public WmCustomController(IWmCustomService WmCustomService)
|
||||
{
|
||||
_WmCustomService = WmCustomService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询客户信息列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "wmsManagement:wmcustom:list")]
|
||||
public IActionResult QueryWmCustom([FromQuery] WmCustomQueryDto parm)
|
||||
{
|
||||
var response = _WmCustomService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询客户信息详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "wmsManagement:wmcustom:query")]
|
||||
public IActionResult GetWmCustom(int Id)
|
||||
{
|
||||
var response = _WmCustomService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<WmCustom>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加客户信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "wmsManagement:wmcustom:add")]
|
||||
[Log(Title = "客户信息", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddWmCustom([FromBody] WmCustomDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmCustom>().ToCreate(HttpContext);
|
||||
|
||||
var response = _WmCustomService.AddWmCustom(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新客户信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "wmsManagement:wmcustom:edit")]
|
||||
[Log(Title = "客户信息", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateWmCustom([FromBody] WmCustomDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmCustom>().ToUpdate(HttpContext);
|
||||
var response = _WmCustomService.UpdateWmCustom(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除客户信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "wmsManagement:wmcustom:delete")]
|
||||
[Log(Title = "客户信息", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteWmCustom(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _WmCustomService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
113
ZR.Admin.WebApi/Controllers/mes/wms/WmMaterialController.cs
Normal file
113
ZR.Admin.WebApi/Controllers/mes/wms/WmMaterialController.cs
Normal file
@@ -0,0 +1,113 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Model.Dto;
|
||||
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Model.MES.wms;
|
||||
using Org.BouncyCastle.Crypto;
|
||||
|
||||
//创建时间:2024-03-16
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料记录表增删改查
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("/mes/wm/WmMaterial")]
|
||||
public class WmMaterialController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料记录表接口
|
||||
/// </summary>
|
||||
private readonly IWmMaterialService _WmMaterialService;
|
||||
|
||||
public WmMaterialController(IWmMaterialService WmMaterialService)
|
||||
{
|
||||
_WmMaterialService = WmMaterialService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询物料记录表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "wms:wmmaterial:list")]
|
||||
public IActionResult QueryWmMaterial([FromQuery] WmMaterialQueryDto parm)
|
||||
{
|
||||
var response = _WmMaterialService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询物料记录表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "wms:wmmaterial:query")]
|
||||
public IActionResult GetWmMaterial(string Id)
|
||||
{
|
||||
var response = _WmMaterialService.GetInfo(Id);
|
||||
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加物料记录表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "wms:wmmaterial:add")]
|
||||
[Log(Title = "物料记录表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddWmMaterial([FromBody] WmMaterialDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmMaterial>().ToCreate(HttpContext);
|
||||
|
||||
var response = _WmMaterialService.AddWmMaterial(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新物料记录表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "wms:wmmaterial:edit")]
|
||||
[Log(Title = "物料记录表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateWmMaterial([FromBody] WmMaterialDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmMaterial>().ToUpdate(HttpContext);
|
||||
var response = _WmMaterialService.UpdateWmMaterial(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除物料记录表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "wms:wmmaterial:delete")]
|
||||
[Log(Title = "物料记录表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteWmMaterial(string ids)
|
||||
{
|
||||
long[] idsArr = Tools.SpitLongArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
|
||||
var response = _WmMaterialService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
141
ZR.Admin.WebApi/Controllers/mes/wms/WmOutOrderController.cs
Normal file
141
ZR.Admin.WebApi/Controllers/mes/wms/WmOutOrderController.cs
Normal file
@@ -0,0 +1,141 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Model.Dto;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Service.mes.wms;
|
||||
|
||||
//创建时间:2024-03-18
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 出货单(物料+客户)
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("mes/wm/WmOutOrder")]
|
||||
public class WmOutOrderController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 出货单(物料+客户)接口
|
||||
/// </summary>
|
||||
private readonly IWmOutOrderService _WmOutOrderService;
|
||||
|
||||
public WmOutOrderController(IWmOutOrderService WmOutOrderService)
|
||||
{
|
||||
_WmOutOrderService = WmOutOrderService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询出货单(物料+客户)列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "business:wmoutorder:list")]
|
||||
public IActionResult QueryWmOutOrder([FromQuery] WmOutOrderQueryDto parm)
|
||||
{
|
||||
var response = _WmOutOrderService.GetList(parm);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询出货单(物料+客户)详情
|
||||
/// </summary>
|
||||
/// <param name="ShipmentNum"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{ShipmentNum}")]
|
||||
[ActionPermissionFilter(Permission = "business:wmoutorder:query")]
|
||||
public IActionResult GetWmOutOrder(string ShipmentNum)
|
||||
{
|
||||
var response = _WmOutOrderService.GetInfo(ShipmentNum);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加出货单(物料+客户)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "business:wmoutorder:add")]
|
||||
[Log(Title = "出货单(物料+客户)", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddWmOutOrder([FromBody] WmOutOrder_materialDto parm)
|
||||
{
|
||||
if(parm == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var modal = parm.ToCreate(HttpContext);
|
||||
|
||||
var response = _WmOutOrderService.AddWmOutOrder(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新出货单(物料+客户)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "business:wmoutorder:edit")]
|
||||
[Log(Title = "出货单(物料+客户)", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateWmOutOrder([FromBody] WmOutOrderDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmOutOrder>().ToUpdate(HttpContext);
|
||||
var response = _WmOutOrderService.UpdateWmOutOrder(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除出货单(物料+客户)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "business:wmoutorder:delete")]
|
||||
[Log(Title = "出货单(物料+客户)", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteWmOutOrder(string ids)
|
||||
{
|
||||
|
||||
if (string.IsNullOrEmpty(ids)) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
|
||||
var response = _WmOutOrderService.Delete(ids.Split(","));
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取客户信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getcustom_list")]
|
||||
public IActionResult GetWmOutOrder()
|
||||
{
|
||||
List<WmCustom> customs= _WmOutOrderService.GetCustominfo();
|
||||
|
||||
return SUCCESS(customs);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询物料记录表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getmaterial_list")]
|
||||
|
||||
public IActionResult QueryWmMaterial([FromQuery] WmMaterialQueryDto parm)
|
||||
{
|
||||
var response = _WmOutOrderService.GetmaterialList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user