From c8b1ba855be2663a1da3444c54d8af5a202a4b7e Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期一, 06 三月 2023 16:33:32 +0800
Subject: [PATCH] 1.节拍工价新增、编辑加工价类型字段区分自制、外协 2.工序编辑,工序类型切换保存时删除对应节拍工价表 3.工单派发时判断区分自制、外协工序 4.计件工资报表增加剔除工序参数

---
 VueWebApi/DLL/DAL/ProductionManagementDAL.cs |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/VueWebApi/DLL/DAL/ProductionManagementDAL.cs b/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
index 5eaecd0..be3521a 100644
--- a/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
+++ b/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
@@ -537,10 +537,11 @@
                     }
                 }
                 //鍒ゆ柇宸ヨ壓璺嚎瀵瑰簲宸ュ簭鍏宠仈鐨勫伐浣滅珯鏄惁鏈夎缃妭鎷嶅伐浠�
-                sql = @"select AA.step_code,AA.eqp_code,S.unprice  from (
-                        select A.code,B.step_code,C.eqp_code from TFlw_Rout A
+                sql = @"select AA.step_code,AA.eqp_code,AA.flwtype,S.unprice  from (
+                        select A.code,B.step_code,C.eqp_code,S.flwtype from TFlw_Rout A
                         inner join TFlw_Rtdt B on A.code=B.rout_code
                         left join TFlw_Rteqp C on B.step_code=C.step_code
+                        left join TStep S on B.step_code=S.stepcode
                         where A.code=@route_code
                         ) as AA
                         left join (select * from TPrteEqp_Stad   where materiel_code=@partcode and route_code=@route_code) as S on
@@ -550,13 +551,16 @@
                 var dtc = DapperHelper.selectdata(sql, dynamicParams);
                 for (int i = 0; i < dtc.Rows.Count; i++)
                 {
-                    if (dtc.Rows[i].IsNull("unprice") || decimal.Parse(dtc.Rows[i]["unprice"].ToString()) == 0)
+                    if (dtc.Rows[i]["flwtype"].ToString() == "Z") //鍒ゆ柇宸ュ簭鏄惁涓鸿嚜鍒�
                     {
-                        mes.code = "300";
-                        mes.count = 0;
-                        mes.Message = "鑺傛媿宸ヤ环涓細褰撳墠浜у搧銆�" + partcode + "銆戯紝瀵瑰簲宸ヨ壓璺嚎銆�" + routecode + "銆戞湭璁剧疆(鎴栨湭璁剧疆鍏�)鎴栧伐浠峰皬浜庣瓑浜�0!";
-                        mes.data = null;
-                        return mes;
+                        if (dtc.Rows[i].IsNull("unprice") || decimal.Parse(dtc.Rows[i]["unprice"].ToString()) == 0)
+                        {
+                            mes.code = "300";
+                            mes.count = 0;
+                            mes.Message = "鑺傛媿宸ヤ环涓細褰撳墠浜у搧銆�" + partcode + "銆戯紝瀵瑰簲宸ヨ壓璺嚎銆�" + routecode + "銆戞湭璁剧疆(鎴栨湭璁剧疆鍏�)鎴栧伐浠峰皬浜庣瓑浜�0!";
+                            mes.data = null;
+                            return mes;
+                        }
                     }
                 }
             }

--
Gitblit v1.9.3