新增销售出库扫码模块相关调用方法;条码生成模块,选源单增加返回生产日期有效期至等
3个文件已修改
235 ■■■■■ 已修改文件
WarM/条码打印/Gy_BarCodeBill.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/条码管理/WEBSController.cs 217 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web.config 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill.cs
@@ -2393,7 +2393,7 @@
                    grdMain.Rows.Add();
                    grdMain.Rows[i].Cells[HTagCol].Value = "*";
                    //得到信息
                    Ds = oCn.RunProcReturn("select * from h_v_IF_POStockInList where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IF_POStockInList");
                    Ds = oCn.RunProcReturn("select * from h_v_IF_POStockInBillList_Source where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IF_POStockInBillList_Source");
                    //写入信息
                    Sub_WriteInForm1(Ds.Tables[0], i);
                }
@@ -2477,7 +2477,7 @@
                    //写入信息
                    Sub_WriteInForm1(Ds.Tables[0], i);
                }
                //生产汇报单
                //工序汇报单
                if (oSelectRow.BillType == "3714")
                {
                    grdMain.Rows.Add();
@@ -2561,6 +2561,11 @@
            {
                grdMain.Rows[i].Cells[HMinQtyCol].Value = oTable.Rows[0]["最小包装数"].ToString();
            }
            grdMain.Rows[i].Cells[HProduceDateCol].Value = oTable.Rows[0]["HProduceDate"].ToString();
            grdMain.Rows[i].Cells[HExpiryDateCol].Value = oTable.Rows[0]["HExpiryDate"].ToString();
            grdMain.Rows[i].Cells[HISKFPERIODCol].Value = oTable.Rows[0]["HISKFPERIOD"].ToString();
            grdMain.Rows[i].Cells[HEXPUNITCol].Value = oTable.Rows[0]["HEXPUNIT"].ToString();
            grdMain.Rows[i].Cells[HEXPPERIODCol].Value = oTable.Rows[0]["HEXPPERIOD"].ToString();
            //--
            //设置可编辑列
            string sAllowCol = HQtyCol.ToString() +
@@ -2611,6 +2616,11 @@
            grdMain.Rows[i].Cells[HUnitNameCol].Value = oTable.Rows[0]["计量单位"].ToString();
            grdMain.Rows[i].Cells[HRemarkCol].Value = oTable.Rows[0]["备注"].ToString();
            grdMain.Rows[i].Cells[HMTONoCol].Value = oTable.Rows[0]["计划跟踪号"].ToString();
            grdMain.Rows[i].Cells[HProduceDateCol].Value = oTable.Rows[0]["生产日期"].ToString();
            grdMain.Rows[i].Cells[HExpiryDateCol].Value = oTable.Rows[0]["有效期至"].ToString();
            grdMain.Rows[i].Cells[HISKFPERIODCol].Value = oTable.Rows[0]["HISKFPERIOD"].ToString();
            grdMain.Rows[i].Cells[HEXPUNITCol].Value = oTable.Rows[0]["HEXPUNIT"].ToString();
            grdMain.Rows[i].Cells[HEXPPERIODCol].Value = oTable.Rows[0]["HEXPPERIOD"].ToString();
            if (cmbHBarCodeType.Text == "仪器外购件条码容器规则")
            {
                grdMain.Rows[i].Cells[HMinQtyCol].Value = ClsPub.isDoule(oTable.Rows[0]["未生成条码数量"]);
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -95,6 +95,56 @@
        #endregion
        #region æ ¹æ®æ¡ç ï¼Œè¿”回条码档案中条码信息
        /// <summary>
        /// æ ¹æ®æ¡ç ï¼Œè¿”回条码档案中条码信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetBarCode_Json")]
        [HttpGet]
        public object GetBarCode_Json(string HBarCode)
        {
            try
            {
                ds = oCn.RunProcReturn("select * from h_v_Gy_BarCodeBill where HBarCode='" + HBarCode + "' order by HStopflag", "h_v_Gy_BarCodeBill");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "条码档案中不存在该条码,请确认条码是否正确或是否已被删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else if (DBUtility.ClsPub.isBool(ds.Tables[0].Rows[0]["HStopflag"]))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "条码已被禁用,不允许扫描!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "返回条码信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
@@ -609,6 +659,38 @@
        #endregion
        #region æ‰«ç æ¨¡å—    æ ¹æ®HItemID删除缓存列表中对应条码记录
        /// <summary>
        /// æ ¹æ®HItemID删除条码出入库缓存表中记录
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_DelPonderationBillMain_Temp_HItemID_Json")]
        [HttpGet]
        public object set_DelPonderationBillMain_Temp_HItemID_Json(long HInterID, string HBillType, long HItemID)
        {
            try
            {
                oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HItemID=" + HItemID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo);
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "删除成功";
                objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "删除条码出入库缓存列表条码记录失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region æ‰«ç æ¨¡å—    åˆ é™¤åŠŸèƒ½æŒ‰é’®è°ƒç”¨  åˆ é™¤æ¡ç å‡ºå…¥åº“临时表记录
        /// <summary>
@@ -990,7 +1072,7 @@
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "其他出库单上传失败!" + e.ToString();
                objJsonResult.Message = "其他入库单上传失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
@@ -1002,6 +1084,88 @@
        #region é”€å”®å‡ºåº“    ä¸Šä¼ ç”Ÿå•
        #region é”€å”®å‡ºåº“    æ–°å¢žæ¨¡å¼
        /// <summary>
        /// é”€å”®å‡ºåº“新增上传
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_SaveSellOutBill_Json")]
        [HttpPost]
        public object set_SaveSellOutBill_Json([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                List<Model.ClsKf_SellOutBillMain> lsmain = new List<Model.ClsKf_SellOutBillMain>();
                ListModels oListModels = new ListModels();
                lsmain = oListModels.getSellOutBillMainByJson(msg1);
                WebS.ClsKf_SellOutBillMain websLsmain = new WebS.ClsKf_SellOutBillMain();
                string sSourceType = lsmain[0].HMainSourceBillType;
                websLsmain.HInterID = lsmain[0].HInterID;
                websLsmain.HBillNo = lsmain[0].HBillNo;
                websLsmain.HBillType = lsmain[0].HBillType;
                websLsmain.HDate = lsmain[0].HDate;
                websLsmain.HDeptID = lsmain[0].HDeptID;
                websLsmain.HWHID = lsmain[0].HWHID;
                websLsmain.HSCWHID = lsmain[0].HSCWHID;
                websLsmain.HSupID = lsmain[0].HSupID;
                websLsmain.HKeeperID = lsmain[0].HKeeperID;
                websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
                websLsmain.HEmpID = lsmain[0].HEmpID;
                websLsmain.HManagerID = lsmain[0].HManagerID;
                websLsmain.HRemark = lsmain[0].HRemark;
                websLsmain.HExplanation = lsmain[0].HExplanation;
                websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
                websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
                websLsmain.HBillSubType = lsmain[0].HBillSubType;
                if (lsmain[0].HMainSourceBillType == "1402")
                {
                    websLsmain.HMainSourceBillType = "发货通知单";
                }
                else if (lsmain[0].HMainSourceBillType == "1401")
                {
                    websLsmain.HMainSourceBillType = "销售订单";
                }
                else
                {
                    websLsmain.HMainSourceBillType = "手工录入";
                }
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HBillerID = lsmain[0].HBillerID;
                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
                if (oWebs.set_SaveSellOutBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "销售出库单上传失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region é”€å”®å‡ºåº“    æ ¡éªŒæ¨¡å¼
@@ -2103,6 +2267,57 @@
        #endregion
        #region æ ¹æ®å•据ID、物料ID返回条码临时表中条码信息
        /// <summary>
        ///  æ ¹æ®å•据ID、物料ID返回条码临时表中条码信息
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/GetBarCodeByMaterID_Temp_Json")]
        [HttpGet]
        public object GetBarCodeByMaterID_Temp_Json(Int64 HInterID, string HBillType, Int64 HMaterID)
        {
            try
            {
                ds = oCn.RunProcReturn("exec h_p_WMS_BarCodeByMaterID_Temp " + HInterID.ToString() + ",'" + HBillType + "'," + HMaterID.ToString(), "h_p_WMS_BarCodeByMaterID_Temp");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    List<object> columnNameList = new List<object>();
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));  //获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "根据物料返回缓存列表条码信息失败!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #endregion
WebAPI/Web.config
@@ -22,7 +22,7 @@
        <!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>-->
        <!--<add key="FileIP" value="http://localhost:8080/" />-->
        <!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/>    -->
        <!--<add key="sUrl" value="http://192.168.63.20/WEBS-WMS/WebService1.asmx"/> é¢œå°å¼æœº-->
        <add key="sUrl" value="http://192.168.63.20/WEBS-WMS/WebService1.asmx"/><!--颜台式机-->
        <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> å¤å®-->
        <!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> -->
        <!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/>    åšæ—¥ç§‘技-->
@@ -32,7 +32,7 @@
        <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS/WebService1.asmx"/>     å®‰ç‘žæœåС噍-->
        <!--<add key="sUrl" value="http://122.227.133.186:8090/WEBS/WebService1.asmx"/>    -->
        <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS-WMS/WebService1.asmx"/>     å®‰ç‘žæœåС噍-->
        <add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/>         <!--测试服务器-->
        <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/>         æµ‹è¯•服务器-->
        <!--<add key="sUrl" value="http://localhost:8082/WEBS/WebService1.asmx"/>    æœ¬åœ°-->
        <!--<add key="sUrl" value="http://192.168.56.1:81/web/WebService1.asmx"/>    --><!--陈雯静本地配置-->
        <add key="webpages:Version" value="3.0.0.0" />