| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using SQLHelper; |
| | | using System; |
| | |
| | | bar.HMTONO = oItemSub.HMTONO; |
| | | bar.HSupBatchNo = oItemSub.HSupBatchNo; |
| | | bar.HSupMaterNumber = oItemSub.HSupMaterNumber; |
| | | bar.HISKFPERIOD = oItemSub.HISKFPERIOD; |
| | | ls2.Add(bar); |
| | | } |
| | | } |
| | |
| | | bar2.HMTONO = oItemSub2.HMTONO; |
| | | bar2.HSupBatchNo = DBUtility.ClsPub.isStrNull(oItemSub2.HSupBatchNo); |
| | | bar2.HSupMaterNumber = DBUtility.ClsPub.isStrNull(oItemSub2.HSupMaterNumber); |
| | | bar2.HISKFPERIOD = DBUtility.ClsPub.isInt(oItemSub2.HISKFPERIOD); |
| | | ls3.Add(bar2); |
| | | //LogService.Write("测试加+++" + oItemSub2.HSupID); |
| | | } |
| | |
| | | string HMTONO = ""; |
| | | string HSupBatchNo = ""; |
| | | string HSupMaterNumber = ""; |
| | | Int64 HISKFPERIOD = 0; |
| | | oCn.BeginTran(); |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | | { |
| | |
| | | HWei = ClsPub.isStrNull(oItemSub.HEndQty); |
| | | HSupBatchNo = ClsPub.isStrNull(oItemSub.HSupBatchNo); |
| | | HSupMaterNumber = ClsPub.isStrNull(oItemSub.HSupMaterNumber); |
| | | HISKFPERIOD = DBUtility.ClsPub.isInt(oItemSub.HISKFPERIOD); |
| | | |
| | | if (FCusName.Contains("夏宝")) |
| | | { |
| | | HBarCode = $"{oItemSub.HMaterID}"; |
| | |
| | | } |
| | | string sql = "insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO,HSupBatchNo,HSupMaterNumber " + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO,HSupBatchNo,HSupMaterNumber,HProduceDate,HExpiryDate,HISKFPERIOD " + |
| | | ") values (" |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "','" + HSupBatchNo+ "','" + HSupMaterNumber + "'" + |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "','" + HSupBatchNo+ "','" + HSupMaterNumber + "','" + HKFDate + "','" + HKFDQDate + "'," + HISKFPERIOD + |
| | | ")"; |
| | | oCn.RunProc(sql); |
| | | //LogService.Write(sql); |
| | |
| | | HWei = ClsPub.isStrNull(oItemSub.HEndQty); |
| | | HSupBatchNo = ClsPub.isStrNull(oItemSub.HSupBatchNo); |
| | | HSupMaterNumber = ClsPub.isStrNull(oItemSub.HSupMaterNumber); |
| | | HISKFPERIOD = ClsPub.isInt(oItemSub.HISKFPERIOD); |
| | | if (FCusName.Contains("夏宝")) |
| | | { |
| | | HBarCode = $"{oItemSub.HMaterID}"; |
| | |
| | | } |
| | | string sql = "insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO ,HSupBatchNo,HSupMaterNumber" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO ,HSupBatchNo,HSupMaterNumber,HProduceDate,HExpiryDate,HISKFPERIOD" + |
| | | ") values (" |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "','" + |
| | | HSupBatchNo + "','" + HSupMaterNumber + "'" + ")"; |
| | | HSupBatchNo + "','" + HSupMaterNumber + "','" + HKFDate + "','" + HKFDQDate + "'," + HISKFPERIOD + ")"; |
| | | oCn.RunProc(sql); |
| | | //LogService.Write(sql); |
| | | } |
| | |
| | | public object GetBarCodeShowList([FromBody] JObject msg) |
| | | { |
| | | string HSupNo = msg["HSupNo"].ToString(); string sqlWhere = msg["sqlWhere"].ToString(); |
| | | //添加列名 |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | string VsWhere = ""; |
| | |
| | | } |
| | | else |
| | | { |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名 |
| | | } |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 10000; |
| | | objjson.Message = "获取成功"; |
| | | objjson.data = ds.Tables[0]; |
| | | objjson.list = columnNameList; |
| | | return objjson; |
| | | } |
| | | } |
| | |
| | | bar.HSupID = oItemSub.HSupID; |
| | | bar.HEndQty = WeiShu; |
| | | bar.HMTONO = oItemSub.HMTONO; |
| | | bar.HISKFPERIOD = oItemSub.HISKFPERIOD; |
| | | ls2.Add(bar); |
| | | } |
| | | } |
| | |
| | | bar2.HSupID = oItemSub2.HSupID; |
| | | bar2.HEndQty = WeiShu1; |
| | | bar2.HMTONO = oItemSub2.HMTONO; |
| | | bar2.HISKFPERIOD = oItemSub2.HISKFPERIOD; |
| | | ls3.Add(bar2); |
| | | } |
| | | } |
| | |
| | | string HKFDQDate = ""; |
| | | string HWei = ""; |
| | | string HMTONO = ""; |
| | | Int64 HISKFPERIOD = 0; |
| | | oCn.BeginTran(); |
| | | foreach (Model.ClsGy_MaterialList_WMS_Model oItemSub in ls) |
| | | { |
| | |
| | | HSourceEntryID = ClsPub.isLong(oItemSub.HSourceEntryID); |
| | | HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo); |
| | | HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType); |
| | | HISKFPERIOD = ClsPub.isInt(oItemSub.HISKFPERIOD); |
| | | HWei = ClsPub.isStrNull(oItemSub.HEndQty); |
| | | if (FCusName.Contains("夏宝")) |
| | | { |
| | |
| | | } |
| | | string sql = "insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + |
| | | ",HBatchNo,HBarcodeQtys,HBarcodeNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO,HProduceDate,HExpiryDate,HISKFPERIOD" + |
| | | ") values (" |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "','" + SubModel.Count + "','" + count + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"; |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "','" |
| | | + HKFDate + "','" + HKFDQDate + "'," + HISKFPERIOD + ")"; |
| | | oCn.RunProc(sql); |
| | | oCn.RunProc("exec setLSH '" + DateTime.Today + "'"); |
| | | count++; |
| | |
| | | HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo); |
| | | HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType); |
| | | HWei = ClsPub.isStrNull(oItemSub.HEndQty); |
| | | HISKFPERIOD = ClsPub.isInt(oItemSub.HISKFPERIOD); |
| | | if (FCusName.Contains("夏宝")) |
| | | { |
| | | HBarCode = $"{oItemSub.HMaterID}"; |
| | |
| | | } |
| | | string sql = "insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + |
| | | ",HBatchNo,HBarcodeQtys,HBarcodeNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO,HProduceDate,HExpiryDate,HISKFPERIOD" + |
| | | ") values (" |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "','" + SubModel.Count + "','" + _count + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"; |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "','" |
| | | + HKFDate + "','" + HKFDQDate + "'," + HISKFPERIOD + ")"; |
| | | oCn.RunProc(sql); |
| | | _count++; |
| | | } |