Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | public double? HPlanQty; //计åç产æ°é |
| | | public string HRemark; |
| | | public string HIsStockQty;//æ¯å¦ååºå |
| | | public string HIsStockQty_SeOrderBill;//é宿¯å¦ååºå |
| | | public string HRemark3;//åºé¨å¤æ³¨ |
| | | |
| | | public double HRelationQty; |
| | |
| | | if (IsAudit == 1) //åå
³éæäº¤ |
| | | { |
| | | //åå
³éæäº¤ |
| | | oBill.oCn.BeginTran(); |
| | | if (oBill.AbandonCancelltion(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | |
| | | //æ§å¶å
³èæ°é,夿åå
³éåï¼ç产订å䏿¨æµè½¬å¡æ»æ°æ¯å¦è¶
è¿è®¡åæ°é |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBill_Checkqty " + lngBillKey, "h_p_Sc_ProcessExchangeBill_Checkqty"); |
| | | if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) != 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åä½åºå¤±è´¥!åå :" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]).ToString(); |
| | | objJsonResult.data = null; |
| | | |
| | | oBill.oCn.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oBill.oCn.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åä½åºæå"; |
| | |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | if (HDeptID == "0" || HDeptID.Equals("")|| HWorkCenterID == "0" || HWorkCenterID.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Sb_EquipmentLoadReportListt '0','0'", "h_p_Sb_EquipmentLoadReportListt"); |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("exec h_p_Sb_EquipmentLoadReportListt '" + HDeptID + "','" + HWorkCenterID + "'", "h_p_Sb_EquipmentLoadReportListt"); |
| | | } |
| | | ds = oCN.RunProcReturn("exec h_p_Sb_EquipmentLoadReportListt '" + HDeptID + "','" + HWorkCenterID + "'", "h_p_Sb_EquipmentLoadReportListt"); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | List<DataTable> tableList = new List<DataTable>(); |
| | | ////æ¥çæé |
| | | //if (!DBUtility.ClsPub.Security_Log("Kf_SellOutEntryReport_Query", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log("Kf_SellOutEntryReport", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | //æ¥è¯¢ |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_p_Kf_SellOutEntryReport"); |
| | | } |
| | | |
| | | tableList.Add(ds.Tables[0]); |
| | | tableList.Add(ds.Tables[1]); |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.data = tableList; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | |
| | | //oItemSub.HSourceBillType = ""; //æºåç±»å |
| | | //oItemSub.HRelationQty = 0; //å
³èæ°é |
| | | //oItemSub.HRelationMoney = 0; //å
³èéé¢ |
| | | oBill.DetailColl.Add(oItemSub); |
| | | |
| | | if (oItemSub.HMaterID != 0) |
| | | { |
| | | oBill.DetailColl.Add(oItemSub); |
| | | } |
| | | } |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | |
| | | objJsonResult.Message = "åæ®æªå®¡æ ¸!ä¸éè¦åå®¡æ ¸!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | foreach(Model.ClsXs_SeOrderBillSub oSub in oBill.DetailColl) |
| | | { |
| | | if (oSub.HCloseMan != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨è¡å
³éçè®°å½!åå®¡æ ¸å¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region éå®è®¢å è·åæåºåçæ°æ® |
| | | [Route("Xs_SeOrderBill/sortList")] |
| | | [HttpGet] |
| | | public object sortList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Xs_SeOrderBillQuery", 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_IF_SeOrderBillList order by hmainid desc", "h_v_IF_SeOrderBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_IF_SeOrderBillList where 1 = 1 "; |
| | | string sql = sql1 + sWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_SeOrderBillList"); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | //double? HPlanQty = mainList[0].HPlanQty == null ? 0 : mainList[0].HPlanQty;//è®¡åæ°é |
| | | string HMaker = user;//å¶å人 |
| | | string HIsStockQty = mainList[0].HIsStockQty; |
| | | string HIsStockQty_SeOrderBill = mainList[0].HIsStockQty_SeOrderBill; |
| | | string HRemark3 = mainList[0].HRemark3; |
| | | |
| | | //ä¿ååæ§å¶========================================= |
| | |
| | | ,HYear,HPeriod,HRemark,HMaker,HMakeDate |
| | | ,HSeOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HEmpID,HCusID |
| | | ,HCenterID,HPlanQty,HDeptID,HMaterID,HUnitID,HBomID,HPlanBeginDate,HPlanEndDate |
| | | ,HIsStockQty,HRemark3) |
| | | ,HIsStockQty,HIsStockQty_SeOrderBill,HRemark3) |
| | | values('3710','" + (HMainSourceBillSubType==null?"":HMainSourceBillSubType) + "',1," + HInterID + ",'" + HBillNo + "','" + HDate + "'," + HPRDORGID + |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + HRemark + "','" + HMaker + "',getdate()" + |
| | | ",'" + HSeOrderBillNo + "'," + HSeOrderInterID + "," + HSeOrderEntryID + "," + HEmpID + "," + HCusID + |
| | | "," + HCenterID + ",0,0,0,0," + HBomID + ",'',''" + |
| | | ",'"+ HIsStockQty + "','"+ HRemark3 + "') "); |
| | | ",'"+ HIsStockQty + "','" + HIsStockQty_SeOrderBill + "','"+ HRemark3 + "') "); |
| | | |
| | | |
| | | |
| | |
| | | "HMainSourceBillSubType='" + (HMainSourceBillSubType == null ? "" : HMainSourceBillSubType) + "'," + |
| | | "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" + |
| | | ", HSeOrderBillNo='" + HSeOrderBillNo + "', HSeOrderInterID=" + HSeOrderInterID + ", HSeOrderEntryID=" + HSeOrderEntryID + ", HEmpID=" + HEmpID + ", HCusID=" + HCusID + |
| | | ", HCenterID=" + HCenterID + ",HBomID=" + HBomID + ",HIsStockQty='"+ HIsStockQty + "',HRemark3='" + HRemark3 + "' where HInterID=" + HInterID); |
| | | ", HCenterID=" + HCenterID + ",HBomID=" + HBomID + ",HIsStockQty='"+ HIsStockQty + "',HIsStockQty_SeOrderBill='" + HIsStockQty_SeOrderBill + "',HRemark3='" + HRemark3 + "' where HInterID=" + HInterID); |
| | | |
| | | //ç产订åå é¤åå¡«éå®è®¢åå
³èæ°é |
| | | oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToICMO_Delete " + HInterID); |