| | |
| | | public object DeltetMouldRepairWorkBill(string HInterID) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | //审核权限 |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | public object DeltetMouldRepairCheckBill(string HInterID) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sc_MouldRepairCheckBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //if (!DBUtility.ClsPub.Security_Log("Sc_MouldRepairCheckBill_Delete", 1, false, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | |
| | | public object DeltetMouldConkBookBill(string HInterID) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBill_Delete", 1, false, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | |
| | | public object DeltetMouldMaintainPlanBill(string HInterID) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | |
| | | public object DeltetSc_MouldDotCheckBill(string HInterID) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | |
| | | public object DeltetSc_MouldDotCheckPlanBillBill(string HInterID) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, false, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapRequestBill_Edit", 1, true, msg4)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapRequestBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBillList", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | string sql1 = string.Format(@"select * from h_v_Sc_MouldScrapOutHouseBillList where 库存组织='" + Organization + "'"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 日期 desc", "h_v_Sc_MouldScrapOutHouseBillList"); |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 制单日期 desc", "h_v_Sc_MouldScrapOutHouseBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + "order by 日期 desc"; |
| | | string sql = sql1 + sWhere + "order by 制单日期 desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldScrapOutHouseBillList"); |
| | | } |
| | | } |
| | |
| | | try |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Edit", 1, true, msg4)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | public object DeltetMouldScrapOutHouseBill(string HInterID, string user) |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Delete", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldScrapOutBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | // try |
| | | // { |
| | | // //审核权限 |
| | | // if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) |
| | | // if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName)) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | |
| | | { |
| | | //flag=1 审核; flag=2 反审核 |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldScrapOutBill_Check", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldScrapOutBill_Check", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBillList", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | string sql1 = string.Format(@"select * from h_v_Sc_MouldProdBackBillList where 库存组织='" + Organization + "'"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 日期 desc", "h_v_Sc_MouldProdBackBillList"); |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 制单日期 desc", "h_v_Sc_MouldProdBackBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + "order by 日期 desc"; |
| | | string sql = sql1 + sWhere + "order by 制单日期 desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList"); |
| | | } |
| | | |
| | |
| | | { |
| | | ds = oCN.RunProcReturn(string.Format(@"SELECT HMaterID,模具代码 HMaterCode,模具名称 HMaterName,规格型号 HMaterSpec,批次 HBatchNo, |
| | | 设计寿命 HDesignLife, 剩余寿命 HLeaveLife, 累积使用寿命 HUseLife, 应发数量 HQtyMust, 实发数量 HQty, |
| | | 单价 HPrice, 金额 HMoney,HWHSonID HWHID, 发料仓库代码 HWHCode, 发料仓库 HWHName,HSPID, |
| | | 单价 HPrice, 金额 HMoney,收料仓库ID HWHID, 收料仓库代码 HWHCode, 收料仓库 HWHName,HSPID, |
| | | 仓位代码 HSPCode, 仓位 HSPName,表体备注 HRemark,HStockOrgID,HUnitID,计量单位代码,计量单位 FROM h_v_Sc_MouldProdBackBillList"), "h_v_Sc_MouldProdBackBillList"); |
| | | |
| | | } |
| | |
| | | //string sql1 = "select HRepairCheckID,HRepairCheckContent,HManagerID,HRemark from Sc_MouldRepairCheckBillSub where 1 = 1 "; |
| | | string sql1 = string.Format(@"SELECT HMaterID,模具代码 HMaterCode,模具名称 HMaterName,规格型号 HMaterSpec,批次 HBatchNo, |
| | | 设计寿命 HDesignLife, 剩余寿命 HLeaveLife, 累积使用寿命 HUseLife, 应发数量 HQtyMust, 实发数量 HQty, |
| | | 单价 HPrice, 金额 HMoney,HWHSonID HWHID, 发料仓库代码 HWHCode, 发料仓库 HWHName,HSPID, |
| | | 单价 HPrice, 金额 HMoney,收料仓库ID HWHID, 收料仓库代码 HWHCode, 收料仓库 HWHName,HSPID, |
| | | 仓位代码 HSPCode, 仓位 HSPName,表体备注 HRemark,HStockOrgID,HUnitID,计量单位代码,计量单位 FROM h_v_Sc_MouldProdBackBillList where 1 = 1 "); |
| | | string sql = sql1 + sqlWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldProdBackBillList"); |
| | |
| | | } |
| | | //查汇总 |
| | | ds1 = oCN.RunProcReturn(string.Format(@"select 物料代码,max(物料名称)物料名称,规格型号,max(单据号)单据号,批次,sum(实发数量)实发数量, |
| | | HWHSonID,max(发料仓库代码)发料仓库代码,max(发料仓库)发料仓库,表体备注 from h_v_Sc_MouldProdBackBillList |
| | | where 1=1 " + sqlWhere + " group by 物料代码,规格型号,HWHSonID,批次,表体备注"), "h_v_Sc_MouldProdBackBillList"); |
| | | 收料仓库ID,max(收料仓库代码)收料仓库代码,max(收料仓库)收料仓库,表体备注 from h_v_Sc_MouldProdBackBillList |
| | | where 1=1 " + sqlWhere + " group by 物料代码,规格型号,收料仓库ID,批次,表体备注"), "h_v_Sc_MouldProdBackBillList"); |
| | | |
| | | list.Add(ds.Tables[0]); |
| | | list.Add(ds1.Tables[0]); |
| | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Edit", 1, true, msg4)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | public object DeltetMouldProdBackBill(string HInterID, string user) |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Delete", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdBackBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | { |
| | | //flag=1 审核; flag=2 反审核 |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdBackBill_Check", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdBackBill_Check", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBillList", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | string sql1 = string.Format(@"select * from h_v_Sc_MouldProdOutHouseBillList where 库存组织='" + Organization + "'"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 日期 desc", "h_v_Sc_MouldProdOutHouseBillList"); |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + "order by 制单日期 desc", "h_v_Sc_MouldProdOutHouseBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + "order by 日期 desc"; |
| | | string sql = sql1 + sWhere + "order by 制单日期 desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdOutHouseBillList"); |
| | | } |
| | | |
| | |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Edit", 1, true, msg4)) |
| | | //模块名,写入日志,报错框,用户名 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | //判断用户权限 |
| | | #region |
| | | [Route("Sc_MouldProdOutBill/QueryUserRight")] |
| | | [HttpPost] |
| | | public object QueryUserRight(string UserName) |
| | | { |
| | | try |
| | | { |
| | | //模块名,写入日志,报错框,用户名 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Edit", 1, false, UserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有查询权限"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "有权限"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch(Exception e1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有查询权限," + e1.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region [模具处理领用单删除功能] |
| | | /// <summary> |
| | | /// 模具处理领用单删除功能 |
| | |
| | | public object DeltetMouldProdOutBill(string HInterID, string user) |
| | | { |
| | | //删除权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Delete", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | [Route("Sc_MouldProdOutBill/AuditMouldProdOutBill")] |
| | | [HttpGet] |
| | | public object AuditMouldProdOutBill(string HInterID, string user, int flag) |
| | | { |
| | | //flag=1 审核; flag=2 反审核 |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdOutBill_Check", 1, true, user)) |
| | | if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdOutBill_Check", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | public object DeltetMouldLifeChangeBill(string HInterID) |
| | | { |
| | | //编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBill_Delete", 1, false, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |