From c1043376ada7e510eb53e64d76238cceb539eb45 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期二, 07 三月 2023 17:19:44 +0800
Subject: [PATCH] App个人计件工资

---
 VueWebApi/DLL/DAL/AppPersonalDAL.cs |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/VueWebApi/DLL/DAL/AppPersonalDAL.cs b/VueWebApi/DLL/DAL/AppPersonalDAL.cs
index 1f1b6e1..a23b900 100644
--- a/VueWebApi/DLL/DAL/AppPersonalDAL.cs
+++ b/VueWebApi/DLL/DAL/AppPersonalDAL.cs
@@ -34,8 +34,9 @@
                 dynamicParams.Add("@usercode", usercode);
                 dynamicParams.Add("@startopendate", startopendate + " 00:00:00");
                 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,11 +76,11 @@
                              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
-                             where B.report_person=@usercode and B.report_date between @startopendate and @endclosedate "+search+") as AA  group by AA.wo_code,AA.partcode,AA.partname,AA.stepcode,AA.stepname,AA.task_qty,AA.group_code,AA.group_name,AA.unprice,AA.ratio,AA.report_person,AA.username,colum";
+                             where B.report_person=@usercode and B.report_date between @startopendate and @endclosedate " + search+") as AA  group by AA.wo_code,AA.partcode,AA.partname,AA.stepcode,AA.stepname,AA.task_qty,AA.group_code,AA.group_name,AA.unprice,AA.ratio,AA.report_person,AA.username,colum";
                 var data1 = DapperHelper.selectdata(sql1, dynamicParams);
                 dList.Add("dt1", data1);
                 mes.code = "200";

--
Gitblit v1.9.3