duhe
2023-11-09 a0f6cc156e20e04c81dd5bbcc3e02f310a96b4e7
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();
@@ -1075,7 +1103,7 @@
                    FentityModel.Add("FSrcInterId", item["HSourceInterID"].ToString());//  
                    FentityModel.Add("FBasePrdRealQty", item["数量"].ToString());//
                    FentityModel.Add("FIsFinished", "false");//
                    FentityModel.Add("FStockStatusId", new JObject() { ["FNumber"] = "KCZT08_SYS" }); //
                    FentityModel.Add("FStockStatusId", new JObject() { ["FNumber"] = "KCZT001" }); //
                    FentityModel.Add("FSrcEntrySeq", item["HSourceSeQ"].ToString());//  源单分录行号
                    FentityModel.Add("FMOMAINENTRYID", item["HMOEntryID"].ToString());//
                    FentityModel.Add("FKeeperTypeId", "BD_KeeperOrg");
@@ -1215,7 +1243,7 @@
            Int64 HSourceEntryID, string HSourceBillNo, string user,
            Int64 HWHID, Int64 HSPID, Int64 HSupID, Int64 HKeeperID,
            Int64 HMaterID, string HSourceBillType, Int64 HSLInterID,
            Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID)
            Int64 HSLEntryID, string HSLBillNo, Int64 HSLSeQ, string HBillNo, Int64 HInterID, string HBatchNo)
        {
            try
            {
@@ -1310,6 +1338,7 @@
                FentityModel.Add("FBaseAcceptQty", HRightQty.ToString());//基本单位接收数
                FentityModel.Add("FCurrency", new JObject() { ["Fnumber"] = "PRE001" });//币别
                FentityModel.Add("FIsSplitRow ", false);// 是否拆分行
                FentityModel.Add("FLot", new JObject() { ["Fnumber"] = HBatchNo.ToString() });//批号
                JArray Fentity2 = new JArray();
                JObject FentityModel2 = new JObject();