yl
2023-11-22 bfa0a4079b2ac3f363826b7e329115f88b4bf0f5
VueWebApi/DLL/DAL/ProductionManagementDAL.cs
@@ -1591,7 +1591,7 @@
        #endregion
        #region[生产开报工扫码获取工单对应工序任务(自制)]
        public static ToMessage MesOrderStepSearch(string stu_torgcode, string stu_torgtypecode, string wocode,string partcode,string partname,string partspec, int startNum, int endNum, string prop, string order)
        public static ToMessage MesOrderStepSearch(string stu_torgcode, string stu_torgtypecode, string wocode, string saleOrderCode, string partcode, string partname, string partspec, int startNum, int endNum, string prop, string order)
        {
            var sql = "";
            string search = "";
@@ -1659,6 +1659,11 @@
                        break;
                    default:
                        break;
                }
                if (saleOrderCode != "" && saleOrderCode != null)
                {
                    search += "and W.saleOrderCode like '%'+@saleOrderCode+'%' ";
                    dynamicParams.Add("@saleOrderCode", saleOrderCode);
                }
                if (partcode != "" && partcode != null)
                {
@@ -2429,12 +2434,12 @@
                {
                    //修改开报工记录表(开工数量)
                    sql = @"update  TK_Wrk_Record set start_qty=start_qty+@startqty where wo_code=@mesordercode and step_seq=@stepseq and step_code=@stepcode and materiel_code=@partcode and style=@style";
                    list.Add(new { str = sql, parm = new { mesordercode = mesordercode, stepseq = stepseq, stepcode = stepcode, partcode = partcode, startqty = startqty, style = "S"} });
                    list.Add(new { str = sql, parm = new { mesordercode = mesordercode, stepseq = stepseq, stepcode = stepcode, partcode = partcode, startqty = startqty, style = "S" } });
                    //修改工单工序表(开工数量)
                    sql = @"update  TK_Wrk_Step set start_qty=start_qty+@startqty where wo_code=@mesordercode and step_code=@stepcode";
                    list.Add(new { str = sql, parm = new { mesordercode = mesordercode,stepcode = stepcode, startqty = startqty } });
                    list.Add(new { str = sql, parm = new { mesordercode = mesordercode, stepcode = stepcode, startqty = startqty } });
                }
                else
                else
                {
                    //写入开报工记录表
                    sql = @"insert into  TK_Wrk_Record(wo_code,step_seq,step_code,eqp_code,materiel_code,open_person,open_time,task_qty,start_qty,style,lm_user,lm_date) 
@@ -2449,7 +2454,7 @@
                    list.Add(new { str = sql, parm = new { mesordercode = mesordercode } });
                }
                bool aa = DapperHelper.DoTransaction(list);
                if (aa)