yusijie
4 天以前 9e3536c0dc929c3353408a9b5614322de2803b29
小卫栈板码规则调整;
1个文件已修改
21 ■■■■■ 已修改文件
WebAPI/Controllers/仓存管理/条码生成/Sc_BarCodeController.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÌõÂëÉú³É/Sc_BarCodeController.cs
@@ -3100,6 +3100,7 @@
            List<HBarCodeList> ListRows = new List<HBarCodeList>();
            DataSet Ds;
            DataSet Ds2;
            for (int i = 0; i < 1; i++)
            {
                HSourceBillType_Temp = ordrlist.HBillType;
@@ -3136,16 +3137,32 @@
                                objJsonResult.Message = "物料不能为空,不能生成条码!";
                                return objJsonResult;
                            }
                            Ds2 = oCN.RunProcReturn("select top 1 HCusRelationNumber from Gy_Material m with(nolock) left join Gy_MateNumRelation_Sec b with(nolock) on m.HMASTERID = b.HMaterID where m.HItemID = " + ordrlist.HMaterID, "Gy_MateNumRelation_Sec");
                            string HSKU = "";//商品SKU
                            if (Ds2.Tables[0].Rows.Count > 0)
                            {
                                HSKU = Ds2.Tables[0].Rows[0]["HCusRelationNumber"].ToString();
                            }
                            else
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "没有匹配到对应的商品SKU!";
                                return objJsonResult;
                            }
                            //todo
                            //条码前缀 = p+商品SKU+生产年份+生产月份+6位流水号+生产工厂代码
                            sTMNumber = "P" + HMaterialName + lastDigit+ productionMonth;
                            sTMNumber = "P" + HSKU + lastDigit+ productionMonth;
                            //根据条码前缀获取最大流水号
                            Ds = oCN.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo");
                            LSH = String.Format("{0:D" + HLen + "}", ClsPub.isInt(Ds.Tables[0].Rows[0][0]) + 1);
                            //拼接条码
                            HBarCode_Temp = sTMNumber + LSH+"XXX";
                            HBarCode_Temp = sTMNumber + "A" + LSH + "AHW";
                            if (HSumQty - HMinQty > 0)