BaseSet/BaseSet.csproj.user
@@ -9,6 +9,5 @@ <ErrorReportUrlHistory /> <FallbackCulture>zh-CN</FallbackCulture> <VerifyUploadedFiles>false</VerifyUploadedFiles> <ProjectView>ShowAllFiles</ProjectView> </PropertyGroup> </Project> DBUtility/obj/Release/DBUtility.csprojAssemblyReference.cacheBinary files differ
LMES/ClsShowMod.cs
@@ -6607,15 +6607,8 @@ return; try { MessageBox.Show("gnsy:"+gnsy + "gnmc:"+ gnmc); switch (gnsy.ToLower()) { case "gy_dotcheck"://点检项目 Gy_DotCheck oGy_DotCheck = new Gy_DotCheck(); oGy_DotCheck.MdiParent = oMain; oGy_DotCheck.Show(); oMainForm.AddTabPage(oGy_DotCheck); break; case "gy_basedemo": //权限 Gy_BaseDemo oGy_BaseDemo = new Gy_BaseDemo(); @@ -7688,7 +7681,6 @@ oGy_QCCheckItem.Show(); oMainForm.AddTabPage(oGy_QCCheckItem); break; case "": // break; LMES/LMES.csproj
@@ -11,21 +11,6 @@ <AssemblyName>LMES</AssemblyName> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <IsWebBootstrapper>false</IsWebBootstrapper> <PublishUrl>publish\</PublishUrl> <Install>true</Install> <InstallFrom>Disk</InstallFrom> <UpdateEnabled>false</UpdateEnabled> <UpdateMode>Foreground</UpdateMode> <UpdateInterval>7</UpdateInterval> <UpdateIntervalUnits>Days</UpdateIntervalUnits> <UpdatePeriodically>false</UpdatePeriodically> <UpdateRequired>false</UpdateRequired> <MapFileExtensions>true</MapFileExtensions> <ApplicationRevision>0</ApplicationRevision> <ApplicationVersion>1.0.0.%2a</ApplicationVersion> <UseApplicationTrust>false</UseApplicationTrust> <BootstrapperEnabled>true</BootstrapperEnabled> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> @@ -235,13 +220,6 @@ <Project>{38499782-d273-45ee-a5a4-19ac1fc36444}</Project> <Name>WorkM</Name> </ProjectReference> </ItemGroup> <ItemGroup> <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> <Visible>False</Visible> <ProductName>.NET Framework 3.5 SP1</ProductName> <Install>false</Install> </BootstrapperPackage> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. LMES/LMES.csproj.user
File was deleted MES/bin/Debug/AxInterop.gregn6Lib.dllBinary files differ
MES/bin/Debug/BLL.dllBinary files differ
MES/bin/Debug/BLL.pdbBinary files differ
MES/bin/Debug/DAL.dllBinary files differ
MES/bin/Debug/DAL.pdbBinary files differ
MES/bin/Debug/Interop.gregn6Lib.dllBinary files differ
MES/bin/Debug/MES.exeBinary files differ
MES/bin/Debug/MES.pdbBinary files differ
MES/bin/Debug/Model.dllBinary files differ
MES/bin/Debug/Model.pdbBinary files differ
MES/bin/Debug/WarM.dllBinary files differ
MES/bin/Debug/WarM.pdbBinary files differ
MES/bin/Debug/stdole.dllBinary files differ
WebAPI/Controllers/BaseSet/Gy_OrderBackInfoController.cs
New file @@ -0,0 +1,368 @@ using DBUtility; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using WebAPI.Models; namespace WebAPI.Controllers.BaseSet { public class Gy_OrderBackInfoController : ApiController { public DBUtility.ClsPub.Enum_BillStatus BillStatus; private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; #region 订单反馈状态列表数据 /// <summary> /// 返回订单反馈状态列表 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_OrderBackInfo/list")] [HttpGet] public object list(string sWhere) { try { if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_Gy_OrderBackInfoList " + sWhere, "h_v_Gy_OrderBackInfoList"); } else { string sql1 = "select * from h_v_Gy_OrderBackInfoList where 1 = 1 "; string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_Gy_OrderBackInfoList"); } if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 订单反馈状态根据树型ID查询所有层级列表数据 /// <summary> /// 根据树型ID 查找记录 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_OrderBackInfo/cx")] [HttpGet] public object cx(long HInterID) { try { //ds = oCN.RunProcReturn("select * from h_v_IF_RepairCheckList where HitemID=" + HInterID, "h_v_IF_RepairCheckList"); ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.h_v_Gy_OrderBackInfoList WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.h_v_Gy_OrderBackInfoList AS s,a WHERE s.parentid=a.HitemID) SELECT * FROM a"), "h_v_Gy_OrderBackInfoList"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 删除订单反馈状态 /// <summary> /// 订单反馈状态列表删除按钮 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_OrderBackInfo/Delete_Json")] [HttpGet] public object Delete_Json(long HItemID, string User, string ModRightNameDelete) { try { ds = oCN.RunProcReturn("delete from Gy_OrderBackInfo where HItemID = " + HItemID, "Gy_OrderBackInfo"); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "删除成功"; objJsonResult.data = null; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 订单反馈状态新增保存 /// <summary> /// 订单反馈状态-保存按钮 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_OrderBackInfo/AddBill")] [HttpPost] public object AddBill([FromBody] JObject oMain) { try { var _value = oMain["oMain"].ToString(); string msg1 = _value.ToString(); //反序列化 msg1 = "[" + msg1.ToString() + "]"; List<Gy_OrderBackInfo> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_OrderBackInfo>>(msg1); long HItemID = list[0].HItemID.ToString() == "" ? 0 : list[0].HItemID; string HNumber = list[0].HNumber; string HName = list[0].HName; string HShortNumber = list[0].HNumber; long HParentID = list[0].HParentID; string HHelpCode = list[0].HHelpCode; string HRemark = list[0].HRemark; bool HStopflag = list[0].HStopflag; bool HUseFlag = list[0].HUseFlag; if (!DBUtility.ClsPub.AllowNumber(HNumber)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "代码中不能出现连续‘.’并且首位末位不能为‘.’!"; objJsonResult.data = null; return objJsonResult; } //若MAINDI重复则重新获取 oCN.BeginTran(); //主表 oCN.RunProc("Insert Into Gy_OrderBackInfo " + "(HNumber,HName,HHelpCode,HShortNumber,HParentID" + ",HLevel,HEndFlag,HStopflag,HRemark,HUseFlag) " + " values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "','" + HItemID + "'" + ",'1',0,'" + Convert.ToString(HStopflag ? 1 : 0) + "','" + HRemark + "','未使用')"); //修改上级为非末级代码 if (list[0].HItemID.ToString() != "") { oCN.RunProc("Update Gy_OrderBackInfo set HEndflag=0 where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); } oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "新增成功!"; //objJsonResult.data = null; return objJsonResult; } catch (Exception e) { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.Message; objJsonResult.data = null; return objJsonResult; } } #endregion #region 订单反馈状态修改保存 /// <summary> /// 修改单据-保存按钮 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_OrderBackInfo/EditBill")] [HttpPost] public object EditBill([FromBody] JObject oMain) { try { var _value = oMain["oMain"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); string msg4 = sArray[2].ToString(); string msg5 = sArray[3].ToString(); //反序列化 msg2 = "[" + msg2.ToString() + "]"; List<Gy_OrderBackInfo> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_OrderBackInfo>>(msg2); long HItemID = int.Parse(msg3); string HNumber = list[0].HNumber; string HName = list[0].HName; string HShortNumber = list[0].HNumber; long HParentID = list[0].HParentID.ToString() == "" ? 0 : list[0].HParentID; string HHelpCode = list[0].HHelpCode; string HRemark = list[0].HRemark; bool HStopflag = list[0].HStopflag; bool HUseFlag = list[0].HUseFlag; //判断权限 if (!ClsPub.Security_Log(msg5, 1, true, msg4)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有找到该功能模块!"; objJsonResult.data = null; return objJsonResult; } if (!DBUtility.ClsPub.AllowNumber(HNumber)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "代码中不能出现连续‘.’并且首位末位不能为‘.’!"; objJsonResult.data = null; return objJsonResult; } //if (oDept.HavSameNumber(HItemID, HNumber)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "代码重复!"; // objJsonResult.data = null; // return objJsonResult; //} //若MAINDI重复则重新获取 oCN.BeginTran(); //主表 oCN.RunProc("Update Gy_OrderBackInfo set " + " HNumber='" + HNumber + "'" + ",HName='" + HName + "'" + ",HShortNumber='" + HShortNumber + "'" + ",HHelpCode='" + HHelpCode + "'" + ",HParentID=" + HParentID + ",HStopflag='" + Convert.ToString(HStopflag ? 1 : 0) + "'" + ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); //修改子项目代码 //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_RepairCheck,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); //将上级 为非末级 oCN.RunProc("Update Gy_OrderBackInfo set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); // oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "修改单据成功!"; //objJsonResult.data = null; return objJsonResult; } catch (Exception e) { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.Message; objJsonResult.data = null; return objJsonResult; } } #endregion #region 订单反馈状态修改获取绑定数据 /// <summary> /// 维修列表修改按钮方法 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_OrderBackInfo/xg")] [HttpGet] public object xg(long HInterID) { try { ds = oCN.RunProcReturn("select * from Gy_OrderBackInfo where HItemID=" + HInterID, "Gy_OrderBackInfo"); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = ""; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 订单反馈状态获取树型列表数据 [Route("Gy_OrderBackInfo/LoadTree")] [HttpGet] public object LoadTree_Json(string sWhere) { SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); ds = oCN.RunProcReturn("select * from h_v_Gy_OrderBackInfoLoadTree", "h_v_Gy_OrderBackInfoLoadTree"); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } #endregion } } WebAPI/Controllers/BaseSet/Gy_OrderLevController.cs
New file @@ -0,0 +1,427 @@ using DBUtility; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using WebAPI.Models; namespace WebAPI.Controllers.BaseSet { public class Gy_OrderLevController : ApiController { public DBUtility.ClsPub.Enum_BillStatus BillStatus; private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; #region 订单等级列表数据 /// <summary> /// 返回订单等级列表 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_OrderLev/list")] [HttpGet] public object list(string sWhere) { try { if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_Gy_OrderLevList " + sWhere, "h_v_Gy_OrderLevList"); } else { string sql1 = "select * from h_v_Gy_OrderLevList where 1 = 1 "; string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_Gy_OrderLevList"); } if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 订单等级根据树型ID查询所有层级列表数据 /// <summary> /// 根据树型ID 查找记录 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_OrderLev/cx")] [HttpGet] public object cx(long HInterID) { try { //ds = oCN.RunProcReturn("select * from h_v_IF_RepairCheckList where HitemID=" + HInterID, "h_v_IF_RepairCheckList"); ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.h_v_Gy_OrderLevList WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.h_v_Gy_OrderLevList AS s,a WHERE s.parentid=a.HitemID) SELECT * FROM a"), "h_v_Gy_OrderLevList"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 删除订单等级 /// <summary> /// 订单等级列表删除按钮 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_OrderLev/Delete_Json")] [HttpGet] public object Delete_Json(long HItemID, string User, string ModRightNameDelete) { DAL.ClsGy_OrderLev_Ctl oDept = new DAL.ClsGy_OrderLev_Ctl(); DAL.ClsGy_OrderLev_View oDeptHlp = new DAL.ClsGy_OrderLev_View(); try { if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, true, User)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有删除权限"; objJsonResult.data = null; return objJsonResult; } if (oDeptHlp.GetInfoByID(HItemID)) { if (oDept.HavChildCodes(HItemID)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "此项目存在子项目,不能删除!"; objJsonResult.data = null; return objJsonResult; } //删除前判断是否 已使用 20141020 if (oDeptHlp.omodel.HUseFlag != "未使用") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "此项目已使用或者未检测,不能删除!请重新检测再删除!"; objJsonResult.data = null; return objJsonResult; } // if (oDept.DeleteByID(HItemID)) { //写入日志 ClsPub.Add_Log("", "删除项目,代码:" + oDeptHlp.omodel.HNumber + ",名称:" + oDeptHlp.omodel.HName, ClsPub.CurUserName); //更新上级为 末级 objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "删除成功"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "删除失败"; objJsonResult.data = null; return objJsonResult; } } //ds = oCN.RunProcReturn("delete from Gy_Department where HItemID = " + HItemID, "Gy_Department"); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "删除成功"; objJsonResult.data = null; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 订单等级新增保存 /// <summary> /// 订单等级-保存按钮 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_OrderLev/AddBill")] [HttpPost] public object AddBill([FromBody] JObject oMain) { try { var _value = oMain["oMain"].ToString(); string msg1 = _value.ToString(); //反序列化 msg1 = "[" + msg1.ToString() + "]"; DAL.ClsGy_OrderLev_Ctl oDept = new DAL.ClsGy_OrderLev_Ctl(); DAL.ClsGy_OrderLev_View oDeptHlp = new DAL.ClsGy_OrderLev_View(); List<Gy_OrderLevList> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_OrderLevList>>(msg1); long HItemID = list[0].HItemID.ToString() == "" ? 0 : list[0].HItemID; string HNumber = list[0].HNumber; string HName = list[0].HName; string HShortNumber = list[0].HNumber; long HParentID = list[0].HParentID; string HHelpCode = list[0].HHelpCode; string HRemark = list[0].HRemark; string HYX = list[0].HYX; bool HStopflag = list[0].HStopflag; bool HUseFlag = list[0].HUseFlag; if (!DBUtility.ClsPub.AllowNumber(HNumber)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "代码中不能出现连续‘.’并且首位末位不能为‘.’!"; objJsonResult.data = null; return objJsonResult; } //若MAINDI重复则重新获取 oCN.BeginTran(); //主表 oCN.RunProc("Insert Into Gy_OrderLev " + "(HNumber,HName,HHelpCode,HShortNumber,HParentID" + ",HLevel,HEndFlag,HStopflag,HRemark,HUseFlag,HYX) " + " values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "','" + HItemID + "'" + ",'1',0,'" + Convert.ToString(HStopflag ? 1 : 0) + "','" + HRemark + "','未使用','" + HYX + "')"); //修改上级为非末级代码 if (list[0].HItemID.ToString() != "") { oCN.RunProc("Update Gy_OrderLev set HEndflag=0 where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); } oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "新增成功!"; //objJsonResult.data = null; return objJsonResult; } catch (Exception e) { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.Message; objJsonResult.data = null; return objJsonResult; } } #endregion #region 订单等级修改保存 /// <summary> /// 修改单据-保存按钮 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_OrderLev/EditBill")] [HttpPost] public object EditBill([FromBody] JObject oMain) { try { DAL.ClsGy_OrderLev_Ctl oDept = new DAL.ClsGy_OrderLev_Ctl(); DAL.ClsGy_OrderLev_View oDeptHlp = new DAL.ClsGy_OrderLev_View(); var _value = oMain["oMain"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); string msg3 = sArray[1].ToString(); string msg4 = sArray[2].ToString(); string msg5 = sArray[3].ToString(); //反序列化 msg2 = "[" + msg2.ToString() + "]"; List<Gy_OrderLevList> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_OrderLevList>>(msg2); long HItemID = int.Parse(msg3); string HNumber = list[0].HNumber; string HName = list[0].HName; string HShortNumber = list[0].HNumber; long HParentID = list[0].HParentID.ToString() == "" ? 0 : list[0].HParentID; string HHelpCode = list[0].HHelpCode; string HYX = list[0].HYX; string HRemark = list[0].HRemark; bool HStopflag = list[0].HStopflag; bool HUseFlag = list[0].HUseFlag; //判断权限 if (!ClsPub.Security_Log(msg5, 1, true, msg4)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有找到该功能模块!"; objJsonResult.data = null; return objJsonResult; } if (!DBUtility.ClsPub.AllowNumber(HNumber)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "代码中不能出现连续‘.’并且首位末位不能为‘.’!"; objJsonResult.data = null; return objJsonResult; } if (oDept.HavSameNumber(HItemID, HNumber)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "代码重复!"; objJsonResult.data = null; return objJsonResult; } //若MAINDI重复则重新获取 oCN.BeginTran(); //主表 oCN.RunProc("Update Gy_OrderLev set " + " HNumber='" + HNumber + "'" + ",HName='" + HName + "'" + ",HShortNumber='" + HShortNumber + "'" + ",HHelpCode='" + HHelpCode + "'" + ",HYX='" + HYX + "'" + ",HParentID=" + HParentID + ",HStopflag='" + Convert.ToString(HStopflag ? 1 : 0) + "'" + ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); //修改子项目代码 //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_RepairCheck,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); //将上级 为非末级 oCN.RunProc("Update Gy_OrderLev set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); // oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "修改单据成功!"; //objJsonResult.data = null; return objJsonResult; } catch (Exception e) { oCN.RollBack(); objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.Message; objJsonResult.data = null; return objJsonResult; } } #endregion #region 订单等级修改获取绑定数据 /// <summary> /// 维修列表修改按钮方法 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_OrderLev/xg")] [HttpGet] public object xg(long HInterID) { try { ds = oCN.RunProcReturn("select * from Gy_OrderLev where HItemID=" + HInterID, "Gy_OrderLev"); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = ""; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } #endregion #region 订单等级获取树型列表数据 [Route("Gy_OrderLev/LoadTree")] [HttpGet] public object LoadTree_Json(string sWhere) { SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); ds = oCN.RunProcReturn("select * from h_v_Gy_OrderLevLoadTree", "h_v_Gy_OrderLevLoadTree"); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } #endregion } } WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs
@@ -39,22 +39,22 @@ string sql = sql1 + sWhere + "order by HItemID desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_WareHouseList"); } if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { //if (ds == null || ds.Tables[0].Rows.Count == 0) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "false!"; // objJsonResult.data = null; // return objJsonResult; //} //else //{ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } //} } catch (Exception e) { WebAPI/Controllers/BaseSet/Xt_DataDictionary_ProcController.cs
File was deleted WebAPI/Controllers/BaseSet/Xt_DataDictionary_TableController.cs
@@ -19,42 +19,33 @@ /// <summary> /// 返回列表 /// 返回部门列表 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Xt_DataDictionary_Table/list")] [HttpGet] public object list(string sWhere) public object list(string sWhere,string Organization) { try { string sql1 = string.Format(@"select * from h_v_IF_DepartmentList where 组织名称='" + Organization + "'"); if (sWhere == null || sWhere.Equals("")) { ds = oCN.RunProcReturn("select * from h_v_IF_DataDictionary_Table where 1=1 ", "h_v_IF_DataDictionary_Table"); ds = oCN.RunProcReturn(sql1 + sWhere + "order by HItemID desc", "h_v_IF_DepartmentList"); } else { string sql1 = "select * from h_v_IF_DataDictionary_Table where 1=1 "; string sql = sql1 + sWhere; ds = oCN.RunProcReturn(sql, "h_v_IF_DataDictionary_Table"); string sql = sql1 + sWhere + "order by HItemID desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_DepartmentList"); } if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { @@ -65,19 +56,20 @@ return objJsonResult; } } /// <summary> /// 根据基础资料ID 查找记录 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Xt_DataDictionary_Table/cx")] [Route("Gy_Department/cx")] [HttpGet] public object cx(long HInterID) { try { ds = oCN.RunProcReturn("select * from h_v_IF_DataDictionary_TableDetail where HitemID = " + HInterID, "h_v_IF_DataDictionary_TableDetail"); ds = oCN.RunProcReturn("select * from h_v_IF_DepartmentListDetail where HitemID = " + HInterID, "h_v_IF_DepartmentListDetail"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -106,15 +98,15 @@ } /// <summary> /// 删除功能 /// 部门列表删除功能 /// </summary> /// <returns></returns> [Route("DeltetXt_DataDictionary_Table")] [Route("DeltetGy_Department")] [HttpGet] public object DeltetXt_DataDictionary_Table(string HItemID) public object DeltetGy_Department(string HItemID) { DataSet ds; //DataSet ds1; DataSet ds1; try { //删除权限 @@ -137,7 +129,7 @@ return objJsonResult; } oCN.BeginTran();//开始事务 ds = oCN.RunProcReturn("select * from Xt_DataDictionary_Table where HItemID=" + HItemID, "Xt_DataDictionary_Table"); ds = oCN.RunProcReturn("select * from Gy_Department where HItemID=" + HItemID, "Gy_Department"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; @@ -146,18 +138,37 @@ objJsonResult.data = null; return objJsonResult; ; } //ds1 = oCN.RunProcReturn("Select HItemID from Xt_DataDictionary_Table Where HParentID='" + HItemID + "'", "Xt_DataDictionary_Table"); //if (ds1.Tables[0].Rows.Count != 0) ds1 = oCN.RunProcReturn("Select HItemID from Gy_Department Where HParentID='" + HItemID + "'", "Gy_Department"); if (ds1.Tables[0].Rows.Count != 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "此项目存在子项目,不能删除!"; objJsonResult.data = null; return objJsonResult; } string HUseFlag = Convert.ToString(ds.Tables[0].Rows[0]["HUseFlag"]); if (HUseFlag == "已使用") { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "此项目已使用,不能删除!"; objJsonResult.data = null; return objJsonResult; } //v //var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]); //if (HStopflag) //{ // oCN.RollBack();//回滚事务 // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "此项目存在子项目,不能删除!"; // objJsonResult.Message = "数据已删除无法再次删除!"; // objJsonResult.data = null; // return objJsonResult; //} oCN.RunProc("delete from Xt_DataDictionary_Table where HItemID=" + HItemID); oCN.RunProc("delete from Gy_Department where HItemID=" + HItemID); oCN.Commit();//提交事务 objJsonResult.code = "0"; objJsonResult.count = 1; @@ -176,20 +187,26 @@ } } //[Route("Gy_Department/LoadTree")] //[HttpGet] //public object LoadTree_Json() //{ // DBUtility.Gy_BaseFun.LoadTree(tv, imageList1, this.Text, BillName); //} /// <summary> /// 禁用按钮 /// 部门列表禁用按钮 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Xt_DataDictionary_Table/JY_Json")] [Route("Gy_Department/JY_Json")] [HttpGet] public object JY_Json(long HItemID) { try { ds = oCN.RunProcReturn("update Xt_DataDictionary_Table set HStopFlag = 1 where HItemID = " + HItemID, "Xt_DataDictionary_Table"); ds = oCN.RunProcReturn("update Gy_Department set HStopFlag = 1 where HItemID = " + HItemID, "Gy_Department"); objJsonResult.code = "1"; objJsonResult.count = 1; @@ -208,17 +225,17 @@ } /// <summary> /// 反禁用按钮 /// 部门列表反禁用按钮 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Xt_DataDictionary_Table/FJY_Json")] [Route("Gy_Department/FJY_Json")] [HttpGet] public object FJY_Json(long HItemID) { try { ds = oCN.RunProcReturn("update Xt_DataDictionary_Table set HStopFlag = 0 where HItemID = " + HItemID, "Xt_DataDictionary_Table"); ds = oCN.RunProcReturn("update Gy_Department set HStopFlag = 0 where HItemID = " + HItemID, "Gy_Department"); objJsonResult.code = "1"; objJsonResult.count = 1; @@ -241,7 +258,7 @@ ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Xt_DataDictionary_Table/AddBill")] [Route("Gy_Department/AddBill")] [HttpPost] public object AddBill([FromBody] JObject oMain) { @@ -252,49 +269,69 @@ //反序列化 msg1 = "[" + msg1.ToString() + "]"; //DAL.ClsGy_Department_Ctl oDept = new DAL.ClsGy_Department_Ctl(); //DAL.ClsGy_Department_View oDeptHlp = new DAL.ClsGy_Department_View(); DAL.ClsGy_Department_Ctl oDept = new DAL.ClsGy_Department_Ctl(); DAL.ClsGy_Department_View oDeptHlp = new DAL.ClsGy_Department_View(); List<Xt_DataDictionary_Table> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Xt_DataDictionary_Table>>(msg1); List<Department> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Department>>(msg1); long HItemID = list[0].HItemID; long HModNameID = list[0].HModNameID; long HBillTypeID = list[0].HBillTypeID; string HTableName = list[0].HTableName; string HTableCaption = list[0].HTableCaption; string HFieldName = list[0].HFieldName; string HFieldCaption = list[0].HFieldCaption; string HDataType = list[0].HDataType; string HDefaultValue = list[0].HDefaultValue; string HNumber = list[0].HNumber; string HName = list[0].HName; string HShortNumber = list[0].HShortNumber; string HRemark = list[0].HRemark; bool HStopflag = list[0].HStopflag; DateTime HMakeTime = list[0].HMakeTime; string HMakeEmp = list[0].HMakeEmp; DateTime HModifyTime = list[0].HModifyTime; string HModifyEmp = list[0].HModifyEmp; string HUseFlag = list[0].HUseFlag; long HParentID = list[0].HParentID; string HBarCode = list[0].HBarCode; string HHelpCode = list[0].HHelpCode; long HSecManagerID = list[0].HSecManagerID; string HCreator = list[0].HCreator; long HCreateOrgID = list[0].HCreateOrgID; //DateTime HCreateDate = list[0].HCreateDate; long HUseOrgID = list[0].HUseOrgID; string HUpdater = list[0].HUpDater; //DateTime HUpdateDate = list[0].HUpDateDate; string HChecker = list[0].HChecker; //DateTime HCheckDate = list[0].HCheckDate; string HDeleteMan = list[0].HDeleteMan; //DateTime HDeleteDate = list[0].HDeleteDate; if (!DBUtility.ClsPub.AllowNumber(HNumber)) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "代码中不能出现连续‘.’并且首位末位不能为‘.’!"; objJsonResult.data = null; return objJsonResult; } //若MAINDI重复则重新获取 oCN.BeginTran(); //主表 oCN.RunProc("Insert Into Xt_DataDictionary_Table " + "(HModNameID,HBillTypeID,HTableName,HTableCaption" + ",HFieldName,HFieldCaption,HDataType,HDefaultValue,HRemark" + ",HStopflag,HMakeTime,HMakeEmp,HModifyTime" + ",HModifyEmp" + oCN.RunProc("Insert Into Gy_Department " + "(HNumber,HShortNumber,HName,HParentID" + ",HLevel,HEndFlag,HRemark,HStopFlag,HUseFlag" + ",HCREATEORGID,HUSEORGID,HBarCode,HCreator" + ",HUpdater,HChecker,HDeleteMan" + ",HSecManagerID,HCreateDate" + ") " + " values(" + HModNameID + "," + HBillTypeID + ",'" + HTableName + "'"+ ",'" + HTableCaption + "','" + HFieldName + "','" + HFieldCaption + "','" + HDataType + "'" + ",'" + HDefaultValue + "','" + HRemark + "'," + Convert.ToString(HStopflag ? 1 : 0) + "" + ",'" + HMakeTime + "','" + HMakeEmp + "','" + HModifyTime + "','" + HModifyEmp + "'" + " values('" + HNumber + "','" + HShortNumber + "','" + HName + "',0" + ",'',0,'" + HRemark + "',0,''" + "," + HCreateOrgID + "," + HUseOrgID + ",'" + HBarCode + "','" + HCreator + "'" + ",'" + HUpdater + "','" + HChecker + "','" + HDeleteMan + "'" + "," + HSecManagerID + ", getdate()" + ") "); //修改上级为非末级代码 oCN.RunProc("Update Gy_Department set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = null; objJsonResult.data = null; objJsonResult.Message = "新增单据成功!"; //objJsonResult.data = null; return objJsonResult; } catch (Exception e) @@ -314,42 +351,82 @@ ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Xt_DataDictionary_Table/AddBill1")] [Route("Gy_Department/AddBill1")] [HttpPost] public object AddBill1([FromBody] JObject oMain) { try { //DAL.ClsGy_Department_Ctl oDept = new DAL.ClsGy_Department_Ctl(); //DAL.ClsGy_Department_View oDeptHlp = new DAL.ClsGy_Department_View(); DAL.ClsGy_Department_Ctl oDept = new DAL.ClsGy_Department_Ctl(); DAL.ClsGy_Department_View oDeptHlp = new DAL.ClsGy_Department_View(); var _value = oMain["oMain"].ToString(); string msg1 = _value.ToString(); string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); string msg2 = sArray[0].ToString(); //string msg3 = sArray[1].ToString(); string msg3 = sArray[1].ToString(); //string msg4 = sArray[2].ToString(); //string msg5 = sArray[3].ToString(); //反序列化 msg2 = "[" + msg2.ToString() + "]"; List<Xt_DataDictionary_Table> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Xt_DataDictionary_Table>>(msg2); List<Department> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Department>>(msg2); long HItemID = list[0].HItemID; long HModNameID = list[0].HModNameID; long HBillTypeID = list[0].HBillTypeID; string HTableName = list[0].HTableName; string HTableCaption = list[0].HTableCaption; string HFieldName = list[0].HFieldName; string HFieldCaption = list[0].HFieldCaption; string HDataType = list[0].HDataType; string HDefaultValue = list[0].HDefaultValue; string HNumber = list[0].HNumber; string HName = list[0].HName; string HShortNumber = list[0].HShortNumber; string HRemark = list[0].HRemark; string HUseFlag = list[0].HUseFlag; long HParentID = list[0].HParentID; string HBarCode = list[0].HBarCode; string HHelpCode = list[0].HHelpCode; string HUpDater = list[0].HUpDater; long HEmpID = list[0].HEmpID; bool HStopflag = list[0].HStopflag; DateTime HMakeTime = list[0].HMakeTime; string HMakeEmp = list[0].HMakeEmp; DateTime HModifyTime = list[0].HModifyTime; string HModifyEmp = list[0].HModifyEmp; long HSecManagerID = list[0].HSecManagerID; //string HCreator = list[0].HCreator; long HCreateOrgID = list[0].HCreateOrgID; //DateTime HCreateDate = list[0].HCreateDate; long HUseOrgID = list[0].HUseOrgID; string HUpdater = list[0].HUpDater; //DateTime HUpdateDate = list[0].HUpDateDate; string HChecker = list[0].HChecker; //DateTime HCheckDate = list[0].HCheckDate; string HDeleteMan = list[0].HDeleteMan; //DateTime HDeleteDate = list[0].HDeleteDate; long HLevel = 1; bool HEndFlag = true; long HEntityID = 1; //判断权限 //if (!ClsPub.Security_Log(msg5, 1, true, msg4)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "没有找到该功能模块!"; // objJsonResult.data = null; // return objJsonResult; //} //if (!DBUtility.ClsPub.AllowNumber(HNumber)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "代码中不能出现连续‘.’并且首位末位不能为‘.’!"; // objJsonResult.data = null; // return objJsonResult; //} //if (oDept.HavSameNumber(HItemID, HNumber)) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "代码重复!"; // objJsonResult.data = null; // return objJsonResult; //} //保存 //保存完毕后处理 @@ -357,46 +434,35 @@ { //新增 oCN.BeginTran(); oCN.RunProc("Insert Into Xt_DataDictionary_Table " + "(HModNameID,HBillTypeID,HTableName,HTableCaption" + ",HFieldName,HFieldCaption,HDataType,HDefaultValue,HRemark" + ",HStopflag,HMakeTime,HMakeEmp,HModifyTime" + ",HModifyEmp" + ") " + " values(" + HModNameID + "," + HBillTypeID + ",'" + HTableName + "'" + ",'" + HTableCaption + "','" + HFieldName + "','" + HFieldCaption + "','" + HDataType + "'" + ",'" + HDefaultValue + "','" + HRemark + "'," + Convert.ToString(HStopflag ? 1 : 0) + "" + ",'" + HMakeTime + "','" + HMakeEmp + "','" + HModifyTime + "','" + HModifyEmp + "'" + ") ", ref DBUtility.ClsPub.sExeReturnInfo); oCN.RunProc("Insert into Gy_Department " + " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + ",HLevel,HEndFlag,HStopflag,HRemark,HEmpID,HBarCodeForBase,HEntityID,HUSEORGID) " + " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() + "," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'," + HEmpID + ",'" + HBarCode + "'" + "," + HEntityID.ToString() + "," + HUseOrgID + ")", ref DBUtility.ClsPub.sExeReturnInfo); //修改上级为非末级代码 oCN.RunProc("Update Xt_DataDictionary_Table set HStopflag=0 where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); oCN.RunProc("Update Gy_Department set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); oCN.Commit(); } else { oCN.BeginTran(); //主表 oCN.RunProc("Update Xt_DataDictionary_Table set " + " HModNameID= "+ HModNameID + " HBillTypeID= " + HBillTypeID + ",HTableName='" + HTableName + "'" + ",HTableCaption='" + HTableCaption + "'" + ",HFieldName='" + HFieldName + "'" + ",HDataType='" + HDataType + "'" + ",HFieldName='" + HFieldName + "'" + ",HFieldCaption='" + HFieldCaption + "'" + //",HRemark='" + HRemark + "'" + oCN.RunProc("Update Gy_Department set " + " HNumber='" + HNumber + "'" + ",HName='" + HName + "'" + ",HHelpCode='" + HHelpCode + "'" + ",HShortNumber='" + HShortNumber + "'" + ",HParentID=" + HParentID + ",HEmpID=" + HEmpID.ToString() + ",HStopflag=" + Convert.ToString(HStopflag ? 1 : 0) + ",HMakeTime='" + HMakeTime + "'" + ",HMakeEmp='" + HMakeEmp + "'" + ",HModifyTime='" + HModifyTime + "'" + ",HModifyEmp='" + HModifyEmp + "'" + //",HUpdater='" + HUpdater + "'" + //",HUpdateDate= getdate()" + ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); //修改子项目代码 //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Department,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); //将上级 为非末级 oCN.RunProc("Update Xt_DataDictionary_Table set HStopflag=0 where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); oCN.RunProc("Update Gy_Department set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); oCN.Commit(); } objJsonResult.code = "0"; @@ -417,7 +483,91 @@ } } /// <summary> /// 获取最大基础资料ID ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_Department/GetMAXBillID")] [HttpGet] public object GetMAXBillID() { try { ds = oCN.RunProcReturn("select max(hitemid)+1 hitemid from Gy_Department", "Gy_Department"); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = ""; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } /// <summary> /// 部门列表修改按钮方法 ///参数:string sql。 ///返回值:object。 /// </summary> [Route("Gy_Department/xg")] [HttpGet] public object xg(long HInterID) { try { ds = oCN.RunProcReturn("select * from Gy_Department where HItemID=" + HInterID, "Gy_Department"); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = ""; objJsonResult.data = ds.Tables[0]; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } [Route("Gy_Department/LoadTree")] [HttpGet] public object LoadTree_Json(string sWhere) { SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList"); ds = oCN.RunProcReturn("select * from h_v_DepartmentLoadTree", "h_v_DepartmentLoadTree"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "false!"; objJsonResult.data = null; return objJsonResult; } else { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } WebAPI/Controllers/BaseSet/Xt_DataDictionary_ViewController.cs
File was deleted WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
@@ -144,7 +144,44 @@ } [Route("POOrderBack")] [HttpGet] /// <summary> /// 订单反馈状态 /// </summary> /// <param name=""></param> /// <returns></returns> public object POOrderBack(string HmainidList, string OrderBackId) { try { string sql = ""; for (int i = 0; i < HmainidList.Split(',').Length; i++) { var Hmainid = HmainidList.Split(',')[i]; sql = string.Format(@" update Cg_POOrderBillSub set HFeedback ='{0}' where HInterID = '{1}' and HEntryID = '{2}' ", OrderBackId, Hmainid.Split('-')[0], Hmainid.Split('-')[1]); oCN.RunProc(sql); } objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "操作成功!"; //objJsonResult.Message = string.Join(",", HmainidList.ToArray()); objJsonResult.data = 1; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "失败!" + e.ToString(); objJsonResult.data = null; return objJsonResult; } } //判断是否存在权限,并写入日志 public static bool Security_Log(string gnsy, int LogTF, bool Msg, string CurUserName) WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepInBillListController .cs
@@ -92,7 +92,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无查看权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } @@ -223,7 +223,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有保存权限"; objJsonResult.Message = "没有查看权限"; objJsonResult.data = null; return objJsonResult; } WebAPI/Controllers/MJGL/Sc_MouldMoveStockStepOutBillController.cs
@@ -92,7 +92,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无查看权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } @@ -224,7 +224,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有保存权限"; objJsonResult.Message = "没有查看权限"; objJsonResult.data = null; return objJsonResult; } WebAPI/Controllers/MJGL/Sc_MouldOtherOutBillController.cs
@@ -92,7 +92,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无查看权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } @@ -222,7 +222,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无保存权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } WebAPI/Controllers/MJGL/Sc_MouldProdInBillController.cs
@@ -32,7 +32,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无查看权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } @@ -409,7 +409,6 @@ public object Sc_MouldScrapInProdBillListProjectDetai(string sqlWhere) { DataSet ds; DataSet ds1; try { SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); @@ -420,11 +419,6 @@ 实收数量 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; @@ -488,7 +482,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无保存权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } WebAPI/Controllers/MJGL/Sc_MouldProdMoveBillListController.cs
@@ -92,7 +92,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无查看权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } @@ -224,7 +224,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有保存权限"; objJsonResult.Message = "没有查看权限"; objJsonResult.data = null; return objJsonResult; } WebAPI/Controllers/MJGL/Sc_MouldRepairChangeBillController.cs
@@ -32,7 +32,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无查看权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } @@ -430,7 +430,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无保存权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } @@ -508,7 +508,7 @@ //oItem.HDeptID = 0; //验收部门(Gy_Department) //oItem.HExplanation = ""; //摘要(故障描述) //oItem.HRemark = ""; //备注 //oItem.HMainSourceInterID = oItem.HInterID; //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo); WebAPI/Controllers/MJGL/Sc_MouldRepairOutBillController.cs
@@ -35,7 +35,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无查看权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } @@ -196,7 +196,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无保存权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } WebAPI/Controllers/MJGL/Sc_MouldScrapInBillController.cs
@@ -328,7 +328,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无查看权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } WebAPI/Controllers/MJJY/Mj_PDA_MoudlCheckController.cs
@@ -33,8 +33,70 @@ #region 根据模治具条码查找模具档案信息 [Route("Mj_PDA_MoudlCheckBill/txtHBarCode_KeyDown")] [HttpGet] public object txtHBarCode_KeyDown(string HBarCode,long HInterID,long HWHID,long HSPID) public object txtHBarCode_KeyDown(string HBarCode) { //try //{ // if (HBarCode == null || HBarCode.Equals("")) // { // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "条形码不能为空!"; // objJsonResult.data = null; // return objJsonResult; // } // //得到信息 // ds = oCN.RunProcReturn("select top 1 * from h_v_IF_Mould where HBarCode = '" + HBarCode + "'", "h_v_IF_Mould"); // //ds = oWebs.get_InfoByBarCode(HBarCode, ref DBUtility.ClsPub.sErrInfo); // //写入信息 // if (ds == null ) // { // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "未查询到模具信息!"; // objJsonResult.data = null; // return objJsonResult; // } // else // { // omodel.HInterID = HInterID; // omodel.HBillType = "3796"; // omodel.HMaker = DBUtility.ClsPub.CurUserName; // omodel.HMaterID = Convert.ToInt64(ds.Tables[0].Rows[0]["HMaterID"]); // omodel.HQty = 0; // omodel.HBarCode = Convert.ToString(ds.Tables[0].Rows[0]["HBarCode"]); // omodel.HWhID = HWHID; // omodel.HStockPlaceID = HSPID; // omodel.HSourceBillNo = "1"; // omodel.HSourceBillType = "1"; // omodel.HSourceEntryID = 0; // omodel.HSourceInterID = 0; // if (set_SavePonderationBillMain_Temp(omodel, ref DBUtility.ClsPub.sErrInfo)) // { // objJsonResult.code = "1"; // objJsonResult.count = 1; // objJsonResult.Message = "扫码成功!"; // objJsonResult.data = ds.Tables[0]; // return objJsonResult; // } // else // { // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "存入缓存表失败!"; // objJsonResult.data = null; // return objJsonResult; // } // } //} //catch (Exception e) //{ // objJsonResult.code = "0"; // objJsonResult.count = 0; // objJsonResult.Message = "Exception!" + e.ToString(); // objJsonResult.data = null; // return objJsonResult; //} try { if (HBarCode == null || HBarCode.Equals("")) @@ -49,7 +111,7 @@ ds = oCN.RunProcReturn("select top 1 * from h_v_IF_Mould where HBarCode = '" + HBarCode + "'", "h_v_IF_Mould"); //ds = oWebs.get_InfoByBarCode(HBarCode, ref DBUtility.ClsPub.sErrInfo); //写入信息 if (ds == null ) if (ds == null) { objJsonResult.code = "0"; objJsonResult.count = 0; @@ -59,34 +121,11 @@ } else { omodel.HInterID = HInterID; omodel.HBillType = "3796"; omodel.HMaker = DBUtility.ClsPub.CurUserName; omodel.HMaterID = Convert.ToInt64(ds.Tables[0].Rows[0]["HMaterID"]); omodel.HQty = 0; omodel.HBarCode = Convert.ToString(ds.Tables[0].Rows[0]["HBarCode"]); omodel.HWhID = HWHID; omodel.HStockPlaceID = HSPID; omodel.HSourceBillNo = "1"; omodel.HSourceBillType = "1"; omodel.HSourceEntryID = 0; omodel.HSourceInterID = 0; if (set_SavePonderationBillMain_Temp(omodel, ref DBUtility.ClsPub.sErrInfo)) { objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "扫码成功!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "存入缓存表失败!"; objJsonResult.data = null; return objJsonResult; } objJsonResult.code = "0"; objJsonResult.count = 1; objJsonResult.Message = "获取信息成功!"; objJsonResult.data = ds.Tables[0]; return objJsonResult; } } catch (Exception e) WebAPI/Controllers/Sc_CheckToolsRepairWorkBillListController.cs
@@ -4222,7 +4222,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无查看权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } @@ -4338,7 +4338,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无保存权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } WebAPI/Controllers/Sc_MouldOtherInBillController.cs
@@ -92,7 +92,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无查看权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } @@ -223,7 +223,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无保存权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } WebAPI/Controllers/Sc_MouldRepairInBillListController - .cs
@@ -3344,6 +3344,8 @@ #region 模具报废入库单 #region[模具报废入库单编辑时获取表头数据] [Route("Sc_MouldScrapInHouseBill/Sc_MouldScrapInHouseBillListCheckDetai")] [HttpGet] @@ -3440,7 +3442,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无保存权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } @@ -3607,6 +3609,9 @@ } #endregion #region 模具报废入库单保存 [Route("Sc_MouldScrapInHouseBill/SaveGetMouldScrapInHouseBillList_PDA")] @@ -3760,7 +3765,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无查看权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } @@ -3890,7 +3895,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无保存权限!"; objJsonResult.Message = "无删除权限!"; objJsonResult.data = null; return objJsonResult; } @@ -4374,7 +4379,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有保存权限"; objJsonResult.Message = "没有查看权限"; objJsonResult.data = null; return objJsonResult; } @@ -4720,7 +4725,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "没有保存权限"; objJsonResult.Message = "没有查看权限"; objJsonResult.data = null; return objJsonResult; } WebAPI/DLL/ClsSc_MouldRepairChangeBill.cs
@@ -46,14 +46,14 @@ "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HBillNo,HDate," + "HMaker,HMakeDate,HInnerBillNo,HRepairID,HDeptID,HRepairBeginDate,HRepairEndDate," + "HCycleUnit,HPlanTimes,HTimes,HChangeNum,HEmpID,HManagerID,HRepairType,HSupID," + "HNewMaterID,HNewName,HNewModel,HNewModel2,HExplanation,HRepairContent,HRemark,HChangeType" + "HNewMaterID,HNewName,HNewModel,HNewModel2,HExplanation,HRepairContent,HRemark" + ") " + " values("+omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + ",'" + omodel.HMaker + "',getdate()" + ",'" + omodel.HInnerBillNo+"',"+ omodel.HRepairID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HRepairBeginDate + "','" + omodel.HRepairEndDate + "','" + omodel.HCycleUnit + "'," + omodel.HPlanTimes.ToString() + "," + omodel.HTimes.ToString() + "," + omodel.HChangeNum.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + ",'" + omodel.HRepairType + "'," + omodel.HSupID.ToString() + "," + omodel.HNewMaterID.ToString() + ",'"+ omodel.HNewName + "','" + omodel.HNewModel + "','" + omodel.HNewModel2 + "','" + omodel.HExplanation + "','" + omodel.HRepairContent + "','" + omodel.HRemark+ "','"+omodel.HChangeType + "') "); "') "); //插入子表 foreach (Models.ClsSc_MouldRepairChangeBillSub oSub in DetailColl) { WebAPI/Models/ClsSc_MouldRepairChangeBillMain.cs
@@ -28,7 +28,6 @@ public string HNewBarCode; /*--改制后新条码*/ public string HNewDesignLife; /*--新设计寿命*/ public string HExplanation; /* --改制要求*/ public string HChangeType; /* --改型类型*/ public string HRemark; /* --备注*/ public string HInnerBillNo; /* --内部单据号*/ } WebAPI/Models/Gy_OrderBackInfo.cs
New file @@ -0,0 +1,27 @@ using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace WebAPI.Models { public class Gy_OrderBackInfo { public long HItemID { get; set; } //ID public string HNumber { get; set; } //代码 public string HName { get; set; } //名称 public string HShortNumber { get; set; } //短代码 public long HParentID { get; set; } //父级ID public long HLevel { get; set; } //层级 public long HEndFlag { get; set; } // public string HHelpCode { get; set; } // 助记码 public string HRemark { get; set; } //备注 public bool HStopflag { get; set; } //禁用标志 public bool HUseFlag { get; set; } //使用状态 } } WebAPI/Models/Gy_OrderLevList.cs
New file @@ -0,0 +1,28 @@ using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace WebAPI.Models { public class Gy_OrderLevList { public long HItemID { get; set; } //ID public string HNumber { get; set; } //代码 public string HName { get; set; } //名称 public string HShortNumber { get; set; } //短代码 public long HParentID { get; set; } //父级ID public long HLevel { get; set; } //层级 public long HEndFlag { get; set; } // public string HHelpCode { get; set; } // 助记码 public string HRemark { get; set; } //备注 public bool HStopflag { get; set; } //禁用标志 public bool HUseFlag { get; set; } //使用状态 public string HYX { get; set; }//优先级 } } WebAPI/Models/Xt_DataDictionary_Proc.cs
File was deleted WebAPI/Models/Xt_DataDictionary_Table.cs
File was deleted WebAPI/Models/Xt_DataDictionary_View.cs
File was deleted WebAPI/WebAPI.csproj
@@ -278,10 +278,8 @@ <Compile Include="App_Start\RouteConfig.cs" /> <Compile Include="App_Start\SwaggerConfig.cs" /> <Compile Include="App_Start\WebApiConfig.cs" /> <Compile Include="Controllers\BaseSet\Gy_ClassTimePrjController.cs" /> <Compile Include="Controllers\BaseSet\Gy_WorkTypeController.cs" /> <Compile Include="Controllers\BaseSet\Xt_DataDictionary_ProcController.cs" /> <Compile Include="Controllers\BaseSet\Xt_DataDictionary_ViewController.cs" /> <Compile Include="Controllers\BaseSet\Gy_OrderBackInfoController.cs" /> <Compile Include="Controllers\BaseSet\Gy_OrderLevController.cs" /> <Compile Include="Controllers\BaseSet\Xt_DataDictionary_TableController.cs" /> <Compile Include="Controllers\BaseSet\Gy_ModelTypeController.cs" /> <Compile Include="Controllers\BaseSet\Gy_QCCheckClassController.cs" /> @@ -430,6 +428,8 @@ <Compile Include="Models\ApiConfig.cs" /> <Compile Include="Models\ApiResult.cs" /> <Compile Include="Models\CheckItem.cs" /> <Compile Include="Models\Gy_OrderBackInfo.cs" /> <Compile Include="Models\Gy_OrderLevList.cs" /> <Compile Include="Models\ClsGy_EquipFileType.cs" /> <Compile Include="Models\ClsGy_Material_Model.cs" /> <Compile Include="Models\ClsSb_EquipDotCheckBillMain.cs" /> @@ -446,10 +446,6 @@ <Compile Include="Models\ClsSc_MouldRepairOutBillMain.cs" /> <Compile Include="Models\ClsSc_MouldRepairOutBillSub.cs" /> <Compile Include="Models\ClsGy_ProcPrice.cs" /> <Compile Include="Models\Gy_WorkType.cs" /> <Compile Include="Models\Xt_DataDictionary_Proc.cs" /> <Compile Include="Models\Xt_DataDictionary_View.cs" /> <Compile Include="Models\Xt_DataDictionary_Table.cs" /> <Compile Include="Models\Gy_User.cs" /> <Compile Include="Models\Gy_UserSupper.cs" /> <Compile Include="Models\Menu.cs" /> @@ -532,7 +528,6 @@ <Compile Include="Models\WW_EntrustWorkOrderViewModel.cs" /> <Compile Include="Models\基础资料\Gy_Employee.cs" /> <Compile Include="Models\基础资料\Gy_Process.cs" /> <Compile Include="Models\基础资料\Gy_ClassTimePrj.cs" /> <Compile Include="Models\基础资料\Warehouse.cs" /> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> WebAPI/WebAPI.csproj.user
@@ -9,7 +9,7 @@ <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected> <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>D:\Git\houduan\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>D:\Git\houduan\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig> <UseIISExpress>false</UseIISExpress> <Use64BitIISExpress />