Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | { |
| | | if (DBUtility.ClsPub.isStrNull(DS2.Tables[0].Rows[0][0]) != "OK") |
| | | { |
| | | sErrMsg = "åå
¥å表失败ï¼"; |
| | | sErrMsg = "åæ®å·ï¼" + omodel.HBillNo + "ï¼åå
¥å表失败ï¼"; |
| | | return false; |
| | | } |
| | | } |
| | |
| | | public bool HStopflag; |
| | | public string HRemark; |
| | | public long HLevel; |
| | | public long HParentID; |
| | | public long HParentID=0; |
| | | public string HModel; |
| | | public long HUnitID; |
| | | public string HUnitNumber; |
| | |
| | | oSc_ProdWIPTotalReport.Show(); |
| | | oMainForm.AddTabPage(oSc_ProdWIPTotalReport); |
| | | break; |
| | | case "mes_wipprocreport_wip": |
| | | MES_WIPProcReport_WIP oMES_WIPProcReport_WIP = new MES_WIPProcReport_WIP(); |
| | | oMES_WIPProcReport_WIP.MdiParent = oMain; |
| | | oMES_WIPProcReport_WIP.ModCaption = gnmc; |
| | | oMES_WIPProcReport_WIP.Show(); |
| | | oMainForm.AddTabPage(oMES_WIPProcReport_WIP); |
| | | break; |
| | | case "mes_wipprocreport": |
| | | MES_WIPProcReport oMES_WIPProcReport = new MES_WIPProcReport(); |
| | | oMES_WIPProcReport.MdiParent = oMain; |
| | |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_MateOutRequestBillSub.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKF_ChangeBoxBillMain.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKF_ChangeBoxBillSub.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_MoveStockStepOutBillMain.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_MoveStockBillMain.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_MoveStockBillScheme.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_MoveStockStepOutBillSub.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_MoveStockBillSub.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_OtherInBillMain.cs" /> |
| | | <Compile Include="ä»åºç®¡ç\ClsKf_OtherInBillScheme.cs" /> |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsKf_MoveStockStepOutBillMain : DBUtility.ClsXt_BaseBillMain |
| | | { |
| | | public Int64 HSupID;// int --ä¾åºå |
| | | public Int64 HWHID;// int --ä»åº |
| | | public Int64 HSCWHID;// int --è°åºä»åº |
| | | public Int64 HEmpID;// int --ä¸å¡å |
| | | public Int64 HManagerID;// int --è´è´£äºº |
| | | public Int64 HSecManagerID;// int --éªæ¶ |
| | | public Int64 HKeeperID;// int --ä¿ç®¡å |
| | | public Int64 HDeptID;// int --é¨é¨ |
| | | public string HExplanation;// varchar(200) --ÕªÒª |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | public bool HRedBlueFlag;// bit --红èå |
| | | public int HCurID; |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsKf_MoveStockStepOutBillSub : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public Int64 HMaterID;// int --ç©æID |
| | | public string HBatchNo;// varchar(50) --æ¹æ¬¡ |
| | | public int HAuxPropID; |
| | | public Int64 HPropertyID;// int --è¾
å©å±æ§ |
| | | public Int64 HSecUnitID;// int --è¾
å©è®¡éåä½ |
| | | public Single HSecUnitRate;// money --æ¢ç®ç |
| | | public Int64 HUnitID;// int --计éåä½ |
| | | public double HQtyMust;// dec(18,8) --åºæ¶æ°é |
| | | public double HQty;// dec(18,8) --宿¶æ°é |
| | | public double HPrice;// dec(18,8) --åä»· |
| | | public double HMoney;// dec(18,8) --éé¢ |
| | | public Int64 HWHID;// int --æ¶æä»åº |
| | | public Int64 HSCWHID;// int --è°åºä»åºID |
| | | public Int64 HSPID;// int --è°å
¥ä»ä½ |
| | | public Int64 HSCSPID;// int --è°åºä»ä½ID |
| | | public Int64 HPOOrderInterID;// int --éè´è®¢å主å
ç |
| | | public Int64 HPOOrderEntryID;// int --éè´è®¢ååå
ç |
| | | public string HPOOrderBillNo;// varchar(50) --éè´è®¢åå· |
| | | public Int64 HSeOrderInterID;// int --éå®è®¢å主å
ç |
| | | public Int64 HSeOrderEntryID;// int --éå®è®¢ååå
ç |
| | | public string HSeOrderBillNo;// varchar(50) --éå®è®¢åå· |
| | | public double HOrderPrice; |
| | | public double HInvoiceQty; |
| | | public string HContainerNum; |
| | | public double HGrossQty; |
| | | public double HNetQty; |
| | | |
| | | } |
| | | } |
| | |
| | | { |
| | | // |
| | | public string HExplanation; //æè¿°varchar(500) |
| | | public DateTime HMakeTime; |
| | | public string HMakeEmp; |
| | | public int HConkTypeID; |
| | | public string HCheckEmp; |
| | | public DateTime HCheckTime; |
| | | public string HModifyEmp; |
| | | public DateTime HModifyTime; |
| | | public string HStopEmp; |
| | | public DateTime HStopTime; |
| | | |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | [Route("WW_EntrustOrderBill/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere) |
| | | public object list(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | //if (sWhere == null || sWhere.Equals("")) |
| | | //{ |
| | | // ds = oCN.RunProcReturn("select * from h_v_IF_EntrustOrderBillList " + sWhere, "h_v_IF_EntrustOrderBillList"); |
| | | //} |
| | | //else |
| | | //{ |
| | | // string sql1 = "select * from h_v_IF_EntrustOrderBillList where 1 = 1 "; |
| | | // string sql = sql1 + sWhere; |
| | | // ds = oCN.RunProcReturn(sql, "h_v_IF_EntrustOrderBillList"); |
| | | //} |
| | | |
| | | //夿æ¯å¦æéè´ç»çæé |
| | | bool isCgjl = Security_Log("WW_EntrustOrderBill_PurchasManager", 1, true, user); |
| | | if (!isCgjl) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_EntrustOrderBillList " + sWhere, "h_v_IF_EntrustOrderBillList"); |
| | | sWhere += $" and HEmpID in (select HEmpID from Gy_Czygl where Czymc='{user}' )"; |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_IF_EntrustOrderBillList where 1 = 1 "; |
| | | string sql = sql1 + sWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_EntrustOrderBillList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | string sql = "select * from h_v_IF_EntrustOrderBillList where 1 = 1 " + sWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_EntrustOrderBillList"); |
| | | |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éè´è®¢å åé
|
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("WW_EntrustOrderBill/distribut")] |
| | | [HttpGet] |
| | | public object distribut(string Hmainid, string HSupplierId) |
| | | { |
| | | try |
| | | { |
| | | string sql = $"updateãWW_EntrustOrderBillMainã set HBusinessStatus = 2 ,HEmpID ={HSupplierId} where HInterID in ({Hmainid})"; |
| | | oCN.RunProc(sql); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æä½æåï¼"; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// éè´è®¢å åå¸ |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("WW_EntrustOrderBill/release")] |
| | | [HttpGet] |
| | | public object release(string Hmainid) |
| | | { |
| | | try |
| | | { |
| | | string sql = $"updateãWW_EntrustOrderBillMainã set HBusinessStatus = 3 where HInterID in ({Hmainid})"; |
| | | oCN.RunProc(sql); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æä½æåï¼"; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// éè´è®¢å æ¤é |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("WW_EntrustOrderBill/Back")] |
| | | [HttpGet] |
| | | public object Back(string Hmainid) |
| | | { |
| | | try |
| | | { |
| | | string sql = $"updateãWW_EntrustOrderBillMainã set HBusinessStatus = 2 where HInterID in ({Hmainid})"; |
| | | oCN.RunProc(sql); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æä½æåï¼"; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | // |
| | | |
| | | /// <summary> |
| | | /// éè´è®¢å ä¼å
级 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("WW_EntrustOrderBill/yxj")] |
| | | [HttpGet] |
| | | public object yxj(string Hmainid, string HyxjId) |
| | | { |
| | | try |
| | | { |
| | | string sql = $"updateãWW_EntrustOrderBillMainã set HPriority ={HyxjId} where HInterID in ({Hmainid})"; |
| | | |
| | | oCN.RunProc(sql); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æä½æåï¼"; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | [Route("POOrderBack")] |
| | | [HttpGet] |
| | | /// <summary> |
| | | /// 订ååé¦ç¶æ |
| | | /// </summary> |
| | | /// <param name=""></param> |
| | | /// <returns></returns> |
| | | public object POOrderBack(string HmainidList, string OrderBackId) |
| | | { |
| | | try |
| | | { |
| | | string sql = ""; |
| | | for (int i = 0; i < HmainidList.Split(',').Length; i++) |
| | | { |
| | | var Hmainid = HmainidList.Split(',')[i]; |
| | | sql = string.Format(@" |
| | | update WW_EntrustOrderBillSub set |
| | | HFeedback ='{0}' |
| | | where HInterID = '{1}' and HEntryID = '{2}' ", OrderBackId, Hmainid.Split('-')[0], Hmainid.Split('-')[1]); |
| | | oCN.RunProc(sql); |
| | | |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æä½æåï¼"; |
| | | //objJsonResult.Message = string.Join(",", HmainidList.ToArray()); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | //夿æ¯å¦å卿é,å¹¶åå
¥æ¥å¿ |
| | | public static bool Security_Log(string gnsy, int LogTF, bool Msg, string CurUserName) |
| | | { |
| | | //gnsy åè½ç´¢å¼,模å |
| | | //usercode å½åç¨æ·ä»£ç |
| | | //LogTF 1夿æé并忥å¿ï¼2åªåæ¥å¿ï¼3åªå¤ææé |
| | | //Msg 没ææéæ¶ æ¯å¦æç¤ºæ¡ |
| | | string UserID = CurUserName; |
| | | try |
| | | { |
| | | ClsSqlHelper oCn = new ClsSqlHelper(); |
| | | DataSet Ds = new DataSet(); |
| | | DataSet DsUser = new DataSet(); |
| | | DataSet DsJS = new DataSet();//è§è² |
| | | long ModID = 0; |
| | | bool HavRight = false; |
| | | //æ¾å°æ¨¡åæé |
| | | Ds = oCn.RunProcReturn("select * from xt_xtgnb where gnsy='" + gnsy.Trim() + "'", "xt_xtgnb"); |
| | | if (Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | if (Msg == true) |
| | | { |
| | | //MessageBox.Show("æ²¡ææ¾å°è¯¥åè½æ¨¡åï¼", "æç¤º"); |
| | | } |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | ModID = ClsPub.isLong(Ds.Tables[0].Rows[0]["ID"].ToString()); //è¿å模å |
| | | } |
| | | if (LogTF == 1 || LogTF == 3)//éè¦å¤ææé |
| | | { |
| | | //æ ¹æ®ç¨æ·åç§°å¤ææé |
| | | DsUser = oCn.RunProcReturn("select * from gy_czygl where czymc='" + UserID.Trim() + "'", "gy_czygl"); |
| | | if (DsUser.Tables[0].Rows.Count == 0) |
| | | { |
| | | if (Msg == true) |
| | | { |
| | | //MessageBox.Show("æ²¡ææ¾å°å½åæä½åï¼", "æç¤º"); |
| | | } |
| | | return false; |
| | | } |
| | | //æ ¹æ®ç¨æ·åç§°å¤ææé |
| | | if ((bool)DsUser.Tables[0].Rows[0]["ManagerFlag"]) //æ¯å¦ç®¡çå |
| | | { |
| | | HavRight = true; |
| | | } |
| | | else |
| | | { |
| | | if (DsUser.Tables[0].Rows[0]["AuthorityID"].ToString().Trim().Substring((int)ModID - 1, 1) == "1") |
| | | { |
| | | HavRight = true; |
| | | } |
| | | else |
| | | { |
| | | //è·åç¨æ·ç» 并循ç¯å¤ææé |
| | | //夿è§è²æ¯å¦ææé |
| | | DsJS = oCn.RunProcReturn("select isnull(AuthorityID,'') AuthorityID from System_UserGroupinfo a inner join System_UserGroup b on a.GroupID=b.GroupID " + |
| | | " Where a.USERID='" + UserID.Trim() + "'", "gy_czygl"); |
| | | if (DsJS == null) |
| | | { |
| | | HavRight = false; |
| | | } |
| | | else |
| | | { |
| | | HavRight = false; |
| | | for (int i = 0; i < DsJS.Tables[0].Rows.Count; i++) |
| | | { |
| | | if (ClsPub.isStrNull(DsJS.Tables[0].Rows[i]["AuthorityID"]).Length > ModID) |
| | | { |
| | | if (DsJS.Tables[0].Rows[i]["AuthorityID"].ToString().Trim().Substring((int)ModID - 1, 1) == "1") |
| | | { |
| | | HavRight = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (HavRight == false) |
| | | { |
| | | if (Msg == true) |
| | | { |
| | | //MessageBox.Show("æ¨æ²¡ææé,请ä¸ç®¡çåèç³»ï¼", "æç¤º"); |
| | | } |
| | | } |
| | | } |
| | | //éè¦åå
¥æ¥å¿ |
| | | if ((LogTF == 1 && HavRight) || LogTF == 2) |
| | | { |
| | | //Add_Log(Ds.Tables[0].Rows[0]["id"].ToString().Trim(), gnsy + "," + Ds.Tables[0].Rows[0]["gnmc"].ToString().Trim(), CurUserName); |
| | | } |
| | | return HavRight; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (Msg == true) |
| | | { |
| | | //MessageBox.Show("夿æéæ¶åç°é误,请ä¸ç®¡çåèç³»ï¼", "æç¤º"); |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// çæåå¸å¼è°åºå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("MoveStockStepOutBill/set_SaveMoveStockStepOutBill_Json")] |
| | | [HttpPost] |
| | | public object set_SaveMoveStockStepOutBill_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | //List<Model.ClsKf_MoveStockBillMain> lsmain = new List<Model.ClsKf_MoveStockBillMain>(); |
| | | //ListModels oListModels = new ListModels(); |
| | | //lsmain = oListModels.getMoveStockBillMainByJson(msg1); |
| | | //lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | //lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | //string sSourceBillType = lsmain[0].HBillType; |
| | | //BLL.ClsKf_MoveStockBill bll = new BLL.ClsKf_MoveStockBill(); |
| | | //return bll.set_SaveMoveStockBill(lsmain[0], sSourceBillType, ref DBUtility.ClsPub.sErrInfo); |
| | | try |
| | | { |
| | | List<Model.ClsKf_MoveStockStepOutBillMain> lsmain = new List<Model.ClsKf_MoveStockStepOutBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getMoveStockStepOutBillMainByJson(msg1); |
| | | lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | string sSourceBillType = lsmain[0].HBillType; |
| | | //string sSourceBillType = "-1"; |
| | | |
| | | |
| | | WebAPI.WebS.ClsKf_MoveStockStepOutBillMain websLsmain = new WebS.ClsKf_MoveStockStepOutBillMain(); |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HDate = lsmain[0].HDate; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HDeptID = lsmain[0].HDeptID; |
| | | websLsmain.HEmpID = lsmain[0].HEmpID; |
| | | websLsmain.HRemark = lsmain[0].HRemark; |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HWHID = lsmain[0].HWHID; |
| | | websLsmain.HSCWHID = lsmain[0].HSCWHID; |
| | | websLsmain.HKeeperID = lsmain[0].HKeeperID; |
| | | websLsmain.HSecManagerID = lsmain[0].HSecManagerID; |
| | | websLsmain.HManagerID = 0; |
| | | websLsmain.HBillerID = 0; |
| | | websLsmain.HExplanation = ""; |
| | | websLsmain.HInnerBillNo = ""; |
| | | websLsmain.HRedBlueFlag = true; |
| | | websLsmain.HMainSourceBillType = "-1"; |
| | | websLsmain.HStockStyle = ""; |
| | | websLsmain.HBillType = "1250"; |
| | | websLsmain.HSupID = 0; |
| | | //websLsmain.HGroupID = lsmain[0].HGroupID; |
| | | |
| | | if (webserver.set_SaveMoveStockBill(websLsmain, "-1", ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "çæè°æ¨åæåï¼åæ®å·ä¸ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "99"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¸ä¼ 失败ï¼" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "3"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¸ä¼ 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// åå
¥ä¸´æ¶è¡¨ æ«æºåçæ¹æ³ |
| | | /// </summary> |
| | | /// <param name="HSourceBillNo"></param> |
| | | /// <returns></returns> |
| | | [Route("MoveStockStepOutBill/set_sourcebill")] |
| | | [HttpGet] |
| | | public object set_sourcebill(string HSourceBillType, string HSourceBillNo, Int64 sInterID, string sBillNo) |
| | | { |
| | | try |
| | | { |
| | | // DataSet ds = new DataSet(); |
| | | // WebServer webserver = new WebServer(); |
| | | string sWhere = " Where åæ®å· like '%" + HSourceBillNo.Trim() + "%'"; |
| | | ds = webserver.GetXs_SeOutStockBillList(sWhere); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); |
| | | } |
| | | else |
| | | { |
| | | //HSupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSupID"]); |
| | | //HSupName = Convert.ToString(ds.Tables[0].Rows[0]["HSupName"]); |
| | | HDeptID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HDeptID"]); |
| | | HDeptName = Convert.ToString(ds.Tables[0].Rows[0]["HDeptName"]); |
| | | if (webserver.set_SavePonderationBillMain_Temp_Source_Fast(sInterID, sBillNo, HBillType, HSourceBillNo, HSourceBillType, "èå", ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå
¥ä¸´æ¶è¡¨å¤±è´¥ï¼" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// åå¸å¼è°åºåæ«ç /æ«æ¡ç /ç´æ¥è°ç¨webservice |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("MoveStockStepOutBill/get_CheckTypeByBarCode_Json")] |
| | | [HttpGet] |
| | | public Object get_CheckTypeByBarCode_Json(string sCode, Int64 sInterID, string sBillNo, string sBillType, string sMaker, Int64 WhID, Int64 SPID, Double sQty, bool sRedBlue, bool SourceFlag, string sSourceBillNo, string sSourceType, Int64 HOWNERID) |
| | | { |
| | | //if (sRedBlue == true) |
| | | //{ |
| | | // HBillType = "1245"; |
| | | //} |
| | | //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, sBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo); |
| | | WebS.WebService1 oWebs = new WebS.WebService1(); |
| | | WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS(); |
| | | string sExpressNumber = ""; |
| | | //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo); |
| | | WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo); |
| | | if (WebSoBar == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = WebSoBar; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | //å é¤è®°å½ |
| | | [Route("MoveStock/Delete_Json")] |
| | | [HttpGet] |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// åå
¥ä¸´æ¶è¡¨ æ«æºåçæ¹æ³ |
| | | /// </summary> |
| | | /// <param name="HSourceBillNo"></param> |
| | | /// <returns></returns> |
| | | [Route("ICMOReportBill/set_SaveICMOReportBill")] |
| | | [HttpGet] |
| | | public object set_SaveICMOReportBill(string HSourceBillType, string HSourceBillNo, Int64 sInterID, string sBillNo) |
| | | { |
| | | try |
| | | { |
| | | // DataSet ds = new DataSet(); |
| | | // WebServer webserver = new WebServer(); |
| | | string sWhere = " Where åæ®å· like '%" + HSourceBillNo.Trim() + "'"; |
| | | //æ ¹æ®æºåç±»åæ¥è°ç¨ä¸åçWEBSæ¹æ³ new |
| | | if (HSourceBillType == "3710") |
| | | { |
| | | ds = webserver.GetSc_ICMOBillList(sWhere + " "); |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½,æºåç±»åæé误ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | // |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + HSourceBillType; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); |
| | | } |
| | | else |
| | | { |
| | | HDeptID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HDeptID"]); |
| | | HDeptName = Convert.ToString(ds.Tables[0].Rows[0]["HDeptName"]); |
| | | if (webserver.set_SavePonderationBillMain_Temp_Source_Fast(sInterID, sBillNo, HBillType, HSourceBillNo, HSourceBillType, "èå", ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå
¥ä¸´æ¶è¡¨å¤±è´¥ï¼" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è¿ååºå
¥åºæ¡ç 临æ¶è¡¨ |
| | | /// </summary> |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// çäº§æ±æ¥å/æäº¤/ç´æ¥è°webservice |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("ICMOReportBill/set_SaveICMOReportBill_Json")] |
| | | [HttpPost] |
| | | public object set_SaveICMOReportBill_Json([FromBody] JObject oMain) |
| | | { |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | List<Model.ClsSc_ICMOReportBillMain> lsmain = new List<Model.ClsSc_ICMOReportBillMain>(); |
| | | ListModels oListModels = new ListModels(); |
| | | lsmain = oListModels.getICMOReportBillMainByJson(msg1); |
| | | lsmain[0].HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | lsmain[0].HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | string sSourceBillType = lsmain[0].HBillType; |
| | | |
| | | WebAPI.WebS.ClsSc_ICMOReportBillMain websLsmain = new WebS.ClsSc_ICMOReportBillMain(); |
| | | |
| | | websLsmain.HInterID = lsmain[0].HInterID; |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HBillType = "1201";//åºå®å¼ |
| | | websLsmain.HDate = lsmain[0].HDate; |
| | | websLsmain.HDeptID = lsmain[0].HDeptID; |
| | | websLsmain.HEmpID = 0; |
| | | websLsmain.HBillerID = lsmain[0].HBillerID; |
| | | websLsmain.HRemark = ""; |
| | | websLsmain.HMainSourceBillType = lsmain[0].HBillType; |
| | | |
| | | |
| | | if (webserver.set_SaveICMOReportBill_Json(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼åæ®å·ä¸ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¸ä¼ 失败ï¼" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¸ä¼ 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | [Route("POStockInBill/GetSpName_Json")] |
| | | [HttpGet] |
| | | public object GetSpName_Json(long HSpID, long HWHID, long HStockOrgID, ref string sErrMsg) |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Customer "+ sWhere + " Order by HItemID ", "h_v_IF_Customer"); |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Customer " + sWhere + " Order by HItemID ", "h_v_IF_Customer"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); |
| | | //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); |
| | | |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Customer " + sWhere+"", "h_v_IF_Customer"); |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Customer " + sWhere + "", "h_v_IF_Customer"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Emp "+sWhere+" Order by HItemID ", "h_v_IF_Emp"); |
| | | |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Emp " + sWhere + " Order by HItemID ", "h_v_IF_Emp"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); |
| | | //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); |
| | | |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Emp " + sWhere+"", "h_v_IF_Emp"); |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Emp " + sWhere + "", "h_v_IF_Emp"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Warehouse "+sWhere+" Order by HItemID ", "h_v_IF_Warehouse"); |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Warehouse " + sWhere + " Order by HItemID ", "h_v_IF_Warehouse"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); |
| | | //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); |
| | | |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Warehouse "+sWhere+"", "h_v_IF_Warehouse"); |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Warehouse " + sWhere + "", "h_v_IF_Warehouse"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_StockPlace "+sWhere+" Order by HItemID ", "Gy_StockPlace"); |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_StockPlace " + sWhere + " Order by HItemID ", "Gy_StockPlace"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); |
| | | //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); |
| | | |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_StockPlace "+sWhere+"", "Gy_StockPlace"); |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_StockPlace " + sWhere + "", "Gy_StockPlace"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Department "+sWhere+" Order by HItemID ", "h_v_IF_Department"); |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Department " + sWhere + " Order by HItemID ", "h_v_IF_Department"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); |
| | | //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); |
| | | |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Department "+sWhere+"", "h_v_IF_Department"); |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Department " + sWhere + "", "h_v_IF_Department"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Supplier "+sWhere+" Order by HItemID", "Gy_Supplier"); |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Supplier " + sWhere + " Order by HItemID", "Gy_Supplier"); |
| | | //if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | |
| | | //} |
| | | //else |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | //} |
| | | } |
| | | catch (Exception e) |
| | |
| | | SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); |
| | | //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); |
| | | |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_Supplier "+sWhere+"", "Gy_Supplier"); |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_Supplier " + sWhere + "", "Gy_Supplier"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName,HModel from h_v_IF_Material "+sWhere+" Order by HItemID", "h_v_IF_Material"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "falseï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName,HModel from h_v_IF_Material " + sWhere + " Order by HItemID", "h_v_IF_Material"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); |
| | | //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); |
| | | |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Material "+sWhere+"", "h_v_IF_Material"); |
| | | ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Material " + sWhere + "", "h_v_IF_Material"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | #region æ¡ä»¶æ¥è¯¢æéå表 |
| | | [Route("PublicPageMethod/PowerList")] |
| | | [HttpGet] |
| | | public object PowerList(string czybm,string sGnbm) |
| | | public object PowerList(string czybm, string sGnbm) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | sName = ""; |
| | | } |
| | | else { |
| | | else |
| | | { |
| | | sName = sGnbm; |
| | | } |
| | | } |
| | | |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_Czygl where czybm='" + czybm + "'", "Gy_Czygl"); |
| | | string AuthorityID = ClsPub.isStrNull(ds.Tables[0].Rows[0]["AuthorityID"]); |
| | | ds = oCN.RunProcReturn("SELECT id hid,case when id<=" + AuthorityID.Length + " then case when SUBSTRING('" + AuthorityID + "',id,1)=1 then 1 else 0 end else 0 end AuthorityID,'' AuthorityHID, gnms ,gnbm hgnbm FROM xt_xtgnb where useflag=1 and sjgnbm='" + sName + "' and rightflag=1 order by gnbm", "xt_xtgnb"); |
| | |
| | | } |
| | | } |
| | | } |
| | | oDs = null; |
| | | oDs = null; |
| | | } |
| | | oCN.RunProc("UPDATE Gy_Czygl SET AuthorityID='" + Auth_str + "' WHERE czybm='" + msg4.Trim() + "'"); |
| | | objJsonResult.code = "1"; |
| | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message; |
| | | objJsonResult.data =null; |
| | | objJsonResult.data = null; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | |
| | | int HMakeSupID = list[0].HMakeSupID; // int //å¶é å (Gy_Supplier) |
| | | string HMaker = msg4; |
| | | string HMakeDate = DateTime.Now.Date.ToString(); |
| | | int HEquipDotCheckRuleInterID = list[0].HEquipDotCheckRuleInterID; |
| | | int HEquipMaintainRuleInterID = list[0].HEquipMaintainRuleInterID; |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HEquipFileNumber)) |
| | | { |
| | |
| | | oCN.RunProc("Insert into Gy_EquipFileBillMain " + |
| | | " (hbillno,HEquipFileNumber,HEquipFileNo,HName,HModel,HModel2,HMaterID,HUnitID,HOutComDate" + |
| | | ",HOutComNo,HDeptID,HUseEmpID,HRepairEmpID,HAddress,HSetupDate,HStartupDate,HStatus," + |
| | | "HEquipFileTypeID,HProNum,HBarCode,HWorkArea,HLogo,HSellSupID,HMakeSupID,hbilltype,HDate,HYear,HMaker,HMakeDate) " + |
| | | "HEquipFileTypeID,HProNum,HBarCode,HWorkArea,HLogo,HSellSupID,HMakeSupID,hbilltype,HDate,HYear,HMaker,HMakeDate,HEquipMaintainRuleInterID,HEquipDotCheckRuleInterID) " + |
| | | " Values('" + hbillno + "','" + HEquipFileNumber + "','" + HEquipFileNo + "','" + HName + "','" + HModel + "','" + HModel2 + "'," + HMaterID + "," + HUnitID + |
| | | ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HUseEmpID + "," + HRepairEmpID + ",'" + HAddress + |
| | | "','" + HSetupDate + "','" + HStartupDate + "','" + HStatus + "'," + HEquipFileTypeID + ",'" + HProNum + |
| | | "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID +",'3308','" + HDate +"','"+ HYear+ "','" + HMaker + "','" + HMakeDate + |
| | | "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID +",'3308','" + HDate +"','"+ HYear+ "','" + HMaker + "','" + HMakeDate +"','"+ HEquipMaintainRuleInterID+"','"+ HEquipDotCheckRuleInterID+ |
| | | "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.Commit(); |
| | |
| | | int HMakeSupID = list[0].HMakeSupID; // int //å¶é å (Gy_Supplier) |
| | | string HUpDater = msg4; |
| | | string HUpDateDate = DateTime.Now.Date.ToString(); |
| | | int HEquipDotCheckRuleInterID = list[0].HEquipDotCheckRuleInterID; |
| | | int HEquipMaintainRuleInterID = list[0].HEquipMaintainRuleInterID; |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HEquipFileNumber)) |
| | | { |
| | |
| | | ",HMakeSupID= " + HMakeSupID + |
| | | ",HUpDater= '" + HUpDater + "'" + |
| | | ",HUpDateDate= '" + HUpDateDate + "'" + |
| | | ",HEquipDotCheckRuleInterID='"+ HEquipDotCheckRuleInterID+"'"+ |
| | | ",HEquipMaintainRuleInterID='"+ HEquipMaintainRuleInterID+"'"+ |
| | | " Where HInterID=" + HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹å项ç®ä»£ç |
| | | //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_RepairCheck,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); |
| 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.SBGL |
| | | { |
| | | public class Sb_EquipDotCheckRuleBillController : ApiController |
| | | { |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus;//åæ®ç¶æï¼æ°å¢ï¼ä¿®æ¹ï¼æµè§ï¼æ´æ°åä»·ï¼åæ´ï¼ |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | public DLL.ClsSb_EquipDotCheckRuleBill BillNew = new DLL.ClsSb_EquipDotCheckRuleBill(); //对åºåæ®ç±» |
| | | public DLL.ClsSb_EquipDotCheckRuleBill BillOld = new DLL.ClsSb_EquipDotCheckRuleBill(); //对åºåæ®ç±» |
| | | |
| | | |
| | | #region 设å¤ç¹æ£è§ç¨åå表 |
| | | [Route("Sb_EquipDotCheckRuleBill/GetEquipDotCheckRuleList")] |
| | | [HttpGet] |
| | | public object GetEquipDotCheckRuleList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Sb_EquipDotCheckRuleList " + sWhere + " order by hmainid desc", "h_v_Sb_EquipDotCheckRuleList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sb_EquipDotCheckRuleList where 1 = 1"; |
| | | string sql = sql1 + sWhere + " order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckRuleList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æä½ è¦æ¾çè®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | 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 设å¤ç¹æ£è§ç¨è®°å½å é¤åè½ |
| | | [Route("Sb_EquipDotCheckRuleBill/DeleteEquipDotCheckRuleBillList")] |
| | | [HttpGet] |
| | | public object DeleteEquipDotCheckRuleBillList(string HInterID) |
| | | { |
| | | 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.ClsSb_EquipDotCheckRuleBill oBill = new DLL.ClsSb_EquipDotCheckRuleBill(); |
| | | 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 != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ç»å®¡æ ¸,ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (IsDete) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | 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("Sb_EquipDotCheckRuleBill/Sb_EquipDotCheckRuleBillListCheckDetai")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> Sb_EquipDotCheckRuleBillListCheckDetai(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_Sb_EquipDotCheckRuleList where hmainid= " + HID + " ", "h_v_Sb_EquipDotCheckRuleList"); |
| | | 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 |
| | | |
| | | #region[设å¤ç¹æ£è§ç¨åç¼è¾æ¶è·åè¡¨ä½æ°æ®] |
| | | [Route("Sb_EquipDotCheckRuleBill/Sb_EquipDotCheckRuleBillListProjectDetai")] |
| | | [HttpGet] |
| | | public object Sb_EquipDotCheckRuleBillListProjectDetai(string sqlWhere) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sqlWhere == null || sqlWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select ç¹æ£é¡¹ç®ID,ç¹æ£é¡¹ç®,ç¹æ£é¨ä½,å
·ä½è¦æ±,è´è´£äººID,è´è´£äººä»£ç ,è´è´£äºº,å夿³¨ from h_v_Sb_EquipDotCheckRuleList", "h_v_Sb_EquipDotCheckRuleList"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select ç¹æ£é¡¹ç®ID,ç¹æ£é¡¹ç®,ç¹æ£é¨ä½,å
·ä½è¦æ±,è´è´£äººID,è´è´£äººä»£ç ,è´è´£äºº,å夿³¨ from h_v_Sb_EquipDotCheckRuleList where 1 = 1 "; |
| | | string sql = sql1 + sqlWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckRuleList"); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| 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.SBGL |
| | | { |
| | | public class Sb_EquipMaintainRuleBillController : ApiController |
| | | { |
| | | private json objJsonResult = new json(); |
| | | public DataSet ds = new DataSet(); |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus;//åæ®ç¶æï¼æ°å¢ï¼ä¿®æ¹ï¼æµè§ï¼æ´æ°åä»·ï¼åæ´ï¼ |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | public DLL.ClsSb_EquipMaintainRuleBill BillNew = new DLL.ClsSb_EquipMaintainRuleBill(); //对åºåæ®ç±» |
| | | public DLL.ClsSb_EquipMaintainRuleBill BillOld = new DLL.ClsSb_EquipMaintainRuleBill(); //对åºåæ®ç±» |
| | | |
| | | #region 设å¤ä¿å
»è§ç¨åå表 |
| | | [Route("Sb_EquipMaintainRuleBill/GetEquipMaintainRuleList")] |
| | | [HttpGet] |
| | | public object GetEquipMaintainRuleList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Sb_EquipMaintainRuleList " + sWhere + " order by hmainid desc", "h_v_Sb_EquipMaintainRuleList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sb_EquipMaintainRuleList where 1 = 1"; |
| | | string sql = sql1 + sWhere + " order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainRuleList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æä½ è¦æ¾çè®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | 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 设å¤ä¿å
»è§ç¨è®°å½å é¤åè½ |
| | | [Route("Sb_EquipMaintainRuleBill/DeleteEquipMaintainRuleBillList")] |
| | | [HttpGet] |
| | | public object DeleteEquipMaintainRuleBillList(string HInterID) |
| | | { |
| | | 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.ClsSb_EquipMaintainRuleBill oBill = new DLL.ClsSb_EquipMaintainRuleBill(); |
| | | 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 != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ç»å®¡æ ¸,ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (IsDete) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | 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("Sb_EquipMaintainRuleBill/Sb_EquipMaintainRuleBillListProjectDetaiNew")] |
| | | [HttpGet] |
| | | public object Sb_EquipMaintainRuleBillListProjectDetaiNew(string HInterID) |
| | | { |
| | | |
| | | DataSet ds, ds1; |
| | | List<object> list = new List<object>(); |
| | | string Swhere = ""; |
| | | try |
| | | { |
| | | if (HInterID != "" || HInterID != null) |
| | | { |
| | | Swhere = " and hmainid='" + HInterID + "'"; |
| | | } |
| | | else |
| | | { |
| | | Swhere = HInterID; |
| | | } |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | //è·åä¿å
»é¡¹ç®ç¼è¾æ°æ® |
| | | string sql = "select ä¿å
»é¡¹ç®ID,ä¿å
»é¡¹ç®,ä¿å
»é¨ä½,å
·ä½è¦æ±,è´è´£äººID,è´è´£äººä»£ç ,è´è´£äººåç§°,å夿³¨2 from h_v_Sb_EquipMaintainRuleList where 1 = 1 " + Swhere + ""; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainRuleList"); |
| | | //è·åé
件项ç®ç¼è¾æ°æ® |
| | | string sql1 = "select é
ä»¶ID,é
件代ç ,é
ä»¶åç§°,åä½ID,计éåä½ä»£ç ,计éåä½åç§°,ç¨é,æ åç¨é,å夿³¨1 from h_v_Sb_EquipMaintainRuleList where 1 = 1 " + Swhere + ""; |
| | | ds1 = oCN.RunProcReturn(sql1, "h_v_Sb_EquipMaintainRuleList"); |
| | | |
| | | list.Add(ds.Tables[0]); |
| | | list.Add(ds1.Tables[0]); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.list = list; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| | |
| | | public DataSet ds = new DataSet(); |
| | | public WebServer webserver = new WebServer(); |
| | | public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | public DAL.ClsSc_MouldScrapInBill BillNew0 = new DAL.ClsSc_MouldScrapInBill(); //模å
·æ¥åºå
¥åºå¯¹åºåæ®ç±» |
| | | public DAL.ClsSc_MouldScrapInBill BillOld0 = new DAL.ClsSc_MouldScrapInBill(); //模å
·æ¥åºå
¥åºå¯¹åºåæ®ç±» |
| | |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sc_MouldMaintain where 1 = 1 "; |
| | | string sql = sql1 + sWhere+ "order by æ¥æ desc"; |
| | | string sql = sql1 + sWhere + "order by æ¥æ desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldMaintain"); |
| | | |
| | | |
| | | } |
| | | //return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintainBillList ", "h_v_Sc_MouldMaintainBillList"); |
| | | } |
| | |
| | | |
| | | public static DataSet Sc_MouldDotCheckBillList_s(string sWhere) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckBillList where 1=1 "+sWhere+ "order by æ¥æ desc", "h_v_Sc_MouldDotCheckBillList"); |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckBillList where 1=1 " + sWhere + "order by æ¥æ desc", "h_v_Sc_MouldDotCheckBillList"); |
| | | } |
| | | #endregion |
| | | |
| | |
| | | DataSet ds; |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldConkBookBillList order by æ¥æ desc" + sWhere, "h_v_Sc_MouldConkBookBillList"); |
| | | ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldConkBookBillList order by æ¥æ desc" + sWhere, "h_v_Sc_MouldConkBookBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sc_MouldConkBookBillList where 1 = 1 "; |
| | | string sql = sql1 + sWhere+ "order by æ¥æ desc"; |
| | | string sql = sql1 + sWhere + "order by æ¥æ desc"; |
| | | ds = new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldConkBookBillList"); |
| | | } |
| | | return ds; |
| | |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sc_MouldRepairCheckBillList_Edit where 1 = 1 "; |
| | | string sql = sql1 + sWhere+ "order by æ¥æ desc"; |
| | | string sql = sql1 + sWhere + "order by æ¥æ desc"; |
| | | ds = new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldRepairCheckBillList_Edit"); |
| | | } |
| | | return ds; |
| | |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sc_MouldRepairWorkBillList where 1 = 1 "; |
| | | string sql = sql1 + sWhere+ "order by æ¥æ desc"; |
| | | string sql = sql1 + sWhere + "order by æ¥æ desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldRepairWorkBillList"); |
| | | } |
| | | } |
| | |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MoveStockBillList order by æ¥æ desc", "h_v_IF_MoveStockBillList"); |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// çäº§é¢æåå表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Kf_MateOutBill/GetMateOutBillList")] |
| | | [HttpGet] |
| | | public object GetMateOutBillList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = Sc_GetMateOutBillList(sWhere); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | #region sqlè¯å¥ |
| | | |
| | | |
| | | public static DataSet Sc_GetMateOutBillList(string sWhere) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_MateOutBillList order by æ¥æ desc", "h_v_IF_MateOutBillList"); |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | /// <summary> |
| | | /// éå®åºåºåå表 |
| | | /// </summary> |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | ///éå®åºåºåå é¤åè½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Kf_SellOutBill/DeltetSellOutBill")] |
| | | [HttpGet] |
| | | public object DeltetSeOutStockBackBill(string HInterID) |
| | | { |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #region sqlè¯å¥ |
| | | |
| | | |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | ///产åå
¥åºåå é¤åè½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Kf_ProductInBill/DeltetProductInBill")] |
| | | [HttpGet] |
| | | public object DeltetProductInBill(string HInterID) |
| | | { |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #region sqlè¯å¥ |
| | | |
| | | |
| | |
| | | public object AuditProcessReportList(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "Sb_MouldRepairWorkBill_Check"; |
| | | DBUtility.ClsPub.CurUserName=CurUserName; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | |
| | | return objJsonResult; |
| | | } |
| | | if (IsAudit == 0) //å®¡æ ¸æäº¤ |
| | | { |
| | | { |
| | | //å®¡æ ¸æäº¤ |
| | | if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | |
| | | //oItemSub.HSourceBillNo = ""; //æºååå· |
| | | //oItemSub.HSourceBillType = ""; //æºåç±»å |
| | | Sub.HRelationQty = 0; //å
³èæ°é |
| | | //oItemSub.HRelationMoney = 0; //å
³èéé¢ |
| | | //HMaterID = "";//é
件代ç |
| | | //HUnitID = "";//åä½ä»£ç |
| | | //HQty = "";//å®é
ç¨é |
| | | //HQtyMust = "";//åä½ç¨é |
| | | //HRemark = "";//夿³¨ |
| | | //oItemSub.HRelationMoney = 0; //å
³èéé¢ |
| | | //HMaterID = "";//é
件代ç |
| | | //HUnitID = "";//åä½ä»£ç |
| | | //HQty = "";//å®é
ç¨é |
| | | //HQtyMust = "";//åä½ç¨é |
| | | //HRemark = "";//夿³¨ |
| | | |
| | | oBill.DetailColl.Add(Sub); |
| | | |
| | |
| | | public object Sc_MouldMaintainBillListProjectDetaiNew(string HInterID) |
| | | { |
| | | |
| | | DataSet ds,ds1; |
| | | DataSet ds, ds1; |
| | | List<object> list = new List<object>(); |
| | | string Swhere = ""; |
| | | try |
| | |
| | | { |
| | | Swhere = " and hmainid='" + HInterID + "'"; |
| | | } |
| | | else |
| | | else |
| | | { |
| | | Swhere = HInterID; |
| | | } |
| | |
| | | //è·åä¿å
»é¡¹ç®ç¼è¾æ°æ® |
| | | string sql = "select HMaintainItemID, ä¿å
»é¡¹ç®ä»£ç HMaintainItemNumber,ä¿å
»é¡¹ç®åç§° HMaintainItem,ä¿å
»é¨ä½ HMaintainPart,å
·ä½è¦æ± HClaim,HManagerID,è´è´£äººä»£ç HManagerNumber,è´è´£äºº HManagerName,表ä½å¤æ³¨ HRemark from h_v_Sc_MouldMaintainBillListItem where 1 = 1 " + Swhere + ""; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainBillListItem"); |
| | | //è·åé
件项ç®ç¼è¾æ°æ® |
| | | //è·åé
件项ç®ç¼è¾æ°æ® |
| | | string sql1 = "select HMaterID, é
件代ç HMaterNumber,é
ä»¶åç§° HMaterName,è§æ ¼åå· HMaterSpec,HUnitID,åä½ä»£ç HUnitNumber,åä½åç§° HUnitName,å®é
ç¨é HQty,æ åç¨é HQtyMust,HManagerID,è´è´£äººä»£ç HManagerNumber,è´è´£äºº HManagerName,表ä½å¤æ³¨ HRemark from h_v_Sc_MouldMaintainBillList where 1 = 1 " + Swhere + ""; |
| | | ds1 = oCN.RunProcReturn(sql1, "h_v_Sc_MouldMaintainBillList"); |
| | | list.Add(ds.Tables[0]); |
| | |
| | | #endregion |
| | | |
| | | #region [模å
·ä¿å
»è®°å½è¡¨å é¤åè½] |
| | | /// <summary> |
| | | /// 模å
·ç»´ä¿®åå é¤åè½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldMaintainBill/DeltetSc_MouldMaintainBill")] |
| | | /// <summary> |
| | | /// 模å
·ç»´ä¿®åå é¤åè½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldMaintainBill/DeltetSc_MouldMaintainBill")] |
| | | [HttpGet] |
| | | public object DeltetSc_MouldMaintainBill(string HInterID) |
| | | { |
| | |
| | | oBill.omodel = oItem; |
| | | } |
| | | //åè¡¨ä½æ°æ® |
| | | |
| | | |
| | | List<Models.ClsSc_MouldStockBillSub> ls = new List<Models.ClsSc_MouldStockBillSub>(); |
| | | ls = oListModels.getObjectByJson_Gy_MouldScrapInHouseBillSub(msg2); |
| | | int i = 0; |
| | |
| | | |
| | | [Route("Sc_MouldScrapOutHouseBill/GetMouldScrapOutHouseBill")] |
| | | [HttpGet] |
| | | public object GetMouldScrapOutHouseBill(string sWhere,string user, string Organization) |
| | | public object GetMouldScrapOutHouseBill(string sWhere, string user, string Organization) |
| | | { |
| | | try |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Sc_GetMouldScrapOutHouseBill(sWhere,Organization); |
| | | ds = Sc_GetMouldScrapOutHouseBill(sWhere, Organization); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | |
| | | string sql1 = string.Format(@"select * from h_v_Sc_MouldScrapOutHouseBillList where åºåç»ç»='" + Organization + "'"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1+ "order by æ¥æ desc", "h_v_Sc_MouldScrapOutHouseBillList"); |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by æ¥æ desc", "h_v_Sc_MouldScrapOutHouseBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere+ "order by æ¥æ desc"; |
| | | string sql = sql1 + sWhere + "order by æ¥æ desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldScrapOutHouseBillList"); |
| | | } |
| | | } |
| | |
| | | HSecUnitID, è¾
å©è®¡éåä½ä»£ç HSecUnitCode, è¾
å©è®¡éåä½åç§° HSecUnitName, æ¢ç®ç HSecUnitRate, HUnitID, 计éåä½ä»£ç HUnitCode, 计éåä½åç§° HUnitName, æ¹æ¬¡ HBatchNo, |
| | | è®¾è®¡å¯¿å½ HDesignLife, å©ä½å¯¿å½ HLeaveLife, 使ç¨å¯¿å½ HUseLife, å®åæ°é HQty, åä»· HPrice, éé¢ HMoney, HWHID, åè´§ä»åºä»£ç HWHCode, åè´§ä»åºåç§° HWHName, |
| | | HSPID, ä»ä½ä»£ç HSPCode, ä»ä½åç§° HSPName, 夿³¨ HRemark,HStockOrgID FROM h_v_Sc_MouldScrapOutHouseBillList"), "h_v_Sc_MouldScrapOutHouseBillList"); |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldScrapOutHouseBill/DeltetMouldScrapOutHouseBill")] |
| | | [HttpGet] |
| | | public object DeltetMouldScrapOutHouseBill(string HInterID,string user) |
| | | public object DeltetMouldScrapOutHouseBill(string HInterID, string user) |
| | | { |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Delete", 1, true, user)) |
| | |
| | | |
| | | [Route("Sc_MouldProdBackBill/GetMouldProdBackBill")] |
| | | [HttpGet] |
| | | public object GetMouldProdBackBill(string sWhere,string user, string Organization) |
| | | public object GetMouldProdBackBill(string sWhere, string user, string Organization) |
| | | { |
| | | try |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Sc_GetMouldProdBackBill(sWhere,Organization); |
| | | ds = Sc_GetMouldProdBackBill(sWhere, Organization); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | |
| | | } |
| | | } |
| | | |
| | | public static DataSet Sc_GetMouldProdBackBill(string sWhere,string Organization) |
| | | public static DataSet Sc_GetMouldProdBackBill(string sWhere, string Organization) |
| | | { |
| | | string sql1 = string.Format(@"select * from h_v_Sc_MouldProdBackBillList where åºåç»ç»='" + Organization + "'"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere+ "order by æ¥æ desc"; |
| | | string sql = sql1 + sWhere + "order by æ¥æ desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList"); |
| | | } |
| | | |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldProdBackBill/DeltetMouldProdBackBill")] |
| | | [HttpGet] |
| | | public object DeltetMouldProdBackBill(string HInterID,string user) |
| | | public object DeltetMouldProdBackBill(string HInterID, string user) |
| | | { |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Delete", 1, true, user)) |
| | |
| | | |
| | | [Route("Sc_MouldProdOutBill/GetMouldProdOutBill")] |
| | | [HttpGet] |
| | | public object GetMouldProdOutBill(string sWhere, string user,string Organization) |
| | | public object GetMouldProdOutBill(string sWhere, string user, string Organization) |
| | | { |
| | | try |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Sc_GetMouldProdOutBill(sWhere,Organization); |
| | | ds = Sc_GetMouldProdOutBill(sWhere, Organization); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | |
| | | string sql1 = string.Format(@"select * from h_v_Sc_MouldProdOutHouseBillList where åºåç»ç»='" + Organization + "'"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1+ "order by æ¥æ desc", "h_v_Sc_MouldProdOutHouseBillList"); |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by æ¥æ desc", "h_v_Sc_MouldProdOutHouseBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere+ "order by æ¥æ desc"; |
| | | string sql = sql1 + sWhere + "order by æ¥æ desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdOutHouseBillList"); |
| | | } |
| | | |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4= sArray[2].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | |
| | | |
| | | string UserName = ""; |
| | |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sc_MouldLifeChangeBillList where 1 = 1 "; |
| | | string sql = sql1 + sWhere+ "order by æ¥æ desc"; |
| | | string sql = sql1 + sWhere + "order by æ¥æ desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldLifeChangeBillList"); |
| | | } |
| | | |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldDotCheckRuleInter/GetMouldDotCheckRuleInterList")] |
| | | [HttpGet] |
| | | public object GetMouldDotCheckRuleInterList(int MouldProjectID) |
| | | public object GetMouldDotCheckRuleInterList(string sWhere) |
| | | { |
| | | if (MouldProjectID <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "产åå¨å
·æªéæ©"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = string.Format(@"select * from h_v_Sc_MouldDotCheckRuleBillList"); |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldDotCheckRuleBillList"); |
| | | string sql = string.Format(@"select * from h_v_Sc_MouldDotCheckRuleBillList "); |
| | | ds = oCN.RunProcReturn(sql+sWhere, "h_v_Sc_MouldDotCheckRuleBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®è®¾å¤æ¾ç¤ºè®¾å¤ä¿å
»è§ç¨é¡¹ç® |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetMaintainItemtemByEquipProjectID")] |
| | | [HttpGet] |
| | | public object GetMaintainItemtemByEquipProjectID(int EquipProjectID) |
| | | { |
| | | if (EquipProjectID <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "产åå¨å
·æªéæ©"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = string.Format(@"select t.HMaintainItemID HMaintainItemID,m.HNumber HMaintainItemNumber,t.HMaintainItem HMaintainItem,t.HMaintainPart HMaintainPart,t.HClaim HClaim,t.HManagerID HManagerID,e.HNumber HManagerNumber,e.HName HManagerName,a.HRemark |
| | | from Sb_EquipMaintainRuleBillMain a left join Sb_EquipMaintainRuleBillSub_Item t on a.HInterID=t.HInterID |
| | | left join Gy_Maintain m on m.HItemID=t.HMaintainItemID |
| | | left join Gy_Employee e on e.HItemID=t.HManagerID |
| | | where a.HInterID=(select HEquipMaintainRuleInterID from Gy_EquipFileBillMain where HInterID=" + EquipProjectID + ") "); |
| | | ds = oCN.RunProcReturn(sql, "Sb_EquipMaintainRuleBillMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "1"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åæå!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®è®¾å¤æ¾ç¤ºè®¾å¤ç¹æ£ç¨é¡¹ç® |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetDotCheckRuleItemByEquipProjectID")] |
| | | [HttpGet] |
| | | public object GetDotCheckRuleItemByEquipProjectID(int EquipProjectID) |
| | | { |
| | | if (EquipProjectID <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "产åå¨å
·æªéæ©"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = string.Format(@"select b.HDotCheckItemID HDotCheckItemID,c.HNumber HDotCheckCode,b.HDotCheckItem,b.HDotCheckPart,b.HClaim, |
| | | b.HManagerID,e.HNumber HManagerCode,e.HName HManagerName,b.HRemark from Sb_EquipDotCheckRuleBillMain a |
| | | left join Sb_EquipDotCheckRuleBillSub b on a.HInterID=b.HInterID |
| | | left join Gy_QCCheckItem c on c.HItemID=b.HDotCheckItemID |
| | | left join Gy_Employee e on e.HItemID=b.HManagerID |
| | | where a.HInterID=(select HEquipDotCheckRuleInterID from Gy_EquipFileBillMain where HInterID=" + EquipProjectID + ") "); |
| | | ds = oCN.RunProcReturn(sql, "Sb_EquipDotCheckRuleBillMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "1"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åæå!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å维修项ç®å表 |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | /// <summary> |
| | | ///å é¤åè½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Xs_SeOutStockBackBill/DeltetSeOutStockBackBill")] |
| | | [HttpGet] |
| | | public object DeltetSeOutStockBackBill(string HInterID) |
| | | { |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete From Xs_SeOutStockBackBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From Xs_SeOutStockBackBillSub where HInterID = " + HInterID); |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åºç¡èµæID æ¥æ¾è®°å½ |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Xs_SeOutStockBill/cx")] |
| | | [HttpGet] |
| | | public object cx(long HInterID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_SeOutStockBillList where HitemID=" + HInterID, "h_v_IF_SeOutStockBillList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "falseï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è¿ååè´§éç¥åå表 |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | ///å é¤åè½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Xs_SeOutStockBill/DeltetSeOutStockBill")] |
| | | [HttpGet] |
| | | public object DeltetSeOutStockBill(string HInterID) |
| | | { |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete From Xs_SeOutStockBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From Xs_SeOutStockBillSub where HInterID = " + HInterID); |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | // |
| New file |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json.Linq; |
| | | 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 |
| | | { |
| | | public class ClsKf_MateOutBackBillController : 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 DLL.ClsKf_MateOutBackBill BillNew0 = new DLL.ClsKf_MateOutBackBill(); // |
| | | public DLL.ClsKf_MateOutBackBill BillOld0 = new DLL.ClsKf_MateOutBackBill(); // |
| | | |
| | | #region ç产éæåå表 |
| | | |
| | | [Route("Kf_MateOutBackBill/GetMateOutBillList")] |
| | | [HttpGet] |
| | | public object GetMateOutBillList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBackBillList order by æ¥æ desc", "h_v_IF_MateOutBackBillList"); |
| | | 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("Kf_MateOutBackBill/set_DeleteBill")] |
| | | [HttpGet] |
| | | public object set_DeleteBill(string HInterID,string user) |
| | | { |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Delete", 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 [ç产éæåå®¡æ ¸ãåå®¡æ ¸] |
| | | /// <summary> |
| | | /// å®¡æ ¸ |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="CurUserName">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Kf_MateOutBackBill/set_CheckBill")] |
| | | [HttpGet] |
| | | public object set_CheckBill(int HInterID, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "Kf_MateOutBackBill_Check"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | DLL.ClsKf_MateOutBackBill oBill = new DLL.ClsKf_MateOutBackBill(); |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å®¡æ ¸å夿æ¯å¦å
许 |
| | | string s = ""; |
| | | if (!DBUtility.Xt_BaseBillFun.Fun_AllowCheckBill(oBill, ref s)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s + "ï¼ä¸å
è®¸å®¡æ ¸"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterIDå°äº0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); |
| | | //æ¥çæ¯å¦å·²å®¡æ ¸,å
³é,ä½åº |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | if (oBill.omodel.HCloseMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HChecker.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å®¡æ ¸æäº¤ |
| | | if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// åå®¡æ ¸ |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="CurUserName">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Kf_MateOutBackBill/set_AbandonCheck")] |
| | | [HttpGet] |
| | | public object set_AbandonCheck(int HInterID, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "Kf_MateOutBackBill_Check"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | DLL.ClsKf_MateOutBackBill oBill = new DLL.ClsKf_MateOutBackBill(); |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åå®¡æ ¸å夿 |
| | | string s = ""; |
| | | if (!DBUtility.Xt_BaseBillFun.Fun_AllowCheckBill(oBill, ref s)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s + "ï¼ä¸å
许åå®¡æ ¸"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterIDå°äº0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); |
| | | //æ¥çæ¯å¦å·²å®¡æ ¸,å
³é,ä½åº |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | if (oBill.omodel.HCloseMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½å次åå®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½å次åå®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HChecker.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå®¡æ ¸!ä¸éè¦åå®¡æ ¸!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åå®¡æ ¸æäº¤AbandonCheck |
| | | if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | 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("Kf_MateOutBackBill/Kf_MateOutBackBillListCheckDetai")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> Kf_MateOutBackBillListCheckDetai(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_IF_MateOutBackBillList where hmainid= " + HID + " ", "h_v_IF_MateOutBackBillList"); |
| | | 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 |
| | | |
| | | #region[ç产éæåç¼è¾æ¶è·åè¡¨ä½æ°æ®] |
| | | [Route("Kf_MateOutBackBill/Kf_MateOutBackBillListProjectDetai")] |
| | | [HttpGet] |
| | | public object Kf_MateOutBackBillListProjectDetai(string sqlWhere) |
| | | { |
| | | DataSet ds; |
| | | DataSet ds1; |
| | | List<object> list = new List<object>(); |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sqlWhere == null || sqlWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn(string.Format(@"select HMaterID ,ç©æä»£ç HMaterCode ,ç©æåç§° HMaterName,è§æ ¼åå· HMaterSpec,HUnitID,计éåä½ä»£ç HUnitCode,计éåä½ HUnitName,åºæ¶æ°é HQtyMust,宿¶æ°é HQty,åä»· HPrice,éé¢ HMoney,HWHID,颿ä»åºä»£ç HWHCode,颿ä»åº HWHName,表ä½å¤æ³¨ HRemark |
| | | from h_v_IF_MateOutBackBillList"), "h_v_IF_MateOutBackBillList"); |
| | | |
| | | } |
| | | else |
| | | { |
| | | string sql1 = string.Format(@"select HMaterID ,ç©æä»£ç HMaterCode ,ç©æåç§° HMaterName,è§æ ¼åå· HMaterSpec,HUnitID,计éåä½ä»£ç HUnitCode,计éåä½ HUnitName,åºæ¶æ°é HQtyMust,宿¶æ°é HQty,åä»· HPrice,éé¢ HMoney,HWHID,颿ä»åºä»£ç HWHCode,颿ä»åº HWHName,表ä½å¤æ³¨ HRemark |
| | | from h_v_IF_MateOutBackBillList WHERE 1=1"); |
| | | string sql = sql1 + sqlWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_MateOutBackBillList"); |
| | | } |
| | | //æ¥æ±æ» |
| | | ds1 = oCN.RunProcReturn(string.Format(@"select ç©æä»£ç ,max(ç©æåç§°)ç©æåç§°,è§æ ¼åå·,max(åæ®å·)åæ®å·,æ¹æ¬¡,sum(宿¶æ°é)宿¶æ°é, |
| | | hwhid1,max(æ¶æä»åºä»£ç )æ¶æä»åºä»£ç ,max(æ¶æä»åº)æ¶æä»åº,表ä½å¤æ³¨ from h_v_Sc_MouldProdInHouseBillList |
| | | where 1=1 " + sqlWhere + " group by ç©æä»£ç ,è§æ ¼åå·,hwhid1,æ¹æ¬¡,表ä½å¤æ³¨"), "h_v_IF_MateOutBackBillList"); |
| | | |
| | | list.Add(ds.Tables[0]); |
| | | list.Add(ds1.Tables[0]); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.list = list; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region ç产éæåä¿å/ç¼è¾ |
| | | /// <summary> |
| | | /// ä¿åç产éæå |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | | [Route("Kf_MateOutBackBill/SaveGetMateOutBillList")] |
| | | [HttpPost] |
| | | public object SaveGetMateOutBillList([FromBody] JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string refSav = sArray[2].ToString(); |
| | | string msg4 = sArray[3].ToString(); |
| | | |
| | | string UserName = ""; |
| | | string s = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Edit", 1, true, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DLL.ClsKf_MateOutBackBill oBill = new DLL.ClsKf_MateOutBackBill(); |
| | | List<Models.ClsKf_ICStockBillMain> lsmain = new List<Models.ClsKf_ICStockBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_Kf_ICStockBillMain(msg2); |
| | | foreach (Models.ClsKf_ICStockBillMain oItem in lsmain) |
| | | { |
| | | if (refSav == "Add") |
| | | { |
| | | //忮巿¯å¦éå¤ |
| | | if (BillNew0.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld0.omodel.HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·éå¤ï¼ä¸å
许ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (refSav == "Update") |
| | | { |
| | | if (BillOld0.ShowBill(oItem.HInterID, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®æè¯¯ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //夿æ¯å¦å¯ç¼è¾ |
| | | if (BillOld0.omodel.HChecker != "" && BillOld0.omodel.HChecker != null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®å·²ç»è¢«å®¡æ ¸ï¼ä¸å
许修æ¹ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (BillOld0.omodel.HBillStatus > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®å¤äºä¸å¯ç¼è¾ç¶æï¼ä¸å
许修æ¹ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld0, ref s)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s + "ï¼ä¸å
许修æ¹"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //oItem.HMaker = ""; |
| | | UserName = oItem.HMaker; //å¶å人 |
| | | oItem.HBillType = "1244"; |
| | | oItem.HBillSubType = "1244"; |
| | | //oItem.HBillNo = ""; //åæ®å· |
| | | //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --æ¥æ |
| | | //oItem.HInnerBillNo = ""; // --å
é¨åæ®å· |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | //oItem.HEquipID = 0; //设å¤ID(Gy_EquipMent) |
| | | //oItem.HPeriod = 0; |
| | | //oItem.HCheckBeginDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); // --ç»´ä¿®æ¥æ |
| | | //oItem.HCheckResult = ""; //éªæ¶ç»è®º--(æ£å¸¸ï¼å¼å¸¸) |
| | | //oItem.HEmpID = 0; //éªæ¶äºº(Gy_Employee) |
| | | //oItem.HManagerID = 0; //è´è´£äºº(Gy_Employee) |
| | | //oItem.HDeptID = 0; //éªæ¶é¨é¨(Gy_Department) |
| | | //oItem.HExplanation = ""; //æè¦(æ
éæè¿°) |
| | | //oItem.HRemark = ""; //夿³¨ |
| | | |
| | | //oItem.HMainSourceInterID = oItem.HInterID; |
| | | |
| | | //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿åå¤±è´¥ï¼æ²¡æåæ®æ¥æï¼æ æ³ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oBill.omodel = oItem; |
| | | } |
| | | //è¡¨ä½æ°æ® |
| | | //æ },{æ¥æåæ°ç» //廿ãåã |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | msg3 = msg3.Replace("\\", ""); |
| | | msg3 = msg3.Replace("\n", ""); //\n |
| | | //msg2 = msg2.Replace("'", "â"); |
| | | List<Models.ClsKf_ICStockBillSub> ls = new List<Models.ClsKf_ICStockBillSub>(); |
| | | ls = oListModels.getObjectByJson_Kf_ICStockBillMSub(msg3); |
| | | int i = 0; |
| | | foreach (Models.ClsKf_ICStockBillSub oItemSub in ls) |
| | | { |
| | | |
| | | i++; |
| | | oItemSub.HEntryID = i; |
| | | |
| | | //oItemSub.HRepairCheckID = 0; //éªæ¶é¡¹ç®ID |
| | | //oItemSub.HRepairCheckContent = ""; //éªæ¶å
容 |
| | | //oItemSub.HManagerID = 0; //è´è´£äººID |
| | | //oItemSub.HCloseMan = ""; //è¡å
³é |
| | | oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItemSub.HCloseType = false; //å
³éç±»å |
| | | //oItemSub.HRemark = ""; //夿³¨ |
| | | oItemSub.HSourceInterID = 0; // æºå主å
ç |
| | | oItemSub.HSourceEntryID = 0; //æºååå
ç |
| | | //oItemSub.HSourceBillNo = ""; //æºååå· |
| | | //oItemSub.HSourceBillType = ""; //æºåç±»å |
| | | //oItemSub.HRelationQty = 0; //å
³èæ°é |
| | | //oItemSub.HRelationMoney = 0; //å
³èéé¢ |
| | | //oItemSub.HRepairID = 0; //ç»´ä¿®é¡¹ç® |
| | | //oItemSub.HRepairExplanation =""; //ç»´ä¿®è¦æ± |
| | | //oItemSub.HMoney = 0; //ç»´ä¿®è´¹ç¨ |
| | | oBill.DetailColl.Add(oItemSub); |
| | | |
| | | } |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | bool bResult; |
| | | if (oBill.omodel.HInterID == 0) |
| | | { |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | | { |
| | | bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | //WebAPIController.Add_Log("éè´§å䏿¨", UserName, "çæéè´§å"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¨å
·éè´å
¥åºåå®¡æ ¸/åå®¡æ ¸ |
| | | [Route("Sc_MouldProdInHouseBill/AuditMouldProdInHouseBill")] |
| | | [HttpGet] |
| | | public object AuditMouldProdInHouseBill(string HInterID, string user, int flag) |
| | | { |
| | | //flag=1 å®¡æ ¸ï¼ flag=2 åå®¡æ ¸ |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBackBill_Check", 1, true, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å®¡æ ¸æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | 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.ClsSc_MouldProdOutBill oBill = new DLL.ClsSc_MouldProdOutBill(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | if (flag == 1) |
| | | { |
| | | if (oBill.omodel.HBillStatus == 2) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½ååæ®å·²å®¡æ ¸ï¼æ é忬¡å®¡æ ¸"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | string HCheckDate = DateTime.Now.Date.ToString(); |
| | | oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker='" + user + "',HCheckDate='" + HCheckDate + "',HBillStatus=2 Where HBillType='3801' and HInterID=" + HInterID); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (oBill.omodel.HBillStatus == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½ååæ®æªå®¡æ ¸ï¼æ éåå®¡æ ¸"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | string HCheckDate = DateTime.Now.Date.ToString(); |
| | | oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker=' ',HCheckDate=' ',HBillStatus=1 Where HBillType='3801' and HInterID=" + HInterID); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸æåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªæ¾å°"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| New file |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json.Linq; |
| | | 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 |
| | | { |
| | | public class Kf_MateOutBillController : 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 DLL.ClsKf_MateOutBill BillNew0 = new DLL.ClsKf_MateOutBill(); //模å
·æ¥åºå
¥åºå¯¹åºåæ®ç±» |
| | | public DLL.ClsKf_MateOutBill BillOld0 = new DLL.ClsKf_MateOutBill(); //模å
·æ¥åºå
¥åºå¯¹åºåæ®ç±» |
| | | |
| | | #region çäº§é¢æåå表 |
| | | |
| | | [Route("Kf_MateOutBill/GetMateOutBillList")] |
| | | [HttpGet] |
| | | public object GetMateOutBillList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("select * from h_v_IF_MateOutBillList order by æ¥æ desc", "h_v_IF_MateOutBillList"); |
| | | 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("Kf_MateOutBill/set_DeleteBill")] |
| | | [HttpGet] |
| | | public object set_DeleteBill(string HInterID,string user) |
| | | { |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBill_Delete", 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_MateOutBill oBill = new DLL.ClsKf_MateOutBill(); |
| | | 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 [çäº§é¢æåå®¡æ ¸ãåå®¡æ ¸] |
| | | /// <summary> |
| | | /// å®¡æ ¸ |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="CurUserName">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Kf_MateOutBill/set_CheckBill")] |
| | | [HttpGet] |
| | | public object set_CheckBill(int HInterID, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "Kf_MateOutBill_Check"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | DLL.ClsKf_MateOutBill oBill = new DLL.ClsKf_MateOutBill(); |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å®¡æ ¸å夿æ¯å¦å
许 |
| | | string s = ""; |
| | | if (!DBUtility.Xt_BaseBillFun.Fun_AllowCheckBill(oBill, ref s)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s + "ï¼ä¸å
è®¸å®¡æ ¸"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterIDå°äº0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); |
| | | //æ¥çæ¯å¦å·²å®¡æ ¸,å
³é,ä½åº |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | if (oBill.omodel.HCloseMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HChecker.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸!ä¸è½åæ¬¡å®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //å®¡æ ¸æäº¤ |
| | | if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// åå®¡æ ¸ |
| | | /// </summary> |
| | | /// <param name="HInterID">忮ID</param> |
| | | /// <param name="CurUserName">å®¡æ ¸äºº</param> |
| | | /// <returns></returns> |
| | | [Route("Kf_MateOutBill/set_AbandonCheck")] |
| | | [HttpGet] |
| | | public object set_AbandonCheck(int HInterID, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "Kf_MateOutBill_Check"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | | DLL.ClsKf_MateOutBill oBill = new DLL.ClsKf_MateOutBill(); |
| | | try |
| | | { |
| | | //å®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åå®¡æ ¸å夿 |
| | | string s = ""; |
| | | if (!DBUtility.Xt_BaseBillFun.Fun_AllowCheckBill(oBill, ref s)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s + "ï¼ä¸å
许åå®¡æ ¸"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterIDå°äº0ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID); |
| | | //æ¥çæ¯å¦å·²å®¡æ ¸,å
³é,ä½åº |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | if (oBill.omodel.HCloseMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å
³é!ä¸è½å次åå®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HDeleteMan.Trim() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已ä½åº!ä¸è½å次åå®¡æ ¸ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HChecker.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªå®¡æ ¸!ä¸éè¦åå®¡æ ¸!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åå®¡æ ¸æäº¤AbandonCheck |
| | | if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸æå"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸å¤±è´¥!åå :" + DBUtility.ClsPub.sExeReturnInfo; |
| | | 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("Kf_MateOutBill/Kf_MateOutBillListCheckDetai")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> Kf_MateOutBillListCheckDetai(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_IF_MateOutBillList where hmainid= " + HID + " ", "h_v_Sc_MouldProdInHouseBillList"); |
| | | 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 |
| | | |
| | | #region[çäº§é¢æåç¼è¾æ¶è·åè¡¨ä½æ°æ®] |
| | | [Route("Kf_MateOutBill/Kf_MateOutBillListProjectDetai")] |
| | | [HttpGet] |
| | | public object Kf_MateOutBillListProjectDetai(string sqlWhere) |
| | | { |
| | | DataSet ds; |
| | | DataSet ds1; |
| | | List<object> list = new List<object>(); |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sqlWhere == null || sqlWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn(string.Format(@"select HMaterID ,ç©æä»£ç HMaterCode ,ç©æåç§° HMaterName,è§æ ¼åå· HMaterSpec,HUnitID,计éåä½ä»£ç HUnitCode,计éåä½ HUnitName,åºæ¶æ°é HQtyMust,宿¶æ°é HQty,åä»· HPrice,éé¢ HMoney,HWHID,颿ä»åºä»£ç HWHCode,颿ä»åº HWHName,表ä½å¤æ³¨ HRemark |
| | | from h_v_IF_MateOutBillList"), "H_V_IF_MATEOUTBILLLIST"); |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | //string sql1 = "select HRepairCheckID,HRepairCheckContent,HManagerID,HRemark from Sc_MouldRepairCheckBillSub where 1 = 1 "; |
| | | string sql1 = string.Format(@"select HMaterID ,ç©æä»£ç HMaterCode ,ç©æåç§° HMaterName,è§æ ¼åå· HMaterSpec,HUnitID,计éåä½ä»£ç HUnitCode,计éåä½ HUnitName,åºæ¶æ°é HQtyMust,宿¶æ°é HQty,åä»· HPrice,éé¢ HMoney,HWHID,颿ä»åºä»£ç HWHCode,颿ä»åº HWHName,表ä½å¤æ³¨ HRemark |
| | | from h_v_IF_MateOutBillList WHERE 1=1"); |
| | | string sql = sql1 + sqlWhere; |
| | | ds = oCN.RunProcReturn(sql, "H_V_IF_MATEOUTBILLLIST"); |
| | | } |
| | | //æ¥æ±æ» |
| | | ds1 = oCN.RunProcReturn(string.Format(@"select ç©æä»£ç ,max(ç©æåç§°)ç©æåç§°,è§æ ¼åå·,max(åæ®å·)åæ®å·,æ¹æ¬¡,sum(宿¶æ°é)宿¶æ°é, |
| | | hwhid1,max(æ¶æä»åºä»£ç )æ¶æä»åºä»£ç ,max(æ¶æä»åº)æ¶æä»åº,表ä½å¤æ³¨ from h_v_Sc_MouldProdInHouseBillList |
| | | where 1=1 " + sqlWhere + " group by ç©æä»£ç ,è§æ ¼åå·,hwhid1,æ¹æ¬¡,表ä½å¤æ³¨"), "h_v_Sc_MouldProdInHouseBillList"); |
| | | |
| | | list.Add(ds.Tables[0]); |
| | | list.Add(ds1.Tables[0]); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.list = list; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region çäº§é¢æåä¿å/ç¼è¾ |
| | | /// <summary> |
| | | /// ä¿åçäº§é¢æå |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | | [Route("Kf_MateOutBill/SaveGetMateOutBillList")] |
| | | [HttpPost] |
| | | public object SaveGetMateOutBillList([FromBody] JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string refSav = sArray[2].ToString(); |
| | | string msg4 = sArray[3].ToString(); |
| | | |
| | | string UserName = ""; |
| | | string s = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBill_Edit", 1, true, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DLL.ClsKf_MateOutBill oBill = new DLL.ClsKf_MateOutBill(); |
| | | List<Models.ClsKf_MateOutBillMain> lsmain = new List<Models.ClsKf_MateOutBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | | msg2 = msg2.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_Kf_MateOutBillMain(msg2); |
| | | foreach (Models.ClsKf_MateOutBillMain oItem in lsmain) |
| | | { |
| | | if (refSav == "Add") |
| | | { |
| | | //忮巿¯å¦éå¤ |
| | | if (BillNew0.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld0.omodel.HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·éå¤ï¼ä¸å
许ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (refSav == "Update") |
| | | { |
| | | if (BillOld0.ShowBill(oItem.HInterID, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®æè¯¯ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //夿æ¯å¦å¯ç¼è¾ |
| | | if (BillOld0.omodel.HChecker != "" && BillOld0.omodel.HChecker != null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®å·²ç»è¢«å®¡æ ¸ï¼ä¸å
许修æ¹ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (BillOld0.omodel.HBillStatus > 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®å¤äºä¸å¯ç¼è¾ç¶æï¼ä¸å
许修æ¹ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld0, ref s)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s + "ï¼ä¸å
许修æ¹"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //oItem.HMaker = ""; |
| | | UserName = oItem.HMaker; //å¶å人 |
| | | oItem.HBillType = "1204"; |
| | | oItem.HBillSubType = "1204"; |
| | | //oItem.HBillNo = ""; //åæ®å· |
| | | //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --æ¥æ |
| | | //oItem.HInnerBillNo = ""; // --å
é¨åæ®å· |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | //oItem.HEquipID = 0; //设å¤ID(Gy_EquipMent) |
| | | //oItem.HPeriod = 0; |
| | | //oItem.HCheckBeginDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); // --ç»´ä¿®æ¥æ |
| | | //oItem.HCheckResult = ""; //éªæ¶ç»è®º--(æ£å¸¸ï¼å¼å¸¸) |
| | | //oItem.HEmpID = 0; //éªæ¶äºº(Gy_Employee) |
| | | //oItem.HManagerID = 0; //è´è´£äºº(Gy_Employee) |
| | | //oItem.HDeptID = 0; //éªæ¶é¨é¨(Gy_Department) |
| | | //oItem.HExplanation = ""; //æè¦(æ
éæè¿°) |
| | | //oItem.HRemark = ""; //夿³¨ |
| | | |
| | | //oItem.HMainSourceInterID = oItem.HInterID; |
| | | |
| | | //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿åå¤±è´¥ï¼æ²¡æåæ®æ¥æï¼æ æ³ä¿åï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oBill.omodel = oItem; |
| | | } |
| | | //è¡¨ä½æ°æ® |
| | | //æ },{æ¥æåæ°ç» //廿ãåã |
| | | msg3 = msg3.Substring(1, msg3.Length - 2); |
| | | msg3 = msg3.Replace("\\", ""); |
| | | msg3 = msg3.Replace("\n", ""); //\n |
| | | //msg2 = msg2.Replace("'", "â"); |
| | | List<Models.ClsKf_MateOutBillSub> ls = new List<Models.ClsKf_MateOutBillSub>(); |
| | | ls = oListModels.getObjectByJson_Kf_MateOutBillSub(msg3); |
| | | int i = 0; |
| | | foreach (Models.ClsKf_MateOutBillSub oItemSub in ls) |
| | | { |
| | | |
| | | i++; |
| | | oItemSub.HEntryID = i; |
| | | |
| | | //oItemSub.HRepairCheckID = 0; //éªæ¶é¡¹ç®ID |
| | | //oItemSub.HRepairCheckContent = ""; //éªæ¶å
容 |
| | | //oItemSub.HManagerID = 0; //è´è´£äººID |
| | | //oItemSub.HCloseMan = ""; //è¡å
³é |
| | | oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); |
| | | oItemSub.HCloseType = false; //å
³éç±»å |
| | | //oItemSub.HRemark = ""; //夿³¨ |
| | | oItemSub.HSourceInterID = 0; // æºå主å
ç |
| | | oItemSub.HSourceEntryID = 0; //æºååå
ç |
| | | //oItemSub.HSourceBillNo = ""; //æºååå· |
| | | //oItemSub.HSourceBillType = ""; //æºåç±»å |
| | | //oItemSub.HRelationQty = 0; //å
³èæ°é |
| | | //oItemSub.HRelationMoney = 0; //å
³èéé¢ |
| | | //oItemSub.HRepairID = 0; //ç»´ä¿®é¡¹ç® |
| | | //oItemSub.HRepairExplanation =""; //ç»´ä¿®è¦æ± |
| | | //oItemSub.HMoney = 0; //ç»´ä¿®è´¹ç¨ |
| | | oBill.DetailColl.Add(oItemSub); |
| | | |
| | | } |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | bool bResult; |
| | | if (oBill.omodel.HInterID == 0) |
| | | { |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | | { |
| | | bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | //WebAPIController.Add_Log("éè´§å䏿¨", UserName, "çæéè´§å"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å¨å
·éè´å
¥åºåå®¡æ ¸/åå®¡æ ¸ |
| | | [Route("Sc_MouldProdInHouseBill/AuditMouldProdInHouseBill")] |
| | | [HttpGet] |
| | | public object AuditMouldProdInHouseBill(string HInterID, string user, int flag) |
| | | { |
| | | //flag=1 å®¡æ ¸ï¼ flag=2 åå®¡æ ¸ |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Kf_MateOutBill_Check", 1, true, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å®¡æ ¸æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | 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.ClsSc_MouldProdOutBill oBill = new DLL.ClsSc_MouldProdOutBill(); |
| | | if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | | if (flag == 1) |
| | | { |
| | | if (oBill.omodel.HBillStatus == 2) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½ååæ®å·²å®¡æ ¸ï¼æ é忬¡å®¡æ ¸"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | string HCheckDate = DateTime.Now.Date.ToString(); |
| | | oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker='" + user + "',HCheckDate='" + HCheckDate + "',HBillStatus=2 Where HBillType='3801' and HInterID=" + HInterID); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (oBill.omodel.HBillStatus == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½ååæ®æªå®¡æ ¸ï¼æ éåå®¡æ ¸"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | string HCheckDate = DateTime.Now.Date.ToString(); |
| | | oCn.RunProc(" Update Sc_MouldStockBillMain set HChecker=' ',HCheckDate=' ',HBillStatus=1 Where HBillType='3801' and HInterID=" + HInterID); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸æåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®æªæ¾å°"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| New file |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | 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.åºç¡èµæ.åºç¡èµæ |
| | | { |
| | | public class Gy_ConkReasonBillController : 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 Model.ClsGy_ConkReason_Model BillNew0 = new Model.ClsGy_ConkReason_Model(); |
| | | |
| | | |
| | | #region æ
éåå å表 |
| | | [Route("Gy_ConkReasonBill/Get_ConkReasonBillList")] |
| | | [HttpGet] |
| | | public object Get_ConkReasonBillList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = Sc_GetConkReasonBill(sWhere); |
| | | if (ds == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | public static DataSet Sc_GetConkReasonBill(string sWhere) |
| | | { |
| | | string sql1 = string.Format(@"select * from h_v_Gy_ConkReasonList"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + sWhere + " order by hitemid desc", "h_v_Gy_ConkReasonList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + "order by hitemid desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Gy_ConkReasonList"); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [æ
éåå å é¤åè½] |
| | | [Route("Gy_ConkReasonBill/set_DeleteBill")] |
| | | [HttpGet] |
| | | public object set_DeleteBill(string HItemID) |
| | | { |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HItemID); |
| | | if (lngBillKey == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCn.RunProcReturn("select * from Gy_ConkReason where HItemID=" + lngBillKey, "Gy_ConkReason"); |
| | | if (ds != null) |
| | | { |
| | | oCn.RunProc("Delete from Gy_ConkReason where HItemID=" + lngBillKey); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®ä¸åå¨ï¼è¯·æ¥çæ¯å¦éå¤å é¤"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region [ç¼è¾æ¾ç¤ºè¡¨å¤´] |
| | | [Route("Gy_ConkReasonBill/GetConkReasonByID")] |
| | | [HttpGet] |
| | | public object GetConkReasonByID(string HID) |
| | | { |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HID); |
| | | if (lngBillKey == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCn.RunProcReturn("select * from Gy_ConkReason where HItemID=" + lngBillKey, "Gy_ConkReason"); |
| | | if (ds != null) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = ""; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤åæ®ä¸åå¨"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ä¿åæ
éåå |
| | | [Route("Gy_ConkReasonBill/SaveGy_ConkReason")] |
| | | [HttpPost] |
| | | public object SaveGy_ConkReason([FromBody] JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg2 = _value.ToString(); |
| | | string[] sArray = msg2.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg1 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString();//å½å人 |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | Model.ClsGy_ConkReason_Model oBill = new Model.ClsGy_ConkReason_Model(); |
| | | List<Model.ClsGy_ConkReason_Model> lsmain = new List<Model.ClsGy_ConkReason_Model>(); |
| | | msg1 = msg1.Replace("\\", ""); |
| | | msg1 = msg1.Replace("\n", ""); //\n |
| | | lsmain = oListModels.getObjectByJson_Gy_ConkReason(msg1); |
| | | foreach (Model.ClsGy_ConkReason_Model oItem in lsmain) |
| | | { |
| | | if (oItem.HNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ä»£ç ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (oItem.HName.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼åç§°ä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //å¾å°ç代ç |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim()); |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼ç代ç 为空ï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oItem.HShortNumber = sShortNumber;//ç代ç |
| | | oItem.HEndFlag = true;//æ«çº§æ å¿ |
| | | oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //ç级 |
| | | oBill = oItem; |
| | | } |
| | | |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | if (oBill.HItemID == 0) |
| | | { |
| | | oCn.RunProc("Insert into Gy_ConkReason " + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HUseFlag,HMakeTime,HMakeEmp,HExplanation,HConkTypeID) " + |
| | | " Values('" + oBill.HNumber + "','" + oBill.HName + "','" + oBill.HHelpCode + "','" + oBill.HShortNumber + "'," + oBill.HParentID.ToString() + |
| | | "," + oBill.HLevel.ToString() + "," + Convert.ToString(oBill.HEndFlag ? 1 : 0) + "," + Convert.ToString(oBill.HStopflag ? 1 : 0) + ",'" + oBill.HRemark + |
| | | "','" + oBill.HUseFlag + "',getdate(),'" + msg3 + "','" + oBill.HExplanation + "',0" + |
| | | ")", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCn.RunProc("Update Gy_ConkReason set HEndflag=0 where HItemID=" + oBill.HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | //WebAPIController.Add_Log("éè´§å䏿¨", UserName, "çæéè´§å"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | oCN.RunProc("UpDate Gy_ConkReason set " + |
| | | " HNumber='" + oBill.HNumber + "'" + //åºå®èµå¼=============== |
| | | ",HName='" + oBill.HName + "'" + |
| | | ",HShortNumber='" + oBill.HShortNumber + "'" + |
| | | ",HHelpCode='" + oBill.HHelpCode + "'" + |
| | | ",HUseFlag='" + oBill.HUseFlag + "'" + |
| | | ",HRemark='" + oBill.HRemark + "'" + |
| | | ",HExplanation='" + oBill.HExplanation + "'" + |
| | | ",HModifyTime=getdate()" + |
| | | ",HModifyEmp='" + msg3 + "'" + |
| | | ",HStopflag=" + Convert.ToString(oBill.HStopflag ? 1 : 0) + |
| | | " where HInterID=" + oBill.HItemID.ToString()); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿®æ¹æåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Data; |
| | | |
| | | namespace WebAPI.DLL |
| | | { |
| | | public class ClsKf_MateOutBackBill:DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Models.ClsKf_ICStockBillMain omodel = new Models.ClsKf_ICStockBillMain(); |
| | | public List<Models.ClsKf_ICStockBillSub> DetailColl = new List<Models.ClsKf_ICStockBillSub>(); |
| | | public List<Models.ClsKf_ICStockBillScheme> DetailSubColl = new List<Models.ClsKf_ICStockBillScheme>(); |
| | | |
| | | public ClsKf_MateOutBackBill() |
| | | { |
| | | base.MvarItemKeySub = "Kf_ICStockBillSub"; |
| | | base.MvarItemKeySub2 = ""; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey="Kf_ICStockBillMain"; |
| | | base.MvarReportTitle="ç产éæå"; |
| | | base.BillType="1244"; |
| | | base.HBillSubType = "1244"; |
| | | } |
| | | |
| | | #region åºå®ä»£ç |
| | | |
| | | ~ClsKf_MateOutBackBill() |
| | | { |
| | | DetailColl = null; |
| | | } |
| | | |
| | | |
| | | #endregion èªå®ä¹æ¹æ³ |
| | | |
| | | //ä¿®æ¹åæ® |
| | | public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc("UpDate Kf_ICStockBillMain set " + |
| | | //åºå®èµå¼=============== |
| | | " HBillNo='" + omodel.HBillNo + "'" + |
| | | ",HDate='" + omodel.HDate + "'" + |
| | | ",HYear='" + omodel.HYear.ToString() + "'" + |
| | | ",HPeriod='" + omodel.HPeriod.ToString() + "'" + |
| | | ",HRemark='" + omodel.HRemark + "'" + |
| | | ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | //======================================== |
| | | ",HSupID=" + omodel.HSupID.ToString() + |
| | | ",HWHID=" + omodel.HWHID.ToString() + |
| | | ",HSCWHID=" + omodel.HSCWHID.ToString() + |
| | | ",HEmpID=" + omodel.HEmpID.ToString() + |
| | | ",HManagerID=" + omodel.HManagerID.ToString() + |
| | | ",HSecManagerID=" + omodel.HSecManagerID.ToString() + |
| | | ",HKeeperID=" + omodel.HKeeperID.ToString() + |
| | | ",HDeptID=" + omodel.HDeptID.ToString() + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HRedBlueFlag=" + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | | DeleteBillSub(lngBillKey); |
| | | //æå
¥å表 |
| | | omodel.HInterID = lngBillKey; |
| | | foreach (Models.ClsKf_ICStockBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Kf_ICStockBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + |
| | | ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + |
| | | ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" + |
| | | ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + |
| | | "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" + |
| | | "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + |
| | | ") "); |
| | | } |
| | | sReturn = "ä¿®æ¹åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //æ°å¢åæ® |
| | | public override bool AddBill(ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | if (IsExistBillNo(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HBillNo, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew, omodel.HInterID)) |
| | | { |
| | | omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | } |
| | | if (IsExistMainID(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HInterID, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew)) |
| | | { |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | // |
| | | oCn.BeginTran(); |
| | | //主表 |
| | | oCn.RunProc("Insert Into Kf_ICStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " 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.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Models.ClsKf_ICStockBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Kf_ICStockBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + |
| | | ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + |
| | | ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" + |
| | | ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + |
| | | "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" + |
| | | "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + |
| | | ") "); |
| | | } |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ® |
| | | public override bool ShowBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //æ¥è¯¢ä¸»è¡¨ |
| | | DataSet Ds; |
| | | Ds = oCn.RunProcReturn("Select * from Kf_ICStockBillMain Where HInterID=" + lngBillKey.ToString(), "Kf_ICStockBillMain"); |
| | | if (Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "åæ®æªæ¾å°ï¼"; |
| | | return false; |
| | | } |
| | | //åºå®èµå¼=========================================== |
| | | omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]); |
| | | omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]); |
| | | omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]); |
| | | omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]); |
| | | omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]); |
| | | omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]); |
| | | omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim(); |
| | | omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]); |
| | | omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]); |
| | | omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]); |
| | | omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]); |
| | | omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim(); |
| | | omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim(); |
| | | omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim(); |
| | | omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim(); |
| | | omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim(); |
| | | omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim(); |
| | | omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim(); |
| | | omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim(); |
| | | omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim(); |
| | | omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim(); |
| | | omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim(); |
| | | omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]); |
| | | omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim(); |
| | | omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim(); |
| | | //======================================================== |
| | | omodel.HSupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]); |
| | | omodel.HWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWHID"]); |
| | | omodel.HSCWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSCWHID"]); |
| | | omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]); |
| | | omodel.HManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HManagerID"]); |
| | | omodel.HSecManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSecManagerID"]); |
| | | omodel.HKeeperID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HKeeperID"]); |
| | | omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]); |
| | | omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]); |
| | | omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]); |
| | | omodel.HRedBlueFlag = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HRedBlueFlag"]); |
| | | |
| | | //å¾ªç¯ |
| | | DataSet DsSub; |
| | | DsSub = oCn.RunProcReturn("Select * from Kf_ICStockBillSub Where HInterID=" + lngBillKey.ToString(), "Kf_ICStockBillSub"); |
| | | DetailColl.Clear();//æ¸
空 |
| | | for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) |
| | | { |
| | | Models.ClsKf_ICStockBillSub oSub = new Models.ClsKf_ICStockBillSub(); |
| | | // åºå®èµå¼=============================================== |
| | | oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]); |
| | | oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]); |
| | | oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]); |
| | | oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]); |
| | | oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim(); |
| | | oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim(); |
| | | oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]); |
| | | oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]); |
| | | oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]); |
| | | oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]); |
| | | oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]); |
| | | oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim(); |
| | | //=================================================== |
| | | oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]); |
| | | oSub.HPropertyID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPropertyID"]); |
| | | oSub.HSecUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSecUnitID"]); |
| | | oSub.HSecUnitRate = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HSecUnitRate"]); |
| | | oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]); |
| | | oSub.HQtyMust = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQtyMust"]); |
| | | oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]); |
| | | oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]); |
| | | oSub.HMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMoney"]); |
| | | oSub.HWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWHID"]); |
| | | oSub.HSCWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCWHID"]); |
| | | oSub.HSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPID"]); |
| | | oSub.HSCSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCSPID"]); |
| | | oSub.HSPGroupID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPGroupID"]); |
| | | oSub.HBatchNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBatchNo"]); |
| | | oSub.HPOOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPOOrderInterID"]); |
| | | oSub.HPOOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPOOrderEntryID"]); |
| | | oSub.HPOOrderBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HPOOrderBillNo"]); |
| | | oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderInterID"]); |
| | | oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderEntryID"]); |
| | | oSub.HSeOrderBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSeOrderBillNo"]); |
| | | DetailColl.Add(oSub); |
| | | } |
| | | sReturn = "æ¾ç¤ºåæ®æåï¼"; |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ®æ¡ç ä¿¡æ¯ |
| | | public bool ShowBill_Scheme(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //循ç¯å表2 |
| | | DataSet DsSubSec; |
| | | DsSubSec = oCn.RunProcReturn("Select * from Kf_ICStockBillSub_WMS with (nolock) Where HInterID=" + lngBillKey.ToString() + " and HBillType='" + this.BillType + "'", "Kf_ICStockBillSub_WMS"); |
| | | DetailSubColl.Clear();//æ¸
空 |
| | | for (int i = 0; i < DsSubSec.Tables[0].Rows.Count; i++) |
| | | { |
| | | Models.ClsKf_ICStockBillScheme oSubSec = new Models.ClsKf_ICStockBillScheme(); |
| | | oSubSec.HInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HInterID"].ToString()); |
| | | oSubSec.HEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HEntryID"].ToString()); |
| | | oSubSec.HItemID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HItemID"].ToString()); |
| | | oSubSec.HBillType = DsSubSec.Tables[0].Rows[i]["HBillType"].ToString(); |
| | | oSubSec.HMaterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HMaterID"].ToString()); |
| | | oSubSec.HProcID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HProcID"].ToString()); |
| | | oSubSec.HWhID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HWhID"].ToString()); |
| | | oSubSec.HGroupID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HGroupID"].ToString()); |
| | | oSubSec.HQty = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HQty"].ToString()); |
| | | oSubSec.HBarCode = DsSubSec.Tables[0].Rows[i]["HBarCode"].ToString(); |
| | | oSubSec.HAddr = DsSubSec.Tables[0].Rows[i]["HAddr"].ToString(); |
| | | oSubSec.HMaker = DsSubSec.Tables[0].Rows[i]["HMaker"].ToString(); |
| | | oSubSec.HMakeDate = DBUtility.ClsPub.isDate(DsSubSec.Tables[0].Rows[i]["HMakeDate"].ToString()); |
| | | oSubSec.HSourceInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceInterID"].ToString()); |
| | | oSubSec.HSourceEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceEntryID"].ToString()); |
| | | oSubSec.HSourceBillType = DsSubSec.Tables[0].Rows[i]["HSourceBillType"].ToString(); |
| | | oSubSec.HSourceBillNo = DsSubSec.Tables[0].Rows[i]["HSourceBillNo"].ToString(); |
| | | oSubSec.HSourceItemID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceItemID"].ToString()); |
| | | // |
| | | DetailSubColl.Add(oSubSec); |
| | | } |
| | | sReturn = "æ¾ç¤ºåæ®æåï¼"; |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | |
| | | #region WMSæ¡ç ç¨åº |
| | | |
| | | //æ¡ç æ«æè®°å½ï¼æ°å¢å°ç产éæå æ æºå |
| | | public bool AddBill_PDA_NoSource(ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(omodel.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sReturn = s; |
| | | return false; |
| | | } |
| | | omodel.HYear = sYear; |
| | | omodel.HPeriod = sPeriod; |
| | | |
| | | DataSet Ds; |
| | | oCn.BeginTran(); |
| | | //å é¤ä¸»è¡¨ |
| | | oCn.RunProc("Delete From Kf_ICStockBillMain where HInterID=" + omodel.HInterID.ToString()); |
| | | //æå
¥å表 |
| | | oCn.RunProc("EXEC h_p_Kf_MateOutBackBillSub_Insert_NoSource " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'"); |
| | | //æå
¥ä¸»è¡¨ |
| | | oCn.RunProc("Insert Into Kf_ICStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "',convert(varchar(10),getdate(),120),'" + omodel.HMainSourceBillType + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ") "); |
| | | //æ´æ°å
³èæ°é |
| | | |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + omodel.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + omodel.HInterID.ToString()); |
| | | |
| | | //çæK3åæ® |
| | | //æ°å¢å表ã主表 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBackBill_Insert " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillerID.ToString()); |
| | | //åå¡«å
³èæ°é |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBackBill_UpdateBillRelateData " + omodel.HInterID.ToString()); |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBackBill_Check " + omodel.HInterID.ToString() + "," + omodel.HBillerID.ToString()); |
| | | ////æ´æ°åºå |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBackBill_UpdateStock " + omodel.HInterID.ToString()); |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBackBill_UpdateOrderStock " + omodel.HInterID.ToString()); |
| | | |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using System.Data; |
| | | |
| | | namespace WebAPI.DLL |
| | | { |
| | | public class ClsKf_MateOutBill:DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Models.ClsKf_MateOutBillMain omodel = new Models.ClsKf_MateOutBillMain(); |
| | | public List<Models.ClsKf_MateOutBillSub> DetailColl = new List<Models.ClsKf_MateOutBillSub>(); |
| | | public List<Models.ClsKf_MateOutBillScheme> DetailSubColl = new List<Models.ClsKf_MateOutBillScheme>(); |
| | | |
| | | public ClsKf_MateOutBill() |
| | | { |
| | | base.MvarItemKeySub = "Kf_ICStockBillSub"; |
| | | base.MvarItemKeySub2 = ""; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey="Kf_ICStockBillMain"; |
| | | base.MvarReportTitle="çäº§é¢æå"; |
| | | base.BillType="1204"; |
| | | base.HBillSubType = "1204"; |
| | | |
| | | } |
| | | |
| | | #region åºå®ä»£ç |
| | | |
| | | ~ClsKf_MateOutBill() |
| | | { |
| | | DetailColl = null; |
| | | } |
| | | |
| | | #endregion èªå®ä¹æ¹æ³ |
| | | //ä¿®æ¹åæ® |
| | | public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | // |
| | | oCn.BeginTran(); |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc("UpDate Kf_ICStockBillMain set " + |
| | | " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | | ",HDate='" + omodel.HDate + "'" + |
| | | ",HYear='" + omodel.HYear.ToString() + "'" + |
| | | ",HPeriod='" + omodel.HPeriod.ToString() + "'" + |
| | | ",HRemark='" + omodel.HRemark + "'" + |
| | | ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | //======================================== |
| | | ",HSupID=" + omodel.HSupID.ToString() + |
| | | ",HWHID=" + omodel.HWHID.ToString() + |
| | | ",HSCWHID=" + omodel.HSCWHID.ToString() + |
| | | ",HEmpID=" + omodel.HEmpID.ToString() + |
| | | ",HManagerID=" + omodel.HManagerID.ToString() + |
| | | ",HSecManagerID=" + omodel.HSecManagerID.ToString() + |
| | | ",HKeeperID=" + omodel.HKeeperID.ToString() + |
| | | ",HDeptID=" + omodel.HDeptID.ToString() + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HRedBlueFlag=" + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | | DeleteBillSub(lngBillKey); |
| | | //æå
¥å表 |
| | | omodel.HInterID = lngBillKey; |
| | | foreach (Models.ClsKf_MateOutBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Kf_ICStockBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + |
| | | ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + |
| | | ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" + |
| | | ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + |
| | | "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" + |
| | | "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + |
| | | ") "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsKf_MateOutBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Kf_MateOutBill_Qty " + oSub.HICMOInterID, ""); |
| | | // if (Ds.Tables[0].Rows.Count == 0) |
| | | // return; |
| | | // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y") |
| | | // { |
| | | // sReturn = "æ±æ¥æ°éè¶
è¿è®¡åæ°éï¼ä¸å
许ä¿å"; |
| | | // return false; |
| | | // } |
| | | //} |
| | | sReturn = "ä¿®æ¹åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | //æ°å¢åæ® |
| | | public override bool AddBill(ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | if (IsExistBillNo(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HBillNo, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew, omodel.HInterID)) |
| | | { |
| | | omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | } |
| | | if (IsExistMainID(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HInterID, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew)) |
| | | { |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | // |
| | | oCn.BeginTran(); |
| | | //主表 |
| | | oCn.RunProc("Insert Into Kf_ICStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " 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.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Models.ClsKf_MateOutBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Kf_ICStockBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + |
| | | ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + |
| | | ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" + |
| | | ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + |
| | | "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" + |
| | | "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + |
| | | ") "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsKf_MateOutBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Kf_MateOutBill_Qty " + oSub.HICMOInterID, ""); |
| | | // if (Ds.Tables[0].Rows.Count == 0) |
| | | // return; |
| | | // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y") |
| | | // { |
| | | // sReturn = "æ±æ¥æ°éè¶
è¿è®¡åæ°éï¼ä¸å
许ä¿å"; |
| | | // return false; |
| | | // } |
| | | //} |
| | | // |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | //æ¾ç¤ºåæ® |
| | | public override bool ShowBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //æ¥è¯¢ä¸»è¡¨ |
| | | DataSet Ds ; |
| | | Ds = oCn.RunProcReturn("Select * from Kf_ICStockBillMain Where HInterID=" + lngBillKey.ToString(), "Kf_ICStockBillMain"); |
| | | if(Ds.Tables[0].Rows.Count==0) |
| | | { |
| | | sReturn = "åæ®æªæ¾å°ï¼"; |
| | | return false; |
| | | } |
| | | //åºå®èµå¼=========================================== |
| | | omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]); |
| | | omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]); |
| | | omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]); |
| | | omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]); |
| | | omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]); |
| | | omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]); |
| | | omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim(); |
| | | omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]); |
| | | omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]); |
| | | omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]); |
| | | omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]); |
| | | omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim(); |
| | | omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim(); |
| | | omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim(); |
| | | omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim(); |
| | | omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim(); |
| | | omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim(); |
| | | omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim(); |
| | | omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim(); |
| | | omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim(); |
| | | omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim(); |
| | | omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim(); |
| | | omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]); |
| | | omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim(); |
| | | omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim(); |
| | | //======================================================== |
| | | omodel.HSupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]); |
| | | omodel.HWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWHID"]); |
| | | omodel.HSCWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSCWHID"]); |
| | | omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]); |
| | | omodel.HManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HManagerID"]); |
| | | omodel.HSecManagerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSecManagerID"]); |
| | | omodel.HKeeperID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HKeeperID"]); |
| | | omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]); |
| | | omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]); |
| | | omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]); |
| | | omodel.HRedBlueFlag = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HRedBlueFlag"]); |
| | | // |
| | | |
| | | //å¾ªç¯ |
| | | DataSet DsSub ; |
| | | DsSub = oCn.RunProcReturn("Select * from Kf_ICStockBillSub Where HInterID=" + lngBillKey.ToString(), "Kf_ICStockBillSub"); |
| | | DetailColl.Clear();//æ¸
空 |
| | | for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) |
| | | { |
| | | Models.ClsKf_MateOutBillSub oSub = new Models.ClsKf_MateOutBillSub(); |
| | | // åºå®èµå¼=============================================== |
| | | oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]); |
| | | oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]); |
| | | oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]); |
| | | oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]); |
| | | oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim(); |
| | | oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim(); |
| | | oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]); |
| | | oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]); |
| | | oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]); |
| | | oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]); |
| | | oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]); |
| | | oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim(); |
| | | //=================================================== |
| | | oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]); |
| | | oSub.HPropertyID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPropertyID"]); |
| | | oSub.HSecUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSecUnitID"]); |
| | | oSub.HSecUnitRate = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HSecUnitRate"]); |
| | | oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]); |
| | | oSub.HQtyMust = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQtyMust"]); |
| | | oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]); |
| | | oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]); |
| | | oSub.HMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMoney"]); |
| | | oSub.HWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWHID"]); |
| | | oSub.HSCWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCWHID"]); |
| | | oSub.HSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPID"]); |
| | | oSub.HSCSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCSPID"]); |
| | | oSub.HSPGroupID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPGroupID"]); |
| | | oSub.HBatchNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBatchNo"]); |
| | | oSub.HPOOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPOOrderInterID"]); |
| | | oSub.HPOOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPOOrderEntryID"]); |
| | | oSub.HPOOrderBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HPOOrderBillNo"]); |
| | | oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderInterID"]); |
| | | oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderEntryID"]); |
| | | oSub.HSeOrderBillNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSeOrderBillNo"]); |
| | | DetailColl.Add(oSub); |
| | | } |
| | | sReturn = "æ¾ç¤ºåæ®æåï¼"; |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ®æ¡ç ä¿¡æ¯ |
| | | public bool ShowBill_Scheme(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //循ç¯å表2 |
| | | DataSet DsSubSec; |
| | | DsSubSec = oCn.RunProcReturn("Select * from Kf_ICStockBillSub_WMS with (nolock) Where HInterID=" + lngBillKey.ToString() + " and HBillType='" + this.BillType + "'", "Kf_ICStockBillSub_WMS"); |
| | | DetailSubColl.Clear();//æ¸
空 |
| | | for (int i = 0; i < DsSubSec.Tables[0].Rows.Count; i++) |
| | | { |
| | | Models.ClsKf_MateOutBillScheme oSubSec = new Models.ClsKf_MateOutBillScheme(); |
| | | oSubSec.HInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HInterID"].ToString()); |
| | | oSubSec.HEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HEntryID"].ToString()); |
| | | oSubSec.HItemID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HItemID"].ToString()); |
| | | oSubSec.HBillType = DsSubSec.Tables[0].Rows[i]["HBillType"].ToString(); |
| | | oSubSec.HMaterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HMaterID"].ToString()); |
| | | oSubSec.HProcID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HProcID"].ToString()); |
| | | oSubSec.HWhID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HWhID"].ToString()); |
| | | oSubSec.HGroupID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HGroupID"].ToString()); |
| | | oSubSec.HQty = DBUtility.ClsPub.isDoule(DsSubSec.Tables[0].Rows[i]["HQty"].ToString()); |
| | | oSubSec.HBarCode = DsSubSec.Tables[0].Rows[i]["HBarCode"].ToString(); |
| | | oSubSec.HAddr = DsSubSec.Tables[0].Rows[i]["HAddr"].ToString(); |
| | | oSubSec.HMaker = DsSubSec.Tables[0].Rows[i]["HMaker"].ToString(); |
| | | oSubSec.HMakeDate = DBUtility.ClsPub.isDate(DsSubSec.Tables[0].Rows[i]["HMakeDate"].ToString()); |
| | | oSubSec.HSourceInterID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceInterID"].ToString()); |
| | | oSubSec.HSourceEntryID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceEntryID"].ToString()); |
| | | oSubSec.HSourceBillType = DsSubSec.Tables[0].Rows[i]["HSourceBillType"].ToString(); |
| | | oSubSec.HSourceBillNo = DsSubSec.Tables[0].Rows[i]["HSourceBillNo"].ToString(); |
| | | oSubSec.HSourceItemID = DBUtility.ClsPub.isLong(DsSubSec.Tables[0].Rows[i]["HSourceItemID"].ToString()); |
| | | // |
| | | DetailSubColl.Add(oSubSec); |
| | | } |
| | | sReturn = "æ¾ç¤ºåæ®æåï¼"; |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //夿 è´åºå |
| | | public bool CheckKF(Int64 lngBillKey, int iType, ref string sReturn) |
| | | { |
| | | |
| | | //try |
| | | //{ |
| | | //DataSet oDs = new DataSet(); |
| | | //oDs = oCn.RunProcReturn("exec h_p_Kf_ICStockBill_CheckKF " + lngBillKey.ToString() + "," + iType.ToString(), "gy_czygl"); |
| | | //if (oDs == null || oDs.Tables[0].Rows.Count == 0) |
| | | //{ |
| | | // return false; |
| | | //} |
| | | //if (DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][0]) == "N") |
| | | //{ |
| | | // sReturn = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][1]); |
| | | // return false; |
| | | //} |
| | | //else |
| | | //{ |
| | | // sReturn = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][1]); |
| | | return true; |
| | | // } |
| | | //} |
| | | //catch (Exception e) |
| | | //{ |
| | | // sReturn = e.Message; |
| | | // throw (e); |
| | | //} |
| | | } |
| | | |
| | | //æ¡ç æ«æè®°å½,æ°å¢å°é¢æåºåº |
| | | public bool AddBill_PDA(ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(omodel.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sReturn = s; |
| | | return false; |
| | | } |
| | | omodel.HYear = sYear; |
| | | omodel.HPeriod = sPeriod; |
| | | |
| | | DataSet Ds; |
| | | oCn.BeginTran(); |
| | | //å é¤ä¸»è¡¨ |
| | | oCn.RunProc("Delete From Kf_ICStockBillMain where HInterID=" + omodel.HInterID.ToString()); |
| | | //æå
¥å表 |
| | | oCn.RunProc("EXEC h_p_Kf_MateOutBillSub_Insert " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'"); |
| | | //æå
¥ä¸»è¡¨ |
| | | oCn.RunProc("Insert Into Kf_ICStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "',convert(varchar(10),getdate(),120),'" + omodel.HMainSourceBillType + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ") "); |
| | | //æ´æ°å
³èæ°é |
| | | oCn.RunProc("exec h_p_Sc_UpDatePPBomRelation_Add " + omodel.HInterID.ToString()); |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + omodel.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + omodel.HInterID.ToString()); |
| | | |
| | | //çæK3åæ® |
| | | //æ°å¢å表ã主表 |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBill_Insert " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillerID.ToString()); |
| | | //åå¡«å
³èæ°é |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBill_UpdateBillRelateData " + omodel.HInterID.ToString()); |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBill_Check " + omodel.HInterID.ToString() + "," + omodel.HBillerID.ToString()); |
| | | //æ´æ°åºå |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBill_UpdateStock " + omodel.HInterID.ToString()); |
| | | oCn.RunProc("exec h_p_IFK3_ToERP_MateOutBill_UpdateOrderStock " + omodel.HInterID.ToString()); |
| | | |
| | | //夿æ¡ç åºåæ¯å¦å¼å¸¸ï¼è´åºåãåºåå¤§äºæ¡ç åå§åï¼ |
| | | Ds = oCn.RunProcReturn("EXEC h_p_KF_ICInventoryBarCodeQtyCtrl " + omodel.HInterID.ToString(), "h_p_KF_ICInventoryBarCodeQtyCtrl"); |
| | | |
| | | if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0][1]); |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //æ¡ç æ«æè®°å½,æ°å¢å°é¢æåºåº (红å) |
| | | public bool AddBill_PDA_Red(ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(omodel.HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | sReturn = s; |
| | | return false; |
| | | } |
| | | omodel.HYear = sYear; |
| | | omodel.HPeriod = sPeriod; |
| | | |
| | | DataSet Ds; |
| | | oCn.BeginTran(); |
| | | //å é¤ä¸»è¡¨ |
| | | oCn.RunProc("Delete From Kf_ICStockBillMain where HInterID=" + omodel.HInterID.ToString()); |
| | | //æå
¥å表 |
| | | oCn.RunProc("EXEC h_p_Kf_MateOutBillSub_Red_Insert " + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'"); |
| | | //æå
¥ä¸»è¡¨ |
| | | oCn.RunProc("Insert Into Kf_ICStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "',convert(varchar(10),getdate(),120),'" + omodel.HMainSourceBillType + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',convert(varchar(10),getdate(),120)" + |
| | | ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ") "); |
| | | //æ´æ°å
³èæ°é |
| | | oCn.RunProc("exec h_p_Sc_UpDatePPBomRelation_Add " + omodel.HInterID.ToString()); |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + omodel.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120),HBillStatus=2 where HInterID= " + omodel.HInterID.ToString()); |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.DLL |
| | | { |
| | | public class ClsSb_EquipDotCheckRuleBill : DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Models.ClsSb_EquipDotCheckRuleBillMain omodel = new Models.ClsSb_EquipDotCheckRuleBillMain(); |
| | | public List<Models.ClsSb_EquipDotCheckRuleBillSub> DetailColl_Mater = new List<Models.ClsSb_EquipDotCheckRuleBillSub>(); |
| | | |
| | | public ClsSb_EquipDotCheckRuleBill() |
| | | { |
| | | base.MvarItemKeySub = "ClsSb_EquipDotCheckRuleBillSub"; |
| | | base.MvarItemKeySub2 = ""; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey = "Sb_EquipDotCheckRuleBillMain"; |
| | | base.MvarReportTitle = "设å¤ç¹æ£è§ç¨"; |
| | | base.BillType = "3913"; |
| | | } |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.DLL |
| | | { |
| | | public class ClsSb_EquipMaintainRuleBill : DBUtility.ClsXt_BaseBill |
| | | { |
| | | public Models.ClsSb_EquipMaintainRuleBillMain omodel = new Models.ClsSb_EquipMaintainRuleBillMain(); |
| | | public List<Models.ClsSb_EquipMaintainRuleBillSub> DetailColl_Mater = new List<Models.ClsSb_EquipMaintainRuleBillSub>(); |
| | | public List<Models.ClsSb_EquipMaintainRuleBillSub_Item> DetailColl_Pay = new List<Models.ClsSb_EquipMaintainRuleBillSub_Item>(); |
| | | |
| | | public ClsSb_EquipMaintainRuleBill() |
| | | { |
| | | base.MvarItemKeySub = "Sb_EquipMaintainRuleBillSub"; |
| | | base.MvarItemKeySub2 = "Sb_EquipMaintainRuleBillSub_Item"; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey = "Sb_EquipMaintainRuleBillMain"; |
| | | base.MvarReportTitle = "设å¤ä¿å
»è§ç¨"; |
| | | base.BillType = "3912"; |
| | | } |
| | | |
| | | #region åºå®ä»£ç |
| | | |
| | | ~ClsSb_EquipMaintainRuleBill() |
| | | { |
| | | DetailColl_Mater = null; |
| | | DetailColl_Pay = null; |
| | | //DetailColl_Entrust = null; |
| | | //DetailColl_Money = null; |
| | | } |
| | | |
| | | #endregion èªå®ä¹æ¹æ³ |
| | | } |
| | | } |
| | |
| | | List<Model.ClsKf_POStockInBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsKf_POStockInBillMain>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// çäº§æ±æ¥åååºåå |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | | /// <returns></returns> |
| | | public List<Model.ClsSc_ICMOReportBillMain> getICMOReportBillMainByJson(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsSc_ICMOReportBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_ICMOReportBillMain>>(jsonString); |
| | | return list; |
| | | } |
| | | /// <summary> |
| | | /// å¤è´å
¥åº(红å)ååºåå |
| | | /// </summary> |
| | |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsKf_MoveStockBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsKf_MoveStockBillMain>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åå¸å¼è°åºåååºåå |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | | /// <returns></returns> |
| | | public List<Model.ClsKf_MoveStockStepOutBillMain> getMoveStockStepOutBillMainByJson(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsKf_MoveStockStepOutBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsKf_MoveStockStepOutBillMain>>(jsonString); |
| | | return list; |
| | | } |
| | | /// <summary> |
| | |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsGy_BadReason_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_BadReason_Model>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¤çæ°å¢æ
éåå 表çjson |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | | /// <returns></returns> |
| | | public List<Model.ClsGy_ConkReason_Model> getObjectByJson_Gy_ConkReason(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsGy_ConkReason_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_ConkReason_Model>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | |
| | | List<Models.UserPower> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.UserPower>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | | /// <returns></returns> |
| | | public List<Models.ClsKf_MateOutBillMain> getObjectByJson_Kf_MateOutBillMain(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Models.ClsKf_MateOutBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsKf_MateOutBillMain>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | | /// <returns></returns> |
| | | public List<Models.ClsKf_MateOutBillSub> getObjectByJson_Kf_MateOutBillSub(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Models.ClsKf_MateOutBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsKf_MateOutBillSub>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | | /// <returns></returns> |
| | | public List<Models.ClsKf_ICStockBillMain> getObjectByJson_Kf_ICStockBillMain(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Models.ClsKf_ICStockBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsKf_ICStockBillMain>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="jsonString"></param> |
| | | /// <returns></returns> |
| | | public List<Models.ClsKf_ICStockBillSub> getObjectByJson_Kf_ICStockBillMSub(string jsonString) |
| | | { |
| | | jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Models.ClsKf_ICStockBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsKf_ICStockBillSub>>(jsonString); |
| | | return list; |
| | | } |
| | | } |
| | | } |
| | |
| | | public string HLogo; //â varchar(50) //åç |
| | | public int HSellSupID; // â int //ä¾åºå(Gy_Supplier) |
| | | public int HMakeSupID; // int //å¶é å (Gy_Supplier) |
| | | public int HEquipDotCheckRuleInterID; |
| | | public int HEquipMaintainRuleInterID; |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsKf_ICStockBillMain:DBUtility.ClsXt_BaseBillMain |
| | | { |
| | | public Int64 HSupID; // int --徿¥åä½ï¼çé¢ä¸ä¸éè¦æ¾ç¤ºï¼å0è¿å»ï¼ |
| | | public Int64 HWHID; // int --ä»åº |
| | | public Int64 HSCWHID; // int --è°åºä»åº( çé¢ä¸ä¸éè¦æ¾ç¤ºï¼å0è¿å») |
| | | public Int64 HEmpID; // int --ä¸å¡å |
| | | public Int64 HManagerID; // int --è´è´£äººï¼ä¸»ç®¡ï¼ |
| | | public Int64 HSecManagerID; // int --éªæ¶ |
| | | public Int64 HKeeperID; // int --ä¿ç®¡å |
| | | public Int64 HDeptID; // int --é¨é¨ |
| | | public Int64 HCurID; // int --å¸å«( çé¢ä¸ä¸éè¦æ¾ç¤ºï¼å0è¿å») |
| | | public string HExplanation; // varchar(200) --ÕªÒª |
| | | public string HInnerBillNo; // varchar(50) --å
é¨åæ®å· |
| | | public bool HRedBlueFlag; // bit --红èå |
| | | public Int64 HSellSID; // int --é宿¹å¼ (Gy_SellStyle) addnew |
| | | public Int64 HConveyCompID; // int --è¿è¾å
¬å¸ addnew |
| | | public Int64 HConveyTypeID; // int --è¿è¾æ¹å¼ addnew |
| | | public Single HCarriage; // money --è¿è´¹ addnew |
| | | public string HSeOrderBillNo_M; // varchar(100) --éå®è®¢å addnew |
| | | public string HSeOrderBillNo; // varchar(100) --éå®è®¢å addnew |
| | | public double HConveyMoney; // dec(18,8) --éè´§è´¹ç¨ï¼æ ç¨ï¼ |
| | | public double HCheckMoney; // dec(18,8) --æ£æµè´¹ç¨ï¼æ ç¨ï¼ |
| | | public double HCheckMoneyFor; // dec(18,8) --æ£æµè´¹ç¨æ¬ä½å¸ï¼æ ç¨ï¼ |
| | | public double HRemainMoney; // dec(18,8) --æ ¸éå©ä½æ°éï¼æ ç¨ï¼ |
| | | public Int64 HCheckStatus; // int --æ ¸éç¶æï¼æ ç¨ï¼ |
| | | public string HHookType; // varchar(50) --å¾ç¨½ç±»åï¼æ ç¨ï¼ |
| | | public double HHookQty; // dec(18,8) --å¾ç¨½æ°éï¼æ ç¨ï¼ |
| | | public string HCarNo; // varchar(100) --车çå· |
| | | public string HMainSourceBillType;// varchar(50) --æºåç±»å |
| | | public string HLinkMan; // varchar(50) --è系人 |
| | | public string HLinkPhone; // varchar(50) --èç³»çµè¯ |
| | | public string HAddress; // varchar(500) --éè´§å°å |
| | | public Int64 HProcID; // int --å·¥åºï¼gy_processï¼ |
| | | public Int64 HSALEORGID; // int --éå®ç»ç» |
| | | public Int64 HPRDORGID; // int --ç产ç»ç» |
| | | public Int64 HSTOCKORGID; // int --åºåç»ç» |
| | | public Int64 HOWNERID; // int --货主 |
| | | public Int64 HSETTLEORGID; // int --ç»ç®ç»ç» |
| | | public Int64 HOWNERSUPPLIERID; // int --ä¾åºè´§ä¸» |
| | | public Int64 HDEMANDORGID; // int --éæ±ç»ç» |
| | | public Int64 HPURCHASEORGID; // int --éè´ç»ç» |
| | | public Int64 HPAYORGID; // int --仿¬¾ç»ç®ç»ç» |
| | | public string HOWNERTYPEID; // varchar(100) --货主类å |
| | | public string HStockStyle; // varchar(100) --åºåç±»å |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsKf_ICStockBillScheme : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public Int64 HItemID; |
| | | public string HBillType; |
| | | public Int64 HMaterID; |
| | | public Int64 HProcID; |
| | | public Int64 HWhID; |
| | | public Int64 HGroupID; |
| | | public double HQty; |
| | | public string HBarCode; |
| | | public string HAddr; |
| | | public string HMaker; |
| | | public DateTime HMakeDate; |
| | | public Int64 HSourceItemID; |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsKf_ICStockBillSub:DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public Int64 HMaterID; // int --ç©æID |
| | | public Int64 HPropertyID; // int --è¾
å©å±æ§ |
| | | public Int64 HSecUnitID; // int --è¾
å©è®¡éåä½ |
| | | public Single HSecUnitRate; // money --æ¢ç®ç |
| | | public Int64 HUnitID; // int --计éåä½ |
| | | public double HQtyMust; // dec(18,8) --åºæ¶æ°é |
| | | public double HQty; // dec(18,8) --宿¶æ°é |
| | | public double HPrice; // dec(18,8) --åä»· |
| | | public double HMoney; // dec(18,8) --éé¢ |
| | | public double HOrderPrice; // dec(18,8) --éè´éé¢ --addnew |
| | | public Int64 HWHID; // int --æ¶æä»åº |
| | | public Int64 HSCWHID; // int --è°åºä»åºIDï¼çé¢ä¸ä¸éè¦æ¾ç¤ºï¼å0è¿å»ï¼ |
| | | public Int64 HSPID; // int --ä»ä½ID |
| | | public Int64 HSCSPID; // int --è°åºä»ä½IDï¼çé¢ä¸ä¸éè¦æ¾ç¤ºï¼å0è¿å»ï¼ |
| | | public Int64 HSPGroupID; // int --ä»ä½ç»ID(ä»åºéæ©å®èªå¨å¸¦åº) |
| | | public string HBatchNo; // varchar(50) --æ¹æ¬¡ |
| | | public Int64 HPOOrderInterID; // int --éè´è®¢å主å
ç |
| | | public Int64 HPOOrderEntryID; // int --éè´è®¢ååå
ç |
| | | public string HPOOrderBillNo; // varchar(50) --éè´è®¢åå· |
| | | public Int64 HSeOrderInterID; // int --éå®è®¢å主å
ç |
| | | public Int64 HSeOrderEntryID; // int --éå®è®¢ååå
ç |
| | | public string HSeOrderBillNo; // varchar(50) --éå®è®¢åå· |
| | | public Int64 HICMOInterID; // int --ç产订å主å
ç |
| | | public Int64 HICMOEntryID; // int --ç产订ååå
ç |
| | | public string HICMOBillNo; // varchar(50) --ç产订åå· |
| | | public Int64 HWWOrderInterID; // int --å§å¤è®¢å主å
ç |
| | | public Int64 HWWOrderEntryID; // int --å§å¤è®¢ååå
ç |
| | | public string HWWOrderBillNo; // varchar(50) --å§å¤è®¢åå· |
| | | public string HEngineNum; // varchar(100) --å卿ºå·ï¼éèï¼ |
| | | public string HUnderPanNum; // varchar(100) --å°çå·ï¼éèï¼ |
| | | public string HLeaveFactCard; // varchar(100) --åºåè¯ï¼éèï¼ |
| | | public double HSalePrice; // dec(18,8) --éå®åä»· --addnew |
| | | public Single HCostPrice; // money --ææ¬åä»· --addnew |
| | | public Single HCostMoney; // money --ææ¬éé¢ --addnew |
| | | public double HQtyRel; // dec(18,8) --å®é
æ°é |
| | | public DateTime HEndDate; // datetime --ç»ææ¥æ |
| | | public bool HOldMaterBackFlag; // bit --æ§ä»¶è¿åæ è®° |
| | | public Int64 HProcID; // int --å·¥åºï¼Gy_Processï¼ |
| | | public double HHookQty; // dec(18,8) --å¾ç¨½æ°é |
| | | public string HHookType; // varchar(50) --å¾ç¨½ç±»å |
| | | public double HTaxPrice; // dec(18,8) --å«ç¨åä»· |
| | | public double HTaxMoney; // dec(18,8) --å«ç¨éé¢ |
| | | public Int64 HPackMaterID; // int --å
è£
ææ |
| | | public double HPackQty; // dec(18,8) --å
è£
æ°é |
| | | public Int64 HBottleMaterID; // int --æ ç¨ |
| | | public double HBottleLackQty; // dec(18,8) --æ ç¨ |
| | | public double HBottleQty; // dec(18,8) --æ ç¨ |
| | | public string HMTONo; // varchar(50) --计åè·è¸ªå· |
| | | public Int64 HPlanMode; // int --è®¡åæ¨¡å¼ |
| | | public Int64 HEOWNERSUPPLIERID; // int --ä¾åºç»ç»è´§ä¸» |
| | | public Int64 HOWNERID; // int --货主 |
| | | public Int64 HKEEPERID; // int --ä¿ç®¡è
|
| | | public Int64 HPARENTOWNERID; // int --产å货主 |
| | | public Int64 HRECEIVEOWNERID; // int --æ¶æç»ç» |
| | | public string HOWNERTYPEID; // varchar(100) --货主类å |
| | | public string HKEEPERTYPEID; // varchar(100) --ä¿ç®¡ç±»å |
| | | public string HPARENTOWNERTYPEID; // varchar(100) --产å货主类å |
| | | public string HRECEIVEOWNERTYPEID; // varchar(100) --æ¶æè´§ä¸»ç±»å |
| | | public Single HTaxRate; // money --ç¨ç |
| | | public Int64 HSTOCKORGID; // int --åºåç»ç» |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsKf_MateOutBillMain:DBUtility.ClsXt_BaseBillMain |
| | | { |
| | | public Int64 HSupID;// int --ä¾åºå |
| | | public Int64 HWHID;// int --ä»åº |
| | | public Int64 HSCWHID;// int --è°åºä»åº |
| | | public Int64 HEmpID;// int --ä¸å¡å |
| | | public Int64 HManagerID;// int --è´è´£äºº |
| | | public Int64 HSecManagerID;// int --éªæ¶ |
| | | public Int64 HKeeperID;// int --ä¿ç®¡å |
| | | public Int64 HDeptID;// int --é¨é¨ |
| | | public string HExplanation;// varchar(200) --ÕªÒª |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | public bool HRedBlueFlag;// bit --红èå |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsKf_MateOutBillScheme : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public Int64 HInterID; |
| | | public Int64 HEntryID; |
| | | public Int64 HItemID; |
| | | public string HBillType; |
| | | public Int64 HMaterID; |
| | | public Int64 HProcID; |
| | | public Int64 HWhID; |
| | | public Int64 HGroupID; |
| | | public double HQty; |
| | | public string HBarCode; |
| | | public string HAddr; |
| | | public string HMaker; |
| | | public DateTime HMakeDate; |
| | | public Int64 HSourceInterID; |
| | | public Int64 HSourceEntryID; |
| | | public string HSourceBillType; |
| | | public string HSourceBillNo; |
| | | public Int64 HSourceItemID; |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsKf_MateOutBillSub:DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public DateTime HEntryCloseDate;// datetime --è¡å
³é (é»è®¤ä¸º'') new |
| | | public string HRemark;// varchar(200) --夿³¨ |
| | | public Int64 HMaterID;// int --ç©æID |
| | | public Int64 HPropertyID;// int --è¾
å©å±æ§ |
| | | public Int64 HSecUnitID;// int --è¾
å©è®¡éåä½ |
| | | public Single HSecUnitRate;// money --æ¢ç®ç |
| | | public Int64 HUnitID;// int --计éåä½ |
| | | public double HQtyMust;// dec(18,8) --åºæ¶æ°é |
| | | public double HQty;// dec(18,8) --宿¶æ°é |
| | | public double HPrice;// dec(18,8) --åä»· |
| | | public double HMoney;// dec(18,8) --éé¢ |
| | | public Int64 HWHID;// int --æ¶æä»åº |
| | | public Int64 HSCWHID;// int --è°åºä»åºID |
| | | public Int64 HSPID;// int --ä»ä½ID |
| | | public Int64 HSCSPID;// int --è°åºä»ä½ID |
| | | public Int64 HSPGroupID;// int --ä»ä½ç»ID(ä»åºéæ©å®èªå¨å¸¦åº) |
| | | public string HBatchNo;// varchar(50) --æ¹æ¬¡ |
| | | public Int64 HPOOrderInterID;// int --éè´è®¢å主å
ç |
| | | public Int64 HPOOrderEntryID;// int --éè´è®¢ååå
ç |
| | | public string HPOOrderBillNo;// varchar(50) --éè´è®¢åå· |
| | | public Int64 HSeOrderInterID;// int --éå®è®¢å主å
ç |
| | | public Int64 HSeOrderEntryID;// int --éå®è®¢ååå
ç |
| | | public string HSeOrderBillNo;// varchar(50) --éå®è®¢åå· |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsSb_EquipDotCheckRuleBillMain : DBUtility.ClsXt_BaseBillMain |
| | | { |
| | | public DateTime HBeginDate;// datetime --计åå¼å§æ¥æ |
| | | public DateTime HEndDate;// datetime --计åç»ææ¥æ |
| | | public string HCycleUnit;// varchar(10) --卿åä½(å¤©ï¼æï¼å¨) |
| | | public int HCheckCycle;// int --ç¹æ£å¨æ |
| | | public string HExplanation;// varchar(500) --æè¦ |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsSb_EquipDotCheckRuleBillSub : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public int HDotCheckItemID;// int --ç¹æ£é¡¹ç®ID |
| | | public string HDotCheckItem;// varchar(100) --ç¹æ£é¡¹ç® |
| | | public string HDotCheckPart;// varchar(100) --ç¹æ£é¨ä½ |
| | | public string HClaim;// varchar(100) --å
·ä½è¦æ± |
| | | public int HManagerID;// int --è´è´£äººid(èå表) |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsSb_EquipMaintainRuleBillMain : DBUtility.ClsXt_BaseBillMain |
| | | { |
| | | public string HCycleUnit; //--卿åä½(å¤©ï¼æï¼å¨) |
| | | public int HCheckCycle; //--ä¿å
»å¨æ |
| | | public string HExplanation; // varchar(500) --æè¦ |
| | | public string HInnerBillNo; //varchar(50) --å
é¨åæ®å· |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsSb_EquipMaintainRuleBillSub : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public string HBillNo_bak; |
| | | public int HItemSubID; // --èªå¢å(GUID) |
| | | public int HMaterID; //int --é
ä»¶ID |
| | | public int HUnitID;// int --计éåä½ |
| | | public string HQty;// dec(18,8) --ç¨é |
| | | public string HQtyMust;// dec(18,8) --æ åç¨é(ææ¶éè) |
| | | } |
| | | } |
| New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ClsSb_EquipMaintainRuleBillSub_Item : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public string HBillNo_bak; |
| | | public int HItemSubID; // --èªå¢å(GUID) |
| | | public int HMaintainItemID;// int --ä¿å
»é¡¹ç®ID |
| | | public string HMaintainItem;// varchar(100) --ä¿å
»é¡¹ç® |
| | | public string HMaintainPart; //varchar(100) --ä¿å
»é¨ä½ |
| | | public string HClaim;// varchar(100) --å
·ä½è¦æ± |
| | | public int HManagerID;// int --è´è´£äººid(èå表) |
| | | } |
| | | } |
| | |
| | | <publishTime>02/22/2013 08:43:40</publishTime> |
| | | </File> |
| | | <File Include="bin/BLL.dll"> |
| | | <publishTime>11/16/2021 18:46:35</publishTime> |
| | | <publishTime>11/19/2021 17:06:10</publishTime> |
| | | </File> |
| | | <File Include="bin/BLL.pdb"> |
| | | <publishTime>11/16/2021 18:46:35</publishTime> |
| | | <publishTime>11/19/2021 17:06:10</publishTime> |
| | | </File> |
| | | <File Include="bin/DAL.dll"> |
| | | <publishTime>11/16/2021 18:46:33</publishTime> |
| | | <publishTime>11/19/2021 17:06:06</publishTime> |
| | | </File> |
| | | <File Include="bin/DAL.pdb"> |
| | | <publishTime>11/16/2021 18:46:33</publishTime> |
| | | <publishTime>11/19/2021 17:06:06</publishTime> |
| | | </File> |
| | | <File Include="bin/Dapper.dll"> |
| | | <publishTime>07/22/2016 14:52:40</publishTime> |
| | | </File> |
| | | <File Include="bin/DBUtility.dll"> |
| | | <publishTime>11/16/2021 18:46:29</publishTime> |
| | | <publishTime>11/19/2021 17:06:00</publishTime> |
| | | </File> |
| | | <File Include="bin/DBUtility.pdb"> |
| | | <publishTime>11/16/2021 18:46:29</publishTime> |
| | | <publishTime>11/19/2021 17:06:00</publishTime> |
| | | </File> |
| | | <File Include="bin/Interop.gregn6Lib.dll"> |
| | | <publishTime>08/25/2021 10:28:25</publishTime> |
| | |
| | | <publishTime>07/25/2012 11:48:56</publishTime> |
| | | </File> |
| | | <File Include="bin/Model.dll"> |
| | | <publishTime>11/16/2021 18:46:30</publishTime> |
| | | <publishTime>11/19/2021 17:06:01</publishTime> |
| | | </File> |
| | | <File Include="bin/Model.pdb"> |
| | | <publishTime>11/16/2021 18:46:30</publishTime> |
| | | <publishTime>11/19/2021 17:06:01</publishTime> |
| | | </File> |
| | | <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> |
| | | <publishTime>08/16/2021 17:23:15</publishTime> |
| | |
| | | <publishTime>08/03/2014 20:33:56</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Class.dll"> |
| | | <publishTime>11/16/2021 18:46:28</publishTime> |
| | | <publishTime>11/19/2021 17:05:56</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Class.pdb"> |
| | | <publishTime>11/16/2021 18:46:28</publishTime> |
| | | <publishTime>11/19/2021 17:05:56</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Control.dll"> |
| | | <publishTime>11/16/2021 18:46:28</publishTime> |
| | | <publishTime>11/19/2021 17:05:58</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Control.pdb"> |
| | | <publishTime>11/16/2021 18:46:28</publishTime> |
| | | <publishTime>11/19/2021 17:05:58</publishTime> |
| | | </File> |
| | | <File Include="bin/SQLHelper.dll"> |
| | | <publishTime>11/16/2021 18:46:29</publishTime> |
| | | <publishTime>11/19/2021 17:05:58</publishTime> |
| | | </File> |
| | | <File Include="bin/SQLHelper.pdb"> |
| | | <publishTime>11/16/2021 18:46:29</publishTime> |
| | | <publishTime>11/19/2021 17:05:58</publishTime> |
| | | </File> |
| | | <File Include="bin/stdole.dll"> |
| | | <publishTime>05/09/2021 13:35:37</publishTime> |
| | |
| | | <publishTime>11/24/2014 11:18:48</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.dll"> |
| | | <publishTime>11/16/2021 18:46:38</publishTime> |
| | | <publishTime>11/19/2021 17:06:15</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.pdb"> |
| | | <publishTime>11/16/2021 18:46:38</publishTime> |
| | | <publishTime>11/19/2021 17:06:15</publishTime> |
| | | </File> |
| | | <File Include="bin/WebGrease.dll"> |
| | | <publishTime>07/17/2013 17:03:52</publishTime> |
| | |
| | | <publishTime>08/06/2021 22:57:28</publishTime> |
| | | </File> |
| | | <File Include="Web.config"> |
| | | <publishTime>11/16/2021 18:46:49</publishTime> |
| | | <publishTime>11/19/2021 17:09:40</publishTime> |
| | | </File> |
| | | </ItemGroup> |
| | | </Project> |
| | |
| | | <Compile Include="Controllers\ReportPlatFormController.cs" /> |
| | | <Compile Include="Controllers\SBGL\Gy_EquipFileMainController.cs" /> |
| | | <Compile Include="Controllers\SBGL\Gy_EquipTypeController.cs" /> |
| | | <Compile Include="Controllers\SBGL\Sb_EquipDotCheckRuleBillController.cs" /> |
| | | <Compile Include="Controllers\SBGL\Sb_EquipMaintainRuleBillController.cs" /> |
| | | <Compile Include="Controllers\SCGL\Sc_MESProductReportBillController.cs" /> |
| | | <Compile Include="Controllers\Sc_MouldRepairOutBillController.cs" /> |
| | | <Compile Include="Controllers\Sc_MouldRepairInBillListController - .cs" /> |
| | |
| | | <Compile Include="Controllers\XSGL\Xs_SeOutStockBackBillController.cs" /> |
| | | <Compile Include="Controllers\XSGL\Xs_SeOutStockBillController.cs" /> |
| | | <Compile Include="Controllers\XSGL\Xs_SeOrderBillController.cs" /> |
| | | <Compile Include="Controllers\ä»å管ç\ClsKf_MateOutBackBillController.cs" /> |
| | | <Compile Include="Controllers\ä»å管ç\Kf_MateOutBillController.cs" /> |
| | | <Compile Include="Controllers\å质管ç\å·¥åºæ£éªå\QC_ProcessCheckBillController.cs" /> |
| | | <Compile Include="Controllers\å质管ç\é¦ä»¶æ£éªå\QC_FirstPieceCheckBillController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_ConkReasonBillController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_DotCheckBillController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_MaintainBillController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_RepairBillController.cs" /> |
| | |
| | | <Compile Include="DLL\ClsGy_Source_Ctl.cs" /> |
| | | <Compile Include="DLL\ClsGy_WorkPayTypeBill.cs" /> |
| | | <Compile Include="DLL\ClsGy_WorkTypeBill.cs" /> |
| | | <Compile Include="DLL\ClsKf_MateOutBackBill.cs" /> |
| | | <Compile Include="DLL\ClsKf_MateOutBill.cs" /> |
| | | <Compile Include="DLL\ClsOA_InformBill.cs" /> |
| | | <Compile Include="DLL\ClsQC_NoPassProdCheckBill.cs" /> |
| | | <Compile Include="DLL\ClsQC_PatrolProcCheckBill.cs" /> |
| | | <Compile Include="DLL\ClsSb_EquipConkBookBill.cs" /> |
| | | <Compile Include="DLL\ClsSb_EquipDotCheckBill.cs" /> |
| | | <Compile Include="DLL\ClsSb_EquipMaintainBill.cs" /> |
| | | <Compile Include="DLL\ClsSb_EquipMaintainRuleBill.cs" /> |
| | | <Compile Include="DLL\ClsSb_EquipRepairCheckBill.cs" /> |
| | | <Compile Include="DLL\ClsSb_EquipRepairWorkBill.cs" /> |
| | | <Compile Include="DLL\ClsSc_ICMOBillWorkQtyStatus_Tmp.cs" /> |
| | |
| | | <Compile Include="DLL\ClsWW_EntrustProcessReportBill.cs" /> |
| | | <Compile Include="DLL\ClsWW_EntrustProcessSendOutBill.cs" /> |
| | | <Compile Include="DLL\ClsWW_EntrustWorkOrderBill.cs" /> |
| | | <Compile Include="DLL\ClsSb_EquipDotCheckRuleBill.cs" /> |
| | | <Compile Include="LogService.cs" /> |
| | | <Compile Include="Models\ApiConfig.cs" /> |
| | | <Compile Include="Models\ApiResult.cs" /> |
| | |
| | | <Compile Include="Models\ClsGy_Maintain.cs" /> |
| | | <Compile Include="Models\ClsGy_Repair.cs" /> |
| | | <Compile Include="Models\ClsGy_RepairCheck.cs" /> |
| | | <Compile Include="Models\ClsKf_ICStockBillMain.cs" /> |
| | | <Compile Include="Models\ClsKf_ICStockBillScheme.cs" /> |
| | | <Compile Include="Models\ClsKf_ICStockBillSub.cs" /> |
| | | <Compile Include="Models\ClsKf_MateOutBillMain.cs" /> |
| | | <Compile Include="Models\ClsKf_MateOutBillScheme.cs" /> |
| | | <Compile Include="Models\ClsKf_MateOutBillSub.cs" /> |
| | | <Compile Include="Models\ClsOA_InformBillMain.cs" /> |
| | | <Compile Include="Models\ClsOA_InformBillSub.cs" /> |
| | | <Compile Include="Models\ClsSb_EquipDotCheckRuleBillMain.cs" /> |
| | | <Compile Include="Models\ClsSb_EquipDotCheckRuleBillSub.cs" /> |
| | | <Compile Include="Models\ClsSb_EquipMaintainRuleBillMain.cs" /> |
| | | <Compile Include="Models\ClsSb_EquipMaintainRuleBillSub.cs" /> |
| | | <Compile Include="Models\ClsSb_EquipMaintainRuleBillSub_Item.cs" /> |
| | | <Compile Include="Models\Pay_PeriodInfoSet.cs" /> |
| | | <Compile Include="Models\Gy_OrderBackInfo.cs" /> |
| | | <Compile Include="Models\Gy_OrderLevList.cs" /> |
| | |
| | | <Compile Include="Controllers\EntrustOutController.cs" /> |
| | | <Compile Include="Controllers\Kf_EntrustInBillController.cs" /> |
| | | <Compile Include="Controllers\MateOutController.cs" /> |
| | | <Compile Include="Controllers\MoveStockBillController.cs" /> |
| | | <Compile Include="Controllers\OtherOutBillController.cs" /> |
| | | <Compile Include="Controllers\OtherInStockController.cs" /> |
| | | <Compile Include="Controllers\POStockInBackBillController.cs" /> |
| | |
| | | //sErrMsg = "ä¿åè°æ¨å失败ï¼" + sErrMsg; |
| | | //return false; |
| | | } |
| | | |
| | | public bool set_MoveStockStepOutBill(WebAPI.WebS.ClsKf_MoveStockStepOutBillMain oMain, string sHSourceType, ref string sErrMsg) |
| | | { |
| | | WebS.WebService1 oWebs = new WebS.WebService1(); |
| | | if (oWebs.set_SaveMoveStockStepOutBill_New(oMain, sHSourceType, ref sErrMsg)) |
| | | { |
| | | sErrMsg = "ä¿åæåï¼" + oMain.HBillNo; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "åæ®å·ï¼" + oMain.HBillNo + ", åæ®IDï¼" + oMain.HInterID + ";" + sErrMsg; |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | //å é¤è®°å½ |
| | | public bool set_DelPonderationBillMain_Temp_InterIDAndSource(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string sHBillType, ref string sErrMsg) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public bool set_SaveICMOReportBill_Json(WebAPI.WebS.ClsSc_ICMOReportBillMain oMain, string sHSourceType, ref string sErrMsg) |
| | | { |
| | | //BLL.ClsKf_POStockInBill bll = new BLL.ClsKf_POStockInBill(); |
| | | //return bll.set_SavePOStockInBill_New(oMain, sHSourceType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | WebS.WebService1 oWebs = new WebS.WebService1(); |
| | | if (oWebs.set_SaveICMOReportBill_New(oMain, sHSourceType, ref sErrMsg)) |
| | | { |
| | | //夿æ¯å¦ååæå |
| | | //if (set_UpdateHStatus(oMain.HInterID, oMain.HExplanation.ToString())) |
| | | //{ |
| | | sErrMsg = "ä¿åæåï¼" + oMain.HBillNo; |
| | | return true; |
| | | //} |
| | | //else |
| | | //{ |
| | | // sErrMsg = "ä¿åæåï¼" + oMain.HBillNo + "ç¶æåå失败ï¼"; |
| | | // return true; |
| | | //} |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "åæ®å·ï¼" + oMain.HBillNo + ", åæ®IDï¼" + oMain.HInterID + ";" + sErrMsg; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// çæå¤è´å
¥åºåK3 |
| | | /// </summary> |