入库后报表的批次库存数(实物)与上一次出库后的批次库存数差别大,修改可能存在的问题
This commit is contained in:
		
							parent
							
								
									e1629fbdc7
								
							
						
					
					
						commit
						013e282189
					
				| 
						 | 
					@ -259,12 +259,11 @@ namespace DM_Weight.ViewModels
 | 
				
			||||||
                            }).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand();
 | 
					                            }).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand();
 | 
				
			||||||
                            // 获取更新完库存后的药品库存
 | 
					                            // 获取更新完库存后的药品库存
 | 
				
			||||||
                            List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
 | 
					                            List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
 | 
				
			||||||
                                .Where(cs => cs.MachineId.Equals(it.MachineId)||cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"]))
 | 
					                                .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"]) ||cs.MachineId.Equals(ConfigurationManager.AppSettings["jj_machineId"]))
 | 
				
			||||||
                                .Where(cs => cs.DrugId.Equals(it.DrugId))
 | 
					                                .Where(cs => cs.DrugId.Equals(it.DrugId))
 | 
				
			||||||
                                .Where(cs=>cs.ManuNo.Equals(it.ManuNo))
 | 
					                                .Where(cs=>cs.ManuNo.Equals(it.ManuNo))
 | 
				
			||||||
                                .Where(cs => cs.DrawerType == 1)
 | 
					                                .Where(cs => cs.DrawerType == 1)
 | 
				
			||||||
                                .ToList();
 | 
					                                .ToList();
 | 
				
			||||||
 | 
					 | 
				
			||||||
                            // 保存数据 出/入库记录
 | 
					                            // 保存数据 出/入库记录
 | 
				
			||||||
                            SqlSugarHelper.Db.Insertable(new MachineRecord()
 | 
					                            SqlSugarHelper.Db.Insertable(new MachineRecord()
 | 
				
			||||||
                            {
 | 
					                            {
 | 
				
			||||||
| 
						 | 
					@ -280,7 +279,8 @@ namespace DM_Weight.ViewModels
 | 
				
			||||||
                                Quantity = it.AddQuantity,
 | 
					                                Quantity = it.AddQuantity,
 | 
				
			||||||
                                Type = 1,
 | 
					                                Type = 1,
 | 
				
			||||||
                                InvoiceId = InvoiceId
 | 
					                                InvoiceId = InvoiceId
 | 
				
			||||||
                                //,StockQuantity = nowChannels.Sum(it => it.Quantity)
 | 
					                                ,
 | 
				
			||||||
 | 
					                                ReturnQuantity1 = nowChannels.Sum(it => it.Quantity)
 | 
				
			||||||
                            }).ExecuteCommand();
 | 
					                            }).ExecuteCommand();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            //查询上一条账册中的空瓶数
 | 
					                            //查询上一条账册中的空瓶数
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue