| | |
| | | } |
| | | |
| | | //1.根据工单+工序查找当前工序是否首道工序 |
| | | sql = @"select A.wo_code,P.partcode,P.partname,P.partspec, T.stepcode,T.stepname,A.seq,T.flwtype,T.descr,A.status,A.plan_qty,A.isbott,A.isend,L.org_code,L.org_name |
| | | sql = @"select A.wo_code,P.partcode,P.partname,P.partspec, T.stepcode,T.stepname,A.stepprice,A.seq,T.flwtype,T.descr,A.status,A.plan_qty,A.isbott,A.isend,L.org_code,L.org_name |
| | | from TK_Wrk_Step A |
| | | left join TStep T on A.step_code=T.stepcode |
| | | left join TK_Wrk_Man M on A.wo_code=M.wo_code |
| | |
| | | rt.stepcode = data.Rows[0]["STEPCODE"].ToString(); //工序编码 |
| | | rt.stepname = data.Rows[0]["STEPNAME"].ToString(); //工序名称 |
| | | rt.stepdesc = data.Rows[0]["DESCR"].ToString(); //工序描述 |
| | | rt.stepprice= data.Rows[0]["STEPPRICE"].ToString(); //工序工价 |
| | | rt.planqty = decimal.Parse(data.Rows[0]["PLAN_QTY"].ToString()); //任务数量 |
| | | |
| | | flwtype = data.Rows[0]["FLWTYPE"].ToString();//获取工序属性 |
| | |
| | | rt.seq = data.Rows[0]["SEQ"].ToString();//工序序号 |
| | | |
| | | //获取当前工序下道工序 |
| | | sql = @"select A.isbott,A.isend,T.stepcode,T.stepname from TK_Wrk_Step A |
| | | sql = @"select A.isbott,A.isend,T.stepcode,T.stepname,A.stepprice from TK_Wrk_Step A |
| | | left join TStep T on A.step_code=T.stepcode |
| | | where A.wo_code=@ordercode and A.seq=@seq+1 "; |
| | | dynamicParams.Add("@ordercode", ordercode); |
| | |
| | | { |
| | | rt.nextstepcode = dt.Rows[0]["STEPCODE"].ToString();//下道工序编码 |
| | | rt.nextstepname = dt.Rows[0]["STEPNAME"].ToString();//下道工序名称 |
| | | rt.nextstepprice = data.Rows[0]["NEXTSTEPPRICE"].ToString(); //下道工序工价 |
| | | } |
| | | if (isend == "Y") //当前工序是末道工序 |
| | | { |
| | | rt.nextstepcode = "";//data.Rows[0]["STEPCODE"].ToString();//当前工序编码 |
| | | rt.nextstepname = "";// data.Rows[0]["STEPNAME"].ToString();//当前工序名称 |
| | | rt.nextstepprice = "";// data.Rows[0]["STEPPRICE"].ToString();//当前工序工价 |
| | | } |
| | | } |
| | | else |
| | |
| | | } |
| | | |
| | | //1.根据工单+工序查找当前工序是否首道工序 |
| | | sql = @"select A.wo_code,P.partcode,P.partname,P.partspec, T.stepcode,T.stepname,A.seq,T.flwtype,T.descr,A.status,A.plan_qty,A.isbott,A.isend,L.org_code,L.org_name |
| | | sql = @"select A.wo_code,P.partcode,P.partname,P.partspec, T.stepcode,T.stepname,A.seq,T.flwtype,T.descr,A.stepprice,A.status,A.plan_qty,A.isbott,A.isend,L.org_code,L.org_name |
| | | from TK_Wrk_Step A |
| | | left join TStep T on A.step_code=T.stepcode |
| | | left join TK_Wrk_Man M on A.wo_code=M.wo_code |
| | |
| | | rt.stepname = data.Rows[0]["STEPNAME"].ToString(); //工序名称 |
| | | rt.stepdesc = data.Rows[0]["DESCR"].ToString(); //工序描述 |
| | | rt.planqty = decimal.Parse(data.Rows[0]["PLAN_QTY"].ToString()); //任务数量 |
| | | |
| | | rt.stepprice = data.Rows[0]["STEPPRICE"].ToString(); //工序工价 |
| | | flwtype = data.Rows[0]["FLWTYPE"].ToString();//获取工序属性 |
| | | isbott = data.Rows[0]["ISBOTT"].ToString();//首道工序 |
| | | isend = data.Rows[0]["ISEND"].ToString();//末道工序 |
| | | rt.seq = data.Rows[0]["SEQ"].ToString();//工序序号 |
| | | |
| | | //获取当前工序下道工序 |
| | | sql = @"select A.isbott,A.isend,T.stepcode,T.stepname from TK_Wrk_Step A |
| | | sql = @"select A.isbott,A.isend,T.stepcode,T.stepname,A.stepprice from TK_Wrk_Step A |
| | | left join TStep T on A.step_code=T.stepcode |
| | | where A.wo_code=@ordercode and A.seq=@seq+1 "; |
| | | dynamicParams.Add("@ordercode", ordercode); |
| | |
| | | { |
| | | rt.nextstepcode = dt.Rows[0]["STEPCODE"].ToString();//下道工序编码 |
| | | rt.nextstepname = dt.Rows[0]["STEPNAME"].ToString();//下道工序名称 |
| | | rt.nextstepprice = data.Rows[0]["NEXTSTEPPRICE"].ToString(); //下道工序工价 |
| | | } |
| | | if (isend == "Y") //当前工序是末道工序 |
| | | { |
| | | rt.nextstepcode = "";// data.Rows[0]["STEPCODE"].ToString();//当前工序编码 |
| | | rt.nextstepname = "";// data.Rows[0]["STEPNAME"].ToString();//当前工序名称 |
| | | rt.nextstepprice = ""; //data.Rows[0]["NEXTSTEPPRICE"].ToString();//下道工序工价 |
| | | } |
| | | } |
| | | else |