From 72da1f7ca6f73346ff92bed7df96b4d28d6ccfd1 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期六, 04 三月 2023 11:25:03 +0800
Subject: [PATCH] 1.工单派发选择工艺路线或选择生产车间时判断绑定条件接口开发
2.组织架构删除update改为delete
3.工艺路线新增else if改为if
4.节拍工价根据工序线编码查找关联设备集合

---
 VueWebApi/DLL/DAL/BasicSettingDAL.cs |   37 ++++++++++---------------------------
 1 files changed, 10 insertions(+), 27 deletions(-)

diff --git a/VueWebApi/DLL/DAL/BasicSettingDAL.cs b/VueWebApi/DLL/DAL/BasicSettingDAL.cs
index 32b52e3..a07009c 100644
--- a/VueWebApi/DLL/DAL/BasicSettingDAL.cs
+++ b/VueWebApi/DLL/DAL/BasicSettingDAL.cs
@@ -244,7 +244,7 @@
                 }
                 else
                 {
-                    sql = @"update TOrganization set is_delete='1'  where id=@orgid";
+                    sql = @"delete TOrganization   where id=@orgid";
                     dynamicParams.Add(@"orgid", orgid);
                     cont = DapperHelper.SQL(sql, dynamicParams);
                     if (cont > 0)
@@ -1512,21 +1512,8 @@
                 }
                 if (unitAttr != "" && unitAttr != null)
                 {
-                    switch (unitAttr)
-                    {
-                        case "WG":  //澶栬喘
-                            search += "and A.mtype=@unitAttr ";
-                            dynamicParams.Add("@unitAttr", unitAttr);
-                            break;
-                        case "WX":  //澶栧崗
-                            search += "and A.btype=@unitAttr ";
-                            dynamicParams.Add("@unitAttr", unitAttr);
-                            break;
-                        default:    //瀹㈡埛
-                            search += "and A.htype=@unitAttr ";
-                            dynamicParams.Add("@unitAttr", unitAttr);
-                            break;
-                    }
+                    search += "and A.type=@unitAttr ";
+                    dynamicParams.Add("@unitAttr", unitAttr);
                 }
                 if (createUser != "" && createUser != null)
                 {
@@ -1539,7 +1526,7 @@
                 }
                 // --------------鏌ヨ鎸囧畾鏁版嵁--------------
                 var total = 0; //鎬绘潯鏁�
-                var sql = @"select A.id,A.code,A.name,A.mtype,A.btype,A.htype,A.conttacts,A.conttphone,A.addr,T.username as lm_user,A.lm_date from TCustomer A
+                var sql = @"select A.id,A.code,A.name,A.type,A.conttacts,A.conttphone,A.addr,T.username as lm_user,A.lm_date from TCustomer A
                             left join TUser T on A.lm_user=T.usercode
                             where  A.is_delete<>'1' " + search;
                 var data = DapperHelper.GetPageList<object>(sql, dynamicParams, prop, order, startNum, endNum, out total);
@@ -1560,7 +1547,7 @@
         #endregion
 
         #region[寰�鏉ュ崟浣嶆柊澧炵紪杈慮
-        public static ToMessage AddUpdateCurrentUnit(string unitid, string unitcode, string unitname, string mtypecode, string btypecode, string htypecode, string person, string contact, string description, string usercode, string OperType)
+        public static ToMessage AddUpdateCurrentUnit(string unitid, string unitcode, string unitname, string typecode, string person, string contact, string description, string usercode, string OperType)
         {
             var dynamicParams = new DynamicParameters();
             try
@@ -1578,13 +1565,11 @@
                         mes.data = null;
                         return mes;
                     }
-                    var sql = @"insert into TCustomer(code,name,mtype,btype,htype,conttacts,conttphone,addr,lm_user,lm_date) 
-                            values(@unitcode,@unitname,@mtypecode,@btypecode,@htypecode,@person,@contact,@description,@usercode,@CreateDate)";
+                    var sql = @"insert into TCustomer(code,name,type,conttacts,conttphone,addr,lm_user,lm_date) 
+                            values(@unitcode,@unitname,@typecode,@person,@contact,@description,@usercode,@CreateDate)";
                     dynamicParams.Add("@unitcode", unitcode);
                     dynamicParams.Add("@unitname", unitname);
-                    dynamicParams.Add("@mtypecode", mtypecode);
-                    dynamicParams.Add("@btypecode", btypecode);
-                    dynamicParams.Add("@htypecode", htypecode);
+                    dynamicParams.Add("@typecode", typecode);
                     dynamicParams.Add("@person", person);
                     dynamicParams.Add("@contact", contact);
                     dynamicParams.Add("@description", description);
@@ -1608,12 +1593,10 @@
                 }
                 if (OperType == "Update")
                 {
-                    var sql = @"update TCustomer set name=@unitname,mtype=@mtypecode,btype=@btypecode,htype=@htypecode,conttacts=@person,conttphone=@contact,addr=@description,lm_user=@usercode,lm_date=@CreateDate where id=@unitid";
+                    var sql = @"update TCustomer set name=@unitname,type=@typecode,conttacts=@person,conttphone=@contact,addr=@description,lm_user=@usercode,lm_date=@CreateDate where id=@unitid";
                     dynamicParams.Add("@unitid", unitid);
                     dynamicParams.Add("@unitname", unitname);
-                    dynamicParams.Add("@mtypecode", mtypecode);
-                    dynamicParams.Add("@btypecode", btypecode);
-                    dynamicParams.Add("@htypecode", htypecode);
+                    dynamicParams.Add("@typecode", typecode);
                     dynamicParams.Add("@person", person);
                     dynamicParams.Add("@contact", contact);
                     dynamicParams.Add("@description", description);

--
Gitblit v1.9.3