Pub_Class/CustomerCls/ClsXt_SystemParameter.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/BLL/Xt_UserController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Controllers/PublicPageMethodController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/ListModels.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/Models/Gy_UserProcess.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WebAPI/WebAPI.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
@@ -1493,6 +1493,13 @@ { omodel.Sc_MESProceReportWorkBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); } //=========工序进站单 //自动匹配流水号 if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationBill_ProcNo") { omodel.MES_StationBill_ProcNo = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]); } } sReturn = "显示单据成功!"; return true; Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
@@ -428,6 +428,9 @@ //工艺路线 public string Gy_RoutingBill_SaveAutoLastProc; //保存到数据库时自动加上转工序 //工序进站单 public string MES_StationBill_ProcNo; //自动匹配流水号 } } WebAPI/Controllers/BLL/Xt_UserController.cs
@@ -1137,5 +1137,87 @@ } #endregion #region 根据用户编码查找已分配工序列表 [Route("Xt_User/ProcessPlaylist")] [HttpGet] public object ProcessPlaylist(string HUserID) { try { ds = oCN.RunProcReturn("select HProcID,工序代码 HProcNumber,工序名称 HProcName from h_v_Gy_UserProcessList where HUserID='" + HUserID + "' ", "h_v_Gy_UserProcessList"); if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "无工序信息!"; 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 用户关联工序保存 [Route("Xt_User/SaveUserProcess")] [HttpPost] public object SaveUserProcess([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(); ListModels oListModels = new ListModels(); try { List<Models.Gy_UserProcess> lsmain = new List<Models.Gy_UserProcess>(); msg2 = msg2.Substring(1, msg2.Length - 2); msg2 = msg2.Replace("\\", ""); msg2 = msg2.Replace("\n", ""); //\n lsmain = oListModels.getObjectByJson_Gy_UserProcess(msg2); oCN.BeginTran(); //删除已经关联的数据 oCN.RunProc("Delete From Gy_UserByProcess where HUserID='" + msg3.ToString() + "'"); foreach (Models.Gy_UserProcess oItem in lsmain) { //重新写入关联数据 oCN.RunProc("insert into Gy_UserByProcess (HProcID,HUserID) values ('" + oItem.HProcID + "','" + msg3.ToString() + "')"); } oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "保存成功!"; //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单"); objJsonResult.data = 1; return objJsonResult; } catch (Exception e) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "保存失败!" + e.ToString(); objJsonResult.data = 1; return objJsonResult; } } #endregion } } WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -120,7 +120,7 @@ { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "未查询到流转卡信息!"; objJsonResult.Message = "未查询到流水号信息!工序号错误或者当前工序号不允许进站,请添加!"; objJsonResult.data = null; return objJsonResult; } @@ -141,6 +141,76 @@ } #endregion #region 根据登录用户获取工序 [Route("Sc_StationInBill/autoGetProcNo")] [HttpGet] public object autoGetProcNo(string HUserName,string HInterID) { string sReturn = ""; if (oSystemParameter.ShowBill(ref sReturn) == true) { //系统参数是否为自动匹配流水号,N为手动输入,Y为自动匹配 if (oSystemParameter.omodel.MES_StationBill_ProcNo == "Y") { try { if (HUserName == null || HUserName.Equals("")) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "用户名不能为空!"; objJsonResult.data = null; return objJsonResult; } //得到信息 ds = oCN.RunProcReturn("select * from h_v_Sc_StationBill_autoGetProcNo where HInterID = '" + HInterID + "' and 用户名称 ='" + HUserName + "'", "h_v_Sc_StationBill_autoGetProcNo"); //写入信息 if (ds == null || ds.Tables[0].Rows.Count == 0) { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "未查询到工序信息!"; objJsonResult.data = null; return objJsonResult; } 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; } } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "手动输入模式"; objJsonResult.data = ""; return objJsonResult; } } else { objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "系统参数异常"; objJsonResult.data = ""; return objJsonResult; } } #endregion #region 出站汇报单显示表体明细 [Route("Cj_StationEntrustInBill/DisBillEntryList")] WebAPI/Controllers/PublicPageMethodController.cs
@@ -3686,5 +3686,41 @@ } #endregion #region 选择工序基础资料 [Route("PublicPageMethod/ProcessList")] [HttpGet] public object ProcessList(string sWhere) { try { ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Process " + sWhere + " Order by HItemID", "Gy_Process"); //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 } } WebAPI/ListModels.cs
@@ -2198,6 +2198,18 @@ } /// <summary> /// 用户工序关系信息表的json /// </summary> /// <param name="jsonString"></param> /// <returns></returns> public List<Models.Gy_UserProcess> getObjectByJson_Gy_UserProcess(string jsonString) { jsonString = "[" + jsonString.ToString() + "]"; List<Models.Gy_UserProcess> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.Gy_UserProcess>>(jsonString); return list; } /// <summary> /// 用户-用户关系信息表的json /// </summary> /// <param name="jsonString"></param> WebAPI/Models/Gy_UserProcess.cs
New file @@ -0,0 +1,14 @@ using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace WebAPI.Models { public class Gy_UserProcess { public int HProcID { get; set; } public string HProcNumber { get; set; } public string HProcName { get; set; } } } WebAPI/WebAPI.csproj
@@ -617,6 +617,7 @@ <Compile Include="Models\Employee.cs" /> <Compile Include="Models\Gy_UserCustomer.cs" /> <Compile Include="Models\Gy_UserMater.cs" /> <Compile Include="Models\Gy_UserProcess.cs" /> <Compile Include="Models\Gy_UserUser.cs" /> <Compile Include="Models\JIT_Cg_PODemandPlanBillMain.cs" /> <Compile Include="Models\JIT_Cg_PODemandPlanBillSub.cs" />