zrg
9 小时以前 22ccc442863a838b351a2008af3cacdd72e91fd5
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -376,30 +376,33 @@
                {
                    if (oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔")
                    {
                        //判断当前流转卡 当前工序是否是开工
                        ds = oCN.RunProcReturn("select  * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0' and HProcID='"+ HProcID + "'", "Sc_ICMOBillStatus_Tmp");
                        //查不到证明没有开工进入下一句查询
                        if (ds.Tables[0].Rows.Count == 0)
                        if (HProcID == "90")  //清洁工序进入自动开工模式
                        {
                            //判断当前流转卡是否墨西哥的
                            ds2 = oCN.RunProcReturn("select HPRDORGID from Sc_ProcessExchangeBillMain with(nolock) where HBillNo = '" + HBarCode + "' ", "Sc_ProcessExchangeBillMain");
                            if (ds2.Tables[0].Rows[0]["HPRDORGID"].ToString() != "7667152")
                            //判断当前流转卡 当前工序是否是开工
                            ds = oCN.RunProcReturn("select  * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0' and HProcID='" + HProcID + "'", "Sc_ICMOBillStatus_Tmp");
                            //查不到证明没有开工进入下一句查询
                            if (ds.Tables[0].Rows.Count == 0)
                            {
                                //获取生产状态临时表数据
                                ds = oCN.RunProcReturn("select  * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HProcID='" + HProcID + "'", "Sc_ICMOBillStatus_Tmp");
                                //传入 生产状态临时补 单据类型、主id、源单子ID、源单单号、当前登录人、源单单据类型
                                objJsonResult = SaveMESBeginWorkFrom_ZD(ds.Tables[0].Rows[0]["HBillType"].ToString(),ds.Tables[0].Rows[0]["HInterID"].ToString(), ds.Tables[0].Rows[0]["HSourceEntryID"].ToString(), ds.Tables[0].Rows[0]["HSourceBillNo"].ToString(),user, ds.Tables[0].Rows[0]["HSourceBillType"].ToString());
                                if (objJsonResult.code == "0")
                                //判断当前流转卡是否墨西哥的
                                ds2 = oCN.RunProcReturn("select HPRDORGID from Sc_ProcessExchangeBillMain with(nolock) where HBillNo = '" + HBarCode + "' ", "Sc_ProcessExchangeBillMain");
                                if (ds2.Tables[0].Rows[0]["HPRDORGID"].ToString() != "7667152")
                                {
                                    objJsonResult.code = "0";
                                    objJsonResult.count = 0;
                                    objJsonResult.Message = objJsonResult.Message;
                                    objJsonResult.data = null;
                                    return objJsonResult;
                                    //获取生产状态临时表数据
                                    ds = oCN.RunProcReturn("select  * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HProcID='" + HProcID + "'", "Sc_ICMOBillStatus_Tmp");
                                    //传入 生产状态临时补 单据类型、主id、源单子ID、源单单号、当前登录人、源单单据类型
                                    objJsonResult = SaveMESBeginWorkFrom_ZD(ds.Tables[0].Rows[0]["HBillType"].ToString(), ds.Tables[0].Rows[0]["HInterID"].ToString(), ds.Tables[0].Rows[0]["HSourceEntryID"].ToString(), ds.Tables[0].Rows[0]["HSourceBillNo"].ToString(), user, ds.Tables[0].Rows[0]["HSourceBillType"].ToString());
                                    if (objJsonResult.code == "0")
                                    {
                                        objJsonResult.code = "0";
                                        objJsonResult.count = 0;
                                        objJsonResult.Message = objJsonResult.Message;
                                        objJsonResult.data = null;
                                        return objJsonResult;
                                    }
                                }
                            }
                        }
                            }
                        }
                    }
                }