yangle
2023-11-21 04c8b36de09ce9654870c6628b2722fec2520545
判断  条码是否为不良
修改组托单的条码规则
2个文件已修改
55 ■■■■■ 已修改文件
WebAPI/Controllers/LMESController.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_GroupOrderBillController.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/LMESController.cs
@@ -1255,6 +1255,54 @@
            }
        }
        //判断条码是否是不良的状态
        [Route("LEMS/HbadStaus")]
        [HttpGet]
        public object HbadStaus(string SubBarcode)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn(@"select  HBillNo,HReasult from tiaom  where HBillNo='" + SubBarcode + @"'
union
select HBarCode HBillNo,HStatus HReasult from Gy_BarCodeBill
where HBarCode='" + SubBarcode + "'", "Gy_BarCodeBill");
                if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "ok!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else if (ds.Tables[0].Rows[0]["HReasult"].ToString() =="不良")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "当前条码的状态为:"+ ds.Tables[0].Rows[0]["HReasult"].ToString() + "!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = null;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "异常!";
                objJsonResult.data = e.ToString();
                return objJsonResult;
            }
        }
        //判断总的包装数量是否超过流转卡数量
        [Route("LEMS/h_p_Sc_ProductionLinePackaging_Checkqty")]
        [HttpGet]
WebAPI/Controllers/Sc_GroupOrderBillController.cs
@@ -101,14 +101,15 @@
            string msg1 = _value.ToString();
            try
            {
                //组托单反序列化
                msg1 = "[" + msg1.ToString() + "]";
                List<GroupOrderBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<GroupOrderBill>>(msg1);
                //获取年月日并拼接成字符串
                string year = DateTime.Now.Year.ToString();
                string month = DateTime.Now.Month.ToString();
                string day = DateTime.Now.Day.ToString();
                string nowDate = year + month + day;
                //string month = DateTime.Now.Month.ToString();
                //string day = DateTime.Now.Day.ToString();
                string nowDate = DateTime.Now.ToString("yyyyMMdd");
                string HBillType = this.HBillType;//组托单类型
                long HInterID = list[0].HInterID;//递入type得到的单据ID
                string HBillNo = list[0].HBillNo;//递入type得到的单据No