From 4f86b3b78b5b638b486b497221a2f1c8fbab3ef6 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期二, 25 十月 2022 21:01:25 +0800
Subject: [PATCH] 大岛仓库看板接口修改
---
VueWebApi/DLL/DAL/ProductionManagementDAL.cs | 45 ++++++++++++++++++++++-----------------------
1 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/VueWebApi/DLL/DAL/ProductionManagementDAL.cs b/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
index e1a55cc..07efa7d 100644
--- a/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
+++ b/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
@@ -477,7 +477,7 @@
#endregion
#region[MES宸ュ崟鏂板銆佺紪杈戞彁浜
- public static ToMessage AddUpdateMesOrder(string mesorderstus, string sourceorder, string ordertype, string mesordercode, string partcode, string mesqty, string routecode, string wkshopcode, string planstartdate, string planenddate, string orderlev, string username, string opertype,string is_aps)
+ public static ToMessage AddUpdateMesOrder(string mesorderstus, string sourceorder, string ordertype, string mesordercode, string partcode, string mesqty, string routecode, string wkshopcode, string planstartdate, string planenddate, string orderlev, string username, string opertype)
{
var sql = "";
var dynamicParams = new DynamicParameters();
@@ -534,12 +534,12 @@
CreateDate = DateTime.Now.ToString()
}
});
- if (is_aps == "Y") //鏄惁鎺掔▼
- {
- //string sql1 = "select id from TBom_Main where materiel_code='" + PartNumber + "' and status='Y' and version='" + VsionId + "'";
- //DataTable dt1 = DBHelper.GetTable(sql1);
- }
-
+ //if (is_aps == "Y") //鏄惁鎺掔▼
+ //{
+ // string sql1 = "select id from TBom_Main where materiel_code='" + PartNumber + "' and status='Y' and version='" + VsionId + "'";
+ // DataTable dt1 = DBHelper.GetTable(sql1);
+ //}
+
//澧炲姞宸ュ崟鐢ㄦ枡琛紙瀛愪欢锛�
bool aa = DapperHelper.DoTransaction(list);
@@ -2623,14 +2623,14 @@
{
if (type == "Add")
{
- var sql = @"insert into TWkm_capac_plan(wkshop, eqp_typecode, wkshift_code, enable, lm_user, lm_time,classtype)
- values(@wkshop,@eqp_typecode,@wkshift_code,@enable,@lm_user,@lm_time,@classtype)";
+ var sql = @"insert into TWkm_capac_plan(wkshop, eqp_typecode, wkshift_code, enable, lm_user, lm_date,classtype)
+ values(@wkshop,@eqp_typecode,@wkshift_code,@enable,@lm_user,@lm_date,@classtype)";
dynamicParams.Add("@wkshop", wkshopcode);
dynamicParams.Add("@eqp_typecode", capunitcode);
dynamicParams.Add("@wkshift_code", capsetupcode);
dynamicParams.Add("@enable", "Y");
dynamicParams.Add("@lm_user", username);
- dynamicParams.Add("@lm_time", DateTime.Now.ToString());
+ dynamicParams.Add("@lm_date", DateTime.Now.ToString());
dynamicParams.Add("@classtype", captplantype);
int cont = DapperHelper.SQL(sql, dynamicParams);
if (cont > 0)
@@ -2694,10 +2694,10 @@
sql = @"select CONVERT(varchar(100), wkdate, 23) DataTime,wkshift_code from TWkm_capac_plan_sub where m_id=@captplanid";
dynamicParams.Add("@captplanid", captplanid);
var data = DapperHelper.selectdata(sql, dynamicParams);
- for (int i = 0; i < dt.Rows.Count; i++)
+ for (int i = 0; i < data.Rows.Count; i++)
{
- string DataTime = dt.Rows[i]["DataTime"].ToString();//鏃ユ湡
- string key = dt.Rows[i]["wkshift_code"].ToString(); //鏂规缂栫爜
+ string DataTime = data.Rows[i]["DataTime"].ToString();//鏃ユ湡
+ string key = data.Rows[i]["wkshift_code"].ToString(); //鏂规缂栫爜
CapaPlan cmp = new CapaPlan();
cmp.name = DataTime;
cmp.key = key;
@@ -2735,11 +2735,11 @@
dynamicParams.Add("@captplanid", captplanid);
dynamicParams.Add("@datetime", datetime);
var data = DapperHelper.selectdata(sql, dynamicParams);
- for (int i = 0; i < dt.Rows.Count; i++)
+ for (int i = 0; i < data.Rows.Count; i++)
{
- string code = dt.Rows[i]["code"].ToString();//鏂规缂栫爜
- string name = dt.Rows[i]["name"].ToString();//鏂规鍚嶇О
- string flag = dt.Rows[i]["flag"].ToString(); //閫変腑鏂规鏍囪瘑
+ string code = data.Rows[i]["code"].ToString();//鏂规缂栫爜
+ string name = data.Rows[i]["name"].ToString();//鏂规鍚嶇О
+ string flag = data.Rows[i]["flag"].ToString(); //閫変腑鏂规鏍囪瘑
CapacityPlanSect cmp = new CapacityPlanSect();
cmp.CapCode = code;
cmp.CapName = name;
@@ -2748,7 +2748,7 @@
string sql1 = @"select wktme1_start,wktme2_start,wktme3_start,wktme4_start,wktme5_start from TBas_wkshift_info where code=@code";
dynamicParams.Add("@code", code);
- var db = DapperHelper.selectdata(sql, dynamicParams);
+ var db = DapperHelper.selectdata(sql1, dynamicParams);
for (int j = 0; j < db.Columns.Count; j++) //鏃堕棿娈�
{
@@ -2862,11 +2862,10 @@
List<CapaPlan> list4 = ids1.Except(ids).ToList(); //琛ㄧずids1涓摢浜涘�兼槸ids涓墍涓嶅瓨鍦ㄧ殑;
list4 = list3.Union(list4).ToList();
//鏌ユ壘鍏抽敭宸ュ簭璁惧銆佸伐浣嶇兢缁勭殑鎵�鏈夎澶�
- string sql3 = @"select * from(
- select distinct A.code,A.name from TEqpInfo A
+ string sql3 = @"select distinct A.code,A.name from TEqpInfo A
left join TFlw_Rteqp B on A.code=B.eqp_code
left join TFlw_Rtdt D on B.step_code=D.step_code
- where A.wksp_code=@wkshopcode and D.first_choke='Y' order by A.code)";
+ where A.wksp_code=@wkshopcode and D.first_choke='Y' order by A.code";
dynamicParams.Add("@wkshopcode", wkshopcode);
var dt3 = DapperHelper.selectdata(sql3, dynamicParams);
if (list4.Count > 0) //濡傛灉鏃ユ湡鏈夊彉鍔�
@@ -2902,7 +2901,7 @@
}
}
//鏇存柊鎺掍骇鐢熶骇璧勬簮涓昏〃
- sql = @"update gn_wkm_capac_plan set wkshift_code=@wkshift_code,classtype=@classtype,lm_user=@lm_user,lm_time=@lm_time where id=@id";
+ sql = @"update TWkm_capac_plan set wkshift_code=@wkshift_code,classtype=@classtype,lm_user=@lm_user,lm_date=@lm_time where id=@id";
list.Add(new
{
str = sql,
@@ -2928,7 +2927,7 @@
//寰幆鍐欏叆鎺掍骇鐢熶骇璧勬簮瀛愯〃
for (int i = 0; i < objs.Count; i++)
{
- sql = @"insert into TWkm_capac_plan_sub(m_id,wkdate,wkshift_code) values()";
+ sql = @"insert into TWkm_capac_plan_sub(m_id,wkdate,wkshift_code) values(@m_id,@wkdate,@wkshift_code)";
list.Add(new
{
str = sql,
--
Gitblit v1.9.3