1
王 垚
2022-09-28 414e9ac9f6e44d5d427c7e00389a5e4f8be42208
WebAPI/Controllers/Xs_CutWorkSendBillController.cs
@@ -101,8 +101,8 @@
                    + list[i].HMainSourceBillNo + "'," + list[i].HMainSourceInterID + ")";
                    oCN.RunProc(subSql);
                    //反写金蝶销售订单的裁切派工班组
                    //var HGroupSql = "update AIS20200908101915zs..T_SAL_ORDER set Group=(select HName from Gy_Group where HItemID=" + list[i].HGroupID + ") where FID = " + list[i].HMainSourceInterID + "";
                    //oCN.RunProc(HGroupSql);
                    var HGroupSql = "update AIS20200908101915zs..T_SAL_ORDERENTRY set F_XSDD_PGSJ=GETDATE(),F_XSDD_PGBZ=(select HName from Gy_Group where HItemID=" + list[i].HGroupID + ") where FID = " + list[i].HMainSourceInterID + "";
                    oCN.RunProc(HGroupSql);
                }
                oCN.Commit();
                objJsonResult.code = "1";
@@ -122,6 +122,44 @@
            }
        }
        /// <summary>
        /// 上下架单列表
        /// </summary>
        /// <returns></returns>
        [Route("Xs_CutWorkSendBill/List")]
        [HttpGet]
        public object List(string sWhere)
        {
            try
            {
                ds = List_s(sWhere);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "返回记录成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #region sql语句
@@ -132,7 +170,10 @@
                "select FID HMainSourceInterID,FBILLNO HMainSourceBillNo,1 pages,'' HMaker from AIS20200908101915zs..T_SAL_ORDER where FBILLNO ='" + HSEOrderBillNo + "'"
                , "AIS20200908101915zs..T_SAL_ORDER");
        }
        public static DataSet List_s(string sWhere)
        {
            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Xs_CutWorkSendBillList where 1=1 " + sWhere , "h_v_Xs_CutWorkSendBillList");
        }
        #endregion