diff --git a/.gitignore b/.gitignore index 9491a2f..adbe2cd 100644 --- a/.gitignore +++ b/.gitignore @@ -360,4 +360,5 @@ MigrationBackup/ .ionide/ # Fody - auto-generated XML schema -FodyWeavers.xsd \ No newline at end of file +FodyWeavers.xsd +/FactorySystemApi/File/Temp diff --git a/FactorySystemApi/Controllers/TeamworkController.cs b/FactorySystemApi/Controllers/TeamworkController.cs index a15e962..502b7f3 100644 --- a/FactorySystemApi/Controllers/TeamworkController.cs +++ b/FactorySystemApi/Controllers/TeamworkController.cs @@ -448,8 +448,13 @@ namespace FactorySystemApi.Controllers { "FBomJson", bomStr } }; BaseBll.UpdateDataModel(upParam, "TFS_FTeamwork"); - BaseBll.UpdateTeamProcess(teamwork.FID, (int)Constant.ProcessType.视图类型编辑, 2, 2); - int count= TeamworkBll.ExecSql(BaseBll.GetTaskSql(taskId, 2, teamId, (int)Constant.ProcessType.视图类型编辑)); + BaseBll.UpdateTeamProcess(teamwork.FID, (int)Constant.ProcessType.物料分类, 2, 2); + int count= TeamworkBll.ExecSql(BaseBll.GetTaskSql(taskId, 2, teamId, (int)Constant.ProcessType.物料分类)); + + + BaseBll.UpdateTeamProcess(teamwork.FID, (int)Constant.ProcessType.替代品确认, 2, 1); + BaseBll.CreateTaskData(teamwork.FID, user.FID, "16");//替代品确认 + BaseBll.UpdateTeamProcess(teamwork.FID, (int)Constant.ProcessType.协同发起, 3, 2); @@ -530,7 +535,7 @@ namespace FactorySystemApi.Controllers BaseBll.UpdateDataModel(upParam, "TFS_FTeamwork"); //协同发起事项 //BaseBll.UpdateTeamProcess(teamwork.FID, (int)Constant.ProcessType.协同发起, 3, 2); - BaseBll.UpdateTeamProcess(teamwork.FID, (int)Constant.ProcessType.视图类型编辑, 2, 1); + BaseBll.UpdateTeamProcess(teamwork.FID, (int)Constant.ProcessType.物料分类, 2, 1); //改 //if (teamwork.FPackID == -1) //{ diff --git a/FactorySystemApi/Controllers/ViewController.cs b/FactorySystemApi/Controllers/ViewController.cs index d841c93..ae5897e 100644 --- a/FactorySystemApi/Controllers/ViewController.cs +++ b/FactorySystemApi/Controllers/ViewController.cs @@ -5,6 +5,7 @@ using FactorySystemCommon; using FactorySystemModel.BusinessModel; using FactorySystemModel.ResponseModel; using FactorySystemModel.SqlSugarModel; +using Microsoft.Ajax.Utilities; using Newtonsoft.Json; namespace FactorySystemApi.Controllers @@ -54,6 +55,32 @@ namespace FactorySystemApi.Controllers }, apiResult, Request); } + /// + /// 根据协同ID获取基础表集合 + /// + /// + /// + [HttpPost] + public ApiResult GetMaterialInfoListByTeamId(Dictionary inParam) + { + var apiResult = new ApiResult(); + + + + return ExceptionHelper.TryReturnException(() => { + if (!string.IsNullOrWhiteSpace(inParam["tempId"].ToString())) + { + apiResult.Data = _viewBll.EexcSql(int.Parse(inParam["tempId"].ToString())); + } + else + { + apiResult.Data = _viewBll.EexcSql(); + } + + }, apiResult, Request); + } + + /// /// 保存视图编辑的内容 /// diff --git a/FactorySystemApi/File/Temp/148_4/生产版本视图.xlsx b/FactorySystemApi/File/Temp/148_4/生产版本视图.xlsx deleted file mode 100644 index 77c64e5..0000000 Binary files a/FactorySystemApi/File/Temp/148_4/生产版本视图.xlsx and /dev/null differ diff --git a/FactorySystemApi/File/Temp/148_4/生产版本视图1.xlsx b/FactorySystemApi/File/Temp/148_4/生产版本视图1.xlsx deleted file mode 100644 index 0e477fd..0000000 Binary files a/FactorySystemApi/File/Temp/148_4/生产版本视图1.xlsx and /dev/null differ diff --git a/FactorySystemApi/File/Temp/148_4/生产版本视图2.xlsx b/FactorySystemApi/File/Temp/148_4/生产版本视图2.xlsx deleted file mode 100644 index 1b7cd8c..0000000 Binary files a/FactorySystemApi/File/Temp/148_4/生产版本视图2.xlsx and /dev/null differ diff --git a/FactorySystemApi/File/Temp/149_5/组装BOM视图.xlsx b/FactorySystemApi/File/Temp/149_5/组装BOM视图.xlsx deleted file mode 100644 index e3080c4..0000000 Binary files a/FactorySystemApi/File/Temp/149_5/组装BOM视图.xlsx and /dev/null differ diff --git a/FactorySystemApi/File/Temp/149_5/组装BOM视图1.xlsx b/FactorySystemApi/File/Temp/149_5/组装BOM视图1.xlsx deleted file mode 100644 index 18a7049..0000000 Binary files a/FactorySystemApi/File/Temp/149_5/组装BOM视图1.xlsx and /dev/null differ diff --git a/FactorySystemApi/File/Temp/149_5/组装BOM视图2.xlsx b/FactorySystemApi/File/Temp/149_5/组装BOM视图2.xlsx deleted file mode 100644 index 5e28ee4..0000000 Binary files a/FactorySystemApi/File/Temp/149_5/组装BOM视图2.xlsx and /dev/null differ diff --git a/FactorySystemApi/File/Temp/67764_SAP/1.xlsx b/FactorySystemApi/File/Temp/67764_SAP/1.xlsx deleted file mode 100644 index f649b7c..0000000 Binary files a/FactorySystemApi/File/Temp/67764_SAP/1.xlsx and /dev/null differ diff --git a/FactorySystemApi/File/Temp/67764_SAP/KXFXG22110101-K050@测试新包材3.xlsx b/FactorySystemApi/File/Temp/67764_SAP/KXFXG22110101-K050@测试新包材3.xlsx deleted file mode 100644 index 878ba2f..0000000 Binary files a/FactorySystemApi/File/Temp/67764_SAP/KXFXG22110101-K050@测试新包材3.xlsx and /dev/null differ diff --git a/FactorySystemApi/File/Temp/67764_View/KXFXG22110101-K050@测试新包材3.xlsx b/FactorySystemApi/File/Temp/67764_View/KXFXG22110101-K050@测试新包材3.xlsx deleted file mode 100644 index 95e9878..0000000 Binary files a/FactorySystemApi/File/Temp/67764_View/KXFXG22110101-K050@测试新包材3.xlsx and /dev/null differ diff --git a/FactorySystemApi/File/Temp/基础视图/基础视图.xlsx b/FactorySystemApi/File/Temp/基础视图/基础视图.xlsx deleted file mode 100644 index e621198..0000000 Binary files a/FactorySystemApi/File/Temp/基础视图/基础视图.xlsx and /dev/null differ diff --git a/FactorySystemApi/File/Temp/视图/视图.xlsx b/FactorySystemApi/File/Temp/视图/视图.xlsx deleted file mode 100644 index c1f7864..0000000 Binary files a/FactorySystemApi/File/Temp/视图/视图.xlsx and /dev/null differ diff --git a/FactorySystemBll/TeamworkBll.cs b/FactorySystemBll/TeamworkBll.cs index 3ef0e4c..6415ee5 100644 --- a/FactorySystemBll/TeamworkBll.cs +++ b/FactorySystemBll/TeamworkBll.cs @@ -130,7 +130,8 @@ namespace FactorySystemBll int proType = int.Parse(item.FValue); switch (proType) { - case (int)Constant.ProcessType.视图类型编辑: + case (int)Constant.ProcessType.物料分类: + case (int)Constant.ProcessType.替代品确认: case (int)Constant.ProcessType.协同发起: string funcIds1 = "1,2,3";//36 users = db.Queryable().Where(string.Format(@"FState=1 and FRoleID in(select distinct FRoleID from diff --git a/FactorySystemBll/ViewBll.cs b/FactorySystemBll/ViewBll.cs index a79d53e..d77b656 100644 --- a/FactorySystemBll/ViewBll.cs +++ b/FactorySystemBll/ViewBll.cs @@ -354,5 +354,24 @@ namespace FactorySystemBll } return result; } + + + public object EexcSql(int tempId=0) + { + string sql = ""; + if (tempId > 0) + { + sql = string.Format(@"SELECT b.*,c.FName AS 'FUserName' FROM TFS_ViewMaterial AS a LEFT JOIN TFS_Material AS b ON a.FMaterialID=b.FID LEFT JOIN TUser AS c ON b.FEditUser=c.FID WHERE a.FTeamID={0}", tempId); + + } + else + { + sql = string.Format(@"SELECT b.*,c.FName AS 'FUserName' FROM TFS_ViewMaterial AS a LEFT JOIN TFS_Material AS b ON a.FMaterialID=b.FID LEFT JOIN TUser AS c ON b.FEditUser=c.FID "); + } + SqlSugarClient db = AppSettingsHelper.GetSqlSugar(); + + return db.Ado.SqlQuery(sql); + + } } } diff --git a/FactorySystemModel/EnumModel/Constant.cs b/FactorySystemModel/EnumModel/Constant.cs index 52afdca..3b188aa 100644 --- a/FactorySystemModel/EnumModel/Constant.cs +++ b/FactorySystemModel/EnumModel/Constant.cs @@ -100,7 +100,8 @@ namespace FactorySystemModel.EnumModel 成品视图物料组复核 = 12, 流程确认完成 = 13, 补充包材规格 = 14, - 视图类型编辑=15 + 物料分类 = 15, + 替代料确认=16 } /// @@ -108,7 +109,7 @@ namespace FactorySystemModel.EnumModel /// public enum ProcessType { - 视图类型编辑=0, + 物料分类=0, 协同发起 = 1, 成品视图 = 2, 新半成品中间品香基 = 3, @@ -117,7 +118,8 @@ namespace FactorySystemModel.EnumModel 生产工艺路线 = 6, 生成版本 = 7, 组装BOM包含新包材 = 8, - 流程完成 = 9 + 流程完成 = 9, + 替代品确认=10 } ///