| | |
| | | |
| | | |
| | | #region[生产管理,修改报工数据查询接口] |
| | | public static ToMessage MesOrderStepVerifySearch(string reporttype, string wo_code, string partnumber, string partname, string partspec, string reportuser, string reportdateopendate, string reportdateclosedate, int startNum, int endNum, string prop, string order) |
| | | public static ToMessage MesOrderStepVerifySearch(string verify, string wo_code, string partnumber, string partname, string partspec, string reportuser, string reportdateopendate, string reportdateclosedate, int startNum, int endNum, string prop, string order) |
| | | { |
| | | var dynamicParams = new DynamicParameters(); |
| | | string search = ""; |
| | | try |
| | | { |
| | | if (reporttype != "" && reporttype != null) |
| | | if (verify != "" && verify != null) |
| | | { |
| | | if (reporttype == "BZ") |
| | | { |
| | | search += "and AA.usergroup_code<>''"; |
| | | } |
| | | else |
| | | { |
| | | search += "and AA.usergroup_code='' "; |
| | | } |
| | | search += "and B.verify=@verify "; |
| | | dynamicParams.Add("@verify", verify); |
| | | } |
| | | if (wo_code != "" && wo_code != null) |
| | | { |
| | |
| | | var sql = @"select * from( |
| | | select A.id,B.id as sbid,A.wo_code,A.materiel_code as partnumber,P.partname,P.partspec,A.task_qty,M.wkshp_code,G.org_name as wkshp_name,A.eqp_code,E.name as eqp_name, |
| | | M.route_code,R.name as route_name,A.step_code,S.stepname,S.flwtype,D.first_choke,D.last_choke,T.unprice,B.usergroup_code,O.group_name as usergroup_name,B.report_person as usercode,U.username, |
| | | B.report_date,B.report_qty,B.ng_qty,B.bad_qty |
| | | B.report_date,B.report_qty,B.ng_qty,B.bad_qty,B.verify |
| | | from TK_Wrk_Record A |
| | | inner join TK_Wrk_RecordSub B on A.id=B.m_id |
| | | left join TK_Wrk_Man M on A.wo_code=M.wo_code |