1
yangle
2023-10-26 dfaeb9635591ed4b13f0ae265022872b081c0758
WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -405,6 +405,10 @@
        {
            try
            {
                string sErr = "";
                oSystemParameter.ShowBill(ref sErr);
                //获取生产汇报单最大InterID和单据号
                Int64 HInterID = DBUtility.ClsPub.CreateBillID("3711", ref DBUtility.ClsPub.sExeReturnInfo);
                string HBillNo = DBUtility.ClsPub.CreateBillCode("3711", ref DBUtility.ClsPub.sExeReturnInfo, true);
@@ -521,7 +525,10 @@
                    FentityModel.Add("FCostRate", dr1["FCostRate"].ToString());// 成本权重
                    FentityModel.Add("FISBACKFLUSH", dr1["FISBACKFLUSH"].ToString() == "1" ? true : false);// 倒冲领料
                    FentityModel.Add("FMOMAINENTRYID", dr1["FMOENTRYID"].ToString());//
                    //FentityModel.Add("F_bsv_Base1", new JObject() { ["Fnumber"] = dr1["FPREBDONENUMBER"].ToString() }); //包装标识
                    if (oSystemParameter.omodel.WMS_CampanyName == "瑞与祺")
                    {
                        FentityModel.Add("F_bsv_Base1", new JObject() { ["Fnumber"] = dr1["FPREBDONENUMBER"].ToString() });//包装标识
                    }
                    FentityModel.Add("FLot", new JObject() { ["FNumber"] = dr1["FBATCHNO"].ToString() }); //批号
                    FentityModel.Add("F_bsv_Text", dr1["工序流转卡号"].ToString()); //流转卡号
                    JArray Fentity2 = new JArray();
@@ -740,6 +747,19 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //判断唯一ID是否为空
                        foreach (DataRow item in ds1.Tables[0].Rows)
                        {
                            if (item["HWYID"].ToString() == null || item["HWYID"].ToString() == "" || item["HWYID"].ToString() == "undefined")
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "唯一ID为空,请重新手动入库或联系管理员!";
                                objJsonResult.data = null;
                                return objJsonResult;
                            }
                        }
                    }
                }
@@ -1013,6 +1033,14 @@
                //
                //DataSet ds1 = oCN.RunProcReturn("select * from  h_v_TOERPProcduct_LastProc where HLastProc = '是' and  hbillno='" + BillNo.ToString() + "'", "h_v_TOERPProcduct_LastProc");
                DataSet ds1 = oCN.RunProcReturn("exec h_p_TOERPProcduct_LastProc_BF '" + BillNo + "'", "h_p_TOERPProcduct_LastProc_BF");
                if (ds1.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "操作失败,查不到对应的出站单据!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                DataRow dr1 = ds1.Tables[0].Rows[0];
                JObject model = new JObject();