| | |
| | | /// </summary> |
| | | [Route("Gy_Group/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere) |
| | | public object list(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Group_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_GroupList " + sWhere, "h_v_GroupList"); |
| | |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | //string msg3 = sArray[1].ToString(); |
| | | string user = sArray[1].ToString();//ç¨æ·å |
| | | //string msg4 = sArray[2].ToString(); |
| | | //string msg5 = sArray[3].ToString(); |
| | | |
| | | //夿æ¯å¦æç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ç¼è¾æé!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //ååºåå |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<Gy_Group> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_Group>>(msg2); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_Group")] |
| | | [HttpGet] |
| | | public object DeltetGy_Group(string HItemID) |
| | | public object DeltetGy_Group(string HItemID,string user) |
| | | { |
| | | DataSet ds; |
| | | DataSet ds1; |
| | | //string ModRightNameCheck = "Sc_ProcessReport_check"; |
| | | string ModRightNameCheck = "Gy_Group_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(HItemID)) |
| | |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString();//ç¨æ·å |
| | | |
| | | //夿æ¯å¦æç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Process_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéç¼è¾!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //string msg3 = sArray[1].ToString(); |
| | | //string msg4 = sArray[2].ToString(); |
| | | //string msg5 = sArray[3].ToString(); |
| | |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HDeptID,HBarCodeForBase,HProcessID_K3,HBillSubType,HAutoTrunFlag" + |
| | | ",HFixPrice,HOverFixPrice,HProcMulID,HProcCheckNote) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() + |
| | | "," + Convert.ToString(HTypeFlow ? 1 : 0) + "," + Convert.ToString(HTypeCount ? 1 : 0) + ",'" + HDeptNumber + "'," + HSNo.ToString() + |
| | | "," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'," + HDeptID + |
| | | "," + Convert.ToString(HTypeFlow ? 1 : 0) + "," + Convert.ToString(HTypeCount ? 1 : 0) + ",'" + HDeptNumber + "','" + HSNo.ToString() + |
| | | "'," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'," + HDeptID + |
| | | ",'" + HBarCode + "'," + HProcessID_K3 + ",'" +HBillSubType + "'," + Convert.ToString(HAutoTrunFlag ? 1 : 0) + |
| | | "," + HFixPrice.ToString() + "," + HOverFixPrice.ToString() + "," + HProcMulID.ToString() + ",'" + HProcCheckNote.ToString() + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | ",'" + HFixPrice.ToString() + "'," + HOverFixPrice.ToString() + "," + HProcMulID.ToString() + ",'" + HProcCheckNote.ToString() + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.RunProc("Update Gy_Process set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.Commit(); |
| | |
| | | /// </summary> |
| | | [Route("Gy_Process/list")] |
| | | [HttpGet] |
| | | public object getProcessList(string sWhere) |
| | | public object getProcessList(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Process_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_Gy_ProcessList " + sWhere, "h_v_Gy_ProcessList"); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_Process")] |
| | | [HttpGet] |
| | | public object DeltetGy_Process(string HItemID) |
| | | public object DeltetGy_Process(string HItemID,string user) |
| | | { |
| | | DataSet ds; |
| | | DataSet ds1; |
| | | //string ModRightNameCheck = "Sc_ProcessReport_check"; |
| | | string ModRightNameCheck = "Gy_Process_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(HItemID)) |
| | |
| | | /// </summary> |
| | | [Route("Gy_Source/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere) |
| | | public object list(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Source_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_SourceList where 1=1 ", "h_v_IF_SourceList"); |
| | |
| | | { |
| | | DataSet ds; |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | //string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string[] sArray = _value.ToString().Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg1 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | //string msg2 = sArray[0].ToString(); |
| | | //string msg3 = sArray[1].ToString(); |
| | | |
| | | //夿æ¯å¦æç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Source_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéç¼è¾!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | Int64 HItemID = 0; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | //è·åæå¤§IDå¼èµå¼ |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_Source")] |
| | | [HttpGet] |
| | | public object DeltetGy_Source(string HItemID) |
| | | public object DeltetGy_Source(string HItemID,string user) |
| | | { |
| | | DataSet ds; |
| | | //string ModRightNameCheck = "Sc_ProcessReport_check"; |
| | | string ModRightNameCheck = "Gy_Source_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(HItemID)) |
| | |
| | | /// </summary> |
| | | [Route("Gy_WorkCenter/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere) |
| | | public object list(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_WorkCenter_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_WorkCenterList " + sWhere, "h_v_WorkCenterList"); |
| | |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | //string msg3 = sArray[1].ToString(); |
| | | string user = sArray[1].ToString(); |
| | | //string msg4 = sArray[2].ToString(); |
| | | //string msg5 = sArray[3].ToString(); |
| | | |
| | | //夿æ¯å¦æç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_WorkCenter_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ç¼è¾æé!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //ååºåå |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<Gy_WorkCenter> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_WorkCenter>>(msg2); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_WorkCenter")] |
| | | [HttpGet] |
| | | public object DeltetGy_WorkCenter(string HItemID) |
| | | public object DeltetGy_WorkCenter(string HItemID,string user) |
| | | { |
| | | DataSet ds; |
| | | DataSet ds1; |
| | | //string ModRightNameCheck = "Sc_ProcessReport_check"; |
| | | string ModRightNameCheck = "Gy_WorkCenter_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(HItemID)) |
| | |
| | | |
| | | int hentryid = int.Parse(sArray[2].ToString());//å表ç顺åºid |
| | | int OperationType = int.Parse(sArray[3].ToString());//æ°æ®ç±»å 1æ·»å 3ä¿®æ¹ |
| | | string user = sArray[4].ToString();//ç¨æ·å |
| | | try |
| | | { |
| | | //夿æ¯å¦æç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéç¼è¾!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<Gy_RoutingBill> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_RoutingBill>>(msg2); |
| | | string BillType = "3301"; |
| | |
| | | /// </summary> |
| | | [Route("LEMS/MES_Gy_RoutingBillList_Json")] |
| | | [HttpGet] |
| | | public object MES_Gy_RoutingBillList_Json(string sWhere) |
| | | public object MES_Gy_RoutingBillList_Json(string sWhere,string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | //if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_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("LEMS/DeltetGy_RoutingBillSub")] |
| | | [HttpGet] |
| | | public object DeltetGy_RoutingBillSub(Int64 lngBillKey) |
| | | public object DeltetGy_RoutingBillSub(Int64 lngBillKey,string user) |
| | | { |
| | | DataSet ds; |
| | | //string ModRightNameCheck = "Sc_ProcessReport_check"; |
| | | string ModRightNameCheck = "Gy_RoutingBill_Drop"; |
| | | 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 (lngBillKey == 0) |
| | |
| | | /// </summary> |
| | | [Route("LEMS/MES_IF_ICMOBillList_Json")] |
| | | [HttpGet] |
| | | public object MES_IF_ICMOBillList_Json(string sWhere) |
| | | public object MES_IF_ICMOBillList_Json(string sWhere,string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_ICMOBillQuery", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéæ¥è¯¢!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where 1 = 1 " + sWhere + " order by hmainid desc", "h_v_IF_ICMOBillList"); |
| | | } |
| | | catch (Exception e) |
| | |
| | | /// </summary> |
| | | [Route("Sc_ICMOReportBill/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere) |
| | | public object list(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_ICMOReportBillQuery", 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_ICMOReportBillList_Edit " + sWhere, "h_v_IF_ICMOReportBillList_Edit"); |
| | |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string refSav = sArray[2].ToString(); |
| | | string user = sArray[3].ToString(); |
| | | |
| | | string UserName = ""; |
| | | string s = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | //夿æ¯å¦æç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_ICMOReportBill_Edit", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéç¼è¾!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DLL.ClsSc_ICMOReportBill oBill = new DLL.ClsSc_ICMOReportBill(); |
| | | List<Models.ClsSc_ICMOReportBillMain> lsmain = new List<Models.ClsSc_ICMOReportBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_ICMOReportBill/DeltetICMOReportBill")] |
| | | [HttpGet] |
| | | public object DeltetMouldLifeChangeBill(string HInterID) |
| | | public object DeltetMouldLifeChangeBill(string HInterID,string user) |
| | | { |
| | | //ç¼è¾æé |
| | | //if (!DBUtility.ClsPub.Security_Log_second("Sc_ICMOReportBill_Delete", 1, false, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ å 餿éï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_ICMOReportBill_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | string s = ""; |
| | | Int64 lngBillKey = 0; |
| | |
| | | /// </summary> |
| | | [Route("Sc_PPBomBill/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere) |
| | | public object list(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_PPBomBillList_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_PPBomBillList " + sWhere, "h_v_IF_PPBomBillList"); |
| | |
| | | [HttpGet] |
| | | public object DeOrAuditBill(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | // string ModRightNameCheck = ""; 该模åçå®¡æ ¸åè½ |
| | | string ModRightNameCheck = "Sc_PPBomBillList_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_second(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //夿idæ¯å¦å°äº0 |
| | | if (HInterID <= 0) |
| | |
| | | public DAL.ClsSc_PackUnionBill BillNew0 = new DAL.ClsSc_PackUnionBill(); // |
| | | public DAL.ClsSc_PackUnionBill BillOld0 = new DAL.ClsSc_PackUnionBill(); // |
| | | |
| | | |
| | | #region [ç»æåå é¤åè½] |
| | | |
| | | #region [ç»æåæ¥è¯¢åè½] |
| | | /// <summary> |
| | | /// ç»æåå é¤åè½ |
| | | /// ç»æåæ¥è¯¢åè½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Sc_PackUnionBill/Get_PackUnionBillList")] |
| | | [HttpGet] |
| | | public object Get_PackUnionBillList(int page, int limit, string sWhere) |
| | | public object Get_PackUnionBillList(int page, int limit, string sWhere,string user) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_PackUnionBill_Query",1,false,user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéæ¥è¯¢!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | int count = 0; |
| | | int pageNum = page; |
| | | int pageSize = limit; |
| | |
| | | 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 + " offset ((" + pageNum + "-1)*" + pageSize + ") rows fetch next " + pageSize + " rows only"); |
| | | string sql = string.Format(@"select hmainid,æ¥æ,åæ®å·,ç®±å·æ¡å½¢ç ,æ¡ç ,åé,æ¯é,ç®é,ç产ç»ç»,é¨é¨,æä½å,å®¢æ·æ ç¾å·,ç©æä»£ç ,ç©æåç§°,计éåä½ä»£ç ,计éåä½åç§°,æ°é,å¶å人,å¶åæ¥æ from h_v_PackUnionBillList " + sWhere + " order by hmainid 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(); |
| | | |
| | |
| | | try |
| | | { |
| | | //ç¼è¾æé |
| | | //if (!DBUtility.ClsPub.Security_Log_second("Sc_PackUnionBill", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ å 餿éï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_PackUnionBill_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | string s = ""; |
| | | Int64 lngBillKey = 0; |
| | |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦æå 餿é |
| | | if (!DBUtility.ClsPub.Security_Log("MES_ProcExchReport_Drop", 1, false, UserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéå é¤!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran(); |
| | | //å é¤å·¥åºæ±æ¥å表 |
| | | string sql1 = string.Format(@"delete Sc_ProcessReportSub where HInterID='"+HInterID+"' and HICMOInterID='" + HICMOInterID + "' and HICMOEntryID='" + HICMOEntryID + "'"); |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string refSav = sArray[1].ToString(); |
| | | string user = sArray[2].ToString();//ç¨æ·å |
| | | string s = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | //夿æ¯å¦æç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("MES_ProcExchReport_Edit",1,false,user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéç¼è¾!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DLL.ClsSc_ICMOStepBillWorkQtyStatus_Tmp oBill = new DLL.ClsSc_ICMOStepBillWorkQtyStatus_Tmp(); |
| | | List<Models.ClsSc_ICMOBillWorkQtyStatus_Tmp> lsmain = new List<Models.ClsSc_ICMOBillWorkQtyStatus_Tmp>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | #region äº§éæ±æ¥åè¡¨æ° |
| | | [Route("Sc_MESProductReportStepBill/Get_Sc_MESProductReportBillList")] |
| | | [HttpGet] |
| | | public object Get_Sc_MESProductReportBillList(string sWhere) |
| | | public object Get_Sc_MESProductReportBillList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("MES_ProcExchReport_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_ICMOBillWorkQtyStatus_Tmp " + sWhere + "order by åæ®å· desc", "h_v_IF_ICMOBillWorkQtyStatus_Tmp"); |
| | |
| | | #region è¿åçäº§è´¨éæ±æ¥åå表 |
| | | [Route("Sc_QualityReportStepBill/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere) |
| | | public object list(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_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_Sc_QualityReportBillListDetail " + sWhere, "h_v_Sc_QualityReportBillListDetail"); |
| | |
| | | #region è´¨éæ±æ¥åå表å é¤æé® |
| | | [Route("Sc_QualityReportStepBill/DeltetSc_QualityReportBill")] |
| | | [HttpGet] |
| | | public object DeltetSc_QualityReportBill(long HItemID) |
| | | public object DeltetSc_QualityReportBill(long HItemID,string user) |
| | | { |
| | | DataSet ds; |
| | | DataSet ds1; |
| | | 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("Sc_QualityReportBill_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (HItemID == 0) |
| | |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | ds = oCN.RunProcReturn("select * from Sc_QualityReportBillMain where hmainid=" + HItemID, "Sc_QualityReportBillMain"); |
| | | ds1 = oCN.RunProcReturn("select * from Sc_QualityReportBillSub where hmainid=" + HItemID, "Sc_QualityReportBillSub"); |
| | | ds = oCN.RunProcReturn("select * from Sc_QualityReportBillMain where HInterID=" + HItemID, "Sc_QualityReportBillMain"); |
| | | ds1 = oCN.RunProcReturn("select * from Sc_QualityReportBillSub where HInterID=" + HItemID, "Sc_QualityReportBillSub"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | string HUseFlag = Convert.ToString(ds.Tables[0].Rows[0]["HUseFlag"]); |
| | | if (HUseFlag == "已使ç¨") |
| | | string HBillStatus = Convert.ToString(ds.Tables[0].Rows[0]["HBillStatus"]); |
| | | if (HBillStatus == "2") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤é¡¹ç®å·²ä½¿ç¨ï¼ä¸è½å é¤ï¼"; |
| | | objJsonResult.Message = "æ¤é¡¹ç®å·²å®¡æ ¸ï¼ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.RunProc("delete from Sc_QualityReportBillMain where hmainid=" + HItemID); |
| | | oCN.RunProc("delete from Sc_QualityReportBillSub where hmainid=" + HItemID); |
| | | oCN.RunProc("delete from Sc_QualityReportBillMain where HInterID=" + HItemID); |
| | | oCN.RunProc("delete from Sc_QualityReportBillSub where HInterID=" + HItemID); |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦æç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_QualityReportBill_Edit", 1, false, HChecker)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéç¼è¾!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | bool bResult2 = false; |
| | | oCN.BeginTran(); |
| | |
| | | #region ç产任å¡åå é¤åè½ |
| | | [Route("Sc_ICMOBill/DeltetSc_ICMOReportBill")] |
| | | [HttpGet] |
| | | public object DeltetSc_ICMOReportBill(string HInterID) |
| | | public object DeltetSc_ICMOReportBill(string HInterID,string user) |
| | | { |
| | | try |
| | | { |
| | | //夿æ¯å¦æå 餿é |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_ICMOBill_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æéå é¤!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (string.IsNullOrWhiteSpace(HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |