| | |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckItem", 1, false, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckItem_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | DAL.ClsGy_QCCheckItem_View oDeptHlp = new DAL.ClsGy_QCCheckItem_View(); |
| | | try |
| | | { |
| | | //夿æ¯å¦æå 餿é |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, false, User)) |
| | | { |
| | | objJsonResult.code = "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 msg4 = sArray[2].ToString();//ç¨æ·å |
| | | string msg5 = sArray[3].ToString(); |
| | | |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log(msg5, 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //ååºåå |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | |
| | | string HRemark = list[0].HRemark; |
| | | bool HStopflag = list[0].HStopflag; |
| | | bool HUseFlag = list[0].HUseFlag; |
| | | |
| | | |
| | | //夿æé |
| | | if (!ClsPub.Security_Log(msg5, 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber)) |
| | | { |
| | |
| | | //var HProcID = ""; |
| | | |
| | | //夿æé |
| | | if (!ClsPub.Security_Log(msg5, 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if (!ClsPub.Security_Log(msg5, 1, false, msg4)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ ä¿åæé"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | //if (!DBUtility.ClsPub.AllowNumber(HNumber)) |
| | | //{ |
| | |
| | | long HProcID = list[0].HProcID; |
| | | |
| | | //夿æé |
| | | if (!ClsPub.Security_Log("Gy_Process_Edit", 1, false, msg3)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ²¡ææ¾å°è¯¥åè½æ¨¡åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //if (!ClsPub.Security_Log("Gy_Process_Edit", 1, false, msg3)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ²¡ææ¾å°è¯¥åè½æ¨¡åï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | //if (!DBUtility.ClsPub.AllowNumber(HNumber)) |
| | | //{ |
| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | #region æ£éªé¡¹ç®åè¡¨æ°æ® |
| | | #region æ£éªé¡¹ç®åç±»åè¡¨æ°æ® |
| | | /// <summary> |
| | | /// è¿åæ£éªé¡¹ç®å表 |
| | | ///åæ°ï¼string sqlã |
| | |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckItem", 1, false, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckClass_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | DAL.ClsGy_QCCheckClass_View oDeptHlp = new DAL.ClsGy_QCCheckClass_View(); |
| | | try |
| | | { |
| | | //夿æ¯å¦æå 餿é |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, false, User)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (oDeptHlp.GetInfoByID(HItemID)) |
| | | { |
| | | if (oDept.HavChildCodes(HItemID)) |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string msg4 = sArray[2].ToString(); |
| | | string msg5 = sArray[3].ToString(); |
| | | string msg4 = sArray[2].ToString();//ç¨æ·å |
| | | string msg5 = sArray[3].ToString();//ä¿®æ¹æ¨¡ååç§° |
| | | |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log(msg5, 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //ååºåå |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | |
| | | string HRemark = list[0].HRemark; |
| | | string HStopflag = list[0].HStopflag; |
| | | string HUseFlag = list[0].HUseFlag; |
| | | |
| | | |
| | | //夿æé |
| | | if (!ClsPub.Security_Log(msg5, 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber)) |
| | | { |
| | |
| | | /// <returns></returns> |
| | | [Route("QC_Management/MES_QC_CheckProjectList_Json")] |
| | | [HttpGet] |
| | | public object MES_QC_CheckProjectList_Json(string sWhere) |
| | | public object MES_QC_CheckProjectList_Json(string sWhere,string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckProject_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥è¯¢æé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | |
| | | /// <returns></returns> |
| | | [Route("QC_Management/MES_QC_FirstPieceCheckBillList_Json")] |
| | | [HttpGet] |
| | | public object MES_QC_FirstPieceCheckBillList_Json(string sqlWhere) |
| | | public object MES_QC_FirstPieceCheckBillList_Json(string sqlWhere,string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_FirstPieceCheckBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sqlWhere == null || sqlWhere.Equals("")) |
| | | { |
| | |
| | | /// <returns></returns> |
| | | [Route("QC_Management/MES_QC_PatrolProcCheckBillList_Json")] |
| | | [HttpGet] |
| | | public object MES_QC_PatrolProcCheckBillList_Json(string sqlWhere) |
| | | public object MES_QC_PatrolProcCheckBillList_Json(string sqlWhere,string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_PatrolProcCheckBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sqlWhere == null || sqlWhere.Equals("")) |
| | | { |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string user = sArray[2].ToString();//ç¨æ·å |
| | | |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckProject_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ç¼è¾æé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #region æ¥ææ£éª |
| | | /// <summary> |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetQC_FirstPieceCheck")] |
| | | [HttpGet] |
| | | public object DeltetQC_FirstPieceCheck(string HInterID) |
| | | public object DeltetQC_FirstPieceCheck(string HInterID,string user) |
| | | { |
| | | DataSet ds; |
| | | //string ModRightNameCheck = "Sc_ProcessReport_check"; |
| | | string ModRightNameCheck = "QC_FirstPieceCheckBill_Delete"; |
| | | try |
| | | { |
| | | //å 餿é |
| | | //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (string.IsNullOrWhiteSpace(HInterID)) |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string user = sArray[2].ToString(); |
| | | |
| | | |
| | | string UserName = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_PatrolProcCheckBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | WebAPI.DLL.ClsQC_PatrolProcCheckBill oBill = new WebAPI.DLL.ClsQC_PatrolProcCheckBill(); |
| | | List<Model.ClsQC_PatrolProcCheckBillMain> lsmain = new List<Model.ClsQC_PatrolProcCheckBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetQC_PatrolProcCheck")] |
| | | [HttpGet] |
| | | public object DeltetQC_PatrolProcCheck(string HInterID) |
| | | public object DeltetQC_PatrolProcCheck(string HInterID,string user) |
| | | { |
| | | DataSet ds; |
| | | //string ModRightNameCheck = "Sc_ProcessReport_check"; |
| | | string ModRightNameCheck = "QC_PatrolProcCheckBill_Delete"; |
| | | try |
| | | { |
| | | //å 餿é |
| | | //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (string.IsNullOrWhiteSpace(HInterID)) |
| | |
| | | |
| | | /// <summary> |
| | | /// è¿åå表 |
| | | /// æ¥æå
¥åºæ£éªå |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("QC_POStockInCheckBill/GetPOStockInCheckBill")] |
| | | [Route("QC_POStockInCheckBill/GetPOStockInCheckBill")] |
| | | [HttpGet] |
| | | public object GetPOStockInCheckBill(string sWhere) |
| | | public object GetPOStockInCheckBill(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = QC_POStockInCheckBill(sWhere); |
| | | objJsonResult.code = "1"; |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string user = sArray[2].ToString(); |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<QC_POStockInCheckBill> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<QC_POStockInCheckBill>>(msg2); |
| | | int HYear = 2021; |
| | |
| | | /// <returns></returns> |
| | | [Route("QC_POStockInCheckBill/DeltetPOStockInCheckBill")] |
| | | [HttpGet] |
| | | public object DeltetPOStockInCheckBill(string HInterID) |
| | | public object DeltetPOStockInCheckBill(string HInterID,string user) |
| | | { |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete From QC_POStockInCheckBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From QC_POStockInCheckBillSub where HInterID = " + HInterID); |
| | |
| | | [HttpGet] |
| | | public object EquipAuditBill(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | // string ModRightNameCheck = ""; 该模åçå®¡æ ¸åè½ |
| | | string ModRightNameCheck = "Sb_EquipRepairSendWorkBill_Check"; //该模åçå®¡æ ¸åè½ |
| | | DBUtility.ClsPub.CurUserName = CurUserName;//åå¨ç¨æ·å |
| | | try |
| | | { |
| | | ////夿æ¯å¦æå®¡æ ¸æé |
| | | // if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (HInterID <= 0) |
| | | { |
| | |
| | | |
| | | /// <summary> |
| | | /// æ°å¢åæ®-ä¿åæé® |
| | | /// 产åå
¥åºæ£éªåå表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string user = sArray[2].ToString(); |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<QC_LastPieceCheckBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<QC_LastPieceCheckBillMain>>(msg2); |
| | | string BillType = "7507"; |
| | |
| | | } |
| | | /// <summary> |
| | | ///å é¤åè½ |
| | | ///产åå
¥åºæ£éªå |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("QC_LastPieceCheckBill/DeltetLastPieceCheckBill")] |
| | | [HttpGet] |
| | | public object DeltetLastPieceCheckBill(string HInterID) |
| | | public object DeltetLastPieceCheckBill(string HInterID,string user) |
| | | { |
| | | try |
| | | { |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete From QC_LastPieceCheckBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From QC_LastPieceCheckBillSub where HInterID = " + HInterID); |
| | |
| | | /// </summary> |
| | | [Route("QC_LastPieceCheckBill/GetLastPieceCheckBillList")] |
| | | [HttpGet] |
| | | public object GetLastPieceCheckBillList(string sWhere) |
| | | public object GetLastPieceCheckBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_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_QC_LastPieceCheckBillListDetail order by hmainid desc ", "h_v_QC_LastPieceCheckBillListDetail"); |
| | |
| | | /// </summary> |
| | | [Route("QC_OutCompCheckBill/GetOutCompCheckBillList")] |
| | | [HttpGet] |
| | | public object GetOutCompCheckBillList(string sWhere) |
| | | public object GetOutCompCheckBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_OutCompCheckBill_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_QC_OutCompCheckBillList order by hmainid desc ", "h_v_QC_OutCompCheckBillList"); |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string user = sArray[2].ToString(); |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_OutCompCheckBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<QC_OutCompCheckBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<QC_OutCompCheckBillMain>>(msg2); |
| | | int HYear = 2021; |
| | |
| | | /// <returns></returns> |
| | | [Route("QC_OutCompCheckBill/DeltetOutCompCheckBill")] |
| | | [HttpGet] |
| | | public object DeltetOutCompCheckBill(string HInterID) |
| | | public object DeltetOutCompCheckBill(string HInterID,string user) |
| | | { |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_OutCompCheckBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete From QC_OutCompCheckBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From QC_OutCompCheckBillSub where HInterID = " + HInterID); |
| | |
| | | string UserName = sArray[1].ToString(); |
| | | string refSav = sArray[2].ToString(); |
| | | DBUtility.ClsPub.CurUserName = UserName; |
| | | |
| | | //ä¿åæé |
| | | if (!DBUtility.ClsPub.Security_Log_second("OA_ErrMsgBackBill_Edit", 1, false, DBUtility.ClsPub.CurUserName)) |
| | | { |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | |
| | | { |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("OA_ErrMsgBackBill_Query", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Get_TransFerBillList(sWhere); |
| | | if (ds == null) |
| | | { |
| | |
| | | int pageSize = limit; |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | sWhere = " where 1=1 order by hmainid desc "; |
| | | sWhere = " where 1=1 "; |
| | | } |
| | | else |
| | | { |
| | | sWhere = " where 1=1" + sWhere+ " order by hmainid desc "; |
| | | sWhere = " where 1=1" + sWhere; |
| | | } |
| | | |
| | | DataSet ds0 = oCn.RunProcReturn("select count(*) CountNum from h_v_PackUnionBillList "+sWhere+"", "h_v_PackUnionBillList"); |
| | | count = int.Parse(ds0.Tables[0].Rows[0]["CountNum"].ToString()); |
| | | //string sql = string.Format(@"select top " + pageSize + " hmainid,æ¥æ,åæ®å·,ç®±å·æ¡å½¢ç ,åé,æ¯é,ç®é,ç产ç»ç»,é¨é¨,æä½å,å®¢æ·æ ç¾å·,ç©æä»£ç ,ç©æåç§°,计éåä½ä»£ç ,计éåä½åç§°,æ°é,å¶å人,å¶åæ¥æ from(select row_number() over (order by hmainid desc) as RowNumber,hmainid,æ¥æ,åæ®å·,ç®±å·æ¡å½¢ç ,åé,æ¯é,ç®é,ç产ç»ç»,é¨é¨,æä½å,å®¢æ·æ ç¾å·,ç©æä»£ç ,ç©æåç§°,计éåä½ä»£ç ,计éåä½åç§°,æ°é,å¶å人,å¶åæ¥æ from h_v_PackUnionBillList " + sWhere + ") as A where RowNumber >" + pageSize + " *(" + pageNum + "-1)"); |
| | | string sql = string.Format(@"select hmainid,æ¥æ,åæ®å·,ç®±å·æ¡å½¢ç ,æ¡ç ,åé,æ¯é,ç®é,ç产ç»ç»,é¨é¨,æä½å,å®¢æ·æ ç¾å·,ç©æä»£ç ,ç©æåç§°,计éåä½ä»£ç ,计éåä½åç§°,æ°é,å¶å人,å¶åæ¥æ from h_v_PackUnionBillList " + sWhere + " order by hmainid offset ((" + pageNum + "-1)*" + pageSize + ") rows fetch next " + pageSize + " rows only"); |
| | | string sql = string.Format(@"select hmainid,æ¥æ,åæ®å·,ç®±å·æ¡å½¢ç ,æ¡ç ,åé,æ¯é,ç®é,ç产ç»ç»,é¨é¨,æä½å,å®¢æ·æ ç¾å·,ç©æä»£ç ,ç©æåç§°,计éåä½ä»£ç ,计éåä½åç§°,æ°é,å¶å人,å¶åæ¥æ from h_v_PackUnionBillList " + sWhere + " order by hmainid desc offset ((" + pageNum + "-1)*" + pageSize + ") rows fetch next " + pageSize + " rows only"); |
| | | ds = new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_PackUnionBillList"); |
| | | string aa = ds.Tables[0].Columns[0].ToString(); |
| | | |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_ProcessMangement/MES_QC_NoPassProdCheckBill_Json")] |
| | | [HttpGet] |
| | | public object MES_QC_NoPassProdCheckBill_Json(string sWhere) |
| | | public object MES_QC_NoPassProdCheckBill_Json(string sWhere,string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_NoPassProdCheckBillQuery", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | |
| | | } |
| | | return GetObjectJson(ds); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¸åæ ¼è¯å®¡ å é¤ |
| | | /// </summary> |
| | | /// <param name="HInterID"></param> |
| | | /// <param name="user"></param> |
| | | /// <returns></returns> |
| | | [Route("Sc_ProcessMangement/ProcessMangementDeleteBill")] |
| | | [HttpGet] |
| | | public object ProcessMangementDeleteBill(string HInterID, string user) |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("QC_NoPassProdCheckBill_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéå é¤"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_QC_NoPassProdCheckBillList where hmainid =" + HInterID + " ", "h_v_QC_NoPassProdCheckBillList"); |
| | | |
| | | if (ds.Tables[0].Rows[0]["å®¡æ ¸äºº"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·²å®¡æ ¸,ä¸è½å é¤!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete from QC_NoPassProdCheckBillMain where HInterID=" + HInterID); |
| | | oCN.RunProc("Delete from QC_NoPassProdCheckBillSub where HInterID=" + HInterID); |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿å!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥!"+e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #region ä¸åæ ¼è¯å®¡ å®¡æ ¸/åå®¡æ ¸ |
| | | [Route("Sc_ProcessMangement/AuditProcessMangement")] |
| | | [HttpGet] |
| | | public object AuditProcessMangement(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "QC_NoPassProdCheckBill_Check"; //该模åçå®¡æ ¸åè½ |
| | | DBUtility.ClsPub.CurUserName = CurUserName;//åå¨ç¨æ·å |
| | | try |
| | | { |
| | | ////夿æ¯å¦æå®¡æ ¸æé |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (HInterID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "IDå°äº0"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | Int64 lngBillKey = 0; |
| | | lngBillKey = DBUtility.ClsPub.isLong(HInterID);//æ°æ®è½¬æ¢ |
| | | |
| | | //æ¥è¯¢å®¡æ ¸çæ°æ® |
| | | ds = oCN.RunProcReturn("select * from QC_NoPassProdCheckBillMain where HInterID='" + HInterID + "'", "QC_NoPassProdCheckBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | var hcloseman = ds.Tables[0].Rows[0]["HCloseMan"].ToString();//å
³é人 |
| | | var hdeleteman = ds.Tables[0].Rows[0]["HDeleteMan"].ToString();//ä½åºäºº |
| | | var hchecker = ds.Tables[0].Rows[0]["HChecker"].ToString();//å®¡æ ¸äºº |
| | | |
| | | if (hcloseman != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½å忮已å
³é,æ æ³å®¡æ ¸!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (hdeleteman != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½å忮已ä½åº,æ æ³å®¡æ ¸!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //IsAudit==0 å®¡æ ¸ |
| | | if (IsAudit == 1) |
| | | { |
| | | if (hchecker != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½ååæ®å·²å®¡æ ¸,æ æ³åæ¬¡å®¡æ ¸!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //IsAudit==1 åå®¡æ ¸ |
| | | if (IsAudit == 2) |
| | | { |
| | | if (hchecker == "") |
| | | { |
| | | 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 (IsAudit == 1) |
| | | { |
| | | oCN.RunProc(" Update QC_NoPassProdCheckBillMain set HChecker='" + CurUserName + "',HCheckDate='" + DateTime.Now + "',HBillStatus=2 Where HBillType='7509' and HInterID=" + HInterID); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åå®¡æ ¸æäº¤ |
| | | if (IsAudit == 2) |
| | | { |
| | | oCN.RunProc(" Update QC_NoPassProdCheckBillMain set HChecker='',HCheckDate=null,HBillStatus=0 Where HBillType='7509' and HInterID=" + HInterID); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "åå®¡æ ¸æå!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥æåå®¡æ ¸å¤±è´¥" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// PDAå·¥åºæ±æ¥åä¿å |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string user = sArray[2].ToString(); |
| | | |
| | | |
| | | string UserName=""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_NoPassProdCheckBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DLL.ClsQC_NoPassProdCheckBill oBill = new DLL.ClsQC_NoPassProdCheckBill(); |
| | | List<Model.ClsQC_NoPassProdCheckBillMain> lsmain = new List<Model.ClsQC_NoPassProdCheckBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string OperationType = sArray[2].ToString().Trim(); |
| | | string user = sArray[3].ToString();//ç¨æ·å |
| | | |
| | | bool bResult; |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_ProcessCheckBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<Model.ClsQC_ProcessCheckBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_ProcessCheckBillMain>>(msg2); |
| | | DAL.ClsQC_ProcessCheckBill BillNew = new DAL.ClsQC_ProcessCheckBill(); |
| | |
| | | /// </summary> |
| | | [Route("QC_ProcessCheckBill/Delete_Json")] |
| | | [HttpGet] |
| | | public object Delete_Json(long HItemID) |
| | | public object Delete_Json(long HItemID,string user) |
| | | { |
| | | DAL.ClsQC_ProcessCheckBill BillOld = new DAL.ClsQC_ProcessCheckBill(); |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_ProcessCheckBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (BillOld.DeleteBill(HItemID, ref ClsPub.sExeReturnInfo) != true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | |
| | | /// </summary> |
| | | [Route("QC_ProcessCheckBill/GetProcessCheckBillList")] |
| | | [HttpGet] |
| | | public object GetProcessCheckBillList(string sWhere) |
| | | public object GetProcessCheckBillList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_ProcessCheckBill_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_QC_ProcessCheckBillListDetail order by hmainid desc ", "h_v_QC_ProcessCheckBillListDetail"); |
| | |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string OperationType = sArray[2].ToString().Trim(); |
| | | string user = sArray[3].ToString(); |
| | | bool bResult; |
| | | try |
| | | { |
| | | //夿æé |
| | | if (!DBUtility.ClsPub.Security_Log("QC_FirstPieceCheckBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæé"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<Model.ClsQC_FirstPieceCheckBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillMain>>(msg2); |
| | | DAL.ClsQC_FirstPieceCheckBill BillNew = new DAL.ClsQC_FirstPieceCheckBill(); |