yl
2023-03-07 c1043376ada7e510eb53e64d76238cceb539eb45
VueWebApi/DLL/DAL/AppPersonalDAL.cs
@@ -36,6 +36,7 @@
                dynamicParams.Add("@endclosedate", endclosedate + " 23:59:59");
                
                // --------------查询报工数、良品扣除、计算工资收入--------------
                //left  join TPrteEqp_Stad S on A.materiel_code=S.materiel_code and A.eqp_code=S.eqp_code and A.step_code=S.step_code and K.route_code=S.route_code and K.wkshp_code=S.wkspcode
                var sql = @"select isnull(sum(BB.report_qty),0) as report_qty,(isnull(sum(BB.userngmoney),0)+isnull(sum(BB.userbadmoney),0)) as userngbadmoney,
                            isnull(sum(BB.usermoney),0)-(isnull(sum(BB.userngmoney),0)+isnull(sum(BB.userbadmoney),0)) as usermoney 
                            from (
@@ -52,7 +53,7 @@
                            inner join TK_Wrk_Step P on A.wo_code=P.wo_code and A.step_code=P.step_code 
                            left  join TK_Wrk_Man K on A.wo_code=K.wo_code
                            left  join TGroup G on B.usergroup_code=G.group_code
                            left  join TPrteEqp_Stad S on A.materiel_code=S.materiel_code and A.eqp_code=S.eqp_code and A.step_code=S.step_code and K.route_code=S.route_code and K.wkshp_code=S.wkspcode
                            left  join TWoPrteEqp_Stad S on A.wo_code=S.wo and A.materiel_code=S.materiel_code and A.eqp_code=S.eqp_code and A.step_code=S.step_code and K.route_code=S.route_code
                            left  join TMateriel_Info M on A.materiel_code=M.partcode
                            left  join TStep T on A.step_code=T.stepcode
                            left  join TUser U on B.report_person=U.usercode
@@ -75,7 +76,7 @@
                             inner join TK_Wrk_Step P on A.wo_code=P.wo_code and A.step_code=P.step_code 
                             left  join TK_Wrk_Man K on A.wo_code=K.wo_code
                             left  join TGroup G on B.usergroup_code=G.group_code
                             left  join TPrteEqp_Stad S on A.materiel_code=S.materiel_code and A.eqp_code=S.eqp_code and A.step_code=S.step_code and K.route_code=S.route_code and K.wkshp_code=S.wkspcode
                             left  join TWoPrteEqp_Stad S on A.wo_code=S.wo and A.materiel_code=S.materiel_code and A.eqp_code=S.eqp_code and A.step_code=S.step_code and K.route_code=S.route_code
                             left  join TMateriel_Info M on A.materiel_code=M.partcode
                             left  join TStep T on A.step_code=T.stepcode
                             left  join TUser U on B.report_person=U.usercode