ÎļþÃû´Ó StandardPda/MESApplication/Controllers/BasicData/MesDeliveryNoteDetails.cs ÐÞ¸Ä |
| | |
| | | using System.Dynamic; |
| | | using MES.Service.Dto.service; |
| | | using MES.Service.Modes; |
| | | using MES.Service.service.BasicData; |
| | | using MES.Service.service; |
| | | using MES.Service.service.Warehouse; |
| | | using MES.Service.util; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System.Dynamic; |
| | | using System.Threading; |
| | | |
| | | namespace MESApplication.Controllers.BasicData; |
| | | namespace MESApplication.Controllers.Warehouse; |
| | | |
| | | [ApiController] |
| | | [Route("api/[controller]")] |
| | | public class MesDeliveryNoteDetailsController : ControllerBase |
| | | public class MesInvItemOutsController : ControllerBase |
| | | { |
| | | private readonly MesDeliveryDetailsManager m = new(); |
| | | private readonly MesInvItemOutsManager m = new(); |
| | | |
| | | private readonly MessageCenterManager _manager = new(); |
| | | |
| | | /***è¿å
¥æ¨¡ç管çå¯ä»¥ä¿®æ¹æ¨¡ç***/ |
| | | private readonly string METHOD = "POST"; |
| | | |
| | | private readonly string TableName = "MesInvItemOuts"; |
| | | |
| | | private readonly string URL = "http://localhost:10054/api/MesInvItemOuts/"; |
| | | |
| | | /// <summary> |
| | | /// éè´éè´§ç³è¯·å |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("ReturnRequest")] |
| | | public ResponseResult ReturnRequest(ItemOut oItemOut) |
| | | { |
| | | var entity = new MessageCenter(); |
| | | entity.TableName = TableName; |
| | | entity.Url = URL + "ReturnRequest"; |
| | | entity.Method = METHOD; |
| | | entity.Data = Newtonsoft.Json.JsonConvert.SerializeObject(oItemOut); |
| | | entity.Status = 1; |
| | | entity.CreateBy = "PL017"; |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | var result = m.ReturnRequest(oItemOut); |
| | | resultInfos.tbBillList = result; |
| | | |
| | | entity.Result = 0; |
| | | if (result) entity.Result = 1; |
| | | entity.DealWith = 1; |
| | | _manager.save(entity); |
| | | |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | entity.Result = 0; |
| | | entity.DealWith = 0; |
| | | entity.ResultData = ex.Message; |
| | | _manager.save(entity); |
| | | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åææ |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("Insert")] |
| | | public ResponseResult Add([FromBody] MesDeliveryNoteDetails data) |
| | | public ResponseResult Add([FromBody] MesInvItemOuts data) |
| | | { |
| | | try |
| | | { |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("InsertReturnIdentity")] |
| | | public ResponseResult InsertReturnIdentity([FromBody] MesDeliveryNoteDetails data) |
| | | public ResponseResult InsertReturnIdentity([FromBody] MesInvItemOuts data) |
| | | { |
| | | try |
| | | { |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("Update")] |
| | | public ResponseResult Update([FromBody] MesDeliveryNoteDetails data) |
| | | public ResponseResult Update([FromBody] MesInvItemOuts data) |
| | | { |
| | | try |
| | | { |