| | |
| | | using WebAPI.Service; |
| | | using SyntacticSugar.constant; |
| | | using System.Text.RegularExpressions; |
| | | using WebAPI.Utility; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "用户" + UserName + "没有该组织权限"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | }else if (HOrgName == "华迅特种陶瓷") |
| | | { |
| | | if (DateTime.Now >= new DateTime(2026, 7, 15)) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "该用户的许可到期,请与管理员联系"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | |
| | | /// <returns></returns> |
| | | [Route("Web/GetGy_ErrMsgBackTypeList_Json")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_ErrMsgBackType_Query")] |
| | | public object GetGy_ErrMsgBackTypeList_Json(string ErrMsg) |
| | | { |
| | | sWhere = " 禁用标志 ='否'"; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_BadType")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_BadType", Operate = "_Edit")] |
| | | public object SaveGy_BadType([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_BadTypeDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_BadType", Operate = "_Query")] |
| | | public ApiResult<DataSet> GetGy_BadTypeDetail(string HID) |
| | | { |
| | | var dataSet = oCN.RunProcReturn("select top 1 * from h_v_gy_BadTypeList where HItemID= " + HID + " ", "h_v_gy_BadTypeList"); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_BadType")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_BadType", Operate = "_Drop")] |
| | | |
| | | public object DeltetGy_BadType(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_ErrType")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_ErrType", Operate = "_Edit")] |
| | | public object SaveGy_ErrType([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_ErrTypeDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_ErrType", Operate = "_Query")] |
| | | public ApiResult<DataSet> GetGy_ErrTypeDetail(string HID) |
| | | { |
| | | var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_ErrTypeList where HItemID= " + HID + " ", "h_v_Gy_ErrTypeList"); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_ErrType")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_ErrType", Operate = "_Drop")] |
| | | public object DeltetGy_ErrType(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | #region 异常类型审核/反审核 |
| | | [Route("Gy_ErrType/AuditGy_ErrType")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_ErrType", Operate = "_Check")] |
| | | public object AuditGy_ErrType(string HInterID, int Type, string user) |
| | | { |
| | | try |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_BadResultList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_BadResult", Operate = "_Edit")] |
| | | public object SaveGy_BadResultList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_BadResultDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_BadResult", Operate = "_Query")] |
| | | |
| | | public ApiResult<DataSet> GetGy_BadResultDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_BadResultBillDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_BadResult")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_BadResult", Operate = "_Drop")] |
| | | |
| | | public object DeltetGy_BadResult(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_InspectValueList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_InspectValue", Operate = "_Edit")] |
| | | public object SaveGy_InspectValueList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_InspectValueDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_InspectValue", Operate = "_Query")] |
| | | public ApiResult<DataSet> GetGy_InspectValueDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_InspectValueBillDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_InspectValue")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_InspectValue", Operate = "_Drop")] |
| | | public object DeltetGy_InspectValue(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_InspectMethodList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_InspectMethod", Operate = "_Edit")] |
| | | public object SaveGy_InspectMethodList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_InspectMethodDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_InspectMethod", Operate = "_Query")] |
| | | public ApiResult<DataSet> GetGy_InspectMethodDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_InspectMethodBillDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_InspectMethod")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_InspectMethod", Operate = "_Drop")] |
| | | public object DeltetGy_InspectMethod(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_QualityStdList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_QualityStd", Operate = "_Edit")] |
| | | public object SaveGy_QualityStdList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_QualityStdDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_QualityStd", Operate = "_Query")] |
| | | public ApiResult<DataSet> GetGy_QualityStdDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_QualityStdBillDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_QualityStd")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_QualityStd", Operate = "_Drop")] |
| | | public object DeltetGy_QualityStd(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_InspectInstruMentList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_InspectInstruMent", Operate = "_Edit")] |
| | | public object SaveGy_InspectInstruMentList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_InspectInstruMentDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_InspectInstruMent", Operate = "_Query")] |
| | | public ApiResult<DataSet> GetGy_InspectInstruMentDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_InspectInstruMentBillDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_InspectInstruMent")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_InspectInstruMent", Operate = "_Drop")] |
| | | public object DeltetGy_InspectInstruMent(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_InspectBasisList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_InspectBasis", Operate = "_Edit")] |
| | | public object SaveGy_InspectBasisList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_InspectBasisDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_InspectBasis", Operate = "_Query")] |
| | | public ApiResult<DataSet> GetGy_InspectBasisDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_InspectBasisBillDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_InspectBasis")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_InspectBasis", Operate = "_Drop")] |
| | | public object DeltetGy_InspectBasis(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_PostSkillList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_PostSkill_Edit")] |
| | | public object SaveGy_PostSkillList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_PostSkillDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_PostSkill_Query")] |
| | | public ApiResult<DataSet> GetGy_PostSkillDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_PostSkillDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_PostSkill")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_PostSkill_Drop")] |
| | | public object DeltetGy_PostSkill(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_PostList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_Post_Edit")] |
| | | public object SaveGy_PostList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_PostDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_Post_Query")] |
| | | public ApiResult<DataSet> GetGy_PostDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_PostDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_Post")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_Post_Drop")] |
| | | public object DeltetGy_Post(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | #region 岗位项目 导入(保存) |
| | | [Route("Gy_Post/Gy_Post_btnSave")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_Post_Edit")] |
| | | public object Gy_Post_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_StockMoveStyleList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_StockMoveStyle_Edit")] |
| | | public object SaveGy_StockMoveStyleList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_StockMoveStyleDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_StockMoveStyle_Query")] |
| | | public ApiResult<DataSet> GetGy_StockMoveStyleDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_StockMoveStyleDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_StockMoveStyle")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_StockMoveStyle_Drop")] |
| | | public object DeltetGy_StockMoveStyle(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_StockInStyleList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_StockInStyle_Edit")] |
| | | public object SaveGy_StockInStyleList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_StockInStyleDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_StockInStyle_Query")] |
| | | public ApiResult<DataSet> GetGy_StockInStyleDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_StockInStyleDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_StockInStyle")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_StockInStyle_Drop")] |
| | | public object DeltetGy_StockInStyle(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_StockOutStyleList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_StockOutStyle_Edit")] |
| | | public object SaveGy_StockOutStyleList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_StockOutStyleDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_StockOutStyle_Query")] |
| | | public ApiResult<DataSet> GetGy_StockOutStyleDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_StockOutStyleDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_StockOutStyle")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_StockOutStyle_Drop")] |
| | | public object DeltetGy_StockOutStyle(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_AreaSetList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_AreaSet_Edit")] |
| | | public object SaveGy_AreaSetList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_AreaSetDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_AreaSet_Query")] |
| | | public ApiResult<DataSet> GetGy_AreaSetDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_AreaSetDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_AreaSet")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_AreaSet_Drop")] |
| | | public object DeltetGy_AreaSet(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_SellStyleList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_SellStyle_Edit")] |
| | | public object SaveGy_SellStyleList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_SellStyleDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_SellStyle_Query")] |
| | | public ApiResult<DataSet> GetGy_SellStyleDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_SellStyleDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_SellStyle")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_SellStyle_Drop")] |
| | | public object DeltetGy_SellStyle(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_PoStockStyleList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_PoStockStyle_Edit")] |
| | | public object SaveGy_PoStockStyleList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_PoStockStyleDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_PoStockStyle_Query")] |
| | | public ApiResult<DataSet> GetGy_PoStockStyleDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_PoStockStyleDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_PoStockStyle")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_PoStockStyle_Drop")] |
| | | public object DeltetGy_PoStockStyle(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_SupTypeList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_SupType_Edit")] |
| | | public object SaveGy_SupTypeList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_SupTypeDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_SupType_Query")] |
| | | public ApiResult<DataSet> GetGy_SupTypeDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_SupTypeDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_SupType")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_SupType_Drop")] |
| | | public object DeltetGy_SupType(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | #region 供应商分类项目 导入(保存) |
| | | [Route("Gy_SupType/Gy_SupType_btnSave")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_SupType_Edit")] |
| | | public object Gy_SupType_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_CusTypeList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_CusType_Edit")] |
| | | public object SaveGy_CusTypeList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_CusTypeDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_CusType_Query")] |
| | | public ApiResult<DataSet> GetGy_CusTypeDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_CusTypeDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_CusType")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_CusType_Drop")] |
| | | public object DeltetGy_CusType(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | #region 客户分类项目 导入(保存) |
| | | [Route("Gy_CusType/Gy_CusType_btnSave")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_CusType_Edit")] |
| | | public object Gy_CusType_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_StockCheckItemList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_StockCheckItem_Edit")] |
| | | public object SaveGy_StockCheckItemList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_StockCheckItemDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_StockCheckItem_Query")] |
| | | public ApiResult<DataSet> GetGy_StockCheckItemDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_StockCheckItemDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_StockCheckItem")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_StockCheckItem_Drop")] |
| | | public object DeltetGy_StockCheckItem(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_ProjectMoneyList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_ProjectMoney_Edit")] |
| | | public object SaveGy_ProjectMoneyList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_ProjectMoneyDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_ProjectMoney_Query")] |
| | | |
| | | public ApiResult<DataSet> GetGy_ProjectMoneyDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_ProjectMoneyDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_ProjectMoney")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_ProjectMoney_Drop")] |
| | | public object DeltetGy_ProjectMoney(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_ErrMsgBackType")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_ErrMsgBackType_Edit")] |
| | | public object SaveGy_ErrMsgBackType([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_ErrMsgBackTypeDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_ErrMsgBackType_Query")] |
| | | public ApiResult<DataSet> GetGy_ErrMsgBackTypeDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_ErrMsgBackTypeDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_ErrMsgBackType")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_ErrMsgBackType_Drop")] |
| | | public object DeltetGy_ErrMsgBackType(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_BadPhenomenaList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_BadPhenomena_Edit")] |
| | | public object SaveGy_BadPhenomenaList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_BadPhenomenaDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_BadPhenomena_Query")] |
| | | public ApiResult<DataSet> GetGy_BadPhenomenaDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_BadPhenomenaDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_BadPhenomena")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_BadPhenomena_Drop")] |
| | | public object DeltetGy_BadPhenomena(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | #region 不良现象项目 导入(保存) |
| | | [Route("Gy_BadPhenomena/Gy_BadPhenomena_btnSave")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_BadPhenomena_Edit")] |
| | | public object Gy_BadPhenomena_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_ProjectClassList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_ProjectClass_Edit")] |
| | | public object SaveGy_ProjectClassList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_ProjectClassDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_ProjectClass_Query")] |
| | | public ApiResult<DataSet> GetGy_ProjectClassDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_ProjectClassDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_ProjectClass")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_ProjectClass_Drop")] |
| | | public object DeltetGy_ProjectClass(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("SaveGy_TaskClassList")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_TaskClass_Edit")] |
| | | public object SaveGy_TaskClassList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("GetGy_TaskClassDetail")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_TaskClass_Query")] |
| | | public ApiResult<DataSet> GetGy_TaskClassDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_TaskClassDetail(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_TaskClass")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_TaskClass_Drop")] |
| | | public object DeltetGy_TaskClass(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("Xt_User/Gy_UserByUserListDrop")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_UserByUser_Drop")] |
| | | public object DeltetGy_Material(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | |
| | | /// <returns></returns> |
| | | [Route("Gy_UserByUserEdit")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_UserByUser_Query")] |
| | | |
| | | public ApiResult<DataSet> Gy_UserByUserEdit(string HID) |
| | | { |
| | | var model = LuBaoSevice.Gy_UserByUserEdit(HID); |
| | |
| | | /// <returns></returns> |
| | | [Route("Web/GetClassTimePrjGroupBillEdit_Json")] |
| | | [HttpGet] |
| | | |
| | | public object GetClassTimePrjGroupBillEdit_Json(string sWhere) |
| | | { |
| | | //if (!DBUtility.ClsPub.Security_Log("Gy_ClassTimePrj", 1, false, user)) |
| | |
| | | /// <returns></returns> |
| | | [Route("Web/SaveGetClassTimePrjGroupList")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_ClassTimePrj")] |
| | | public object SaveGetClassTimePrjGroupList(string HNumber, string HName, string HDeptID, string refSav, string user, string HItem) |
| | | { |
| | | |
| | |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region APP根据设备id进行自动登录 |
| | | |
| | | |
| | | |
| | | [HttpGet] |
| | | [Route("Web/getSysParameter")] |
| | | public object getSysParameter(string HClientID) |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 根据表名获取sql语句 |
| | | [HttpGet] |
| | | [Route("Web/getSQL")] |
| | | public object getSQL(string TableName, string ModeName, string OpertionType, string Identityid) |
| | | { |
| | | if (OpertionType == "insert") |
| | | { |
| | | string sql = $"select * from {TableName}"; |
| | | DataSet ds = oCN.RunProcReturn(sql, TableName); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "系统参数不存在,请联系管理"; |
| | | objJsonResult.data = 0; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | sql = $"exec h_p_sqlhelper '{TableName}'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_sqlhelper"); |
| | | |
| | | if (ds == null || ds.Tables.Count < 2 || ds.Tables[1].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "系统参数不存在,请联系管理"; |
| | | objJsonResult.data = 0; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | StringBuilder sb = new StringBuilder(); |
| | | string columnsStr = ds.Tables[0].Rows[0][0].ToString(); |
| | | sb.AppendLine($"string sqlRes = $\"INSERT INTO [{TableName}] ({columnsStr})"); |
| | | sb.AppendLine(" VALUES ("); |
| | | |
| | | // 2. 拼接 VALUES 里面的参数 |
| | | int count = ds.Tables[1].Rows.Count; |
| | | for (int i = 0; i < count; i++) |
| | | { |
| | | string propName = ds.Tables[1].Rows[i][0].ToString(); |
| | | string valueFormat = ""; |
| | | if (propName == "HMakeDate" || propName == "HMakeTime") |
| | | { |
| | | valueFormat = "getdata()"; |
| | | } |
| | | else if (propName == "HERPItemID") |
| | | { |
| | | valueFormat = "'{0}'"; |
| | | } |
| | | else |
| | | { |
| | | valueFormat = $"'{{{ModeName}.{propName}}}'"; // 默认通用逻辑 |
| | | } |
| | | sb.Append(" " + valueFormat); |
| | | |
| | | if (i < count - 1) |
| | | { |
| | | sb.Append(","); |
| | | } |
| | | sb.AppendLine(); |
| | | } |
| | | sb.AppendLine(" ); \";"); |
| | | sb.Append(" oCN.RunProc(sqlRes);"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "成功"; |
| | | objJsonResult.data = sb; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | string whereKey = Identityid; |
| | | string sql = $"select * from {TableName}"; |
| | | DataSet ds = oCN.RunProcReturn(sql, TableName); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "系统参数不存在,请联系管理"; |
| | | objJsonResult.data = 0; |
| | | return objJsonResult; |
| | | } |
| | | sql = $"exec h_p_sqlhelper '{TableName}'"; |
| | | ds = oCN.RunProcReturn(sql, "h_p_sqlhelper"); |
| | | |
| | | if (ds == null || ds.Tables.Count < 2 || ds.Tables[1].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "系统参数不存在,请联系管理"; |
| | | objJsonResult.data = 0; |
| | | return objJsonResult; |
| | | } |
| | | StringBuilder sb = new StringBuilder(); |
| | | |
| | | sb.Append($"string sqlRes =$\"Update {TableName} set "); |
| | | |
| | | int count = ds.Tables[1].Rows.Count; |
| | | int setFieldCount = 0; |
| | | |
| | | for (int i = 0; i < count; i++) |
| | | { |
| | | string propName = ds.Tables[1].Rows[i][0].ToString(); |
| | | |
| | | |
| | | if (propName == whereKey) |
| | | continue; |
| | | |
| | | |
| | | if (setFieldCount > 0) |
| | | { |
| | | sb.Append(","); |
| | | } |
| | | string valueFormat = ""; |
| | | if (propName == "HModifyTime" || propName == "HUpDateDate") |
| | | { |
| | | valueFormat = $"{propName}=getdate()"; |
| | | } |
| | | else |
| | | { |
| | | valueFormat = $"{propName}='{{{ModeName}.{propName}}}'"; |
| | | } |
| | | sb.Append("\r\n " + valueFormat); |
| | | |
| | | setFieldCount++; |
| | | } |
| | | |
| | | sb.Append($" where {whereKey}='{{{ModeName}.{whereKey}}}'\""); |
| | | sb.AppendLine(); |
| | | sb.Append("oCN.RunProc(sqlRes);"); |
| | | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "成功"; |
| | | objJsonResult.data = sb; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |