| | |
| | | |
| | | /// <summary> |
| | | /// 返回班组列表 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Gy_Group/list")] |
| | | [HttpGet] |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //根据用户对应班组的关系,过滤条件中增加只显示对应的班组 |
| | | DataSet dsHitemID = oCN.RunProcReturn("exec h_p_Gy_GetSQLGroupByUser '" + user + "'", "h_p_Gy_GetSQLGroupByUser"); |
| | | sWhere = sWhere + DBUtility.ClsPub.isStrNull(dsHitemID.Tables[0].Rows[0]["HBack"]); |
| | | |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_GroupList " + sWhere+ " order by 班组代码 ", "h_v_GroupList"); |
| | |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string user = sArray[1].ToString();//用户名 |
| | | //string msg4 = sArray[2].ToString(); |
| | | //string msg5 = sArray[3].ToString(); |
| | | |
| | | //判断是否有编辑权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user)) |
| | |
| | | long HProcID = list[0].HProcID; |
| | | int HUSEORGID = list[0].HUSEORGID; |
| | | string HCompName = list[0].HCompName; |
| | | string HPayMentType = list[0].HPayMentType; |
| | | var HDeptNumber = ""; |
| | | //var HEndFlag = 0; |
| | | long HLevel = 1; |
| | | //var HProcID = ""; |
| | | string HMakeEmp = list[0].HMakeEmp; |
| | | string HCheckEmp = list[0].HCheckEmp; |
| | | string HCheckTime = list[0].HCheckTime; |
| | | string HModifyEmp = list[0].HModifyEmp; |
| | | string HModifyTime = list[0].HModifyTime; |
| | | string HStopEmp = list[0].HStopEmp; |
| | | string HStopTime = list[0].HStopTime; |
| | | long HCREATEORGID = list[0].HCREATEORGID; |
| | | |
| | | //判断权限 |
| | | //if (!ClsPub.Security_Log(msg5, 1, false, msg4)) |
| | |
| | | if (HItemID == 0) |
| | | { |
| | | oCN.BeginTran(); |
| | | |
| | | //保存前控制========================================= |
| | | string sql1 = "exec h_p_Gy_Group_BeforeSaveCtrl " + HMakeEmp + ",'" + 1 + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_Group_BeforeSaveCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存失败!原因:保存前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | oCN.RunProc("Insert into Gy_Group " + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HEmpQty,HDeptID,HDeptNumber,HProcID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HBarCodeForBase,HUSEORGID,HCompName) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() + |
| | | "," + HEmpQty.ToString() + "," + HDeptID.ToString() + ",'" + HDeptNumber + "'," + HProcID.ToString() + |
| | | "," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "','" + HBarCodeForBase + "',"+ HUSEORGID + ",'" + HCompName + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | ",HEmpQty,HDeptID,HDeptNumber,HProcID,HUseFlag" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HBarCodeForBase," + |
| | | "HUSEORGID,HCREATEORGID,HCompName,HPayMentType,HMakeEmp,HMakeTime) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "','" + HParentID.ToString() + |
| | | "','" + HEmpQty.ToString() + "','" + HDeptID.ToString() + "','" + HDeptNumber + "','" + HProcID.ToString() + "','" + HUseFlag.ToString() + |
| | | "','" + HLevel.ToString() + "'," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "','" + HBarCodeForBase + "'" + |
| | | ",'" + HUSEORGID + "','" + HCREATEORGID + "','" + HCompName + "','" + HPayMentType + "','" + user + "',getdate())", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //修改上级为非末级代码 |
| | | oCN.RunProc("Update Gy_Group set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | |
| | | //保存后控制========================================= |
| | | string sql2 = "exec h_p_Gy_Group_AfterSaveCtrl " + HMakeEmp + ",'" + 1 + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Gy_Group_AfterSaveCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存失败!原因:保存后判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | oCN.Commit(); |
| | | } |
| | | else |
| | | { |
| | | //若MAINDI重复则重新获取 |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Update Gy_Group set " + |
| | | |
| | | //保存前控制========================================= |
| | | string sql1 = "exec h_p_Gy_Group_BeforeSaveCtrl " + HMakeEmp + ",'" + 2 + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_Group_BeforeSaveCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存失败!原因:保存前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | oCN.RunProc("Update Gy_Group set " + |
| | | " HNumber='" + HNumber + "'" + |
| | | ",HName='" + HName + "'" + |
| | | ",HShortNumber='" + HShortNumber + "'" + |
| | |
| | | ",HParentID=" + HParentID + |
| | | ",HStopflag='" + HStopflag + "'" + |
| | | ",HRemark= '" + HRemark + "'" + |
| | | ",HUseFlag= '" + HUseFlag + "'" + |
| | | ",HUSEORGID='" + HUSEORGID + "'" + |
| | | ",HCREATEORGID='" + HCREATEORGID + "'" + |
| | | ",HModifyEmp= '" + user + "'" + |
| | | ",HModifyTime= getdate()" + |
| | | ",HDeptID=" + HDeptID + |
| | | ",HEmpQty=" + HEmpQty + |
| | | ",HCompName='"+ HCompName+ |
| | | ",HCompName='" + HCompName + "'" + |
| | | ",HPayMentType='" + HPayMentType + |
| | | "',HBarCodeForBase='" + HBarCodeForBase + "' " + |
| | | ", HProcID = '" + HProcID + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.RunProc("Update Gy_Group set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | |
| | | //保存后控制========================================= |
| | | string sql2 = "exec h_p_Gy_Group_AfterSaveCtrl " + HMakeEmp + ",'" + 2 + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Gy_Group_AfterSaveCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存失败!原因:保存后判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | oCN.Commit(); |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | | //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #region |
| | | ///// <summary> |
| | | ///// 修改单据-保存按钮 |
| | | /////参数:string sql。 |
| | |
| | | // return objJsonResult; |
| | | // } |
| | | //} |
| | | #endregion |
| | | |
| | | |
| | | /// <summary> |
| | | /// 班组删除功能 |
| | | /// </summary> |
| | |
| | | { |
| | | DataSet ds; |
| | | DataSet ds1; |
| | | string ModRightNameCheck = "Gy_Group_Delete"; |
| | | try |
| | | { |
| | | //删除权限 |
| | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有数据,无法删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | else if (ds.Tables[0].Rows[0]["HCheckEmp"] != null && ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "已经审核不能删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //删除前控制========================================= |
| | | string sql1 = "exec h_p_Gy_Group_BeforeDelCtrl " + HItemID + ",'" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_Group_BeforeDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | oCN.RunProc("delete from Gy_Group where HItemID=" + HItemID); |
| | | |
| | | |
| | | //删除后控制========================================= |
| | | string sql2 = "exec h_p_Gy_Group_AfterDelCtrl " + HItemID + ",'" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Gy_Group_AfterDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:删除后判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | oCN.Commit();//提交事务 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | |
| | | if (IsAudit == 0) //审核判断 |
| | | { |
| | | //审核前控制========================================= |
| | | string sql1 = "exec h_p_Gy_Group_BeforeCheckCtrl " + HInterID + ",'" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_Group_BeforeCheckCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核失败!原因:审核前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | oCN.RunProc("update Gy_Group set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID); |
| | | |
| | | //审核后控制========================================= |
| | | string sql2 = "exec h_p_Gy_Group_AfterCheckCtrl " + HInterID + ",'" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Gy_Group_AfterCheckCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核失败!原因:审核后判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | } |
| | | if (IsAudit == 1) //反审核判断 |
| | | { |
| | | //反审核前控制========================================= |
| | | string sql1 = "exec h_p_Gy_Group_BeforeUnCheckCtrl " + HInterID + ",'" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_Group_BeforeCheckCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "反审核失败!原因:反审核前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | oCN.RunProc("update Gy_Group set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID); |
| | | |
| | | |
| | | //反审核后控制========================================= |
| | | string sql2 = "exec h_p_Gy_Group_AfterUnCheckCtrl " + HInterID + ",'" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Gy_Group_AfterCheckCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "反审核失败!原因:反审核后判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "反审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | |
| | | if (IsStop == 0) //禁用判断 |
| | | { |
| | | //禁用前控制========================================= |
| | | string sql1 = "exec h_p_Gy_Group_BeforeStopCtrl " + HInterID + ",'" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_Group_BeforeStopCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "禁用失败!原因:禁用前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "禁用失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | oCN.RunProc("update Gy_Group set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID); |
| | | |
| | | |
| | | //禁用后控制========================================= |
| | | string sql2 = "exec h_p_Gy_Group_AfterStopCtrl " + HInterID + ",'" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Gy_Group_AfterStopCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "禁用失败!原因:禁用后判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "禁用失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | } |
| | | if (IsStop == 1) //反禁用判断 |
| | | { |
| | | //反禁用前控制========================================= |
| | | string sql1 = "exec h_p_Gy_Group_BeforeUnStopCtrl " + HInterID + ",'" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_Group_BeforeUnStopCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "反禁用失败!原因:反禁用前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "反禁用失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | oCN.RunProc("update Gy_Group set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID); |
| | | |
| | | |
| | | //反禁用后控制========================================= |
| | | string sql2 = "exec h_p_Gy_Group_AfterUnStopCtrl " + HInterID + ",'" + CurUserName + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Gy_Group_AfterUnStopCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "反禁用失败!原因:反禁用后判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "反禁用失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | #endregion |
| | | |
| | | #region 生产班组 文件上传 |
| | | [Route("Gy_Group/Gy_Process_Excel")] |
| | | [Route("Gy_Group/Gy_Group_Excel")] |
| | | [HttpPost] |
| | | public json Gy_Process_Excel() |
| | | public json Gy_Group_Excel() |
| | | { |
| | | json res = new json(); |
| | | try |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 工序项目 导入(保存) |
| | | [Route("Gy_Group/Gy_Process_btnSave")] |
| | | #region 生产班组 导入(保存) |
| | | [Route("Gy_Group/Gy_Group_btnSave")] |
| | | [HttpPost] |
| | | public object Gy_Group_btnSave([FromBody] JObject sMainSub) |
| | | { |