| | |
| | | |
| | | [Route("Sc_MouldProdInBill/Get_MouldProdInBillList")] |
| | | [HttpGet] |
| | | public object Get_MouldProdInBillList(string sWhere) |
| | | public object Get_MouldProdInBillList(string sWhere,string user, string Organization) |
| | | { |
| | | try |
| | | { |
| | | ds = Sc_GetMouldProdInHouseBill(sWhere); |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdInBillList", 1, true, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无查看权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = Sc_GetMouldProdInHouseBill(sWhere,Organization); |
| | | if (ds == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | } |
| | | } |
| | | |
| | | public static DataSet Sc_GetMouldProdInHouseBill(string sWhere) |
| | | public static DataSet Sc_GetMouldProdInHouseBill(string sWhere, string Organization) |
| | | { |
| | | string sql1 = string.Format(@"select * from h_v_Sc_MouldProdInHouseBillList where 库存组织='" + Organization + "'"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldProdInHouseBillList " + sWhere, "h_v_Sc_MouldProdInHouseBillList"); |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1+ sWhere + "order by 日期 desc", "h_v_Sc_MouldProdInHouseBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sc_MouldProdInHouseBillList where 1 = 1 "; |
| | | string sql = sql1 + sWhere; |
| | | string sql = sql1 + sWhere+ "order by 日期 desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldProdInHouseBillList"); |
| | | } |
| | | |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldProdInBill/set_DeleteBill")] |
| | | [HttpGet] |
| | | public object set_DeleteBill(string HInterID) |
| | | public object set_DeleteBill(string HInterID,string user) |
| | | { |
| | | ////编辑权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sc_MouldProdInBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "无删除权限!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdInBill_Delete", 1, true, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | string s = ""; |
| | | Int64 lngBillKey = 0; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (oBill.omodel.HChecker != "") |
| | | if (oBill.omodel.HChecker != ""&& oBill.omodel.HChecker !=null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | bool IsDete = oBill.DeleteBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (IsDete) |
| | | { |
| | | objJsonResult.code = "1"; |
| | |
| | | try |
| | | { |
| | | //审核权限 |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | try |
| | | { |
| | | //审核权限 |
| | | if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) |
| | | if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, true, CurUserName)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | public object Sc_MouldScrapInProdBillListProjectDetai(string sqlWhere) |
| | | { |
| | | DataSet ds; |
| | | DataSet ds1; |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | |
| | | { |
| | | ds = oCN.RunProcReturn(string.Format(@"SELECT HMaterID,模具代码 HMaterCode,模具名称 HMaterName,规格型号 HMaterSpec, |
| | | 批次 HBatchNo,设计寿命 HDesignLife, 剩余寿命 HLeaveLife, 使用寿命 HUseLife,应收数量 HQtyMust, |
| | | 实收数量 HQty, 单价 HPrice, 金额 HMoney, HWHID, 收料仓库代码 HWHCode,收料仓库 HWHName,表体备注 HRemark |
| | | 实收数量 HQty, 单价 HPrice, 金额 HMoney,hwhid1 HWHID, 收料仓库代码 HWHCode,收料仓库 HWHName, |
| | | HSPID, 收料仓位代码 HSPCode,收料仓位 HSPName,表体备注 HRemark,HStockOrgID |
| | | FROM h_v_Sc_MouldProdInHouseBillList"), "h_v_Sc_MouldProdInHouseBillList"); |
| | | //查汇总 |
| | | ds1 = oCN.RunProcReturn(string.Format(@"select 模具代码,模具名称,单据号,规格型号,批次,实收数量,hwhid1,收料仓库代码, |
| | | 收料仓库,表体备注,sum(HMaterID) from h_v_Sc_MouldProdInHouseBillList group by 模具代码, |
| | | 模具名称,单据号,规格型号,批次,实收数量,hwhid1,收料仓库代码,收料仓库,表体备注"), |
| | | "h_v_Sc_MouldProdInHouseBillList"); |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | //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, HWHID, 收料仓库代码 HWHCode,收料仓库 HWHName,表体备注 HRemark |
| | | 实收数量 HQty, 单价 HPrice, 金额 HMoney,hwhid1 HWHID, 收料仓库代码 HWHCode,收料仓库 HWHName, |
| | | HSPID, 收料仓位代码 HSPCode,收料仓位 HSPName,表体备注 HRemark,HStockOrgID |
| | | FROM h_v_Sc_MouldProdInHouseBillList where 1=1"); |
| | | string sql = sql1 + sqlWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldProdInHouseBillList"); |
| | |
| | | /// <returns></returns> |
| | | [Route("Sc_MouldProdInHouseBill/SaveGetMouldProdInHouseBillList")] |
| | | [HttpPost] |
| | | public object SaveGetMouldScrapInHouseBillList([FromBody] JObject msg) |
| | | public object SaveGetMouldProdInHouseBillList([FromBody] JObject msg) |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string refSav = sArray[2].ToString(); |
| | | string msg4 = sArray[3].ToString(); |
| | | |
| | | string UserName = ""; |
| | | string s = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | //编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldProdInBill_Edit", 1, true, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DLL.ClsSc_MouldProdInBill oBill = new DLL.ClsSc_MouldProdInBill(); |
| | | List<Models.ClsSc_MouldProdBillMain> lsmain = new List<Models.ClsSc_MouldProdBillMain>(); |
| | | msg2 = msg2.Replace("\\", ""); |
| | |
| | | //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --日期 |
| | | //oItem.HInnerBillNo = ""; // --内部单据号 |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month); |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | //oItem.HEquipID = 0; //设备ID(Gy_EquipMent) |
| | | //oItem.HPeriod = 0; |