예제 #1
0
        /// <summary>
        /// MOMT Add_Line_Text
        /// </summary>
        public List <FstiResult> MomtAddLineTexts(FstiToken token, MomtAddInput input)
        {
            List <FstiResult> resultList = new List <FstiResult>();

            using (var fstiService = this._fstiHelper.CreateFSTIService())
            {
                foreach (var line in input.MomtAddLines)
                {
                    if (line.IsNeedAddLineText())
                    {
                        string result = fstiService.MOMT_ADDLineText(token.Token.ToString(),
                                                                     input.MoNumber,
                                                                     line.MoLineNumber.ToString(),
                                                                     line.ItemNumber,
                                                                     line.MoLineType,
                                                                     line.TextLine1 ?? "",
                                                                     line.TextLine2 ?? "",
                                                                     line.TextLine3 ?? "",
                                                                     line.TextLine4 ?? "");
                        resultList.Add(FstiResult.Build(result));
                    }
                    else
                    {
                        //无需执行AddLineText接口
                        resultList.Add(FstiResult.Success);
                    }
                }
            }
            return(resultList);
        }
예제 #2
0
 /// <summary>
 /// MOMT Add_Header
 /// </summary>
 public FstiResult MomtAddHeader(FstiToken token, MomtAddInput input)
 {
     using (var fstiService = this._fstiHelper.CreateFSTIService())
     {
         string result = fstiService.MOMT_ADDHeader(token.Token.ToString(),
                                                    input.MoNumber,
                                                    input.Planner,
                                                    input.WorkCenter,
                                                    input.DeliverTo);
         return(FstiResult.Build(result));
     }
 }
예제 #3
0
        /// <summary>
        /// MOMT Add_Line
        /// </summary>
        public List <FstiResult> MomtAddLines(FstiToken token, MomtAddInput input)
        {
            List <FstiResult> resultList = new List <FstiResult>();

            using (var fstiService = this._fstiHelper.CreateFSTIService())
            {
                foreach (var line in input.MomtAddLines)
                {
                    string result = fstiService.MOMT_ADDLine(token.Token.ToString(),
                                                             input.MoNumber,
                                                             line.ItemNumber,
                                                             line.MoLineType,
                                                             line.ItemOrderedQuantity.ToString("0.000000"),
                                                             line.MoLineStatus.ToString(),
                                                             line.StartDate.ToString("yyMMdd"),
                                                             line.ScheduledDate.ToString("yyMMdd"));
                    resultList.Add(FstiResult.Build(result));
                }
            }
            return(resultList);
        }