| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldMaintainBill/GetMouldMaintainBillList")] |
| | | [HttpGet] |
| | | public object GetMouldMaintainBillList(string sWhere) |
| | | public object GetMouldMaintainBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Sc_MouldMaintainBillList_s(sWhere); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | |
| | | { |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintain order by 日期 desc", "h_v_Sc_MouldMaintain"); |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintain order by hmainid desc", "h_v_Sc_MouldMaintain"); |
| | | } |
| | | 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 hmainid desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldMaintain"); |
| | | |
| | | } |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldDotCheckPlanBill/GetMouldDotCheckPlanBillList")] |
| | | [HttpGet] |
| | | public object GetMouldDotCheckPlanBillList(string sWhere) |
| | | public object GetMouldDotCheckPlanBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckPlanBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Sc_MouldDotCheckPlanBillList_s(sWhere); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | |
| | | |
| | | public static DataSet Sc_MouldDotCheckPlanBillList_s(string sWhere) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckPlanBillList order by 日期 desc", "h_v_Sc_MouldDotCheckPlanBillList"); |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldDotCheckPlanBillList where 1=1 "+sWhere+ " order by hmainid desc", "h_v_Sc_MouldDotCheckPlanBillList"); |
| | | } |
| | | #endregion |
| | | |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldDotCheckBill/GetMouldDotCheckBillList")] |
| | | [HttpGet] |
| | | public object GetMouldDotCheckBillList(string sWhere) |
| | | public object GetMouldDotCheckBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = Sc_MouldDotCheckBillList_s(sWhere); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | |
| | | |
| | | 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 hmainid desc", "h_v_Sc_MouldDotCheckBillList"); |
| | | } |
| | | #endregion |
| | | |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldMaintainPlanBill/GetMouldMaintainPlanBillList")] |
| | | [HttpGet] |
| | | public object GetMouldMaintainPlanBillList(string sWhere) |
| | | public object GetMouldMaintainPlanBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Sc_MouldMaintainPlanBillList_s(sWhere); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | |
| | | |
| | | public static DataSet Sc_MouldMaintainPlanBillList_s(string sWhere) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintainPlanBillList where 1=1 "+sWhere+" order by 日期 desc", "h_v_Sc_MouldMaintainPlanBillList"); |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldMaintainPlanBillList where 1=1 "+sWhere+ " order by hmainid desc", "h_v_Sc_MouldMaintainPlanBillList"); |
| | | } |
| | | #endregion |
| | | |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldConkBookBill/GetMouldConkBookBillList")] |
| | | [HttpGet] |
| | | public object GetMouldConkBookBillList(string sWhere) |
| | | public object GetMouldConkBookBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Sc_MouldConkBookBillList_s(sWhere); |
| | | objJsonResult.code = "1"; |
| | |
| | | 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 where 1=1 " + sWhere+ " order by hmainid desc", "h_v_Sc_MouldConkBookBillList"); |
| | | } |
| | | else |
| | | { |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldRepairCheckBill/GetMouldRepairCheckBillList")] |
| | | [HttpGet] |
| | | public object GetMouldRepairCheckBillList(string sWhere) |
| | | public object GetMouldRepairCheckBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairCheckBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Sc_MouldRepairCheckBillList_s(sWhere); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | DataSet ds; |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldRepairCheckBillList_Edit order by 日期 desc" + sWhere, "h_v_Sc_MouldRepairCheckBillList_Edit"); |
| | | ds = new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldRepairCheckBillList_Edit where 1=1" + sWhere+ " order by hmainid desc", "h_v_Sc_MouldRepairCheckBillList_Edit"); |
| | | } |
| | | 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 hmainid desc"; |
| | | ds = new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldRepairCheckBillList_Edit"); |
| | | } |
| | | return ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("Sb_MouldRepairWorkBill/GetMouldRepairWorkBillList")] |
| | | [HttpGet] |
| | | public object GetMouldRepairWorkBillList(string sWhere) |
| | | public object GetMouldRepairWorkBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Sc_MouldRepairWorkBillList_s(sWhere); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | |
| | | { |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldRepairWorkBillList order by 日期 desc" + sWhere, "h_v_Sc_MouldRepairWorkBillList"); |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldRepairWorkBillList where 1=1 " + sWhere+ " order by hmainid desc", "h_v_Sc_MouldRepairWorkBillList"); |
| | | } |
| | | 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 hmainid desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldRepairWorkBillList"); |
| | | } |
| | | } |
| | |
| | | /// <returns></returns> |
| | | [Route("Kf_MoveStockBill/GetMoveStockBillList")] |
| | | [HttpGet] |
| | | public object GetMoveStockBillList(string sWhere) |
| | | public object GetMoveStockBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Kf_MoveStockBillQuery", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Sc_GetMoveStockBillList(sWhere); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_MoveStockBillList order by hmainid desc", "h_v_IF_MoveStockBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_IF_MoveStockBillList where 1=1 " + sWhere+ "order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_MoveStockBillList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | } |
| | | } |
| | | |
| | | #region sql语句 |
| | | |
| | | |
| | | public static DataSet Sc_GetMoveStockBillList(string sWhere) |
| | | { |
| | | 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_SellOutBill/GetSellOutBillList")] |
| | | [HttpGet] |
| | | public object GetSellOutBillList(string sWhere) |
| | | public object GetSellOutBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Kf_SellOutBillQuery", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Sc_GetSellOutBillList(sWhere); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | |
| | | /// <returns></returns> |
| | | [Route("Kf_SellOutBill/DeltetSellOutBill")] |
| | | [HttpGet] |
| | | public object DeltetSeOutStockBackBill(string HInterID) |
| | | public object DeltetSeOutStockBackBill(string HInterID,string user) |
| | | { |
| | | try |
| | | { |
| | | //判断是否有删除权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Kf_SellOutBill_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无权限删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete From Kf_ICStockBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From Kf_ICStockBillSub where HInterID = " + HInterID); |
| | |
| | | |
| | | public static DataSet Sc_GetSellOutBillList(string sWhere) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_SellOutBillList order by 日期 desc", "h_v_IF_SellOutBillList"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_SellOutBillList order by hmainid desc", "h_v_IF_SellOutBillList"); |
| | | } |
| | | else |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_SellOutBillList where 1=1 " + sWhere + " order by hmainid desc", "h_v_IF_SellOutBillList"); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | |
| | | /// <returns></returns> |
| | | [Route("Kf_OtherOutBill/GetOtherOutBillList")] |
| | | [HttpGet] |
| | | public object GetOtherOutBillList(string sWhere) |
| | | public object GetOtherOutBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Kf_OtherOutBillQuery", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Kf_OtherOutBillList where 1=1 order by 日期 desc", "h_v_Kf_OtherOutBillList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Kf_OtherOutBillList where 1=1 order by hmainid desc", "h_v_Kf_OtherOutBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_Kf_OtherOutBillList where 1 = 1 " + sWhere+ " order by 日期 desc"; |
| | | string sql = "select * from h_v_Kf_OtherOutBillList where 1 = 1 " + sWhere+ " order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Kf_OtherOutBillList"); |
| | | } |
| | | |
| | |
| | | /// <returns></returns> |
| | | [Route("Kf_ProductInBill/GetProductInBill")] |
| | | [HttpGet] |
| | | public object GetProductInBill(string sWhere) |
| | | public object GetProductInBill(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Kf_ProductInBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ProductInBillList where 1=1 order by 日期 desc", "h_v_IF_ProductInBillList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ProductInBillList where 1=1 order by hmainid desc", "h_v_IF_ProductInBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_IF_ProductInBillList where 1 = 1 " + sWhere + " order by 日期 desc"; |
| | | string sql = "select * from h_v_IF_ProductInBillList where 1 = 1 " + sWhere + " order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_ProductInBillList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | |
| | | /// <returns></returns> |
| | | [Route("Kf_OtherInBill/GetOtherInBill")] |
| | | [HttpGet] |
| | | public object GetOtherInBill(string sWhere) |
| | | public object GetOtherInBill(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Kf_OtherInBillQuery", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Kf_OtherInBillList where 1=1 order by 日期 desc", "h_v_Kf_OtherInBillList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Kf_OtherInBillList where 1=1 order by hmainid desc", "h_v_Kf_OtherInBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_Kf_OtherInBillList where 1 = 1 " + sWhere+ " order by 日期 desc"; |
| | | string sql = "select * from h_v_Kf_OtherInBillList where 1 = 1 " + sWhere+ " order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Kf_OtherInBillList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | |
| | | /// <returns></returns> |
| | | [Route("Kf_EntrustInBill/GetEntrustInBill")] |
| | | [HttpGet] |
| | | public object GetEntrustInBill(string sWhere) |
| | | public object GetEntrustInBill(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Kf_EntrustInBillQuery", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无权限查询!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Kf_EntrustInBillList where 1=1", "h_v_Kf_EntrustInBillList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Kf_EntrustInBillList where 1=1 order by hmainid desc", "h_v_Kf_EntrustInBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_Kf_EntrustInBillList where 1 = 1 " + sWhere; |
| | | string sql = "select * from h_v_Kf_EntrustInBillList where 1 = 1 " + sWhere+ " order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Kf_EntrustInBillList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DAL.ClsSb_MouldRepairWorkBill oBill = new DAL.ClsSb_MouldRepairWorkBill(); |
| | | List<Model.ClsSb_MouldRepairWorkBillMain> lsmain = new List<Model.ClsSb_MouldRepairWorkBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | /// <returns></returns> |
| | | [Route("Sb_MouldRepairWorkBill/DeltetMouldRepairWorkBill")] |
| | | [HttpGet] |
| | | public object DeltetMouldRepairWorkBill(string HInterID) |
| | | public object DeltetMouldRepairWorkBill(string HInterID,string user) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "无删除权限!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | |
| | | try |
| | | { |
| | | //审核权限 |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairCheckBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DLL.ClsSc_MouldRepairCheckBill oBill = new DLL.ClsSc_MouldRepairCheckBill(); |
| | | List<Model.ClsSc_MouldRepairCheckBillMain> lsmain = new List<Model.ClsSc_MouldRepairCheckBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldRepairCheckBill/DeltetMouldRepairCheckBill")] |
| | | [HttpGet] |
| | | public object DeltetMouldRepairCheckBill(string HInterID) |
| | | public object DeltetMouldRepairCheckBill(string HInterID,string user) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sc_MouldRepairCheckBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "无删除权限!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairCheckBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | |
| | | |
| | | #region 模具故障登记表保存/编辑 |
| | | /// <summary> |
| | | /// 保存模具维修单 |
| | | /// 保存故障登记表 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | |
| | | string msg4 = sArray[2].ToString(); |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | DAL.ClsSc_MouldConkBookBill oBill = new DAL.ClsSc_MouldConkBookBill(); |
| | | List<Model.ClsSc_MouldConkBookBillMain> lsmain = new List<Model.ClsSc_MouldConkBookBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | |
| | | #region [模具故障登记表删除功能] |
| | | /// <summary> |
| | | /// 模具维修单删除功能 |
| | | /// 模具故障登记表删除功能 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldConkBookBill/DeltetMouldConkBookBill")] |
| | | [HttpGet] |
| | | public object DeltetMouldConkBookBill(string HInterID) |
| | | public object DeltetMouldConkBookBill(string HInterID,string user) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "无删除权限!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DAL.ClsSc_MouldMaintainPlanBill oBill = new DAL.ClsSc_MouldMaintainPlanBill(); |
| | | List<Model.ClsSc_MouldMaintainPlanBillMain> lsmain = new List<Model.ClsSc_MouldMaintainPlanBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldMaintainPlanBill/DeltetMouldMaintainPlanBill")] |
| | | [HttpGet] |
| | | public object DeltetMouldMaintainPlanBill(string HInterID) |
| | | public object DeltetMouldMaintainPlanBill(string HInterID,string user) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "无删除权限!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainPlanBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | string msg5 = sArray[3].ToString(); |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainBill_Edit", 1, false, msg5)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DAL.ClsSc_MouldMaintainBill oBill = new DAL.ClsSc_MouldMaintainBill(); |
| | | List<Model.ClsSc_MouldMaintainBillMain> lsmain = new List<Model.ClsSc_MouldMaintainBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldMaintainBill/DeltetSc_MouldMaintainBill")] |
| | | [HttpGet] |
| | | public object DeltetSc_MouldMaintainBill(string HInterID) |
| | | public object DeltetSc_MouldMaintainBill(string HInterID,string user) |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainBill_Delete", 1, false, 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) |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | |
| | | string msg4 = sArray[2].ToString(); |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DAL.ClsSc_MouldDotCheckBill oBill = new DAL.ClsSc_MouldDotCheckBill(); |
| | | List<Model.ClsSc_MouldDotCheckBillMain> lsmain = new List<Model.ClsSc_MouldDotCheckBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | |
| | | #region [模具点检记录表删除功能] |
| | | /// <summary> |
| | | /// 模具维修单删除功能 |
| | | /// 模具点检记录删除功能 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldDotCheckBill/DeltetSc_MouldDotCheckBill")] |
| | | [HttpGet] |
| | | public object DeltetSc_MouldDotCheckBill(string HInterID) |
| | | public object DeltetSc_MouldDotCheckBill(string HInterID,string user) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "无删除权限!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckPlanBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DAL.ClsSc_MouldDotCheckPlanBill oBill = new DAL.ClsSc_MouldDotCheckPlanBill(); |
| | | List<Model.ClsSc_MouldDotCheckPlanBillMain> lsmain = new List<Model.ClsSc_MouldDotCheckPlanBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldDotCheckPlanBill/DeltetSc_MouldDotCheckPlanBillBill")] |
| | | [HttpGet] |
| | | public object DeltetSc_MouldDotCheckPlanBillBill(string HInterID) |
| | | public object DeltetSc_MouldDotCheckPlanBillBill(string HInterID,string user) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "无删除权限!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckPlanBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldScrapInHouseBill/SaveGetMouldScrapInHouseBillList")] |
| | | [HttpPost] |
| | | public object fSaveGetMouldScrapInHouseBillList([FromBody] JObject msg) |
| | | public object SaveGetMouldScrapInHouseBillList([FromBody] JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | |
| | | try |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapRequestBill_Edit", 1, true, msg4)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapRequestBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBillList", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | 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 hmainid desc", "h_v_Sc_MouldScrapOutHouseBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + "order by 日期 desc"; |
| | | string sql = sql1 + sWhere + "order by hmainid desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldScrapOutHouseBillList"); |
| | | } |
| | | } |
| | |
| | | try |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Edit", 1, true, msg4)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | public object DeltetMouldScrapOutHouseBill(string HInterID, string user) |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Delete", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | // try |
| | | // { |
| | | // //审核权限 |
| | | // if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) |
| | | // if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | |
| | | { |
| | | //flag=1 审核; flag=2 反审核 |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldScrapOutBill_Check", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldScrapOutBill_Check", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBillList", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | string sql1 = string.Format(@"select * from h_v_Sc_MouldProdBackBillList where 库存组织='" + Organization + "'"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 日期 desc", "h_v_Sc_MouldProdBackBillList"); |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by hmainid desc", "h_v_Sc_MouldProdBackBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + "order by 日期 desc"; |
| | | string sql = sql1 + sWhere + "order by hmainid desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList"); |
| | | } |
| | | |
| | |
| | | { |
| | | ds = oCN.RunProcReturn(string.Format(@"SELECT HMaterID,模具代码 HMaterCode,模具名称 HMaterName,规格型号 HMaterSpec,批次 HBatchNo, |
| | | 设计寿命 HDesignLife, 剩余寿命 HLeaveLife, 累积使用寿命 HUseLife, 应发数量 HQtyMust, 实发数量 HQty, |
| | | 单价 HPrice, 金额 HMoney,HWHSonID HWHID, 发料仓库代码 HWHCode, 发料仓库 HWHName,HSPID, |
| | | 单价 HPrice, 金额 HMoney,收料仓库ID HWHID, 收料仓库代码 HWHCode, 收料仓库 HWHName,HSPID, |
| | | 仓位代码 HSPCode, 仓位 HSPName,表体备注 HRemark,HStockOrgID,HUnitID,计量单位代码,计量单位 FROM h_v_Sc_MouldProdBackBillList"), "h_v_Sc_MouldProdBackBillList"); |
| | | |
| | | } |
| | |
| | | //string sql1 = "select HRepairCheckID,HRepairCheckContent,HManagerID,HRemark from Sc_MouldRepairCheckBillSub where 1 = 1 "; |
| | | string sql1 = string.Format(@"SELECT HMaterID,模具代码 HMaterCode,模具名称 HMaterName,规格型号 HMaterSpec,批次 HBatchNo, |
| | | 设计寿命 HDesignLife, 剩余寿命 HLeaveLife, 累积使用寿命 HUseLife, 应发数量 HQtyMust, 实发数量 HQty, |
| | | 单价 HPrice, 金额 HMoney,HWHSonID HWHID, 发料仓库代码 HWHCode, 发料仓库 HWHName,HSPID, |
| | | 单价 HPrice, 金额 HMoney,收料仓库ID HWHID, 收料仓库代码 HWHCode, 收料仓库 HWHName,HSPID, |
| | | 仓位代码 HSPCode, 仓位 HSPName,表体备注 HRemark,HStockOrgID,HUnitID,计量单位代码,计量单位 FROM h_v_Sc_MouldProdBackBillList where 1 = 1 "); |
| | | string sql = sql1 + sqlWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList"); |
| | |
| | | } |
| | | //查汇总 |
| | | ds1 = oCN.RunProcReturn(string.Format(@"select 物料代码,max(物料名称)物料名称,规格型号,max(单据号)单据号,批次,sum(实发数量)实发数量, |
| | | HWHSonID,max(发料仓库代码)发料仓库代码,max(发料仓库)发料仓库,表体备注 from h_v_Sc_MouldProdBackBillList |
| | | where 1=1 " + sqlWhere + " group by 物料代码,规格型号,HWHSonID,批次,表体备注"), "h_v_Sc_MouldProdBackBillList"); |
| | | 收料仓库ID,max(收料仓库代码)收料仓库代码,max(收料仓库)收料仓库,表体备注 from h_v_Sc_MouldProdBackBillList |
| | | where 1=1 " + sqlWhere + " group by 物料代码,规格型号,收料仓库ID,批次,表体备注"), "h_v_Sc_MouldProdBackBillList"); |
| | | |
| | | list.Add(ds.Tables[0]); |
| | | list.Add(ds1.Tables[0]); |
| | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Edit", 1, true, msg4)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | public object DeltetMouldProdBackBill(string HInterID, string user) |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Delete", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | { |
| | | //flag=1 审核; flag=2 反审核 |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdBackBill_Check", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdBackBill_Check", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBillList", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | 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 hmainid desc", "h_v_Sc_MouldProdOutHouseBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + "order by 日期 desc"; |
| | | string sql = sql1 + sWhere + "order by hmainid desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdOutHouseBillList"); |
| | | } |
| | | |
| | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Edit", 1, true, msg4)) |
| | | //模块名,写入日志,报错框,用户名 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | //判断用户权限 |
| | | #region |
| | | [Route("Sc_MouldProdOutBill/QueryUserRight")] |
| | | [HttpPost] |
| | | public object QueryUserRight(string UserName) |
| | | { |
| | | try |
| | | { |
| | | //模块名,写入日志,报错框,用户名 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Edit", 1, false, UserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有查询权限"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "有权限"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch(Exception e1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有查询权限," + e1.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region [模具处理领用单删除功能] |
| | | /// <summary> |
| | | /// 模具处理领用单删除功能 |
| | |
| | | public object DeltetMouldProdOutBill(string HInterID, string user) |
| | | { |
| | | //删除权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Delete", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | [Route("Sc_MouldProdOutBill/AuditMouldProdOutBill")] |
| | | [HttpGet] |
| | | public object AuditMouldProdOutBill(string HInterID, string user, int flag) |
| | | { |
| | | //flag=1 审核; flag=2 反审核 |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdOutBill_Check", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Check", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | |
| | | [Route("Sc_MouldLifeChangeBill/GetMouldLifeChangeBill")] |
| | | [HttpGet] |
| | | public object GetMouldLifeChangeBill(string sWhere) |
| | | public object GetMouldLifeChangeBill(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Sc_GetMouldLifeChangeBill(sWhere); |
| | | objJsonResult.code = "1"; |
| | |
| | | { |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldLifeChangeBillList order by 日期 desc", "h_v_Sc_MouldLifeChangeBillList"); |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldLifeChangeBillList order by hmainid desc", "h_v_Sc_MouldLifeChangeBillList"); |
| | | } |
| | | 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 hmainid desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldLifeChangeBillList"); |
| | | } |
| | | |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DLL.ClsSc_MouldLifeChangeBill oBill = new DLL.ClsSc_MouldLifeChangeBill(); |
| | | List<Model.ClsSc_MouldLifeChangeBillMain> lsmain = new List<Model.ClsSc_MouldLifeChangeBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldLifeChangeBill/DeltetMouldLifeChangeBill")] |
| | | [HttpGet] |
| | | public object DeltetMouldLifeChangeBill(string HInterID) |
| | | public object DeltetMouldLifeChangeBill(string HInterID,string user) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "无删除权限!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | Int64 lngBillKey = 0; |