|
|
|
string sql = @"select w.Weight_Id MID,p.Plan_Id,p.Plan_Num,p.Real_Num,p.Plan_Serial,p.Plan_State,p.Plan_Date,p.Plan_StateText,r.ID as RecipeID,r.Recipe_Serial,r.Recipe_Name,r.Version,r.Recipe_Verify,r.Total_Weight,r.Total_Error,m.ID as MaterialID,m.Material_name,m.Material_code,w.Set_Weight,w.Set_Error,
|
|
|
|
string sql = @"select w.Weight_Id MID,p.Plan_Id,p.Plan_Num,p.Real_Num,p.Plan_Serial,p.Plan_State,p.Plan_Date,p.Plan_StateText,r.ID as RecipeID,r.Recipe_Serial,r.Recipe_Name,r.Version,r.Recipe_Verify,r.Total_Weight,r.Total_Error,m.ID as MaterialID,m.Material_name,m.Material_code,w.Set_Weight,w.Set_Error,
|
|
|
|
hw.Plan_ID MaterialPlan,ISNULL(w.IsRate,0) as IsRate from RT_plan p left join Pmt_recipe r on p.Recipe_ID=r.ID left join Pmt_weigh w on r.ID=w.Recipe_ID
|
|
|
|
hw.Plan_ID MaterialPlan,ISNULL(w.IsRate,0) as Exist from RT_plan p left join Pmt_recipe r on p.Recipe_ID=r.ID left join Pmt_weigh w on r.ID=w.Recipe_ID
|