| | |
| | | using WebAPI.Controllers.SCGL.日计划管理; |
| | | using System.IO; |
| | | using SyntacticSugar.constant; |
| | | using WebAPI.Utility; |
| | | namespace WebAPI.Controllers.MJGL |
| | | { |
| | | [Permission(HModName = "Gy_MaterialTechParamBillMain")] |
| | | public class Gy_MaterialTechParamBillController : ApiController |
| | | { |
| | | |
| | |
| | | #region 产品工艺参数清单列表 |
| | | [Route("Sc_MouldDotCheckRuleBill/Gy_MaterialTechParamBillMainList")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_MaterialTechParamBillMain_Query")] |
| | | public object Gy_MaterialTechParamBillMainList(string sWhere, string user) |
| | | { |
| | | try |
| | |
| | | /// <returns></returns> |
| | | [Route("Gy_MaterialTechParamBill/SaveGy_MaterialTechParamBillMain")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_MaterialTechParamBillMain_Edit")] |
| | | public object SaveGy_MaterialTechParamBillMain([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | |
| | | #region 产品工艺参数清单编辑时获取表体数据 |
| | | [Route("Gy_MaterialTechParamBill/Gy_MaterialTechParamBillMainEditList")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_MaterialTechParamBillMain_Query")] |
| | | public object Gy_MaterialTechParamBillMainEditList(string HInterID, string User) |
| | | { |
| | | try |
| | |
| | | List<DataTable> tableList = new List<DataTable>(); |
| | | |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_MaterialTechParamBillMain_Edit", 1, false, User)) |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_MaterialTechParamBillMain_Query", 1, false, User)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | #region 产品工艺参数清单记录删除功能 |
| | | [Route("Gy_MaterialTechParamBill/DeleteGy_MaterialTechParamBillMain")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_MaterialTechParamBillMain_Drop")] |
| | | public object DeleteGy_MaterialTechParamBillMain(string HInterID, string user) |
| | | { |
| | | try |
| | |
| | | #region 产品工艺参数清单列表 审核/反审核功能 |
| | | [Route("Gy_MaterialTechParamBill/CheckGy_MaterialTechParamBillMain")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_MaterialTechParamBillMain_Check")] |
| | | public object CheckGy_MaterialTechParamBillMain(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | |
| | | #region 产品工艺参数清单列表 关闭/反关闭功能 |
| | | [Route("Gy_MaterialTechParamBill/CloseGy_MaterialTechParamBillMain")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_MaterialTechParamBillMain_Close")] |
| | | public object CloseGy_MaterialTechParamBillMain(string HInterID, int IsAudit, string user) |
| | | { |
| | | try |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 安灯逐级呼叫规则 作废/反作废 |
| | | #region 产品工艺参数清单列表 作废/反作废 |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="HInterID">单据ID</param> |
| | | /// <param name="IsAudit">作废(0),反作废(1)</param> |
| | | /// <param name="CurUserName">作废人</param> |
| | | /// <returns></returns> |
| | | [Route("Gy_MaterialTechParamBill/DeleteGy_MaterialTechParamBill")] |
| | | [Route("Gy_MaterialTechParamBill/DropGy_MaterialTechParamBill")] |
| | | [HttpGet] |
| | | public object DeleteGy_MaterialTechParamBill(int HInterID, int IsAudit, string CurUserName) |
| | | [Permission(HModName = "Gy_MaterialTechParamBillMain_Delete")] |
| | | public object DropGy_MaterialTechParamBill(int HInterID, int IsAudit, string CurUserName) |
| | | { |
| | | string ModRightNameCheck = "Gy_MaterialTechParamBillMain_Delete"; |
| | | DBUtility.ClsPub.CurUserName = CurUserName; |
| | |
| | | #region 产品工艺参数项目 导入(保存) |
| | | [Route("Gy_MaterialTechParamBill/Gy_MaterialTechParamBill_btnSave")] |
| | | [HttpPost] |
| | | [Permission(HModName = "Gy_MaterialTechParamBillMain_Edit")] |
| | | public object Gy_MaterialTechParamBill_btnSave([FromBody] JObject sMainSub) |
| | | { |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region 产品工艺参数清单 更新相同物料+模具的上下标准 值 产生一个新版本,老的作废 |
| | | [Route("Gy_MaterialTechParamBill/SaveGy_MaterialTechParamBill_Update")] |
| | | [HttpGet] |
| | | [Permission(HModName = "Gy_MaterialTechParamBillMain_Edit")] |
| | | public object SaveGy_MaterialTechParamBill_Update(string HInterID, string User) |
| | | { |
| | | try |
| | | { |
| | | List<DataTable> tableList = new List<DataTable>(); |
| | | |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_MaterialTechParamBillMain_Edit", 1, false, User)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无更新权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (HInterID == null || HInterID.Equals("")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterID不能为空!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Gy_MaterialTechParamBillMain_Insert '"+HInterID+"','"+User+"' ", "h_p_Gy_MaterialTechParamBillMain_Insert"); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "更新成功"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |