From 3fb978e25d7ea25038e56ec1db950189b413718b Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期六, 04 三月 2023 11:17:30 +0800
Subject: [PATCH] 1.工单派发选择工艺路线或选择生产车间时判断绑定条件接口开发 2.组织架构删除update改为delete 3.工艺路线新增else if改为if
---
VueWebApi/DLL/DAL/BasicSettingDAL.cs | 39 +++++++++++----------------------------
1 files changed, 11 insertions(+), 28 deletions(-)
diff --git a/VueWebApi/DLL/DAL/BasicSettingDAL.cs b/VueWebApi/DLL/DAL/BasicSettingDAL.cs
index ecee0df..f120520 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);
@@ -1839,7 +1822,7 @@
sql = @"select B.id,B.ando_cogfigid,U.usercode,U.username,A.enable from TAnDon_Roul_ConFig A
inner join TAnDon_Roul_ConFigUser B on A.id=B.ando_cogfigid
left join TUser U on B.usercode=U.usercode
- where A.wkshp_code=@wkshopcode and A.andotype_code=@calltypecode";
+ where A.wkshp_code=@wkshopcode and A.andotype_code=@calltypecode and U.is_delete=0";
dynamicParams.Add("@wkshopcode", wkshopcode);
dynamicParams.Add("@calltypecode", calltypecode);
var data = DapperHelper.selectdata(sql, dynamicParams);
--
Gitblit v1.9.3