| | |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔") |
| | | { |
| | | |
| | | if (HProcID == "90") //清洁工序进入自动开工模式 |
| | | { |
| | | //判断当前流转卡 当前工序是否是开工 |
| | | ds = oCN.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceBillNo='" + HBarCode + "' and HICMOStatus<>'0' and HProcID='"+ HProcID + "'", "Sc_ICMOBillStatus_Tmp"); |
| | | //查不到证明没有开工进入下一句查询 |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | if (HProcID == "90" || HProcID== "102") |
| | | { |
| | | DataSet dataSet = oCN.RunProcReturn(@"exec h_p_Sc_ProcessExchangeBillList2 '" + HBarCode + "'," + HProcID, "h_p_Sc_ProcessExchangeBillList2"); |
| | | if (dataSet.Tables[0].Rows.Count > 0) |
| | | { |
| | | objJsonResult.code = "2"; |
| | | objJsonResult.count = 2; |
| | | objJsonResult.Message = "[0000-1-037]"; |
| | | objJsonResult.data = dataSet.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "[0000-1-037]"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | } |
| | | |
| | | } |
| | | |
| | | return objJsonResult; |
| | |
| | | "(HInterID,HEntryID,HBillNo_bak,HSourceBillNo,HSourceInterID,HSourceEntryID,HMaterID" + |
| | | ",HProdOrgID,HSourceBillType,HAuxPropID,HProcID,HQty,HBatchNo,HBarCode,HMTONo,HPlanMode) " + |
| | | " values(" + HInterID + "," + (i + 1) + ",'" + HBillNo + "','" + tempList[i].HProcExchBillNo + "'," + tempList[i].HProcExchInterID + "," + tempList[i].HProcExchEntryID + "," + tempList[i].HMaterID + |
| | | ",'" + HOrgID + "','',0," + HProcID + "," + tempList[i].HQty + ",'"+ tempList[i].HBatchNo + "','" + tempList[i].HBarCode + "','','') "); |
| | | ",'" + HOrgID + "','',0," + tempList[i].HProcID + "," + tempList[i].HQty + ",'"+ tempList[i].HBatchNo + "','" + tempList[i].HBarCode + "','','') "); |
| | | } |
| | | |
| | | oCN.Commit(); |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (omodel.HProcID!=90)//斯莫尔拍照清洁工序过滤 |
| | | { |
| | | //增加产线组装追溯单 |
| | | DataSet ds1 = oCN.RunProcReturn("exec h_p_Gy_BarCodeBillBomList '" + omodel.HProcExchBillNo + "'," + omodel.HProcID, "h_p_Gy_BarCodeBillBomList"); |
| | | if (ds1.Tables[0].Rows.Count > 0) |
| | |
| | | ,'{HBillNo1}','1','{user}',getdate(),{omodel.HProcExchInterID.ToString()},{omodel.HProcExchEntryID.ToString()},'{omodel.HProcExchBillNo.ToString()}' |
| | | ,{omodel.HICMOInterID.ToString()},'{omodel.HICMOBillNo.ToString()}','{omodel.HBarCode_P.ToString()}',{omodel.HMaterID},0,'汇报',{omodel.HProdOrgID})"; |
| | | oCN.RunProc(sql); |
| | | if (prefix == "#0TE911124") { |
| | | if (prefix == "#0TE911124") |
| | | { |
| | | for (int i = 0; i < sub.Count; i++) |
| | | { |
| | | //子表存储 |
| | |
| | | ,0,0,getdate(),'{sub[i].HBarCode}','{omodel.HBarCode_P}','') "; |
| | | oCN.RunProc(sq2); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //根据主id+工序查 |
| | | [Route("Cj_SingleStation/BadRecordsList2")] |
| | | [HttpGet] |
| | | public object BadRecordsList2(string HProcExchInterID, string HProcID, string user) |
| | | { |
| | | try |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-1-068]无查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn(@"exec h_p_Gy_BadRecordsList2 " + HProcExchInterID + "," + HProcID, "h_p_Gy_BadRecordsList2"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "[0000-1-037]"; |
| | | objJsonResult.data = ds; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "[0000-1-010]没有返回任何记录!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 工序单品过站 查询合格记录 |