From fce9a89fb5ad93277b95c699e892af1bb28aba88 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期二, 02 八月 2022 19:30:15 +0800
Subject: [PATCH] 车间综合看板接口调整,报工控制
---
VueWebApi/DLL/DAL/ProductionManagementDAL.cs | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/VueWebApi/DLL/DAL/ProductionManagementDAL.cs b/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
index 754b474..a356ed8 100644
--- a/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
+++ b/VueWebApi/DLL/DAL/ProductionManagementDAL.cs
@@ -1287,7 +1287,9 @@
sql = @"update TK_Wrk_Step set status='START' where wo_code=@mesordercode and step_code=@stepcode";
list.Add(new { str = sql, parm = new { mesordercode = mesordercode, stepcode = stepcode } });
-
+ //鍥炲啓宸ュ崟宸ュ簭琛ㄧ姸鎬佷负宸插紑宸�
+ sql = @"update TK_Wrk_Step set status='START' where wo_code=@mesordercode and step_code=@stepcode";
+ list.Add(new { str = sql, parm = new { mesordercode = mesordercode, stepcode = stepcode} });
//鍥炲啓宸ュ崟琛ㄧ姸鎬佷负锛� 寮�宸ワ細START
sql = @"update TK_Wrk_Man set status='START' where wo_code=@mesordercode";
list.Add(new { str = sql, parm = new { mesordercode = mesordercode } });
@@ -1344,6 +1346,21 @@
dynamicParams.Add("@wo_code", mesordercode);
dynamicParams.Add("@step_code", stepcode);
var data = DapperHelper.selectdata(sql, dynamicParams);
+ //鑾峰彇寮�宸ヨ褰曠殑榛樿閫変腑鐨勮澶�(浜х嚎)涓庢姤宸ユ椂鐨勮澶囦骇绾垮仛瀵规瘮鍒ゆ柇
+ sql = @"select A.eqp_code,B.name from TK_Wrk_Record A
+ inner join TEqpInfo B on A.eqp_code=B.code
+ where A.wo_code=@wo_code and A.step_code=@step_code and A.style='S'";
+ dynamicParams.Add("@wo_code", mesordercode);
+ dynamicParams.Add("@step_code", stepcode);
+ var da = DapperHelper.selectdata(sql, dynamicParams);
+ if (da.Rows[0]["EQP_CODE"].ToString() != eqpcode)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "鎿嶄綔澶辫触,褰撳墠鎶ュ伐浜х嚎搴斾负锛�"+ da.Rows[0]["NAME"].ToString() + "!";
+ mes.data = null;
+ return mes;
+ }
if (data.Rows.Count > 0)
{
//淇敼鎶ュ伐璁板綍
@@ -1538,6 +1555,21 @@
dynamicParams.Add("@step_code", stepcode);
dynamicParams.Add("@wx_code", wxcode);
var data = DapperHelper.selectdata(sql, dynamicParams);
+ //鑾峰彇鍙戞枡璁板綍鐨勯粯璁ら�変腑鐨勫鍗忎緵搴斿晢涓庢敹鏂欐椂鐨勫鍗忎緵搴斿晢鍋氬姣斿垽鏂�
+ sql = @"select A.wx_code,B.name from TK_Wrk_OutRecord A
+ inner join TCustomer B on A.wx_code=B.code
+ where A.wo_code=@wo_code and A.step_code=@step_code and A.style='F' ";
+ dynamicParams.Add("@wo_code", mesordercode);
+ dynamicParams.Add("@step_code", stepcode);
+ var da = DapperHelper.selectdata(sql, dynamicParams);
+ if (da.Rows[0]["EQP_CODE"].ToString() != wxcode)
+ {
+ mes.code = "300";
+ mes.count = 0;
+ mes.Message = "鎿嶄綔澶辫触,褰撳墠鏀舵枡澶栧崗渚涙柟搴斾负锛�" + da.Rows[0]["NAME"].ToString() + "!";
+ mes.data = null;
+ return mes;
+ }
if (data.Rows.Count > 0)
{
//淇敼澶栧崗璁板綍涓昏〃
--
Gitblit v1.9.3