Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | public string HBarCode_Pack; |
| | | public Int64 HMaterID; |
| | | public Int64 HUnitID; |
| | | public double HWeight;// money --åé |
| | | public double HMWeight;// money --æ¯é |
| | | public double HPWeight;// money --ç®é |
| | | public int HProdOrgID;// int --ç产ç»ç» |
| | | public int HDeptID;// int --è½¦é´ |
| | | public int HEmpID;// int --æä½å |
| | | public string HBarCode_Cus;// varchar(100) --å®¢æ·æ ç¾å· |
| | | } |
| | | } |
| | |
| | | int HCaveQty = mainList[0].HCaveQty; |
| | | int HMouldDotCheckRuleInterID= mainList[0].HMouldDotCheckRuleInterID; |
| | | int HMouldMaintainRuleInterID= mainList[0].HMouldMaintainRuleInterID; |
| | | int HNowSupID = mainList[0].HNowSupID; |
| | | int HNowSupTypeID = mainList[0].HNowSupTypeID; |
| | | |
| | | |
| | | |
| | |
| | | ",HMaterID,HMaterNumber,HMouldType,HUnitID" + |
| | | ",HOutComDate,HOutComNo,HDeptID,HSupID,HSupNumber" + |
| | | ",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" + |
| | | ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife" + |
| | | ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" + |
| | | ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID" + |
| | | ") " + |
| | | " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | |
| | | "," + HMaterID + ",'" + HMaterNumber + "'," + HMouleTypeID + "," + HUnitID + |
| | | ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" + |
| | | "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID +","+ HCaveQty+ |
| | | "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "'" + |
| | | "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID+"','"+ HNowSupTypeID+"'"+ |
| | | ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID+"','"+ HMouldMaintainRuleInterID+"'"+ |
| | | ") "); |
| | | |
| | |
| | | int HCaveQty = mainList[0].HCaveQty; |
| | | int HMouldDotCheckRuleInterID = mainList[0].HMouldDotCheckRuleInterID; |
| | | int HMouldMaintainRuleInterID = mainList[0].HMouldMaintainRuleInterID; |
| | | |
| | | int HNowSupID = mainList[0].HNowSupID; |
| | | int HNowSupTypeID = mainList[0].HNowSupTypeID; |
| | | |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCN.BeginTran(); |
| | |
| | | ",HMouldDotCheckRuleInterID="+ HMouldDotCheckRuleInterID.ToString()+ |
| | | ",HMouldMaintainRuleInterID=" + HMouldMaintainRuleInterID.ToString() + |
| | | ",HMouldOWNER='" + HMouldOWNER + "'" + |
| | | ",HNowSupID="+HNowSupID.ToString()+ |
| | | ",HNowSupTypeID="+HNowSupTypeID.ToString()+ |
| | | ",HProdWeight=" + HProdWeight.ToString() + |
| | | " where HInterID=" + HInterID.ToString()); |
| | | |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers.SCGL |
| | | { |
| | | public class Sc_PackUnionBillController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus;//åæ®ç¶æï¼æ°å¢ï¼ä¿®æ¹ï¼æµè§ï¼æ´æ°åä»·ï¼åæ´ï¼ |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | public DAL.ClsSc_PackUnionBill BillNew0 = new DAL.ClsSc_PackUnionBill(); // |
| | | public DAL.ClsSc_PackUnionBill BillOld0 = new DAL.ClsSc_PackUnionBill(); // |
| | | |
| | | #region ç»æåå表 |
| | | |
| | | [Route("Sc_PackUnionBill/Get_PackUnionBillList")] |
| | | [HttpGet] |
| | | public object GetMateOutBillList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select * from h_v_PackUnionBillList order by æ¥æ desc", "h_v_PackUnionBillList"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region [ç»æåå é¤åè½] |
| | | /// <summary> |
| | | /// ç»æåå é¤åè½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Sc_PackUnionBill/set_DeleteBill")] |
| | | [HttpGet] |
| | | public object set_DeleteBill(string HInterID, string user) |
| | | { |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_PackUnionBill", 1, true, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | string s = ""; |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); |
| | | if (lngBillKey == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DLL.ClsKf_MateOutBackBill oBill = new DLL.ClsKf_MateOutBackBill(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | if (oBill.omodel.HBillStatus > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å½åå¤äºä¸è½å é¤ç¶æ,ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HChecker != "" && oBill.omodel.HChecker != null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ç»å®¡æ ¸,ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (!DBUtility.Xt_BaseBillFun.Fun_AllowDeleteBill(oBill, ref s)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s + "ï¼ä¸å
许å é¤"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (IsDete) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªæ¾å°"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region[ç»æåç¼è¾æ¶è·åè¡¨å¤´æ°æ®] |
| | | [Route("Sc_PackUnionBill/Sc_PackUnionBillListCheckDetai")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> Sc_PackUnionBillListCheckDetai(string HID) |
| | | { |
| | | 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 h_v_PackUnionBillList where hmainid= " + HID + " ", "h_v_PackUnionBillList"); |
| | | 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 }; |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sID==null||sID=="") |
| | | if (sID == null || sID == "") |
| | | { |
| | | sql = string.Format(@"select k.HBarCode æ¡ç ,m.HBillNo å¨å
·ç¼å·,s.HName çç¹æ¹æ¡, |
| | | case when k.HCorrespondentTypeID=1 then 'ä¾åºå' when k.HCorrespondentTypeID=2 then '客æ·' when k.HCorrespondentTypeID=4 then 'ä»åº' end å®é
ä½ç½®ç±»å, |
| | |
| | | left join Gy_Customer c1 on m.HNowSupID=c1.HItemID |
| | | left join Gy_Warehouse w on k.HCorrespondentID=w.HItemID |
| | | left join Gy_Warehouse w1 on m.HNowSupID=w1.HItemID |
| | | where " + sWhere+ " and k.HSourceInterID=(select HItemID from Gy_StockCheckItem where HItemID="+sID+") and k.HMakeDate<=(select HEndDate from Gy_StockCheckItem where HItemID="+sID+")"); |
| | | where " + sWhere + " and k.HSourceInterID=(select HItemID from Gy_StockCheckItem where HItemID=" + sID + ") and k.HMakeDate<=(select HEndDate from Gy_StockCheckItem where HItemID=" + sID + ")"); |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn(sql, "Sc_MouldStockBillMain_Temp"); |
| | | list.Add(ds.Tables[0]); |
| | | objJsonResult.code = "0"; |
| | |
| | | public string HMouldOWNER { get; set; } |
| | | public int HMouldMaintainRuleInterID { get; set; } |
| | | public int HMouldDotCheckRuleInterID { get; set; } |
| | | public int HNowSupID { get; set; } |
| | | public int HNowSupTypeID { get; set; } |
| | | |
| | | } |
| | | } |
| | |
| | | <Compile Include="Controllers\MoveStockBillController.cs" /> |
| | | <Compile Include="Controllers\Open_PrintTemController.cs" /> |
| | | <Compile Include="Controllers\ReportStepPlatFormController.cs" /> |
| | | <Compile Include="Controllers\SCGL\Sc_PackUnionBillController.cs" /> |
| | | <Compile Include="Controllers\Sc_ProcessMangementController.cs" /> |
| | | <Compile Include="Controllers\忥èªå¨æ«ç 线\ScanlineAPIController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_StockCheckItemBillController.cs" /> |