Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | ",HEndDate='" + omodel.HEndDate + "'" + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HMouldMaintainRuleInterID="+omodel.HMouldMaintainRuleInterID.ToString()+ |
| | | ",HMouldMaintainRuleInterID=" + omodel.HMouldMaintainRuleInterID.ToString() + |
| | | ",HMaintainLevID=" + omodel.HMaintainLevID + |
| | | //",HDeptID=" + omodel.HDeptID.ToString() + |
| | | //",HDeptNumber='" + omodel.HDeptNumber +"'"+ |
| | | //",HEmpID=" + omodel.HEmpID.ToString() + |
| | |
| | | ",HYear,HPeriod,HRemark" + |
| | | ",HPlanNo,HPlanInterID,HMouldID,HBeginDate"+ |
| | | ",HEndDate"+ |
| | | ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID" + |
| | | ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HMaintainLevID" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+ |
| | | ",'" + omodel.HPlanNo + "'," + omodel.HPlanInterID.ToString() + "," + omodel.HMouldID.ToString() + ",'" + omodel.HBeginDate + "'" + |
| | | ",'" + omodel.HEndDate + "'"+ |
| | | ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'," +omodel.HMouldMaintainRuleInterID.ToString()+ |
| | | ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'," +omodel.HMouldMaintainRuleInterID.ToString() + "," + omodel.HMaintainLevID + |
| | | ") "); |
| | | |
| | | if (DetailCol.Count > 0) |
| | |
| | | ",HEndDate='" + omodel.HEndDate + "'" + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | |
| | | ",HMaintainLevID=" + omodel.HMaintainLevID + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark" + |
| | | ",HCycleUnit,HCheckCycle,HBeginDate,HEndDate"+ |
| | | ",HInnerBillNo,HExplanation,HMouldMaintainRuleID" + |
| | | ",HInnerBillNo,HExplanation,HMouldMaintainRuleID,HMaintainLevID" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+ |
| | | ",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "'" + |
| | | ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + "','" + omodel.HMouldMaintainRuleID + "'" + |
| | | ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "','" + omodel.HMouldMaintainRuleID + "'," + omodel.HMaintainLevID + |
| | | ") "); |
| | | //æå
¥å表é
ä»¶ä¿¡æ¯ |
| | | foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl) |
| | |
| | | ",'" + Item.HMaintainPart.ToString() + "','" + Item.HClaim.ToString() + "'" + |
| | | "," + Item.HManagerID.ToString() + |
| | | ",'" + Item.HCloseMan + "'," + Convert.ToString(Item.HCloseType ? 1 : 0) + ",'" + Item.HRemark + "'" + |
| | | "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() +"," + Item.HMaintainItem.ToString() + |
| | | "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() +",'" + Item.HMaintainItem.ToString() + "'" + |
| | | ") "); |
| | | } |
| | | // |
| | |
| | | ",HCheckCycle=" + omodel.HCheckCycle.ToString() + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HMaintainLevID=" + omodel.HMaintainLevID + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | //DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | oCn.RunProc("Insert Into Sc_MouldMaintainRuleBillMain" + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo" + |
| | | ",HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo,HMaintainLevID" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | ",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" + |
| | | ",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + |
| | | ") "); |
| | | ////æå
¥å表 |
| | | foreach (Model.ClsSc_MouldMaintainRuleBillSub oSub in DetailColl_Mater) |
| | |
| | | ",HPlanNo='" + omodel.HPlanNo + "'" + |
| | | ",HExplanation='" + omodel.HExplanation+"'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo+"'" + |
| | | ",HEquipMaintainRuleInterID="+omodel.HEquipMaintainRuleInterID.ToString()+ |
| | | ",HEquipMaintainRuleInterID=" + omodel.HEquipMaintainRuleInterID.ToString()+ |
| | | ",HMaintainLevID=" + omodel.HMaintainLevID + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark,HEquipID" + |
| | | ",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo,HEquipMaintainRuleInterID" + |
| | | ",HDeptID" + |
| | | ",HDeptID,HMaintainLevID" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() + |
| | | ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," +omodel.HEquipMaintainRuleInterID.ToString() + "," + omodel.HDeptID + |
| | | ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," +omodel.HEquipMaintainRuleInterID.ToString() + "," + omodel.HDeptID + "," + omodel.HMaintainLevID + |
| | | ") "); |
| | | //æå
¥é
ä»¶å表 |
| | | foreach (Model.ClsSb_EquipMaintainBillSub oSub in DetailColl) |
| | |
| | | ",HCheckCycle=" + omodel.HCheckCycle.ToString() + |
| | | ",HExplanation='" + omodel.HExplanation+"'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo+"'" + |
| | | ",HMaintainLevID=" + omodel.HMaintainLevID + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | oCn.RunProc("Insert Into Sb_EquipMaintainPlanBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark,HEquipID" + |
| | | ",HBeginDate,HEndDate,HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo,HMouldMaintainRuleID" + |
| | | ",HBeginDate,HEndDate,HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo,HMouldMaintainRuleID,HMaintainLevID" + |
| | | ") "+ |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() + |
| | | ",'" + omodel.HBeginDate +"','" +omodel.HEndDate + "'," + omodel.HCheckCycle.ToString() +",'"+ omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo +"','" + omodel.HMouldMaintainRuleID + "'" + |
| | | ",'" + omodel.HBeginDate +"','" +omodel.HEndDate + "'," + omodel.HCheckCycle.ToString() +",'"+ omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo +"','" + omodel.HMouldMaintainRuleID + "'," + omodel.HMaintainLevID + |
| | | ") "); |
| | | if (DetailColl != null) |
| | | { |
| | |
| | | public string HExplanation;// --ÕªÒª |
| | | public string HInnerBillNo;// --å
é¨åæ®å· |
| | | public int HMouldMaintainRuleInterID; |
| | | |
| | | public Int64 HMaintainLevID; //ä¿å
»çº§å«ï¼gy_HMaintainLevï¼ |
| | | } |
| | | } |
| | |
| | | public string HExplanation;// varchar(500) --ÕªÒª |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | public int HMouldMaintainRuleID; //å¨å
·ä¿å
»è§ç¨id |
| | | |
| | | public Int64 HMaintainLevID; //ä¿å
»çº§å«ï¼gy_HMaintainLevï¼ |
| | | } |
| | | } |
| | |
| | | public Int64 HCheckCycle;// int --ä¿å
»å¨æ |
| | | public string HExplanation;// varchar(500) --ÕªÒª |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | |
| | | |
| | | |
| | | public Int64 HMaintainLevID; //ä¿å
»çº§å«ï¼gy_HMaintainLevï¼ |
| | | } |
| | | } |
| | |
| | | |
| | | public int HEquipMaintainPlanInterID; //设å¤ä¿å
»è®¡ååï¼Sb_EquipMaintainPlanBillSub_Planï¼ä¸»å
ç |
| | | public int HEquipMaintainPlanEntryID; //设å¤ä¿å
»è®¡ååï¼Sb_EquipMaintainPlanBillSub_Planï¼åå
ç |
| | | |
| | | public Int64 HMaintainLevID; //ä¿å
»çº§å«ï¼gy_HMaintainLevï¼ |
| | | } |
| | | } |
| | |
| | | public string HExplanation; |
| | | public string HInnerBillNo; |
| | | public int HMouldMaintainRuleID; //ä¿å
»è§ç¨id |
| | | |
| | | |
| | | |
| | | public Int64 HMaintainLevID; //ä¿å
»çº§å«ï¼gy_HMaintainLevï¼ |
| | | } |
| | | } |
| | |
| | | //ååå·¥åºåºç«åçåæ ¼æ°é |
| | | oCN.RunProc("update Sc_StationOutBillMain set HQty+=1 where HProcExchInterID='" + HProcExchInterID + "' and HProcExchEntryID=" + HProcExchEntryID+ " and HInterID=" + HInterID); |
| | | |
| | | |
| | | ds = oCN.RunProcReturn($@"select (b.HQty -sum(isnull(ou.HQty,0))-sum(isnull(ou.HBadCount,0))) HQty from Sc_ProcessExchangeBillSub b WITH(NOLOCK) |
| | | left join Sc_StationOutBillMain ou WITH(NOLOCK) on b.HInterID=ou.HProcExchInterID and b.HEntryID=ou.HProcExchEntryID |
| | | where b.HInterID={HProcExchInterID} and b.HEntryID={HProcExchEntryID} |
| | | group by b.HInterID,b.HEntryID,b.HQty", "Sc_ProcessExchangeBill_Out"); |
| | | |
| | | if (double.Parse(ds.Tables[0].Rows[0][0].ToString()) < 0) { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åºç«æ°éè¶
è¿æµè½¬å¡æ°é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = "1"; |
| | |
| | | // } |
| | | |
| | | oCN.RunProc("update Gy_BarCodeBill set HStatus='' where HBarCode='" + model.HBarCode + "'"); |
| | | |
| | | DataSet dataSet = oCN.RunProcReturn($"select top 1 HInterID from Sc_StationOutBillMain where HProcExchInterID={subLsit[0].HProcExchInterID} and HProcExchEntryID={subLsit[0].HProcExchEntryID} and HBadCount>0", "Sc_StationOutBillMain"); |
| | | |
| | | if (dataSet.Tables[0].Rows.Count > 0) |
| | | { |
| | | string HOutInterID = dataSet.Tables[0].Rows[0][0].ToString(); |
| | | |
| | | oCN.RunProc("update Sc_StationOutBillMain set HBadCount-=1 where HInterID='" + HOutInterID + "'"); |
| | | } |
| | | else |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败,å½åæµè½¬å¡å½åå·¥åºçåºç«å没æä¸è¯æ°é!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败,æ ç»æï¼"; |
| | |
| | | if (string.IsNullOrEmpty(HID)) |
| | | return new ApiResult<DataSet> { code = -1, msg = "IDä¸è½ä¸ºç©º" }; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | var dataSet = oCN.RunProcReturn("select top 1 * from Sc_MouldMaintainRuleBillMain where HInterID= " + HID + " ", "Sc_MouldMaintainRuleBillMain"); |
| | | var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sc_MouldMaintainRuleBill_Edit where HInterID= " + HID + " ", "h_v_Sc_MouldMaintainRuleBill_Edit"); |
| | | if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) |
| | | return new ApiResult<DataSet> { code = -1, msg = "ä¸åå¨å¨å
·ä¿å
»è§ç¨è®°å½" }; |
| | | return new ApiResult<DataSet> { code = 1, msg = "æ¥è¯¢æå", data = dataSet }; |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_EquipFileMainList"); |
| | | } |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | | //{ |
| | | //objJsonResult.code = "0"; |
| | | //objJsonResult.count = 0; |
| | | //objJsonResult.Message = "æ æ°æ®"; |
| | | //objJsonResult.data = null; |
| | | //return objJsonResult; |
| | | //} |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | DLL.ClsGy_EquipFileMain oBill = new DLL.ClsGy_EquipFileMain(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | ds = oCN.RunProcReturn("select * from Gy_EquipFileBillMain where HInterID=" + HItemID, "Gy_EquipFileBillMain"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å½åå¤äºä¸è½å é¤ç¶æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.RunProc("Delete From Gy_EquipFileBillMain where HInterID=" + lngBillKey); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | ds = oCN.RunProcReturn("select HItemID,HParentID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_EquipFileType where 1=1 " + sWhere+ " order by HItemID ", "Gy_EquipFileType"); |
| | | ds = oCN.RunProcReturn("select HItemID,HParentID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag,HMakeEmp,HMakeTime,HCheckEmp,HCheckTime,HModifyEmp,HModifyTime,HCloseEmp,HCloseTime from Gy_EquipFileType where 1=1 " + sWhere+ " order by HItemID ", "Gy_EquipFileType"); |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | | //{ |
| | | //objJsonResult.code = "0"; |
| | | //objJsonResult.count = 0; |
| | | //objJsonResult.Message = "æ æ°æ®"; |
| | | //objJsonResult.data = null; |
| | | //return objJsonResult; |
| | | //} |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | DLL.ClsGy_EquipTypeBill oBill = new DLL.ClsGy_EquipTypeBill(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | ds = oCN.RunProcReturn("select * from Gy_EquipFileType where HItemID=" + HItemID, "Gy_EquipFileType"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCloseEmp"].ToString() != "" || ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å½åå¤äºä¸è½å é¤ç¶æï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.RunProc("Delete From Gy_EquipFileType where HItemID=" + lngBillKey); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | //主表 |
| | | oCN.RunProc("Insert into Gy_EquipFileType " + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime) " + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HMakeEmp) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID + |
| | | "," + HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',getdate())", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | "," + HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',getdate(),'" + msg4 + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.RunProc("Update Gy_EquipFileType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.Commit(); |
| | |
| | | ",HShortNumber='" + HShortNumber + "'" + |
| | | ",HHelpCode='" + HHelpCode + "'" + |
| | | ",HParentID=" + HParentID + |
| | | ",HModifyTime=getdate()" + |
| | | ",HModifyEmp='" + msg4 + "'" + |
| | | ",HStopflag='" + HStopflag + "'" + |
| | | ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹å项ç®ä»£ç |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region 设å¤å¼æºåå表PDA æ¥è¯¢ |
| | | [Route("Sb_EquipBeginBill/Sb_EquipBeginBillList_PDA")] |
| | | [HttpGet] |
| | | public object Sb_EquipBeginBillList_PDA(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipBeginBillMain_Check", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Sb_EquipBeginBillList_PDA order by åæ®å· desc", "h_v_Sb_EquipBeginBillList_PDA"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sb_EquipBeginBillList_PDA where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipBeginBillList_PDA"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | DLL.ClsSb_EquipDotCheckRuleBill oBill = new DLL.ClsSb_EquipDotCheckRuleBill(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | ds = oCN.RunProcReturn("select * from Sb_EquipDotCheckRuleBillMain where HInterID=" + HInterID, "Sb_EquipDotCheckRuleBillMain"); |
| | | if (ds.Tables[0].Rows.Count>0) |
| | | { |
| | | if (oBill.omodel.HBillStatus > 1) |
| | | if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (!DBUtility.ClsPub.Security_Log("Sb_EquipMaintainPlanBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_EquipMaintainPlan"); |
| | | } |
| | | |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | return objJsonResult; |
| | | } |
| | | DLL.ClsSb_EquipMaintainRuleBill oBill = new DLL.ClsSb_EquipMaintainRuleBill(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | ds = oCN.RunProcReturn("select * from Sb_EquipMaintainRuleBillMain where HItemID=" + HInterID, "Sb_EquipMaintainRuleBillMain"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (oBill.omodel.HBillStatus > 1) |
| | | if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HChecker != ""&& oBill.omodel.HChecker != null) |
| | | if (ds.Tables[0].Rows[0]["HChecker"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | if (string.IsNullOrEmpty(HID)) |
| | | return new ApiResult<DataSet> { code = -1, msg = "IDä¸è½ä¸ºç©º" }; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | var dataSet = oCN.RunProcReturn("select top 1 * from Sb_EquipMaintainRuleBillMain where HInterID= " + HID + " ", "Sb_EquipMaintainRuleBillMain"); |
| | | var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sb_EquipMaintainRuleBillList where HInterID= " + HID + " ", "h_v_Sb_EquipMaintainRuleBillList"); |
| | | if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) |
| | | return new ApiResult<DataSet> { code = -1, msg = "ä¸åå¨ç¹æ£è®¡å表" }; |
| | | return new ApiResult<DataSet> { code = -1, msg = "ä¸åå¨ä¿å
»è§ç¨è¡¨" }; |
| | | return new ApiResult<DataSet> { code = 1, msg = "æ¥è¯¢æå", data = dataSet }; |
| | | } |
| | | #endregion |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region 设å¤åæºåå表PDA æ¥è¯¢ |
| | | [Route("Sb_EquipStopBill/Sb_EquipStopBillList_PDA")] |
| | | [HttpGet] |
| | | public object Sb_EquipStopBillList_PDA(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipStopBillMain_Check", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Sb_EquipStopBillList_PDA order by åæ®å· desc", "h_v_Sb_EquipStopBillList_PDA"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sb_EquipStopBillList_PDA where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipStopBillList_PDA"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | using Newtonsoft.Json; |
| | | using DBUtility; |
| | | |
| | | namespace WebAPI.Controllers.SCGL |
| | | { |
| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | JIT_Cg_PODemandPlanBillMain omdelMian = new JIT_Cg_PODemandPlanBillMain(); |
| | | List<JIT_Cg_PODemandPlanBillSub> omodelsub = new List<JIT_Cg_PODemandPlanBillSub>(); |
| | | public DAL.ClsSc_ICMOBill BillOld = new DAL.ClsSc_ICMOBill(); |
| | | |
| | | #region ææè®¡åå å表 |
| | | [Route("JIT_Cg_PODemandPlanBill/JIT_Cg_PODemandPlanBillList")] |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region ææè®¡åå å®¡æ ¸/åå®¡æ ¸åè½ |
| | | [Route("JIT_Cg_PODemandPlanBill/CheckPODemandPlanBillList")] |
| | | [HttpGet] |
| | | public object CheckPODemandPlanBillList(string HInterID, int Type, string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦æå 餿é |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Check", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ææè®¡ååæ æéå®¡æ ¸!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | if (string.IsNullOrWhiteSpace(HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ClsPub.CurUserName = user; |
| | | BillOld.MvarItemKey = "JIT_Cg_PODemandPlanBillMain"; |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | |
| | | //Type 1 å®¡æ ¸ 2 åå®¡æ ¸ |
| | | if (Type == 1) |
| | | { |
| | | //夿忮æ¯å¦å·²ç»å®¡æ ¸ |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸!ä¸éè¦åå®¡æ ¸!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //å®¡æ ¸åæ® |
| | | if (!BillOld.CheckBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //夿忮æ¯å¦å·²ç»åå®¡æ ¸ |
| | | DataSet ds; |
| | | string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey); |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HChecker"] == null || ds.Tables[0].Rows[0]["HChecker"].ToString() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已åå®¡æ ¸!ä¸éè¦ååå®¡æ ¸!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //åå®¡æ ¸åæ® |
| | | if (BillOld.AbandonCheck(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ§è¡æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ§è¡å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ææè®¡åå å
³é |
| | | [Route("JIT_Cg_PODemandPlanBill/ClosePODemandPlanBillList")] |
| | | [HttpGet] |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | |
| | | ds = Sc_MouldMaintainPlanBillList_s(sWhere); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | //if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | { |
| | | try |
| | | { |
| | | LogService.Write("çäº§æ±æ¥åè¿å
¥åæ¥æ¹æ³ï¼æ±æ¥åå·ï¼" + BillNo); |
| | | |
| | | string sErr = ""; |
| | | oSystemParameter.ShowBill(ref sErr); |
| | | |
| | |
| | | DataSet ds = oCN.RunProcReturn("select * from h_v_MES_StationOutBillList_LastProc where HInterID=" + InterID, "h_v_MES_StationOutBillList_LastProc"); |
| | | if (ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | LogService.Write("çäº§æ±æ¥ååæ»ï¼æ±æ¥åå·ï¼" + BillNo + " åå ï¼çæçäº§æ±æ¥åè¿ç¨ä¸æ²¡ææ¥è¯¢å°åºç«å"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "çæçäº§æ±æ¥åè¿ç¨ä¸æ²¡ææ¥è¯¢å°åºç«å"; |
| | |
| | | |
| | | //ä¿å |
| | | oCN.BeginTran(); |
| | | DataSet DsTable = oCN.RunProcReturn($"select * from Sc_ICMOReportBillMain where HBillNo='{HBillNo}'", "Sc_ICMOReportBillMain"); |
| | | DataSet DsTable = oCN.RunProcReturn($"select * from Sc_ICMOReportBillMain with(nolock) where HBillNo='{HBillNo}'", "Sc_ICMOReportBillMain"); |
| | | if (DsTable.Tables[0].Rows.Count > 0) |
| | | { |
| | | LogService.Write("çäº§æ±æ¥ååæ»ï¼æ±æ¥åå·ï¼" + BillNo + " åå ï¼å·²å
¥åº,请ä¸è¦éå¤å
¥åº"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å·²å
¥åº,请ä¸è¦éå¤å
¥åº"; |
| | |
| | | var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); |
| | | if (isSuccess == 0) |
| | | { |
| | | LogService.Write("çäº§æ±æ¥ååæ»ï¼æ±æ¥åå·ï¼" + BillNo + " åå ï¼æä½å¤±è´¥,éè¶è´¦å·ç»å½å¼å¸¸"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æä½å¤±è´¥,éè¶è´¦å·ç»å½å¼å¸¸ã" + loginRet; |
| | |
| | | if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | LogService.Write("å·¥åºæ±æ¥åå
¥åºé误jsonRoot:" + jsonRoot); |
| | | LogService.Write("çäº§æ±æ¥åä¿åå¤±è´¥ï¼æ±æ¥åå·ï¼" + BillNo + " åå ï¼" + result); |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | result2 = InvokeHelper.Audit("PRD_MORPT", JsonConvert.SerializeObject(json));//æäº¤ |
| | | if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | LogService.Write("çäº§æ±æ¥åæäº¤å¤±è´¥ï¼æ±æ¥åå·ï¼" + BillNo + " åå ï¼" + result1); |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"çäº§æ±æ¥ååå·ï¼{fBillNo}ï¼æäº¤å¤±è´¥" + result; |
| | | objJsonResult.Message = $"çäº§æ±æ¥ååå·ï¼{fBillNo}ï¼æäº¤å¤±è´¥" + result1; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | oCN.RunProc("update Sc_StationOutBillMain set HRelationQty=1 where HBillNo='" + BillNo + "'"); |
| | | |
| | | oCN.Commit(); |
| | | |
| | | LogService.Write("çäº§æ±æ¥åä¿åæåï¼æ±æ¥åå·ï¼" + BillNo ); |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write("çäº§æ±æ¥å忥åçå¼å¸¸ï¼æ±æ¥åå·ï¼" + BillNo + " " + e.ToString()); |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | { |
| | | try |
| | | { |
| | | LogService.Write("ç产å
¥åºåè¿å
¥åæ¥æ¹æ³:" + " å
¥åºåå·ï¼" + BillNo); |
| | | //è·åçäº§æ±æ¥åæå¤§InterIDååæ®å· |
| | | Int64 HInterID = DBUtility.ClsPub.CreateBillID("1202", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | string HBillNo = DBUtility.ClsPub.CreateBillCode("1202", ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | |
| | | //DataRow dr = ds.Tables[0].Rows[0]; |
| | | |
| | | //夿å
¥åºçåæ ¼æ°éæ¯å¦ä¸º0 |
| | | var DTable = oCN.RunProcReturn("select * from Sc_StationOutBillMain where HBillNo='" + BillNo + "' ", "Sc_StationOutBillMain").Tables[0]; |
| | | var DTable = oCN.RunProcReturn("select * from Sc_StationOutBillMain with(nolock) where HBillNo='" + BillNo + "' ", "Sc_StationOutBillMain").Tables[0]; |
| | | |
| | | if (double.Parse(DTable.Rows[0]["HQty"].ToString()) == 0) |
| | | { |
| | | LogService.Write("忥éè¶ç产ç产å
¥åºååæ»--åºç«åå·ï¼" + BillNo + " åæ»åå ï¼åæ ¼æ°é为0,ä¸éè¦å
¥åºï¼"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 2; |
| | | objJsonResult.Message = "åæ ¼æ°é为0,ä¸éè¦å
¥åºï¼"; |
| | |
| | | var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); |
| | | if (isSuccess == 0) |
| | | { |
| | | LogService.Write("忥éè¶ç产å
¥åºååæ»--åºç«åå·ï¼" + BillNo + " åæ»åå ï¼æä½å¤±è´¥,éè¶è´¦å·ç»å½å¼å¸¸"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æä½å¤±è´¥,éè¶è´¦å·ç»å½å¼å¸¸ã" + loginRet; |
| | |
| | | |
| | | if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | { |
| | | LogService.Write("忥éè¶ç产å
¥åºååæ»--åºç«åå·ï¼" + BillNo + " åæ»åå ï¼æªæ¾å°å¯¹åºçæ¬å°æéè¶äºçäº§æ±æ¥åè®°å½;1.æªæ¥è¯¢å°å¯¹åºççäº§æ±æ¥åï¼2.请确ä¿å½åå·¥åºæ¯æ«éå·¥åº3.æ±æ¥å对åºçå
¥åºæ°é已满 请å¨éè¶äºæ¥çå
¥åºè®°å½ï¼"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªæ¾å°å¯¹åºçæ¬å°æéè¶äºçäº§æ±æ¥åè®°å½;1.æªæ¥è¯¢å°å¯¹åºççäº§æ±æ¥åï¼2.请确ä¿å½åå·¥åºæ¯æ«éå·¥åº3.æ±æ¥å对åºçå
¥åºæ°é已满 请å¨éè¶äºæ¥çå
¥åºè®°å½ï¼"; |
| | |
| | | DataRow dr1 = ds1.Tables[0].Rows[0]; |
| | | if (double.Parse(dr1[0].ToString()) <= 0) |
| | | { |
| | | LogService.Write("忥éè¶ç产å
¥åºååæ»--åºç«åå·ï¼" + BillNo + " åæ»åå ï¼æªæ¾å°å¯¹åºççäº§æ±æ¥åè®°å½;1.æªæ¥è¯¢å°å¯¹åºççäº§æ±æ¥åï¼2.请确ä¿å½åå·¥åºæ¯æ«éå·¥åº3.æ±æ¥å对åºçå
¥åºæ°é已满 请å¨éè¶äºæ¥çå
¥åºè®°å½ï¼"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æªæ¾å°å¯¹åºççäº§æ±æ¥åè®°å½;1.æªæ¥è¯¢å°å¯¹åºççäº§æ±æ¥åï¼2.请确ä¿å½åå·¥åºæ¯æ«éå·¥åº3.æ±æ¥å对åºçå
¥åºæ°é已满 请å¨éè¶äºæ¥çå
¥åºè®°å½ï¼"; |
| | |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | LogService.Write("忥éè¶ç产å
¥åºååæ»--åºç«åå·ï¼" + BillNo + " åæ»åå ï¼å½ååºç«åå·å·²å
¥åº,请ä¸è¦éæ°å
¥åº!"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½ååºç«åå·å·²å
¥åº,请ä¸è¦éæ°å
¥åº!"; |
| | |
| | | } |
| | | |
| | | //夿éè¶äºçäº§æ±æ¥å æ°é æ¯å¦ å¤§äº æ«éåºç«æ°é |
| | | ds = oCN.RunProcReturn($@"select sum(FFinishQty)-sum(FSTOCKINQUASELQTY)-(select HQty from Sc_StationOutBillMain where HBillNo='{BillNo}') |
| | | ds = oCN.RunProcReturn($@"select sum(FFinishQty)-sum(FSTOCKINQUASELQTY)-(select HQty from Sc_StationOutBillMain with(nolock) where HBillNo='{BillNo}') |
| | | from AIS20220308151944..T_PRD_MORPT rpt3 |
| | | left join AIS20220308151944..T_PRD_MORPTENTRY rpt2 on rpt3.FID = rpt2.FID |
| | | left join AIS20220308151944..T_PRD_MORPTENTRY_A rpt1 on rpt2.FID = rpt1.FID |
| | |
| | | |
| | | if (double.Parse(ds.Tables[0].Rows[0][0].ToString()) < 0) |
| | | { |
| | | LogService.Write("忥éè¶ç产å
¥åºååæ»--åºç«åå·ï¼" + BillNo + " åæ»åå ï¼éè¶äºæ±æ¥æ°éå°äºæ¬å°åºç«æ°é!"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "éè¶äºæ±æ¥æ°éå°äºæ¬å°åºç«æ°é!"; |
| | |
| | | { |
| | | if (item["HWYID"].ToString() == null || item["HWYID"].ToString() == "" || item["HWYID"].ToString() == "undefined") |
| | | { |
| | | LogService.Write("忥éè¶ç产å
¥åºååæ»--åºç«åå·ï¼" + BillNo + " åæ»åå ï¼å¯ä¸ID为空ï¼è¯·éæ°æå¨å
¥åºæè系管çåï¼"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å¯ä¸ID为空ï¼è¯·éæ°æå¨å
¥åºæè系管çåï¼"; |
| | |
| | | string result = InvokeHelper.Save("PRD_INSTOCK", JsonConvert.SerializeObject(jsonRoot));//ä¿å |
| | | //夿ä¿åæ¯å¦æå |
| | | if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | LogService.Write("ç产å
¥åºé误jsonRoot:" + jsonRoot); |
| | | { |
| | | LogService.Write("ç产å
¥åºä¿åé误jsonRoot:" + jsonRoot + " å
¥åºåå·ï¼" + BillNo); |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | //result2 = InvokeHelper.Audit("PRD_INSTOCK", JsonConvert.SerializeObject(json));//æäº¤ |
| | | if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | LogService.Write("ç产å
¥åºæäº¤é误jsonRoot:" + jsonRoot + " å
¥åºåå·ï¼" + BillNo); |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | |
| | | oCN.RunProc("update Sc_StationOutBillMain set HRelationQty=1 where HBillNo='" + BillNo + "'"); |
| | | |
| | | LogService.Write("ç产å
¥åºåæ¥æå:" + " å
¥åºåå·ï¼" + BillNo); |
| | | oCN.Commit(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogService.Write("ç产å
¥åºåæ¥åçå¼å¸¸:" + " å
¥åºåå·ï¼" + BillNo + " " + e.ToString()); |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | ds = oCn.RunProcReturn(sql, "Gy_MenuDefineSet"); //æ¥è¯¢å½åç¨æ·çèªå®ä¹èåæ°æ® |
| | | if (ds.Tables[0]==null || ds.Tables[0].Rows.Count == 0) //夿å½åç¨æ·æ¯å¦æè®¾ç½®è¿èªå®ä¹ä¿¡æ¯ï¼è¥è®°å½æ°ä¸º0ï¼å没æè®¾ç½®è¿ï¼å è½½ææçèåä¿¡æ¯ |
| | | { |
| | | sql = "Select * from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition "; |
| | | sql = "Select * from Gy_Menu_1 where HType = '" + HType + "' Order by HPosition,len(HitemID),HitemID "; |
| | | ds = oCn.RunProcReturn(sql, "Gy_Menu"); |
| | | } |
| | | |
| | |
| | | //主表 |
| | | oCN.RunProc(@"Insert Into Sc_ICMOBillMain |
| | | (HBillType,HInterID,HBillNo,HDate,HPRDORGID |
| | | ,HYear,HPeriod,HRemark,HMaker,HMakeDate |
| | | ,HYear,HPeriod,HRemark,HMaker,HMakeDate,HChecker,HCheckDate |
| | | ,HSeOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HEmpID,HCusID |
| | | ,HCenterID,HPlanQty,HDeptID,HMaterID,HUnitID,HBomID,HPlanBeginDate,HPlanEndDate,HBillStatus |
| | | ,HOWNERID,HOWNERTYPEID) |
| | | values('3710'," + mainList[0].HInterID + ",'" + mainList[0].HBillNo + "','" + mainList[0].HDate + "'," + mainList[0].HPRDORGID + |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + mainList[0].HRemark + "','" + mainList[0].HMaker + "',getdate()" + |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + mainList[0].HRemark + "','" + mainList[0].HMaker + "',getdate(),'" + mainList[0].HMaker + "',getdate()" + |
| | | ",'" + mainList[0].HSeOrderBillNo + "'," + mainList[0].HSeOrderInterID + "," + mainList[0].HSeOrderEntryID + "," + mainList[0].HEmpID + "," + mainList[0].HCusID + |
| | | "," + mainList[0].HCenterID + "," + mainList[0].HPlanQty + ",0,0,0,0,'','',2" + |
| | | ","+ mainList[0].HOWNERID + ",'"+ mainList[0].HOWNERTYPEID + "') "); |
| | |
| | | ",HCheckCycle=" + omodel.HCheckCycle.ToString() + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HMaintainLevID=" + omodel.HMaintainLevID + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | oCn.RunProc("Insert Into Sb_EquipMaintainRuleBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark" + |
| | | ",HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo" + |
| | | ",HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo,HMaintainLevID" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + |
| | | "',"+ omodel.HCheckCycle.ToString() + ",'" + omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + |
| | | "') "); |
| | | "',"+ omodel.HCheckCycle.ToString() + ",'" + omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + |
| | | ") "); |
| | | |
| | | //æå
¥ä¿å
»é¡¹å表 |
| | | foreach (Models.ClsSb_EquipMaintainRuleBillSub_Item Item in DetailColl_Pay) |
| | |
| | | public int HCheckCycle; //--ä¿å
»å¨æ |
| | | public string HExplanation; // varchar(500) --æè¦ |
| | | public string HInnerBillNo; //varchar(50) --å
é¨åæ®å· |
| | | |
| | | public Int64 HMaintainLevID; //ä¿å
»çº§å«ï¼gy_HMaintainLevï¼ |
| | | } |
| | | } |