南骏 池
2025-02-25 b4f37860c45b15825128912f1a117a8e90f9dc42
MESApplication/Controllers/BasicData/TransferRequestController.cs
ÎļþÃû´Ó MESApplication/Controllers/BasicData/MesTransferRequestController.cs ÐÞ¸Ä
@@ -11,54 +11,54 @@
[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)
        {
@@ -201,7 +201,7 @@
    /// </summary>
    /// <returns></returns>
    [HttpPost("Insert")]
    public ResponseResult Add([FromBody] MesRohIn data)
    public ResponseResult Add([FromBody] MesDbck data)
    {
        try
        {
@@ -225,7 +225,7 @@
    /// </summary>
    /// <returns></returns>
    [HttpPost("InsertReturnIdentity")]
    public ResponseResult InsertReturnIdentity([FromBody] MesRohIn data)
    public ResponseResult InsertReturnIdentity([FromBody] MesDbck data)
    {
        try
        {
@@ -249,7 +249,7 @@
    /// </summary>
    /// <returns></returns>
    [HttpPost("Update")]
    public ResponseResult Update([FromBody] MesRohIn data)
    public ResponseResult Update([FromBody] MesDbck data)
    {
        try
        {