WebAPI/Controllers/QC_ManagementController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/DLL/ClsQC_PatrolProcCheckBill.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/ListModels.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Properties/PublishProfiles/API.pubxml.user | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Service/LuBaoSevice.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/WebAPI.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
WebAPI/Controllers/QC_ManagementController.cs
@@ -95,6 +95,8 @@ return objJsonResult; } #endregion #region 查询列表方法 /// <summary> /// 返回检验方案单列表 /// </summary> @@ -110,11 +112,11 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sqlWhere == null || sqlWhere.Equals("")) { ds = oCN.RunProcReturn("select top 500 * from h_v_Gy_QCCheckProjectList ", "h_v_Gy_QCCheckProjectList"); ds = oCN.RunProcReturn("select top 500 * from h_v_Gy_QCCheckProjectList where HBillStatus>-1 ", "h_v_Gy_QCCheckProjectList"); } else { string sql1 = "select * from h_v_Gy_QCCheckProjectList where 1 = 1 "; string sql1 = "select * from h_v_Gy_QCCheckProjectList where HBillStatus>-1 "; string sql = sql1 + sqlWhere; ds = oCN.RunProcReturn(sql, "h_v_Gy_QCCheckProjectList"); } @@ -145,11 +147,11 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sqlWhere == null || sqlWhere.Equals("")) { ds = oCN.RunProcReturn("select top 500 * from h_v_QC_POStockInCheckBillList ", "h_v_QC_POStockInCheckBillList"); ds = oCN.RunProcReturn("select top 500 * from h_v_QC_POStockInCheckBillList where 关闭人='' ", "h_v_QC_POStockInCheckBillList"); } else { string sql1 = "select * from h_v_QC_POStockInCheckBillList where 1 = 1 "; string sql1 = "select * from h_v_QC_POStockInCheckBillList where 关闭人='' "; string sql = sql1 + sqlWhere; ds = oCN.RunProcReturn(sql, "h_v_QC_POStockInCheckBillList"); } @@ -180,11 +182,11 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sqlWhere == null || sqlWhere.Equals("")) { ds = oCN.RunProcReturn("select top 500 * from h_v_QC_FirstPieceCheckBillList ", "h_v_QC_FirstPieceCheckBillList"); ds = oCN.RunProcReturn("select top 500 * from h_v_QC_FirstPieceCheckBillList where 关闭人='' ", "h_v_QC_FirstPieceCheckBillList"); } else { string sql1 = "select * from h_v_QC_FirstPieceCheckBillList where 1 = 1 "; string sql1 = "select * from h_v_QC_FirstPieceCheckBillList where 关闭人='' "; string sql = sql1 + sqlWhere; ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBillList"); } @@ -215,11 +217,11 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sqlWhere == null || sqlWhere.Equals("")) { ds = oCN.RunProcReturn("select top 500 * from h_v_QC_PatrolProcCheckBillList ", "h_v_QC_PatrolProcCheckBillList"); ds = oCN.RunProcReturn("select top 500 * from h_v_QC_PatrolProcCheckBillList where 关闭人=''", "h_v_QC_PatrolProcCheckBillList"); } else { string sql1 = "select * from h_v_QC_PatrolProcCheckBillList where 1 = 1 "; string sql1 = "select * from h_v_QC_PatrolProcCheckBillList where 关闭人='' "; string sql = sql1 + sqlWhere; ds = oCN.RunProcReturn(sql, "h_v_QC_PatrolProcCheckBillList"); } @@ -236,6 +238,1017 @@ } /// <summary> /// 检验方案获取信息 /// </summary> /// <returns></returns> [Route("GetQCCheckProjectDetail")] [HttpGet] public ApiResult<DataSet> GetQCCheckProjectDetail(string HID) { var model = LuBaoSevice.GetCheckProjectDetail(HID); return model; } /// <summary> /// 来料检验单获取信息 /// </summary> /// <returns></returns> [Route("GetPOStockInCheckDetail")] [HttpGet] public ApiResult<DataSet> GetPOStockInCheckDetail(string HID) { var model = LuBaoSevice.GetPOStockInCheckBillDetail(HID); return model; } /// <summary> /// 首件检验单获取信息 /// </summary> /// <returns></returns> [Route("GetQC_FirstPieceCheckDetail")] [HttpGet] public ApiResult<DataSet> GetQC_FirstPieceCheckDetail(string HID) { var model = LuBaoSevice.GetQC_FirstPieceCheckBillDetail(HID); return model; } /// <summary> /// 巡检单获取信息 /// </summary> /// <returns></returns> [Route("GetQC_PatrolProcCheckDetail")] [HttpGet] public ApiResult<DataSet> GetQC_PatrolProcCheckDetail(string HID) { var model = LuBaoSevice.GetQC_PatrolProcCheckBillDetail(HID); return model; } /// <summary> /// 返回检验方案单子表详情 /// </summary> /// <param name="sWhere"></param> /// <returns></returns> [Route("MES_QC_CheckProjectDetail_Json")] [HttpGet] public object MES_QC_CheckProjectDetail_Json(string sqlWhere) { DataSet ds; try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sqlWhere == null || sqlWhere.Equals("")) { ds = oCN.RunProcReturn("select HPrjNo,HQCCheckItemID,HQCStd,HQCStdMax,HQCUnit,HRemark from Gy_QCCheckProjectSub", "Gy_QCCheckProjectSub"); } else { string sql1 = "select HPrjNo,HQCCheckItemID,HQCStd,HQCStdMax,HQCUnit,HRemark from Gy_QCCheckProjectSub where 1 = 1 "; string sql = sql1 + sqlWhere; ds = oCN.RunProcReturn(sql, "Gy_QCCheckProjectSub"); } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有返回任何记录!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } return GetObjectJson(ds); } /// <summary> /// 返回来料检验单子表详情 /// </summary> /// <param name="sWhere"></param> /// <returns></returns> [Route("MES_QC_POStockInCheckDetail_Json")] [HttpGet] public object MES_QC_POStockInCheckDetail_Json(string sqlWhere) { DataSet ds; try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sqlWhere == null || sqlWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_QC_Edit_POStockInCheckBillList", "h_v_QC_Edit_POStockInCheckBillList"); } else { string sql1 = "select * from h_v_QC_Edit_POStockInCheckBillList where 1 = 1 "; string sql = sql1 + sqlWhere; ds = oCN.RunProcReturn(sql, "h_v_QC_Edit_POStockInCheckBillList"); } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有返回任何记录!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } return GetObjectJson(ds); } /// <summary> /// 返回首件检验单子表详情 /// </summary> /// <param name="sWhere"></param> /// <returns></returns> [Route("MES_QC_FirstPieceCheckDetail_Json")] [HttpGet] public object MES_QC_FirstPieceCheckDetail_Json(string sqlWhere) { DataSet ds; try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sqlWhere == null || sqlWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_QC_Edit_FirstPieceCheckBillList", "h_v_QC_Edit_FirstPieceCheckBillList"); } else { string sql1 = "select * from h_v_QC_Edit_FirstPieceCheckBillList where 1 = 1 "; string sql = sql1 + sqlWhere; ds = oCN.RunProcReturn(sql, "h_v_QC_Edit_FirstPieceCheckBillList"); } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有返回任何记录!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } return GetObjectJson(ds); } /// <summary> /// 返回巡检单子表详情 /// </summary> /// <param name="sWhere"></param> /// <returns></returns> [Route("MES_QC_PatrolProcCheckDetail_Json")] [HttpGet] public object MES_QC_PatrolProcCheckDetail_Json(string sqlWhere) { DataSet ds; try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sqlWhere == null || sqlWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_QC_Edit_PatrolProcCheckBillList", "h_v_QC_Edit_PatrolProcCheckBillList"); } else { string sql1 = "select * from h_v_QC_Edit_PatrolProcCheckBillList where 1 = 1 "; string sql = sql1 + sqlWhere; ds = oCN.RunProcReturn(sql, "h_v_QC_Edit_PatrolProcCheckBillList"); } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有返回任何记录!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } return GetObjectJson(ds); } #endregion #region 保存/编辑/删除方法 #region 检验方案 /// <summary> /// 保存检验方案 /// </summary> /// <param name="msg"></param> /// <returns></returns> [Route("SaveQCCheckProjectList")] [HttpPost] public object SaveQCCheckProjectList([FromBody] JObject msg) { var _value = msg["msg"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); string UserName = ""; ListModels oListModels = new ListModels(); try { DAL.ClsGy_QCCheckProjectMain oBill = new DAL.ClsGy_QCCheckProjectMain(); List<Model.ClsGy_QCCheckProjectMain> lsmain = new List<Model.ClsGy_QCCheckProjectMain>(); msg2 = msg2.Replace("\\", ""); msg2 = msg2.Replace("\n", ""); //\n lsmain = oListModels.getObjectByJson_Gy_QCCheckProjectMain(msg2); foreach (Model.ClsGy_QCCheckProjectMain oItem in lsmain) { //oItem.HMaker = ""; UserName = oItem.HMaker; oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); oItem.HBillType = "3302"; oItem.HBillSubType = "3302"; oItem.HBillStatus = 0; oItem.HPeriod = 0; oItem.HMaker = ""; oItem.HStandard = false; oItem.HMainSourceInterID = oItem.HInterID; oItem.HMaterTypeID = 0; //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo); if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!没有单据日期,无法保存!"; objJsonResult.data = 1; return objJsonResult; } oBill.omodel = oItem; } //表体数据 //按 },{来拆分数组 //去掉【和】 msg3 = msg3.Substring(1, msg3.Length - 2); msg3 = msg3.Replace("\\", ""); msg3 = msg3.Replace("\n", ""); //\n //msg2 = msg2.Replace("'", "’"); List<Model.ClsGy_QCCheckProjectSub> ls = new List<Model.ClsGy_QCCheckProjectSub>(); ls = oListModels.getObjectByJson_ClsGy_QCCheckProjectSub(msg3); int i = 0; foreach (Model.ClsGy_QCCheckProjectSub oItemSub in ls) { oItemSub.HBillNo_bak = oBill.omodel.HBillNo;//单据号(备份,以免内码丢失,找不到对应主表) i++; if (string.IsNullOrWhiteSpace(oItemSub.HBillNo_bak)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!没备份单据号,无法保存!"; objJsonResult.data = 1; return objJsonResult; } oItemSub.HSourceEntryID =0; oItemSub.HSourceInterID =0; oItemSub.HEntryID = i; oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); oItemSub.HCloseType = false; oItemSub.HSourceBillNo = ""; oItemSub.HSourceBillType = ""; oItemSub.HRelationQty = 0; oItemSub.HRelationMoney = 0; oItemSub.HCloseMan = ""; oItemSub.HRemark = ""; oBill.DetailColl.Add(oItemSub); } //保存 //保存完毕后处理 bool bResult; if (oBill.omodel.HInterID == 0) { // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); } else { bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); } if (bResult) { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "保存成功!"; //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单"); objJsonResult.data = 1; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo; objJsonResult.data = 1; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!" + e.ToString(); objJsonResult.data = 1; return objJsonResult; } } /// <summary> /// 检验方案逻辑删除功能 /// </summary> /// <returns></returns> [Route("DeltetQCCheckProject")] [HttpGet] public object DeltetQCCheckProject(string HInterID) { DataSet ds; //string ModRightNameCheck = "Sc_ProcessReport_check"; try { //删除权限 //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "审核失败!无权限!"; // objJsonResult.data = null; // return objJsonResult; //} SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (string.IsNullOrWhiteSpace(HInterID)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "HInterID为空!"; objJsonResult.data = null; return objJsonResult; } oCN.BeginTran();//开始事务 ds = oCN.RunProcReturn("select * from Gy_QCCheckProjectMain where HInterID=" + HInterID, "Gy_QCCheckProjectMain"); DataSet ds2 = oCN.RunProcReturn("select * from Gy_QCCheckProjectSub where HInterID=" + HInterID, "Gy_QCCheckProjectSub"); if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2==null || ds2.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有这个单据,无法删除!"; objJsonResult.data = null; return objJsonResult; ; } int HBillStatus = Convert.ToInt32(ds.Tables[0].Rows[0]["HBillStatus"]); int HPrjNo= Convert.ToInt32(ds2.Tables[0].Rows[0]["HPrjNo"]); if (HBillStatus < 0 || HPrjNo<0) { oCN.RollBack();//回滚事务 objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "单据已删除无法再次删除!"; objJsonResult.data = null; return objJsonResult; } oCN.RunProc("update Gy_QCCheckProjectMain set HBillStatus=-1 where HInterID="+HInterID); oCN.RunProc("update Gy_QCCheckProjectSub set HPrjNo=-1 where HInterID=" + HInterID); oCN.Commit();//提交事务 objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "* 单据删除成功!"; objJsonResult.data = null; return objJsonResult; ; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "删除失败!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 来料检验 /// <summary> /// 保存来料检验单 /// </summary> /// <param name="msg"></param> /// <returns></returns> [Route("SaveQC_POStockInCheckList")] [HttpPost] public object SaveQC_POStockInCheckList([FromBody] JObject msg) { var _value = msg["msg"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); string UserName = ""; ListModels oListModels = new ListModels(); try { DAL.ClsQC_POStockInCheckBill oBill = new DAL.ClsQC_POStockInCheckBill(); List<Model.ClsQC_POStockInCheckBillMain> lsmain = new List<Model.ClsQC_POStockInCheckBillMain>(); msg2 = msg2.Replace("\\", ""); msg2 = msg2.Replace("\n", ""); //\n lsmain = oListModels.getObjectByJson_QC_POStockInCheckBillMain(msg2); foreach (Model.ClsQC_POStockInCheckBillMain oItem in lsmain) { //oItem.HMaker = ""; UserName = oItem.HMaker; oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); oItem.HBillType = "7503"; oItem.HBillSubType = "7503"; oItem.HBillStatus = 0; oItem.HPeriod = 0; oItem.HMaker = ""; oItem.HMainSourceInterID = oItem.HInterID; //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo); if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!没有单据日期,无法保存!"; objJsonResult.data = 1; return objJsonResult; } oBill.omodel = oItem; } //表体数据 //按 },{来拆分数组 //去掉【和】 msg3 = msg3.Substring(1, msg3.Length - 2); msg3 = msg3.Replace("\\", ""); msg3 = msg3.Replace("\n", ""); //\n //msg2 = msg2.Replace("'", "’"); List<Model.ClsQC_POStockInCheckBillSub> ls = new List<Model.ClsQC_POStockInCheckBillSub>(); ls = oListModels.getObjectByJson_QC_POStockInCheckBillSub(msg3); int i = 0; foreach (Model.ClsQC_POStockInCheckBillSub oItemSub in ls) { oItemSub.HBillNo_bak = oBill.omodel.HBillNo;//单据号(备份,以免内码丢失,找不到对应主表) i++; if (string.IsNullOrWhiteSpace(oItemSub.HBillNo_bak)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!没备份单据号,无法保存!"; objJsonResult.data = 1; return objJsonResult; } oItemSub.HSourceEntryID = 0; oItemSub.HSourceInterID = 0; oItemSub.HEntryID = i; // DBUtility.ClsPub.isDate(DateTime.Now); oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); oItemSub.HCloseType = false; oItemSub.HSourceBillNo = ""; oItemSub.HSourceBillType = ""; oItemSub.HRelationQty = 0; oItemSub.HRelationMoney = 0; oItemSub.HCloseMan = ""; oItemSub.HRemark = ""; oItemSub.HProcCheckEmp = oBill.omodel.HFirstCheckEmp;//检测员 oBill.DetailColl.Add(oItemSub); } //保存 //保存完毕后处理 bool bResult; if (oBill.omodel.HInterID == 0) { // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); } else { bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); } if (bResult) { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "保存成功!"; //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单"); objJsonResult.data = 1; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo; objJsonResult.data = 1; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!" + e.ToString(); objJsonResult.data = 1; return objJsonResult; } } /// <summary> /// 来料检验逻辑删除功能 /// </summary> /// <returns></returns> [Route("DeltetQC_POStockInCheck")] [HttpGet] public object DeltetQC_POStockInCheck(string HInterID) { DataSet ds; //string ModRightNameCheck = "Sc_ProcessReport_check"; try { //删除权限 //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "审核失败!无权限!"; // objJsonResult.data = null; // return objJsonResult; //} SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (string.IsNullOrWhiteSpace(HInterID)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "HInterID为空!"; objJsonResult.data = null; return objJsonResult; } oCN.BeginTran();//开始事务 ds = oCN.RunProcReturn("select * from QC_POStockInCheckBillMain where HInterID=" + HInterID, "QC_POStockInCheckBillMain"); DataSet ds2 = oCN.RunProcReturn("select * from QC_POStockInCheckBillSub where HInterID=" + HInterID, "QC_POStockInCheckBillSub"); if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有这个单据,无法删除!"; objJsonResult.data = null; return objJsonResult; ; } var HCloseMan = Convert.ToString(ds.Tables[0].Rows[0]["HCloseMan"]); var HCloseMan2 = Convert.ToString(ds2.Tables[0].Rows[0]["HCloseMan"]); if (!string.IsNullOrWhiteSpace(HCloseMan) || !string.IsNullOrWhiteSpace(HCloseMan2) ) { oCN.RollBack();//回滚事务 objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "单据已删除无法再次删除!"; objJsonResult.data = null; return objJsonResult; } oCN.RunProc("update QC_POStockInCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE() where HInterID=" + HInterID); oCN.RunProc("update QC_POStockInCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE() where HInterID=" + HInterID); oCN.Commit();//提交事务 objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "* 单据删除成功!"; objJsonResult.data = null; return objJsonResult; ; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "删除失败!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 首件检验 /// <summary> /// 保存首件检验单 /// </summary> /// <param name="msg"></param> /// <returns></returns> [Route("SaveQC_FirstPieceCheckList")] [HttpPost] public object SaveQC_FirstPieceCheckList([FromBody] JObject msg) { var _value = msg["msg"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); string UserName = ""; ListModels oListModels = new ListModels(); try { DAL.ClsQC_FirstPieceCheckBill oBill = new DAL.ClsQC_FirstPieceCheckBill(); List<Model.ClsQC_FirstPieceCheckBillMain> lsmain = new List<Model.ClsQC_FirstPieceCheckBillMain>(); msg2 = msg2.Replace("\\", ""); msg2 = msg2.Replace("\n", ""); //\n lsmain = oListModels.getObjectByJson_QC_FirstPieceCheckBillMain(msg2); foreach (Model.ClsQC_FirstPieceCheckBillMain oItem in lsmain) { //oItem.HMaker = ""; UserName = oItem.HMaker; oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); oItem.HBillType = "7505"; oItem.HBillSubType = "7505"; oItem.HBillStatus = 0; oItem.HPeriod = 0; oItem.HMaker = ""; oItem.HMainSourceInterID = oItem.HInterID; //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo); if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!没有单据日期,无法保存!"; objJsonResult.data = 1; return objJsonResult; } oBill.omodel = oItem; } //表体数据 //按 },{来拆分数组 //去掉【和】 msg3 = msg3.Substring(1, msg3.Length - 2); msg3 = msg3.Replace("\\", ""); msg3 = msg3.Replace("\n", ""); //\n //msg2 = msg2.Replace("'", "’"); List<Model.ClsQC_FirstPieceCheckBillSub> ls = new List<Model.ClsQC_FirstPieceCheckBillSub>(); ls = oListModels.getObjectByJson_QC_FirstPieceCheckBillSub(msg3); int i = 0; foreach (Model.ClsQC_FirstPieceCheckBillSub oItemSub in ls) { oItemSub.HBillNo_bak = oBill.omodel.HBillNo;//单据号(备份,以免内码丢失,找不到对应主表) i++; if (string.IsNullOrWhiteSpace(oItemSub.HBillNo_bak)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!没备份单据号,无法保存!"; objJsonResult.data = 1; return objJsonResult; } oItemSub.HSourceEntryID = 0; oItemSub.HSourceInterID = 0; oItemSub.HEntryID = i; // DBUtility.ClsPub.isDate(DateTime.Now); oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); oItemSub.HCloseType = false; oItemSub.HSourceBillNo = ""; oItemSub.HSourceBillType = ""; oItemSub.HRelationQty = 0; oItemSub.HRelationMoney = 0; oItemSub.HCloseMan = ""; oItemSub.HRemark = ""; oBill.DetailColl.Add(oItemSub); } //保存 //保存完毕后处理 bool bResult; if (oBill.omodel.HInterID == 0) { // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); } else { bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); } if (bResult) { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "保存成功!"; //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单"); objJsonResult.data = 1; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo; objJsonResult.data = 1; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!" + e.ToString(); objJsonResult.data = 1; return objJsonResult; } } /// <summary> /// 首件检验逻辑删除功能 /// </summary> /// <returns></returns> [Route("DeltetQC_FirstPieceCheck")] [HttpGet] public object DeltetQC_FirstPieceCheck(string HInterID) { DataSet ds; //string ModRightNameCheck = "Sc_ProcessReport_check"; try { //删除权限 //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "审核失败!无权限!"; // objJsonResult.data = null; // return objJsonResult; //} SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (string.IsNullOrWhiteSpace(HInterID)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "HInterID为空!"; objJsonResult.data = null; return objJsonResult; } oCN.BeginTran();//开始事务 ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillMain where HInterID=" + HInterID, "QC_FirstPieceCheckBillMain"); DataSet ds2 = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillSub where HInterID=" + HInterID, "QC_FirstPieceCheckBillSub"); if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有这个单据,无法删除!"; objJsonResult.data = null; return objJsonResult; ; } var HCloseMan = Convert.ToString(ds.Tables[0].Rows[0]["HCloseMan"]); var HCloseMan2 = Convert.ToString(ds2.Tables[0].Rows[0]["HCloseMan"]); if (!string.IsNullOrWhiteSpace(HCloseMan) || !string.IsNullOrWhiteSpace(HCloseMan2)) { oCN.RollBack();//回滚事务 objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "单据已删除无法再次删除!"; objJsonResult.data = null; return objJsonResult; } oCN.RunProc("update QC_FirstPieceCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE() where HInterID=" + HInterID); oCN.RunProc("update QC_FirstPieceCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE() where HInterID=" + HInterID); oCN.Commit();//提交事务 objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "* 单据删除成功!"; objJsonResult.data = null; return objJsonResult; ; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "删除失败!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 巡检 /// <summary> /// 保存巡检单 /// </summary> /// <param name="msg"></param> /// <returns></returns> [Route("SaveQC_PatrolProcCheckList")] [HttpPost] public object SaveQC_PatrolProcCheckList([FromBody] JObject msg) { var _value = msg["msg"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); string UserName = ""; ListModels oListModels = new ListModels(); try { WebAPI.DLL.ClsQC_PatrolProcCheckBill oBill = new WebAPI.DLL.ClsQC_PatrolProcCheckBill(); List<Model.ClsQC_PatrolProcCheckBillMain> lsmain = new List<Model.ClsQC_PatrolProcCheckBillMain>(); msg2 = msg2.Replace("\\", ""); msg2 = msg2.Replace("\n", ""); //\n lsmain = oListModels.getObjectByJson_QC_PatrolProcCheckBillMain(msg2); foreach (Model.ClsQC_PatrolProcCheckBillMain oItem in lsmain) { //oItem.HMaker = ""; UserName = oItem.HMaker; oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); oItem.HBillType = "7506"; oItem.HBillSubType = "7506"; oItem.HBillStatus = 0; oItem.HPeriod = 0; oItem.HMaker = ""; oItem.HMainSourceInterID = oItem.HInterID; //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo); if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!没有单据日期,无法保存!"; objJsonResult.data = 1; return objJsonResult; } oBill.omodel = oItem; } //表体数据 //按 },{来拆分数组 //去掉【和】 msg3 = msg3.Substring(1, msg3.Length - 2); msg3 = msg3.Replace("\\", ""); msg3 = msg3.Replace("\n", ""); //\n //msg2 = msg2.Replace("'", "’"); List<Model.ClsQC_PatrolProcCheckBillSub> ls = new List<Model.ClsQC_PatrolProcCheckBillSub>(); ls = oListModels.getObjectByJson_QC_PatrolProcCheckBillSub(msg3); int i = 0; foreach (Model.ClsQC_PatrolProcCheckBillSub oItemSub in ls) { oItemSub.HBillNo_bak = oBill.omodel.HBillNo;//单据号(备份,以免内码丢失,找不到对应主表) i++; if (string.IsNullOrWhiteSpace(oItemSub.HBillNo_bak)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!没备份单据号,无法保存!"; objJsonResult.data = 1; return objJsonResult; } oItemSub.HSourceEntryID = 0; oItemSub.HSourceInterID = 0; oItemSub.HEntryID = i; // DBUtility.ClsPub.isDate(DateTime.Now); oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); oItemSub.HCloseType = false; oItemSub.HSourceBillNo = ""; oItemSub.HSourceBillType = ""; oItemSub.HRelationQty = 0; oItemSub.HRelationMoney = 0; oItemSub.HCloseMan = ""; oItemSub.HRemark = ""; oBill.DetailColl.Add(oItemSub); } //保存 //保存完毕后处理 bool bResult; if (oBill.omodel.HInterID == 0) { // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); } else { bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); } if (bResult) { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "保存成功!"; //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单"); objJsonResult.data = 1; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo; objJsonResult.data = 1; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!" + e.ToString(); objJsonResult.data = 1; return objJsonResult; } } /// <summary> /// 巡检逻辑删除功能 /// </summary> /// <returns></returns> [Route("DeltetQC_PatrolProcCheck")] [HttpGet] public object DeltetQC_PatrolProcCheck(string HInterID) { DataSet ds; //string ModRightNameCheck = "Sc_ProcessReport_check"; try { //删除权限 //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "审核失败!无权限!"; // objJsonResult.data = null; // return objJsonResult; //} SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (string.IsNullOrWhiteSpace(HInterID)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "HInterID为空!"; objJsonResult.data = null; return objJsonResult; } oCN.BeginTran();//开始事务 ds = oCN.RunProcReturn("select * from QC_PatrolProcCheckBillMain where HInterID=" + HInterID, "QC_PatrolProcCheckBillMain"); DataSet ds2 = oCN.RunProcReturn("select * from QC_PatrolProcCheckBillSub where HInterID=" + HInterID, "QC_PatrolProcCheckBillSub"); if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有这个单据,无法删除!"; objJsonResult.data = null; return objJsonResult; ; } var HCloseMan = Convert.ToString(ds.Tables[0].Rows[0]["HCloseMan"]); var HCloseMan2 = Convert.ToString(ds2.Tables[0].Rows[0]["HCloseMan"]); if (!string.IsNullOrWhiteSpace(HCloseMan) || !string.IsNullOrWhiteSpace(HCloseMan2)) { oCN.RollBack();//回滚事务 objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "单据已删除无法再次删除!"; objJsonResult.data = null; return objJsonResult; } oCN.RunProc("update QC_PatrolProcCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE() where HInterID=" + HInterID); oCN.RunProc("update QC_PatrolProcCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE() where HInterID=" + HInterID); oCN.Commit();//提交事务 objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "* 单据删除成功!"; objJsonResult.data = null; return objJsonResult; ; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "删除失败!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #endregion } } WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs
@@ -30,8 +30,8 @@ { try { ds = Sc_CheckToolsRepairWorkBillList_s(sWhere); ds = Sc_CheckToolsRepairWorkBillList_s(sWhere); if (ds == null || ds.Tables[0].Rows.Count <= 0) { objJsonResult.code = "0"; @@ -61,7 +61,7 @@ #region sql语句 public static DataSet Sc_CheckToolsRepairWorkBillList_s(string sWhere) { return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_CheckToolsRepairWorkBillList ", "h_v_Sc_CheckToolsRepairWorkBillList"); @@ -69,7 +69,7 @@ /// <summary> @@ -1165,7 +1165,7 @@ DataSet ds; ds = new SQLHelper.ClsCN().RunProcReturn("EXEC h_p_Xs_SellOutFindSP '" + HbillNo + "'", "h_p_Xs_SellOutFindSP"); if (Pub_Class.ClsPub.isLong(ds.Tables[0].Rows.Count) >= 0 ) if (Pub_Class.ClsPub.isLong(ds.Tables[0].Rows.Count) >= 0) { objJsonResult.code = "1"; objJsonResult.count = 1; @@ -1187,5 +1187,281 @@ #endregion #region 模具维修单保存/编辑 /// <summary> /// 保存模具维修单 /// </summary> /// <param name="msg"></param> /// <returns></returns> [Route("Sb_MouldRepairWorkBill/SaveGetMouldRepairWorkBillList")] [HttpPost] public object SaveGetMouldRepairWorkBillList([FromBody] JObject msg) { var _value = msg["msg"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); string UserName = ""; ListModels oListModels = new ListModels(); try { DAL.ClsSb_MouldRepairWorkBill oBill = new DAL.ClsSb_MouldRepairWorkBill(); List<Model.ClsSb_MouldRepairWorkBillMain> lsmain = new List<Model.ClsSb_MouldRepairWorkBillMain>(); msg2 = msg2.Replace("\\", ""); msg2 = msg2.Replace("\n", ""); //\n lsmain = oListModels.getObjectByJson_Gy_MouldRepairWorkBillMain(msg2); foreach (Model.ClsSb_MouldRepairWorkBillMain oItem in lsmain) { //oItem.HMaker = ""; UserName = oItem.HMaker; //制单人 oItem.HBillType = "3807"; oItem.HBillSubType = "3807"; //oItem.HBillNo = ""; //单据号 //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --日期 oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); //oItem.HEquipID = 0; //设备ID(Gy_EquipMent) //oItem.HPeriod = 0; //oItem.HRepairBeginDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); // --维修开始日期 //oItem.HRepairEndDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));// --维修结束日期 //oItem.HRepairContent = ""; //维修内容 //oItem.HCycleUnit = ""; //时间单位(小时,天) //oItem.HPlanTimes = 0; //计划维修工时 //oItem.HTimes = 0; //实际维修工时 //oItem.HEmpID = 0; //维修人(Gy_Employee) //oItem.HManagerID = 0; //主管(Gy_Employee) //oItem.HDeptID = 0; //维修部门(Gy_Department) //oItem.HExplanation = ""; //--维修要求 //oItem.HInnerBillNo = ""; // --内部单据号 //oItem.HMouldID = 0; //成品模具ID //oItem.HSupID = 0; //--供应商(Gy_Supplier) //oItem.HRepairType = ""; //--维修类型(内部维修,委外维修) addnew //oItem.HNewModel = ""; //维修后新规格 //oItem.HNewDesignLife = 0; //新设计寿命 //oItem.HRepairID = 0; //维修项目(Gy_Repair) //oItem.HRemark = ""; //备注 //oItem.HMainSourceInterID = oItem.HInterID; //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo); if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!没有单据日期,无法保存!"; objJsonResult.data = 1; return objJsonResult; } oBill.omodel = oItem; } //表体数据 //按 },{来拆分数组 //去掉【和】 msg3 = msg3.Substring(1, msg3.Length - 2); msg3 = msg3.Replace("\\", ""); msg3 = msg3.Replace("\n", ""); //\n //msg2 = msg2.Replace("'", "’"); List<Model.ClsSb_MouldRepairWorkBillSub> ls = new List<Model.ClsSb_MouldRepairWorkBillSub>(); ls = oListModels.getObjectByJson_Gy_MouldRepairWorkBillSub(msg3); int i = 0; foreach (Model.ClsSb_MouldRepairWorkBillSub oItemSub in ls) { i++; oItemSub.HEntryID = i; //oItemSub.HCloseMan = ""; //行关闭 oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); oItemSub.HCloseType = false; //关闭类型 //oItemSub.HRemark = ""; //备注 oItemSub.HSourceInterID = 0; // 源单主内码 oItemSub.HSourceEntryID = 0; //源单子内码 //oItemSub.HSourceBillNo = ""; //源单单号 //oItemSub.HSourceBillType = ""; //源单类型 oItemSub.HRelationQty = 0; //关联数量 //oItemSub.HRelationMoney = 0; //关联金额 //oItemSub.HRepairID = 0; //维修项目 //oItemSub.HRepairExplanation =""; //维修要求 //oItemSub.HManagerID = 0; //负责人ID //oItemSub.HMoney = 0; //维修费用 oBill.DetailColl.Add(oItemSub); } //保存 //保存完毕后处理 bool bResult; if (oBill.omodel.HInterID == 0) { // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); } else { bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); } if (bResult) { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "保存成功!"; //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单"); objJsonResult.data = 1; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo; objJsonResult.data = 1; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!" + e.ToString(); objJsonResult.data = 1; return objJsonResult; } } #endregion #region[模具维修列表编辑时获取表头数据] [Route("Sb_MouldRepairWorkBill/Sb_MouldRepairWorkBillListCheckDetai")] [HttpGet] public ApiResult<DataSet> Sb_MouldRepairWorkBillListCheckDetai(string HID) { if (string.IsNullOrEmpty(HID)) return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" }; SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sc_MouldRepairWorkBillList where hmainid= " + HID + " ", "h_v_Sc_MouldRepairWorkBillList"); if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) return new ApiResult<DataSet> { code = -1, msg = "不存在维修单号" }; return new ApiResult<DataSet> { code = 1, msg = "查询成功", data = dataSet }; } #endregion #region[模具维修列表编辑时获取表题数据] [Route("Sb_MouldRepairWorkBill/Sb_MouldRepairWorkBillListProjectDetai")] [HttpGet] public object Sb_MouldRepairWorkBillListProjectDetai(string sqlWhere) { DataSet ds; try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); if (sqlWhere == null || sqlWhere.Equals("")) { ds = oCN.RunProcReturn("select HRepairID,HRepairExplanation,HManagerID,HMoney,HRemark from Sc_MouldRepairWorkBillSub", "Sc_MouldRepairWorkBillSub"); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "获取信息成功!"; objJsonResult.data = ds.Tables[0]; } else { string sql1 = "select HRepairID,HRepairExplanation,HManagerID,HMoney,HRemark from Sc_MouldRepairWorkBillSub where 1 = 1 "; string sql = sql1 + sqlWhere; ds = oCN.RunProcReturn(sql, "Sc_MouldRepairWorkBillSub"); objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "获取信息成功!"; objJsonResult.data = ds.Tables[0]; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有返回任何记录!" + e.ToString(); objJsonResult.data = null; } return objJsonResult; } #endregion #region [模具维修单删除功能] /// <summary> /// 模具维修单删除功能 /// </summary> /// <returns></returns> [Route("Sb_MouldRepairWorkBill/DeltetMouldRepairWorkBill")] [HttpGet] public object DeltetMouldRepairWorkBill(string HInterID) { //编辑权限 //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "无删除权限!"; // objJsonResult.data = null; // return objJsonResult; //} Int64 lngBillKey = 0; lngBillKey = DBUtility.ClsPub.isLong(HInterID); if (lngBillKey == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "单据ID为空!"; objJsonResult.data = null; return objJsonResult; } DAL.ClsSb_MouldRepairWorkBill oBill = new DAL.ClsSb_MouldRepairWorkBill(); if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) { if (oBill.omodel.HBillStatus > 1) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "单据当前处于不能删除状态,不能删除!"; objJsonResult.data = null; return objJsonResult; } if (oBill.omodel.HChecker != "") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "单据已经审核,不能删除!"; objJsonResult.data = null; return objJsonResult; } bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); if(IsDete) { objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; objJsonResult.data = null; return objJsonResult; } } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "单据未找到"; objJsonResult.data = null; return objJsonResult; } } #endregion } } WebAPI/DLL/ClsQC_PatrolProcCheckBill.cs
New file @@ -0,0 +1,441 @@ using System; using System.Collections.Generic; using System.Text; using System.Data; namespace WebAPI.DLL { public class ClsQC_PatrolProcCheckBill:DBUtility.ClsXt_BaseBill { public Model.ClsQC_PatrolProcCheckBillMain omodel = new Model.ClsQC_PatrolProcCheckBillMain(); public List<Model.ClsQC_PatrolProcCheckBillSub> DetailColl = new List<Model.ClsQC_PatrolProcCheckBillSub>(); //public List<Model.ClsQC_PatrolProcCheckBillSub_Item> DetailColl1 = new List<Model.ClsQC_PatrolProcCheckBillSub_Item>(); public ClsQC_PatrolProcCheckBill() { base.MvarItemKeySub = "QC_PatrolProcCheckBillSub"; base.MvarItemKeySub2 = ""; base.MvarItemKeySub3 = ""; base.MvarItemKeySub4 = ""; base.MvarItemKey="QC_PatrolProcCheckBillMain"; base.MvarReportTitle="巡检单"; base.BillType="7506"; base.HBillSubType = "7506"; } #region 固定代码 ~ClsQC_PatrolProcCheckBill() { DetailColl = null; } #endregion 自定义方法 //修改单据 public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) { try { // oCn.BeginTran(); string sqlerro = @"UpDate QC_PatrolProcCheckBillMain set " + " HBillNo='" + omodel.HBillNo + "'" + //固定赋值=============== ",HDate='" + omodel.HDate + "'" + ",HYear='" + omodel.HYear.ToString() + "'" + ",HPeriod='" + omodel.HPeriod.ToString() + "'" + ",HBillStatus='" + omodel.HBillStatus + "'" + ",HRemark='" + omodel.HRemark + "'" + //",HBacker='"+omodel.HBacker+"'"+ //",HBackDate='" + omodel.HBackDate + "'" + //",HBackRemark='"+omodel.HBackRemark+"'"+ //",HChecker='" + omodel.HChecker + "'" + //",HCheckDate='" + omodel.HCheckDate + "'" + //",HMaker='" + omodel.HMaker + "'" + //",HMakeDate='" + omodel.HMakeDate + "'" + ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + ",HUpDateDate=getdate()" + //",HCloseMan='" + omodel.HCloseMan + "'" + //",HCloseDate='" + omodel.HCloseDate + "'" + //",HCloseType="+omodel.HCloseType.ToString()+ //",HDeleteMan='" + omodel.HDeleteMan + "'" + //",HDeleteDate='" + omodel.HDeleteDate + "'" + ",HPrintQty=" + omodel.HPrintQty.ToString() + //======================================== //",HSupID=" + omodel.HSupID.ToString() + //",HEmpID=" + omodel.HEmpID.ToString() + ",HSourceID=" + omodel.HSourceID.ToString() + ",HICMOInterID=" + omodel.HICMOInterID.ToString() + ",HICMOBillNo='" + omodel.HICMOBillNo + "'" + ",HICMOQty=" + omodel.HICMOQty.ToString() + ",HProcExchInterID=" + omodel.HICMOQty.ToString() + ",HProcExchEntryID=" + omodel.HICMOQty.ToString() + ",HProcExchBillNo='" + omodel.HProcExchBillNo + "'" + ",HProcExchQty=" + omodel.HICMOQty.ToString() + ",HMaterID=" + omodel.HMaterID.ToString() + ",HFirstCheckEmp=" + omodel.HFirstCheckEmp.ToString() + " where HInterID=" + lngBillKey.ToString(); //更新主表 oCn.RunProc(sqlerro); //删除关联 DeleteRelation(ref sReturn, lngBillKey); //删除子表 DeleteBillSub(lngBillKey); //插入子表 omodel.HInterID = lngBillKey; foreach (Model.ClsQC_PatrolProcCheckBillSub oSub in DetailColl) { oCn.RunProc("Insert into QC_PatrolProcCheckBillSub " + " (HInterID,HBillNo_bak,HEntryID,HCloseMan" + ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" + ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + ",HQCCheckItemID,HQCStd,HQCNote1,HQCNote2,HQCNote3,HQCNote4" + ",HQCNote5,HQCNote6,HQCNote7,HQCNote8,HQCNote9,HQCNote10"+ ") values(" + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" + ",getdate()," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCNote1 + "','" + oSub.HQCNote2 + "','" + oSub.HQCNote3+ "','" + oSub.HQCNote4+ "'" + ",'" + oSub.HQCNote5+ "','" + oSub.HQCNote6 + "','" + oSub.HQCNote7 + "','" + oSub.HQCNote8 + "','" + oSub.HQCNote9 + "','" + oSub.HQCNote10 + "'" + ") "); } //foreach (Model.ClsQC_PatrolProcCheckBillSub_Item oSub2 in DetailColl1) //{ // oCn.RunProc("Insert into QC_PatrolProcCheckBillSub_Item " + // " (HInterID,HBillNo_bak,HEntryID,HCloseMan" + // ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" + // ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + // ",HMaintainItemID,HMaintainItem,HMaintainPart,HClaim,HManagerID" + // ") values(" // + omodel.HInterID.ToString() + ",'" + oSub2.HBillNo_bak + "'," + oSub2.HEntryID.ToString() + ",'" + oSub2.HCloseMan + "'" + // ",getdate()," + Convert.ToString(oSub2.HCloseType ? 1 : 0) + ",'" + oSub2.HRemark + "'," + oSub2.HSourceInterID.ToString() + // "," + oSub2.HSourceEntryID.ToString() + ",'" + oSub2.HSourceBillNo + "','" + oSub2.HSourceBillType + "'," + oSub2.HRelationQty.ToString() + "," + oSub2.HRelationMoney.ToString() + // "," + oSub2.HMaintainItemID.ToString() + ",'" + oSub2.HMaintainItem + "','" + oSub2.HMaintainPart + "','" + oSub2.HClaim + "'," + oSub2.HManagerID.ToString() + // ") "); //} // //foreach (Model.ClsQC_PatrolProcCheckBillSub oSub in DetailColl) //{ // Ds = oCn.RunProcReturn("exec h_p_QC_PatrolProcCheckBill_Qty " + oSub.HICMOInterID, ""); // if (Ds.Tables[0].Rows.Count == 0) // return; // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y") // { // sReturn = "汇报数量超过计划数量!不允许保存"; // return false; // } //} sReturn = "修改单据成功!"; oCn.Commit(); return true; } catch (Exception e) { sReturn = e.Message; oCn.RollBack(); throw (e); } } //新增单据 public override bool AddBill(ref string sReturn) { try { //得到mainid omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); //若MAINDI重复则重新获取 oCn.BeginTran(); //主表 oCn.RunProc("Insert Into QC_PatrolProcCheckBillMain " + "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + ",HYear,HPeriod,HRemark" + ",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" + ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp" + ") " + " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" + "," + omodel.HSourceID.ToString() + "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HICMOQty.ToString() + "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() + ",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() + ") "); //插入子表 foreach (Model.ClsQC_PatrolProcCheckBillSub oSub in DetailColl) { oCn.RunProc("Insert into QC_PatrolProcCheckBillSub " + " (HInterID,HBillNo_bak,HEntryID,HCloseMan" + ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" + ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + ",HQCCheckItemID,HQCStd,HQCNote1,HQCNote2,HQCNote3,HQCNote4" + ",HQCNote5,HQCNote6,HQCNote7,HQCNote8,HQCNote9,HQCNote10" + ") values(" + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" + ",getdate()," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCNote1 + "','" + oSub.HQCNote2 + "','" + oSub.HQCNote3 + "','" + oSub.HQCNote4 + "'" + ",'" + oSub.HQCNote5 + "','" + oSub.HQCNote6 + "','" + oSub.HQCNote7 + "','" + oSub.HQCNote8 + "','" + oSub.HQCNote9 + "','" + oSub.HQCNote10 + "'" + ") "); } //foreach (Model.ClsQC_PatrolProcCheckBillSub_Item oSub2 in DetailColl1) //{ // oCn.RunProc("Insert into QC_PatrolProcCheckBillSub_Item " + // " (HInterID,HBillNo_bak,HEntryID,HCloseMan" + // ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" + // ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + // ",HMaintainItemID,HMaintainItem,HMaintainPart,HClaim,HManagerID" + // ") values(" // + omodel.HInterID.ToString() + ",'" + oSub2.HBillNo_bak + "'," + oSub2.HEntryID.ToString() + ",'" + oSub2.HCloseMan + "'" + // ",getdate()," + Convert.ToString(oSub2.HCloseType ? 1 : 0) + ",'" + oSub2.HRemark + "'," + oSub2.HSourceInterID.ToString() + // "," + oSub2.HSourceEntryID.ToString() + ",'" + oSub2.HSourceBillNo + "','" + oSub2.HSourceBillType + "'," + oSub2.HRelationQty.ToString() + "," + oSub2.HRelationMoney.ToString() + // "," + oSub2.HMaintainItemID.ToString() + ",'" + oSub2.HMaintainItem + "','" + oSub2.HMaintainPart + "','" + oSub2.HClaim + "'," + oSub2.HManagerID.ToString() + // ") "); //} // //foreach (Model.ClsQC_PatrolProcCheckBillSub oSub in DetailColl) //{ // Ds = oCn.RunProcReturn("exec h_p_QC_PatrolProcCheckBill_Qty " + oSub.HICMOInterID, ""); // if (Ds.Tables[0].Rows.Count == 0) // return; // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y") // { // sReturn = "汇报数量超过计划数量!不允许保存"; // return false; // } //} // sReturn = "新增单据成功!"; oCn.Commit(); return true; } catch (Exception e) { sReturn = e.Message; oCn.RollBack(); throw (e); } } //显示单据 public override bool ShowBill(Int64 lngBillKey, ref string sReturn) { try { //查询主表 DataSet Ds ; Ds = oCn.RunProcReturn("Select * from QC_PatrolProcCheckBillMain Where HInterID=" + lngBillKey.ToString(), "QC_PatrolProcCheckBillMain"); if(Ds.Tables[0].Rows.Count==0) { sReturn = "单据未找到!"; return false; } //固定赋值=========================================== omodel.HInterID =DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]); omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim(); omodel.HDate =DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]); omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]); omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]); omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]); omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]); omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]); omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim(); omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]); omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]); omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]); omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim(); omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim(); omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim(); omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim(); omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim(); omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim(); omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim(); omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim(); omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim(); omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim(); omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim(); omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim(); //======================================================== ////== //omodel.HWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWHID"]); //omodel.HSCWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSCWHID"]); //omodel.HSupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]); //omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]); //omodel.HMangerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMangerID"]); omodel.HSourceID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSourceID"]); omodel.HICMOInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOInterID"]); omodel.HICMOBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HICMOBillNo"]); omodel.HICMOQty = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOQty"]); ; omodel.HProcExchInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcExchInterID"]); ; omodel.HProcExchEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcExchEntryID"]); ; omodel.HProcExchBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HProcExchBillNo"]); omodel.HProcExchQty = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcExchQty"]); ; omodel.HMaterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMaterID"]); omodel.HFirstCheckEmp = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HFirstCheckEmp"]); //omodel.HRedBlueFlag = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HRedBlueFlag"]); // //循环 DataSet DsSub ; DsSub = oCn.RunProcReturn("Select * from QC_PatrolProcCheckBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "QC_PatrolProcCheckBillSub"); DetailColl.Clear();//清空 for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) { Model.ClsQC_PatrolProcCheckBillSub oSub = new Model.ClsQC_PatrolProcCheckBillSub(); // 固定赋值=============================================== oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]); oSub.HBillNo_bak = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBillNo_bak"]); oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]); oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]); oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]); oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]); oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim(); oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]); oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]); oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim(); oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim(); oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]); oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]); //=================================================== oSub.HQCCheckItemID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HQCCheckItemID"]); oSub.HQCStd = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCStd"]); oSub.HQCNote1 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote1"]); oSub.HQCNote2 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote2"]); oSub.HQCNote3 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote3"]); oSub.HQCNote4 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote4"]); oSub.HQCNote5 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote5"]); oSub.HQCNote6 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote6"]); oSub.HQCNote7 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote7"]); oSub.HQCNote8 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote8"]); oSub.HQCNote9 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote9"]); oSub.HQCNote10 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote10"]); //oSub.HDotCheckItemID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HDotCheckItemID"]); //oSub.HDotCheckItem = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HDotCheckItem"]); //oSub.HDotCheckPart = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HDotCheckPart"]); //oSub.HClaim = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HClaim"]); //oSub.HManagerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HManagerID"]); //oSub.HWorkerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWorkerID"]); //oSub.HWorkerNumber = DsSub.Tables[0].Rows[i]["HWorkerNumber"].ToString().Trim(); //oSub.HSourceID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceID"]); //oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]); //oSub.HPropertyID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPropertyID"]); //oSub.HSecUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSecUnitID"]); //oSub.HSecUnitRate = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSecUnitRate"]); //oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]); //oSub.HBatchNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBatchNo"]); //oSub.HQtyMust = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HQtyMust"]); //oSub.HQty = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HQty"]); //oSub.HPrice = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPrice"]); //oSub.HMoney = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMoney"]); //oSub.HDesignLife = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HDesignLife"]); //oSub.HLeaveLife = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HLeaveLife"]); //oSub.HUseLife = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HUseLife"]); //oSub.HWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWHID"]); //oSub.HSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPID"]); //oSub.HSCWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCWHID"]); //oSub.HSCSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCSPID"]); //oSub.HSPGroupID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPGroupID"]); //oSub.HQtyMust = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQtyMust"]); //oSub.HBadCount = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HBadCount"]); //oSub.HWasterQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HWasterQty"]); //oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderInterID"]); //oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderEntryID"]); //oSub.HSeOrderBillNo = DsSub.Tables[0].Rows[i]["HSeOrderBillNo"].ToString().Trim(); DetailColl.Add(oSub); } //DataSet DsSub2; //DsSub2 = oCn.RunProcReturn("Select * from QC_PatrolProcCheckBillSub_Item Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "QC_PatrolProcCheckBillSub_Item"); //DetailColl1.Clear();//清空 //for (int i = 0; i < DsSub2.Tables[0].Rows.Count; i++) //{ // Model.ClsQC_PatrolProcCheckBillSub_Item oSub2 = new Model.ClsQC_PatrolProcCheckBillSub_Item(); // // 固定赋值=============================================== // oSub2.HInterID = DBUtility.ClsPub.isLong(DsSub2.Tables[0].Rows[i]["HInterID"]); // oSub2.HEntryID = DBUtility.ClsPub.isLong(DsSub2.Tables[0].Rows[i]["HEntryID"]); // oSub2.HBillNo_bak = DBUtility.ClsPub.isStrNull(DsSub2.Tables[0].Rows[i]["HBillNo_bak"]); // oSub2.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub2.Tables[0].Rows[i]["HCloseMan"]); // oSub2.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub2.Tables[0].Rows[i]["HEntryCloseDate"]); // oSub2.HCloseType = DBUtility.ClsPub.isBool(DsSub2.Tables[0].Rows[i]["HCloseType"]); // oSub2.HRemark = DBUtility.ClsPub.isStrNull(DsSub2.Tables[0].Rows[i]["HRemark"]); // oSub2.HSourceInterID = DBUtility.ClsPub.isLong(DsSub2.Tables[0].Rows[i]["HSourceInterID"]); // oSub2.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub2.Tables[0].Rows[i]["HSourceEntryID"]); // oSub2.HSourceBillType = DsSub2.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim(); // oSub2.HSourceBillNo = DsSub2.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim(); // oSub2.HRelationQty = DBUtility.ClsPub.isDoule(DsSub2.Tables[0].Rows[i]["HRelationQty"]); // oSub2.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub2.Tables[0].Rows[i]["HRelationMoney"]); // //=================================================== // //oSub.HWorkerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWorkerID"]); // //oSub.HWorkerNumber = DsSub.Tables[0].Rows[i]["HWorkerNumber"].ToString().Trim(); // //oSub.HSourceID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceID"]); // //oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]); // //oSub.HPropertyID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPropertyID"]); // //oSub.HSecUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSecUnitID"]); // //oSub.HSecUnitRate = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSecUnitRate"]); // //oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]); // //oSub.HBatchNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBatchNo"]); // //oSub.HQtyMust = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HQtyMust"]); // //oSub.HQty = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HQty"]); // //oSub.HPrice = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPrice"]); // //oSub.HMoney = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMoney"]); // //oSub.HDesignLife = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HDesignLife"]); // //oSub.HLeaveLife = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HLeaveLife"]); // //oSub.HUseLife = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HUseLife"]); // //oSub.HWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWHID"]); // //oSub.HSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPID"]); // //oSub.HSCWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCWHID"]); // //oSub.HSCSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCSPID"]); // //oSub.HSPGroupID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPGroupID"]); // oSub2.HMaintainItemID = DBUtility.ClsPub.isLong(DsSub2.Tables[0].Rows[i]["HMaintainItemID"]); // oSub2.HMaintainItem = DBUtility.ClsPub.isStrNull(DsSub2.Tables[0].Rows[i]["HMaintainItem"]); // oSub2.HMaintainPart = DBUtility.ClsPub.isStrNull(DsSub2.Tables[0].Rows[i]["HMaintainPart"]); // oSub2.HClaim = DBUtility.ClsPub.isStrNull(DsSub2.Tables[0].Rows[i]["HClaim"]); // oSub2.HManagerID = DBUtility.ClsPub.isLong(DsSub2.Tables[0].Rows[i]["HManagerID"]); // //oSub.HQtyMust = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQtyMust"]); // //oSub.HBadCount = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HBadCount"]); // //oSub.HWasterQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HWasterQty"]); // //oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderInterID"]); // //oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderEntryID"]); // //oSub.HSeOrderBillNo = DsSub.Tables[0].Rows[i]["HSeOrderBillNo"].ToString().Trim(); // DetailColl1.Add(oSub2); //} sReturn = "显示单据成功!"; return true; } catch (Exception e) { sReturn = e.Message; throw (e); } } //审核 public bool CheckBill(Int64 lngBillKey, ref string sReturn) { try { string HChecker = DBUtility.ClsPub.CurUserName; string HCheckDate = DBUtility.ClsPub.GetServerDate(-1); oCn.RunProc(" Update " + MvarItemKey + " set HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "' Where HInterID=" + lngBillKey.ToString()); //生成调拨单 //得到调拨单 mainid 单据号 //long NewInterID = DBUtility.ClsPub.CreateBillID("1207", ref DBUtility.ClsPub.sExeReturnInfo); //string NewBillNo = DBUtility.ClsPub.CreateBillCode("1207", ref DBUtility.ClsPub.sExeReturnInfo, true);//得到新单号 //oCn.RunProc("exec h_p_Kf_MoveStockBill_Add " + lngBillKey.ToString() + "," + NewInterID.ToString() + ",'" + NewBillNo + "','" + HChecker + "'"); // sReturn = ""; return true; } catch (Exception e) { sReturn = e.Message; throw (e); } } } } WebAPI/ListModels.cs
@@ -333,5 +333,129 @@ return list; } /// <summary> /// 处理新增检验方案主表的json /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsGy_QCCheckProjectMain> getObjectByJson_Gy_QCCheckProjectMain(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsGy_QCCheckProjectMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_QCCheckProjectMain>>(jsonString); return list; } /// <summary> /// 处理新增检验方案子表的json /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsGy_QCCheckProjectSub> getObjectByJson_ClsGy_QCCheckProjectSub(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsGy_QCCheckProjectSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_QCCheckProjectSub>>(jsonString); return list; } /// <summary> /// 处理新增来料检验主表的json /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsQC_POStockInCheckBillMain> getObjectByJson_QC_POStockInCheckBillMain(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsQC_POStockInCheckBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_POStockInCheckBillMain>>(jsonString); return list; } /// <summary> /// 处理新增来料检验子表的json /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsQC_POStockInCheckBillSub> getObjectByJson_QC_POStockInCheckBillSub(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsQC_POStockInCheckBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_POStockInCheckBillSub>>(jsonString); return list; } /// <summary> /// 处理新增首件检验主表的json /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsQC_FirstPieceCheckBillMain> getObjectByJson_QC_FirstPieceCheckBillMain(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsQC_FirstPieceCheckBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillMain>>(jsonString); return list; } /// <summary> /// 处理新增首件检验子表的json /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsQC_FirstPieceCheckBillSub> getObjectByJson_QC_FirstPieceCheckBillSub(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsQC_FirstPieceCheckBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(jsonString); return list; } /// <summary> /// 处理新增巡检单主表的json /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsQC_PatrolProcCheckBillMain> getObjectByJson_QC_PatrolProcCheckBillMain(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsQC_PatrolProcCheckBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_PatrolProcCheckBillMain>>(jsonString); return list; } /// <summary> /// 处理新增巡检单子表的json /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsQC_PatrolProcCheckBillSub> getObjectByJson_QC_PatrolProcCheckBillSub(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsQC_PatrolProcCheckBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_PatrolProcCheckBillSub>>(jsonString); return list; } /// <summary> /// 处理新增模具维修主表的json /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsSb_MouldRepairWorkBillMain> getObjectByJson_Gy_MouldRepairWorkBillMain(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsSb_MouldRepairWorkBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_MouldRepairWorkBillMain>>(jsonString); return list; } /// <summary> /// 处理新增模具维修子表的json /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Model.ClsSb_MouldRepairWorkBillSub> getObjectByJson_Gy_MouldRepairWorkBillSub(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Model.ClsSb_MouldRepairWorkBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_MouldRepairWorkBillSub>>(jsonString); return list; } } } WebAPI/Properties/PublishProfiles/API.pubxml.user
@@ -7,12 +7,12 @@ <PropertyGroup> <TimeStampOfAssociatedLegacyPublishXmlFile /> <_PublishTargetUrl>D:\网站发布\智云MESWMS\API</_PublishTargetUrl> <History>True|2021-05-17T08:36:00.1226059Z;True|2021-05-17T16:31:05.1414358+08:00;True|2021-05-17T16:22:57.4215158+08:00;True|2021-05-17T16:22:52.6941933+08:00;True|2021-05-17T16:22:49.0033372+08:00;True|2021-05-17T16:18:03.8629751+08:00;True|2021-05-17T15:50:27.6196340+08:00;True|2021-05-17T13:22:15.7308548+08:00;True|2021-05-12T09:19:36.0666124+08:00;True|2021-05-12T09:17:40.0887602+08:00;True|2021-05-12T09:06:24.5508601+08:00;True|2021-05-12T08:39:56.6657894+08:00;True|2021-05-11T17:42:28.6508833+08:00;True|2021-05-11T15:22:03.4937062+08:00;True|2021-05-10T16:45:56.1282466+08:00;True|2021-05-08T19:04:07.1084339+08:00;True|2021-05-08T18:04:40.2166839+08:00;True|2021-05-08T18:04:32.5635574+08:00;True|2021-05-08T18:01:24.5206432+08:00;True|2021-05-08T17:38:05.5582200+08:00;True|2021-05-08T15:26:55.2861241+08:00;True|2021-05-08T14:52:13.1682476+08:00;True|2021-05-08T14:50:30.5356438+08:00;True|2021-05-08T14:38:40.3445313+08:00;True|2021-05-08T14:38:37.9504757+08:00;True|2021-05-08T14:30:31.9762236+08:00;True|2021-05-08T14:21:37.4496495+08:00;True|2021-05-07T20:47:46.1401919+08:00;True|2021-05-07T20:31:45.7777162+08:00;True|2021-05-07T20:31:35.2882424+08:00;True|2021-05-07T20:31:21.5616729+08:00;False|2021-05-07T20:29:33.8855457+08:00;False|2021-05-07T20:28:43.1845420+08:00;False|2021-05-07T20:28:13.1335411+08:00;True|2021-05-07T20:10:01.7346568+08:00;True|2021-05-07T20:03:17.0005596+08:00;True|2021-05-07T09:05:04.3102029+08:00;True|2021-05-06T18:11:36.9078607+08:00;True|2021-05-06T18:08:40.5403791+08:00;True|2021-05-06T18:07:04.1929681+08:00;True|2021-05-06T18:06:54.5987264+08:00;True|2021-05-06T18:05:46.1791578+08:00;True|2021-05-06T17:18:58.8131464+08:00;True|2021-05-06T17:18:37.9969968+08:00;True|2021-05-06T14:47:33.5704679+08:00;True|2021-05-06T10:03:28.7226576+08:00;True|2021-04-28T10:18:54.1336497+08:00;True|2021-04-27T16:34:19.0789205+08:00;True|2021-04-27T14:48:28.8138232+08:00;True|2021-04-27T10:34:03.6370089+08:00;True|2021-04-26T16:18:32.0260755+08:00;True|2021-04-26T15:00:58.6773071+08:00;True|2021-04-26T13:23:50.3968646+08:00;True|2021-04-16T08:50:41.5499248+08:00;True|2021-04-16T08:32:59.1701708+08:00;True|2021-04-16T08:27:36.9176335+08:00;True|2021-04-15T15:56:26.8485667+08:00;True|2021-04-15T15:21:23.2875671+08:00;True|2021-04-15T14:41:16.9980034+08:00;True|2021-04-15T14:36:34.8570017+08:00;True|2021-04-13T16:15:00.7668503+08:00;</History> <History>True|2021-05-23T15:05:37.3855541Z;True|2021-05-22T05:45:13.7439233+08:00;True|2021-05-22T05:42:35.4852011+08:00;True|2021-05-22T05:25:16.8821260+08:00;True|2021-05-21T15:58:20.5625475+08:00;True|2021-05-21T15:55:21.1943961+08:00;True|2021-05-21T15:53:35.6852027+08:00;True|2021-05-21T15:46:56.7370418+08:00;True|2021-05-21T15:32:49.2494690+08:00;True|2021-05-21T15:19:19.8145510+08:00;True|2021-05-21T10:16:44.9563480+08:00;True|2021-05-20T19:21:19.8572280+08:00;True|2021-05-20T19:15:57.2506092+08:00;True|2021-05-20T15:58:09.0123323+08:00;True|2021-05-20T15:54:54.6251445+08:00;True|2021-05-20T15:32:04.9783034+08:00;True|2021-05-20T15:31:58.9418248+08:00;True|2021-05-20T15:31:53.2904235+08:00;True|2021-05-20T15:31:48.5385850+08:00;True|2021-05-20T13:31:35.5777988+08:00;True|2021-05-20T10:46:01.6559203+08:00;True|2021-05-20T10:40:53.2131788+08:00;True|2021-05-20T08:58:49.3511837+08:00;True|2021-05-19T16:15:22.7730518+08:00;True|2021-05-19T16:13:03.2756422+08:00;True|2021-05-19T16:11:16.3163692+08:00;True|2021-05-19T15:31:19.7575868+08:00;True|2021-05-19T14:49:47.6104541+08:00;True|2021-05-19T10:46:17.6515193+08:00;True|2021-05-19T10:45:23.6466498+08:00;True|2021-05-18T17:19:36.9591198+08:00;True|2021-05-18T17:16:38.1513255+08:00;True|2021-05-18T10:31:35.2246444+08:00;True|2021-05-17T16:36:00.1226059+08:00;True|2021-05-17T16:31:05.1414358+08:00;True|2021-05-17T16:22:57.4215158+08:00;True|2021-05-17T16:22:52.6941933+08:00;True|2021-05-17T16:22:49.0033372+08:00;True|2021-05-17T16:18:03.8629751+08:00;True|2021-05-17T15:50:27.6196340+08:00;True|2021-05-17T13:22:15.7308548+08:00;True|2021-05-12T09:19:36.0666124+08:00;True|2021-05-12T09:17:40.0887602+08:00;True|2021-05-12T09:06:24.5508601+08:00;True|2021-05-12T08:39:56.6657894+08:00;True|2021-05-11T17:42:28.6508833+08:00;True|2021-05-11T15:22:03.4937062+08:00;True|2021-05-10T16:45:56.1282466+08:00;True|2021-05-08T19:04:07.1084339+08:00;True|2021-05-08T18:04:40.2166839+08:00;True|2021-05-08T18:04:32.5635574+08:00;True|2021-05-08T18:01:24.5206432+08:00;True|2021-05-08T17:38:05.5582200+08:00;True|2021-05-08T15:26:55.2861241+08:00;True|2021-05-08T14:52:13.1682476+08:00;True|2021-05-08T14:50:30.5356438+08:00;True|2021-05-08T14:38:40.3445313+08:00;True|2021-05-08T14:38:37.9504757+08:00;True|2021-05-08T14:30:31.9762236+08:00;True|2021-05-08T14:21:37.4496495+08:00;True|2021-05-07T20:47:46.1401919+08:00;True|2021-05-07T20:31:45.7777162+08:00;True|2021-05-07T20:31:35.2882424+08:00;True|2021-05-07T20:31:21.5616729+08:00;False|2021-05-07T20:29:33.8855457+08:00;False|2021-05-07T20:28:43.1845420+08:00;False|2021-05-07T20:28:13.1335411+08:00;True|2021-05-07T20:10:01.7346568+08:00;True|2021-05-07T20:03:17.0005596+08:00;True|2021-05-07T09:05:04.3102029+08:00;True|2021-05-06T18:11:36.9078607+08:00;True|2021-05-06T18:08:40.5403791+08:00;True|2021-05-06T18:07:04.1929681+08:00;True|2021-05-06T18:06:54.5987264+08:00;True|2021-05-06T18:05:46.1791578+08:00;True|2021-05-06T17:18:58.8131464+08:00;True|2021-05-06T17:18:37.9969968+08:00;True|2021-05-06T14:47:33.5704679+08:00;True|2021-05-06T10:03:28.7226576+08:00;True|2021-04-28T10:18:54.1336497+08:00;True|2021-04-27T16:34:19.0789205+08:00;True|2021-04-27T14:48:28.8138232+08:00;True|2021-04-27T10:34:03.6370089+08:00;True|2021-04-26T16:18:32.0260755+08:00;True|2021-04-26T15:00:58.6773071+08:00;True|2021-04-26T13:23:50.3968646+08:00;True|2021-04-16T08:50:41.5499248+08:00;True|2021-04-16T08:32:59.1701708+08:00;True|2021-04-16T08:27:36.9176335+08:00;True|2021-04-15T15:56:26.8485667+08:00;True|2021-04-15T15:21:23.2875671+08:00;True|2021-04-15T14:41:16.9980034+08:00;True|2021-04-15T14:36:34.8570017+08:00;True|2021-04-13T16:15:00.7668503+08:00;</History> </PropertyGroup> <ItemGroup> <File Include="apiapp.json"> <publishTime>04/12/2021 11:33:15</publishTime> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="bin/Antlr3.Runtime.dll"> <publishTime>02/22/2013 08:43:40</publishTime> @@ -27,19 +27,19 @@ <publishTime>05/07/2021 20:31:20</publishTime> </File> <File Include="bin/BLL.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="bin/DAL.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="bin/Dapper.dll"> <publishTime>07/22/2016 14:52:40</publishTime> </File> <File Include="bin/DBUtility.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="bin/Kingdee.BOS.WebApi.Client.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="bin/Kingdee.BOS.WebApi.FormService.dll"> <publishTime>09/20/2018 19:23:20</publishTime> @@ -57,7 +57,7 @@ <publishTime>07/25/2012 11:48:56</publishTime> </File> <File Include="bin/Model.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="bin/Newtonsoft.Json.dll"> <publishTime>08/03/2014 20:33:56</publishTime> @@ -66,13 +66,13 @@ <publishTime>01/04/2011 13:48:18</publishTime> </File> <File Include="bin/Pub_Class.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="bin/Pub_Control.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="bin/SQLHelper.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="bin/Swashbuckle.Core.dll"> <publishTime>02/15/2015 17:57:08</publishTime> @@ -138,7 +138,7 @@ <publishTime>11/28/2018 13:01:00</publishTime> </File> <File Include="bin/System.Web.Http.WebHost.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="bin/System.Web.Mvc.dll"> <publishTime>01/28/2015 04:02:18</publishTime> @@ -171,10 +171,10 @@ <publishTime>11/24/2014 11:18:48</publishTime> </File> <File Include="bin/WebAPI.dll"> <publishTime>05/24/2021 00:01:16</publishTime> <publishTime>05/23/2021 23:05:31</publishTime> </File> <File Include="bin/WebAPI.pdb"> <publishTime>05/24/2021 00:01:16</publishTime> <publishTime>05/23/2021 23:05:31</publishTime> </File> <File Include="bin/WebAPI.XmlSerializers.dll"> <publishTime>02/04/2021 21:35:21</publishTime> @@ -192,166 +192,166 @@ <publishTime>03/26/2019 14:23:20</publishTime> </File> <File Include="Content/bootstrap.css"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Content/bootstrap.min.css"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Content/Site.css"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="DLL/BLL.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="DLL/DAL.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="DLL/DBUtility.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="DLL/Kingdee.BOS.WebApi.Client.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="DLL/Model.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="DLL/Newtonsoft.Json.Net35.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="DLL/Pub_Class.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="DLL/Pub_Control.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="DLL/SQLHelper.dll"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.eot"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.svg"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.ttf"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="fonts/glyphicons-halflings-regular.woff"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Global.asax"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Index.html"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="packages.config"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="PrecompiledApp.config"> <publishTime>05/07/2021 20:31:19</publishTime> </File> <File Include="Views/Scripts/bootstrap.js"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Views/Scripts/bootstrap.min.js"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Views/Scripts/jquery-1.10.2.js"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Views/Scripts/jquery-1.10.2.min.js"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Views/Scripts/jquery-1.10.2.min.map"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Views/Scripts/jquery.validate.js"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Views/Scripts/jquery.validate.min.js"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Views/Scripts/jquery.validate.unobtrusive.js"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Views/Scripts/modernizr-2.6.2.js"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Views/Shared/Error.cshtml"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Views/Shared/_Layout.cshtml"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Views/web.config"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Views/_ViewStart.cshtml"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Department_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsGy_Customer_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsGy_Department_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsGy_Employee_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsGy_Group_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsGy_Source_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource"> <publishTime>05/10/2021 09:27:02</publishTime> <publishTime>05/21/2021 18:05:12</publishTime> </File> <File Include="Web.config"> <publishTime>05/24/2021 00:01:20</publishTime> <publishTime>05/23/2021 23:05:36</publishTime> </File> </ItemGroup> </Project> WebAPI/Service/LuBaoSevice.cs
@@ -92,5 +92,88 @@ return dataSet; } /// <summary> /// 检验方案根据id获取信息 /// </summary> public static ApiResult<DataSet> GetCheckProjectDetail(string HID) { if (string.IsNullOrEmpty(HID)) return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" }; var dataSet = GetProjectDb(HID); if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) return new ApiResult<DataSet> { code = -1, msg = "不存在检验单号" }; return new ApiResult<DataSet> { code = 1, msg = "查询成功", data = dataSet }; } public static DataSet GetProjectDb(string HID) { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_Edit_QCCheckProjectList where hmainid= " + HID +" ", "h_v_Gy_Edit_QCCheckProjectList"); return dataSet; } /// <summary> /// 来料检验根据id获取信息 /// </summary> public static ApiResult<DataSet> GetPOStockInCheckBillDetail(string HID) { if (string.IsNullOrEmpty(HID)) return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" }; var dataSet = GetPOStockInDb(HID); if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) return new ApiResult<DataSet> { code = -1, msg = "不存在来料检验单号" }; return new ApiResult<DataSet> { code = 1, msg = "查询成功", data = dataSet }; } public static DataSet GetPOStockInDb(string HID) { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); var dataSet = oCN.RunProcReturn("select top 1 * from h_v_QC_Edit_POStockInCheckBillList where hmainid= " + HID + " ", "h_v_QC_Edit_POStockInCheckBillList"); return dataSet; } /// <summary> /// 首料检验根据id获取信息 /// </summary> public static ApiResult<DataSet> GetQC_FirstPieceCheckBillDetail(string HID) { if (string.IsNullOrEmpty(HID)) return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" }; var dataSet = GetFirstPieceCheckDb(HID); if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) return new ApiResult<DataSet> { code = -1, msg = "不存在首料检验单号" }; return new ApiResult<DataSet> { code = 1, msg = "查询成功", data = dataSet }; } public static DataSet GetFirstPieceCheckDb(string HID) { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); var dataSet = oCN.RunProcReturn("select top 1 * from h_v_QC_Edit_FirstPieceCheckBillList where hmainid= " + HID + " ", "h_v_QC_Edit_FirstPieceCheckBillList"); return dataSet; } /// <summary> /// 巡检单根据id获取信息 /// </summary> public static ApiResult<DataSet> GetQC_PatrolProcCheckBillDetail(string HID) { if (string.IsNullOrEmpty(HID)) return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" }; var dataSet = GetPatrolProcCheckDb(HID); if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) return new ApiResult<DataSet> { code = -1, msg = "不存在巡检单号" }; return new ApiResult<DataSet> { code = 1, msg = "查询成功", data = dataSet }; } public static DataSet GetPatrolProcCheckDb(string HID) { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); var dataSet = oCN.RunProcReturn("select top 1 * from h_v_QC_Edit_PatrolProcCheckBillList where hmainid= " + HID + " ", "h_v_QC_Edit_PatrolProcCheckBillList"); return dataSet; } } } WebAPI/WebAPI.csproj
@@ -365,6 +365,7 @@ <Compile Include="Dapper\SqlPools.cs" /> <Compile Include="DbUntil\DataFormatUntil.cs" /> <Compile Include="DLL\ClsQC_NoPassProdCheckBill.cs" /> <Compile Include="DLL\ClsQC_PatrolProcCheckBill.cs" /> <Compile Include="DLL\ClsSc_ProcessReport.cs" /> <Compile Include="DLL\ClsSc_ProcessSendWork.cs" /> <Compile Include="DLL\ClsWW_EntrustProcessReportBill.cs" />