| | |
| | | } |
| | | //从U9获取收货单行信息 |
| | | var u9Dtl = Biz.DataSource["YadaU9C"].Client.Queryable<mes_ReturnedDocInfo>().Where(x => x.RcvId == receipt.ID.ToDouble() && x.DocLineNo == receiptDtl.LINE_NO.ToDouble() && x.SplitFlag != 1).First(); |
| | | //收货单的状态判断是否已提交IQC审核,未通过IQC不能上架 |
| | | if (!u9Dtl.IsNullOrEmpty() && u9Dtl.Status != 3) |
| | | { |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = Biz.L("收货单行状态[{0}]异常,请先提交IQC检验结果"); |
| | | action.LocaleMsg = Biz.L("WMS.In_BIZ_U9_RECEIPT.ScanItem.U9StatusException", u9Dtl.StatusName); |
| | | return SetOutPutMqttMsg(action, input.Locale); |
| | | } |
| | | if (!u9Dtl.IsNullOrEmpty() && u9Dtl.RcvQtyTU != receiptDtl.QTY_OK) |
| | | { |
| | | receiptDtl.ID = u9Dtl.RcvLineId.ToString(); |
| | | receiptDtl.QTY_OK = u9Dtl.RcvQtyTU; |
| | | receiptDtl.QTY_NG = receiptDtl.QTY - receiptDtl.QTY_OK; |
| | | receiptDtl.ERP_STATUS_CODE = u9Dtl.Status.ToString(); |
| | | receiptDtl.ERP_STATUS_NAME = u9Dtl.StatusName; |
| | | } |
| | | |
| | | var nLocation = new WMS_LOCATION(); |
| | |
| | | var db = GetCommitDB(); |
| | | //数据保存逻辑 |
| | | db.Updateable(receipt, UserCode).UpdateColumns(q => new { q.STATUS, q.UPDATE_TIME, q.UPDATE_USER }).ExecuteCommand(); |
| | | db.Updateable(receiptDtl, UserCode).UpdateColumns(q => new { q.ID, q.STATUS, q.QTY_IN, q.QTY_OK, q.QTY_NG, q.UPDATE_TIME, q.UPDATE_USER }).ExecuteCommand(); |
| | | db.Updateable(receiptDtl, UserCode).UpdateColumns(q => new { q.ID, q.STATUS, q.QTY_IN, q.QTY_OK, q.QTY_NG, q.ERP_STATUS_CODE, q.ERP_STATUS_NAME, q.UPDATE_TIME, q.UPDATE_USER }).ExecuteCommand(); |
| | | db.Updateable(receiptSn, UserCode).UpdateColumns(q => new { q.STATUS, q.IS_IN, q.UPDATE_TIME, q.UPDATE_USER }).ExecuteCommand(); |
| | | }); |
| | | |