| | |
| | | //获取单据信息 |
| | | sql = @"select distinct saleOrderCode,A.saleOrderDate,sum(A.saleOrderqty) as saleOrderqty |
| | | from TKimp_Ewo A |
| | | where A.saleOrderCode<>'' " + search + " group by A.saleOrderCode,A.saleOrderDate order by A.saleOrderDate desc"; |
| | | where A.saleOrderCode<>'' and A.status<>'CLOSED' " + search + " group by A.saleOrderCode,A.saleOrderDate order by A.saleOrderDate desc"; |
| | | dt = DapperHelper.selectlist(sql, dynamicParams); |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | |
| | | select distinct E.wo,T.partcode,T.partname,T.partspec,sum(E.saleOrderqty) as saleOrderqty |
| | | from TKimp_Ewo E |
| | | left join TMateriel_Info T on E.materiel_code=T.partcode |
| | | where E.saleOrderCode=@saleOrderCode |
| | | where E.saleOrderCode=@saleOrderCode and E.status<>'CLOSED' |
| | | group by E.wo,T.partcode,T.partname,T.partspec |
| | | ) as AA |
| | | left join |
| | |
| | | where S.isend='Y' and S.good_qty>0 |
| | | group by M.m_po |
| | | ) as BB on E.wo=BB.m_po |
| | | where E.wo=@wo |
| | | where E.wo=@wo and E.status<>'CLOSED' |
| | | group by E.wo,T.partcode,T.partname,T.partspec,BB.good_qty"; |
| | | dynamicParams.Add("@wo", dt.Rows[i]["wo"].ToString()); |
| | | var data = DapperHelper.selectdata(sql, dynamicParams); |
| | |
| | | sql = @"select distinct A.wo_code,T.partcode,T.partname,T.partspec,A.lm_date,sum(A.plan_qty) as orderqty |
| | | from TK_Wrk_Man A |
| | | left join TMateriel_Info T on A.materiel_code=T.partcode |
| | | where 1=1 " + search + search1 + " group by A.wo_code,T.partcode,T.partname,T.partspec,A.lm_date order by A.lm_date desc"; |
| | | where A.status<>'CLOSED' " + search + search1 + " group by A.wo_code,T.partcode,T.partname,T.partspec,A.lm_date order by A.lm_date desc"; |
| | | dt = DapperHelper.selectlist(sql, dynamicParams); |
| | | if (dt.Rows.Count > 0) |
| | | { |