From 770c681572301c938d7b9adcc60d9aad9d1dd604 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期二, 19 九月 2023 17:37:03 +0800
Subject: [PATCH] 1.新增基本资料功能接口(erp车间/部门、erp仓库、erp用户信息) 2.报工接口添加字段入库条码 3.增加末道工序报工后提交入库接口(对接erp) 4.增加生成系统条码接口(自定义)

---
 VueWebApi/DLL/DAL/AppDeviceManageDAL.cs |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/VueWebApi/DLL/DAL/AppDeviceManageDAL.cs b/VueWebApi/DLL/DAL/AppDeviceManageDAL.cs
index 12d211a..ebb6838 100644
--- a/VueWebApi/DLL/DAL/AppDeviceManageDAL.cs
+++ b/VueWebApi/DLL/DAL/AppDeviceManageDAL.cs
@@ -384,7 +384,7 @@
             try
             {
                 //鑾峰彇褰撳墠鎵爜璁惧鏄惁鐢宠缁翠慨璁板綍
-                sql = @"select *  from TEqp_RepairRequest where eqp_code=@eqpcode and status='REPA' or status='COMP'";
+                sql = @"select *  from TEqp_RepairRequest where eqp_code=@eqpcode and status<>'CONFIR'";
                 dynamicParams.Add("@eqpcode", eqpcode);
                 var data0 = DapperHelper.selectdata(sql, dynamicParams);
                 if (data0.Rows.Count > 0)
@@ -973,16 +973,18 @@
         public static ToMessage AppDeviceAnDengCallSave(string username, string eqpcode, string wkshpcode, List<AnDnDate> json)
         {
             string sql = "";
+            int AnDnID = 0; //鏈�澶d
             var dynamicParams = new DynamicParameters();
             List<object> list = new List<object>();
             ChatHub chthub = new ChatHub();
             try
             {
                 list.Clear();
-                //鎵ц娑堟伅鎺ㄩ��
-                chthub.SendByGroupList(username, wkshpcode, eqpcode, json);
-                for (int i = 1; i <= json.Count; i++)
+                //鑾峰彇涓昏〃鏈�澶D
+                AnDnID = DapperHelper.insertReturnId("TAnDon_Task_Info");
+                for (int i = 0; i < json.Count; i++)
                 {
+                    AnDnID = AnDnID + 1;//鑷1
                     string code = json[i].code.ToString();
                     string name = json[i].name.ToString();
                     sql = @"select *   from TAnDon_Task_Info where wkshp_code=@wkshpcode and eqp_code=@eqpcode and type=@typecode and status='START'";
@@ -999,10 +1001,6 @@
                     }
                     else
                     {
-                        //鑾峰彇涓昏〃鏈�澶D
-                        sql = @"select ISNULL(IDENT_CURRENT('TK_Wrk_Record')+@num,1) as id";
-                        dynamicParams.Add("@num", i);
-                        var dt = DapperHelper.selectdata(sql, dynamicParams);
                         //鍐欏叆瀹夌伅鍛煎彨琛�
                         sql = @"insert into TAnDon_Task_Info(wkshp_code,eqp_code,type,start_date,start_user,status) 
                         values(@wkshp_code,@eqp_code,@type,@start_date,@start_user,@status)";
@@ -1019,6 +1017,7 @@
                                 status = "START"
                             }
                         });
+
                         for (int j = 0; j < json[i].children.Count; j++)
                         {
                             //鍐欏叆瀹夌伅璁板綍鎺ㄩ�佷汉鍛樿〃
@@ -1029,11 +1028,12 @@
                                 str = sql,
                                 parm = new
                                 {
-                                    m_id = int.Parse(dt.Rows[0]["ID"].ToString()),
+                                    m_id = AnDnID,
+                                    //m_id = int.Parse(dt.Rows[0]["ID"].ToString()),
                                     wkshp_code = wkshpcode,
                                     eqp_code = eqpcode,
                                     type = code,
-                                    resp_user = json[i].children[i].usercode,
+                                    resp_user = json[i].children[j].usercode,
                                     status = "N"
                                 }
                             });
@@ -1120,7 +1120,7 @@
             try
             {
                 list.Clear();
-                for (int i = 1; i <= json.Count; i++)
+                for (int i = 0; i <json.Count; i++)
                 {
                     string code = json[i].code.ToString();
                     string name = json[i].name.ToString();

--
Gitblit v1.9.3