chenhaozhe
2025-07-03 e4f1a927520a98fbc69dd63ef982dd890ba4fbdc
WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
@@ -646,10 +646,22 @@
                    }
                    string sql= $@"update Cg_POInStockBillMain  set " +
                                "HRemark='" + HRemark + "', HUpDater ='" + HMaker + "', HUpDateDate=getdate()"+ ",HBillNo='" + HBillNo + "'" +
                                ",HSupID=" + HSupID + ",HCurID=" + HCurID
                                 + ",HExRate=" + HExRate + ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID
                                 + ",HAddress='" + HAddress + "',HInnerBillNo='" + HInnerBillNo + "',HProjectID="+ HProjectID + ",HInvoiceBillNo='"+ HInvoiceBillNo + "' where HInterID=" + HInterID;
                                "HRemark='" + HRemark + "'" +
                                ", HUpDater ='" + HMaker + "'" +
                                ", HUpDateDate=getdate()"+ "" +
                                ",HBillNo='" + HBillNo + "'" +
                                ",HWHID=" + HWHID + "" +
                                ",HSupID=" + HSupID + "" +
                                ",HCurID=" + HCurID + "" +
                                ",HExRate=" + HExRate + "" +
                                ",HEmpID=" + HEmpID + "" +
                                ",HManagerID=" + HManagerID + "" +
                                ",HDeptID=" + HDeptID + "" +
                                ",HAddress='" + HAddress + "'" +
                                ",HInnerBillNo='" + HInnerBillNo + "'" +
                                ",HProjectID="+ HProjectID + "" +
                                ",HInvoiceBillNo='"+ HInvoiceBillNo + "' " +
                                " where HInterID=" + HInterID;
                    oCN.RunProc(sql);
@@ -775,14 +787,14 @@
            foreach (ClsCg_POInStockBillSub oSub in DetailColl)
            {
                i++;
                if (oSub.HQty <= 0 || oSub.HQty == null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "第" + i + "行,数量不能为0或者小于0";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //if (oSub.HQty <= 0 || oSub.HQty == null)
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "第" + i + "行,数量不能为0或者小于0";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                if (oSub.HMaterID == 0)
                {
@@ -2716,5 +2728,42 @@
            }
        }
        #endregion
        #region 收料通知单_PDA 根据单据号条码扫描获取主子表数据
        [Route("Cg_POInStockBill/GetCg_POInStockBill_PDA")]
        [HttpGet]
        public object GetCg_POInStockBill_PDA(string HBillNo)
        {
            try
            {
                ds = oCN.RunProcReturn("select * from h_v_IF_POInStockBillList where 单据号 ='"+ HBillNo+"'" , "h_v_IF_POInStockBillList");
                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 = "Sucess!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}