盘点记录添加machine_id查询条件
This commit is contained in:
		
							parent
							
								
									3d512a00e6
								
							
						
					
					
						commit
						d405184691
					
				| 
						 | 
					@ -83,7 +83,7 @@ namespace DM_Weight.Report
 | 
				
			||||||
            //});
 | 
					            //});
 | 
				
			||||||
            string machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
					            string machine_id = (ConfigurationManager.AppSettings["machineId"] ?? "DM1");
 | 
				
			||||||
            string SQL = $@"SELECT cl.`row_no` AS drawerNo,cl.`col_no` AS colNo,cl.`quantity` AS quantity,cl.`manu_no` AS manuNo,cl.`eff_date` AS effDate,
 | 
					            string SQL = $@"SELECT cl.`row_no` AS drawerNo,cl.`col_no` AS colNo,cl.`quantity` AS quantity,cl.`manu_no` AS manuNo,cl.`eff_date` AS effDate,
 | 
				
			||||||
                          `drug_name` AS drugName,`drug_spec` AS drugSpec,`pack_unit` AS packUnit,di.small_unit as smallUnit,`manufactory` AS manuFactory,`max_stock` AS baseQuantity,
 | 
					                          `drug_name` AS drugName,`drug_spec` AS drugSpec,`pack_unit` AS smallUnit,`manufactory` AS manuFactory,`max_stock` AS baseQuantity,
 | 
				
			||||||
                          cl.`drug_id` AS drugId,cl.manuquantity, cl.`optdate` FROM check_stock cl WHERE cl.`machine_id` =  '{machine_id}' AND cl.`optdate` > '{p_startDate}' AND cl.`optdate` < '{p_endDate}' ORDER BY cl.`optdate` desc, cl.`drug_id`";
 | 
					                          cl.`drug_id` AS drugId,cl.manuquantity, cl.`optdate` FROM check_stock cl WHERE cl.`machine_id` =  '{machine_id}' AND cl.`optdate` > '{p_startDate}' AND cl.`optdate` < '{p_endDate}' ORDER BY cl.`optdate` desc, cl.`drug_id`";
 | 
				
			||||||
            // 加载模板文件
 | 
					            // 加载模板文件
 | 
				
			||||||
            Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_check_new2.grf");
 | 
					            Report.LoadFromFile(new FileInfo(AppDomain.CurrentDomain.BaseDirectory) + "ReportTemp//" + "machine_log_check_new2.grf");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -145,7 +145,7 @@ namespace DM_Weight.ViewModels
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            int totalCount = 0;
 | 
					            int totalCount = 0;
 | 
				
			||||||
            string strSql = @"SELECT optDate AS optdate,U.User_name AS operatorUser,R.User_name AS reviewerUser,Drug_spec AS drugSpec,Manufactory AS manufactory,Quantity FROM check_stock C 
 | 
					            string strSql = @"SELECT optDate AS optdate,U.User_name AS operatorUser,R.User_name AS reviewerUser,Drug_spec AS drugSpec,Manufactory AS manufactory,Quantity FROM check_stock C 
 | 
				
			||||||
                                LEFT JOIN user_list U ON C.operator=U.ID  LEFT JOIN user_list R ON C.reviewer=R.ID WHERE  C.machine_id='" + ConfigurationManager.AppSettings["machineId"] ?? "DM1" + "'";
 | 
					                                LEFT JOIN user_list U ON C.operator=U.ID  LEFT JOIN user_list R ON C.reviewer=R.ID WHERE  C.machine_id='" + (ConfigurationManager.AppSettings["machineId"] ?? "DM1") + "'";
 | 
				
			||||||
            if (StartDate!=null)
 | 
					            if (StartDate!=null)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                strSql += " AND C.optDate>@OPTSTARTDATE ";
 | 
					                strSql += " AND C.optDate>@OPTSTARTDATE ";
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue