| | |
| | | string OperationType = sArray[2].ToString();//类型 |
| | | string HComputerName = SystemInformation.ComputerName; //设备名称 |
| | | |
| | | //判断是否有编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Edit", 1, false, user)) |
| | | if (OperationType == "5") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无编辑权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | //判断是否有编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "完工单无编辑权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else { |
| | | //判断是否有编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "出站单无编辑权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | Stopwatch sw = new Stopwatch(); |
| | | sw.Start();//开始计时 |
| | |
| | | //递入物料信息 返回未完全汇报的流转卡 |
| | | [Route("LEMS/Sc_StationOutBill_Mul_RYQ")] |
| | | [HttpGet] |
| | | public object Sc_StationOutBill_Mul_RYQ(String HMaterName, Int64 HOrgID) |
| | | public object Sc_StationOutBill_Mul_RYQ(String HMaterName,string HProcNumber, Int64 HOrgID) |
| | | { |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds = oCN.RunProcReturn("exec h_p_CJGXPLHB_Query '" + HMaterName + "'," + HOrgID + "", "h_p_CJGXPLHB_Query"); |
| | | DataSet ds = oCN.RunProcReturn("exec h_p_CJGXPLHB_Query '" + HMaterName + "'," + HOrgID + ",'"+ HProcNumber + "'", "h_p_CJGXPLHB_Query"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | |
| | | #region 返回工序出站汇报单列表 |
| | | [Route("Cj_StationOutBill/get_Display")] |
| | | [HttpGet] |
| | | public object get_Display(string sWhere,string user) |
| | | public object get_Display(string sWhere,string user,string HBillSubType) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user)) |
| | | if (HBillSubType == "SUB") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "完工单无查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else { |
| | | //判断是否有查询权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "出站单无查询权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | //获取系统参数 |
| | | string Ret = ""; |
| | |
| | | #region 根据id删除出站单 |
| | | [Route("Cj_StationOutBill/del_StationOutBill")] |
| | | [HttpGet] |
| | | public object del_StationOutBill(long HInterID, string HDeleteMan) |
| | | public object del_StationOutBill(long HInterID, string HDeleteMan,string HBillSubType) |
| | | { |
| | | try |
| | | { |
| | | string HComputerName = SystemInformation.ComputerName; //设备名称 |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Drop", 1, false, HDeleteMan)) |
| | | if (HBillSubType == "SUB") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Drop", 1, false, HDeleteMan)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "完工单无权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Drop", 1, false, HDeleteMan)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "出站单无权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | DAL.ClsSc_StationOutBill oBill = new DAL.ClsSc_StationOutBill(); |
| | | if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | { |
| | |
| | | #region 审核 |
| | | [Route("Cj_StationOutBill/set_CheckBill")] |
| | | [HttpGet] |
| | | public object set_CheckBill(string HInterID, string CurUserName) |
| | | public object set_CheckBill(string HInterID, string CurUserName,string HBillSubType) |
| | | { |
| | | try |
| | | { |
| | | string ModRightNameCheck = "Cj_StationOutBill_Check"; |
| | | ////审核权限 |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | if (HBillSubType == "SUB") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "审核失败!无权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | ////审核权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Check", 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "完工单审核失败!无权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { ////审核权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Check", 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "出站单审核失败!无权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | var HBillNo = HInterID.Split(','); |
| | | DAL.ClsSc_StationOutBill oBill = new DAL.ClsSc_StationOutBill(); |
| | | |
| | |
| | | #region 反审核 |
| | | [Route("Cj_StationOutBill/set_AbandonCheck")] |
| | | [HttpGet] |
| | | public object set_AbandonCheck(string HInterID, string CurUserName) |
| | | public object set_AbandonCheck(string HInterID, string CurUserName,string HBillSubType) |
| | | { |
| | | try |
| | | { |
| | | string ModRightNameCheck = "Cj_StationOutBill_Check"; |
| | | ////审核权限 |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | if (HBillSubType == "SUB") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "反审核失败!无权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | ////审核权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Check", 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "完工单反审核失败!无权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | ////审核权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Check", 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "出站单反审核失败!无权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | var HBillNo = HInterID.Split(','); |
| | | DAL.ClsSc_StationOutBill oBill = new DAL.ClsSc_StationOutBill(); |
| | |
| | | #region 工序出站关闭/反关闭功能 |
| | | [Route("Cj_StationOutBill/CloseCj_StationOutBill")] |
| | | [HttpGet] |
| | | public object CloseCj_StationOutBill(string HInterID, int Type, string user) |
| | | public object CloseCj_StationOutBill(string HInterID, int Type, string user,string HBillSubType) |
| | | { |
| | | try |
| | | { |
| | | //判断是否有删除权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Close", 1, false, user)) |
| | | if (HBillSubType == "SUB") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无权限关闭!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | //判断是否有删除权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Close", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "完工单无权限关闭!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else { |
| | | //判断是否有删除权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Close", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "出站单无权限关闭!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | if (string.IsNullOrWhiteSpace(HInterID)) |
| | | { |