Пример #1
0
        public OperationResult ActionNgConfirm(string card)
        {
            OperationResult operationResult = new OperationResult(OperationResultType.Error);

            if (card == null)
            {
                operationResult.Message = "条码不能为空";
                return(operationResult);
            }
            Ts ts = TsFormService.Tss().Where(t => t.rcard == card).OrderByDescending(t => t.TSID).FirstOrDefault();

            if (ts == null)
            {
                operationResult.Message = "该产品没有登记不良品";
                return(operationResult);
            }
            if (!(ts.tsstatus == TsStatus.NEW || ts.tsstatus == TsStatus.CONFIRM))
            {
                operationResult.Message = "该产品状态不对";
                return(operationResult);
            }

            foreach (var ter in ts.tsErrorCodes.ToList())
            {
                foreach (var tc in ter.tsErrorCauses.ToList())
                {
                    var a = tc.solution;
                    var b = tc.duty;
                    var c = tc.errorCodeSeason.ecsg;
                    var d = tc.errorCom;
                }
                ter.errorCode.ToString();
                ter.errorCode.ecg.ToString();
            }
            ts.tsstatus = TsStatus.CONFIRM;
            TsFormService.UpdateEntity(ts);
            operationResult.ResultType = OperationResultType.Success;
            operationResult.Message    = "确认成功";
            operationResult.AppendData = ts;
            return(operationResult);
        }
Пример #2
0
        public OperationResult SaveTs(Ts ts)
        {
            OperationResult operationResult = TsFormService.UpdateEntity(ts);

            return(operationResult);
        }