ÎļþÃû´Ó MESApplication/Controllers/BasicData/MesTransferRequestController.cs ÐÞ¸Ä |
| | |
| | | |
| | | [ApiController] |
| | | [Route("api/[controller]")] |
| | | public class MesTransferRequestController : ControllerBase |
| | | public class TransferRequestController : ControllerBase |
| | | { |
| | | private readonly MessageCenterManager _manager = new(); |
| | | private readonly MesRohInManager m = new(); |
| | | private readonly TransferRequestManager m = new(); |
| | | |
| | | private readonly string METHOD = "POST"; |
| | | |
| | | private readonly string TableName = "MES_ROHIN"; |
| | | private readonly string TableName = "MES_DBCK"; |
| | | |
| | | private readonly string URL = "http://localhost:10054/api/MesRohIn/"; |
| | | private readonly string URL = "http://localhost:10054/api/TransferRequest/"; |
| | | |
| | | // |
| | | [HttpPost("Save")] |
| | | public ResponseResult Save(TransferRequest rohIn) |
| | | public ResponseResult Save(TransferRequest transfer) |
| | | { |
| | | var entity = new MessageCenter(); |
| | | entity.TableName = TableName; |
| | | entity.Url = URL + "Save"; |
| | | entity.Method = METHOD; |
| | | entity.Data = JsonConvert.SerializeObject(rohIn); |
| | | entity.Data = JsonConvert.SerializeObject(transfer); |
| | | entity.Status = 1; |
| | | entity.CreateBy = "PL017"; |
| | | entity.Route = rohIn.ErpTransferRequest.FBillNo; |
| | | entity.Route = transfer.ErpTransferRequest.FBillNo; |
| | | try |
| | | { |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "æ¥å£å¼åä¸", |
| | | data = "" |
| | | }; |
| | | //dynamic resultInfos = new ExpandoObject(); |
| | | //var save = m.Save(rohIn); |
| | | |
| | | //resultInfos.tbBillList = save; |
| | | |
| | | //entity.Result = 0; |
| | | //if (save) entity.Result = 1; |
| | | |
| | | //entity.DealWith = 1; |
| | | //_manager.save(entity); |
| | | |
| | | //return new ResponseResult |
| | | //{ |
| | | // status = 0, |
| | | // message = "OK", |
| | | // data = resultInfos |
| | | // message = "æ¥å£å¼åä¸", |
| | | // data = "" |
| | | //}; |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | var save = m.Save(transfer); |
| | | |
| | | resultInfos.tbBillList = save; |
| | | |
| | | entity.Result = 0; |
| | | if (save) entity.Result = 1; |
| | | |
| | | entity.DealWith = 1; |
| | | _manager.save(entity); |
| | | |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("Insert")] |
| | | public ResponseResult Add([FromBody] MesRohIn data) |
| | | public ResponseResult Add([FromBody] MesDbck data) |
| | | { |
| | | try |
| | | { |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("InsertReturnIdentity")] |
| | | public ResponseResult InsertReturnIdentity([FromBody] MesRohIn data) |
| | | public ResponseResult InsertReturnIdentity([FromBody] MesDbck data) |
| | | { |
| | | try |
| | | { |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("Update")] |
| | | public ResponseResult Update([FromBody] MesRohIn data) |
| | | public ResponseResult Update([FromBody] MesDbck data) |
| | | { |
| | | try |
| | | { |