yl
2022-08-31 2264c47cff7ab5ce52d7c158ac0eb941e7b46506
VueWebApi/DLL/DAL/KanBanManagerentDAL.cs
@@ -71,10 +71,11 @@
                        line.linename = json[i].name;
                        //获取产线下开工总单量
                        sql = @"select COUNT(*) cont  from(
                                select distinct B.rout_code,M.wo_code  from TFlw_Rteqp  A
                                inner join TFlw_Rtdt B on A.step_code=B.step_code
                                inner join TK_Wrk_Man M on B.rout_code=M.route_code
                                where M.status<>'CLOSED'  and M.is_delete<>'1' and A.eqp_code=@linecode) as A";
                                 select distinct B.rout_code,M.wo_code from TK_Wrk_Man M
                                 left join TFlw_Rtdt B  on M.route_code=B.rout_code
                                 left join TFlw_Rteqp R on B.step_code=R.step_code
                                 where M.status<>'CLOSED'  and M.is_delete<>'1'
                                 and R.eqp_code=@linecode) as A";
                        dynamicParams.Add("@linecode", json[i].code);
                        var data = DapperHelper.selectdata(sql, dynamicParams);
                        if (data.Rows.Count > 0 && decimal.Parse(data.Rows[0]["CONT"].ToString())>0)
@@ -86,7 +87,7 @@
                                    inner join TK_Wrk_Man P on A.wo_code=P.wo_code
                                    left join TMateriel_Info M on P.materiel_code=M.partcode
                                    left join TUom T on M.uom_code=T.code 
                                    left join TKimp_Ewo E on P.m_po=E.wo
                                    left join TKimp_Ewo E on P.m_po=E.wo and P.sourceid=E.id
                                    where P.status<>'CLOSED' and P.status<>'NEW' and A.eqp_code=@linecode and A.style='S' and A.step_seq='1'";
                            dynamicParams.Add("@linecode", json[i].code);
                            var data0 = DapperHelper.selectdata(sql, dynamicParams);
@@ -194,7 +195,7 @@
                         A.plan_qty,B.good_qty,B.ng_qty,E.planstartdate,E.planenddate, datediff(day,getdate(),E.planenddate) warning
                         from TK_Wrk_Man A 
                         inner join TK_Wrk_Step B on A.wo_code=B.wo_code
                         inner join TKimp_Ewo E on A.m_po=E.wo
                         inner join TKimp_Ewo E on A.m_po=E.wo and A.sourceid=E.id
                         left  join TMateriel_Info M on A.materiel_code=M.partcode
                         left  join TUom U on M.uom_code=U.code
                         where A.status<>'CLOSED' and A.is_delete<>'1' and B.isend='Y'