| | |
| | | left join TStep S on A.step_code=S.stepcode |
| | | left join TMateriel_Info P on A.materiel_code=P.partcode |
| | | left join TOrganization F on M.wkshp_code=F.torg_code |
| | | where A.style='B' and B.style='B' and A.verify='Y' and B.usergroup_code='' |
| | | union all |
| | | select M.wkshp_code,F.torg_name as wkshp_name,M.saleOrderCode,A.wo_code,A.materiel_code as partcode,P.partname,P.partspec,A.step_seq,A.step_code,S.stepname,S.flwtype as steptype,K.isend, |
| | | M.plan_qty as task_qty,B.sqty as report_qty,isnull(A.step_price,0) as step_price,(B.sqty*isnull(A.step_price,0)) as moneys, |
| | | B.in_person as usercode, |
| | | STUFF((SELECT ',' + U.username |
| | | FROM TUser U |
| | | WHERE CHARINDEX(',' + U.usercode + ',', ',' + B.in_person + ',') > 0 |
| | | FOR XML PATH('')), 1, 1, '') AS username, |
| | | B.in_time as report_date |
| | | from TK_Wrk_OutRecord A |
| | | inner join TK_Wrk_OutRecordSub B on A.id = B.m_id |
| | | left join TK_Wrk_Man M on A.wo_code = M.wo_code |
| | | left join TK_Wrk_Step K on M.wo_code=K.wo_code and A.step_code=K.step_code |
| | | left join TStep S on A.step_code = S.stepcode |
| | | left join TMateriel_Info P on A.materiel_code = P.partcode |
| | | left join TOrganization F on M.wkshp_code=F.torg_code |
| | | where A.style = 'S' and B.style = 'S' and A.verify='Y' |
| | | where A.style='B' and B.style='B' and B.payrate='S' and A.verify='Y' and B.usergroup_code='' |
| | | ) as AA |
| | | where " + search; |
| | | var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total); |
| | |
| | | left join TStep S on A.step_code=S.stepcode |
| | | left join TMateriel_Info P on A.materiel_code=P.partcode |
| | | left join TOrganization F on M.wkshp_code=F.torg_code |
| | | where A.style='B' and B.style='B' and A.verify='Y' and B.usergroup_code='' |
| | | union all |
| | | select M.wkshp_code,F.torg_name as wkshp_name,M.saleOrderCode,A.wo_code,A.materiel_code as partcode,P.partname,P.partspec,A.step_seq,A.step_code,S.stepname,S.flwtype as steptype,K.isend, |
| | | M.plan_qty as task_qty,B.sqty as report_qty,isnull(A.step_price,0) as step_price,(B.sqty*isnull(A.step_price,0)) as moneys, |
| | | B.in_person as usercode, |
| | | STUFF((SELECT ',' + U.username |
| | | FROM TUser U |
| | | WHERE CHARINDEX(',' + U.usercode + ',', ',' + B.in_person + ',') > 0 |
| | | FOR XML PATH('')), 1, 1, '') AS username, |
| | | B.in_time as report_date |
| | | from TK_Wrk_OutRecord A |
| | | inner join TK_Wrk_OutRecordSub B on A.id = B.m_id |
| | | left join TK_Wrk_Man M on A.wo_code = M.wo_code |
| | | left join TK_Wrk_Step K on M.wo_code=K.wo_code and A.step_code=K.step_code |
| | | left join TStep S on A.step_code = S.stepcode |
| | | left join TMateriel_Info P on A.materiel_code = P.partcode |
| | | left join TOrganization F on M.wkshp_code=F.torg_code |
| | | where A.style = 'S' and B.style = 'S' and A.verify='Y' |
| | | where A.style='B' and B.style='B' and B.payrate='S' and A.verify='Y' and B.usergroup_code='' |
| | | ) as AA |
| | | where " + search; |
| | | DataTable data = DapperHelper.selectdata(sql, dynamicParams); |