是否做首件/工序 检验单控制;批量出站汇报;保存前后控制(生产订单保存方法,开工单保存方法,完工单保存方法,停工挂起单保存方法,产量汇报单保存方法,质量汇报单保存方法,生产汇报单保存方法)
| | |
| | | { |
| | | omodel.Sc_ICMOReportBill_DeleterAndMakerMustSame = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //çäº§æ±æ¥å æ¥å·¥å°æ¥æ£ç³è¯·çäº§æ±æ¥åå夿æ¯å¦é¦æ£æ£éª |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Sc_ICMOReportBill_FirstCheckOut") |
| | | { |
| | | omodel.Sc_ICMOReportBill_FirstCheckOut = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | //çäº§æ±æ¥å æ¥å·¥å°æ¥æ£ç³è¯·çäº§æ±æ¥åå夿æ¯å¦è¿ç¨æ£éª |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Sc_ICMOReportBill_ProcessCheckOut") |
| | | { |
| | | omodel.Sc_ICMOReportBill_ProcessCheckOut = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); |
| | | } |
| | | |
| | | //==========================================æ¶æéç¥å(éè´§åãå°è´§ç¡®è®¤ï¼ |
| | | if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Cg_POInStockBill_BarCodeCtl") |
| | |
| | | public string Sc_ICMOReportBill_UpdateSourceInterID; //ä¸ä¼ ååå¡«æ¡ç æ¡£æ¡æºåä¿¡æ¯ |
| | | public string Sc_ICMOReportBill_MESFlag; //çäº§æ±æ¥å忥MESæ è®°ï¼Yä¸ºåæ¥ |
| | | public string Sc_ICMOReportBill_FirstCheckOut; //å¿
é¡»é¦ä»¶æ£éªéè¿æè½ä¿ååæ® |
| | | public string Sc_ICMOReportBill_ProcessCheckOut; //å¿
é¡»è¿ç¨æ£éªéè¿æè½ä¿ååæ® |
| | | public string Sc_ICMOReportBill_DeleterAndMakerMustSame; //çäº§æ±æ¥åæåå é¤äººå¿
é¡»æ¯å¶å人 |
| | | |
| | | //æ¶æéç¥å(éè´§åãå°è´§ç¡®è®¤ï¼ |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªæ¥è¯¢å°åºç«åæç»ä¿¡æ¯ï¼"; |
| | | objJsonResult.Message = "æªæ¥è¯¢å°èåä¿¡æ¯ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | long HMaterID = listSub[i].HMaterID;//产åID |
| | | long HProcID = listSub[i].HProcID;//å½åå·¥åºID |
| | | double HICMOQty = listSub[i].HICMOQty;//ä»»å¡åæ°é |
| | | double HPlanQty = list[0].HPlanQty;//移交PNLæ° |
| | | double HPlanQty = listSub[i].HPlanQty;//移交PNLæ° |
| | | DateTime HStationOutTime = list[0].HStationOutTime;//æ±æ¥æ¶é´ |
| | | long HSourceID = listSub[i].HSourceID;//çäº§èµæºID |
| | | long HPayProcID = list[0].HPayProcID;//æ ¸ç®å·¥åºID |
| | |
| | | string HProcNo = listSub[i].HProcNo;//æµæ°´å· |
| | | string HOrderProcNO = list[0].HOrderProcNO;//订åè·è¸ªå· |
| | | string HSourceNameList = list[0].HSourceNameList;//è®¾å¤æ¸
å |
| | | long HMainSourceInterID = list[0].HInterID;//éå
¥typeå¾å°çåæ®ID |
| | | string HMainSourceBillNo = list[0].HBillNo;//éå
¥typeå¾å°çåæ®å· |
| | | long HMainSourceInterID = listSub[0].HMainSourceInterID;//éå
¥typeå¾å°çåæ®ID |
| | | long HMainSourceEntryID = listSub[0].HMainSourceEntryID;//éå
¥typeå¾å°çåæ®åID |
| | | string HMainSourceBillNo = listSub[0].HMainSourceBillNo;//éå
¥typeå¾å°çåæ®å· |
| | | string HMainSourceBillType = "3790"; |
| | | bool HLastSubProc = list[0].HLastSubProc;//转ä¸å·¥åº |
| | | bool HLastSubProc = listSub[0].HLastSubProc;//转ä¸å·¥åº |
| | | long HEmpID2 = list[0].HEmpID2;//æä½å2ID |
| | | long HEmpID3 = list[0].HEmpID3;//æä½å3ID |
| | | long HEmpID4 = list[0].HEmpID4;//æä½å4ID |
| | |
| | | ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate,HSourceID2,HSourceID3,HSourceID4,HSourceID5" + |
| | | ",HSupID,HQty,HPrice,HMoney,HBadCount,HCenterID,HProcNo,HOrderProcNO,HSourceNameList" + |
| | | ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HLastSubProc" + |
| | | ",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID,HMainInterID,HPRDOrgID" + |
| | | ",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID,HMainInterID,HPRDOrgID,HMainSourceEntryID" + |
| | | ") " + |
| | | " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate(),'" + HMouldNum + "'" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL + |
| | |
| | | "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + "," + HSourceID2 + "," + HSourceID3 + "," + HSourceID4 + "," + HSourceID5 + |
| | | "," + HSupID + "," + HQty + "," + HPrice + "," + HMoney + "," + HBadCount + "," + HCenterID + "," + HProcNo + ",'" + HOrderProcNO + "'" + ",'" + HSourceNameList + "'" + |
| | | "," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + Convert.ToString(HLastSubProc ? 1 : 0) + |
| | | "," + HEmpID2 + "," + HEmpID3 + "," + HEmpID4 + "," + HEmpID5 + "," + HDSQty + "," + HChongQty + "," + HPriceRate + "," + HWorkTimes + "," + HQCCheckID + "," + HMainInterID + "," + HPRDOrgID + |
| | | "," + HEmpID2 + "," + HEmpID3 + "," + HEmpID4 + "," + HEmpID5 + "," + HDSQty + "," + HChongQty + "," + HPriceRate + "," + HWorkTimes + "," + HQCCheckID + "," + HMainInterID + "," + HPRDOrgID + "," + HMainSourceEntryID + |
| | | ") "); |
| | | } |
| | | else |
| | |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = string.Format(@"select * from h_v_Sc_ProcessExchangeBillQuerySub_SendWork"); |
| | | ds = oCN.RunProcReturn(sql + sWhere + " order by æµæ°´å· ", "h_v_Sc_ProcessExchangeBillQuerySub_SendWork"); |
| | | ds = oCN.RunProcReturn(sql + sWhere + " order by convert(int,æµæ°´å·) asc", "h_v_Sc_ProcessExchangeBillQuerySub_SendWork"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | |
| | | |
| | | //è·åç³»ç»åæ° |
| | | string Ret = ""; |
| | | string Count = ""; |
| | | if (oSystemParameter.ShowBill(ref Ret)) |
| | | { |
| | | //夿客æ·ä¸ºé¾å±±æ±½é
|
| | |
| | | |
| | | sWhere += sql_splice; |
| | | } |
| | | //夿客æ·ä¸ºçä¸ç¥º |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "çä¸ç¥º") |
| | | { |
| | | Count = "top 1000"; |
| | | } |
| | | } |
| | | |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeIssueBillQuery where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeIssueBillQuery"); |
| | | ds = oCN.RunProcReturn("select " + Count + " * from h_v_Sc_ProcessExchangeIssueBillQuery where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeIssueBillQuery"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | |
| | | |
| | | #region æ¥å·¥å¹³å°æ ¹æ®è´£ä»»äººçéå è½½èµæºå表 |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region éè¿ç³»ç»åæ°æ§å¶ï¼å¤æçäº§è®¢åæ¯å¦åäºé¦ä»¶æ£éªååå·¥åºæ£éªå |
| | | [Route("ReportPlatForm/IsCheck")] |
| | | [HttpGet] |
| | | public object IsCheck(Int64 HICMOInterID,Int64 HICMOEntryID,string HICMOBillNo) |
| | | { |
| | | try |
| | | { |
| | | //è·åç³»ç»åæ° |
| | | string sErrMsg = ""; |
| | | string HBackRemark = ""; |
| | | if (oSystemParameter.ShowBill(ref sErrMsg) == true) |
| | | { |
| | | if (oSystemParameter.omodel.Sc_ICMOReportBill_FirstCheckOut == "Y") //ç³»ç»åæ° æ¯å¦åäºé¦ä»¶æ£éªå 空ç½ä¸ºéç¨ |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_JIT_IsFirstCheckOut " + HICMOInterID + "," + HICMOEntryID + ",'" + HICMOBillNo + "'", "h_p_Sc_IsFirstCheckOut"); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | HBackRemark += ds.Tables[0].Rows[0]["HBackRemark"] + " "; |
| | | } |
| | | } |
| | | if(oSystemParameter.omodel.Sc_ICMOReportBill_ProcessCheckOut == "Y") //ç³»ç»åæ° æ¯å¦åäºè¿ç¨æ£éªå 空ç½ä¸ºéç¨ |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_JIT_IsProcessCheckOut " + HICMOInterID + "," + HICMOEntryID + ",'" + HICMOBillNo + "'", "h_p_Sc_IsProcessCheckOut"); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | HBackRemark += ds.Tables[0].Rows[0]["HBackRemark"]; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sErrMsg; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (HBackRemark == "") |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å½åç产订å已维æ¤é¦ä»¶æ£éªååè¿ç¨æ£éªå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = HBackRemark; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = ex.Message; |
| | | objJsonResult.data = null; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼"; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | bool bResult2 = false; |
| | | oCN.BeginTran(); |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_QualityReportBill_BeforeSaveCtrl " + HInterID , "h_p_Sc_QualityReportBill_BeforeSaveCtrl"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | |
| | | //ä¿å |
| | | oCN.RunProc("exec h_p_save_Sc_QualityReportBill " + HInterID); |
| | | //夿æ¯å¦å
许ä¿åï¼ä¸å
许ååæ» |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_QualityReportBill_AfterSaveCtrl " + HInterID, "h_p_Sc_QualityReportBill_AfterSaveCtrl"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | oCN.Commit(); |
| | | //è·åèªå¨å®¡æ ¸åæ° |
| | | string sReturn = ""; |
| | |
| | | |
| | | if ((OperationType == 1 || OperationType == 2) && ds.Tables[0].Rows.Count == 0)//æ°å¢ |
| | | { |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ICMOBill_BeforeSaveCtrl_New " + HInterID, "h_p_Sc_ICMOBill_BeforeSaveCtrl_New"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | //主表 |
| | | oCN.RunProc(@"Insert Into Sc_ICMOBillMain |
| | | (HBillType,HBillStatus,HInterID,HBillNo,HDate,HPRDORGID |
| | |
| | | ,{oSub.HMaterID},{oSub.HUnitID},'{oSub.HRemark}',{oSub.HSourceID},{oSub.HDeptID},{oSub.HSTATUS} |
| | | ,0,0,'','',0,0,{HINSTOCKTYPE},{HCHECKPRODUCT},{HQAIP},{HISBACKFLUSH},{HREQSRC},{HSTOCKINQUASELAUXQTY},{HSeOrderEntrySEQ},{HPROJECTNO},{HPRODUCTTYPE},{HCOSTRATE},{HBASEUNITID},{oSub.HSTOCKINORGID},{oSub.HOrderLevID})"); |
| | | } |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ICMOBill_AfterSaveCtrl_New " + HInterID, "h_p_Sc_ICMOBill_AfterSaveCtrl_New"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | |
| | | if ((OperationType == 1 || OperationType == 2 || OperationType == 4) && ds.Tables[0].Rows.Count == 0)//æ°å¢ |
| | | { |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ICMOBill_BeforeSaveCtrl_New " + HInterID, "h_p_Sc_ICMOBill_BeforeSaveCtrl_New"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | //主表 |
| | | oCN.RunProc(@"Insert Into Sc_ICMOBillMain |
| | | (HBillType,HBillStatus,HInterID,HBillNo,HDate,HPRDORGID |
| | |
| | | ,{oSub.HSourceInterID},{oSub.HSourceEntryID},'{oSub.HSourceBillNo}','{oSub.HSourceBillType}',0,0 |
| | | ,{oSub.HAuxQty},{oSub.HAuxUnit},{oSub.HWidth},{oSub.HWeight},'{oSub.HColorRemark}','{oSub.HCusMaterName}','{oSub.HCusModel}','{oSub.HOrderPickRemark}')"); |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ICMOBill_AfterSaveCtrl_New " + HInterID, "h_p_Sc_ICMOBill_AfterSaveCtrl_New"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = null; |
| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | bool bResult2 = false; |
| | | oCN.BeginTran(); |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_QualityReportBill_BeforeSaveCtrl " + HInterID, "h_p_Sc_QualityReportBill_BeforeSaveCtrl"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | //ä¿å |
| | | oCN.RunProc("exec h_p_save_Sc_QualityReportBill " + HInterID); |
| | | //夿æ¯å¦å
许ä¿åï¼ä¸å
许ååæ» |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_QualityReportBill_AfterSaveCtrl " + HInterID, "h_p_Sc_QualityReportBill_AfterSaveCtrl"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //========================================================= |
| | | oCN.Commit(); |
| | | //è·åèªå¨å®¡æ ¸åæ° |
| | | string sReturn = ""; |
| | |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | //主表 |
| | | DataSet ds; |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCn.RunProcReturn("exec h_p_Sc_ICMOBillWorkQtyStatus_BeforeSaveCtrl " + omodel.HInterID + "," + omodel.HSourceInterID + "," + omodel.HSourceEntryID + ",'" + omodel.HSourceBillNo + "'", "h_p_Sc_ICMOBillWorkQtyStatus_BeforeSaveCtrl"); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //========================================================= |
| | | |
| | | //主表 |
| | | oCn.RunProc("Insert Into Sc_ICMOBillWorkQtyStatus_Tmp " + |
| | | "(HInterID,HBillType,HSourceID,HReportType,HPieceQty" + |
| | | ",HMaterID,HGroupID,HWorkManID,HWorkReportDate,HDate" + |
| | |
| | | oCn.RunProc("update Sc_ICMOBillStatus_Tmp set HSplitRelationQty=HSplitRelationQty+" + sumqty + " where HICMOBillNo='" + omodel.HICMOBillNo + "' and HSourceID='" + omodel.HSourceID + "' and HICMOInterID='" + omodel.HICMOInterID + "' and HICMOEntryID='" + omodel.HICMOEntryID + "' and HInterID="+ omodel.HSourceInterID.ToString()); |
| | | |
| | | //忬¡éªè¯ ä¿åæ¯å¦ åç |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl"); |
| | | ds = oCn.RunProcReturn("exec h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_ICMOBillWorkQtyStatus_SaveCtrl"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | sReturn = "æ éªè¯æ°æ®ï¼"; |
| | |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCn.RunProcReturn("exec h_p_Sc_ICMOBillWorkQtyStatus_AfterSaveCtrl " + omodel.HInterID + "," + omodel.HSourceInterID + "," + omodel.HSourceEntryID + ",'" + omodel.HSourceBillNo + "'", "h_p_Sc_ICMOBillWorkQtyStatus_BeforeSaveCtrl"); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //========================================================= |
| | | |
| | | sReturn = omodel.HInterID.ToString(); |
| | | |
| | | oCn.Commit(); |
| | |
| | | //omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | DataSet ds; |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCn.RunProcReturn("exec h_p_Sc_ICMOReportBill_BeforeSaveCtrl_New " + omodel.HInterID + "," + oSub.HICMOInterID + "," + oSub.HICMOEntryID + ",'" + oSub.HICMOBillNo + "'", "h_p_Sc_ICMOReportBill_BeforeSaveCtrl_New"); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //========================================================= |
| | | //主表 |
| | | oCn.RunProc("Insert Into Sc_ICMOReportBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + |
| | |
| | | // return false; |
| | | // } |
| | | //} |
| | | // |
| | | // |
| | | // |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCn.RunProcReturn("exec h_p_Sc_ICMOReportBill_AfterSaveCtrl_New " + omodel.HInterID + "," + oSub.HICMOInterID + "," + oSub.HICMOEntryID + ",'" + oSub.HICMOBillNo + "'", "h_p_Sc_ICMOReportBill_AfterSaveCtrl_New"); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //========================================================= |
| | | |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCn.RunProcReturn("exec h_p_Sc_MESBeginWorkBill_BeforeSaveCtrl " + omodel.HInterID + "," + omodel.HICMOInterID + "," + omodel.HICMOEntryID + ",'" + omodel.HICMOBillNo + "'", "h_p_Sc_MESBeginWorkBill_BeforeSaveCtrl"); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //========================================================= |
| | | //主表 |
| | | oCn.RunProc("Insert Into Sc_MESBeginWorkBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | |
| | | ") "); |
| | | |
| | | //忬¡éªè¯ ä¿åæ¯å¦ åç |
| | | DataSet ds=oCn.RunProcReturn("exec h_p_JIT_MESBeginWorkBill_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_MESBeginWorkBill_SaveCtrl"); |
| | | ds = oCn.RunProcReturn("exec h_p_JIT_MESBeginWorkBill_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_MESBeginWorkBill_SaveCtrl"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | sReturn = "æ éªè¯æ°æ®ï¼"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCn.RunProcReturn("exec h_p_Sc_MESBeginWorkBill_AfterSaveCtrl " + omodel.HInterID + "," + omodel.HICMOInterID + "," + omodel.HICMOEntryID + ",'" + omodel.HICMOBillNo + "'", "h_p_Sc_MESBeginWorkBill_AfterSaveCtrl"); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //========================================================= |
| | | |
| | | sReturn = omodel.HInterID.ToString(); |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCn.RunProcReturn("exec h_p_Sc_MESEndWorkBill_BeforeSaveCtrl " + omodel.HInterID + "," + omodel.HICMOInterID + "," + omodel.HICMOEntryID + ",'" + omodel.HICMOBillNo + "'", "h_p_Sc_MESEndWorkBill_BeforeSaveCtrl"); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //========================================================= |
| | | //主表 |
| | | oCn.RunProc("Insert Into Sc_MESEndWorkBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | |
| | | |
| | | |
| | | //忬¡éªè¯ ä¿åæ¯å¦ åç |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_JIT_MESEndWorkBill_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_MESEndWorkBill_SaveCtrl"); |
| | | ds = oCn.RunProcReturn("exec h_p_JIT_MESEndWorkBill_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_MESEndWorkBill_SaveCtrl"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | sReturn = "æ éªè¯æ°æ®ï¼"; |
| | |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCn.RunProcReturn("exec h_p_Sc_MESEndWorkBill_AfterSaveCtrl " + omodel.HInterID + "," + omodel.HICMOInterID + "," + omodel.HICMOEntryID + ",'" + omodel.HICMOBillNo + "'", "h_p_Sc_MESEndWorkBill_AfterSaveCtrl"); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //========================================================= |
| | | |
| | | sReturn = omodel.HInterID.ToString(); |
| | | oCn.Commit(); |
| | | return true; |
| | |
| | | { |
| | | try |
| | | { |
| | | DataSet ds; |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCn.RunProcReturn("exec h_p_Sc_MESStopWorkBill_BeforeSaveCtrl " + omodel.HInterID + "," + omodel.HICMOInterID + "," + omodel.HICMOEntryID + ",'" + omodel.HICMOBillNo + "'", "h_p_Sc_MESStopWorkBill_BeforeSaveCtrl"); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //========================================================= |
| | | //主表 |
| | | oCn.RunProc("Insert Into Sc_MESStopWorkBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | |
| | | ") "); |
| | | |
| | | //忬¡éªè¯ ä¿åæ¯å¦ åç |
| | | DataSet ds = oCn.RunProcReturn("exec h_p_JIT_MESStopWorkBill_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_MESStopWorkBill_SaveCtrl"); |
| | | ds = oCn.RunProcReturn("exec h_p_JIT_MESStopWorkBill_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_MESStopWorkBill_SaveCtrl"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | sReturn = "æ éªè¯æ°æ®ï¼"; |
| | |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | | ds = oCn.RunProcReturn("exec h_p_Sc_MESStopWorkBill_AfterSaveCtrl " + omodel.HInterID + "," + omodel.HICMOInterID + "," + omodel.HICMOEntryID + ",'" + omodel.HICMOBillNo + "'", "h_p_Sc_MESStopWorkBill_AfterSaveCtrl"); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "1") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //========================================================= |
| | | |
| | | sReturn = omodel.HInterID.ToString(); |
| | | oCn.Commit(); |
| | | return true; |
| | |
| | | public double HmaterOutqty { get; set; } |
| | | public double HProcPriceRate { get; set; } |
| | | public int HTemporaryAreaID { get; set; } |
| | | |
| | | public long HMainSourceInterID { get; set; } |
| | | public long HMainSourceEntryID { get; set; } |
| | | public string HMainSourceBillNo { get; set; } |
| | | } |
| | | } |